1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{84514:function($,et,en){"use strict";en.d(et,{Lz:function(){return FieldPath},EK:function(){return Timestamp},ET:function(){return addDoc},Ab:function(){return arrayRemove},vr:function(){return arrayUnion},hJ:function(){return collection},oe:function(){return deleteDoc},AK:function(){return deleteField},JU:function(){return doc},Yp:function(){return getCountFromServer},QT:function(){return getDoc},PL:function(){return getDocs},zN:function(){return getDocsFromServer},ad:function(){return getFirestore},nP:function(){return increment},LV:function(){return initializeFirestore},b9:function(){return limit},cf:function(){return onSnapshot},Xo:function(){return orderBy},IO:function(){return query},i3:function(){return runTransaction},Bt:function(){return serverTimestamp},pl:function(){return setDoc},TQ:function(){return startAfter},r7:function(){return updateDoc},ar:function(){return where},qs:function(){return writeBatch}});var er,ei,eo,es,el,eu,ed,eh,ep,em,ef,eg,ey,ev,ex=en(33310),e_=en(75),ew=en(44645),ek=en(99711),eC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},eE={};(function(){function m(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.C=Array(this.blockSize),this.o=this.h=0,this.u()}function n($,et,en){en||(en=0);let er=Array(16);if("string"==typeof et)for(var ei=0;ei<16;++ei)er[ei]=et.charCodeAt(en++)|et.charCodeAt(en++)<<8|et.charCodeAt(en++)<<16|et.charCodeAt(en++)<<24;else for(ei=0;ei<16;++ei)er[ei]=et[en++]|et[en++]<<8|et[en++]<<16|et[en++]<<24;et=$.g[0],en=$.g[1],ei=$.g[2];let eo=$.g[3],es;es=et+(eo^en&(ei^eo))+er[0]+3614090360&4294967295,es=eo+(ei^(et=en+(es<<7&4294967295|es>>>25))&(en^ei))+er[1]+3905402710&4294967295,es=ei+(en^(eo=et+(es<<12&4294967295|es>>>20))&(et^en))+er[2]+606105819&4294967295,es=en+(et^(ei=eo+(es<<17&4294967295|es>>>15))&(eo^et))+er[3]+3250441966&4294967295,es=et+(eo^(en=ei+(es<<22&4294967295|es>>>10))&(ei^eo))+er[4]+4118548399&4294967295,es=eo+(ei^(et=en+(es<<7&4294967295|es>>>25))&(en^ei))+er[5]+1200080426&4294967295,es=ei+(en^(eo=et+(es<<12&4294967295|es>>>20))&(et^en))+er[6]+2821735955&4294967295,es=en+(et^(ei=eo+(es<<17&4294967295|es>>>15))&(eo^et))+er[7]+4249261313&4294967295,es=et+(eo^(en=ei+(es<<22&4294967295|es>>>10))&(ei^eo))+er[8]+1770035416&4294967295,es=eo+(ei^(et=en+(es<<7&4294967295|es>>>25))&(en^ei))+er[9]+2336552879&4294967295,es=ei+(en^(eo=et+(es<<12&4294967295|es>>>20))&(et^en))+er[10]+4294925233&4294967295,es=en+(et^(ei=eo+(es<<17&4294967295|es>>>15))&(eo^et))+er[11]+2304563134&4294967295,es=et+(eo^(en=ei+(es<<22&4294967295|es>>>10))&(ei^eo))+er[12]+1804603682&4294967295,es=eo+(ei^(et=en+(es<<7&4294967295|es>>>25))&(en^ei))+er[13]+4254626195&4294967295,es=ei+(en^(eo=et+(es<<12&4294967295|es>>>20))&(et^en))+er[14]+2792965006&4294967295,es=en+(et^(ei=eo+(es<<17&4294967295|es>>>15))&(eo^et))+er[15]+1236535329&4294967295,en=ei+(es<<22&4294967295|es>>>10),es=et+(ei^eo&(en^ei))+er[1]+4129170786&4294967295,et=en+(es<<5&4294967295|es>>>27),es=eo+(en^ei&(et^en))+er[6]+3225465664&4294967295,eo=et+(es<<9&4294967295|es>>>23),es=ei+(et^en&(eo^et))+er[11]+643717713&4294967295,ei=eo+(es<<14&4294967295|es>>>18),es=en+(eo^et&(ei^eo))+er[0]+3921069994&4294967295,en=ei+(es<<20&4294967295|es>>>12),es=et+(ei^eo&(en^ei))+er[5]+3593408605&4294967295,et=en+(es<<5&4294967295|es>>>27),es=eo+(en^ei&(et^en))+er[10]+38016083&4294967295,eo=et+(es<<9&4294967295|es>>>23),es=ei+(et^en&(eo^et))+er[15]+3634488961&4294967295,ei=eo+(es<<14&4294967295|es>>>18),es=en+(eo^et&(ei^eo))+er[4]+3889429448&4294967295,en=ei+(es<<20&4294967295|es>>>12),es=et+(ei^eo&(en^ei))+er[9]+568446438&4294967295,et=en+(es<<5&4294967295|es>>>27),es=eo+(en^ei&(et^en))+er[14]+3275163606&4294967295,eo=et+(es<<9&4294967295|es>>>23),es=ei+(et^en&(eo^et))+er[3]+4107603335&4294967295,ei=eo+(es<<14&4294967295|es>>>18),es=en+(eo^et&(ei^eo))+er[8]+1163531501&4294967295,en=ei+(es<<20&4294967295|es>>>12),es=et+(ei^eo&(en^ei))+er[13]+2850285829&4294967295,et=en+(es<<5&4294967295|es>>>27),es=eo+(en^ei&(et^en))+er[2]+4243563512&4294967295,eo=et+(es<<9&4294967295|es>>>23),es=ei+(et^en&(eo^et))+er[7]+1735328473&4294967295,ei=eo+(es<<14&4294967295|es>>>18),es=en+(eo^et&(ei^eo))+er[12]+2368359562&4294967295,es=et+((en=ei+(es<<20&4294967295|es>>>12))^ei^eo)+er[5]+4294588738&4294967295,es=eo+((et=en+(es<<4&4294967295|es>>>28))^en^ei)+er[8]+2272392833&4294967295,es=ei+((eo=et+(es<<11&4294967295|es>>>21))^et^en)+er[11]+1839030562&4294967295,es=en+((ei=eo+(es<<16&4294967295|es>>>16))^eo^et)+er[14]+4259657740&4294967295,es=et+((en=ei+(es<<23&4294967295|es>>>9))^ei^eo)+er[1]+2763975236&4294967295,es=eo+((et=en+(es<<4&4294967295|es>>>28))^en^ei)+er[4]+1272893353&4294967295,es=ei+((eo=et+(es<<11&4294967295|es>>>21))^et^en)+er[7]+4139469664&4294967295,es=en+((ei=eo+(es<<16&4294967295|es>>>16))^eo^et)+er[10]+3200236656&4294967295,es=et+((en=ei+(es<<23&4294967295|es>>>9))^ei^eo)+er[13]+681279174&4294967295,es=eo+((et=en+(es<<4&4294967295|es>>>28))^en^ei)+er[0]+3936430074&4294967295,es=ei+((eo=et+(es<<11&4294967295|es>>>21))^et^en)+er[3]+3572445317&4294967295,es=en+((ei=eo+(es<<16&4294967295|es>>>16))^eo^et)+er[6]+76029189&4294967295,es=et+((en=ei+(es<<23&4294967295|es>>>9))^ei^eo)+er[9]+3654602809&4294967295,es=eo+((et=en+(es<<4&4294967295|es>>>28))^en^ei)+er[12]+3873151461&4294967295,es=ei+((eo=et+(es<<11&4294967295|es>>>21))^et^en)+er[15]+530742520&4294967295,es=en+((ei=eo+(es<<16&4294967295|es>>>16))^eo^et)+er[2]+3299628645&4294967295,en=ei+(es<<23&4294967295|es>>>9),es=et+(ei^(en|~eo))+er[0]+4096336452&4294967295,et=en+(es<<6&4294967295|es>>>26),es=eo+(en^(et|~ei))+er[7]+1126891415&4294967295,eo=et+(es<<10&4294967295|es>>>22),es=ei+(et^(eo|~en))+er[14]+2878612391&4294967295,ei=eo+(es<<15&4294967295|es>>>17),es=en+(eo^(ei|~et))+er[5]+4237533241&4294967295,en=ei+(es<<21&4294967295|es>>>11),es=et+(ei^(en|~eo))+er[12]+1700485571&4294967295,et=en+(es<<6&4294967295|es>>>26),es=eo+(en^(et|~ei))+er[3]+2399980690&4294967295,eo=et+(es<<10&4294967295|es>>>22),es=ei+(et^(eo|~en))+er[10]+4293915773&4294967295,ei=eo+(es<<15&4294967295|es>>>17),es=en+(eo^(ei|~et))+er[1]+2240044497&4294967295,en=ei+(es<<21&4294967295|es>>>11),es=et+(ei^(en|~eo))+er[8]+1873313359&4294967295,et=en+(es<<6&4294967295|es>>>26),es=eo+(en^(et|~ei))+er[15]+4264355552&4294967295,eo=et+(es<<10&4294967295|es>>>22),es=ei+(et^(eo|~en))+er[6]+2734768916&4294967295,ei=eo+(es<<15&4294967295|es>>>17),es=en+(eo^(ei|~et))+er[13]+1309151649&4294967295,en=ei+(es<<21&4294967295|es>>>11),es=et+(ei^(en|~eo))+er[4]+4149444226&4294967295,et=en+(es<<6&4294967295|es>>>26),es=eo+(en^(et|~ei))+er[11]+3174756917&4294967295,eo=et+(es<<10&4294967295|es>>>22),es=ei+(et^(eo|~en))+er[2]+718787259&4294967295,ei=eo+(es<<15&4294967295|es>>>17),es=en+(eo^(ei|~et))+er[9]+3951481745&4294967295,$.g[0]=$.g[0]+et&4294967295,$.g[1]=$.g[1]+(ei+(es<<21&4294967295|es>>>11))&4294967295,$.g[2]=$.g[2]+ei&4294967295,$.g[3]=$.g[3]+eo&4294967295}function t($,et){this.h=et;let en=[],er=!0;for(let ei=$.length-1;ei>=0;ei--){let eo=0|$[ei];er&&eo==et||(en[ei]=eo,er=!1)}this.g=en}!function($,et){function c(){}c.prototype=et.prototype,$.F=et.prototype,$.prototype=new c,$.prototype.constructor=$,$.D=function($,en,er){for(var ei=Array(arguments.length-2),eo=2;eo<arguments.length;eo++)ei[eo-2]=arguments[eo];return et.prototype[en].apply($,ei)}}(m,function(){this.blockSize=-1}),m.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},m.prototype.v=function($,et){void 0===et&&(et=$.length);let en=et-this.blockSize,er=this.C,ei=this.h,eo=0;for(;eo<et;){if(0==ei)for(;eo<=en;)n(this,$,eo),eo+=this.blockSize;if("string"==typeof $){for(;eo<et;)if(er[ei++]=$.charCodeAt(eo++),ei==this.blockSize){n(this,er),ei=0;break}}else for(;eo<et;)if(er[ei++]=$[eo++],ei==this.blockSize){n(this,er),ei=0;break}}this.h=ei,this.o+=et},m.prototype.A=function(){var $=Array((this.h<56?this.blockSize:2*this.blockSize)-this.h);$[0]=128;for(var et=1;et<$.length-8;++et)$[et]=0;et=8*this.o;for(var en=$.length-8;en<$.length;++en)$[en]=255&et,et/=256;for(this.v($),$=Array(16),et=0,en=0;en<4;++en)for(let er=0;er<32;er+=8)$[et++]=this.g[en]>>>er&255;return $};var $,et={};
vendor: 5,864 bytes, line 1
1function u($){return -128<=$&&$<128?Object.prototype.hasOwnProperty.call(et,$)?et[$]:et[$]=new t([0|$],$<0?-1:0):new t([0|$],$<0?-1:0)}function v($){if(isNaN($)||!isFinite($))return en;if($<0)return x(v(-$));let et=[],er=1;for(let en=0;$>=er;en++)et[en]=$/er|0,er*=4294967296;return new t(et,0)}var en=u(0),eo=u(1),es=u(16777216);function C($){if(0!=$.h)return!1;for(let et=0;et<$.g.length;et++)if(0!=$.g[et])return!1;return!0}function B($){return -1==$.h}function x($){let et=$.g.length,en=[];for(let er=0;er<et;er++)en[er]=~$.g[er];return new t(en,~$.h).add(eo)}function F($,et){return $.add(x(et))}function G($,et){for(;(65535&$[et])!=$[et];)$[et+1]+=$[et]>>>16,$[et]&=65535,et++}function H($,et){this.g=$,this.h=et}function D($,et){if(C(et))throw Error("division by zero");if(C($))return new H(en,en);if(B($))return et=D(x($),et),new H(x(et.g),x(et.h));if(B(et))return et=D($,x(et)),new H(x(et.g),et.h);if($.g.length>30){if(B($)||B(et))throw Error("slowDivide_ only works with positive integers.");for(var er=eo,ei=et;0>=ei.l($);)er=I(er),ei=I(ei);var es=J(er,1),el=J(ei,1);for(ei=J(ei,2),er=J(er,2);!C(ei);){var eu=el.add(ei);0>=eu.l($)&&(es=es.add(er),el=eu),ei=J(ei,1),er=J(er,1)}return et=F($,es.j(et)),new H(es,et)}for(es=en;$.l(et)>=0;){for(ei=(ei=Math.ceil(Math.log(er=Math.max(1,Math.floor($.m()/et.m())))/Math.LN2))<=48?1:Math.pow(2,ei-48),eu=(el=v(er)).j(et);B(eu)||eu.l($)>0;)er-=ei,eu=(el=v(er)).j(et);C(el)&&(el=eo),es=es.add(el),$=F($,eu)}return new H(es,$)}function I($){let et=$.g.length+1,en=[];for(let er=0;er<et;er++)en[er]=$.i(er)<<1|$.i(er-1)>>>31;return new t(en,$.h)}function J($,et){let en=et>>5;et%=32;let er=$.g.length-en,ei=[];for(let eo=0;eo<er;eo++)ei[eo]=et>0?$.i(eo+en)>>>et|$.i(eo+en+1)<<32-et:$.i(eo+en);return new t(ei,$.h)}($=t.prototype).m=function(){if(B(this))return-x(this).m();let $=0,et=1;for(let en=0;en<this.g.length;en++){let er=this.i(en);$+=(er>=0?er:4294967296+er)*et,et*=4294967296}return $},$.toString=function($){if(($=$||10)<2||36<$)throw Error("radix out of range: "+$);if(C(this))return"0";if(B(this))return"-"+x(this).toString($);let et=v(Math.pow($,6));var en=this;let er="";for(;;){let ei=D(en,et).g,eo=(((en=F(en,ei.j(et))).g.length>0?en.g[0]:en.h)>>>0).toString($);if(C(en=ei))return eo+er;for(;eo.length<6;)eo="0"+eo;er=eo+er}},$.i=function($){return $<0?0:$<this.g.length?this.g[$]:this.h},$.l=function($){return B($=F(this,$))?-1:C($)?0:1},$.abs=function(){return B(this)?x(this):this},$.add=function($){let et=Math.max(this.g.length,$.g.length),en=[],er=0;for(let ei=0;ei<=et;ei++){let et=er+(65535&this.i(ei))+(65535&$.i(ei)),eo=(et>>>16)+(this.i(ei)>>>16)+($.i(ei)>>>16);er=eo>>>16,et&=65535,eo&=65535,en[ei]=eo<<16|et}return new t(en,-2147483648&en[en.length-1]?-1:0)},$.j=function($){if(C(this)||C($))return en;if(B(this))return B($)?x(this).j(x($)):x(x(this).j($));if(B($))return x(this.j(x($)));if(0>this.l(es)&&0>$.l(es))return v(this.m()*$.m());let et=this.g.length+$.g.length,er=[];for(var ei=0;ei<2*et;ei++)er[ei]=0;for(ei=0;ei<this.g.length;ei++)for(let et=0;et<$.g.length;et++){let en=this.i(ei)>>>16,eo=65535&this.i(ei),es=$.i(et)>>>16,el=65535&$.i(et);er[2*ei+2*et]+=eo*el,G(er,2*ei+2*et),er[2*ei+2*et+1]+=en*el,G(er,2*ei+2*et+1),er[2*ei+2*et+1]+=eo*es,G(er,2*ei+2*et+1),er[2*ei+2*et+2]+=en*es,G(er,2*ei+2*et+2)}for($=0;$<et;$++)er[$]=er[2*$+1]<<16|er[2*$];for($=et;$<2*et;$++)er[$]=0;return new t(er,0)},$.B=function($){return D(this,$).h},$.and=function($){let et=Math.max(this.g.length,$.g.length),en=[];for(let er=0;er<et;er++)en[er]=this.i(er)&$.i(er);return new t(en,this.h&$.h)},$.or=function($){let et=Math.max(this.g.length,$.g.length),en=[];for(let er=0;er<et;er++)en[er]=this.i(er)|$.i(er);return new t(en,this.h|$.h)},$.xor=function($){let et=Math.max(this.g.length,$.g.length),en=[];for(let er=0;er<et;er++)en[er]=this.i(er)^$.i(er);return new t(en,this.h^$.h)},m.prototype.digest=m.prototype.A,m.prototype.reset=m.prototype.u,m.prototype.update=m.prototype.v,ei=eE.Md5=m,t.prototype.add=t.prototype.add,t.prototype.multiply=t.prototype.j,t.prototype.modulo=t.prototype.B,t.prototype.compare=t.prototype.l,t.prototype.toNumber=t.prototype.m,t.prototype.toString=t.prototype.toString,t.prototype.getBits=t.prototype.i,t.fromNumber=v,t.fromString=function y($,et){if(0==$.length)throw Error("number format error: empty string");if((et=et||10)<2||36<et)throw Error("radix out of range: "+et);if("-"==$.charAt(0))return x(y($.substring(1),et));if($.indexOf("-")>=0)throw Error('number format error: interior "-" character');let er=v(Math.pow(et,8)),ei=en;for(let en=0;en<$.length;en+=8){var eo=Math.min(8,$.length-en);let es=parseInt($.substring(en,en+eo),et);eo<8?(eo=v(Math.pow(et,eo)),ei=ei.j(eo).add(v(es))):ei=(ei=ei.j(er)).add(v(es))}return ei},er=eE.Integer=t}).apply(void 0!==eC?eC:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var eI="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},eS={};(function(){var $,et,en=Object.defineProperty,er=function($){$=["object"==typeof globalThis&&globalThis,$,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof eI&&eI];for(var et=0;et<$.length;++et){var en=$[et];if(en&&en.Math==Math)return en}throw Error("Cannot find global object")}(this);function da($,et){if(et)e:{var ei=er;$=$.split(".");for(var eo=0;eo<$.length-1;eo++){var es=$[eo];if(!(es in ei))break e;ei=ei[es]}(et=et(eo=ei[$=$[$.length-1]]))!=eo&&null!=et&&en(ei,$,{configurable:!0,writable:!0,value:et})}}da("Symbol.dispose",function($){return $||Symbol("Symbol.dispose")}),da("Array.prototype.values",function($){return $||function(){return this[Symbol.iterator]()}}),da("Object.entries",function($){return $||function($){var et,en=[];for(et in $)Object.prototype.hasOwnProperty.call($,et)&&en.push([et,$[et]]);return en}});
1var ei=ei||{},ef=this||self;function n($){var et=typeof $;return"object"==et&&null!=$||"function"==et}function fa($,et,en){return $.call.apply($.bind,arguments)}function p($,et,en){return(p=fa).apply(null,arguments)}function ha($,et){var en=Array.prototype.slice.call(arguments,1);return function(){var et=en.slice();return et.push.apply(et,arguments),$.apply(this,et)}}function t($,et){function c(){}c.prototype=et.prototype,$.Z=et.prototype,$.prototype=new c,$.prototype.constructor=$,$.Ob=function($,en,er){for(var ei=Array(arguments.length-2),eo=2;eo<arguments.length;eo++)ei[eo-2]=arguments[eo];return et.prototype[en].apply($,ei)}}var eg="undefined"!=typeof AsyncContext&&"function"==typeof AsyncContext.Snapshot?$=>$&&AsyncContext.Snapshot.wrap($):$=>$;function ja($){let et=$.length;if(et>0){let en=Array(et);for(let er=0;er<et;er++)en[er]=$[er];return en}return[]}function ka($,et){for(let et=1;et<arguments.length;et++){let er=arguments[et];var en=typeof er;if("array"==(en="object"!=en?en:er?Array.isArray(er)?"array":en:"null")||"object"==en&&"number"==typeof er.length){en=$.length||0;let et=er.length||0;$.length=en+et;for(let ei=0;ei<et;ei++)$[en+ei]=er[ei]}else $.push(er)}}var ey=new class{constructor($,et){this.i=$,this.j=et,this.h=0,this.g=null}get(){let $;return this.h>0?(this.h--,$=this.g,this.g=$.next,$.next=null):$=this.i(),$}}(()=>new ra,$=>$.reset());let ra=class ra{constructor(){this.next=this.g=this.h=null}set($,et){this.h=$,this.g=et,this.next=null}reset(){this.next=this.g=this.h=null}};let ev,ex=!1,e_=new class{constructor(){this.h=this.g=null}add($,et){let en=ey.get();en.set($,et),this.h?this.h.next=en:this.g=en,this.h=en}},ta=()=>{let $=Promise.resolve(void 0);ev=()=>{$.then(sa)}};function sa(){let $;for(var et;$=null,e_.g&&($=e_.g,e_.g=e_.g.next,e_.g||(e_.h=null),$.next=null),et=$;){try{et.h.call(et.g)}catch($){!function($){ef.setTimeout(()=>{throw $},0)}($)}ey.j(et),ey.h<100&&(ey.h++,et.next=ey.g,ey.g=et)}ex=!1}function w(){this.u=this.u,this.C=this.C}function x($,et){this.type=$,this.g=this.target=et,this.defaultPrevented=!1}w.prototype.u=!1,w.prototype.dispose=function(){this.u||(this.u=!0,this.N())},w.prototype[Symbol.dispose]=function(){this.dispose()},w.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},x.prototype.h=function(){this.defaultPrevented=!0};var ew=function(){if(!ef.addEventListener||!Object.defineProperty)return!1;var $=!1,et=Object.defineProperty({},"passive",{get:function(){$=!0}});try{let c=()=>{};ef.addEventListener("test",c,et),ef.removeEventListener("test",c,et)}catch($){}return $}();function y($){return/^[\s\xa0]*$/.test($)}function z($,et){x.call(this,$?$.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,$&&this.init($,et)}t(z,x),z.prototype.init=function($,et){let en=this.type=$.type,er=$.changedTouches&&$.changedTouches.length?$.changedTouches[0]:null;this.target=$.target||$.srcElement,this.g=et,(et=$.relatedTarget)||("mouseover"==en?et=$.fromElement:"mouseout"==en&&(et=$.toElement)),this.relatedTarget=et,er?(this.clientX=void 0!==er.clientX?er.clientX:er.pageX,this.clientY=void 0!==er.clientY?er.clientY:er.pageY,this.screenX=er.screenX||0,this.screenY=er.screenY||0):(this.clientX=void 0!==$.clientX?$.clientX:$.pageX,this.clientY=void 0!==$.clientY?$.clientY:$.pageY,this.screenX=$.screenX||0,this.screenY=$.screenY||0),this.button=$.button,this.key=$.key||"",this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.shiftKey=$.shiftKey,this.metaKey=$.metaKey,this.pointerId=$.pointerId||0,this.pointerType=$.pointerType,this.state=$.state,this.i=$,$.defaultPrevented&&z.Z.h.call(this)},z.prototype.h=function(){z.Z.h.call(this);let $=this.i;$.preventDefault?$.preventDefault():$.returnValue=!1};var ek="closure_listenable_"+(1e6*Math.random()|0),eC=0;function wa($,et,en,er,ei){this.listener=$,this.proxy=null,this.src=et,this.type=en,this.capture=!!er,this.ha=ei,this.key=++eC,this.da=this.fa=!1}function xa($){$.da=!0,$.listener=null,$.proxy=null,$.src=null,$.ha=null}function ya($,et,en){for(let er in $)et.call(en,$[er],er,$)}function Ba($){let et={};for(let en in $)et[en]=$[en];return et}let eE="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1ing toString valueOf".split(" ");function Da($,et){let en,er;for(let et=1;et<arguments.length;et++){for(en in er=arguments[et])$[en]=er[en];for(let et=0;et<eE.length;et++)en=eE[et],Object.prototype.hasOwnProperty.call(er,en)&&($[en]=er[en])}}function Ea($){this.src=$,this.g={},this.h=0}function Ga($,et){let en=et.type;if(en in $.g){var er,ei=$.g[en],eo=Array.prototype.indexOf.call(ei,et,void 0);(er=eo>=0)&&Array.prototype.splice.call(ei,eo,1),er&&(xa(et),0==$.g[en].length&&(delete $.g[en],$.h--))}}function Fa($,et,en,er){for(let ei=0;ei<$.length;++ei){let eo=$[ei];if(!eo.da&&eo.listener==et&&!!en==eo.capture&&eo.ha==er)return ei}return -1}Ea.prototype.add=function($,et,en,er,ei){let eo=$.toString();($=this.g[eo])||($=this.g[eo]=[],this.h++);let es=Fa($,et,er,ei);return es>-1?(et=$[es],en||(et.fa=!1)):((et=new wa(et,this.src,eo,!!er,ei)).fa=en,$.push(et)),et};var eT="closure_lm_"+(1e6*Math.random()|0),eA={};function Na($,et,en,er,ei,eo){if(!et)throw Error("Invalid event type");let es=n(ei)?!!ei.capture:!!ei,el=Oa($);if(el||($[eT]=el=new Ea($)),(en=el.add(et,en,er,es,eo)).proxy)return en;if(er=function a($){return Ra.call(a.src,a.listener,$)},en.proxy=er,er.src=$,er.listener=en,$.addEventListener)ew||(ei=es),void 0===ei&&(ei=!1),$.addEventListener(et.toString(),er,ei);else if($.attachEvent)$.attachEvent(Qa(et.toString()),er);else if($.addListener&&$.removeListener)$.addListener(er);else throw Error("addEventListener and attachEvent are unavailable.");return en}function Ta($){if("number"!=typeof $&&$&&!$.da){var et=$.src;if(et&&et[ek])Ga(et.i,$);else{var en=$.type,er=$.proxy;et.removeEventListener?et.removeEventListener(en,er,$.capture):et.detachEvent?et.detachEvent(Qa(en),er):et.addListener&&et.removeListener&&et.removeListener(er),(en=Oa(et))?(Ga(en,$),0==en.h&&(en.src=null,et[eT]=null)):xa($)}}}function Qa($){return $ in eA?eA[$]:eA[$]="on"+$}function Ra($,et){if($.da)$=!0;else{et=new z(et,this);let en=$.listener,er=$.ha||$.src;$.fa&&Ta($),$=en.call(er,et)}return $}function Oa($){return($=$[eT])instanceof Ea?$:null}var eP="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ma($){return"function"==typeof $?$:($[eP]||($[eP]=function(et){return $.handleEvent(et)}),$[eP])}function C(){w.call(this),this.i=new Ea(this),this.M=this,this.G=null}function D($,et){let en,er;var ei,eo=$.G;if(eo)for(ei=[];eo;eo=eo.G)ei.push(eo);if($=$.M,eo=et.type||et,"string"==typeof et)et=new x(et,$);else if(et instanceof x)et.target=et.target||$;else{var es=et;Da(et=new x(eo,$),es)}if(es=!0,ei)for(er=ei.length-1;er>=0;er--)es=Va(en=et.g=ei[er],eo,!0,et)&&es;if(es=Va(en=et.g=$,eo,!0,et)&&es,es=Va(en,eo,!1,et)&&es,ei)for(er=0;er<ei.length;er++)es=Va(en=et.g=ei[er],eo,!1,et)&&es}function Va($,et,en,er){if(!(et=$.i.g[String(et)]))return!0;et=et.concat();let ei=!0;for(let eo=0;eo<et.length;++eo){let es=et[eo];if(es&&!es.da&&es.capture==en){let et=es.listener,en=es.ha||es.src;es.fa&&Ga($.i,es),ei=!1!==et.call(en,er)&&ei}}return ei&&!er.defaultPrevented}t(C,w),C.prototype[ek]=!0,C.prototype.removeEventListener=function($,et,en,er){!function Sa($,et,en,er,ei){if(Array.isArray(et))for(var eo=0;eo<et.length;eo++)Sa($,et[eo],en,er,ei);else(er=n(er)?!!er.capture:!!er,en=Ma(en),$&&$[ek])?($=$.i,(eo=String(et).toString())in $.g&&(en=Fa(et=$.g[eo],en,er,ei))>-1&&(xa(et[en]),Array.prototype.splice.call(et,en,1),0==et.length&&(delete $.g[eo],$.h--))):$&&($=Oa($))&&(et=$.g[et.toString()],$=-1,et&&($=Fa(et,en,er,ei)),(en=$>-1?et[$]:null)&&Ta(en))}(this,$,et,en,er)},C.prototype.N=function(){if(C.Z.N.call(this),this.i){var $=this.i;for(let et in $.g){let en=$.g[et];for(let $=0;$<en.length;$++)xa(en[$]);delete $.g[et],$.h--}}this.G=null},C.prototype.J=function($,et,en,er){return this.i.add(String($),et,!1,en,er)},C.prototype.K=function($,et,en,er){return this.i.add(String($),et,!0,en,er)};let Ya=class Ya extends w{constructor($,et){super(),this.m=$,this.l=et,this.h=null,this.i=!1,this.g=null}j($){this.h=arguments,this.g?this.i=!0:function Xa($){$.g=function($,et){if("function"!=typeof $){if($&&"function"==typeof $.handleEvent)$=p($.handleEvent,$);else throw Error("Invalid listener argument")}return Number(et)>2147483647?-1:ef.setTimeout($,et||0)}(()=>{$.g=null,$.i&&($.i=!1,Xa($))},$.l);let et=$.h;$.h=null,$.m.apply(null,et)}(this)}N(){super.N(),this.g&&(ef.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}};function E($){w.call(this),this.h=$,this.g={}}t(E,w);var eN=[];function $a($){ya($.g,function($,et){this.g.hasOwnProperty(et)&&Ta($)},$),$.g={}}E.prototype.N=function(){E.Z.N.call(this),$a(this)},E.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var ej=ef.JSON.stringify,eR=ef.JSON.parse,eV=class{stringify($){return ef.JSON.stringify($,void 0)}parse($){return ef.JSON.parse($,void 0)}};function eb(){}function fb(){}var eD={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function gb(){x.call(this,"d")}function hb(){x.call(this,"c")}t(gb,x),t(hb,x);var eO={},eM=null;function jb(){return eM=eM||new C}function kb($){x.call(this,eO.Ia,$)}function lb($){let et=jb();D(et,new kb(et))}function mb($,et){x.call(this,eO.STAT_EVENT,$),this.stat=et}function J($){let et=jb();D(et,new mb(et,$))}function nb($,et){x.call(this,eO.Ja,$),this.size=et}function ob($,et){if("function"!=typeof $)throw Error("Fn must not be null and must be a function");return ef.setTimeout(function(){$()},et)}function pb(){this.g=!0}function K($,et,en,er){$.info(function(){return"XMLHTTP TEXT ("+et+"): "+function($,et){if(!$.g)return et;if(!et)return null;try{let eo=JSON.parse(et);if(eo){for($=0;$<eo.length;$++)if(Array.isArray(eo[$])){var en=eo[$];if(!(en.length<2)){var er=en[1];if(Array.isArray(er)&&!(er.length<1)){var ei=er[0];if("noop"!=ei&&"stop"!=ei&&"close"!=ei)for(let $=1;$<er.length;$++)er[$]=""}}}}return ej(eo)}catch($){return et}}($,en)+(er?" "+er:"")})}eO.Ia="serverreachability",t(kb,x),eO.STAT_EVENT="statevent",t(mb,x),eO.Ja="timingevent",t(nb,x),pb.prototype.ua=function(){this.g=!1},pb.prototype.info=function(){};var eF={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},eL={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"};function xb(){}function L($){return encodeURIComponent(String($))}function N($,et,en,er){this.j=$,this.i=et,this.l=en,this.S=er||1,this.V=new E(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new zb}function zb(){this.i=null,this.g="",this.h=!1}t(xb,eb),xb.prototype.g=function(){return new XMLHttpRequest},$=new xb;var eH={},eB={};function Cb($,et,en){$.M=1,$.A=Db(O(et)),$.u=en,$.R=!0,Eb($,null)}function Eb($,et){$.F=Date.now(),Fb($),$.B=O($.A);var en=$.B,er=$.S;Array.isArray(er)||(er=[String(er)]),Gb(en.i,"t",er),$.C=0,en=$.j.L,$.h=new zb,$.g=Hb($.j,en?et:null,!$.u),$.P>0&&($.O=new Ya(p($.Y,$,$.g),$.P)),et=$.V,en=$.g,er=$.ba;var ei="readystatechange";Array.isArray(ei)||(ei&&(eN[0]=ei.toString()),ei=eN);for(let $=0;$<ei.length;$++){let eo=function Ka($,et,en,er,ei){if(er&&er.once)return function La($,et,en,er,ei){if(Array.isArray(et)){for(let eo=0;eo<et.length;eo++)La($,et[eo],en,er,ei);return null}return en=Ma(en),$&&$[ek]?$.K(et,en,n(er)?!!er.capture:!!er,ei):Na($,et,en,!0,er,ei)}($,et,en,er,ei);if(Array.isArray(et)){for(let eo=0;eo<et.length;eo++)Ka($,et[eo],en,er,ei);return null}return en=Ma(en),$&&$[ek]?$.J(et,en,n(er)?!!er.capture:!!er,ei):Na($,et,en,!1,er,ei)}(en,ei[$],er||et.handleEvent,!1,et.h||et);if(!eo)break;et.g[eo.key]=eo}et=$.J?Ba($.J):{},$.u?($.v||($.v="POST"),et["Content-Type"]="application/x-www-form-urlencoded",$.g.ea($.B,$.v,$.u,et)):($.v="GET",$.g.ea($.B,$.v,null,et)),lb(),function($,et,en,er,ei,eo){$.info(function(){if($.g){if(eo){var es="",el=eo.split("&");for(let $=0;$<el.length;$++){var eu=el[$].split("=");if(eu.length>1){let $=eu[0];eu=eu[1];let et=$.split("_");es=et.length>
1=2&&"type"==et[1]?es+($+"=")+eu+"&":es+($+"=redacted&")}}}else es=null}else es=eo;return"XMLHTTP REQ ("+er+") [attempt "+ei+"]: "+et+"\n"+en+"\n"+es})}($.i,$.v,$.B,$.l,$.S,$.u)}function Ob($){return!!$.g&&"GET"==$.v&&2!=$.M&&$.j.Aa}function Fb($){$.T=Date.now()+$.H,Sb($,$.H)}function Sb($,et){if(null!=$.D)throw Error("WatchDog timer not null");$.D=ob(p($.aa,$),et)}function Jb($){$.D&&(ef.clearTimeout($.D),$.D=null)}function Mb($){0==$.j.I||$.K||Qb($.j,$)}function Q($){Jb($);var et=$.O;et&&"function"==typeof et.dispose&&et.dispose(),$.O=null,$a($.V),$.g&&(et=$.g,$.g=null,et.abort(),et.dispose())}function Lb($,et){try{var en=$.j;if(0!=en.I&&(en.g==$||Tb(en.h,$))){if(!$.L&&Tb(en.h,$)&&3==en.I){try{var er=en.Ba.g.parse(et)}catch($){er=null}if(Array.isArray(er)&&3==er.length){var ei=er;if(0==ei[0]){e:if(!en.v){if(en.g){if(en.g.F+3e3<$.F)Ub(en),Vb(en);else break e}Wb(en),J(18)}}else en.xa=ei[1],0<en.xa-en.K&&ei[2]<37500&&en.F&&0==en.A&&!en.C&&(en.C=ob(p(en.Va,en),6e3));1>=Xb(en.h)&&en.ta&&(en.ta=void 0)}else R(en,11)}else if(($.L||en.g==$)&&Ub(en),!y(et))for(ei=en.Ba.g.parse(et),et=0;et<ei.length;et++){let el=ei[et],eu=el[0];if(!(eu<=en.K)){if(en.K=eu,el=el[1],2==en.I){if("c"==el[0]){en.M=el[1],en.ba=el[2];let et=el[3];null!=et&&(en.ka=et,en.j.info("VER="+en.ka));let ei=el[4];null!=ei&&(en.za=ei,en.j.info("SVER="+en.za));let eu=el[5];null!=eu&&"number"==typeof eu&&eu>0&&(er=1.5*eu,en.O=er,en.j.info("backChannelRequestTimeoutMs_="+er)),er=en;let ed=$.g;if(ed){let $=ed.g?ed.g.getResponseHeader("X-Client-Wire-Protocol"):null;if($){var eo=er.h;eo.g||-1==$.indexOf("spdy")&&-1==$.indexOf("quic")&&-1==$.indexOf("h2")||(eo.j=eo.l,eo.g=new Set,eo.h&&(Yb(eo,eo.h),eo.h=null))}if(er.G){let $=ed.g?ed.g.getResponseHeader("X-HTTP-Session-Id"):null;$&&(er.wa=$,S(er.J,er.G,$))}}if(en.I=3,en.l&&en.l.ra(),en.aa&&(en.T=Date.now()-$.F,en.j.info("Handshake RTT: "+en.T+"ms")),(er=en).na=Zb(er,er.L?er.ba:null,er.W),$.L){$b(er.h,$);var es=er.O;es&&($.H=es),$.D&&(Jb($),Fb($)),er.g=$}else ac(er);en.i.length>0&&bc(en)}else"stop"!=el[0]&&"close"!=el[0]||R(en,7)}else 3==en.I&&("stop"==el[0]||"close"==el[0]?"stop"==el[0]?R(en,7):cc(en):"noop"!=el[0]&&en.l&&en.l.qa(el),en.A=0)}}}lb(4)}catch($){}}N.prototype.ba=function($){$=$.target;let et=this.O;et&&3==P($)?et.j():this.Y($)},N.prototype.Y=function($){try{if($==this.g)e:{let el=P(this.g),eu=this.g.ya(),ed=this.g.ca();if(!(el<3)&&(3!=el||this.g&&(this.h.h||this.g.la()||Ib(this.g)))){this.K||4!=el||7==eu||(8==eu||ed<=0?lb(3):lb(2)),Jb(this);var et=this.g.ca();this.X=et;var en=function($){if(!Ob($))return $.g.la();let et=Ib($.g);if(""===et)return"";let en="",er=et.length,ei=4==P($.g);if(!$.h.i){if("undefined"==typeof TextDecoder)return Q($),Mb($),"";$.h.i=new ef.TextDecoder}for(let eo=0;eo<er;eo++)$.h.h=!0,en+=$.h.i.decode(et[eo],{stream:!(ei&&eo==er-1)});return et.length=0,$.h.g+=en,$.C=0,$.h.g}(this);if(this.o=200==et,function($,et,en,er,ei,eo,es){$.info(function(){return"XMLHTTP RESP ("+er+") [ attempt "+ei+"]: "+et+"\n"+en+"\n"+eo+" "+es})}(this.i,this.v,this.B,this.l,this.S,el,et),this.o){if(this.U&&!this.L){t:{if(this.g){var er,ei=this.g;if((er=ei.g?ei.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!y(er)){var eo=er;break t}}eo=null}if($=eo)K(this.i,this.l,$,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,Lb(this,$);else{this.o=!1,this.m=3,J(12),Q(this),Mb(this);break e}}if(this.R){let et;for($=!0;!this.K&&this.C<en.length;)if((et=function($,et){var en=$.C,er=et.indexOf("\n",en);return -1==er?eB:isNaN(en=Number(et.substring(en,er)))?eH:(er+=1)+en>et.length?eB:(et=et.slice(er,er+en),$.C=er+en,et)}(this,en))==eB){4==el&&(this.m=4,J(14),$=!1),K(this.i,this.l,null,"[Incomplete Response]");break}else if(et==eH){this.m=4,J(15),K(this.i,this.l,en,"[Invalid Chunk]"),$=!1;break}else K(this.i,this.l,et,null),Lb(this,et);if(Ob(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=el||0!=en.length||this.h.h||(this.m=1,J(16),$=!1),this.o=this.o&&$,$){if(en.length>0&&!this.W){this.W=!0;var es=this.j;es.g==this&&es.aa&&!es.P&&(es.j.info("Great, no buffering proxy detected. Bytes received: "+en.length),Pb(es),es.P=!0,J(11))}}else K(this.i,this.l,en,"[Invalid Chunked Response]"),Q(this),Mb(this)}else K(this.i,this.l,en,null),Lb(this,en);4==el&&Q(this),this.o&&!this.K&&(4==el?Qb(this.j,this):(this.o=!1,Fb(this)))}else(function($){let et={};$=($.g&&P($)>=2&&$.g.getAllResponseHeaders()||"").split("\r\n");for(let er=0;er<$.length;er++){if(y($[er]))continue;var en=function($){var et=1;$=$.split(":");let en=[];for(;et>0&&$.length;)en.push($.shift()),et--;return $.length&&en.push($.join(":")),en}($[er]);let ei=en[0];if("string"!=typeof(en=en[1]))continue;en=en.trim();let eo=et[ei]||[];et[ei]=eo,eo.push(en)}!function($,et){for(let en in $)et.call(void 0,$[en],en,$)}(et,function($){return $.join(", ")})})(this.g),400==et&&en.indexOf("Unknown SID")>0?(this.m=3,J(12)):(this.m=0,J(13)),Q(this),Mb(this)}}}catch($){}finally{}},N.prototype.cancel=function(){this.K=!0,Q(this)},N.prototype.aa=function(){this.D=null;let $=Date.now();$-this.T>=0?(function($,et){$.info(function(){return"TIMEOUT: "+et})}(this.i,this.B),2!=this.M&&(lb(),J(17)),Q(this),this.m=2,Mb(this)):Sb(this,this.T-$)};var eU=class{constructor($,et){this.g=$,this.map=et}};function ec($){this.l=$||10,$=ef.PerformanceNavigationTiming?($=ef.performance.getEntriesByType("navigation")).length>0&&("hq"==$[0].nextHopProtocol||"h2"==$[0].nextHopProtocol):!!(ef.chrome&&ef.chrome.loadTimes&&ef.chrome.loadTimes()&&ef.chrome.loadTimes().wasFetchedViaSpdy),this.j=$?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function fc($){return!!$.h||!!$.g&&$.g.size>=$.j}function Xb($){return $.h?1:$.g?$.g.size:0}function Tb($,et){return $.h?$.h==et:!!$.g&&$.g.has(et)}function Yb($,et){$.g?$.g.add(et):$.h=et}function $b($,et){$.h&&$.h==et?$.h=null:$.g&&$.g.has(et)&&$.g.delete(et)}function hc($){if(null!=$.h)return $.i.concat($.h.G);if(null!=$.g&&0!==$.g.size){let et=$.i;for(let en of $.g.values())et=et.concat(en.G);return et}return ja($.i)}ec.prototype.cancel=function(){if(this.i=hc(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let $ of this.g.values())$.cancel();this.g.clear()}};
vendor: 13,464 bytes, line 1
1var ez=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function T($){let et;this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1,$ instanceof T?(this.l=$.l,kc(this,$.j),this.o=$.o,this.g=$.g,lc(this,$.u),this.h=$.h,mc(this,nc($.i)),this.m=$.m):$&&(et=String($).match(ez))?(this.l=!1,kc(this,et[1]||"",!0),this.o=oc(et[2]||""),this.g=oc(et[3]||"",!0),lc(this,et[4]),this.h=oc(et[5]||"",!0),mc(this,et[6]||"",!0),this.m=oc(et[7]||"")):(this.l=!1,this.i=new pc(null,this.l))}function O($){return new T($)}function kc($,et,en){$.j=en?oc(et,!0):et,$.j&&($.j=$.j.replace(/:$/,""))}function lc($,et){if(et){if(isNaN(et=Number(et))||et<0)throw Error("Bad port number "+et);$.u=et}else $.u=null}function mc($,et,en){var er,ei;et instanceof pc?($.i=et,er=$.i,(ei=$.l)&&!er.j&&(U(er),er.i=null,er.g.forEach(function($,et){let en=et.toLowerCase();et!=en&&(yc(this,et),Gb(this,en,$))},er)),er.j=ei):(en||(et=qc(et,eG)),$.i=new pc(et,$.l))}function S($,et,en){$.i.set(et,en)}function Db($){return S($,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),$}function oc($,et){return $?et?decodeURI($.replace(/%25/g,"%2525")):decodeURIComponent($):""}function qc($,et,en){return"string"==typeof $?($=encodeURI($).replace(et,xc),en&&($=$.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),$):null}function xc($){return"%"+(($=$.charCodeAt(0))>>4&15).toString(16)+(15&$).toString(16)}T.prototype.toString=function(){let $=[];var et=this.j;et&&$.push(qc(et,eq,!0),":");var en=this.g;return(en||"file"==et)&&($.push("//"),(et=this.o)&&$.push(qc(et,eq,!0),"@"),$.push(L(en).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(en=this.u)&&$.push(":",String(en))),(en=this.h)&&(this.g&&"/"!=en.charAt(0)&&$.push("/"),$.push(qc(en,"/"==en.charAt(0)?eW:eZ,!0))),(en=this.i.toString())&&$.push("?",en),(en=this.m)&&$.push("#",qc(en,e$)),$.join("")},T.prototype.resolve=function($){let et=O(this),en=!!$.j;en?kc(et,$.j):en=!!$.o,en?et.o=$.o:en=!!$.g,en?et.g=$.g:en=null!=$.u;var er=$.h;if(en)lc(et,$.u);else if(en=!!$.h){if("/"!=er.charAt(0)){if(this.g&&!this.h)er="/"+er;else{var ei=et.h.lastIndexOf("/");-1!=ei&&(er=et.h.slice(0,ei+1)+er)}}if(".."==(ei=er)||"."==ei)er="";else if(-1!=ei.indexOf("./")||-1!=ei.indexOf("/.")){er=0==ei.lastIndexOf("/",0),ei=ei.split("/");let $=[];for(let et=0;et<ei.length;){let en=ei[et++];"."==en?er&&et==ei.length&&$.push(""):".."==en?(($.length>1||1==$.length&&""!=$[0])&&$.pop(),er&&et==ei.length&&$.push("")):($.push(en),er=!0)}er=$.join("/")}else er=ei}return en?et.h=er:en=""!==$.i.toString(),en?mc(et,nc($.i)):en=!!$.m,en&&(et.m=$.m),et};var eq=/[#\/\?@]/g,eZ=/[#\?:]/g,eW=/[#\?]/g,eG=/[#\?@]/g,e$=/#/g;function pc($,et){this.h=this.g=null,this.i=$||null,this.j=!!et}function U($){$.g||($.g=new Map,$.h=0,$.i&&function($,et){if($){$=$.split("&");for(let en=0;en<$.length;en++){let er=$[en].indexOf("="),ei,eo=null;er>=0?(ei=$[en].substring(0,er),eo=$[en].substring(er+1)):ei=$[en],et(ei,eo?decodeURIComponent(eo.replace(/\+/g," ")):"")}}}($.i,function(et,en){$.add(decodeURIComponent(et.replace(/\+/g," ")),en)}))}function yc($,et){U($),et=V($,et),$.g.has(et)&&($.i=null,$.h-=$.g.get(et).length,$.g.delete(et))}function zc($,et){return U($),et=V($,et),$.g.has(et)}function Ac($,et){U($);let en=[];if("string"==typeof et)zc($,et)&&(en=en.concat($.g.get(V($,et))));else for($=Array.from($.g.values()),et=0;et<$.length;et++)en=en.concat($[et]);return en}function Gb($,et,en){yc($,et),en.length>0&&($.i=null,$.g.set(V($,et),ja(en)),$.h+=en.length)}function nc($){let et=new pc;return et.i=$.i,$.g&&(et.g=new Map($.g),et.h=$.h),et}function V($,et){return et=String(et),$.j&&(et=et.toLowerCase()),et}function W($,et,en,er,ei){try{ei&&(ei.onload=null,ei.onerror=null,ei.onabort=null,ei.ontimeout=null),er(en)}catch($){}}function Dc(){this.g=new eV}function Ec($){this.i=$.Sb||null,this.h=$.ab||!1}function Fc($,et){C.call(this),this.H=$,this.o=et,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}function Ic($){$.j.read().then($.Ma.bind($)).catch($.ga.bind($))}function Hc($){$.readyState=4,$.l=null,$.j=null,$.B=null,Gc($)}function Gc($){$.onreadystatechange&&$.onreadystatechange.call($)}function Jc($){let et="";return ya($,function($,en){et+=en+":"+$+"\r\n"}),et}function Kc($,et,en){e:{for(er in en){var er=!1;break e}er=!0}er||(en=Jc(en),"string"==typeof $?null!=en&&L(en):S($,et,en))}function X($){C.call(this),this.headers=new Map,this.L=$||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}(et=pc.prototype).add=function($,et){U(this),this.i=null,$=V(this,$);let en=this.g.get($);return en||this.g.set($,en=[]),en.push(et),this.h+=1,this},et.forEach=function($,et){U(this),this.g.forEach(function(en,er){en.forEach(function(en){$.call(et,en,er,this)},this)},this)},et.set=function($,et){return U(this),this.i=null,zc(this,$=V(this,$))&&(this.h-=this.g.get($).length),this.g.set($,[et]),this.h+=1,this},et.get=function($,et){return $&&($=Ac(this,$)).length>0?String($[0]):et},et.toString=function(){if(this.i)return this.i;if(!this.g)return"";let $=[],et=Array.from(this.g.keys());for(let er=0;er<et.length;er++){var en=et[er];let ei=L(en);en=Ac(this,en);for(let et=0;et<en.length;et++){let er=ei;""!==en[et]&&(er+="="+L(en[et])),$.push(er)}}return this.i=$.join("&")},t(Ec,eb),Ec.prototype.g=function(){return new Fc(this.i,this.h)},t(Fc,C),(et=Fc.prototype).open=function($,et){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.F=$,this.D=et,this.readyState=1,Gc(this)},et.send=function($){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;let et={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};$&&(et.body=$),(this.H||ef).fetch(new Request(this.D,et)).then(this.Pa.bind(this),this.ga.bind(this))},et.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&4!=this.readyState&&(this.g=!1,Hc(this)),this.readyState=0},et.Pa=function($){if(this.g&&(this.l=$,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=$.headers,this.readyState=2,Gc(this)),this.g&&(this.readyState=3,Gc(this),this.g))){if("arraybuffer"===this.responseType)$.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(void 0!==ef.ReadableStream&&"body"in $){if(this.j=$.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.B=new TextDecoder;Ic(this)}else $.text().then(this.Oa.bind(this),this.ga.bind(this))}},et.Ma=function($){if(this.g){if(this.o&&$.value)this.response.push($.value);else if(!this.o){var et=$.value?$.value:new Uint8Array(0);(et=this.B.decode(et,{stream:!$.done}))&&(this.response=this.responseText+=et)}$.done?Hc(this):Gc(this),3==this.readyState&&Ic(this)}},et.Oa=function($){this.g&&(this.response=this.responseText=$,Hc(this))},et.Na=function($){this.g&&(this.response=$,Hc(this))},et.ga=function(){this.g&&Hc(this)},et.setRequestHeader=function($,et){this.A.append($,et)},et.getResponseHeader=function($){return this.h&&this.h.get($.toLowerCase())||""},et.getAllResponseHeaders=function(){if(!this.h)return"";let $=[],et=this.h.entries();for(var en=et.next();!en.done;)$.push((en=en.value)[0]+": "+en[1]),en=et.next();return $.join("\r\n")},Object.defineProperty(Fc.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function($){this.m=$?"include":"same-origin"}}),t(X,C);var eJ=/^https?$/i,eK=["POST","PUT"];function Nc($,et){$.h=!1,$.g&&($.j=!0,$.g.abort(),$.j=!1),$.l=et,$.o=5,Oc($),Pc($)}function Oc($){$.A||($.A=!0,D($,"complete"),D($,"error"))}function Qc($){if($.h&&void 0!==ei){if($.v&&4==P($))setTimeout($.Ca.bind($),0);else if(D($,"readystatechange"),4==P($)){$.h=!1;try{let ei=$.ca();switch(ei){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var et,en,er=!0;break;default:er=!1}if(!(et=er)){if(en=0===ei){let et=String($.D).match(ez)[1]||null;!et&&ef.self&&ef.self.location&&(et=ef.self.location.protocol.slice(0,-1)),en=!eJ.test(et?et.toLowerCase():"")}et=en}if(et)D($,"complete"),D($,"success");else{$.o=6;try{var eo=P($)>2?$.g.statusText:""}catch($){eo=""}$.l=eo+" ["+$.ca()+"]",Oc($)}}finally{Pc($)}}}}function Pc($,et){if($.g){$.m&&(clearTimeout($.m),$.m=null);let en=$.g;$.g=null,et||D($,"ready");try{en.onreadystatechange=null}catch($){}}}function P($){return $.g?$.g.readyState:0}function Ib($){try{if(!$.g)return null;if("response"in $.g)return $.g.response;switch($.F){case"":case"text":return $.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in $.g)return $.g.mozResponseArrayBuffer}return null}catch($){return null}}function Rc($,et,en){return en&&en.internalChannelParams&&en.internalChannelParams[$]||et}function Sc($){this.za=0,this.i=[],this.j=new pb,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=Rc("failFast",!1,$),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=Rc("baseRetryDelayMs",5e3,$),this.Za=Rc("retryDelaySeedMs",1e4,$),this.Ta=Rc("forwardChannelMaxRetries",2,$),this.va=Rc("forwardChannelRequestTimeoutMs",2e4,$),this.ma=$&&$.xmlHttpFactory||void 0,this.Ua=$&&$.Rb||void 0,this.Aa=$&&$.useFetchStreams||!1,this.O=void 0,this.L=$&&$.supportsCrossDomainXhr||!1,this.M="",this.h=new ec($&&$.concurrentRequestLimit),this.Ba=new Dc,this.S=$&&$.fastHandshake||!1,this.R=$&&$.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=$&&$.Pb||!1,$&&$.ua&&this.j.ua(),$&&$.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&$&&$.detectBufferingProxy||!1,this.ia=void 0,$&&$.longPollingTimeout&&$.longPollingTimeout>0&&(this.ia=$.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}function cc($){if(Tc($),3==$.I){var et=$.V++,en=O($.J);if(S(en,"SID",$.M),S(en,"RID",et),S(en,"TYPE","terminate"),Uc($,en),(et=new N($,$.j,et)).M=2,et.A=Db(O(en)),en=!1,ef.navigator&&ef.navigator.sendBeacon)try{en=ef.navigator.sendBeacon(et.A.toString(),"")}catch($){}!en&&ef.Image&&((new Image).src=et.A,en=!0),en||(et.g=Hb(et.j,null),et.g.ea(et.A)),et.F=Date.now(),Fb(et)}Vc($)}function Vb($){$.g&&(Pb($),$.g.cancel(),$.g=null)}function Tc($){Vb($),$.v&&(ef.clearTimeout($.v),$.v=null),Ub($),$.h.cancel(),$.m&&("number"==typeof $.m&&ef.clearTimeout($.m),$.m=null)}function bc($){if(!fc($.h)&&!$.m){$.m=!0;var et=$.Ea;ev||ta(),ex||(ev(),ex=!0),e_.add(et,$),$.D=0}}function Zc($,et){var en;en=et?et.l:$.V++;let er=O($.J);S(er,"SID",$.M),S(er,"RID",en),S(er,"AID",$.K),Uc($,er),$.u&&$.o&&Kc(er,$.u,$.o),en=new N($,$.j,en,$.D+1),null===$.u&&(en.J=$.o),et&&($.i=et.G.concat($.i)),et=Yc($,en,1e3),en.H=Math.round(.5*$.va)+Math.round(.5*$.va*Math.random()),Yb($.h,en),Cb(en,er,et)}function Uc($,et){$.H&&ya($.H,function($,en){S(et,en,$)}),$.l&&ya({},function($,en){S(et,en,$)})}function Yc($,et,en){en=Math.min($.i.length,en);let er=$.l?p($.l.Ka,$.l,$):null;e:{var ei=$.i;let et=-1;for(;;){let $=["count="+en];-1==et?en>0?(et=ei[0].g,$.push("ofs="+et)):et=0:$.push("ofs="+et);let el=!0;for(let eu=0;eu<en;eu++){var eo=ei[eu].g;let en=ei[eu].map;if((eo-=et)<0)et=Math.max(0,ei[eu].g-100),el=!1;else try{eo="req"+eo+"_";try{var es=en instanceof Map?en:Object.entries(en);for(let[et,en]of es){let er=en;n(en)&&(er=ej(en)),$.push(eo+et+"="+encodeURIComponent(er))}}catch(et){throw $.push(eo+"type="+encodeURIComponent("_badmap")),et}}catch($){er&&er(en)}}if(el){es=$.join("&");break e}}es=void 0}return $=$.i.splice(0,en),et.G=$,es}function ac($){if(!$.g&&!$.v){$.Y=1;var et=$.Da;ev||ta(),ex||(ev(),ex=!0),e_.add(et,$),$.A=0}}function Wb($){return!$.g&&!$.v&&!($.A>=3)&&($.Y++,$.v=ob(p($.Da,$),Xc($,$.A)),$.A++,!0)}function Pb($){null!=$.B&&(ef.clearTimeout($.B),$.B=null)}function $c($){$.g=new N($,$.j,"rpc",$.Y),null===$.u&&($.g.J=$.o),$.g.P=0;var et=O($.na);S(et,"RID","rpc"),S(et,"SID",$.M),S(et,"AID",$.K),S(et,"CI",$.F?"0":"1"),!$.F&&$.ia&&S(et,"TO",$.ia),S(et,"TYPE","xmlhttp"),Uc($,et),$.u&&$.o&&Kc(et,$.u,$.o),$.O&&($.g.H=$.O);var en=$.g;$=$.ba,en.M=1,en.A=Db(O(et)),en.u=null,en.R=!0,Eb(en,$)}function Ub($){null!=$.C&&(ef.clearTimeout($.C),$.C=null)}function Qb($,et){var en=null;if($.g==et){Ub($),Pb($),$.g=null;var er=2}else{if(!Tb($.h,et))return;en=et.G,$b($.h,et),er=1}if(0!=$.I){if(et.o){if(1==er){en=et.u?et.u.length:0,et=Date.now()-et.F;var ei,eo=$.D;D(er=jb(),new nb(er,en)),bc($)}else ac($)}else if(3==(eo=et.m)||0==eo&&et.X>0||!(1==er&&(ei=et,!(Xb($.h)>=$.h.j-($.m?1:0))&&($.m?($.i=ei.G.concat($.i),!0):1!=$.I&&2!=$.I&&!($.D>=($.Sa?0:$.Ta))&&($.m=ob(p($.Ea,$,ei),Xc($,$.D)),$.D++,!0)))||2==er&&Wb($)))switch(en&&en.length>0&&((et=$.h).i=et.i.concat(en)),eo){case 1:R($,5);break;case 4:R($,10);break;case 3:R($,6);break;default:R($,2)}}}function Xc($,et){let en=$.Qa+Math.floor(Math.random()*$.Za);return $.isActive()||(en*=2),en*et}function R($,et){if($.j.info("Error code "+et),2==et){var en=p($.bb,$),er
1=$.Ua;let et=!er;er=new T(er||"//www.google.com/images/cleardot.gif"),ef.location&&"http"==ef.location.protocol||kc(er,"https"),Db(er),et?function($,et){let en=new pb;if(ef.Image){let er=new Image;er.onload=ha(W,en,"TestLoadImage: loaded",!0,et,er),er.onerror=ha(W,en,"TestLoadImage: error",!1,et,er),er.onabort=ha(W,en,"TestLoadImage: abort",!1,et,er),er.ontimeout=ha(W,en,"TestLoadImage: timeout",!1,et,er),ef.setTimeout(function(){er.ontimeout&&er.ontimeout()},1e4),er.src=$}else et(!1)}(er.toString(),en):function($,et){let en=new pb,er=new AbortController,ei=setTimeout(()=>{er.abort(),W(en,"TestPingServer: timeout",!1,et)},1e4);fetch($,{signal:er.signal}).then($=>{clearTimeout(ei),$.ok?W(en,"TestPingServer: ok",!0,et):W(en,"TestPingServer: server error",!1,et)}).catch(()=>{clearTimeout(ei),W(en,"TestPingServer: error",!1,et)})}(er.toString(),en)}else J(2);$.I=0,$.l&&$.l.pa(et),Vc($),Tc($)}function Vc($){if($.I=0,$.ja=[],$.l){let et=hc($.h);(0!=et.length||0!=$.i.length)&&(ka($.ja,et),ka($.ja,$.i),$.h.i.length=0,ja($.i),$.i.length=0),$.l.oa()}}function Zb($,et,en){var er=en instanceof T?O(en):new T(en);if(""!=er.g)et&&(er.g=et+"."+er.g),lc(er,er.u);else{var ei=ef.location;er=ei.protocol,et=et?et+"."+ei.hostname:ei.hostname,ei=+ei.port;let $=new T(null);er&&kc($,er),et&&($.g=et),ei&&lc($,ei),en&&($.h=en),er=$}return en=$.G,et=$.wa,en&&et&&S(er,en,et),S(er,"VER",$.ka),Uc($,er),er}function Hb($,et,en){if(et&&!$.L)throw Error("Can't create secondary domain capable XhrIo object.");return(et=new X($.Aa&&!$.ma?new Ec({ab:en}):$.ma)).Fa($.L),et}function ad(){}function bd(){}function Y($,et){C.call(this),this.g=new Sc(et),this.l=$,this.h=et&&et.messageUrlParams||null,$=et&&et.messageHeaders||null,et&&et.clientProtocolHeaderRequired&&($?$["X-Client-Protocol"]="webchannel":$={"X-Client-Protocol":"webchannel"}),this.g.o=$,$=et&&et.initMessageHeaders||null,et&&et.messageContentType&&($?$["X-WebChannel-Content-Type"]=et.messageContentType:$={"X-WebChannel-Content-Type":et.messageContentType}),et&&et.sa&&($?$["X-WebChannel-Client-Profile"]=et.sa:$={"X-WebChannel-Client-Profile":et.sa}),this.g.U=$,($=et&&et.Qb)&&!y($)&&(this.g.u=$),this.A=et&&et.supportsCrossDomainXhr||!1,this.v=et&&et.sendRawJson||!1,(et=et&&et.httpSessionIdParam)&&!y(et)&&(this.g.G=et,null!==($=this.h)&&et in $&&et in($=this.h)&&delete $[et]),this.j=new Z(this)}function cd($){gb.call(this),$.__headers__&&(this.headers=$.__headers__,this.statusCode=$.__status__,delete $.__headers__,delete $.__status__);var et=$.__sm__;if(et){e:{for(let en in et){$=en;break e}$=void 0}(this.i=$)&&($=this.i,et=null!==et&&$ in et?et[$]:void 0),this.data=et}else this.data=$}function dd(){hb.call(this),this.status=1}function Z($){this.g=$}(et=X.prototype).Fa=function($){this.H=$},et.ea=function(et,en,er,ei){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+et);en=en?en.toUpperCase():"GET",this.D=et,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():$.g(),this.g.onreadystatechange=eg(p(this.Ca,this));try{this.B=!0,this.g.open(en,String(et),!0),this.B=!1}
1catch($){Nc(this,$);return}if(et=er||"",er=new Map(this.headers),ei){if(Object.getPrototypeOf(ei)===Object.prototype)for(var eo in ei)er.set(eo,ei[eo]);else if("function"==typeof ei.keys&&"function"==typeof ei.get)for(let $ of ei.keys())er.set($,ei.get($));else throw Error("Unknown input type for opt_headers: "+String(ei))}for(let[$,es]of(ei=Array.from(er.keys()).find($=>"content-type"==$.toLowerCase()),eo=ef.FormData&&et instanceof ef.FormData,!(Array.prototype.indexOf.call(eK,en,void 0)>=0)||ei||eo||er.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),er))this.g.setRequestHeader($,es);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(et),this.v=!1}catch($){Nc(this,$)}},et.abort=function($){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=$||7,D(this,"complete"),D(this,"abort"),Pc(this))},et.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Pc(this,!0)),X.Z.N.call(this)},et.Ca=function(){this.u||(this.B||this.v||this.j?Qc(this):this.Xa())},et.Xa=function(){Qc(this)},et.isActive=function(){return!!this.g},et.ca=function(){try{return P(this)>2?this.g.status:-1}catch($){return -1}},et.la=function(){try{return this.g?this.g.responseText:""}catch($){return""}},et.La=function($){if(this.g){var et=this.g.responseText;return $&&0==et.indexOf($)&&(et=et.substring($.length)),eR(et)}},et.ya=function(){return this.o},et.Ha=function(){return"string"==typeof this.l?this.l:String(this.l)},(et=Sc.prototype).ka=8,et.I=1,et.connect=function($,et,en,er){J(0),this.W=$,this.H=et||{},en&&void 0!==er&&(this.H.OSID=en,this.H.OAID=er),this.F=this.X,this.J=Zb(this,null,this.W),bc(this)},et.Ea=function($){if(this.m){if(this.m=null,1==this.I){if(!$){this.V=Math.floor(1e5*Math.random()),$=this.V++;let ei=new N(this,this.j,$),eo=this.o;if(this.U&&(eo?Da(eo=Ba(eo),this.U):eo=this.U),null!==this.u||this.R||(ei.J=eo,eo=null),this.S)e:{for(var et=0,en=0;en<this.i.length;en++){t:{var er=this.i[en];if("__data__"in er.map&&"string"==typeof(er=er.map.__data__)){er=er.length;break t}er=void 0}if(void 0===er)break;if((et+=er)>4096){et=en;break e}if(4096===et||en===this.i.length-1){et=en+1;break e}}et=1e3}else et=1e3;et=Yc(this,ei,et),S(en=O(this.J),"RID",$),S(en,"CVER",22),this.G&&S(en,"X-HTTP-Session-Id",this.G),Uc(this,en),eo&&(this.R?et="headers="+L(Jc(eo))+"&"+et:this.u&&Kc(en,this.u,eo)),Yb(this.h,ei),this.Ra&&S(en,"TYPE","init"),this.S?(S(en,"$req",et),S(en,"SID","null"),ei.U=!0,Cb(ei,en,null)):Cb(ei,en,et),this.I=2}}else 3==this.I&&($?Zc(this,$):0==this.i.length||fc(this.h)||Zc(this))}},et.Da=function(){if(this.v=null,$c(this),this.aa&&!(this.P||null==this.g||this.T<=0)){var $=4*this.T;this.j.info("BP detection timer enabled: "+$),this.B=ob(p(this.Wa,this),$)}},et.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,J(10),Vb(this),$c(this))},et.Va=function(){null!=this.C&&(this.C=null,Vb(this),Wb(this),J(19))},et.bb=function($){$?(this.j.info("Successfully pinged google.com"),J(2)):(this.j.info("Failed to ping google.com"),J(1))},et.isActive=function(){return!!this.l&&this.l.isActive(this)},(et=ad.prototype).ra=function(){},et.qa=function(){},et.pa=function(){},et.oa=function(){},et.isActive=function(){return!0},et.Ka=function(){},bd.prototype.g=function($,et){return new Y($,et)},t(Y,C),Y.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},Y.prototype.close=function(){cc(this.g)},Y.prototype.o=function($){var et=this.g;if("string"==typeof $){var en={};en.__data__=$,$=en}else this.v&&((en={}).__data__=ej($),$=en);et.i.push(new eU(et.Ya++,$)),3==et.I&&bc(et)},Y.prototype.N=function(){this.g.l=null,delete this.j,cc(this.g),delete this.g,Y.Z.N.call(this)},t(cd,gb),t(dd,hb),t(Z,ad),Z.prototype.ra=function(){D(this.g,"a")},Z.prototype.qa=function($){D(this.g,new cd($))},Z.prototype.pa=function($){D(this.g,new dd)},Z.prototype.oa=function(){D(this.g,"b")},bd.prototype.createWebChannel=bd.prototype.g,Y.prototype.send=Y.prototype.o,Y.prototype.open=Y.prototype.m,Y.prototype.close=Y.prototype.close,em=eS.createWebChannelTransport=function(){return new bd},ep=eS.getStatEventTarget=function(){return jb()},eh=eS.Event=eO,ed=eS.Stat={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},eF.NO_ERROR=0,eF.TIMEOUT=8,eF.HTTP_ERROR=6,eu=eS.ErrorCode=eF,eL.COMPLETE="complete",el=eS.EventType=eL,fb.EventType=eD,eD.OPEN="a",eD.CLOSE="b",eD.ERROR="c",eD.MESSAGE="d",C.prototype.listen=C.prototype.J,es=eS.WebChannel=fb,eS.FetchXmlHttpFactory=Ec,X.prototype.listenOnce=X.prototype.K,X.prototype.getLastError=X.prototype.Ha,X.prototype.getLastErrorCode=X.prototype.ya,X.prototype.getStatus=X.prototype.ca,X.prototype.getResponseJson=X.prototype.La,X.prototype.getResponseText=X.prototype.la,X.prototype.send=X.prototype.ea,X.prototype.setWithCredentials=X.prototype.Fa,eo=eS.XhrIo=X}).apply(void 0!==eI?eI:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),en(34155);var eT=en(48764).Buffer;let eA="@firebase/firestore",eP="4.9.2";/** 2 * @license 3 * Copyright 2017 Google LLC 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */let User=class User{constructor($){this.uid=$}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual($){return $.uid===this.uid}};User.UNAUTHENTICATED=new User(null),User.GOOGLE_CREDENTIALS=new User("google-credentials-uid"),User.FIRST_PARTY=new User("first-party-uid"),User.MOCK_USER=new User("mock-user");/** 17 * @license 18 * Copyright 2017 Google LLC 19 * 20 * Licensed under the Apache License, Version 2.0 (the "License"); 21 * you may not use this file except in compliance with the License. 22 * You may obtain a copy of the License at 23 * 24 * http://www.apache.org/licenses/LICENSE-2.0 25 * 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * See the License for the specific language governing permissions and 30 * limitations under the License. 31 */let eN="12.3.0",ej=new ew.Yd("@firebase/firestore");function __PRIVATE_getLogLevel(){return ej.logLevel}function __PRIVATE_logDebug($,...et){if(ej.logLevel<=ew.in.DEBUG){let en=et.map(__PRIVATE_argToString);ej.debug(`Firestore (${eN}): ${$}`,...en)}}function __PRIVATE_logError($,...et){if(ej.logLevel<=ew.in.ERROR){let en=et.map(__PRIVATE_argToString);ej.error(`Firestore (${eN}): ${$}`,...en)}}function __PRIVATE_logWarn($,...et){if(ej.logLevel<=ew.in.WARN){let en=et.map(__PRIVATE_argToString);ej.warn(`Firestore (${eN}): ${$}`,...en)}}function __PRIVATE_argToString($){if("string"==typeof $)return $;try{/** 32 * @license 33 * Copyright 2020 Google LLC 34 * 35 * Licensed under the Apache License, Version 2.0 (the "License"); 36 * you may not use this file except in compliance with the License. 37 * You may obtain a copy of the License at 38 * 39 * http://www.apache.org/licenses/LICENSE-2.0 40 * 41 * Unless required by applicable law or agreed to in writing, software 42 * distributed under the License is distributed on an "AS IS" BASIS, 43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 44 * See the License for the specific language governing permissions and 45 * limitations under the License. 46 */return JSON.stringify($)}catch(et){return $}}/** 47 * @license 48 * Copyright 2017 Google LLC 49 * 50 * Licensed under the Apache License, Version 2.0 (the "License"); 51 * you may not use this file except in compliance with the License. 52 * You may obtain a copy of the License at 53 * 54 * http://www.apache.org/licenses/LICENSE-2.0 55 * 56 * Unless required by applicable law or agreed to in writing, software 57 * distributed under the License is distributed on an "AS IS" BASIS, 58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 * See the License for the specific language governing permissions and 60 * limitations under the License. 61 */function fail($,et,en){let er="Unexpected state";"string"==typeof et?er=et:en=et,__PRIVATE__fail($,er,en)}function __PRIVATE__fail($,et,en){let er=`FIRESTORE (${eN}) INTERNAL ASSERTION FAILED: ${et} (ID: ${$.toString(16)})`;if(void 0!==en)try{er+=" CONTEXT: "+JSON.stringify(en)}catch($){er+=" CONTEXT: "+en}throw __PRIVATE_logError(er),Error(er)}function __PRIVATE_hardAssert($,et,en,er){let ei="Unexpected state";"string"==typeof en?ei=en:er=en,$||__PRIVATE__fail(et,ei,er)}/** 62 * @license 63 * Copyright 2017 Google LLC 64 * 65 * Licensed under the Apache License, Version 2.0 (the "License"); 66 * you may not use this file except in compliance with the License. 67 * You may obtain a copy of the License at 68 * 69 * http://www.apache.org/licenses/LICENSE-2.0 70 * 71 * Unless required by applicable law or agreed to in writing, softw
71are 72 * distributed under the License is distributed on an "AS IS" BASIS, 73 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 74 * See the License for the specific language governing permissions and 75 * limitations under the License. 76 */let eR={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"};let FirestoreError=class FirestoreError extends ek.ZR{constructor($,et){super($,et),this.code=$,this.message=et,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}};/** 77 * @license 78 * Copyright 2017 Google LLC 79 * 80 * Licensed under the Apache License, Version 2.0 (the "License"); 81 * you may not use this file except in compliance with the License. 82 * You may obtain a copy of the License at 83 * 84 * http://www.apache.org/licenses/LICENSE-2.0 85 * 86 * Unless required by applicable law or agreed to in writing, software 87 * distributed under the License is distributed on an "AS IS" BASIS, 88 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 89 * See the License for the specific language governing permissions and 90 * limitations under the License. 91 */let __PRIVATE_Deferred=class __PRIVATE_Deferred{constructor(){this.promise=new Promise(($,et)=>{this.resolve=$,this.reject=et})}};/** 92 * @license 93 * Copyright 2017 Google LLC 94 * 95 * Licensed under the Apache License, Version 2.0 (the "License"); 96 * you may not use this file except in compliance with the License. 97 * You may obtain a copy of the License at 98 * 99 * http://www.apache.org/licenses/LICENSE-2.0 100 * 101 * Unless required by applicable law or agreed to in writing, software 102 * distributed under the License is distributed on an "AS IS" BASIS, 103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 104 * See the License for the specific language governing permissions and 105 * limitations under the License. 106 */let __PRIVATE_OAuthToken=class __PRIVATE_OAuthToken{constructor($,et){this.user=et,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${$}`)}};let __PRIVATE_EmptyAuthCredentialsProvider=class __PRIVATE_EmptyAuthCredentialsProvider{getToken(){return Promise.resolve(null)}invalidateToken(){}start($,et){$.enqueueRetryable(()=>et(User.UNAUTHENTICATED))}shutdown(){}};let __PRIVATE_EmulatorAuthCredentialsProvider=class __PRIVATE_EmulatorAuthCredentialsProvider{constructor($){this.token=$,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start($,et){this.changeListener=et,$.enqueueRetryable(()=>et(this.token.user))}shutdown(){this.changeListener=null}};let __PRIVATE_FirebaseAuthCredentialsProvider=class __PRIVATE_FirebaseAuthCredentialsProvider{constructor($){this.t=$,this.currentUser=User.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start($,et){__PRIVATE_hardAssert(void 0===this.o,42304);let en=this.i,__PRIVATE_guardedChangeListener=$=>this.i!==en?(en=this.i,et($)):Promise.resolve(),er=new __PRIVATE_Deferred;this.o=()=>{this.i++,this.currentUser=this.u(),er.resolve(),er=new __PRIVATE_Deferred,$.enqueueRetryable(()=>__PRIVATE_guardedChangeListener(this.currentUser))};let __PRIVATE_awaitNextToken=()=>{let et=er;$.enqueueRetryable(async()=>{await et.promise,await __PRIVATE_guardedChangeListener(this.currentUser)})},__PRIVATE_registerAuth=$=>{__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=$,this.o&&(this.auth.addAuthTokenListener(this.o),__PRIVATE_awaitNextToken())};this.t.onInit($=>__PRIVATE_registerAuth($)),setTimeout(()=>{if(!this.auth){let $=this.t.getImmediate({optional:!0});$?__PRIVATE_registerAuth($):(__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","Auth not yet detected"),er.resolve(),er=new __PRIVATE_Deferred)}},0),__PRIVATE_awaitNextToken()}getToken(){let $=this.i,et=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(et).then(et=>this.i!==$?(__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):et?(__PRIVATE_hardAssert("string"==typeof et.accessToken,31837,{l:et}),new __PRIVATE_OAuthToken(et.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 $=this.auth&&this.auth.getUid();return __PRIVATE_hardAssert(null===$||"string"==typeof $,2055,{h:$}),new User($)}};let __PRIVATE_FirstPartyToken=class __PRIVATE_FirstPartyToken{constructor($,et,en){this.P=$,this.T=et,this.I=en,this.type="FirstParty",this.user=User.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);let $=this.R();return $&&this.A.set("Authorization",$),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}};let __PRIVATE_FirstPartyAuthCredentialsProvider=class __PRIVATE_FirstPartyAuthCredentialsProvider{constructor($,et,en){this.P=$,this.T=et,this.I=en}getToken(){return Promise.resolve(new __PRIVATE_FirstPartyToken(this.P,this.T,this.I))}start($,et){$.enqueueRetryable(()=>et(User.FIRST_PARTY))}shutdown(){}invalidateToken(){}};let AppCheckToken=class AppCheckToken{constructor($){this.value=$,this.type="AppCheck",this.headers=new Map,$&&$.length>0&&this.headers.set("x-firebase-appcheck",this.value)}};let __PRIVATE_FirebaseAppCheckTokenProvider=class __PRIVATE_FirebaseAppCheckTokenProvider{constructor($,et){this.V=et,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,(0,ex.rh)($)&&$.settings.appCheckToken&&(this.p=$.settings.appCheckToken)}start($,et){__PRIVATE_hardAssert(void 0===this.o,3512);let onTokenChanged=$=>{null!=$.error&&__PRIVATE_logDebug("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${$.error.message}`);let en=$.token!==this.m;return this.m=$.token,__PRIVATE_logDebug("FirebaseAppCheckTokenProvider",`Received ${en?"new":"existing"} token.`),en?et($.token):Promise.resolve()};this.o=et=>{$.enqueueRetryable(()=>onTokenChanged(et))};let __PRIVATE_registerAppCheck=$=>{__PRIVATE_logDebug("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=$,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit($=>__PRIVATE_registerAppCheck($)),setTimeout(()=>{if(!this.appCheck){let $=this.V.getImmediate({optional:!0});$?__PRIVATE_registerAppCheck($):__PRIVATE_logDebug("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new AppCheckToken(this.p));let $=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken($).then($=>$?(__PRIVATE_hardAssert("string"==typeof $.token,44558,{tokenResult:$}),this.m=$.token,new AppCheckToken($.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}};/** 107 * @license 108 * Copyright 2017 Google LLC 109 * 110 * Licensed under the Apache License, Version 2.0 (the "License");
111 * you may not use this file except in compliance with the License. 112 * You may obtain a copy of the License at 113 * 114 * http://www.apache.org/licenses/LICENSE-2.0 115 * 116 * Unless required by applicable law or agreed to in writing, software 117 * distributed under the License is distributed on an "AS IS" BASIS, 118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 119 * See the License for the specific language governing permissions and 120 * limitations under the License. 121 */let __PRIVATE_AutoId=class __PRIVATE_AutoId{static newId(){let $=62*Math.floor(256/62),et="";for(;et.length<20;){let en=/** 122 * @license 123 * Copyright 2020 Google LLC 124 * 125 * Licensed under the Apache License, Version 2.0 (the "License"); 126 * you may not use this file except in compliance with the License. 127 * You may obtain a copy of the License at 128 * 129 * http://www.apache.org/licenses/LICENSE-2.0 130 * 131 * Unless required by applicable law or agreed to in writing, software 132 * distributed under the License is distributed on an "AS IS" BASIS, 133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134 * See the License for the specific language governing permissions and 135 * limitations under the License. 136 */function($){let et="undefined"!=typeof self&&(self.crypto||self.msCrypto),en=new Uint8Array($);if(et&&"function"==typeof et.getRandomValues)et.getRandomValues(en);else for(let et=0;et<$;et++)en[et]=Math.floor(256*Math.random());return en}(40);for(let er=0;er<en.length;++er)et.length<20&&en[er]<$&&(et+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(en[er]%62))}return et}};function __PRIVATE_primitiveComparator($,et){return $<et?-1:$>et?1:0}function __PRIVATE_compareUtf8Strings($,et){let en=Math.min($.length,et.length);for(let er=0;er<en;er++){let en=$.charAt(er),ei=et.charAt(er);if(en!==ei)return __PRIVATE_isSurrogate(en)===__PRIVATE_isSurrogate(ei)?__PRIVATE_primitiveComparator(en,ei):__PRIVATE_isSurrogate(en)?1:-1}return __PRIVATE_primitiveComparator($.length,et.length)}function __PRIVATE_isSurrogate($){let et=$.charCodeAt(0);return et>=55296&&et<=57343}function __PRIVATE_arrayEquals($,et,en){return $.length===et.length&&$.every(($,er)=>en($,et[er]))}/** 137 * @license 138 * Copyright 2017 Google LLC 139 * 140 * Licensed under the Apache License, Version 2.0 (the "License"); 141 * you may not use this file except in compliance with the License. 142 * You may obtain a copy of the License at 143 * 144 * http://www.apache.org/licenses/LICENSE-2.0 145 * 146 * Unless required by applicable law or agreed to in writing, software 147 * distributed under the License is distributed on an "AS IS" BASIS, 148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 149 * See the License for the specific language governing permissions and 150 * limitations under the License. 151 */let eV="__name__";let BasePath=class BasePath{constructor($,et,en){void 0===et?et=0:et>$.length&&fail(637,{offset:et,range:$.length}),void 0===en?en=$.length-et:en>$.length-et&&fail(1746,{length:en,range:$.length-et}),this.segments=$,this.offset=et,this.len=en}get length(){return this.len}isEqual($){return 0===BasePath.comparator(this,$)}child($){let et=this.segments.slice(this.offset,this.limit());return $ instanceof BasePath?$.forEach($=>{et.push($)}):et.push($),this.construct(et)}limit(){return this.offset+this.length}popFirst($){return $=void 0===$?1:$,this.construct(this.segments,this.offset+$,this.length-$)}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($){return this.segments[this.offset+$]}isEmpty(){return 0===this.length}isPrefixOf($){if($.length<this.length)return!1;for(let et=0;et<this.length;et++)if(this.get(et)!==$.get(et))return!1;return!0}isImmediateParentOf($){if(this.length+1!==$.length)return!1;for(let et=0;et<this.length;et++)if(this.get(et)!==$.get(et))return!1;return!0}forEach($){for(let et=this.offset,en=this.limit();et<en;et++)$(this.segments[et])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator($,et){let en=Math.min($.length,et.length);for(let er=0;er<en;er++){let en=BasePath.compareSegments($.get(er),et.get(er));if(0!==en)return en}return __PRIVATE_primitiveComparator($.length,et.length)}static compareSegments($,et){let en=BasePath.isNumericId($),er=BasePath.isNumericId(et);return en&&!er?-1:!en&&er?1:en&&er?BasePath.extractNumericId($).compare(BasePath.extractNumericId(et)):__PRIVATE_compareUtf8Strings($,et)}static isNumericId($){return $.startsWith("__id")&&$.endsWith("__")}static extractNumericId($){return er.fromString($.substring(4,$.length-2))}};let ResourcePath=class ResourcePath extends BasePath{construct($,et,en){return new ResourcePath($,et,en)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
151toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...$){let et=[];for(let en of $){if(en.indexOf("//")>=0)throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid segment (${en}). Paths must not contain // in them.`);et.push(...en.split("/").filter($=>$.length>0))}return new ResourcePath(et)}static emptyPath(){return new ResourcePath([])}};let eD=/^[_a-zA-Z][_a-zA-Z0-9]*$/;let FieldPath$1=class FieldPath$1 extends BasePath{construct($,et,en){return new FieldPath$1($,et,en)}static isValidIdentifier($){return eD.test($)}canonicalString(){return this.toArray().map($=>($=$.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),FieldPath$1.isValidIdentifier($)||($="`"+$+"`"),$)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===eV}static keyField(){return new FieldPath$1([eV])}static fromServerFormat($){let et=[],en="",er=0,__PRIVATE_addCurrentSegment=()=>{if(0===en.length)throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid field path (${$}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);et.push(en),en=""},ei=!1;for(;er<$.length;){let et=$[er];if("\\"===et){if(er+1===$.length)throw new FirestoreError(eR.INVALID_ARGUMENT,"Path has trailing escape character: "+$);let et=$[er+1];if("\\"!==et&&"."!==et&&"`"!==et)throw new FirestoreError(eR.INVALID_ARGUMENT,"Path has invalid escape sequence: "+$);en+=et,er+=2}else"`"===et?ei=!ei:"."!==et||ei?en+=et:__PRIVATE_addCurrentSegment(),er++}if(__PRIVATE_addCurrentSegment(),ei)throw new FirestoreError(eR.INVALID_ARGUMENT,"Unterminated ` in path: "+$);return new FieldPath$1(et)}static emptyPath(){return new FieldPath$1([])}};/** 152 * @license 153 * Copyright 2017 Google LLC 154 * 155 * Licensed under the Apache License, Version 2.0 (the "License"); 156 * you may not use this file except in compliance with the License. 157 * You may obtain a copy of the License at 158 * 159 * http://www.apache.org/licenses/LICENSE-2.0 160 * 161 * Unless required by applicable law or agreed to in writing, software 162 * distributed under the License is distributed on an "AS IS" BASIS, 163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 164 * See the License for the specific language governing permissions and 165 * limitations under the License. 166 */let DocumentKey=class DocumentKey{constructor($){this.path=$}static fromPath($){return new DocumentKey(ResourcePath.fromString($))}static fromName($){return new DocumentKey(ResourcePath.fromString($).popFirst(5))}static empty(){return new DocumentKey(ResourcePath.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId($){return this.path.length>=2&&this.path.get(this.path.length-2)===$}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual($){return null!==$&&0===ResourcePath.comparator(this.path,$.path)}toString(){return this.path.toString()}static comparator($,et){return ResourcePath.comparator($.path,et.path)}static isDocumentKey($){return $.length%2==0}static fromSegments($){return new DocumentKey(new ResourcePath($.slice()))}};/** 167 * @license 168 * Copyright 2017 Google LLC 169 * 170 * Licensed under the Apache License, Version 2.0 (the "License"); 171 * you may not use this file except in compliance with the License. 172 * You may obtain a copy of the License at 173 * 174 * http://www.apache.org/licenses/LICENSE-2.0 175 * 176 * Unless required by applicable law or agreed to in writing, software 177 * distributed under the License is distributed on an "AS IS" BASIS, 178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 179 * See the License for the specific language governing permissions and 180 * limitations under the License. 181 */function __PRIVATE_validateNonEmptyArgument($,et,en){if(!en)throw new FirestoreError(eR.INVALID_ARGUMENT,`Function ${$}() cannot be called with an empty ${et}.`)}function __PRIVATE_validateDocumentPath($){if(!DocumentKey.isDocumentKey($))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${$} has ${$.length}.`)}function __PRIVATE_validateCollectionPath($){if(DocumentKey.isDocumentKey($))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${$} has ${$.length}.`)}function __PRIVATE_isPlainObject($){return"object"==typeof $&&null!==$&&(Object.getPrototypeOf($)===Object.prototype||null===Object.getPrototypeOf($))}function __PRIVATE_valueDescription($){if(void 0===$)return"undefined";if(null===$)return"null";if("string"==typeof $)return $.length>20&&($=`${$.substring(0,20)}...`),JSON.stringify($);if("number"==typeof $||"boolean"==typeof $)return""+$;if("object"==typeof $){if($ instanceof Array)return"an array";{var et;let en=(et=$).constructor?et.constructor.name:null;return en?`a custom ${en} object`:"an object"}}return"function"==typeof $?"a function":fail(12329,{type:typeof $})}function __PRIVATE_cast($,et){if("_delegate"in $&&($=$._delegate),!($ instanceof et)){if(et.name===$.constructor.name)throw new FirestoreError(eR.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let en=__PRIVATE_valueDescription($);throw new FirestoreError(eR.INVALID_ARGUMENT,`Expected type '${et.name}', but it was: ${en}`)}}return $}/** 182 * @license 183 * Copyright 2025 Google LLC 184 * 185 * Licensed under the Apache License, Version 2.0 (the "License");
186 * you may not use this file except in compliance with the License. 187 * You may obtain a copy of the License at 188 * 189 * http://www.apache.org/licenses/LICENSE-2.0 190 * 191 * Unless required by applicable law or agreed to in writing, software 192 * distributed under the License is distributed on an "AS IS" BASIS, 193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 194 * See the License for the specific language governing permissions and 195 * limitations under the License. 196 */function property($,et){let en={typeString:$};return et&&(en.value=et),en}function __PRIVATE_validateJSON($,et){let en;if(!__PRIVATE_isPlainObject($))throw new FirestoreError(eR.INVALID_ARGUMENT,"JSON must be an object");for(let er in et)if(et[er]){let ei=et[er].typeString,eo="value"in et[er]?{value:et[er].value}:void 0;if(!(er in $)){en=`JSON missing required field: '${er}'`;break}let es=$[er];if(ei&&typeof es!==ei){en=`JSON field '${er}' must be a ${ei}.`;break}if(void 0!==eo&&es!==eo.value){en=`Expected '${er}' field to equal '${eo.value}'`;break}}if(en)throw new FirestoreError(eR.INVALID_ARGUMENT,en);return!0}let Timestamp=class Timestamp{static now(){return Timestamp.fromMillis(Date.now())}static fromDate($){return Timestamp.fromMillis($.getTime())}static fromMillis($){let et=Math.floor($/1e3),en=Math.floor(($-1e3*et)*1e6);return new Timestamp(et,en)}constructor($,et){if(this.seconds=$,this.nanoseconds=et,et<0||et>=1e9)throw new FirestoreError(eR.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+et);if($<-62135596800||$>=253402300800)throw new FirestoreError(eR.INVALID_ARGUMENT,"Timestamp seconds out of range: "+$)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo($){return this.seconds===$.seconds?__PRIVATE_primitiveComparator(this.nanoseconds,$.nanoseconds):__PRIVATE_primitiveComparator(this.seconds,$.seconds)}isEqual($){return $.seconds===this.seconds&&$.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:Timestamp._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON($){if(__PRIVATE_validateJSON($,Timestamp._jsonSchema))return new Timestamp($.seconds,$.nanoseconds)}valueOf(){let $=this.seconds- -62135596800;return String($).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}};Timestamp._jsonSchemaVersion="firestore/timestamp/1.0",Timestamp._jsonSchema={type:property("string",Timestamp._jsonSchemaVersion),seconds:property("number"),nanoseconds:property("number")};/** 197 * @license 198 * Copyright 2017 Google LLC 199 * 200 * Licensed under the Apache License, Version 2.0 (the "License"); 201 * you may not use this file except in compliance with the License. 202 * You may obtain a copy of the License at 203 * 204 * http://www.apache.org/licenses/LICENSE-2.0 205 * 206 * Unless required by applicable law or agreed to in writing, software 207 * distributed under the License is distributed on an "AS IS" BASIS, 208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 * See the License for the specific language governing permissions and 210 * limitations under the License. 211 */let SnapshotVersion=class SnapshotVersion{static fromTimestamp($){return new SnapshotVersion($)}static min(){return new SnapshotVersion(new Timestamp(0,0))}static max(){return new SnapshotVersion(new Timestamp(253402300799,999999999))}constructor($){this.timestamp=$}compareTo($){return this.timestamp._compareTo($.timestamp)}isEqual($){return this.timestamp.isEqual($.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}};let IndexOffset=class IndexOffset{constructor($,et,en){this.readTime=$,this.documentKey=et,this.largestBatchId=en}static min(){return new IndexOffset(SnapshotVersion.min(),DocumentKey.empty(),-1)}static max(){return new IndexOffset(SnapshotVersion.max(),DocumentKey.empty(),-1)}};let PersistenceTransaction=class PersistenceTransaction{constructor(){this.onCommittedListeners=[]}addOnCommittedListener($){this.onCommittedListeners.push($)}
vendor: 4,778 bytes, lines 211-260
211raiseOnCommittedEvent(){this.onCommittedListeners.forEach($=>$())}};/** 212 * @license 213 * Copyright 2017 Google LLC 214 * 215 * Licensed under the Apache License, Version 2.0 (the "License"); 216 * you may not use this file except in compliance with the License. 217 * You may obtain a copy of the License at 218 * 219 * http://www.apache.org/licenses/LICENSE-2.0 220 * 221 * Unless required by applicable law or agreed to in writing, software 222 * distributed under the License is distributed on an "AS IS" BASIS, 223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 224 * See the License for the specific language governing permissions and 225 * limitations under the License. 226 */async function __PRIVATE_ignoreIfPrimaryLeaseLoss($){if($.code!==eR.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==$.message)throw $;__PRIVATE_logDebug("LocalStore","Unexpectedly lost primary lease")}/** 227 * @license 228 * Copyright 2017 Google LLC 229 * 230 * Licensed under the Apache License, Version 2.0 (the "License"); 231 * you may not use this file except in compliance with the License. 232 * You may obtain a copy of the License at 233 * 234 * http://www.apache.org/licenses/LICENSE-2.0 235 * 236 * Unless required by applicable law or agreed to in writing, software 237 * distributed under the License is distributed on an "AS IS" BASIS, 238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 239 * See the License for the specific language governing permissions and 240 * limitations under the License. 241 */let PersistencePromise=class PersistencePromise{constructor($){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,$($=>{this.isDone=!0,this.result=$,this.nextCallback&&this.nextCallback($)},$=>{this.isDone=!0,this.error=$,this.catchCallback&&this.catchCallback($)})}catch($){return this.next(void 0,$)}next($,et){return this.callbackAttached&&fail(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(et,this.error):this.wrapSuccess($,this.result):new PersistencePromise((en,er)=>{this.nextCallback=et=>{this.wrapSuccess($,et).next(en,er)},this.catchCallback=$=>{this.wrapFailure(et,$).next(en,er)}})}toPromise(){return new Promise(($,et)=>{this.next($,et)})}wrapUserFunction($){try{let et=$();return et instanceof PersistencePromise?et:PersistencePromise.resolve(et)}catch($){return PersistencePromise.reject($)}}wrapSuccess($,et){return $?this.wrapUserFunction(()=>$(et)):PersistencePromise.resolve(et)}wrapFailure($,et){return $?this.wrapUserFunction(()=>$(et)):PersistencePromise.reject(et)}static resolve($){return new PersistencePromise((et,en)=>{et($)})}static reject($){return new PersistencePromise((et,en)=>{en($)})}static waitFor($){return new PersistencePromise((et,en)=>{let er=0,ei=0,eo=!1;$.forEach($=>{++er,$.next(()=>{++ei,eo&&ei===er&&et()},$=>en($))}),eo=!0,ei===er&&et()})}static or($){let et=PersistencePromise.resolve(!1);for(let en of $)et=et.next($=>$?PersistencePromise.resolve($):en());return et}static forEach($,et){let en=[];return $.forEach(($,er)=>{en.push(et.call(this,$,er))}),this.waitFor(en)}static mapArray($,et){return new PersistencePromise((en,er)=>{let ei=$.length,eo=Array(ei),es=0;for(let el=0;el<ei;el++){let eu=el;et($[eu]).next($=>{eo[eu]=$,++es===ei&&en(eo)},$=>er($))}})}static doWhile($,et){return new PersistencePromise((en,er)=>{let process=()=>{!0===$()?et().next(()=>{process()},er):en()};process()})}};function __PRIVATE_isIndexedDbTransactionError($){return"IndexedDbTransactionError"===$.name}/** 242 * @license 243 * Copyright 2018 Google LLC 244 * 245 * Licensed under the Apache License, Version 2.0 (the "License"); 246 * you may not use this file except in compliance with the License. 247 * You may obtain a copy of the License at 248 * 249 * http://www.apache.org/licenses/LICENSE-2.0 250 * 251 * Unless required by applicable law or agreed to in writing, software 252 * distributed under the License is distributed on an "AS IS" BASIS, 253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 254 * See the License for the specific language governing permissions and 255 * limitations under the License. 256 */let __PRIVATE_ListenSequence=class __PRIVATE_ListenSequence{constructor($,et){this.previousValue=$,et&&(et.sequenceNumberHandler=$=>this.ae($),this.ue=$=>et.writeSequenceNumber($))}ae($){return this.previousValue=Math.max($,this.previousValue),this.previousValue}next(){let $=++this.previousValue;return this.ue&&this.ue($),$}};function __PRIVATE_isNullOrUndefined($){return null==$}function __PRIVATE_isNegativeZero($){return 0===$&&1/$==-1/0}/** 257 * @license 258 * Copyright 2017 Google LLC 259 * 260 * Licensed under the Apache License, Version 2.0 (the "License");
261 * you may not use this file except in compliance with the License. 262 * You may obtain a copy of the License at 263 * 264 * http://www.apache.org/licenses/LICENSE-2.0 265 * 266 * Unless required by applicable law or agreed to in writing, software 267 * distributed under the License is distributed on an "AS IS" BASIS, 268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 269 * See the License for the specific language governing permissions and 270 * limitations under the License. 271 */function __PRIVATE_objectSize($){let et=0;for(let en in $)Object.prototype.hasOwnProperty.call($,en)&&et++;return et}function forEach($,et){for(let en in $)Object.prototype.hasOwnProperty.call($,en)&&et(en,$[en])}function isEmpty($){for(let et in $)if(Object.prototype.hasOwnProperty.call($,et))return!1;return!0}__PRIVATE_ListenSequence.ce=-1;/** 272 * @license 273 * Copyright 2017 Google LLC 274 * 275 * Licensed under the Apache License, Version 2.0 (the "License"); 276 * you may not use this file except in compliance with the License. 277 * You may obtain a copy of the License at 278 * 279 * http://www.apache.org/licenses/LICENSE-2.0 280 * 281 * Unless required by applicable law or agreed to in writing, software 282 * distributed under the License is distributed on an "AS IS" BASIS, 283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * See the License for the specific language governing permissions and 285 * limitations under the License. 286 */let SortedMap=class SortedMap{constructor($,et){this.comparator=$,this.root=et||LLRBNode.EMPTY}insert($,et){return new SortedMap(this.comparator,this.root.insert($,et,this.comparator).copy(null,null,LLRBNode.BLACK,null,null))}remove($){return new SortedMap(this.comparator,this.root.remove($,this.comparator).copy(null,null,LLRBNode.BLACK,null,null))}get($){let et=this.root;for(;!et.isEmpty();){let en=this.comparator($,et.key);if(0===en)return et.value;en<0?et=et.left:en>0&&(et=et.right)}return null}indexOf($){let et=0,en=this.root;for(;!en.isEmpty();){let er=this.comparator($,en.key);if(0===er)return et+en.left.size;er<0?en=en.left:(et+=en.left.size+1,en=en.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($){return this.root.inorderTraversal($)}forEach($){this.inorderTraversal((et,en)=>($(et,en),!1))}toString(){let $=[];return this.inorderTraversal((et,en)=>($.push(`${et}:${en}`),!1)),`{${$.join(", ")}}`}reverseTraversal($){return this.root.reverseTraversal($)}getIterator(){return new SortedMapIterator(this.root,null,this.comparator,!1)}getIteratorFrom($){return new SortedMapIterator(this.root,$,this.comparator,!1)}getReverseIterator(){return new SortedMapIterator(this.root,null,this.comparator,!0)}getReverseIteratorFrom($){return new SortedMapIterator(this.root,$,this.comparator,!0)}};let SortedMapIterator=class SortedMapIterator{constructor($,et,en,er){this.isReverse=er,this.nodeStack=[];let ei=1;for(;!$.isEmpty();)if(ei=et?en($.key,et):1,et&&er&&(ei*=-1),ei<0)$=this.isReverse?$.left:$.right;else{if(0===ei){this.nodeStack.push($);break}this.nodeStack.push($),$=this.isReverse?$.right:$.left}}getNext(){let $=this.nodeStack.pop(),et={key:$.key,value:$.value};if(this.isReverse)for($=$.left;!$.isEmpty();)this.nodeStack.push($),$=$.right;else for($=$.right;!$.isEmpty();)this.nodeStack.push($),$=$.left;return et}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let $=this.nodeStack[this.nodeStack.length-1];return{key:$.key,value:$.value}}};let LLRBNode=class LLRBNode{constructor($,et,en,er,ei){this.key=$,this.value=et,this.color=null!=en?en:LLRBNode.RED,this.left=null!=er?er:LLRBNode.EMPTY,this.right=null!=ei?ei:LLRBNode.EMPTY,this.size=this.left.size+1+this.right.size}copy($,et,en,er,ei){return new LLRBNode(null!=$?$:this.key,null!=et?et:this.value,null!=en?en:this.color,null!=er?er:this.left,null!=ei?ei:this.right)}isEmpty(){return!1}inorderTraversal($){return this.left.inorderTraversal($)||$(this.key,this.value)||this.right.inorderTraversal($)}reverseTraversal($){return this.right.reverseTraversal($)||$(this.key,this.value)||this.left.reverseTraversal($)}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($,et,en){let er=this,ei=en($,er.key);return(er=ei<0?er.copy(null,null,null,er.left.insert($,et,en),null):0===ei?er.copy(null,et,null,null,null):er.copy(null,null,null,null,er.right.insert($,et,en))).fixUp()}removeMin(){if(this.left.isEmpty())return LLRBNode.EMPTY;let $=this;return $.left.isRed()||$.left.left.isRed()||($=$.moveRedLeft()),($=$.copy(null,null,null,$.left.removeMin(),null)).fixUp()}remove($,et){let en,er=this;if(0>et($,er.key))er.left.isEmpty()||er.left.isRed()||er.left.left.isRed()||(er=er.moveRedLeft()),er=er.copy(null,null,null,er.left.remove($,et),null);else{if(er.left.isRed()&&(er=er.rotateRight()),er.right.isEmpty()||er.right.isRed()||er.right.left.isRed()||(er=er.moveRedRight()),0===et($,er.key)){if(er.right.isEmpty())return LLRBNode.EMPTY;en=er.right.min(),er=er.copy(en.key,en.value,null,null,er.right.removeMin())}er=er.copy(null,null,null,null,er.right.remove($,et))}return er.fixUp()}isRed(){return this.color}fixUp(){let $=this;return $.right.isRed()&&!$.left.isRed()&&($=$.rotateLeft()),$.left.isRed()&&$.left.left.isRed()&&($=$.rotateRight()),$.left.isRed()&&$.right.isRed()&&($=$.colorFlip()),$}moveRedLeft(){let $=this.colorFlip();return $.right.left.isRed()&&($=($=($=$.copy(null,null,null,null,$.right.rotateRight())).rotateLeft()).colorFlip()),$}moveRedRight(){let $=this.colorFlip();return $.left.left.isRed()&&($=($=$.rotateRight()).colorFlip()),$}rotateLeft(){let $=this.copy(null,null,LLRBNode.RED,null,this.right.left);return this.right.copy(null,null,this.color,$,null)}rotateRight(){let $=this.copy(null,null,LLRBNode.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,$)}colorFlip(){let $=this.left.copy(null,null,!this.left.color,null,null),et=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,$,et)}checkMaxDepth(){let $=this.check();return Math.pow(2,$)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw fail(43730,{key:this.key,value:this.value});if(this.right.isRed())throw fail(14113,{key:this.key,value:this.value});let $=this.left.check();if($!==this.right.check())throw fail(27949);return $+(this.isRed()?0:1)}};LLRBNode.EMPTY=null,LLRBNode.RED=!0,LLRBNode.BLACK=!1,LLRBNode.EMPTY=ne
vendor: 4,203 bytes, lines 286-326
286w class{constructor(){this.size=0}get key(){throw fail(57766)}get value(){throw fail(16141)}get color(){throw fail(16727)}get left(){throw fail(29726)}get right(){throw fail(36894)}copy($,et,en,er,ei){return this}insert($,et,en){return new LLRBNode($,et)}remove($,et){return this}isEmpty(){return!0}inorderTraversal($){return!1}reverseTraversal($){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 287 * @license 288 * Copyright 2017 Google LLC 289 * 290 * Licensed under the Apache License, Version 2.0 (the "License"); 291 * you may not use this file except in compliance with the License. 292 * You may obtain a copy of the License at 293 * 294 * http://www.apache.org/licenses/LICENSE-2.0 295 * 296 * Unless required by applicable law or agreed to in writing, software 297 * distributed under the License is distributed on an "AS IS" BASIS, 298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 299 * See the License for the specific language governing permissions and 300 * limitations under the License. 301 */let SortedSet=class SortedSet{constructor($){this.comparator=$,this.data=new SortedMap(this.comparator)}has($){return null!==this.data.get($)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf($){return this.data.indexOf($)}forEach($){this.data.inorderTraversal((et,en)=>($(et),!1))}forEachInRange($,et){let en=this.data.getIteratorFrom($[0]);for(;en.hasNext();){let er=en.getNext();if(this.comparator(er.key,$[1])>=0)return;et(er.key)}}forEachWhile($,et){let en;for(en=void 0!==et?this.data.getIteratorFrom(et):this.data.getIterator();en.hasNext();)if(!$(en.getNext().key))return}firstAfterOrEqual($){let et=this.data.getIteratorFrom($);return et.hasNext()?et.getNext().key:null}getIterator(){return new SortedSetIterator(this.data.getIterator())}getIteratorFrom($){return new SortedSetIterator(this.data.getIteratorFrom($))}add($){return this.copy(this.data.remove($).insert($,!0))}delete($){return this.has($)?this.copy(this.data.remove($)):this}isEmpty(){return this.data.isEmpty()}unionWith($){let et=this;return et.size<$.size&&(et=$,$=this),$.forEach($=>{et=et.add($)}),et}isEqual($){if(!($ instanceof SortedSet)||this.size!==$.size)return!1;let et=this.data.getIterator(),en=$.data.getIterator();for(;et.hasNext();){let $=et.getNext().key,er=en.getNext().key;if(0!==this.comparator($,er))return!1}return!0}toArray(){let $=[];return this.forEach(et=>{$.push(et)}),$}toString(){let $=[];return this.forEach(et=>$.push(et)),"SortedSet("+$.toString()+")"}copy($){let et=new SortedSet(this.comparator);return et.data=$,et}};let SortedSetIterator=class SortedSetIterator{constructor($){this.iter=$}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}};/** 302 * @license 303 * Copyright 2020 Google LLC 304 * 305 * Licensed under the Apache License, Version 2.0 (the "License"); 306 * you may not use this file except in compliance with the License. 307 * You may obtain a copy of the License at 308 * 309 * http://www.apache.org/licenses/LICENSE-2.0 310 * 311 * Unless required by applicable law or agreed to in writing, software 312 * distributed under the License is distributed on an "AS IS" BASIS, 313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 314 * See the License for the specific language governing permissions and 315 * limitations under the License. 316 */let FieldMask=class FieldMask{constructor($){this.fields=$,$.sort(FieldPath$1.comparator)}static empty(){return new FieldMask([])}unionWith($){let et=new SortedSet(FieldPath$1.comparator);for(let $ of this.fields)et=et.add($);for(let en of $)et=et.add(en);return new FieldMask(et.toArray())}covers($){for(let et of this.fields)if(et.isPrefixOf($))return!0;return!1}isEqual($){return __PRIVATE_arrayEquals(this.fields,$.fields,($,et)=>$.isEqual(et))}};/** 317 * @license 318 * Copyright 2023 Google LLC 319 * 320 * Licensed under the Apache License, Version 2.0 (the "License"); 321 * you may not use this file except in compliance with the License. 322 * You may obtain a copy of the License at 323 * 324 * http://www.apache.org/licenses/LICENSE-2.0 325 * 326 * Unless required by applicable law or agreed to in writing, softw
326are 327 * distributed under the License is distributed on an "AS IS" BASIS, 328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 329 * See the License for the specific language governing permissions and 330 * limitations under the License. 331 */let __PRIVATE_Base64DecodeError=class __PRIVATE_Base64DecodeError extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}};/** 332 * @license 333 * Copyright 2020 Google LLC 334 * 335 * Licensed under the Apache License, Version 2.0 (the "License"); 336 * you may not use this file except in compliance with the License. 337 * You may obtain a copy of the License at 338 * 339 * http://www.apache.org/licenses/LICENSE-2.0 340 * 341 * Unless required by applicable law or agreed to in writing, software 342 * distributed under the License is distributed on an "AS IS" BASIS, 343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * See the License for the specific language governing permissions and 345 * limitations under the License. 346 */let ByteString=class ByteString{constructor($){this.binaryString=$}static fromBase64String($){let et=function($){try{return atob($)}catch($){throw"undefined"!=typeof DOMException&&$ instanceof DOMException?new __PRIVATE_Base64DecodeError("Invalid base64 string: "+$):$}}($);return new ByteString(et)}static fromUint8Array($){let et=function($){let et="";for(let en=0;en<$.length;++en)et+=String.fromCharCode($[en]);return et}($);return new ByteString(et)}[Symbol.iterator](){let $=0;return{next:()=>$<this.binaryString.length?{value:this.binaryString.charCodeAt($++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function($){let et=new Uint8Array($.length);for(let en=0;en<$.length;en++)et[en]=$.charCodeAt(en);return et}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo($){return __PRIVATE_primitiveComparator(this.binaryString,$.binaryString)}isEqual($){return this.binaryString===$.binaryString}};ByteString.EMPTY_BYTE_STRING=new ByteString("");let eO=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function __PRIVATE_normalizeTimestamp($){if(__PRIVATE_hardAssert(!!$,39018),"string"==typeof $){let et=0,en=eO.exec($);if(__PRIVATE_hardAssert(!!en,46558,{timestamp:$}),en[1]){let $=en[1];et=Number($=($+"000000000").substr(0,9))}let er=new Date($);return{seconds:Math.floor(er.getTime()/1e3),nanos:et}}return{seconds:__PRIVATE_normalizeNumber($.seconds),nanos:__PRIVATE_normalizeNumber($.nanos)}}function __PRIVATE_normalizeNumber($){return"number"==typeof $?$:"string"==typeof $?Number($):0}function __PRIVATE_normalizeByteString($){return"string"==typeof $?ByteString.fromBase64String($):ByteString.fromUint8Array($)}/** 347 * @license 348 * Copyright 2020 Google LLC 349 * 350 * Licensed under the Apache License, Version 2.0 (the "License"); 351 * you may not use this file except in compliance with the License. 352 * You may obtain a copy of the License at 353 * 354 * http://www.apache.org/licenses/LICENSE-2.0 355 * 356 * Unless required by applicable law or agreed to in writing, software 357 * distributed under the License is distributed on an "AS IS" BASIS, 358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 359 * See the License for the specific language governing permissions and 360 * limitations under the License. 361 */let eM="server_timestamp",eF="__type__",eL="__previous_value__",eH="__local_write_time__";function __PRIVATE_isServerTimestamp($){let et=($?.mapValue?.fields||{})[eF]?.stringValue;return et===eM}function __PRIVATE_getPreviousValue($){let et=$.mapValue.fields[eL];return __PRIVATE_isServerTimestamp(et)?__PRIVATE_getPreviousValue(et):et}function __PRIVATE_getLocalWriteTime($){let et=__PRIVATE_normalizeTimestamp($.mapValue.fields[eH].timestampValue);return new Timestamp(et.seconds,et.nanos)}/** 362 * @license 363 * Copyright 2017 Google LLC 364 * 365 * Licensed under the Apache License, Version 2.0 (the "License"); 366 * you may not use this file except in compliance with the License. 367 * You may obtain a copy of the License at 368 * 369 * http://www.apache.org/licenses/LICENSE-2.0 370 * 371 * Unless required by applicable law or agreed to in writing, softw
371are 372 * distributed under the License is distributed on an "AS IS" BASIS, 373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * See the License for the specific language governing permissions and 375 * limitations under the License. 376 */let DatabaseInfo=class DatabaseInfo{constructor($,et,en,er,ei,eo,es,el,eu,ed){this.databaseId=$,this.appId=et,this.persistenceKey=en,this.host=er,this.ssl=ei,this.forceLongPolling=eo,this.autoDetectLongPolling=es,this.longPollingOptions=el,this.useFetchStreams=eu,this.isUsingEmulator=ed}};let eB="(default)";let DatabaseId=class DatabaseId{constructor($,et){this.projectId=$,this.database=et||eB}static empty(){return new DatabaseId("","")}get isDefaultDatabase(){return this.database===eB}isEqual($){return $ instanceof DatabaseId&&$.projectId===this.projectId&&$.database===this.database}};/** 377 * @license 378 * Copyright 2020 Google LLC 379 * 380 * Licensed under the Apache License, Version 2.0 (the "License"); 381 * you may not use this file except in compliance with the License. 382 * You may obtain a copy of the License at 383 * 384 * http://www.apache.org/licenses/LICENSE-2.0 385 * 386 * Unless required by applicable law or agreed to in writing, software 387 * distributed under the License is distributed on an "AS IS" BASIS, 388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 389 * See the License for the specific language governing permissions and 390 * limitations under the License. 391 */let eU="__type__",ez="__max__",eq={mapValue:{fields:{__type__:{stringValue:ez}}}},eZ="__vector__",eW="value";function __PRIVATE_typeOrder($){return"nullValue"in $?0:"booleanValue"in $?1:"integerValue"in $||"doubleValue"in $?2:"timestampValue"in $?3:"stringValue"in $?5:"bytesValue"in $?6:"referenceValue"in $?7:"geoPointValue"in $?8:"arrayValue"in $?9:"mapValue"in $?__PRIVATE_isServerTimestamp($)?4:__PRIVATE_isMaxValue($)?9007199254740991:__PRIVATE_isVectorValue($)?10:11:fail(28295,{value:$})}function __PRIVATE_valueEquals($,et){if($===et)return!0;let en=__PRIVATE_typeOrder($);if(en!==__PRIVATE_typeOrder(et))return!1;switch(en){case 0:case 9007199254740991:return!0;case 1:return $.booleanValue===et.booleanValue;case 4:return __PRIVATE_getLocalWriteTime($).isEqual(__PRIVATE_getLocalWriteTime(et));case 3:return function($,et){if("string"==typeof $.timestampValue&&"string"==typeof et.timestampValue&&$.timestampValue.length===et.timestampValue.length)return $.timestampValue===et.timestampValue;let en=__PRIVATE_normalizeTimestamp($.timestampValue),er=__PRIVATE_normalizeTimestamp(et.timestampValue);return en.seconds===er.seconds&&en.nanos===er.nanos}($,et);case 5:return $.stringValue===et.stringValue;case 6:return __PRIVATE_normalizeByteString($.bytesValue).isEqual(__PRIVATE_normalizeByteString(et.bytesValue));case 7:return $.referenceValue===et.referenceValue;case 8:return __PRIVATE_normalizeNumber($.geoPointValue.latitude)===__PRIVATE_normalizeNumber(et.geoPointValue.latitude)&&__PRIVATE_normalizeNumber($.geoPointValue.longitude)===__PRIVATE_normalizeNumber(et.geoPointValue.longitude);case 2:return function($,et){if("integerValue"in $&&"integerValue"in et)return __PRIVATE_normalizeNumber($.integerValue)===__PRIVATE_normalizeNumber(et.integerValue);if("doubleValue"in $&&"doubleValue"in et){let en=__PRIVATE_normalizeNumber($.doubleValue),er=__PRIVATE_normalizeNumber(et.doubleValue);return en===er?__PRIVATE_isNegativeZero(en)===__PRIVATE_isNegativeZero(er):isNaN(en)&&isNaN(er)}return!1}($,et);case 9:return __PRIVATE_arrayEquals($.arrayValue.values||[],et.arrayValue.values||[],__PRIVATE_valueEquals);case 10:case 11:return function($,et){let en=$.mapValue.fields||{},er=et.mapValue.fields||{};if(__PRIVATE_objectSize(en)!==__PRIVATE_objectSize(er))return!1;for(let $ in en)if(en.hasOwnProperty($)&&(void 0===er[$]||!__PRIVATE_valueEquals(en[$],er[$])))return!1;return!0}($,et);default:return fail(52216,{left:$})}}function __PRIVATE_arrayValueContains($,et){return void 0!==($.values||[]).find($=>__PRIVATE_valueEquals($,et))}function __PRIVATE_valueCompare($,et){if($===et)return 0;let en=__PRIVATE_typeOrder($),er=__PRIVATE_typeOrder(et);if(en!==er)return __PRIVATE_primitiveComparator(en,er);switch(en){case 0:case 9007199254740991:return 0;case 1:return __PRIVATE_primitiveComparator($.booleanValue,et.booleanValue);case 2:return function($,et){let en=__PRIVATE_normalizeNumber($.integerValue||$.doubleValue),er=__PRIVATE_normalizeNumber(et.integerValue||et.doubleValue);return en<er?-1:en>er?1:en===er?0:isNaN(en)?isNaN(er)?0:-1:1}($,et);
391case 3:return __PRIVATE_compareTimestamps($.timestampValue,et.timestampValue);case 4:return __PRIVATE_compareTimestamps(__PRIVATE_getLocalWriteTime($),__PRIVATE_getLocalWriteTime(et));case 5:return __PRIVATE_compareUtf8Strings($.stringValue,et.stringValue);case 6:return function($,et){let en=__PRIVATE_normalizeByteString($),er=__PRIVATE_normalizeByteString(et);return en.compareTo(er)}($.bytesValue,et.bytesValue);case 7:return function($,et){let en=$.split("/"),er=et.split("/");for(let $=0;$<en.length&&$<er.length;$++){let et=__PRIVATE_primitiveComparator(en[$],er[$]);if(0!==et)return et}return __PRIVATE_primitiveComparator(en.length,er.length)}($.referenceValue,et.referenceValue);case 8:return function($,et){let en=__PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber($.latitude),__PRIVATE_normalizeNumber(et.latitude));return 0!==en?en:__PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber($.longitude),__PRIVATE_normalizeNumber(et.longitude))}($.geoPointValue,et.geoPointValue);case 9:return __PRIVATE_compareArrays($.arrayValue,et.arrayValue);case 10:return function($,et){let en=$.fields||{},er=et.fields||{},ei=en[eW]?.arrayValue,eo=er[eW]?.arrayValue,es=__PRIVATE_primitiveComparator(ei?.values?.length||0,eo?.values?.length||0);return 0!==es?es:__PRIVATE_compareArrays(ei,eo)}($.mapValue,et.mapValue);case 11:return function($,et){if($===eq.mapValue&&et===eq.mapValue)return 0;if($===eq.mapValue)return 1;if(et===eq.mapValue)return -1;let en=$.fields||{},er=Object.keys(en),ei=et.fields||{},eo=Object.keys(ei);er.sort(),eo.sort();for(let $=0;$<er.length&&$<eo.length;++$){let et=__PRIVATE_compareUtf8Strings(er[$],eo[$]);if(0!==et)return et;let es=__PRIVATE_valueCompare(en[er[$]],ei[eo[$]]);if(0!==es)return es}return __PRIVATE_primitiveComparator(er.length,eo.length)}($.mapValue,et.mapValue);default:throw fail(23264,{he:en})}}function __PRIVATE_compareTimestamps($,et){if("string"==typeof $&&"string"==typeof et&&$.length===et.length)return __PRIVATE_primitiveComparator($,et);let en=__PRIVATE_normalizeTimestamp($),er=__PRIVATE_normalizeTimestamp(et),ei=__PRIVATE_primitiveComparator(en.seconds,er.seconds);return 0!==ei?ei:__PRIVATE_primitiveComparator(en.nanos,er.nanos)}function __PRIVATE_compareArrays($,et){let en=$.values||[],er=et.values||[];for(let $=0;$<en.length&&$<er.length;++$){let et=__PRIVATE_valueCompare(en[$],er[$]);if(et)return et}return __PRIVATE_primitiveComparator(en.length,er.length)}function __PRIVATE_canonifyValue($){var et,en;return"nullValue"in $?"null":"booleanValue"in $?""+$.booleanValue:"integerValue"in $?""+$.integerValue:"doubleValue"in $?""+$.doubleValue:"timestampValue"in $?function($){let et=__PRIVATE_normalizeTimestamp($);return`time(${et.seconds},${et.nanos})`}($.timestampValue):"stringValue"in $?$.stringValue:"bytesValue"in $?__PRIVATE_normalizeByteString($.bytesValue).toBase64():"referenceValue"in $?(et=$.referenceValue,DocumentKey.fromName(et).toString()):"geoPointValue"in $?(en=$.geoPointValue,`geo(${en.latitude},${en.longitude})`):"arrayValue"in $?function($){let et="[",en=!0;for(let er of $.values||[])en?en=!1:et+=",",et+=__PRIVATE_canonifyValue(er);return et+"]"}($.arrayValue):"mapValue"in $?function($){let et=Object.keys($.fields||{}).sort(),en="{",er=!0;for(let ei of et)er?er=!1:en+=",",en+=`${ei}:${__PRIVATE_canonifyValue($.fields[ei])}`;return en+"}"}($.mapValue):fail(61005,{value:$})}function __PRIVATE_refValue($,et){return{referenceValue:`projects/${$.projectId}/databases/${$.database}/documents/${et.path.canonicalString()}`}}function isInteger($){return!!$&&"integerValue"in $}function isArray($){return!!$&&"arrayValue"in $}function __PRIVATE_isNullValue($){return!!$&&"nullValue"in $}function __PRIVATE_isNanValue($){return!!$&&"doubleValue"in $&&isNaN(Number($.doubleValue))}function __PRIVATE_isMapValue($){return!!$&&"mapValue"in $}function __PRIVATE_isVectorValue($){let et=($?.mapValue?.fields||{})[eU]?.stringValue;return et===eZ}function __PRIVATE_deepClone($){if($.geoPointValue)return{geoPointValue:{...$.geoPointValue}};if($.timestampValue&&"object"==typeof $.timestampValue)return{timestampValue:{...$.timestampValue}};if($.mapValue){let et={mapValue:{fields:{}}};return forEach($.mapValue.fields,($,en)=>et.mapValue.fields[$]=__PRIVATE_deepClone(en)),et}if($.arrayValue){let et={arrayValue:{values:[]}};for(let en=0;en<($.arrayValue.values||[]).length;++en)et.arrayValue.values[en]=__PRIVATE_deepClone($.arrayValue.values[en]);return et}return{...$}}function __PRIVATE_isMaxValue($){return((($.mapValue||{}).fields||{}).__type__||{}).stringValue===ez}/** 392 * @license 393 * Copyright 2017 Google LLC 394 * 395 * Licensed under the Apache License, Version 2.0 (the "License");
396 * you may not use this file except in compliance with the License. 397 * You may obtain a copy of the License at 398 * 399 * http://www.apache.org/licenses/LICENSE-2.0 400 * 401 * Unless required by applicable law or agreed to in writing, software 402 * distributed under the License is distributed on an "AS IS" BASIS, 403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 404 * See the License for the specific language governing permissions and 405 * limitations under the License. 406 */let ObjectValue=class ObjectValue{constructor($){this.value=$}static empty(){return new ObjectValue({mapValue:{}})}field($){if($.isEmpty())return this.value;{let et=this.value;for(let en=0;en<$.length-1;++en)if(!__PRIVATE_isMapValue(et=(et.mapValue.fields||{})[$.get(en)]))return null;return(et=(et.mapValue.fields||{})[$.lastSegment()])||null}}set($,et){this.getFieldsMap($.popLast())[$.lastSegment()]=__PRIVATE_deepClone(et)}setAll($){let et=FieldPath$1.emptyPath(),en={},er=[];$.forEach(($,ei)=>{if(!et.isImmediateParentOf(ei)){let $=this.getFieldsMap(et);this.applyChanges($,en,er),en={},er=[],et=ei.popLast()}$?en[ei.lastSegment()]=__PRIVATE_deepClone($):er.push(ei.lastSegment())});let ei=this.getFieldsMap(et);this.applyChanges(ei,en,er)}delete($){let et=this.field($.popLast());__PRIVATE_isMapValue(et)&&et.mapValue.fields&&delete et.mapValue.fields[$.lastSegment()]}isEqual($){return __PRIVATE_valueEquals(this.value,$.value)}getFieldsMap($){let et=this.value;et.mapValue.fields||(et.mapValue={fields:{}});for(let en=0;en<$.length;++en){let er=et.mapValue.fields[$.get(en)];__PRIVATE_isMapValue(er)&&er.mapValue.fields||(er={mapValue:{fields:{}}},et.mapValue.fields[$.get(en)]=er),et=er}return et.mapValue.fields}applyChanges($,et,en){for(let er of(forEach(et,(et,en)=>$[et]=en),en))delete $[er]}clone(){return new ObjectValue(__PRIVATE_deepClone(this.value))}};/** 407 * @license 408 * Copyright 2017 Google LLC 409 * 410 * Licensed under the Apache License, Version 2.0 (the "License"); 411 * you may not use this file except in compliance with the License. 412 * You may obtain a copy of the License at 413 * 414 * http://www.apache.org/licenses/LICENSE-2.0 415 * 416 * Unless required by applicable law or agreed to in writing, software 417 * distributed under the License is distributed on an "AS IS" BASIS, 418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 419 * See the License for the specific language governing permissions and 420 * limitations under the License. 421 */let MutableDocument=class MutableDocument{constructor($,et,en,er,ei,eo,es){this.key=$,this.documentType=et,this.version=en,this.readTime=er,this.createTime=ei,this.data=eo,this.documentState=es}static newInvalidDocument($){return new MutableDocument($,0,SnapshotVersion.min(),SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),0)}static newFoundDocument($,et,en,er){return new MutableDocument($,1,et,SnapshotVersion.min(),en,er,0)}static newNoDocument($,et){return new MutableDocument($,2,et,SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),0)}static newUnknownDocument($,et){return new MutableDocument($,3,et,SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),2)}convertToFoundDocument($,et){return this.createTime.isEqual(SnapshotVersion.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=$),this.version=$,this.documentType=1,this.data=et,this.documentState=0,this}convertToNoDocument($){return this.version=$,this.documentType=2,this.data=ObjectValue.empty(),this.documentState=0,this}convertToUnknownDocument($){return this.version=$,this.documentType=3,this.data=ObjectValue.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=SnapshotVersion.min(),this}setReadTime($){return this.readTime=$,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($){return $ instanceof MutableDocument&&this.key.isEqual($.key)&&this.version.isEqual($.version)&&this.documentType===$.documentType&&this.documentState===$.documentState&&this.data.isEqual($.data)}mutableCopy(){return new MutableDocument(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}})`}}
421;/** 422 * @license 423 * Copyright 2022 Google LLC 424 * 425 * Licensed under the Apache License, Version 2.0 (the "License"); 426 * you may not use this file except in compliance with the License. 427 * You may obtain a copy of the License at 428 * 429 * http://www.apache.org/licenses/LICENSE-2.0 430 * 431 * Unless required by applicable law or agreed to in writing, software 432 * distributed under the License is distributed on an "AS IS" BASIS, 433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 434 * See the License for the specific language governing permissions and 435 * limitations under the License. 436 */let Bound=class Bound{constructor($,et){this.position=$,this.inclusive=et}};function __PRIVATE_boundCompareToDocument($,et,en){let er=0;for(let ei=0;ei<$.position.length;ei++){let eo=et[ei],es=$.position[ei];if(er=eo.field.isKeyField()?DocumentKey.comparator(DocumentKey.fromName(es.referenceValue),en.key):__PRIVATE_valueCompare(es,en.data.field(eo.field)),"desc"===eo.dir&&(er*=-1),0!==er)break}return er}function __PRIVATE_boundEquals($,et){if(null===$)return null===et;if(null===et||$.inclusive!==et.inclusive||$.position.length!==et.position.length)return!1;for(let en=0;en<$.position.length;en++)if(!__PRIVATE_valueEquals($.position[en],et.position[en]))return!1;return!0}/** 437 * @license 438 * Copyright 2022 Google LLC 439 * 440 * Licensed under the Apache License, Version 2.0 (the "License"); 441 * you may not use this file except in compliance with the License. 442 * You may obtain a copy of the License at 443 * 444 * http://www.apache.org/licenses/LICENSE-2.0 445 * 446 * Unless required by applicable law or agreed to in writing, software 447 * distributed under the License is distributed on an "AS IS" BASIS, 448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 449 * See the License for the specific language governing permissions and 450 * limitations under the License. 451 */let OrderBy=class OrderBy{constructor($,et="asc"){this.field=$,this.dir=et}};/** 452 * @license 453 * Copyright 2022 Google LLC 454 * 455 * Licensed under the Apache License, Version 2.0 (the "License"); 456 * you may not use this file except in compliance with the License. 457 * You may obtain a copy of the License at 458 * 459 * http://www.apache.org/licenses/LICENSE-2.0 460 * 461 * Unless required by applicable law or agreed to in writing, software 462 * distributed under the License is distributed on an "AS IS" BASIS, 463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 464 * See the License for the specific language governing permissions and 465 * limitations under the License. 466 */let Filter=class Filter{};let FieldFilter=class FieldFilter extends Filter{constructor($,et,en){super(),this.field=$,this.op=et,this.value=en}static create($,et,en){return $.isKeyField()?"in"===et||"not-in"===et?this.createKeyFieldInFilter($,et,en):new __PRIVATE_KeyFieldFilter($,et,en):"array-contains"===et?new __PRIVATE_ArrayContainsFilter($,en):"in"===et?new __PRIVATE_InFilter($,en):"not-in"===et?new __PRIVATE_NotInFilter($,en):"array-contains-any"===et?new __PRIVATE_ArrayContainsAnyFilter($,en):new FieldFilter($,et,en)}static createKeyFieldInFilter($,et,en){return"in"===et?new __PRIVATE_KeyFieldInFilter($,en):new __PRIVATE_KeyFieldNotInFilter($,en)}matches($){let et=$.data.field(this.field);return"!="===this.op?null!==et&&void 0===et.nullValue&&this.matchesComparison(__PRIVATE_valueCompare(et,this.value)):null!==et&&__PRIVATE_typeOrder(this.value)===__PRIVATE_typeOrder(et)&&this.matchesComparison(__PRIVATE_valueCompare(et,this.value))}matchesComparison($){switch(this.op){case"<":return $<0;case"<=":return $<=0;case"==":return 0===$;case"!=":return 0!==$;case">":return $>0;case">=":return $>=0;default:return fail(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}};let CompositeFilter=class CompositeFilter extends Filter{constructor($,et){super(),this.filters=$,this.op=et,this.Pe=null}static create($,et){return new CompositeFilter($,et)}matches($){return __PRIVATE_compositeFilterIsConjunction(this)?void 0===this.filters.find(et=>!et.matches($)):void 0!==this.filters.find(et=>et.matches($))}getFlattenedFilters(){return null!==this.Pe||(this.Pe=this.filters.reduce(($,et)=>$.concat(et.getFlattenedFilters()),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}};function __PRIVATE_compositeFilterIsConjunction($){return"and"===$.op}function __PRIVATE_compositeFilterIsFlat($){for(let et of $.filters)if(et instanceof CompositeFilter)return!1;return!0}let __PRIVATE_KeyFieldFilter=class __PRIVATE_KeyFieldFilter extends FieldFilter{constructor($,et,en){super($,et,en),this.key=DocumentKey.fromName(en.referenceValue)}matches($){let et=DocumentKey.comparator($.key,this.key);return this.matchesComparison(et)}};let __PRIVATE_KeyFieldInFilter=class __PRIVATE_KeyFieldInFilter extends FieldFilter{constructor($,et){super($,"in",et),this.keys=__PRIVATE_extractDocumentKeysFromArrayValue("in",et)}matches($){return this.keys.some(et=>et.isEqual($.key))}};let __PRIVATE_KeyFieldNotInFilter=class __PRIVATE_KeyFieldNotInFilter extends FieldFilter{constructor($,et){super($,"not-in",et),this.keys=__PRIVATE_extractDocumentKeysFromArrayValue("not-in",et)}matches($){return!this.keys.some(et=>et.isEqual($.key))}};function __PRIVATE_extractDocumentKeysFromArrayValue($,et){return(et.arrayValue?.values||[]).map($=>DocumentKey.fromName($.referenceValue))}let __PRIVATE_ArrayContainsFilter=class __PRIVATE_ArrayContainsFilter extends FieldFilter{constructor($,et){super($,"array-contains",et)}matches($){let et=$.data.field(this.field);return isArray(et)&&__PRIVATE_arrayValueContains(et.arrayValue,this.value)}};let __PRIVATE_InFilter=class __PRIVATE_InFilter extends FieldFilter{constructor($,et){super($,"in",et)}matches($){let et=$.data.field(this.field);return null!==et&&__PRIVATE_arrayValueContains(this.value.arrayValue,et)}};let __PRIVATE_NotInFilter=class __PRIVATE_NotInFilter extends FieldFilter{constructor($,et){super($,"not-in",et)}matches($){if(__PRIVATE_arrayValueContains(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let et=$.data.field(this.field);return null!==et&&void 0===et.nullValue&&!__PRIVATE_arrayValueContains(this.value.arrayValue,et)}};let __PRIVATE_ArrayContainsAnyFilter=class __PRIVATE_ArrayContainsAnyFilter extends FieldFilter{constructor($,et){super($,"array-contains-any",et)}matches($){let et=$.data.field(this.field);return!(!isArray(et)||!et.arrayValue.values)&&et.arrayValue.values.some($=>__PRIVATE_arrayValueContains(this.value.arrayValue,$))}};/** 467 * @license 468 * Copyright 2019 Google LLC 469 * 470 * Licensed under the Apache License, Version 2.0 (the "License");
471 * you may not use this file except in compliance with the License. 472 * You may obtain a copy of the License at 473 * 474 * http://www.apache.org/licenses/LICENSE-2.0 475 * 476 * Unless required by applicable law or agreed to in writing, software 477 * distributed under the License is distributed on an "AS IS" BASIS, 478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 479 * See the License for the specific language governing permissions and 480 * limitations under the License. 481 */let __PRIVATE_TargetImpl=class __PRIVATE_TargetImpl{constructor($,et=null,en=[],er=[],ei=null,eo=null,es=null){this.path=$,this.collectionGroup=et,this.orderBy=en,this.filters=er,this.limit=ei,this.startAt=eo,this.endAt=es,this.Te=null}};function __PRIVATE_newTarget($,et=null,en=[],er=[],ei=null,eo=null,es=null){return new __PRIVATE_TargetImpl($,et,en,er,ei,eo,es)}function __PRIVATE_canonifyTarget($){if(null===$.Te){let et=$.path.canonicalString();null!==$.collectionGroup&&(et+="|cg:"+$.collectionGroup),et+="|f:"+$.filters.map($=>(function __PRIVATE_canonifyFilter($){if($ instanceof FieldFilter)return $.field.canonicalString()+$.op.toString()+__PRIVATE_canonifyValue($.value);if(__PRIVATE_compositeFilterIsFlat($)&&__PRIVATE_compositeFilterIsConjunction($))return $.filters.map($=>__PRIVATE_canonifyFilter($)).join(",");{let et=$.filters.map($=>__PRIVATE_canonifyFilter($)).join(",");return`${$.op}(${et})`}})($)).join(",")+"|ob:"+$.orderBy.map($=>$.field.canonicalString()+$.dir).join(","),__PRIVATE_isNullOrUndefined($.limit)||(et+="|l:"+$.limit),$.startAt&&(et+="|lb:"+($.startAt.inclusive?"b:":"a:")+$.startAt.position.map($=>__PRIVATE_canonifyValue($)).join(",")),$.endAt&&(et+="|ub:"+($.endAt.inclusive?"a:":"b:")+$.endAt.position.map($=>__PRIVATE_canonifyValue($)).join(",")),$.Te=et}return $.Te}function __PRIVATE_targetEquals($,et){if($.limit!==et.limit||$.orderBy.length!==et.orderBy.length)return!1;for(let ei=0;ei<$.orderBy.length;ei++){var en,er;if(en=$.orderBy[ei],er=et.orderBy[ei],!(en.dir===er.dir&&en.field.isEqual(er.field)))return!1}if($.filters.length!==et.filters.length)return!1;for(let en=0;en<$.filters.length;en++)if(!function __PRIVATE_filterEquals($,et){return $ instanceof FieldFilter?et instanceof FieldFilter&&$.op===et.op&&$.field.isEqual(et.field)&&__PRIVATE_valueEquals($.value,et.value):$ instanceof CompositeFilter?et instanceof CompositeFilter&&$.op===et.op&&$.filters.length===et.filters.length&&$.filters.reduce(($,en,er)=>
481$&&__PRIVATE_filterEquals(en,et.filters[er]),!0):void fail(19439)}($.filters[en],et.filters[en]))return!1;return $.collectionGroup===et.collectionGroup&&!!$.path.isEqual(et.path)&&!!__PRIVATE_boundEquals($.startAt,et.startAt)&&__PRIVATE_boundEquals($.endAt,et.endAt)}function __PRIVATE_targetIsDocumentTarget($){return DocumentKey.isDocumentKey($.path)&&null===$.collectionGroup&&0===$.filters.length}/** 482 * @license 483 * Copyright 2017 Google LLC 484 * 485 * Licensed under the Apache License, Version 2.0 (the "License"); 486 * you may not use this file except in compliance with the License. 487 * You may obtain a copy of the License at 488 * 489 * http://www.apache.org/licenses/LICENSE-2.0 490 * 491 * Unless required by applicable law or agreed to in writing, software 492 * distributed under the License is distributed on an "AS IS" BASIS, 493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 494 * See the License for the specific language governing permissions and 495 * limitations under the License. 496 */let __PRIVATE_QueryImpl=class __PRIVATE_QueryImpl{constructor($,et=null,en=[],er=[],ei=null,eo="F",es=null,el=null){this.path=$,this.collectionGroup=et,this.explicitOrderBy=en,this.filters=er,this.limit=ei,this.limitType=eo,this.startAt=es,this.endAt=el,this.Ie=null,this.Ee=null,this.de=null,this.startAt,this.endAt}};function __PRIVATE_newQueryForPath($){return new __PRIVATE_QueryImpl($)}function __PRIVATE_queryMatchesAllDocuments($){return 0===$.filters.length&&null===$.limit&&null==$.startAt&&null==$.endAt&&(0===$.explicitOrderBy.length||1===$.explicitOrderBy.length&&$.explicitOrderBy[0].field.isKeyField())}function __PRIVATE_isCollectionGroupQuery($){return null!==$.collectionGroup}function __PRIVATE_queryNormalizedOrderBy($){if(null===$.Ie){let et;$.Ie=[];let en=new Set;for(let et of $.explicitOrderBy)$.Ie.push(et),en.add(et.field.canonicalString());let er=$.explicitOrderBy.length>0?$.explicitOrderBy[$.explicitOrderBy.length-1].dir:"asc",ei=(et=new SortedSet(FieldPath$1.comparator),$.filters.forEach($=>{$.getFlattenedFilters().forEach($=>{$.isInequality()&&(et=et.add($.field))})}),et);ei.forEach(et=>{en.has(et.canonicalString())||et.isKeyField()||$.Ie.push(new OrderBy(et,er))}),en.has(FieldPath$1.keyField().canonicalString())||$.Ie.push(new OrderBy(FieldPath$1.keyField(),er))}return $.Ie}function __PRIVATE_queryToTarget($){return $.Ee||($.Ee=__PRIVATE__queryToTarget($,__PRIVATE_queryNormalizedOrderBy($))),$.Ee}function __PRIVATE__queryToTarget($,et){if("F"===$.limitType)return __PRIVATE_newTarget($.path,$.collectionGroup,et,$.filters,$.limit,$.startAt,$.endAt);{et=et.map($=>{let et="desc"===$.dir?"asc":"desc";return new OrderBy($.field,et)});let en=$.endAt?new Bound($.endAt.position,$.endAt.inclusive):null,er=$.startAt?new Bound($.startAt.position,$.startAt.inclusive):null;return __PRIVATE_newTarget($.path,$.collectionGroup,et,$.filters,$.limit,en,er)}}function __PRIVATE_queryWithAddedFilter($,et){let en=$.filters.concat([et]);return new __PRIVATE_QueryImpl($.path,$.collectionGroup,$.explicitOrderBy.slice(),en,$.limit,$.limitType,$.startAt,$.endAt)}function __PRIVATE_queryWithLimit($,et,en){return new __PRIVATE_QueryImpl($.path,$.collectionGroup,$.explicitOrderBy.slice(),$.filters.slice(),et,en,$.startAt,$.endAt)}function __PRIVATE_queryEquals($,et){return __PRIVATE_targetEquals(__PRIVATE_queryToTarget($),__PRIVATE_queryToTarget(et))&&$.limitType===et.limitType}function __PRIVATE_canonifyQuery($){return`${__PRIVATE_canonifyTarget(__PRIVATE_queryToTarget($))}|lt:${$.limitType}`}function __PRIVATE_stringifyQuery($){var et;let en;return`Query(target=${en=(et=__PRIVATE_queryToTarget($)).path.canonicalString(),null!==et.collectionGroup&&(en+=" collectionGroup="+et.collectionGroup),et.filters.length>0&&(en+=`, filters: [${et.filters.map($=>(function __PRIVATE_stringifyFilter($){return $ instanceof FieldFilter?`${$.field.canonicalString()} ${$.op} ${__PRIVATE_canonifyValue($.value)}`:$ instanceof CompositeFilter?$.op.toString()+" {"+$.getFilters().map(__PRIVATE_stringifyFilter).join(" ,")+"}":"Filter"})($)).join(", ")}]`),__PRIVATE_isNullOrUndefined(et.limit)||(en+=", limit: "+et.limit),et.orderBy.length>0&&(en+=`, orderBy: [${et.orderBy.map($=>`${$.field.canonicalString()} (${$.dir})`).join(", ")}]`),et.startAt&&(en+=", startAt: "+(et.startAt.inclusive?"b:":"a:")+et.startAt.position.map($=>__PRIVATE_canonifyValue($)).join(",")),et.endAt&&(en+=", endAt: "+(et.endAt.inclusive?"a:":"b:")+et.endAt.position.map($=>__PRIVATE_canonifyValue($)).join(",")),`Target(${en})`}; limitType=${$.limitType})`}function __PRIVATE_queryMatches($,et){return et.isFoundDocument()&&function($,et){let en=et.key.path;return null!==$.collectionGroup?et.key.hasCollectionId($.collectionGroup)&&$.path.isPrefixOf(en):DocumentKey.isDocumentKey($.path)?$.path.isEqual(en):$.path.isImmediateParentOf(en)}($,et)&&function($,et){for(let en of __PRIVATE_queryNormalizedOrderBy($))if(!en.field.isKeyField()&&null===et.data.field(en.field))return!1;return!0}
496($,et)&&function($,et){for(let en of $.filters)if(!en.matches(et))return!1;return!0}($,et)&&(!$.startAt||!!function($,et,en){let er=__PRIVATE_boundCompareToDocument($,et,en);return $.inclusive?er<=0:er<0}($.startAt,__PRIVATE_queryNormalizedOrderBy($),et))&&(!$.endAt||!!function($,et,en){let er=__PRIVATE_boundCompareToDocument($,et,en);return $.inclusive?er>=0:er>0}($.endAt,__PRIVATE_queryNormalizedOrderBy($),et))}function __PRIVATE_newQueryComparator($){return(et,en)=>{let er=!1;for(let ei of __PRIVATE_queryNormalizedOrderBy($)){let $=function($,et,en){let er=$.field.isKeyField()?DocumentKey.comparator(et.key,en.key):function($,et,en){let er=et.data.field($),ei=en.data.field($);return null!==er&&null!==ei?__PRIVATE_valueCompare(er,ei):fail(42886)}($.field,et,en);switch($.dir){case"asc":return er;case"desc":return -1*er;default:return fail(19790,{direction:$.dir})}}(ei,et,en);if(0!==$)return $;er=er||ei.field.isKeyField()}return 0}}/** 497 * @license 498 * Copyright 2017 Google LLC 499 * 500 * Licensed under the Apache License, Version 2.0 (the "License"); 501 * you may not use this file except in compliance with the License. 502 * You may obtain a copy of the License at 503 * 504 * http://www.apache.org/licenses/LICENSE-2.0 505 * 506 * Unless required by applicable law or agreed to in writing, software 507 * distributed under the License is distributed on an "AS IS" BASIS, 508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 509 * See the License for the specific language governing permissions and 510 * limitations under the License. 511 */let ObjectMap=class ObjectMap{constructor($,et){this.mapKeyFn=$,this.equalsFn=et,this.inner={},this.innerSize=0}get($){let et=this.mapKeyFn($),en=this.inner[et];if(void 0!==en){for(let[et,er]of en)if(this.equalsFn(et,$))return er}}has($){return void 0!==this.get($)}set($,et){let en=this.mapKeyFn($),er=this.inner[en];if(void 0===er)return this.inner[en]=[[$,et]],void this.innerSize++;for(let en=0;en<er.length;en++)if(this.equalsFn(er[en][0],$))return void(er[en]=[$,et]);er.push([$,et]),this.innerSize++}delete($){let et=this.mapKeyFn($),en=this.inner[et];if(void 0===en)return!1;for(let er=0;er<en.length;er++)if(this.equalsFn(en[er][0],$))return 1===en.length?delete this.inner[et]:en.splice(er,1),this.innerSize--,!0;return!1}forEach($){forEach(this.inner,(et,en)=>{for(let[et,er]of en)$(et,er)})}isEmpty(){return isEmpty(this.inner)}size(){return this.innerSize}};/** 512 * @license 513 * Copyright 2017 Google LLC 514 * 515 * Licensed under the Apache License, Version 2.0 (the "License"); 516 * you may not use this file except in compliance with the License. 517 * You may obtain a copy of the License at 518 * 519 * http://www.apache.org/licenses/LICENSE-2.0 520 * 521 * Unless required by applicable law or agreed to in writing, software 522 * distributed under the License is distributed on an "AS IS" BASIS, 523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 524 * See the License for the specific language governing permissions and 525 * limitations under the License. 526 */let eG=new SortedMap(DocumentKey.comparator),e$=new SortedMap(DocumentKey.comparator);function documentMap(...$){let et=e$;for(let en of $)et=et.insert(en.key,en);return et}function __PRIVATE_convertOverlayedDocumentMapToDocumentMap($){let et=e$;return $.forEach(($,en)=>et=et.insert($,en.overlayedDocument)),et}function __PRIVATE_newDocumentKeyMap(){return new ObjectMap($=>$.toString(),($,et)=>$.isEqual(et))}let eJ=new SortedMap(DocumentKey.comparator),eK=new SortedSet(DocumentKey.comparator);function __PRIVATE_documentKeySet(...$){let et=eK;for(let en of $)et=et.add(en);return et}let eQ=new SortedSet(__PRIVATE_primitiveComparator);/** 527 * @license 528 * Copyright 2020 Google LLC 529 * 530 * Licensed under the Apache License, Version 2.0 (the "License"); 531 * you may not use this file except in compliance with the License. 532 * You may obtain a copy of the License at 533 * 534 * http://www.apache.org/licenses/LICENSE-2.0 535 * 536 * Unless required by applicable law or agreed to in writing, software 537 * distributed under the License is distributed on an "AS IS" BASIS, 538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 539 * See the License for the specific language governing permissions and 540 * limitations under the License. 541 */function __PRIVATE_toDouble($,et){if($.useProto3Json){if(isNaN(et))return{doubleValue:"NaN"};if(et===1/0)return{doubleValue:"Infinity"};if(et===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:__PRIVATE_isNegativeZero(et)?"-0":et}}function __PRIVATE_toInteger($){return{integerValue:""+$}}function toNumber($,et){return"number"==typeof et&&Number.isInteger(et)&&!__PRIVATE_isNegativeZero(et)&&et<=Number.MAX_SAFE_INTEGER&&et>=Number.MIN_SAFE_INTEGER?__PRIVATE_toInteger(et):__PRIVATE_toDouble($,et)}/** 542 * @license 543 * Copyright 2018 Google LLC 544 * 545 * Licensed under the Apache License, Version 2.0 (the "License");
546 * you may not use this file except in compliance with the License. 547 * You may obtain a copy of the License at 548 * 549 * http://www.apache.org/licenses/LICENSE-2.0 550 * 551 * Unless required by applicable law or agreed to in writing, software 552 * distributed under the License is distributed on an "AS IS" BASIS, 553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 554 * See the License for the specific language governing permissions and 555 * limitations under the License. 556 */let TransformOperation=class TransformOperation{constructor(){this._=void 0}};function __PRIVATE_computeTransformOperationBaseValue($,et){return $ instanceof __PRIVATE_NumericIncrementTransformOperation?isInteger(et)||et&&"doubleValue"in et?et:{integerValue:0}:null}let __PRIVATE_ServerTimestampTransform=class __PRIVATE_ServerTimestampTransform extends TransformOperation{};let __PRIVATE_ArrayUnionTransformOperation=class __PRIVATE_ArrayUnionTransformOperation extends TransformOperation{constructor($){super(),this.elements=$}};function __PRIVATE_applyArrayUnionTransformOperation($,et){let en=__PRIVATE_coercedFieldValuesArray(et);for(let et of $.elements)en.some($=>__PRIVATE_valueEquals($,et))||en.push(et);return{arrayValue:{values:en}}}let __PRIVATE_ArrayRemoveTransformOperation=class __PRIVATE_ArrayRemoveTransformOperation extends TransformOperation{constructor($){super(),this.elements=$}};function __PRIVATE_applyArrayRemoveTransformOperation($,et){let en=__PRIVATE_coercedFieldValuesArray(et);for(let et of $.elements)en=en.filter($=>!__PRIVATE_valueEquals($,et));return{arrayValue:{values:en}}}let __PRIVATE_NumericIncrementTransformOperation=class __PRIVATE_NumericIncrementTransformOperation extends TransformOperation{constructor($,et){super(),this.serializer=$,this.Ae=et}};function asNumber($){return __PRIVATE_normalizeNumber($.integerValue||$.doubleValue)}function __PRIVATE_coercedFieldValuesArray($){return isArray($)&&$.arrayValue.values?$.arrayValue.values.slice():[]}/** 557 * @license 558 * Copyright 2017 Google LLC 559 * 560 * Licensed under the Apache License, Version 2.0 (the "License"); 561 * you may not use this file except in compliance with the License. 562 * You may obtain a copy of the License at 563 * 564 * http://www.apache.org/licenses/LICENSE-2.0 565 * 566 * Unless required by applicable law or agreed to in writing, software 567 * distributed under the License is distributed on an "AS IS" BASIS, 568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 569 * See the License for the specific language governing permissions and 570 * limitations under the License. 571 */let FieldTransform=class FieldTransform{constructor($,et){this.field=$,this.transform=et}};let MutationResult=class MutationResult{constructor($,et){this.version=$,this.transformResults=et}};let Precondition=class Precondition{constructor($,et){this.updateTime=$,this.exists=et}static none(){return new Precondition}static exists($){return new Precondition(void 0,$)}static updateTime($){return new Precondition($)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual($){return this.exists===$.exists&&(this.updateTime?!!$.updateTime&&this.updateTime.isEqual($.updateTime):!$.updateTime)}};function __PRIVATE_preconditionIsValidForDocument($,et){return void 0!==$.updateTime?et.isFoundDocument()&&et.version.isEqual($.updateTime):void 0===$.exists||$.exists===et.isFoundDocument()}let Mutation=class Mutation{};function __PRIVATE_calculateOverlayMutation($,et){if(!$.hasLocalMutations||et&&0===et.fields.length)return null;if(null===et)return $.isNoDocument()?new __PRIVATE_DeleteMutation($.key,Precondition.none()):new __PRIVATE_SetMutation($.key,$.data,Precondition.none());{let en=$.data,er=ObjectValue.empty(),ei=new SortedSet(FieldPath$1.comparator);for(let $ of et.fields)if(!ei.has($)){let et=en.field($);null===et&&$.length>1&&($=$.popLast(),et=en.field($)),null===et?er.delete($):er.set($,et),ei=ei.add($)}return new __PRIVATE_PatchMutation($.key,er,new FieldMask(ei.toArray()),Precondition.none())}}function __PRIVATE_mutationApplyToLocalView($,et,en,er){return $ instanceof __PRIVATE_SetMutation?function($,et,en,er){if(!__PRIVATE_preconditionIsValidForDocument($.precondition,et))return en;let ei=$.value.clone(),eo=__PRIVATE_localTransformResults($.fieldTransforms,er,et);return ei.setAll(eo),et.convertToFoundDocument(et.version,ei).setHasLocalMutations(),null}($,et,en,er):$ instanceof __PRIVATE_PatchMutation?function($,et,en,er){if(!__PRIVATE_preconditionIsValidForDocument($.precondition,et))return en;let ei=__PRIVATE_localTransformResults($.fieldTransforms,er,et),eo=et.data;return(eo.setAll(__PRIVATE_getPatch($)),eo.setAll(ei),et.convertToFoundDocument(et.version,eo).setHasLocalMutations(),null===en)?null:en.unionWith($.fieldMask.fields).unionWith($.fieldTransforms.map($=>$.field))}($,et,en,er):__PRIVATE_preconditionIsValidForDocument($.precondition,et)?(et.convertToNoDocument(et.version).setHasLocalMutations(),null):en}function __PRIVATE_mutationEquals($,et){var en,er;
571return $.type===et.type&&!!$.key.isEqual(et.key)&&!!$.precondition.isEqual(et.precondition)&&(en=$.fieldTransforms,er=et.fieldTransforms,!!(void 0===en&&void 0===er||!(!en||!er)&&__PRIVATE_arrayEquals(en,er,($,et)=>{var en,er;return $.field.isEqual(et.field)&&(en=$.transform,er=et.transform,en instanceof __PRIVATE_ArrayUnionTransformOperation&&er instanceof __PRIVATE_ArrayUnionTransformOperation||en instanceof __PRIVATE_ArrayRemoveTransformOperation&&er instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_arrayEquals(en.elements,er.elements,__PRIVATE_valueEquals):en instanceof __PRIVATE_NumericIncrementTransformOperation&&er instanceof __PRIVATE_NumericIncrementTransformOperation?__PRIVATE_valueEquals(en.Ae,er.Ae):en instanceof __PRIVATE_ServerTimestampTransform&&er instanceof __PRIVATE_ServerTimestampTransform)})))&&(0===$.type?$.value.isEqual(et.value):1!==$.type||$.data.isEqual(et.data)&&$.fieldMask.isEqual(et.fieldMask))}let __PRIVATE_SetMutation=class __PRIVATE_SetMutation extends Mutation{constructor($,et,en,er=[]){super(),this.key=$,this.value=et,this.precondition=en,this.fieldTransforms=er,this.type=0}getFieldMask(){return null}};let __PRIVATE_PatchMutation=class __PRIVATE_PatchMutation extends Mutation{constructor($,et,en,er,ei=[]){super(),this.key=$,this.data=et,this.fieldMask=en,this.prec
571ondition=er,this.fieldTransforms=ei,this.type=1}getFieldMask(){return this.fieldMask}};function __PRIVATE_getPatch($){let et=new Map;return $.fieldMask.fields.forEach(en=>{if(!en.isEmpty()){let er=$.data.field(en);et.set(en,er)}}),et}function __PRIVATE_serverTransformResults($,et,en){let er=new Map;__PRIVATE_hardAssert($.length===en.length,32656,{Re:en.length,Ve:$.length});for(let eo=0;eo<en.length;eo++){var ei;let es=$[eo],el=es.transform,eu=et.data.field(es.field);er.set(es.field,(ei=en[eo],el instanceof __PRIVATE_ArrayUnionTransformOperation?__PRIVATE_applyArrayUnionTransformOperation(el,eu):el instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_applyArrayRemoveTransformOperation(el,eu):ei))}return er}function __PRIVATE_localTransformResults($,et,en){let er=new Map;for(let ei of $){let $=ei.transform,eo=en.data.field(ei.field);er.set(ei.field,$ instanceof __PRIVATE_ServerTimestampTransform?function($,et){let en={fields:{[eF]:{stringValue:eM},[eH]:{timestampValue:{seconds:$.seconds,nanos:$.nanoseconds}}}};return et&&__PRIVATE_isServerTimestamp(et)&&(et=__PRIVATE_getPreviousValue(et)),et&&(en.fields[eL]=et),{mapValue:en}}(et,eo):$ instanceof __PRIVATE_ArrayUnionTransformOperation?__PRIVATE_applyArrayUnionTransformOperation($,eo):$ instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_applyArrayRemoveTransformOperation($,eo):function($,et){let en=__PRIVATE_computeTransformOperationBaseValue($,et),er=asNumber(en)+asNumber($.Ae);return isInteger(en)&&isInteger($.Ae)?__PRIVATE_toInteger(er):__PRIVATE_toDouble($.serializer,er)}($,eo))}return er}let __PRIVATE_DeleteMutation=class __PRIVATE_DeleteMutation extends Mutation{constructor($,et){super(),this.key=$,this.precondition=et,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}};let __PRIVATE_VerifyMutation=class __PRIVATE_VerifyMutation extends Mutation{constructor($,et){super(),this.key=$,this.precondition=et,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}};/** 572 * @license 573 * Copyright 2017 Google LLC 574 * 575 * Licensed under the Apache License, Version 2.0 (the "License"); 576 * you may not use this file except in compliance with the License. 577 * You may obtain a copy of the License at 578 * 579 * http://www.apache.org/licenses/LICENSE-2.0 580 * 581 * Unless required by applicable law or agreed to in writing, software 582 * distributed under the License is distributed on an "AS IS" BASIS, 583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 584 * See the License for the specific language governing permissions and 585 * limitations under the License. 586 */let MutationBatch=class MutationBatch{constructor($,et,en,er){this.batchId=$,this.localWriteTime=et,this.baseMutations=en,this.mutations=er}applyToRemoteDocument($,et){let en=et.mutationResults;for(let et=0;et<this.mutations.length;et++){let ei=this.mutations[et];if(ei.key.isEqual($.key)){var er;er=en[et],ei instanceof __PRIVATE_SetMutation?function($,et,en){let er=$.value.clone(),ei=__PRIVATE_serverTransformResults($.fieldTransforms,et,en.transformResults);er.setAll(ei),et.convertToFoundDocument(en.version,er).setHasCommittedMutations()}(ei,$,er):ei instanceof __PRIVATE_PatchMutation?function($,et,en){if(!__PRIVATE_preconditionIsValidForDocument($.precondition,et))return void et.convertToUnknownDocument(en.version);let er=__PRIVATE_serverTransformResults($.fieldTransforms,et,en.transformResults),ei=et.data;ei.setAll(__PRIVATE_getPatch($)),ei.setAll(er),et.convertToFoundDocument(en.version,ei).setHasCommittedMutations()}(ei,$,er):function($,et,en){et.convertToNoDocument(en.version).setHasCommittedMutations()}(0,$,er)}}}applyToLocalView($,et){for(let en of this.baseMutations)en.key.isEqual($.key)&&(et=__PRIVATE_mutationApplyToLocalView(en,$,et,this.localWriteTime));for(let en of this.mutations)en.key.isEqual($.key)&&(et=__PRIVATE_mutationApplyToLocalView(en,$,et,this.localWriteTime));return et}applyToLocalDocumentSet($,et){let en=__PRIVATE_newDocumentKeyMap();return this.mutations.forEach(er=>{let ei=$.get(er.key),eo=ei.overlayedDocument,es=this.applyToLocalView(eo,ei.mutatedFields);es=et.has(er.key)?null:es;let el=__PRIVATE_calculateOverlayMutation(eo,es);null!==el&&en.set(er.key,el),eo.isValidDocument()||eo.convertToNoDocument(Snapsh
vendor: 4,359 bytes, lines 586-634
586otVersion.min())}),en}keys(){return this.mutations.reduce(($,et)=>$.add(et.key),__PRIVATE_documentKeySet())}isEqual($){return this.batchId===$.batchId&&__PRIVATE_arrayEquals(this.mutations,$.mutations,($,et)=>__PRIVATE_mutationEquals($,et))&&__PRIVATE_arrayEquals(this.baseMutations,$.baseMutations,($,et)=>__PRIVATE_mutationEquals($,et))}};let MutationBatchResult=class MutationBatchResult{constructor($,et,en,er){this.batch=$,this.commitVersion=et,this.mutationResults=en,this.docVersions=er}static from($,et,en){__PRIVATE_hardAssert($.mutations.length===en.length,58842,{me:$.mutations.length,fe:en.length});let er=eJ,ei=$.mutations;for(let $=0;$<ei.length;$++)er=er.insert(ei[$].key,en[$].version);return new MutationBatchResult($,et,en,er)}};/** 587 * @license 588 * Copyright 2022 Google LLC 589 * 590 * Licensed under the Apache License, Version 2.0 (the "License"); 591 * you may not use this file except in compliance with the License. 592 * You may obtain a copy of the License at 593 * 594 * http://www.apache.org/licenses/LICENSE-2.0 595 * 596 * Unless required by applicable law or agreed to in writing, software 597 * distributed under the License is distributed on an "AS IS" BASIS, 598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 599 * See the License for the specific language governing permissions and 600 * limitations under the License. 601 */let Overlay=class Overlay{constructor($,et){this.largestBatchId=$,this.mutation=et}getKey(){return this.mutation.key}isEqual($){return null!==$&&this.mutation===$.mutation}toString(){return`Overlay{ 602 largestBatchId: ${this.largestBatchId}, 603 mutation: ${this.mutation.toString()} 604 }`}};/** 605 * @license 606 * Copyright 2023 Google LLC 607 * 608 * Licensed under the Apache License, Version 2.0 (the "License"); 609 * you may not use this file except in compliance with the License. 610 * You may obtain a copy of the License at 611 * 612 * http://www.apache.org/licenses/LICENSE-2.0 613 * 614 * Unless required by applicable law or agreed to in writing, software 615 * distributed under the License is distributed on an "AS IS" BASIS, 616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 617 * See the License for the specific language governing permissions and 618 * limitations under the License. 619 */let __PRIVATE_AggregateImpl=class __PRIVATE_AggregateImpl{constructor($,et,en){this.alias=$,this.aggregateType=et,this.fieldPath=en}};/** 620 * @license 621 * Copyright 2017 Google LLC 622 * 623 * Licensed under the Apache License, Version 2.0 (the "License"); 624 * you may not use this file except in compliance with the License. 625 * You may obtain a copy of the License at 626 * 627 * http://www.apache.org/licenses/LICENSE-2.0 628 * 629 * Unless required by applicable law or agreed to in writing, software 630 * distributed under the License is distributed on an "AS IS" BASIS, 631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 632 * See the License for the specific language governing permissions and 633 * limitations under the License. 634 */let ExistenceFilter=class ExistenceFilter{constructor($,et){this.count=$,this.unchangedNames=et}};function __PRIVATE_isPermanentError($){switch($){case eR.OK:return fail(64938);case eR.CANCELLED:case eR.UNKNOWN:case eR.DEADLINE_EXCEEDED:case eR.RESOURCE_EXHAUSTED:case eR.INTERNAL:case eR.UNAVAILABLE:case eR.UNAUTHENTICATED:return!1;case eR.INVALID_ARGUMENT:case eR.NOT_FOUND:case eR.ALREADY_EXISTS:case eR.PERMISSION_DENIED:case eR.FAILED_PRECONDITION:case eR.ABORTED:case eR.OUT_OF_RANGE:case eR.UNIMPLEMENTED:case eR.DATA_LOSS:return!0;default:return fail(15467,{code:$})}}function __PRIVATE_mapCodeFromRpcCode($){if(void 0===$)return __PRIVATE_logError("GRPC error has no .code"),eR.UNKNOWN;switch($){case ef.OK:return eR.OK;case ef.CANCELLED:return eR.CANCELLED;case ef.UNKNOWN:return eR.UNKNOWN;case ef.DEADLINE_EXCEEDED:return eR.DEADLINE_EXCEEDED;case ef.RESOURCE_EXHAUSTED:return eR.RESOURCE_EXHAUSTED;case ef.INTERNAL:return eR.INTERNAL;case ef.UNAVAILABLE:return eR.UNAVAILABLE;case ef.UNAUTHENTICATED:return eR.UNAUTHENTICATED;case ef.INVALID_ARGUMENT:return eR.INVALID_ARGUMENT;case ef.NOT_FOUND:return eR.NOT_FOUND;case ef.ALREADY_EXISTS:return eR.ALREADY_EXISTS;case ef.PERMISSION_DENIED:return eR.PERMISSION_DENIED;case ef.FAILED_PRECONDITION:return eR.FAILED_PRECONDITION;case ef.ABORTED:return eR.ABORTED;case ef.OUT_OF_RANGE:return eR.OUT_OF_RANGE;
634case ef.UNIMPLEMENTED:return eR.UNIMPLEMENTED;case ef.DATA_LOSS:return eR.DATA_LOSS;default:return fail(39323,{code:$})}}(eg=ef||(ef={}))[eg.OK=0]="OK",eg[eg.CANCELLED=1]="CANCELLED",eg[eg.UNKNOWN=2]="UNKNOWN",eg[eg.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",eg[eg.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",eg[eg.NOT_FOUND=5]="NOT_FOUND",eg[eg.ALREADY_EXISTS=6]="ALREADY_EXISTS",eg[eg.PERMISSION_DENIED=7]="PERMISSION_DENIED",eg[eg.UNAUTHENTICATED=16]="UNAUTHENTICATED",eg[eg.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",eg[eg.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",eg[eg.ABORTED=10]="ABORTED",eg[eg.OUT_OF_RANGE=11]="OUT_OF_RANGE",eg[eg.UNIMPLEMENTED=12]="UNIMPLEMENTED",eg[eg.INTERNAL=13]="INTERNAL",eg[eg.UNAVAILABLE=14]="UNAVAILABLE",eg[eg.DATA_LOSS=15]="DATA_LOSS";/** 635 * @license 636 * Copyright 2022 Google LLC 637 * 638 * Licensed under the Apache License, Version 2.0 (the "License"); 639 * you may not use this file except in compliance with the License. 640 * You may obtain a copy of the License at 641 * 642 * http://www.apache.org/licenses/LICENSE-2.0 643 * 644 * Unless required by applicable law or agreed to in writing, software 645 * distributed under the License is distributed on an "AS IS" BASIS, 646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 647 * See the License for the specific language governing permissions and 648 * limitations under the License. 649 */let eX=new er([4294967295,4294967295],0);function __PRIVATE_getMd5HashValue($){let et=(new TextEncoder).encode($),en=new ei;return en.update(et),new Uint8Array(en.digest())}function __PRIVATE_get64BitUints($){let et=new DataView($.buffer),en=et.getUint32(0,!0),ei=et.getUint32(4,!0),eo=et.getUint32(8,!0),es=et.getUint32(12,!0);return[new er([en,ei],0),new er([eo,es],0)]}let BloomFilter=class BloomFilter{constructor($,et,en){if(this.bitmap=$,this.padding=et,this.hashCount=en,et<0||et>=8)throw new __PRIVATE_BloomFilterError(`Invalid padding: ${et}`);if(en<0||$.length>0&&0===this.hashCount)throw new __PRIVATE_BloomFilterError(`Invalid hash count: ${en}`);if(0===$.length&&0!==et)throw new __PRIVATE_BloomFilterError(`Invalid padding when bitmap length is 0: ${et}`);this.ge=8*$.length-et,this.pe=er.fromNumber(this.ge)}ye($,et,en){let ei=$.add(et.multiply(er.fromNumber(en)));return 1===ei.compare(eX)&&(ei=new er([ei.getBits(0),ei.getBits(1)],0)),ei.modulo(this.pe).toNumber()}we($){return!!(this.bitmap[Math.floor($/8)]&1<<$%8)}mightContain($){if(0===this.ge)return!1;let et=__PRIVATE_getMd5HashValue($),[en,er]=__PRIVATE_get64BitUints(et);for(let $=0;$<this.hashCount;$++){let et=this.ye(en,er,$);if(!this.we(et))return!1}return!0}static create($,et,en){let er=new Uint8Array(Math.ceil($/8)),ei=new BloomFilter(er,$%8==0?0:8-$%8,et);return en.forEach($=>ei.insert($)),ei}insert($){if(0===this.ge)return;let et=__PRIVATE_getMd5HashValue($),[en,er]=__PRIVATE_get64BitUints(et);for(let $=0;$<this.hashCount;$++){let et=this.ye(en,er,$);this.Se(et)}}Se($){let et=Math.floor($/8);this.bitmap[et]|=1<<$%8}};let __PRIVATE_BloomFilterError=class __PRIVATE_BloomFilterError extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}};/** 650 * @license 651 * Copyright 2017 Google LLC 652 * 653 * Licensed under the Apache License, Version 2.0 (the "License"); 654 * you may not use this file except in compliance with the License. 655 * You may obtain a copy of the License at 656 * 657 * http://www.apache.org/licenses/LICENSE-2.0 658 * 659 * Unless required by applicable law or agreed to in writing, software 660 * distributed under the License is distributed on an "AS IS" BASIS, 661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 662 * See the License for the specific language governing permissions and 663 * limitations under the License. 664 */let RemoteEvent=class RemoteEvent{constructor($,et,en,er,ei){this.snapshotVersion=$,this.targetChanges=et,this.targetMismatches=en,this.documentUpdates=er,this.resolvedLimboDocuments=ei}static createSynthesizedRemoteEventForCurrentChange($,et,en){let er=new Map;return er.set($,TargetChange.createSynthesizedTargetChangeForCurrentChange($,et,en)),new RemoteEvent(Snapsh
664otVersion.min(),er,new SortedMap(__PRIVATE_primitiveComparator),eG,__PRIVATE_documentKeySet())}};let TargetChange=class TargetChange{constructor($,et,en,er,ei){this.resumeToken=$,this.current=et,this.addedDocuments=en,this.modifiedDocuments=er,this.removedDocuments=ei}static createSynthesizedTargetChangeForCurrentChange($,et,en){return new TargetChange(en,et,__PRIVATE_documentKeySet(),__PRIVATE_documentKeySet(),__PRIVATE_documentKeySet())}};/** 665 * @license 666 * Copyright 2017 Google LLC 667 * 668 * Licensed under the Apache License, Version 2.0 (the "License"); 669 * you may not use this file except in compliance with the License. 670 * You may obtain a copy of the License at 671 * 672 * http://www.apache.org/licenses/LICENSE-2.0 673 * 674 * Unless required by applicable law or agreed to in writing, software 675 * distributed under the License is distributed on an "AS IS" BASIS, 676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 677 * See the License for the specific language governing permissions and 678 * limitations under the License. 679 */let __PRIVATE_DocumentWatchChange=class __PRIVATE_DocumentWatchChange{constructor($,et,en,er){this.be=$,this.removedTargetIds=et,this.key=en,this.De=er}};let __PRIVATE_ExistenceFilterChange=class __PRIVATE_ExistenceFilterChange{constructor($,et){this.targetId=$,this.Ce=et}};let __PRIVATE_WatchTargetChange=class __PRIVATE_WatchTargetChange{constructor($,et,en=ByteString.EMPTY_BYTE_STRING,er=null){this.state=$,this.targetIds=et,this.resumeToken=en,this.cause=er}};let __PRIVATE_TargetState=class __PRIVATE_TargetState{constructor(){this.ve=0,this.Fe=__PRIVATE_snapshotChangesMap(),this.Me=ByteString.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return 0!==this.ve}get Be(){return this.Oe}Le($){$.approximateByteSize()>0&&(this.Oe=!0,this.Me=$)}ke(){let $=__PRIVATE_documentKeySet(),et=__PRIVATE_documentKeySet(),en=__PRIVATE_documentKeySet();return this.Fe.forEach((er,ei)=>{switch(ei){case 0:$=$.add(er);break;case 2:et=et.add(er);break;case 1:en=en.add(er);break;default:fail(38017,{changeType:ei})}}),new TargetChange(this.Me,this.xe,$,et,en)}qe(){this.Oe=!1,this.Fe=__PRIVATE_snapshotChangesMap()}Qe($,et){this.Oe=!0,this.Fe=this.Fe.insert($,et)}$e($){this.Oe=!0,this.Fe=this.Fe.remove($)}Ue(){this.ve+=1}Ke(){this.ve-=1,__PRIVATE_hardAssert(this.ve>=0,3241,{ve:this.ve})}We(){this.Oe=!0,this.xe=!0}};let __PRIVATE_WatchChangeAggregator=class __PRIVATE_WatchChangeAggregator{constructor($){this.Ge=$,this.ze=new Map,this.je=eG,this.Je=__PRIVATE_documentTargetMap(),this.He=__PRIVATE_documentTargetMap(),this.Ye=new SortedMap(__PRIVATE_primitiveComparator)}Ze($){for(let et of $.be)$.De&&$.De.isFoundDocument()?this.Xe(et,$.De):this.et(et,$.key,$.De);for(let et of $.removedTargetIds)this.et(et,$.key,$.De)}tt($){this.forEachTarget($,et=>{let en=this.nt(et);switch($.state){case 0:this.rt(et)&&en.Le($.resumeToken);break;case 1:en.Ke(),en.Ne||en.qe(),en.Le($.resumeToken);break;case 2:en.Ke(),en.Ne||this.removeTarget(et);break;case 3:this.rt(et)&&(en.We(),en.Le($.resumeToken));break;case 4:this.rt(et)&&(this.it(et),en.Le($.resumeToken));break;default:fail(56790,{state:$.state})}})}forEachTarget($,et){$.targetIds.length>0?$.targetIds.forEach(et):this.ze.forEach(($,en)=>{this.rt(en)&&et(en)})}st($){let et=$.targetId,en=$.Ce.count,er=this.ot(et);if(er){let ei=er.target;if(__PRIVATE_targetIsDocumentTarget(ei)){if(0===en){let $=new DocumentKey(ei.path);this.et(et,$,MutableDocument.newNoDocument($,SnapshotVersion.min()))}else __PRIVATE_hardAssert(1===en,20013,{expectedCount:en})}else{let er=this._t(et);if(er!==en){let en=this.ut($),ei=en?this.ct(en,$,er):1;0!==ei&&(this.it(et),this.Ye=this.Ye.insert(et,2===ei?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}ut($){let et,en;let er=$.Ce.unchangedNames;if(!er||!er.bits)return null;let{bits:{bitmap:ei="",padding:eo=0},hashCount:es=0}=er;try{et=__PRIVATE_normalizeByteString(ei).toUint8Array()}catch($){if($ instanceof __PRIVATE_Base64DecodeError)return __PRIVATE_logWarn("Decoding the base64 bloom filter in existence filter failed ("+$.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw $}try{en=new BloomFilter(et,eo,es)}catch($){return __PRIVATE_logWarn($ instanceof __PRIVATE_BloomFilterError?"BloomFilter error: ":"Applying bloom filter failed: ",$),null}return 0===en.ge?null:en}ct($,et,en){return et.Ce.count===en-this.Pt($,et.targetId)?0:2}Pt($,et){let en=this.Ge.getRemoteKeysForTarget(et),er=0;
vendor: 7,233 bytes, line 679
679return en.forEach(en=>{let ei=this.Ge.ht(),eo=`projects/${ei.projectId}/databases/${ei.database}/documents/${en.path.canonicalString()}`;$.mightContain(eo)||(this.et(et,en,null),er++)}),er}Tt($){let et=new Map;this.ze.forEach((en,er)=>{let ei=this.ot(er);if(ei){if(en.current&&__PRIVATE_targetIsDocumentTarget(ei.target)){let et=new DocumentKey(ei.target.path);this.It(et).has(er)||this.Et(er,et)||this.et(er,et,MutableDocument.newNoDocument(et,$))}en.Be&&(et.set(er,en.ke()),en.qe())}});let en=__PRIVATE_documentKeySet();this.He.forEach(($,et)=>{let er=!0;et.forEachWhile($=>{let et=this.ot($);return!et||"TargetPurposeLimboResolution"===et.purpose||(er=!1,!1)}),er&&(en=en.add($))}),this.je.forEach((et,en)=>en.setReadTime($));let er=new RemoteEvent($,et,this.Ye,this.je,en);return this.je=eG,this.Je=__PRIVATE_documentTargetMap(),this.He=__PRIVATE_documentTargetMap(),this.Ye=new SortedMap(__PRIVATE_primitiveComparator),er}Xe($,et){if(!this.rt($))return;let en=this.Et($,et.key)?2:0;this.nt($).Qe(et.key,en),this.je=this.je.insert(et.key,et),this.Je=this.Je.insert(et.key,this.It(et.key).add($)),this.He=this.He.insert(et.key,this.dt(et.key).add($))}et($,et,en){if(!this.rt($))return;let er=this.nt($);this.Et($,et)?er.Qe(et,1):er.$e(et),this.He=this.He.insert(et,this.dt(et).delete($)),this.He=this.He.insert(et,this.dt(et).add($)),en&&(this.je=this.je.insert(et,en))}removeTarget($){this.ze.delete($)}_t($){let et=this.nt($).ke();return this.Ge.getRemoteKeysForTarget($).size+et.addedDocuments.size-et.removedDocuments.size}Ue($){this.nt($).Ue()}nt($){let et=this.ze.get($);return et||(et=new __PRIVATE_TargetState,this.ze.set($,et)),et}dt($){let et=this.He.get($);return et||(et=new SortedSet(__PRIVATE_primitiveComparator),this.He=this.He.insert($,et)),et}It($){let et=this.Je.get($);return et||(et=new SortedSet(__PRIVATE_primitiveComparator),this.Je=this.Je.insert($,et)),et}rt($){let et=null!==this.ot($);return et||__PRIVATE_logDebug("WatchChangeAggregator","Detected inactive target",$),et}ot($){let et=this.ze.get($);return et&&et.Ne?null:this.Ge.At($)}it($){this.ze.set($,new __PRIVATE_TargetState),this.Ge.getRemoteKeysForTarget($).forEach(et=>{this.et($,et,null)})}Et($,et){return this.Ge.getRemoteKeysForTarget($).has(et)}};function __PRIVATE_documentTargetMap(){return new SortedMap(DocumentKey.comparator)}function __PRIVATE_snapshotChangesMap(){return new SortedMap(DocumentKey.comparator)}let eY={asc:"ASCENDING",desc:"DESCENDING"},e0={"<":"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"},e1={and:"AND",or:"OR"};let JsonProtoSerializer=class JsonProtoSerializer{constructor($,et){this.databaseId=$,this.useProto3Json=et}};function __PRIVATE_toInt32Proto($,et){return $.useProto3Json||__PRIVATE_isNullOrUndefined(et)?et:{value:et}}function toTimestamp($,et){return $.useProto3Json?`${new Date(1e3*et.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+et.nanoseconds).slice(-9)}Z`:{seconds:""+et.seconds,nanos:et.nanoseconds}}function __PRIVATE_toBytes($,et){return $.useProto3Json?et.toBase64():et.toUint8Array()}function __PRIVATE_fromVersion($){return __PRIVATE_hardAssert(!!$,49232),SnapshotVersion.fromTimestamp(function($){let et=__PRIVATE_normalizeTimestamp($);return new Timestamp(et.seconds,et.nanos)}($))}function __PRIVATE_toResourceName($,et){return __PRIVATE_toResourcePath($,et).canonicalString()}function __PRIVATE_toResourcePath($,et){let en=new ResourcePath(["projects",$.projectId,"databases",$.database]).child("documents");return void 0===et?en:en.child(et)}function __PRIVATE_fromResourceName($){let et=ResourcePath.fromString($);return __PRIVATE_hardAssert(__PRIVATE_isValidResourceName(et),10190,{key:et.toString()}),et}function __PRIVATE_toName($,et){return __PRIVATE_toResourceName($.databaseId,et.path)}function fromName($,et){let en=__PRIVATE_fromResourceName(et);if(en.get(1)!==$.databaseId.projectId)throw new FirestoreError(eR.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+en.get(1)+" vs "+$.databaseId.projectId);if(en.get(3)!==$.databaseId.database)throw new FirestoreError(eR.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+en.get(3)+" vs "+$.databaseId.database);return new DocumentKey(__PRIVATE_extractLocalPathFromResourceName(en))}function __PRIVATE_toQueryPath($,et){return __PRIVATE_toResourceName($.databaseId,et)}function __PRIVATE_getEncodedDatabaseId($){return new ResourcePath(["projects",$.databaseId.projectId,"databases",$.databaseId.database]).canonicalString()}function __PRIVATE_extractLocalPathFromResourceName($){return __PRIVATE_hardAssert($.length>4&&"documents"===$.get(4),29091,{key:$.toString()}),$.popFirst(5)}function __PRIVATE_toMutationDocument($,et,en){return{name:__PRIVATE_toName($,et),fields:en.value.mapValue.fields}}function toMutation($,et){var en;let er;if(et instanceof __PRIVATE_SetMutation)er={update:__PRIVATE_toMutationDocument($,et.key,et.value)};else if(et instanceof __PRIVATE_DeleteMutation)er={delete:__PRIVATE_toName($,et.key)};else if(et instanceof __PRIVATE_PatchMutation)er={update:__PRIVATE_toMutationDocument($,et.key,et.data),updateMask:function($){let et=[];return $.fields.forEach($=>et.push($.canonicalString())),{fieldPaths:et}}(et.fieldMask)};else{if(!(et instanceof __PRIVATE_VerifyMutation))return fail(16599,{Vt:et.type});er={verify:__PRIVATE_toName($,et.key)}}return et.fieldTransforms.length>0&&(er.updateTransforms=et.fieldTransforms.map($=>(function($,et){let en=et.transform;if(en instanceof __PRIVATE_ServerTimestampTransform)return{fieldPath:et.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(en instanceof __PRIVATE_ArrayUnionTransformOperation)return{fieldPath:et.field.canonicalString(),appendMissingElements:{values:en.elements}};if(en instanceof __PRIVATE_ArrayRemoveTransformOperation)return{fieldPath:et.field.canonicalString(),removeAllFromArray:{values:en.elements}};if(en instanceof __PRIVATE_NumericIncrementTransformOperation)return{fieldPath:et.field.canonicalString(),increment:en.Ae};throw fail(20930,{transform:et.transform})})(0,$))),et.precondition.isNone||(er.currentDocument=void 0!==(en=et.precondition).updateTime?{updateTime:toTimestamp($,en.updateTime.toTimestamp())}:void 0!==en.exists?{exists:en.exists}:fail(27497)),er}function __PRIVATE_toQueryTarget($,et){var en,er;let ei;let eo={structuredQuery:{}},es=et.path;null!==et.collectionGroup?(ei=es,eo.structuredQuery.from=[{collectionId:et.collectionGroup,allDescendants:!0}]):(ei=es.popLast(),eo.structuredQuery.from=[{collectionId:es.lastSegment()}]),eo.parent=__PRIVATE_toQueryPath($,ei);let el=function($){if(0!==$.length)return function __PRIVATE_toFilter($){return $ instanceof FieldFilter?function($){if("=="===$.op){if(__PRIVATE_isNanValue($.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference($.field),op:"IS_NAN"}};if(__PRIVATE_isNullValue($.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference($.field),op:"IS_NULL"}}}else if("!="===$.op){if(__PRIVATE_isNanValue($.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference($.field),op:"IS_NOT_NA
679N"}};if(__PRIVATE_isNullValue($.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference($.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:__PRIVATE_toFieldPathReference($.field),op:e0[$.op],value:$.value}}}($):$ instanceof CompositeFilter?function($){let et=$.getFilters().map($=>__PRIVATE_toFilter($));return 1===et.length?et[0]:{compositeFilter:{op:e1[$.op],filters:et}}}($):fail(54877,{filter:$})}(CompositeFilter.create($,"and"))}(et.filters);el&&(eo.structuredQuery.where=el);let eu=function($){if(0!==$.length)return $.map($=>({field:__PRIVATE_toFieldPathReference($.field),direction:eY[$.dir]}))}(et.orderBy);eu&&(eo.structuredQuery.orderBy=eu);let ed=__PRIVATE_toInt32Proto($,et.limit);return null!==ed&&(eo.structuredQuery.limit=ed),et.startAt&&(eo.structuredQuery.startAt={before:(en=et.startAt).inclusive,values:en.position}),et.endAt&&(eo.structuredQuery.endAt={before:!(er=et.endAt).inclusive,values:er.position}),{ft:eo,parent:ei}}function __PRIVATE_toFieldPathReference($){return{fieldPath:$.canonicalString()}}function __PRIVATE_fromFieldPathReference($){return FieldPath$1.fromServerFormat($.fieldPath)}function __PRIVATE_isValidResourceName($){return $.length>=4&&"projects"===$.get(0)&&"databases"===$.get(2)}/** 680 * @license 681 * Copyright 2017 Google LLC 682 * 683 * Licensed under the Apache License, Version 2.0 (the "License"); 684 * you may not use this file except in compliance with the License. 685 * You may obtain a copy of the License at 686 * 687 * http://www.apache.org/licenses/LICENSE-2.0 688 * 689 * Unless required by applicable law or agreed to in writing, software 690 * distributed under the License is distributed on an "AS IS" BASIS, 691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 692 * See the License for the specific language governing permissions and 693 * limitations under the License. 694 */let TargetData=class TargetData{constructor($,et,en,er,ei=SnapshotVersion.min(),eo=SnapshotVersion.min(),es=ByteString.EMPTY_BYTE_STRING,el=null){this.target=$,this.targetId=et,this.purpose=en,this.sequenceNumber=er,this.snapshotVersion=ei,this.lastLimboFreeSnapshotVersion=eo,this.resumeToken=es,this.expectedCount=el}withSequenceNumber($){return new TargetData(this.target,this.targetId,this.purpose,$,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken($,et){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,et,this.lastLimboFreeSnapshotVersion,$,null)}withExpectedCount($){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,$)}withLastLimboFreeSnapshotVersion($){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,$,this.resumeToken,this.expectedCount)}};/** 695 * @license 696 * Copyright 2017 Google LLC 697 * 698 * Licensed under the Apache License, Version 2.0 (the "License"); 699 * you may not use this file except in compliance with the License. 700 * You may obtain a copy of the License at 701 * 702 * http://www.apache.org/licenses/LICENSE-2.0 703 * 704 * Unless required by applicable law or agreed to in writing, software 705 * distributed under the License is distributed on an "AS IS" BASIS, 706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 707 * See the License for the specific language governing permissions and 708 * limitations under the License. 709 */let __PRIVATE_LocalSerializer=class __PRIVATE_LocalSerializer{constructor($){this.yt=$}};/** 710 * @license 711 * Copyright 2021 Google LLC 712 * 713 * Licensed under the Apache License, Version 2.0 (the "License"); 714 * you may not use this file except in compliance with the License. 715 * You may obtain a copy of the License at 716 * 717 * http://www.apache.org/licenses/LICENSE-2.0 718 * 719 * Unless required by applicable law or agreed to in writing, software 720 * distributed under the License is distributed on an "AS IS" BASIS, 721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 722 * See the License for the specific language governing permissions and 723 * limitations under the License. 724 */let __PRIVATE_FirestoreIndexValueWriter=class __PRIVATE_FirestoreIndexValueWriter{constructor(){}Dt($,et){this.Ct($,et),et.vt()}Ct($,et){if("nullValue"in $)this.Ft(et,5);else if("booleanValue"in $)this.Ft(et,10),et.Mt($.booleanValue?1:0);else if("integerValue"in $)this.Ft(et,15),et.Mt(__PRIVATE_normalizeNumber($.integerValue));else if("doubleValue"in $){let en=__PRIVATE_normalizeNumber($.doubleValue);isNaN(en)?this.Ft(et,13):(this.Ft(et,15),__PRIVATE_isNegativeZero(en)?et.Mt(0):et.Mt(en))}else if("timestampValue"in $){let en=$.timestampValue;this.Ft(et,20),"string"==typeof en&&(en=__PRIVATE_normalizeTimestamp(en)),et.xt(`${en.seconds||""}`),et.Mt(en.nanos||0)}else if("stringValue"in $)this.Ot($.stringValue,et),this.Nt(et);else if("bytesValue"in $)this.Ft(et,30),et.Bt(__PRIVATE_normalizeByteString($.bytesValue)),this.Nt(et);else if("referenceValue"in $)this.Lt($.referenceValue,et);else if("geoPointValue"in $){let en=$.geoPointValue;this.Ft(et,45),et.Mt(en.latitude||0),et.Mt(en.longitude||0)}else"mapValue"in $?__PRIVATE_isMaxValue($)?this.Ft(et,Number.MAX_SAFE_INTEGER):__PRIVATE_isVectorValue($)?this.kt($.mapValue,et):(this.qt($.mapValue,et),this.Nt(et)):"arrayValue"in $?(this.Qt($.arrayValue,et),this.Nt(et)):fail(19022,{$t:$})}Ot($,et){this.Ft(et,25),this.Ut($,et)}Ut($,et){et.xt($)}qt($,et){let en=$.fields||{};for(let $ of(this.Ft(et,55),Object.keys(en)))this.Ot($,et),this.Ct(en[$],et)}kt($,et){let en=$.fields||{};this.Ft(et,53);let er=en[eW].arrayValue?.values?.length||0;this.Ft(et,15),et.Mt(__PRIVATE_normalizeNumber(er)),this.Ot(eW,et),this.Ct(en[eW],et)}Qt($,et){let en=$.values||[];for(let $ of(this.Ft(et,50),en))this.Ct($,et)}Lt($,et){this.Ft(et,37),DocumentKey.fromName($).path.forEach($=>{this.Ft(et,60),this.Ut($,et)})}Ft($,et){$.Mt(et)}Nt($){$.Mt(2)}};__PRIVATE_FirestoreIndexValueWriter.Kt=new __PRIVATE_FirestoreIndexValueWriter;/** 725 * @license 726 * Copyright 2019 Google LLC 727 * 728 * Licensed under the Apache License, Version 2.0 (the "License");
729 * you may not use this file except in compliance with the License. 730 * You may obtain a copy of the License at 731 * 732 * http://www.apache.org/licenses/LICENSE-2.0 733 * 734 * Unless required by applicable law or agreed to in writing, software 735 * distributed under the License is distributed on an "AS IS" BASIS, 736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 737 * See the License for the specific language governing permissions and 738 * limitations under the License. 739 */let __PRIVATE_MemoryIndexManager=class __PRIVATE_MemoryIndexManager{constructor(){this.Cn=new __PRIVATE_MemoryCollectionParentIndex}addToCollectionParentIndex($,et){return this.Cn.add(et),PersistencePromise.resolve()}getCollectionParents($,et){return PersistencePromise.resolve(this.Cn.getEntries(et))}addFieldIndex($,et){return PersistencePromise.resolve()}deleteFieldIndex($,et){return PersistencePromise.resolve()}deleteAllFieldIndexes($){return PersistencePromise.resolve()}createTargetIndexes($,et){return PersistencePromise.resolve()}getDocumentsMatchingTarget($,et){return PersistencePromise.resolve(null)}getIndexType($,et){return PersistencePromise.resolve(0)}getFieldIndexes($,et){return PersistencePromise.resolve([])}getNextCollectionGroupToUpdate($){return PersistencePromise.resolve(null)}getMinOffset($,et){return PersistencePromise.resolve(IndexOffset.min())}getMinOffsetFromCollectionGroup($,et){return PersistencePromise.resolve(IndexOffset.min())}updateCollectionGroup($,et,en){return PersistencePromise.resolve()}updateIndexEntries($,et){return PersistencePromise.resolve()}};let __PRIVATE_MemoryCollectionParentIndex=class __PRIVATE_MemoryCollectionParentIndex{constructor(){this.index={}}add($){let et=$.lastSegment(),en=$.popLast(),er=this.index[et]||new SortedSet(ResourcePath.comparator),ei=!er.has(en);return this.index[et]=er.add(en),ei}has($){let et=$.lastSegment(),en=$.popLast(),er=this.index[et];return er&&er.has(en)}getEntries($){return(this.index[$]||new SortedSet(ResourcePath.comparator)).toArray()}};new Uint8Array(0);/** 740 * @license 741 * Copyright 2018 Google LLC 742 * 743 * Licensed under the Apache License, Version 2.0 (the "License"); 744 * you may not use this file except in compliance with the License. 745 * You may obtain a copy of the License at 746 * 747 * http://www.apache.org/licenses/LICENSE-2.0 748 * 749 * Unless required by applicable law or agreed to in writing, software 750 * distributed under the License is distributed on an "AS IS" BASIS, 751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 752 * See the License for the specific language governing permissions and 753 * limitations under the License. 754 */let e2={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};let LruParams=class LruParams{static withCacheSize($){return new LruParams($,LruParams.DEFAULT_COLLECTION_PERCENTILE,LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor($,et,en){this.cacheSizeCollectionThreshold=$,this.percentileToCollect=et,this.maximumSequenceNumbersToCollect=en}};/** 755 * @license 756 * Copyright 2017 Google LLC 757 * 758 * Licensed under the Apache License, Version 2.0 (the "License"); 759 * you may not use this file except in compliance with the License. 760 * You may obtain a copy of the License at 761 * 762 * http://www.apache.org/licenses/LICENSE-2.0 763 * 764 * Unless required by applicable law or agreed to in writing, software 765 * distributed under the License is distributed on an "AS IS" BASIS, 766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 767 * See the License for the specific language governing permissions and 768 * limitations under the License. 769 */LruParams.DEFAULT_COLLECTION_PERCENTILE=10,LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,LruParams.DEFAULT=new LruParams(41943040,LruParams.DEFAULT_COLLECTION_PERCENTILE,LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),LruParams.DISABLED=new LruParams(-1,0,0);/** 770 * @license 771 * Copyright 2017 Google LLC 772 * 773 * Licensed under the Apache License, Version 2.0 (the "License"); 774 * you may not use this file except in compliance with the License. 775 * You may obtain a copy of the License at 776 * 777 * http://www.apache.org/licenses/LICENSE-2.0 778 * 779 * Unless required by applicable law or agreed to in writing, softw
779are 780 * distributed under the License is distributed on an "AS IS" BASIS, 781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 782 * See the License for the specific language governing permissions and 783 * limitations under the License. 784 */let __PRIVATE_TargetIdGenerator=class __PRIVATE_TargetIdGenerator{constructor($){this.ar=$}next(){return this.ar+=2,this.ar}static ur(){return new __PRIVATE_TargetIdGenerator(0)}static cr(){return new __PRIVATE_TargetIdGenerator(-1)}};/** 785 * @license 786 * Copyright 2020 Google LLC 787 * 788 * Licensed under the Apache License, Version 2.0 (the "License"); 789 * you may not use this file except in compliance with the License. 790 * You may obtain a copy of the License at 791 * 792 * http://www.apache.org/licenses/LICENSE-2.0 793 * 794 * Unless required by applicable law or agreed to in writing, software 795 * distributed under the License is distributed on an "AS IS" BASIS, 796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 797 * See the License for the specific language governing permissions and 798 * limitations under the License. 799 */let e5="LruGarbageCollector";function __PRIVATE_bufferEntryComparator([$,et],[en,er]){let ei=__PRIVATE_primitiveComparator($,en);return 0===ei?__PRIVATE_primitiveComparator(et,er):ei}let __PRIVATE_RollingSequenceNumberBuffer=class __PRIVATE_RollingSequenceNumberBuffer{constructor($){this.Ir=$,this.buffer=new SortedSet(__PRIVATE_bufferEntryComparator),this.Er=0}dr(){return++this.Er}Ar($){let et=[$,this.dr()];if(this.buffer.size<this.Ir)this.buffer=this.buffer.add(et);else{let $=this.buffer.last();0>__PRIVATE_bufferEntryComparator(et,$)&&(this.buffer=this.buffer.delete($).add(et))}}get maxValue(){return this.buffer.last()[0]}};let __PRIVATE_LruScheduler=class __PRIVATE_LruScheduler{constructor($,et,en){this.garbageCollector=$,this.asyncQueue=et,this.localStore=en,this.Rr=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Vr(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return null!==this.Rr}Vr($){__PRIVATE_logDebug(e5,`Garbage collection scheduled in ${$}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",$,async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch($){__PRIVATE_isIndexedDbTransactionError($)?__PRIVATE_logDebug(e5,"Ignoring IndexedDB error during garbage collection: ",$):await __PRIVATE_ignoreIfPrimaryLeaseLoss($)}await this.Vr(3e5)})}};let __PRIVATE_LruGarbageCollectorImpl=class __PRIVATE_LruGarbageCollectorImpl{constructor($,et){this.mr=$,this.params=et}calculateTargetCount($,et){return this.mr.gr($).next($=>Math.floor(et/100*$))}nthSequenceNumber($,et){if(0===et)return PersistencePromise.resolve(__PRIVATE_ListenSequence.ce);let en=new __PRIVATE_RollingSequenceNumberBuffer(et);return this.mr.forEachTarget($,$=>en.Ar($.sequenceNumber)).next(()=>this.mr.pr($,$=>en.Ar($))).next(()=>en.maxValue)}removeTargets($,et,en){return this.mr.removeTargets($,et,en)}removeOrphanedDocuments($,et){return this.mr.removeOrphanedDocuments($,et)}collect($,et){return -1===this.params.cacheSizeCollectionThreshold?(__PRIVATE_logDebug("LruGarbageCollector","Garbage collection skipped; disabled"),PersistencePromise.resolve(e2)):this.getCacheSize($).next(en=>en<this.params.cacheSizeCollectionThreshold?(__PRIVATE_logDebug("LruGarbageCollector",`Garbage collection skipped; Cache size ${en} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),e2):this.yr($,et))}getCacheSize($){return this.mr.getCacheSize($)}yr($,et){let en,er,ei,eo,es,el,eu;let ed=Date.now();return this.calculateTargetCount($,this.params.percentileToCollect).next(et=>(et>this.params.maximumSequenceNumbersToCollect?(__PRIVATE_logDebug("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${et}`),er=this.params.maximumSequenceNumbersToCollect):er=et,eo=Date.now(),this.nthSequenceNumber($,er))).next(er=>(en=er,es=Date.now(),this.removeTargets($,en,et))).next(et=>(ei=et,el=Date.now(),this.removeOrphanedDocuments($,en))).next($=>(eu=Date.now(),__PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("LruGarbageCollector",`LRU Garbage Collection 800 Counted targets in ${eo-ed}ms 801 Determined least recently used ${er} in `+(es-eo)+"ms\n"+` Removed ${ei} targets in `+(el-es)+"ms\n"+` Removed ${$} documents in `+(eu-el)+"ms\n"+`Total Duration: ${eu-ed}ms`),PersistencePromise.resolve({didRun:!0,sequenceNumbersCollected:er,targetsRemoved:ei,documentsRemoved:$})))}};/** 802 * @license 803 * Copyright 2017 Google LLC 804 * 805 * Licensed under the Apache License, Version 2.0 (the "License");
806 * you may not use this file except in compliance with the License. 807 * You may obtain a copy of the License at 808 * 809 * http://www.apache.org/licenses/LICENSE-2.0 810 * 811 * Unless required by applicable law or agreed to in writing, software 812 * distributed under the License is distributed on an "AS IS" BASIS, 813 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 814 * See the License for the specific language governing permissions and 815 * limitations under the License. 816 */let RemoteDocumentChangeBuffer=class RemoteDocumentChangeBuffer{constructor(){this.changes=new ObjectMap($=>$.toString(),($,et)=>$.isEqual(et)),this.changesApplied=!1}addEntry($){this.assertNotApplied(),this.changes.set($.key,$)}removeEntry($,et){this.assertNotApplied(),this.changes.set($,MutableDocument.newInvalidDocument($).setReadTime(et))}getEntry($,et){this.assertNotApplied();let en=this.changes.get(et);return void 0!==en?PersistencePromise.resolve(en):this.getFromCache($,et)}getEntries($,et){return this.getAllFromCache($,et)}apply($){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges($)}assertNotApplied(){}};/** 817 * @license 818 * Copyright 2017 Google LLC 819 * 820 * Licensed under the Apache License, Version 2.0 (the "License"); 821 * you may not use this file except in compliance with the License. 822 * You may obtain a copy of the License at 823 * 824 * http://www.apache.org/licenses/LICENSE-2.0 825 * 826 * Unless required by applicable law or agreed to in writing, software 827 * distributed under the License is distributed on an "AS IS" BASIS, 828 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 829 * See the License for the specific language governing permissions and 830 * limitations under the License. 831 *//** 832 * @license 833 * Copyright 2022 Google LLC 834 * 835 * Licensed under the Apache License, Version 2.0 (the "License"); 836 * you may not use this file except in compliance with the License. 837 * You may obtain a copy of the License at 838 * 839 * http://www.apache.org/licenses/LICENSE-2.0 840 * 841 * Unless required by applicable law or agreed to in writing, software 842 * distributed under the License is distributed on an "AS IS" BASIS, 843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 844 * See the License for the specific language governing permissions and 845 * limitations under the License. 846 */let OverlayedDocument=class OverlayedDocument{constructor($,et){this.overlayedDocument=$,this.mutatedFields=et}};/** 847 * @license 848 * Copyright 2017 Google LLC 849 * 850 * Licensed under the Apache License, Version 2.0 (the "License"); 851 * you may not use this file except in compliance with the License. 852 * You may obtain a copy of the License at 853 * 854 * http://www.apache.org/licenses/LICENSE-2.0 855 * 856 * Unless required by applicable law or agreed to in writing, software 857 * distributed under the License is distributed on an "AS IS" BASIS, 858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 859 * See the License for the specific language governing permissions and 860 * limitations under the License. 861 */let LocalDocumentsView=class LocalDocumentsView{constructor($,et,en,er){this.remoteDocumentCache=$,this.mutationQueue=et,this.documentOverlayCache=en,this.indexManager=er}getDocument($,et){let en=null;return this.documentOverlayCache.getOverlay($,et).next(er=>(en=er,this.remoteDocumentCache.getEntry($,et))).next($=>(null!==en&&__PRIVATE_mutationApplyToLocalView(en.mutation,$,FieldMask.empty(),Timestamp.now()),$))}getDocuments($,et){return this.remoteDocumentCache.getEntries($,et).next(et=>this.getLocalViewOfDocuments($,et,__PRIVATE_documentKeySet()).next(()=>et))}getLocalViewOfDocuments($,et,en=__PRIVATE_documentKeySet()){let er=__PRIVATE_newDocumentKeyMap();return this.populateOverlays($,er,et).next(()=>this.computeViews($,et,er,en).next($=>{let et=documentMap();return $.forEach(($,en)=>{et=et.insert($,en.overlayedDocument)}),et}))}getOverlayedDocuments($,et){let en=__PRIVATE_newDocumentKeyMap();return this.populateOverlays($,en,et).next(()=>this.computeViews($,et,en,__PRIVATE_documentKeySet()))}populateOverlays($,et,en){let er=[];
vendor: 4,085 bytes, lines 861-865
861return en.forEach($=>{et.has($)||er.push($)}),this.documentOverlayCache.getOverlays($,er).next($=>{$.forEach(($,en)=>{et.set($,en)})})}computeViews($,et,en,er){let ei=eG,eo=__PRIVATE_newDocumentKeyMap(),es=__PRIVATE_newDocumentKeyMap();return et.forEach(($,et)=>{let es=en.get(et.key);er.has(et.key)&&(void 0===es||es.mutation instanceof __PRIVATE_PatchMutation)?ei=ei.insert(et.key,et):void 0!==es?(eo.set(et.key,es.mutation.getFieldMask()),__PRIVATE_mutationApplyToLocalView(es.mutation,et,es.mutation.getFieldMask(),Timestamp.now())):eo.set(et.key,FieldMask.empty())}),this.recalculateAndSaveOverlays($,ei).next($=>($.forEach(($,et)=>eo.set($,et)),et.forEach(($,et)=>es.set($,new OverlayedDocument(et,eo.get($)??null))),es))}recalculateAndSaveOverlays($,et){let en=__PRIVATE_newDocumentKeyMap(),er=new SortedMap(($,et)=>$-et),ei=__PRIVATE_documentKeySet();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys($,et).next($=>{for(let ei of $)ei.keys().forEach($=>{let eo=et.get($);if(null===eo)return;let es=en.get($)||FieldMask.empty();es=ei.applyToLocalView(eo,es),en.set($,es);let el=(er.get(ei.batchId)||__PRIVATE_documentKeySet()).add($);er=er.insert(ei.batchId,el)})}).next(()=>{let eo=[],es=er.getReverseIterator();for(;es.hasNext();){let er=es.getNext(),el=er.key,eu=er.value,ed=__PRIVATE_newDocumentKeyMap();eu.forEach($=>{if(!ei.has($)){let er=__PRIVATE_calculateOverlayMutation(et.get($),en.get($));null!==er&&ed.set($,er),ei=ei.add($)}}),eo.push(this.documentOverlayCache.saveOverlays($,el,ed))}return PersistencePromise.waitFor(eo)}).next(()=>en)}recalculateAndSaveOverlaysForDocumentKeys($,et){return this.remoteDocumentCache.getEntries($,et).next(et=>this.recalculateAndSaveOverlays($,et))}getDocumentsMatchingQuery($,et,en,er){return DocumentKey.isDocumentKey(et.path)&&null===et.collectionGroup&&0===et.filters.length?this.getDocumentsMatchingDocumentQuery($,et.path):__PRIVATE_isCollectionGroupQuery(et)?this.getDocumentsMatchingCollectionGroupQuery($,et,en,er):this.getDocumentsMatchingCollectionQuery($,et,en,er)}getNextDocuments($,et,en,er){return this.remoteDocumentCache.getAllFromCollectionGroup($,et,en,er).next(ei=>{let eo=er-ei.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup($,et,en.largestBatchId,er-ei.size):PersistencePromise.resolve(__PRIVATE_newDocumentKeyMap()),es=-1,el=ei;return eo.next(et=>PersistencePromise.forEach(et,(et,en)=>(es<en.largestBatchId&&(es=en.largestBatchId),ei.get(et)?PersistencePromise.resolve():this.remoteDocumentCache.getEntry($,et).next($=>{el=el.insert(et,$)}))).next(()=>this.populateOverlays($,et,ei)).next(()=>this.computeViews($,el,et,__PRIVATE_documentKeySet())).next($=>({batchId:es,changes:__PRIVATE_convertOverlayedDocumentMapToDocumentMap($)})))})}getDocumentsMatchingDocumentQuery($,et){return this.getDocument($,new DocumentKey(et)).next($=>{let et=documentMap();return $.isFoundDocument()&&(et=et.insert($.key,$)),et})}getDocumentsMatchingCollectionGroupQuery($,et,en,er){let ei=et.collectionGroup,eo=documentMap();return this.indexManager.getCollectionParents($,ei).next(es=>PersistencePromise.forEach(es,es=>{var el;let eu=(el=es.child(ei),new __PRIVATE_QueryImpl(el,null,et.explicitOrderBy.slice(),et.filters.slice(),et.limit,et.limitType,et.startAt,et.endAt));return this.getDocumentsMatchingCollectionQuery($,eu,en,er).next($=>{$.forEach(($,et)=>{eo=eo.insert($,et)})})}).next(()=>eo))}getDocumentsMatchingCollectionQuery($,et,en,er){let ei;return this.documentOverlayCache.getOverlaysForCollection($,et.path,en.largestBatchId).next(eo=>(ei=eo,this.remoteDocumentCache.getDocumentsMatchingQuery($,et,en,ei,er))).next($=>{ei.forEach((et,en)=>{let er=en.getKey();null===$.get(er)&&($=$.insert(er,MutableDocument.newInvalidDocument(er)))});let en=documentMap();return $.forEach(($,er)=>{let eo=ei.get($);void 0!==eo&&__PRIVATE_mutationApplyToLocalView(eo.mutation,er,FieldMask.empty(),Timestamp.now()),__PRIVATE_queryMatches(et,er)&&(en=en.insert($,er))}),en})}};/** 862 * @license 863 * Copyright 2020 Google LLC 864 * 865 * Licensed under the Apache License, Version 2.0 (the "License");
866 * you may not use this file except in compliance with the License. 867 * You may obtain a copy of the License at 868 * 869 * http://www.apache.org/licenses/LICENSE-2.0 870 * 871 * Unless required by applicable law or agreed to in writing, software 872 * distributed under the License is distributed on an "AS IS" BASIS, 873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 874 * See the License for the specific language governing permissions and 875 * limitations under the License. 876 */let __PRIVATE_MemoryBundleCache=class __PRIVATE_MemoryBundleCache{constructor($){this.serializer=$,this.Lr=new Map,this.kr=new Map}getBundleMetadata($,et){return PersistencePromise.resolve(this.Lr.get(et))}saveBundleMetadata($,et){return this.Lr.set(et.id,{id:et.id,version:et.version,createTime:__PRIVATE_fromVersion(et.createTime)}),PersistencePromise.resolve()}getNamedQuery($,et){return PersistencePromise.resolve(this.kr.get(et))}saveNamedQuery($,et){return this.kr.set(et.name,{name:et.name,query:function($){let et=function($){var et,en,er,ei,eo,es,el,eu;let ed,eh=function($){let et=__PRIVATE_fromResourceName($);return 4===et.length?ResourcePath.emptyPath():__PRIVATE_extractLocalPathFromResourceName(et)}($.parent),ep=$.structuredQuery,em=ep.from?ep.from.length:0,ef=null;if(em>0){__PRIVATE_hardAssert(1===em,65062);let $=ep.from[0];$.allDescendants?ef=$.collectionId:eh=eh.child($.collectionId)}let eg=[];ep.where&&(eg=function($){var et;let en=function __PRIVATE_fromFilter($){return void 0!==$.unaryFilter?function($){switch($.unaryFilter.op){case"IS_NAN":let et=__PRIVATE_fromFieldPathReference($.unaryFilter.field);return FieldFilter.create(et,"==",{doubleValue:NaN});case"IS_NULL":let en=__PRIVATE_fromFieldPathReference($.unaryFilter.field);return FieldFilter.create(en,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let er=__PRIVATE_fromFieldPathReference($.unaryFilter.field);return FieldFilter.create(er,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let ei=__PRIVATE_fromFieldPathReference($.unaryFilter.field);return FieldFilter.create(ei,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return fail(61313);default:return fail(60726)}}($):void 0!==$.fieldFilter?FieldFilter.create(__PRIVATE_fromFieldPathReference($.fieldFilter.field),function($){switch($){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return fail(58110);default:return fail(50506)}}($.fieldFilter.op),$.fieldFilter.value):void 0!==$.compositeFilter?CompositeFilter.create($.compositeFilter.filters.map($=>__PRIVATE_fromFilter($)),function($){switch($){case"AND":return"and";case"OR":return"or";default:return fail(1026)}}($.compositeFilter.op)):fail(30097,{filter:$})}($);return en instanceof CompositeFilter&&__PRIVATE_compositeFilterIsFlat(et=en)&&__PRIVATE_compositeFilterIsConjunction(et)?en.getFilters():[en]}(ep.where));let ey=[];ep.orderBy&&(ey=ep.orderBy.map($=>new OrderBy(__PRIVATE_fromFieldPathReference($.field),function($){switch($){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}($.direction))));let ev=null;ep.limit&&(ev=__PRIVATE_isNullOrUndefined(ed="object"==typeof(et=ep.limit)?et.value:et)?null:ed);let ex=null;ep.startAt&&(ex=function($){let et=!!$.before,en=$.values||[];return new Bound(en,et)}(ep.startAt));let e_=null;return ep.endAt&&(e_=function($){let et=!$.before,en=$.values||[];return new Bound(en,et)}(ep.endAt)),en=eh,er=ef,ei=ey,eo=eg,es=ev,el=ex,eu=e_,new __PRIVATE_QueryImpl(en,er,ei,eo,es,"F",el,eu)}({parent:$.parent,structuredQuery:$.structuredQuery});return"LAST"===$.limitType?__PRIVATE_queryWithLimit(et,et.limit,"L"):et}(et.bundledQuery),readTime:__PRIVATE_fromVersion(et.readTime)}),PersistencePromise.resolve()}};/** 877 * @license 878 * Copyright 2022 Google LLC 879 * 880 * Licensed under the Apache License, Version 2.0 (the "License");
881 * you may not use this file except in compliance with the License. 882 * You may obtain a copy of the License at 883 * 884 * http://www.apache.org/licenses/LICENSE-2.0 885 * 886 * Unless required by applicable law or agreed to in writing, software 887 * distributed under the License is distributed on an "AS IS" BASIS, 888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 889 * See the License for the specific language governing permissions and 890 * limitations under the License. 891 */let __PRIVATE_MemoryDocumentOverlayCache=class __PRIVATE_MemoryDocumentOverlayCache{constructor(){this.overlays=new SortedMap(DocumentKey.comparator),this.qr=new Map}getOverlay($,et){return PersistencePromise.resolve(this.overlays.get(et))}getOverlays($,et){let en=__PRIVATE_newDocumentKeyMap();return PersistencePromise.forEach(et,et=>this.getOverlay($,et).next($=>{null!==$&&en.set(et,$)})).next(()=>en)}saveOverlays($,et,en){return en.forEach((en,er)=>{this.St($,et,er)}),PersistencePromise.resolve()}removeOverlaysForBatchId($,et,en){let er=this.qr.get(en);return void 0!==er&&(er.forEach($=>this.overlays=this.overlays.remove($)),this.qr.delete(en)),PersistencePromise.resolve()}getOverlaysForCollection($,et,en){let er=__PRIVATE_newDocumentKeyMap(),ei=et.length+1,eo=new DocumentKey(et.child("")),es=this.overlays.getIteratorFrom(eo);for(;es.hasNext();){let $=es.getNext().value,eo=$.getKey();if(!et.isPrefixOf(eo.path))break;eo.path.length===ei&&$.largestBatchId>en&&er.set($.getKey(),$)}return PersistencePromise.resolve(er)}getOverlaysForCollectionGroup($,et,en,er){let ei=new SortedMap(($,et)=>$-et),eo=this.overlays.getIterator();for(;eo.hasNext();){let $=eo.getNext().value;if($.getKey().getCollectionGroup()===et&&$.largestBatchId>en){let et=ei.get($.largestBatchId);null===et&&(et=__PRIVATE_newDocumentKeyMap(),ei=ei.insert($.largestBatchId,et)),et.set($.getKey(),$)}}let es=__PRIVATE_newDocumentKeyMap(),el=ei.getIterator();for(;el.hasNext()&&(el.getNext().value.forEach(($,et)=>es.set($,et)),!(es.size()>=er)););return PersistencePromise.resolve(es)}
vendor: 4,117 bytes, lines 891-936
891St($,et,en){let er=this.overlays.get(en.key);if(null!==er){let $=this.qr.get(er.largestBatchId).delete(en.key);this.qr.set(er.largestBatchId,$)}this.overlays=this.overlays.insert(en.key,new Overlay(et,en));let ei=this.qr.get(et);void 0===ei&&(ei=__PRIVATE_documentKeySet(),this.qr.set(et,ei)),this.qr.set(et,ei.add(en.key))}};/** 892 * @license 893 * Copyright 2024 Google LLC 894 * 895 * Licensed under the Apache License, Version 2.0 (the "License"); 896 * you may not use this file except in compliance with the License. 897 * You may obtain a copy of the License at 898 * 899 * http://www.apache.org/licenses/LICENSE-2.0 900 * 901 * Unless required by applicable law or agreed to in writing, software 902 * distributed under the License is distributed on an "AS IS" BASIS, 903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 904 * See the License for the specific language governing permissions and 905 * limitations under the License. 906 */let __PRIVATE_MemoryGlobalsCache=class __PRIVATE_MemoryGlobalsCache{constructor(){this.sessionToken=ByteString.EMPTY_BYTE_STRING}getSessionToken($){return PersistencePromise.resolve(this.sessionToken)}setSessionToken($,et){return this.sessionToken=et,PersistencePromise.resolve()}};/** 907 * @license 908 * Copyright 2017 Google LLC 909 * 910 * Licensed under the Apache License, Version 2.0 (the "License"); 911 * you may not use this file except in compliance with the License. 912 * You may obtain a copy of the License at 913 * 914 * http://www.apache.org/licenses/LICENSE-2.0 915 * 916 * Unless required by applicable law or agreed to in writing, software 917 * distributed under the License is distributed on an "AS IS" BASIS, 918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 919 * See the License for the specific language governing permissions and 920 * limitations under the License. 921 */let __PRIVATE_ReferenceSet=class __PRIVATE_ReferenceSet{constructor(){this.Qr=new SortedSet(__PRIVATE_DocReference.$r),this.Ur=new SortedSet(__PRIVATE_DocReference.Kr)}isEmpty(){return this.Qr.isEmpty()}addReference($,et){let en=new __PRIVATE_DocReference($,et);this.Qr=this.Qr.add(en),this.Ur=this.Ur.add(en)}Wr($,et){$.forEach($=>this.addReference($,et))}removeReference($,et){this.Gr(new __PRIVATE_DocReference($,et))}zr($,et){$.forEach($=>this.removeReference($,et))}jr($){let et=new DocumentKey(new ResourcePath([])),en=new __PRIVATE_DocReference(et,$),er=new __PRIVATE_DocReference(et,$+1),ei=[];return this.Ur.forEachInRange([en,er],$=>{this.Gr($),ei.push($.key)}),ei}Jr(){this.Qr.forEach($=>this.Gr($))}Gr($){this.Qr=this.Qr.delete($),this.Ur=this.Ur.delete($)}Hr($){let et=new DocumentKey(new ResourcePath([])),en=new __PRIVATE_DocReference(et,$),er=new __PRIVATE_DocReference(et,$+1),ei=__PRIVATE_documentKeySet();return this.Ur.forEachInRange([en,er],$=>{ei=ei.add($.key)}),ei}containsKey($){let et=new __PRIVATE_DocReference($,0),en=this.Qr.firstAfterOrEqual(et);return null!==en&&$.isEqual(en.key)}};let __PRIVATE_DocReference=class __PRIVATE_DocReference{constructor($,et){this.key=$,this.Yr=et}static $r($,et){return DocumentKey.comparator($.key,et.key)||__PRIVATE_primitiveComparator($.Yr,et.Yr)}static Kr($,et){return __PRIVATE_primitiveComparator($.Yr,et.Yr)||DocumentKey.comparator($.key,et.key)}};/** 922 * @license 923 * Copyright 2017 Google LLC 924 * 925 * Licensed under the Apache License, Version 2.0 (the "License"); 926 * you may not use this file except in compliance with the License. 927 * You may obtain a copy of the License at 928 * 929 * http://www.apache.org/licenses/LICENSE-2.0 930 * 931 * Unless required by applicable law or agreed to in writing, software 932 * distributed under the License is distributed on an "AS IS" BASIS, 933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 934 * See the License for the specific language governing permissions and 935 * limitations under the License. 936 */let __PRIVATE_MemoryMutationQueue=class __PRIVATE_MemoryMutationQueue{constructor($,et){this.indexManager=$,this.referenceDelegate=et,this.mutationQueue=[],this.tr=1,this.Zr=new SortedSet(__PRIVATE_DocReference.$r)}checkEmpty($){return PersistencePromise.resolve(0===this.mutation
936Queue.length)}addMutationBatch($,et,en,er){let ei=this.tr;this.tr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let eo=new MutationBatch(ei,et,en,er);for(let et of(this.mutationQueue.push(eo),er))this.Zr=this.Zr.add(new __PRIVATE_DocReference(et.key,ei)),this.indexManager.addToCollectionParentIndex($,et.key.path.popLast());return PersistencePromise.resolve(eo)}lookupMutationBatch($,et){return PersistencePromise.resolve(this.Xr(et))}getNextMutationBatchAfterBatchId($,et){let en=this.ei(et+1),er=en<0?0:en;return PersistencePromise.resolve(this.mutationQueue.length>er?this.mutationQueue[er]:null)}getHighestUnacknowledgedBatchId(){return PersistencePromise.resolve(0===this.mutationQueue.length?-1:this.tr-1)}getAllMutationBatches($){return PersistencePromise.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey($,et){let en=new __PRIVATE_DocReference(et,0),er=new __PRIVATE_DocReference(et,Number.POSITIVE_INFINITY),ei=[];return this.Zr.forEachInRange([en,er],$=>{let et=this.Xr($.Yr);ei.push(et)}),PersistencePromise.resolve(ei)}getAllMutationBatchesAffectingDocumentKeys($,et){let en=new SortedSet(__PRIVATE_primitiveComparator);return et.forEach($=>{let et=new __PRIVATE_DocReference($,0),er=new __PRIVATE_DocReference($,Number.POSITIVE_INFINITY);this.Zr.forEachInRange([et,er],$=>{en=en.add($.Yr)})}),PersistencePromise.resolve(this.ti(en))}getAllMutationBatchesAffectingQuery($,et){let en=et.path,er=en.length+1,ei=en;DocumentKey.isDocumentKey(ei)||(ei=ei.child(""));let eo=new __PRIVATE_DocReference(new DocumentKey(ei),0),es=new SortedSet(__PRIVATE_primitiveComparator);return this.Zr.forEachWhile($=>{let et=$.key.path;return!!en.isPrefixOf(et)&&(et.length===er&&(es=es.add($.Yr)),!0)},eo),PersistencePromise.resolve(this.ti(es))}ti($){let et=[];return $.forEach($=>{let en=this.Xr($);null!==en&&et.push(en)}),et}removeMutationBatch($,et){__PRIVATE_hardAssert(0===this.ni(et.batchId,"removed"),55003),this.mutationQueue.shift();let en=this.Zr;return PersistencePromise.forEach(et.mutations,er=>{let ei=new __PRIVATE_DocReference(er.key,et.batchId);return en=en.delete(ei),this.referenceDelegate.markPotentiallyOrphaned($,er.key)}).next(()=>{this.Zr=en})}ir($){}containsKey($,et){let en=new __PRIVATE_DocReference(et,0),er=this.Zr.firstAfterOrEqual(en);return PersistencePromise.resolve(et.isEqual(er&&er.key))}performConsistencyCheck($){return this.mutationQueue.length,PersistencePromise.resolve()}ni($,et){return this.ei($)}ei($){return 0===this.mutationQueue.length?0:$-this.mutationQueue[0].batchId}Xr($){let et=this.ei($);return et<0||et>=this.mutationQueue.length?null:this.mutationQueue[et]}};/** 937 * @license 938 * Copyright 2017 Google LLC 939 * 940 * Licensed under the Apache License, Version 2.0 (the "License"); 941 * you may not use this file except in compliance with the License. 942 * You may obtain a copy of the License at 943 * 944 * http://www.apache.org/licenses/LICENSE-2.0 945 * 946 * Unless required by applicable law or agreed to in writing, software 947 * distributed under the License is distributed on an "AS IS" BASIS, 948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 949 * See the License for the specific language governing permissions and 950 * limitations under the License. 951 */let __PRIVATE_MemoryRemoteDocumentCacheImpl=class __PRIVATE_MemoryRemoteDocumentCacheImpl{constructor($){this.ri=$,this.docs=new SortedMap(DocumentKey.comparator),this.size=0}setIndexManager($){this.indexManager=$}addEntry($,et){let en=et.key,er=this.docs.get(en),ei=er?er.size:0,eo=this.ri(et);return this.docs=this.docs.insert(en,{document:et.mutableCopy(),size:eo}),this.size+=eo-ei,this.indexManager.addToCollectionParentIndex($,en.path.popLast())}removeEntry($){let et=this.docs.get($);et&&(this.docs=this.docs.remove($),this.size-=et.size)}getEntry($,et){let en=this.docs.get(et);return PersistencePromise.resolve(en?en.document.mutableCopy():MutableDocument.newInvalidDocument(et))}getEntries($,et){let en=eG;return et.forEach($=>{let et=this.docs.get($);en=en.insert($,et?et.document.mutableCopy():MutableDocument.newInvalidDocument($))}),PersistencePromise.resolve(en)}getDocumentsMatchingQuery($,et,en,er){let ei=eG,eo=et.path,es=new DocumentKey(eo.child("__id-9223372036854775808__")),el=this.docs.getIteratorFrom(es);for(;el.hasNext();){let{key:$,value:{document:es}}=el.getNext();if(!eo.isPrefixOf($.path))break;$.path.length>eo.length+1||0>=function($,et){let en=$.readTime.compareTo(et.readTime);return 0!==en?en:0!==(en=DocumentKey.comparator($.documentKey,et.documentKey))?en:__PRIVATE_primitiveComparator($.largestBatchId,et.largestBatchId)}(new IndexOffset(es.readTime,es.key,-1),en)||(er.has(es.key)||__PRIVATE_queryMatches(et,es))&&(ei=ei.insert(es.key,es.mutableCopy()))}return PersistencePromise.resolve(ei)}getAllFromCollectionGroup($,et,en,er){fail(9500)}ii($,et){return PersistencePromise.forEach(this.docs,$=>et($))}
vendor: 9,213 bytes, lines 951-981
951newChangeBuffer($){return new __PRIVATE_MemoryRemoteDocumentChangeBuffer(this)}getSize($){return PersistencePromise.resolve(this.size)}};let __PRIVATE_MemoryRemoteDocumentChangeBuffer=class __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuffer{constructor($){super(),this.Nr=$}applyChanges($){let et=[];return this.changes.forEach((en,er)=>{er.isValidDocument()?et.push(this.Nr.addEntry($,er)):this.Nr.removeEntry(en)}),PersistencePromise.waitFor(et)}getFromCache($,et){return this.Nr.getEntry($,et)}getAllFromCache($,et){return this.Nr.getEntries($,et)}};/** 952 * @license 953 * Copyright 2017 Google LLC 954 * 955 * Licensed under the Apache License, Version 2.0 (the "License"); 956 * you may not use this file except in compliance with the License. 957 * You may obtain a copy of the License at 958 * 959 * http://www.apache.org/licenses/LICENSE-2.0 960 * 961 * Unless required by applicable law or agreed to in writing, software 962 * distributed under the License is distributed on an "AS IS" BASIS, 963 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 964 * See the License for the specific language governing permissions and 965 * limitations under the License. 966 */let __PRIVATE_MemoryTargetCache=class __PRIVATE_MemoryTargetCache{constructor($){this.persistence=$,this.si=new ObjectMap($=>__PRIVATE_canonifyTarget($),__PRIVATE_targetEquals),this.lastRemoteSnapshotVersion=SnapshotVersion.min(),this.highestTargetId=0,this.oi=0,this._i=new __PRIVATE_ReferenceSet,this.targetCount=0,this.ai=__PRIVATE_TargetIdGenerator.ur()}forEachTarget($,et){return this.si.forEach(($,en)=>et(en)),PersistencePromise.resolve()}getLastRemoteSnapshotVersion($){return PersistencePromise.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber($){return PersistencePromise.resolve(this.oi)}allocateTargetId($){return this.highestTargetId=this.ai.next(),PersistencePromise.resolve(this.highestTargetId)}setTargetsMetadata($,et,en){return en&&(this.lastRemoteSnapshotVersion=en),et>this.oi&&(this.oi=et),PersistencePromise.resolve()}Pr($){this.si.set($.target,$);let et=$.targetId;et>this.highestTargetId&&(this.ai=new __PRIVATE_TargetIdGenerator(et),this.highestTargetId=et),$.sequenceNumber>this.oi&&(this.oi=$.sequenceNumber)}addTargetData($,et){return this.Pr(et),this.targetCount+=1,PersistencePromise.resolve()}updateTargetData($,et){return this.Pr(et),PersistencePromise.resolve()}removeTargetData($,et){return this.si.delete(et.target),this._i.jr(et.targetId),this.targetCount-=1,PersistencePromise.resolve()}removeTargets($,et,en){let er=0,ei=[];return this.si.forEach((eo,es)=>{es.sequenceNumber<=et&&null===en.get(es.targetId)&&(this.si.delete(eo),ei.push(this.removeMatchingKeysForTargetId($,es.targetId)),er++)}),PersistencePromise.waitFor(ei).next(()=>er)}getTargetCount($){return PersistencePromise.resolve(this.targetCount)}getTargetData($,et){let en=this.si.get(et)||null;return PersistencePromise.resolve(en)}addMatchingKeys($,et,en){return this._i.Wr(et,en),PersistencePromise.resolve()}removeMatchingKeys($,et,en){this._i.zr(et,en);let er=this.persistence.referenceDelegate,ei=[];return er&&et.forEach(et=>{ei.push(er.markPotentiallyOrphaned($,et))}),PersistencePromise.waitFor(ei)}removeMatchingKeysForTargetId($,et){return this._i.jr(et),PersistencePromise.resolve()}getMatchingKeysForTargetId($,et){let en=this._i.Hr(et);return PersistencePromise.resolve(en)}containsKey($,et){return PersistencePromise.resolve(this._i.containsKey(et))}};/** 967 * @license 968 * Copyright 2017 Google LLC 969 * 970 * Licensed under the Apache License, Version 2.0 (the "License"); 971 * you may not use this file except in compliance with the License. 972 * You may obtain a copy of the License at 973 * 974 * http://www.apache.org/licenses/LICENSE-2.0 975 * 976 * Unless required by applicable law or agreed to in writing, software 977 * distributed under the License is distributed on an "AS IS" BASIS, 978 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 979 * See the License for the specific language governing permissions and 980 * limitations under the License. 981 */let __PRIVATE_MemoryPersistence=class __PRIVATE_MemoryPersistence{constructor($,et){this.ui={},this.overlays={},this.ci=new __PRIVATE_ListenSequence(0),this.li=!1,this.li=!0,this.hi=new __PRIVATE_MemoryGlobalsCache,this.referenceDelegate=$(this),this.Pi=new __PRIVATE_MemoryTargetCache(this),this.indexManager=new __PRIVATE_MemoryIndexManager,this.remoteDocumentCache=new __PRIVATE_MemoryRemoteDocumentCacheImpl($=>this.referenceDelegate.Ti($)),this.serializer=new __PRIVATE_LocalSerializer(et),this.Ii=new __PRIVATE_MemoryBundleCache(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.li=!1,Promise.resolve()}get started(){return this.li}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager($){return this.indexManager}getDocumentOverlayCache($){let et=this.overlays[$.toKey()];return et||(et=new __PRIVATE_MemoryDocumentOverlayCache,this.overlays[$.toKey()]=et),et}getMutationQueue($,et){let en=this.ui[$.toKey()];return en||(en=new __PRIVATE_MemoryMutationQueue(et,this.referenceDelegate),this.ui[$.toKey()]=en),en}getGlobalsCache(){return this.hi}getTargetCache(){return this.Pi}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ii}runTransaction($,et,en){__PRIVATE_logDebug("MemoryPersistence","Starting transaction:",$);let er=new __PRIVATE_MemoryTransaction(this.ci.next());return this.referenceDelegate.Ei(),en(er).next($=>this.referenceDelegate.di(er).next(()=>$)).toPromise().then($=>(er.raiseOnCommittedEvent(),$))}Ai($,et){return PersistencePromise.or(Object.values(this.ui).map(en=>()=>en.containsKey($,et)))}};let __PRIVATE_MemoryTransaction=class __PRIVATE_MemoryTransaction extends PersistenceTransaction{constructor($){super(),this.currentSequenceNumber=$}};let __PRIVATE_MemoryEagerDelegate=class __PRIVATE_MemoryEagerDelegate{constructor($){this.persistence=$,this.Ri=new __PRIVATE_ReferenceSet,this.Vi=null}static mi($){return new __PRIVATE_MemoryEagerDelegate($)}get fi(){if(this.Vi)return this.Vi;throw fail(60996)}addReference($,et,en){return this.Ri.addReference(en,et),this.fi.delete(en.toString()),PersistencePromise.resolve()}removeReference($,et,en){return this.Ri.removeReference(en,et),this.fi.add(en.toString()),PersistencePromise.resolve()}markPotentiallyOrphaned($,et){return this.fi.add(et.toString()),PersistencePromise.resolve()}removeTarget($,et){this.Ri.jr(et.targetId).forEach($=>this.fi.add($.toString()));let en=this.persistence.getTargetCache();return en.getMatchingKeysForTargetId($,et.targetId).next($=>{$.forEach($=>this.fi.add($.toString()))}).next(()=>en.removeTargetData($,et))}Ei(){this.Vi=new Set}di($){let et=this.persistence.getRemoteDocumentCache().newChangeBuffer();return PersistencePromise.forEach(this.fi,en=>{let er=DocumentKey.fromPath(en);return this.gi($,er).next($=>{$||et.removeEntry(er,SnapshotVersion.min())})}).next(()=>(this.Vi=null,et.apply($)))}updateLimboDocument($,et){return this.gi($,et).next($=>{$?this.fi.delete(et.toString()):this.fi.add(et.toString())})}Ti($){return 0}gi($,et){return PersistencePromise.or([()=>PersistencePromise.resolve(this.Ri.containsKey(et)),()=>this.persistence.getTargetCache().containsKey($,et),()=>this.persistence.Ai($,et)])}};let __PRIVATE_MemoryLruDelegate=class __PRIVATE_MemoryLruDelegate{constructor($,et){this.persistence=$,this.pi=new ObjectMap($=>(function($){var et,en;let er="";for(let et=0;et<$.length;et++)er.length>0&&(er=er+"\x01\x01"),er=function($,et){let en=et,er=$.length;for(let et=0;et<er;et++){let er=$.charAt(et);switch(er){case"\x00":en+="\x01\x10";break;case"\x01":en+="\x01\x11";break;default:en+=er}}return en}($.get(et),er);return er+"\x01\x01"})($.path),($,et)=>$.isEqual(et)),this.garbageCollector=new __PRIVATE_LruGarbageCollectorImpl(this,et)}static mi($,et){return new __PRIVATE_MemoryLruDelegate($,et)}Ei(){}di($){return PersistencePromise.resolve()}forEachTarget($,et){return this.persistence.getTargetCache().forEachTarget($,et)}gr($){let et=this.wr($);return this.persistence.getTargetCache().getTargetCount($).next($=>et.next(et=>$+et))}wr($){let et=0;return this.pr($,$=>{et++}).next(()=>et)}pr($,et){return PersistencePromise.forEach(this.pi,(en,er)=>this.br($,en,er).next($=>$?PersistencePromise.resolve():et(er)))}removeTargets($,et,en){return this.persistence.getTargetCache().removeTargets($,et,en)}removeOrphanedDocuments($,et){let en=0,er=this.persistence.getRemoteDocumentCache(),ei=er.newChangeBuffer();return er.ii($,er=>this.br($,er,et).next($=>{$||(en++,ei.removeEntry(er,SnapshotVersion.min()))})).next(()=>ei.apply($)).next(()=>en)}markPotentiallyOrphaned($,et){return this.pi.set(et,$.currentSequenceNumber),PersistencePromise.resolve()}removeTarget($,et){let en=et.withSequenceNumber($.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData($,en)}addReference($,et,en){return this.pi.set(en,$.currentSequenceNumber),PersistencePromise.resolve()}removeReference($,et,en){return this.pi.set(en,$.currentSequenceNumber),PersistencePromise.resolve()}updateLimboDocument($,et){return this.pi.set(et,$.currentSequenceNumber),PersistencePromise.resolve()}Ti($){let et=$.key.toString().length;
981return $.isFoundDocument()&&(et+=function __PRIVATE_estimateByteSize($){switch(__PRIVATE_typeOrder($)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:let et=__PRIVATE_getPreviousValue($);return et?16+__PRIVATE_estimateByteSize(et):16;case 5:return 2*$.stringValue.length;case 6:return __PRIVATE_normalizeByteString($.bytesValue).approximateByteSize();case 7:return $.referenceValue.length;case 9:return($.arrayValue.values||[]).reduce(($,et)=>$+__PRIVATE_estimateByteSize(et),0);case 10:case 11:var en;let er;return en=$.mapValue,er=0,forEach(en.fields,($,et)=>{er+=$.length+__PRIVATE_estimateByteSize(et)}),er;default:throw fail(13486,{value:$})}}($.data.value)),et}br($,et,en){return PersistencePromise.or([()=>this.persistence.Ai($,et),()=>this.persistence.getTargetCache().containsKey($,et),()=>{let $=this.pi.get(et);return PersistencePromise.resolve(void 0!==$&&$>en)}])}getCacheSize($){return this.persistence.getRemoteDocumentCache().getSize($)}};/** 982 * @license 983 * Copyright 2017 Google LLC 984 * 985 * Licensed under the Apache License, Version 2.0 (the "License"); 986 * you may not use this file except in compliance with the License. 987 * You may obtain a copy of the License at 988 * 989 * http://www.apache.org/licenses/LICENSE-2.0 990 * 991 * Unless required by applicable law or agreed to in writing, software 992 * distributed under the License is distributed on an "AS IS" BASIS, 993 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 994 * See the License for the specific language governing permissions and 995 * limitations under the License. 996 */let __PRIVATE_LocalViewChanges=class __PRIVATE_LocalViewChanges{constructor($,et,en,er){this.targetId=$,this.fromCache=et,this.Es=en,this.ds=er}static As($,et){let en=__PRIVATE_documentKeySet(),er=__PRIVATE_documentKeySet();for(let $ of et.docChanges)switch($.type){case 0:en=en.add($.doc.key);break;case 1:er=er.add($.doc.key)}return new __PRIVATE_LocalViewChanges($,et.fromCache,en,er)}};/** 997 * @license 998 * Copyright 2023 Google LLC 999 * 1000 * Licensed under the Apache License, Version 2.0 (the "License"); 1001 * you may not use this file except in compliance with the License. 1002 * You may obtain a copy of the License at 1003 * 1004 * http://www.apache.org/licenses/LICENSE-2.0 1005 * 1006 * Unless required by applicable law or agreed to in writing, software 1007 * distributed under the License is distributed on an "AS IS" BASIS, 1008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1009 * See the License for the specific language governing permissions and 1010 * limitations under the License. 1011 */let QueryContext=class QueryContext{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount($){this._documentReadCount+=$}};/** 1012 * @license 1013 * Copyright 2019 Google LLC 1014 * 1015 * Licensed under the Apache License, Version 2.0 (the "License"); 1016 * you may not use this file except in compliance with the License. 1017 * You may obtain a copy of the License at 1018 * 1019 * http://www.apache.org/licenses/LICENSE-2.0 1020 * 1021 * Unless required by applicable law or agreed to in writing, software 1022 * distributed under the License is distributed on an "AS IS" BASIS, 1023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1024 * See the License for the specific language governing permissions and 1025 * limitations under the License. 1026 */let __PRIVATE_QueryEngine=class __PRIVATE_QueryEngine{constructor(){this.Rs=!1,this.Vs=!1,this.fs=100,this.gs=(0,ek.G6)()?8:function($){let et=$.match(/Android ([\d.]+)/i),en=et?et[1].split(".").slice(0,2).join("."):"-1";return Number(en)}((0,ek.z$)())>0?6:4}initialize($,et){this.ps=$,this.indexManager=et,this.Rs=!0}getDocumentsMatchingQuery($,et,en,er){let ei={result:null};return this.ys($,et).next($=>{ei.result=$}).next(()=>{if(!ei.result)return this.ws($,et,er,en).next($=>{ei.result=$})}).next(()=>{if(ei.result)return;let en=new QueryContext;return this.Ss($,et,en).next(er=>{if(ei.result=er,this.Vs)return this.bs($,et,en,er.size)})}).next(()=>ei.result)}bs($,et,en,er){return en.documentReadCount<this.fs?(__PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("QueryEngine","SDK will not create cache indexes for query:",__PRIVATE_stringifyQuery(et),"since it only creates cache indexes for collection contains","more than or equal to",this.fs,"documents"),PersistencePromise.resolve()):(__PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("QueryEngine","Query:",__PRIVATE_stringifyQuery(et),"scans",en.documentReadCount,"local documents and returns",er,"documents as results."),en.documentReadCount>this.gs*er?(__PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("QueryEngine","The SDK decides to create cache indexes for query:",__PRIVATE_stringifyQuery(et),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes($,__PRIVATE_queryToTarget(et))):PersistencePromise.resolve())}ys($,et){if(__PRIVATE_queryMatchesAllDocuments(et))return PersistencePromise.resolve(null);let en=__PRIVATE_queryToTarget(et);return this.indexManager.getIndexType($,en).next(er=>0===er?null:(null!==et.limit&&1===er&&(en=__PRIVATE_queryToTarget(et=__PRIVATE_queryWithLimit(et,null,"F"))),this.indexManager.getDocumentsMatchingTarget($,en).next(er=>{let ei=__PRIVATE_documentKeySet(...er);return this.ps.getDocuments($,ei).next(er=>this.indexManager.getMinOffset($,en).next(en=>{let eo=this.Ds(et,er);return this.Cs(et,eo,ei,en.readTime)?this.ys($,__PRIVATE_queryWithLimit(et,null,"F")):this.vs($,eo,et,en)}))})))}ws($,et,en,er){return __PRIVATE_queryMatchesAllDocuments(et)||er.isEqual(SnapshotVersion.min())?PersistencePromise.resolve(null):this.ps.getDocuments($,en).next(ei=>{let eo=this.Ds(et,ei);return this.Cs(et,eo,en,er)?PersistencePromise.resolve(null):(__PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("QueryEngine","Re-using previous result from %s to execute query: %s",er.toString(),__PRIVATE_stringifyQuery(et)),this.vs($,eo,et,function($,et){let en=$.toTimestamp().seconds,er=$.toTimestamp().nanoseconds+1,ei=SnapshotVersion.fromTimestamp(1e9===er?new Timestamp(en+1,0):new Timestamp(en,er));return new IndexOffset(ei,DocumentKey.empty(),-1)}(er,0)).next($=>$))})}Ds($,et){let en=new SortedSet(__PRIVATE_newQueryComparator($));return et.forEach((et,er)=>{__PRIVATE_queryMatches($,er)&&(en=en.add(er))}),en}Cs($,et,en,er){if(null===$.limit)return!1;if(en.size!==et.size)return!0;let ei="F"===$.limitType?et.last():et.first();
1026return!!ei&&(ei.hasPendingWrites||ei.version.compareTo(er)>0)}Ss($,et,en){return __PRIVATE_getLogLevel()<=ew.in.DEBUG&&__PRIVATE_logDebug("QueryEngine","Using full collection scan to execute query:",__PRIVATE_stringifyQuery(et)),this.ps.getDocumentsMatchingQuery($,et,IndexOffset.min(),en)}vs($,et,en,er){return this.ps.getDocumentsMatchingQuery($,en,er).next($=>(et.forEach(et=>{$=$.insert(et.key,et)}),$))}};/** 1027 * @license 1028 * Copyright 2020 Google LLC 1029 * 1030 * Licensed under the Apache License, Version 2.0 (the "License"); 1031 * you may not use this file except in compliance with the License. 1032 * You may obtain a copy of the License at 1033 * 1034 * http://www.apache.org/licenses/LICENSE-2.0 1035 * 1036 * Unless required by applicable law or agreed to in writing, software 1037 * distributed under the License is distributed on an "AS IS" BASIS, 1038 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1039 * See the License for the specific language governing permissions and 1040 * limitations under the License. 1041 */let e3="LocalStore";let __PRIVATE_LocalStoreImpl=class __PRIVATE_LocalStoreImpl{constructor($,et,en,er){this.persistence=$,this.Fs=et,this.serializer=er,this.Ms=new SortedMap(__PRIVATE_primitiveComparator),this.xs=new ObjectMap($=>__PRIVATE_canonifyTarget($),__PRIVATE_targetEquals),this.Os=new Map,this.Ns=$.getRemoteDocumentCache(),this.Pi=$.getTargetCache(),this.Ii=$.getBundleCache(),this.Bs(en)}Bs($){this.documentOverlayCache=this.persistence.getDocumentOverlayCache($),this.indexManager=this.persistence.getIndexManager($),this.mutationQueue=this.persistence.getMutationQueue($,this.indexManager),this.localDocuments=new LocalDocumentsView(this.Ns,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ns.setIndexManager(this.indexManager),this.Fs.initialize(this.localDocuments,this.indexManager)}collectGarbage($){return this.persistence.runTransaction("Collect garbage","readwrite-primary",et=>$.collect(et,this.Ms))}};async function __PRIVATE_localStoreHandleUserChange($,et){return await $.persistence.runTransaction("Handle user change","readonly",en=>{let er;return $.mutationQueue.getAllMutationBatches(en).next(ei=>(er=ei,$.Bs(et),$.mutationQueue.getAllMutationBatches(en))).next(et=>{let ei=[],eo=[],es=__PRIVATE_documentKeySet();for(let $ of er)for(let et of(ei.push($.batchId),$.mutations))es=es.add(et.key);for(let $ of et)for(let et of(eo.push($.batchId),$.mutations))es=es.add(et.key);return $.localDocuments.getDocuments(en,es).next($=>({Ls:$,removedBatchIds:ei,addedBatchIds:eo}))})})}function __PRIVATE_localStoreGetLastRemoteSnapshotVersion($){return $.persistence.runTransaction("Get last remote snapshot version","readonly",et=>$.Pi.getLastRemoteSnapshotVersion(et))}async function __PRIVATE_localStoreReleaseTarget($,et,en){let er=$.Ms.get(et);try{en||await $.persistence.runTransaction("Release target",en?"readwrite":"readwrite-primary",et=>$.persistence.referenceDelegate.removeTarget(et,er))}catch($){if(!__PRIVATE_isIndexedDbTransactionError($))throw $;__PRIVATE_logDebug(e3,`Failed to update sequence numbers for target ${et}: ${$}`)}$.Ms=$.Ms.remove(et),$.xs.delete(er.target)}function __PRIVATE_localStoreExecuteQuery($,et,en){let er=SnapshotVersion.min(),ei=__PRIVATE_documentKeySet();return $.persistence.runTransaction("Execute query","readwrite",eo=>(function($,et,en){let er=$.xs.get(en);return void 0!==er?PersistencePromise.resolve($.Ms.get(er)):$.Pi.getTargetData(et,en)})($,eo,__PRIVATE_queryToTarget(et)).next(et=>{if(et)return er=et.lastLimboFreeSnapshotVersion,$.Pi.getMatchingKeysForTargetId(eo,et.targetId).next($=>{ei=$})}).next(()=>$.Fs.getDocumentsMatchingQuery(eo,et,en?er:SnapshotVersion.min(),en?ei:__PRIVATE_documentKeySet())).next(en=>{var er;let eo;return er=et.collectionGroup||(et.path.length%2==1?et.path.lastSegment():et.path.get(et.path.length-2)),eo=$.Os.get(er)||SnapshotVersion.min(),en.forEach(($,et)=>{et.readTime.compareTo(eo)>0&&(eo=et.readTime)}),$.Os.set(er,eo),{documents:en,Qs:ei}}))}let __PRIVATE_LocalClientState=class __PRIVATE_LocalClientState{constructor(){this.activeTargetIds=eQ}zs($){this.activeTargetIds=this.activeTargetIds.add($)}js($){this.activeTargetIds=this.activeTargetIds.delete($)}Gs(){let $={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify($)}};let __PRIVATE_MemorySharedClientState=class __PRIVATE_MemorySharedClientState{constructor(){this.Mo=new __PRIVATE_LocalClientState,this.xo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation($){}updateMutationState($,et,en){}addLocalQueryTarget($,et=!0){return et&&this.Mo.zs($),this.xo[$]||"not-current"}updateQueryState($,et,en){this.xo[$]=et}removeLocalQueryTarget($){this.Mo.js($)}isLocalQueryTarget($){return this.Mo.activeTargetIds.has($)}clearQueryState($){delete this.xo[$]}getAllActiveQueryTargets(){return this.Mo.activeTargetIds}isActiveQueryTarget($){return this.Mo.activeTargetIds.has($)}start(){return this.Mo=new __PRIVATE_LocalClientState,Promise.resolve()}handleUserChange($,et,en){}setOnlineState($){}shutdown(){}writeSequenceNumber($){}notifyBundleLoaded($){}};/** 1042 * @license 1043 * Copyright 2019 Google LLC 1044 * 1045 * Licensed under the Apache License, Version 2.0 (the "License");
1046 * you may not use this file except in compliance with the License. 1047 * You may obtain a copy of the License at 1048 * 1049 * http://www.apache.org/licenses/LICENSE-2.0 1050 * 1051 * Unless required by applicable law or agreed to in writing, software 1052 * distributed under the License is distributed on an "AS IS" BASIS, 1053 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1054 * See the License for the specific language governing permissions and 1055 * limitations under the License. 1056 */let __PRIVATE_NoopConnectivityMonitor=class __PRIVATE_NoopConnectivityMonitor{Oo($){}shutdown(){}};/** 1057 * @license 1058 * Copyright 2019 Google LLC 1059 * 1060 * Licensed under the Apache License, Version 2.0 (the "License"); 1061 * you may not use this file except in compliance with the License. 1062 * You may obtain a copy of the License at 1063 * 1064 * http://www.apache.org/licenses/LICENSE-2.0 1065 * 1066 * Unless required by applicable law or agreed to in writing, software 1067 * distributed under the License is distributed on an "AS IS" BASIS, 1068 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1069 * See the License for the specific language governing permissions and 1070 * limitations under the License. 1071 */let e6="ConnectivityMonitor";let __PRIVATE_BrowserConnectivityMonitor=class __PRIVATE_BrowserConnectivityMonitor{constructor(){this.No=()=>this.Bo(),this.Lo=()=>this.ko(),this.qo=[],this.Qo()}Oo($){this.qo.push($)}shutdown(){window.removeEventListener("online",this.No),window.removeEventListener("offline",this.Lo)}Qo(){window.addEventListener("online",this.No),window.addEventListener("offline",this.Lo)}Bo(){for(let $ of(__PRIVATE_logDebug(e6,"Network connectivity changed: AVAILABLE"),this.qo))$(0)}ko(){for(let $ of(__PRIVATE_logDebug(e6,"Network connectivity changed: UNAVAILABLE"),this.qo))$(1)}static v(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}};/** 1072 * @license 1073 * Copyright 2023 Google LLC 1074 * 1075 * Licensed under the Apache License, Version 2.0 (the "License"); 1076 * you may not use this file except in compliance with the License. 1077 * You may obtain a copy of the License at 1078 * 1079 * http://www.apache.org/licenses/LICENSE-2.0 1080 * 1081 * Unless required by applicable law or agreed to in writing, software 1082 * distributed under the License is distributed on an "AS IS" BASIS, 1083 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1084 * See the License for the specific language governing permissions and 1085 * limitations under the License. 1086 */let e4=null;function __PRIVATE_generateUniqueDebugId(){return null===e4?e4=268435456+Math.round(2147483648*Math.random()):e4++,"0x"+e4.toString(16)}/** 1087 * @license 1088 * Copyright 2020 Google LLC 1089 * 1090 * Licensed under the Apache License, Version 2.0 (the "License"); 1091 * you may not use this file except in compliance with the License. 1092 * You may obtain a copy of the License at 1093 * 1094 * http://www.apache.org/licenses/LICENSE-2.0 1095 * 1096 * Unless required by applicable law or agreed to in writing, software 1097 * distributed under the License is distributed on an "AS IS" BASIS, 1098 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1099 * See the License for the specific language governing permissions and 1100 * limitations under the License. 1101 */let e9="RestConnection",e8={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};let __PRIVATE_RestConnection=class __PRIVATE_RestConnection{get $o(){return!1}constructor($){this.databaseInfo=$,this.databaseId=$.databaseId;let et=$.ssl?"https":"http",en=encodeURIComponent(this.databaseId.projectId),er=encodeURIComponent(this.databaseId.database);this.Uo=et+"://"+$.host,this.Ko=`projects/${en}/databases/${er}`,this.Wo=this.databaseId.database===eB?`project_id=${en}`:`project_id=${en}&database_id=${er}`}Go($,et,en,er,ei){let eo=__PRIVATE_generateUniqueDebugId(),es=this.zo($,et.toUriEncodedString());__PRIVATE_logDebug(e9,`Sending RPC '${$}' ${eo}:`,es,en);let el={"google-cloud-resource-prefix":this.Ko,"x-goog-request-params":this.Wo};this.jo(el,er,ei);let{host:eu}=new URL(es),ed=(0,ek.Xx)(eu);return this.Jo($,es,el,en,ed).then(et=>(__PRIVATE_logDebug(e9,`Received RPC '${$}' ${eo}: `,et),et),et=>{throw __PRIVATE_logWarn(e9,`RPC '${$}' ${eo} failed with error: `,et,"url: ",es,"request:",en),et})}Ho($,et,en,er,ei,eo){return this.Go($,et,en,er,ei)}jo($,et,en){$["X-Goog-Api-Client"]="gl-js/ fire/"+eN,$["Content-Type"]="text/plain",this.databaseInfo.appId&&($["X-Firebase-GMPID"]=this.databaseInfo.appId),et&&et.headers.forEac
vendor: 4,839 bytes, lines 1101-1131
1101h((et,en)=>$[en]=et),en&&en.headers.forEach((et,en)=>$[en]=et)}zo($,et){let en=e8[$];return`${this.Uo}/v1/${et}:${en}`}terminate(){}};/** 1102 * @license 1103 * Copyright 2017 Google LLC 1104 * 1105 * Licensed under the Apache License, Version 2.0 (the "License"); 1106 * you may not use this file except in compliance with the License. 1107 * You may obtain a copy of the License at 1108 * 1109 * http://www.apache.org/licenses/LICENSE-2.0 1110 * 1111 * Unless required by applicable law or agreed to in writing, software 1112 * distributed under the License is distributed on an "AS IS" BASIS, 1113 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1114 * See the License for the specific language governing permissions and 1115 * limitations under the License. 1116 */let __PRIVATE_StreamBridge=class __PRIVATE_StreamBridge{constructor($){this.Yo=$.Yo,this.Zo=$.Zo}Xo($){this.e_=$}t_($){this.n_=$}r_($){this.i_=$}onMessage($){this.s_=$}close(){this.Zo()}send($){this.Yo($)}o_(){this.e_()}__(){this.n_()}a_($){this.i_($)}u_($){this.s_($)}};/** 1117 * @license 1118 * Copyright 2017 Google LLC 1119 * 1120 * Licensed under the Apache License, Version 2.0 (the "License"); 1121 * you may not use this file except in compliance with the License. 1122 * You may obtain a copy of the License at 1123 * 1124 * http://www.apache.org/licenses/LICENSE-2.0 1125 * 1126 * Unless required by applicable law or agreed to in writing, software 1127 * distributed under the License is distributed on an "AS IS" BASIS, 1128 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1129 * See the License for the specific language governing permissions and 1130 * limitations under the License. 1131 */let e7="WebChannelConnection";let __PRIVATE_WebChannelConnection=class __PRIVATE_WebChannelConnection extends __PRIVATE_RestConnection{constructor($){super($),this.c_=[],this.forceLongPolling=$.forceLongPolling,this.autoDetectLongPolling=$.autoDetectLongPolling,this.useFetchStreams=$.useFetchStreams,this.longPollingOptions=$.longPollingOptions}Jo($,et,en,er,ei){let es=__PRIVATE_generateUniqueDebugId();return new Promise((ei,ed)=>{let eh=new eo;eh.setWithCredentials(!0),eh.listenOnce(el.COMPLETE,()=>{try{switch(eh.getLastErrorCode()){case eu.NO_ERROR:let et=eh.getResponseJson();__PRIVATE_logDebug(e7,`XHR for RPC '${$}' ${es} received:`,JSON.stringify(et)),ei(et);break;case eu.TIMEOUT:__PRIVATE_logDebug(e7,`RPC '${$}' ${es} timed out`),ed(new FirestoreError(eR.DEADLINE_EXCEEDED,"Request time out"));break;case eu.HTTP_ERROR:let en=eh.getStatus();if(__PRIVATE_logDebug(e7,`RPC '${$}' ${es} failed with status:`,en,"response text:",eh.getResponseText()),en>0){let $=eh.getResponseJson();Array.isArray($)&&($=$[0]);let et=$?.error;if(et&&et.status&&et.message){let $=function($){let et=$.toLowerCase().replace(/_/g,"-");return Object.values(eR).indexOf(et)>=0?et:eR.UNKNOWN}(et.status);ed(new FirestoreError($,et.message))}else ed(new FirestoreError(eR.UNKNOWN,"Server responded with status "+eh.getStatus()))}else ed(new FirestoreError(eR.UNAVAILABLE,"Connection failed."));break;default:fail(9055,{l_:$,streamId:es,h_:eh.getLastErrorCode(),P_:eh.getLastError()})}}finally{__PRIVATE_logDebug(e7,`RPC '${$}' ${es} completed.`)}});let ep=JSON.stringify(er);__PRIVATE_logDebug(e7,`RPC '${$}' ${es} sending request:`,er),eh.send(et,"POST",ep,en,15)})}T_($,et,en){let er=__PRIVATE_generateUniqueDebugId(),ei=[this.Uo,"/","google.firestore.v1.Firestore","/",$,"/channel"],eo=em(),el=ep(),eu={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},eg=this.longPollingOptions.timeoutSeconds;void 0!==eg&&(eu.longPollingTimeout=Math.round(1e3*eg)),this.useFetchStreams&&(eu.useFetchStreams=!0),this.jo(eu.initMessageHeaders,et,en),eu.encodeInitMessageHeaders=!0;let ey=ei.join("");__PRIVATE_logDebug(e7,`Creating RPC '${$}' stream ${er}: ${ey}`,eu);let ev=eo.createWebChannel(ey,eu);this.I_(ev);let ex=!1,e_=!1,ew=new __PRIVATE_StreamBridge({Yo:et=>{e_?__PRIVATE_logDebug(e7,`Not sending because RPC '${$}' stream ${er} is closed:`,et):(ex||(__PRIVATE_logDebug(e7,`Opening RPC '${$}' stream ${er} transport.`),ev.open(),ex=!0),__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} sending:`,et),ev.send(et))},Zo:()=>ev.close()}),__PRIVATE_unguardedEventListen=($,et,en)=>{$.listen(et,$=>{try{en($)}catch($){setTimeout(()=>{throw $},0)}})};return __PRIVATE_unguardedEventListen(ev,es.EventType.OPEN,()=>{e_||(__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} transport opened.`),ew.o_())}),__PRIVATE_unguardedEventListen(ev,es.EventType.CLOSE,()=>{e_||(e_=!0,__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} transport closed`),ew.a_(),this.E_(ev))}
1131),__PRIVATE_unguardedEventListen(ev,es.EventType.ERROR,et=>{e_||(e_=!0,__PRIVATE_logWarn(e7,`RPC '${$}' stream ${er} transport errored. Name:`,et.name,"Message:",et.message),ew.a_(new FirestoreError(eR.UNAVAILABLE,"The operation could not be completed")))}),__PRIVATE_unguardedEventListen(ev,es.EventType.MESSAGE,et=>{if(!e_){let en=et.data[0];__PRIVATE_hardAssert(!!en,16349);let ei=en?.error||en[0]?.error;if(ei){__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} received error:`,ei);let et=ei.status,en=function($){let et=ef[$];if(void 0!==et)return __PRIVATE_mapCodeFromRpcCode(et)}(et),eo=ei.message;void 0===en&&(en=eR.INTERNAL,eo="Unknown error status: "+et+" with message "+ei.message),e_=!0,ew.a_(new FirestoreError(en,eo)),ev.close()}else __PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} received:`,en),ew.u_(en)}}),__PRIVATE_unguardedEventListen(el,eh.STAT_EVENT,et=>{et.stat===ed.PROXY?__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} detected buffering proxy`):et.stat===ed.NOPROXY&&__PRIVATE_logDebug(e7,`RPC '${$}' stream ${er} detected no buffering proxy`)}),setTimeout(()=>{ew.__()},0),ew}terminate(){this.c_.forEach($=>$.close()),this.c_=[]}I_($){this.c_.push($)}E_($){this.c_=this.c_.filter(et=>et===$)}};function getDocument(){return"undefined"!=typeof document?document:null}/** 1132 * @license 1133 * Copyright 2020 Google LLC 1134 * 1135 * Licensed under the Apache License, Version 2.0 (the "License"); 1136 * you may not use this file except in compliance with the License. 1137 * You may obtain a copy of the License at 1138 * 1139 * http://www.apache.org/licenses/LICENSE-2.0 1140 * 1141 * Unless required by applicable law or agreed to in writing, software 1142 * distributed under the License is distributed on an "AS IS" BASIS, 1143 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1144 * See the License for the specific language governing permissions and 1145 * limitations under the License. 1146 */function __PRIVATE_newSerializer($){return new JsonProtoSerializer($,!0)}/** 1147 * @license 1148 * Copyright 2017 Google LLC 1149 * 1150 * Licensed under the Apache License, Version 2.0 (the "License"); 1151 * you may not use this file except in compliance with the License. 1152 * You may obtain a copy of the License at 1153 * 1154 * http://www.apache.org/licenses/LICENSE-2.0 1155 * 1156 * Unless required by applicable law or agreed to in writing, software 1157 * distributed under the License is distributed on an "AS IS" BASIS, 1158 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1159 * See the License for the specific language governing permissions and 1160 * limitations under the License. 1161 */let __PRIVATE_ExponentialBackoff=class __PRIVATE_ExponentialBackoff{constructor($,et,en=1e3,er=1.5,ei=6e4){this.Mi=$,this.timerId=et,this.d_=en,this.A_=er,this.R_=ei,this.V_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.V_=0}g_(){this.V_=this.R_}p_($){this.cancel();let et=Math.floor(this.V_+this.y_()),en=Math.max(0,Date.now()-this.f_),er=Math.max(0,et-en);er>0&&__PRIVATE_logDebug("ExponentialBackoff",`Backing off for ${er} ms (base delay: ${this.V_} ms, delay with jitter: ${et} ms, last attempt: ${en} ms ago)`),this.m_=this.Mi.enqueueAfterDelay(this.timerId,er,()=>(this.f_=Date.now(),$())),this.V_*=this.A_,this.V_<this.d_&&(this.V_=this.d_),this.V_>this.R_&&(this.V_=this.R_)}w_(){null!==this.m_&&(this.m_.skipDelay(),this.m_=null)}cancel(){null!==this.m_&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.V_}};/** 1162 * @license 1163 * Copyright 2017 Google LLC 1164 * 1165 * Licensed under the Apache License, Version 2.0 (the "License"); 1166 * you may not use this file except in compliance with the License. 1167 * You may obtain a copy of the License at 1168 * 1169 * http://www.apache.org/licenses/LICENSE-2.0 1170 * 1171 * Unless required by applicable law or agreed to in writing, software 1172 * distributed under the License is distributed on an "AS IS" BASIS, 1173 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1174 * See the License for the specific language governing permissions and 1175 * limitations under the License. 1176 */let tt="PersistentStream";let __PRIVATE_PersistentStream=class __PRIVATE_PersistentStream{constructor($,et,en,er,ei,eo,es,el){this.Mi=$,this.S_=en,this.b_=er,this.connection=ei,this.authCredentialsProvider=eo,this.appCheckCredentialsProvider=es,this.listener=el,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new __PRIVATE_ExponentialBackoff($,et)}x_(){return 1===this.state||5===this.state||this.O_()}O_(){return 2===this.state||3===this.state}start(){this.F_=0,4!==this.state?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&null===this.C_&&(this.C_=this.Mi.enqueueAfterDelay(this.S_,6e4,()=>this.k_()))}q_($){this.Q_(),this.stream.send($)}
1176async k_(){if(this.O_())return this.close(0)}Q_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close($,et){this.Q_(),this.U_(),this.M_.cancel(),this.D_++,4!==$?this.M_.reset():et&&et.code===eR.RESOURCE_EXHAUSTED?(__PRIVATE_logError(et.toString()),__PRIVATE_logError("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):et&&et.code===eR.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.K_(),this.stream.close(),this.stream=null),this.state=$,await this.listener.r_(et)}K_(){}auth(){this.state=1;let $=this.W_(this.D_),et=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([$,en])=>{this.D_===et&&this.G_($,en)},et=>{$(()=>{let $=new FirestoreError(eR.UNKNOWN,"Fetching auth token failed: "+et.message);return this.z_($)})})}G_($,et){let en=this.W_(this.D_);this.stream=this.j_($,et),this.stream.Xo(()=>{en(()=>this.listener.Xo())}),this.stream.t_(()=>{en(()=>(this.state=2,this.v_=this.Mi.enqueueAfterDelay(this.b_,1e4,()=>(this.O_()&&(this.state=3),Promise.resolve())),this.listener.t_()))}),this.stream.r_($=>{en(()=>this.z_($))}),this.stream.onMessage($=>{en(()=>1==++this.F_?this.J_($):this.onNext($))})}N_(){this.state=5,this.M_.p_(async()=>{this.state=0,this.start()})}z_($){return __PRIVATE_logDebug(tt,`close with error: ${$}`),this.stream=null,this.close(4,$)}W_($){return et=>{this.Mi.enqueueAndForget(()=>this.D_===$?et():(__PRIVATE_logDebug(tt,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}};let __PRIVATE_PersistentListenStream=class __PRIVATE_PersistentListenStream extends __PRIVATE_PersistentStream{constructor($,et,en,er,ei,eo){super($,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",et,en,er,eo),this.serializer=ei}j_($,et){return this.connection.T_("Listen",$,et)}J_($){return this.onNext($)}onNext($){this.M_.reset();let et=function($,et){let en;if("targetChange"in et){var er,ei;et.targetChange;let eo="NO_CHANGE"===(er=et.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===er?1:"REMOVE"===er?2:"CURRENT"===er?3:"RESET"===er?4:fail(39313,{state:er}),es=et.targetChange.targetIds||[],el=(ei=et.targetChange.resumeToken,$.useProto3Json?(__PRIVATE_hardAssert(void 0===ei||"string"==typeof ei,58123),ByteString.fromBase64String(ei||"")):(__PRIVATE_hardAssert(void 0===ei||ei instanceof eT||ei instanceof Uint8Array,16193),ByteString.fromUint8Array(ei||new Uint8Array))),eu=et.targetChange.cause,ed=eu&&function($){let et=void 0===$.code?eR.UNKNOWN:__PRIVATE_mapCodeFromRpcCode($.code);return new FirestoreError(et,$.message||"")}(eu);en=new __PRIVATE_WatchTargetChange(eo,es,el,ed||null)}else if("documentChange"in et){et.documentChange;let er=et.documentChange;er.document,er.document.name,er.document.updateTime;let ei=fromName($,er.document.name),eo=__PRIVATE_fromVersion(er.document.updateTime),es=er.document.createTime?__PRIVATE_fromVersion(er.document.createTime):SnapshotVersion.min(),el=new ObjectValue({mapValue:{fields:er.document.fields}}),eu=MutableDocument.newFoundDocument(ei,eo,es,el),ed=er.targetIds||[],eh=er.removedTargetIds||[];en=new __PRIVATE_DocumentWatchChange(ed,eh,eu.key,eu)}else if("documentDelete"in et){et.documentDelete;let er=et.documentDelete;er.document;let ei=fromName($,er.document),eo=er.readTime?__PRIVATE_fromVersion(er.readTime):SnapshotVersion.min(),es=MutableDocument.newNoDocument(ei,eo),el=er.removedTargetIds||[];en=new __PRIVATE_DocumentWatchChange([],el,es.key,es)}else if("documentRemove"in et){et.documentRemove;let er=et.documentRemove;er.document;let ei=fromName($,er.document),eo=er.removedTargetIds||[];en=new __PRIVATE_DocumentWatchChange([],eo,ei,null)}else{if(!("filter"in et))return fail(11601,{Rt:et});{et.filter;let $=et.filter;$.targetId;let{count:er=0,unchangedNames:ei}=$,eo=new ExistenceFilter(er,ei),es=$.targetId;en=new __PRIVATE_ExistenceFilterChange(es,eo)}}return en}(this.serializer,$),en=function($){if(!("targetChange"in $))return SnapshotVersion.min();let et=$.targetChange;return et.targetIds&&et.targetIds.length?SnapshotVersion.min():et.readTime?__PRIVATE_fromVersion(et.readTime):SnapshotVersion.min()}($);return this.listener.H_(et,en)}Y_($){let et={};et.database=__PRIVATE_getEncodedDatabaseId(this.serializer),et.addTarget=function($,et){let en;let er=et.target;if((en=__PRIVATE_targetIsDocumentTarget(er)?{documents:{documents:[__PRIVATE_toQueryPath($,er.path)]}}:{query:__PRIVATE_toQueryTarget($,er).ft}).targetId=et.targetId,et.resumeToken.approximateByteSize()>0){en.resumeToken=__PRIVATE_toBytes($,et.resumeToken);let er=__PRIVATE_toInt32Proto($,et.expectedCount);null!==er&&(en.expectedCount=er)}else if(et.snapshotVersion.compareTo(SnapshotVersion.min())>0){en.readTime=toTimestamp($,et.snapshotVersion.toTimestamp());let er=__PRIVATE_toInt32Proto($,et.expectedCount);null!==er&&(en.expectedCount=er)}return en}(this.serializer,$);let en=function($,et){let en=function($){switch($){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return fail(28987,{purpose:$})}}(et.purpose);return null==en?null:{"goog-listen-tags":en}}(this.serializer,$);en&&(et.labels=en),this.q_(et)}Z_($){let et={};et.database=__PRIVATE_getEncodedDatabaseId(this.serializer),et.removeTarget=$,this.q_(et)}};let __PRIVATE_PersistentWriteStream=class __PRIVATE_PersistentWriteStream extends __PRIVATE_PersistentStream{constructor($,et,en,er,ei,eo){super($,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",et,en,er,eo),this.serializer
1176=ei}get X_(){return this.F_>0}start(){this.lastStreamToken=void 0,super.start()}K_(){this.X_&&this.ea([])}j_($,et){return this.connection.T_("Write",$,et)}J_($){return __PRIVATE_hardAssert(!!$.streamToken,31322),this.lastStreamToken=$.streamToken,__PRIVATE_hardAssert(!$.writeResults||0===$.writeResults.length,55816),this.listener.ta()}onNext($){var et,en;__PRIVATE_hardAssert(!!$.streamToken,12678),this.lastStreamToken=$.streamToken,this.M_.reset();let er=(et=$.writeResults,en=$.commitTime,et&&et.length>0?(__PRIVATE_hardAssert(void 0!==en,14353),et.map($=>{let et;return(et=$.updateTime?__PRIVATE_fromVersion($.updateTime):__PRIVATE_fromVersion(en)).isEqual(SnapshotVersion.min())&&(et=__PRIVATE_fromVersion(en)),new MutationResult(et,$.transformResults||[])})):[]),ei=__PRIVATE_fromVersion($.commitTime);return this.listener.na(ei,er)}ra(){let $={};$.database=__PRIVATE_getEncodedDatabaseId(this.serializer),this.q_($)}ea($){let et={streamToken:this.lastStreamToken,writes:$.map($=>toMutation(this.serializer,$))};this.q_(et)}};/** 1177 * @license 1178 * Copyright 2017 Google LLC 1179 * 1180 * Licensed under the Apache License, Version 2.0 (the "License"); 1181 * you may not use this file except in compliance with the License. 1182 * You may obtain a copy of the License at 1183 * 1184 * http://www.apache.org/licenses/LICENSE-2.0 1185 * 1186 * Unless required by applicable law or agreed to in writing, software 1187 * distributed under the License is distributed on an "AS IS" BASIS, 1188 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1189 * See the License for the specific language governing permissions and 1190 * limitations under the License. 1191 */let Datastore=class Datastore{};let __PRIVATE_DatastoreImpl=class __PRIVATE_DatastoreImpl extends Datastore{constructor($,et,en,er){super(),this.authCredentials=$,this.appCheckCredentials=et,this.connection=en,this.serializer=er,this.ia=!1}sa(){if(this.ia)throw new FirestoreError(eR.FAILED_PRECONDITION,"The client has already been terminated.")}Go($,et,en,er){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([ei,eo])=>this.connection.Go($,__PRIVATE_toResourcePath(et,en),er,ei,eo)).catch($=>{throw"FirebaseError"===$.name?($.code===eR.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),$):new FirestoreError(eR.UNKNOWN,$.toString())})}Ho($,et,en,er,ei){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([eo,es])=>this.connection.Ho($,__PRIVATE_toResourcePath(et,en),er,eo,es,ei)).catch($=>{throw"FirebaseError"===$.name?($.code===eR.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),$):new FirestoreError(eR.UNKNOWN,$.toString())})}terminate(){this.ia=!0,this.connection.terminate()}};let __PRIVATE_OnlineStateTracker=class __PRIVATE_OnlineStateTracker{constructor($,et){this.asyncQueue=$,this.onlineStateHandler=et,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){0===this.oa&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve())))}ha($){"Online"===this.state?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${$.toString()}`),this.ca("Offline")))}set($){this.Pa(),this.oa=0,"Online"===$&&(this.aa=!1),this.ca($)}ca($){$!==this.state&&(this.state=$,this.onlineStateHandler($))}la($){let et=`Could not reach Cloud Firestore backend. ${$} 1192This 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.aa?(__PRIVATE_logError(et),this.aa=!1):__PRIVATE_logDebug("OnlineStateTracker",et)}Pa(){null!==this._a&&(this._a.cancel(),this._a=null)}};/** 1193 * @license 1194 * Copyright 2017 Google LLC 1195 * 1196 * Licensed under the Apache License, Version 2.0 (the "License"); 1197 * you may not use this file except in compliance with the License. 1198 * You may obtain a copy of the License at 1199 * 1200 * http://www.apache.org/licenses/LICENSE-2.0 1201 * 1202 * Unless required by applicable law or agreed to in writing, softw
1202are 1203 * distributed under the License is distributed on an "AS IS" BASIS, 1204 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1205 * See the License for the specific language governing permissions and 1206 * limitations under the License. 1207 */let tn="RemoteStore";let __PRIVATE_RemoteStoreImpl=class __PRIVATE_RemoteStoreImpl{constructor($,et,en,er,ei){this.localStore=$,this.datastore=et,this.asyncQueue=en,this.remoteSyncer={},this.Ta=[],this.Ia=new Map,this.Ea=new Set,this.da=[],this.Aa=ei,this.Aa.Oo($=>{en.enqueueAndForget(async()=>{__PRIVATE_canUseNetwork(this)&&(__PRIVATE_logDebug(tn,"Restarting streams for network reachability change."),await async function($){$.Ea.add(4),await __PRIVATE_disableNetworkInternal($),$.Ra.set("Unknown"),$.Ea.delete(4),await __PRIVATE_enableNetworkInternal($)}(this))})}),this.Ra=new __PRIVATE_OnlineStateTracker(en,er)}};async function __PRIVATE_enableNetworkInternal($){if(__PRIVATE_canUseNetwork($))for(let et of $.da)await et(!0)}async function __PRIVATE_disableNetworkInternal($){for(let et of $.da)
1207await et(!1)}function __PRIVATE_remoteStoreListen($,et){$.Ia.has(et.targetId)||($.Ia.set(et.targetId,et),__PRIVATE_shouldStartWatchStream($)?__PRIVATE_startWatchStream($):__PRIVATE_ensureWatchStream($).O_()&&__PRIVATE_sendWatchRequest($,et))}function __PRIVATE_remoteStoreUnlisten($,et){let en=__PRIVATE_ensureWatchStream($);$.Ia.delete(et),en.O_()&&__PRIVATE_sendUnwatchRequest($,et),0===$.Ia.size&&(en.O_()?en.L_():__PRIVATE_canUseNetwork($)&&$.Ra.set("Unknown"))}function __PRIVATE_sendWatchRequest($,et){if($.Va.Ue(et.targetId),et.resumeToken.approximateByteSize()>0||et.snapshotVersion.compareTo(SnapshotVersion.min())>0){let en=$.remoteSyncer.getRemoteKeysForTarget(et.targetId).size;et=et.withExpectedCount(en)}__PRIVATE_ensureWatchStream($).Y_(et)}function __PRIVATE_sendUnwatchRequest($,et){$.Va.Ue(et),__PRIVATE_ensureWatchStream($).Z_(et)}function __PRIVATE_startWatchStream($){$.Va=new __PRIVATE_WatchChangeAggregator({getRemoteKeysForTarget:et=>$.remoteSyncer.getRemoteKeysForTarget(et),At:et=>$.Ia.get(et)||null,ht:()=>$.datastore.serializer.databaseId}),__PRIVATE_ensureWatchStream($).start(),$.Ra.ua()}function __PRIVATE_shouldStartWatchStream($){return __PRIVATE_canUseNetwork($)&&!__PRIVATE_ensureWatchStream($).x_()&&$.Ia.size>0}function __PRIVATE_canUseNetwork($){return 0===$.Ea.size}async function __PRIVATE_onWatchStreamConnected($){$.Ra.set("Online")}async function __PRIVATE_onWatchStreamOpen($){$.Ia.forEach((et,en)=>{__PRIVATE_sendWatchRequest($,et)})}async function __PRIVATE_onWatchStreamClose($,et){$.Va=void 0,__PRIVATE_shouldStartWatchStream($)?($.Ra.ha(et),__PRIVATE_startWatchStream($)):$.Ra.set("Unknown")}async function __PRIVATE_onWatchStreamChange($,et,en){if($.Ra.set("Online"),et instanceof __PRIVATE_WatchTargetChange&&2===et.state&&et.cause)try{await async function($,et){let en=et.cause;for(let er of et.targetIds)$.Ia.has(er)&&(await $.remoteSyncer.rejectListen(er,en),$.Ia.delete(er),$.Va.removeTarget(er))}($,et)}catch(en){__PRIVATE_logDebug(tn,"Failed to remove targets %s: %s ",et.targetIds.join(","),en),await __PRIVATE_disableNetworkUntilRecovery($,en)}else if(et instanceof __PRIVATE_DocumentWatchChange?$.Va.Ze(et):et instanceof __PRIVATE_ExistenceFilterChange?$.Va.st(et):$.Va.tt(et),!en.isEqual(SnapshotVersion.min()))try{let et=await __PRIVATE_localStoreGetLastRemoteSnapshotVersion($.localStore);en.compareTo(et)>=0&&await function($,et){let en=$.Va.Tt(et);
1207return en.targetChanges.forEach((en,er)=>{if(en.resumeToken.approximateByteSize()>0){let ei=$.Ia.get(er);ei&&$.Ia.set(er,ei.withResumeToken(en.resumeToken,et))}}),en.targetMismatches.forEach((et,en)=>{let er=$.Ia.get(et);if(!er)return;$.Ia.set(et,er.withResumeToken(ByteString.EMPTY_BYTE_STRING,er.snapshotVersion)),__PRIVATE_sendUnwatchRequest($,et);let ei=new TargetData(er.target,et,en,er.sequenceNumber);__PRIVATE_sendWatchRequest($,ei)}),$.remoteSyncer.applyRemoteEvent(en)}($,en)}catch(et){__PRIVATE_logDebug(tn,"Failed to raise snapshot:",et),await __PRIVATE_disableNetworkUntilRecovery($,et)}}async function __PRIVATE_disableNetworkUntilRecovery($,et,en){if(!__PRIVATE_isIndexedDbTransactionError(et))throw et;$.Ea.add(1),await __PRIVATE_disableNetworkInternal($),$.Ra.set("Offline"),en||(en=()=>__PRIVATE_localStoreGetLastRemoteSnapshotVersion($.localStore)),$.asyncQueue.enqueueRetryable(async()=>{__PRIVATE_logDebug(tn,"Retrying IndexedDB access"),await en(),$.Ea.delete(1),await __PRIVATE_enableNetworkInternal($)})}function __PRIVATE_executeWithRecovery($,et){return et().catch(en=>__PRIVATE_disableNetworkUntilRecovery($,en,et))}async function __PRIVATE_fillWritePipeline($){let et=__PRIVATE_ensureWriteStream($),en=$.Ta.length>0?$.Ta[$.Ta.length-1].batchId:-1;for(;__PRIVATE_canUseNetwork($)&&$.Ta.length<10;)try{let er=await function($,et){return $.persistence.runTransaction("Get next mutation batch","readonly",en=>(void 0===et&&(et=-1),$.mutationQueue.getNextMutationBatchAfterBatchId(en,et)))}($.localStore,en);if(null===er){0===$.Ta.length&&et.L_();break}en=er.batchId,function($,et){$.Ta.push(et);let en=__PRIVATE_ensureWriteStream($);en.O_()&&en.X_&&en.ea(et.mutations)}($,er)}catch(et){await __PRIVATE_disableNetworkUntilRecovery($,et)}__PRIVATE_shouldStartWriteStream($)&&__PRIVATE_startWriteStream($)}function __PRIVATE_shouldStartWriteStream($){return __PRIVATE_canUseNetwork($)&&!__PRIVATE_ensureWriteStream($).x_()&&$.Ta.length>0}function __PRIVATE_startWriteStream($){__PRIVATE_ensureWriteStream($).start()}async function __PRIVATE_onWriteStreamOpen($){__PRIVATE_ensureWriteStream($).ra()}async function __PRIVATE_onWriteHandshakeComplete($){let et=__PRIVATE_ensureWriteStream($);for(let en of $.Ta)et.ea(en.mutations)}async function __PRIVATE_onMutationResult($,et,en){let er=$.Ta.shift(),ei=MutationBatchResult.from(er,et,en);await __PRIVATE_executeWithRecovery($,()=>$.remoteSyncer.applySuccessfulWrite(ei)),await __PRIVATE_fillWritePipeline($)}async function __PRIVATE_onWriteStreamClose($,et){et&&__PRIVATE_ensureWriteStream($).X_&&await async function($,et){var en;if(__PRIVATE_isPermanentError(en=et.code)&&en!==eR.ABORTED){let en=$.Ta.shift();__PRIVATE_ensureWriteStream($).B_(),await __PRIVATE_executeWithRecovery($,()=>$.remoteSyncer.rejectFailedWrite(en.batchId,et)),await __PRIVATE_fillWritePipeline($)}}($,et),__PRIVATE_shouldStartWriteStream($)&&__PRIVATE_startWriteStream($)}async function __PRIVATE_remoteStoreHandleCredentialChange($,et){$.asyncQueue.verifyOperationInProgress(),__PRIVATE_logDebug(tn,"RemoteStore received new credentials");let en=__PRIVATE_canUseNetwork($);$.Ea.add(3),await __PRIVATE_disableNetworkInternal($),en&&$.Ra.set("Unknown"),await $.remoteSyncer.handleCredentialChange(et),$.Ea.delete(3),await __PRIVATE_enableNetworkInternal($)}async function __PRIVATE_remoteStoreApplyPrimaryState($,et){et?($.Ea.delete(2),await __PRIVATE_enableNetworkInternal($)):et||($.Ea.add(2),await __PRIVATE_disableNetworkInternal($),$.Ra.set("Unknown"))}function __PRIVATE_ensureWatchStream($){var et,en,er;return $.ma||($.ma=(et=$.datastore,en=$.asyncQueue,er={Xo:__PRIVATE_onWatchStreamConnected.bind(null,$),t_:__PRIVATE_onWatchStreamOpen.bind(null,$),r_:__PRIVATE_onWatchStreamClose.bind(null,$),H_:__PRIVATE_onWatchStreamChange.bind(null,$)},et.sa(),new __PRIVATE_PersistentListenStream(en,et.connection,et.authCredentials,et.appCheckCredentials,et.serializer,er)),$.da.push(async et=>{et?($.ma.B_(),__PRIVATE_shouldStartWatchStream($)?__PRIVATE_startWatchStream($):$.Ra.set("Unknown")):(await $.ma.stop(),$.Va=void 0)})),$.ma}function __PRIVATE_ensureWriteStream($){var et,en,er;return $.fa||($.fa=(et=$.datastore,en=$.asyncQueue,er={Xo:()=>Promise.resolve(),t_:__PRIVATE_onWriteStreamOpen.bind(null,$),r_:__PRIVATE_onWriteStreamClose.bind(null,$),ta:__PRIVATE_onWriteHandshakeComplete.bind(null,$),na:__PRIVATE_onMutationResult.bind(null,$)},et.sa(),new __PRIVATE_PersistentWriteStream(en,et.connection,et.authCredentials,et.appCheckCredentials,et.serializer,er)),$.da.push(async et=>{et?($.fa.B_(),await __PRIVATE_fillWritePipeline($)):(await $.fa.stop(),$.Ta.length>0&&(__PRIVATE_logDebug(tn,`Stopping write stream with ${$.Ta.length} pending writes`),$.Ta=[]))})),$.fa}/** 1208 * @license 1209 * Copyright 2017 Google LLC 1210 * 1211 * Licensed under the Apache License, Version 2.0 (the "License");
1212 * you may not use this file except in compliance with the License. 1213 * You may obtain a copy of the License at 1214 * 1215 * http://www.apache.org/licenses/LICENSE-2.0 1216 * 1217 * Unless required by applicable law or agreed to in writing, software 1218 * distributed under the License is distributed on an "AS IS" BASIS, 1219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1220 * See the License for the specific language governing permissions and 1221 * limitations under the License. 1222 */let DelayedOperation=class DelayedOperation{constructor($,et,en,er,ei){this.asyncQueue=$,this.timerId=et,this.targetTimeMs=en,this.op=er,this.removalCallback=ei,this.deferred=new __PRIVATE_Deferred,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch($=>{})}get promise(){return this.deferred.promise}static createAndSchedule($,et,en,er,ei){let eo=Date.now()+en,es=new DelayedOperation($,et,eo,er,ei);return es.start(en),es}start($){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),$)}skipDelay(){return this.handleDelayElapsed()}cancel($){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new FirestoreError(eR.CANCELLED,"Operation cancelled"+($?": "+$:"")))
1222)}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then($=>this.deferred.resolve($))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};function __PRIVATE_wrapInUserErrorIfRecoverable($,et){if(__PRIVATE_logError("AsyncQueue",`${et}: ${$}`),__PRIVATE_isIndexedDbTransactionError($))return new FirestoreError(eR.UNAVAILABLE,`${et}: ${$}`);throw $}/** 1223 * @license 1224 * Copyright 2017 Google LLC 1225 * 1226 * Licensed under the Apache License, Version 2.0 (the "License"); 1227 * you may not use this file except in compliance with the License. 1228 * You may obtain a copy of the License at 1229 * 1230 * http://www.apache.org/licenses/LICENSE-2.0 1231 * 1232 * Unless required by applicable law or agreed to in writing, software 1233 * distributed under the License is distributed on an "AS IS" BASIS, 1234 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1235 * See the License for the specific language governing permissions and 1236 * limitations under the License. 1237 */let DocumentSet=class DocumentSet{static emptySet($){return new DocumentSet($.comparator)}constructor($){this.comparator=$?(et,en)=>$(et,en)||DocumentKey.comparator(et.key,en.key):($,et)=>DocumentKey.comparator($.key,et.key),this.keyedMap=documentMap(),this.sortedSet=new SortedMap(this.comparator)}has($){return null!=this.keyedMap.get($)}get($){return this.keyedMap.get($)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf($){let et=this.keyedMap.get($);return et?this.sortedSet.indexOf(et):-1}get size(){return this.sortedSet.size}forEach($){this.sortedSet.inorderTraversal((et,en)=>($(et),!1))}add($){let et=this.delete($.key);return et.copy(et.keyedMap.insert($.key,$),et.sortedSet.insert($,null))}delete($){let et=this.get($);return et?this.copy(this.keyedMap.remove($),this.sortedSet.remove(et)):this}isEqual($){if(!($ instanceof DocumentSet)||this.size!==$.size)return!1;let et=this.sortedSet.getIterator(),en=$.sortedSet.getIterator();for(;et.hasNext();){let $=et.getNext().key,er=en.getNext().key;if(!$.isEqual(er))return!1}return!0}toString(){let $=[];return this.forEach(et=>{$.push(et.toString())}),0===$.length?"DocumentSet ()":"DocumentSet (\n "+$.join(" \n")+"\n)"}copy($,et){let en=new DocumentSet;return en.comparator=this.comparator,en.keyedMap=$,en.sortedSet=et,en}};/** 1238 * @license 1239 * Copyright 2017 Google LLC 1240 * 1241 * Licensed under the Apache License, Version 2.0 (the "License"); 1242 * you may not use this file except in compliance with the License. 1243 * You may obtain a copy of the License at 1244 * 1245 * http://www.apache.org/licenses/LICENSE-2.0 1246 * 1247 * Unless required by applicable law or agreed to in writing, software 1248 * distributed under the License is distributed on an "AS IS" BASIS, 1249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1250 * See the License for the specific language governing permissions and 1251 * limitations under the License. 1252 */let __PRIVATE_DocumentChangeSet=class __PRIVATE_DocumentChangeSet{constructor(){this.ga=new SortedMap(DocumentKey.comparator)}track($){let et=$.doc.key,en=this.ga.get(et);en?0!==$.type&&3===en.type?this.ga=this.ga.insert(et,$):3===$.type&&1!==en.type?this.ga=this.ga.insert(et,{type:en.type,doc:$.doc}):2===$.type&&2===en.type?this.ga=this.ga.insert(et,{type:2,doc:$.doc}):2===$.type&&0===en.type?this.ga=this.ga.insert(et,{type:0,doc:$.doc}):1===$.type&&0===en.type?this.ga=this.ga.remove(et):1===$.type&&2===en.type?this.ga=this.ga.insert(et,{type:1,doc:en.doc}):0===$.type&&1===en.type?this.ga=this.ga.insert(et,{type:2,doc:$.doc}):fail(63341,{Rt:$,pa:en}):this.ga=this.ga.insert(et,$)}ya(){let $=[];return this.ga.inorderTraversal((et,en)=>{$.push(en)}),$}};
1252let ViewSnapshot=class ViewSnapshot{constructor($,et,en,er,ei,eo,es,el,eu){this.query=$,this.docs=et,this.oldDocs=en,this.docChanges=er,this.mutatedKeys=ei,this.fromCache=eo,this.syncStateChanged=es,this.excludesMetadataChanges=el,this.hasCachedResults=eu}static fromInitialDocuments($,et,en,er,ei){let eo=[];return et.forEach($=>{eo.push({type:0,doc:$})}),new ViewSnapshot($,et,DocumentSet.emptySet(et),eo,en,er,!0,!1,ei)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual($){if(!(this.fromCache===$.fromCache&&this.hasCachedResults===$.hasCachedResults&&this.syncStateChanged===$.syncStateChanged&&this.mutatedKeys.isEqual($.mutatedKeys)&&__PRIVATE_queryEquals(this.query,$.query)&&this.docs.isEqual($.docs)&&this.oldDocs.isEqual($.oldDocs)))return!1;let et=this.docChanges,en=$.docChanges;if(et.length!==en.length)return!1;for(let $=0;$<et.length;$++)if(et[$].type!==en[$].type||!et[$].doc.isEqual(en[$].doc))return!1;return!0}};/** 1253 * @license 1254 * Copyright 2017 Google LLC 1255 * 1256 * Licensed under the Apache License, Version 2.0 (the "License"); 1257 * you may not use this file except in compliance with the License. 1258 * You may obtain a copy of the License at 1259 * 1260 * http://www.apache.org/licenses/LICENSE-2.0 1261 * 1262 * Unless required by applicable law or agreed to in writing, software 1263 * distributed under the License is distributed on an "AS IS" BASIS, 1264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1265 * See the License for the specific language governing permissions and 1266 * limitations under the License. 1267 */let __PRIVATE_QueryListenersInfo=class __PRIVATE_QueryListenersInfo{constructor(){this.wa=void 0,this.Sa=[]}ba(){return this.Sa.some($=>$.Da())}};let __PRIVATE_EventManagerImpl=class __PRIVATE_EventManagerImpl{constructor(){this.queries=__PRIVATE_newQueriesObjectMap(),this.onlineState="Unknown",this.Ca=new Set}terminate(){!function($,et){let en=$.queries;$.queries=__PRIVATE_newQueriesObjectMap(),en.forEach(($,en)=>{for(let $ of en.Sa)$.onError(et)})}(this,new FirestoreError(eR.ABORTED,"Firestore shutting down"))}};function __PRIVATE_newQueriesObjectMap(){return new ObjectMap($=>__PRIVATE_canonifyQuery($),__PRIVATE_queryEquals)}async function __PRIVATE_eventManagerListen($,et){let en=3,er=et.query,ei=$.queries.get(er);ei?!ei.ba()&&et.Da()&&(en=2):(ei=new __PRIVATE_QueryListenersInfo,en=et.Da()?0:1);try{switch(en){case 0:ei.wa=await $.onListen(er,!0);break;case 1:ei.wa=await $.onListen(er,!1);break;case 2:await $.onFirstRemoteStoreListen(er)}}catch(en){let $=__PRIVATE_wrapInUserErrorIfRecoverable(en,`Initialization of query '${__PRIVATE_stringifyQuery(et.query)}' failed`);return void et.onError($)}$.queries.set(er,ei),ei.Sa.push(et),et.va($.onlineState),ei.wa&&et.Fa(ei.wa)&&__PRIVATE_raiseSnapshotsInSyncEvent($)}async function __PRIVATE_eventManagerUnlisten($,et){let en=et.query,er=3,ei=$.queries.get(en);if(ei){let $=ei.Sa.indexOf(et);$>=0&&(ei.Sa.splice($,1),0===ei.Sa.length?er=et.Da()?0:1:!ei.ba()&&et.Da()&&(er=2))}switch(er){case 0:return $.queries.delete(en),$.onUnlisten(en,!0);case 1:return $.queries.delete(en),$.onUnlisten(en,!1);case 2:return $.onLastRemoteStoreUnlisten(en);default:return}}function __PRIVATE_eventManagerOnWatchChange($,et){let en=!1;for(let er of et){let et=er.query,ei=$.queries.get(et);if(ei){for(let $ of ei.Sa)$.Fa(er)&&(en=!0);ei.wa=er}}en&&__PRIVATE_raiseSnapshotsInSyncEvent($)}function __PRIVATE_eventManagerOnWatchError($,et,en){let er=$.queries.get(et);if(er)for(let $ of er.Sa)$.onError(en);$.queries.delete(et)}function __PRIVATE_raiseSnapshotsInSyncEvent($){$.Ca.forEach($=>{$.next()})}(ev=ey||(ey={})).Ma="default",ev.Cache="cache";let __PRIVATE_QueryListener=class __PRIVATE_QueryListener{constructor($,et,en){this.query=$,this.xa=et,this.Oa=!1,this.Na=null,this.onlineState="Unknown",this.options=en||{}}Fa($){if(!this.options.includeMetadataChanges){let et=[];for(let en of $.docChanges)3!==en.type&&et.push(en);$=new ViewSnapshot($.query,$.docs,$.oldDocs,et,$.mutatedKeys,$.fromCache,$.syncStateChanged,!0,$.hasCachedResults)}let et=!1;return this.Oa?this.Ba($)&&(this.xa.next($),et=!0):this.La($,this.onlineState)&&(this.ka($),et=!0),this.Na=$,et}onError($){this.xa.error($)}va($){this.onlineState=$;let et=!1;return this.Na&&!this.Oa&&this.La(this.Na,$)&&(this.ka(this.Na),et=!0),et}La($,et){return!($.fromCache&&this.Da())||(!this.options.qa||!("Offline"!==et))&&(!$.docs.isEmpty()||$.hasCachedResults||"Offline"===et)}Ba($){if($.docChanges.length>0)return!0;let et=this.Na&&this.Na.hasPendingWrites!==$.hasPendingWrites;return!(!$.syncStateChanged&&!et)&&!0===this.options.includeMetadataChanges}
1267ka($){$=ViewSnapshot.fromInitialDocuments($.query,$.docs,$.mutatedKeys,$.fromCache,$.hasCachedResults),this.Oa=!0,this.xa.next($)}Da(){return this.options.source!==ey.Cache}};/** 1268 * @license 1269 * Copyright 2017 Google LLC 1270 * 1271 * Licensed under the Apache License, Version 2.0 (the "License"); 1272 * you may not use this file except in compliance with the License. 1273 * You may obtain a copy of the License at 1274 * 1275 * http://www.apache.org/licenses/LICENSE-2.0 1276 * 1277 * Unless required by applicable law or agreed to in writing, software 1278 * distributed under the License is distributed on an "AS IS" BASIS, 1279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1280 * See the License for the specific language governing permissions and 1281 * limitations under the License. 1282 */let __PRIVATE_AddedLimboDocument=class __PRIVATE_AddedLimboDocument{constructor($){this.key=$}};let __PRIVATE_RemovedLimboDocument=class __PRIVATE_RemovedLimboDocument{constructor($){this.key=$}};let __PRIVATE_View=class __PRIVATE_View{constructor($,et){this.query=$,this.Ya=et,this.Za=null,this.hasCachedResults=!1,this.current=!1,this.Xa=__PRIVATE_documentKeySet(),this.mutatedKeys=__PRIVATE_documentKeySet(),this.eu=__PRIVATE_newQueryComparator($),this.tu=new DocumentSet(this.eu)}get nu(){return this.Ya}ru($,et){let en=et?et.iu:new __PRIVATE_DocumentChangeSet,er=et?et.tu:this.tu,ei=et?et.mutatedKeys:this.mutatedKeys,eo=er,es=!1,el="F"===this.query.limitType&&er.size===this.query.limit?er.last():null,eu="L"===this.query.limitType&&er.size===this.query.limit?er.first():null;if($.inorderTraversal(($,et)=>{let ed=er.get($),eh=__PRIVATE_queryMatches(this.query,et)?et:null,ep=!!ed&&this.mutatedKeys.has(ed.key),em=!!eh&&(eh.hasLocalMutations||this.mutatedKeys.has(eh.key)&&eh.hasCommittedMutations),ef=!1;ed&&eh?ed.data.isEqual(eh.data)?ep!==em&&(en.track({type:3,doc:eh}),ef=!0):this.su(ed,eh)||(en.track({type:2,doc:eh}),ef=!0,(el&&this.eu(eh,el)>0||eu&&0>this.eu(eh,eu))&&(es=!0)):!ed&&eh?(en.track({type:0,doc:eh}),ef=!0):ed&&!eh&&(en.track({type:1,doc:ed}),ef=!0,(el||eu)&&(es=!0)),ef&&(eh?(eo=eo.add(eh),ei=em?ei.add($):ei.delete($)):(eo=eo.delete($),ei=ei.delete($)))}),null!==this.query.limit)for(;eo.size>this.query.limit;){let $="F"===this.query.limitType?eo.last():eo.first();eo=eo.delete($.key),ei=ei.delete($.key),en.track({type:1,doc:$})}return{tu:eo,iu:en,Cs:es,mutatedKeys:ei}}su($,et){return $.hasLocalMutations&&et.hasCommittedMutations&&!et.hasLocalMutations}applyChanges($,et,en,er){let ei=this.tu;this.tu=$.tu,this.mutatedKeys=$.mutatedKeys;let eo=$.iu.ya();eo.sort(($,et)=>(function($,et){let order=$=>{switch($){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return fail(20277,{Rt:$})}};return order($)-order(et)})($.type,et.type)||this.eu($.doc,et.doc)),this.ou(en),er=er??!1;let es=et&&!er?this._u():[],el=0===this.Xa.size&&this.current&&!er?1:0,eu=el!==this.Za;return(this.Za=el,0!==eo.length||eu)?{snapshot:new ViewSnapshot(this.query,$.tu,ei,eo,$.mutatedKeys,0===el,eu,!1,!!en&&en.resumeToken.approximateByteSize()>0),au:es}:{au:es}}va($){return this.current&&"Offline"===$?(this.current=!1,this.applyChanges({tu:this.tu,iu:new __PRIVATE_DocumentChangeSet,mutatedKeys:this.mutatedKeys,Cs:!1},!1)):{au:[]}}uu($){return!this.Ya.has($)&&!!this.tu.has($)&&!this.tu.get($).hasLocalMutations}ou($){$&&($.addedDocuments.forEach($=>this.Ya=this.Ya.add($)),$.modifiedDocuments.forEach($=>{}),$.removedDocuments.forEach($=>this.Ya=this.Ya.delete($)),this.current=$.current)}_u(){if(!this.current)return[];let $=this.Xa;this.Xa=__PRIVATE_documentKeySet(),this.tu.forEach($=>{this.uu($.key)&&(this.Xa=this.Xa.add($.key))});let et=[];return $.forEach($=>{this.Xa.has($)||et.push(new __PRIVATE_RemovedLimboDocument($))}),this.Xa.forEach(en=>{$.has(en)||et.push(new __PRIVATE_AddedLimboDocument(en))}),et}cu($){this.Ya=$.Qs,this.Xa=__PRIVATE_documentKeySet();let et=this.ru($.documents);return this.applyChanges(et,!0)}lu(){return ViewSnapshot.fromInitialDocuments(this.query,this.tu,this.mutatedKeys,0===this.Za,this.hasCachedResults)}};let tr="SyncEngine";let __PRIVATE_QueryView=class __PRIVATE_QueryView{constructor($,et,en){this.query=$,this.targetId=et,this.view=en}};let LimboResolution=class LimboResolution{constructor($){this.key=$,this.hu=!1}};let __PRIVATE_SyncEngineImpl=class __PRIVATE_SyncEngineImpl{constructor($,et,en,er,ei,eo){this.localStore=$,this.remoteStore=et,this.eventManager=en,this.sharedCl
1282ientState=er,this.currentUser=ei,this.maxConcurrentLimboResolutions=eo,this.Pu={},this.Tu=new ObjectMap($=>__PRIVATE_canonifyQuery($),__PRIVATE_queryEquals),this.Iu=new Map,this.Eu=new Set,this.du=new SortedMap(DocumentKey.comparator),this.Au=new Map,this.Ru=new __PRIVATE_ReferenceSet,this.Vu={},this.mu=new Map,this.fu=__PRIVATE_TargetIdGenerator.cr(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return!0===this.gu}};async function __PRIVATE_syncEngineListen($,et,en=!0){let er;let ei=__PRIVATE_ensureWatchCallbacks($),eo=ei.Tu.get(et);return eo?(ei.sharedClientState.addLocalQueryTarget(eo.targetId),er=eo.view.lu()):er=await __PRIVATE_allocateTargetAndMaybeListen(ei,et,en,!0),er}async function __PRIVATE_triggerRemoteStoreListen($,et){let en=__PRIVATE_ensureWatchCallbacks($);await __PRIVATE_allocateTargetAndMaybeListen(en,et,!0,!1)}async function __PRIVATE_allocateTargetAndMaybeListen($,et,en,er){var ei,eo;let es;let el=await (ei=$.localStore,eo=__PRIVATE_queryToTarget(et),ei.persistence.runTransaction("Allocate target","readwrite",$=>{let et;return ei.Pi.getTargetData($,eo).next(en=>en?(et=en,PersistencePromise.resolve(et)):ei.Pi.allocateTargetId($).next(en=>(et=new TargetData(eo,en,"TargetPurposeListen",$.currentSequenceNumber),ei.Pi.addTargetData($,et).next(()=>et))))}).then($=>{let et=ei.Ms.get($.targetId);return(null===et||$.snapshotVersion.compareTo(et.snapshotVersion)>0)&&(ei.Ms=ei.Ms.insert($.targetId,$),ei.xs.set(eo,$.targetId)),$})),eu=el.targetId,ed=$.sharedClientState.addLocalQueryTarget(eu,en);return er&&(es=await __PRIVATE_initializeViewAndComputeSnapshot($,et,eu,"current"===ed,el.resumeToken)),$.isPrimaryClient&&en&&__PRIVATE_remoteStoreListen($.remoteStore,el),es}async function __PRIVATE_initializeViewAndComputeSnapshot($,et,en,er,ei){$.pu=(et,en,er)=>(async function($,et,en,er){let ei=et.view.ru(en);ei.Cs&&(ei=await __PRIVATE_localStoreExecuteQuery($.localStore,et.query,!1).then(({documents:$})=>et.view.ru($,ei)));let eo=er&&er.targetChanges.get(et.targetId),es=er&&null!=er.targetMismatches.get(et.targetId),el=et.view.applyChanges(ei,$.isPrimaryClient,eo,es);return __PRIVATE_updateTrackedLimbos($,et.targetId,el.au),el.snapshot})($,et,en,er);let eo=await __PRIVATE_localStoreExecuteQuery($.localStore,et,!0),es=new __PRIVATE_View(et,eo.Qs),el=es.ru(eo.documents),eu=TargetChange.createSynthesizedTargetChangeForCurrentChange(en,er&&"Offline"!==$.onlineState,ei),ed=es.applyChanges(el,$.isPrimaryClient,eu);__PRIVATE_updateTrackedLimbos($,en,ed.au);let eh=new __PRIVATE_QueryView(et,en,es);return $.Tu.set(et,eh),$.Iu.has(en)?$.Iu.get(en).push(et):$.Iu.set(en,[et]),ed.snapshot}async function __PRIVATE_syncEngineUnlisten($,et,en){let er=$.Tu.get(et),ei=$.Iu.get(er.targetId);if(ei.length>1)return $.Iu.set(er.targetId,ei.filter($=>!__PRIVATE_queryEquals($,et))),void $.Tu.delete(et);$.isPrimaryClient?($.sharedClientState.removeLocalQueryTarget(er.targetId),$.sharedClientState.isActiveQueryTarget(er.targetId)||await __PRIVATE_localStoreReleaseTarget($.localStore,er.targetId,!1).then(()=>{$.sharedClientState.clearQueryState(er.targetId),en&&__PRIVATE_remoteStoreUnlisten($.remoteStore,er.targetId),__PRIVATE_removeAndCleanupTarget($,er.targetId)}).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss)):(__PRIVATE_removeAndCleanupTarget($,er.targetId),await __PRIVATE_localStoreReleaseTarget($.localStore,er.targetId,!0))}async function __PRIVATE_triggerRemoteStoreUnlisten($,et){let en=$.Tu.get(et),er=$.Iu.get(en.targetId);$.isPrimaryClient&&1===er.length&&($.sharedClientState.removeLocalQueryTarget(en.targetId),__PRIVATE_remoteStoreUnlisten($.remoteStore,en.targetId))}async function __PRIVATE_syncEngineWrite($,et,en){var er;let ei=($.remoteStore.remoteSyncer.applySuccessfulWrite=__PRIVATE_syncEngineApplySuccessfulWrite.bind(null,$),$.remoteStore.remoteSyncer.rejectFailedWrite=__PRIVATE_syncEngineRejectFailedWrite.bind(null,$),$);try{let $;let eo=await function($,et){let en,er;let ei=Timestamp.now(),eo=et.reduce(($,et)=>$.add(et.key),__PRIVATE_documentKeySet());return $.persistence.runTransaction("Locally write mutations","readwrite",es=>{let el=eG,eu=__PRIVATE_documentKeySet();return $.Ns.getEntries(es,eo).next($=>{(el=$).forEach(($,et)=>{et.isValidDocument()||(eu=eu.add($))})}).next(()=>$.localDocuments.getOverlayedDocuments(es,el)).next(er=>{en=er;let eo=[];for(let $ of et){let et=function($,et){let en=null;for(let er of $.fieldTransforms){let $=et.data.field(er.field),ei=__PRIVATE_computeTransformOperationBaseValue(er.transform,$||null);null!=ei&&(null===en&&(en=ObjectValue.empty()),en.set(er.field,ei))}return en||null}($,en.get($.key).overlayedDocument);null!=et&&eo.push(new __PRIVATE_PatchMutation($.key,et,function __PRIVATE_extractFieldMask($){let et=[];return forEach($.fields,($,en)=>{let er=new FieldPath$1([$]);if(__PRIVATE_isMapValue(en)){let $=__PRIVATE_extractFieldMask(en.mapValue).fields;if(0===$.length)et.push(er);else for(let en of $)et.push(er.child(en))}else et.push(er)}),new FieldMask(et)}(et.value.mapValue),Precondition.exists(!0)))}
1282return $.mutationQueue.addMutationBatch(es,ei,eo,et)}).next(et=>{er=et;let ei=et.applyToLocalDocumentSet(en,eu);return $.documentOverlayCache.saveOverlays(es,et.batchId,ei)})}).then(()=>({batchId:er.batchId,changes:__PRIVATE_convertOverlayedDocumentMapToDocumentMap(en)}))}(ei.localStore,et);ei.sharedClientState.addPendingMutation(eo.batchId),er=eo.batchId,($=ei.Vu[ei.currentUser.toKey()])||($=new SortedMap(__PRIVATE_primitiveComparator)),$=$.insert(er,en),ei.Vu[ei.currentUser.toKey()]=$,await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(ei,eo.changes),await __PRIVATE_fillWritePipeline(ei.remoteStore)}catch(et){let $=__PRIVATE_wrapInUserErrorIfRecoverable(et,"Failed to persist write");en.reject($)}}async function __PRIVATE_syncEngineApplyRemoteEvent($,et){try{let en=await function($,et){let en=et.snapshotVersion,er=$.Ms;return $.persistence.runTransaction("Apply remote event","readwrite-primary",ei=>{var eo;let es,el;let eu=$.Ns.newChangeBuffer({trackRemovals:!0});er=$.Ms;let ed=[];et.targetChanges.forEach((eo,es)=>{let el=er.get(es);if(!el)return;ed.push($.Pi.removeMatchingKeys(ei,eo.removedDocuments,es).next(()=>$.Pi.addMatchingKeys(ei,eo.addedDocuments,es)));let eu=el.withSequenceNumber(ei.currentSequenceNumber);null!==et.targetMismatches.get(es)?eu=eu.withResumeToken(ByteString.EMPTY_BYTE_STRING,SnapshotVersion.min()).withLastLimboFreeSnapshotVersion(SnapshotVersion.min()):eo.resumeToken.approximateByteSize()>0&&(eu=eu.withResumeToken(eo.resumeToken,en)),er=er.insert(es,eu),function($,et,en){if(0===$.resumeToken.approximateByteSize())return!0;let er=et.snapshotVersion.toMicroseconds()-$.snapshotVersion.toMicroseconds();if(er>=3e8)return!0;let ei=en.addedDocuments.size+en.modifiedDocuments.size+en.removedDocuments.size;return ei>0}(el,eu,eo)&&ed.push($.Pi.updateTargetData(ei,eu))});let eh=eG,ep=__PRIVATE_documentKeySet();if(et.documentUpdates.forEach(en=>{et.resolvedLimboDocuments.has(en)&&ed.push($.persistence.referenceDelegate.updateLimboDocument(ei,en))}),ed.push((eo=et.documentUpdates,es=__PRIVATE_documentKeySet(),el=__PRIVATE_documentKeySet(),eo.forEach($=>es=es.add($)),eu.getEntries(ei,es).next($=>{let et=eG;return eo.forEach((en,er)=>{let ei=$.get(en);er.isFoundDocument()!==ei.isFoundDocument()&&(el=el.add(en)),er.isNoDocument()&&er.version.isEqual(SnapshotVersion.min())?(eu.removeEntry(en,er.readTime),et=et.insert(en,er)):!ei.isValidDocument()||er.version.compareTo(ei.version)>0||0===er.version.compareTo(ei.version)&&ei.hasPendingWrites?(eu.addEntry(er),et=et.insert(en,er)):__PRIVATE_logDebug(e3,"Ignoring outdated watch update for ",en,". Current version:",ei.version," Watch version:",er.version)}),{ks:et,qs:el}})).next($=>{eh=$.ks,ep=$.qs})),!en.isEqual(SnapshotVersion.min())){let et=$.Pi.getLastRemoteSnapshotVersion(ei).next(et=>$.Pi.setTargetsMetadata(ei,ei.currentSequenceNumber,en));ed.push(et)}return PersistencePromise.waitFor(ed).next(()=>eu.apply(ei)).next(()=>$.localDocuments.getLocalViewOfDocuments(ei,eh,ep)).next(()=>eh)}).then(et=>($.Ms=er,et))}($.localStore,et);
1282et.targetChanges.forEach((et,en)=>{let er=$.Au.get(en);er&&(__PRIVATE_hardAssert(et.addedDocuments.size+et.modifiedDocuments.size+et.removedDocuments.size<=1,22616),et.addedDocuments.size>0?er.hu=!0:et.modifiedDocuments.size>0?__PRIVATE_hardAssert(er.hu,14607):et.removedDocuments.size>0&&(__PRIVATE_hardAssert(er.hu,42227),er.hu=!1))}),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore($,en,et)}catch($){await __PRIVATE_ignoreIfPrimaryLeaseLoss($)}}function __PRIVATE_syncEngineApplyOnlineStateChange($,et,en){var er;if($.isPrimaryClient&&0===en||!$.isPrimaryClient&&1===en){let en;let ei=[];$.Tu.forEach(($,en)=>{let er=en.view.va(et);er.snapshot&&ei.push(er.snapshot)}),(er=$.eventManager).onlineState=et,en=!1,er.queries.forEach(($,er)=>{for(let $ of er.Sa)$.va(et)&&(en=!0)}),en&&__PRIVATE_raiseSnapshotsInSyncEvent(er),ei.length&&$.Pu.H_(ei),$.onlineState=et,$.isPrimaryClient&&$.sharedClientState.setOnlineState(et)}}async function __PRIVATE_syncEngineRejectListen($,et,en){$.sharedClientState.updateQueryState(et,"rejected",en);let er=$.Au.get(et),ei=er&&er.key;if(ei){let en=new SortedMap(DocumentKey.comparator);en=en.insert(ei,MutableDocument.newNoDocument(ei,SnapshotVersion.min()));let er=__PRIVATE_documentKeySet().add(ei),eo=new RemoteEvent(SnapshotVersion.min(),new Map,new SortedMap(__PRIVATE_primitiveComparator),en,er);await __PRIVATE_syncEngineApplyRemoteEvent($,eo),$.du=$.du.remove(ei),$.Au.delete(et),__PRIVATE_pumpEnqueuedLimboResolutions($)}else await __PRIVATE_localStoreReleaseTarget($.localStore,et,!1).then(()=>__PRIVATE_removeAndCleanupTarget($,et,en)).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss)}async function __PRIVATE_syncEngineApplySuccessfulWrite($,et){var en;let er=et.batch.batchId;try{let ei=await (en=$.localStore).persistence.runTransaction("Acknowledge batch","readwrite-primary",$=>{let er=et.batch.keys(),ei=en.Ns.newChangeBuffer({trackRemovals:!0});return(function($,et,en,er){let ei=en.batch,eo=ei.keys(),es=PersistencePromise.resolve();return eo.forEach($=>{es=es.next(()=>er.getEntry(et,$)).next(et=>{let eo=en.docVersions.get($);__PRIVATE_hardAssert(null!==eo,48541),0>et.version.compareTo(eo)&&(ei.applyToRemoteDocument(et,en),et.isValidDocument()&&(et.setReadTime(en.commitVersion),er.addEntry(et)))})}),es.next(()=>$.mutationQueue.removeMutationBatch(et,ei))})(en,$,et,ei).next(()=>ei.apply($)).next(()=>
1282en.mutationQueue.performConsistencyCheck($)).next(()=>en.documentOverlayCache.removeOverlaysForBatchId($,er,et.batch.batchId)).next(()=>en.localDocuments.recalculateAndSaveOverlaysForDocumentKeys($,function($){let et=__PRIVATE_documentKeySet();for(let en=0;en<$.mutationResults.length;++en)$.mutationResults[en].transformResults.length>0&&(et=et.add($.batch.mutations[en].key));return et}(et))).next(()=>en.localDocuments.getDocuments($,er))});__PRIVATE_processUserCallback($,er,null),__PRIVATE_triggerPendingWritesCallbacks($,er),$.sharedClientState.updateMutationState(er,"acknowledged"),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore($,ei)}catch($){await __PRIVATE_ignoreIfPrimaryLeaseLoss($)}}async function __PRIVATE_syncEngineRejectFailedWrite($,et,en){var er;try{let ei=await (er=$.localStore).persistence.runTransaction("Reject batch","readwrite-primary",$=>{let en;return er.mutationQueue.lookupMutationBatch($,et).next(et=>(__PRIVATE_hardAssert(null!==et,37113),en=et.keys(),er.mutationQueue.removeMutationBatch($,et))).next(()=>er.mutationQueue.performConsistencyCheck($)).next(()=>er.documentOverlayCache.removeOverlaysForBatchId($,en,et)).next(()=>er.localDocuments.recalculateAndSaveOverlaysForDocumentKeys($,en)).next(()=>er.localDocuments.getDocuments($,en))});__PRIVATE_processUserCallback($,et,en),__PRIVATE_triggerPendingWritesCallbacks($,et),$.sharedClientState.updateMutationState(et,"rejected",en),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore($,ei)}catch($){await __PRIVATE_ignoreIfPrimaryLeaseLoss($)}}function __PRIVATE_triggerPendingWritesCallbacks($,et){($.mu.get(et)||[]).forEach($=>{$.resolve()}),$.mu.delete(et)}function __PRIVATE_processUserCallback($,et,en){let er=$.Vu[$.currentUser.toKey()];if(er){let ei=er.get(et);ei&&(en?ei.reject(en):ei.resolve(),er=er.remove(et)),$.Vu[$.currentUser.toKey()]=er}}function __PRIVATE_removeAndCleanupTarget($,et,en=null){for(let er of($.sharedClientState.removeLocalQueryTarget(et),$.Iu.get(et)))$.Tu.delete(er),en&&$.Pu.yu(er,en);$.Iu.delete(et),$.isPrimaryClient&&$.Ru.jr(et).forEach(et=>{$.Ru.containsKey(et)||__PRIVATE_removeLimboTarget($,et)})}function __PRIVATE_removeLimboTarget($,et){$.Eu.delete(et.path.canonicalString());let en=$.du.get(et);null!==en&&(__PRIVATE_remoteStoreUnlisten($.remoteStore,en),$.du=$.du.remove(et),$.Au.delete(en),__PRIVATE_pumpEnqueuedLimboResolutions($))}function __PRIVATE_updateTrackedLimbos($,et,en){for(let er of en)er instanceof __PRIVATE_AddedLimboDocument?($.Ru.addReference(er.key,et),function($,et){let en=et.key,er=en.path.canonicalString();$.du.get(en)||$.Eu.has(er)||(__PRIVATE_logDebug(tr,"New document in limbo: "+en),$.Eu.add(er),__PRIVATE_pumpEnqueuedLimboResolutions($))}($,er)):er instanceof __PRIVATE_RemovedLimboDocument?(__PRIVATE_logDebug(tr,"Document no longer in limbo: "+er.key),$.Ru.removeReference(er.key,et),$.Ru.containsKey(er.key)||__PRIVATE_removeLimboTarget($,er.key)):fail(19791,{wu:er})}function __PRIVATE_pumpEnqueuedLimboResolutions($){for(;$.Eu.size>0&&$.du.size<$.maxConcurrentLimboResolutions;){let et=$.Eu.values().next().value;$.Eu.delete(et);let en=new DocumentKey(ResourcePath.fromString(et)),er=$.fu.next();$.Au.set(er,new LimboResolution(en)),$.du=$.du.insert(en,er),__PRIVATE_remoteStoreListen($.remoteStore,new TargetData(__PRIVATE_queryToTarget(__PRIVATE_newQueryForPath(en.path)),er,"TargetPurposeLimboResolution",__PRIVATE_ListenSequence.ce))}}async function __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore($,et,en){let er=[],ei=[],eo=[];$.Tu.isEmpty()||($.Tu.forEach((es,el)=>{eo.push($.pu(el,et,en).then(et=>{if((et||en)&&$.isPrimaryClient){let er=et?!et.fromCache:en?.targetChanges.get(el.targetId)?.current;$.sharedClientState.updateQueryState(el.targetId,er?"current":"not-current")}if(et){er.push(et);let $=__PRIVATE_LocalViewChanges.As(el.targetId,et);ei.push($)}}))}),await Promise.all(eo),$.Pu.H_(er),await async function($,et){try{await $.persistence.runTransaction("notifyLocalViewChanges","readwrite",en=>PersistencePromise.forEach(et,et=>PersistencePromise.forEach(et.Es,er=>$.persistence.referenceDelegate.addReference(en,et.targetId,er)).next(()=>PersistencePromise.forEach(et.ds,er=>$.persistence.referenceDelegate.removeReference(en,et.targetId,er)))))}catch($){if(!__PRIVATE_isIndexedDbTransactionError($))throw $;__PRIVATE_logDebug(e3,"Failed to update sequence numbers: "+$)}for(let en of et){let et=en.targetId;if(!en.fromCache){let en=$.Ms.get(et),er=en.snapshotVersion,ei=en.withLastLimboFreeSnapshotVersion(er);$.Ms=$.Ms.insert(et,ei)}}}($.localStore,ei))}async function __PRIVATE_syncEngineHandleCredentialChange($,et){if(!$.currentUser.isEqual(et)){__PRIVATE_logDebug(tr,"User
1282change. New user:",et.toKey());let en=await __PRIVATE_localStoreHandleUserChange($.localStore,et);$.currentUser=et,$.mu.forEach($=>{$.forEach($=>{$.reject(new FirestoreError(eR.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),$.mu.clear(),$.sharedClientState.handleUserChange(et,en.removedBatchIds,en.addedBatchIds),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore($,en.Ls)}}function __PRIVATE_syncEngineGetRemoteKeysForTarget($,et){let en=$.Au.get(et);if(en&&en.hu)return __PRIVATE_documentKeySet().add(en.key);{let en=__PRIVATE_documentKeySet(),er=$.Iu.get(et);if(!er)return en;for(let et of er){let er=$.Tu.get(et);en=en.unionWith(er.view.nu)}return en}}function __PRIVATE_ensureWatchCallbacks($){return $.remoteStore.remoteSyncer.applyRemoteEvent=__PRIVATE_syncEngineApplyRemoteEvent.bind(null,$),$.remoteStore.remoteSyncer.getRemoteKeysForTarget=__PRIVATE_syncEngineGetRemoteKeysForTarget.bind(null,$),$.remoteStore.remoteSyncer.rejectListen=__PRIVATE_syncEngineRejectListen.bind(null,$),$.Pu.H_=__PRIVATE_eventManagerOnWatchChange.bind(null,$.eventManager),$.Pu.yu=__PRIVATE_eventManagerOnWatchError.bind(null,$.eventManager),$}let __PRIVATE_MemoryOfflineComponentProvider=class __PRIVATE_MemoryOfflineComponentProvider{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize($){this.serializer=__PRIVATE_newSerializer($.databaseInfo.databaseId),this.sharedClientState=this.Du($),this.persistence=this.Cu($),await this.persistence.start(),this.localStore=this.vu($),this.gcScheduler=this.Fu($,this.localStore),this.indexBackfillerScheduler=this.Mu($,this.localStore)}Fu($,et){return null}Mu($,et){return null}vu($){var et,en,er,ei;return et=this.persistence,en=new __PRIVATE_QueryEngine,er=$.initialUser,ei=this.serializer,new __PRIVATE_LocalStoreImpl(et,en,er,ei)}Cu($){return new __PRIVATE_MemoryPersistence(__PRIVATE_MemoryEagerDelegate.mi,this.serializer)}Du($){return new __PRIVATE_MemorySharedClientState}async terminate(){this.gcScheduler?.stop(),this.indexBackfillerScheduler?.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}};__PRIVATE_MemoryOfflineComponentProvider.provider={build:()=>new __PRIVATE_MemoryOfflineComponentProvider};let __PRIVATE_LruGcMemoryOfflineComponentProvider=class __PRIVATE_LruGcMemoryOfflineComponentProvider extends __PRIVATE_MemoryOfflineComponentProvider{constructor($){super(),this.cacheSizeBytes=$}Fu($,et){__PRIVATE_hardAssert(this.persistence.referenceDelegate instanceof __PRIVATE_MemoryLruDelegate,46915);let en=this.persistence.referenceDelegate.garbageCollector;return new __PRIVATE_LruScheduler(en,$.asyncQueue,et)}Cu($){let et=void 0!==this.cacheSizeBytes?LruParams.withCacheSize(this.cacheSizeBytes):LruParams.DEFAULT;return new __PRIVATE_MemoryPersistence($=>__PRIVATE_MemoryLruDelegate.mi($,et),this.serializer)}};let OnlineComponentProvider=class OnlineComponentProvider{async initialize($,et){this.localStore||(this.localStore=$.localStore,this.sharedClientState=$.sharedClientState,this.datastore=this.createDatastore(et),this.remoteStore=this.createRemoteStore(et),this.eventManager=this.createEventManager(et),this.syncEngine=this.createSyncEngine(et,!$.synchronizeTabs),this.sharedClientState.onlineStateHandler=$=>__PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine,$,1),this.remoteStore.remoteSyncer.handleCredentialChange=__PRIVATE_syncEngineHandleCredentialChange.bind(null,this.syncEngine),await __PRIVATE_remoteStoreApplyPrimaryState(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager($){return new __PRIVATE_EventManagerImpl}createDatastore($){var et,en,er;let ei=__PRIVATE_newSerializer($.databaseInfo.databaseId),eo=(et=$.databaseInfo,new __PRIVATE_WebChannelConnection(et));return en=$.authCredentials,er=$.appCheckCredentials,new __PRIVATE_DatastoreImpl(en,er,eo,ei)}createRemoteStore($){var et,en,er,ei;return et=this.localStore,en=this.datastore,er=$.asyncQueue,ei=__PRIVATE_BrowserConnectivityMonitor.v()?new __PRIVATE_BrowserConnectivityMonitor:new __PRIVATE_NoopConnectivityMonitor,new __PRIVATE_RemoteStoreImpl(et,en,er,$=>__PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine,$,0),ei)}createSyncEngine($,et){return function($,et,en,er,ei,eo,es){let el=new __PRIVATE_SyncEngineImpl($,et,en,er,ei,eo);return es&&(el.gu=!0),el}(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
1282ientState,$.initialUser,$.maxConcurrentLimboResolutions,et)}async terminate(){await async function($){__PRIVATE_logDebug(tn,"RemoteStore shutting down."),$.Ea.add(5),await __PRIVATE_disableNetworkInternal($),$.Aa.shutdown(),$.Ra.set("Unknown")}(this.remoteStore),this.datastore?.terminate(),this.eventManager?.terminate()}};OnlineComponentProvider.provider={build:()=>new OnlineComponentProvider};/** 1283 * @license 1284 * Copyright 2020 Google LLC 1285 * 1286 * Licensed under the Apache License, Version 2.0 (the "License"); 1287 * you may not use this file except in compliance with the License. 1288 * You may obtain a copy of the License at 1289 * 1290 * http://www.apache.org/licenses/LICENSE-2.0 1291 * 1292 * Unless required by applicable law or agreed to in writing, software 1293 * distributed under the License is distributed on an "AS IS" BASIS, 1294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1295 * See the License for the specific language governing permissions and 1296 * limitations under the License. 1297 *//** 1298 * @license 1299 * Copyright 2017 Google LLC 1300 * 1301 * Licensed under the Apache License, Version 2.0 (the "License"); 1302 * you may not use this file except in compliance with the License. 1303 * You may obtain a copy of the License at 1304 * 1305 * http://www.apache.org/licenses/LICENSE-2.0 1306 * 1307 * Unless required by applicable law or agreed to in writing, software 1308 * distributed under the License is distributed on an "AS IS" BASIS, 1309 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1310 * See the License for the specific language governing permissions and 1311 * limitations under the License. 1312 */let __PRIVATE_AsyncObserver=class __PRIVATE_AsyncObserver{constructor($){this.observer=$,this.muted=!1}next($){this.muted||this.observer.next&&this.Ou(this.observer.next,$)}error($){this.muted||(this.observer.error?this.Ou(this.observer.error,$):__PRIVATE_logError("Uncaught Error in snapshot listener:",$.toString()))}Nu(){this.muted=!0}Ou($,et){setTimeout(()=>{this.muted||$(et)},0)}};/** 1313 * @license 1314 * Copyright 2017 Google LLC 1315 * 1316 * Licensed under the Apache License, Version 2.0 (the "License"); 1317 * you may not use this file except in compliance with the License. 1318 * You may obtain a copy of the License at 1319 * 1320 * http://www.apache.org/licenses/LICENSE-2.0 1321 * 1322 * Unless required by applicable law or agreed to in writing, software 1323 * distributed under the License is distributed on an "AS IS" BASIS, 1324 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1325 * See the License for the specific language governing permissions and 1326 * limitations under the License. 1327 */let Transaction$2=class Transaction$2{constructor($){this.datastore=$,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}async lookup($){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw this.lastTransactionError=new FirestoreError(eR.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),this.lastTransactionError;let et=await async function($,et){let en={documents:et.map(et=>__PRIVATE_toName($.serializer,et))},er=await $.Ho("BatchGetDocuments",$.serializer.databaseId,ResourcePath.emptyPath(),en,et.length),ei=new Map;er.forEach(et=>{var en;let er=(en=$.serializer,"found"in et?function($,et){__PRIVATE_hardAssert(!!et.found,43571),et.found.name,et.found.updateTime;let en=fromName($,et.found.name),er=__PRIVATE_fromVersion(et.found.updateTime),ei=et.found.createTime?__PRIVATE_fromVersion(et.found.createTime):SnapshotVersion.min(),eo=new ObjectValue({mapValue:{fields:et.found.fields}});return MutableDocument.newFoundDocument(en,er,ei,eo)}(en,et):"missing"in et?function($,et){__PRIVATE_hardAssert(!!et.missing,3894),__PRIVATE_hardAssert(!!et.readTime,22933);let en=fromName($,et.missing),er=__PRIVATE_fromVersion(et.readTime);return MutableDocument.newNoDocument(en,er)}(en,et):fail(7234,{result:et}));ei.set(er.key.toString(),er)});let eo=[];return et.forEach($=>{let et=ei.get($.toString());__PRIVATE_hardAssert(!!et,55234,{key:$}),eo.push(et)}),eo}(this.datastore,$);return et.forEach($=>this.recordVersion($)),et}
vendor: 6,655 bytes, lines 1327-1357
1327set($,et){this.write(et.toMutation($,this.precondition($))),this.writtenDocs.add($.toString())}update($,et){try{this.write(et.toMutation($,this.preconditionForUpdate($)))}catch($){this.lastTransactionError=$}this.writtenDocs.add($.toString())}delete($){this.write(new __PRIVATE_DeleteMutation($,this.precondition($))),this.writtenDocs.add($.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastTransactionError)throw this.lastTransactionError;let $=this.readVersions;this.mutations.forEach(et=>{$.delete(et.key.toString())}),$.forEach(($,et)=>{let en=DocumentKey.fromPath(et);this.mutations.push(new __PRIVATE_VerifyMutation(en,this.precondition(en)))}),await async function($,et){let en={writes:et.map(et=>toMutation($.serializer,et))};await $.Go("Commit",$.serializer.databaseId,ResourcePath.emptyPath(),en)}(this.datastore,this.mutations),this.committed=!0}recordVersion($){let et;if($.isFoundDocument())et=$.version;else{if(!$.isNoDocument())throw fail(50498,{Gu:$.constructor.name});et=SnapshotVersion.min()}let en=this.readVersions.get($.key.toString());if(en){if(!et.isEqual(en))throw new FirestoreError(eR.ABORTED,"Document version changed between two reads.")}else this.readVersions.set($.key.toString(),et)}precondition($){let et=this.readVersions.get($.toString());return!this.writtenDocs.has($.toString())&&et?et.isEqual(SnapshotVersion.min())?Precondition.exists(!1):Precondition.updateTime(et):Precondition.none()}preconditionForUpdate($){let et=this.readVersions.get($.toString());if(!this.writtenDocs.has($.toString())&&et){if(et.isEqual(SnapshotVersion.min()))throw new FirestoreError(eR.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Precondition.updateTime(et)}return Precondition.exists(!0)}write($){this.ensureCommitNotCalled(),this.mutations.push($)}ensureCommitNotCalled(){}};/** 1328 * @license 1329 * Copyright 2019 Google LLC 1330 * 1331 * Licensed under the Apache License, Version 2.0 (the "License"); 1332 * you may not use this file except in compliance with the License. 1333 * You may obtain a copy of the License at 1334 * 1335 * http://www.apache.org/licenses/LICENSE-2.0 1336 * 1337 * Unless required by applicable law or agreed to in writing, software 1338 * distributed under the License is distributed on an "AS IS" BASIS, 1339 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1340 * See the License for the specific language governing permissions and 1341 * limitations under the License. 1342 */let __PRIVATE_TransactionRunner=class __PRIVATE_TransactionRunner{constructor($,et,en,er,ei){this.asyncQueue=$,this.datastore=et,this.options=en,this.updateFunction=er,this.deferred=ei,this.zu=en.maxAttempts,this.M_=new __PRIVATE_ExponentialBackoff(this.asyncQueue,"transaction_retry")}ju(){this.zu-=1,this.Ju()}Ju(){this.M_.p_(async()=>{let $=new Transaction$2(this.datastore),et=this.Hu($);et&&et.then(et=>{this.asyncQueue.enqueueAndForget(()=>$.commit().then(()=>{this.deferred.resolve(et)}).catch($=>{this.Yu($)}))}).catch($=>{this.Yu($)})})}Hu($){try{let et=this.updateFunction($);return!__PRIVATE_isNullOrUndefined(et)&&et.catch&&et.then?et:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch($){return this.deferred.reject($),null}}Yu($){this.zu>0&&this.Zu($)?(this.zu-=1,this.asyncQueue.enqueueAndForget(()=>(this.Ju(),Promise.resolve()))):this.deferred.reject($)}Zu($){if("FirebaseError"===$?.name){let et=$.code;return"aborted"===et||"failed-precondition"===et||"already-exists"===et||!__PRIVATE_isPermanentError(et)}return!1}};/** 1343 * @license 1344 * Copyright 2017 Google LLC 1345 * 1346 * Licensed under the Apache License, Version 2.0 (the "License"); 1347 * you may not use this file except in compliance with the License. 1348 * You may obtain a copy of the License at 1349 * 1350 * http://www.apache.org/licenses/LICENSE-2.0 1351 * 1352 * Unless required by applicable law or agreed to in writing, software 1353 * distributed under the License is distributed on an "AS IS" BASIS, 1354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1355 * See the License for the specific language governing permissions and 1356 * limitations under the License. 1357 */let ti="FirestoreClient";let FirestoreClient=class FirestoreClient{constructor($,et,en,er,ei){this.authCredentials=$,this.appCheckCredentials=et,this.asyncQueue=en,this.databaseInfo=er,this.user=User.UNAUTHENTICATED,this.clientId=__PRIVATE_AutoId.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=ei,this.authCredentials.start(en,async $=>{__PRIVATE_logDebug(ti,"Received user=",$.uid),await this.authCredentialListener($),this.user=$}),this.appCheckCredentials.start(en,$=>(__PRIVATE_logDebug(ti,"Received new app check token=",$),this.appCheckCredentialListener($,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($){this.authCredentialListener=$}setAppCheckTokenChangeListener($){this.appCheckCredentialListener=$}terminate(){this.asyncQueue.enterRestrictedMode();let $=new __PRIVATE_Deferred;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),$.resolve()}catch(en){let et=__PRIVATE_wrapInUserErrorIfRecoverable(en,"Failed to shutdown persistence");$.reject(et)}}),$.promise}};async function __PRIVATE_setOfflineComponentProvider($,et){$.asyncQueue.verifyOperationInProgress(),__PRIVATE_logDebug(ti,"Initializing OfflineComponentProvider");let en=$.configuration;await et.initialize(en);let er=en.initialUser;$.setCredentialChangeListener(async $=>{er.isEqual($)||(await __PRIVATE_localStoreHandleUserChange(et.localStore,$),er=$)}),et.persistence.setDatabaseDeletedListener(()=>$.terminate()),$._offlineComponents=et}async function __PRIVATE_setOnlineComponentProvider($,et){$.asyncQueue.verifyOperationInProgress();let en=await __PRIVATE_ensureOfflineComponents($);__PRIVATE_logDebug(ti,"Initializing OnlineComponentProvider"),await et.initialize(en,$.configuration),$.setCredentialChangeListener($=>__PRIVATE_remoteStoreHandleCredentialChange(et.remoteStore,$)),$.setAppCheckTokenChangeListener(($,en)=>__PRIVATE_remoteStoreHandleCredentialChange(et.remoteStore,en)),$._onlineComponents=et}async function __PRIVATE_ensureOfflineComponents($){if(!$._offlineComponents){if
1357($._uninitializedComponentsProvider){__PRIVATE_logDebug(ti,"Using user provided OfflineComponentProvider");try{await __PRIVATE_setOfflineComponentProvider($,$._uninitializedComponentsProvider._offline)}catch(et){if(!("FirebaseError"===et.name?et.code===eR.FAILED_PRECONDITION||et.code===eR.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&et instanceof DOMException)||22===et.code||20===et.code||11===et.code))throw et;__PRIVATE_logWarn("Error using user provided cache. Falling back to memory cache: "+et),await __PRIVATE_setOfflineComponentProvider($,new __PRIVATE_MemoryOfflineComponentProvider)}}else __PRIVATE_logDebug(ti,"Using default OfflineComponentProvider"),await __PRIVATE_setOfflineComponentProvider($,new __PRIVATE_LruGcMemoryOfflineComponentProvider(void 0))}return $._offlineComponents}async function __PRIVATE_ensureOnlineComponents($){return $._onlineComponents||($._uninitializedComponentsProvider?(__PRIVATE_logDebug(ti,"Using user provided OnlineComponentProvider"),await __PRIVATE_setOnlineComponentProvider($,$._uninitializedComponentsProvider._online)):(__PRIVATE_logDebug(ti,"Using default OnlineComponentProvider"),await __PRIVATE_setOnlineComponentProvider($,new OnlineComponentProvider))),$._onlineComponents}function __PRIVATE_getDatastore($){return __PRIVATE_ensureOnlineComponents($).then($=>$.datastore)}async function __PRIVATE_getEventManager($){let et=await __PRIVATE_ensureOnlineComponents($),en=et.eventManager;return en.onListen=__PRIVATE_syncEngineListen.bind(null,et.syncEngine),en.onUnlisten=__PRIVATE_syncEngineUnlisten.bind(null,et.syncEngine),en.onFirstRemoteStoreListen=__PRIVATE_triggerRemoteStoreListen.bind(null,et.syncEngine),en.onLastRemoteStoreUnlisten=__PRIVATE_triggerRemoteStoreUnlisten.bind(null,et.syncEngine),en}function __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener($,et,en={}){let er=new __PRIVATE_Deferred;return $.asyncQueue.enqueueAndForget(async()=>(function($,et,en,er,ei){let eo=new __PRIVATE_AsyncObserver({next:en=>{eo.Nu(),et.enqueueAndForget(()=>__PRIVATE_eventManagerUnlisten($,es)),en.fromCache&&"server"===er.source?ei.reject(new FirestoreError(eR.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):ei.resolve(en)},error:$=>ei.reject($)}),es=new __PRIVATE_QueryListener(en,eo,{includeMetadataChanges:!0,qa:!0});return __PRIVATE_eventManagerListen($,es)})(await __PRIVATE_getEventManager($),$.asyncQueue,et,en,er)),er.promise}/** 1358 * @license 1359 * Copyright 2023 Google LLC 1360 * 1361 * Licensed under the Apache License, Version 2.0 (the "License"); 1362 * you may not use this file except in compliance with the License. 1363 * You may obtain a copy of the License at 1364 * 1365 * http://www.apache.org/licenses/LICENSE-2.0 1366 * 1367 * Unless required by applicable law or agreed to in writing, software 1368 * distributed under the License is distributed on an "AS IS" BASIS, 1369 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1370 * See the License for the specific language governing permissions and 1371 * limitations under the License. 1372 */function __PRIVATE_cloneLongPollingOptions($){let et={};return void 0!==$.timeoutSeconds&&(et.timeoutSeconds=$.timeoutSeconds),et}/** 1373 * @license 1374 * Copyright 2020 Google LLC 1375 * 1376 * Licensed under the Apache License, Version 2.0 (the "License"); 1377 * you may not use this file except in compliance with the License. 1378 * You may obtain a copy of the License at 1379 * 1380 * http://www.apache.org/licenses/LICENSE-2.0 1381 * 1382 * Unless required by applicable law or agreed to in writing, software 1383 * distributed under the License is distributed on an "AS IS" BASIS, 1384 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1385 * See the License for the specific language governing permissions and 1386 * limitations under the License. 1387 */let to=new Map,ts="firestore.googleapis.com";let FirestoreSettingsImpl=class FirestoreSettingsImpl{constructor($){if(void 0===$.host){if(void 0!==$.ssl)throw new FirestoreError(eR.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=ts,this.ssl=!0}else this.host=$.host,this.ssl=$.ssl??!0;if(this.isUsingEmulator=void 0!==$.emulatorOptions,this.credentials=$.credentials,this.ignoreUndefinedProperties=!!$.ignoreUndefinedProperties,this.localCache=$.localCache,void 0===$.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==$.cacheSizeBytes&&$.cacheSizeBytes<1048576)throw new FirestoreError(eR.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=$.cacheSizeBytes}(function($,et,en,er){if(!0===et&&!0===er)throw new FirestoreError(eR.INVALID_ARGUMENT,`${$} and ${en} cannot be used together.`)})("experimentalForceLongPolling",$.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",$.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!$.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===$.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!$.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=__PRIVATE_cloneLongPollingOptions($.experimentalLongPollingOptions??{}),function($){if(void 0!==$.timeoutSeconds){if(isNaN($.timeoutSeconds))throw new FirestoreError(eR.INVALID_ARGUMENT,`invalid long polling timeout: ${$.timeoutSeconds} (must not be NaN)`);if($.timeoutSeconds<5)throw new FirestoreError(eR.INVALID_ARGUMENT,`invalid long polling timeout: ${$.timeoutSeconds} (minimum allowed value is 5)`);if($.timeoutSeconds>30)throw new FirestoreError(eR.INVALID_ARGUMENT,`invalid long polling timeout: ${$.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!$.useFetchStreams}isEqual($){var et,en;return this.host===$.host&&this.ssl===$.ssl&&this.credentials===$.credentials&&this.cacheSizeBytes===$.cacheSizeBytes&&this.experimentalForceLongPolling===$.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===$.experimentalAutoDetectLongPolling&&(et=this.experimentalLongPollingOptions,en=$.experimentalLongPollingOptions,et.timeoutSeconds===en.timeoutSeconds)&&this.ignoreUndefinedProperties===$.ignoreUndefinedProperties&&this.useFetchStreams===$.useFetchStreams}};let Firestore$1=class Firestore$1{constructor($,et,en,er){this._authCredentials=$,this._appCheckCredentials=et,this._databaseId=en,this._app=er,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new FirestoreSettingsImpl({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new FirestoreError(eR.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($){if(this._settingsFrozen)throw new FirestoreError(eR.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 FirestoreSettingsImpl($),this._emulatorOptions=$.emulatorOptions||{},void 0!==$.credentials&&(this._authCredentials=function($){if(!$)return new __PRIVATE_EmptyAuthCredentialsProvider;switch($.type){case"firstParty":return new __PRIVATE_FirstPartyAuthCredentialsProvider($.sessionIndex||"0",$.i
1387amToken||null,$.authTokenFactory||null);case"provider":return $.client;default:throw new FirestoreError(eR.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}($.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_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($){let et=to.get($);et&&(__PRIVATE_logDebug("ComponentProvider","Removing Datastore"),to.delete($),et.terminate())}(this),Promise.resolve()}};/** 1388 * @license 1389 * Copyright 2020 Google LLC 1390 * 1391 * Licensed under the Apache License, Version 2.0 (the "License"); 1392 * you may not use this file except in compliance with the License. 1393 * You may obtain a copy of the License at 1394 * 1395 * http://www.apache.org/licenses/LICENSE-2.0 1396 * 1397 * Unless required by applicable law or agreed to in writing, software 1398 * distributed under the License is distributed on an "AS IS" BASIS, 1399 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1400 * See the License for the specific language governing permissions and 1401 * limitations under the License. 1402 */let Query=class Query{constructor($,et,en){this.converter=et,this._query=en,this.type="query",this.firestore=$}withConverter($){return new Query(this.firestore,$,this._query)}};let DocumentReference=class DocumentReference{constructor($,et,en){this.converter=et,this._key=en,this.type="document",this.firestore=$}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new CollectionReference(this.firestore,this.converter,this._key.path.popLast())}withConverter($){return new DocumentReference(this.firestore,$,this._key)}toJSON(){return{type:DocumentReference._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON($,et,en){if(__PRIVATE_validateJSON(et,DocumentReference._jsonSchema))return new DocumentReference($,en||null,new DocumentKey(ResourcePath.fromString(et.referencePath)))}};DocumentReference._jsonSchemaVersion="firestore/documentReference/1.0",DocumentReference._jsonSchema={type:property("string",DocumentReference._jsonSchemaVersion),referencePath:property("string")};let CollectionReference=class CollectionReference extends Query{constructor($,et,en){super($,et,__PRIVATE_newQueryForPath(en)),this._path=en,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let $=this._path.popLast();return $.isEmpty()?null:new DocumentReference(this.firestore,null,new DocumentKey($))}withConverter($){return new CollectionReference(this.firestore,$,this._path)}};function collection($,et,...en){if($=(0,ek.m9)($),__PRIVATE_validateNonEmptyArgument("collection","path",et),$ instanceof Firestore$1){let er=ResourcePath.fromString(et,...en);return __PRIVATE_validateCollectionPath(er),new CollectionReference($,null,er)}{if(!($ instanceof DocumentReference||$ instanceof CollectionReference))throw new FirestoreError(eR.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let er=$._path.child(ResourcePath.fromString(et,...en));return __PRIVATE_validateCollectionPath(er),new CollectionReference($.firestore,null,er)}}function doc($,et,...en){if($=(0,ek.m9)($),1==arguments.length&&(et=__PRIVATE_AutoId.newId()),__PRIVATE_validateNonEmptyArgument("doc","path",et),$ instanceof Firestore$1){let er=ResourcePath.fromString(et,...en);return __PRIVATE_validateDocumentPath(er),new DocumentReference($,null,new DocumentKey(er))}{if(!($ instanceof DocumentReference||$ instanceof CollectionReference))throw new FirestoreError(eR.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let er=$._path.child(ResourcePath.fromString(et,...en));return __PRIVATE_validateDocumentPath(er),new DocumentReference($.firestore,$ instanceof CollectionReference?$.converter:null,new DocumentKey(er))}}/** 1403 * @license 1404 * Copyright 2020 Google LLC 1405 * 1406 * Licensed under the Apache License, Version 2.0 (the "License");
1407 * you may not use this file except in compliance with the License. 1408 * You may obtain a copy of the License at 1409 * 1410 * http://www.apache.org/licenses/LICENSE-2.0 1411 * 1412 * Unless required by applicable law or agreed to in writing, software 1413 * distributed under the License is distributed on an "AS IS" BASIS, 1414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1415 * See the License for the specific language governing permissions and 1416 * limitations under the License. 1417 */let tl="AsyncQueue";let __PRIVATE_AsyncQueueImpl=class __PRIVATE_AsyncQueueImpl{constructor($=Promise.resolve()){this.Xu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new __PRIVATE_ExponentialBackoff(this,"async_queue_retry"),this._c=()=>{let $=getDocument();$&&__PRIVATE_logDebug(tl,"Visibility state changed to "+$.visibilityState),this.M_.w_()},this.ac=$;let et=getDocument();et&&"function"==typeof et.addEventListener&&et.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget($){this.enqueue($)}enqueueAndForgetEvenWhileRestricted($){this.uc(),this.cc($)}enterRestrictedMode($){if(!this.ec){this.ec=!0,this.sc=$||!1;let et=getDocument();et&&"function"==typeof et.removeEventListener&&et.removeEventListener("visibilitychange",this._c)}}enqueue($){if(this.uc(),this.ec)return new Promise(()=>{});let et=new __PRIVATE_Deferred;return this.cc(()=>this.ec&&this.sc?Promise.resolve():($().then(et.resolve,et.reject),et.promise)).then(()=>et.promise)}enqueueRetryable($){this.enqueueAndForget(()=>(this.Xu.push($),this.lc()))}async lc(){if(0!==this.Xu.length){try{await this.Xu[0](),this.Xu.shift(),this.M_.reset()}catch($){if(!__PRIVATE_isIndexedDbTransactionError($))throw $;__PRIVATE_logDebug(tl,"Operation failed with retryable error: "+$)}this.Xu.length>0&&this.M_.p_(()=>this.lc())}}cc($){let et=this.ac.then(()=>(this.rc=!0,$().catch($=>{throw this.nc=$,this.rc=!1,__PRIVATE_logError("INTERNAL UNHANDLED ERROR: ",__PRIVATE_getMessageOrStack($)),$}).then($=>(this.rc=!1,$))));return this.ac=et,et}enqueueAfterDelay($,et,en){this.uc(),this.oc.indexOf($)>-1&&(et=0);let er=DelayedOperation.createAndSchedule(this,$,et,en,$=>this.hc($));return this.tc.push(er),er}uc(){this.nc&&fail(47125,{Pc:__PRIVATE_getMessageOrStack(this.nc)})}verifyOperationInProgress(){}async Tc(){let $;do $=this.ac,await $;while($!==this.ac)}Ic($){for(let et of this.tc)if(et.timerId===$)return!0;return!1}Ec($){return this.Tc().then(()=>{for(let et of(this.tc.sort(($,et)=>$.targetTimeMs-et.targetTimeMs),this.tc))if(et.skipDelay(),"all"!==$&&et.timerId===$)break;return this.Tc()})}dc($){this.oc.push($)}hc($){let et=this.tc.indexOf($);this.tc.splice(et,1)}};function __PRIVATE_getMessageOrStack($){let et=$.message||"";return $.stack&&(et=$.stack.includes($.message)?$.stack:$.message+"\n"+$.stack),et}/** 1418 * @license 1419 * Copyright 2017 Google LLC 1420 * 1421 * Licensed under the Apache License, Version 2.0 (the "License"); 1422 * you may not use this file except in compliance with the License. 1423 * You may obtain a copy of the License at 1424 * 1425 * http://www.apache.org/licenses/LICENSE-2.0 1426 * 1427 * Unless required by applicable law or agreed to in writing, software 1428 * distributed under the License is distributed on an "AS IS" BASIS, 1429 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1430 * See the License for the specific language governing permissions and 1431 * limitations under the License. 1432 */function __PRIVATE_isPartialObserver($){return function($,et){if("object"!=typeof $||null===$)return!1;for(let en of et)if(en in $&&"function"==typeof $[en])return!0;return!1}($,["next","error","complete"])}let Firestore=class Firestore extends Firestore$1{constructor($,et,en,er){super($,et,en,er),this.type="firestore",this._queue=new __PRIVATE_AsyncQueueImpl,this._persistenceKey=er?.name||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){let $=this._firestoreClient.terminate();this._queue=new __PRIVATE_AsyncQueueImpl($),this._firestoreClient=void 0,await $}}};function initializeFirestore($,et,en){en||(en=eB);let er=(0,ex.qX)($,"firestore");if(er.isInitialized(en)){let $=er.getImmediate({identifier:en}),ei=er.getOptions(en);if((0,ek.vZ)(ei,et))return $;throw new FirestoreError(eR.FAILED_PRECONDITION,"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.")}if(void 0!==et.cacheSizeBytes&&void 0!==et.localCache)throw new FirestoreError(eR.INVALID_ARGUMENT,"cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object");
1432if(void 0!==et.cacheSizeBytes&&-1!==et.cacheSizeBytes&&et.cacheSizeBytes<1048576)throw new FirestoreError(eR.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return et.host&&(0,ek.Xx)(et.host)&&(0,ek.Uo)(et.host),er.initialize({options:et,instanceIdentifier:en})}function getFirestore($,et){let en="object"==typeof $?$:(0,ex.Mq)(),er="string"==typeof $?$:et||eB,ei=(0,ex.qX)(en,"firestore").getImmediate({identifier:er});if(!ei._initialized){let $=(0,ek.P0)("firestore");$&&function($,et,en,er={}){$=__PRIVATE_cast($,Firestore$1);let ei=(0,ek.Xx)(et),eo=$._getSettings(),es={...eo,emulatorOptions:$._getEmulatorOptions()},el=`${et}:${en}`;ei&&((0,ek.Uo)(`https://${el}`),(0,ek.dp)("Firestore",!0)),eo.host!==ts&&eo.host!==el&&__PRIVATE_logWarn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");let eu={...eo,host:el,ssl:ei,emulatorOptions:er};if(!(0,ek.vZ)(eu,es)&&($._setSettings(eu),er.mockUserToken)){let et,en;if("string"==typeof er.mockUserToken)et=er.mockUserToken,en=User.MOCK_USER;else{et=(0,ek.Sg)(er.mockUserToken,$._app?.options.projectId);let ei=er.mockUserToken.sub||er.mockUserToken.user_id;if(!ei)throw new FirestoreError(eR.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");en=new User(ei)}$._authCredentials=new __PRIVATE_EmulatorAuthCredentialsProvider(new __PRIVATE_OAuthToken(et,en))}}(ei,...$)}return ei}function ensureFirestoreConfigured($){if($._terminated)throw new FirestoreError(eR.FAILED_PRECONDITION,"The client has already been terminated.");return $._firestoreClient||function($){var et,en,er;let ei=$._freezeSettings(),eo=(et=$._databaseId,en=$._app?.options.appId||"",er=$._persistenceKey,new DatabaseInfo(et,en,er,ei.host,ei.ssl,ei.experimentalForceLongPolling,ei.experimentalAutoDetectLongPolling,__PRIVATE_cloneLongPollingOptions(ei.experimentalLongPollingOptions),ei.useFetchStreams,ei.isUsingEmulator));$._componentsProvider||ei.localCache?._offlineComponentProvider&&ei.localCache?._onlineComponentProvider&&($._componentsProvider={_offline:ei.localCache._offlineComponentProvider,_online:ei.localCache._onlineComponentProvider}),$._firestoreClient=new FirestoreClient($._authCredentials,$._appCheckCredentials,$._queue,eo,$._componentsProvider&&function($){let et=$?._online.build();return{_offline:$?._offline.build(et),_online:et}}($._componentsProvider))}($),$._firestoreClient}/** 1433 * @license 1434 * Copyright 2020 Google LLC 1435 * 1436 * Licensed under the Apache License, Version 2.0 (the "License"); 1437 * you may not use this file except in compliance with the License. 1438 * You may obtain a copy of the License at 1439 * 1440 * http://www.apache.org/licenses/LICENSE-2.0 1441 * 1442 * Unless required by applicable law or agreed to in writing, software 1443 * distributed under the License is distributed on an "AS IS" BASIS, 1444 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1445 * See the License for the specific language governing permissions and 1446 * limitations under the License. 1447 *//** 1448 * @license 1449 * Copyright 2022 Google LLC 1450 * 1451 * Licensed under the Apache License, Version 2.0 (the "License"); 1452 * you may not use this file except in compliance with the License. 1453 * You may obtain a copy of the License at 1454 * 1455 * http://www.apache.org/licenses/LICENSE-2.0 1456 * 1457 * Unless required by applicable law or agreed to in writing, software 1458 * distributed under the License is distributed on an "AS IS" BASIS, 1459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1460 * See the License for the specific language governing permissions and 1461 * limitations under the License. 1462 */let AggregateField=class AggregateField{constructor($="count",et){this._internalFieldPath=et,this.type="AggregateField",this.aggregateType=$}};let AggregateQuerySnapshot=class AggregateQuerySnapshot{constructor($,et,en){this._userDataWriter=et,this._data=en,this.type="AggregateQuerySnapshot",this.query=$}data(){return this._userDataWriter.convertObjectMap(this._data)}};/** 1463 * @license 1464 * Copyright 2020 Google LLC 1465 * 1466 * Licensed under the Apache License, Version 2.0 (the "License");
1467 * you may not use this file except in compliance with the License. 1468 * You may obtain a copy of the License at 1469 * 1470 * http://www.apache.org/licenses/LICENSE-2.0 1471 * 1472 * Unless required by applicable law or agreed to in writing, software 1473 * distributed under the License is distributed on an "AS IS" BASIS, 1474 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1475 * See the License for the specific language governing permissions and 1476 * limitations under the License. 1477 */let Bytes=class Bytes{constructor($){this._byteString=$}static fromBase64String($){try{return new Bytes(ByteString.fromBase64String($))}catch($){throw new FirestoreError(eR.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+$)}}static fromUint8Array($){return new Bytes(ByteString.fromUint8Array($))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual($){return this._byteString.isEqual($._byteString)}toJSON(){return{type:Bytes._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON($){if(__PRIVATE_validateJSON($,Bytes._jsonSchema))return Bytes.fromBase64String($.bytes)}};Bytes._jsonSchemaVersion="firestore/bytes/1.0",Bytes._jsonSchema={type:property("string",Bytes._jsonSchemaVersion),bytes:property("string")};/** 1478 * @license 1479 * Copyright 2020 Google LLC 1480 * 1481 * Licensed under the Apache License, Version 2.0 (the "License"); 1482 * you may not use this file except in compliance with the License. 1483 * You may obtain a copy of the License at 1484 * 1485 * http://www.apache.org/licenses/LICENSE-2.0 1486 * 1487 * Unless required by applicable law or agreed to in writing, software 1488 * distributed under the License is distributed on an "AS IS" BASIS, 1489 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1490 * See the License for the specific language governing permissions and 1491 * limitations under the License. 1492 */let FieldPath=class FieldPath{constructor(...$){for(let et=0;et<$.length;++et)if(0===$[et].length)throw new FirestoreError(eR.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new FieldPath$1($)}isEqual($){return this._internalPath.isEqual($._internalPath)}};/** 1493 * @license 1494 * Copyright 2020 Google LLC 1495 * 1496 * Licensed under the Apache License, Version 2.0 (the "License"); 1497 * you may not use this file except in compliance with the License. 1498 * You may obtain a copy of the License at 1499 * 1500 * http://www.apache.org/licenses/LICENSE-2.0 1501 * 1502 * Unless required by applicable law or agreed to in writing, software 1503 * distributed under the License is distributed on an "AS IS" BASIS, 1504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1505 * See the License for the specific language governing permissions and 1506 * limitations under the License. 1507 */let FieldValue=class FieldValue{constructor($){this._methodName=$}};/** 1508 * @license 1509 * Copyright 2017 Google LLC 1510 * 1511 * Licensed under the Apache License, Version 2.0 (the "License"); 1512 * you may not use this file except in compliance with the License. 1513 * You may obtain a copy of the License at 1514 * 1515 * http://www.apache.org/licenses/LICENSE-2.0 1516 * 1517 * Unless required by applicable law or agreed to in writing, software 1518 * distributed under the License is distributed on an "AS IS" BASIS, 1519 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1520 * See the License for the specific language governing permissions and 1521 * limitations under the License. 1522 */let GeoPoint=class GeoPoint{constructor($,et){if(!isFinite($)||$<-90||$>90)throw new FirestoreError(eR.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+$);if(!isFinite(et)||et<-180||et>180)throw new FirestoreError(eR.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+et);this._lat=$,this._long=et}get latitude(){return this._lat}get longitude(){return this._long}isEqual($){return this._lat===$._lat&&this._long===$._long}_compareTo($){return __PRIVATE_primitiveComparator(this._lat,$._lat)||__PRIVATE_primitiveComparator(this._long,$._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:GeoPoint._jsonSchemaVersion}}static fromJSON($){if(__PRIVATE_validateJSON($,GeoPoint._jsonSchema))return new GeoPoint($.latitude,$.longitude)}};GeoPoint._jsonSchemaVersion="firestore/geoPoint/1.0",GeoPoint._jsonSchema={type:property("str
1522ing",GeoPoint._jsonSchemaVersion),latitude:property("number"),longitude:property("number")};/** 1523 * @license 1524 * Copyright 2024 Google LLC 1525 * 1526 * Licensed under the Apache License, Version 2.0 (the "License"); 1527 * you may not use this file except in compliance with the License. 1528 * You may obtain a copy of the License at 1529 * 1530 * http://www.apache.org/licenses/LICENSE-2.0 1531 * 1532 * Unless required by applicable law or agreed to in writing, software 1533 * distributed under the License is distributed on an "AS IS" BASIS, 1534 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1535 * See the License for the specific language governing permissions and 1536 * limitations under the License. 1537 */let VectorValue=class VectorValue{constructor($){this._values=($||[]).map($=>$)}toArray(){return this._values.map($=>$)}isEqual($){return function($,et){if($.length!==et.length)return!1;for(let en=0;en<$.length;++en)if($[en]!==et[en])return!1;return!0}(this._values,$._values)}toJSON(){return{type:VectorValue._jsonSchemaVersion,vectorValues:this._values}}static fromJSON($){if(__PRIVATE_validateJSON($,VectorValue._jsonSchema)){if(Array.isArray($.vectorValues)&&$.vectorValues.every($=>"number"==typeof $))return new VectorValue($.vectorValues);throw new FirestoreError(eR.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}};VectorValue._jsonSchemaVersion="firestore/vectorValue/1.0",VectorValue._jsonSchema={type:property("string",VectorValue._jsonSchemaVersion),vectorValues:property("object")};/** 1538 * @license 1539 * Copyright 2017 Google LLC 1540 * 1541 * Licensed under the Apache License, Version 2.0 (the "License"); 1542 * you may not use this file except in compliance with the License. 1543 * You may obtain a copy of the License at 1544 * 1545 * http://www.apache.org/licenses/LICENSE-2.0 1546 * 1547 * Unless required by applicable law or agreed to in writing, software 1548 * distributed under the License is distributed on an "AS IS" BASIS, 1549 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1550 * See the License for the specific language governing permissions and 1551 * limitations under the License. 1552 */let tc=/^__.*__$/;let ParsedSetData=class ParsedSetData{constructor($,et,en){this.data=$,this.fieldMask=et,this.fieldTransforms=en}toMutation($,et){return null!==this.fieldMask?new __PRIVATE_PatchMutation($,this.data,this.fieldMask,et,this.fieldTransforms):new __PRIVATE_SetMutation($,this.data,et,this.fieldTransforms)}};
1552let ParsedUpdateData=class ParsedUpdateData{constructor($,et,en){this.data=$,this.fieldMask=et,this.fieldTransforms=en}toMutation($,et){return new __PRIVATE_PatchMutation($,this.data,this.fieldMask,et,this.fieldTransforms)}};function __PRIVATE_isWrite($){switch($){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw fail(40011,{Ac:$})}}let __PRIVATE_ParseContextImpl=class __PRIVATE_ParseContextImpl{constructor($,et,en,er,ei,eo){this.settings=$,this.databaseId=et,this.serializer=en,this.ignoreUndefinedProperties=er,void 0===ei&&this.Rc(),this.fieldTransforms=ei||[],this.fieldMask=eo||[]}get path(){return this.settings.path}get Ac(){return this.settings.Ac}Vc($){return new __PRIVATE_ParseContextImpl({...this.settings,...$},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}mc($){let et=this.path?.child($),en=this.Vc({path:et,fc:!1});return en.gc($),en}yc($){let et=this.path?.child($),en=this.Vc({path:et,fc:!1});return en.Rc(),en}wc($){return this.Vc({path:void 0,fc:!0})}Sc($){return __PRIVATE_createError($,this.settings.methodName,this.settings.bc||!1,this.path,this.settings.Dc)}contains($){return void 0!==this.fieldMask.find(et=>$.isPrefixOf(et))||void 0!==this.fieldTransforms.find(et=>$.isPrefixOf(et.field))}Rc(){if(this.path)for(let $=0;$<this.path.length;$++)this.gc(this.path.get($))}gc($){if(0===$.length)throw this.Sc("Document fields must not be empty");if(__PRIVATE_isWrite(this.Ac)&&tc.test($))throw this.Sc('Document fields cannot begin and end with "__"')}};let __PRIVATE_UserDataReader=class __PRIVATE_UserDataReader{constructor($,et,en){this.databaseId=$,this.ignoreUndefinedProperties=et,this.serializer=en||__PRIVATE_newSerializer($)}Cc($,et,en,er=!1){return new __PRIVATE_ParseContextImpl({Ac:$,methodName:et,Dc:en,path:FieldPath$1.emptyPath(),fc:!1,bc:er},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}};function __PRIVATE_newUserDataReader($){let et=$._freezeSettings(),en=__PRIVATE_newSerializer($._databaseId);return new __PRIVATE_UserDataReader($._databaseId,!!et.ignoreUndefinedProperties,en)}function __PRIVATE_parseSetData($,et,en,er,ei,eo={}){let es,el;let eu=$.Cc(eo.merge||eo.mergeFields?2:0,et,en,ei);__PRIVATE_validatePlainObject("Data must be an object, but it was:",eu,er);let ed=__PRIVATE_parseObject(er,eu);if(eo.merge)es=new FieldMask(eu.fieldMask),el=eu.fieldTransforms;else if(eo.mergeFields){let $=[];for(let er of eo.mergeFields){let ei=__PRIVATE_fieldPathFromArgument$1(et,er,en);if(!eu.contains(ei))throw new FirestoreError(eR.INVALID_ARGUMENT,`Field '${ei}' is specified in your field mask but missing from your input data.`);__PRIVATE_fieldMaskContains($,ei)||$.push(ei)}es=new FieldMask($),el=eu.fieldTransforms.filter($=>es.covers($.field))}else es=null,el=eu.fieldTransforms;return new ParsedSetData(new ObjectValue(ed),es,el)}let __PRIVATE_DeleteFieldValueImpl=class __PRIVATE_DeleteFieldValueImpl extends FieldValue{_toFieldTransform($){if(2!==$.Ac)throw 1===$.Ac?$.Sc(`${this._methodName}() can only appear at the top level of your update data`):$.Sc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return $.fieldMask.push($.path),null}isEqual($){return $ instanceof __PRIVATE_DeleteFieldValueImpl}};function __PRIVATE_createSentinelChildContext($,et,en){return new __PRIVATE_ParseContextImpl({Ac:3,Dc:et.settings.Dc,methodName:$._methodName,fc:en},et.databaseId,et.serializer,et.ignoreUndefinedProperties)}let __PRIVATE_ServerTimestampFieldValueImpl=class __PRIVATE_ServerTimestampFieldValueImpl extends FieldValue{_toFieldTransform($){return new FieldTransform($.path,new __PRIVATE_ServerTimestampTransform)}isEqual($){return $ instanceof __PRIVATE_ServerTimestampFieldValueImpl}};let __PRIVATE_ArrayUnionFieldValueImpl=class __PRIVATE_ArrayUnionFieldValueImpl extends FieldValue{constructor($,et){super($),this.vc=et}_toFieldTransform($){let et=__PRIVATE_createSentinelChildContext(this,$,!0),en=this.vc.map($=>__PRIVATE_parseData($,et)),er=new __PRIVATE_ArrayUnionTransformOperation(en);return new FieldTransform($.path,er)}isEqual($){return $ instanceof __PRIVATE_ArrayUnionFieldValueImpl&&(0,ek.vZ)(this.vc,$.vc)}};let __PRIVATE_ArrayRemoveFieldValueImpl=class __PRIVATE_ArrayRemoveFieldValueImpl extends FieldValue{constructor($,et){super($),this.vc=et}_toFieldTransform($){let et=__PRIVATE_createSentinelChildContext(this,$,!0),en=this.vc.map($=>__PRIVATE_parseData($,et)),er=new __PRIVATE_ArrayRemoveTransformOperation(en);return new FieldTransform($.path,er)}isEqual($){return $ instanceof __PRIVATE_ArrayRemoveFieldValueImpl&&(0,ek.vZ)(this.vc,$.vc)}};let __PRIVATE_NumericIncrementFieldValueImpl=class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue{constructor($,et){super($),this.Fc=et}_toFieldTransform($){let et=new __PRIVATE_NumericIncrementTransformOperation($.serializer,toNumber($.serializer,this.Fc));return new FieldTransform($.path,et)}isEqual($){return $ instanceof __PRIVATE_NumericIncrementFieldValueImpl&&this.Fc===$.Fc}};
1552function __PRIVATE_parseUpdateData($,et,en,er){let ei=$.Cc(1,et,en);__PRIVATE_validatePlainObject("Data must be an object, but it was:",ei,er);let eo=[],es=ObjectValue.empty();forEach(er,($,er)=>{let el=__PRIVATE_fieldPathFromDotSeparatedString(et,$,en);er=(0,ek.m9)(er);let eu=ei.yc(el);if(er instanceof __PRIVATE_DeleteFieldValueImpl)eo.push(el);else{let $=__PRIVATE_parseData(er,eu);null!=$&&(eo.push(el),es.set(el,$))}});let el=new FieldMask(eo);return new ParsedUpdateData(es,el,ei.fieldTransforms)}function __PRIVATE_parseUpdateVarargs($,et,en,er,ei,eo){let es=$.Cc(1,et,en),el=[__PRIVATE_fieldPathFromArgument$1(et,er,en)],eu=[ei];if(eo.length%2!=0)throw new FirestoreError(eR.INVALID_ARGUMENT,`Function ${et}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let $=0;$<eo.length;$+=2)el.push(__PRIVATE_fieldPathFromArgument$1(et,eo[$])),eu.push(eo[$+1]);let ed=[],eh=ObjectValue.empty();for(let $=el.length-1;$>=0;--$)if(!__PRIVATE_fieldMaskContains(ed,el[$])){let et=el[$],en=eu[$];en=(0,ek.m9)(en);let er=es.yc(et);if(en instanceof __PRIVATE_DeleteFieldValueImpl)ed.push(et);else{let $=__PRIVATE_parseData(en,er);null!=$&&(ed.push(et),eh.set(et,$))}}let ep=new FieldMask(ed);return new ParsedUpdateData(eh,ep,es.fieldTransforms)}function __PRIVATE_parseQueryValue($,et,en,er=!1){return __PRIVATE_parseData(en,$.Cc(er?4:3,et))}function __PRIVATE_parseData($,et){if(__PRIVATE_looksLikeJsonObject($=(0,ek.m9)($)))return __PRIVATE_validatePlainObject("Unsupported field value:",et,$),__PRIVATE_parseObject($,et);if($ instanceof FieldValue)return function($,et){if(!__PRIVATE_isWrite(et.Ac))throw et.Sc(`${$._methodName}() can only be used with update() and set()`);if(!et.path)throw et.Sc(`${$._methodName}() is not currently supported inside arrays`);let en=$._toFieldTransform(et);en&&et.fieldTransforms.push(en)}($,et),null;if(void 0===$&&et.ignoreUndefinedProperties)return null;if(et.path&&et.fieldMask.push(et.path),$ instanceof Array){if(et.settings.fc&&4!==et.Ac)throw et.Sc("Nested arrays are not supported");return function($,et){let en=[],er=0;for(let ei of $){let $=__PRIVATE_parseData(ei,et.wc(er));null==$&&($={nullValue:"NULL_VALUE"}),en.push($),er++}return{arrayValue:{values:en}}}($,et)}return function($,et){if(null===($=(0,ek.m9)($)))return{nullValue:"NULL_VALUE"};if("number"==typeof $)return toNumber(et.serializer,$);if("boolean"==typeof $)return{booleanValue:$};if("string"==typeof $)return{stringValue:$};if($ instanceof Date){let en=Timestamp.fromDate($);return{timestampValue:toTimestamp(et.serializer,en)}}if($ instanceof Timestamp){let en=new Timestamp($.seconds,1e3*Math.floor($.nanoseconds/1e3));return{timestampValue:toTimestamp(et.serializer,en)}}if($ instanceof GeoPoint)return{geoPointValue:{latitude:$.latitude,longitude:$.longitude}};if($ instanceof Bytes)return{bytesValue:__PRIVATE_toBytes(et.serializer,$._byteString)};if($ instanceof DocumentReference){let en=et.databaseId,er=$.firestore._databaseId;if(!er.isEqual(en))throw et.Sc(`Document reference is for database ${er.projectId}/${er.database} but should be for database ${en.projectId}/${en.database}`);return{referenceValue:__PRIVATE_toResourceName($.firestore._databaseId||et.databaseId,$._key.path)}}if($ instanceof VectorValue)return function($,et){let en={fields:{[eU]:{stringValue:eZ},[eW]:{arrayValue:{values:$.toArray().map($=>{if("number"!=typeof $)throw et.Sc("VectorValues must only contain numeric values.");return __PRIVATE_toDouble(et.serializer,$)})}}}};return{mapValue:en}}($,et);throw et.Sc(`Unsupported field value: ${__PRIVATE_valueDescription($)}`)}($,et)}function __PRIVATE_parseObject($,et){let en={};return isEmpty($)?et.path&&et.path.length>0&&et.fieldMask.push(et.path):forEach($,($,er)=>{let ei=__PRIVATE_parseData(er,et.mc($));null!=ei&&(en[$]=ei)}),{mapValue:{fields:en}}}function __PRIVATE_looksLikeJsonObject($){return!("object"!=typeof $||null===$||$ instanceof Array||$ instanceof Date||$ instanceof Timestamp||$ instanceof GeoPoint||$ instanceof Bytes||$ instanceof DocumentReference||$ instanceof FieldValue||$ instanceof VectorValue)}
1552function __PRIVATE_validatePlainObject($,et,en){if(!__PRIVATE_looksLikeJsonObject(en)||!__PRIVATE_isPlainObject(en)){let er=__PRIVATE_valueDescription(en);throw"an object"===er?et.Sc($+" a custom object"):et.Sc($+" "+er)}}function __PRIVATE_fieldPathFromArgument$1($,et,en){if((et=(0,ek.m9)(et))instanceof FieldPath)return et._internalPath;if("string"==typeof et)return __PRIVATE_fieldPathFromDotSeparatedString($,et);throw __PRIVATE_createError("Field path arguments must be of type string or ",$,!1,void 0,en)}let tu=RegExp("[~\\*/\\[\\]]");function __PRIVATE_fieldPathFromDotSeparatedString($,et,en){if(et.search(tu)>=0)throw __PRIVATE_createError(`Invalid field path (${et}). Paths must not contain '~', '*', '/', '[', or ']'`,$,!1,void 0,en);try{return new FieldPath(...et.split("."))._internalPath}catch(er){throw __PRIVATE_createError(`Invalid field path (${et}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,$,!1,void 0,en)}}function __PRIVATE_createError($,et,en,er,ei){let eo=er&&!er.isEmpty(),es=void 0!==ei,el=`Function ${et}() called with invalid data`;en&&(el+=" (via `toFirestore()`)"),el+=". ";let eu="";return(eo||es)&&(eu+=" (found",eo&&(eu+=` in field ${er}`),es&&(eu+=` in document ${ei}`),eu+=")"),new FirestoreError(eR.INVALID_ARGUMENT,el+$+eu)}function __PRIVATE_fieldMaskContains($,et){return $.some($=>$.isEqual(et))}/** 1553 * @license 1554 * Copyright 2020 Google LLC 1555 * 1556 * Licensed under the Apache License, Version 2.0 (the "License"); 1557 * you may not use this file except in compliance with the License. 1558 * You may obtain a copy of the License at 1559 * 1560 * http://www.apache.org/licenses/LICENSE-2.0 1561 * 1562 * Unless required by applicable law or agreed to in writing, software 1563 * distributed under the License is distributed on an "AS IS" BASIS, 1564 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1565 * See the License for the specific language governing permissions and 1566 * limitations under the License. 1567 */let DocumentSnapshot$1=class DocumentSnapshot$1{constructor($,et,en,er,ei){this._firestore=$,this._userDataWriter=et,this._key=en,this._document=er,this._converter=ei}get id(){return this._key.path.lastSegment()}get ref(){return new DocumentReference(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let $=new QueryDocumentSnapshot$1(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore($)}return this._userDataWriter.convertValue(this._document.data.value)}}get($){if(this._document){let et=this._document.data.field(__PRIVATE_fieldPathFromArgument("DocumentSnapshot.get",$));if(null!==et)return this._userDataWriter.convertValue(et)}}};let QueryDocumentSnapshot$1=class QueryDocumentSnapshot$1 extends DocumentSnapshot$1{data(){return super.data()}};function __PRIVATE_fieldPathFromArgument($,et){return"string"==typeof et?__PRIVATE_fieldPathFromDotSeparatedString($,et):et instanceof FieldPath?et._internalPath:et._delegate._internalPath}/** 1568 * @license 1569 * Copyright 2020 Google LLC 1570 * 1571 * Licensed under the Apache License, Version 2.0 (the "License"); 1572 * you may not use this file except in compliance with the License. 1573 * You may obtain a copy of the License at 1574 * 1575 * http://www.apache.org/licenses/LICENSE-2.0 1576 * 1577 * Unless required by applicable law or agreed to in writing, software 1578 * distributed under the License is distributed on an "AS IS" BASIS, 1579 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1580 * See the License for the specific language governing permissions and 1581 * limitations under the License. 1582 */function __PRIVATE_validateHasExplicitOrderByForLimitToLast($){if("L"===$.limitType&&0===$.explicitOrderBy.length)throw new FirestoreError(eR.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}let AppliableConstraint=class AppliableConstraint{};let QueryConstraint=class QueryConstraint extends AppliableConstraint{};function query($,et,...en){let er=[];for(let ei of(et instanceof AppliableConstraint&&er.push(et),function($){let et=$.filter($=>$ instanceof QueryCompositeFilterConstraint).length,en=$.filter($=>$ instanceof QueryFieldFilterConstraint).length;if(et>1||et>0&&en>0)throw new FirestoreError(eR.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(er=er.concat(en)),er))$=ei._apply($);return $}let QueryFieldFilterConstraint=class QueryFieldFilterConstraint extends QueryConstraint{constructor($,et,en){super(),this._field=$,this._op=et,this._value=en,this.type="where"}static _create($,et,en){return new QueryFieldFilterConstraint($,et,en)}_apply($){let et=this._parse($);return __PRIVATE_validateNewFieldFilter($._query,et),new Query($.firestore,$.converter,__PRIVATE_queryWithAddedFilter($._query,et))}_parse($){let et=__PRIVATE_newUserDataReader($.firestore),en=function($,et,en,er,ei,eo,es){let el;
1582if(ei.isKeyField()){if("array-contains"===eo||"array-contains-any"===eo)throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid Query. You can't perform '${eo}' queries on documentId().`);if("in"===eo||"not-in"===eo){__PRIVATE_validateDisjunctiveFilterElements(es,eo);let et=[];for(let en of es)et.push(__PRIVATE_parseDocumentIdValue(er,$,en));el={arrayValue:{values:et}}}else el=__PRIVATE_parseDocumentIdValue(er,$,es)}else"in"!==eo&&"not-in"!==eo&&"array-contains-any"!==eo||__PRIVATE_validateDisjunctiveFilterElements(es,eo),el=__PRIVATE_parseQueryValue(en,et,es,"in"===eo||"not-in"===eo);let eu=FieldFilter.create(ei,eo,el);return eu}($._query,"where",et,$.firestore._databaseId,this._field,this._op,this._value);return en}};function where($,et,en){let er=__PRIVATE_fieldPathFromArgument("where",$);return QueryFieldFilterConstraint._create(er,et,en)}let QueryCompositeFilterConstraint=class QueryCompositeFilterConstraint extends AppliableConstraint{constructor($,et){super(),this.type=$,this._queryConstraints=et}static _create($,et){return new QueryCompositeFilterConstraint($,et)}_parse($){let et=this._queryConstraints.map(et=>et._parse($)).filter($=>$.getFilters().length>0);return 1===et.length?et[0]:CompositeFilter.create(et,this._getOperator())}_apply($){let et=this._parse($);return 0===et.getFilters().length?$:(function($,et){let en=$,er=et.getFlattenedFilters();for(let $ of er)__PRIVATE_validateNewFieldFilter(en,$),en=__PRIVATE_queryWithAddedFilter(en,$)}($._query,et),new Query($.firestore,$.converter,__PRIVATE_queryWithAddedFilter($._query,et)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}};let QueryOrderByConstraint=class QueryOrderByConstraint extends QueryConstraint{constructor($,et){super(),this._field=$,this._direction=et,this.type="orderBy"}static _create($,et){return new QueryOrderByConstraint($,et)}_apply($){let et=function($,et,en){if(null!==$.startAt)throw new FirestoreError(eR.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==$.endAt)throw new FirestoreError(eR.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");let er=new OrderBy(et,en);return er}($._query,this._field,this._direction);return new Query($.firestore,$.converter,function($,et){let en=$.explicitOrderBy.concat([et]);return new __PRIVATE_QueryImpl($.path,$.collectionGroup,en,$.filters.slice(),$.limit,$.limitType,$.startAt,$.endAt)}($._query,et))}};function orderBy($,et="asc"){let en=__PRIVATE_fieldPathFromArgument("orderBy",$);return QueryOrderByConstraint._create(en,et)}let QueryLimitConstraint=class QueryLimitConstraint extends QueryConstraint{constructor($,et,en){super(),this.type=$,this._limit=et,this._limitType=en}static _create($,et,en){return new QueryLimitConstraint($,et,en)}_apply($){return new Query($.firestore,$.converter,__PRIVATE_queryWithLimit($._query,this._limit,this._limitType))}};function limit($){return function($,et){if(et<=0)throw new FirestoreError(eR.INVALID_ARGUMENT,`Function ${$}() requires a positive number, but it was: ${et}.`)}("limit",$),QueryLimitConstraint._create("limit",$,"F")}let QueryStartAtConstraint=class QueryStartAtConstraint extends QueryConstraint{constructor($,et,en){super(),this.type=$,this._docOrFields=et,this._inclusive=en}static _create($,et,en){return new QueryStartAtConstraint($,et,en)}_apply($){var et;let en=function($,et,en,er){if(en[0]=(0,ek.m9)(en[0]),en[0]instanceof DocumentSnapshot$1)return function($,et,en,er,ei){if(!er)throw new FirestoreError(eR.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${en}().`);let eo=[];for(let en of __PRIVATE_queryNormalizedOrderBy($))if(en.field.isKeyField())eo.push(__PRIVATE_refValue(et,er.key));else{let $=er.data.field(en.field);if(__PRIVATE_isServerTimestamp($))throw new FirestoreError(eR.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+en.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===$){let $=en.field.canonicalString();throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${$}' (used as the orderBy) does not exist.`)}eo.push($)}return new Bound(eo,ei)}($._query,$.firestore._databaseId,et,en[0]._document,er);{let ei=__PRIVATE_newUserDataReader($.firestore);return function($,et,en,er,ei,eo){let es=$.explicitOrderBy;if(ei.length>es.length)throw new FirestoreError(eR.INVALID_ARGUMENT,`Too many arguments provided to ${er}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);let el=[];for(let eo=0;eo<ei.length;eo++){let eu=ei[eo];
1582if(es[eo].field.isKeyField()){if("string"!=typeof eu)throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${er}(), but got a ${typeof eu}`);if(!__PRIVATE_isCollectionGroupQuery($)&&-1!==eu.indexOf("/"))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${er}() must be a plain document ID, but '${eu}' contains a slash.`);let en=$.path.child(ResourcePath.fromString(eu));if(!DocumentKey.isDocumentKey(en))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${er}() must result in a valid document path, but '${en}' is not because it contains an odd number of segments.`);let ei=new DocumentKey(en);el.push(__PRIVATE_refValue(et,ei))}else{let $=__PRIVATE_parseQueryValue(en,er,eu);el.push($)}}return new Bound(el,eo)}($._query,$.firestore._databaseId,ei,et,en,er)}}($,this.type,this._docOrFields,this._inclusive);return new Query($.firestore,$.converter,(et=$._query,new __PRIVATE_QueryImpl(et.path,et.collectionGroup,et.explicitOrderBy.slice(),et.filters.slice(),et.limit,et.limitType,en,et.endAt)))}};function startAfter(...$){return QueryStartAtConstraint._create("startAfter",$,!1)}function __PRIVATE_parseDocumentIdValue($,et,en){if("string"==typeof(en=(0,ek.m9)(en))){if(""===en)throw new FirestoreError(eR.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!__PRIVATE_isCollectionGroupQuery(et)&&-1!==en.indexOf("/"))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${en}' contains a '/' character.`);let er=et.path.child(ResourcePath.fromString(en));if(!DocumentKey.isDocumentKey(er))throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${er}' is not because it has an odd number of segments (${er.length}).`);return __PRIVATE_refValue($,new DocumentKey(er))}if(en instanceof DocumentReference)return __PRIVATE_refValue($,en._key);throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${__PRIVATE_valueDescription(en)}.`)}function __PRIVATE_validateDisjunctiveFilterElements($,et){if(!Array.isArray($)||0===$.length)throw new FirestoreError(eR.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${et.toString()}' filters.`)}function __PRIVATE_validateNewFieldFilter($,et){let en=function($,et){for(let en of $)for(let $ of en.getFlattenedFilters())if(et.indexOf($.op)>=0)return $.op;return null}($.filters,function($){switch($){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(et.op));if(null!==en)throw en===et.op?new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${et.op.toString()}' filter.`):new FirestoreError(eR.INVALID_ARGUMENT,`Invalid query. You cannot use '${et.op.toString()}' filters with '${en.toString()}' filters.`)}let AbstractUserDataWriter=class AbstractUserDataWriter{convertValue($,et="none"){switch(__PRIVATE_typeOrder($)){case 0:return null;case 1:return $.booleanValue;case 2:return __PRIVATE_normalizeNumber($.integerValue||$.doubleValue);case 3:return this.convertTimestamp($.timestampValue);case 4:return this.convertServerTimestamp($,et);case 5:return $.stringValue;case 6:return this.convertBytes(__PRIVATE_normalizeByteString($.bytesValue));case 7:return this.convertReference($.referenceValue);case 8:return this.convertGeoPoint($.geoPointValue);case 9:return this.convertArray($.arrayValue,et);case 11:return this.convertObject($.mapValue,et);case 10:return this.convertVectorValue($.mapValue);default:throw fail(62114,{value:$})}}convertObject($,et){return this.convertObjectMap($.fields,et)}convertObjectMap($,et="none"){let en={};return forEach($,($,er)=>{en[$]=this.convertValue(er,et)}),en}convertVectorValue($){let et=$.fields?.[eW].arrayValue?.values?.map($=>__PRIVATE_normalizeNumber($.doubleValue));return new VectorValue(et)}convertGeoPoint($){return new GeoPoint(__PRIVATE_normalizeNumber($.latitude),__PRIVATE_normalizeNumber($.longitude))}convertArray($,et){return($.values||[]).map($=>this.convertValue($,et))}convertServerTimestamp($,et){switch(et){case"previous":let en=__PRIVATE_getPreviousValue($);return null==en?null:this.convertValue(en,et);case"estimate":return this.convertTimestamp(__PRIVATE_getLocalWriteTime($));default:return null}}convertTimestamp($){let et=__PRIVATE_normalizeTimestamp($);return new Timestamp(et.seconds,et.nanos)}convertDocumentKey($,et){let en=ResourcePath.fromString($);__PRIVATE_hardAssert(__PRIVATE_isValidResourceName(en),9688,{name:$});let er=new DatabaseId(en.get(1),en.get(3)),ei=new DocumentKey(en.popFirst(5));return er.isEqual(et)||__PRIVATE_logError(`Document ${ei} contains a document reference within a different database (${er.projectId}/${er.database}) which is not supported. It will be treated as a reference in the current database (${et.projectId}/${et.database}) instead.`),ei}};/** 1583 * @license 1584 * Copyright 2020 Google LLC 1585 * 1586 * Licensed under the Apache License, Version 2.0 (the "License");
1587 * you may not use this file except in compliance with the License. 1588 * You may obtain a copy of the License at 1589 * 1590 * http://www.apache.org/licenses/LICENSE-2.0 1591 * 1592 * Unless required by applicable law or agreed to in writing, software 1593 * distributed under the License is distributed on an "AS IS" BASIS, 1594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1595 * See the License for the specific language governing permissions and 1596 * limitations under the License. 1597 */function __PRIVATE_applyFirestoreDataConverter($,et,en){return $?en&&(en.merge||en.mergeFields)?$.toFirestore(et,en):$.toFirestore(et):et}let __PRIVATE_LiteUserDataWriter=class __PRIVATE_LiteUserDataWriter extends AbstractUserDataWriter{constructor($){super(),this.firestore=$}convertBytes($){return new Bytes($)}convertReference($){let et=this.convertDocumentKey($,this.firestore._databaseId);return new DocumentReference(this.firestore,null,et)}};let SnapshotMetadata=class SnapshotMetadata{constructor($,et){this.hasPendingWrites=$,this.fromCache=et}isEqual($){return this.hasPendingWrites===$.hasPendingWrites&&this.fromCache===$.fromCache}};let DocumentSnapshot=class DocumentSnapshot extends DocumentSnapshot$1{constructor($,et,en,er,ei,eo){super($,et,en,er,eo),this._firestore=$,this._firestoreImpl=$,this.metadata=ei}exists(){return super.exists()}data($={}){if(this._document){if(this._converter){let et=new QueryDocumentSnapshot(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(et,$)}return this._userDataWriter.convertValue(this._document.data.value,$.serverTimestamps)}}get($,et={}){if(this._document){let en=this._document.data.field(__PRIVATE_fieldPathFromArgument("DocumentSnapshot.get",$));if(null!==en)return this._userDataWriter.convertValue(en,et.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new FirestoreError(eR.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");let $=this._document,et={};return et.type=DocumentSnapshot._jsonSchemaVersion,et.bundle="",et.bundleSource="DocumentSnapshot",et.bundleName=this._key.toString(),$&&$.isValidDocument()&&$.isFoundDocument()&&(this._userDataWriter.convertObjectMap($.data.value.mapValue.fields,"previous"),et.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED")),et}};DocumentSnapshot._jsonSchemaVersion="firestore/documentSnapshot/1.0",DocumentSnapshot._jsonSchema={type:property("string",DocumentSnapshot._jsonSchemaVersion),bundleSource:property("string","DocumentSnapshot"),bundleName:property("string"),bundle:property("string")};let QueryDocumentSnapshot=class QueryDocumentSnapshot extends DocumentSnapshot{data($={}){return super.data($)}};let QuerySnapshot=class QuerySnapshot{constructor($,et,en,er){this._firestore=$,this._userDataWriter=et,this._snapshot=er,this.metadata=new SnapshotMetadata(er.hasPendingWrites,er.fromCache),this.query=en}get docs(){let $=[];return this.forEach(et=>$.push(et)),$}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach($,et){this._snapshot.docs.forEach(en=>{$.call(et,new QueryDocumentSnapshot(this._firestore,this._userDataWriter,en.key,en,new SnapshotMetadata(this._snapshot.mutatedKeys.has(en.key),this._snapshot.fromCache),this.query.converter))})}docChanges($={}){let et=!!$.includeMetadataChanges;if(et&&this._snapshot.excludesMetadataChanges)throw new FirestoreError(eR.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===et||(this._cachedChanges=function($,et){if($._snapshot.oldDocs.isEmpty()){let et=0;return $._snapshot.docChanges.map(en=>{let er=new QueryDocumentSnapshot($._firestore,$._userDataWriter,en.doc.key,en.doc,new SnapshotMetadata($._snapshot.mutatedKeys.has(en.doc.key),$._snapshot.fromCache),$.query.converter);return en.doc,{type:"added",doc:er,oldIndex:-1,newIndex:et++}})}{let en=$._snapshot.oldDocs;return $._snapshot.docChanges.filter($=>et||3!==$.type).map(et=>{let er=new QueryDocumentSnapshot($._firestore,$._userDataWriter,et.doc.key,et.doc,new SnapshotMetadata($._snapshot.mutatedKeys.has(et.doc.key),$._snapshot.fromCache),$.query.converter),ei=-1,eo=-1;return 0!==et.type&&(ei=en.indexOf(et.doc.key),en=en.delete(et.doc.key)),1!==et.type&&(eo=(en=en.add(et.doc)).indexOf(et.doc.key)),{type:function($){switch($){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return fail(61501,{type:$})}}(et.type),doc:er,oldIndex:ei,newIndex:eo}})}}(this,et),this._cachedChangesIncludeMetadataChanges=et),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new FirestoreError(eR.FAILED_PRECONDITION,"QuerySnapsh
1597ot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");let $={};$.type=QuerySnapshot._jsonSchemaVersion,$.bundleSource="QuerySnapshot",$.bundleName=__PRIVATE_AutoId.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;let et=[],en=[],er=[];return this.docs.forEach($=>{null!==$._document&&(et.push($._document),en.push(this._userDataWriter.convertObjectMap($._document.data.value.mapValue.fields,"previous")),er.push($.ref.path))}),$.bundle=(this._firestore,this.query._query,$.bundleName,"NOT SUPPORTED"),$}};/** 1598 * @license 1599 * Copyright 2020 Google LLC 1600 * 1601 * Licensed under the Apache License, Version 2.0 (the "License"); 1602 * you may not use this file except in compliance with the License. 1603 * You may obtain a copy of the License at 1604 * 1605 * http://www.apache.org/licenses/LICENSE-2.0 1606 * 1607 * Unless required by applicable law or agreed to in writing, software 1608 * distributed under the License is distributed on an "AS IS" BASIS, 1609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1610 * See the License for the specific language governing permissions and 1611 * limitations under the License. 1612 */function getDoc($){$=__PRIVATE_cast($,DocumentReference);let et=__PRIVATE_cast($.firestore,Firestore);return(function($,et,en={}){let er=new __PRIVATE_Deferred;return $.asyncQueue.enqueueAndForget(async()=>(function($,et,en,er,ei){let eo=new __PRIVATE_AsyncObserver({next:el=>{eo.Nu(),et.enqueueAndForget(()=>__PRIVATE_eventManagerUnlisten($,es));let eu=el.docs.has(en);!eu&&el.fromCache?ei.reject(new FirestoreError(eR.UNAVAILABLE,"Failed to get document because the client is offline.")):eu&&el.fromCache&&er&&"server"===er.source?ei.reject(new FirestoreError(eR.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):ei.resolve(el)},error:$=>ei.reject($)}),es=new __PRIVATE_QueryListener(__PRIVATE_newQueryForPath(en.path),eo,{includeMetadataChanges:!0,qa:!0});return __PRIVATE_eventManagerListen($,es)})(await __PRIVATE_getEventManager($),$.asyncQueue,et,en,er)),er.promise})(ensureFirestoreConfigured(et),$._key).then(en=>__PRIVATE_convertToDocSnapshot(et,$,en))}QuerySnapshot._jsonSchemaVersion="firestore/querySnapshot/1.0",QuerySnapshot._jsonSchema={type:property("string",QuerySnapshot._jsonSchemaVersion),bundleSource:property("string","QuerySnapshot"),bundleName:property("string"),bundle:property("string")};let __PRIVATE_ExpUserDataWriter=class __PRIVATE_ExpUserDataWriter extends AbstractUserDataWriter{constructor($){super(),this.firestore=$}convertBytes($){return new Bytes($)}convertReference($){let et=this.convertDocumentKey($,this.firestore._databaseId);return new DocumentReference(this.firestore,null,et)}};function getDocs($){$=__PRIVATE_cast($,Query);let et=__PRIVATE_cast($.firestore,Firestore),en=ensureFirestoreConfigured(et),er=new __PRIVATE_ExpUserDataWriter(et);return __PRIVATE_validateHasExplicitOrderByForLimitToLast($._query),__PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(en,$._query).then(en=>new QuerySnapshot(et,er,$,en))}function getDocsFromServer($){$=__PRIVATE_cast($,Query);let et=__PRIVATE_cast($.firestore,Firestore),en=ensureFirestoreConfigured(et),er=new __PRIVATE_ExpUserDataWriter(et);return __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(en,$._query,{source:"server"}).then(en=>new QuerySnapshot(et,er,$,en))}function setDoc($,et,en){$=__PRIVATE_cast($,DocumentReference);let er=__PRIVATE_cast($.firestore,Firestore),ei=__PRIVATE_applyFirestoreDataConverter($.converter,et,en);return executeWrite(er,[__PRIVATE_parseSetData(__PRIVATE_newUserDataReader(er),"setDoc",$._key,ei,null!==$.converter,en).toMutation($._key,Precondition.none())])}function updateDoc($,et,en,...er){$=__PRIVATE_cast($,DocumentReference);let ei=__PRIVATE_cast($.firestore,Firestore),eo=__PRIVATE_newUserDataReader(ei);return executeWrite(ei,[("string"==typeof(et=(0,ek.m9)(et))||et instanceof FieldPath?__PRIVATE_parseUpd
1612ateVarargs(eo,"updateDoc",$._key,et,en,er):__PRIVATE_parseUpdateData(eo,"updateDoc",$._key,et)).toMutation($._key,Precondition.exists(!0))])}function deleteDoc($){return executeWrite(__PRIVATE_cast($.firestore,Firestore),[new __PRIVATE_DeleteMutation($._key,Precondition.none())])}function addDoc($,et){let en=__PRIVATE_cast($.firestore,Firestore),er=doc($),ei=__PRIVATE_applyFirestoreDataConverter($.converter,et);return executeWrite(en,[__PRIVATE_parseSetData(__PRIVATE_newUserDataReader($.firestore),"addDoc",er._key,ei,null!==$.converter,{}).toMutation(er._key,Precondition.exists(!1))]).then(()=>er)}function onSnapshot($,...et){let en,er,ei;$=(0,ek.m9)($);let eo={includeMetadataChanges:!1,source:"default"},es=0;"object"!=typeof et[0]||__PRIVATE_isPartialObserver(et[es])||(eo=et[es++]);let el={includeMetadataChanges:eo.includeMetadataChanges,source:eo.source};if(__PRIVATE_isPartialObserver(et[es])){let $=et[es];et[es]=$.next?.bind($),et[es+1]=$.error?.bind($),et[es+2]=$.complete?.bind($)}if($ instanceof DocumentReference)er=__PRIVATE_cast($.firestore,Firestore),ei=__PRIVATE_newQueryForPath($._key.path),en={next:en=>{et[es]&&et[es](__PRIVATE_convertToDocSnapshot(er,$,en))},error:et[es+1],complete:et[es+2]};else{let eo=__PRIVATE_cast($,Query);er=__PRIVATE_cast(eo.firestore,Firestore),ei=eo._query;let el=new __PRIVATE_ExpUserDataWriter(er);en={next:$=>{et[es]&&et[es](new QuerySnapshot(er,el,eo,$))},error:et[es+1],complete:et[es+2]},__PRIVATE_validateHasExplicitOrderByForLimitToLast($._query)}return function($,et,en,er){let ei=new __PRIVATE_AsyncObserver(er),eo=new __PRIVATE_QueryListener(et,ei,en);return $.asyncQueue.enqueueAndForget(async()=>__PRIVATE_eventManagerListen(await __PRIVATE_getEventManager($),eo)),()=>{ei.Nu(),$.asyncQueue.enqueueAndForget(async()=>__PRIVATE_eventManagerUnlisten(await __PRIVATE_getEventManager($),eo))}}(ensureFirestoreConfigured(er),ei,el,en)}function executeWrite($,et){return function($,et){let en=new __PRIVATE_Deferred;return $.asyncQueue.enqueueAndForget(async()=>__PRIVATE_syncEngineWrite(await __PRIVATE_ensureOnlineComponents($).then($=>$.syncEngine),et,en)),en.promise}(ensureFirestoreConfigured($),et)}function __PRIVATE_convertToDocSnapshot($,et,en){let er=en.docs.get(et._key),ei=new __PRIVATE_ExpUserDataWriter($);return new DocumentSnapshot($,ei,et._key,er,new SnapshotMetadata(en.hasPendingWrites,en.fromCache),et.converter)}function getCountFromServer($){return function($,et){let en=__PRIVATE_cast($.firestore,Firestore),er=ensureFirestoreConfigured(en),ei=function($,et){let en=[];for(let er in $)Object.prototype.hasOwnProperty.call($,er)&&en.push(et($[er],er,$));return en}(et,($,et)=>new __PRIVATE_AggregateImpl(et,$.aggregateType,$._internalFieldPath));return(function($,et,en){let er=new __PRIVATE_Deferred;return $.asyncQueue.enqueueAndForget(async()=>{try{let ei=await __PRIVATE_getDatastore($);er.resolve(async function($,et,en){let{request:er,gt:ei,parent:eo}=function($,et,en,er){let{ft:ei,parent:eo}=__PRIVATE_toQueryTarget($,et),es={},el=[],eu=0;return en.forEach($=>{let et="aggregate_"+eu++;es[et]=$.alias,"count"===$.aggregateType?el.push({alias:et,count:{}}):"avg"===$.aggregateType?el.push({alias:et,avg:{field:__PRIVATE_toFieldPathReference($.fieldPath)}}):"sum"===$.aggregateType&&el.push({alias:et,sum:{field:__PRIVATE_toFieldPathReference($.fieldPath)}})}),{request:{structuredAggregationQuery:{aggregations:el,structuredQuery:ei.structuredQuery},parent:ei.parent},gt:es,parent:eo}}($.serializer,(et.de||(et.de=__PRIVATE__queryToTarget(et,et.explicitOrderBy)),et.de),en);$.connection.$o||delete er.parent;let es=(await $.Ho("RunAggregationQuery",$.serializer.databaseId,eo,er,1)).filter($=>!!$.result);__PRIVATE_hardAssert(1===es.length,64727);let el=es[0].result?.aggregateFields;return Object.keys(el).reduce(($,et)=>($[ei[et]]=el[et],$),{})}(ei,et,en))}catch($){er.reject($)}}),er.promise})(er,$._query,ei).then(et=>(function($,et,en){let er=new __PRIVATE_ExpUserDataWriter($),ei=new AggregateQuerySnapshot(et,er,en);return ei})(en,$,et))}($,{count:new AggregateField("count")})}/** 1613 * @license 1614 * Copyright 2022 Google LLC 1615 * 1616 * Licensed under the Apache License, Version 2.0 (the "License");
1617 * you may not use this file except in compliance with the License. 1618 * You may obtain a copy of the License at 1619 * 1620 * http://www.apache.org/licenses/LICENSE-2.0 1621 * 1622 * Unless required by applicable law or agreed to in writing, software 1623 * distributed under the License is distributed on an "AS IS" BASIS, 1624 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1625 * See the License for the specific language governing permissions and 1626 * limitations under the License. 1627 */let td={maxAttempts:5};/** 1628 * @license 1629 * Copyright 2020 Google LLC 1630 * 1631 * Licensed under the Apache License, Version 2.0 (the "License"); 1632 * you may not use this file except in compliance with the License. 1633 * You may obtain a copy of the License at 1634 * 1635 * http://www.apache.org/licenses/LICENSE-2.0 1636 * 1637 * Unless required by applicable law or agreed to in writing, software 1638 * distributed under the License is distributed on an "AS IS" BASIS, 1639 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1640 * See the License for the specific language governing permissions and 1641 * limitations under the License. 1642 */let WriteBatch=class WriteBatch{constructor($,et){this._firestore=$,this._commitHandler=et,this._mutations=[],this._committed=!1,this._dataReader=__PRIVATE_newUserDataReader($)}set($,et,en){this._verifyNotCommitted();let er=__PRIVATE_validateReference($,this._firestore),ei=__PRIVATE_applyFirestoreDataConverter(er.converter,et,en),eo=__PRIVATE_parseSetData(this._dataReader,"WriteBatch.set",er._key,ei,null!==er.converter,en);return this._mutations.push(eo.toMutation(er._key,Precondition.none())),this}update($,et,en,...er){let ei;this._verifyNotCommitted();let eo=__PRIVATE_validateReference($,this._firestore);return ei="string"==typeof(et=(0,ek.m9)(et))||et instanceof FieldPath?__PRIVATE_parseUpdateVarargs(this._dataReader,"WriteBatch.update",eo._key,et,en,er):__PRIVATE_parseUpdateData(this._dataReader,"WriteBatch.update",eo._key,et),this._mutations.push(ei.toMutation(eo._key,Precondition.exists(!0))),this}delete($){this._verifyNotCommitted();let et=__PRIVATE_validateReference($,this._firestore);return this._mutations=this._mutations.concat(new __PRIVATE_DeleteMutation(et._key,Precondition.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new FirestoreError(eR.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}};function __PRIVATE_validateReference($,et){if(($=(0,ek.m9)($)).firestore!==et)throw new FirestoreError(eR.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return $}/** 1643 * @license 1644 * Copyright 2020 Google LLC 1645 * 1646 * Licensed under the Apache License, Version 2.0 (the "License"); 1647 * you may not use this file except in compliance with the License. 1648 * You may obtain a copy of the License at 1649 * 1650 * http://www.apache.org/licenses/LICENSE-2.0 1651 * 1652 * Unless required by applicable law or agreed to in writing, software 1653 * distributed under the License is distributed on an "AS IS" BASIS, 1654 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1655 * See the License for the specific language governing permissions and 1656 * limitations under the License. 1657 */let Transaction$1=class Transaction$1{constructor($,et){this._firestore=$,this._transaction=et,this._dataReader=__PRIVATE_newUserDataReader($)}get($){let et=__PRIVATE_validateReference($,this._firestore),en=new __PRIVATE_LiteUserDataWriter(this._firestore);return this._transaction.lookup([et._key]).then($=>{if(!$||1!==$.length)return fail(24041);let er=$[0];if(er.isFoundDocument())return new DocumentSnapshot$1(this._firestore,en,er.key,er,et.converter);if(er.isNoDocument())return new DocumentSnapshot$1(this._firestore,en,et._key,null,et.converter);throw fail(18433,{doc:er})})}set($,et,en){let er=__PRIVATE_validateReference($,this._firestore),ei=__PRIVATE_applyFirestoreDataConverter(er.converter,et,en),eo=__PRIVATE_parseSetData(this._dataReader,"Transaction.set",er._key,ei,null!==er.converter,en);return this._transaction.set(er._key,eo),this}update($,et,en,...er){let ei;let eo=__PRIVATE_validateReference($,this._firestore);return ei="string"==typeof(et=(0,ek.m9)(et))||et instanceof FieldPath?__PRIVATE_parseUpd
1657ateVarargs(this._dataReader,"Transaction.update",eo._key,et,en,er):__PRIVATE_parseUpdateData(this._dataReader,"Transaction.update",eo._key,et),this._transaction.update(eo._key,ei),this}delete($){let et=__PRIVATE_validateReference($,this._firestore);return this._transaction.delete(et._key),this}};/** 1658 * @license 1659 * Copyright 2020 Google LLC 1660 * 1661 * Licensed under the Apache License, Version 2.0 (the "License"); 1662 * you may not use this file except in compliance with the License. 1663 * You may obtain a copy of the License at 1664 * 1665 * http://www.apache.org/licenses/LICENSE-2.0 1666 * 1667 * Unless required by applicable law or agreed to in writing, software 1668 * distributed under the License is distributed on an "AS IS" BASIS, 1669 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1670 * See the License for the specific language governing permissions and 1671 * limitations under the License. 1672 */let Transaction=class Transaction extends Transaction$1{constructor($,et){super($,et),this._firestore=$}get($){let et=__PRIVATE_validateReference($,this._firestore),en=new __PRIVATE_ExpUserDataWriter(this._firestore);return super.get($).then($=>new DocumentSnapshot(this._firestore,en,et._key,$._document,new SnapshotMetadata(!1,!1),et.converter))}};function runTransaction($,et,en){$=__PRIVATE_cast($,Firestore);let er={...td,...en};return!function($){if($.maxAttempts<1)throw new FirestoreError(eR.INVALID_ARGUMENT,"Max attempts must be at least 1")}(er),function($,et,en){let er=new __PRIVATE_Deferred;return $.asyncQueue.enqueueAndForget(async()=>{let ei=await __PRIVATE_getDatastore($);new __PRIVATE_TransactionRunner($.asyncQueue,ei,en,et,er).ju()}),er.promise}(ensureFirestoreConfigured($),en=>et(new Transaction($,en)),er)}/** 1673 * @license 1674 * Copyright 2020 Google LLC 1675 * 1676 * Licensed under the Apache License, Version 2.0 (the "License"); 1677 * you may not use this file except in compliance with the License. 1678 * You may obtain a copy of the License at 1679 * 1680 * http://www.apache.org/licenses/LICENSE-2.0 1681 * 1682 * Unless required by applicable law or agreed to in writing, software 1683 * distributed under the License is distributed on an "AS IS" BASIS, 1684 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1685 * See the License for the specific language governing permissions and 1686 * limitations under the License. 1687 */function deleteField(){return new __PRIVATE_DeleteFieldValueImpl("deleteField")}function serverTimestamp(){return new __PRIVATE_ServerTimestampFieldValueImpl("serverTimestamp")}function arrayUnion(...$){return new __PRIVATE_ArrayUnionFieldValueImpl("arrayUnion",$)}function arrayRemove(...$){return new __PRIVATE_ArrayRemoveFieldValueImpl("arrayRemove",$)}function increment($){return new __PRIVATE_NumericIncrementFieldValueImpl("increment",$)}/** 1688 * @license 1689 * Copyright 2020 Google LLC 1690 * 1691 * Licensed under the Apache License, Version 2.0 (the "License"); 1692 * you may not use this file except in compliance with the License. 1693 * You may obtain a copy of the License at 1694 * 1695 * http://www.apache.org/licenses/LICENSE-2.0 1696 * 1697 * Unless required by applicable law or agreed to in writing, software 1698 * distributed under the License is distributed on an "AS IS" BASIS, 1699 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1700 * See the License for the specific language governing permissions and 1701 * limitations under the License. 1702 */function writeBatch($){return ensureFirestoreConfigured($=__PRIVATE_cast($,Firestore)),new WriteBatch($,et=>executeWrite($,et))}new WeakMap,function($=!0){eN=ex.Jn,(0,ex.Xd)(new e_.wA("firestore",(et,{instanceIdentifier:en,options:er})=>{let ei=et.getProvider("app").getImmediate(),eo=new Firestore(new __PRIVATE_FirebaseAuthCredentialsProvider(et.getProvider("auth-internal")),new __PRIVATE_FirebaseAppCheckTokenProvider(ei,et.getProvider("app-check-internal")),function($,et){if(!Object.prototype.hasOwnProperty.apply($.options,["projectId"]))throw new FirestoreError(eR.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new DatabaseId($.options.projectId,et)}(ei,en),ei);return er={useFetchStreams:$,...er},eo._setSettings(er),eo},"PUBLIC").setMultipleInstances(!0)),(0,ex.KN)(eA,eP,void 0),(0,ex.KN)(eA,eP,"esm2020")}()},99711:function($,et,en){"use strict";en.d(et,{BH:function(){return Deferred},LL:function(){return ErrorFactory},ZR:function(){return FirebaseError},zI:function(){return areCookiesEnabled},tV:function(){return base64Decode},L:function(){return base64urlEncodeWithoutPadding},$s:function(){return calculateBackoffMillis},Sg:function(){return createMockUserToken},ne:function(){return createSubscribe},vZ:function(){return function deepEqual($,et){if($===et)return!0;let en=Object.keys($),er=Object.keys(et);for(let ei of en){if(!er.includes(ei))return!1;let en=$[ei],eo=et[ei];if(isObject(en)&&isObject(eo)){if(!deepEqual(en,eo))return!1}else if(en!==eo)return!1}for(let $ of er)if(!en.includes($))return!1;return!0}},pd:function(){return extractQuerystring},aH:function(){return getDefaultAppConfig},q4:function(){return getDefaultEmulatorHost},P0:function(){return getDefaultEmulatorHostnameAndPort},Pz:function(){return getExperimentalSetting},m9:function(){return getModularInstance},z$:function(){return getUA},ru:function(){return isBrowserExtension},Xx:function(){return isCloudWorkstation},L_:function(){return isCloudflareWorker},xb:function(){return isEmpty},w1:function(){return isIE},hl:function(){return isIndexedDBAvailable},uI:function(){return isMobileCordova},b$:function(){return isReactNative},G6:function(){return isSafari},Uo:function(){return pingServer},xO:function(){return querystring},zd:function(){return querystringDecode},dp:function(){return updateEmulatorBanner},eu:function(){return validateIndexedDBOpenable}});let getDefaultsFromPostinstall=()=>void 0;var er=en(34155);/** 1703 * @license 1704 * Copyright 2017 Google LLC 1705 * 1706 * Licensed under the Apache License, Version 2.0 (the "License");
1707 * you may not use this file except in compliance with the License. 1708 * You may obtain a copy of the License at 1709 * 1710 * http://www.apache.org/licenses/LICENSE-2.0 1711 * 1712 * Unless required by applicable law or agreed to in writing, software 1713 * distributed under the License is distributed on an "AS IS" BASIS, 1714 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1715 * See the License for the specific language governing permissions and 1716 * limitations under the License. 1717 */let stringToByteArray$1=function($){let et=[],en=0;for(let er=0;er<$.length;er++){let ei=$.charCodeAt(er);ei<128?et[en++]=ei:(ei<2048?et[en++]=ei>>6|192:((64512&ei)==55296&&er+1<$.length&&(64512&$.charCodeAt(er+1))==56320?(ei=65536+((1023&ei)<<10)+(1023&$.charCodeAt(++er)),et[en++]=ei>>18|240,et[en++]=ei>>12&63|128):et[en++]=ei>>12|224,et[en++]=ei>>6&63|128),et[en++]=63&ei|128)}return et},byteArrayToString=function($){let et=[],en=0,er=0;for(;en<$.length;){let ei=$[en++];if(ei<128)et[er++]=String.fromCharCode(ei);else if(ei>191&&ei<224){let eo=$[en++];et[er++]=String.fromCharCode((31&ei)<<6|63&eo)}else if(ei>239&&ei<365){let eo=$[en++],es=$[en++],el=$[en++],eu=((7&ei)<<18|(63&eo)<<12|(63&es)<<6|63&el)-65536;et[er++]=String.fromCharCode(55296+(eu>>10)),et[er++]=String.fromCharCode(56320+(1023&eu))}else{let eo=$[en++],es=$[en++];et[er++]=String.fromCharCode((15&ei)<<12|(63&eo)<<6|63&es)}}return et.join("")},ei={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($,et){if(!Array.isArray($))throw Error("encodeByteArray takes an array as a parameter");this.init_();let en=et?this.byteToCharMapWebSafe_:this.byteToCharMap_,er=[];for(let et=0;et<$.length;et+=3){let ei=$[et],eo=et+1<$.length,es=eo?$[et+1]:0,el=et+2<$.length,eu=el?$[et+2]:0,ed=ei>>2,eh=(3&ei)<<4|es>>4,ep=(15&es)<<2|eu>>6,em=63&eu;el||(em=64,eo||(ep=64)),er.push(en[ed],en[eh],en[ep],en[em])}return er.join("")},encodeString($,et){return this.HAS_NATIVE_SUPPORT&&!et?btoa($):this.encodeByteArray(stringToByteArray$1($),et)},decodeString($,et){return this.HAS_NATIVE_SUPPORT&&!et?atob($):byteArrayToString(this.decodeStringToByteArray($,et))},decodeStringToByteArray($,et){this.init_();let en=et?this.charToByteMapWebSafe_:this.charToByteMap_,er=[];for(let et=0;et<$.length;){let ei=en[$.charAt(et++)],eo=et<$.length,es=eo?en[$.charAt(et)]:0;++et;let el=et<$.length,eu=el?en[$.charAt(et)]:64;++et;let ed=et<$.length,eh=ed?en[$.charAt(et)]:64;if(++et,null==ei||null==es||null==eu||null==eh)throw new DecodeBase64StringError;let ep=ei<<2|es>>4;if(er.push(ep),64!==eu){let $=es<<4&240|eu>>2;if(er.push($),64!==eh){let $=eu<<6&192|eh;er.push($)}}}return er},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let $=0;$<this.ENCODED_VALS.length;$++)this.byteToCharMap_[$]=this.ENCODED_VALS.charAt($),this.charToByteMap_[this.byteToCharMap_[$]]=$,this.byteToCharMapWebSafe_[$]=this.ENCODED_VALS_WEBSAFE.charAt($),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[$]]=$,$>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt($)]=$,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt($)]=$)}}};let DecodeBase64StringError=class DecodeBase64StringError extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}};let base64Encode=function($){let et=stringToByteArray$1($);return ei.encodeByteArray(et,!0)},base64urlEncodeWithoutPadding=function($){return base64Encode($).replace(/\./g,"")},base64Decode=function($){try{return ei.decodeString($,!0)}catch($){console.error("base64Decode failed: ",$)}return null},getDefaultsFromGlobal=()=>/** 1718 * @license 1719 * Copyright 2022 Google LLC 1720 * 1721 * Licensed under the Apache License, Version 2.0 (the "License"); 1722 * you may not use this file except in compliance with the License. 1723 * You may obtain a copy of the License at 1724 * 1725 * http://www.apache.org/licenses/LICENSE-2.0 1726 * 1727 * Unless required by applicable law or agreed to in writing, softw
1727are 1728 * distributed under the License is distributed on an "AS IS" BASIS, 1729 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1730 * See the License for the specific language governing permissions and 1731 * limitations under the License. 1732 */(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==en.g)return en.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,getDefaultsFromEnvVariable=()=>{if(void 0===er||void 0===er.env)return;let $=er.env.__FIREBASE_DEFAULTS__;if($)return JSON.parse($)},getDefaultsFromCookie=()=>{let $;if("undefined"==typeof document)return;try{$=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch($){return}let et=$&&base64Decode($[1]);return et&&JSON.parse(et)},getDefaults=()=>{try{return getDefaultsFromPostinstall()||getDefaultsFromGlobal()||getDefaultsFromEnvVariable()||getDefaultsFromCookie()}catch($){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${$}`);return}},getDefaultEmulatorHost=$=>getDefaults()?.emulatorHosts?.[$],getDefaultEmulatorHostnameAndPort=$=>{let et=getDefaultEmulatorHost($);if(!et)return;let en=et.lastIndexOf(":");if(en<=0||en+1===et.length)throw Error(`Invalid host ${et} with no separate hostname and port!`);let er=parseInt(et.substring(en+1),10);return"["===et[0]?[et.substring(1,en-1),er]:[et.substring(0,en),er]},getDefaultAppConfig=()=>getDefaults()?.config,getExperimentalSetting=$=>getDefaults()?.[`_${$}`];/** 1733 * @license 1734 * Copyright 2017 Google LLC 1735 * 1736 * Licensed under the Apache License, Version 2.0 (the "License"); 1737 * you may not use this file except in compliance with the License. 1738 * You may obtain a copy of the License at 1739 * 1740 * http://www.apache.org/licenses/LICENSE-2.0 1741 * 1742 * Unless required by applicable law or agreed to in writing, software 1743 * distributed under the License is distributed on an "AS IS" BASIS, 1744 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1745 * See the License for the specific language governing permissions and 1746 * limitations under the License. 1747 */let Deferred=class Deferred{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(($,et)=>{this.resolve=$,this.reject=et})}wrapCallback($){return(et,en)=>{et?this.reject(et):this.resolve(en),"function"==typeof $&&(this.promise.catch(()=>{}),1===$.length?$(et):$(et,en))}}};/** 1748 * @license 1749 * Copyright 2025 Google LLC 1750 * 1751 * Licensed under the Apache License, Version 2.0 (the "License"); 1752 * you may not use this file except in compliance with the License. 1753 * You may obtain a copy of the License at 1754 * 1755 * http://www.apache.org/licenses/LICENSE-2.0 1756 * 1757 * Unless required by applicable law or agreed to in writing, software 1758 * distributed under the License is distributed on an "AS IS" BASIS, 1759 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1760 * See the License for the specific language governing permissions and 1761 * limitations under the License. 1762 */function isCloudWorkstation($){try{let et=$.startsWith("http://")||$.startsWith("https://")?new URL($).hostname:$;return et.endsWith(".cloudworkstations.dev")}catch{return!1}}async function pingServer($){let et=await fetch($,{credentials:"include"});return et.ok}/** 1763 * @license 1764 * Copyright 2021 Google LLC 1765 * 1766 * Licensed under the Apache License, Version 2.0 (the "License"); 1767 * you may not use this file except in compliance with the License. 1768 * You may obtain a copy of the License at 1769 * 1770 * http://www.apache.org/licenses/LICENSE-2.0 1771 * 1772 * Unless required by applicable law or agreed to in writing, software 1773 * distributed under the License is distributed on an "AS IS" BASIS, 1774 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1775 * See the License for the specific language governing permissions and 1776 * limitations under the License. 1777 */function createMockUserToken($,et){if($.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let en=et||"demo-project",er=$.iat||0,ei=$.sub||$.user_id;if(!ei)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let eo={iss:`https://securetoken.google.com/${en}`,aud:en,iat:er,exp:er+3600,auth_time:er,sub:ei,user_id:ei,firebase:{sign_in_provider:"custom",identities:{}},...$};return[base64urlEncodeWithoutPadding(JSON.stringify({alg:"none",type:"JWT"})),base64urlEncodeWithoutPadding(JSON.stringify(eo)),""].join(".")}let eo={},es=!1;function updateEmulatorBanner($,et){if("undefined"==typeof window||"undefined"==typeof document||!isCloudWorkstation(window.location.host)||eo[$]===et||eo[$]||es)return;function prefixedId($){return`__firebase__banner__${$}`}eo[$]=et;let en="__firebase__banner",er=function(){let $={prod:[],emulator:[]};for(let et of Object.keys(eo))eo[et]?$.emulator.push(et):$.prod.push(et);return $}(),ei=er.prod.length>0;function setupDom(){let $,et;let er=($=document.getElementById(en),et=!1,$||(($=document.createElement("div")).setAttribute("id",en),et=!0),{created:et,element:$}),eo=prefixedId("text"),el=document.getElementById(eo)||document.createElement("span"),eu=prefixedId("learnmore"),ed=document.getElementById(eu)||document.createElement("a"),eh=prefixedId("preprendIcon"),ep=document.getElementById(eh)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(er.created){let $=er.element;$.style.display="flex",$.style.background="#7faaf0",$.style.position="fixed",$.style.bottom="5px",$.style.left="5px",$.style.padding=".5em",$.style.borderRadius="5px",$.style.alignItems="center",ed.setAttribute("id",eu),ed.innerText="Learn more",ed.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",ed.setAttribute("target","__blank"),ed.style.paddingLeft="5px",ed.style.textDecoration="underline";let et=function(){let $=document.createElement("span");
1777return $.style.cursor="pointer",$.style.marginLeft="16px",$.style.fontSize="24px",$.innerHTML=" ×",$.onclick=()=>{es=!0,function(){let $=document.getElementById(en);$&&$.remove()}()},$}();ep.setAttribute("width","24"),ep.setAttribute("id",eh),ep.setAttribute("height","24"),ep.setAttribute("viewBox","0 0 24 24"),ep.setAttribute("fill","none"),ep.style.marginLeft="-6px",$.append(ep,el,ed,et),document.body.appendChild($)}ei?(el.innerText="Preview backend disconnected.",ep.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 1778<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 1779</g> 1780<defs> 1781<clipPath id="clip0_6013_33858"> 1782<rect width="24" height="24" fill="white"/> 1783</clipPath> 1784</defs>`):(ep.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 1785<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 1786</g> 1787<defs> 1788<clipPath id="clip0_6083_34804"> 1789<rect width="24" height="24" fill="white"/> 1790</clipPath> 1791</defs>`,el.innerText="Preview backend running in this workspace."),el.setAttribute("id",eo)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",setupDom):setupDom()}/** 1792 * @license 1793 * Copyright 2017 Google LLC 1794 * 1795 * Licensed under the Apache License, Version 2.0 (the "License"); 1796 * you may not use this file except in compliance with the License. 1797 * You may obtain a copy of the License at 1798 * 1799 * http://www.apache.org/licenses/LICENSE-2.0 1800 * 1801 * Unless required by applicable law or agreed to in writing, software 1802 * distributed under the License is distributed on an "AS IS" BASIS, 1803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1804 * See the License for the specific language governing permissions and 1805 * limitations under the License. 1806 */function getUA(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function isMobileCordova(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())}function isCloudflareWorker(){return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function isBrowserExtension(){let $="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof $&&void 0!==$.id}function isReactNative(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function isIE(){let $=getUA();return $.indexOf("MSIE ")>=0||$.indexOf("Trident/")>=0}function isSafari(){return!function(){let $=getDefaults()?.forceEnvironment;if("node"===$)return!0;
1806if("browser"===$)return!1;try{return"[object process]"===Object.prototype.toString.call(en.g.process)}catch($){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function isIndexedDBAvailable(){try{return"object"==typeof indexedDB}catch($){return!1}}function validateIndexedDBOpenable(){return new Promise(($,et)=>{try{let en=!0,er="validate-browser-context-for-indexeddb-analytics-module",ei=self.indexedDB.open(er);ei.onsuccess=()=>{ei.result.close(),en||self.indexedDB.deleteDatabase(er),$(!0)},ei.onupgradeneeded=()=>{en=!1},ei.onerror=()=>{et(ei.error?.message||"")}}catch($){et($)}})}function areCookiesEnabled(){return"undefined"!=typeof navigator&&!!navigator.cookieEnabled}let FirebaseError=class FirebaseError extends Error{constructor($,et,en){super(et),this.code=$,this.customData=en,this.name="FirebaseError",Object.setPrototypeOf(this,FirebaseError.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ErrorFactory.prototype.create)}};let ErrorFactory=class ErrorFactory{constructor($,et,en){this.service=$,this.serviceName=et,this.errors=en}create($,...et){let en=et[0]||{},er=`${this.service}/${$}`,ei=this.errors[$],eo=ei?ei.replace(el,($,et)=>{let er=en[et];return null!=er?String(er):`<${et}?>`}):"Error",es=`${this.serviceName}: ${eo} (${er}).`,eu=new FirebaseError(er,es,en);return eu}};let el=/\{\$([^}]+)}/g;function isEmpty($){for(let et in $)if(Object.prototype.hasOwnProperty.call($,et))return!1;return!0}function isObject($){return null!==$&&"object"==typeof $}/** 1807 * @license 1808 * Copyright 2017 Google LLC 1809 * 1810 * Licensed under the Apache License, Version 2.0 (the "License"); 1811 * you may not use this file except in compliance with the License. 1812 * You may obtain a copy of the License at 1813 * 1814 * http://www.apache.org/licenses/LICENSE-2.0 1815 * 1816 * Unless required by applicable law or agreed to in writing, software 1817 * distributed under the License is distributed on an "AS IS" BASIS, 1818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1819 * See the License for the specific language governing permissions and 1820 * limitations under the License. 1821 */function querystring($){let et=[];for(let[en,er]of Object.entries($))Array.isArray(er)?er.forEach($=>{et.push(encodeURIComponent(en)+"="+encodeURIComponent($))}):et.push(encodeURIComponent(en)+"="+encodeURIComponent(er));return et.length?"&"+et.join("&"):""}function querystringDecode($){let et={},en=$.replace(/^\?/,"").split("&");return en.forEach($=>{if($){let[en,er]=$.split("=");et[decodeURIComponent(en)]=decodeURIComponent(er)}}),et}function extractQuerystring($){let et=$.indexOf("?");if(!et)return"";let en=$.indexOf("#",et);return $.substring(et,en>0?en:void 0)}function createSubscribe($,et){let en=new ObserverProxy($,et);return en.subscribe.bind(en)}let ObserverProxy=class ObserverProxy{constructor($,et){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=et,this.task.then(()=>{$(this)}).catch($=>{this.error($)})}next($){this.forEachObserver(et=>{et.next($)})}error($){this.forEachObserver(et=>{et.error($)}),this.close($)}complete(){this.forEachObserver($=>{$.complete()}),this.close()}subscribe($,et,en){let er;if(void 0===$&&void 0===et&&void 0===en)throw Error("Missing Observer.");void 0===(er=!function($,et){if("object"!=typeof $||null===$)return!1;for(let en of et)if(en in $&&"function"==typeof $[en])return!0;return!1}($,["next","error","complete"])?{next:$,error:et,complete:en}:$).next&&(er.next=noop),void 0===er.error&&(er.error=noop),void 0===er.complete&&(er.complete=noop);let ei=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?er.error(this.finalError):er.complete()}catch($){}}),this.observers.push(er),ei}unsubscribeOne($){void 0!==this.observers&&void 0!==this.observers[$]&&(delete this.observers[$],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver($){if(!this.finalized)for(let et=0;et<this.observers.length;et++)this.sendOne(et,$)}sendOne($,et){this.task.then(()=>
1821{if(void 0!==this.observers&&void 0!==this.observers[$])try{et(this.observers[$])}catch($){"undefined"!=typeof console&&console.error&&console.error($)}})}close($){this.finalized||(this.finalized=!0,void 0!==$&&(this.finalError=$),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function noop(){}function calculateBackoffMillis($,et=1e3,en=2){let er=et*Math.pow(en,$),ei=Math.round(.5*er*(Math.random()-.5)*2);return Math.min(144e5,er+ei)}/** 1822 * @license 1823 * Copyright 2021 Google LLC 1824 * 1825 * Licensed under the Apache License, Version 2.0 (the "License"); 1826 * you may not use this file except in compliance with the License. 1827 * You may obtain a copy of the License at 1828 * 1829 * http://www.apache.org/licenses/LICENSE-2.0 1830 * 1831 * Unless required by applicable law or agreed to in writing, software 1832 * distributed under the License is distributed on an "AS IS" BASIS, 1833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1834 * See the License for the specific language governing permissions and 1835 * limitations under the License. 1836 */function getModularInstance($){return $&&$._delegate?$._delegate:$}},77236:function($,et,en){"use strict";function n($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];throw Error("[Immer] minified error nr: "+$+(en.length?" "+en.map(function($){return"'"+$+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r($){return!!$&&!!$[em]}function t($){return!!$&&(function($){if(!$||"object"!=typeof $)return!1;var et=Object.getPrototypeOf($);if(null===et)return!0;var en=Object.hasOwnProperty.call(et,"constructor")&&et.constructor;return en===Object||"function"==typeof en&&Function.toString.call(en)===ef}($)||Array.isArray($)||!!$[ep]||!!$.constructor[ep]||s($)||v($))}function i($,et,en){void 0===en&&(en=!1),0===o($)?(en?Object.keys:eg)($).forEach(function(er){en&&"symbol"==typeof er||et(er,$[er],$)}):$.forEach(function(en,er){return et(er,en,$)})}function o($){var et=$[em];return et?et.i>3?et.i-4:et.i:Array.isArray($)?1:s($)?2:v($)?3:0}function u($,et){return 2===o($)?$.has(et):Object.prototype.hasOwnProperty.call($,et)}function f($,et,en){var er=o($);2===er?$.set(et,en):3===er?($.delete(et),$.add(en)):$[et]=en}function c($,et){return $===et?0!==$||1/$==1/et:$!=$&&et!=et}function s($){return el&&$ instanceof Map}function v($){return eu&&$ instanceof Set}function p($){return $.o||$.t}function l($){if(Array.isArray($))return Array.prototype.slice.call($);var et=ey($);delete et[em];for(var en=eg(et),er=0;er<en.length;er++){var ei=en[er],eo=et[ei];!1===eo.writable&&(eo.writable=!0,eo.configurable=!0),(eo.get||eo.set)&&(et[ei]={configurable:!0,writable:!0,enumerable:eo.enumerable,value:$[ei]})}return Object.create(Object.getPrototypeOf($),et)}function d($,et){return void 0===et&&(et=!1),y($)||r($)||!t($)||(o($)>1&&($.set=$.add=$.clear=$.delete=h),Object.freeze($),et&&i($,function($,et){return d(et,!0)},!0)),$}function h(){n(2)}function y($){return null==$||"object"!=typeof $||Object.isFrozen($)}function b($){var et=ev[$];return et||n(18,$),et}function j($,et){et&&(b("Patches"),$.u=[],$.s=[],$.v=et)}function O($){g($),$.p.forEach(S),$.p=null}function g($){$===eo&&(eo=$.l)}function w($){return eo={p:[],l:eo,h:$,m:!0,_:0}}function S($){var et=$[em];0===et.i||1===et.i?et.j():et.O=!0}function P($,et){et._=et.p.length;var en=et.p[0],er=void 0!==$&&$!==en;return et.h.g||b("ES5").S(et,$,er),er?(en[em].P&&(O(et),n(4)),t($)&&($=M(et,$),et.l||x(et,$)),et.u&&b("Patches").M(en[em].t,$,et.u,et.s)):$=M(et,en,[]),O(et),et.u&&et.v(et.u,et.s),$!==eh?$:void 0}function M($,et,en){if(y(et))return et;var er=et[em];if(!er)return i(et,function(ei,eo){return A($,er,et,ei,eo,en)},!0),et;if(er.A!==$)return et;if(!er.P)return x($,er.t,!0),er.t;if(!er.I){er.I=!0,er.A._--;var ei=4===er.i||5===er.i?er.o=l(er.k):er.o;i(3===er.i?new Set(ei):ei,function(et,eo){return A($,er,ei,et,eo,en)}),x($,ei,!1),en&&$.u&&b("Patches").R(er,en,$.u,$.s)}return er.o}function A($,et,en,er,ei,eo){if(r(ei)){var es=M($,ei,eo&&et&&3!==et.i&&!u(et.D,er)?eo.concat(er):void 0);if(f(en,er,es),!r(es))return;$.m=!1}if(t(ei)&&!y(ei)){if(!$.h.F&&$._<1)return;M($,ei),et&&et.A.l||x($,ei)}}function x($,et,en){void 0===en&&(en=!1),$.h.F&&$.m&&d(et,en)}function z($,et){var en=$[em];return(en?p(en):$)[et]}function I($,et){if(et in $)for(var en=Object.getPrototypeOf($);en;){var er=Object.getOwnPropertyDescriptor(en,et);
1836if(er)return er;en=Object.getPrototypeOf(en)}}function k($){$.P||($.P=!0,$.l&&k($.l))}function E($){$.o||($.o=l($.t))}function R($,et,en){var er,ei,es,el,eu,ed,eh,ep=s(et)?b("MapSet").N(et,en):v(et)?b("MapSet").T(et,en):$.g?(es=ei={i:(er=Array.isArray(et))?1:0,A:en?en.A:eo,P:!1,I:!1,D:{},l:en,t:et,k:null,o:null,j:null,C:!1},el=ex,er&&(es=[ei],el=e_),ed=(eu=Proxy.revocable(es,el)).revoke,eh=eu.proxy,ei.k=eh,ei.j=ed,eh):b("ES5").J(et,en);return(en?en.A:eo).p.push(ep),ep}function F($,et){switch(et){case 2:return new Map($);case 3:return Array.from($)}return l($)}en.d(et,{xC:function(){return configureStore},hg:function(){return createAsyncThunk},oM:function(){return createSlice}});var er,ei,eo,es="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),el="undefined"!=typeof Map,eu="undefined"!=typeof Set,ed="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,eh=es?Symbol.for("immer-nothing"):((ei={})["immer-nothing"]=!0,ei),ep=es?Symbol.for("immer-draftable"):"__$immer_draftable",em=es?Symbol.for("immer-state"):"__$immer_state",ef=""+Object.prototype.constructor,eg="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function($){return Object.getOwnPropertyNames($).concat(Object.getOwnPropertySymbols($))}:Object.getOwnPropertyNames,ey=Object.getOwnPropertyDescriptors||function($){var et={};return eg($).forEach(function(en){et[en]=Object.getOwnPropertyDescriptor($,en)}),et},ev={},ex={get:function($,et){if(et===em)return $;var en,er,ei=p($);if(!u(ei,et))return(er=I(ei,et))?"value"in er?er.value:null===(en=er.get)||void 0===en?void 0:en.call($.k):void 0;var eo=ei[et];return $.I||!t(eo)?eo:eo===z($.t,et)?(E($),$.o[et]=R($.A.h,eo,$)):eo},has:function($,et){return et in p($)},ownKeys:function($){return Reflect.ownKeys(p($))},set:function($,et,en){var er=I(p($),et);if(null==er?void 0:er.set)return er.set.call($.k,en),!0;if(!$.P){var ei=z(p($),et),eo=null==ei?void 0:ei[em];if(eo&&eo.t===en)return $.o[et]=en,$.D[et]=!1,!0;if(c(en,ei)&&(void 0!==en||u($.t,et)))return!0;E($),k($)}return $.o[et]===en&&"number"!=typeof en&&(void 0!==en||et in $.o)||($.o[et]=en,$.D[et]=!0,!0)},deleteProperty:function($,et){return void 0!==z($.t,et)||et in $.t?($.D[et]=!1,E($),k($)):delete $.D[et],$.o&&delete $.o[et],!0},getOwnPropertyDescriptor:function($,et){var en=p($),er=Reflect.getOwnPropertyDescriptor(en,et);return er?{writable:!0,configurable:1!==$.i||"length"!==et,enumerable:er.enumerable,value:en[et]}:er},defineProperty:function(){n(11)},getPrototypeOf:function($){return Object.getPrototypeOf($.t)},setPrototypeOf:function(){n(12)}},e_={};i(ex,function($,et){e_[$]=function(){return arguments[0]=arguments[0][0],et.apply(this,arguments)}}),e_.deleteProperty=function($,et){return e_.set.call(this,$,et,void 0)},e_.set=function($,et,en){return ex.set.call(this,$[0],et,en,$[0])};var ew=new(function(){function e($){var et=this;this.g=ed,this.F=!0,this.produce=function($,en,er){if("function"==typeof $&&"function"!=typeof en){var ei,eo=en;return en=$,function($){var er=this;void 0===$&&($=eo);for(var ei=arguments.length,es=Array(ei>1?ei-1:0),el=1;el<ei;el++)es[el-1]=arguments[el];return et.produce($,function($){var et;return(et=en).call.apply(et,[er,$].concat(es))})}}if("function"!=typeof en&&n(6),void 0!==er&&"function"!=typeof er&&n(7),t($)){var es=w(et),el=R(et,$,void 0),eu=!0;try{ei=en(el),eu=!1}finally{eu?O(es):g(es)}return"undefined"!=typeof Promise&&ei instanceof Promise?ei.then(function($){return j(es,er),P($,es)},function($){throw O(es),$}):(j(es,er),P(ei,es))}if(!$||"object"!=typeof $){if(void 0===(ei=en($))&&(ei=$),ei===eh&&(ei=void 0),et.F&&d(ei,!0),er){var ed=[],ep=[];b("Patches").M($,ei,ed,ep),er(ed,ep)}return ei}n(21,$)},this.produceWithPatches=function($,en){if("function"==typeof $)return function(en){for(var er=arguments.length,ei=Array(er>1?er-1:0),eo=1;eo<er;eo++)ei[eo-1]=arguments[eo];return et.produceWithPatches(en,function(et){return $.apply(void 0,[et].concat(ei))})};var er,ei,eo=et.produce($,en,function($,et){er=$,ei=et});return"undefined"!=typeof Promise&&eo instanceof Promise?eo.then(function($){return[$,er,ei]}):[eo,er,ei]},"boolean"==typeof(null==$?void 0:$.useProxies)&&this.setUseProxies($.useProxies),"boolean"==typeof(null==$?void 0:$.autoFreeze)&&this.setAutoFreeze($.autoFreeze)}
1836var $=e.prototype;return $.createDraft=function($){t($)||n(8),r($)&&(r(et=$)||n(22,et),$=function n($){if(!t($))return $;var et,en=$[em],er=o($);if(en){if(!en.P&&(en.i<4||!b("ES5").K(en)))return en.t;en.I=!0,et=F($,er),en.I=!1}else et=F($,er);return i(et,function($,er){var ei;en&&(2===o(ei=en.t)?ei.get($):ei[$])===er||f(et,$,n(er))}),3===er?new Set(et):et}(et));var et,en=w(this),er=R(this,$,void 0);return er[em].C=!0,g(en),er},$.finishDraft=function($,et){var en=($&&$[em]).A;return j(en,et),P(void 0,en)},$.setAutoFreeze=function($){this.F=$},$.setUseProxies=function($){$&&!ed&&n(20),this.g=$},$.applyPatches=function($,et){for(en=et.length-1;en>=0;en--){var en,er=et[en];if(0===er.path.length&&"replace"===er.op){$=er.value;break}}en>-1&&(et=et.slice(en+1));var ei=b("Patches").$;return r($)?ei($,et):this.produce($,function($){return ei($,et)})},e}()),ek=ew.produce;ew.produceWithPatches.bind(ew),ew.setAutoFreeze.bind(ew),ew.setUseProxies.bind(ew),ew.applyPatches.bind(ew),ew.createDraft.bind(ew),ew.finishDraft.bind(ew);var eC=en(68356);function createThunkMiddleware($){return function(et){var en=et.dispatch,er=et.getState;return function(et){return function(ei){return"function"==typeof ei?ei(en,er,$):et(ei)}}}}var eE=createThunkMiddleware();eE.withExtraArgument=createThunkMiddleware;var eI=(er=function($,et){return(er=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function($,et){$.__proto__=et}||function($,et){for(var en in et)Object.prototype.hasOwnProperty.call(et,en)&&($[en]=et[en])})($,et)},function($,et){if("function"!=typeof et&&null!==et)throw TypeError("Class extends value "+String(et)+" is not a constructor or null");function __(){this.constructor=$}er($,et),$.prototype=null===et?Object.create(et):(__.prototype=et.prototype,new __)}),__generator=function($,et){var en,er,ei,eo,es={label:0,sent:function(){if(1&ei[0])throw ei[1];return ei[1]},trys:[],ops:[]};return eo={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(eo[Symbol.iterator]=function(){return this}),eo;function verb(eo){return function(el){return function(eo){if(en)throw TypeError("Generator is already executing.");for(;es;)try{if(en=1,er&&(ei=2&eo[0]?er.return:eo[0]?er.throw||((ei=er.return)&&ei.call(er),0):er.next)&&!(ei=ei.call(er,eo[1])).done)return ei;switch(er=0,ei&&(eo=[2&eo[0],ei.value]),eo[0]){case 0:case 1:ei=eo;break;case 4:return es.label++,{value:eo[1],done:!1};case 5:es.label++,er=eo[1],eo=[0];continue;case 7:eo=es.ops.pop(),es.trys.pop();continue;default:if(!(ei=(ei=es.trys).length>0&&ei[ei.length-1])&&(6===eo[0]||2===eo[0])){es=0;continue}if(3===eo[0]&&(!ei||eo[1]>ei[0]&&eo[1]<ei[3])){es.label=eo[1];break}if(6===eo[0]&&es.label<ei[1]){es.label=ei[1],ei=eo;break}if(ei&&es.label<ei[2]){es.label=ei[2],es.ops.push(eo);break}ei[2]&&es.ops.pop(),es.trys.pop();continue}eo=et.call($,es)}catch($){eo=[6,$],er=0}finally{en=ei=0}if(5&eo[0])throw eo[1];return{value:eo[0]?eo[1]:void 0,done:!0}}([eo,el])}}},__spreadArray=function($,et){for(var en=0,er=et.length,ei=$.length;en<er;en++,ei++)$[ei]=et[en];return $},eS=Object.defineProperty,eT=Object.defineProperties,eA=Object.getOwnPropertyDescriptors,eP=Object.getOwnPropertySymbols,eN=Object.prototype.hasOwnProperty,ej=Object.prototype.propertyIsEnumerable,__defNormalProp=function($,et,en){return et in $?eS($,et,{enumerable:!0,configurable:!0,writable:!0,value:en}):$[et]=en},__spreadValues=function($,et){for(var en in et||(et={}))eN.call(et,en)&&__defNormalProp($,en,et[en]);if(eP)for(var er=0,ei=eP(et);er<ei.length;er++){var en=ei[er];ej.call(et,en)&&__defNormalProp($,en,et[en])}return $},__spreadProps=function($,et){return eT($,eA(et))},eR="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?eC.qC:eC.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var eV=function($){function MiddlewareArray(){for(var et=[],en=0;en<arguments.length;en++)et[en]=arguments[en];var er=$.apply(this,et)||this;return Object.setPrototypeOf(er,MiddlewareArray.prototype),er}return eI(MiddlewareArray,$),Object.defineProperty(MiddlewareArray,Symbol.species,{get:function(){return MiddlewareArray}
1836,enumerable:!1,configurable:!0}),MiddlewareArray.prototype.concat=function(){for(var et=[],en=0;en<arguments.length;en++)et[en]=arguments[en];return $.prototype.concat.apply(this,et)},MiddlewareArray.prototype.prepend=function(){for(var $=[],et=0;et<arguments.length;et++)$[et]=arguments[et];return 1===$.length&&Array.isArray($[0])?new(MiddlewareArray.bind.apply(MiddlewareArray,__spreadArray([void 0],$[0].concat(this)))):new(MiddlewareArray.bind.apply(MiddlewareArray,__spreadArray([void 0],$.concat(this))))},MiddlewareArray}(Array);function configureStore($){var et,curriedGetDefaultMiddleware=function($){var et,en,er,ei;return void 0===(et=$)&&(et={}),er=void 0===(en=et.thunk)||en,et.immutableCheck,et.serializableCheck,ei=new eV,er&&("boolean"==typeof er?ei.push(eE):ei.push(eE.withExtraArgument(er.extraArgument))),ei},en=$||{},er=en.reducer,ei=void 0===er?void 0:er,eo=en.middleware,es=void 0===eo?curriedGetDefaultMiddleware():eo,el=en.devTools,eu=void 0===el||el,ed=en.preloadedState,eh=void 0===ed?void 0:ed,ep=en.enhancers,em=void 0===ep?void 0:ep;if("function"==typeof ei)et=ei;else if(function($){if("object"!=typeof $||null===$)return!1;var et=Object.getPrototypeOf($);if(null===et)return!0;for(var en=et;null!==Object.getPrototypeOf(en);)en=Object.getPrototypeOf(en);return et===en}(ei))et=(0,eC.UY)(ei);else throw Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var ef=es;"function"==typeof ef&&(ef=ef(curriedGetDefaultMiddleware));var eg=eC.md.apply(void 0,ef),ey=eC.qC;eu&&(ey=eR(__spreadValues({trace:!1},"object"==typeof eu&&eu)));var ev=[eg];Array.isArray(em)?ev=__spreadArray([eg],em):"function"==typeof em&&(ev=em(ev));var ex=ey.apply(void 0,ev);return(0,eC.MT)(et,eh,ex)}function createAction($,et){function actionCreator(){for(var en=[],er=0;er<arguments.length;er++)en[er]=arguments[er];if(et){var ei=et.apply(void 0,en);if(!ei)throw Error("prepareAction did not return an object");return __spreadValues(__spreadValues({type:$,payload:ei.payload},"meta"in ei&&{meta:ei.meta}),"error"in ei&&{error:ei.error})}return{type:$,payload:en[0]}}return actionCreator.toString=function(){return""+$},actionCreator.type=$,actionCreator.match=function(et){return et.type===$},actionCreator}function executeReducerBuilderCallback($){var et,en={},er=[],ei={addCase:function($,et){var er="string"==typeof $?$:$.type;if(er in en)throw Error("addCase cannot be called with two reducers for the same action type");return en[er]=et,ei},addMatcher:function($,et){return er.push({matcher:$,reducer:et}),ei},addDefaultCase:function($){return et=$,ei}};return $(ei),[en,er,et]}function createSlice($){var et,en=$.name;if(!en)throw Error("`name` is a required option for createSlice");var er="function"==typeof $.initialState?$.initialState:ek($.initialState,function(){}),ei=$.reducers||{},eo=Object.keys(ei),es={},el={},eu={};function buildReducer(){var et="function"==typeof $.extraReducers?executeReducerBuilderCallback($.extraReducers):[$.extraReducers],en=et[0],ei=void 0===en?{}:en,eo=et[1],es=void 0===eo?[]:eo,eu=et[2],ed=void 0===eu?void 0:eu;return function($,et,en,er){void 0===en&&(en=[]);var ei,eo="function"==typeof et?executeReducerBuilderCallback(et):[et,en,er],es=eo[0],el=eo[1],eu=eo[2];if("function"==typeof $)ei=function(){return ek($(),function(){})};else{var ed=ek($,function(){});ei=function(){return ed}}function reducer($,et){void 0===$&&($=ei());var en=__spreadArray([es[et.type]],el.filter(function($){return(0,$.matcher)(et)}).map(function($){return $.reducer}));return 0===en.filter(function($){return!!$}).length&&(en=[eu]),en.reduce(function($,en){if(en){if(r($)){var er=en($,et);return void 0===er?$:er}if(t($))return ek($,function($){return en($,et)});var er=en($,et);if(void 0===er){if(null===$)return $;throw Error("A case reducer on a non-draftable value must not return undefined")}return er}return $},$)}return reducer.getInitialState=ei,reducer}(er,__spreadValues(__spreadValues({},ei),el),es,ed)}return eo.forEach(function($){var et,er,eo=ei[$],ed=en+"/"+$;"reducer"in eo?(et=eo.reducer,er=eo.prepare):et=eo,es[$]=et,el[ed]=et,eu[$]=er?createAction(ed,er):createAction(ed)}),{name:en,reducer:function($,en){return et||(et=buildReducer()),et($,en)},actions:eu,caseReducers:es,getInitialState:function(){return et||(et=buildReducer()),et.getInitialState()}}}var nanoid=function($){void 0===$&&($=21);for(var et="",en=$;en--;)et+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return et},eD=["name","message","stack","code"],RejectWithValue=function($,et){this.payload=$,this.meta=et},FulfillWithMeta=function($,et){this.payload=$,this.meta=et},miniSerializeError=function($){if("object"==typeof $&&null!==$){for(var et={},en=0;en<eD.length;en++){var er=eD[en];"string"==typeof $[er]&&(et[er]=$[er])}return et}return{message:String($)}};function createAsyncThunk($,et,en){var er=createAction($+"/fulfilled",function($,et,en,er){return{payload:$,meta:__spreadProps(__spreadValues({},er||{}),{arg:en,requestId:et,requestStatus:"fulfilled"})}}),ei=createAction($+"/pending",function($,et,en){return{payload:void 0,meta:__spreadProps(__spreadValues({},en||{}),{arg:et,requestId:$,requestStatus:"pending"})}}),eo=createAction($+"/rejected",function($,et,er,ei,eo){return{payload:ei,error:(en&&en.serializeError||miniSerializeError)($||"Rejected"),meta:__spreadProps(__spreadValues({},eo||{}),{arg:er,requestId:et,rejectedWithValue:!!ei,requestStatus:"rejected",aborted:(null==$?void 0:$.name)==="AbortError",condition:(null==$?void 0:$.name)==="ConditionError"})}}),es="undefined"!=typeof AbortController?AbortController:function(){function class_1(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return class_1.prototype.abort=function(){},class_1}();return Object.assign(function($){return function(el,eu,ed){var eh,ep=(null==en?void 0:en.idGenerator)?en.idGenerator($):nanoid(),em=new es,ef=new Promise(function($,et){return em.signal.addEventListener("abort",function(){return et({name:"AbortError",message:eh||"Aborted"})})}),eg=!1,ey=function(){var es,eh;return es=this,eh=function(){var es,eh,ey,ev,ex;return __generator(this,function(e_){switch(e_.label){case 0:var ew;if(e_.trys.push([0,4,,5]),!(null!==(ew=ev=null==(es=null==en?void 0:en.condition)?void 0:es.call(en,$,{getState:eu,extra:ed}))&&"object"==typeof ew&&"function"==typeof ew.then))return[3,2];return[4,ev];case 1:ev=e_.sent(),e_.label=2;case 2:if(!1===ev)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return eg=!0,el(ei(ep,$,null==(eh=null==en?void 0:en.getPendingMeta)?void 0:eh.call(en,{requestId:ep,arg:$},{getState:eu,extra:ed}))),[4,Promise.race([ef,Promise.resolve(et($,{dispatch:el,getState:eu,extra:ed,requestId:ep,signal:em.signal,rejectWithValue:function($,et){return new RejectWithValue($,et)},fulfillWithValue:function($,et){return new FulfillWithMeta($,et)}})).then(function(et){if(et instanceof RejectWithValue)throw et;return et instanceof FulfillWithMeta?er(et.payload,ep,$,et.meta):er(et,ep,$)})])];
1836case 3:return ey=e_.sent(),[3,5];case 4:return ey=(ex=e_.sent())instanceof RejectWithValue?eo(null,ep,$,ex.payload,ex.meta):eo(ex,ep,$),[3,5];case 5:return en&&!en.dispatchConditionRejection&&eo.match(ey)&&ey.meta.condition||el(ey),[2,ey]}})},new Promise(function($,et){var fulfilled=function($){try{step(eh.next($))}catch($){et($)}},rejected=function($){try{step(eh.throw($))}catch($){et($)}},step=function(et){return et.done?$(et.value):Promise.resolve(et.value).then(fulfilled,rejected)};step((eh=eh.apply(es,null)).next())})}();return Object.assign(ey,{abort:function($){eg&&(eh=$,em.abort())},requestId:ep,arg:$,unwrap:function(){return ey.then(unwrapResult)}})}},{pending:ei,rejected:eo,fulfilled:er,typePrefix:$})}function unwrapResult($){if($.meta&&$.meta.rejectedWithValue)throw $.payload;if($.error)throw $.error;return $.payload}var eO="listenerMiddleware";createAction(eO+"/add"),createAction(eO+"/removeAll"),createAction(eO+"/remove"),function(){function t(et,en){var er=$[et];return er?er.enumerable=en:$[et]=er={configurable:!0,enumerable:en,get:function(){var $=this[em];return ex.get($,et)},set:function($){var en=this[em];ex.set(en,et,$)}},er}function e($){for(var et=$.length-1;et>=0;et--){var en=$[et][em];if(!en.P)switch(en.i){case 5:a(en)&&k(en);break;case 4:o(en)&&k(en)}}}function o($){for(var et=$.t,en=$.k,er=eg(en),ei=er.length-1;ei>=0;ei--){var eo=er[ei];if(eo!==em){var es=et[eo];if(void 0===es&&!u(et,eo))return!0;var el=en[eo],eu=el&&el[em];if(eu?eu.t!==es:!c(el,es))return!0}}var ed=!!et[em];return er.length!==eg(et).length+(ed?0:1)}function a($){var et=$.k;if(et.length!==$.t.length)return!0;var en=Object.getOwnPropertyDescriptor(et,et.length-1);if(en&&!en.get)return!0;for(var er=0;er<et.length;er++)if(!et.hasOwnProperty(er))return!0;return!1}var $={};ev.ES5||(ev.ES5={J:function($,et){var en=Array.isArray($),er=function($,et){if($){for(var en=Array(et.length),er=0;er<et.length;er++)Object.defineProperty(en,""+er,t(er,!0));return en}var ei=ey(et);delete ei[em];for(var eo=eg(ei),es=0;es<eo.length;es++){var el=eo[es];ei[el]=t(el,$||!!ei[el].enumerable)}return Object.create(Object.getPrototypeOf(et),ei)}(en,$),ei={i:en?5:4,A:et?et.A:eo,P:!1,I:!1,D:{},l:et,t:$,k:er,o:null,O:!1,C:!1};return Object.defineProperty(er,em,{value:ei,writable:!0}),er},S:function($,et,en){en?r(et)&&et[em].A===$&&e($.p):($.u&&function n($){if($&&"object"==typeof $){var et=$[em];if(et){var en=et.t,er=et.k,ei=et.D,eo=et.i;if(4===eo)i(er,function($){$!==em&&(void 0!==en[$]||u(en,$)?ei[$]||n(er[$]):(ei[$]=!0,k(et)))}),i(en,function($){void 0!==er[$]||u(er,$)||(ei[$]=!1,k(et))});else if(5===eo){if(a(et)&&(k(et),ei.length=!0),er.length<en.length)for(var es=er.length;es<en.length;es++)ei[es]=!1;else for(var el=en.length;el<er.length;el++)ei[el]=!0;for(var eu=Math.min(er.length,en.length),ed=0;ed<eu;ed++)er.hasOwnProperty(ed)||(ei[ed]=!0),void 0===ei[ed]&&n(er[ed])}}}}($.p[0]),e($.p))},K:function($){return 4===$.i?o($):a($)}})}()},86664:function($,et,en){!function($,et){"use strict";function ownKeys($,et){var en=Object.keys($);if(Object.getOwnPropertySymbols){var er=Object.getOwnPropertySymbols($);et&&(er=er.filter(function(et){return Object.getOwnPropertyDescriptor($,et).enumerable})),en.push.apply(en,er)}return en}function _objectSpread2($){for(var et=1;et<arguments.length;et++){var en=null!=arguments[et]?arguments[et]:{};et%2?ownKeys(Object(en),!0).forEach(function(et){_defineProperty($,et,en[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(en)):ownKeys(Object(en)).forEach(function(et){Object.defineProperty($,et,Object.getOwnPropertyDescriptor(en,et))})}return $}function _typeof($){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function($){return typeof $}:function($){return $&&"function"==typeof Symbol&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $})($)}function _defineProperty($,et,en){return et in $?Object.defineProperty($,et,{value:en,enumerable:!0,configurable:!0,writable:!0}):$[et]=en,$}function _slicedToArray($,et){return function($){if(Array.isArray($))return $}($)||function($,et){var en,er,ei=$&&("undefined"!=typeof Symbol&&$[Symbol.iterator]||$["@@iterator"]);if(null!=ei){var eo=[],es=!0,el=!1;try{for(ei=ei.call($);!(es=(en=ei.next()).done)&&(eo.push(en.value),!et||eo.length!==et);es=!0);}catch($){el=!0,er=$}
1836finally{try{es||null==ei.return||ei.return()}finally{if(el)throw er}}return eo}}($,et)||function($,et){if($){if("string"==typeof $)return _arrayLikeToArray($,et);var en=Object.prototype.toString.call($).slice(8,-1);if("Object"===en&&$.constructor&&(en=$.constructor.name),"Map"===en||"Set"===en)return Array.from($);if("Arguments"===en||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(en))return _arrayLikeToArray($,et)}}($,et)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray($,et){(null==et||et>$.length)&&(et=$.length);for(var en=0,er=Array(et);en<et;en++)er[en]=$[en];return er}function emptyFunction(){}function emptyFunctionWithReset(){}et=et&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et,emptyFunctionWithReset.resetWarningCache=emptyFunction;var en,er,ei=(en=er={exports:{}},er.exports,en.exports=function(){function shim($,et,en,er,ei,eo){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==eo){var es=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw es.name="Invariant Violation",es}}function getShim(){return shim}shim.isRequired=shim;var $={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return $.PropTypes=$,$}(),er.exports),usePrevious=function($){var en=et.useRef($);return et.useEffect(function(){en.current=$},[$]),en.current},isUnknownObject=function($){return null!==$&&"object"===_typeof($)},eo="[object Object]",isEqual=function isEqual($,et){if(!isUnknownObject($)||!isUnknownObject(et))return $===et;var en=Array.isArray($);if(en!==Array.isArray(et))return!1;var er=Object.prototype.toString.call($)===eo;if(er!==(Object.prototype.toString.call(et)===eo))return!1;if(!er&&!en)return $===et;var ei=Object.keys($),es=Object.keys(et);if(ei.length!==es.length)return!1;for(var el={},eu=0;eu<ei.length;eu+=1)el[ei[eu]]=!0;for(var ed=0;ed<es.length;ed+=1)el[es[ed]]=!0;var eh=Object.keys(el);return eh.length===ei.length&&eh.every(function(en){return isEqual($[en],et[en])})},extractAllowedOptionsUpdates=function($,et,en){return isUnknownObject($)?Object.keys($).reduce(function(er,ei){var eo=!isUnknownObject(et)||!isEqual($[ei],et[ei]);return en.includes(ei)?(eo&&console.warn("Unsupported prop change: options.".concat(ei," is not a mutable property.")),er):eo?_objectSpread2(_objectSpread2({},er||{}),{},_defineProperty({},ei,$[ei])):er},null):null},validateStripe=function($){if(null===$||isUnknownObject($)&&"function"==typeof $.elements&&"function"==typeof $.createToken&&"function"==typeof $.createPaymentMethod&&"function"==typeof $.confirmCardPayment)return $;throw Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},parseStripeProp=function($){if(isUnknownObject($)&&"function"==typeof $.then)return{tag:"async",stripePromise:Promise.resolve($).then(validateStripe)};var et=validateStripe($);return null===et?{tag:"empty"}:{tag:"sync",stripe:et}},es=et.createContext(null);es.displayName="ElementsContext";var parseElementsContext=function($,et){if(!$)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(et," in an <Elements> provider."));return $},el=et.createContext(null);el.displayName="CartElementContext";var parseCartElementContext=function($,et){if(!$)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(et," in an <Elements> provider."));return $},Elements=function($){var en=$.stripe,er=$.options,ei=$.children,eo=et.useMemo(function(){return parseStripeProp(en)},[en]),eu=_slicedToArray(et.useState(null),2),ed=eu[0],eh=eu[1],ep=_slicedToArray(et.useState(null),2),em=ep[0],ef=ep[1],eg=_slicedToArray(et.useState(function(){return{stripe:"sync"===eo.tag?eo.stripe:null,elements:"sync"===eo.tag?eo.stripe.elements(er):null}}),2),ey=eg[0],ev=eg[1];et.useEffect(function(){var $=!0,safeSetContext=function($){ev(function(et){return et.stripe?et:{stripe:$,elements:$.elements(er)}})};return"async"!==eo.tag||ey.stripe?"sync"!==eo.tag||ey.stripe||safeSetContext(eo.stripe):eo.stripePromise.then(function(et){et&&$&&safeSetContext(et)}),function(){$=!1}},[eo,ey,er]);
1836var ex=usePrevious(en);et.useEffect(function(){null!==ex&&ex!==en&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[ex,en]);var e_=usePrevious(er);return et.useEffect(function(){if(ey.elements){var $=extractAllowedOptionsUpdates(er,e_,["clientSecret","fonts"]);$&&ey.elements.update($)}},[er,e_,ey.elements]),et.useEffect(function(){var $=ey.stripe;$&&$._registerWrapper&&$.registerAppInfo&&($._registerWrapper({name:"react-stripe-js",version:"2.1.2"}),$.registerAppInfo({name:"react-stripe-js",version:"2.1.2",url:"https://stripe.com/docs/stripe-js/react"}))},[ey.stripe]),et.createElement(es.Provider,{value:ey},et.createElement(el.Provider,{value:{cart:ed,setCart:eh,cartState:em,setCartState:ef}},ei))};Elements.propTypes={stripe:ei.any,options:ei.object};var useElementsContextWithUseCase=function($){return parseElementsContext(et.useContext(es),$)},useCartElementContextWithUseCase=function($){return parseCartElementContext(et.useContext(el),$)},ElementsConsumer=function($){return(0,$.children)(useElementsContextWithUseCase("mounts <ElementsConsumer>"))};ElementsConsumer.propTypes={children:ei.func.isRequired};var useAttachEvent=function($,en,er){var ei=!!er,eo=et.useRef(er);et.useEffect(function(){eo.current=er},[er]),et.useEffect(function(){if(!ei||!$)return function(){};var decoratedCb=function(){eo.current&&eo.current.apply(eo,arguments)};return $.on(en,decoratedCb),function(){$.off(en,decoratedCb)}},[ei,en,$,eo])},createElementComponent=function($,en){var er="".concat($.charAt(0).toUpperCase()+$.slice(1),"Element"),eo=en?function($){useElementsContextWithUseCase("mounts <".concat(er,">")),useCartElementContextWithUseCase("mounts <".concat(er,">"));var en=$.id,ei=$.className;return et.createElement("div",{id:en,className:ei})}:function(en){var ei,eo=en.id,es=en.className,el=en.options,eu=void 0===el?{}:el,ed=en.onBlur,eh=en.onFocus,ep=en.onReady,em=en.onChange,ef=en.onEscape,eg=en.onClick,ey=en.onLoadError,ev=en.onLoaderStart,ex=en.onNetworksChange,e_=en.onCheckout,ew=en.onLineItemClick,ek=en.onConfirm,eC=en.onCancel,eE=en.onShippingAddressChange,eI=en.onShippingRateChange,eS=useElementsContextWithUseCase("mounts <".concat(er,">")).elements,eT=_slicedToArray(et.useState(null),2),eA=eT[0],eP=eT[1],eN=et.useRef(null),ej=et.useRef(null),eR=useCartElementContextWithUseCase("mounts <".concat(er,">")),eV=eR.setCart,eD=eR.setCartState;useAttachEvent(eA,"blur",ed),useAttachEvent(eA,"focus",eh),useAttachEvent(eA,"escape",ef),useAttachEvent(eA,"click",eg),useAttachEvent(eA,"loaderror",ey),useAttachEvent(eA,"loaderstart",ev),useAttachEvent(eA,"networkschange",ex),useAttachEvent(eA,"lineitemclick",ew),useAttachEvent(eA,"confirm",ek),useAttachEvent(eA,"cancel",eC),useAttachEvent(eA,"shippingaddresschange",eE),useAttachEvent(eA,"shippingratechange",eI),"cart"===$?ei=function($){eD($),ep&&ep($)}:ep&&(ei="expressCheckout"===$?ep:function(){ep(eA)}),useAttachEvent(eA,"ready",ei),useAttachEvent(eA,"change","cart"===$?function($){eD($),em&&em($)}:em),useAttachEvent(eA,"checkout","cart"===$?function($){eD($),e_&&e_($)}:e_),et.useLayoutEffect(function(){if(null===eN.current&&eS&&null!==ej.current){var et=eS.create($,eu);"cart"===$&&eV&&eV(et),eN.current=et,eP(et),et.mount(ej.current)}},[eS,eu,eV]);var eO=usePrevious(eu);return et.useEffect(function(){if(eN.current){var $=extractAllowedOptionsUpdates(eu,eO,["paymentRequest"]);$&&eN.current.update($)}},[eu,eO]),et.useLayoutEffect(function(){return function(){if(eN.current&&"function"==typeof eN.current.destroy)try{eN.current.destroy(),eN.current=null}catch($){}}},[]),et.createElement("div",{id:eo,className:es,ref:ej})};return eo.propTypes={id:ei.string,className:ei.string,onChange:ei.func,onBlur:ei.func,onFocus:ei.func,onReady:ei.func,onEscape:ei.func,onClick:ei.func,onLoadError:ei.func,onLoaderStart:ei.func,onNetworksChange:ei.func,onCheckout:ei.func,onLineItemClick:ei.func,onConfirm:ei.func,onCancel:ei.func,onShippingAddressChange:ei.func,onShippingRateChange:ei.func,options:ei.object},eo.displayName=er,eo.__elementType=$,eo},eu="undefined"==typeof window,ed=createElementComponent("auBankAccount",eu),eh=createElementComponent("card",eu),ep=createElementComponent("cardNumber",eu),em=createElementComponent("cardExpiry",eu),ef=createElementComponent("cardCvc",eu),eg=createElementComponent("fpxBank",eu),ey=createElementComponent("iban",eu),ev=createElementComponent("idealBank",eu),ex=createElementComponent("p24Bank",eu),e_=createElementComponent("epsBank",eu),ew=createElementComponent("payment",eu),ek=createElementComponent("expressCheckout",eu),e
1836C=createElementComponent("paymentRequestButton",eu),eE=createElementComponent("linkAuthentication",eu),eI=createElementComponent("address",eu),eS=createElementComponent("shippingAddress",eu),eT=createElementComponent("cart",eu),eA=createElementComponent("paymentMethodMessaging",eu),eP=createElementComponent("affirmMessage",eu),eN=createElementComponent("afterpayClearpayMessage",eu);$.AddressElement=eI,$.AffirmMessageElement=eP,$.AfterpayClearpayMessageElement=eN,$.AuBankAccountElement=ed,$.CardCvcElement=ef,$.CardElement=eh,$.CardExpiryElement=em,$.CardNumberElement=ep,$.CartElement=eT,$.Elements=Elements,$.ElementsConsumer=ElementsConsumer,$.EpsBankElement=e_,$.ExpressCheckoutElement=ek,$.FpxBankElement=eg,$.IbanElement=ey,$.IdealBankElement=ev,$.LinkAuthenticationElement=eE,$.P24BankElement=ex,$.PaymentElement=ew,$.PaymentMethodMessagingElement=eA,$.PaymentRequestButtonElement=eC,$.ShippingAddressElement=eS,$.useCartElement=function(){return useCartElementContextWithUseCase("calls useCartElement()").cart},$.useCartElementState=function(){return useCartElementContextWithUseCase("calls useCartElementState()").cartState},$.useElements=function(){return useElementsContextWithUseCase("calls useElements()").elements},$.useStripe=function(){return useElementsContextWithUseCase("calls useStripe()").stripe},Object.defineProperty($,"__esModule",{value:!0})}(et,en(67294))},54465:function($,et,en){"use strict";en.d(et,{J:function(){return loadStripe}});var er="https://js.stripe.com/v3",ei=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,findScript=function(){for(var $=document.querySelectorAll('script[src^="'.concat(er,'"]')),et=0;et<$.length;et++){var en=$[et];if(ei.test(en.src))return en}return null},injectScript=function($){var et=$&&!$.advancedFraudSignals?"?advancedFraudSignals=false":"",en=document.createElement("script");en.src="".concat(er).concat(et);var ei=document.head||document.body;if(!ei)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return ei.appendChild(en),en},registerWrapper=function($,et){$&&$._registerWrapper&&$._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:et})},eo=null,initStripe=function($,et,en){if(null===$)return null;var er=$.apply(void 0,et);return registerWrapper(er,en),er},es=Promise.resolve().then(function(){return null!==eo?eo:eo=new Promise(function($,et){if("undefined"==typeof window||"undefined"==typeof document){$(null);return}if(window.Stripe,window.Stripe){$(window.Stripe);return}try{var en=findScript();en||(en=injectScript(null)),en.addEventListener("load",function(){window.Stripe?$(window.Stripe):et(Error("Stripe.js not available"))}),en.addEventListener("error",function(){et(Error("Failed to load Stripe.js"))})}catch($){et($);return}})}),el=!1;es.catch(function($){el||console.warn($)});var loadStripe=function(){for(var $=arguments.length,et=Array($),en=0;en<$;en++)et[en]=arguments[en];el=!0;var er=Date.now();return es.then(function($){return initStripe($,et,er)})}},2711:function($){$.exports=function($){function t(en){if(et[en])return et[en].exports;var er=et[en]={exports:{},id:en,loaded:!1};return $[en].call(er.exports,er,er.exports,t),er.loaded=!0,er.exports}var et={};return t.m=$,t.c=et,t.p="dist/",t(0)}([function($,et,en){"use strict";function o($){return $&&$.__esModule?$:{default:$}}var er=Object.assign||function($){for(var et=1;et<arguments.length;et++){var en=arguments[et];for(var er in en)Object.prototype.hasOwnProperty.call(en,er)&&($[er]=en[er])}return $},ei=(o(en(1)),en(6)),eo=o(ei),es=o(en(7)),el=o(en(8)),eu=o(en(9)),ed=o(en(10)),eh=o(en(11)),ep=o(en(14)),em=[],ef=!1,eg={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if($&&(ef=!0),ef)return em=(0,eh.default)(em,eg),(0,ed.default)(em,eg.once),em},O=function(){em=(0,ep.default)(),j()},M=function(){em.forEach(function($,et){$.node.removeAttribute("data-aos"),$.node.removeAttribute("data-aos-easing"),$.node.removeAttribute("data-aos-duration"),$.node.removeAttribute("data-aos-delay")})};$.exports={init:function($){eg=er(eg,$),em=(0,ep.default)();var et,en=document.all&&!window.atob;return!0===(et=eg.disable)||"mobile"===et&&eu.default.mobile()||"phone"===et&&eu.default.phone()||"tablet"===et&&eu.default.tablet()||"function"==typeof et&&!0===et()||en?M():(eg.disableMutationObserver||el.default.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),eg.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",eg.easing),document.querySelector("body").setAttribute("data-aos-duration",eg.duration),document.querySelector("body").setAttribute("data-aos-delay",eg.delay),"DOMContentLoaded"===eg.startEvent&&["complete","
1836interactive"].indexOf(document.readyState)>-1?j(!0):"load"===eg.startEvent?window.addEventListener(eg.startEvent,function(){j(!0)}):document.addEventListener(eg.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,es.default)(j,eg.debounceDelay,!0)),window.addEventListener("orientationchange",(0,es.default)(j,eg.debounceDelay,!0)),window.addEventListener("scroll",(0,eo.default)(function(){(0,ed.default)(em,eg.once)},eg.throttleDelay)),eg.disableMutationObserver||el.default.ready("[data-aos]",O),em)},refresh:j,refreshHard:O}},function($,et){},,,,,function($,et){(function(et){"use strict";function i($){var et=void 0===$?"undefined":en($);return!!$&&("object"==et||"function"==et)}function u($){if("number"==typeof $)return $;if("symbol"==(void 0===(et=$)?"undefined":en(et))||et&&"object"==(void 0===et?"undefined":en(et))&&eg.call(et)==eo)return ei;if(i($)){var et,er="function"==typeof $.valueOf?$.valueOf():$;$=i(er)?er+"":er}if("string"!=typeof $)return 0===$?$:+$;var ep=eu.test($=$.replace(es,""));return ep||ed.test($)?eh($.slice(2),ep?2:8):el.test($)?ei:+$}var en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function($){return typeof $}:function($){return $&&"function"==typeof Symbol&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},er="Expected a function",ei=NaN,eo="[object Symbol]",es=/^\s+|\s+$/g,el=/^[-+]0x[0-9a-f]+$/i,eu=/^0b[01]+$/i,ed=/^0o[0-7]+$/i,eh=parseInt,ep="object"==(void 0===et?"undefined":en(et))&&et&&et.Object===Object&&et,em="object"==("undefined"==typeof self?"undefined":en(self))&&self&&self.Object===Object&&self,ef=ep||em||Function("return this")(),eg=Object.prototype.toString,ey=Math.max,ev=Math.min,O=function(){return ef.Date.now()};$.exports=function($,et,en){var ei=!0,eo=!0;if("function"!=typeof $)throw TypeError(er);return i(en)&&(ei="leading"in en?!!en.leading:ei,eo="trailing"in en?!!en.trailing:eo),function($,et,en){function o(et){var en=ei,er=eo;return ei=eo=void 0,eh=et,el=$.apply(er,en)}function c($){var en=$-ed,er=$-eh;return void 0===ed||en>=et||en<0||em&&er>=es}function f(){var $,en,er,ei=O();return c(ei)?d(ei):void(eu=setTimeout(f,($=ei-ed,en=ei-eh,er=et-$,em?ev(er,es-en):er)))}function d($){return eu=void 0,ef&&ei?o($):(ei=eo=void 0,el)}function m(){var $,en=O(),er=c(en);if(ei=arguments,eo=this,ed=en,er){if(void 0===eu)return eh=$=ed,eu=setTimeout(f,et),ep?o($):el;if(em)return eu=setTimeout(f,et),o(ed)}return void 0===eu&&(eu=setTimeout(f,et)),el}var ei,eo,es,el,eu,ed,eh=0,ep=!1,em=!1,ef=!0;if("function"!=typeof $)throw TypeError(er);return et=u(et)||0,i(en)&&(ep=!!en.leading,es=(em="maxWait"in en)?ey(u(en.maxWait)||0,et):es,ef="trailing"in en?!!en.trailing:ef),m.cancel=function(){void 0!==eu&&clearTimeout(eu),eh=0,ei=ed=eo=eu=void 0},m.flush=function(){return void 0===eu?el:d(O())},m}($,et,{leading:ei,maxWait:et,trailing:eo})}}).call(et,function(){return this}())},function($,et){(function(et){"use strict";function o($){var et=void 0===$?"undefined":en($);return!!$&&("object"==et||"function"==et)}function a($){if("number"==typeof $)return $;if("symbol"==(void 0===(et=$)?"undefined":en(et))||et&&"object"==(void 0===et?"undefined":en(et))&&ef.call(et)==ei)return er;if(o($)){var et,eh="function"==typeof $.valueOf?$.valueOf():$;$=o(eh)?eh+"":eh}if("string"!=typeof $)return 0===$?$:+$;var ep=el.test($=$.replace(eo,""));return ep||eu.test($)?ed($.slice(2),ep?2:8):es.test($)?er:+$}var en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function($){return typeof $}:function($){return $&&"function"==typeof Symbol&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},er=NaN,ei="[object Symbol]",eo=/^\s+|\s+$/g,es=/^[-+]0x[0-9a-f]+$/i,el=/^0b[01]+$/i,eu=/^0o[0-7]+$/i,ed=parseInt,eh="object"==(void 0===et?"undefined":en(et))&&et&&et.Object===Object&&et,ep="object"==("undefined"==typeof self?"undefined":en(self))&&self&&self.Object===Object&&self,em=eh||ep||Function("return this")(),ef=Object.prototype.toString,eg=Math.max,ey=Math.min,j=function(){return em.Date.now()};$.exports=function($,et,en){function i(et){var en=er,eo=ei;return er=ei=void 0,ed=et,es=$.apply(eo,en)}function s($){var en=$-eu,er=$-ed;return void 0===eu||en>=et||en<0||ep&&er>=eo}function f(){var $,en,er,ei=j();
1836return s(ei)?d(ei):void(el=setTimeout(f,($=ei-eu,en=ei-ed,er=et-$,ep?ey(er,eo-en):er)))}function d($){return el=void 0,em&&er?i($):(er=ei=void 0,es)}function m(){var $,en=j(),eo=s(en);if(er=arguments,ei=this,eu=en,eo){if(void 0===el)return ed=$=eu,el=setTimeout(f,et),eh?i($):es;if(ep)return el=setTimeout(f,et),i(eu)}return void 0===el&&(el=setTimeout(f,et)),es}var er,ei,eo,es,el,eu,ed=0,eh=!1,ep=!1,em=!0;if("function"!=typeof $)throw TypeError("Expected a function");return et=a(et)||0,o(en)&&(eh=!!en.leading,eo=(ep="maxWait"in en)?eg(a(en.maxWait)||0,et):eo,em="trailing"in en?!!en.trailing:em),m.cancel=function(){void 0!==el&&clearTimeout(el),ed=0,er=eu=ei=el=void 0},m.flush=function(){return void 0===el?es:d(j())},m}}).call(et,function(){return this}())},function($,et){"use strict";function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function a($){$&&$.forEach(function($){var et=Array.prototype.slice.call($.addedNodes),en=Array.prototype.slice.call($.removedNodes);if(function n($){var et=void 0,en=void 0;for(et=0;et<$.length;et+=1)if((en=$[et]).dataset&&en.dataset.aos||en.children&&n(en.children))return!0;return!1}(et.concat(en)))return u()})}Object.defineProperty(et,"__esModule",{value:!0});var u=function(){};et.default={isSupported:function(){return!!o()},ready:function($,et){var en=window.document,er=new(o())(a);u=et,er.observe(en.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}}},function($,et){"use strict";function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(et,"__esModule",{value:!0});var en=function(){function e($,et){for(var en=0;en<et.length;en++){var er=et[en];er.enumerable=er.enumerable||!1,er.configurable=!0,"value"in er&&(er.writable=!0),Object.defineProperty($,er.key,er)}}return function($,et,en){return et&&e($.prototype,et),en&&e($,en),$}}(),er=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,ei=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,eo=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,es=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1836sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,el=function(){function e(){!function($,et){if(!($ instanceof et))throw TypeError("Cannot call a class as a function")}(this,e)}return en(e,[{key:"phone",value:function(){var $=o();return!(!er.test($)&&!ei.test($.substr(0,4)))}},{key:"mobile",value:function(){var $=o();return!(!eo.test($)&&!es.test($.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();et.default=new el},function($,et){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var n=function($,et,en){var er=$.node.getAttribute("data-aos-once");et>$.position?$.node.classList.add("aos-animate"):void 0===er||"false"!==er&&(en||"true"===er)||$.node.classList.remove("aos-animate")};et.default=function($,et){var en=window.pageYOffset,er=window.innerHeight;$.forEach(function($,ei){n($,er+en,et)})}},function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var er,ei=(er=en(12))&&er.__esModule?er:{default:er};et.default=function($,et){return $.forEach(function($,en){$.node.classList.add("aos-init"),$.position=(0,ei.default)($.node,et.offset)}),$}},function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var er,ei=(er=en(13))&&er.__esModule?er:{default:er};et.default=function($,et){var en=0,er=0,eo=window.innerHeight,es={offset:$.getAttribute("data-aos-offset"),anchor:$.getAttribute("data-aos-anchor"),anchorPlacement:$.getAttribute("data-aos-anchor-placement")};switch(es.offset&&!isNaN(es.offset)&&(er=parseInt(es.offset)),es.anchor&&document.querySelectorAll(es.anchor)&&($=document.querySelectorAll(es.anchor)[0]),en=(0,ei.default)($).top,es.anchorPlacement){case"top-bottom":break;case"center-bottom":en+=$.offsetHeight/2;break;case"bottom-bottom":en+=$.offsetHeight;break;case"top-center":en+=eo/2;break;case"bottom-center":en+=eo/2+$.offsetHeight;break;case"center-center":en+=eo/2+$.offsetHeight/2;break;case"top-top":en+=eo;break;case"bottom-top":en+=$.offsetHeight+eo;break;case"center-top":en+=$.offsetHeight/2+eo}return es.anchorPlacement||es.offset||isNaN(et)||(er=et),en+er}},function($,et){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),et.default=function($){for(var et=0,en=0;$&&!isNaN($.offsetLeft)&&!isNaN($.offsetTop);)et+=$.offsetLeft-("BODY"!=$.tagName?$.scrollLeft:0),en+=$.offsetTop-("BODY"!=$.tagName?$.scrollTop:0),$=$.offsetParent;return{top:en,left:et}}},function($,et){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),et.default=function($){return $=$||document.querySelectorAll("[data-aos]"),Array.prototype.map.call($,function($){return{node:$}})}}])},12238:function($,et,en){let er=en(59602).z,ei=en(24593).array;$.exports=class{constructor($={}){Object.assign(this,{list:$.emptyList&&[]||Array.prototype.concat.apply(er,[ei,$.list||[]]),exclude:$.exclude||[],splitRegex:$.splitRegex||/\b/,placeHolder:$.placeHolder||"*",regex:$.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:$.replaceRegex||/\w/g})}isProfane($){return this.list.filter(et=>{let en=RegExp(`\\b${et.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(et.toLowerCase())&&en.test($)}).length>0}replaceWord($){return $.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean($){return $.split(this.splitRegex).map($=>this.isProfane($)?this.replaceWord($):$).join(this.splitRegex.exec($)[0])}addWords(){let $=Array.from(arguments);this.list.push(...$),$.map($=>$.toLowerCase()).forEach($=>{this.exclude.includes($)&&this.exclude.splice(this.exclude.indexOf($),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map($=>$.toLowerCase()))}}},28738:function($){$.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bit
1836ching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},24593:function($,et,en){$.exports={object:en(57658),array:en(28738),regex:en(67519)}},57658:function($){$.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckw
1836hit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},67519:function($){$.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|c
1836ocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},79742:function($,et){"use strict";et.byteLength=function($){var et=getLens($),en=et[0],er=et[1];return(en+er)*3/4-er},et.toByteArray=function($){var et,en,eo=getLens($),es=eo[0],el=eo[1],eu=new ei((es+el)*3/4-el),ed=0,eh=el>0?es-4:es;for(en=0;en<eh;en+=4)et=er[$.charCodeAt(en)]<<18|er[$.charCodeAt(en+1)]<<12|er[$.charCodeAt(en+2)]<<6|er[$.charCodeAt(en+3)],eu[ed++]=et>>16&255,eu[ed++]=et>>8&255,eu[ed++]=255&et;return 2===el&&(et=er[$.charCodeAt(en)]<<2|er[$.charCodeAt(en+1)]>>4,eu[ed++]=255&et),1===el&&(et=er[$.charCodeAt(en)]<<10|er[$.charCodeAt(en+1)]<<4|er[$.charCodeAt(en+2)]>>2,eu[ed++]=et>>8&255,eu[ed++]=255&et),eu},et.fromByteArray=function($){for(var et,er=$.length,ei=er%3,eo=[],es=0,el=er-ei;es<el;es+=16383)eo.push(function($,et,er){for(var ei,eo=[],es=et;es<er;es+=3)eo.push(en[(ei=($[es]<<16&16711680)+($[es+1]<<8&65280)+(255&$[es+2]))>>18&63]+en[ei>>12&63]+en[ei>>6&63]+en[63&ei]);return eo.join("")}($,es,es+16383>el?el:es+16383));return 1===ei?eo.push(en[(et=$[er-1])>>2]+en[et<<4&63]+"=="):2===ei&&eo.push(en[(et=($[er-2]<<8)+$[er-1])>>10]+en[et>>4&63]+en[et<<2&63]+"="),eo.join("")};for(var en=[],er=[],ei="undefined"!=typeof Uint8Array?Uint8Array:Array,eo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 29,627 bytes, lines 1836-1841
1836+/",es=0,el=eo.length;es<el;++es)en[es]=eo[es],er[eo.charCodeAt(es)]=es;function getLens($){var et=$.length;if(et%4>0)throw Error("Invalid string. Length must be a multiple of 4");var en=$.indexOf("=");-1===en&&(en=et);var er=en===et?0:4-en%4;return[en,er]}er["-".charCodeAt(0)]=62,er["_".charCodeAt(0)]=63},48764:function($,et,en){"use strict";/*! 1837 * The buffer module from node.js, for the browser. 1838 * 1839 * @author Feross Aboukhadijeh <https://feross.org> 1840 * @license MIT 1841 */let er=en(79742),ei=en(80645),eo="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function createBuffer($){if($>2147483647)throw RangeError('The value "'+$+'" is invalid for option "size"');let et=new Uint8Array($);return Object.setPrototypeOf(et,Buffer.prototype),et}function Buffer($,et,en){if("number"==typeof $){if("string"==typeof et)throw TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe($)}return from($,et,en)}function from($,et,en){if("string"==typeof $)return function($,et){if(("string"!=typeof et||""===et)&&(et="utf8"),!Buffer.isEncoding(et))throw TypeError("Unknown encoding: "+et);let en=0|byteLength($,et),er=createBuffer(en),ei=er.write($,et);return ei!==en&&(er=er.slice(0,ei)),er}($,et);if(ArrayBuffer.isView($))return function($){if(isInstance($,Uint8Array)){let et=new Uint8Array($);return fromArrayBuffer(et.buffer,et.byteOffset,et.byteLength)}return fromArrayLike($)}($);if(null==$)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(isInstance($,ArrayBuffer)||$&&isInstance($.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(isInstance($,SharedArrayBuffer)||$&&isInstance($.buffer,SharedArrayBuffer)))return fromArrayBuffer($,et,en);if("number"==typeof $)throw TypeError('The "value" argument must not be of type number. Received type number');let er=$.valueOf&&$.valueOf();if(null!=er&&er!==$)return Buffer.from(er,et,en);let ei=function($){var et;if(Buffer.isBuffer($)){let et=0|checked($.length),en=createBuffer(et);return 0===en.length||$.copy(en,0,0,et),en}return void 0!==$.length?"number"!=typeof $.length||(et=$.length)!=et?createBuffer(0):fromArrayLike($):"Buffer"===$.type&&Array.isArray($.data)?fromArrayLike($.data):void 0}($);if(ei)return ei;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof $[Symbol.toPrimitive])return Buffer.from($[Symbol.toPrimitive]("string"),et,en);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}function assertSize($){if("number"!=typeof $)throw TypeError('"size" argument must be of type number');if($<0)throw RangeError('The value "'+$+'" is invalid for option "size"')}function allocUnsafe($){return assertSize($),createBuffer($<0?0:0|checked($))}function fromArrayLike($){let et=$.length<0?0:0|checked($.length),en=createBuffer(et);for(let er=0;er<et;er+=1)en[er]=255&$[er];return en}function fromArrayBuffer($,et,en){let er;if(et<0||$.byteLength<et)throw RangeError('"offset" is outside of buffer bounds');if($.byteLength<et+(en||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(er=void 0===et&&void 0===en?new Uint8Array($):void 0===en?new Uint8Array($,et):new Uint8Array($,et,en),Buffer.prototype),er}function checked($){if($>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|$}function byteLength($,et){if(Buffer.isBuffer($))return $.length;if(ArrayBuffer.isView($)||isInstance($,ArrayBuffer))return $.byteLength;if("string"!=typeof $)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let en=$.length,er=arguments.length>2&&!0===arguments[2];if(!er&&0===en)return 0;let ei=!1;for(;;)switch(et){case"ascii":case"latin1":case"binary":return en;case"utf8":case"utf-8":return utf8ToBytes($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*en;case"hex":return en>>>1;case"base64":return base64ToBytes($).length;default:if(ei)return er?-1:utf8ToBytes($).length;et=(""+et).toLowerCase(),ei=!0}}function slowToString($,et,en){let ei=!1;if((void 0===et||et<0)&&(et=0),et>this.length||((void 0===en||en>this.length)&&(en=this.length),en<=0||(en>>>=0)<=(et>>>=0)))return"";for($||($="utf8");;)switch($){case"hex":return function($,et,en){let er=$.length;(!et||et<0)&&(et=0),(!en||en<0||en>er)&&(en=er);let ei="";for(let er=et;er<en;++er)ei+=eu[$[er]];return ei}(this,et,en);case"utf8":case"utf-8":return utf8Slice(this,et,en);case"ascii":return function($,et,en){let er="";en=Math.min($.length,en);for(let ei=et;ei<en;++ei)er+=String.fromCharCode(127&$[ei]);return er}(this,et,en);case"latin1":case"binary":return function($,et,en){let er="";en=Math.min($.length,en);for(let ei=et;ei<en;++ei)er+=String.fromCharCode($[ei]);return er}(this,et,en);case"base64":var eo,es;return eo=et,es=en,0===eo&&es===this.length?er.fromByteArray(this):er.fromByteArray(this.slice(eo,es));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function($,et,en){let er=$.slice(et,en),ei="";for(let $=0;$<er.length-1;$+=2)ei+=String.fromCharCode(er[$]+256*er[$+1]);return ei}(this,et,en);default:if(ei)throw TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),ei=!0}}function swap($,et,en){let er=$[et];$[et]=$[en],$[en]=er}function bidirectionalIndexOf($,et,en,er,ei){var eo;if(0===$.length)return -1;if("string"==typeof en?(er=en,en=0):en>2147483647?en=2147483647:en<-2147483648&&(en=-2147483648),(eo=en=+en)!=eo&&(en=ei?0:$.length-1),en<0&&(en=$.length+en),en>=$.length){if(ei)return -1;en=$.length-1}else if(en<0){if(!ei)return -1;en=0}if("string"==typeof et&&(et=Buffer.from(et,er)),Buffer.isBuffer(et))return 0===et.length?-1:arrayIndexOf($,et,en,er,ei);if("number"==typeof et)return(et&=255,"function"==typeof Uint8Array.prototype.indexOf)?ei?Uint8Array.prototype.indexOf.call($,et,en):Uint8Array.prototype.lastIndexOf.call($,et,en):arrayIndexOf($,[et],en,er,ei);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf($,et,en,er,ei){let eo,es=1,el=$.length,eu=et.length;if(void 0!==er&&("ucs2"===(er=String(er).toLowerCase())||"ucs-2"===er||"utf16le"===er||"utf-16le"===er)){if($.length<2||et.length<2)return -1;es=2,el/=2,eu/=2,en/=2}function read($,et){return 1===es?$[et]:$.readUInt16BE(et*es)}if(ei){let er=-1;for(eo=en;eo<el;eo++)if(read($,eo)===read(et,-1===er?0:eo-er)){if(-1===er&&(er=eo),eo-er+1===eu)return er*es}else -1!==er&&(eo-=eo-er),er=-1}else for(en+eu>el&&(en=el-eu),eo=en;eo>=0;eo--){let en=!0;for(let er=0;er<eu;er++)if(read($,eo+er)!==read(et,er)){en=!1;break}if(en)return eo}return -1}function utf8Slice($,et,en){en=Math.min($.length,en);let er=[],ei=et;for(;ei<en;){let et=$[ei],eo=null,es=et>239?4:et>223?3:et>191?2:1;if(ei+es<=en){let en,er,el,eu;switch(es){case 1:et<128&&(eo=et);break;case 2:(192&(en=$[ei+1]))==128&&(eu=(31&et)<<6|63&en)>127&&(eo=eu);break;case 3:en=$[ei+1],er=$[ei+2],(192&en)==128&&(192&er)==128&&(eu=(15&et)<<12|(63&en)<<6|63&er)>2047&&(eu<55296||eu>57343)&&(eo=eu);break;case 4:en=$[ei+1],er=$[ei+2],el=$[ei+3],(192&en)==128&&(192&er)==128&&(192&el)==128&&(eu=(15&et)<<18|(63&en)<<12|(63&er)<<6|63&el)>65535&&eu<1114112&&(eo=eu)}}null===eo?(eo=65533,es=1):eo>65535&&(eo-=65536,er.push(eo>>>10&1023|55296),eo=56320|1023&eo),er.push(eo),ei+=es}return function($){let et=$.length;if(et<=4096)return String.fromCharCode.apply(String,$);let en="",er=0;for(;er<et;)en+=String.fromCharCode.apply(String,$.slice(er,er+=4096));return en}(er)}function checkOffset($,et,en){if($%1!=0||$<0)throw RangeError("offset is not uint");if($+et>en)throw RangeError("Trying to access beyond buffer length")}function checkInt($,et,en,er,ei,eo){if(!Buffer.isBuffer($))throw TypeError('"buffer" argument must be a Buffer instance');if(et>ei||et<eo)throw RangeError('"value" argument is out of bounds');if(en+er>$.length)throw RangeError("Index out of range")}function wrtBigUInt64LE($,et,en,er,ei){checkIntBI(et,er,ei,$,en,7);let eo=Number(et&BigInt(4294967295));$[en++]=eo,eo>>=8,$[en++]=eo,eo>>=8,$[en++]=eo,eo>>=8,$[en++]=eo;let es=Number(et>>BigInt(32)&BigInt(4294967295));return $[en++]=es,es>>=8,$[en++]=es,es>>=8,$[en++]=es,es>>=8,$[en++]=es,en}function wrtBigUInt64BE($,et,en,er,ei){checkIntBI(et,er,ei,$,en,7);let eo=Number(et&BigInt(4294967295));$[en+7]=eo,eo>>=8,$[en+6]=eo,eo>>=8,$[en+5]=eo,eo>>=8,$[en+4]=eo;let es=Number(et>>BigInt(32)&BigInt(4294967295));return $[en+3]=es,es>>=8,$[en+2]=es,es>>=8,$[en+1]=es,es>>=8,$[en]=es,en+8}function checkIEEE754($,et,en,er,ei,eo){if(en+er>$.length||en<0)throw RangeError("Index out of range")}function writeFloat($,et,en,er,eo){return et=+et,en>>>=0,eo||checkIEEE754($,et,en,4,34028234663852886e22,-34028234663852886e22),ei.write($,et,en,er,23,4),en+4}function writeDouble($,et,en,er,eo){return et=+et,en>>>=0,eo||checkIEEE754($,et,en,8,17976931348623157e292,-17976931348623157e292),ei.write($,et,en,er,52,8),en+8}et.Buffer=Buffer,et.SlowBuffer=function($){return+$!=$&&($=0),Buffer.alloc(+$)},et.INSPECT_MAX_BYTES=50,et.kMaxLength=2147483647,Buffer.TYPED_ARRAY_SUPPORT=function(){try{let $=new Uint8Array(1),et={foo:function(){return 42}};return Object.setPrototypeOf(et,Uint8Array.prototype),Object.setPrototypeOf($,et),42===$.foo()}catch($){return!1}}(),Buffer.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(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function($,et,en){return from($,et,en)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function($,et,en){return(assertSize($),$<=0)?createBuffer($):void 0!==et?"string"==typeof en?createBuffer($).fill(et,en):createBuffer($).fill(et):createBuffer($)},Buffer.allocUnsafe=function($){return allocUnsafe($)},Buffer.allocUnsafeSlow=function($){return allocUnsafe($)},Buffer.isBuffer=function($){return null!=$&&!0===$._isBuffer&&$!==Buffer.prototype},Buffer.compare=function($,et){if(isInstance($,Uint8Array)&&($=Buffer.from($,$.offset,$.byteLength)),isInstance(et,Uint8Array)&&(et=Buffer.from(et,et.offset,et.byteLength)),!Buffer.isBuffer($)||!Buffer.isBuffer(et))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===et)return 0;let en=$.length,er=et.length;for(let ei=0,eo=Math.min(en,er);ei<eo;++ei)if($[ei]!==et[ei]){en=$[ei],er=et[ei];break}return en<er?-1:er<en?1:0},Buffer.isEncoding=function($){switch(String($).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}},Buffer.concat=function($,et){let en;if(!Array.isArray($))throw TypeError('"list" argument must be an Array of Buffers');if(0===$.length)return Buffer.alloc(0);if(void 0===et)for(en=0,et=0;en<$.length;++en)et+=$[en].length;let er=Buffer.allocUnsafe(et),ei=0;for(en=0;en<$.length;++en){let et=$[en];if(isInstance(et,Uint8Array))ei+et.length>er.length?(Buffer.isBuffer(et)||(et=Buffer.from(et)),et.copy(er,ei)):Uint8Array.prototype.set.call(er,et,ei);else if(Buffer.isBuffer(et))et.copy(er,ei);else throw TypeError('"list" argument must be an Array of Buffers');ei+=et.length}return er},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){let $=this.length;if($%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let et=0;et<$;et+=2)swap(this,et,et+1);return this},Buffer.prototype.swap32=function(){let $=this.length;if($%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let et=0;et<$;et+=4)swap(this,et,et+3),swap(this,et+1,et+2);return this},Buffer.prototype.swap64=function(){let $=this.length;if($%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let et=0;et<$;et+=8)swap(this,et,et+7),swap(this,et+1,et+6),swap(this,et+2,et+5),swap(this,et+3,et+4);return this},Buffer.prototype.toString=function(){let $=this.length;return 0===$?"":0==arguments.length?utf8Slice(this,0,$):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function($){if(!Buffer.isBuffer($))throw TypeError("Argument must be a Buffer");return this===$||0===Buffer.compare(this,$)},Buffer.prototype.inspect=function(){let $="",en=et.INSPECT_MAX_BYTES;return $=this.toString("hex",0,en).replace(/(.{2})/g,"$1 ").trim(),this.length>en&&($+=" ... "),"<Buffer "+$+">"},eo&&(Buffer.prototype[eo]=Buffer.prototype.inspect),Buffer.prototype.compare=function($,et,en,er,ei){if(isInstance($,Uint8Array)&&($=Buffer.from($,$.offset,$.byteLength)),!Buffer.isBuffer($))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(void 0===et&&(et=0),void 0===en&&(en=$?$.length:0),void 0===er&&(er=0),void 0===ei&&(ei=this.length),et<0||en>$.length||er<0||ei>this.length)throw RangeError("out of range index");if(er>=ei&&et>=en)return 0;if(er>=ei)return -1;if(et>=en)return 1;if(et>>>=0,en>>>=0,er>>>=0,ei>>>=0,this===$)return 0;let eo=ei-er,es=en-et,el=Math.min(eo,es),eu=this.slice(er,ei),ed=$.slice(et,en);for(let $=0;$<el;++$)if(eu[$]!==ed[$]){eo=eu[$],es=ed[$];break}return eo<es?-1:es<eo?1:0},Buffer.prototype.includes=function($,et,en){return -1!==this.indexOf($,et,en)},Buffer.prototype.indexOf=function($,et,en){return bidirectionalIndexOf(this,$,et,en,!0)},Buffer.prototype.lastIndexOf=function($,et,en){return bidirectionalIndexOf(this,$,et,en,!1)},Buffer.prototype.write=function($,et,en,er){var ei,eo,es,el,eu,ed,eh,ep;if(void 0===et)er="utf8",en=this.length,et=0;else if(void 0===en&&"string"==typeof et)er=et,en=this.length,et=0;else if(isFinite(et))et>>>=0,isFinite(en)?(en>>>=0,void 0===er&&(er="utf8")):(er=en,en=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let em=this.length-et;if((void 0===en||en>em)&&(en=em),$.length>0&&(en<0||et<0)||et>this.length)throw RangeError("Attempt to write outside buffer bounds");er||(er="utf8");let ef=!1;for(;;)switch(er){case"hex":return function($,et,en,er){let ei;en=Number(en)||0;let eo=$.length-en;er?(er=Number(er))>eo&&(er=eo):er=eo;let es=et.length;for(er>es/2&&(er=es/2),ei=0;ei<er;++ei){let er=parseInt(et.substr(2*ei,2),16);if(er!=er)break;$[en+ei]=er}return ei}(this,$,et,en);case"utf8":case"utf-8":return ei=et,eo=en,blitBuffer(utf8ToBytes($,this.length-ei),this,ei,eo);case"ascii":case"latin1":case"binary":return es=et,el=en,blitBuffer(function($){let et=[];for(let en=0;en<$.length;++en)et.push(255&$.charCodeAt(en));return et}($),this,es,el);case"base64":return eu=et,ed=en,blitBuffer(base64ToBytes($),this,eu,ed);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return eh=et,ep=en,blitBuffer(function($,et){let en,er;let ei=[];for(let eo=0;eo<$.length&&!((et-=2)<0);++eo)er=(en=$.charCodeAt(eo))>>8,ei.push(en%256),ei.push(er);return ei}($,this.length-eh),this,eh,ep);default:if(ef)throw TypeError("Unknown encoding: "+er);er=(""+er).toLowerCase(),ef=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function($,et){let en=this.length;$=~~$,et=void 0===et?en:~~et,$<0?($+=en)<0&&($=0):$>en&&($=en),et<0?(et+=en)<0&&(et=0):et>en&&(et=en),et<$&&(et=$);let er=this.subarray($,et);return Object.setPrototypeOf(er,Buffer.prototype),er},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function($,et,en){$>>>=0,et>>>=0,en||checkOffset($,et,this.length);let er=this[$],ei=1,eo=0;for(;++eo<et&&(ei*=256);)er+=this[$+eo]*ei;return er},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function($,et,en){$>>>=0,et>>>=0,en||checkOffset($,et,this.length);let er=this[$+--et],ei=1;for(;et>0&&(ei*=256);)er+=this[$+--et]*ei;return er},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function($,et){return $>>>=0,et||checkOffset($,1,this.length),this[$]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function($,et){return $>>>=0,et||checkOffset($,2,this.length),this[$]|this[$+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function($,et){return $>>>=0,et||checkOffset($,2,this.length),this[$]<<8|this[$+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+16777216*this[$+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),16777216*this[$]+(this[$+1]<<16|this[$+2]<<8|this[$+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod(function($){validateNumber($>>>=0,"offset");let et=this[$],en=this[$+7];(void 0===et||void 0===en)&&boundsError($,this.length-8);let er=et+256*this[++$]+65536*this[++$]+16777216*this[++$],ei=this[++$]+256*this[++$]+65536*this[++$]+16777216*en;return BigInt(er)+(BigInt(ei)<<BigInt(32))}),Buffer.prototype.readBigUInt64BE=defineBigIntMethod(function($){validateNumber($>>>=0,"offset");let et=this[$],en=this[$+7];(void 0===et||void 0===en)&&boundsError($,this.length-8);let er=16777216*et+65536*this[++$]+256*this[++$]+this[++$],ei=16777216*this[++$]+65536*this[++$]+256*this[++$]+en;return(BigInt(er)<<BigInt(32))+BigInt(ei)}),Buffer.prototype.readIntLE=function($,et,en){$>>>=0,et>>>=0,en||checkOffset($,et,this.length);let er=this[$],ei=1,eo=0;for(;++eo<et&&(ei*=256);)er+=this[$+eo]*ei;return er>=(ei*=128)&&(er-=Math.pow(2,8*et)),er},Buffer.prototype.readIntBE=function($,et,en){$>>>=0,et>>>=0,en||checkOffset($,et,this.length);let er=et,ei=1,eo=this[$+--er];for(;er>0&&(ei*=256);)eo+=this[$+--er]*ei;return eo>=(ei*=128)&&(eo-=Math.pow(2,8*et)),eo},Buffer.prototype.readInt8=function($,et){return($>>>=0,et||checkOffset($,1,this.length),128&this[$])?-((255-this[$]+1)*1):this[$]},Buffer.prototype.readInt16LE=function($,et){$>>>=0,et||checkOffset($,2,this.length);let en=this[$]|this[$+1]<<8;return 32768&en?4294901760|en:en},Buffer.prototype.readInt16BE=function($,et){$>>>=0,et||checkOffset($,2,this.length);let en=this[$+1]|this[$]<<8;return 32768&en?4294901760|en:en},Buffer.prototype.readInt32LE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},Buffer.prototype.readInt32BE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod(function($){validateNumber($>>>=0,"offset");let et=this[$],en=this[$+7];(void 0===et||void 0===en)&&boundsError($,this.length-8);let er=this[$+4]+256*this[$+5]+65536*this[$+6]+(en<<24);return(BigInt(er)<<BigInt(32))+BigInt(et+256*this[++$]+65536*this[++$]+16777216*this[++$])}),Buffer.prototype.readBigInt64BE=defineBigIntMethod(function($){validateNumber($>>>=0,"offset");let et=this[$],en=this[$+7];(void 0===et||void 0===en)&&boundsError($,this.length-8);let er=(et<<24)+65536*this[++$]+256*this[++$]+this[++$];return(BigInt(er)<<BigInt(32))+BigInt(16777216*this[++$]+65536*this[++$]+256*this[++$]+en)}),Buffer.prototype.readFloatLE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),ei.read(this,$,!0,23,4)},Buffer.prototype.readFloatBE=function($,et){return $>>>=0,et||checkOffset($,4,this.length),ei.read(this,$,!1,23,4)},Buffer.prototype.readDoubleLE=function($,et){return $>>>=0,et||checkOffset($,8,this.length),ei.read(this,$,!0,52,8)},Buffer.prototype.readDoubleBE=function($,et){return $>>>=0,et||checkOffset($,8,this.length),ei.read(this,$,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function($,et,en,er){if($=+$,et>>>=0,en>>>=0,!er){let er=Math.pow(2,8*en)-1;checkInt(this,$,et,en,er,0)}let ei=1,eo=0;for(this[et]=255&$;++eo<en&&(ei*=256);)this[et+eo]=$/ei&255;return et+en},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function($,et,en,er){if($=+$,et>>>=0,en>>>=0,!er){let er=Math.pow(2,8*en)-1;checkInt(this,$,et,en,er,0)}let ei=en-1,eo=1;for(this[et+ei]=255&$;--ei>=0&&(eo*=256);)this[et+ei]=$/eo&255;return et+en},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,1,255,0),this[et]=255&$,et+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,2,65535,0),this[et]=255&$,this[et+1]=$>>>8,et+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,2,65535,0),this[et]=$>>>8,this[et+1]=255&$,et+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,4,4294967295,0),this[et+3]=$>>>24,this[et+2]=$>>>16,this[et+1]=$>>>8,this[et]=255&$,et+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,4,4294967295,0),this[et]=$>>>24,this[et+1]=$>>>16,this[et+2]=$>>>8,this[et+3]=255&$,et+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod(function($,et=0){return wrtBigUInt64LE(this,$,et,BigInt(0),BigInt("0xffffffffffffffff"))}),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod(function($,et=0){return wrtBigUInt64BE(this,$,et,BigInt(0),BigInt("0xffffffffffffffff"))}),Buffer.prototype.writeIntLE=function($,et,en,er){if($=+$,et>>>=0,!er){let er=Math.pow(2,8*en-1);checkInt(this,$,et,en,er-1,-er)}let ei=0,eo=1,es=0;for(this[et]=255&$;++ei<en&&(eo*=256);)$<0&&0===es&&0!==this[et+ei-1]&&(es=1),this[et+ei]=($/eo>>0)-es&255;return et+en},Buffer.prototype.writeIntBE=function($,et,en,er){if($=+$,et>>>=0,!er){let er=Math.pow(2,8*en-1);checkInt(this,$,et,en,er-1,-er)}let ei=en-1,eo=1,es=0;for(this[et+ei]=255&$;--ei>=0&&(eo*=256);)$<0&&0===es&&0!==this[et+ei+1]&&(es=1),this[et+ei]=($/eo>>0)-es&255;return et+en},Buffer.prototype.writeInt8=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,1,127,-128),$<0&&($=255+$+1),this[et]=255&$,et+1},Buffer.prototype.writeInt16LE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,2,32767,-32768),this[et]=255&$,this[et+1]=$>>>8,et+2},Buffer.prototype.writeInt16BE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,2,32767,-32768),this[et]=$>>>8,this[et+1]=255&$,et+2},Buffer.prototype.writeInt32LE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,4,2147483647,-2147483648),this[et]=255&$,this[et+1]=$>>>8,this[et+2]=$>>>16,this[et+3]=$>>>24,et+4},Buffer.prototype.writeInt32BE=function($,et,en){return $=+$,et>>>=0,en||checkInt(this,$,et,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),this[et]=$>>>24,this[et+1]=$>>>16,this[et+2]=$>>>8,this[et+3]=255&$,et+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod(function($,et=0){return wrtBigUInt64LE(this,$,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),Buffer.prototype.writeBigInt64BE=defineBigIntMethod(function($,et=0){return wrtBigUInt64BE(this,$,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),Buffer.prototype.writeFloatLE=function($,et,en){return writeFloat(this,$,et,!0,en)},Buffer.prototype.writeFloatBE=function($,et,en){return writeFloat(this,$,et,!1,en)},Buffer.prototype.writeDoubleLE=function($,et,en){return writeDouble(this,$,et,!0,en)},Buffer.prototype.writeDoubleBE=function($,et,en){return writeDouble(this,$,et,!1,en)},Buffer.prototype.copy=function($,et,en,er){if(!Buffer.isBuffer($))throw TypeError("argument should be a Buffer");if(en||(en=0),er||0===er||(er=this.length),et>=$.length&&(et=$.length),et||(et=0),er>0&&er<en&&(er=en),er===en||0===$.length||0===this.length)return 0;if(et<0)throw RangeError("targetStart out of bounds");if(en<0||en>=this.length)throw RangeError("Index out of range");if(er<0)throw RangeError("sourceEnd out of bounds");er>this.length&&(er=this.length),$.length-et<er-en&&(er=$.length-et+en);let ei=er-en;return this===$&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(et,en,er):Uint8Array.prototype.set.call($,this.subarray(en,er),et),ei},Buffer.prototype.fill=function($,et,en,er){let ei;if("string"==typeof $){if("string"==typeof et?(er=et,et=0,en=this.length):"string"==typeof en&&(er=en,en=this.length),void 0!==er&&"string"!=typeof er)throw TypeError("encoding must be a string");if("string"==typeof er&&!Buffer.isEncoding(er))throw TypeError("Unknown encoding: "+er);if(1===$.length){let et=$.charCodeAt(0);("utf8"===er&&et<128||"latin1"===er)&&($=et)}}else"number"==typeof $?$&=255:"boolean"==typeof $&&($=Number($));if(et<0||this.length<et||this.length<en)throw RangeError("Out of range index");if(en<=et)return this;if(et>>>=0,en=void 0===en?this.length:en>>>0,$||($=0),"number"==typeof $)for(ei=et;ei<en;++ei)this[ei]=$;else{let eo=Buffer.isBuffer($)?$:Buffer.from($,er),es=eo.length;if(0===es)throw TypeError('The value "'+$+'" is invalid for argument "value"');for(ei=0;ei<en-et;++ei)this[ei+et]=eo[ei%es]}return this};let es={};function E($,et,en){es[$]=class extends en{constructor(){super(),Object.defineProperty(this,"message",{value:et.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code($){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}function addNumericalSeparator($){let et="",en=$.length,er="-"===$[0]?1:0;for(;en>=er+4;en-=3)et=`_${$.slice(en-3,en)}${et}`;return`${$.slice(0,en)}${et}`}function checkIntBI($,et,en,er,ei,eo){if($>en||$<et){let er;let ei="bigint"==typeof et?"n":"";throw er=eo>3?0===et||et===BigInt(0)?`>= 0${ei} and < 2${ei} ** ${(eo+1)*8}${ei}`:`>= -(2${ei} ** ${(eo+1)*8-1}${ei}) and < 2 ** ${(eo+1)*8-1}${ei}`:`>= ${et}${ei} and <= ${en}${ei}`,new es.ERR_OUT_OF_RANGE("value",er,$)}validateNumber(ei,"offset"),(void 0===er[ei]||void 0===er[ei+eo])&&boundsError(ei,er.length-(eo+1))}function validateNumber($,et){if("number"!=typeof $)throw new es.ERR_INVALID_ARG_TYPE(et,"number",$)}function boundsError($,et,en){if(Math.floor($)!==$)throw validateNumber($,en),new es.ERR_OUT_OF_RANGE(en||"offset","an integer",$);if(et<0)throw new es.ERR_BUFFER_OUT_OF_BOUNDS;throw new es.ERR_OUT_OF_RANGE(en||"offset",`>= ${en?1:0} and <= ${et}`,$)}E("ERR_BUFFER_OUT_OF_BOUNDS",function($){return $?`${$} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function($,et){return`The "${$}" argument must be of type number. Received type ${typeof et}`},TypeError),E("ERR_OUT_OF_RANGE",function($,et,en){let er=`The value of "${$}" is out of range.`,ei=en;return Number.isInteger(en)&&Math.abs(en)>4294967296?ei=addNumericalSeparator(String(en)):"bigint"==typeof en&&(ei=String(en),(en>BigInt(2)**BigInt(32)||en<-(BigInt(2)**BigInt(32)))&&(ei=addNumericalSeparator(ei)),ei+="n"),er+=` It must be ${et}. Received ${ei}`},RangeError);let el=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes($,et){let en;et=et||1/0;let er=$.length,ei=null,eo=[];for(let es=0;es<er;++es){if((en=$.charCodeAt(es))>55295&&en<57344){if(!ei){if(en>56319||es+1===er){(et-=3)>-1&&eo.push(239,191,189);continue}ei=en;continue}if(en<56320){(et-=3)>-1&&eo.push(239,191,189),ei=en;continue}en=(ei-55296<<10|en-56320)+65536}else ei&&(et-=3)>-1&&eo.push(239,191,189);if(ei=null,en<128){if((et-=1)<0)break;eo.push(en)}else if(en<2048){if((et-=2)<0)break;eo.push(en>>6|192,63&en|128)}else if(en<65536){if((et-=3)<0)break;eo.push(en>>12|224,en>>6&63|128,63&en|128)}else if(en<1114112){if((et-=4)<0)break;eo.push(en>>18|240,en>>12&63|128,en>>6&63|128,63&en|128)}else throw Error("Invalid code point")}return eo}function base64ToBytes($){return er.toByteArray(function($){if(($=($=$.split("=")[0]).trim().replace(el,"")).length<2)return"";for(;$.length%4!=0;)$+="=";return $}($))}function blitBuffer($,et,en,er){let ei;for(ei=0;ei<er&&!(ei+en>=et.length)&&!(ei>=$.length);++ei)et[ei+en]=$[ei];return ei}function isInstance($,et){return $ instanceof et||null!=$&&null!=$.constructor&&null!=$.constructor.name&&$.constructor.name===et.name}let eu=function(){let $="0123456789abcdef",et=Array(256);for(let en=0;en<16;++en){let er=16*en;for(let ei=0;ei<16;++ei)et[er+ei]=$[en]+$[ei]}return et}();function defineBigIntMethod($){return"undefined"==typeof BigInt?BufferBigIntNotDefined:$}function BufferBigIntNotDefined(){throw Error("BigInt not supported")}},71716:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),et.getDatesParameter=et.sortDates=et.filterInvalidDates=et.relativeDates=void 0;var er=_interopRequireDefault(en(68931)),ei=_interopRequireDefault(en(9285)),eo=_interopRequireDefault(en(19721)),es=_interopRequireDefault(en(81704));function _interopRequireDefault($){return $&&$.__esModule?$:{default:$}}et.relativeDates=function(){return{today:(0,er.default)(new Date),yesterday:(0,er.default)((0,ei.default)(new Date,1)),tomorrow:(0,er.default)((0,eo.default)(new Date,1))}},et.filterInvalidDates=function($){return $.filter(function($){return(0,es.default)(new Date($))?new Date($):console.error("The date '"+$+"' is not in a valid date format and date-streaks is ignoring it. Browsers do not consistently support this and this package's results may fail. Verify the array of dates
1841you're passing to date-streaks are all valid date strings. http://momentjs.com/docs/#/parsing/string/")})},et.sortDates=function($){return $.sort(function($,et){return(0,er.default)(et)-(0,er.default)($)}).reverse()},et.getDatesParameter=function(){var $=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray($)?$:$.dates||[]}},87047:function($,et,en){"use strict";et.Sp=void 0;var er=_interopRequireDefault(en(18186)),ei=_interopRequireDefault(en(33138)),eo=_interopRequireDefault(en(45526));function _interopRequireDefault($){return $&&$.__esModule?$:{default:$}}et.Sp=er.default,ei.default,eo.default},33138:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var er,ei=en(71716),eo=(er=en(18186))&&er.__esModule?er:{default:er};function _toConsumableArray($){if(!Array.isArray($))return Array.from($);for(var et=0,en=Array($.length);et<$.length;et++)en[et]=$[et];return en}et.default=function(){var $=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],et=(0,ei.getDatesParameter)($);if(0===et.length)return[];var en=(0,eo.default)({dates:et}).streaks,er=[].concat(_toConsumableArray((0,ei.sortDates)(et)));return(void 0===en?[]:en).reduce(function($,et){var en=void 0,ei=void 0,eo=er.slice(0,et);return er.splice(0,et),eo&&eo.length>1?(en=new Date(eo[0]),ei=new Date(eo[eo.length-1])):(en=new Date(eo[0]),ei=null),[].concat(_toConsumableArray($),[{start:en,end:ei,duration:et}])},[]).reverse()}},18186:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var er,ei=Object.assign||function($){for(var et=1;et<arguments.length;et++){var en=arguments[et];for(var er in en)Object.prototype.hasOwnProperty.call(en,er)&&($[er]=en[er])}return $},eo=(er=en(1e4))&&er.__esModule?er:{default:er},es=en(71716);et.default=function(){var $=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],et=(0,es.getDatesParameter)($),en=(0,es.relativeDates)(),er=en.today,el=en.yesterday,eu=(0,es.filterInvalidDates)(et),ed=(0,es.sortDates)(eu),eh=ed.reduce(function($,et,en){var es=new Date(et),eu=ed[en+1]?new Date(ed[en+1]):es,eh=(0,eo.default)(eu,es),ep=$.isToday||0===(0,eo.default)(et,er),em=$.isYesterday||0===(0,eo.default)(et,el),ef=$.isInFuture||0>(0,eo.default)(er,et);return 0===eh?ep&&($.todayInStreak=!0):1===eh?++$.streaks[$.streaks.length-1]:$.streaks.push(1),ei({},$,{longestStreak:Math.max.apply(Math,function($){if(!Array.isArray($))return Array.from($);for(var et=0,en=Array($.length);et<$.length;et++)en[et]=$[et];return en}($.streaks)),withinCurrentStreak:$.isToday||$.isYesterday||$.isInFuture||ep||em||ef,currentStreak:ep||em||ef?$.streaks[$.streaks.length-1]:0,isInFuture:ef,isYesterday:em,isToday:ep})},{currentStreak:0,longestStreak:0,streaks:[1],todayInStreak:!1,withinCurrentStreak:!1,isInFuture:!1,isToday:!1,isYesterday:!1});return eh.isToday,eh.isYesterday,eh.isInFuture,function($,et){var en={};for(var er in $)!(et.indexOf(er)>=0)&&Object.prototype.hasOwnProperty.call($,er)&&(en[er]=$[er]);return en}(eh,["isToday","isYesterday","isInFuture"])}},45526:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0});var er=Object.assign||function($){for(var et=1;et<arguments.length;et++){var en=arguments[et];for(var er in en)Object.prototype.hasOwnProperty.call(en,er)&&($[er]=en[er])}return $},ei=_interopRequireDefault(en(68931)),eo=_interopRequireDefault(en(9285)),es=en(71716);function _interopRequireDefault($){return $&&$.__esModule?$:{default:$}}et.default=function($){var et=$.dates,en=$.length,el=$.endDate,eu=void 0===el?new Date:el,ed=[].concat(function($){if(!Array.isArray($))return Array.from($);for(var et=0,en=Array($.length);et<$.length;et++)en[et]=$[et];return en}(Array(void 0===en?7:en))).map(function($,et){return(0,ei.default)((0,eo.default)(eu,et))}),eh=(0,es.sortDates)(void 0===et?[]:et).map(function($){return(0,ei.default)($).getTime()});return ed.reduce(function($,et){var en,ei;return $=er({},$,(en={},ei=eh.includes(et.getTime()),et in en?Object.defineProperty(en,et,{value:ei,enumerable:!0,configurable:!0,writable:!0}):en[et]=ei,en))},{})}},93628:function($){$.exports=function($){var et=new Date($.getTime()),en=et.getTimezoneOffset();return et.setSeconds(0,0),6e4*en+et.getTime()%6e4}},19721:function($,et,en){var er=en(40903);$.exports=function($,et){var en=er($),ei=Number(et);return en.setDate(en.getDate()+ei),en}},8543:function($,et,en){var er=en(40903);$.exports=function($,et){var en=er($).getTime(),ei=er(et).getTime();return en<ei?-1:en>ei?1:0}},53639:function($,et,en){var er=en(68931);$.exports=function($,et){var en=er($),ei=er(et);return Math.round((en.getTime()-6e4*en.getTimezoneOffset()-(ei.getTime()-6e4*ei.getTimezoneOffset()))/864e5)}},1e4:function($,et,en){var er=en(40903),ei=en(53639),eo=en(8543);$.exports=function($,et){var en=er($),es=er(et),el=eo(en,es),eu=Math.abs(ei(en,es)
1841);en.setDate(en.getDate()-el*eu);var ed=eo(en,es)===-el;return el*(eu-ed)}},43817:function($){$.exports=function($){return $ instanceof Date}},81704:function($,et,en){var er=en(43817);$.exports=function($){if(er($))return!isNaN($);throw TypeError(toString.call($)+" is not an instance of Date")}},40903:function($,et,en){var er=en(93628),ei=en(43817),eo=/[T ]/,es=/:/,el=/^(\d{2})$/,eu=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],ed=/^(\d{4})/,eh=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],ep=/^-(\d{2})$/,em=/^-?(\d{3})$/,ef=/^-?(\d{2})-?(\d{2})$/,eg=/^-?W(\d{2})$/,ey=/^-?W(\d{2})-?(\d{1})$/,ev=/^(\d{2}([.,]\d*)?)$/,ex=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,e_=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,ew=/([Z+-].*)$/,ek=/^(Z)$/,eC=/^([+-])(\d{2})$/,eE=/^([+-])(\d{2}):?(\d{2})$/;function dayOfISOYear($,et,en){et=et||0,en=en||0;var er=new Date(0);er.setUTCFullYear($,0,4);var ei=7*et+en+1-(er.getUTCDay()||7);return er.setUTCDate(er.getUTCDate()+ei),er}$.exports=function($,et){if(ei($))return new Date($.getTime());if("string"!=typeof $)return new Date($);var en,eI,eS,eT=(et||{}).additionalDigits;eT=null==eT?2:Number(eT);var eA=function($){var et,en={},er=$.split(eo);if(es.test(er[0])?(en.date=null,et=er[0]):(en.date=er[0],et=er[1]),et){var ei=ew.exec(et);ei?(en.time=et.replace(ei[1],""),en.timezone=ei[1]):en.time=et}return en}($),eP=function($,et){var en,er=eu[et],ei=eh[et];if(en=ed.exec($)||ei.exec($)){var eo=en[1];return{year:parseInt(eo,10),restDateString:$.slice(eo.length)}}if(en=el.exec($)||er.exec($)){var es=en[1];return{year:100*parseInt(es,10),restDateString:$.slice(es.length)}}return{year:null}}(eA.date,eT),eN=eP.year,ej=function($,et){if(null===et)return null;if(0===$.length)return(er=new Date(0)).setUTCFullYear(et),er;if(en=ep.exec($))return er=new Date(0),ei=parseInt(en[1],10)-1,er.setUTCFullYear(et,ei),er;if(en=em.exec($)){er=new Date(0);var en,er,ei,eo=parseInt(en[1],10);return er.setUTCFullYear(et,0,eo),er}if(en=ef.exec($)){er=new Date(0),ei=parseInt(en[1],10)-1;var es=parseInt(en[2],10);return er.setUTCFullYear(et,ei,es),er}return(en=eg.exec($))?dayOfISOYear(et,parseInt(en[1],10)-1):(en=ey.exec($))?dayOfISOYear(et,parseInt(en[1],10)-1,parseInt(en[2],10)-1):null}(eP.restDateString,eN);if(!ej)return new Date($);var eR,eV=ej.getTime(),eD=0;if(eA.time&&(eD=function($){if(et=ev.exec($))return parseFloat(et[1].replace(",","."))%24*36e5;if(et=ex.exec($))return parseInt(et[1],10)%24*36e5+6e4*parseFloat(et[2].replace(",","."));if(et=e_.exec($)){var et,en;return parseInt(et[1],10)%24*36e5+6e4*parseInt(et[2],10)+1e3*parseFloat(et[3].replace(",","."))}return null}(eA.time)),eA.timezone)eR=6e4*(en=eA.timezone,(eI=ek.exec(en))?0:(eI=eC.exec(en))?(eS=60*parseInt(eI[2],10),"+"===eI[1]?-eS:eS):(eI=eE.exec(en))?(eS=60*parseInt(eI[2],10)+parseInt(eI[3],10),"+"===eI[1]?-eS:eS):0);else{var eO=eV+eD,eM=new Date(eO);eR=er(eM);var eF=new Date(eO);eF.setDate(eM.getDate()+1);var eL=er(eF)-er(eM);eL>0&&(eR+=eL)}return new Date(eV+eD+eR)}},68931:function($,et,en){var er=en(40903);$.exports=function($){var et=er($);return et.setHours(0,0,0,0),et}},9285:function($,et,en){var er=en(19721);$.exports=function($,et){return er($,-Number(et))}},99960:function($,et){"use strict";var en,er;Object.defineProperty(et,"__esModule",{value:!0}),et.Doctype=et.CDATA=et.Tag=et.Style=et.Script=et.Comment=et.Directive=et.Text=et.Root=et.isTag=et.ElementType=void 0,(er=en=et.ElementType||(et.ElementType={})).Root="root",er.Text="text",er.Directive="directive",er.Comment="comment",er.Script="script",er.Style="style",er.Tag="tag",er.CDATA="cdata",er.Doctype="doctype",et.isTag=function($){return $.type===en.Tag||$.type===en.Script||$.type===en.Style},et.Root=en.Root,et.Text=en.Text,et.Directive=en.Directive,et.Comment=en.Comment,et.Script=en.Script,et.Style=en.Style,et.Tag=en.Tag,et.CDATA=en.CDATA,et.Doctype=en.Doctype},47915:function($,et,en){"use strict";var er=this&&this.__createBinding||(Object.create?function($,et,en,er){void 0===er&&(er=en);var ei=Object.getOwnPropertyDescriptor(et,en);(!ei||("get"in ei?!et.__esModule:ei.writable||ei.configurable))&&(ei={enumerable:!0,get:function(){return et[en]}}),Object.defineProperty($,er,ei)}:function($,et,en,er){void 0===er&&(er=en),$[er]=et[en]}),ei=this&&this.__exportStar||function($,et){for(var en in $)"default"===en||Object.prototype.hasOwnProperty.call(et,en)||er(et,$,en)};
vendor: 4,202 bytes, line 1841
1841Object.defineProperty(et,"__esModule",{value:!0}),et.DomHandler=void 0;var eo=en(99960),es=en(97790);ei(en(97790),et);var el={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},eu=function(){function DomHandler($,et,en){this.dom=[],this.root=new es.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof et&&(en=et,et=el),"object"==typeof $&&(et=$,$=void 0),this.callback=null!=$?$:null,this.options=null!=et?et:el,this.elementCB=null!=en?en:null}return DomHandler.prototype.onparserinit=function($){this.parser=$},DomHandler.prototype.onreset=function(){this.dom=[],this.root=new es.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},DomHandler.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},DomHandler.prototype.onerror=function($){this.handleCallback($)},DomHandler.prototype.onclosetag=function(){this.lastNode=null;var $=this.tagStack.pop();this.options.withEndIndices&&($.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB($)},DomHandler.prototype.onopentag=function($,et){var en=this.options.xmlMode?eo.ElementType.Tag:void 0,er=new es.Element($,et,void 0,en);this.addNode(er),this.tagStack.push(er)},DomHandler.prototype.ontext=function($){var et=this.lastNode;if(et&&et.type===eo.ElementType.Text)et.data+=$,this.options.withEndIndices&&(et.endIndex=this.parser.endIndex);else{var en=new es.Text($);this.addNode(en),this.lastNode=en}},DomHandler.prototype.oncomment=function($){if(this.lastNode&&this.lastNode.type===eo.ElementType.Comment){this.lastNode.data+=$;return}var et=new es.Comment($);this.addNode(et),this.lastNode=et},DomHandler.prototype.oncommentend=function(){this.lastNode=null},DomHandler.prototype.oncdatastart=function(){var $=new es.Text(""),et=new es.CDATA([$]);this.addNode(et),$.parent=et,this.lastNode=$},DomHandler.prototype.oncdataend=function(){this.lastNode=null},DomHandler.prototype.onprocessinginstruction=function($,et){var en=new es.ProcessingInstruction($,et);this.addNode(en)},DomHandler.prototype.handleCallback=function($){if("function"==typeof this.callback)this.callback($,this.dom);else if($)throw $},DomHandler.prototype.addNode=function($){var et=this.tagStack[this.tagStack.length-1],en=et.children[et.children.length-1];this.options.withStartIndices&&($.startIndex=this.parser.startIndex),this.options.withEndIndices&&($.endIndex=this.parser.endIndex),et.children.push($),en&&($.prev=en,en.next=$),$.parent=et,this.lastNode=null},DomHandler}();et.DomHandler=eu,et.default=eu},97790:function($,et,en){"use strict";var er,ei=this&&this.__extends||(er=function($,et){return(er=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function($,et){$.__proto__=et}||function($,et){for(var en in et)Object.prototype.hasOwnProperty.call(et,en)&&($[en]=et[en])})($,et)},function($,et){if("function"!=typeof et&&null!==et)throw TypeError("Class extends value "+String(et)+" is not a constructor or null");function __(){this.constructor=$}er($,et),$.prototype=null===et?Object.create(et):(__.prototype=et.prototype,new __)}),eo=this&&this.__assign||function(){return(eo=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)};Object.defineProperty(et,"__esModule",{value:!0}),et.cloneNode=et.hasChildren=et.isDocument=et.isDirective=et.isComment=et.isText=et.isCDATA=et.isTag=et.Element=et.Document=et.CDATA=et.NodeWithChildren=et.ProcessingInstruction=et.Comment=et.Text=et.DataNode=et.Node=void 0;var es=en(99960),el=function(){function Node(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(Node.prototype,"parentNode",{get:function(){return this.parent},set:function($){this.parent=$},enumerable:!1,configurable:!0}),Object.defineProperty(Node.prototype,"previousSibling",{get:function(){return this.prev},set:function($){this.prev=$},enumerable:!1,configurable:!0}),Object.defineProperty(Node.prototype,"nextSibling",{get:function(){return this.next},set:function($){this.next=$}
1841,enumerable:!1,configurable:!0}),Node.prototype.cloneNode=function($){return void 0===$&&($=!1),cloneNode(this,$)},Node}();et.Node=el;var eu=function($){function DataNode(et){var en=$.call(this)||this;return en.data=et,en}return ei(DataNode,$),Object.defineProperty(DataNode.prototype,"nodeValue",{get:function(){return this.data},set:function($){this.data=$},enumerable:!1,configurable:!0}),DataNode}(el);et.DataNode=eu;var ed=function($){function Text(){var et=null!==$&&$.apply(this,arguments)||this;return et.type=es.ElementType.Text,et}return ei(Text,$),Object.defineProperty(Text.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Text}(eu);et.Text=ed;var eh=function($){function Comment(){var et=null!==$&&$.apply(this,arguments)||this;return et.type=es.ElementType.Comment,et}return ei(Comment,$),Object.defineProperty(Comment.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Comment}(eu);et.Comment=eh;var ep=function($){function ProcessingInstruction(et,en){var er=$.call(this,en)||this;return er.name=et,er.type=es.ElementType.Directive,er}return ei(ProcessingInstruction,$),Object.defineProperty(ProcessingInstruction.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),ProcessingInstruction}(eu);et.ProcessingInstruction=ep;var em=function($){function NodeWithChildren(et){var en=$.call(this)||this;return en.children=et,en}return ei(NodeWithChildren,$),Object.defineProperty(NodeWithChildren.prototype,"firstChild",{get:function(){var $;return null!==($=this.children[0])&&void 0!==$?$:null},enumerable:!1,configurable:!0}),Object.defineProperty(NodeWithChildren.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(NodeWithChildren.prototype,"childNodes",{get:function(){return this.children},set:function($){this.children=$},enumerable:!1,configurable:!0}),NodeWithChildren}(el);et.NodeWithChildren=em;var ef=function($){function CDATA(){var et=null!==$&&$.apply(this,arguments)||this;return et.type=es.ElementType.CDATA,et}return ei(CDATA,$),Object.defineProperty(CDATA.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),CDATA}(em);et.CDATA=ef;var eg=function($){function Document(){var et=null!==$&&$.apply(this,arguments)||this;return et.type=es.ElementType.Root,et}return ei(Document,$),Object.defineProperty(Document.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Document}(em);et.Document=eg;var ey=function($){function Element(et,en,er,ei){void 0===er&&(er=[]),void 0===ei&&(ei="script"===et?es.ElementType.Script:"style"===et?es.ElementType.Style:es.ElementType.Tag);var eo=$.call(this,er)||this;return eo.name=et,eo.attribs=en,eo.type=ei,eo}return ei(Element,$),Object.defineProperty(Element.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(Element.prototype,"tagName",{get:function(){return this.name},set:function($){this.name=$},enumerable:!1,configurable:!0}),Object.defineProperty(Element.prototype,"attributes",{get:function(){var $=this;return Object.keys(this.attribs).map(function(et){var en,er;return{name:et,value:$.attribs[et],namespace:null===(en=$["x-attribsNamespace"])||void 0===en?void 0:en[et],prefix:null===(er=$["x-attribsPrefix"])||void 0===er?void 0:er[et]}})},enumerable:!1,configurable:!0}),Element}(em);function isTag($){return(0,es.isTag)($)}function isCDATA($){return $.type===es.ElementType.CDATA}function isText($){return $.type===es.ElementType.Text}function isComment($){return $.type===es.ElementType.Comment}function isDirective($){return $.type===es.ElementType.Directive}function isDocument($){return $.type===es.ElementType.Root}function cloneNode($,et){if(void 0===et&&(et=!1),isText($))en=new ed($.data);else if(isComment($))en=new eh($.data);else if(isTag($)){var en,er=et?cloneChildren($.children):[],ei=new ey($.name,eo({},$.attribs),er);er.forEach(function($){return $.parent=ei}),null!=$.namespace&&(ei.namespace=$.namespace),$["x-attribsNamespace"]&&(ei["x-attribsNamespace"]=eo({},$["x-attribsNamespace"])),$["x-attribsPrefix"]&&(ei["x-attribsPrefix"]=eo({},$["x-attribsPrefix"])),en=ei}else if(isCDATA($)){var er=et?cloneChildren($.children):[],es=new ef(er);er.forEach(function($){return $.parent=es}),en=es}else if(isDocument($)){var er=et?cloneChildren($.children):[],el=new eg(er);er.forEach(function($){return $.parent=el}),$["x-mode"]&&(el["x-mode"]=$["x-mode"]),en=el}else if(isDirective($)){var eu=new ep($.name,$.data);null!=$["x-name"]&&(eu["x-name"]=$["x-name"],eu["x-publicId"]=$["x-publicId"],eu["x-systemId"]=$["x-systemId"]),en=eu}else throw Error("Not implemented yet: ".concat($.type));return en.startIndex=$.startIndex,en.endIndex=$.endIndex,null!=$.sourceCodeLocation&&(en.sourceCodeLocation=$.sourceCodeLocation),en}function cloneChildren($){for(var et=$.map(function($){return cloneNode($,!0)}),en=1;en<et.length;en++)et[en].prev=et[en-1],et[en-1].next=et[en];return et}et.Element=ey,et.isTag=isTag,et.isCDATA=isCDATA,et.isText=isText,et.isComment=isComment,et.isDirective=isDirective,et.isDocument=isDocument,et.hasChildren=function($){return Object.prototype.hasOwnProperty.call($,"children")},et.cloneNode=cloneNode},89762:function($){$.exports=(function e($,et,en){function s(ei,eo){if(!et[ei]){if(!$[ei]){if(er)return er(ei,!0);var es=Error("Cannot find module '"+ei+"'");throw es.code="MODULE_NOT_FOUND",es}
1841var el=et[ei]={exports:{}};$[ei][0].call(el.exports,function(et){return s($[ei][1][et]||et)},el,el.exports,e,$,et,en)}return et[ei].exports}for(var er=void 0,ei=0;ei<en.length;ei++)s(en[ei]);return s})({1:[function($,et,en){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction($){return"function"==typeof $}function isObject($){return"object"==typeof $&&null!==$}et.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function($){if("number"!=typeof $||$<0||isNaN($))throw TypeError("n must be a positive number");return this._maxListeners=$,this},EventEmitter.prototype.emit=function($){if(this._events||(this._events={}),"error"===$&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(et=arguments[1],et instanceof Error)throw et;var et,en,er,ei,eo,es,el,eu=Error('Uncaught, unspecified "error" event. ('+et+")");throw eu.context=et,eu}if(void 0===(en=this._events[$]))return!1;if(isFunction(en))switch(arguments.length){case 1:en.call(this);break;case 2:en.call(this,arguments[1]);break;case 3:en.call(this,arguments[1],arguments[2]);break;default:ei=Array.prototype.slice.call(arguments,1),en.apply(this,ei)}else if(isObject(en))for(eo=0,ei=Array.prototype.slice.call(arguments,1),er=(es=en.slice()).length;eo<er;eo++)es[eo].apply(this,ei);return!0},EventEmitter.prototype.addListener=function($,et){var en,er;if(!isFunction(et))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",$,isFunction(et.listener)?et.listener:et),this._events[$]?isObject(this._events[$])?this._events[$].push(et):this._events[$]=[this._events[$],et]:this._events[$]=et,isObject(this._events[$])&&!this._events[$].warned&&(en=void 0===this._maxListeners?EventEmitter.defaultMaxListeners:this._maxListeners)&&en>0&&this._events[$].length>en&&(this._events[$].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[$].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function($,et){if(!isFunction(et))throw TypeError("listener must be a function");var en=!1;function g(){this.removeListener($,g),en||(en=!0,et.apply(this,arguments))}return g.listener=et,this.on($,g),this},EventEmitter.prototype.removeListener=function($,et){var en,er,ei,eo;if(!isFunction(et))throw TypeError("listener must be a function");if(!this._events||!this._events[$])return this;if(ei=(en=this._events[$]).length,er=-1,en===et||isFunction(en.listener)&&en.listener===et)delete this._events[$],this._events.removeListener&&this.emit("removeListener",$,et);else if(isObject(en)){for(eo=ei;eo-- >0;)if(en[eo]===et||en[eo].listener&&en[eo].listener===et){er=eo;break}if(er<0)return this;1===en.length?(en.length=0,delete this._events[$]):en.splice(er,1),this._events.removeListener&&this.emit("removeListener",$,et)}return this},EventEmitter.prototype.removeAllListeners=function($){var et,en;if(!this._events)return this;if(!this._events.removeListener)return 0==arguments.length?this._events={}:this._events[$]&&delete this._events[$],this;if(0==arguments.length){for(et in this._events)"removeListener"!==et&&this.removeAllListeners(et);return this.removeAllListeners("removeListener"),this._events={},this}if(isFunction(en=this._events[$]))this.removeListener($,en);else if(en)for(;en.length;)this.removeListener($,en[en.length-1]);return delete this._events[$],this},EventEmitter.prototype.listeners=function($){return this._events&&this._events[$]?isFunction(this._events[$])?[this._events[$]]:this._events[$].slice():[]},EventEmitter.prototype.listenerCount=function($){if(this._events){var et=this._events[$];if(isFunction(et))return 1;if(et)return et.length}return 0},EventEmitter.listenerCount=function($,et){return $.listenerCount(et)}},{}],2:[function($,et,en){var er,ei,eo,es,el;el=navigator.userAgent.toLowerCase(),es=navigator.platform.toLowerCase(),eo="ie"===(er=el.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0])[1]&&document.documentMode,(ei={name:"version"===er[1]?er[3]:er[1],version:eo||parseFloat("opera"===er[1]&&er[4]?er[4]:er[2]),platform:{name:el.match(/ip(?:ad|od|hone)/)?"ios":(el.match(/(?:webos|android)/)||es.match(/mac|win|linux/)||["other"])[0]}})[ei.name]=!0,ei[ei.name+parseInt(ei.version,10)]=!0,ei.platform[ei.platform.name]=!0,et.exports=ei},{}],3:[function($,et,en){var er,ei,eo,extend=function($,et){for(var en in et)es.call(et,en)&&($[en]=et[en]);function ctor(){this.constructor=$}return ctor.prototype=et.prototype,$.prototype=new ctor,$.__super__=et.prototype,$},es={}.hasOwnProperty,el=[].indexOf||function($){for(var et=0,en=this.length;et<en;et++)if(et in this&&this[et]===$)return et;return -1},eu=[].slice;er=$("events").EventEmitter,eo=$("./browser.coffee"),ei=function($){var et,en;function GIF($){var en,er,ei;for(er in this.running=!1,this.options={},this.frames=[],this.freeWorkers=[],this.activeWorkers=[],this.setOptions($),et)ei=et[er],null==(en=this.options)[er]&&(en[er]=ei)}return extend(GIF,$),et={workerScript:"gif.worker.js",workers:2,repeat:0,background:"#fff",quality:10,width:null,height:null,transparent:null,debug:!1,dither:!1},en={delay:500,copy:!1},GIF.prototype.setOption=function($,et){if(this.options[$]=et,null!=this._canvas&&("width"===$||"height"===$))return this._canvas[$]=et},GIF.prototype.setOptions=function($){var et,en,er;for(et in en=[],$)es.call($,et)&&(er=$[et],en.push(this.setOption(et,er)));return en},GIF.prototype.addFrame=function($,et){var er,ei;for(ei in null==et&&(et={}),(er={}).transparent=this.options.transparent,en)er[ei]=et[ei]||en[ei];if(null==this.options.width&&this.setOption("width",$.width),null==this.options.height&&this.setOption("height",$.height),"undefined"!=typeof ImageData&&null!==ImageData&&$ instanceof ImageData)er.data=$.data;else if("undefined"!=typeof CanvasRenderingContext2D&&null!==CanvasRenderingContext2D&&$ instanceof CanvasRenderingContext2D||"undefined"!=typeof WebGLRenderingContext&&null!==WebGLRenderingContext&&$ instanceof WebGLRenderingContext)et.copy?er.data=this.getContextData($):er.context=$;else if(null!=$.childNodes)et.copy?er.data=this.getImageData($):er.image=$;else throw Error("Invalid image");return this.frames.push(er)},GIF.prototype.render=function(){var $,et;if(this.running)throw Error("Already running");if(null==this.options.width||null==this.options.height)throw Error("Width and height must be set prior to rendering");if(this.running=!0,this.nextFrame=0,this.finishedFrames=0,this.imageParts=(function(){var $,et,en;for(en=[],$=0,et=this.frames.length;0<=et?$<et:$>et;0<=et?++$:--$)en.push(null);return en}).call(this),et=this.spawnWorkers(),!0===this.options.globalPalette)this.renderNextFrame();else for($=0;0<=et?$<et:$>et;0<=et?++$:--$)this.renderNextFrame();
1841return this.emit("start"),this.emit("progress",0)},GIF.prototype.abort=function(){for(var $;null!=($=this.activeWorkers.shift());)this.log("killing active worker"),$.terminate();return this.running=!1,this.emit("abort")},GIF.prototype.spawnWorkers=function(){var $,et,en,er;return $=Math.min(this.options.workers,this.frames.length),(function(){en=[];for(var er=et=this.freeWorkers.length;et<=$?er<$:er>$;et<=$?er++:er--)en.push(er);return en}).apply(this).forEach((er=this,function($){var et;return er.log("spawning worker "+$),(et=new Worker(er.options.workerScript)).onmessage=function($){return er.activeWorkers.splice(er.activeWorkers.indexOf(et),1),er.freeWorkers.push(et),er.frameFinished($.data)},er.freeWorkers.push(et)})),$},GIF.prototype.frameFinished=function($){var et,en;if(this.log("frame "+$.index+" finished - "+this.activeWorkers.length+" active"),this.finishedFrames++,this.emit("progress",this.finishedFrames/this.frames.length),this.imageParts[$.index]=$,!0===this.options.globalPalette&&(this.options.globalPalette=$.globalPalette,this.log("global palette analyzed"),this.frames.length>2))for(et=1,en=this.freeWorkers.length;1<=en?et<en:et>en;1<=en?++et:--et)this.renderNextFrame();return el.call(this.imageParts,null)>=0?this.renderNextFrame():this.finishRendering()},GIF.prototype.finishRendering=function(){var $,et,en,er,ei,eo,es,el,eu,ed,eh,ep,em,ef,eg,ey;for(ei=0,el=0,eu=(ef=this.imageParts).length;ei<eu;ei++)el+=((et=ef[ei]).data.length-1)*et.pageSize+et.cursor;for(el+=et.pageSize-et.cursor,this.log("rendering finished - filesize "+Math.round(el/1e3)+"kb"),$=new Uint8Array(el),ep=0,eo=0,ed=(eg=this.imageParts).length;eo<ed;eo++)for(ey=(et=eg[eo]).data,en=es=0,eh=ey.length;es<eh;en=++es)em=ey[en],$.set(em,ep),en===et.data.length-1?ep+=et.cursor:ep+=et.pageSize;return er=new Blob([$],{type:"image/gif"}),this.emit("finished",er,$)},GIF.prototype.renderNextFrame=function(){var $,et,en;if(0===this.freeWorkers.length)throw Error("No free workers");if(!(this.nextFrame>=this.frames.length))return $=this.frames[this.nextFrame++],en=this.freeWorkers.shift(),et=this.getTask($),this.log("starting frame "+(et.index+1)+" of "+this.frames.length),this.activeWorkers.push(en),en.postMessage(et)},GIF.prototype.getContextData=function($){return $.getImageData(0,0,this.options.width,this.options.height).data},GIF.prototype.getImageData=function($){var et;return null==this._canvas&&(this._canvas=document.createElement("canvas"),this._canvas.width=this.options.width,this._canvas.height=this.options.height),(et=this._canvas.getContext("2d")).setFill=this.options.background,et.fillRect(0,0,this.options.width,this.options.height),et.drawImage($,0,0),this.getContextData(et)},GIF.prototype.getTask=function($){var et,en;if(en={index:et=this.frames.indexOf($),last:et===this.frames.length-1,delay:$.delay,transparent:$.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:"chrome"===eo.name},null!=$.data)en.data=$.data;else if(null!=$.context)en.data=this.getContextData($.context);else if(null!=$.image)en.data=this.getImageData($.image);else throw Error("Invalid frame");return en},GIF.prototype.log=function(){var $;if($=1<=arguments.length?eu.call(arguments,0):[],this.options.debug)return console.log.apply(console,$)},GIF}(er),et.exports=ei},{"./browser.coffee":2,events:1}]},{},[3])(3)},8679:function($,et,en){"use strict";var er=en(59864),ei={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eo={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},es={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},el={};function getStatics($){return er.isMemo($)?es:el[$.$$typeof]||ei}el[er.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},el[er.Memo]=es;var eu=Object.defineProperty,ed=Object.getOwnPropertyNames,eh=Object.getOwnPropertySymbols,ep=Object.getOwnPropertyDescriptor,em=Object.getPrototypeOf,ef=Object.prototype;
1841$.exports=function hoistNonReactStatics($,et,en){if("string"!=typeof et){if(ef){var er=em(et);er&&er!==ef&&hoistNonReactStatics($,er,en)}var ei=ed(et);eh&&(ei=ei.concat(eh(et)));for(var es=getStatics($),el=getStatics(et),eg=0;eg<ei.length;++eg){var ey=ei[eg];if(!eo[ey]&&!(en&&en[ey])&&!(el&&el[ey])&&!(es&&es[ey])){var ev=ep(et,ey);try{eu($,ey,ev)}catch($){}}}}return $}},60885:function($,et){et.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},38276:function($){var et,en="html",er="head",ei="body",eo=/<([a-zA-Z]+[0-9]?)/,es=/<head[^]*>/i,el=/<body[^]*>/i,parseFromDocument=function(){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},parseFromString=function(){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},eu="object"==typeof window&&window.DOMParser;if("function"==typeof eu){var ed=new eu;parseFromDocument=parseFromString=function($,et){return et&&($="<"+et+">"+$+"</"+et+">"),ed.parseFromString($,"text/html")}}if("object"==typeof document&&document.implementation){var eh=document.implementation.createHTMLDocument();parseFromDocument=function($,et){return et?eh.documentElement.querySelector(et).innerHTML=$:eh.documentElement.innerHTML=$,eh}}var ep="object"==typeof document?document.createElement("template"):{};ep.content&&(et=function($){return ep.innerHTML=$,ep.content.childNodes}),$.exports=function($){var eu,ed,eh,ep,em=$.match(eo);switch(em&&em[1]&&(eu=em[1].toLowerCase()),eu){case en:return ed=parseFromString($),!es.test($)&&(eh=ed.querySelector(er))&&eh.parentNode.removeChild(eh),!el.test($)&&(eh=ed.querySelector(ei))&&eh.parentNode.removeChild(eh),ed.querySelectorAll(en);case er:case ei:if(ep=(ed=parseFromDocument($)).querySelectorAll(eu),el.test($)&&es.test($))return ep[0].parentNode.childNodes;return ep;default:if(et)return et($);return(eh=parseFromDocument($,ei).querySelector(ei)).childNodes}}},14152:function($,et,en){var er=en(38276),ei=en(1507).formatDOM,eo=/<(![a-zA-Z\s]+)>/;$.exports=function($){if("string"!=typeof $)throw TypeError("First argument must be a string");if(""===$)return[];var et,en=$.match(eo);return en&&en[1]&&(et=en[1]),ei(er($),null,et)}},1507:function($,et,en){for(var er,ei=en(47915),eo=en(60885).CASE_SENSITIVE_TAG_NAMES,es=ei.Comment,el=ei.Element,eu=ei.ProcessingInstruction,ed=ei.Text,eh={},ep=0,em=eo.length;ep<em;ep++)eh[(er=eo[ep]).toLowerCase()]=er;function formatAttributes($){for(var et,en={},er=0,ei=$.length;er<ei;er++)en[(et=$[er]).name]=et.value;return en}et.formatAttributes=formatAttributes,et.formatDOM=function formatDOM($,et,en){et=et||null;for(var er=[],ei=0,eo=$.length;ei<eo;ei++){var ep,em,ef,eg=$[ei];switch(eg.nodeType){case 1:em=eh[ep=(ep=eg.nodeName).toLowerCase()]||ep,(ef=new el(em,formatAttributes(eg.attributes))).children=formatDOM("template"===em?eg.content.childNodes:eg.childNodes,ef);break;case 3:ef=new ed(eg.nodeValue);break;case 8:ef=new es(eg.nodeValue);break;default:continue}var ey=er[ei-1]||null;ey&&(ey.next=ef),ef.parent=et,ef.prev=ey,ef.next=null,er.push(ef)}return en&&((ef=new eu(en.substring(0,en.indexOf(" ")).toLowerCase(),en)).next=er[0]||null,ef.parent=et,er.unshift(ef),er[1]&&(er[1].prev=er[0])),er}},30488:function($,et,en){var er=en(47915),ei=en(14152),eo=en(50484),es=en(53670);ei="function"==typeof ei.default?ei.default:ei;var el={lowerCaseAttributeNames:!1};function HTMLReactParser($,et){if("string"!=typeof $)throw TypeError("First argument must be a string");return""===$?[]:es(ei($,(et=et||{}).htmlparser2||el),et)}HTMLReactParser.domToReact=es,HTMLReactParser.htmlToDOM=ei,HTMLReactParser.attributesToProps=eo,HTMLReactParser.Comment=er.Comment,HTMLReactParser.Element=er.Element,HTMLReactParser.ProcessingInstruction=er.ProcessingInstruction,HTMLReactParser.Text=er.Text,$.exports=HTMLReactParser,HTMLReactParser.default=HTMLReactParser},50484:function($,et,en){var er=en(25726),ei=en(74606),eo=["checked","value"],es=["input","select","textarea"],el={reset:!0,submit:!0};function getPropName($){return er.possibleStandardNames[$]}$.exports=function($,et){var en,eu,ed,eh,ep,em={},ef=($=$||{}).type&&el[$.type];for(en in $){if(ed=$[en],er.isCustomAttribute(en)){em[en]=ed;continue}if(eh=getPropName(eu=en.toLowerCase())){switch(ep=er.getPropertyInfo(eh),-1===eo.indexOf(eh)||-1===es.indexOf(et)||ef||(eh=getPropName("default"+eu)),em[eh]=ed,ep&&ep.type){case er.BOOLEAN:em[eh]=!0;break;case er.OVERLOADED_BOOLEAN:""===ed&&(em[eh]=!0)}continue}ei.PRESERVE_CUSTOM_ATTRIBUTES&&(em[en]=ed)}return ei.setStyleProp($.style,em),em}}
1841,53670:function($,et,en){var er=en(67294),ei=en(50484),eo=en(74606),es=eo.setStyleProp,el=eo.canTextBeChildOfNode;$.exports=function domToReact($,et){for(var en,eu,ed,eh,ep,em=(et=et||{}).library||er,ef=em.cloneElement,eg=em.createElement,ey=em.isValidElement,ev=[],ex="function"==typeof et.replace,e_=et.transform||eo.returnFirstArg,ew=et.trim,ek=0,eC=$.length;ek<eC;ek++){if(en=$[ek],ex&&ey(ed=et.replace(en))){eC>1&&(ed=ef(ed,{key:ed.key||ek})),ev.push(e_(ed,en,ek));continue}if("text"===en.type){if((eu=!en.data.trim().length)&&en.parent&&!el(en.parent)||ew&&eu)continue;ev.push(e_(en.data,en,ek));continue}switch(eh=en.attribs,eo.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===en.type&&eo.isCustomComponent(en.name,en.attribs)?es(eh.style,eh):eh&&(eh=ei(eh,en.name)),ep=null,en.type){case"script":case"style":en.children[0]&&(eh.dangerouslySetInnerHTML={__html:en.children[0].data});break;case"tag":"textarea"===en.name&&en.children[0]?eh.defaultValue=en.children[0].data:en.children&&en.children.length&&(ep=domToReact(en.children,et));break;default:continue}eC>1&&(eh.key=ek),ev.push(e_(eg(en.name,eh,ep),en,ek))}return 1===ev.length?ev[0]:ev}},74606:function($,et,en){var er=en(67294),ei=en(41476).default,eo={reactCompat:!0},es=er.version.split(".")[0]>=16,el=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);$.exports={PRESERVE_CUSTOM_ATTRIBUTES:es,invertObject:function($,et){if(!$||"object"!=typeof $)throw TypeError("First argument must be an object");var en,er,ei="function"==typeof et,eo={},es={};for(en in $){if(er=$[en],ei&&(eo=et(en,er))&&2===eo.length){es[eo[0]]=eo[1];continue}"string"==typeof er&&(es[er]=en)}return es},isCustomComponent:function($,et){if(-1===$.indexOf("-"))return et&&"string"==typeof et.is;switch($){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function($,et){if(null!=$)try{et.style=ei($,eo)}catch($){et.style={}}},canTextBeChildOfNode:function($){return!el.has($.name)},elementsWithNoTextChildren:el,returnFirstArg:function($){return $}}},80645:function($,et){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */et.read=function($,et,en,er,ei){var eo,es,el=8*ei-er-1,eu=(1<<el)-1,ed=eu>>1,eh=-7,ep=en?ei-1:0,em=en?-1:1,ef=$[et+ep];for(ep+=em,eo=ef&(1<<-eh)-1,ef>>=-eh,eh+=el;eh>0;eo=256*eo+$[et+ep],ep+=em,eh-=8);for(es=eo&(1<<-eh)-1,eo>>=-eh,eh+=er;eh>0;es=256*es+$[et+ep],ep+=em,eh-=8);if(0===eo)eo=1-ed;else{if(eo===eu)return es?NaN:(ef?-1:1)*(1/0);es+=Math.pow(2,er),eo-=ed}return(ef?-1:1)*es*Math.pow(2,eo-er)},et.write=function($,et,en,er,ei,eo){var es,el,eu,ed=8*eo-ei-1,eh=(1<<ed)-1,ep=eh>>1,em=23===ei?5960464477539062e-23:0,ef=er?0:eo-1,eg=er?1:-1,ey=et<0||0===et&&1/et<0?1:0;for(isNaN(et=Math.abs(et))||et===1/0?(el=isNaN(et)?1:0,es=eh):(es=Math.floor(Math.log(et)/Math.LN2),et*(eu=Math.pow(2,-es))<1&&(es--,eu*=2),es+ep>=1?et+=em/eu:et+=em*Math.pow(2,1-ep),et*eu>=2&&(es++,eu/=2),es+ep>=eh?(el=0,es=eh):es+ep>=1?(el=(et*eu-1)*Math.pow(2,ei),es+=ep):(el=et*Math.pow(2,ep-1)*Math.pow(2,ei),es=0));ei>=8;$[en+ef]=255&el,ef+=eg,el/=256,ei-=8);for(es=es<<ei|el,ed+=ei;ed>0;$[en+ef]=255&es,ef+=eg,es/=256,ed-=8);$[en+ef-eg]|=128*ey}},18139:function($){var et=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,en=/\n/g,er=/^\s*/,ei=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,eo=/^:\s*/,es=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,el=/^[;\s]*/,eu=/^\s+|\s+$/g;function trim($){return $?$.replace(eu,""):""}$.exports=function($,eu){if("string"!=typeof $)throw TypeError("First argument must be a string");if(!$)return[];eu=eu||{};var ed=1,eh=1;function updatePosition($){var et=$.match(en);et&&(ed+=et.length);var er=$.lastIndexOf("\n");eh=~er?$.length-er:eh+$.length}function position(){var $={line:ed,column:eh};return function(et){return et.position=new Position($),match(er),et}}function Position($){this.start=$,this.end={line:ed,column:eh},this.source=eu.source}Position.prototype.content=$;var ep=[];
1841function error(et){var en=Error(eu.source+":"+ed+":"+eh+": "+et);if(en.reason=et,en.filename=eu.source,en.line=ed,en.column=eh,en.source=$,eu.silent)ep.push(en);else throw en}function match(et){var en=et.exec($);if(en){var er=en[0];return updatePosition(er),$=$.slice(er.length),en}}function comments($){var et;for($=$||[];et=comment();)!1!==et&&$.push(et);return $}function comment(){var et=position();if("/"==$.charAt(0)&&"*"==$.charAt(1)){for(var en=2;""!=$.charAt(en)&&("*"!=$.charAt(en)||"/"!=$.charAt(en+1));)++en;if(en+=2,""===$.charAt(en-1))return error("End of comment missing");var er=$.slice(2,en-2);return eh+=2,updatePosition(er),$=$.slice(en),eh+=2,et({type:"comment",comment:er})}}return match(er),function(){var $,en=[];for(comments(en);$=function(){var $=position(),en=match(ei);if(en){if(comment(),!match(eo))return error("property missing ':'");var er=match(es),eu=$({type:"declaration",property:trim(en[0].replace(et,"")),value:er?trim(er[0].replace(et,"")):""});return match(el),eu}}();)!1!==$&&(en.push($),comments(en));return en}()}},91296:function($,et,en){var er=0/0,ei=/^\s+|\s+$/g,eo=/^[-+]0x[0-9a-f]+$/i,es=/^0b[01]+$/i,el=/^0o[0-7]+$/i,eu=parseInt,ed="object"==typeof en.g&&en.g&&en.g.Object===Object&&en.g,eh="object"==typeof self&&self&&self.Object===Object&&self,ep=ed||eh||Function("return this")(),em=Object.prototype.toString,ef=Math.max,eg=Math.min,now=function(){return ep.Date.now()};function isObject($){var et=typeof $;return!!$&&("object"==et||"function"==et)}function toNumber($){if("number"==typeof $)return $;if("symbol"==typeof(et=$)||et&&"object"==typeof et&&"[object Symbol]"==em.call(et))return er;if(isObject($)){var et,en="function"==typeof $.valueOf?$.valueOf():$;$=isObject(en)?en+"":en}if("string"!=typeof $)return 0===$?$:+$;$=$.replace(ei,"");var ed=es.test($);return ed||el.test($)?eu($.slice(2),ed?2:8):eo.test($)?er:+$}$.exports=function($,et,en){var er,ei,eo,es,el,eu,ed=0,eh=!1,ep=!1,em=!0;if("function"!=typeof $)throw TypeError("Expected a function");function invokeFunc(et){var en=er,eo=ei;return er=ei=void 0,ed=et,es=$.apply(eo,en)}function shouldInvoke($){var en=$-eu,er=$-ed;return void 0===eu||en>=et||en<0||ep&&er>=eo}function timerExpired(){var $,en,er,ei=now();if(shouldInvoke(ei))return trailingEdge(ei);el=setTimeout(timerExpired,($=ei-eu,en=ei-ed,er=et-$,ep?eg(er,eo-en):er))}function trailingEdge($){return(el=void 0,em&&er)?invokeFunc($):(er=ei=void 0,es)}function debounced(){var $,en=now(),eo=shouldInvoke(en);if(er=arguments,ei=this,eu=en,eo){if(void 0===el)return ed=$=eu,el=setTimeout(timerExpired,et),eh?invokeFunc($):es;if(ep)return el=setTimeout(timerExpired,et),invokeFunc(eu)}return void 0===el&&(el=setTimeout(timerExpired,et)),es}return et=toNumber(et)||0,isObject(en)&&(eh=!!en.leading,eo=(ep="maxWait"in en)?ef(toNumber(en.maxWait)||0,et):eo,em="trailing"in en?!!en.trailing:em),debounced.cancel=function(){void 0!==el&&clearTimeout(el),ed=0,er=eu=ei=el=void 0},debounced.flush=function(){return void 0===el?es:trailingEdge(now())},debounced}},26961:function($,et,en){var er,ei=function(){var $=String.fromCharCode,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",en="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",er={};function getBaseValue($,et){if(!er[$]){er[$]={};for(var en=0;en<$.length;en++)er[$][$.charAt(en)]=en}return er[$][et]}var ei={compressToBase64:function($){if(null==$)return"";var en=ei._compress($,6,function($){return et.charAt($)});switch(en.length%4){default:case 0:return en;case 1:return en+"===";case 2:return en+"==";case 3:return en+"="}},decompressFromBase64:function($){return null==$?"":""==$?null:ei._decompress($.length,32,function(en){return getBaseValue(et,$.charAt(en))})},compressToUTF16:function(et){return null==et?"":ei._compress(et,15,function(et){return $(et+32)})+" "},decompressFromUTF16:function($){return null==$?"":""==$?null:ei._decompress($.length,16384,function(et){return $.charCodeAt(et)-32})},compressToUint8Array:function($){for(var et=ei.compress($),en=new Uint8Array(2*et.length),er=0,eo=et.length;er<eo;er++){var es=et.charCodeAt(er);en[2*er]=es>>>8,en[2*er+1]=es%256}return en},decompressFromUint8Array:function(et){if(null==et)return ei.decompress(et);for(var en=Array(et.length/2),er=0,eo=en.length;er<eo;er++)en[er]=256*et[2*er]+et[2*er+1];var es=[];
1841return en.forEach(function(et){es.push($(et))}),ei.decompress(es.join(""))},compressToEncodedURIComponent:function($){return null==$?"":ei._compress($,6,function($){return en.charAt($)})},decompressFromEncodedURIComponent:function($){return null==$?"":""==$?null:($=$.replace(/ /g,"+"),ei._decompress($.length,32,function(et){return getBaseValue(en,$.charAt(et))}))},compress:function(et){return ei._compress(et,16,function(et){return $(et)})},_compress:function($,et,en){if(null==$)return"";var er,ei,eo,es={},el={},eu="",ed="",eh="",ep=2,em=3,ef=2,eg=[],ey=0,ev=0;for(eo=0;eo<$.length;eo+=1)if(eu=$.charAt(eo),Object.prototype.hasOwnProperty.call(es,eu)||(es[eu]=em++,el[eu]=!0),ed=eh+eu,Object.prototype.hasOwnProperty.call(es,ed))eh=ed;else{if(Object.prototype.hasOwnProperty.call(el,eh)){if(256>eh.charCodeAt(0)){for(er=0;er<ef;er++)ey<<=1,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++;for(er=0,ei=eh.charCodeAt(0);er<8;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1}else{for(er=0,ei=1;er<ef;er++)ey=ey<<1|ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei=0;for(er=0,ei=eh.charCodeAt(0);er<16;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1}0==--ep&&(ep=Math.pow(2,ef),ef++),delete el[eh]}else for(er=0,ei=es[eh];er<ef;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1;0==--ep&&(ep=Math.pow(2,ef),ef++),es[ed]=em++,eh=String(eu)}if(""!==eh){if(Object.prototype.hasOwnProperty.call(el,eh)){if(256>eh.charCodeAt(0)){for(er=0;er<ef;er++)ey<<=1,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++;for(er=0,ei=eh.charCodeAt(0);er<8;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1}else{for(er=0,ei=1;er<ef;er++)ey=ey<<1|ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei=0;for(er=0,ei=eh.charCodeAt(0);er<16;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1}0==--ep&&(ep=Math.pow(2,ef),ef++),delete el[eh]}else for(er=0,ei=es[eh];er<ef;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1;0==--ep&&(ep=Math.pow(2,ef),ef++)}for(er=0,ei=2;er<ef;er++)ey=ey<<1|1&ei,ev==et-1?(ev=0,eg.push(en(ey)),ey=0):ev++,ei>>=1;for(;;){if(ey<<=1,ev==et-1){eg.push(en(ey));break}ev++}return eg.join("")},decompress:function($){return null==$?"":""==$?null:ei._decompress($.length,32768,function(et){return $.charCodeAt(et)})},_decompress:function(et,en,er){var ei,eo,es,el,eu,ed,eh,ep=[],em=4,ef=4,eg=3,ey="",ev=[],ex={val:er(0),position:en,index:1};for(ei=0;ei<3;ei+=1)ep[ei]=ei;for(es=0,eu=4,ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;switch(es){case 0:for(es=0,eu=256,ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;eh=$(es);break;case 1:for(es=0,eu=65536,ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;eh=$(es);break;case 2:return""}for(ep[3]=eh,eo=eh,ev.push(eh);;){if(ex.index>et)return"";for(es=0,eu=Math.pow(2,eg),ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;switch(eh=es){case 0:for(es=0,eu=256,ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;ep[ef++]=$(es),eh=ef-1,em--;break;case 1:for(es=0,eu=65536,ed=1;ed!=eu;)el=ex.val&ex.position,ex.position>>=1,0==ex.position&&(ex.position=en,ex.val=er(ex.index++)),es|=(el>0?1:0)*ed,ed<<=1;ep[ef++]=$(es),eh=ef-1,em--;break;case 2:return ev.join("")}if(0==em&&(em=Math.pow(2,eg),eg++),ep[eh])ey=ep[eh];else{if(eh!==ef)return null;ey=eo+eo.charAt(0)}ev.push(ey),ep[ef++]=eo+ey.charAt(0),em--,eo=ey,0==em&&(em=Math.pow(2,eg),eg++)}}};return ei}();void 0!==(er=(function(){return ei}).call(et,en,et,$))&&($.exports=er)},28858:function($,et,en){"use strict";en.d(et,{KV:function(){return createWrapper},ju:function(){return el}});var er,ei=en(67294),eo=en(9473),es=en(11163),__assign=function(){return(__assign=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)}
1841,__awaiter=function($,et,en,er){return new(en||(en=Promise))(function(ei,eo){function fulfilled($){try{step(er.next($))}catch($){eo($)}}function rejected($){try{step(er.throw($))}catch($){eo($)}}function step($){var et;$.done?ei($.value):((et=$.value)instanceof en?et:new en(function($){$(et)})).then(fulfilled,rejected)}step((er=er.apply($,et||[])).next())})},__generator=function($,et){var en,er,ei,eo,es={label:0,sent:function(){if(1&ei[0])throw ei[1];return ei[1]},trys:[],ops:[]};return eo={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(eo[Symbol.iterator]=function(){return this}),eo;function verb(eo){return function(el){return function(eo){if(en)throw TypeError("Generator is already executing.");for(;es;)try{if(en=1,er&&(ei=2&eo[0]?er.return:eo[0]?er.throw||((ei=er.return)&&ei.call(er),0):er.next)&&!(ei=ei.call(er,eo[1])).done)return ei;switch(er=0,ei&&(eo=[2&eo[0],ei.value]),eo[0]){case 0:case 1:ei=eo;break;case 4:return es.label++,{value:eo[1],done:!1};case 5:es.label++,er=eo[1],eo=[0];continue;case 7:eo=es.ops.pop(),es.trys.pop();continue;default:if(!(ei=(ei=es.trys).length>0&&ei[ei.length-1])&&(6===eo[0]||2===eo[0])){es=0;continue}if(3===eo[0]&&(!ei||eo[1]>ei[0]&&eo[1]<ei[3])){es.label=eo[1];break}if(6===eo[0]&&es.label<ei[1]){es.label=ei[1],ei=eo;break}if(ei&&es.label<ei[2]){es.label=ei[2],es.ops.push(eo);break}ei[2]&&es.ops.pop(),es.trys.pop();continue}eo=et.call($,es)}catch($){eo=[6,$],er=0}finally{en=ei=0}if(5&eo[0])throw eo[1];return{value:eo[0]?eo[1]:void 0,done:!0}}([eo,el])}}},__rest=function($,et){var en={};for(var er in $)Object.prototype.hasOwnProperty.call($,er)&&0>et.indexOf(er)&&(en[er]=$[er]);if(null!=$&&"function"==typeof Object.getOwnPropertySymbols)for(var ei=0,er=Object.getOwnPropertySymbols($);ei<er.length;ei++)0>et.indexOf(er[ei])&&Object.prototype.propertyIsEnumerable.call($,er[ei])&&(en[er[ei]]=$[er[ei]]);return en},el="__NEXT_REDUX_WRAPPER_HYDRATE__",getIsServer=function(){return"undefined"==typeof window},getDeserializedState=function($,et){var en=(void 0===et?{}:et).deserializeState;return en?en($):$},getSerializedState=function($,et){var en=(void 0===et?{}:et).serializeState;return en?en($):$},initStore=function($){var et,en=$.makeStore,ei=$.context,eo=void 0===ei?{}:ei,createStore=function(){return en(eo)};if(getIsServer()){var es=(null==eo?void 0:eo.req)||(null===(et=null==eo?void 0:eo.ctx)||void 0===et?void 0:et.req);return es?(es.__nextReduxWrapperStore||(es.__nextReduxWrapperStore=createStore()),es.__nextReduxWrapperStore):createStore()}return er||(er=createStore()),er},createWrapper=function($,et){void 0===et&&(et={});var makeProps=function(en){var er=en.callback,ei=en.context,eo=en.addStoreToContext,es=void 0!==eo&&eo;return __awaiter(void 0,void 0,void 0,function(){var en,eo,el,eu,ed;return __generator(this,function(eh){switch(eh.label){case 0:if(en=initStore({context:ei,makeStore:$}),et.debug&&console.log("1. getProps created store with state",en.getState()),es&&(ei.ctx?ei.ctx.store=en:ei.store=en),!(eu=eo=er&&er(en)))return[3,2];return[4,eo(ei)];case 1:eu=eh.sent(),eh.label=2;case 2:return el=eu||{},et.debug&&console.log("3. getProps after dispatches has store state",en.getState()),ed=en.getState(),[2,{initialProps:el,initialState:getIsServer()?getSerializedState(ed,et):ed}]}})})},getStaticProps=function($){return function(et){return __awaiter(void 0,void 0,void 0,function(){var en,er,ei;return __generator(this,function(eo){switch(eo.label){case 0:return[4,makeProps({callback:$,context:et})];case 1:return er=(en=eo.sent()).initialProps,ei=en.initialState,[2,__assign(__assign({},er),{props:__assign(__assign({},er.props),{initialState:ei})})]}})})}},hydrate=function($,en){en&&$.dispatch({type:el,payload:getDeserializedState(en,et)})},hydrateOrchestrator=function($,et,en,er,ei){var eo;en?(hydrate($,et),hydrate($,en)):(er||ei||et)&&hydrate($,null!==(eo=null!=er?er:ei)&&void 0!==eo?eo:et)},useHybridHydrate=function($,et,en,er,eo){var el=(0,es.useRouter)().events,eu=(0,ei.useRef)(!0);(0,ei.useEffect)(function(){var handleStart=function(){eu.current=!0};return null==el||el.on("routeChangeStart",handleStart),function(){null==el||el.off("routeChangeStart",handleStart)}},[el]),(0,ei.useMemo)(function(){eu.current&&(hydrateOrchestrator($,et,en,er,eo),eu.current=!1)},[$,et,en,er,eo])},useWrappedStore=function(en,er){void 0===er&&(er="useWrappedStore");var eo,es,el,eu,ed,eh,ep=en.initialState,em=en.initialProps,ef=__rest(en,["initialState","initialProps"]),eg=(null==ef?void 0:ef.__N_SSG)?null===(eo=null==ef?void 0:ef.pageProps)||void 0===eo?void 0:eo.initialState:null,ey=(null==ef?void 0:ef.__N_SSP)?null===(es=null==ef?void 0:ef.pageProps)||void 0===es?void 0:es.initialState:null,ev=eg||ey?null:null!==(eu=null===(el=null==ef?void 0:ef.pageProps)||void 0===el?void 0:el.initialState)&&void 0!==eu?eu:null;et.debug&&console.log("4.",er,"created new store with",{giapState:ep,gspState:eg,gsspState:ey,gippState:ev});var ex=(0,ei.useMemo)(function(){return initStore({makeStore:$})},[]);useHybridHydrate(ex,ep,eg,ey,ev);var e_=ef;return em&&em.pageProps&&(e_.pageProps=__assign(__assign({},em.pageProps),ef.pageProps)),(null===(ed=null==ef?void 0:ef.pageProps)||void 0===ed?void 0:ed.initialState)&&(e_=__assign(__assign({},ef),{pageProps:__assign({},ef.pageProps)}),delete e_.pageProps.initialState),(null===(eh=null==e_?void 0:e_.pageProps)||void 0===eh?void 0:eh.initialProps)&&(e_.pageProps=__assign(__assign({},e_.pageProps),e_.pageProps.initialProps),delete e_.pageProps.initialProps),{store:ex,props:__assign(__assign({},em),e_)}};return{getServerSideProps:function($){return function(et){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(en){switch(en.label){case 0:return[4,getStaticProps($)(et)];case 1:return[2,en.sent()]}})})}},getStaticProps:getStaticProps,getInitialAppProps:function($){return function(et){return __awaiter(void 0,void 0,void 0,function(){var en,er,ei;return __generator(this,function(eo){switch(eo.label){case 0:return[4,makeProps({callback:$,context:et,addStoreToContext:!0})];case 1:return er=(en=eo.sent()).initialProps,ei=en.initialState,[2,__assign(__assign({},er),{initialState:ei})]}})})}},getInitialPageProps:function($){return function(et){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(en){switch(en.label){case 0:if("getState"in et)return[2,$&&$(et)];return[4,makeProps({callback:$,context:et,addStoreToContext:!0})];case 1:return[2,en.sent()]}})})}},withRedux:function($){console.warn("/!\\ You are using legacy implementation. Please update your co
1841de: use createWrapper() and wrapper.useWrappedStore().");var WrappedComponent=function(et){var en=useWrappedStore(et,WrappedComponent.displayName),er=en.store,es=en.props;return ei.createElement(eo.zt,{store:er},ei.createElement($,__assign({},es)))};return WrappedComponent.displayName="withRedux(".concat($.displayName||$.name||"Component",")"),"getInitialProps"in $&&(WrappedComponent.getInitialProps=$.getInitialProps),WrappedComponent},useWrappedStore:useWrappedStore}}},6840:function($,et,en){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return en(72123)}])},41514:function($,et,en){"use strict";function initAmplitude(){}function resetAmplitude(){}function ampIdentifyUser($){let{uid:et,email:en,name:er,club:ei=!1,github_student:eo=!1}=$}function ampTrackUserSignup(){}function ampTrackUserLogin(){}function ampTrackUserLogout(){}function ampTrackOnboarding($){let{eventName:et}=$}function ampChallengeViewed($){let{challengeName:et,courseName:en}=$}function ampTrackAiGeneratedFeedback($){let{eventName:et,generatedResponse:en,uid:er,feedbackResponse:ei="",courseName:eo="",exerciseName:es=""}=$}function ampTrackEvent($){let{eventName:et,properties:en={}}=$}en.d(et,{Bd:function(){return ampTrackUserSignup},Bx:function(){return ampChallengeViewed},C3:function(){return ampTrackEvent},L7:function(){return ampTrackOnboarding},UK:function(){return initAmplitude},ed:function(){return resetAmplitude},h1:function(){return ampTrackUserLogin},mr:function(){return ampTrackUserLogout},t:function(){return ampTrackAiGeneratedFeedback},ur:function(){return ampIdentifyUser}})},50037:function($,et,en){"use strict";en.d(et,{BH:function(){return fbqEvent},DV:function(){return getStoredUtmParamsPublic},ib:function(){return captureUtmParams},ng:function(){return er},ut:function(){return fbqPageView},xd:function(){return clearLocalStoragePreservingAnalytics}});let er="1694850878596759";function fbqPageView(){var $;er&&void 0!==(null===($=window)||void 0===$?void 0:$.fbq)&&window.fbq("track","PageView")}let ei="fbq_utm_params";function captureUtmParams(){let $=new URLSearchParams(window.location.search),et={};for(let en of["utm_campaign","utm_source","fbclid"]){let er=$.get(en);er&&(et[en]=er)}Object.keys(et).length>0&&function($){try{localStorage.setItem(ei,$)}catch(et){document.cookie="".concat(ei,"=").concat(encodeURIComponent($),"; path=/; max-age=31536000; SameSite=Lax")}}(JSON.stringify(et))}function getStoredUtmParams(){try{return JSON.parse(function(){try{let $=localStorage.getItem(ei);if($)return $}catch($){}let $=document.cookie.match(new RegExp("(?:^|; )".concat(ei,"=([^;]*)")));return $?decodeURIComponent($[1]):null}()||"{}")}catch($){return{}}}function fbqEvent($){var et;let en=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};er&&void 0!==(null===(et=window)||void 0===et?void 0:et.fbq)&&window.fbq("track",$,{...getStoredUtmParams(),...en})}function getStoredUtmParamsPublic(){return getStoredUtmParams()}let eo=[ei];function clearLocalStoragePreservingAnalytics(){let $={};for(let et of eo){let en=localStorage.getItem(et);en&&($[et]=en)}for(let[et,en]of(localStorage.clear(),Object.entries($)))localStorage.setItem(et,en)}},23992:function($,et,en){"use strict";en.d(et,{C:function(){return twqConversionTracking},T:function(){return er}});let er="p662d";function twqConversionTracking(){var $;er&&void 0!==(null===($=window)||void 0===$?void 0:$.twq)&&window.twq("event","tw-p662d-p664f",{})}},75659:function($,et,en){"use strict";en.d(et,{ZP:function(){return BotAvatar},ku:function(){return eu},zv:function(){return el}});var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521);function _templateObject(){let $=(0,er._)(["\n img {\n width: 102px;\n height: 102px;\n }\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n position: relative;\n width: 84px;\n height: 84px;\n\n img {\n position: absolute;\n width: 192%;\n height: 192%;\n left: -44%;\n top: -58%;\n max-width: none;\n }\n"]);return _templateObject1=function(){return $},$}let el="/images/brand/bot/bouncingbot.webp",eu="/images/brand/bot/sleepybot.webp",ed={default:el,halloween:"/images/brand/bot/spookybots.webp",winter:"/images/brand/bot/jinglebot.webp",valentines:"/images/brand/bot/valentinesbot.webp"},eh={default:"/images/lumi/lumi-still.webp",idle:"/images/lumi/lumi-idle.webp"},ep=["/images/lumi/lumi-idle.webp","/images/lumi/lumi-levitate.webp"],em=es.default.div.withConfig({componentId:"sc-d8a727e2-0"}
1841)(_templateObject()),ef=es.default.div.withConfig({componentId:"sc-d8a727e2-1"})(_templateObject1());function BotAvatar($){let{alt:et,avatarType:en="codedex",state:er="default",...es}=$,[el,eu]=(0,eo.useState)(ep[0]);if((0,eo.useEffect)(()=>{eu(ep[Math.floor(Math.random()*ep.length)])},[]),"lumi"===en){let $="idle"===er?el:eh[er];return(0,ei.jsx)(ef,{className:"computer-image",children:(0,ei.jsx)("img",{src:$,alt:null!=et?et:"Lumi",...es})})}let eg=ed[function(){let $=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,et=$.getMonth()+1,en=$.getDate();return 12===et?"winter":10===et?"halloween":2===et&&en>=14&&en<=28?"valentines":"default"}()];return(0,ei.jsx)(em,{className:"computer-image",children:(0,ei.jsx)("img",{src:eg,alt:null!=et?et:"Cod\xe9dex Bot Logo",...es})})}},73857:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(47010);function _templateObject(){let $=(0,er._)(["\n all: unset;\n background: none;\n border: none;\n box-sizing: border-box;\n padding: 10px 16px;\n padding-top: 8px;\n height: ",";\n padding-bottom: 12px;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n letter-spacing: 0.03rem;\n cursor:\n url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC)\n 14 0,\n pointer;\n\n a {\n all: unset;\n }\n\n .before {\n perspective: 1000px;\n box-sizing: border-box;\n background: yellow;\n width: 100%;\n height: calc(100% - 4px);\n z-index: 1;\n left: 0px;\n top: 0px;\n padding: 10px 16px;\n border: none;\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 2;\n border-image-width: 4px;\n border-style: solid;\n border-width: 0px;\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='black'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n position: absolute;\n clip-path: polygon(\n 4px 0px,\n 4px 2px,\n 2px 2px,\n 2px 4px,\n 0px 4px,\n 0px calc(100% - 4px),\n 2px calc(100% - 4px),\n 2px calc(100% - 2px),\n 4px calc(100% - 2px),\n 4px 100%,\n calc(100% - 4px) 100%,\n calc(100% - 4px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% 4px,\n calc(100% - 2px) 4px,\n calc(100% - 2px) 2px,\n calc(100% - 4px) 2px,\n calc(100% - 4px) 0px\n );\n transition:\n 0.1s transform,\n 0.1s background;\n\n ","\n }\n\n .after {\n box-sizing: border-box;\n background: orange;\n width: 100%;\n height: calc(100% - 6px);\n z-index: 0;\n left: 0px;\n top: 6px;\n border: none;\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 2;\n border-image-width: 4px;\n border-style: solid;\n border-width: 0px;\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='black'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n position: absolute;\n clip-path: polygon(\n 4px 0px,\n 4px 2px,\n 2px 2px,\n 2px 4px,\n 0px 4px,\n 0px calc(100% - 4px),\n 2px calc(100% - 4px),\n 2px calc(100% - 2px),\n 4px calc(100% - 2px),\n 4px 100%,\n calc(100% - 4px) 100%,\n calc(100% - 4px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% 4px,\n calc(100% - 2px) 4px,\n calc(100% - 2px) 2px,\n calc(100% - 4px) 2px,\n calc(100% - 4px) 0px\n );\n\n ",'\n }\n\n &:active .before {\n transform: translateY(4px);\n }\n\n outline: none;\n &:focus {\n outline: none;\n }\n .btn-content {\n display: inline-block;\n white-space: nowrap;\n transition: 0.1s transform;\n user-select: none;\n color: black;
1841\n font-family: "PixelGridS", sans-serif;\n font-weight: 400;\n font-size: ',"px;\n line-height: 1.4;\n position: relative;\n z-index: 2;\n }\n\n &:active .btn-content {\n transform: translateY(4px);\n transition: 0.1s transform;\n }\n\n ","\n\n ","\n"]);return _templateObject=function(){return $},$}let eu=es.default.button.withConfig({componentId:"sc-e0418d4-0"})(_templateObject(),$=>{let{size:et}=$;return"small"===et?"42px":"50px"},$=>{let{variant:et,theme:en,lightModeOnly:er}=$;switch(et){case"blue":return"\n background: ".concat(en.colors.palette.blue["500"],";\n border-color: ").concat(en.colors.palette.blue["800"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.blue["800"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"yellow":return"\n background: ".concat(en.colors.palette.yellow["400"],";\n border-color: ").concat(en.colors.palette.yellow["700"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.yellow["700"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"green":return"\n background: ".concat(en.colors.palette.green["400"],";\n border-color: ").concat(en.colors.palette.green["700"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.green["700"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"red":return"\n background: ".concat(en.colors.palette.red["500"],";\n border-color: ").concat(en.colors.palette.red["800"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.red["800"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"subtle":return"\n background: ".concat(er?"#FFFFFF":en.colors.semantic.background.grey.primary,";\n border-color: ").concat(en.colors.semantic.border.grey.dark,";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.semantic.border.grey.dark.slice(1),"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ")}},$=>{let{variant:et,theme:en,lightModeOnly:er}=$;switch(et){case"blue":return"\n background: ".concat(en.colors.palette.blue["700"],";\n border-color: ").concat(en.colors.palette.blue["800"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.blue["800"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"yellow":return"\n background: ".concat(en.colors.palette.yellow["600"],";\n border-color: ").concat(en.colors.palette.yellow["700"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.yellow["700"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"green":return"\n background: ".concat(en.colors.palette.green["600"],";\n border-color: ").concat(en.colors.palette.green["700"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.green["700"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"red":return"\n background: ".concat(en.colors.palette.red["700"],";\n border-color: ").concat(en.colors.palette.red["800"],";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.paletteWithoutHash.red["800"],"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ");case"subtle":return"\n background: ".concat(er?en.lightTheme.colors.semantic.border.grey.medium:en.colors.semantic.border.grey.medium,";\n border-image-source: url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23").concat(en.colors.semantic.border.grey.dark.slice(1),"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\");\n ")}},$=>{let{theme:et,size:en}=$;return"small"===en?et.fontSize.m:et.fontSize.l},$=>{let{variant:et,theme:en,lightModeOnly:er}=$;switch(et){case"blue":return"\n &:hover .before {\n background: ".concat(en.colors.palette.blue["400"],";\n }\n\n &:active .before {\n background: ").concat(en.colors.palette.blue["600"],";\n }\n\n &:active .btn-content {\n text-shadow: none;\n }\n\n .btn-content {\n color: white;\n text-shadow: 0 2px 0 ").concat(en.colors.palette.blue["600"],";\n\n svg {\n filter: drop-shadow(0px 2px 0px ").concat(en.colors.palette.blue["600"],");\n }\n }\n ");case"yellow":return"\n &:hover .before {\n background: ".concat(en.colors.palette.yellow["300"],";\n }\n\n &:active .before {\n background: ").concat(en.colors.palette.yellow["500"],";\n }\n &:active .btn-content {\n text-shadow: none;\n }\n .btn-content {\n text-shadow: 0 2px 0 ").concat(en.colors.palette.yellow["500"],";\n\n svg {\n filter: drop-shadow(0px 2px 0px ").concat(en.colors.palette.yellow["500"],");\n }\n }\n ");case"green":return"\n\n &:hover .before {\n background: ".concat(en.colors.palette.green["300"],";\n }\n\n &:active .before {\n background: ").concat(en.colors.palette.green["500"],";\n }\n &:active .btn-content {\n text-shadow: none;\n }\n .btn-content {\n text-shadow: 0 2px 0 ").concat(en.colors.palette.green["500"],";\n svg {\n filter: drop-shadow(0px 2px 0px ").concat(en.colors.palette.green["500"],");\n }\n }\n ");case"red":return"\n\n &:hover .before {\n background: ".concat(en.colors.palette.red["400"],";\n }\n\n &:active .before {\n background: ").concat(en.colors.palette.red["600"],";\n }\n &:active .btn-content {\n text-shadow: none;\n }\n\n .btn-content {\n color: white;\n text-shadow: 0 2px 0 ").concat(en.colors.palette.red["600"],";\n svg {\n filter: drop-shadow(0px 2px 0px ").concat(en.colors.palette.red["500"],");\n }\n }\n ");case"subtle":return"\n &:hover .before {\n background: ".concat(er?en.lightTheme.colors.semantic.background.grey.tertiary:en.colors.semantic.background.grey.tertiary,";\n }\n\n &:active .before {\n background: ").concat(er?en.lightTheme.colors.semantic.border.grey.light:en.colors.semantic.border.grey.light,";\n }\n\n &:active .btn-content {\n text-shadow: none;\n }\n\n .btn-content {\n color: ").concat(er?en.lightTheme.colors.text.primary:en.colors.text.primary,";\n text-shadow: 0 2px 0 ").concat(er?en.lightTheme.colors.border.grey.light:en.colors.border.grey.light,";\n\n svg {\n filter: drop-shadow(0px 2px 0px ").concat(er?en.lightTheme.colors.border.grey:en.colors.border.grey.light,");\n }\n }\n ");default:return""}},$=>{let{disabled:et}=$;if(et)return"\n opacity: 40%;\n pointer-events: none;\n "});et.Z=function($){let{variant:et="blue",size:en="normal",lightModeOnly:er=!1,disabled:es,children:ed,className:eh,isLoading:ep=!1,loadingColor:em,allowDoubleClick:ef
1841=!1,clickDelay:eg=500,onClick:ey,...ev}=$,[ex,e_]=(0,eo.useState)(!1),ew=(0,eo.useRef)(null),ek=(0,eo.useRef)(null),eC=(0,eo.useRef)(0);return(0,eo.useLayoutEffect)(()=>{!ep&&ek.current&&(eC.current=ek.current.offsetWidth)}),(0,eo.useEffect)(()=>()=>{ew.current&&clearTimeout(ew.current)},[]),(0,ei.jsxs)(eu,{disabled:es||ep,size:en,lightModeOnly:er,variant:et,className:"".concat(null!=eh?eh:""," nes-pointer ").concat(es||ep?"disabled":""),onClick:function($){if(es||ep||ex){$.preventDefault();return}ef||(e_(!0),ew.current=setTimeout(()=>{e_(!1)},eg)),null==ey||ey($)},...ev,children:[(0,ei.jsx)("span",{className:"before"}),(0,ei.jsx)("span",{ref:ek,className:"btn-content",style:ep?{minWidth:eC.current,display:"flex",justifyContent:"center"}:void 0,children:ep?(0,ei.jsx)(el.Z,{size:10,color:function(){if(em)return em;switch(et){case"blue":case"red":return"white";default:return"black"}}()}):ed}),(0,ei.jsx)("span",{className:"after"})]})}},33599:function($,et,en){"use strict";en.d(et,{Z:function(){return Confetti}});var er=en(85893),ei=en(67294),eo=en(49155),es=en.n(eo);let el={position:"fixed",pointerEvents:"none",width:"100%",height:"100%",top:0,left:0,zIndex:10};function Confetti($){let{fire:et}=$,en=(0,ei.useRef)(null),eo=(0,ei.useCallback)($=>{en.current=$},[]),eu=(0,ei.useCallback)(($,et)=>{en.current&&en.current({...et,origin:{y:.7},particleCount:Math.floor(200*$)})},[]),ed=(0,ei.useCallback)(()=>{eu(.25,{spread:26,startVelocity:55}),eu(.2,{spread:60}),eu(.35,{spread:100,decay:.91,scalar:.8}),eu(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),eu(.1,{spread:120,startVelocity:45})},[eu]);return(0,ei.useEffect)(function(){!0===et&&ed()},[et,ed]),(0,er.jsx)(es(),{refConfetti:eo,style:el})}},83624:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(80941);function _templateObject(){let $=(0,er._)(["\n padding: 0px !important;\n width: fit-content;\n box-shadow: 10px 7px 5px\n ",";\n border-radius: 10px;\n background-color: ",";\n overflow: ",";\n table {\n margin: ",";\n }\n\n th {\n text-align: center;\n margin: 10px;\n background-color: ",';\n font-family: "Work Sans", sans-serif;\n border: 2px solid ',";\n font-size: 17px;\n padding: 10px;\n border-top-right-radius: 7px;\n border-top-left-radius: 7px;\n min-width: fit-content;\n color: ",' !important;\n line-height: 26px;\n }\n\n td {\n color: #212529;\n font-family: "Work Sans", sans-serif;\n font-size: 17px;\n font-style: normal;\n font-weight: 400;\n line-height: 26px;\n border: 2px solid #212529;\n border: 2px solid ',";\n padding: 7px;\n padding-left: 10px;\n color: "," !important;\n }\n"]);return _templateObject=function(){return $},$}let el=(0,eo.default)(es.Z).withConfig({componentId:"sc-6b6b2253-0"})(_templateObject(),$=>"light"===$.theme.mode?"#b8b8b8":"#0F1524",$=>"light"===$.theme.mode?"":"#1D2332",$=>"light"===$.theme.mode?"":"hidden",$=>"light"===$.theme.mode?"-4px !important":"0px !importnat",$=>"light"===$.theme.mode?"#f9f5fe":"#52A5FF",$=>"light"===$.theme.mode?"black":"#244B71",$=>$.theme.colors.text1,$=>"light"===$.theme.mode?"#212529":"#244C73",$=>$.theme.colors.text1);et.Z=function($){let{children:et}=$;return(0,ei.jsx)(el,{className:"is-rounded",children:et})}},6052:function($,et,en){"use strict";en.d(et,{Z:function(){return atoms_Hint}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(9473),el=en(5434),eu=en(67294);function _templateObject(){let $=(0,er._)(["\n display: flex;\n\n "," {\n flex-flow: column;\n }\n\n "," {\n flex-flow: row;\n justify-content: space-between;\n align-items: center;\n }\n"]);return _templateObject=function(){return $},$}let ed=eo.default.div.withConfig({componentId:"sc-f892aaf4-0"})(_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var eh=en(41664),ep=en.n(eh),em=en(89755),ef=en.n(em),eg=en(609);function ReminderToSignUp_templateObject(){let $=(0,er._)(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n user-select: none;\n margin-left: 26px;\n\n .arrow {\n transform: rotateZ(0deg);\n transition: transform 0.5s;\n margin-left: 1rem;\n }\n\n .arrow.show {\n transform: rotateZ(180deg);\n transition: transform 0.5s;\n }\n"]);
1841return ReminderToSignUp_templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n user-select: none;\n width: 340px;\n\n &.nes-container.is-rounded {\n border-image-repeat: stretch;\n }\n\n position: absolute;\n z-index: 0;\n\n background: white;\n color: black;\n\n display: flex;\n flex-flow: column nowrap;\n gap: 1rem;\n\n &.dark {\n background: #1d2332;\n color: ",';\n border: 2px solid #244c73;\n padding-left: 5px;\n padding-right: 5px;\n padding-bottom: 5px;\n\n div.line {\n background-color: #2e3440;\n margin-bottom: -15px;\n }\n\n p {\n padding-left: 0.5rem;\n }\n }\n\n div.line {\n height: 2px;\n background-color: #d9d9d9;\n }\n\n animation: growY 300ms ease-in-out forwards;\n transform-origin: top center;\n\n @keyframes growY {\n 0% {\n transform: scaleY(0);\n }\n 80% {\n transform: scaleY(1.1);\n }\n 100% {\n transform: scaleY(1);\n }\n }\n\n &.hidden {\n opacity: 0;\n display: none;\n animation: shrinkY 300ms ease-in-out forwards;\n transform-origin: top center;\n\n @keyframes shrinkY {\n 0% {\n transform: scaleY(1);\n }\n\n 80% {\n transform: scaleY(1.1);\n }\n 100% {\n transform: scaleY(0);\n display: none;\n }\n }\n }\n\n a {\n font-family: "Work Sans", sans-serif;\n }\n\n p {\n margin: 0;\n }\n\n '," {\n /* margin-right: 1rem; */\n width: 285px;\n }\n\n "," {\n width: 250px;\n }\n"]);return _templateObject1=function(){return $},$}let ey=eo.default.div.withConfig({componentId:"sc-8ff7612d-0"})(ReminderToSignUp_templateObject()),ev=eo.default.div.withConfig({componentId:"sc-8ff7612d-1"})(_templateObject1(),$=>{let{theme:et}=$;return et.colors.text4},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var molecules_ReminderToSignUp=function(){let $=(0,es.v9)(eg.o4)||"dark",[et,en]=(0,eu.useState)(!1);return(0,ei.jsxs)("div",{style:{position:"relative",marginTop:"2rem"},children:[(0,ei.jsx)("span",{onClick:()=>en(!et),className:"reminder-to-sign-up",style:{fontFamily:"Work Sans, sans-serif"},children:(0,ei.jsxs)(ey,{children:[(0,ei.jsx)(ef(),{src:"/images/alert-info-graphic.png",width:18,height:18,alt:"alert info graphic"}),(0,ei.jsx)("span",{className:"nes-pointer",children:"Progress not saved"}),(0,ei.jsx)("span",{className:"arrow nes-pointer".concat(et?"show":""),children:(0,ei.jsx)("svg",{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ei.jsx)("path",{d:"M1.46289 1.74316L7.15566 7.43593L12.8484 1.74316",stroke:"black",strokeWidth:"1.51807",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),(0,ei.jsxs)(ev,{className:"".concat(et?"":"hidden"," ").concat("dark"===$?"dark":""),children:[(0,ei.jsx)("div",{className:"line"}),(0,ei.jsxs)("p",{children:[(0,ei.jsx)(ep(),{href:"/login",children:"Sign In"})," or ",(0,ei.jsx)(ep(),{href:"/signup",children:"Sign Up"})," in order to save all the hard work you've done!"]})]})]})};function Hint_templateObject(){let $=(0,er._)(["\n ",' {\n /* margin-bottom: -1.3rem; */\n\n .dropdown-arrow {\n transform: rotateZ(0deg);\n transition: transform 0.5s;\n margin-left: 5px;\n transform: scale(1.5);\n }\n .show {\n transform: rotateZ(180deg) scale(1.5);\n transition: transform 0.5s;\n }\n\n summary {\n margin-left: -1.5rem;\n margin-right: -1rem;\n margin-top: 2rem;\n }\n\n .arrow {\n font-weight: 600;\n background-color: #fff7d3;\n color: #414654;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n padding: 8px 24px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n img {\n all: unset !important;\n }\n }\n\n .children {\n font-family: "Work Sans", sans-serif;\n background-color: #fffbe6;\n margin-left: -1.5rem;\n margin-right: -1rem;\n color: #414654;\n padding: 20px 24px;\n transition-duration: 0.3s;\n overflow: hidden;\n /* height: 0px; */\n\n P {\n margin-top: 0px;\n }\n\n code {\n font-family: "Noto Sans Mono", monospace;\n font-size: 1em;\n }\n }\n\n .clicked-hint {\n transition-duration: 0.3s;\n /* height: ',"; */\n }\n }\n\n "," {\n summary {\n margin-right: -1.5rem;\n }\n\n .children {\n margin-right: -1.5rem;\n }\n }\n"]);
1841return Hint_templateObject=function(){return $},$}let ex=eo.default.nav.withConfig({componentId:"sc-e75b1690-0"})(Hint_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{height:et}=$;return"".concat(et,"px")},$=>{let{theme:et}=$;return et.breakpoints.sm});var atoms_Hint=function($){let{children:et}=$,[en,er]=(0,eu.useState)(!1),[eo,eh]=(0,eu.useState)(null),[ep,em]=(0,eu.useState)(!1),ef=(0,es.v9)(eg.ot);return(0,eu.useRef)(null),(0,eu.useEffect)(()=>{en&&document.getElementById("hint-scroll-target").scrollIntoView({behavior:"smooth"})},[en,ep]),(0,eu.useEffect)(()=>{if(en&&null==eo){var $=document.querySelector(".children");let et=null==$?void 0:$.querySelectorAll("img");if(et.length>0){let checkAllImagesLoaded=()=>{let en=Array.from(et).every($=>$.complete);en?(em(!0),eh(null==$?void 0:$.offsetHeight)):setTimeout(checkAllImagesLoaded,100)};checkAllImagesLoaded()}else eh(null==$?void 0:$.offsetHeight)}},[en,eo]),(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(ed,{children:!ef&&(0,ei.jsx)(molecules_ReminderToSignUp,{})}),(0,ei.jsxs)(ex,{height:eo,id:"course-hint-component",children:[(0,ei.jsx)("summary",{children:(0,ei.jsxs)("div",{onClick:()=>er(!en),className:"arrow",children:[(0,ei.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[(0,ei.jsx)("img",{src:"/images/courses/lightbulb.svg",alt:"lightbulb"})," Get a Hint"]}),(0,ei.jsx)(el.Ix0,{className:"dropdown-arrow ".concat(en?"show":"")})]})}),en&&null===eo&&(0,ei.jsx)("div",{className:"children ".concat(en?"clicked-hint":""),children:et}),null!=eo&&(0,ei.jsx)("div",{className:"children",style:{height:en?"".concat(eo,"px"):"0px",paddingTop:en?"20px":"0px",paddingBottom:en?"20px":"0px"},children:et})]})]})}},99281:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(3649),el=en(83782),eu=en(67294),ed=en(609),eh=en(9473);function _templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .input-pixel-border {\n padding: 12px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n\n background-color: ",";\n\n input,\n textarea {\n outline: none;\n border: none;\n background: none;\n padding: 0px;\n margin: 0px;\n box-shadow: none;\n flex: 1;\n\n color: ",';\n font-family: "Mulish", sans-serif;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n\n ::placeholder {\n color: ',";\n }\n }\n }\n\n .input-ghost-wrapper {\n position: relative;\n flex: 1;\n display: flex;\n align-items: center;\n\n input,\n textarea {\n width: 100%;\n position: relative;\n z-index: 1;\n }\n\n .ghost-placeholder {\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n pointer-events: none;\n white-space: pre;\n z-index: 0;\n color: ",';\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n }\n\n .error {\n font-family: "Mulish", sans-serif;\n margin: 0px;\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n }\n']);return _templateObject=function(){return $},$}let ep=eo.default.div.withConfig({componentId:"sc-616e534c-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary});et.Z=function($){let{placeholder:et="Placeholder text",ghostPlaceholder:en=null,type:er="text",error:eo=null,icon:em=null,iconAction:ef=()=>{},value:eg,setValue:ey,autoFocus:ev=!1,rows:ex=null,readOnly:e_=!1,...ew}=$,ek=(0,eh.v9)(ed.o4)||"dark",[eC,eE]=(0,eu.useState)(!1),eI={critical:{borderColor:"F43F5E",textColor:"#9F1239",icon:(0,ei.jsx)(el.Z,{})}},eS=eo&&eI[null==eo?void 0:eo.type],handleFocus=()=>eE(!0),handleBlur=()=>eE(!1),eT=eS?eS.borderColor:eC?"14ADFF":"dark"===ek?"64748B":"94A3B8",eA=ex?(0,ei.jsx)("textarea",{placeholder:en?"":et,rows:ex,onFocus:handleFocus,onBlur:handleBlur,value:eg,onChange:$=>ey($.target.value),autoFocus:ev,...ew}):(0,ei.jsx)("input",{placeholder:en?"":et,type:er,onFocus:handleFocus,onBlur:handleBlur,value:eg,onChange:$=>ey($.target.value),autoFocus:ev,readOnly:e_,...ew});return(0,ei.jsxs)(ep,{className:"dynamic-input",children:[(0,ei.jsxs)(es.Z,{borderColor:eT,className:"input-pixel-border",children:[en?(0,ei.jsxs)("div",{className:"input-ghost-wrapper",children:[eA,(0,ei.jsxs)("span",{className:"ghost-placeholder","aria-hidden":"true",children:[(0,ei.jsx)("span",{className:"ghost-value",children:eg}),(0,ei.jsx)("span",{className:"ghost-suffix",children:en})]})]}):eA,em&&(0,ei.jsx)("span",{onClick:()=>ef(),className:"nes-pointer",children:em})]}),eo&&(0,ei.jsxs)("p",{className:"error",style:{color:eS.textColor},children:[eS.icon,eo.message]})]})}},78590:function($,et,en){"use strict";en.d(et,{Z:function(){return atoms_Logo}});var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(41664),eu=en.n(el),ed=en(9473),eh=en(609),ep=en(11163),em=en(20759),ef=en(88090),eg=en(37009),ey=en(52165),ev=en(26067),ex=en(92614);
1841function _templateObject(){let $=(0,er._)(["\n display: flex;\n align-items: center;\n gap: 12px;\n transition: background 0.1s ease;\n\n .progress-bar {\n width: 180px;\n height: 12px;\n transition: background 0.1s ease;\n }\n\n .percentage {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n }\n']);return _templateObject=function(){return $},$}let e_=es.default.div.withConfig({componentId:"sc-29daa666-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary});var courses_NavCourseProgress=function($){let{courseName:et,chapterName:en,progressFor:er}=$,es=(0,ed.v9)(eh.o4)||"dark",el="dark"===es,[eu,ep]=(0,eo.useState)(0),ew=(0,eo.useRef)(0),{currentIndex:ek,challengeCount:eC}=(0,ev.f)({packName:en,hookFor:er}),eE=(0,ed.v9)((0,ef.DF)({courseName:et,chapterName:en})),eI=(0,ed.v9)((0,eg.Ai)({courseName:et,chapterName:en})),{percentage:eS}=(0,eo.useMemo)(()=>(0,ey.rZ)({internalChapterData:eE,chapterData:eI}),[eE,eI]),eT=(0,ed.v9)((0,ex.cp)({packName:en})),eA=(0,eo.useMemo)(()=>"challenge-pack"===er?eT||0:eS||0,[er,eT,eS]);(0,eo.useEffect)(()=>{let $;let et=null,en=ew.current;return $=requestAnimationFrame(function animate(er){null===et&&(et=er);let ei=er-et,eo=Math.min(ei/500,1),es=en+(eA-en)*eo;ep(0==es?10:es),eo<1?$=requestAnimationFrame(animate):ew.current=eA}),()=>cancelAnimationFrame($)},[eA]);let eP=(0,eo.useMemo)(()=>Math.round(eA),[eA]);return(0,ei.jsxs)(e_,{children:[(0,ei.jsx)(em.Z,{borderColor:el?"64748B":"94A3B8",className:"progress-bar",style:{background:"linear-gradient(to right, #A3E635 ".concat(eu,"%, ").concat(el?"#1E293B":"#F1F5F9"," ").concat(eu,"%)")}}),(0,ei.jsxs)("p",{className:"percentage notranslate",translate:"no",children:[eP,"%"]})]})},ew=en(62286),ek=en.n(ew),icons_SyncIcon=function($){let{color:et="#020617",width:en="25",height:er="24",...eo}=$;return(0,ei.jsxs)("svg",{width:en,height:er,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...eo,children:[(0,ei.jsx)("g",{"clip-path":"url(#clip0_10_2872)",children:(0,ei.jsx)("g",{"clip-path":"url(#clip1_10_2872)",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5601 4H10.5601V6H8.56006V8H4.56006V10H2.56006V12H0.560059V18H2.56006V20H22.5601V18H24.5601V12H22.5601V10H20.5601V8H18.5601V6H16.5601V4ZM16.5601 6V8H18.5601V10V12H20.5601H22.5601V18H2.56006V12H4.56006V10H8.56006V8H10.5601V6H16.5601ZM10.5601 12H8.56006V14H10.5601V16H12.5601V14H14.5601V12H16.5601V10H14.5601V12H12.5601V14H10.5601V12Z",fill:et})})}),(0,ei.jsxs)("defs",{children:[(0,ei.jsx)("clipPath",{id:"clip0_10_2872",children:(0,ei.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.560059)"})}),(0,ei.jsx)("clipPath",{id:"clip1_10_2872",children:(0,ei.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.560059)"})})]})]})},eC=en(39828),eE=en(92369),icons_SyncingIcon=function($){let{color:et="#94A3B8",className:en,width:er="25",height:eo="24",...es}=$;return(0,ei.jsxs)("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:er,height:eo,className:en,...es,children:[(0,ei.jsx)("g",{"clip-path":"url(#clip0_10_3180)",children:(0,ei.jsx)("g",{"clip-path":"url(#clip1_10_3180)",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5605 4H10.5605V6H8.56055V8H4.56055V10H2.56055V12H0.560547V18H2.56055V20H22.5605V18H24.5605V12H22.5605V10H20.5605V8H18.5605V6H16.5605V4ZM18.5605 12H20.5605H22.5605V18H2.56055V12H4.56055V10H8.56055V12H10.5605V10H8.56055V8H10.5605V6H16.5605V8H18.5605V10V12ZM18.5605 12V14H16.5605V12H18.5605Z",fill:et})})}),(0,ei.jsxs)("defs",{children:[(0,ei.jsx)("clipPath",{id:"clip0_10_3180",children:(0,ei.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.560547)"})}),(0,ei.jsx)("clipPath",{id:"clip1_10_3180",children:(0,ei.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.560547)"})})]})]})},eI=en(52069);function UserBuildsTitle_templateObject(){let $=(0,er._)(['\n margin-left: 1rem;\n font-family: "Mulish", sans-serif;\n height: 30px;\n display: flex;\n\n '," {\n .build-title {\n display: none;\n align-items: center;\n gap: 1rem;\n padding-top: 4px;\n\n .my-builds {\n color: ",";\n font-size: 16px;\n font-family: Mulish, sans-serif;\n font-weight: 600;\n }\n\n p {\n display: flex;\n gap: 0.75rem;\n margin: 0px;\n font-size: 17px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n max-width: 100px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: ",";\n\n span:first-child {\n font-size: 17px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n }\n }\n\n .build-value {\n color: ",";\n font-size: 16px;\n font-weight: 800;\n font-family: Mulish, sans-serif;\n }\n\n svg path {\n transition-duration: 0.2s;\n fill: ",";\n }\n\n svg:hover {\n path {\n fill: #4ab2ff;\n transition-duration: 0.2s;\n }\n }\n\n .edit-field {\n all: unset;\n background-color: ",";\n border-radius: 7px;\n height: 30px;\n padding: 0px 10px;\n color: ",";\n font-size: 16px;\n font-weight: 400;\n }\n }\n\n .anon {\n margin-left: 8px;\n display: flex;\n gap: 0;\n padding-top: 0;\n\n .build-value {\n margin-right: 12px;\n }\n\n a {\n display: flex;\n align-items: center;\n\n img {\n height: 24px;\n width: 24px;\n border-radius: 50%;\n border: 1px solid ",";\n margin-right: 5px;\n }\n\n .username {\n color: ",";\n font-size: 16px;\n font-weight: 600;\n line-height: 150%;\n font-family: Mulish, sans-serif;\n }\n }\n }\n }\n\n "," {\n .build-title {\n display: flex;\n p {\n max-width: 450px;\n }\n }\n }\n\n "," {\n .build-title {\n p {\n max-width: 220px;\n }\n }\n\n .edit-title {\n width: 275px;\n }\n }\n\n "," {\n .build-title {\n p {\n max-width: 225px;\n }\n }\n\n .edit-title {\n width: 300px;\n }\n }\n\n "," {\n .build-title {\n p {\n max-width: 350px;\n }\n }\n\n .edit-title {\n width: 450px;\n }\n }\n\n .build-rename {\n position: relative;\n\n .hover-show {\n display: none;\n position: absolute;\n bottom: 0px;\n font-size: 14px;\n color: white;\n background: hsla(215, 19%, 35%, 0.95);\n drop-shadow: 0px 2px 4px hsla(229, 84%, 5%, 0.25);\n height: 34px;\n min-width: 70px;\n left: 15px;\n transform: translateX(-50%);\n left: 50%;\n font-family: Mulish, sans-serif;\n font-weight: 600;\n padding: 0px 10px;\n border-radius: 4px;\n }\n\n &:hover {\n .hover-show {\n display: flex;\n justify-content: center;\n align-items: center;\n transition-duration: 0.5s;\n bottom: -40px;\n }\n }\n }\n\n .saved-icon-container {\n display: flex;
1841\n align-items: center;\n position: relative;\n\n .hover-show {\n display: none;\n position: absolute;\n bottom: 0px;\n font-size: 14px;\n color: white;\n background: hsla(215, 19%, 35%, 0.95);\n drop-shadow: 0px 2px 4px hsla(229, 84%, 5%, 0.25);\n height: 34px;\n min-width: 250px;\n width: 250px;\n left: -20px;\n font-family: Mulish, sans-serif;\n font-weight: 600;\n padding: 0px 10px;\n border-radius: 4px;\n }\n\n &:hover {\n .hover-show {\n display: flex;\n justify-content: center;\n align-items: center;\n transition-duration: 0.5s;\n bottom: -40px;\n }\n }\n }\n"]);return UserBuildsTitle_templateObject=function(){return $},$}let eS=es.default.div.withConfig({componentId:"sc-9580498d-0"})(UserBuildsTitle_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.colors.semantic.text.tertiary},$=>"dark"===$.theme.mode?"rgba(255, 255, 255, 0.87)":"black",$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>"dark"===$.theme.mode?"rgba(255, 255, 255, 0.87)":"black",$=>"dark"===$.theme.mode?$.theme.colors.palette.grey["800"]:$.theme.colors.palette.grey["400"],$=>"dark"==$.theme.mode?$.theme.colors.palette.grey["200"]:$.theme.colors.palette.grey["50"],$=>{let{theme:et}=$;return et.colors.border.grey.dark},$=>{let{theme:et}=$;return et.colors.semantic.text.tertiary},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg},$=>{let{theme:et}=$;return et.breakpoints.xl});var atoms_UserBuildsTitle=function($){let{buildObject:et,username:en}=$;(0,ep.useRouter)();let er=(0,eo.useContext)(es.ThemeContext),el=(0,ed.v9)(eh.f8),em=(0,ed.v9)(eI.he),[ef,eg]=(0,eo.useState)(!1),[ey,ev]=(0,eo.useState)(null);return((0,eo.useEffect)(()=>{let{firestore:$}=(0,eE.UM)(),en=(0,eC.JU)((0,eC.hJ)($,"userBuilds"),et.id),er=(0,eC.cf)(en,$=>{let et=$.data(),en=null==et?void 0:et.updated,er=null==en?void 0:en.toDate(),ei=new Date;er&&(er.getDate()===ei.getDate()?ev("Today at ".concat(er.toLocaleTimeString())):ev("".concat(er.toLocaleDateString()," ").concat(er.toLocaleTimeString())),eg(!0),setTimeout(()=>eg(!1),1500))});return()=>{er()}},[et.id]),et.uid!=el)?(0,ei.jsx)(eS,{children:(0,ei.jsxs)("div",{className:"build-title anon",children:[(0,ei.jsx)("span",{className:"build-value",children:et.title!==et.id&&et.title?et.title:"Untitled Project"}),(0,ei.jsxs)(eu(),{target:"_blank",href:"/@".concat(null==et?void 0:et.username),children:[(0,ei.jsx)("img",{src:null==et?void 0:et.photoURL,alt:"lock"}),(0,ei.jsxs)("span",{className:"username",children:["@",null==et?void 0:et.username]})]})]})}):(0,ei.jsx)(eS,{children:(0,ei.jsxs)("div",{className:"build-title",children:[(0,ei.jsx)("p",{children:(0,ei.jsx)(eu(),{href:"/builds",style:{all:"unset"},children:(0,ei.jsx)("span",{className:"my-builds",children:"My Builds \xa0/ "})})}),(0,ei.jsx)("div",{className:"build-rename",children:(0,ei.jsx)("p",{className:"build-value",children:em===et.id?"Untitled Project":em},"build-value-edit")},"build-value-edit-container-key"),el!==(null==et?void 0:et.uid)||ef?(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsxs)("div",{className:"saved-icon-container",children:[(0,ei.jsx)(icons_SyncingIcon,{className:"icon"}),(0,ei.jsx)("p",{className:"hover-show",children:"Saving progress..."},"saving-progress-key")]},"saving-progress-container-key")}):(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsxs)("div",{className:"saved-icon-container",children:[(0,ei.jsx)(icons_SyncIcon,{className:"icon",color:er.colors.semantic.text.primary}),(0,ei.jsxs)("p",{className:"hover-show",children:["Last saved: ",ey]},"last-saved-key")]},"last-saved-container-key")})]})})},eT=en(45198),eA=en(73845),icons_HamburgerIcon=function($){let{color:et="#64748B",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,ei.jsx)("path",{d:"M20 18H4V16H20V18ZM20 13H4V11H20V13ZM20 8H4V6H20V8Z",fill:"#94A3B8"})})},eP=en(50528),eN=en(77265);
1841function LumiNav_templateObject(){let $=(0,er._)(["\n margin-right: 16px;\n display: flex;\n align-items: center;\n padding: 8px;\n border-radius: 4px;\n transition-duration: 0.2s;\n\n svg {\n path {\n fill: ",";\n }\n }\n\n :hover {\n background: ",";\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n"]);return LumiNav_templateObject=function(){return $},$}let ej=es.default.div.withConfig({componentId:"sc-32f30c25-0"})(LumiNav_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var LumiNav=function(){let $=(0,eA.T)(),et=(0,ed.v9)(eP.tU),{showTooltip:en,hideTooltip:er}=(0,eN.lL)();return(0,ei.jsx)(ej,{className:"nes-pointer",onClick:()=>{var en;return en=!et,void($((0,eP.ZH)(en)),ek().set(null,"lumiHistoryPanel",String(en),{path:"/",maxAge:31536e3}))},onMouseEnter:$=>{et?en("Hide Chat History",$.currentTarget,"bottom-left",{showArrow:!1}):en("See Chat History",$.currentTarget,"bottom-left",{showArrow:!1})},onMouseLeave:er,children:(0,ei.jsx)(icons_HamburgerIcon,{})})};function Logo_templateObject(){let $=(0,er._)(["\n flex-shrink: 0;\n display: flex;\n align-items: center;\n margin: 0;\n margin-left: 0.4rem;\n\n a.global-logo {\n display: flex;\n align-items: center;\n gap: 12px;\n color: ",';\n text-decoration: none;\n font-family: "PixelGridM";\n font-size: 24px;\n transition: color 0.6s;
1841\n margin-top: 1px;\n letter-spacing: .1px;\n }\n\n a.global-logo:hover {\n transition: 0.4s;\n }\n\n span.club-notification {\n cursor: default;\n font-family: "Mulish", sans-serif;\n position: relative;\n color: black;\n background: linear-gradient(\n 242deg,\n #a3e635 0%,\n #2cbaff 33%,\n #be53ff 66%,\n #ff7286 100%\n );\n background-size: 400% 100%;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n animation: rainbow 10s ease-in-out infinite;\n font-weight: 900;\n margin-left: 0.1rem;\n font-size: 13px;\n transform: translateY(-3px);\n\n '," {\n margin-left: 0.3rem;\n }\n }\n\n .course-info {\n p {\n margin: 0px;\n }\n\n display: flex;\n align-items: center;\n gap: 24px;\n margin-left: 16px;\n\n .name-chapter {\n display: flex;\n align-items: center;\n gap: 8px;\n\n .course-name {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n transition: color 0.2s;\n\n :hover {\n text-decoration: underline;\n }\n }\n\n .slash {\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n transition: 0.2s;\n }\n\n .chapter-name {\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n }\n }\n\n @keyframes rainbow {\n 0% {\n background-position: 100% 50%;\n }\n 25% {\n background-position: 0% 20%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 75% {\n background-position: 0% 60%;\n }\n 100% {\n background-position: 100% 50%;\n }\n }\n\n img {\n width: 24px;\n height: 26px;\n z-index: 100;\n margin-top: -.6px;\n }\n\n .image-container img {\n animation: spin 0.9s ease-in-out;\n }\n\n @keyframes spin {\n 0% {\n transform: rotateY(0);\n }\n 50% {\n transform: rotateY(1turn) translateY(-20px);\n }\n 100% {\n transform: rotateY(1turn) translateY(0px);\n }\n }\n\n &.short-logo {\n img {\n margin-top: -0.3rem;\n width: 37px;\n height: 40.5px;\n flex-shrink: 0;\n }\n }\n\n '," {\n margin-left: -0.6rem;\n\n img {\n width: 23px;\n height: 26px;\n margin-top: -1px;\n }\n }\n\n "," {\n margin-left: 0.2rem;\n }\n"]);return Logo_templateObject=function(){return $},$}let eR=es.default.h2.withConfig({componentId:"sc-2dc8d306-0"})(Logo_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md});var atoms_Logo=function($){var et;let{buildObject:en=null,username:er="",exerciseInfo:es={},leShortLogo:el=!1,learningEnv:em="general",dailyChallengeTitle:ef=null}=$;(0,eA.T)(),ek().get().codedextoken;let eg=(0,ed.v9)(eh.xF),[ey,ev]=(0,eo.useState)(!1),ex=(0,ed.v9)(eh.ot),{width:e_}=(0,eT.i)(),ew=(0,ep.useRouter)(),{pathname:eC}=ew;if((0,eo.useEffect)(function(){setTimeout(function(){let $=document.querySelector("img.logo-image");$&&$.classList.add("animate")},2e3)},[]),el)return(0,ei.jsx)(eR,{className:"short-logo",children:(0,ei.jsx)(eu(),{href:ex?"/home":"/",className:"global-logo",children:(0,ei.jsx)("img",{src:"/images/coin-cropped.png",alt:"coin logo",className:"short-logo"})})});let eE=(null==es?void 0:es.chapterNameTitle)||function($){let et=null==$?void 0:$.split("-").map($=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ");return et.includes("And")?et.replace("And","and"):et}((null==es?void 0:es.chapterName)||"");return(0,ei.jsxs)(eR,{className:"nes-pointer notranslate",translate:"no",children:["lumi"===em&&(0,ei.jsx)(LumiNav,{}),(0,ei.jsxs)(eu(),{href:ex?"/home":"/",className:"global-logo",children:[(0,ei.jsx)("div",{className:"".concat(ey?"image-container":""),onMouseEnter:()=>ev(!0),onAnimationEnd:()=>ev(!1),children:(0,ei.jsx)("img",{src:"/images/coin-cropped.png",width:"25px",height:"28px",alt:"coin logo",className:"logo-image"})}),e_>400&&(0,ei.jsx)("span",{className:"logo-text",children:"Cod\xe9dex"})]}),e_>400&&eg&&(0,ei.jsx)("span",{className:"club-notification","data-content":"Club",children:"Club"}),en&&(0,ei.jsx)(atoms_UserBuildsTitle,{username:er,buildObject:en}),es.chapterName&&(0,ei.jsxs)("div",{className:"course-info",children:[(0,ei.jsxs)("div",{className:"name-chapter",children:[(0,ei.jsx)(eu(),{href:"/".concat((null===(et=ew.pathname)||void 0===et?void 0:et.split("/")[1])||""),children:(0,ei.jsx)("p",{className:"course-name",children:es.courseName})}),(0,ei.jsx)("p",{className:"slash",children:"/"}),(0,ei.jsx)("p",{className:"chapter-name",children:eE})]}),(0,ei.jsx)(courses_NavCourseProgress,{courseName:es.internalCourseName,chapterName:es.chapterName,progressFor:es.for||"course"})]}),ef&&(0,ei.jsx)("div",{className:"course-info",children:(0,ei.jsxs)("div",{className:"name-chapter",children:[(0,ei.jsx)(eu(),{href:"/daily-challenge",children:(0,ei.jsx)("p",{className:"course-name",children:"Daily Challenge"})}),(0,ei.jsx)("p",{className:"slash",children:"/"}),(0,ei.jsx)("p",{className:"chapter-name",children:ef})]})})]})}},80941:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(9473),es=en(19521),el=en(609);
1841function _templateObject(){let $=(0,er._)(["\n //change border for dark mode only\n .nes-container {\n border: ",";\n //if dark mode and background is transparant\n background-color: ",";\n }\n\n // changes border color\n .nes-container.is-dark {\n background-color: ",";\n }\n\n //to remove spacing inside container\n .nes-container.is-dark::after {\n position: ",";\n }\n"]);return _templateObject=function(){return $},$}let eu=es.default.div.withConfig({componentId:"sc-1fb05785-0"})(_templateObject(),$=>{let{dark:et}=$;return et?"3px solid #244C73":""},$=>{let{dark:et,transparant:en}=$;return en&&et?"#0F1524 !important":""},$=>{let{dark:et}=$;return et?"#1D2332":""},$=>{let{dark:et}=$;return et?"relative":""});et.Z=function($){let{className:et,children:en,isDark:er,style:es={},transparent:ed}=$,eh=(0,eo.v9)(el.o4)||"dark";return(0,ei.jsx)(eu,{dark:"dark"===eh,transparant:ed,children:(0,ei.jsx)("div",{className:"nes-container ".concat(er?"is-dark":""," ").concat(et),style:es,children:en})})}},72502:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(8173);function _templateObject(){let $=(0,er._)(['\n z-index: 100;\n position: fixed;\n top: 0px;\n left: 0%;\n height: 100dvh;\n width: 100vw;\n font-family: "Mulish", sans-serif;\n opacity: 0;\n animation: opac 0.2s ease-out forwards;\n background-color: ',";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n p,\n label {\n margin: 0px;\n }\n\n @keyframes opac {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n .inner-overlay-wrapper {\n display: flex;\n justify-content: center;\n }\n"]);return _templateObject=function(){return $},$}let eu=es.default.div.withConfig({componentId:"sc-5af25b56-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.overlay});et.Z=function($){let{setShowModel:et,children:en,...er}=$;return(0,eo.useEffect)(()=>{let $=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$}},[]),(0,ei.jsx)(el.Z,{children:(0,ei.jsx)(eu,{onClick:function(){et()},...er,children:en})})}},3649:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(609),es=en(9473),el=en(19521);function _templateObject(){let $=(0,er._)(["\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 2;\n border-image-width: 4px;\n border-style: solid;\n border-width: 0px;\n border-image-source: ",";\n\n position: relative;\n clip-path: polygon(\n 4px 0px,\n 4px 2px,\n 2px 2px,\n 2px 4px,\n 0px 4px,\n 0px calc(100% - 4px),\n 2px calc(100% - 4px),\n 2px calc(100% - 2px),\n 4px calc(100% - 2px),\n 4px 100%,\n calc(100% - 4px) 100%,\n calc(100% - 4px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 2px),\n calc(100% - 2px) calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% 4px,\n calc(100% - 2px) 4px,\n calc(100% - 2px) 2px,\n calc(100% - 4px) 2px,\n calc(100% - 4px) 0px\n );\n"]);return _templateObject=function(){return $},$}let eu=el.default.div.withConfig({componentId:"sc-47056a04-0"})(_templateObject(),$=>{let{borderColor:et}=$;return"url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_183_5329)'%3E%3Cpath d='M2 0H3V1H2V0ZM3 0H4V1H3V0ZM1 1H2V2H1V1ZM4 1H5V2H4V1ZM0 2H1V3H0V2ZM5 2H6V3H5V2ZM0 3H1V4H0V3ZM5 3H6V4H5V3ZM1 4H2V5H1V4ZM4 4H5V5H4V4ZM2 5H3V6H2V5ZM3 5H4V6H3V5Z' fill='%23".concat(et,"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_183_5329'%3E%3Crect width='6' height='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\")")});et.Z=function($){let{children:et,className:en="",borderColor:er=null,...el}=$,ed=(0,es.v9)(eo.o4)||"dark";return(0,ei.jsx)(eu,{className:en,borderColor:null===er?"dark"===ed?"475569":"CBD5E1":er,...el,children:et})}},20759:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(609),es=en(9473),el=en(19521);
1841function _templateObject(){let $=(0,er._)(["\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 3;\n border-image-width: 6px;\n border-style: solid;\n border-width: 0px;\n border-image-source: ",";\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n position: absolute;\n inset: 0;\n pointer-events: none;\n ","\n"]);return _templateObject1=function(){return $},$}function _templateObject2(){let $=(0,er._)(["\n ","\n\n position: relative;\n clip-path: polygon(\n 6px 0px,\n 6px 2px,\n 4px 2px,\n 4px 4px,\n 2px 4px,\n 2px 6px,\n 0px 6px,\n 0px 8px,\n 0px calc(100% + -6px),\n 2px calc(100% + -6px),\n 2px calc(100% + -4px),\n 4px calc(100% + -4px),\n 4px calc(100% + -2px),\n 6px calc(100% + -2px),\n 6px calc(100% + 0px),\n 8px calc(100% + 0px),\n calc(100% + -6px) calc(100% - 0px),\n calc(100% + -6px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 8px),\n calc(100% - 0px) 6px,\n calc(100% - 2px) 6px,\n calc(100% - 2px) 4px,\n calc(100% - 4px) 4px,\n calc(100% - 4px) 2px,\n calc(100% - 6px) 2px,\n calc(100% - 6px) 0px,\n calc(100% - 8px) 0px\n );\n"]);return _templateObject2=function(){return $},$}let eu=(0,el.css)(_templateObject(),$=>{let{borderColor:et}=$;return"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill-rule='evenodd' d='M4 0H3V1H2V2H1V3H0V5H1V6H2V7H3V8H5V7H6V6H7V5H8V3H7V2H6V1H5V0ZM5 1V2H6V3H7V5H6V6H5V7H3V6H2V5H1V3H2V2H3V1Z' fill='%23".concat(et,"'/%3E%3C/svg%3E\")")}),ed=el.default.div.withConfig({componentId:"sc-a73a89e6-0"})(_templateObject1(),eu),eh=el.default.div.withConfig({componentId:"sc-a73a89e6-1"})(_templateObject2(),$=>{let{$overlayBorder:et}=$;return!et&&eu});et.Z=function($){let{children:et,className:en="",borderColor:er="000000",overlayBorder:el=!1,...eu}=$,ep=(0,es.v9)(eo.o4)||"dark",em="000000"===er?"dark"===ep?"475569":"CBD5E1":er;return em=em.replace("#",""),(0,ei.jsxs)(eh,{className:en,borderColor:em,$overlayBorder:el,...eu,children:[et,el&&(0,ei.jsx)(ed,{borderColor:em})]})}},79044:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);function _templateObject(){let $=(0,er._)(["\n padding: 6px 16px;\n border-radius: 200px;\n border: 2px solid\n ",";\n transition-duration: 0.2s;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n\n p {\n margin: 0;\n color: ",';\n text-align: center;\n font-style: normal;\n font-weight: 600;\n font-family: "Mulish", sans-serif;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n\n '," {\n font-size: 14px;\n }\n "," {\n font-size: 16px;\n }\n }\n\n :hover {\n background: ",";\n }\n\n &.tag-selected {\n border: 2px solid ",";\n background: ",";\n\n p {\n color: ",";\n }\n\n svg {\n path {\n fill: "," !important;\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-72a5e89-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["600"]:et.colors.palette.grey["300"]},$=>{let{theme:et}=$;return"dark"==et.mode?"#fff":"#020617"},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["800"]:et.colors.palette.grey["100"]},$=>{let{theme:et}=$;return et.colors.palette.blue["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["950"]:et.colors.palette.blue["50"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["400"]:et.colors.palette.blue["700"]},$=>{let{theme:et}=$;return et.colors.text.accent.blue});et.Z=function($){let{tag:et,isSelected:en,onToggle:er,displayName:eo,icon:el=null,sideAction:eu=()=>{}}=$;return(0,ei.jsxs)(es,{className:"nes-pointer ".concat(en?"tag-selected":""," ").concat(et),onClick:function(){er(et),eu()},children:[el&&el,(0,ei.jsx)("p",{children:eo||et})]})}},69214:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);
1841function _templateObject(){let $=(0,er._)(["\n bottom: 90%;\n left: 50%;\n transform: translateX(-50%) rotate(90deg);\n "]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n top: 90%;\n left: 50%;\n transform: translateX(-50%) rotate(-90deg);\n "]);return _templateObject1=function(){return $},$}function _templateObject2(){let $=(0,er._)(["\n top: 50%;\n right: 100%;\n transform: translateY(-50%) rotate(0deg);\n "]);return _templateObject2=function(){return $},$}function _templateObject3(){let $=(0,er._)(["\n top: 50%;\n left: 100%;\n transform: translateY(-50%) rotate(180deg);\n "]);return _templateObject3=function(){return $},$}function _templateObject4(){let $=(0,er._)(["\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n background: ",';\n position: relative;\n font-family: "Mulish", sans-serif;\n min-width: 150px;\n\n .tooltip-text {\n color: ',";\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n text-align: center;\n }\n\n .arrow {\n position: absolute;\n ","\n\n path {\n fill: ",";\n }\n }\n"]);return _templateObject4=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-d7acd890-0"})(_templateObject4(),$=>"dark"===$.theme.mode?"#FFFFFF":"#020617",$=>"dark"===$.theme.mode?"#020617":"#FFFFFF",$=>{switch($.arrowDirection){case"top":return(0,eo.css)(_templateObject());case"bottom":return(0,eo.css)(_templateObject1());case"left":return(0,eo.css)(_templateObject2());default:return(0,eo.css)(_templateObject3())}},$=>"dark"===$.theme.mode?"#FFFFFF":"#020617");function Arrow(){return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"12",viewBox:"0 0 6 12",fill:"none",className:"arrow",children:(0,ei.jsx)("path",{d:"M0 6L6 0L6 12L0 6Z",fill:"#020617"})})}et.Z=function($){let{text:et,arrowDirection:en="left"}=$;return(0,ei.jsxs)(es,{className:"tooltip",arrowDirection:en,children:[(0,ei.jsx)(Arrow,{}),(0,ei.jsx)("p",{className:"tooltip-text",children:et})]})}},62626:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);function _templateObject(){let $=(0,er._)(["\n margin: 0 auto;\n height: 100%;\n\n "," {\n max-width: 100%;\n margin: 0px 16px;\n }\n "," {\n max-width: 100%;\n margin: 0px 24px;\n }\n\n "," {\n margin: 0 auto;\n max-width: 1152px;\n }\n"]);return _templateObject=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-54093850-0"})(_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg});et.Z=function($){let{children:et,...en}=$;return(0,ei.jsx)(es,{...en,children:et})}},47158:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(25935),eu=en(42708),ed=en(9473),eh=en(88090),ep=en(609);function _templateObject(){let $=(0,er._)(["\n 0% { opacity: 0; }\n 50% { opacity: 1; }\n 100% { opacity: 0; }\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n display: inline-block;\n margin: 0;\n\n"]);return _templateObject1=function(){return $},$}function _templateObject2(){let $=(0,er._)(["\n color: ",";\n"]);return _templateObject2=function(){return $},$}function _templateObject3(){let $=(0,er._)(["\n animation: "," 1s infinite;\n"]);return _templateObject3=function(){return $},$}let em=(0,es.keyframes)(_templateObject()),ef=es.default.h1.withConfig({componentId:"sc-587bcaa0-0"})(_templateObject1()),eg=es.default.span.withConfig({componentId:"sc-587bcaa0-1"})(_templateObject2(),$=>$.lightTextOnly?"#fff":$.theme.colors.text1),ey=es.default.span.withConfig({componentId:"sc-587bcaa0-2"})(_templateObject3(),em);et.Z=function($){let{text:et="",setAction:en=()=>{}
1841,playInViewOnly:er=!1,typingSpeed:es=80,disableCursor:em=!1,playSound:ev=!1,lightTextOnly:ex=!1,...e_}=$,[ew,ek]=(0,eu.YD)({threshold:1}),eC=(0,ed.v9)(eh.E0),eE=(0,ed.v9)(ep.i4),eI=eC||eE,[eS,eT]=(0,eo.useState)(""),[eA,eP]=(0,eo.useState)(!0),eN=(0,eo.useRef)(null);return(0,eo.useEffect)(()=>{ev&&!eN.current&&(eN.current=new Audio("/audio/typing-sound.mp3"))},[ev]),(0,eo.useEffect)(()=>{eN.current&&ev&&(eN.current.muted=eI)},[eI,ev,eN]),(0,eo.useEffect)(()=>{if(!ek&&er||ev&&!eN.current)return;ev&&(eN.current.play(),eN.current.muted=eI);let $=Array.from(et),ei=setInterval(()=>{eT(et=>{let er=Array.from(et).length;return er>=$.length?(clearInterval(ei),setTimeout(()=>eP(!1),3e3),en(),ev&&eN.current&&(eN.current.pause(),eN.current.currentTime=0),et):et+$[er]})},es);return()=>{clearInterval(ei),ev&&eN.current&&(eN.current.pause(),eN.current.currentTime=0)}},[en,et,ek,er,es,ev,eI]),(0,ei.jsxs)(ef,{className:"python-typewriter",ref:ew,...e_,children:[(0,ei.jsx)(eg,{lightTextOnly:ex,children:(0,el.ZP)(eS)}),!em&&(0,ei.jsxs)(ei.Fragment,{children:[" ",eA&&(0,ei.jsx)(ey,{className:"python-typewriter-cursor",children:"|"})]})]})}},43493:function($,et,en){"use strict";en.d(et,{Z:function(){return community_FollowBtn}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(9473),el=en(67294),eu=en(609),ed=en(34150),eh=en(53971),ep=en(83584),community_PersonPlusIcon=function($){let{color:et="#64748B",...en}=$;return(0,ei.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",...en,children:[(0,ei.jsx)("path",{d:"M9.99998 2.16666H15V3.83332L16.6668 3.83328V8.83328L15 8.83332V10.5H9.99998V8.83332H8.33331V3.83332H9.99998V2.16666Z",fill:"white"}),(0,ei.jsx)("path",{d:"M7.49998 13.8332H5.83331V18.8332H19.1668V13.8332H17.5V12.1667H7.49998V13.8332Z",fill:"white"}),(0,ei.jsx)("path",{d:"M2.49998 7.16666H4.16665V8.83332H5.83331V10.5H4.16665V12.1667H2.49998V10.5H0.833313V8.83332H2.49998V7.16666Z",fill:"white"})]})},em=en(73857),ef=en(63248);function _templateObject(){let $=(0,er._)(["\n button {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n svg {\n margin-right: 8px;\n }\n\n .checkmark-icon {\n path {\n fill: "," !important;\n }\n }\n"]);return _templateObject=function(){return $},$}let eg=eo.default.div.withConfig({componentId:"sc-4048ba89-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary});var community_FollowBtn=function($){let{userToFollowUid:et,following:en,setFollowing:er}=$,eo=(0,es.v9)(eu.f8);(0,es.v9)(eu.IC);let{handleFollowBadgeEvent:ey}=(0,ef.g)(),[ev,ex]=(0,el.useState)(!1),e_=(0,el.useCallback)(async function($){$.preventDefault();try{if(ev)return;ex(!0);let $=await (0,ed.P)({userId:eo,accountToFollowUid:et});if(200===$.status){let $=[...en,et];sessionStorage.setItem("userFollowing",JSON.stringify($)),er($),ex(!1),ey({followerUid:eo,followedUid:et});try{(0,ep.l)("follow",et,eo)}catch($){console.error("Error creating follow notification: ",$)}}}catch($){}},[ev,eo,et,en,er,ey]),ew=(0,el.useCallback)(async function($){if($.preventDefault(),!ev){ex(!0);try{let $=await (0,eh.F)({userId:eo,accountToFollowUid:et});if(200===$.status){let $=en.filter($=>$!=et),ei=[...$];er(ei),sessionStorage.setItem("userFollowing",JSON.stringify($))}}catch($){}finally{ex(!1)}}},[ev,eo,et,en,er]);return(0,ei.jsx)(eg,{className:"follow-user-btn",children:en.includes(et)?(0,ei.jsxs)(em.Z,{size:"small",variant:"subtle",onClick:$=>ew($),disabled:ev,children:[(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",className:"checkmark-icon",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 5.5H16.6666V7.16667H15V5.5ZM13.3333 8.83333V7.16667H15V8.83333H13.3333ZM11.6666 10.5V8.83333H13.3333V10.5H11.6666ZM9.99998 12.1667H11.6666V10.5H9.99998V12.1667ZM8.33331 13.8333H9.99998V12.1667H8.33331V13.8333ZM6.66665 13.8333V15.5H8.33331V13.8333H6.66665ZM4.99998 12.1667H6.66665V13.8333H4.99998V12.1667ZM4.99998 12.1667H3.33331V10.5H4.99998V12.1667Z",fill:"#020617"})}),"Following"]}):(0,ei.jsxs)(em.Z,{size:"small",onClick:$=>e_($),children:[(0,ei.jsx)(community_PersonPlusIcon,{}),"Follow"]})})}},25670:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);
1841function _templateObject(){let $=(0,er._)(["\n display: flex;\n justify-content: center;\n margin-top: 5rem;\n img {\n width: 75px;\n height: auto;\n }\n"]);return _templateObject=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-8ff57c93-0"})(_templateObject());et.Z=function(){return(0,ei.jsx)(es,{children:(0,ei.jsx)("img",{src:"/images/community/loader.svg",alt:"loader",className:"spinning-loader"})})}},63877:function($,et,en){"use strict";en.d(et,{F:function(){return getTimeDifference},i:function(){return formatTimestamp}});var er=en(85893);function getTimeDifference($){if(!(null==$?void 0:$._seconds))return(0,er.jsx)("span",{children:"1s"});let et=(null==$?void 0:$._seconds)+(null==$?void 0:$._nanoseconds)/1e9,en=Date.now()/1e3,ei=en-et;return ei<60?(0,er.jsxs)("span",{children:[Math.floor(ei),"s"]}):ei<3600?(0,er.jsxs)("span",{children:[Math.floor(ei/60),"m"]}):ei<86400?(0,er.jsxs)("span",{children:[Math.floor(ei/3600),"h"]}):ei<2592e3?(0,er.jsxs)("span",{children:[Math.floor(ei/86400),"d"]}):(0,er.jsxs)("span",{children:[Math.floor(ei/2592e3),"mo"]})}function formatTimestamp($){let et=(null==$?void 0:$._seconds)*1e3+Math.floor((null==$?void 0:$._nanoseconds)/1e6),en=new Date(et),er=en.getDate(),ei=["th","st","nd","rd"][er%10>3||er%100>=11&&er%100<=13?0:er%10],eo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][en.getMonth()],es=en.getFullYear(),el=en.getHours(),eu=en.getMinutes().toString().padStart(2,"0");return"".concat(eo," ").concat(er).concat(ei,", ").concat(es," at ").concat(el%12||12,":").concat(eu," ").concat(el>=12?"PM":"AM")}en(67294)},33846:function($,et,en){"use strict";en.d(et,{Z:function(){return useOnClickOutside}});var er=en(67294);function useOnClickOutside($,et){(0,er.useEffect)(()=>{function listener(en){!$.current||$.current.contains(en.target)||et(en)}return document.addEventListener("mousedown",listener),document.addEventListener("touchstart",listener),()=>{document.removeEventListener("mousedown",listener),document.removeEventListener("touchstart",listener)}},[$,et])}},5802:function($,et,en){"use strict";let er;en.d(et,{Z:function(){return courses_ImageZoom}});var ei=en(85893),eo=en(67294),es=en(73935);let testElType=($,et)=>$===et?.tagName?.toUpperCase?.(),testDiv=$=>testElType("DIV",$)||testElType("SPAN",$),testImg=$=>testElType("IMG",$),testImgLoaded=$=>$.complete&&0!==$.naturalHeight,testSvg=$=>testElType("SVG",$),getScaleToWindow=({height:$,offset:et,width:en})=>Math.min((window.innerWidth-2*et)/en,(window.innerHeight-2*et)/$),getScaleToWindowMax=({containerHeight:$,containerWidth:et,offset:en,targetHeight:er,targetWidth:ei})=>{let eo=getScaleToWindow({height:er,offset:en,width:ei}),es=ei>er?ei/et:er/$;return eo>1?es:eo*es},getScale=({containerHeight:$,containerWidth:et,hasScalableSrc:en,offset:er,targetHeight:ei,targetWidth:eo})=>$&&et?!en&&ei&&eo?getScaleToWindowMax({containerHeight:$,containerWidth:et,offset:er,targetHeight:ei,targetWidth:eo}):getScaleToWindow({height:$,offset:er,width:et}):1,el=/url(?:\(['"]?)(.*?)(?:['"]?\))/,getImgSrc=$=>{if($){if(testImg($))return $.currentSrc;if(testDiv($)){let et=window.getComputedStyle($).backgroundImage;if(et)return el.exec(et)?.[1]}}},getImgAlt=$=>{if($)return testImg($)?$.alt??void 0:$.getAttribute("aria-label")??void 0},getImgRegularStyle=({containerHeight:$,containerLeft:et,containerTop:en,containerWidth:er,hasScalableSrc:ei,offset:eo,targetHeight:es,targetWidth:el})=>{let eu=getScale({containerHeight:$,containerWidth:er,hasScalableSrc:ei,offset:eo,targetHeight:es,targetWidth:el});return{top:en,left:et,width:er*eu,height:$*eu,transform:`translate(0,0) scale(${1/eu})`}},parsePosition=({position:$,relativeNum:et})=>{let en=parseFloat($);return $.endsWith("%")?et*en/100:en},getImgObjectFitStyle=({containerHeight:$,containerLeft:et,containerTop:en,containerWidth:er,hasScalableSrc:ei,objectFit:eo,objectPosition:es,offset:el,targetHeight:eu,targetWidth:ed})=>{if("scale-down"===eo&&(eo=ed<=er&&eu<=$?"none":"contain"),"cover"===eo||"contain"===eo){let eh=er/ed,ep=$/eu,em="cover"===eo?Math.max(eh,ep):Math.min(eh,ep),[ef="50%",eg="50%"]=e
1841s.split(" "),ey=parsePosition({position:ef,relativeNum:er-ed*em}),ev=parsePosition({position:eg,relativeNum:$-eu*em}),ex=getScale({containerHeight:eu*em,containerWidth:ed*em,hasScalableSrc:ei,offset:el,targetHeight:eu,targetWidth:ed});return{top:en+ev,left:et+ey,width:ed*em*ex,height:eu*em*ex,transform:`translate(0,0) scale(${1/ex})`}}if("none"===eo){let[eo="50%",eh="50%"]=es.split(" "),ep=parsePosition({position:eo,relativeNum:er-ed}),em=parsePosition({position:eh,relativeNum:$-eu}),ef=getScale({containerHeight:eu,containerWidth:ed,hasScalableSrc:ei,offset:el,targetHeight:eu,targetWidth:ed});return{top:en+em,left:et+ep,width:ed*ef,height:eu*ef,transform:`translate(0,0) scale(${1/ef})`}}if("fill"!==eo)return{};{let et=er/ed,en=$/eu,eo=Math.max(et,en),es=getScale({containerHeight:eu*eo,containerWidth:ed*eo,hasScalableSrc:ei,offset:el,targetHeight:eu,targetWidth:ed});return{width:er*es,height:$*es,transform:`translate(0,0) scale(${1/es})`}}},getDivImgStyle=({backgroundPosition:$,backgroundSize:et,containerHeight:en,containerLeft:er,containerTop:ei,containerWidth:eo,hasScalableSrc:es,offset:el,targetHeight:eu,targetWidth:ed})=>{if("cover"===et||"contain"===et){let eh=eo/ed,ep=en/eu,em="cover"===et?Math.max(eh,ep):Math.min(eh,ep),[ef="50%",eg="50%"]=$.split(" "),ey=parsePosition({position:ef,relativeNum:eo-ed*em}),ev=parsePosition({position:eg,relativeNum:en-eu*em}),ex=getScale({containerHeight:eu*em,containerWidth:ed*em,hasScalableSrc:es,offset:el,targetHeight:eu,targetWidth:ed});return{top:ei+ev,left:er+ey,width:ed*em*ex,height:eu*em*ex,transform:`translate(0,0) scale(${1/ex})`}}if("auto"===et){let[et="50%",eh="50%"]=$.split(" "),ep=parsePosition({position:et,relativeNum:eo-ed}),em=parsePosition({position:eh,relativeNum:en-eu}),ef=getScale({containerHeight:eu,containerWidth:ed,hasScalableSrc:es,offset:el,targetHeight:eu,targetWidth:ed});return{top:ei+em,left:er+ep,width:ed*ef,height:eu*ef,transform:`translate(0,0) scale(${1/ef})`}}{let[eh="50%",ep="50%"]=et.split(" "),em=parsePosition({position:eh,relativeNum:eo}),ef=parsePosition({position:ep,relativeNum:en}),eg=em/ed,ey=ef/eu,ev=Math.min(eg,ey),[ex="50%",e_="50%"]=$.split(" "),ew=parsePosition({position:ex,relativeNum:eo-ed*ev}),ek=parsePosition({position:e_,relativeNum:en-eu*ev}),eC=getScale({containerHeight:eu*ev,containerWidth:ed*ev,hasScalableSrc:es,offset:el,targetHeight:eu,targetWidth:ed});return{top:ei+ek,left:er+ew,width:ed*ev*eC,height:eu*ev*eC,transform:`translate(0,0) scale(${1/eC})`}}},eu=/\.svg$/i,getStyleModalImg=({hasZoomImg:$,imgSrc:et,isSvg:en,isZoomed:er,loadedImgEl:ei,offset:eo,shouldRefresh:es,targetEl:el})=>{let ed=en||et?.slice?.(0,18)==="data:image/svg+xml"||$||!!(et&&eu.test(et)),eh=el.getBoundingClientRect(),ep=window.getComputedStyle(el),em=null!=ei&&testDiv(el),ef=getImgRegularStyle({containerHeight:eh.height,containerLeft:eh.left,containerTop:eh.top,containerWidth:eh.width,hasScalableSrc:ed,offset:eo,targetHeight:ei?.naturalHeight??eh.height,targetWidth:ei?.naturalWidth??eh.width}),eg=null==ei||em?void 0:getImgObjectFitStyle({containerHeight:eh.height,containerLeft:eh.left,containerTop:eh.top,containerWidth:eh.width,hasScalableSrc:ed,objectFit:ep.objectFit,objectPosition:ep.objectPosition,offset:eo,targetHeight:ei.naturalHeight,targetWidth:ei.naturalWidth}),ey=em?getDivImgStyle({backgroundPosition:ep.backgroundPosition,backgroundSize:ep.backgroundSize,containerHeight:eh.height,containerLeft:eh.left,containerTop:eh.top,containerWidth:eh.width,hasScalableSrc:ed,offset:eo,targetHeight:ei.naturalHeight,targetWidth:ei.naturalWidth}):void 0,ev=Object.assign({},ef,eg,ey);if(er){let $=window.innerWidth/2,et=window.innerHeight/2,en=parseFloat(String(ev.left||0))+parseFloat(String(ev.width||0))/2,er=parseFloat(String(ev.top||0))+parseFloat(String(ev.height||0))/2;es&&(ev.transitionDuration="0.01ms"),ev.transform=`translate(${$-en}px,${et-er}px) scale(1)`}return ev},getStyleGhost=$=>{if(!$)return{};if(!testSvg($))return{height:$.offsetHeight,left:$.offsetLeft,width:$.offsetWidth,top:$.offsetTop};{let et=$.parentElement,en=$.getBoundingClientRect();if(!et)return{height:en.height,left:en.left,width:en.width,top:en.top};{let $=et.getBoundingClientRect();return{height:en.height,left:$.left-en.left,top:$.top-en.top,width:en.width}}}};"undefined"!=typeof document&&((er=document.createElement("div")).setAttribute("data-rmiz-portal",""),document.body.appendChild(er));let ed=["img","svg",'[role="img"]',"[data-zoom]"].map($=>`${$}:not([aria-hidden="true"])`).join(","),eh={overflow:"",width:""};function Controlled($){return eo.createElement(ControlledBase,{...$})}let ControlledBase=class ControlledBase extends eo.Component{constructor(){super(...arguments),this.state={id:"",isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:"UNLOADED",shouldRefresh:!1},this.refContent=(0,eo.createRef)(),this.refDialog=(0,eo.createRef)(),this.refModalContent=(0,eo.createRef)(),this.refModalImg=(0,eo.createRef)(),this.refWrap=(0,eo.createRef)(),this.img
1841El=null,this.prevBodyAttrs=eh,this.styleModalImg={},this.setId=()=>{let gen4=()=>Math.random().toString(16).slice(-4);this.setState({id:gen4()+gen4()+gen4()})},this.setAndTrackImg=()=>{let $=this.refContent.current;$&&(this.imgEl=$.querySelector(ed),this.imgEl?(this.changeObserver?.disconnect?.(),this.imgEl?.addEventListener?.("load",this.handleImgLoad),this.imgEl?.addEventListener?.("click",this.handleZoom),this.state.loadedImgEl||this.handleImgLoad(),this.imgElObserver=new ResizeObserver($=>{let et=$[0];et?.target&&(this.imgEl=et.target,this.setState({}))}),this.imgElObserver.observe(this.imgEl)):this.changeObserver||(this.changeObserver=new MutationObserver(this.setAndTrackImg),this.changeObserver.observe($,{childList:!0,subtree:!0})))},this.handleIfZoomChanged=$=>{let{isZoomed:et}=this.props;!$&&et?this.zoom():$&&!et&&this.unzoom()},this.handleImgLoad=()=>{let{imgEl:$}=this,et=getImgSrc($);if(!et)return;let en=new Image;testImg($)&&(en.sizes=$.sizes,en.srcset=$.srcset),en.src=et;let setLoaded=()=>{this.setState({loadedImgEl:en})};en.decode().then(setLoaded).catch(()=>{if(testImgLoaded(en)){setLoaded();return}en.onload=setLoaded})},this.handleZoom=()=>{this.props.onZoomChange?.(!0)},this.handleUnzoom=()=>{this.props.onZoomChange?.(!1)},this.handleDialogCancel=$=>{$.preventDefault()},this.handleDialogClick=$=>{($.target===this.refModalContent.current||$.target===this.refModalImg.current)&&this.handleUnzoom()},this.handleKeyDown=$=>{("Escape"===$.key||27===$.keyCode)&&($.preventDefault(),$.stopPropagation(),this.handleUnzoom())},this.handleWheel=$=>{$.ctrlKey||($.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom()}))},this.handleTouchStart=$=>{1===$.changedTouches.length&&$.changedTouches[0]&&(this.touchYStart=$.changedTouches[0].screenY)},this.handleTouchMove=$=>{if(null!=this.touchYStart&&$.changedTouches[0]){this.touchYEnd=$.changedTouches[0].screenY;let et=Math.max(this.touchYStart,this.touchYEnd),en=Math.min(this.touchYStart,this.touchYEnd),er=Math.abs(et-en);er>10&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom())}},this.handleTouchCancel=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal?.(),this.setState({modalState:"LOADING"}),this.loadZoomImg(),window.addEventListener("wheel",this.handleWheel,{passive:!0}),window.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),window.addEventListener("touchmove",this.handleTouchMove,{passive:!0}),window.addEventListener("touchcancel",this.handleTouchCancel,{passive:!0}),document.addEventListener("keydown",this.handleKeyDown,!0),this.refModalImg.current?.addEventListener?.("transitionend",this.handleZoomEnd,{once:!0})},this.handleZoomEnd=()=>{setTimeout(()=>{this.setState({modalState:"LOADED"}),window.addEventListener("resize",this.handleResize,{passive:!0})},0)},this.unzoom=()=>{this.setState({modalState:"UNLOADING"}),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchcancel",this.handleTouchCancel),document.removeEventListener("keydown",this.handleKeyDown,!0),this.refModalImg.current?.addEventListener?.("transitionend",this.handleUnzoomEnd,{once:!0})},this.handleUnzoomEnd=()=>{setTimeout(()=>{window.removeEventListener("resize",this.handleResize),this.setState({shouldRefresh:!1,modalState:"UNLOADED"}),this.refDialog.current?.close?.(),this.bodyScrollEnable()},0)},this.bodyScrollDisable=()=>{this.prevBodyAttrs={overflow:document.body.style.overflow,width:document.body.style.width};let $=document.body.clientWidth;document.body.style.overflow="hidden",document.body.style.width=`${$}px`},this.bodyScrollEnable=()=>{document.body.style.width=this.prevBodyAttrs.width,document.body.style.overflow=this.prevBodyAttrs.overflow,this.prevBodyAttrs=eh},this.loadZoomImg=()=>{let{props:{zoomImg:$}}=this,et=$?.src;if(et){let en=new Image;en.sizes=$?.sizes??"",en.srcset=$?.srcSet??"",en.src=et;let setLoaded=()=>{this.setState({isZoomImgLoaded:!0})};en.decode().then(setLoaded).catch(()=>
1841{if(testImgLoaded(en)){setLoaded();return}en.onload=setLoaded})}},this.UNSAFE_handleSvg=()=>{let{imgEl:$,refModalImg:et,styleModalImg:en}=this;if(testSvg($)){let er=document.createElement("div");er.innerHTML=$.outerHTML;let ei=er.firstChild;ei.style.width=`${en.width||0}px`,ei.style.height=`${en.height||0}px`,ei.addEventListener("click",this.handleUnzoom),et.current?.firstChild?.remove?.(),et.current?.appendChild?.(ei)}}}render(){let{handleDialogCancel:$,handleDialogClick:et,handleUnzoom:en,handleZoom:ei,imgEl:el,props:{a11yNameButtonUnzoom:eu,a11yNameButtonZoom:ed,children:eh,classDialog:ep,IconUnzoom:em,IconZoom:ef,isZoomed:eg,wrapElement:ey,ZoomContent:ev,zoomImg:ex,zoomMargin:e_},refContent:ew,refDialog:ek,refModalContent:eC,refModalImg:eE,refWrap:eI,state:{id:eS,isZoomImgLoaded:eT,loadedImgEl:eA,modalState:eP,shouldRefresh:eN}}=this,ej=`rmiz-modal-${eS}`,eR=`rmiz-modal-img-${eS}`,eV=testDiv(el),eD=testImg(el),eO=testSvg(el),eM=getImgAlt(el),eF=getImgSrc(el),eL=eD?el.sizes:void 0,eH=eD?el.srcset:void 0,eB=!!ex?.src,eU=el&&(eA||eO)&&"none"!==window.getComputedStyle(el).display,ez=eM?`${ed}: ${eM}`:ed,eq="LOADING"===eP||"LOADED"===eP,eZ=eU?"found":"not-found",eW="UNLOADED"===eP||"UNLOADING"===eP?"hidden":"visible",eG=getStyleGhost(el);this.styleModalImg=eU?getStyleModalImg({hasZoomImg:eB,imgSrc:eF,isSvg:eO,isZoomed:eg&&eq,loadedImgEl:eA,offset:e_,shouldRefresh:eN,targetEl:el}):{};let e$=null;if(eU){let $=eD||eV?eo.createElement("img",{alt:eM,sizes:eL,src:eF,srcSet:eH,...eT&&"LOADED"===eP?ex:{},"data-rmiz-modal-img":"",height:this.styleModalImg.height||void 0,id:eR,ref:eE,style:this.styleModalImg,width:this.styleModalImg.width||void 0}):eO?eo.createElement("div",{"data-rmiz-modal-img":!0,ref:eE,style:this.styleModalImg}):null,et=eo.createElement("button",{"aria-label":eu,"data-rmiz-btn-unzoom":"",onClick:en,type:"button"},eo.createElement(em,null));e$=ev?eo.createElement(ev,{buttonUnzoom:et,modalState:eP,img:$,onUnzoom:en}):eo.createElement(eo.Fragment,null,$,et)}return eo.createElement(ey,{"aria-owns":ej,"data-rmiz":"",ref:eI},eo.createElement(ey,{"data-rmiz-content":eZ,ref:ew,style:{visibility:"UNLOADED"===eP?"visible":"hidden"}},eh),eU&&eo.createElement(ey,{"data-rmiz-ghost":"",style:eG},eo.createElement("button",{"aria-label":ez,"data-rmiz-btn-zoom":"",onClick:ei,type:"button"},eo.createElement(ef,null))),eU&&null!=er&&(0,es.createPortal)(eo.createElement("dialog",{"aria-labelledby":eR,"aria-modal":"true",className:ep,"data-rmiz-modal":"",id:ej,onClick:et,onClose:en,onCancel:$,ref:ek,role:"dialog"},eo.createElement("div",{"data-rmiz-modal-overlay":eW}),eo.createElement("div",{"data-rmiz-modal-content":"",ref:eC},e$)),er))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){"UNLOADED"!==this.state.modalState&&this.bodyScrollEnable(),this.changeObserver?.disconnect?.(),this.imgElObserver?.disconnect?.(),this.imgEl?.removeEventListener?.("load",this.handleImgLoad),this.imgEl?.removeEventListener?.("click",this.handleZoom),this.refModalImg.current?.removeEventListener?.("transitionend",this.handleZoomEnd),this.refModalImg.current?.removeEventListener?.("transitionend",this.handleUnzoomEnd),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchcancel",this.handleTouchCancel),window.removeEventListener("resize",this.handleResize),document.removeEventListener("keydown",this.handleKeyDown,!0)}componentDidUpdate($){this.UNSAFE_handleSvg(),this.handleIfZoomChanged($.isZoomed)}};function Uncontrolled($){let[et,en]=(0,eo.useState)(!1);return eo.createElement(Controlled,{...$,isZoomed:et,onZoomChange:en})}ControlledBase.defaultProps={a11yNameButtonUnzoom:"Minimize image",a11yNameButtonZoom:"Expand image",IconUnzoom:function(){return eo.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-unzoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},eo.createElement("path",{d:"M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z"}))},IconZoom:function(){return eo.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-zoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},eo.createElement("path",{d:"M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z"}))},wrapElement:"div",zoomMargin:0};var courses_ImageZoom=function($){let{src:et,alt:en,...er}=$,es=(0,eo.useRef)(null),[el,eu]=(0,eo.useState)(!1);return(0,eo.useEffect)(()=>
1841{if(es.current){let $=es.current.nextElementSibling;(null==$?void 0:$.tagName)==="H2"&&"instructions"===$.id&&eu(!0)}},[]),(0,ei.jsx)("div",{ref:es,style:el?{marginBottom:"16px"}:void 0,children:(0,ei.jsx)(Uncontrolled,{classDialog:"image-overlay-class",children:(0,ei.jsx)("img",{alt:en,src:et,className:"zoomable-image",...er})})})}},99407:function($,et,en){"use strict";function scrollToDiv($){let{divId:et,offSet:en=50}=$,er=document.getElementById(et);if(er){let $=er.getBoundingClientRect(),et=window.scrollY+$.top-en;window.scrollTo({top:et,behavior:"smooth"})}else console.error("".concat(et," not found."))}en.d(et,{Z:function(){return scrollToDiv}})},38444:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="#fff",width:en="17",height:ei="16",viewBox:eo="0 0 17 16",...es}=$;return(0,er.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",width:en,height:ei,viewBox:eo,...es,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.6667 0.5H13V3H11.3333V4.66667H13V7.16667H14.6667V4.66667H16.3333V3H14.6667V0.5ZM6.33333 2.16667H4.66667V6.33333H3V8H0.5V9.66667H3V11.3333H4.66667V15.5H6.33333V11.3333H8V9.66667H10.5V8H8V6.33333H6.33333V2.16667Z",fill:et})})}},81798:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="#64748B",...en}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...en,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 5L16 7L14 7L14 5L16 5ZM12 9L12 7L14 7L14 9L12 9ZM10 11L10 9L12 9L12 11L10 11ZM10 13L8 13L8 11L10 11L10 13ZM12 15L12 13L10 13L10 15L12 15ZM12 15L14 15L14 17L12 17L12 15ZM16 19L16 17L14 17L14 19L16 19Z",fill:et})})}},76086:function($,et,en){"use strict";var er=en(85893);et.Z=function(){return(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",children:[(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 2.5H26.5V4.5H6.5V2.5ZM6.5 28.5V4.5H4.5V28.5H6.5ZM26.5 28.5V30.5H6.5V28.5H26.5ZM26.5 28.5V4.5H28.5V28.5H26.5Z",fill:"#020617"}),(0,er.jsx)("rect",{x:"6.5",y:"22.5",width:"20",height:"6",fill:"#0080D4"}),(0,er.jsx)("rect",{x:"8.5",y:"24.5",width:"18",height:"4",fill:"white"}),(0,er.jsx)("rect",{x:"8.5",y:"4.5",width:"18",height:"18",fill:"#14ADFF"}),(0,er.jsx)("rect",{x:"6.5",y:"4.5",width:"2",height:"18",fill:"#2CBAFF"}),(0,er.jsx)("path",{d:"M8.5 4.5H10.5V24.5H8.5V4.5Z",fill:"#0080D4"}),(0,er.jsx)("rect",{x:"8.5",y:"24.5",width:"2",height:"2",fill:"#CBD5E1"}),(0,er.jsx)("rect",{x:"8.5",y:"24.5",width:"2",height:"4",fill:"#CBD5E1"}),(0,er.jsx)("rect",{width:"2",height:"2",transform:"matrix(1 0 0 -1 8.5 28.5)",fill:"#CBD5E1"}),(0,er.jsx)("rect",{x:"12.5",y:"8.5",width:"10",height:"2",fill:"#0080D4"}),(0,er.jsx)("rect",{x:"12.5",y:"12.5",width:"10",height:"2",fill:"#0080D4"})]})}},5592:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="#84CC16",viewBox:en="0 0 25 24",width:ei="25",height:eo="24",...es}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:ei,height:eo,viewBox:en,fill:"none",...es,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 6H20.5V8H18.5V6ZM16.5 10V8H18.5V10H16.5ZM14.5 12V10H16.5V12H14.5ZM12.5 14H14.5V12H12.5V14ZM10.5 16H12.5V14H10.5V16ZM8.5 16V18H10.5V16H8.5ZM6.5 14H8.5V16H6.5V14ZM6.5 14H4.5V12H6.5V14Z",fill:et})})}},45121:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="black",...en}=$;return(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",...en,children:[(0,er.jsx)("rect",{x:"7.77856",y:"5.25",width:"1.41429",height:"6",fill:et}),(0,er.jsx)("rect",{x:"9.19287",y:"9.75",width:"2.82857",height:"1.5",fill:et}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0214 2.25H4.94997V3.75H3.53568V5.25H2.1214V12.75H3.53568V14.25H4.94997V15.75H12.0214V14.25H13.4357V12.75H14.85V5.25H13.4357V3.75H12.0214V2.25ZM12.0214 3.75V5.25H13.4357V12.75H12.0214V14.25H4.94997V12.75H3.53568V5.25H4.94997V3.75H12.0214Z",fill:et})]})}},20517:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="black",...en}=$;return(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"20",viewBox:"0 0 28 20",fill:"none",...en,children:[(0,er.jsx)("path",{d:"M8.66602 0.666
1841565H11.3327V3.33323H8.66602V0.666565Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M5.99935 3.33323H8.66602V5.9999H5.99935V3.33323Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M3.33268 5.9999H5.99935V8.66657H3.33268V5.9999Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M0.666016 8.66657H3.33268V11.3332H0.666016V8.66657Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M3.33268 11.3332H5.99935V13.9999H3.33268V11.3332Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M5.99935 13.9999H8.66602V16.6666H5.99935V13.9999Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M8.66602 16.6666H11.3327V19.3332H8.66602V16.6666Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M19.3327 0.666565H16.666V3.33323H19.3327V0.666565Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M21.9993 3.33323H19.3327V5.9999H21.9993V3.33323Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M24.666 5.9999H21.9993V8.66657H24.666V5.9999Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M27.3327 8.66657H24.666V11.3332H27.3327V8.66657Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M24.666 11.3332H21.9993V13.9999H24.666V11.3332Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M21.9993 13.9999H19.3327V16.6666H21.9993V13.9999Z",fill:"#475569"}),(0,er.jsx)("path",{d:"M19.3327 16.6666H16.666V19.3332H19.3327V16.6666Z",fill:"#475569"})]})}},18268:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="currentColor",className:en="",...ei}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",className:en,...ei,children:(0,er.jsx)("path",{d:"M9.66699 5.83301H4.66699V15.833H14.667V10.833H16.333V17.5H3V4.16699H9.66699V5.83301ZM9.66699 12.5H8V10.833H9.66699V12.5ZM11.333 10.833H9.66699V9.16699H11.333V10.833ZM13 9.16699H11.333V7.5H13V9.16699ZM18 9.16699H16.333V5.83301H14.667V4.16699H11.333V2.5H18V9.16699ZM14.667 7.5H13V5.83301H14.667V7.5Z",fill:et})})}},30424:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="black",size:en=24}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 2H11V4H9V6H7V8H5H3V10V14V16H5H7V18H9V20H11V22H13V2ZM9 18V16H7V14H5V10H7V8H9V6H11V18H9ZM19.0002 11.2233H17.0005V9.22327H15.0005V11.2233H17.0002V13.2233L15.0005 13.2233V15.2233H17.0005V13.2233L19.0002 13.2233V15.2233H21.0002V13.2233L19.0002 13.2233V11.2233ZM19.0002 11.2233H21.0002V9.22327H19.0002V11.2233Z",fill:et})})}},49691:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{...et}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...et,children:(0,er.jsx)("path",{d:"M22 22H20V20H22V22ZM20 20H18V18H20V20ZM14 18H6V16H14V18ZM18 18H16V16H18V18ZM6 16H4V14H6V16ZM16 16H14V14H16V16ZM4 14H2V6H4V14ZM18 14H16V6H18V14ZM6 6H4V4H6V6ZM16 6H14V4H16V6ZM14 4H6V2H14V4Z",fill:"#64748B"})})}},42392:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="black"}=$;return(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[(0,er.jsxs)("g",{"clip-path":"url(#clip0_240_18579)",children:[(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 0H18V2H14V0ZM12 6V2H14V6H12ZM10 10V6H12V10H10ZM6 12V10H10V12H6ZM2 14V12H6V14H2ZM2 18H0V14H2V18ZM6 20H2V18H6V20ZM10 22H6V20H10V22ZM12 26H10V22H12V26ZM14 30V26H12V30H14ZM18 30V32H14V30H18ZM20 26V30H18V26H20ZM22 22V26H20V22H22ZM26 20V22H22V20H26ZM30 18V20H26V18H30ZM30 14H32V18H30V14ZM26 12H30V14H26V12ZM22 10H26V12H22V10ZM20 6H22V10H20V6ZM20 6V2H18V6H20Z",fill:"#020617"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H18V6H20V10H22V12H26V14H30V18H26V20H22V22H20V26H18V30H14V26H12V22H10V20H6V18H2V14H6V12H10V10H12V6H14V2Z",fill:"#EAB308"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 2H16V16H18H20H22H26V12H22V10H20V6H18V2Z",fill:"#FDE047"}),(0,er.jsx)("rect",{x:"26",y:"14",width:"4",height:"2",fill:"#FDE047"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 2H16V6H18V10H20V12H22V14H26V16H30V14H26V12H22V10H20V6H18V2Z",fill:"white"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 16H14H16V30H14V26H12V22H10V20H6V18H2V16Z",fill:"#CA8A04"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 16H2V18H6V20H10V22H12V26H14V30H16V26V22V20V18V16Z",fill:"#CA8A04"})]}),(0,er.jsx)("defs",{children:(0,er.jsx)("clipPath",{id:"clip0_240_18579",children:(0,er.jsx)("rect",{width:"32",height:"32",fill:"white"})})})]})}},86166:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="black",...en}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.61133 2.5H16.6113V4.5H6.61133V2.5ZM4.61133 6.5V4.5H6.61133V6.5H4.61133ZM4.61133 18.5H2.61133V6.5H4.61133V18.5ZM6.61133 20.5H4.61133V18.5H6.61133V20.5ZM18.6113 20.5H6.61133V22.5H18.6113V20.5ZM20.6113 18.5V20.5
1841H18.6113V18.5H20.6113ZM20.6113 18.5H22.6113V8.5H20.6113V18.5ZM12.6113 6.5H8.61133V8.5H6.61133V16.5H8.61133V18.5H16.6113V16.5H18.6113V12.5H16.6113V16.5H8.61133V8.5H12.6113V6.5ZM14.6113 14.5V10.5H16.6113V8.5H18.6113V6.5H20.6113H22.6113V4.5H20.6113V2.5H18.6113V4.5V6.5H16.6113V8.5H14.6113V10.5H10.6113V14.5H14.6113Z",fill:"white"})})}},8171:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="black",size:en=24}=$;return(0,er.jsx)("svg",{width:en,height:en,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H9V4H7V6H5V8H3H1V10V14V16H3H5V18H7V20H9V22H11V2ZM7 18V16H5V14H3V10H5V8H7V6H9V18H7ZM13 10H15V14H13V10ZM21 4H19V2H13V4H19V6H21V18H19V20H13V22H19V20H21V18H23V6H21V4ZM19 8H17V6H13V8H17V16H13V18H17V16H19V8Z",fill:et})})}},74347:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="black",className:en="",...ei}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:en,...ei,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 5H7V7H5V5ZM9 9H7V7H9V9ZM11 11H9V9H11V11ZM13 11H11V13H9V15H7V17H5V19H7V17H9V15H11V13H13V15H15V17H17V19H19V17H17V15H15V13H13V11ZM15 9V11H13V9H15ZM17 7V9H15V7H17ZM17 7V5H19V7H17Z",fill:et})})}},46331:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{fill:et="#64748B",...en}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",...en,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 5.55176L16 7.55176L14 7.55176L14 5.55176L16 5.55176ZM12 9.55176L12 7.55176L14 7.55176L14 9.55176L12 9.55176ZM10 11.5518L10 9.55176L12 9.55176L12 11.5518L10 11.5518ZM10 13.5518L8 13.5518L8 11.5518L10 11.5518L10 13.5518ZM12 15.5518L12 13.5518L10 13.5518L10 15.5518L12 15.5518ZM12 15.5518L14 15.5518L14 17.5518L12 17.5518L12 15.5518ZM16 19.5518L16 17.5518L14 17.5518L14 19.5518L16 19.5518Z",fill:"#64748B"})})}},78635:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="#64748B",isLiked:en,...ei}=$;return(0,er.jsx)(er.Fragment,{children:en?(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 4V6H11V8H13V6H15V4H19V6H21V12H19V14H17V16H15V18H13V20H11V18H9V16H7V14H5V12H3V6H5V4H9Z",fill:"#EC4899"}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 2H5V4H3V6H1V12H3V14H5V16H7V18H9V20H11V22H13V20H15V18H17V16H19V14H21V12H23V6H21V4H19V2H15V4H13V6H11V4H9V2ZM9 4V6H11V8H13V6H15V4H19V6H21V12H19V14H17V16H15V18H13V20H11V18H9V16H7V14H5V12H3V6H5V4H9Z",fill:"#020617"}),(0,er.jsx)("rect",{x:"17",y:"6",width:"2",height:"2",fill:"white"}),(0,er.jsx)("rect",{x:"17",y:"8",width:"2",height:"2",fill:"white"}),(0,er.jsx)("rect",{x:"15",y:"6",width:"2",height:"2",fill:"white"})]}):(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...ei,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 2H5V4H3V6H1V12H3V14H5V16H7V18H9V20H11V22H13V20H15V18H17V16H19V14H21V12H23V6H21V4H19V2H15V4H13V6H11V4H9V2ZM9 4V6H11V8H13V6H15V4H19V6H21V12H19V14H17V16H15V18H13V20H11V18H9V16H7V14H5V12H3V6H5V4H9Z",fill:"#64748B"})})})}},83782:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{color:et="#9F1239",width:en=17,height:ei=18,...eo}=$;return(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:en,height:ei,viewBox:"0 0 17 18",fill:"none",...eo,children:[(0,er.jsx)("rect",{width:"1.41429",height:"1.5",transform:"matrix(1 0 0 -1 7.77832 6.75)",fill:et}),(0,er.jsx)("rect",{width:"1.41429",height:"4.5",transform:"matrix(1 0 0 -1 7.77832 12.75)",fill:et}),(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0213 2.25H4.94991V3.75H3.53562V5.25H2.12134V12.75H3.53562V14.25H4.94991V15.75H12.0213V14.25H13.4356V12.75H14.8499V5.25H13.4356V3.75H12.0213V2.25ZM12.0213 3.75V5.25H13.4356V12.75H12.0213V14.25H4.94991V12.75H3.53562V5.25H4.94991V3.75H12.0213Z",fill:et})]})}},79311:function($,et,en){"use strict";en.d(et,{Dkj:function(){return ei.Z},x8P:function(){return Close},prg:function(){return TextAlignJustify},olm:function(){return Search}});var er=en(67294);let Close=$=>(0,er.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"24",height:"24",fill:"
1841currentColor",xmlns:"http://www.w3.org/2000/svg"},$),(0,er.createElement)("path",{d:"M7 19H5V17H7V19ZM19 19H17V17H19V19ZM9 15V17H7V15H9ZM17 17H15V15H17V17ZM11 15H9V13H11V15ZM15 15H13V13H15V15ZM13 13H11V11H13V13ZM11 11H9V9H11V11ZM15 11H13V9H15V11ZM9 9H7V7H9V9ZM17 9H15V7H17V9ZM7 7H5V5H7V7ZM19 7H17V5H19V7Z"})),Search=$=>(0,er.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},$),(0,er.createElement)("path",{d:"M22 22h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-6-2H6v-2h8v2Zm4 0h-2v-2h2v2ZM6 16H4v-2h2v2Zm10 0h-2v-2h2v2ZM4 14H2V6h2v8Zm14 0h-2V6h2v8ZM6 6H4V4h2v2Zm10 0h-2V4h2v2Zm-2-2H6V2h8v2Z"})),TextAlignJustify=$=>(0,er.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},$),(0,er.createElement)("path",{d:"M2 5h20v2H2zm0 6h20v2H2zm0 6h20v2H2z"}));var ei=en(62030)},62030:function($,et,en){"use strict";var er=en(85893);et.Z=function($){let{...et}=$;return(0,er.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",...et,children:(0,er.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 4V2H9.99999V4H5.00018V6H19.0002V4H14ZM18.9999 16H4.99994V12H2.99994V16V18L7.99975 18V22H9.99975V18H13.9998V20H10V22H13.9998V22H15.9998V18L20.9999 18V16L21 12H19V6H17V14H18.9999V16ZM5.00018 6V14H7.00018V6H5.00018Z"})})}},92152:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(5802);function _templateObject(){let $=(0,er._)(["\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n overflow: hidden;\n position: relative;\n display: flex;\n align-items: center;\n /* width: 100%; */\n height: 100%;\n border-radius: inherit;\n width: fit-content;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .image-skeleton-loader {\n pointer-events: ",";\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: ",";\n background-size: 200% 100%;\n animation: "," 3s linear infinite;\n }\n"]);return _templateObject1=function(){return $},$}let eu=(0,es.keyframes)(_templateObject()),ed=es.default.div.withConfig({componentId:"sc-7d9be0e9-0"})(_templateObject1(),$=>{let{$zoom:et}=$;return et?"auto":"none"},$=>{let{theme:et}=$;return"dark"===et.mode?"linear-gradient(90deg, #0f172a 25%, #1e293b 50%, #0f172a 75%)":"linear-gradient(90deg, #F1F5F9 25%, #F8FAFC 50%, #F1F5F9 75%)"},eu);et.Z=function($){let{src:et,alt:en,zoomEnabled:er=!1,fallbackSrc:es="/images/image-not-found.png",skeleton:eu=!1,...eh}=$,[ep,em]=(0,eo.useState)(!1),ef=(0,eo.useCallback)($=>{$.target.src=es},[es]),eg=(0,eo.useCallback)(()=>em(!0),[]);return(0,ei.jsxs)(ed,{...eh,$zoom:er,children:[er?(0,ei.jsx)(el.Z,{src:et,alt:en,onError:ef,onLoad:eg}):(0,ei.jsx)("img",{src:et,alt:en,onError:ef,onLoad:eg}),(!ep||eu)&&(0,ei.jsx)("div",{className:"image-skeleton-loader","aria-hidden":"true"})]})}},25294:function($,et,en){"use strict";en.d(et,{Z:function(){return onBoarding_ObMessage}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(20759),el=en(609),eu=en(9473),icons_TriangleArrow=function($){let{outLine:et="#CBD5E1",fill:en="#F1F5F9",lightModeOnly:er=!1,...eo}=$,es=(0,eu.v9)(el.o4)||"dark",ed="dark"===es;return(0,ei.jsxs)("svg",{width:"22",height:"12",viewBox:"0 0 22 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...eo,children:[(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2H10V4H8V6H6V8H4V10H2V12H20V10H18V8H16V6H14V4H12V2Z",fill:en||(ed?er?"#F1F5F9":"#1E293B":"#F1F5F9")}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 0H12V2H10V0ZM8 4V2H10V4H8ZM6 6V4H8V6H6ZM4 8V6H6V8H4ZM2 10H4V8H2V10ZM2 10V12H0V10H2ZM14 4H12V2H14V4ZM16 6H14V4H16V6ZM18 8H16V6H18V8ZM20 10H18V8H20V10ZM20 10H22V12H20V10Z",fill:et||(ed?er?"#CBD5E1":"#475569":"#CBD5E1")})]})},ed=en(47158),eh=en(45198);
1841function _templateObject(){let $=(0,er._)(["\n width: 100%;\n position: relative;\n flex: 1;\n\n &.first-scene {\n "," {\n width: 100%;\n .triangle-arrow {\n position: absolute;\n left: 50%;\n transform: translate(-50%, 0%);\n z-index: 1;\n\n "," {\n top: -10px;\n }\n\n "," {\n top: -8.5px;\n }\n }\n }\n\n "," {\n width: 679px;\n\n .triangle-arrow {\n transform: translate(-50%, -1.4px);\n }\n }\n }\n\n .message-container {\n background: ",";\n min-height: 60px;\n .python-typewriter {\n all: unset;\n margin: 0px;\n\n span {\n margin: 0px;\n color: ",';\n font-family: "PixelGridS";\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 164%;\n letter-spacing: 0.48px;\n\n text-shadow: 0 2px 0\n ',';\n\n strong {\n font-family: "PixelGridM";\n }\n }\n\n .python-typewriter-cursor {\n display: none;\n }\n }\n }\n\n .triangle-arrow {\n position: absolute;\n left: -15px;\n top: 50%;\n transform: translateY(-50%) rotate(-90deg);\n z-index: 1;\n }\n']);return _templateObject=function(){return $},$}let ep=eo.default.div.withConfig({componentId:"sc-e002522a-0"})(_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{isDark:et,theme:en}=$;return et?en.colors.palette.grey["800"]:en.colors.palette.grey["100"]},$=>{let{isDark:et,theme:en}=$;return et?en.colors.palette.grey["50"]:en.colors.palette.grey["950"]},$=>{let{isDark:et,theme:en}=$;return et?en.colors.palette.grey["700"]:en.colors.palette.grey["200"]});var onBoarding_ObMessage=function($){let{message:et,children:en=null,firstScene:er=!1,height:eo="auto",lightModeOnly:em=!1,typingSpeed:ef=25,setAction:eg=()=>{}}=$,ey=(0,eu.v9)(el.o4)||"dark",ev=!em&&"dark"===ey,ex=(0,eh.i)(),e_=ex.width<768;return(0,ei.jsxs)(ep,{isDark:ev,className:er||e_?"first-scene":"default-styles",children:[(0,ei.jsx)(icons_TriangleArrow,{className:"triangle-arrow",lightModeOnly:em,outLine:"",fill:""}),(0,ei.jsxs)(es.Z,{className:"message-container",borderColor:ev?"475569":"CBD5E1",style:{padding:er?"24px":"16px",minHeight:er?"76px":eo},children:[(0,ei.jsx)(ed.Z,{text:et,typingSpeed:ef,setAction:()=>eg()}),en]})]},et)}},45540:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(61666),el=en(74347),eu=en(609),ed=en(9473);function _templateObject(){let $=(0,er._)(["\n padding: 10px;\n height: 100%;\n max-height: calc(100% - 2rem);\n max-width: calc(100% - 2rem);\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n background-color: ",";\n\n .icon-container {\n padding: 4px;\n border-radius: 4px;\n line-height: 1;\n transition-duration: 0.2s;\n\n svg {\n transition-duration: 0px;\n\n path {\n fill: ",";\n }\n }\n\n :hover {\n background-color: ",";\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n\n .cross-icon {\n display: flex;\n justify-content: end;\n transition-duration: 0px;\n }\n\n .cross-with-header {\n padding: 8px 8px 8px 32px;\n display: flex;\n align-items: center;\n border-bottom: 2px solid ",";\n margin: 0px -8px;\n\n p {\n color: ",";\n font-size: 20px;\n font-weight: 700;\n line-height: 120%;\n flex: 1;\n }\n\n .icon-container {\n padding: 4px;\n border-radius: 4px;\n line-height: 1;\n transition-duration: 0.2s;\n }\n }\n\n .inner-popup-container {\n padding: 0px 24px 24px 24px;\n }\n"]);return _templateObject=function(){return $},$}let eh=(0,eo.default)(es.Z).withConfig({componentId:"sc-42b53b31-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["800"]:et.colors.palette.grey["100"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["400"]:et.colors.palette.blue["700"]},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.text.primary});et.Z=function($){let{children:et,className:en="",iconAction:er,popupContainerStyles:eo={},headerTitle:es="",...ep}=$,em=(0,ed.v9)(eu.o4)||"dark",ef={withoutTitle:(0,ei.jsx)("div",{className:"cross-icon",children:(0,ei.jsx)("div",{className:"icon-container nes-pointer",onClick:()=>er(),children:(0,ei.jsx)(el.Z,{})})}),withTitle:(0,ei.jsxs)("div",{className:"cross-with-header",children:[(0,ei.jsx)("p",{children:es}),(0,ei.jsx)("div",{className:"icon-container nes-pointer",onClick:()=>er(),children:(0,ei.jsx)(el.Z,{})})]})};return(0,ei.jsxs)(eh,{borderColor:"dark"===em?"475569":"CBD5E1",className:en,style:eo,onClick:$=>$.stopPropagation(),children:[ef[es?"withTitle":"withoutTitle"],(0,ei.jsx)("div",{...ep,className:"inner
1841-popup-container",children:et})]})}},61666:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);function _templateObject(){let $=(0,er._)(["\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 3;\n border-image-width: 6px;\n border-style: solid;\n border-width: 0px;\n border-image-source: ",";\n\n position: relative;\n clip-path: polygon(\n 6px 0px,\n 6px 2px,\n 4px 2px,\n 4px 4px,\n 2px 4px,\n 2px 6px,\n 0px 6px,\n 0px 8px,\n 0px calc(100% + -6px),\n 2px calc(100% + -6px),\n 2px calc(100% + -4px),\n 4px calc(100% + -4px),\n 4px calc(100% + -2px),\n 6px calc(100% + -2px),\n 6px calc(100% + 0px),\n 8px calc(100% + 0px),\n calc(100% + -6px) calc(100% - 0px),\n calc(100% + -6px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 8px),\n calc(100% - 0px) 6px,\n calc(100% - 2px) 6px,\n calc(100% - 2px) 4px,\n calc(100% - 4px) 4px,\n calc(100% - 4px) 2px,\n calc(100% - 6px) 2px,\n calc(100% - 6px) 0px,\n calc(100% - 8px) 0px\n );\n"]);return _templateObject=function(){return $},$}let es=eo.default.dialog.withConfig({componentId:"sc-f909306d-0"})(_templateObject(),$=>{let{borderColor:et}=$;return"url(\"data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1310_2574)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0H3V1H2V2H1V3H0V4V5H1V6H2V7H3V8H4H5V7H6V6H7V5H8V4V3H7V2H6V1H5V0H4ZM5 1V2H6V3H7V4V5H6V6H5V7H4H3V6H2V5H1V4V3H2V2H3V1H4H5Z' fill='%23".concat(et,"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1310_2574'%3E%3Crect width='8' height='8' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\")")});et.Z=function($){let{children:et,className:en="",borderColor:er="000000",...eo}=$;return(0,ei.jsx)(es,{className:en,borderColor:er,...eo,children:et})}},8173:function($,et,en){"use strict";var er=en(67294),ei=en(73935);et.Z=function($){let{children:et}=$,[en,eo]=(0,er.useState)(!1);return(0,er.useEffect)(()=>(eo(!0),()=>eo(!1)),[]),en?(0,ei.createPortal)(et,document.body):null}},77265:function($,et,en){"use strict";en.d(et,{Nj:function(){return GlobalTooltipProvider},lL:function(){return useTooltip}});var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(73935);function _templateObject(){let $=(0,er._)(["\n position: fixed;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 14px;\n max-width: 250px;\n z-index: 1000;\n pointer-events: none;\n opacity: ",";\n transition: opacity 0.2s ease-in-out;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n background: ",';\n font-family: "Mulish", sans-serif;\n\n color: ',";\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n text-align: center;\n z-index: 99999;\n"]);return _templateObject=function(){return $},$}let eu=(0,eo.createContext)(null);function Arrow($){let{position:et,customColor:en}=$,er=(0,es.useTheme)();return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"12",viewBox:"0 0 6 12",fill:"none",className:"arrow arrow-".concat(et),style:{position:"absolute",..."top"===et&&{top:"90%",left:"50%",transform:"translateX(-50%) rotate(-90deg)"},..."bottom"===et&&{bottom:"90%",left:"50%",transform:"translateX(-50%) rotate(90deg)"},..."left"===et&&{top:"50%",left:"99.5%",transform:"translateY(-50%) rotate(180deg)"},..."right"===et&&{top:"50%",right:"99%",transform:"translateY(-50%)"},..."top-left"===et&&{top:"90%",left:"10%",transform:"rotate(-90deg)"},..."top-right"===et&&{top:"90%",right:"10%",transform:"rotate(-90deg)"},..."bottom-left"===et&&{bottom:"90%",left:"10%",transform:"rotate(90deg)"},..."bottom-right"===et&&{bottom:"90%",right:"10%",transform:"rotate(90deg)"}},children:(0,ei.jsx)("path",{d:"M0 6L6 0L6 12L0 6Z",fill:en||er.colors.text.primary})})}let ed=es.default.div.withConfig({componentId:"sc-6a25aa08-0"}
1841)(_templateObject(),$=>$.visible?1:0,$=>$.customColor||$.theme.colors.text.primary,$=>$.customTextColor||$.theme.colors.background.grey.primary);function ClientOnlyPortal($){let{children:et}=$,[en,er]=(0,eo.useState)(!1);return(0,eo.useEffect)(()=>(er(!0),()=>er(!1)),[]),en?(0,el.createPortal)(et,document.body):null}function GlobalTooltipProvider($){let{children:et}=$,[en,er]=(0,eo.useState)({visible:!1,content:"",targetRect:null,position:"top",showArrow:!0,customColor:void 0,customTextColor:void 0});return(0,eo.useEffect)(()=>{if(en.visible)return document.addEventListener("scroll",scrollHandler,{passive:!0,capture:!0}),()=>document.removeEventListener("scroll",scrollHandler,{capture:!0});function scrollHandler(){er($=>({...$,visible:!1}))}},[en.visible]),(0,ei.jsxs)(eu.Provider,{value:{showTooltip:function($,et,en){let ei=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!window.matchMedia("(hover: hover)").matches)return;let eo=null==et?void 0:et.getBoundingClientRect();er({visible:!0,content:$,targetRect:eo,position:en,...ei})},hideTooltip:function(){er($=>({...$,visible:!1}))}},children:[et,en.content&&(0,ei.jsx)(ClientOnlyPortal,{children:(0,ei.jsxs)(ed,{visible:en.visible,customColor:en.customColor,customTextColor:en.customTextColor,style:function(){if(!en.targetRect)return{top:0,left:0};let{targetRect:$,position:et}=en;switch(et){case"top":default:return{left:$.left+$.width/2,top:$.top-10,transform:"translate(-50%, -100%)"};case"bottom":return{left:$.left+$.width/2,top:$.bottom+10,transform:"translateX(-50%)"};case"left":return{left:$.left-10,top:$.top+$.height/2,transform:"translate(-100%, -50%)"};case"right":return{left:$.right+10,top:$.top+$.height/2,transform:"translateY(-50%)"};case"top-left":return{left:$.left,top:$.top-10,transform:"translateY(-100%)"};case"top-right":return{width:180,left:$.right-180,top:$.top-10,transform:"translateY(-100%)"};case"bottom-left":return{left:$.left,top:$.bottom+20};case"bottom-right":return{width:180,left:$.right-180,top:$.bottom+20}}}(),children:[en.content,!1!==en.showArrow&&(0,ei.jsx)(Arrow,{position:en.position,customColor:en.customColor})]})})]})}function useTooltip(){let $=(0,eo.useContext)(eu);if(!$)throw Error("useTooltip must be used within a GlobalTooltipProvider");return $}},65893:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(43493),el=en(9473),eu=en(609),ed=en(41664),eh=en.n(ed);function _templateObject(){let $=(0,er._)(['\n font-family: "Mulish", sans-serif;\n display: flex;\n align-items: center;\n gap: 12px;\n transition-duration: 0.2s;\n\n p {\n margin: 0px;\n }\n\n .liked-user-image {\n flex-shrink: 0;\n\n img {\n width: 48px;\n height: 48px;\n object-fit: cover;\n border-radius: 50%;\n :hover {\n transition-duration: 0.2s;\n opacity: 0.8;\n }\n }\n }\n\n .name-and-btn {\n flex: 1;\n display: flex;\n justify-content: space-between;\n\n .liked-user-info {\n display: flex;\n flex-direction: column;\n\n .name {\n color: ',";\n font-size: 16px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .username {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n\n .name,\n .username {\n :hover {\n text-decoration: underline;\n transition-duration: 0.2s;\n }\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let ep=eo.default.div.withConfig({componentId:"sc-93ab6dbe-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary});et.Z=function($){let{user:et,following:en,setFollowing:er,setShowViewFollow:eo=$=>{}}=$,ed=(0,el.v9)(eu.f8);return(0,ei.jsxs)(ep,{children:[(0,ei.jsx)("div",{className:"liked-user-image",children:(0,ei.jsx)(eh(),{href:"/@".concat(null==et?void 0:et.username),style:{textDecoration:"none"},onClick:()=>eo(!1),children:(0,ei.jsx)("img",{src:null==et?void 0:et.photoURL,alt:"liked user image",className:"nes-pointer"})})}),(0,ei.jsxs)("div",{className:"name-and-btn",children:[(0,ei.jsx)(eh(),{href:"/@".concat(null==et?void 0:et.username),style:{textDecoration:"none"},onClick:()=>eo(!1),children:(0,ei.jsxs)("div",{className:"liked-user-info nes-pointer",children:[(0,ei.jsx)("p",{className:"name",children:null==et?void 0:et.name}),(0,ei.jsxs)("p",{className:"username",children:["@",null==et?void 0:et.username]})]})}),(null==et?void 0:et.uid)!=ed&&(0,ei.jsx)(es.Z,{following:en,setFollowing:er,userToFollowUid:null==et?void 0:et.uid})]})]})}},16244:function($,et,en){"use strict";var er=en(67294);et.Z=function($,et){(0,er.useEffect)(()=>{let en=setTimeout(()=>{$()},et);return()=>{clearTimeout(en)}},[$,et])}},64742:function($,et,en){"use strict";en.d(et,{t:function(){return useIntercomControl}});var er=en(67294),ei=en(11163),eo=en(61149),es=en(9473),el=en(48645),eu=en(609),ed=en(37009);let eh=["/python","/intermediate-python","/numpy","/sql","/gen-ai","/pandas","/matplotlib","/machine-learning","/html","/css","/javascript","/intermediate-javascript","/react","/nodejs","/p5js","/command-line","/git-github","/github-copilot","/cpp","/c-sharp","/java","/data-structures-and-algorithms","/phaser","/lua","/challenges","/lumi","/daily-challenge","c-sharp","ui-ux-design","/builds","/build/","/community","/30-nites-of-code","/live"];function useIntercomControl(){let{pathname:$}=(0,ei.useRouter)(),et=(0,eo.o)(),en=(0,es.v9)(eu.ot),ep=(0,es.v9)(eu.IC),em=(0,es.v9)(ed.y3);(0,er.useEffect)(()=>{let en=eh.some(et=>$.includes(et));et.update({hideDefaultLauncher:en})},[$,et]),(0,er.useEffect)(()=>{(async function(){var $,er,ei,eo;if(!ep||!en||!ep.email)return;let es=await (0,el.F1)(),eu=await (0,el.oG)();et.update({email:ep.email,name:"Coder"!==ep.name?ep.name:"",customAttributes:{xp:(null==ep?void 0:null===($=ep.stats)||void 0===$?void 0:$.totalXp)||0,daysOnPlatform:(null==ep?void 0:null===(eo=ep.stats)||void 0===eo?void 0:null===(ei=eo.streaks)||void 0===ei?void 0:null===(er=ei.datesVisited)||void 0===er?void 0:er.length)||0,lessonsCompleted:em||0,club:es,githubStudent:eu}})})()},[et,en,em,ep])}},26642:function($,et,en){"use strict";function getLongestStreak($){let{days:et,currentDay:en}=$,parseDate=$=>new Date("20".concat($.slice(6,8),"-").concat($.slice(0,2),"-").concat($.slice(3,5))),isCompleted=$=>$.details&&Object.keys($.details).length>0,er=parseDate(en),ei=et.filter($=>parseDate($.date)<=er).sort(($,et)=>parseDate($.date)-parseDate(et.date)),eo=0,es=0,el=null;for(let $ of ei){let et=parseDate($.date);isCompleted($)?(el&&et-el==864e5?es++:es=1,eo=Math.max(eo,es),el=et):(es=0,el=null)}return eo}function getTotalDaysCompleted($){let{days:et,currentDay:en}=$,parseDate=$=>new Date("20".concat($.slice(6,8),"-").concat($.slice(0,2),"-").concat($.slice(3,5))),er=parseDate(en);return et.filter($=>parseDate($.date)<=er&&$.details&&Object.keys($.details).length>0).length}function getTotalMissedDays($){let{days:et,currentDay:en,daysCompleted:er}=$;if(er>=30)return 0;let parseDate=$=>new Date("20".concat($.slice(6,8),"-").concat($.slice(0,2),"-").concat($.slice(3,5)));console.log("currentDay",en);let ei=parseDate(en);return et.filter($=>{let et=parseDate($.date);return et<ei&&(!$.details||0===Object.keys($.details).length)}).length}function missedDays($){var et,en,er,ei;let{days:eo,dayIndex:es,currentDate:el}=$;if(0===es||(null===(en=eo[es])||void 0===en?void 0:null===(et=en.details)||void 0===et?void 0:et.twitterLink))return 0;-1===es&&(es=eo.length-1);let eu=0;for(let $=0;$<es;$++){let et=null===(ei=eo[es-$])||void 0===ei?void 0:null===(er=ei.details)||void 0===er?void 0:er.twitterLink,en=eo[es-$].date;if(en!==el){if(et)break;eu+=1}}return eu}en.d(et,{$V:function(){return getLongestStreak},IT:function(){return missedDays},oH:function(){return getTotalMissedDays},oQ:function(){return getTotalDaysCompleted}})},17249:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(609),es=en(67294),el=en(9473),eu=en(19521);
1841function _templateObject(){let $=(0,er._)(['\n font-family: "PixelGridM";\n\n margin-top: 2rem;\n '," {\n margin-bottom: 3.5rem;\n h3 {\n text-align: center;\n color: ",";\n margin-bottom: 2.5rem;\n font-size: 24px;\n margin-top: -1rem;\n }\n\n .outer-container {\n position: relative;\n overflow: hidden;\n .fader {\n z-index: 2;\n position: absolute;\n\n height: 100%;\n width: 50px;\n background-color: #0f1524;\n }\n\n .fader-left,\n .fader-right {\n position: absolute;\n top: 0px;\n height: 100%;\n width: 50px;\n }\n\n .fader-left {\n left: 0px;\n background: ",";\n }\n\n .fader-right {\n right: 0px;\n background: ",";\n }\n }\n\n .slider-track {\n display: flex;\n width: calc(250px * "," * 2);\n // slower on mobile\n animation: schoolscarousel\n calc(\n ","s\n )\n linear infinite;\n overflow: hidden;\n margin-left: -20rem;\n }\n\n .slider {\n transform: translateX(20%);\n // slower on mobile\n transition: calc(\n ","s\n )\n linear;\n }\n\n /* .slider:hover {\n transform: translateX(-110%);\n } */\n\n .image-container {\n width: 250px;\n display: flex;\n justify-content: center;\n align-items: center;\n\n img {\n width: 160px;\n height: auto;\n }\n\n img.amd-logo-dark {\n filter: brightness(0) invert(1);\n }\n\n img.apple-logo {\n width: 75px;\n min-width: 75px;\n max-width: 75px;\n }\n\n img.tesla-logo {\n width: 75px;\n min-width: 75px;\n max-width: 75px;\n }\n\n img.osu-logo {\n // Subtle shadow to look less pencil-y from the thin gray lines\n filter: ",";\n }\n }\n\n @keyframes schoolscarousel {\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(calc(250px * "," * -1));\n }\n }\n }\n\n "," {\n margin-bottom: 5rem;\n h3 {\n text-align: center;\n color: ",";\n margin-bottom: 4rem;\n font-size: 32px;\n margin-top: 0;\n }\n\n .outer-container {\n position: relative;\n overflow: hidden;\n .fader {\n width: 250px;\n }\n }\n\n .slider-track {\n display: flex;\n width: calc(250px * "," * 2);\n animation: schoolscarousel\n calc(","s) linear infinite;\n overflow: hidden;\n }\n\n .slider {\n transform: translateX(20%);\n transition: calc(","s) linear;\n }\n\n /* .slider:hover {\n transform: translateX(-110%);\n } */\n\n .image-container {\n width: 300px;\n margin: 0rem 2rem;\n display: flex;\n justify-content: center;\n align-items: center;\n\n img {\n width: 185px;\n min-width: 180px;\n max-width: 185px;\n height: auto;\n }\n\n img.MIT_logo {\n width: 165px;\n min-width: 165px;\n max-width: 165px;\n height: auto;\n }\n\n img.pinterest {\n transform: scale(0.5);\n }\n\n img.black-Deloitte {\n transform: scale(1.35);\n }\n\n img.amd-logo-dark {\n filter: brightness(0) invert(1);\n }\n\n img.apple-logo {\n width: 75px;\n min-width: 75px;\n max-width: 75px;\n }\n\n img.tesla-logo {\n width: 150px;\n min-width: 150px;\n max-width: 150px;\n }\n\n img.osu-logo {\n // Shadow to fix the pencil-y thin lines of the gray outline\n filter: ",";\n }\n }\n\n @keyframes schoolscarousel {\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(calc(250px * "," * -1));\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let ed=eu.default.div.withConfig({componentId:"sc-3938bed2-0"})(_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>$.theme.colors.text4,$=>$.coursePage?"light"===$.theme.mode?"linear-gradient(\n to right,\n rgba(253, 253, 253, 1) 20%,\n rgba(253, 253, 253, 0) 80%\n )":"linear-gradient(\n to right,\n rgba(2, 6, 23, 1) 20%,\n rgba(2, 6, 23, 0) 80%\n )":"light"===$.theme.mode?"linear-gradient(\n to right,\n rgba(253, 253, 253, 1) 20%,\n rgba(253, 253, 253, 0) 80%\n )":"linear-gradient(\n to right,\n rgba(15, 21, 36, 1) 20%,\n rgba(15, 21, 36, 0) 80%\n )",$=>$.coursePage?"light"===$.theme.mode?"linear-gradient(\n to left,\n rgba(253, 253, 253, 1) 20%,\n rgba(253, 253, 253, 0) 80%\n )":"linear-gradient(\n to left,\n rgba(2, 6, 23, 1) 20%,\n rgba(2, 6, 23, 0) 80%\n )":"light"===$.theme.mode?"linear-gradient(\n to left,\n rgba(253, 253, 253, 1) 20%,\n rgba(253, 253, 253, 0) 80%\n )":"linear-gradient(\n to left,\n rgba(15, 21, 36, 1) 20%,\n rgba(15, 21, 36, 0) 80%\n )",$=>$.schoolLogoCount,$=>6*$.schoolLogoCount,$=>6*$.schoolLogoCount,$=>"dark"===$.theme.mode?"drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.28))":"drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.16))",$=>$.schoolLogoCount,$=>{let{theme:et}=$;return et.breakpoints.sm},$=>$.theme.colors.text4,$=>$.schoolLogoCount,$=>4*$.schoolLogoCount,$=>4*$.schoolLogoCount,$=>"dark"===$.theme.mode?"drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.28))":"drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.16))",$=>$.schoolLogoCount);et.Z=function($){let{coursePage:et=!1}=$,en=(0,es.useRef)(null),er=(0,el.v9)(eo.o4)||"dark",eu="dark"===er,eh=[{className:"columbia-logo",src:"/images/school_logos/columbia-logo.png"},{className:"csforall-logo",src:"/images/school_logos/csforall-logo.svg"},{className:eu?"amd-logo amd-logo-dark":"amd-logo",src:"/images/school_logos/amd-logo.svg"},{className:"divhacks-logo",src:"/images/school_logos/divhacks-logo.png"},{className:"lehman-logo",src:"/images/school_logos/lehman-logo.png"},{className:"csta-white-removebg-preview",src:eu?"/images/school_logos/csta-white-removebg-preview.png":"/images/school_logos/blackcsta.webp"},{className:"tesla-logo",src:"/images/school_logos/tesla-logo.png"},{className:"hacknyu",src:"/images/school_logos/hacknyu.png"},{className:"uber-eats",src:eu?"/images/school_logos/uber-eats-white.svg":"/images/school_logos/uber-eats-black.svg"},{className:"Sullivan",src:"/images/school_logos/Sullivan.png"},{className:"apple-logo",src:"/images/school_logos/apple_logo_grey.svg"},{className:"spotify-logo",src:"/images/school_logos/spotify-logo.png"},{className:"MIT_logo",src:"/images/school_logos/MIT_logo.png"},{className:eu?"Deloitte_1":"black-Deloitte",src:eu?"/images/school_logos/Deloitte_1.svg":"/images/school_logos/blackdeliote.png"},{className:"pinterest",src:"/images/school_logos/pinterest.png"},{className:"osu-logo",src:"/images/school_logos/ohio-state-university.png"},{className:"spacex",src:"/images/school_logos/spacex.svg"}];return(0,es.useEffect)(()=>{let $=en.current;function handleAnimationEnd(){$.style.transition="none",$.style.transform="translateX(0)",$.offsetWidth,$.style.transition=""}return $.addEventListener("animationiteration",handleAnimationEnd),()=>$.removeEventListener("animationiteration",handleAnimationEnd)},[]),(0,ei.jsxs)(ed,{coursePage:et,schoolLogoCount:eh.length,children:[(0,ei.jsx)("h3",{children:"Trusted by learners from"}),(0,ei.jsxs)("div",{className:"outer-container",children:[(0,ei.jsx)("div",{className:"fader fader-left"}),(0,ei.jsx)("div",{className:"fader fader-right"}),(0,ei.jsx)("div",{className:"slider",children:(0,ei.jsx)("div",{ref:en,className:"slider-track",children:[...eh,...eh].map(($,et)=>(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{className:$.className,src:$.src,alt:"school image"})},"".concat($.className,"-").concat(et)))})})]})]})}},57774:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(9473),es=en(19521),el=en(609);
1841function _templateObject(){let $=(0,er._)(["\n border-radius: 100px;\n\n border: 2px solid\n ",';\n\n width: 208px;\n height: 41px;\n display: flex;\n font-family: "Work Sans", sans-serif;\n padding: 2px;\n position: relative;\n font-family: "Mulish", sans-serif;\n\n button {\n background-color: transparent;\n border: none;\n outline: none;\n width: 100%;\n border-radius: 100px;\n z-index: 2;\n color: ',";\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n }\n\n .slider {\n transition-duration: 0.2s;\n z-index: 1;\n background-color: green;\n position: absolute;\n top: 2px;\n left: calc(0% + 2px);\n left: ",";\n background-color: ",";\n width: calc(50% - 2px);\n height: calc(100% - 4px);\n }\n\n .inactive {\n color: ",";\n }\n"]);return _templateObject=function(){return $},$}let eu=es.default.div.withConfig({componentId:"sc-903a765-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"===et.mode?"rgba(255, 255, 255, 0.3)":"rgba(2, 6, 23, 0.30)"},$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{annual:et}=$;return et?"calc(0% + 2px)":"calc(50%)"},$=>{let{theme:et}=$;return"dark"===et.mode?"#fff":"#020617"},$=>{let{theme:et}=$;return"dark"===et.mode?"#FFFFFF":"#020617"});et.Z=function($){let{annual:et,setAnnual:en}=$,er=(0,eo.v9)(el.o4);return(0,ei.jsxs)(eu,{className:"nes-pointer",darkMode:"dark"===er,annual:et,children:[(0,ei.jsx)("button",{className:"slider"}),(0,ei.jsx)("button",{onClick:()=>en(!0),className:et?"active":"inactive",children:"Yearly"}),(0,ei.jsx)("button",{onClick:()=>en(!1),className:et?"inactive":"active",children:"Monthly"})]})}},7470:function($,et,en){"use strict";en.d(et,{Z:function(){return characterCustomizer_AnimatedAvatarCanvas}});var er=en(85893),ei=en(67294);en(89762);var eo=en(80109),es=en(54575);async function generateAnimationFrames($){let et=eo.rw[$.archetypeId];if(!et)return;let en=[...et.layers].sort(($,et)=>$.zIndex-et.zIndex);if(!en.length)return;let er=[];en.forEach(et=>{var en,ei;let es=null!==(ei=null===(en=$.layerOverrides)||void 0===en?void 0:en[et.assetId])&&void 0!==ei?ei:et.assetId,el=eo.J1[es];el&&er.push({asset:el,zIndex:et.zIndex})});let ei=($.extraLayers||[]).map($=>{let et=eo.J1[$.assetId];return et?{asset:et,zIndex:$.zIndex}:null}).filter(Boolean),el=[...er,...ei].sort(($,et)=>$.zIndex-et.zIndex);if(!el.length)return;let{asset:eu}=el[0],{frameWidth:ed,frameHeight:eh,columns:ep}=eu.standing,em=[];for(let et=0;et<ep;et++){let en=document.createElement("canvas");en.width=4*ed,en.height=4*eh;let er=en.getContext("2d");if(!er)continue;for(let en of(er.imageSmoothingEnabled=!1,el)){let ei=en.asset;try{let en=await function($){return new Promise((et,en)=>{let er=new Image;er.crossOrigin="anonymous",er.onload=()=>et(er),er.onerror=$=>en($),er.src=$})}(ei.standing.source),eo=document.createElement("canvas");eo.width=ed,eo.height=eh;let el=eo.getContext("2d");if(!el)continue;let eu=et*ed;el.drawImage(en,eu,0,ed,eh,0,0,ed,eh),function($,et,en){if(!et.palettes||!et.palettes.length)return;let er=$.getContext("2d");if(!er)return;let ei=new Map;if(et.palettes.forEach($=>{let er=en[$.slotId];if(!er)return;let eo=(0,es.zE)($.slotId,$.shades,er,et.id);eo.forEach(($,et)=>ei.set(et,$))}),!ei.size)return;let eo=er.getImageData(0,0,$.width,$.height);(0,es.w)(eo,ei),er.putImageData(eo,0,0)}(eo,ei,$.colors),er.drawImage(eo,0,0,ed,eh,0,0,4*ed,4*eh)}catch($){console.warn("Failed to build layer for animation frame",ei.id,$)}}let ei=er.getImageData(0,0,en.width,en.height);em.push(ei)}return{frames:em,frameWidth:4*ed,frameHeight:4*eh,scale:4}}var characterCustomizer_AnimatedAvatarCanvas=function($){let{config:et,className:en,frameDelay:eo=200}=$,es=(0,ei.useRef)(null),[el,eu]=(0,ei.useState)(null),[ed,eh]=(0,ei.useState)(!0),[ep,em]=(0,ei.useState)(null),ef=(0,ei.useRef)(0),eg=(0,ei.useRef)(null),ey=(0,ei.useRef)(0);return((0,ei.useEffect)(()=>{let $=!1;return async function(){try{eh(!0),em(null);let en=await generateAnimationFrames(et);!$&&en&&(eu(en),ef.current=0)}catch(et){$||(console.error("Failed to generate animation frames:",et),em("Failed to load animation"))}finally{$||eh(!1)}}(),()=>{$=!0}},[et]),(0,ei.useEffect)(()=>
1841{if(!el||!es.current)return;let $=es.current,et=$.getContext("2d");if(et)return $.width=el.frameWidth,$.height=el.frameHeight,eg.current=requestAnimationFrame(function animate(en){if(!el||!et)return;let er=en-ey.current;if(er>=eo){et.clearRect(0,0,$.width,$.height);let er=el.frames[ef.current];er&&et.putImageData(er,0,0),ef.current=(ef.current+1)%el.frames.length,ey.current=en}eg.current=requestAnimationFrame(animate)}),()=>{eg.current&&cancelAnimationFrame(eg.current)}},[el,eo]),ed)?(0,er.jsx)("div",{className:en,children:"Loading..."}):ep?(0,er.jsx)("div",{className:en,children:ep}):(0,er.jsx)("canvas",{ref:es,className:en,style:{imageRendering:"pixelated"}})}},81043:function($,et,en){"use strict";en.d(et,{Z:function(){return characterCustomizer_CharacterCustomizer}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(73845),el=en(609),eu=en(9473),ed=en(76190);function _templateObject(){let $=(0,er._)(["\n display: flex;\n\n button {\n border: none;\n background-color: transparent;\n outline: none;\n border: 2px solid ",";\n padding: 8px 10px;\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n width: 100px;\n border-radius: 4px;\n\n :hover {\n transition-duration: 0.2s;\n background-color: ",";\n }\n }\n\n .custom {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .classic {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n .divider {\n width: 2px;\n background-color: ",";\n }\n\n .selected {\n background-color: ",";\n border-color: ",";\n color: ",";\n }\n"]);return _templateObject=function(){return $},$}let eh=eo.default.div.withConfig({componentId:"sc-1defb39-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.dark},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var characterCustomizer_CharacterSwitcher=function($){let{customizerType:et,forOnboarding:en}=$,er=(0,es.T)();function updateCustomizer($){let{type:et}=$;er((0,ed.bs)(et))}return(0,eu.v9)(el.s2),(0,eu.v9)(el.$u),(0,ei.jsxs)(eh,{children:[(0,ei.jsx)("button",{className:"custom ".concat("custom"===et&&"selected"),onClick:()=>{updateCustomizer({type:"custom"})},children:"Custom"}),(0,ei.jsx)("div",{className:"divider"}),(0,ei.jsx)("button",{className:"classic ".concat("classic"===et&&"selected"),onClick:()=>{updateCustomizer({type:"classic"})},children:"Classic"})]})},ep=en(20759),em=en(67294),ef=en(73857),icons_CharacterPlatform=function($){let{background:et,color:en="black",...er}=$,eo=(0,eu.v9)(ed.CE);console.log({background:et});let es=eo.find($=>$.background===et),el=es?es.svg:"#E2E8F0";return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"162",height:"25",viewBox:"0 0 162 25",fill:"none",...er,children:(0,ei.jsx)("ellipse",{cx:"81",cy:"12.5",rx:"81",ry:"12.5",fill:el})})},eg=en(82846),ey=en(7470);function CustomizerViewport_templateObject(){let $=(0,er._)(["\n clip-path: polygon(\n 4px 0px,\n 4px 2px,\n 2px 2px,\n 2px 4px,\n 0px 4px,\n 0px calc(100% - 4px),\n 2px calc(100% - 4px),\n 2px calc(100% - 2px),\n 4px calc(100% - 2px),\n 4px 100%,\n 100% 100%,\n 100% 0p
1841x\n );\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n\n background-color: ",";\n border-right: 2px solid ",";\n padding: 16px 0px;\n\n .character-wrapper {\n border-radius: 8px;\n padding: 0px;\n\n "," {\n padding: 34px;\n }\n\n .inner-character-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: end;\n width: 102.74px;\n height: 102.74px;\n\n "," {\n width: 180px;\n height: 180px;\n }\n\n img,\n canvas {\n height: 100%;\n width: auto;\n image-rendering: pixelated;\n z-index: 2;\n margin-bottom: -20px;\n }\n\n svg {\n z-index: 1;\n max-width: 100%;\n ellipse {\n /* fill: ","; */\n }\n }\n\n .no-background {\n ellipse {\n fill: ",";\n }\n }\n }\n }\n\n button {\n svg {\n margin-right: 8px;\n\n path {\n fill: ",";\n }\n }\n }\n"]);return CustomizerViewport_templateObject=function(){return $},$}let ev=eo.default.div.withConfig({componentId:"sc-337b978e-0"})(CustomizerViewport_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.text.primary});var characterCustomizer_CustomizerViewport=function($){let{isCustomizable:et}=$,en=(0,es.T)(),er=(0,eu.v9)(ed.Lb),eo=(0,eu.v9)(el.jl),eh=(0,eu.v9)(el.$u)||0,ep=(0,eu.v9)(ed.aW),ex=(0,eu.v9)(ed.Om),e_=(0,eu.v9)(el.f8),ew=(0,eu.v9)(el.fI);(0,em.useEffect)(()=>{if(ew.config&&e_){let $=(0,eg.c)(ew.config);en((0,ed.rW)($))}},[null==ew?void 0:ew.config,en,e_]);let ek=(0,em.useMemo)(()=>(0,eg.W)(ex,ep||"#FFFFFF00"),[ex,ep]);return(0,ei.jsxs)(ev,{style:{backgroundColor:ep},children:[(0,ei.jsx)("div",{className:"character-wrapper",children:(0,ei.jsxs)("div",{className:"inner-character-wrapper",children:[et?(0,ei.jsx)(ey.Z,{config:ek}):(0,ei.jsx)("img",{src:eo[eh],alt:"character image"}),(0,ei.jsx)(icons_CharacterPlatform,{background:ep,className:!ep&&"no-background"})]})}),(0,ei.jsx)("div",{style:{display:"flex",gap:"8px"},children:(0,ei.jsxs)(ef.Z,{variant:"subtle",onClick:()=>(function(){if("custom"===er&&en((0,ed.rZ)()),"classic"===er){let $=eo.length-1,et=Math.floor(Math.random()*$);en((0,el.Ii)({characterModelIndex:et}))}})(),children:[(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,ei.jsx)("path",{d:"M16.9609 11.5977C17.418 11.7383 17.6641 12.1953 17.5234 12.6523C16.5391 15.9922 13.4453 18.3125 9.96484 18.3125C7.1875 18.3125 4.62109 16.8008 3.21484 14.4453V18.0312C3.21484 18.5234 2.86328 18.875 2.37109 18.875C1.91406 18.875 1.52734 18.5234 1.52734 18.0312V12.4062C1.52734 11.9492 1.91406 11.5625 2.37109 11.5625H7.99609C8.48828 11.5625 8.83984 11.9492 8.83984 12.4062C8.83984 12.8984 8.45312 13.25 7.99609 13.25H4.44531C5.5 15.2891 7.60938 16.625 9.96484 16.625C12.707 16.625 15.168 14.7969 15.9062 12.1602C16.0469 11.7031 16.5039 11.457 16.9609 11.5977ZM17.5938 2C18.0508 2 18.4375 2.38672 18.4375 2.84375V8.46875C18.4375 8.96094 18.0508 9.3125 17.5938 9.3125H11.9688C11.4766 9.3125 11.125 8.96094 11.125 8.46875C11.125 8.01172 11.4766 7.625 11.9688 7.625H15.4844C14.4297 5.62109 12.3203 4.25 10 4.25C7.25781 4.25 4.79688 6.11328 4.02344 8.71484C3.91797 9.17188 3.46094 9.41797 3.00391 9.27734C2.54688 9.17188 2.30078 8.67969 2.40625 8.25781C3.39062 4.91797 6.51953 2.5625 10 2.5625C12.7773 2.5625 15.3438 4.10938 16.75 6.46484V2.84375C16.75 2.38672 17.1016 2 17.5938 2Z",fill:"black"})}),"Random"]})})]})},characterCustomizer_PersonIcon=function($){let{...et}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{d:"M22.667 12H20V29.333H17.333V21.333H14.667V29.333H12V12H9.33301V9.33301H22.667V12ZM6.66699 17.333H4V14.667H6.66699V17.333ZM28 17.333H25.333V14.667H28V17.333ZM9.33301 14.667H6.66699V12H9.33301V14.667ZM25.333 14.667H22.667V12H25.333V14.667ZM18.667 8H13.333V2.66699H18.667V8Z",fill:"#020617"})})}
1841,characterCustomizer_BackgroundIcon=function($){let{...et}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{d:"M9.33301 6.66699H22.667V2.66699H25.333V6.66699H29.333V9.33301H25.333V22.667H29.333V25.333H25.333V29.333H22.667V25.333H9.33301V29.333H6.66699V25.333H2.66699V22.667H6.66699V9.33301H2.66699V6.66699H6.66699V2.66699H9.33301V6.66699ZM9.33301 22.667H22.667V9.33301H9.33301V22.667Z",fill:"#64748B"})})},characterCustomizer_HairIcon=function($){let{...et}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{d:"M22.667 29.333H9.33301V26.667H22.667V29.333ZM9.33301 26.667H6.66699V24H9.33301V26.667ZM25.333 26.667H22.667V24H25.333V26.667ZM22.667 5.33301H25.333V8H28V24H25.333V16H22.667V13.333H20V10.667H17.333V13.333H14.667V16H10.667V18.667H6.66699V24H4V8H6.66699V5.33301H9.33301V2.66699H22.667V5.33301Z",fill:"#94A3B8"})})},characterCustomizer_ShirtIcon=function($){let{...et}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{d:"M30.667 14.667H25.333V28H6.66699V14.667H1.33301V4H12V6.66699H4V12H9.33301V25.333H22.667V12H28V6.66699H20V4H30.667V14.667ZM20 9.33301H12V6.66699H20V9.33301Z",fill:"#94A3B8"})})};function CustomizerOptions_templateObject(){let $=(0,er._)(["\n padding: 0px;\n border-bottom: 2px solid ",";\n display: flex;\n align-items: center;\n"]);return CustomizerOptions_templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n padding: 10px 8px;\n border-bottom: 2px solid transparent;\n flex: 1;\n height: 100%;\n display: flex;\n justify-content: center;\n\n &.selected {\n border-bottom: 2px solid ",";\n\n .svg-wrapper {\n path {\n fill: ",";\n }\n }\n }\n\n .svg-wrapper {\n padding: 3px 8px;\n width: 100%;\n display: flex;\n justify-content: center;\n border-radius: 4px;\n\n svg {\n width: 24px;\n height: 24px;\n\n "," {\n width: 32px;\n height: 32px;\n }\n }\n\n path {\n fill: ",";\n }\n }\n\n :hover {\n .svg-wrapper {\n background-color: ",";\n\n path {\n fill: ",";\n }\n }\n }\n"]);return _templateObject1=function(){return $},$}let ex=eo.default.div.withConfig({componentId:"sc-b8e91e85-0"})(CustomizerOptions_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.light});var characterCustomizer_CustomizerOptions=function($){var et;let{selectedOpton:en,setSelectedOption:er,customizerType:eo}=$,es={classic:[{icon:(0,ei.jsx)(characterCustomizer_PersonIcon,{}),internalName:"character"},{icon:(0,ei.jsx)(characterCustomizer_BackgroundIcon,{}),internalName:"background"}],custom:[{icon:(0,ei.jsx)(characterCustomizer_PersonIcon,{}),internalName:"character"},{icon:(0,ei.jsx)(characterCustomizer_HairIcon,{}),internalName:"hair"},{icon:(0,ei.jsx)(characterCustomizer_ShirtIcon,{}),internalName:"outfit"},{icon:(0,ei.jsx)(characterCustomizer_BackgroundIcon,{}),internalName:"background"}]};return(0,ei.jsx)(ex,{children:null===(et=es[eo])||void 0===et?void 0:et.map($=>(0,ei.jsx)(Option,{optionInfo:$,selected:(null==$?void 0:$.internalName)===en,onClick:()=>er(null==$?void 0:$.internalName)},null==$?void 0:$.internalName))})};let e_=eo.default.div.withConfig({componentId:"sc-b8e91e85-1"})(_templateObject1(),$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.text.primary});function Option($){let{optionInfo:et,selected:en,...er}=$;return(0,ei.jsx)(e_,{className:"nes-pointer ".concat(en&&"selected"),...er,children:(0,ei.jsx)("div",{className:"svg-wrapper",children:null==et?void 0:et.icon})})}function ItemWrapper_templateObject(){let $=(0,er._)(["\n border-radius: 12px;\n border: 2px solid ",";\n width: 100%;\n aspect-ratio: 1;\n padding: 4px;\n cursor:\n url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC)\n 14 0,\n pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n"]);
1841return ItemWrapper_templateObject=function(){return $},$}let ew=eo.default.div.withConfig({componentId:"sc-1d4941c5-0"})(ItemWrapper_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.medium});var characterCustomizer_ItemWrapper=function($){let{selected:et=!1,children:en,...er}=$;return(0,ei.jsx)(ew,{...er,style:{borderColor:et?"#14ADFF":""},children:en})};function Character_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n label {\n margin: 0px;\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .character-wrapper {\n display: grid;\n gap: 12px;\n grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));\n\n "," {\n grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));\n }\n\n .color {\n width: 100%;\n height: 100%;\n border-radius: 6px;\n }\n }\n"]);return Character_templateObject=function(){return $},$}let ek=eo.default.div.withConfig({componentId:"sc-ef2e4a12-0"})(Character_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.breakpoints.sm});var characterCustomizer_Character=function($){let{customizerType:et}=$,en=(0,es.T)(),er="skin",eo=(0,eu.v9)(el.jl),eh=(0,eu.v9)((0,ed.ZX)({key:er})),ep=(0,eu.v9)(el.$u)||0,em=(0,eu.v9)((0,ed.xS)({category:er}));return(0,ei.jsxs)(ek,{children:[(0,ei.jsx)("label",{children:"character"}),(0,ei.jsxs)("div",{className:"character-wrapper",children:["classic"===et&&eo.slice(0,-1).map(($,et)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:ep===et,onClick:()=>(function($){let{index:et}=$;en((0,el.Ii)({characterModelIndex:et}))})({index:et}),children:(0,ei.jsx)("img",{src:$,alt:"character"})},$)),"custom"===et&&eh.map(($,et)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:(null==em?void 0:em.color)===$,onClick:()=>(function($){let{type:et}=$;en((0,ed.g5)({category:er,color:et}))})({type:$}),children:(0,ei.jsx)("div",{className:"color",style:{backgroundColor:$}})},$))]})]})};function Background_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n label {\n margin: 0px;\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .character-wrapper {\n display: grid;\n gap: 12px;\n grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));\n\n "," {\n grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));\n }\n .color {\n width: 100%;\n height: 100%;\n border-radius: 6px;\n }\n }\n"]);return Background_templateObject=function(){return $},$}let eC=eo.default.div.withConfig({componentId:"sc-4c2338c8-0"})(Background_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.breakpoints.sm});var characterCustomizer_Background=function(){let $=(0,es.T)(),et=(0,eu.v9)(ed.aW),en=(0,eu.v9)(ed.CE);return(0,ei.jsxs)(eC,{children:[(0,ei.jsx)("label",{children:"Backgroun
1841d Color"}),(0,ei.jsx)("div",{className:"character-wrapper",children:en.map((en,er)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{onClick:()=>(function(et){let{color:en}=et;$((0,ed.fv)(en))})({color:null==en?void 0:en.background}),selected:et===(null==en?void 0:en.background),children:(0,ei.jsx)("div",{className:"color",style:{backgroundColor:null==en?void 0:en.background}})},null==en?void 0:en.background))})]})};function Hair_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .items-wrapper {\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n label {\n margin: 0px;\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .character-wrapper {\n display: grid;\n gap: 12px;\n grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));\n\n "," {\n grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));\n }\n\n .color {\n width: 100%;\n height: 100%;\n border-radius: 6px;\n }\n\n .hair {\n width: 100%;\n height: auto;\n object-fit: cover;\n image-rendering: pixelated;\n }\n }\n }\n"]);return Hair_templateObject=function(){return $},$}let eE=eo.default.div.withConfig({componentId:"sc-1acd006-0"})(Hair_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.breakpoints.sm});var characterCustomizer_Hair=function(){let $=(0,es.T)(),et="hair",en=(0,eu.v9)((0,ed.ZX)({key:et})),er=(0,eu.v9)((0,ed.WI)({key:et})),eo=(0,eu.v9)((0,ed.xS)({category:et}));return(0,ei.jsxs)(eE,{children:[(0,ei.jsxs)("div",{className:"items-wrapper",children:[(0,ei.jsx)("label",{children:"Hair Color"}),(0,ei.jsx)("div",{className:"character-wrapper",children:en.map((en,er)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:(null==eo?void 0:eo.color)===en,onClick:()=>(function(en){let{color:er}=en;$((0,ed.g5)({category:et,color:er}))})({color:en}),children:(0,ei.jsx)("div",{className:"color",style:{backgroundColor:en}})},en))})]}),(0,ei.jsxs)("div",{className:"items-wrapper",children:[(0,ei.jsx)("label",{children:"Hair Style"}),(0,ei.jsx)("div",{className:"character-wrapper",children:er.map((en,er)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:(null==eo?void 0:eo.type)===(null==en?void 0:en.internalName),onClick:()=>(function(en){let{type:er}=en;$((0,ed.pr)({category:et,type:er}))})({type:null==en?void 0:en.internalName}),children:(0,ei.jsx)("img",{src:en.link,alt:"custom-hair",className:"hair"})},en.link))})]})]})},eI=en(47240);function Outfit_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .items-wrapper {\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n label {\n margin: 0px;\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .character-wrapper {\n display: grid;\n gap: 12px;\n grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));\n\n\n "," {\n grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));\n }\n\n .color {\n width: 100%;\n height: 100%;\n border-radius: 6px;\n }\n\n .hair {\n width: 100%;\n height: auto;\n object-fit: cover;\n image-rendering: pixelated;\n }\n }\n }\n"]);return Outfit_templateObject=function(){return $},$}let eS=eo.default.div.withConfig({componentId:"sc-be4f8751-0"})(Outfit_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.breakpoints.sm});var characterCustomizer_Outfit=function(){let $=(0,es.T)(),et="shirt",en=(0,eu.v9)((0,ed.WI)({key:et})),er=(0,eu.v9)((0,ed.xS)({category:et})),eo=(null==er?void 0:er.type)||"outfit-style-1",el=(0,eI.gK)(eo);return(0,ei.jsxs)(eS,{children:[(0,ei.jsxs)("div",{className:"items-wrapper",children:[(0,ei.jsx)("label",{children:"Outfit Color"}),(0,ei.jsx)("div",{className:"character-wrapper",children:el.map((en,eo)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:(null==er?void 0:er.color)===en,onClick:()=>(function(en){let{color:er}=en;$((0,ed.g5)({category:et,color:er}))})({color:en}),children:(0,ei.jsx)("div",{className:"color",style:{backgroundColor:en}})},en))})]}),(0,ei.jsxs)("div",{className:"items-wrapper",children:[(0,ei.jsx)("label",{children:"Outfit Style"}),(0,ei.jsx)("div",{className:"character-wrapper",children:en.map((et,en)=>(0,ei.jsx)(characterCustomizer_ItemWrapper,{selected:(null==er?void 0:er.type)===(null==et?void 0:et.internalName),onClick:()=>(function(et){let{outfitId:en}=et;$((0,ed.$3)({outfitAssetId:en}))})({outfitId:null==et?void 0:et.internalName}),children:(0,ei.jsx)("img",{src:et.link,alt:"outfit",className:"hair"})},et.link))})]})]})};
1841function CustomizerEditor_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n\n .component-wrapper {\n padding: 20px;\n flex: 1;\n }\n"]);return CustomizerEditor_templateObject=function(){return $},$}let eT=eo.default.div.withConfig({componentId:"sc-6b993087-0"})(CustomizerEditor_templateObject());var characterCustomizer_CustomizerEditor=function($){let{customizerType:et}=$,[en,er]=(0,em.useState)("character"),eo={character:(0,ei.jsx)(characterCustomizer_Character,{customizerType:et}),background:(0,ei.jsx)(characterCustomizer_Background,{}),hair:(0,ei.jsx)(characterCustomizer_Hair,{}),outfit:(0,ei.jsx)(characterCustomizer_Outfit,{})};return(0,ei.jsxs)(eT,{children:[(0,ei.jsx)(characterCustomizer_CustomizerOptions,{selectedOpton:en,setSelectedOption:er,customizerType:et}),(0,ei.jsx)("div",{className:"component-wrapper",children:eo[en]})]})};function CharacterCustomizer_templateObject(){let $=(0,er._)(['\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 24px;\n font-family: "Mulish", sans-serif;\n width: 100%;\n\n .customizer-wrapper {\n width: inherit;\n display: grid;\n padding: 2px;\n grid-template-columns: 1fr;\n height: fit-content;\n\n '," {\n grid-template-columns: repeat(2, 1fr);\n height: 400px;\n }\n }\n"]);return CharacterCustomizer_templateObject=function(){return $},$}let eA=eo.default.div.withConfig({componentId:"sc-503bff1e-0"})(CharacterCustomizer_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.sm});var characterCustomizer_CharacterCustomizer=function($){let{forOnboarding:et=!1}=$,en=(0,eu.v9)(ed.Lb);return(0,ei.jsxs)(eA,{children:[(0,ei.jsx)(characterCustomizer_CharacterSwitcher,{customizerType:en,forOnboarding:et}),(0,ei.jsxs)(ep.Z,{className:"customizer-wrapper",children:[(0,ei.jsx)(characterCustomizer_CustomizerViewport,{isCustomizable:"custom"===en}),(0,ei.jsx)(characterCustomizer_CustomizerEditor,{customizerType:en})]})]})}},99999:function($,et,en){"use strict";en.d(et,{Z:function(){return club_Checkout}});var er,ei,eo,es,el,eu,ed=en(82729),eh=en(85893),ep=en(19521),em=en(86664),ef=en(11163),eg=en(67294),ey=en(87066),ev=en(47010),ex=en(7423),e_=en(62961),ew=en(9473),ek=en(609);(er=es||(es={})).INITIAL="initial",er.PENDING="pending",er.REJECTED="rejected",er.RESOLVED="resolved",(ei=el||(el={})).LOADING_STATUS="setLoadingStatus",ei.RESET_OPTIONS="resetOptions",ei.SET_BRAINTREE_INSTANCE="braintreeInstance",(eo=eu||(eu={})).NUMBER="number",eo.CVV="cvv",eo.EXPIRATION_DATE="expirationDate",eo.EXPIRATION_MONTH="expirationMonth",eo.EXPIRATION_YEAR="expirationYear",eo.POSTAL_CODE="postalCode";var __assign=function(){return(__assign=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)};function __rest($,et){var en={};for(var er in $)Object.prototype.hasOwnProperty.call($,er)&&0>et.indexOf(er)&&(en[er]=$[er]);if(null!=$&&"function"==typeof Object.getOwnPropertySymbols)for(var ei=0,er=Object.getOwnPropertySymbols($);ei<er.length;ei++)0>et.indexOf(er[ei])&&Object.prototype.propertyIsEnumerable.call($,er[ei])&&(en[er[ei]]=$[er[ei]]);return en}function __spreadArray($,et,en){if(en||2==arguments.length)for(var er,ei=0,eo=et.length;ei<eo;ei++)!er&&ei in et||(er||(er=Array.prototype.slice.call(et,0,ei)),er[ei]=et[ei]);return $.concat(er||Array.prototype.slice.call(et))}var eC="data-react-paypal-script-id",eE={DATA_JS_SDK_LIBRARY:"dataJsSdkLibrary",DATA_LIBRARY_VALUE:"react-paypal-js",DATA_NAMESPACE:"dataNamespace",DATA_SDK_INTEGRATION_SOURCE:"dataSdkIntegrationSource"},eI="paypal";function getPayPalWindowNamespace$1($){return void 0===$&&($=eI),window[$]}function generateErrorMessage($){var et=$.reactComponentName,en=$.sdkComponentKey,er=$.sdkRequestedComponents,ei=void 0===er?"":er,eo=$.sdkDataNamespace,es=en.charAt(0).toUpperCase().concat(en.substring(1)),el="Unable to render <".concat(et," /> because window.").concat(void 0===eo?eI:eo,".").concat(es," is undefined."),eu="string"==typeof ei?ei:ei.join(",");
1841if(!eu.includes(en)){var ed=[eu,en].filter(Boolean).join();el+="\nTo fix the issue, add '".concat(en,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(ed,"'}}>`.")}return el}function getScriptID($){$[eC];var et=__rest($,[eC+""]);return"react-paypal-js-".concat(function($){for(var et="",en=0;en<$.length;en++){var er=$[en].charCodeAt(0)*en;$[en+1]&&(er+=$[en+1].charCodeAt(0)*(en-1)),et+=String.fromCharCode(97+Math.abs(er)%26)}return et}(JSON.stringify(et)))}function scriptReducer($,et){var en,er,ei,eo;switch(et.type){case el.LOADING_STATUS:if("object"==typeof et.value)return __assign(__assign({},$),{loadingStatus:et.value.state,loadingStatusErrorMessage:et.value.message});return __assign(__assign({},$),{loadingStatus:et.value});case el.RESET_OPTIONS:return ei=$.options[eC],(null==(eo=self.document.querySelector("script[".concat(eC,'="').concat(ei,'"]')))?void 0:eo.parentNode)&&eo.parentNode.removeChild(eo),__assign(__assign({},$),{loadingStatus:es.PENDING,options:__assign(__assign(((en={})[eE.DATA_SDK_INTEGRATION_SOURCE]=eE.DATA_LIBRARY_VALUE,en),et.value),((er={})[eC]="".concat(getScriptID(et.value)),er))});case el.SET_BRAINTREE_INSTANCE:return __assign(__assign({},$),{braintreePayPalCheckoutInstance:et.value});default:return $}}var eS=(0,eg.createContext)(null);function usePayPalScriptReducer(){var $=function($){if("function"==typeof(null==$?void 0:$.dispatch)&&0!==$.dispatch.length)return $;throw Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}((0,eg.useContext)(eS));return[__assign(__assign({},$),{isInitial:$.loadingStatus===es.INITIAL,isPending:$.loadingStatus===es.PENDING,isResolved:$.loadingStatus===es.RESOLVED,isRejected:$.loadingStatus===es.REJECTED}),$.dispatch]}(0,eg.createContext)({});var PayPalButtons=function($){var et=$.className,en=$.disabled,er=void 0!==en&&en,ei=$.children,eo=$.forceReRender,es=void 0===eo?[]:eo,el=__rest($,["className","disabled","children","forceReRender"]),eu=er?{opacity:.38}:{},ed="".concat(void 0===et?"":et," ").concat(er?"paypal-buttons-disabled":"").trim(),eh=(0,eg.useRef)(null),ep=(0,eg.useRef)(null),em=usePayPalScriptReducer()[0],ef=em.isResolved,ey=em.options,ev=(0,eg.useState)(null),ex=ev[0],e_=ev[1],ew=(0,eg.useState)(!0),ek=ew[0],eC=ew[1],eI=(0,eg.useState)(null)[1];function closeButtonsComponent(){null!==ep.current&&ep.current.close().catch(function(){})}return(0,eg.useEffect)(function(){if(!1===ef)return closeButtonsComponent;var $=getPayPalWindowNamespace$1(ey.dataNamespace);if(void 0===$||void 0===$.Buttons)return eI(function(){throw Error(generateErrorMessage({reactComponentName:PayPalButtons.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:ey.components,sdkDataNamespace:ey[eE.DATA_NAMESPACE]}))}),closeButtonsComponent;try{ep.current=$.Buttons(__assign(__assign({},el),{onInit:function($,et){e_(et),"function"==typeof el.onInit&&el.onInit($,et)}}))}catch($){return eI(function(){throw Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat($))})}return!1===ep.current.isEligible()?eC(!1):eh.current&&ep.current.render(eh.current).catch(function($){null!==eh.current&&0!==eh.current.children.length&&eI(function(){throw Error("Failed to render <PayPalButtons /> component. ".concat($))})}),closeButtonsComponent},__spreadArray(__spreadArray([ef],es,!0),[el.fundingSource],!1)),(0,eg.useEffect)(function(){null!==ex&&(!0===er?ex.disable().catch(function(){}):ex.enable().catch(function(){}))},[er,ex]),eg.createElement(eg.Fragment,null,ek?eg.createElement("div",{ref:eh,style:eu,className:ed}):ei)};function createScriptElement($,et){void 0===et&&(et={});var en=document.createElement("script");return en.src=$,Object.keys(et).forEach(function($){en.setAttribute($,et[$]),"data-csp-nonce"===$&&en.setAttribute("nonce",et["data-csp-nonce"])}),en}function validateArguments($,et){if("object"!=typeof $||null===$)throw Error("Expected an options object.");if(void 0!==et&&"function"!=typeof et)throw Error("Expected PromisePonyfill to be a function.")}PayPalButtons.displayName="PayPalButtons";var PayPalMarks=function($){var et=$.className,en=$.children,er=__rest($,["className","children"]),ei=usePayPalScriptReducer()[0],eo=ei.isResolved,es=ei.options,el=(0,eg.useRef)(null),eu=(0,eg.useState)(!0),ed=eu[0],eh=eu[1],ep=(0,eg.useState)(null)[1],renderPayPalMark=function($){var et=el.current;if(!et||!$.isEligible())return eh(!1);et.firstChild&&et.removeChild(et.firstChild),$.render(et).catch(function($){null!==et&&0!==et.children.length&&ep(function(){throw Error("Failed to render <PayPalMarks /> component. ".concat($))})})};return(0,eg.useEffect)(function(){if(!1!==eo){var $=getPayPalWindowNamespace$1(es[eE.DATA_NAMESPACE]);if(void 0===$||void 0===$.Marks)return ep(function(){throw Error(generateErrorMessage({reactComponentName:PayPalMarks.displayName,sdkComponentKey:"marks",sdkRequestedComponents:es.components,sdkDataNamespace:es[eE.DATA_NAMESPACE]}))});renderPayPalMark($.Marks(__assign({},er)))}},[eo,er.fundingSource]),eg.createElement(eg.Fragment,null,ed?eg.createElement("div",{ref:el,className:void 0===et?"":et}):en)};PayPalMarks.displayName="PayPalMarks";var PayPalMessages=function($){var et=$.className,en=$.forceReRender,er=void 0===en?[]:en,ei=__rest($,["className","forceReRender"]),eo=usePayPalScriptReducer()[0],es=eo.isResolved,el=eo.options,eu=(0,eg.useRef)(null),ed=(0,eg.useRef)(null),eh=(0,eg.useState)(null)[1];return(0,eg.useEffect)(function(){if(!1!==es){var $=getPayPalWindowNamespace$1(el[eE.DATA_NAMESPACE]);if(void 0===$||void 0===$.Messages)return eh(function(){throw Error(generateErrorMessage({reactComponentName:PayPalMessages.displayName,sdkComponentKey:"messages",sdkRequestedComponents:el.components,sdkDataNamespace:el[eE.DATA_NAMESPACE]}))});ed.current=$.Messages(__assign({},ei)),ed.current.render(eu.current).catch(function($){null!==eu.current&&0!==eu.current.children.length&&eh(function(){throw Error("Failed to render <PayPalMessages /> component. ".concat($))})})}},__spreadArray([es],er,!0)),eg.createElement("div",{ref:eu,className:void 0===et?"":et})};PayPalMessages.displayName="PayPalMessages";var PayPalScriptProvider=function($){var et,en=$.options,er=void 0===en?{clientId:"test"}:en,ei=$.children,eo=$.deferLoading,eu=void 0!==eo&&eo,ed=(0,eg.useReducer)(scriptReducer,{options:__assign(__assign({},er),((et={})[eE.DATA_JS_SDK_LIBRARY]=eE.DATA_LIBRARY_VALUE,et[eE.DATA_SDK_INTEGRATION_SOURCE]=eE.DATA_LIBRARY_VALUE,et[eC]="".concat(getScriptID(er)),et)),loadingStatus:eu?es.INITIAL:es.PENDING}),eh=ed[0],ep=ed[1];return(0,eg.useEffect)(function(){if(!1===eu&&eh.loadingStatus===es.INITIAL)return ep({type:el.LOADING_STATUS,value:es.PENDING});if(eh.loadingStatus===es.PENDING){var $=!0;return(function($,et){if(void 0===et&&(et=Promise),validateArguments($,et),"undefined"==typeof document)return et.resolve(null);var en,er,ei,eo,es,el=(er="https://www.paypal.com/sdk/js",$.sdkBaseUrl&&(er=$.sdkBaseUrl,delete $.sdkBaseUrl),eo=(ei=Object.keys($).filter(function(et){return void 0!==$[et]&&null!==$[et]&&""!==$[et]}).reduce(function(et,en){var er=$[en].toString();return"data"===(en=en.replace(/[A-Z]+(?![a-z])|[A-Z]/g,function($,et){return(et?"-":"")+$.toLowerCase()})).substring(0,4)||"crossorigin"===en?et.attributes[en]=er:et.queryParams[en]=er,et},{queryParams:{},attributes:{}})).queryParams,es=ei.attributes,eo["merchant-id"]&&-1!==eo["merchant-id"].indexOf(",")&&(es["data-merchant-id"]=eo["merchant-id"],eo["merchant-id"]="*"),{url:"".concat(er,"?").concat((en="",Object.keys(eo).forEac
1841h(function($){0!==en.length&&(en+="&"),en+=$+"="+eo[$]}),en)),attributes:es}),eu=el.url,ed=el.attributes,eh=ed["data-namespace"]||"paypal",ep=window[eh];return(ed["data-js-sdk-library"]||(ed["data-js-sdk-library"]="paypal-js"),function($,et){var en=document.querySelector('script[src="'.concat($,'"]'));if(null===en)return null;var er=createScriptElement($,et),ei=en.cloneNode();if(delete ei.dataset.uidAuto,Object.keys(ei.dataset).length!==Object.keys(er.dataset).length)return null;var eo=!0;return Object.keys(ei.dataset).forEach(function($){ei.dataset[$]!==er.dataset[$]&&(eo=!1)}),eo?en:null}(eu,ed)&&ep)?et.resolve(ep):(function($,et){void 0===et&&(et=Promise),validateArguments($,et);var en=$.url,er=$.attributes;if("string"!=typeof en||0===en.length)throw Error("Invalid url.");if(void 0!==er&&"object"!=typeof er)throw Error("Expected attributes to be an object.");return new et(function($,et){var ei,eo,es,el,eu,ed;if("undefined"==typeof document)return $();eo=(ei={url:en,attributes:er,onSuccess:function(){return $()},onError:function(){return et(Error('The script "'.concat(en,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}}).url,es=ei.attributes,el=ei.onSuccess,eu=ei.onError,(ed=createScriptElement(eo,es)).onerror=eu,ed.onload=el,document.head.insertBefore(ed,document.head.firstElementChild)})})({url:eu,attributes:ed},et).then(function(){var $=window[eh];if($)return $;throw Error("The window.".concat(eh," global variable is not available."))})})(eh.options).then(function(){$&&ep({type:el.LOADING_STATUS,value:es.RESOLVED})}).catch(function(et){console.error("".concat("Failed to load the PayPal JS SDK script."," ").concat(et)),$&&ep({type:el.LOADING_STATUS,value:{state:es.REJECTED,message:String(et)}})}),function(){$=!1}}},[eh.options,eu,eh.loadingStatus]),eg.createElement(eS.Provider,{value:__assign(__assign({},eh),{dispatch:ep})},ei)},eT=en(50037),eA=en(23992),eP=en(92369);let eN="AZW5hvZUJwqASsxSD4rvmRz3JeaZLa2smG8FQsJzWAnwhqFp9veKk3KXRFB08GR0J9PZCJT1iyKGzlCN";var club_PayPalBtn=function($){let{annual:et,setError:en,setShowSuccessModal:er}=$,[{isPending:ei}]=usePayPalScriptReducer(),eo=(0,eg.useRef)(null);return ei?(0,eh.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,eh.jsx)(ev.Z,{})}):(0,eh.jsx)(PayPalButtons,{style:{shape:"rect",height:33},className:"paypal-btn nes-pointer",createSubscription:($,en)=>{if(null!=eo.current)return;eo.current=!0;let{auth:er}=(0,eP.UM)();try{return en.subscription.create({plan_id:et?"P-2B7985585B9524104NA43GTI":"P-33J6806831791711TNG5SF3Y",subscriber:{email_address:er.currentUser.email},custom_id:er.currentUser.email,application_context:{brand_name:"Cod\xe9dex",shipping_preference:"NO_SHIPPING",user_action:"SUBSCRIBE_NOW",return_url:"".concat(window.location.origin,"/pricing"),cancel_url:"".concat(window.location.origin,"/pricing"),payment_method:{payer_selected:"PAYPAL",payee_preferred:"IMMEDIATE_PAYMENT_REQUIRED"}}})}catch($){}finally{eo.current=null}},forceReRender:[et],onApprove:async($,en)=>{try{let{auth:$}=(0,eP.UM)();try{var ei;(0,eT.BH)("Purchase",{currency:"USD",value:et?119.88:19.99,email:$.currentUser.email}),(0,eA.C)();let er=(0,eT.DV)();ey.Z.post("/api/club/purchase-log",{currency:"USD",value:et?119.88:19.99,source:"paypal",utmCampaign:er.utm_campaign||null,utmSource:er.utm_source||null,fbclid:er.fbclid||null}).catch($=>console.error("purchase log failed:",$)),await (null===(ei=en.order)||void 0===ei?void 0:ei.capture())}catch($){console.error("Failed to capture order:",$)}er(!0)}catch($){}}})},PayPal=function($){let{annual:et,setShowSuccessModal:en,setError:er}=$;return(0,eh.jsx)(eh.Fragment,{children:(0,eh.jsx)(PayPalScriptProvider,{options:{"client-id":eN,clientId:eN,vault:!0,disableFunding:"credit,card"},children:(0,eh.jsx)(club_PayPalBtn,{annual:et,setError:er,setShowSuccessModal:en})})})},ej=en(17593),eR=en(73857),eV=en(74347),eD=en(41514),eO=en(73845),eM=en(41664),eF=en.n(eM),eL=en(68551);function _templateObject(){let $=(0,ed._)(["\n display: flex;\n gap: 1.5rem;\n justify-content: space-between;\n margin-top: 1rem;\n flex-flow: column;\n align-items: center;\n margin-bottom: 16px;\n\n div.price-container {\n display: flex;\n flex-flow: column;\n justify-content: center;
1841\n align-items: center;\n border: 2px solid ",';\n border-radius: 8px;\n width: 100%;\n height: 80px;\n\n position: relative;\n\n &:hover {\n box-shadow: 4px 5px 15px 1px rgba(0, 0, 0, 0.3);\n background-color: rgba(0, 0, 0, 0.02);\n }\n\n h2 {\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 700;\n line-height: 150%;\n margin-bottom: 0;\n text-align: center;\n }\n\n span.period {\n font-size: 14px;\n color: ',";\n padding-left: 0.2rem;\n\n color: #64748b;\n\n font-weight: 500;\n line-height: 150%;\n }\n\n img {\n position: absolute;\n bottom: -0.8rem;\n right: -0.8rem;\n width: 30px;\n height: 30px;\n }\n }\n\n div.annual {\n div.saver {\n position: absolute;\n top: -0.7rem;\n width: 100%;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n h3 {\n position: absolute;\n top: -3.5px;\n width: 97px;\n height: 25px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 100px;\n background: #b6e4ff;\n border: 2px solid #14adff;\n z-index: 2;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ",";\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n color: #0065ab;\n }\n }\n }\n div.selected {\n border: 2px solid #14adff;\n }\n\n "," {\n flex-flow: column;\n\n div.annual {\n div.saver {\n h3 {\n font-size: 0.6rem;\n }\n }\n }\n\n span {\n font-size: 14px;\n }\n }\n\n "," {\n flex-flow: row;\n\n span {\n font-size: 1rem;\n }\n\n div.price-container {\n width: 222.5px;\n }\n\n div.annual {\n div.saver {\n h3 {\n font-size: 12px;\n }\n }\n }\n }\n\n "," {\n span {\n font-size: 14px;\n }\n }\n"]);return _templateObject=function(){return $},$}let eH=ep.default.div.withConfig({componentId:"sc-13581b34-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.palette.grey["300"]},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg});var stripe_PaymentMethodSelector=function($){let{paymentMethod:et=null,useDefaultPaymentMethod:en,setUseDefaultPaymentMethod:er}=$;return null===et?null:(0,eh.jsxs)(eH,{className:"nes-pointer club-tier-toggle",children:[(0,eh.jsxs)("div",{onClick:()=>{er(!0)},className:"".concat(en?"selected":""," nes-pointer price-container annual"),children:[(0,eh.jsx)("h2",{children:"Use card stored on file"}),(0,eh.jsxs)("span",{children:["(Ending in"," ",et.last4,")"]})]}),(0,eh.jsx)("div",{onClick:()=>{er(!1)},className:"".concat(en?"":"selected"," nes-pointer price-container"),children:(0,eh.jsx)("h2",{children:"Use a new card"})})]})};function Checkout_templateObject(){let $=(0,ed._)(["\n &::backdrop {\n cursor:\n url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC)\n 14 0,\n pointer;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(5px);\n }\n\n div.paywall-popup {\n text-align: center;\n }\n\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 3;\n border-image-width: 6px;\n border-style: solid;\n border-width: 0px;\n border-image-source: ",";\n\n position: relative;\n clip-path: polygon(\n 6px 0px,\n 6px 2px,\n 4px 2px,\n 4px 4px,\n 2px 4px,\n 2px 6px,\n 0px 6px,\n 0px 8px,\n 0px calc(100% + -6px),\n 2px calc(100% + -6px),\n 2px calc(100% + -4px),\n 4px calc(100% + -4px),\n 4px calc(100% + -2px),\n 6px calc(100% + -2px),\n 6px calc(100% + 0px),\n 8px calc(100% + 0px),\n calc(100% + -6px) calc(100% - 0px),\n calc(100% + -6px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 2px),\n calc(100% + -4px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 4px),\n calc(100% + -2px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 6px),\n calc(100% + 0px) calc(100% - 8px),\n calc(100% - 0px) 6px,\n calc(100% - 2px) 6px,\n calc(100% - 2px) 4px,\n calc(100% - 4px) 4px,\n calc(100% - 4px) 2px,\n calc(100% - 6px) 2px,\n calc(100% - 6px) 0px,\n calc(100% - 8px) 0px\n );\n\n "," {\n position: fixed;\n\n width: 100%;\n padding: 0;\n\n .close-btn {\n all: unset;\n position: absolute;\n right: 10px;\n top: 10px;\n font-size: 30px;\n line-height: 0.8;\n transition-duration: 0.2s;\n padding: 0.2rem;\n border-radius: 50%;\n }\n }\n\n "," {\n width: auto;\n max-width: 80%;\n .image-header {\n height: 130px;\n width: 100%;\n }\n .heading {\n padding-top: 1.3rem;\n }\n }\n\n "," {\n max-width: 995px;\n .image-header {\n height: 140px;\n width: 100%;\n }\n }\n\n ",' {\n max-width: 995px;\n\n .image-header {\n height: 180px;\n width: 100%;\n }\n }\n\n img {\n margin: 0 auto;\n }\n\n p.back-message {\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n margin-top: 0.5rem;\n margin-bottom: 1.2rem;\n text-align: center;\n line-height: 150%;\n color: #64748b;\n }\n .terms-agreement {\n display: flex;\n margin-top: 2rem;
1841\n align-items: start;\n gap: 0.5rem;\n\n p {\n text-align: left;\n margin-top: -4px;\n margin-bottom: 0.5rem;\n }\n\n input {\n display: inline;\n width: 20px;\n }\n }\n']);return Checkout_templateObject=function(){return $},$}function _templateObject1(){let $=(0,ed._)(["\n ",' {\n .images-flex {\n display: flex;\n gap: 0.25rem;\n\n img {\n width: 27px;\n height: 19px;\n }\n }\n\n h1.upgrade-heading {\n color: #020617;\n font-family: "PixelGridXL", sans-serif;\n font-size: 24px;\n line-height: 140%;\n letter-spacing: 3%;\n text-align: center;\n margin-bottom: 1.5rem;\n margin-top: 44px;\n }\n\n .content-container {\n display: flex;\n flex-flow: column wrap;\n font-family: "Work Sans", sans-serif;\n gap: 1.5rem;\n justify-content: center;\n align-items: center;\n\n .payment-container,\n .order-container {\n max-width: 100%;\n width: 95%;\n }\n\n .payment-method-container {\n margin-top: 24px;\n\n label {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n line-height: 150%;\n color: black;\n font-family: "Mulish", sans-serif;\n }\n\n h3 {\n color: black;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n line-height: 150%;\n font-weight: 600;\n margin-bottom: 16px;\n }\n }\n }\n }\n\n '," {\n padding: 1.5rem;\n\n div.content-container {\n flex-flow: row wrap;\n justify-content: space-evenly;\n align-items: start;\n gap: 30px;\n }\n\n .content-container {\n .payment-container,\n .order-container {\n max-width: 100%;\n width: 97%;\n }\n\n .order-container {\n width: 97%;\n }\n }\n }\n\n "," {\n div.content-container {\n flex-flow: row wrap;\n justify-content: space-evenly;\n align-items: start;\n gap: 40px;\n }\n\n .content-container {\n .payment-container,\n .order-container {\n max-width: 50%;\n }\n\n .order-container {\n width: 40%;\n }\n }\n }\n\n ",' {\n .content-container {\n .payment-container,\n .order-container {\n max-width: 50%;\n }\n\n .order-container {\n width: 40%;\n }\n }\n }\n\n .pay-by-section {\n display: flex;\n align-items: center;\n gap: 1rem;\n\n .line {\n border-bottom: 1px solid #dadada;\n flex: 1;\n }\n }\n\n .card-number-element,\n .card-expiry-element,\n .card-cvv-element,\n input {\n margin-bottom: 8px;\n border: 2px solid #94a3b8;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 500;\n padding: 10px 12px;\n width: 100%;\n }\n ::placeholder {\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n color: #64748b;\n }\n\n .discount {\n input {\n height: 46px;\n margin-bottom: -0.1rem;\n }\n }\n\n .payment-method-container {\n margin-bottom: 1.2rem;\n }\n\n .inline-flex-2-inputs {\n display: flex;\n flex-flow: row;\n gap: 1.5rem;\n margin-bottom: 1.2rem;\n\n div {\n width: 100%;\n }\n }\n\n .paypal-googlepay {\n flex: 1;\n overflow: hidden;\n\n .paypal-buttons {\n min-width: 50px !important;\n height: 100% !important;\n\n .paypal-button-row {\n height: 100% !important;\n }\n }\n .gpay {\n }\n }\n\n .order-summary-container {\n padding: 12px;\n border-radius: 8px;\n background: #f1f5f9;\n\n h3 {\n color: black;\n font-size: 20px;\n font-weight: 600;\n padding: 1rem 0;\n line-height: 120%;\n padding-left: 1rem;\n }\n\n .order-summary,\n .discount,\n .total {\n padding: 0 1rem;\n margin-bottom: 1rem;\n }\n\n .order-summary-row {\n display: flex;\n justify-content: space-between;\n font-family: "Mulish", sans-serif;\n\n p {\n margin-bottom: 0;\n font-size: 16px;\n line-height: 150%;\n font-weight: 600;\n }\n p.money {\n font-weight: 700;\n }\n\n span {\n font-size: 14px;\n color: #64748b;\n margin-top: -1rem;\n }\n }\n\n .discount {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n\n div.apply-btn {\n span {\n background-color: #212529;\n color: #fff;\n padding: 0.55rem 1rem;\n border-radius: 4px;\n -webkit-user-select: none;
1841 /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n }\n }\n }\n\n .line {\n border-bottom: 1px solid #dadada;\n margin: 1rem;\n }\n\n .total {\n .total-row {\n display: flex;\n justify-content: space-between;\n font-size: 16px;\n font-weight: 600;\n }\n }\n }\n\n .submit-btn-container {\n display: flex;\n\n button {\n width: 100%;\n }\n }\n\n .row-container {\n margin-bottom: 0.6rem;\n\n div.btn {\n all: unset;\n }\n }\n\n .tooltip {\n position: relative;\n display: inline-block;\n color: gray;\n }\n\n .tooltip .tooltiptext {\n visibility: hidden;\n width: 120px;\n color: black;\n text-align: center;\n padding: 5px 0;\n\n position: absolute;\n z-index: 1;\n bottom: 90%;\n left: 35%;\n }\n\n .tooltip:hover .tooltiptext {\n visibility: visible;\n }\n']);return _templateObject1=function(){return $},$}let eB=ep.default.dialog.withConfig({componentId:"sc-53b7a21a-0"})(Checkout_templateObject(),$=>{let{borderColor:et}=$;return"url(\"data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1310_2574)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0H3V1H2V2H1V3H0V4V5H1V6H2V7H3V8H4H5V7H6V6H7V5H8V4V3H7V2H6V1H5V0H4ZM5 1V2H6V3H7V4V5H6V6H5V7H4H3V6H2V5H1V4V3H2V2H3V1H4H5Z' fill='%23".concat(et,"'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1310_2574'%3E%3Crect width='8' height='8' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A\")")},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg}),eU=ep.default.div.withConfig({componentId:"sc-53b7a21a-1"})(_templateObject1(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg}),ez=["incomplete_number","incomplete_expiry","incomplete_cvc"];var club_Checkout=function($){let{annual:et,setAnnual:en,currency:er,isOpen:ei,enablePaypal:eo,isOnboarding:es=!1,paymentMethod:el=null,upgradeBtn:eu=!1,githubUpgradeBtn:ed=!1,noRedirect:ep=!1,setShowUpgradeSuccessPopup:eC=$=>{},handleCloseModel:eE=()=>{}}=$,eI=(0,eO.T)(),eS=(0,ef.useRouter)(),[eP,eN]=(0,eg.useState)("python"),eM=(0,em.useElements)(),eH=(0,em.useStripe)(),[eq,eZ]=(0,eg.useState)(""),[eW,eG]=(0,eg.useState)(""),[e$,eJ]=(0,eg.useState)(""),eK=(0,eg.useRef)(null);(0,eg.useRef)(null);let eQ=(0,ew.v9)(ek.o4)||"dark",[eX,eY]=(0,eg.useState)(null!==el),e0=(0,ew.v9)(ek.IC),[e1,e2]=(0,eg.useState)(""),[e5,e3]=(0,eg.useState)(er.club[et?"annualTotalNumber":"monthlyNumber"]),[e6,e4]=(0,eg.useState)("none"),[e9,e8]=(0,eg.useState)(null),[e7,tt]=(0,eg.useState)(null),[tn,tr]=(0,eg.useState)(""),[ti,to]=(0,eg.useState)(!1),[ts,tl]=(0,eg.useState)(!1),[tc,tu]=(0,eg.useState)(!1),[td,th]=(0,eg.useState)(!1);(0,eg.useEffect)(()=>{let $=eS.asPath;"string"==typeof $&&eN($=$.split("/")[1])},[eS.asPath]),(0,eg.useEffect)(()=>{if(e7){let $=setTimeout(()=>{tt(null)},1e4);return()=>clearTimeout($)}},[e7]),(0,eg.useEffect)(()=>{let $=document.querySelector("dialog.is-checkout");null==$||$.removeAttribute("open")},[]),(0,eg.useEffect)(()=>{let $=document.querySelector("dialog.is-checkout");return $&&ei?$.showModal():null==$||$.close(),()=>{null==$||$.close()}},[ei]),(0,eg.useEffect)(()=>{if("failed"===tn){let $=document.querySelector("dialog.is-checkout");$&&(null==$||$.showModal())}},[tn]);let tp=(0,eg.useCallback)(async()=>
1841{try{if(e1){if("HOLIDAY30"===e1)return e2(""),e4("failed");let $=await ey.Z.post("/api/club/stripe/discount",{discountCode:e1}),en=$.data;if("success"===en.status){let $=en.data;e8($);let{type:ei,discount:eo,discountPercentage:es}=$;if(et)return e3(Math.round((er.club.annualTotalNumber-er.club.annualTotalNumber*eo)*100)/100),e4("success");if(!et)return e3(Math.round((er.club.monthlyNumber-er.club.monthlyNumber*eo)*100)/100),e4("success");e4("failed"),setTimeout(()=>{e4("none")},5e3)}else e4("failed")}}catch($){console.log($)}},[et,er.club,e1]);(0,eg.useEffect)(()=>{e3(er.club[et?"annualTotalNumber":"monthlyNumber"]),e4("none"),e8(null),e2("")},[et,er.club]);let tm=(0,eg.useCallback)(function(){eI((0,ek.J)({type:"onboarding",status:"trigger-next-step-in-on",properties:{}}))},[eI]),tf=(0,eg.useCallback)(async $=>{var en,ei,eo,eh,ep,ef;if($.preventDefault(),eH){try{eK.current.disabled=!0}catch($){}if(!ti){if(to(!0),eX){if(!el){tt({code:"no_payment_method",message:"No payment method selected",type:"top"}),to(!1);try{eK.current.disabled=!1}catch($){}return}en=null==el?void 0:el.id}else{try{if(!eH||!eM)return;await eM.submit()}catch($){console.error($),to(!1);try{eK.current.disabled=!1}catch($){}return}let $=eM.getElement(em.CardNumberElement);if(null==$)return;let{paymentMethod:et,error:er}=await eH.createPaymentMethod({type:"card",card:$,billing_details:{name:"".concat(eq," ").concat(eW),address:{postal_code:e$}}});if(er){console.error(er),tt({code:er.code,message:er.message,type:er.type}),to(!1);try{eK.current.disabled=!1}catch($){}return}en=null==et?void 0:et.id}if(eu)try{let $=await fetch("/api/club/stripe/annual-upgrade",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payment_method:en,promotion_code:null==e9?void 0:e9.id})}),et=await $.json();et.status="success",eC(et.data);return}catch($){console.error($),tt({message:"Please reach out to [email protected] for help.",code:"card_confirmation_error",type:"top"});return}try{let $=await ey.Z.post("/api/club/stripe/subscribe",{payment_method:en,price:et?eL.t:eL.yP,promotion_code:null==e9?void 0:e9.id,currency:er.type,githubUpgrade:ed}),el=$.data;if("reload"===el.status&&eS.reload(),"fail"===el.status){if((null===(ei=$.data)||void 0===ei?void 0:ei.data)==="already-subscribed")return tt({message:"You are already subscribed to Cod\xe9dex Club. Please contact [email protected] for help.",code:"already_subscribed",type:"top"});if((null===(eo=$.data)||void 0===eo?void 0:eo.data)==="help")return tt({message:"Please contact [email protected] for help.",code:"help",type:"top"});if((null===(eh=$.data)||void 0===eh?void 0:eh.data)==="other_declines")return tt({message:null===(ef=$.data)||void 0===ef?void 0:ef.message,code:"other_declines",type:"top"});(null===(ep=el.data)||void 0===ep?void 0:ep.code)==="card_declined"?tt({message:"Your card was declined. Please try using another card.",code:"card_declined",type:"top"}):tt({message:"Unable to confirm card. Please try using another card.",code:"card_confirmation_error",type:"top"}),to(!1);return}if("requires_action"===el.status){let{client_secret:$}=el.data;tr("required");let et=document.querySelector("dialog.is-checkout");et.close();let{error:en}=await eH.confirmCardPayment($);if(en){console.error(en),tt({message:"Unable to confirm card. Please try using another card.",code:"card_confirmation_error",type:"top"}),tr("failed");return}}el.status,tl(!0),es&&(0,eD.C3)({eventName:"club-through-ob"}),(0,eD.C3)({eventName:"club-purchase-successful"});try{if(e0){let $=Intl.DateTimeFormat().resolvedOptions().locale,en=(0,ej.Ji)();await ey.Z.post("/api/email/checked-out",{email:null==e0?void 0:e0.email}),await ey.Z.post("/api/club/success",{email:null==e0?void 0:e0.email,currencyType:er.type,annual:et,paid:er.club[et?"annualTotalNumber":"monthlyNumber"],finalPrice:e5,locale:$,country:en,discountCode:e1,upgradeToAnnual:eu})}try{(0,eT.BH)("Purchase",{currency:er.type,value:e5,email:null==e0?void 0:e0.email}),(0,eA.C)();let $=(0,eT.DV)();ey.Z.post("/api/club/purchase-log",{currency:er.type,value:e5,source:"stripe",utmCampaign:$.utm_campaign||null,utmSource:$.utm_source||null,fbclid:$.fbclid||null}).catch($=>console.error("purchase log failed:",$))}catch($){console.error($,"tracking fbq")}}catch($){console.error($)}setTimeout(()=>{var $;null===($=document.querySelector(".is-checkout"))||void 0===$||$.removeAttribute("open"),es?tm():(eI((0,ek.J)({type:"paymentSuccess",status:"show",properties:{}})),tu(!0))},2e3)}catch($){console.error($),tt({message:"Please reach out to [email protected] for help.",code:"card_confirmation_error",type:"top"})}finally{to(!1),eK.current.disabled=!1}}}},[et,er.club,er.type,e1,null==e9?void 0:e9.id,eI,eM,e5,eq,ed,es,eW,ti,tm,el,e$,eS,eC,eH,eu,eX,e0]),tg=(0,eg.useCallback)($=>{"Enter"===$.key&&$.preventDefault()},[]),ty=(0,eg.useCallback)(async()=>
1841{if(!td){th(!0);try{var $;let en=await ey.Z.post("/api/club/stripe/upi-checkout",{plan:et?"annual":"monthly"});"success"===en.data.status&&(null===($=en.data.data)||void 0===$?void 0:$.url)?window.location.href=en.data.data.url:(tt({code:"upi_error",message:"club-user"===en.data.data?"You are already subscribed to Cod\xe9dex Club.":"Unable to start UPI checkout. Please try again.",type:"top"}),th(!1))}catch($){console.error($),tt({code:"upi_error",message:"Unable to start UPI checkout. Please try again.",type:"top"}),th(!1)}}},[et,td]);return((0,eg.useEffect)(()=>{tc&&setTimeout(()=>{eI((0,ek.J)({type:"paymentSuccess",status:"show",properties:{}}))},0)},[eI,tc]),ei)?tc?(0,eh.jsx)(eh.Fragment,{}):(0,eh.jsx)(eh.Fragment,{children:(0,eh.jsx)(eB,{borderColor:"dark"===eQ?"64748B":"94A3B8",role:"dialog",className:"is-checkout is-rounded",children:(0,eh.jsxs)("form",{method:"dialog",onSubmit:tf,onKeyDown:tg,onClick:$=>$.stopPropagation(),children:[(0,eh.jsx)("div",{onClick:()=>{ep||(window.history.length<=2?eS.push("/pricing"):eS.push("/".concat(eP)));let $=document.querySelector("dialog.is-checkout");null==$||$.close(),eE()},className:"close-btn nes-pointer",children:(0,eh.jsx)(eV.Z,{className:"nes-pointer"})}),(0,eh.jsxs)(eU,{children:[(0,eh.jsx)("h1",{className:"upgrade-heading",children:eu?"Switch to annual plan":"Upgrade to Cod\xe9dex Club"}),e7&&!ez.includes(null==e7?void 0:e7.code)&&(0,eh.jsx)(e_.Z,{message:null==e7?void 0:e7.message,type:"top"}),(0,eh.jsxs)("div",{className:"content-container",children:[(0,eh.jsxs)("div",{className:"payment-container",children:[(0,eh.jsx)("div",{className:"subscription-toggle-container",children:(0,eh.jsx)(ex.Z,{currency:er,annual:et,setAnnual:en,upgradeBtn:eu})}),(0,eh.jsxs)("div",{className:"payment-method-container",children:[(0,eh.jsx)("h3",{children:"Payment Method"}),(0,eh.jsx)("div",{className:"",children:(0,eh.jsx)(stripe_PaymentMethodSelector,{paymentMethod:el,useDefaultPaymentMethod:eX,setUseDefaultPaymentMethod:eY})}),!eX&&(0,eh.jsxs)(eh.Fragment,{children:[(0,eh.jsxs)("div",{className:"row-container",children:[(0,eh.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,eh.jsx)("label",{htmlFor:"card-element",children:"Credit/Debit"})}),(0,eh.jsx)(em.CardNumberElement,{options:{showIcon:!0,classes:{base:"card-number-element"},style:{base:{"::placeholder":{color:"#CCC"}}}},id:"card-element"}),(null==e7?void 0:e7.code)==="incomplete_number"&&(0,eh.jsx)(e_.Z,{message:"Please enter a valid card number"})]}),(0,eh.jsxs)("div",{className:"inline-flex-2-inputs row-container",children:[(0,eh.jsxs)("div",{children:[(0,eh.jsx)("label",{htmlFor:"expiration-date",children:"Expiration Date"}),(0,eh.jsx)(em.CardExpiryElement,{options:{classes:{base:"card-expiry-element"},style:{base:{"::placeholder":{color:"#CCC"}}}},id:"expiration-date"}),(null==e7?void 0:e7.code)==="incomplete_expiry"&&(0,eh.jsx)(e_.Z,{message:"Please enter a valid expiration date"})]}),(0,eh.jsxs)("div",{children:[(0,eh.jsx)("label",{htmlFor:"cvv",children:"CVC/CVV"}),(0,eh.jsx)(em.CardCvcElement,{options:{classes:{base:"card-cvv-element"},style:{base:{"::placeholder":{color:"#CCC"}}}},id:"cvv"}),(null==e7?void 0:e7.code)==="incomplete_cvc"&&(0,eh.jsx)(e_.Z,{message:"Please enter a valid CVC"})]})]}),(0,eh.jsxs)("div",{className:"inline-flex-2-inputs row-container",children:[(0,eh.jsxs)("div",{children:[(0,eh.jsx)("label",{htmlFor:"first-name",children:"First Name"}),(0,eh.jsx)("input",{id:"first-name",type:"text",value:eq,onChange:$=>{eZ($.currentTarget.value)},required:!0})]}),(0,eh.jsxs)("div",{children:[(0,eh.jsx)("label",{htmlFor:"last-name",children:"Last Name"}),(0,eh.jsx)("input",{id:"last-name",value:eW,onChange:$=>{eG($.currentTarget.value)},type:"text",required:!0})]})]}),(0,eh.jsxs)("div",{className:"row-container",children:[(0,eh.jsx)("label",{htmlFor:"pin-code",children:"Billing Zip / Postal Code"}),(0,eh.jsx)("input",{id:"pin-code",value:e$,onChange:$=>{eJ($.currentTarget.value)},required:!0})]})]}),eo&&(0,eh.jsxs)(eh.Fragment,{children:[(0,eh.jsxs)("div",{className:"row-container pay-by-section",style:{display:"flex"},children:[(0,eh.jsx)("div",{className:"line"}),(0,eh.jsx)("span",{children:"Or pay by"}),(0,eh.jsx)("div",{className:"line"})]}),(0,eh.jsx)("div",{className:"paypal-googlepay row-container nes-pointer inline-flex-2-inputs",children:(0,eh.jsx)(PayPal,{annual:et,setShowSuccessModal:tu,setError:tt})})]}),"INR"===er.type&&(0,eh.jsxs)(eh.Fragment,{children:[(0,eh.jsxs)("div",{className:"row-container pay-by-section",style:{display:"flex"},children:[(0,eh.jsx)("div",{className:"line"}),(0,eh.jsx)("span",{children:"Or pay by"}),(0,eh.jsx)("div",{className:"line"})]}),(0,eh.jsx)("div",{className:"row-container",children:(0,eh.jsx)(eR.Z,{variant:"subtle",lightModeOnly:!0,onClick:$=>{$.preventDefault(),ty()},disabled:td,style:{width:"100%"},children:td?(0,eh.jsx)(ev.Z,{color:"black",size:13}):(0,eh.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"center"},children:["Pay with"," ",(0,eh.jsx)("img",{src:"/images/payments/UPI-01.png",alt:"UPI",height:25,style:{verticalAlign:"middle"}})]})})})]})]})]}),(0,eh.jsxs)("div",{className:"order-container",children:[(0,eh.jsxs)("div",{className:"order-summary-container",children:[(0,eh.jsx)("h3",{children:"Order Summary"}),(0,eh.jsx)("div",{className:"order-summary",children:(0,eh.jsxs)("div",{className:"order-summary-row",children:[(0,eh.jsxs)("div",{children:[(0,eh.jsx)("p",{children:"Cod\xe9dex Club"}),(0,eh.jsx)("span",{children:et?"Billed Yearly":"Billed Monthly"})]}),(0,eh.jsx)("p",{className:"money",children:et?"".concat(er.sign," ").concat(12*er.club.monthlyNumber):"".concat(er.sign," ").concat(er.club.monthlyNumber)})]})}),(0,eh.jsxs)("div",{className:"discount",children:[(0,eh.jsx)("input",{type:"text",placeholder:"Enter discount code",value:e1,onChange:$=>e2($.currentTarget.value)}),(0,eh.jsx)(eR.Z,{lightModeOnly:!0,variant:"subtle",className:"apply-btn",onClick:()=>{tp()},children:(0,eh.jsx)("span",{className:"nes-pointer",children:"Apply"})})]}),"success"===e6&&(0,eh.jsx)("div",{className:"order-summary",children:(0,eh.jsxs)("div",{className:"order-summary-row",children:[(0,eh.jsx)("p",{children:"Discount Code"}),(0,eh.jsxs)("p",{className:"money",children:["-",er.sign," ",er.club[et?"annualTotalNumber":"monthlyNumber"]*e9.discount]})]})}),"failed"===e6&&(0,eh.jsx)("div",{className:"order-summary",children:(0,eh.jsx)("div",{className:"order-summary-row error",children:(0,eh.jsx)("p",{style:{color:"red"},children:"Invalid discount code"})})}),et&&(0,eh.jsx)("div",{className:"order-summary",children:(0,eh.jsxs)("div",{className:"order-summary-row",children:[(0,eh.jsx)("p",{children:"Annual Plan Discount"}),(0,eh.jsxs)("p",{className:"money",children:["-",er.sign," ",Math.round((12*er.club.monthlyNumber-er.club.annualTotalNumber)*100)/100]})]})}),(0,eh.jsx)("div",{className:"line"}),(0,eh.jsx)("div",{className:"total",children:(0,eh.jsxs)("div",{className:"total-row",children:[(0,eh.jsx)("p",{children:"Total Amount"}),(0,eh.jsxs)("p",{children:[er.sign," ",e5.toFixed(2)]})]})})]}),(0,eh.jsx)("div",{className:"terms-agreement",children:(0,eh.jsxs)("p",{className:"back-message",children:["By subscribing, I agree to the Cod\xe9dex"," ",(0,eh.jsx)(eF(),{href:"/terms",target:"_blank",children:"Terms of Service"})," ","and"," ",(0,eh.jsx)(eF(),{href:"/privacy",target:"_blank",children:"Privacy Policy"}),"."]})}),(0,eh.jsx)("div",{className:"submit-btn-container",children:(0,eh.jsx)(eR.Z,{variant:"blue",disabled:ti,className:"".concat(ts?"is-success":""),type:"submit",ref:eK,children:ti?(0,eh.jsx)(ev.Z,{color:"white",size:13}):ts?"Success!":"Make Payment"})}),(0,eh.jsxs)("p",{className:"back-message",children:["3 day money-back guarantee from first payment.",(0,eh.jsx)("br",{}),"Cancel anytime."]})]})]})]})]})})}):null}},62961:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);
1841function _templateObject(){let $=(0,er._)(["\n "," {\n color: #ff0000;\n font-size: 14px;\n }\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n ",' {\n background-color: #ffe4e4;\n color: #fc3e15;\n margin: 0 1rem;\n margin-bottom: 8px;\n border: 1px solid #fc3e15;\n border-radius: 8px;\n font-family: "Work Sans", sans-serif;\n height: 35px;\n padding-top: 0.3rem;\n padding-left: 1.5rem;\n }\n']);return _templateObject1=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-edb7787d-0"})(_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs}),el=eo.default.div.withConfig({componentId:"sc-edb7787d-1"})(_templateObject1(),$=>{let{theme:et}=$;return et.breakpoints.xs});et.Z=function($){let{message:et,type:en}=$;return en?(0,ei.jsx)(el,{children:(0,ei.jsx)("span",{children:et})}):(0,ei.jsx)(es,{children:(0,ei.jsx)("span",{children:et})})}},7423:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(17593);function _templateObject(){let $=(0,er._)(["\n display: flex;\n gap: 1.5rem;\n justify-content: space-between;\n margin-top: 1rem;\n flex-flow: column;\n align-items: center;\n\n div.price-container {\n display: flex;\n flex-flow: column;\n justify-content: center;
1841\n align-items: center;\n border: 2px solid ",';\n border-radius: 8px;\n width: 100%;\n height: 80px;\n\n position: relative;\n\n &:hover {\n box-shadow: 4px 5px 15px 1px rgba(0, 0, 0, 0.3);\n background-color: rgba(0, 0, 0, 0.02);\n }\n\n h2 {\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-weight: 900;\n margin-bottom: 0;\n text-align: center;\n }\n\n span.period {\n font-size: 14px;\n color: ',";\n padding-left: 0.2rem;\n\n color: #64748b;\n\n font-weight: 500;\n line-height: 150%;\n }\n\n img {\n position: absolute;\n bottom: -0.8rem;\n right: -0.8rem;\n width: 30px;\n height: 30px;\n }\n }\n\n div.annual {\n div.saver {\n position: absolute;\n top: -0.7rem;\n width: 100%;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n h3 {\n position: absolute;\n top: -3.5px;\n width: 97px;\n height: 25px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 100px;\n background: #b6e4ff;\n border: 2px solid #14adff;\n z-index: 2;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ",";\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n color: #0065ab;\n }\n }\n }\n div.selected {\n border: 2px solid #14adff;\n }\n\n "," {\n flex-flow: column;\n\n h2 {\n font-size: 1rem;\n }\n\n div.annual {\n div.saver {\n h3 {\n font-size: 0.6rem;\n }\n }\n }\n\n span {\n font-size: 14px;\n }\n }\n\n "," {\n flex-flow: row;\n h2 {\n font-size: 1rem;\n }\n span {\n font-size: 1rem;\n }\n\n div.price-container {\n width: 222.5px;\n }\n\n div.annual {\n div.saver {\n h3 {\n font-size: 12px;\n }\n }\n }\n }\n\n "," {\n h2 {\n font-size: 1.5rem;\n }\n span {\n font-size: 14px;\n }\n }\n"]);return _templateObject=function(){return $},$}let el=eo.default.div.withConfig({componentId:"sc-a5aca82-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.palette.grey["300"]},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg});et.Z=function($){let{currency:et,annual:en,setAnnual:er,liferEnable:eo=!1,select4Lifer:eu=!1,setSelect4Lifer:ed=$=>{},upgradeBtn:eh=!1}=$;return(0,ei.jsxs)(el,{className:"nes-pointer club-tier-toggle",children:[(0,ei.jsxs)("div",{onClick:()=>{er(!0),ed(!1)},className:"".concat(en&&!eu?"selected":""," nes-pointer price-container annual"),children:[en&&!eu&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("img",{src:"/images/pop-ups/paywall/blue-tick.png",alt:"checkmark"}),(0,ei.jsx)("div",{className:"saver",children:(0,ei.jsxs)("h3",{children:["SAVE ",es.JP[null==et?void 0:et.type],"%"]})})]}),(0,ei.jsxs)("h2",{children:[et.club.annual,(0,ei.jsx)("span",{className:"period",children:"/ month"})]}),(0,ei.jsx)("span",{children:"Billed Yearly"})]}),(0,ei.jsxs)("div",{onClick:()=>{eh||(er(!1),ed(!1))},className:"".concat(en||eu?"":"selected","\n ").concat(eh?"disabled":"","\n nes-pointer price-container"),children:[!en&&!eu&&(0,ei.jsx)("img",{src:"/images/pop-ups/paywall/blue-tick.png",alt:"checkmark"}),(0,ei.jsxs)("h2",{children:[et.club.monthly,(0,ei.jsx)("span",{className:"period",children:"/ month"})]}),(0,ei.jsx)("span",{children:"Billed Monthly"})]}),eo&&(0,ei.jsxs)("div",{onClick:()=>{ed(!0),er(),ed(!0)},className:"nes-pointer price-container ".concat(eu?"selected":""," "),children:[eu&&(0,ei.jsx)("img",{src:"/images/pop-ups/paywall/tick.png",alt:"checkmark"}),(0,ei.jsxs)("h2",{children:["$ 399",(0,ei.jsx)("span",{className:"period",children:"/forever"})]}),(0,ei.jsx)("span",{children:"Billed Once"})]})]})}},46869:function($,et,en){"use strict";en.d(et,{Je:function(){return ei},Rn:function(){return es},oY:function(){return toEditorLanguage},p5:function(){return eo},rm:function(){return el}});let er={"c-sharp":"csharp"};function toEditorLanguage($){var et;return null!==(et=er[$])&&void 0!==et?et:$}
1841let ei={easy:{BackgroundImage:"/images/challenge_packs/textures/easy_texture.png",backgroundColor:"#84cc16",lightBackgroundColor:"#ecfccb",label:{text:"EASY",backgroundColor:"#d9f99d",color:"#3f6212"}},medium:{BackgroundImage:"/images/challenge_packs/textures/medium_texture.png",backgroundColor:"#EAB308",lightBackgroundColor:"#FEF9C3",label:{text:"MEDIUM",backgroundColor:"#FEF08A",color:"#854D0E"}},hard:{BackgroundImage:"/images/challenge_packs/textures/hard_texture.png",backgroundColor:"#F43F5E",lightBackgroundColor:"#FFE4E6",label:{text:"HARD",backgroundColor:"#FECDD3",color:"#9F1239"}}},eo=[{internalName:"all",displayName:"All"},{internalName:"python",displayName:"Python"},{internalName:"javascript",displayName:"JavaScript"},{internalName:"html",displayName:"HTML"},{internalName:"java",displayName:"Java"},{internalName:"c-sharp",displayName:"C#"}],es={"variables-python":{language:"Python",title:"Variables",cardColor:"#0065ab",imageColor:"#14adff",badgeLink:"/images/badges/python/variables.png",textShadowColors:{primary:"#0065ab",secondary:"#042d4d"}},"control-flow-python":{language:"Python",title:"Control Flow",cardColor:"#0065ab",imageColor:"#14adff",badgeLink:"/images/badges/python/control-flow.png",textShadowColors:{primary:"#0065ab",secondary:"#042d4d"}},"loops-python":{language:"Python",title:"Loops",cardColor:"#0065ab",imageColor:"#14adff",badgeLink:"/images/badges/python/loops.png",textShadowColors:{primary:"#0065ab",secondary:"#042d4d"}},"functions-python":{language:"Python",title:"Functions",cardColor:"#0065ab",imageColor:"#14adff",badgeLink:"/images/badges/python/functions.png",textShadowColors:{primary:"#0065ab",secondary:"#042d4d"}},"lists-python":{language:"Python",title:"Lists",cardColor:"#0065ab",imageColor:"#14adff",badgeLink:"/images/badges/python/lists.png",textShadowColors:{primary:"#0065ab",secondary:"#042d4d"}},"loops-javascript":{language:"JavaScript",title:"Loops",cardColor:"#6D28D9",imageColor:"#8B5CF6",badgeLink:"/images/badges/python/loops.png",textShadowColors:{primary:"#6D28D9",secondary:"#2E1065"}},"conditionals-javascript":{language:"JavaScript",title:"Conditionals",cardColor:"#6D28D9",imageColor:"#8B5CF6",badgeLink:"/images/badges/javascript/conditionals.png",textShadowColors:{primary:"#6D28D9",secondary:"#2E1065"}},"elements-html":{language:"HTML",title:"Elements",cardColor:"#E34F26",imageColor:"#F16529",badgeLink:"/images/badges/html/elements.png",textShadowColors:{primary:"#E34F26",secondary:"#8B2500"}},"structure-html":{language:"HTML",title:"Structure",cardColor:"#E34F26",imageColor:"#F16529",badgeLink:"/images/badges/html/structure.png",textShadowColors:{primary:"#E34F26",secondary:"#8B2500"}},"control-flow-java":{language:"Java",title:"Control Flow",cardColor:"#E76F00",imageColor:"#F89820",badgeLink:"/images/badges/python/control-flow.png",textShadowColors:{primary:"#E76F00",secondary:"#5B2C00"}},"loops-java":{language:"Java",title:"Loops",cardColor:"#E76F00",imageColor:"#F89820",badgeLink:"/images/badges/java/loops.png",textShadowColors:{primary:"#E76F00",secondary:"#5B2C00"}},"arrays-java":{language:"Java",title:"Arrays",cardColor:"#E76F00",imageColor:"#F89820",badgeLink:"/images/badges/java/arrays.png",textShadowColors:{primary:"#E76F00",secondary:"#5B2C00"}},"control-flow-c-sharp":{language:"C#",title:"Control Flow",cardColor:"#68217A",imageColor:"#9B4F96",badgeLink:"/images/badges/c-sharp/control-flow.png",textShadowColors:{primary:"#68217A",secondary:"#3C1247"}}},el={default:{outerSplit:[50,50],outerMinSize:[550,600],innerEditorSplit:[60,40]},html:{outerSplit:[50,50],outerMinSize:[550,600],innerEditorSplit:[50,50]}}},19907:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521);function _templateObject(){let $=(0,er._)(["\n #confetti-holder {\n position: fixed;\n height: 100vh;\n pointer-events: none;\n width: 100%;\n top: 0;\n left: 0;\n z-index: 2;\n text-align: center;\n vertical-align: middle;\n }\n\n #e0DQ82qcIov1 {\n height: 150vh;\n min-width: 600px;\n min-height: 600px;\n }\n\n .center {\n width: 100%;\n height: 100vh;\n display: flex;\n background-color: #fff8f5;
1841\n align-items: center;\n justify-content: center;\n }\n\n #shooter {\n font-weight: 500;\n padding: 16px 32px;\n min-width: 200px;\n overflow: hidden;\n cursor: pointer;\n outline: none;\n color: rgba(250, 250, 255, 0.9);\n background-color: #e64784;\n border: none;\n border-radius: 48px;\n box-shadow: 0 4px 8px #f2b3c8;\n -webkit-tap-highlight-color: transparent;\n transition: box-shadow 0.1s ease-out;\n }\n\n #shooter:hover {\n background-color: #f74d8d;\n color: rgba(250, 250, 255, 1);\n box-shadow: 0 8px 16px #f6ceda;\n }\n\n #shooter:active {\n box-shadow: 0 0 8px #f6ceda;\n transform: translateY(4px);\n color: #fff;\n }\n\n span.shoot {\n font-size: 28px;\n text-align: center;\n pointer-events: none;\n }\n\n #love {\n position: fixed;\n color: rgba(10, 0, 15, 0.48);\n bottom: 1rem;\n -webkit-tap-highlight-color: transparent;\n font-size: 1.2vw;\n }\n\n #svgator {\n color: rgba(100, 90, 210, 0.8);\n }\n\n #svgator:hover {\n color: rgba(100, 90, 230, 1);\n }\n"]);return _templateObject=function(){return $},$}let el=es.default.div.withConfig({componentId:"sc-f67bfd49-0"})(_templateObject());et.Z=function($){let{triggerConfetti:et,setTriggerConfetti:en}=$;return(0,eo.useEffect)(function(){var $,et,en,er,ei,eo,es,el,eu,ed,eh,ep;$="91c80d77",et={root:"e0DQ82qcIov1",version:"2022-05-04",animations:[{elements:{e0DQ82qcIov2:{transform:{data:{t:{x:-51.928662,y:-353.428619}},keys:{o:[{t:200,v:{x:51.928662,y:440.868661,type:"corner"},e:[0,0,.58,1]},{t:600,v:{x:120.290877,y:.059958,type:"corner"},e:[.42,0,1,1]},{t:1880,v:{x:172.503841,y:132.490147,type:"corner"}},{t:3200,v:{x:290.290877,y:432.441375,type:"corner"}}],s:[{t:200,v:{x:.5,y:.5},e:[0,0,.58,1]},{t:600,v:{x:1,y:1}}]}}},e0DQ82qcIov4:{transform:{data:{k:{x:12,y:-12},t:{x:-2.525,y:-2.525}},keys:{o:[{t:0,v:{x:68.064753,y:370.436272,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:138.217652,y:366.183102,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:62.969741,y:597.053495,type:"corner"}}],r:[{t:0,v:-4.25997,e:[.42,0,.58,1]},{t:600,v:3.089446},{t:3e3,v:715.74003}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov5:{transform:{data:{k:{x:0,y:-12},t:{x:-2.68,y:-2.68}},keys:{o:[{t:0,v:{x:44.82662,y:355.138022,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:59.1463,y:304.670723,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-73.608537,y:494.439665,type:"corner"}}],r:[{t:0,v:132.589988,e:[.42,0,.58,1]},{t:600,v:139.939404},{t:3e3,v:852.589988}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov6:{transform:{data:{k:{x:0,y:-12},t:{x:-2.73,y:-2.73}},keys:{o:[{t:0,v:{x:76.966411,y:370.498978,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:155.616925,y:356.566181,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:93.036148,y:575.583428,type:"corner"}}],r:[{t:0,v:-62.459981,e:[.42,0,.58,1]},{t:600,v:-55.110565}
1841,{t:3e3,v:657.540019}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov7:{transform:{data:{k:{x:12,y:-12},t:{x:-2.77,y:-2.77}},keys:{o:[{t:0,v:{x:26.7906,y:351.65583,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-2.272941,y:293.411173,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-163.981636,y:470.444934,type:"corner"}}],r:[{t:0,v:139.969992,e:[.42,0,.58,1]},{t:600,v:147.319408},{t:3e3,v:859.969992}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov8:{transform:{data:{k:{x:0,y:-12},t:{x:-2.865,y:-2.865}},keys:{o:[{t:0,v:{x:39.423034,y:363.233381,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:36.500064,y:344.648626,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-112.122565,y:559.021139,type:"corner"}}],r:[{t:0,v:-24.030013,e:[.42,0,.58,1]},{t:600,v:-16.680597},{t:3e3,v:695.969987}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov9:{transform:{data:{k:{x:0,y:-12},t:{x:-2.8,y:-2.8}},keys:{o:[{t:0,v:{x:59.052701,y:359.318068,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-10.947299,y:310.72201,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-178.694775,y:502.764104,type:"corner"}}],r:[{t:0,v:-71.26999,e:[.42,0,.58,1]},{t:600,v:-63.920574},{t:3e3,v:648.73001}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov10:{transform:{data:{k:{x:0,y:-12},t:{x:-2.535,y:-2.535}},keys:{o:[{t:0,v:{x:50.224523,y:362.370224,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:67.315377,y:339.995252,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-59.443231,y:551.12236,type:"corner"}}],r:[{t:0,v:164.230015,e:[.42,0,.58,1]},{t:600,v:171.579431},{t:3e3,v:884.230015}],s:[{t:0,v:{x:.999999,y:.999999},e:[.42,0,.58,1]},{t:500,v:{x:.999999,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:.999999,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov11:{transform:{data:{k:{x:0,y:-12},t:{x:-2.2,y:-2.2}},keys:{o:[{t:0,v:{x:50.591928,y:342.397172,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:70.805055,y:272.948791,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-53.301182,y:445.3462,type:"corner"}}],r:[{t:0,v:.62001,e:[.42,0,.58,1]},{t:600,v:7.969426},{t:3e3,v:720.62001}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov12:{transform:{data:{k:{x:0,y:-12},t:{x:-2.395,y:-2.395}},keys:{o:[{t:0,v:{x:31.309619,y:343.409971,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:10.075504,y:277.1748,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-150.760432,y:425.001715,type:"corner"}}],r:[{t:0,v:236.530023,e:[.42,0,.58,1]},{t:600,v:243.879439},{t:3e3,v:956.530023}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov13:{transform:{data:{r:-23.480008,t:{x:-2.155,y:-2.155}},keys:{o:[{t:0,v:{x:46.133617,y:370.070952,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:23.496828,y:362.012633,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-66.196782,y:589.990632,type:"corner"}}]}}},e0DQ82qcIov14:{transform:{data:{r:265.32998,t:{x:-2.05,y:-2.05}},keys:{o:[{t:0,v:{x:28.687515,y:360.708914,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-38.480575,y:329.213846,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-157.079058,y:544.79685,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov15:{transform:{data:{r:172.829984,k:{x:12,y:0},t:{x:-2.095,y:-2.095}},keys:{o:[{t:0,v:{x:50.810098,y:333.958901,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:34.042574,y:225.979204,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-39.880905,y:368.085033,type:"corner"}}]}}},e0DQ82qcIov16:{transform:{data:{r:257.990019,t:{x:-2.5,y:-2.5}},keys:{o:[{t:0,v:{x:66.646344,y:327.690598,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:85.54472,y:215.365754,type:"corner"},e:[.42,0,1,1]}
1841,{t:3e3,v:{x:25.149435,y:337.898437,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov17:{transform:{data:{r:1.370016,t:{x:-2.745,y:-2.745}},keys:{o:[{t:0,v:{x:42.32234,y:344.248782,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:4.991094,y:282.082718,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-97.714501,y:439.325802,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov18:{transform:{data:{r:197.869986,k:{x:12,y:0},t:{x:-2.69,y:-2.69}},keys:{o:[{t:0,v:{x:32.81924,y:367.937011,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-26.123954,y:350.393784,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-143.266235,y:567.352506,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov19:{transform:{data:{r:45.880004,s:{x:.999999,y:.999999},t:{x:-2.2,y:-2.2}},keys:{o:[{t:0,v:{x:69.42681,y:343.203907,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:102.53224,y:268.644497,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:69.576063,y:432.418181,type:"corner"}}]}}},e0DQ82qcIov20:{transform:{data:{r:42.699998,s:{x:1.000001,y:1.000001},t:{x:-2.165,y:-2.165}},keys:{o:[{t:0,v:{x:57.14359,y:382.12474,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:52.363073,y:377.223158,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-18.856827,y:649.588199,type:"corner"}}]}}},e0DQ82qcIov21:{transform:{data:{r:219.15,t:{x:-2.61,y:-2.61}},keys:{o:[{t:0,v:{x:35.526051,y:335.394518,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-20.675301,y:231.001058,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-135.418854,y:375.028305,type:"corner"}}]}}},e0DQ82qcIov22:{transform:{data:{r:32.799978,k:{x:12,y:0},t:{x:-2.415,y:-2.415}},keys:{o:[{t:0,v:{x:72.116036,y:334.883898,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:107.372441,y:221.01296,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:76.814992,y:361.197371,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov23:{transform:{data:{r:211.47999,t:{x:-2.1,y:-2.1}},keys:{o:[{t:0,v:{x:81.111985,y:360.678689,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:124.737201,y:325.050741,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:107.54102,y:522.863102,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov24:{transform:{data:{r:53.209996,t:{x:-2.27,y:-2.27}},keys:{o:[{t:0,v:{x:80.035598,y:338.632952,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:120.28118,y:242.721211,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:100.686271,y:390.591294,type:"corner"}}]}}},e0DQ82qcIov25:{transform:{data:{r:-.309972,t:{x:-2.87,y:-2.87}},keys:{o:[{t:0,v:{x:42.81354,y:329.78368,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:9.077533,y:200.244515,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-81.070598,y:353.708746,type:"corner"}}]}}},e0DQ82qcIov26:{transform:{data:{t:{x:-64.251358,y:-382.608965}},keys:{o:[{t:0,v:{x:44.251196,y:382.608963,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:5.056724,y:240.47839,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-48.895685,y:624.464424,type:"corner"}}],r:[{t:600,v:-23.982197},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov27:{transform:{data:{t:{x:-72.129825,y:-327.740721}},keys:{o:[{t:0,v:{x:52.12923,y:327.741974,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:28.30154,y:210.136787,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-8.016826,y:321.537428,type:"corner"}}],r:[{t:600,v:0},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov28:{transform:{data:{t:{x:-58.60866,y:-362.624473}},keys:{o:[{t:0,v:{x:38.60961,y:362.624512,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-19.604272,y:334.474967,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-91.676691,y:528.405553,type:"corner"}}],r:[{t:600,v:0},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov29:{transform:{data:{t:{x:-85.125,y:-372.55}},keys:{o:[{t:0,v:{x:65.124998,y:372.550003,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:60.58287,y:328.985605,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:39.906257,y:605.071179,type:"corner"}}]}}},e0DQ82qcIov30:{transform:{data:{t:{x:-85.985,y:-343.2}},keys:{o:[{t:0,v:{x:65.984999,y:343.199997,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:67.093979,y:256.359486,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:55.179319,y:416.286149,type:"corner"}}]}}},e0DQ82qcIov31:{transform:{data:{t:{x:-51.55,y:-340.1}},keys:{o:[{t:0,v:{x:31.55,y:340.100006,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-44.109368,y:248.924038,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-120.465769,y:398.715533,type:"corner"}}]}}},e0DQ82qcIov32:{transform:{data:{k:{x:12,y:0},t:{x:0,y:-.000026}},keys:{o:[{t:0,v:{x:21.08,y:358.870026,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:-56.695208,y:316.172304,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:-171.514115,y:510.141829,type:"corner"}}]}}},e0DQ82qcIov33:{transform:{data:{k:{x:12,y:0},t:{x:4e-6,y:-.000031}},keys:{o:[{t:0,v:{x:81.819996,y:336.500031,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:124.984262,y:237.108421,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:122.585537,y:383.057086,type:"corner"}}]}}}
1841,e0DQ82qcIov34:{transform:{data:{t:{x:-339.133026,y:-353.430679}},keys:{o:[{t:0,v:{x:339.133026,y:440.870722,type:"corner"},e:[0,0,.58,1]},{t:400,v:{x:260.436988,y:.00206,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:120.436988,y:472.443436,type:"corner"}}],s:[{t:0,v:{x:.5,y:.5},e:[0,0,.58,1]},{t:400,v:{x:1,y:1}}]}}},e0DQ82qcIov36:{transform:{data:{k:{x:0,y:-12},t:{x:-2.665,y:-2.665}},keys:{o:[{t:0,v:{x:339.831338,y:323.778077,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:360.698425,y:165.66525,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:404.696728,y:305.971088,type:"corner"}}],r:[{t:0,v:267.319986,e:[.42,0,.58,1]},{t:600,v:274.669402},{t:3e3,v:987.319986}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov37:{transform:{data:{k:{x:0,y:-12},t:{x:-2.68,y:-2.679999}},keys:{o:[{t:0,v:{x:332.034787,y:355.149072,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:335.734711,y:291.35666,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:365.763922,y:456.825595,type:"corner"}}],r:[{t:0,v:132.589988,e:[.42,0,.58,1]},{t:600,v:139.939404},{t:3e3,v:852.589988}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov38:{transform:{data:{k:{x:12,y:-12},t:{x:-2.77,y:-2.77}},keys:{o:[{t:0,v:{x:313.969353,y:351.649632,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:274.477002,y:277.997683,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:257.724466,y:430.117852,type:"corner"}}],r:[{t:0,v:139.969992,e:[.42,0,.58,1]},{t:600,v:147.319408},{t:3e3,v:859.969992}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov39:{transform:{data:{k:{x:12,y:-12},t:{x:-2.8,y:-2.8}},keys:{o:[{t:0,v:{x:346.242015,y:359.327013,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:381.987786,y:159.327013,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:460.321097,y:464.011506,type:"corner"}}],r:[{t:0,v:-71.26999,e:[.42,0,.58,1]},{t:600,v:-63.920574},{t:3e3,v:648.73001}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov40:{transform:{data:{k:{x:12,y:-12},t:{x:-2.2,y:-2.2}},keys:{o:[{t:0,v:{x:337.775113,y:342.384855,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:347.393466,y:258.599075,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:386.483034,y:404.151462,type:"corner"}}],r:[{t:0,v:.62001,e:[.42,0,.58,1]},{t:600,v:7.969426},{t:3e3,v:720.62001}],s:[{t:0,v:{x:1,y:1},e:[.42,0,.58,1]},{t:500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:1e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:1500,v:{x:-1,y:1},e:[.42,0,.58,1]},{t:2e3,v:{x:1,y:1},e:[.42,0,.58,1]},{t:2500,v:{x:1,y:-1},e:[.42,0,.58,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov41:{transform:{data:{r:-23.480008,t:{x:-2.155,y:-2.155}},keys:{o:[{t:0,v:{x:333.324042,y:370.076111,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:280.085239,y:356.710812,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:373.31293,y:536.26526,type:"corner"}}]}}},e0DQ82qcIov42:{transform:{data:{r:172.829984,t:{x:-2.095,y:-2.095}},keys:{o:[{t:0,v:{x:338.005958,y:333.965489,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:290.630985,y:207.121767,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:391.973902,y:342.843305,type:"corner"}}]}}},e0DQ82qcIov43:{transform:{data:{r:45.880004,k:{x:12,y:0},s:{x:.999999,y:.999999},t:{x:-2.2,y:-2.2}},keys:{o:[{t:0,v:{x:356.60777,y:343.212629,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:363.566855,y:252.567281,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:510.386099,y:398.403963,type:"corner"}}]}}},e0DQ82qcIov44:{transform:{data:{r:42.699998,t:{x:-2.165,y:-2.165}},keys:{o:[{t:0,v:{x:344.35393,y:382.105602,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:308.944614,y:375.885601,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:419.910214,y:566.056536,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov45:{transform:{data:{r:219.15,k:{x:12,y:0},t:{x:-2.61,y:-2.61}},keys:{o:[{t:0,v:{x:322.723673,y:335.389995,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:236.074642,y:193.27712,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:305.43786,y:348.862778,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov46:{transform:{data:{r:234.010016,t:{x:-2.58,y:-2.58}},keys:{o:[{t:0,v:{x:369.232359,y:348.112273,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:390.654123,y:270.810625,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:570.069779,y:415.332942,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov47:{transform:{data:{r:32.799978,t:{x:-2.415,y:-2.415}},keys:{o:[{t:0,v:{x:359.306824,y:334.892403,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:368.407056,y:201.040458,type:"corner"},e:[.42,0,1,1]}
1841,{t:3e3,v:{x:517.76228,y:337.507771,type:"corner"}}]}}},e0DQ82qcIov48:{transform:{data:{r:211.47999,k:{x:12,y:0},t:{x:-2.1,y:-2.1}},keys:{o:[{t:0,v:{x:368.311337,y:360.672632,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:385.771816,y:309.827362,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:549.037316,y:480.545797,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov49:{transform:{data:{r:53.209996,k:{x:12,y:0},t:{x:-2.27,y:-2.27}},keys:{o:[{t:0,v:{x:367.235051,y:338.643013,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:381.315795,y:220.571666,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:542.045315,y:362.503156,type:"corner"}}],s:[{t:600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1e3,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1200,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1400,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:1600,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:1800,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2e3,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2200,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2400,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:2600,v:{x:1,y:1},e:[.645,.045,.355,1]},{t:2800,v:{x:0,y:0},e:[.645,.045,.355,1]},{t:3e3,v:{x:1,y:1}}]}}},e0DQ82qcIov50:{transform:{data:{r:23.663757,t:{x:-2.87,y:-2.87}},keys:{o:[{t:0,v:{x:329.999336,y:329.76998,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:265.665974,y:185.96649,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:350.187687,y:331.626855,type:"corner"}}]}}},e0DQ82qcIov51:{transform:{data:{t:{x:-311.441315,y:-382.608965}},keys:{o:[{t:0,v:{x:331.441177,y:382.608963,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:370.580827,y:282.608955,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:322.780243,y:581.243292,type:"corner"}}],r:[{t:600,v:0},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov52:{transform:{data:{t:{x:-319.316361,y:-327.740722}},keys:{o:[{t:0,v:{x:339.317871,y:327.738892,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:364.888624,y:179.476884,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:359.772601,y:320.824028,type:"corner"}}],r:[{t:600,v:0},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov53:{transform:{data:{t:{x:-305.909409,y:-362.720527}},keys:{o:[{t:0,v:{x:325.908142,y:362.720535,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:317.062688,y:322.932297,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:283.21855,y:506.92949,type:"corner"}}],r:[{t:600,v:0},{t:3e3,v:-27.416918}]}}},e0DQ82qcIov54:{transform:{data:{r:-15.701363,t:{x:-332.32,y:-372.55}},keys:{o:[{t:0,v:{x:352.319992,y:372.550003,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:398.087773,y:327.631014,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:427.726611,y:542.547677,type:"corner"}}]}}},e0DQ82qcIov55:{transform:{data:{r:39.399845,t:{x:-333.18,y:-343.2}},keys:{o:[{t:0,v:{x:353.180008,y:343.199997,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:408.123603,y:237.271459,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:451.543185,y:384.595506,type:"corner"}}]}}},e0DQ82qcIov56:{transform:{data:{t:{x:-318.75,y:-340.1}},keys:{o:[{t:0,v:{x:318.75,y:340.100006,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:292.640575,y:228.498455,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:271.671483,y:369.684164,type:"corner"}}]}}},e0DQ82qcIov57:{transform:{data:{t:{x:7e-6,y:29e-6}},keys:{o:[{t:0,v:{x:350.289993,y:359.829971,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:470.289982,y:303.793677,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:416.116329,y:488.36212,type:"corner"}}]}}},e0DQ82qcIov58:{transform:{data:{t:{x:21e-6,y:-.000031}},keys:{o:[{t:0,v:{x:369.009979,y:336.500031,type:"corner"},e:[.42,0,.58,1]},{t:600,v:{x:466.01886,y:213.234914,type:"corner"},e:[.42,0,1,1]},{t:3e3,v:{x:556.221932,y:355.912179,type:"corner"}}]}}},e0DQ82qcIov74:{transform:{data:{s:{x:2,y:2},t:{x:-101.82,y:-32}},keys:{o:[{t:0,v:{x:80.119972,y:412.733887,type:"corner"},e:[0,0,.58,1]},{t:600,v:{x:110.119972,y:22.733887,type:"corner"},e:[.55,.055,.675,.19]},{t:3e3,v:{x:110.119972,y:632.733887,type:"corner"}}],r:[{t:0,v:4.536717,e:[0,0,.58,1]},{t:600,v:0}]}}
1841,opacity:[{t:2900,v:1},{t:3e3,v:0}],"stroke-dashoffset":[{t:0,v:153.37,e:[0,0,.58,1]},{t:600,v:243.37},{t:3e3,v:153.37,e:[0,0,.58,1]}],"stroke-dasharray":[{t:0,v:[16,85.68]},{t:600,v:[50,51.68]},{t:700,v:[30,71.68]},{t:3e3,v:[30,71.68]}]},e0DQ82qcIov75:{transform:{data:{s:{x:2,y:2},t:{x:-88.769997,y:-32}},keys:{o:[{t:0,v:{x:-9.517153,y:396.469061,type:"corner"},e:[0,0,.58,1]},{t:600,v:{x:20.482847,y:6.469061,type:"corner"},e:[.55,.055,.675,.19]},{t:3e3,v:{x:20.482847,y:426.469061,type:"corner"}}],r:[{t:0,v:4.536717,e:[0,0,.58,1]},{t:600,v:0}]}},opacity:[{t:2900,v:1},{t:3e3,v:0}],"stroke-dashoffset":[{t:0,v:153.37,e:[0,0,.58,1]},{t:600,v:243.37},{t:3e3,v:153.37,e:[0,0,.58,1]}],"stroke-dasharray":[{t:0,v:[16,85.68]},{t:600,v:[50,51.68]},{t:700,v:[30,71.68]},{t:3e3,v:[30,71.68]}]},e0DQ82qcIov76:{transform:{data:{s:{x:2,y:2},t:{x:-95.300003,y:-32}},keys:{o:[{t:0,v:{x:387.258404,y:332,type:"corner"},e:[0,0,.58,1]},{t:600,v:{x:347.258404,y:-28,type:"corner"},e:[.55,.055,.675,.19]},{t:3e3,v:{x:347.258404,y:402,type:"corner"}}],r:[{t:0,v:-6.342949,e:[0,0,.58,1]},{t:600,v:0}]}},opacity:[{t:2900,v:1},{t:3e3,v:0}],"stroke-dashoffset":[{t:0,v:153.37,e:[0,0,.58,1]},{t:600,v:243.37},{t:3e3,v:153.37,e:[0,0,.58,1]}],"stroke-dasharray":[{t:0,v:[16,85.68]},{t:600,v:[50,51.68]},{t:700,v:[30,71.68]},{t:3e3,v:[30,71.68]}]},e0DQ82qcIov77:{transform:{data:{s:{x:2,y:2},t:{x:-108.339996,y:-32}},keys:{o:[{t:0,v:{x:339.817631,y:349.76874,type:"corner"},e:[0,0,.58,1]},{t:600,v:{x:299.817631,y:-10.23126,type:"corner"},e:[.55,.055,.675,.19]},{t:3e3,v:{x:299.817631,y:579.76874,type:"corner"}}],r:[{t:0,v:-6.342949,e:[0,0,.58,1]},{t:600,v:0}]}},opacity:[{t:2900,v:1},{t:3e3,v:0}],"stroke-dashoffset":[{t:0,v:153.37,e:[0,0,.58,1]},{t:600,v:243.37},{t:3e3,v:153.37,e:[0,0,.58,1]}],"stroke-dasharray":[{t:0,v:[16,85.68]},{t:600,v:[50,51.68]},{t:700,v:[30,71.68]},{t:3e3,v:[30,71.68]}]}},s:"MDSA1ZDliNDI4NVDk1OTI4MTk0JODk4ZjhlSzQAyNWE1MzUyNTHA1MDRjNDI4NGDg5VTkyODU4WMzk0ODk4ZjhTlNDI1YTUxNGGNMNDI4OTk0OTDU5MjgxOTQ4LOThmOGU5M08P0MjVhNTE0YzKQyODZRODk4YDzhjNDI1YTUxVNGM0MkY4MThOjOTRGODU5MjWhlODE5NDg1NNDI1YTg2ODE4CYzkzODU0YzQJyOTM5MFRCODAU4NTg0NDI1YJTUxNGM0Mko4HNjkwOTM0MjVGhNTE1MDUwOWPQ/"}],options:"MDIAxODkyMzlZOMGE4Ykc3ODg5NOGIzOTUxMzkO4Nzg5ODY3ZTNg5Nzg4NDg0NRzg4Ykg4MDdhKSzM5OTQ/"},en="https://cdn.svgator.com/ply/",er="__SVGATOR_PLAYER__",ei="2022-05-04",eo=window,es=document,el="script",(eh=document.getElementById(et.root)).svgatorPlayer={ready:(ep=[],function($){return $?(ep.push($),eh.svgatorPlayer):ep})},eo[er]=eo[er]||{},eo[er][$]=eo[er][$]||[],eo[er][$].push(et),(eu=es.createElementNS("http://www.w3.org/2000/svg",el)).async=!0,eu.setAttributeNS("http://www.w3.org/1999/xlink","href",[en,$,".","j","s","?","v","=",ei].join("")),eu.setAttributeNS(null,"src",[en,$,".","j","s","?","v","=",ei].join("")),(ed=es.getElementsByTagName(el)[0]).parentNode.insertBefore(eu,ed)},[]),(0,eo.useEffect)(function(){async function confettiShooter(){let $=document.getElementById("e0DQ82qcIov1");try{let et=$.svgatorPlayer;et.play&&et.play()}catch($){console.error("confetti failed")}}et&&confettiShooter(),en(!1)},[en,et]),(0,ei.jsx)(el,{children:(0,ei.jsx)("div",{id:"confetti-holder",children:(0,ei.jsxs)("svg",{id:"e0DQ82qcIov1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 400 400",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",children:[(0,ei.jsxs)("g",{id:"e0DQ82qcIov2",transform:"matrix(.5 0 0 0.5 25.964331 264.154351)",children:[(0,ei.jsxs)("g",{children:[(0,ei.jsx)("rect",{id:"e0DQ82qcIov4",width:"5.05",height:"5.05",rx:"0",ry:"0",transform:"matrix(.936393-.282895 0.286251 0.981448 64.977577 368.672426)",opacity:"0.977955",fill:"#c072ff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov5",width:"5.36",height:"5.36",rx:"0",ry:"0",transform:"matrix(-.52026 0.880062-.736215-.676747 48.193974 354.593138)",opacity:"0.495795",fill:"#c072ff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov6",width:"5.46",height:"5.46",rx:"0",ry:"0",transform:"matrix(.273897-.984967 0.886688 0.462368 73.798015 371.925674)",opacity:"0.979768",fill:"#ff648b"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov7",width:"5.54",height:"5.54",rx:"0",ry:"0",transform:"matrix(-.594399 0.776885-.805945-.628994 30.669552 351.24617)",opacity:"0.586336",fill:"#ff648b"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov8",width:"5.73",height:"5.73",rx:"0",ry:"0",transform:"matrix(.826776-.60135 0.407215 0.913332 35.887649 362.339551)",opacity:"0.723288",fill:"#00cfff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov9",width:"5.6",height:"5.6",rx:"0",ry:"0",transform:"matrix(.119809-1.015296 0.947042 0.321109 56.065517 361.261792)",opacity:"0.567307",fill:"#00cfff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov10",width:"5.07",height:"5.07",rx:"0",ry:"0",transform:"matrix(-.904592 0.476332-.271776-.96236 53.206615 363.602305)",opacity:"0.713493",fill:"#fbff45"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov11",width:"4.4",height:"4.4",rx:"0",ry:"0",transform:"matrix(1.002242-.201723-.010821 0.999941 48.410803 340.641092)",opacity:"0.659697",fill:"#fbff45"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov12",width:"4.79",height:"4.79",rx:"0",ry:"0",transform:"matrix(-.728809-.71695 0.834175-.5515 31.057268 346.447909)",opacity:"0.842201",fill:"#fbff45"})]}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov13",width:"4.31",height:"4.31",rx:"0",ry:"0",transform:"matrix(.917199-.398429 0.398429 0.917199 43.298438 368.953002)",opacity:"0.673915",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov14",width:"4.1",height:"4.1",rx:"0",ry:"0",transform:"matrix(-.081417-.99668 0.99668-.081417 26.811226 362.919013)",opacity:"0.90469",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov15",width:"4.19",height:"4.19",rx:"0",ry:"0",transform:"matrix(-.99218 0.124814-.335708-.96565 53.592025 335.720453)",opacity:"0.38981",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov16",width:"5",height:"5",rx:"0",ry:"0",transform:"matrix(-.208082-.978111 0.978111-.208082 64.721271 330.656082)",opacity:"0.89513",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov17",width:"5.49",height:"5.49",rx:"0",ry:"0",transform:"matrix(.999714 0.023909-.023909 0.999714 39.643755 341.438936)",opacity:"0.729057",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov18",width:"5.38",height:"5.38",rx:"0",ry:"0",transform:"matrix(-.951755-.306858 0.104556-1.01698 35.098205 371.498135)",opacity:"0.815943",fill:"#0af"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov19",width:"4.4",height:"4.4",rx:"0",ry:"0",transform:"matrix(.696163 0.717883-.717883 0.696163 69.474594 340.093007)",opacity:"0.851205",fill:"#0af"}
1841),(0,ei.jsx)("rect",{id:"e0DQ82qcIov20",width:"4.33",height:"4.33",rx:"0",ry:"0",transform:"matrix(.734915 0.67816-.67816 0.734915 57.020715 379.065431)",opacity:"0.55536",fill:"#0af"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov21",width:"5.22",height:"5.22",rx:"0",ry:"0",transform:"matrix(-.775496-.631353 0.631353-.775496 35.902264 339.066393)",opacity:"0.614565",fill:"#0af"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov22",width:"4.83",height:"4.83",rx:"0",ry:"0",transform:"matrix(.840567 0.541708-.36304 0.95571 70.962808 331.267633)",opacity:"0.766126",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov23",width:"4.2",height:"4.2",rx:"0",ry:"0",transform:"matrix(-.852823-.522201 0.522201-.852823 81.806291 363.566238)",opacity:"0.559862",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov24",width:"4.54",height:"4.54",rx:"0",ry:"0",transform:"matrix(.598884 0.800836-.800836 0.598884 80.494029 335.455588)",opacity:"0.950555",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov25",width:"5.74",height:"5.74",rx:"0",ry:"0",transform:"matrix(.999985-.00541 0.00541 0.999985 39.928055 326.929249)",opacity:"0.677693",fill:"#fdb168"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov26",d:"M65.36,380.69l-1,.55-.54-1c-.291171-.535898-.846123-.875751-1.455811-.891538s-1.181484.294889-1.5.815-.33536,1.17064-.044189,1.706538l2.18,4l4-2.18c.828427-.452874,1.132873-1.491573.68-2.32s-1.491573-1.132873-2.32-.68Z",transform:"matrix(.913672-.406453 0.406453 0.913672-169.96593 59.145085)",fill:"#ff648b"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov27",d:"M73.25,326l-1,.48-.48-1c-.403168-.828427-1.401573-1.173168-2.23-.77s-1.173168,1.401573-.77,2.23l1.95,4l4-1.95c.535898-.260804.891952-.787695.934038-1.382199s-.236188-1.1663-.73-1.5-1.12814-.378605-1.664038-.117801Z",transform:"translate(-20.000595 0.001253)",fill:"#ffa4bb"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov28",d:"M59.79,359.68l-1.09.91-.92-1.09c-.474847-.63703-1.263543-.958542-2.048422-.835037s-1.436723.671692-1.692987,1.423766-.07476,1.584221.471409,2.161271l3.66,4.36L62.53,363c.902986-.75663,1.02163-2.102014.265-3.005s-2.102014-1.02163-3.005-.265Z",transform:"translate(-19.99905 0.000039)",fill:"#e0b9ff"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov29",points:"84.7,374.79 82.18,375.73 82.97,373.16 81.3,371.05 83.99,371 85.48,368.76 86.36,371.31 88.95,372.03 86.8,373.65 86.91,376.34 84.7,374.79",transform:"translate(-20.000002 0.000003)",fill:"#fdb168"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov30",points:"86.87,345.57 84.55,347.61 84.34,344.52 81.69,342.95 84.55,341.8 85.23,338.79 87.21,341.16 90.28,340.88 88.64,343.49 89.86,346.32 86.87,345.57",transform:"translate(-20.000001-.000003)",fill:"#fed3aa"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov31",points:"52.58,342.08 50.64,344.06 50.25,341.32 47.78,340.09 50.26,338.87 50.67,336.14 52.59,338.12 55.32,337.66 54.02,340.11 55.3,342.56 52.58,342.08",transform:"translate(-20 0.000006)",fill:"#fed3aa"}),(0,ei.jsx)("circle",{id:"e0DQ82qcIov32",r:"2.84",transform:"matrix(1 0 0.212557 1 21.079994 358.87)",fill:"#00cfff"}),(0,ei.jsx)("circle",{id:"e0DQ82qcIov33",r:"3.37",transform:"matrix(1 0 0.212557 1 81.819993 336.5)",fill:"#00cfff"})]}),(0,ei.jsxs)("g",{id:"e0DQ82qcIov34",transform:"matrix(.5 0 0 0.5 169.566513 264.155382)",children:[(0,ei.jsxs)("g",{children:[(0,ei.jsx)("rect",{id:"e0DQ82qcIov36",width:"5.33",height:"5.33",rx:"0",ry:"0",transform:"matrix(-.259082-.988968 0.998906-.046758 337.859707 326.538286)",opacity:"0.494701",fill:"#c072ff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov37",width:"5.36",height:"5.36",rx:"0",ry:"0",transform:"matrix(-.52026 0.880062-.736215-.676747 335.40214 354.604187)",opacity:"0.495795",fill:"#c072ff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov38",width:"5.54",height:"5.54",rx:"0",ry:"0",transform:"matrix(-.594399 0.776885-.805945-.628994 317.848305 351.239972)",opacity:"0.586336",fill:"#ff648b"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov39",width:"5.6",height:"5.6",rx:"0",ry:"0",transform:"matrix(.105301-.972508 1.015296 0.119809 343.104343 361.714571)",opacity:"0.567307",fill:"#00cfff"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov40",width:"4.4",height:"4.4",rx:"0",ry:"0",transform:"matrix(.957064-.202212 0.201723 1.002242 335.225782 340.62479)",opacity:"0.659697",fill:"#fbff45"})]}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov41",width:"4.31",height:"4.31",rx:"0",ry:"0",transform:"matrix(.917199-.398429 0.398429 0.917199 330.488863 368.958161)",opacity:"0.673915",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov42",width:"4.19",height:"4.19",rx:"0",ry:"0",transform:"matrix(-.99218 0.124814-.124814-.99218 340.346061 335.782621)",opacity:"0.38981",fill:"#bdff34"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov43",width:"4.4",height:"4.4",rx:"0",ry:"0",transform:"matrix(.696163 0.717883-.569909 0.848753 356.330011 339.76603)",opacity:"0.851205",fill:"#0af"}
1841),(0,ei.jsx)("rect",{id:"e0DQ82qcIov44",width:"4.33",height:"4.33",rx:"0",ry:"0",transform:"matrix(.734915 0.67816-.67816 0.734915 344.231055 379.046296)",opacity:"0.55536",fill:"#0af"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov45",width:"5.22",height:"5.22",rx:"0",ry:"0",transform:"matrix(-.775496-.631353 0.466516-.909694 323.53011 339.412127)",opacity:"0.614565",fill:"#0af"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov46",width:"5.16",height:"5.16",rx:"0",ry:"0",transform:"matrix(-.587644-.80912 0.80912-.587644 368.660951 351.715923)",opacity:"0.561724",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov47",width:"4.83",height:"4.83",rx:"0",ry:"0",transform:"matrix(.840567 0.541708-.541708 0.840567 358.58508 331.55421)",opacity:"0.766126",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov48",width:"4.2",height:"4.2",rx:"0",ry:"0",transform:"matrix(-.852823-.522201 0.340928-.96382 369.386316 363.793275)",opacity:"0.559862",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov49",width:"4.54",height:"4.54",rx:"0",ry:"0",transform:"matrix(.598884 0.800836-.673539 0.769107 367.404518 335.079243)",opacity:"0.950555",fill:"#fdb168"}),(0,ei.jsx)("rect",{id:"e0DQ82qcIov50",width:"5.74",height:"3",rx:"0",ry:"0",transform:"matrix(.915917 0.401368-.401368 0.915917 328.522583 325.989372)",opacity:"0.677693",fill:"#fdb168"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov51",d:"M312.56,380.69l-1,.55-.55-1c-.291171-.535898-.846123-.875751-1.455811-.891538s-1.181484.294889-1.5.815-.33536,1.17064-.044189,1.706538l2.18,4l4-2.18c.828427-.452873,1.132873-1.491573.68-2.32s-1.491573-1.132873-2.32-.68Z",transform:"translate(19.999862-.000002)",fill:"#ffa4bb"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov52",d:"M320.45,326l-1,.48-.49-1c-.403168-.828427-1.401573-1.173168-2.23-.77s-1.173168,1.401573-.77,2.23l1.94,4l4-1.95c.828427-.400406,1.175406-1.396573.775-2.225s-1.396573-1.175406-2.225-.775Z",transform:"translate(20.00151-.00183)",fill:"#ff648b"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov53",d:"M307,359.68l-1.1.91-.9-1.09c-.77893-.822972-2.06436-.896096-2.931595-.16677s-1.015618,2.008256-.338405,2.91677l3.65,4.36l4.37-3.66c.902986-.75663,1.02163-2.102014.265-3.005s-2.102014-1.02163-3.005-.265Z",transform:"translate(19.998733 0.000008)",fill:"#c072ff"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov54",points:"331.9,374.79 329.38,375.73 330.17,373.16 328.49,371.05 331.19,371 332.68,368.76 333.55,371.31 336.15,372.03 333.99,373.65 334.11,376.34 331.9,374.79",transform:"matrix(.962685-.270623 0.270623 0.962685-68.420318 103.835142)",fill:"#fdb168"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov55",points:"334.06,345.57 331.74,347.61 331.54,344.52 328.88,342.95 331.75,341.8 332.43,338.79 334.41,341.16 337.48,340.88 335.84,343.49 337.06,346.32 334.06,345.57",transform:"matrix(.772735 0.634728-.634728 0.772735 313.558859-133.481571)",fill:"#fed3aa"}),(0,ei.jsx)("polygon",{id:"e0DQ82qcIov56",points:"319.78,342.08 317.84,344.06 317.45,341.32 314.98,340.09 317.46,338.87 317.87,336.14 319.79,338.12 322.52,337.66 321.22,340.11 322.5,342.56 319.78,342.08",transform:"translate(0 0.000006)",fill:"#cfff6b"}),(0,ei.jsx)("circle",{id:"e0DQ82qcIov57",r:"2.51",transform:"translate(350.29 359.83)",fill:"#0af"}),(0,ei.jsx)("circle",{id:"e0DQ82qcIov58",r:"3.37",transform:"translate(369.01 336.5)",fill:"#00cfff"})]}),(0,ei.jsx)("path",{id:"e0DQ82qcIov74",d:"M102.82,10c0,2-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4",transform:"matrix(1.993734 0.158196-.158196 1.993734-117.819725 332.826905)",fill:"none",stroke:"#ff648b",strokeLinecap:"round",strokeMiterlimit:"10",strokeDashoffset:"153.37",strokeDasharray:"16,85.68"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov75",d:"M89.77,10c0,2-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4",transform:"matrix(1.993734 0.158196-.158196 1.993734-181.43862 318.626535)",fill:"none",stroke:"#00cfff",strokeLinecap:"round",strokeMiterlimit:"10",strokeDashoffset:"153.37",strokeDasharray:"16,85.68"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov76",d:"M96.3,10c0,2-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4",transform:"matrix(1.987757-.220959 0.220959 1.987757 190.754493 289.449147)",fill:"none",stroke:"#fbff45",strokeLinecap:"round",strokeMiterlimit:"10",strokeDashoffset:"153.37",strokeDasharray:"16,85.68"}),(0,ei.jsx)("path",{id:"e0DQ82qcIov77",d:"M109.34,10c0,2-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4s2,2,2,4-2,2-2,4",transform:"matrix(1.987757-.220959 0.220959 1.987757 117.393384 310.099187)",fill:"none",stroke:"#0af",strokeLinecap:"round",strokeMiterlimit:"10",strokeDashoffset:"153.37",strokeDasharray:"16,85.68"})]})})})}},49984:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(46869),el=en(45121),eu=en(86166),ed=en(67294);
1841function _templateObject(){let $=(0,er._)(["\n background-color: ",";\n border-radius: 16px;\n\n ","\n\n .outer-wrapper {\n padding: 16px;\n width: 100%;\n height: 100%;\n background-color: ",';\n border-radius: 16px;\n box-shadow: 0px 3.32px 11.288px 3.984px rgba(2, 6, 23, 0.2);\n position: relative;\n transition:\n top 0.2s ease,\n left 0.2s ease;\n top: 0px;\n left: 0px;\n\n p {\n margin: 0px;\n }\n\n .overlay {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: rgba(2, 6, 23, 0.6);\n left: 0px;\n top: 0px;\n border-radius: 16px;\n backdrop-filter: blur(4px);\n opacity: 0;\n transition: opacity 0.2s ease;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 32px;\n z-index: 2;\n\n .description {\n color: #fff;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n text-align: center;\n max-width: 80%;\n }\n\n .line {\n width: 32px;\n height: 2px;\n background-color: rgba(255, 255, 255, 0.6);\n }\n\n .meta-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n\n p {\n color: #fff;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n display: flex;\n align-items: center;\n gap: 8px;\n\n svg {\n width: 24px;\n height: 24px;\n\n path,\n rect {\n fill: #fff;\n }\n }\n }\n\n .xp {\n padding: 3px 12px;\n border-radius: 100px;\n background-color: #fef08a;\n\n color: #854d0e;\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n }\n\n .inner-wrapper {\n width: 100%;\n height: 100%;\n border-radius: 6px;\n background:\n linear-gradient(\n 0deg,\n '," 0%,\n "," 100%\n ),\n linear-gradient(\n 0deg,\n "," 0%,\n ",' 100%\n ),\n url("/images/challenge_packs/textures/deckfaces/deck-face.webp") lightgray 50% /\n cover no-repeat;\n background-blend-mode: soft-light, color, normal;\n\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 27px;\n\n .card-text {\n text-align: center;\n color: #fde047;\n text-shadow:\n -2.66px -2.66px 0px ',",\n -2.66px 2.66px 0px ",",\n 2.66px -2.66px 0px ",",\n 2.66px 2.66px 0px ",",\n -2.66px 0px 0px ",",\n 2.66px 0px 0px ",",\n 0px -2.66px 0px ",",\n 0px 2.66px 0px ",",\n -1.88px -1.88px 0px ",",\n -1.88px 1.88px 0px ",",\n 1.88px -1.88px 0px ",",\n 1.88px 1.88px 0px ",",\n -0.004px 1.324px 0px ",",\n -0.004px 6.644px 0px ",",\n 5.316px 1.324px 0px ",",\n 5.316px 6.644px 0px ",",\n -0.004px 3.984px 0px ",",\n 5.316px 3.984px 0px ",",\n 2.656px 1.324px 0px ",",\n 2.656px 6.644px 0px ",",\n 0.776px 2.104px 0px ",",\n 0.776px 5.864px 0px ",",\n 4.536px 2.104px 0px ",",\n 4.536px 5.864px 0px ",';\n font-family: "PixelGridM";\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 32px;\n letter-spacing: 0.8px;\n }\n\n img {\n width: 80px;\n height: 80px;\n flex-shrink: 0;\n image-rendering: pixelated;\n }\n\n .club-label {\n position: absolute;\n right: 12px;\n top: 12px;\n padding: 5px 12px;\n border-radius: 100px;\n background: linear-gradient(\n 242deg,\n #d9f99d 0%,\n #b6e4ff 33%,\n #dea9ff 66%,\n #ffc0c9 100%\n );\n\n color: rgba(2, 6, 23, 0.8);\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n }\n']);
1841return _templateObject=function(){return $},$}let eh=eo.default.div.withConfig({componentId:"sc-b7fdb2c6-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.medium},$=>{let{disableOverlay:et}=$;return!et&&"\n :hover {\n .outer-wrapper {\n top: -16px;\n left: -16px;\n\n .overlay {\n opacity: 1;\n }\n }\n }\n "},$=>{let{config:et}=$;return et.cardColor},$=>{let{config:et}=$;return et.imageColor},$=>{let{config:et}=$;return et.imageColor},$=>{let{config:et}=$;return et.imageColor},$=>{let{config:et}=$;return et.imageColor},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.primary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary},$=>{let{config:et}=$;return et.textShadowColors.secondary});et.Z=function($){let{pack:et,internalPackName:en,disableOverlay:er=!1}=$,eo=es.Rn[en.toLowerCase()],{packMetadata:{title:ep,description:em,timeInMinutes:ef,club:eg}}=et,ey=(0,ed.useMemo)(()=>er?0:et.challenges.reduce(($,et)=>$+et.xp,0),[et.challenges,er]);return(0,ei.jsx)(eh,{className:"nes-pointer individual-deck-wrapper",config:eo,disableOverlay:er,children:(0,ei.jsxs)("div",{className:"outer-wrapper",children:[!er&&(0,ei.jsxs)("div",{className:"overlay",children:[(0,ei.jsx)("p",{className:"description",children:em}),(0,ei.jsx)("div",{className:"line"}),(0,ei.jsxs)("div",{className:"meta-info",children:[(0,ei.jsxs)("p",{children:[(0,ei.jsx)(eu.Z,{})," ",et.challenges.length," Challenges"]}),(0,ei.jsxs)("p",{children:[(0,ei.jsx)(el.Z,{})," ",ef," min"]}),(0,ei.jsxs)("p",{className:"xp",children:[ey," XP"]})]})]}),(0,ei.jsxs)("div",{className:"inner-wrapper",children:[eg&&(0,ei.jsx)("div",{className:"club-label",children:"Club"}),(0,ei.jsxs)("p",{className:"card-text",children:[eo.language," ",(0,ei.jsx)("br",{})]}),(0,ei.jsx)("img",{src:eo.badgeLink,alt:"card"}),(0,ei.jsx)("p",{className:"card-text",children:eo.title})]})]})})}},26067:function($,et,en){"use strict";en.d(et,{f:function(){return useChallengePackNavigation}});var er=en(67294),ei=en(11163),eo=en(9473),es=en(95986),el=en(88090),eu=en(92614);function useChallengePackNavigation($){let{packName:et,hookFor:en="challenge-pack"}=$,ed=(0,ei.useRouter)(),eh=ed.query.challenge,ep=ed.asPath.startsWith("/challenges"),em=ep?null:ed.asPath.split("/")[1],ef=(0,eo.v9)(es.u3),eg=(0,eo.v9)((0,eu.cp)({packName:et})),[ey,ev]=(0,er.useState)(""),[ex,e_]=(0,er.useState)(""),ew=(0,er.useMemo)(()=>{var $;return(null==ef?void 0:null===($=ef.challenges)||void 0===$?void 0:$.map($=>$.name))||[]},[ef]),ek=(0,er.useMemo)(()=>ew.indexOf(eh),[ew,eh]),eC=em||ef.packMetadata.lockCourse||null,eE=(0,eo.v9)((0,el.Ib)({courseName:eC,challengeName:eh,forType:en})),{prevCourseLink:eI,nextCourseLink:eS,nextSceneQue:eT}=eE||{};if((0,er.useEffect)(()=>{if("challenge-pack"!==en)return;ev(""),e_("");let $="/challenges/".concat(et,"/").concat(ew[ek-1]),er="/challenges/".concat(et,"/").concat(ew[ek+1]),ei=0===ek,eo=ek===ew.length-1,es=ep?"":"/".concat(eC);ek>=0&&(ei?ev(!ep&&eC&&eI?"/".concat(eC,"/").concat(eI):"/challenges"):ev("".concat(es).concat($))),ek<=ew.length-1&&(eo?e_(!ep&&eC&&eS?"/".concat(eC,"/").concat(eS):"/challenges"):e_("".concat(es).concat(er)))},[en,ew,ek,et,eC,eS,eI,ep]),"challenge-pack"!==en)return{currentURL:null,currentIndex:-1,prevUrl:null,nextUrl:null,challengeCount:0,lastChallengeForChallengePack:!1,nextSceneQue:""};let eA=ek===ew.length-1;return{currentURL:eh,currentIndex:ek,prevUrl:ey,nextUrl:ex,challengeCount:ew.length,lastChallengeForChallengePack:eA,nextSceneQue:eT,showSkipModal:eA&&100!=eg,packCompleted:100===eg,inCoursePack:!ep}}},94206:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);
1841function _templateObject(){let $=(0,er._)(["\n display: flex;\n align-items: center;\n gap: 8px;\n\n p {\n margin: 0px;\n }\n svg {\n transform: rotate(-90deg);\n }\n circle {\n transition: stroke-dashoffset 0.25s;\n transform-origin: center;\n }\n\n .percentage-num {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n font-weight: 700;\n width: fit-content;\n }\n\n .complete-circle {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 24px;\n height: 24px;\n\n background-color: ',";\n border-radius: 50%;\n transform: rotate(90deg);\n }\n\n .completed-num {\n color: ",";\n }\n"]);return _templateObject=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-43876be9-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.green["800"]:et.colors.palette.green["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.green["200"]:et.colors.palette.green["800"]});et.Z=function($){let{percentage:et,themeIsDark:en,completePercentage:er,percentageText:eo=null}=$,el=2*Math.PI*10;return(0,ei.jsxs)(es,{children:[et>=100?(0,ei.jsx)("div",{className:"complete-circle",children:(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 5H15V6.5H13.5V5ZM12 8V6.5H13.5V8H12ZM10.5 9.5V8H12V9.5H10.5ZM9 11H10.5V9.5H9V11ZM7.5 12.5H9V11H7.5V12.5ZM6 12.5V14H7.5V12.5H6ZM4.5 11H6V12.5H4.5V11ZM4.5 11H3V9.5H4.5V11Z",fill:en?"#D9F99D":"#3F6212"})})}):(0,ei.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[(0,ei.jsx)("circle",{cx:"12",cy:"12.5",r:10,stroke:en?"#334155":"#E2E8F0",strokeWidth:"4",fill:"none"}),(0,ei.jsx)("circle",{cx:"12",cy:"12.5",r:10,stroke:"#FACC15",strokeWidth:"4",fill:"none",strokeDasharray:el,strokeDashoffset:el-et/100*el})]}),(0,ei.jsxs)("p",{className:"percentage-num ".concat(et>=100&&"completed-num"),style:{minWidth:er>=10?"31px":""},children:[et,"% ",eo&&eo]})]})}},14733:function($,et,en){"use strict";var er=en(85893);en(67294);var ei=en(9473),eo=en(609);et.Z=function($){let{level:et,darkOnly:en=!1}=$,es=(0,ei.v9)(eo.o4)||"dark",el="dark"===(en?"dark":es)?"#CBD5E1":"#475569";function getFillColor($){return et>=$?el:"#64748B"}function getFillOpacity($){return et>=$?"1":"0.5"}return(0,er.jsxs)("div",{className:"diff-tag",children:[(0,er.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",children:[(0,er.jsx)("rect",{width:"3",height:"3",transform:"matrix(1 0 0 -1 3 14)",fill:getFillColor(1),fillOpacity:getFillOpacity(1)}),(0,er.jsx)("rect",{width:"3",height:"6",transform:"matrix(1 0 0 -1 7.5 14)",fill:getFillColor(2),fillOpacity:getFillOpacity(2)}),(0,er.jsx)("rect",{width:"3",height:"9",transform:"matrix(1 0 0 -1 12 14)",fill:getFillColor(3),fillOpacity:getFillOpacity(3)})]}),(0,er.jsx)("p",{children:3===et?"ADVANCED":2===et?"INTERMEDIATE":1===et?"BEGINNER":"NOVICE"})]})}},75128:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(41664),el=en.n(es),eu=en(67294),ed=en(9473),eh=en(88090),ep=en(20759),em=en(94206),ef=en(14733),eg=en(84849),ey=en(609);function _templateObject(){let $=(0,er._)(["\n a {\n text-decoration: none;\n }\n\n p {\n margin: 0px;\n }\n\n .bottom-card {\n width: 368px;\n background-color: ",";\n height: 310px;\n }\n\n .top-card {\n height: 98.5%;\n\n background-color: ",';\n overflow: hidden;\n\n .image-container {\n height: 120px;\n margin: 2px;\n\n span {\n position: absolute;\n right: 15px;\n top: 15px;\n z-index: 2;\n font-family: "Mulish", sans-serif;\n margin-left: 8px;\n padding: 5px 12px;\n border-radius: 100px;\n\n background: ',";\n\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .coming-soon-label {\n background: ',";\n\n color: ",";\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n\n clip-path: polygon(\n 4px 0px,\n 4px 2px,\n 2px 2px,\n 2px 4px,\n 0px 4px,\n 0px 100%,\n 100% 100%,\n 100% calc(100% - 4px),\n 100% calc(100% - 4px),\n 100% 4px,\n calc(100% - 2px) 4px,\n calc(100% - 2px) 2px,\n calc(100% - 4px) 2px,\n calc(100% - 4px) 0px\n );\n }\n }\n\n .content-container {\n padding: 16px 18px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .course-number {\n color: ",';\n\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .course-title {\n color: ',';\n\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-weight: 700;\n\n span {\n margin-left: 8px;\n padding: 5px 12px;\n border-radius: 100px;\n\n background: ',";\n\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n .description {\n color: ',';\n\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 500;\n\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n }\n\n .stats-container {\n margin-top: 8px;\n padding: 0px 18px;\n display: flex;\n justify-content: space-between;\n\n .diff-tag {\n display: flex;\n height: 25px;\n padding: 5px 12px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n border-radius: 100px;\n\n background: ',";\n width: fit-content;\n\n p {\n color: ",';\n\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n }\n\n .skeleton-container {\n margin-top: 8px;\n padding: 0px 18px;\n }\n\n :hover {\n background: ',";\n }\n }\n"]);
1841return _templateObject=function(){return $},$}let ev=eo.default.div.withConfig({componentId:"sc-bb0b978d-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["800"]:et.colors.palette.grey["100"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:"#FFFFFF"},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.yellow["800"]:et.colors.palette.yellow["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.yellow["200"]:et.colors.palette.yellow["800"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["800"]:et.colors.palette.blue["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["200"]:et.colors.palette.blue["800"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?"#fff":"#020617"},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.yellow["800"]:et.colors.palette.yellow["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.yellow["200"]:et.colors.palette.yellow["800"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["800"]:et.colors.palette.grey["100"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["900"]:et.colors.palette.grey["100"]});et.Z=function($){let{courseName:et,index:en=null,cardWidth:er=368,isLoading:eo,...es}=$,ex=(0,ed.v9)(ey.o4)||"dark",{bannerImageLink:e_,catalogName:ew,tags:ek,newCourse:eC,courseUrl:eE,description:eI,percentageCompleted:eS}=(0,ed.v9)((0,eh.Gm)({courseName:et})),[eT,eA]=(0,eu.useState)(0);if((0,eu.useEffect)(()=>{let $;if(0!==eS){if(eS>=100){eA(100);return}return eT<eS&&($=setTimeout(()=>{eA($=>Math.min($+1,eS))},5)),()=>clearTimeout($)}},[eT,eS,5]),null!=eS)return(0,ei.jsx)(ev,{className:"nes-pointer",children:(0,ei.jsx)(el(),{href:eE,...es,children:(0,ei.jsx)(ep.Z,{borderColor:"dark"===ex?"475569":"CBD5E1",className:"bottom-card",style:{width:er},children:(0,ei.jsxs)(ep.Z,{borderColor:"dark"===ex?"475569":"CBD5E1",className:"top-card",children:[(0,ei.jsxs)("div",{className:"image-container",children:[eC&&(0,ei.jsx)("span",{className:"new-tag",children:"NEW!"}),(0,ei.jsx)("img",{src:e_,alt:"course banner image"})]}),(0,ei.jsxs)("div",{className:"content-container",children:[(0,ei.jsxs)("p",{className:"course-number",children:["Course ",null!=en&&en+1]}),eo?(0,ei.jsx)(eg.Z,{baseColor:"dark"===ex?"#0F172A":"#F1F5F9",highlightColor:"dark"===ex?"#1E293B":"#F8FAFC"}):(0,ei.jsx)("p",{className:"course-title",children:ew}),(0,ei.jsx)("p",{className:"description",children:eo?(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eg.Z,{count:2,baseColor:"dark"===ex?"#0F172A":"#F1F5F9",highlightColor:"dark"===ex?"#1E293B":"#F8FAFC"})}):eI})]}),eo?(0,ei.jsx)("div",{className:"skeleton-container",children:(0,ei.jsx)(eg.Z,{height:20,baseColor:"dark"===ex?"#0F172A":"#F1F5F9",highlightColor:"dark"===ex?"#1E293B":"#F8FAFC"})}):(0,ei.jsxs)("div",{className:"stats-container",children:[(0,ei.jsx)(ef.Z,{level:(null==ek?void 0:ek.includes("intermediate"))?2:1}),0!=eS&&void 0!=eS&&null!=eS&&(0,ei.jsx)(em.Z,{percentage:eT||0,themeIsDark:"dark"===ex,completePercentage:eS})]})]})})})})}},45198:function($,et,en){"use strict";en.d(et,{i:function(){return useWindowSize}});var er=en(67294);function useWindowSize(){let[$,et]=(0,er.useState)({width:null,height:null});return(0,er.useLayoutEffect)(()=>{let handleResize=()=>{et({width:window.innerWidth,height:window.innerHeight})};return handleResize(),window.addEventListener("resize",handleResize),()=>{window.removeEventListener("resize",handleResize)}},[]),$}},33058:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(67294),es=en(19521),el=en(81798);function _templateObject(){let $=(0,er._)(["\n padding: 24px;\n border-bottom: 1px solid ",";\n display: flex;\n flex-direction: column;\n\n a {\n color: ",";\n }\n\n :last-child {\n border: none;\n }\n\n .question {\n display: flex;\n justify-content: space-between;
1841\n align-items: center;\n cursor: pointer;\n\n p {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n .arrow {\n transform: rotate(-90deg);\n transition: transform 0.2s;\n }\n\n &.expanded .arrow {\n transform: rotate(90deg);\n }\n }\n\n .answer {\n overflow: hidden;\n max-height: 0;\n transition: max-height 0.2s ease;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n line-height: 150%;\n\n &.expanded {\n max-height: var(--content-height);\n }\n\n .answer-inner {\n margin-top: 16px;\n }\n }\n']);return _templateObject=function(){return $},$}let eu=es.default.div.withConfig({componentId:"sc-c9c209d6-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});et.Z=function($){let{item:et}=$,[en,er]=(0,eo.useState)(!1),es=(0,eo.useRef)(null);return(0,ei.jsxs)(eu,{className:"nes-pointer",onClick:function(){if(es.current){let $=es.current.scrollHeight;es.current.style.setProperty("--content-height","".concat($,"px"))}er($=>!$)},children:[(0,ei.jsxs)("div",{className:"question ".concat(en?"expanded":""),children:[(0,ei.jsx)("p",{children:et.question}),(0,ei.jsx)(el.Z,{className:"arrow"})]}),(0,ei.jsx)("div",{ref:es,className:"answer ".concat(en?"expanded":""),children:(0,ei.jsx)("div",{className:"answer-inner",children:et.answer})})]})}},56016:function($,et,en){"use strict";en.d(et,{Z:function(){return pricing_ClubTierList}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(57774),el=en(20759),eu=en(609),ed=en(9473);function _templateObject(){let $=(0,er._)(["\n position: relative;\n max-width: 95%;\n &.paid-teir {\n box-shadow: 0px 0px 35px 0px #fde047;\n border-radius: 14px;\n }\n\n .paid-icon {\n position: absolute;\n top: -12.5px;\n width: 97px;\n height: 25px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 100px;\n border: 2px solid #facc15;\n background: ",";\n z-index: 2;\n display: flex;\n justify-content: center;
1841\n align-items: center;\n\n p {\n color: ",";\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n .inner-container {\n width: 372px;\n max-width: 100%;\n height: 100%;\n padding: 24px 26px;\n background-color: ",';\n font-family: "Mulish", sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .pricing {\n margin-top: 8px;\n display: flex;\n justify-content: space-between;\n\n .price-info {\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .label-free {\n color: ',";\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n }\n\n .label-club {\n width: fit-content;\n font-size: 16px;\n font-style: normal;\n font-weight: 900;\n line-height: 150%;\n letter-spacing: 0.8px;\n text-transform: capitalize;\n\n background: linear-gradient(\n 255deg,\n #a3e635 8%,\n #2cbaff 43%,\n #be53ff 78%,\n #ff7286 114%\n );\n\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n\n .price-free {\n color: ",';\n font-family: "PixelGridM";\n font-size: 24px;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n\n span {\n font-family: "Mulish", sans-serif;\n color: ',";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n }\n }\n\n .price-image {\n img {\n width: 60.978px;\n height: 56px;\n }\n }\n }\n\n .description {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n\n button {\n width: 100%;\n }\n\n .current-plan {\n color: ",";\n font-size: 16px;\n font-style: italic;\n font-weight: 500;\n line-height: 150%;\n\n display: flex;\n height: 42px;\n flex-direction: column;\n justify-content: center;\n align-self: stretch;\n }\n\n .benefits-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-bottom: 8px;\n\n .benefit-copy {\n color: ",";\n font-size: 14px;\n font-weight: 500;\n line-height: 150%;\n\n strong {\n color: ",";\n }\n }\n\n .benefit {\n display: flex;\n gap: 8px;\n align-items: flex-start;\n\n svg {\n flex-shrink: 0;\n }\n\n span {\n color: ",";\n font-size: 14px;\n font-weight: 500;\n line-height: 150%;\n }\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let eh=eo.default.div.withConfig({componentId:"sc-4cc6efe9-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.background.yellow.primary},$=>{let{theme:et}=$;return et.colors.text.accent.yellow},$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var pricing_ClubTier=function($){let{tier:et,annual:en,savingsLabel:er}=$,eo=(0,ed.v9)(eu.o4),es="paid"==et.type.type;return(0,ei.jsxs)(eh,{className:es&&"paid-teir",children:[es&&(0,ei.jsx)("div",{className:"paid-icon",children:(0,ei.jsx)("p",{children:en?er:"Popular"})}),(0,ei.jsxs)(el.Z,{className:"inner-container",borderColor:{free:"dark"===eo?"475569":"CBD5E1",paid:"FACC15"}[et.type.type],children:[(0,ei.jsxs)("div",{className:"pricing",children:[(0,ei.jsxs)("div",{className:"price-info",children:[et.type.label,et.type.price]}),(0,ei.jsx)("div",{className:"price-image",children:(0,ei.jsx)("img",{src:et.type.image,alt:"tier image"})})]}),et.description,et.button,et.benefits]})]})},ep=en(67294),em=en(73857),ef=en(5592),eg=en(81798),ey=en(99407),ev=en(62286),ex=en.n(ev),e_=en(41664),ew=en.n(e_),ek=en(42696),eC=en(48645),eE=en(64988),eI=en(54465),eS=en(86664),eT=en(99999),eA=en(65519),eP=en(17593),eN=en(47010),ej=en(45198),eR=en(68551);
1841function ClubTierList_templateObject(){let $=(0,er._)(["\n padding: 48px 0px;\n min-height: 836px;\n\n background: ",';\n\n background-blend-mode: normal, hard-light, normal;\n font-family: "Mulish", sans-serif;\n\n .copy-section {\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 24px;\n padding: 0px 24px;\n\n h2 {\n margin: 0px;\n color: ',';\n font-size: 32px;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n font-family: "PixelGridM";\n }\n\n p {\n text-align: center;\n color: ',";\n font-size: 18px;\n font-weight: 500;\n line-height: 150%;\n\n br {\n "," {\n display: none;\n }\n\n "," {\n display: block;\n }\n }\n }\n }\n\n .club-toggeler {\n width: 100%;\n display: flex;\n justify-content: center;\n\n "," {\n margin: 32px 0px;\n }\n\n "," {\n margin: 32px 0px 44.5px 0px;\n }\n }\n\n .tier-list {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n gap: 24px;\n align-items: stretch;\n padding: 0px 24px;\n }\n\n .view-all {\n margin-top: 24px;\n display: flex;\n justify-content: center;\n padding: 8px;\n\n .inner-view-all {\n display: flex;\n align-items: center;\n gap: 8px;\n\n .arrow {\n transform: rotate(-90deg);\n }\n\n p {\n color: ",";\n font-size: 16px;\n font-weight: 600;\n line-height: 150%;\n }\n\n :hover {\n transition-duration: 0.2s;\n opacity: 0.8;\n }\n }\n }\n"]);return ClubTierList_templateObject=function(){return $},$}let eV=eo.default.div.withConfig({componentId:"sc-2b5fd959-0"})(ClubTierList_templateObject(),$=>{let{theme:et}=$;return"dark"===et.mode?"linear-gradient(180deg, rgba(2, 6, 23, 0) 21.44%, #020617 87.85%),\n linear-gradient(\n 260deg,\n rgba(236, 72, 153, 0.33) 0%,\n rgba(124, 58, 237, 0.33) 32.48%,\n rgba(20, 173, 255, 0.33) 64.96%,\n rgba(163, 230, 53, 0.33) 98.43%\n ),\n #5b21b6;":"linear-gradient(180deg, rgba(255, 255, 255, 0) 21.44%, #fff 100%),\n linear-gradient(\n 260deg,\n rgba(236, 72, 153, 0.33) 0%,\n rgba(124, 58, 237, 0.33) 32.48%,\n rgba(20, 173, 255, 0.33) 64.96%,\n rgba(163, 230, 53, 0.33) 98.43%\n ),\n #ddd6fe"},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary});var pricing_ClubTierList=function($){var et,en;let{setShowExtraScene:er=()=>{},forOb:eo=!1,headerCopy:el="Join the Club!"}=$,eh=ex().get().codedextoken,ev=(0,ed.v9)(eu.o4),e_="dark"===ev,[eD,eO]=(0,ep.useState)(!0),[eM,eF]=(0,ep.useState)(!1),eL=(0,ej.i)(),[eH,eB]=(0,ep.useState)(null),[eU,ez]=(0,ep.useState)(!1),[eq,eZ]=(0,ep.useState)(eP.a7),[eW,eG]=(0,ep.useState)(!1),[e$,eJ]=(0,ep.useState)(!1);(0,ep.useEffect)(()=>{eB((0,eI.J)(eR.Tj))},[]),(0,ep.useEffect)(()=>{"USD"===eq.type?ez(!0):ez(!1)},[eq.type]),(0,ep.useEffect)(function(){(async function(){let $=await (0,eA.G)();eZ($)})()},[]),(0,ep.useEffect)(()=>{!function(){let $="true"===localStorage.getItem("headercheck");$&&eF(!0)}()},[eM]);let eK=(0,ep.useCallback)(async()=>{try{let $=await (0,ek.F)(),et=await (0,eC.Rb)();if(et)return;if($)eJ(!1);else try{eJ(!0),eG(!0),await (0,eE.M)({annual:eD});let $=document.querySelector("dialog.is-checkout");$?$.showModal():null==$||$.close(),setTimeout(()=>{eJ(!1)},1e4)}catch($){eJ(!1)}}catch($){}},[eD]),eQ=(0,ep.useMemo)(()=>{var $,et;let en=(0,ei.jsx)(ef.Z,{height:"21",width:"21",viewBox:"0 0 21 21",fill:e_?"#CBD5E1":"#475569"});return{free:{type:{type:"free",label:(0,ei.jsx)("p",{className:"label-free",children:"Explorer"}),price:(0,ei.jsxs)("p",{className:"price-free",children:["Free ",(0,ei.jsx)("span",{children:"forever"})]}),image:"/images/pricing/boy-working.svg"},description:(0,ei.jsx)("p",{className:"description",children:"Explore the world of coding with basic access to our learning content and community."}),button:eh?eM?(0,ei.jsx)(ei.Fragment,{}):(0,ei.jsx)(ei.Fragment,{children:eo?(0,ei.jsx)(em.Z,{variant:"subtle",onClick:()=>{er(!1)},children:"Start for free"}):(0,ei.jsx)("p",{className:"current-plan",children:"Your current plan"})}):(0,ei.jsx)(ew(),{href:"/signup",style:{all:"unset"}
1841,children:(0,ei.jsx)(em.Z,{variant:"subtle",children:"Start for free"})}),benefits:(0,ei.jsxs)("div",{className:"benefits-container",children:[(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Start learning Python, HTML, CSS & more"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Create and share projects in Builds"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Join a community of 2m+ learners"})]})]})},paid:{type:{type:"paid",label:(0,ei.jsx)("p",{className:"label-club",children:"CLUB"}),price:(0,ei.jsxs)("p",{className:"price-free",children:[eD?null===($=eq.club)||void 0===$?void 0:$.annual:null===(et=eq.club)||void 0===et?void 0:et.monthly," ",(0,ei.jsx)("span",{children:"/ month"})]}),image:"/images/pricing/girl-working.svg"},description:(0,ei.jsx)("p",{className:"description",children:"Go from beginner to job-ready with expert guidance, real projects, and a community cheering you on."}),button:eh?eM?(0,ei.jsx)(ei.Fragment,{children:eo?(0,ei.jsx)(em.Z,{variant:"subtle",onClick:()=>{er(!1)},children:"Continue"}):(0,ei.jsx)(ew(),{href:"/account?tabIndex=1",style:{all:"unset"},children:(0,ei.jsx)(em.Z,{variant:"subtle",children:"Manage Plan"})})}):(0,ei.jsx)(em.Z,{variant:"yellow",id:"club-checkout-target-id",onClick:()=>eK(),style:{paddingBottom:e$&&".5rem"},children:e$?(0,ei.jsx)(eN.Z,{color:"#412007"}):"Join Club"}):(0,ei.jsx)(ew(),{href:"/signup",style:{all:"unset"},children:(0,ei.jsx)(em.Z,{variant:"yellow",children:"Join Club"})}
1841),benefits:(0,ei.jsxs)("div",{className:"benefits-container",children:[(0,ei.jsxs)("p",{className:"benefit-copy",children:["Everything in ",(0,ei.jsx)("strong",{children:"Explorer"}),", plus..."]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Unlock all courses and learning paths"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Earn certificates in popular languages"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Build a portfolio that gets you hired"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Get unstuck fast with real mentor support"})]}),(0,ei.jsxs)("p",{className:"benefit",children:[en," ",(0,ei.jsx)("span",{children:"Unlimited AI access for learning and building"})]})]})}}},[e_,eh,eM,eo,eD,null==eq?void 0:null===(et=eq.club)||void 0===et?void 0:et.annual,null==eq?void 0:null===(en=eq.club)||void 0===en?void 0:en.monthly,e$,er,eK]),eX=eL.width<768?"mobile-scroll-target-for-view-all":"scroll-target-for-view-all";return(0,ei.jsxs)(eV,{className:"club-tier-list",children:[(0,ei.jsxs)("div",{className:"copy-section",children:[(0,ei.jsx)("h2",{children:el}),(0,ei.jsxs)("p",{children:["Unlock your full potential with our tailored plans designed for ",(0,ei.jsx)("br",{})," every stage of your coding journey."]})]}),(0,ei.jsx)("div",{className:"club-toggeler",children:(0,ei.jsx)(es.Z,{annual:eD,setAnnual:eO})}),(0,ei.jsxs)("div",{className:"tier-list",children:[(0,ei.jsx)(pricing_ClubTier,{tier:eQ.free,annual:eD,savingsLabel:""}),(0,ei.jsx)(pricing_ClubTier,{tier:eQ.paid,annual:eD,savingsLabel:"Save ".concat(eP.JP[eq.type],"%")})]}),(0,ei.jsx)("div",{className:"view-all",children:(0,ei.jsxs)("div",{className:"inner-view-all nes-pointer",onClick:()=>(0,ey.Z)({divId:eX,offSet:eL.width<768?140:90}),children:[(0,ei.jsx)(eg.Z,{className:"arrow",color:e_?"#FFFFFF":"#020617"}),(0,ei.jsx)("p",{children:"View all features"})]})}),(0,ei.jsx)(eS.Elements,{stripe:eH,children:(0,ei.jsx)(eT.Z,{enablePaypal:eU,isOpen:eW,annual:eD,setAnnual:eO,currency:eq,isOnboarding:eo})})]})}},64342:function($,et,en){"use strict";en.d(et,{Z:function(){return CompareFeatures_CompareFeatures}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(62626),el=en(67294),eu=en(73857),ed=en(69214);function _templateObject(){let $=(0,er._)(["\n height: 64px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n\n .benefit-desc {\n color: ",";\n font-size: 18px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .benefit-icon {\n position: relative;\n display: flex;\n justify-content: center;
1841\n align-items: center;\n\n .tooltip {\n display: none;\n top: 50%;\n transform: translateY(-50%);\n position: absolute;\n left: 36px;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n\n :hover {\n .tooltip {\n display: flex;\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let IIcon=()=>(0,ei.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,ei.jsx)("rect",{width:"2",height:"2",transform:"matrix(1 0 0 -1 11.481 9.23926)",fill:"#94A3B8"}),(0,ei.jsx)("rect",{width:"2",height:"6",transform:"matrix(1 0 0 -1 11.481 17.2383)",fill:"#94A3B8"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.481 3.23926H7.48096V5.23926H5.48096V7.23926H3.48096V17.2393H5.48096V19.2393H7.48096V21.2393H17.481V19.2393H19.481V17.2393H21.481V7.23926H19.481V5.23926H17.481V3.23926ZM17.481 5.23926V7.23926H19.481V17.2393H17.481V19.2393H7.48096V17.2393H5.48096V7.23926H7.48096V5.23926H17.481Z",fill:"#94A3B8"})]}),eh=eo.default.div.withConfig({componentId:"sc-a18ea241-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>"dark"===$.theme.mode?"":"#64748B");var CompareFeatures_Benefit=function($){let{benefit:et}=$;return(0,ei.jsxs)(eh,{children:[(0,ei.jsx)("p",{className:"benefit-desc",children:et.benefit}),(0,ei.jsxs)("div",{className:"benefit-icon nes-pointer",children:[(0,ei.jsx)(ed.Z,{text:et.description}),(0,ei.jsx)(IIcon,{})]})]})},ep=en(5592);function BenefitAccess_templateObject(){let $=(0,er._)(["\n height: 64px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n\n p {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n\n .paid {\n color: ",";\n\n font-size: 16px;\n font-weight: 600;\n line-height: 150%;\n }\n\n .checkmark {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n background-color: ",";\n display: flex;\n justify-content: center;
1841\n align-items: center;\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n\n .dash {\n font-size: 24px;\n }\n"]);return BenefitAccess_templateObject=function(){return $},$}let em=eo.default.div.withConfig({componentId:"sc-6217cc78-0"})(BenefitAccess_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.green},$=>{let{theme:et}=$;return et.colors.background.green.tertiary},$=>"dark"===$.theme.mode?"":"#3F6212");var CompareFeatures_BenefitAccess=function($){let{access:et,paid:en}=$;return(0,ei.jsxs)(em,{children:["text"==et.type&&(0,ei.jsx)("p",{className:en&&"paid",children:et.copy}),"checkmark"==et.type&&(0,ei.jsx)("p",{className:"checkmark",children:(0,ei.jsx)(ep.Z,{})}),"dash"==et.type&&(0,ei.jsx)("p",{className:"dash",children:"-"})]})},ef=en(62286),eg=en.n(ef),ey=en(41664),ev=en.n(ey);function CfDesktop_templateObject(){let $=(0,er._)(['\n align-items: center;\n flex-direction: column;\n font-family: "Mulish", sans-serif;\n\n '," {\n display: none;\n }\n\n "," {\n display: flex;\n }\n\n .columns-container {\n display: grid;\n\n "," {\n grid-template-columns: repeat(3, 224px);\n }\n\n "," {\n grid-template-columns: repeat(3, 300px);\n }\n\n gap: 24px;\n\n .section {\n display: flex;\n flex-direction: column;\n justify-content: end;\n gap: 16px;\n }\n\n .explorer-section,\n .paid-section {\n padding: 0px 24px;\n padding-top: 24px;\n\n .copy {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n\n img {\n width: 32px;\n height: 29.388px;\n }\n\n p {\n color: ",";\n font-size: 18px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .club {\n font-size: 18px;\n font-style: normal;\n font-weight: 900;\n line-height: 150%;\n letter-spacing: 0.9px;\n background: linear-gradient(\n 255deg,\n #a3e635 7.8%,\n #2cbaff 42.72%,\n #be53ff 77.63%,\n #ff7286 113.61%\n );\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n }\n\n .curren-plan {\n display: flex;\n height: 42px;\n flex-direction: column;\n justify-content: center;\n\n color: ",";\n font-size: 16px;\n font-style: italic;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n }\n\n button {\n width: 100%;\n }\n }\n\n .paid-section {\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n border: 2px solid #14adff;\n border-bottom: none;\n background-color: ",';\n }\n\n .compare-features {\n p {\n font-family: "PixelGridM";\n color: ',";\n font-size: 24px;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n }\n }\n\n .benefits-container {\n display: flex;\n flex-direction: column;\n\n .benefits-section {\n display: grid;\n gap: 24px;\n\n "," {\n grid-template-columns: repeat(3, 224px);\n }\n\n "," {\n grid-template-columns: repeat(3, 300px);\n }\n\n .benefit-info {\n padding-top: 24px;\n .benefit-title {\n color: ",";\n font-size: 12px;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n :last-child {\n .benefit-info {\n padding-bottom: 24px;\n }\n\n .benefits-paid-section {\n border-bottom: 2px solid #14adff;\n background-color: ",";\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n }\n }\n\n .benefits-section:first-child {\n .benefit-info {\n padding-top: 40px;\n }\n }\n\n .benefits-paid-section {\n border-left: 2px solid #14adff;\n border-right: 2px solid #14adff;\n border-bottom: none;\n background-color: ",";\n }\n }\n"]);
1841return CfDesktop_templateObject=function(){return $},$}let ex=eo.default.div.withConfig({componentId:"sc-e2f77402-0"})(CfDesktop_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.background.blue.primary});var CompareFeatures_CfDesktop=function($){let{features:et}=$,en=eg().get().codedextoken,[er,eo]=(0,el.useState)(!1);(0,el.useEffect)(()=>{!function(){let $="true"===localStorage.getItem("headercheck");$&&eo(!0)}()},[er]);let es=[{output:(0,ei.jsx)("div",{className:"compare-features section",children:(0,ei.jsx)("p",{children:"Compare Features"})})},{output:(0,ei.jsxs)("div",{className:"explorer-section section",children:[(0,ei.jsxs)("div",{className:"copy",children:[(0,ei.jsx)("img",{src:"/images/pricing/boy-working.svg",alt:"explorer text"}),(0,ei.jsx)("p",{children:"Explorer"})]}),en?(0,ei.jsx)(ei.Fragment,{children:er?(0,ei.jsx)(ei.Fragment,{}):(0,ei.jsx)("p",{className:"curren-plan",children:"Your current plan"})}):(0,ei.jsx)(ev(),{href:"/signup",style:{all:"unset"},children:(0,ei.jsx)(eu.Z,{variant:"subtle",size:"small",children:"Start for free"})})]})},{output:(0,ei.jsxs)("div",{className:"paid-section section",children:[(0,ei.jsxs)("div",{className:"copy",children:[(0,ei.jsx)("img",{src:"/images/pricing/girl-working.svg",alt:"explorer text"}),(0,ei.jsx)("p",{className:"club",children:"CLUB"})]}),en?(0,ei.jsx)(ei.Fragment,{children:er?(0,ei.jsx)(ei.Fragment,{}):(0,ei.jsx)(eu.Z,{variant:"yellow",size:"small",onClick:()=>(function($){let et=document.getElementById($);et?et.click():console.error('id "'.concat($,'" not found.'))})("club-checkout-target-id"),children:"Join Club"})}):(0,ei.jsx)(ev(),{href:"/signup",style:{all:"unset"},children:(0,ei.jsx)(eu.Z,{variant:"yellow",size:"small",children:"Join Club"})})]})}];return(0,ei.jsxs)(ex,{children:[(0,ei.jsx)("div",{className:"columns-container",id:"scroll-target-for-view-all",children:es.map(($,et)=>(0,ei.jsx)(el.Fragment,{children:$.output},et))}),(0,ei.jsx)("div",{className:"benefits-container",children:et.map($=>(0,ei.jsxs)("div",{className:"benefits-section",children:[(0,ei.jsxs)("div",{className:"benefit-info",children:[(0,ei.jsx)("p",{className:"benefit-title",children:$.section}),(0,ei.jsx)("div",{className:"benefit-list",children:$.benefits.map($=>(0,ei.jsx)(CompareFeatures_Benefit,{benefit:$},$.benefit))})]}),(0,ei.jsxs)("div",{className:"benefit-info",children:[(0,ei.jsx)("p",{className:"benefit-title",style:{color:"transparent"},children:$.section}),$.benefits.map($=>(0,ei.jsx)(CompareFeatures_BenefitAccess,{access:$.access.free,paid:!1},$.benefit))]}),(0,ei.jsxs)("div",{className:"benefit-info benefits-paid-section",children:[(0,ei.jsx)("p",{className:"benefit-title",style:{color:"transparent"},children:$.section}),$.benefits.map($=>(0,ei.jsx)(CompareFeatures_BenefitAccess,{access:$.access.paid,paid:!0},$.benefit))]})]},$))})]})};function MobileCf_templateObject(){let $=(0,er._)(["\n "," {\n display: block;\n }\n\n "," {\n display: none;\n }\n\n h3 {\n text-align: center;\n\n color: ",';\n font-family: "PixelGridM";\n font-size: 24px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n .toggle {\n margin-top: 24px;\n\n display: flex;\n justify-content: center;\n\n button {\n all: unset;\n padding: 8px 10px;\n border: 2px solid ',";\n\n color: ",";\n font-size: 14px;\n font-weight: 600;\n line-height: 150%;\n width: 80px;\n text-align: center;\n }\n\n .explorer {\n border-radius: 4px 0px 0px 4px;
1841\n border-right: none;\n }\n\n .club {\n border-radius: 0px 4px 4px 0px;\n border-left: none;\n }\n\n .explorer-active,\n .club-active {\n border: 2px solid ",";\n background: ",";\n color: ",";\n }\n }\n\n .benefits-container {\n padding-top: 16px;\n\n .benefits-section {\n margin-top: 16px;\n .benefits-section-title {\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .benefits-list {\n .benefit {\n padding: 12px 0px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .copy {\n .title {\n color: ",";\n font-size: 14px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .description {\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n max-width: 75%;\n }\n }\n }\n }\n }\n }\n"]);return MobileCf_templateObject=function(){return $},$}let e_=eo.default.div.withConfig({componentId:"sc-c35decfa-0"})(MobileCf_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.border.grey.dark},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary});var CompareFeatures_MobileCf=function($){let{features:et}=$,[en,er]=(0,el.useState)(!0);return(0,ei.jsxs)(e_,{children:[(0,ei.jsx)("h3",{children:"Compare Features"}),(0,ei.jsxs)("div",{className:"toggle",id:"mobile-scroll-target-for-view-all",children:[(0,ei.jsx)("button",{className:"explorer nes-pointer ".concat(!en&&"explorer-active"),onClick:()=>er(!1),children:"Explorer"}),(0,ei.jsx)("button",{className:"club nes-pointer ".concat(en&&"club-active"),onClick:()=>er(!0),children:"Club"})]}),(0,ei.jsx)("div",{className:"benefits-container",children:et.map($=>(0,ei.jsxs)("div",{className:"benefits-section",children:[(0,ei.jsx)("p",{className:"benefits-section-title",children:$.section}),(0,ei.jsx)("div",{className:"benefits-list",children:$.benefits.map($=>(0,ei.jsxs)("div",{className:"benefit",children:[(0,ei.jsxs)("div",{className:"copy",children:[(0,ei.jsx)("p",{className:"title",children:$.benefit}),(0,ei.jsx)("p",{className:"description",children:$.description})]}),(0,ei.jsx)(CompareFeatures_BenefitAccess,{access:en?$.access.paid:$.access.free,paid:en})]},$))})]},$))})]})};function CompareFeatures_templateObject(){let $=(0,er._)(["\n padding: 64px 0px;\n background-color: ",";\n"]);return CompareFeatures_templateObject=function(){return $},$}let ew=eo.default.div.withConfig({componentId:"sc-ebbbe813-0"})(CompareFeatures_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.primary});var CompareFeatures_CompareFeatures=function(){let $=[{section:"Build Job-Ready Skills",benefits:[{benefit:"Master in-demand languages",access:{free:{type:"text",copy:(0,ei.jsxs)(ei.Fragment,{children:["Access to early chapters",(0,ei.jsx)("br",{}),"(excluding Club Courses)"]})},paid:{type:"text",copy:"Full Access"}},description:"Learn Python, JavaScript, and moreâfrom zero to job-ready"},{benefit:"Build real projects for your portfolio",access:{free:{type:"checkmark",copy:""},paid:{type:"checkmark",copy:""}},description:"Ship apps you can show employers and friends"},{benefit:"Practice coding every day",access:{free:{type:"checkmark",copy:""},paid:{type:"checkmark",copy:""}},description:"Challenge packs are bite-sized practice to keep you improving"}]}
1841,{section:"Community",benefits:[{benefit:"Access to Discord",access:{free:{type:"checkmark",copy:""},paid:{type:"checkmark",copy:""}},description:"Never code aloneâget help, share wins, make friends in Discord"},{benefit:"Get priority support from the community",access:{free:{type:"dash",copy:""},paid:{type:"checkmark",copy:""}},description:"Club-only channels where members help each other fast"},{benefit:"Learn and hang out live",access:{free:{type:"checkmark",copy:""},paid:{type:"checkmark",copy:""}},description:"Office Hours, Game Nites, Watch Parties & more"},{benefit:"Advance your career",access:{free:{type:"dash",copy:""},paid:{type:"checkmark",copy:""}},description:"Resume reviews, technical workshops, interview prep"}]},{section:"Get Expert Guidance",benefits:[{benefit:"Get unstuck in minutes",access:{free:{type:"dash",copy:""},paid:{type:"checkmark",copy:""}},description:"Senior devs available 24/7 to answer your questions"},{benefit:"Project Reviews",access:{free:{type:"dash",copy:""},paid:{type:"checkmark",copy:""}},description:"Expert eyes on your codeâlearn what pros would change"},{benefit:"Certificates",access:{free:{type:"dash",copy:""},paid:{type:"checkmark",copy:""}},description:"Shareable credentials for LinkedIn and resumes"}]},{section:"Level Up Faster",benefits:[{benefit:"Builds",access:{free:{type:"checkmark",copy:""},paid:{type:"checkmark",copy:""}},description:"Create and share your own projects and code snippets right on Cod\xe9dex"},{benefit:"Lumi - our AI Assistant",access:{free:{type:"text",copy:"Limited"},paid:{type:"text",copy:"Unlimited Access"}},description:"AI tutor for quick questions anytime"}]}];return(0,ei.jsx)(ew,{children:(0,ei.jsxs)(es.Z,{children:[(0,ei.jsx)(CompareFeatures_CfDesktop,{features:$}),(0,ei.jsx)(CompareFeatures_MobileCf,{features:$})]})})}},53116:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(73857),el=en(41664),eu=en.n(el),ed=en(62286),eh=en.n(ed);function _templateObject(){let $=(0,er._)(["\n background: ",";\n background-blend-mode: normal, hard-light, normal;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n "," {\n padding: 40px 24px;\n gap: 48px;\n flex-direction: column;\n }\n\n "," {\n padding: 80px 24px;\n\n gap: 80px;\n flex-direction: row;\n }\n\n .image-container {\n flex-shrink: 0;\n\n img {\n "," {\n width: 160px;\n height: 160px;\n }\n\n "," {\n width: 240px;\n height: 240px;\n }\n }\n }\n\n .copy-container {\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 474px;\n max-width: 100%;\n\n h4 {\n color: ",';\n font-family: "PixelGridM";\n font-size: 32px;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n text-align: center;\n }\n\n "," {\n text-align: start;\n }\n }\n\n p {\n color: ",";\n font-size: 18px;\n font-weight: 500;\n line-height: 150%;\n\n "," {\n text-align: center;\n }\n\n "," {\n text-align: start;\n }\n }\n\n button {\n "," {\n width: 100%;\n }\n\n "," {\n width: fit-content;\n }\n }\n }\n"]);return _templateObject=function(){return $},$}let ep=eo.default.div.withConfig({componentId:"sc-a1fe6f2a-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"===et.mode?"linear-gradient(180deg, #020617 0%, rgba(2, 6, 23, 0) 100%),\n linear-gradient(\n 260deg,\n rgba(236, 72, 153, 0.33) 0%,\n rgba(124, 58, 237, 0.33) 32.48%,\n rgba(20, 173, 255, 0.33) 64.96%,\n rgba(163, 230, 53, 0.33) 98.43%\n ),\n #5b21b6;":"linear-gradient(0deg, rgba(255, 255, 255, 0) -12.92%, #fff 93.14%),\n linear-gradient(\n 260deg,\n rgba(236, 72, 153, 0.33) 1.49%,\n rgba(124, 58, 237, 0.33) 34.18%,\n rgba(20, 173, 255, 0.33) 69.84%,\n rgba(163, 230, 53, 0.33) 100.56%\n ),\n #ddd6fe"},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});et.Z=function(){let $=eh().get().codedextoken;return(0,ei.jsxs)(ep,{children:[(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:"/images/character_gifs/dZ7Qu9K.gif",alt:"rockband"})}),(0,ei.jsxs)("div",{className:"copy-container",children:[(0,ei.jsx)("h4",{children:"Start your co
1841ding adventure today."}),(0,ei.jsx)("p",{children:"Join the Club and get expert mentors, real projects for your portfolio, and a community that has your back."}),$?(0,ei.jsx)(es.Z,{variant:"yellow",onClick:()=>(function($){let et=document.getElementById($);et?et.click():console.error('id "'.concat($,'" not found.'))})("club-checkout-target-id"),children:"Join Club"}):(0,ei.jsx)(eu(),{href:"/signup",style:{all:"unset"},children:(0,ei.jsx)(es.Z,{variant:"yellow",children:"Join Club"})})]})]})}},24207:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521),es=en(33058),el=en(73857),eu=en(41664),ed=en.n(eu),eh=en(36326);function _templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n background: ",";\n\n "," {\n padding: 40px 16px;\n }\n\n "," {\n padding: 64px;\n }\n\n h3 {\n color: ",';\n font-family: "PixelGridM";\n text-align: center;\n font-size: 24px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n .faq-container {\n margin-top: 32px;\n width: 700px;\n max-width: 100%;\n border-radius: 8px;\n background: ',";\n }\n\n .more-questions {\n color: red;\n margin-top: 48px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n color: ",";\n font-size: 20px;\n font-weight: 500;\n line-height: 120%;\n }\n }\n"]);return _templateObject=function(){return $},$}let ep=eo.default.div.withConfig({componentId:"sc-9be76008-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.text.primary}),em=[{question:"What is Cod\xe9dex Club?",answer:(0,ei.jsxs)("div",{children:[(0,ei.jsx)("p",{children:"Cod\xe9dex Club is a paid membership with a full catalog unlock, 24/7 help from code mentors, unlimited AI, exclusive events such as Office Hours, Resume Review, Interview Prep, and more!"}),(0,ei.jsx)("br",{}),(0,ei.jsx)("p",{children:"Please review the pricing grid above to see how our membership differs between free and paid tiers."})]})},{question:"How can I get in contact with someone from the Cod\xe9dex team?",answer:(0,ei.jsxs)("div",{children:[(0,ei.jsxs)("p",{children:["Email"," ",(0,ei.jsx)("a",{href:"mailto:[email protected]",className:"nes-pointer",children:"[email protected]"})," ","to get in touch with our Customer Support team for any questions related to how to use the product, pricing, sponsorship, etc."]}),(0,ei.jsx)("br",{}),(0,ei.jsxs)("p",{children:["For coding-related questions/help, please join our"," ",(0,ei.jsx)(ed(),{href:"https://discord.gg/vSKEhP9fY2",target:"_blank",rel:"noreferrer",children:"Discord"})," ","and"," ",(0,ei.jsx)(ed(),{href:"/community",className:"nes-pointer",children:"On-Platform Community"})," ","(unlockable at 100 XP), and our community moderators & team will assist you there!"]})]})},{question:"How can I contribute to Cod\xe9dex?",answer:(0,ei.jsxs)("div",{children:[(0,ei.jsx)("p",{children:"There are many ways to contribute to our platform! Weâre always seeking feedback on our product and courses from users."}),(0,ei.jsx)("br",{}),(0,ei.jsxs)("p",{children:["Please feel free to share your thoughts by emailing us:"," ",(0,ei.jsx)("a",{href:"mailto:[email protected]",className:"nes-pointer",children:"[email protected]"}),"."]})]})},{question:"Can I request a new course, project tutorial, or product feature?",answer:(0,ei.jsxs)("div",{children:[(0,ei.jsx)("p",{children:"Thanks for your interest in making Cod\xe9dex great! If you have a course, project tutorial, or product feature that youâd like to see on Cod\xe9dex, please share it with us."}),(0,ei.jsx)("br",{}),(0,ei.jsxs)("p",{children:["Please ",(0,ei.jsx)("a",{href:eh.n.requestContent,children:"fill out this form"})," ","to request new content."]})]})},{question:"What are the prerequisites for learning to code and how can I get started?",answer:(0,ei.jsx)("div",{children:(0,ei.jsxs)("p",{children:["None! Most of our users have little to no experience when they sign up. Our courses, such as Learn ",(0,ei.jsx)(ed(),{href:"/python",children:"Python"})," and ",(0,ei.jsx)(ed(),{href:"/html",children:"HTML"}
1841),", are the perfect place to start your coding adventure!"]})})},{question:"Is Cod\xe9dex suitable for children?",answer:(0,ei.jsx)("div",{children:(0,ei.jsxs)("p",{children:["Yes! If your child can read and write, Cod\xe9dex is perfect. We recommend getting started with ",(0,ei.jsx)(ed(),{href:"/html",children:"HTML"})," or ",(0,ei.jsx)(ed(),{href:"/css",children:"CSS"})," as these courses are highly visual and engaging."]})})},{question:"How do I cancel my subscription?",answer:(0,ei.jsxs)("div",{children:[(0,ei.jsx)("p",{children:"To cancel your Cod\xe9dex Club subscription, click on your avatar at the top-right of the page and youâll see a drop-down. From there, select âAccountâ â âBillingâ and hit the orange âcancelâ button."}),(0,ei.jsx)("br",{}),(0,ei.jsx)("p",{children:"The last day of your subscription will display underneath the button after clicking cancel."}),(0,ei.jsx)("br",{}),(0,ei.jsx)("p",{children:"Please note that once you cancel your subscription, you will lose access to all paid content, even if you have completed it. Should you wish to upgrade your account again, you can do so at any time!"})]})}];et.Z=function(){return(0,ei.jsxs)(ep,{children:[(0,ei.jsx)("h3",{children:"Frequently Asked Questions"}),(0,ei.jsx)("div",{className:"faq-container",children:em.map(($,et)=>(0,ei.jsx)(es.Z,{item:$},et))}),(0,ei.jsxs)("div",{className:"more-questions",children:[(0,ei.jsx)("p",{children:"Still have more questions?"}),(0,ei.jsx)(ed(),{href:"https://codedex.notion.site/Welcome-to-the-Cod-dex-Help-Center-c8afe2966ea9490d9377bce826d22eb7",style:{all:"unset"},children:(0,ei.jsx)(el.Z,{children:"Go to Help Center"})})]})]})}},33896:function($,et,en){"use strict";en.d(et,{Z:function(){return search_SearchCatagory}});var er=en(82729),ei=en(85893),eo=en(19521),es=en(41664),el=en.n(es),eu=en(92152),ed=en(9473),eh=en(88090),ep=en(28010);function _templateObject(){let $=(0,er._)(["\n padding: 8px 12px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n transition-duration: 0.2s;\n\n :hover {\n background-color: ",";\n transition-duration: 0.2s;\n }\n\n .search-result-img-wrapper {\n flex-shrink: 0;\n width: 40px;\n height: 40px;\n border-radius: 4px;\n }\n\n .search-user-image {\n border-radius: 50%;\n border: 2px solid ",";\n }\n\n .result-copy {\n min-width: 0;\n width: 0;\n flex: 1;\n\n .result-copy-header {\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n\n .result-copy-subheader {\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n min-width: 0;\n }\n }\n"]);return _templateObject=function(){return $},$}let em=eo.default.div.withConfig({componentId:"sc-3fe5e277-0"})(_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.border.grey.dark},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary});var search_SearchResult=function($){let{type:et,result:en}=$,er=(0,ed.v9)((0,eh.W5)({courseName:en.id,type:et})),eo=(0,ed.v9)((0,ep.Y9)({projectInternalTitle:en.id})),es={courses:{imgSrc:er.bannerImageLink,header:er.catalogName,subheader:er.description,link:er.courseUrl},projects:{imgSrc:(null==eo?void 0:eo.image)||"",header:en.title,subheader:en.description||"Add project description",link:"/projects/".concat(null==en?void 0:en.id)},users:{imgSrc:(null==en?void 0:en.photoURL)||"",header:en.name||en.firstName||en.lastName||"Coder Friend",subheader:"@".concat(null==en?void 0:en.username)||0,link:"/@".concat(null==en?void 0:en.username)}},ef=es[et];return(0,ei.jsx)(el(),{href:ef.link,style:{textDecoration:"none"},children:(0,ei.jsxs)(em,{children:[(0,ei.jsx)(eu.Z,{src:ef.imgSrc,className:"search-result-img-wrapper ".concat("users"===et&&"search-user-image"),alt:"search result image"}),(0,ei.jsxs)("div",{className:"result-copy",children:[(0,ei.jsx)("p",{className:"result-copy-header",children:ef.header}),(0,ei.jsx)("p",{className:"result-copy-subheader",children:ef.subheader})]})]})})};
1841function SearchCatagory_templateObject(){let $=(0,er._)(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n\n .catagory-label {\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n padding: 0px 12px;\n }\n"]);return SearchCatagory_templateObject=function(){return $},$}let ef=eo.default.div.withConfig({componentId:"sc-ed19160e-0"})(SearchCatagory_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary}),eg={courses:"courses",projects:"project tutorials",users:"users",default:"result"};var search_SearchCatagory=function($){let{catagory:et,showAll:en=!1}=$;if((null==et?void 0:et.items.length)!==0)return(0,ei.jsxs)(ef,{children:[(0,ei.jsx)("label",{className:"catagory-label",children:(null==et?void 0:et.defaultLabel)||eg[et.type||"default"]}),(0,ei.jsx)("div",{className:"results-wrapper",children:null==et?void 0:et[en?"allItems":"items"].map($=>(0,ei.jsx)(search_SearchResult,{result:$,type:et.type},$.id))})]})}},49656:function($,et,en){"use strict";en.d(et,{Z:function(){return search_SearchLoader}});var er=en(82729),ei=en(85893),eo=en(19521),icons_SpinningLoader=function($){let{...et}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"30",viewBox:"0 0 29 30",fill:"none",...et,children:(0,ei.jsx)("path",{d:"M29 15C29 12.1322 28.1496 9.32874 26.5563 6.94423C24.963 4.55972 22.6984 2.70122 20.0489 1.60375C17.3994 0.506276 14.4839 0.219128 11.6712 0.778613C8.85847 1.3381 6.27481 2.71909 4.24695 4.74695C2.21909 6.77481 0.838099 9.35847 0.278613 12.1712C-0.280872 14.9839 0.00627612 17.8994 1.10375 20.5489C2.20122 23.1984 4.05972 25.463 6.44423 27.0563C8.82874 28.6496 11.6322 29.5 14.5 29.5V26.6355C12.1987 26.6355 9.94913 25.953 8.03569 24.6745C6.12225 23.396 4.6309 21.5788 3.75024 19.4527C2.86958 17.3266 2.63916 14.9871 3.08811 12.73C3.53707 10.473 4.64524 8.39974 6.27249 6.77249C7.89974 5.14524 9.97298 4.03707 12.23 3.58811C14.4871 3.13916 16.8266 3.36958 18.9527 4.25024C21.0788 5.1309 22.896 6.62225 24.1745 8.53569C25.453 10.4491 26.1355 12.6987 26.1355 15H29Z",fill:"#14ADFF"})})};function _templateObject(){let $=(0,er._)(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"]);return _templateObject=function(){return $},$}function _templateObject1(){let $=(0,er._)(["\n height: 202px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n\n .searching-for {\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n word-wrap: break-word;\n overflow-wrap: anywhere;\n max-width: 90%;\n text-align: center;\n }\n\n .spinner {\n animation: "," 1s linear infinite;\n }\n"]);return _templateObject1=function(){return $},$}let es=(0,eo.keyframes)(_templateObject()),el=eo.default.div.withConfig({componentId:"sc-4cea8fc6-0"})(_templateObject1(),$=>{let{theme:et}=$;return et.colors.text.tertiary},es);var search_SearchLoader=function($){let{searchQuery:et}=$;return(0,ei.jsxs)(el,{children:[(0,ei.jsx)(icons_SpinningLoader,{className:"spinner"}),(0,ei.jsxs)("p",{className:"searching-for",children:['Searching "',et,'" ...']})]})}},11924:function($,et,en){"use strict";en.d(et,{U:function(){return el}});var er=en(67294),ei=en(73845),eo=en(9473),es=en(85673);let el={type:"courses",defaultLabel:"popular courses",items:[{id:"python",name:"python",description:"Learn programming fundamentals such as variables, control flow, and loops with the world's most popular and versatile coding language â Python!"},{id:"html",name:"html",description:"Create your first website with HTML, the building blocks of the web and dive into the world of web development."},{id:"javascript",name:"javascript",description:"Learn variables, loops, functions, and events to start building interactive web apps with the programming language of the web â JavaScript!"}]};et.Z=function(){let $=(0,ei.T)(),et=(0,eo.v9)(es.QA),en=(0,er.useRef)(!1);(0,er.useEffect)(()=>{async function getSuggestedUsers(){try{let et=await fetch("/api/search/getSuggestedUsers");if(!et.ok){console.error("Failed to fetch suggested users: ".concat(et.status));return}let{users:en}=await et.json();en&&en.length>0&&$((0,es.lm)(en))}catch($){console.error("Error fetching suggested users:",$)}}en.current||0!==et.length||(en.current=!0,getSuggestedUsers())},[$,et.length]);let eu=(0,er.useMemo)(()=>[el,{type:"users",defaultLabel:"people to follow",items:et}],[et]);return eu}},51226:function($,et,en){"use strict";function getSundayOfCurrentWeek(){let $=new Date;$.setDate($.getDate()-$.getDay());let et=String($.getDate()).padStart(2,"0"),en=$.getMonth()+1,er=$.toLocaleStr
1841ing("en-US",{month:"long"}),ei=$.getFullYear(),eo="".concat(String(en).padStart(2,"0"),"-").concat(et,"-").concat(ei);return{formattedDate:eo,month:er,day:et,year:String(ei)}}en.d(et,{P:function(){return getSundayOfCurrentWeek}})},36180:function($,et,en){"use strict";var er=en(67294);et.Z=function($,et){let[en,ei]=(0,er.useState)($);return(0,er.useEffect)(()=>{let en=setTimeout(()=>{ei($)},et);return()=>{clearTimeout(en)}},[$,et]),en}},3816:function($,et,en){"use strict";var er=en(82729),ei=en(85893),eo=en(19521);function _templateObject(){let $=(0,er._)(["\n height: 100vh;\n width: 100vw;\n background-color: #0f1524;\n display: flex;\n justify-content: center;\n align-items: center;\n\n img {\n width: 250px;\n height: auto;\n }\n\n .logo-container {\n display: flex;\n align-items: center;\n\n img {\n width: 40px;\n height: auto;\n margin-right: 1rem;\n animation-name: spin;\n animation-duration: 0.9s;\n animation-iteration-count: 1;\n animation-timing-function: ease-in-out;\n }\n\n h1 {\n color: ",";\n padding: 0px;\n margin: 0px;\n }\n }\n\n @keyframes spin {\n 0% {\n transform: rotateY(0);\n }\n 50% {\n transform: rotateY(1turn) translateY(-20px);\n }\n 100% {\n transform: rotateY(1turn) translateY(0px);\n }\n }\n"]);return _templateObject=function(){return $},$}let es=eo.default.div.withConfig({componentId:"sc-96e6fc8e-0"})(_templateObject(),$=>$.theme.colors.text1);et.Z=function(){return(0,ei.jsx)(es,{children:(0,ei.jsx)("div",{className:"logo-container",children:(0,ei.jsx)("img",{src:"/images/coin-cropped.png",alt:"codedex logo"})})})}},63248:function($,et,en){"use strict";en.d(et,{g:function(){return useBadgeEvent}});var er=en(67294),ei=en(39828),eo=en(92369),es=en(6345);async function handleCountedBadge($,et){let en,{firestore:er,uid:eo,badgeType:el,opts:eu}=$,ed=(0,ei.JU)(er,"userBadges",eo),eh=(0,ei.JU)(er,"userBadges",eo,"globalBadges",el),ep={};if(et.dedupe){let{ledgerCollection:$,dedupeKey:er}=et.dedupe,{[er]:eo,...es}=null!=eu?eu:{};if("string"!=typeof eo||!eo)throw Error("".concat(er," is required for the ").concat(el," badge"));en=(0,ei.JU)(eh,$,eo),ep=es}return(0,ei.i3)(er,async $=>{var er,eo,eu,em;let[ef,eg]=await Promise.all([en?$.get(en):Promise.resolve(null),$.get(eh)]);if(null==ef?void 0:ef.exists()){let $=null!==(eu=null===(eo=eg.data())||void 0===eo?void 0:eo[et.badgeCounterKey])&&void 0!==eu?eu:0;return{status:200,counted:!1,tiersEarned:[],count:$}}let ey=null!==(em=null===(er=eg.data())||void 0===er?void 0:er[et.badgeCounterKey])&&void 0!==em?em:0,ev=ey+1,ex=(0,es.V2)(el,ey,ev),e_={[et.badgeCounterKey]:ev,lastUpdated:(0,ei.Bt)()},ew={count:(0,ei.nP)(1)};if(ex.length){let $=Object.fromEntries(ex.map($=>[$.level,{level:$.level,name:$.name,icon:$.icon,earnedAt:(0,ei.Bt)()}]));e_.tiers=$,ew.tiers=$}return en&&$.set(en,{createdAt:(0,ei.Bt)(),...ep}),$.set(ed,{badges:{[el]:ew}},{merge:!0}),$.set(eh,e_,{merge:!0}),{status:200,counted:!0,tiersEarned:ex.map($=>$.level),count:ev}})}async function handleStateBadge($){var et;let{firestore:en,uid:er,badgeType:eo}=$,es=(0,ei.JU)(en,"userBadges",er),el=(0,ei.JU)(en,"userBadges",er,"globalBadges",eo),eu=await (0,ei.QT)(el);return(null===(et=eu.data())||void 0===et?void 0:et.earnedAt)?{status:200,earned:!1}:(0,ei.i3)(en,async $=>{var et;let en=await $.get(el);return(null===(et=en.data())||void 0===et?void 0:et.earnedAt)?{status:200,earned:!1}:($.set(el,{earnedAt:(0,ei.Bt)(),lastUpdated:(0,ei.Bt)()},{merge:!0}),$.set(es,{badges:{[eo]:{earnedAt:(0,ei.Bt)()}}},{merge:!0}),{status:200,earned:!0})})}async function handleBadgeEvent($){let{badgeType:et,uid:en,opts:er}=$,{firestore:ei}=(0,eo.UM)();try{switch(et){case"likes":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"likesGiven",dedupe:{ledgerCollection:"likesGiven",dedupeKey:"postId"}});case"comments":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"commentsMade"});case"icebreaker":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"introComments",dedupe:{ledgerCollection:"introComments",dedupeKey:"postId"}});case"monthly-challenge-entrant":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"challengesEntered",dedupe:{ledgerCollection:"challengesEntered",dedupeKey:"postId"}});case"following":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"following",dedupe:{ledgerCollection:"following",dedupeKey:"following"}});case"followers":return await handleCountedBadge({firestore:ei,uid:en,badgeType:et,opts:er},{badgeCounterKey:"followers",dedupe:{ledgerCollection:"followers",dedupeKey:"followers"}});case"newbie":case"hello-world":case"main-character":case"two-cents":case"monthly-challenge-winner":return await handleStateBadge({firestore:ei,uid:en,badgeType:et,opts:er});default:return{status:204,counted:!1}}}catch($){throw Error("Error assigning badge: "+$.message)}}var el=en(9473),eu=en(609),ed=en(73845),eh=en(85673),ep=en(81776);async function createBadgeNotification($){let{uid:et,badgeId:en,level:er}=$,{firestore:es}=(0,eo.UM)(),el="badge";try{let $=(0,ei.JU)(es,"communityNotifications",et),eo=(0,ei.hJ)($,"
1841notifications"),eu=(0,ei.IO)(eo,(0,ei.ar)("type","==",el),(0,ei.ar)("badgeId","==",en),(0,ei.ar)("level","==",null!=er?er:null)),ed=await (0,ei.PL)(eu);if(0!==ed.size)return{status:204};{let $={type:el,notifId:en,badgeId:en,read:!1,senderUid:et,createdAt:(0,ei.Bt)(),level:null!=er?er:null};return await (0,ei.ET)(eo,$),{status:200}}}catch($){throw Error("Error creating notification: "+$.message)}}function useBadgeEvent(){let $=(0,el.v9)(eu.f8),et=(0,ed.T)(),en=(0,er.useCallback)(async en=>{var er,ei;let{badgeType:eo,opts:el}=en,eu=null!==(er=null==el?void 0:el.uid)&&void 0!==er?er:$;if(!eu)return;let ed=await handleBadgeEvent({badgeType:eo,uid:eu,opts:el});if(200===ed.status){if("monthly-challenge-winner"==eo)return;let en=(0,es.Xq)(eo),er=new Date().toISOString(),el=[];if("threshold"===en.kind&&"number"==typeof ed.count){let es=new Set(null!==(ei=ed.tiersEarned)&&void 0!==ei?ei:[]);for(let ei of en.tiers)el.push({id:"".concat(eo,"-").concat(ei.level),badgeId:eo,kind:en.kind,group:en.group,level:ei.level,name:ei.name,icon:ei.icon,requirement:en.label(ei.threshold),count:ed.count,earned:ed.count>=ei.threshold,threshold:ei.threshold,...es.has(ei.level)?{earnedAt:er}:{}}),es.has(ei.level)&&(et((0,eh.UX)({type:"badge",message:"Badge earned!",persist:!0,badgeType:eo,level:ei.level})),createBadgeNotification({uid:$,badgeId:eo,level:ei.level}))}else"threshold"!==en.kind&&!0===ed.earned&&el.push({id:eo,badgeId:eo,kind:en.kind,group:en.group,level:null,name:en.name,icon:en.icon,requirement:en.requirement,earnedAt:er,count:null,earned:!0,threshold:null});el.length&&et((0,ep.DE)(el))}200===ed.status&&!0===ed.earned&&(et((0,eh.UX)({type:"badge",message:"Badge earned!",persist:!0,badgeType:eo})),createBadgeNotification({uid:$,badgeId:eo,level:null}))},[et,$]),ei=(0,er.useCallback)($=>{let{followerUid:et,followedUid:er}=$;en({badgeType:"following",opts:{following:er}}),en({badgeType:"followers",opts:{uid:er,followers:er}})},[en]);return{handleBadgeEvent:en,handleFollowBadgeEvent:ei}}},99979:function($,et,en){"use strict";en.d(et,{Bx:function(){return ep},N2:function(){return selectAiContext},O:function(){return el},P_:function(){return eh},WC:function(){return selectAiIsStreaming},Wl:function(){return es},_Y:function(){return selectAiChatSaveId},cR:function(){return ed},ez:function(){return eg},hA:function(){return eu},sy:function(){return selectAiChatHistory},tn:function(){return em},tw:function(){return selectAiChatsSentToday},zq:function(){return ef}});var er=en(77236),ei=en(57881);let eo=(0,er.oM)({name:"aiSlice",initialState:{chatHistory:[],context:"",streaming:!1,chatSaveId:null,chatsSentToday:0},reducers:{updateAiChatHistory($,et){$.chatHistory=et.payload},updateChatsSentToday($,et){$.chatsSentToday=et.payload},updateAiContext($,et){$.context=et.payload},updateAiChatSaveId($,et){$.chatSaveId=et.payload},updateStreamingMessage($,et){let{messageId:en,content:er}=et.payload,ei=$.chatHistory.findIndex($=>$.id===en);-1!==ei&&($.chatHistory[ei].content=er)},addStreamingMessage($,et){$.chatHistory.push({id:et.payload.id,role:"assistant",content:"",isStreaming:!0,createdAt:new Date().toISOString()}),$.streaming=!0},completeStreamingMessage($,et){let{id:en,uid:er}=et.payload,eo=$.chatHistory.findIndex($=>$.id===en);if($.streaming=!1,-1!==eo){$.chatHistory[eo].isStreaming=!1;let et=$.chatHistory.slice(Math.max(0,eo-1),eo+1);(0,ei.Aj)({uid:er,newChat:et,docId:$.chatSaveId})}},addAiUserMessage($,et){let{content:en,uid:er,role:eo="user",persist:es=!0}=et.payload,el={id:Date.now().toString(),role:eo,content:en,isStreaming:!1,createdAt:new Date().toISOString()};$.chatHistory.push(el),es&&(0,ei.Aj)({uid:er,newChat:el,docId:$.chatSaveId})},setAiMessageError($,et){let{id:en,error:er="error"}=et.payload,ei=$.chatHistory.findIndex($=>$.id===en);-1!==ei&&($.chatHistory[ei].status=er,$.chatHistory[ei].isStreaming=!1),$.streaming=!1}}});function selectAiChatHistory($){return $.ai.chatHistory}function selectAiContext($){return $.ai.context}function selectAiChatSaveId($){return $.ai.chatSaveId}function selectAiIsStreaming($){return $.ai.streaming}function selectAiChatsSentToday($){return $.ai.chatsSentToday}let{updateAiContext:es,updateStreamingMessage:el,addStreamingMessage:eu,completeStreamingMessage:ed,addAiUserMessage:eh,updateAiChatSaveId:ep,updateAiChatHistory:em,setAiMessageError:ef,updateChatsSentToday:eg}=eo.actions;et.ZP=eo.reducer},50528:function($,et,en){"use strict";en.d(et,{AU:function(){return selectActiveChatId},Bt:function(){return eg},Gr:function(){return eP},JD:function(){return ef},JG:function(){return ey},Mj:function(){return ed},NR:function(){return eN},O:function(){return e_},OV:function(){return eA},Oc:function(){return selectActiveChatCreatedAt},Wv:function(){return selectCurrentLumiChatHistory},X2:function(){return selectActiveChatTitle},Y8:function(){return selectLumiSuggestedQuestions},ZH:function(){return ej},_r:function(){return eR},cR:function(){return ek},eE:function(){return selectActiveChatType},ez:function(){return eT},fP:function(){return selectLumiLearMoreCourse},gH:function(){return eh},gZ:function(){return eC},hA:function(){return ew},iW:function(){return eu},j0:function(){return selectChatById},jX:function(){return selectLumiChatSuggestions},kb:function(){return eS},tU:function(){return selectLumiHistroyPanelOpenState},tV:function(){return selectLumiChatsSentToday},zR:function(){return selectChatsList}});var er=en(77236),ei=en(57881),eo=en(27741),es=en(62286),el=en.n(es);let eu=(0,er.hg)("lumi/fetchChatLimit",async $=>{let{uid:et}=$,en=await (0,eo.Q)({uid:et,whichChat:"lumiChat"});return en.lumiChatsSent}),ed=(0,er.hg)("lumi/fetchQuestionSuggestions",async $=>{let{courses:et}=$,en=await Promise.all(["generate-explain-questions","generate-project-questions"].map($=>fetch("/api/ai/generateQuestionSuggestions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({courses:et,prompt:$})}))),er=en.find($=>!$.ok);if(er)throw Error("Failed to fetch question suggestions: ".concat(er.status));let ei=await Promise.all(en.map($=>$.json()));return console.log("Explain questions response:",ei[0]),console.log("Project questions response:",ei[1]),{explanation:ei[0].suggestions||[],"project-ideas":ei[1].suggestions||[]}}),eh=(0,er.hg)("lumi/fetchLearningTopics",async $=>{let{course:et}=$,en=await fetch("/api/ai/generateQuestionSuggestions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({singleCourse:et,prompt:"generate-language-teacher-questions"})});if(!en.ok)throw Error("Failed to fetch learning topics: ".concat(en.status));let er=await en.json();return console.log("Learning topics response:",er),er.suggestions||[]}),ep={chats:{},activeChatId:null,chatsSentToday:0,showHistoryPanel:function(){let $;let et=el().get(null),en=et.lumiHistoryPanel;{let et=window.innerWidth;et<768&&($=!0)}return en?"true"===en:!($<768)}(),chatSuggestions:[{text:"Explain a topic",tag:"explanation"},{text:"Debug my code",tag:"bug-finder"},{text:"Brainstorm project ideas",tag:"project-ideas"},{text:"Give me practice problems",tag:"practice-problems"},{text:"Learn more about this a language",tag:"language-teacher"}],questionSuggestions:{explanation:[],"project-ideas":[],"language-teacher":[]},learnMoreCourse:null},em=(0,er.oM)({name:"lumiSlice",initialState:ep,reducers:{saveChatsFromFirebase($,et){let en={};
1841et.payload.forEach($=>{var et;en[$.id]={id:$.id,chatHistory:$.chatHistory,context:"",streaming:!1,chatSaveId:$.id,createdAt:(null===(et=$.chatHistory[0])||void 0===et?void 0:et.createdAt)||new Date().toISOString(),updatedAt:$.updated.seconds?new Date(1e3*$.updated.seconds).toISOString():new Date().toISOString(),title:$.title,chatType:$.chatType}}),$.chats={...$.chats,...en}},saveSingleChatFromFirebase($,et){var en;let er=et.payload;$.chats[er.id]={id:er.id,chatHistory:er.chatHistory,context:"",streaming:!1,chatSaveId:er.id,createdAt:(null===(en=er.chatHistory[0])||void 0===en?void 0:en.createdAt)||new Date().toISOString(),updatedAt:er.updated.seconds?new Date(1e3*er.updated.seconds).toISOString():new Date().toISOString(),title:er.title,chatType:er.chatType},$.activeChatId=er.id},createNewLumiChat:{reducer($,et){let{title:en,chatType:er="general",chatId:ei}=et.payload;$.chats[ei]={id:ei,chatHistory:[],context:"",streaming:!1,chatSaveId:ei,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),title:en||"New Chat",chatType:er},$.activeChatId=ei},prepare($){let et=(0,ei.fT)();return{payload:{...$,chatId:et}}}},setActiveChatId($,et){$.chats[et.payload]&&($.activeChatId=et.payload)},clearActiveChatId($){$.activeChatId=null},deleteLumiChat($,et){let en=et.payload;delete $.chats[en],$.activeChatId===en&&($.activeChatId=null)},updateLumiHistroyPanelState($,et){$.showHistoryPanel=et.payload},updateChatTitle($,et){let{chatId:en,title:er}=et.payload;$.chats[en]&&($.chats[en].title=er,$.chats[en].updatedAt=new Date().toISOString())},updateLumiChatHistory($,et){let en=et.payload.chatId||$.activeChatId;en&&$.chats[en]&&($.chats[en].chatHistory=et.payload.chatHistory,$.chats[en].updatedAt=new Date().toISOString())},updateChatsSentToday($,et){$.chatsSentToday=et.payload},updateLumiContext($,et){let en=et.payload.chatId||$.activeChatId;en&&$.chats[en]&&($.chats[en].context=et.payload.context)},updateLumiChatSaveId($,et){let en=et.payload.chatId||$.activeChatId;en&&$.chats[en]&&($.chats[en].chatSaveId=et.payload.chatSaveId)},updateStreamingMessage($,et){let en=et.payload.chatId||$.activeChatId;if(en&&$.chats[en]){let er=$.chats[en].chatHistory.findIndex($=>$.id===et.payload.messageId);-1!==er&&($.chats[en].chatHistory[er].content=et.payload.content)}},updateLumiLearnMoreCourse($,et){$.learnMoreCourse=et.payload},addStreamingMessage($,et){let en=et.payload.chatId||$.activeChatId;en&&$.chats[en]&&($.chats[en].chatHistory.push({id:et.payload.id,role:"assistant",content:"",isStreaming:!0,createdAt:new Date().toISOString()}),$.chats[en].streaming=!0,$.chats[en].updatedAt=new Date().toISOString())},completeStreamingMessage($,et){let en=et.payload.chatId||$.activeChatId;if(en&&$.chats[en]){let er=$.chats[en].chatHistory.findIndex($=>$.id===et.payload.id);if($.chats[en].streaming=!1,-1!==er){$.chats[en].chatHistory[er].isStreaming=!1;let eo=$.chats[en].chatHistory.slice(Math.max(0,er-1),er+1);(0,ei.Aj)({uid:et.payload.uid,newChat:eo,docId:$.chats[en].chatSaveId,subCollection:"lumiChats"})}$.chats[en].updatedAt=new Date().toISOString()}},addLumiUserMessage($,et){let en=et.payload.chatId||$.activeChatId;if(en||(en=(0,ei.fT)(),$.activeChatId=en),en){$.chats[en]||($.chats[en]={id:en,chatHistory:[],chatSaveId:en,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),context:"",streaming:!1,title:et.payload.newChatTitle||"New Chat"});let er={id:Date.now().toString(),role:et.payload.role||"user",content:et.payload.content,isStreaming:!1,createdAt:new Date().toISOString()};$.chats[en].chatHistory.push(er),$.chats[en].updatedAt=new Date().toISOString(),et.payload.newChatTitle&&($.chats[en].title=et.payload.newChatTitle,(0,ei.z8)({uid:et.payload.uid,docId:en,title:et.payload.newChatTitle||"New Chat",subCollection:"lumiChats",chatType:et.payload.chatType}))}},setLumiMessageError($,et){let en=et.payload.chatId||$.activeChatId;if(en&&$.chats[en]){let er=$.chats[en].chatHistory.findIndex($=>$.id===et.payload.id);-1!==er&&($.chats[en].chatHistory[er].status=et.payload.error||"error",$.chats[en].chatHistory[er].isStreaming=!1),$.chats[en].streaming=!1}}},extraReducers:$=>{$.addCase(eu.fulfilled,($,et)=>{$.chatsSentToday=et.payload}).addCase(ed.fulfilled,($,et)=>{$.questionSuggestions={...$.questionSuggestions,...et.payload}}).addCase(ed.rejected,($,et)=>{console.error("Failed to fetch question suggestions:",et.error)}).addCase(eh.fulfilled,($,et)=>{$.questionSuggestions["language-teacher"]=et.payload}).addCase(eh.rejected,($,et)=>{console.error("Failed to fetch learning topics:",et.error)})}});function selectActiveChatId($){return $.lumi.activeChatId}function selectChatById($){return et=>et.lumi.chats[$]}function selectActiveChatTitle($){let et=$.lumi.activeChatId,en=$.lumi.chats[et];return en?en.title:null}function selectActiveChatCreatedAt($){let et=$.lumi.activeChatId,en=$.lumi.chats[et];return en?en.createdAt:null}function selectCurrentLumiChatHistory($){var et;return $.lumi.activeChatId&&(null===(et=$.lumi.chats[$.lumi.activeChatId])||void 0===et?void 0:et.chatHistory)||[]}function selectLumiChatsSentToday($){return $.lumi.chatsSentToday}function selectChatsList($){return Object.values($.lumi.chats).sort(($,et)=>new Date(et.createdAt).getTime()-new Date($.createdAt).getTime()).map($=>({chatId:$.id,title:$.title||"New Chat"}))}function selectActiveChatType($){var et;return $.lumi.activeChatId&&(null===(et=$.lumi.chats[$.lumi.activeChatId])||void 0===et?void 0:et.chatType)||"general"}function selectLumiChatSuggestions($){return $.lumi.chatSuggestions}function selectLumiHistroyPanelOpenState($){return $.lumi.showHistoryPanel}function selectLumiSuggestedQuestions($){return $.lumi.questionSuggestions}function selectLumiLearMoreCourse($){return $.lumi.learnMoreCourse}let{createNewLumiChat:ef,setActiveChatId:eg,deleteLumiChat:ey,updateChatTitle:ev,updateLumiContext:ex,updateStreamingMessage:e_,addStreamingMessage:ew,completeStreamingMessage:ek,addLumiUserMessage:eC,updateLumiChatSaveId:eE,updateLumiChatHistory:eI,setLumiMessageError:eS,updateChatsSentToday:eT,clearActiveChatId:eA,saveChatsFromFirebase:eP,saveSingleChatFromFirebase:eN,updateLumiHistroyPanelState:ej,updateLumiLearnMoreCourse:eR}=em.actions;et.ZP=em.reducer},99691:function($,et,en){"use strict";en.d(et,{Ki:function(){return selectBlogTags}});var er=en(77236),ei=en(28858);let eo=(0,er.hg)("blogs/fetchFilteredBlogs",async($,et)=>{let{blogs:en}=et.getState(),{filterCheckBoxes:er}=en,ei=Object.entries(er).filter(function($){let[,et]=$;return et}).map(function($){let[et]=$;return et});try{let $=await fetch("/api/getBlogs",{body:JSON.stringify({filters:JSON.stringify(ei)}),method:"POST"}),{blogsData:et}=await $.json();return et}catch($){console.error($),et.rejectWithValue([])}}),es=(0,er.oM)({name:"blogs",initialState:{blogs:[],filterCheckBoxes:{Changelog:!1,Events:!1,Challenges:!1,Product:!1,Community:!1,News:!1},loadingBlogs:!0,errors:null,tags:["News","Product","Events","Community","Changelog","Boba Talk","Partnerships","Resources","Learner Stories"]},reducers:{setBlogs($,et){$.blogs=et.payload.blogs},updateCheckBox($,et){$.filterCheckBoxes[et.payload.checkboxName]=!$.filterCheckBoxes[et.payload.checkboxName]},clearFilters($){$.filterCheckBoxes={Changelog:!1,Events:!1,Challenges:!1,Product:!1,Community:!1,News:!1}}},extraReducers:$=>{$.addCase(ei.ju,($,et)=>({...$,...et.payload.blogs})),$.addCase(eo.pending,$=>{$.loadingBlogs=!0}),$.addCase(eo.fulfilled,($,et)=>{$.blogs=et.payload,$.loadingBlogs=!1}),$.addCase(eo.rejected,($,et)=>{$.blogs=[],$.errors=et.payload,$.loadingBlogs=!1})}});function selectBlogTags($){return $.blogs.tags}let{setBlogs:el,updateCheckBox:eu,clearFilters:ed}=es.actions;et.ZP=es.reducer},76190:function($,et,en){"use strict";en.d(et,{$3:function(){return ey}
1841,CE:function(){return selectBackgroundOptions},Lb:function(){return selectCustomizerType},Om:function(){return selectAllSelectedOptions},WI:function(){return selectCharacterAssetOptions},ZX:function(){return selectRepresentativeColor},aW:function(){return selectCharacterCustomizerBackground},bs:function(){return ek},fv:function(){return eh},g5:function(){return ef},pr:function(){return em},rW:function(){return e_},rZ:function(){return ew},xS:function(){return selectSelectedOption}});var er,ei,eo=en(77236),es=en(80109),el=en(47240);function assetToOption($){return{link:$.thumbnail||"",internalName:$.id}}let eu={customizerType:"custom",background:"#F1F5F9",backgroundOptions:[{background:"#F1F5F9",svg:"#E2E8F0"},{background:"#EC4899",svg:"#DB2777"},{background:"#F43F5E",svg:"#E11D48"},{background:"#FACC15",svg:"#EAB308"},{background:"#A3E635",svg:"#84CC16"},{background:"#2CBAFF",svg:"#14ADFF"},{background:"#7C3AED",svg:"#6D28D9"},{background:"#475569",svg:"#334155"}],representativeColors:{hair:es.LP,skin:es.$w},options:{hair:es.Gx.map(assetToOption),shirt:es.v2.map(assetToOption)},selectedOptions:{hair:{type:(null===(er=es.Gx[0])||void 0===er?void 0:er.id)||null,color:null},shirt:{type:(null===(ei=es.v2[0])||void 0===ei?void 0:ei.id)||null,color:null},skin:{type:null,color:null}}},ed=(0,eo.oM)({name:"characterCustomizer",initialState:eu,reducers:{updateCustomizerType:($,et)=>{$.customizerType=et.payload},setCharacterBackground:($,et)=>{$.background=et.payload},resetBackground:$=>{$.background=""},setSelectedOptionType:($,et)=>{let{category:en,type:er}=et.payload;$.selectedOptions[en].type=er},setSelectedOptionColor:($,et)=>{let{category:en,color:er}=et.payload;$.selectedOptions[en].color=er},setSelectedOption:($,et)=>{let{category:en,type:er,color:ei}=et.payload;$.selectedOptions[en]={type:er,color:ei}},setSelectedOutfitType:($,et)=>{let en=et.payload.outfitAssetId,er=$.selectedOptions.shirt.color,ei=$.selectedOptions.shirt.type||"outfit-style-1",eo=(0,el.gK)(ei),es=er?eo.indexOf(er):0,eu=Math.max(0,es),ed=(0,el.gK)(en);if(!ed||0===ed.length){console.warn("No palette found for outfit ".concat(en));return}let eh=ed[eu]||ed[0];$.selectedOptions.shirt={type:en,color:eh}},resetSelectedOption:($,et)=>{$.selectedOptions[et.payload]={type:null,color:null}},resetAllSelectedOptions:$=>{$.selectedOptions={hair:{type:null,color:null},shirt:{type:null,color:null},skin:{type:null,color:null}}},randomizeAllSelectedOptions:$=>{function getRandomItem($){return $[Math.floor(Math.random()*$.length)]}let et=getRandomItem(es.Gx),en=getRandomItem(es.LP);$.selectedOptions.hair={type:et.id,color:en};let er=getRandomItem(es.v2),ei=(0,el.gK)(er.id),eo=getRandomItem(ei);$.selectedOptions.shirt={type:er.id,color:eo};let eu=getRandomItem(es.$w);$.selectedOptions.skin={type:null,color:eu}},loadExistingAvatar:($,et)=>{let{background:en,...er}=et.payload;$.selectedOptions=er,en&&($.background=en)}}});function selectCharacterCustomizerBackground($){var et;return null==$?void 0:null===(et=$.characterCustomizer)||void 0===et?void 0:et.background}function selectRepresentativeColor($){let{key:et}=$;return $=>{var en,er;return null==$?void 0:null===(er=$.characterCustomizer)||void 0===er?void 0:null===(en=er.representativeColors)||void 0===en?void 0:en[et]}}function selectCharacterAssetOptions($){let{key:et}=$;return $=>{var en,er;return null==$?void 0:null===(er=$.characterCustomizer)||void 0===er?void 0:null===(en=er.options)||void 0===en?void 0:en[et]}}function selectSelectedOption($){let{category:et}=$;return $=>{var en,er;return null==$?void 0:null===(er=$.characterCustomizer)||void 0===er?void 0:null===(en=er.selectedOptions)||void 0===en?void 0:en[et]}}function selectAllSelectedOptions($){var et;return null==$?void 0:null===(et=$.characterCustomizer)||void 0===et?void 0:et.selectedOptions}function selectBackgroundOptions($){var et;return null==$?void 0:null===(et=$.characterCustomizer)||void 0===et?void 0:et.backgroundOptions}function selectCustomizerType($){var et;return null==$?void 0:null===(et=$.characterCustomizer)||void 0===et?void 0:et.customizerType}
1841let{setCharacterBackground:eh,resetBackground:ep,setSelectedOptionType:em,setSelectedOptionColor:ef,setSelectedOption:eg,setSelectedOutfitType:ey,resetSelectedOption:ev,resetAllSelectedOptions:ex,loadExistingAvatar:e_,randomizeAllSelectedOptions:ew,updateCustomizerType:ek}=ed.actions;et.ZP=ed.reducer},95986:function($,et,en){"use strict";en.d(et,{Au:function(){return es},Nj:function(){return selectPacksRefetch},Rm:function(){return el},Yd:function(){return selectChallengePackNavState},dl:function(){return ep},ol:function(){return eh},u3:function(){return selectCurrentPack}});var er=en(77236),ei=en(39828),eo=en(92369);let es=(0,er.hg)("codeChallenges/fetchChallenges",async($,et)=>{let{firestore:en}=(0,eo.UM)();try{var er;er=.2>Math.random()?await (0,ei.zN)((0,ei.hJ)(en,"codeChallengeNarratives")):await (0,ei.PL)((0,ei.hJ)(en,"codeChallengeNarratives"));let $={};for(let et of er.docs){let en=await (0,ei.PL)((0,ei.hJ)(et.ref,"challenges"));for(let er of en.docs){let en=et.data().name,ei=et.data().tags[0],eo=er.data();delete eo.createdAt,void 0==$["".concat(en,"-").concat(ei)]?$["".concat(en,"-").concat(ei)]={packMetadata:et.data(),challenges:[eo]}:$["".concat(en,"-").concat(ei)].challenges.push(eo)}}for(let et in $){let en=$[et].challenges;en.sort(($,et)=>$.order-et.order)}return $}catch($){return console.error($),{}}}),el=(0,er.hg)("codeChallenges/fetchPackMetadata",async($,et)=>{let{packName:en,language:er}=$,{firestore:es}=(0,eo.UM)();try{let $=(0,ei.hJ)(es,"codeChallengeNarratives"),et=await (0,ei.PL)((0,ei.IO)($,(0,ei.ar)("name","==",en))),eo=et.docs.filter($=>$.data().tags[0].toLowerCase()===er.toLowerCase())[0],el=[],eu=await (0,ei.PL)((0,ei.hJ)(eo.ref,"challenges"));for(let $ of eu.docs){let et=$.data();delete et.createdAt,el.push(et)}return el.sort(($,et)=>$.order-et.order),{packMetadata:eo.data(),challenges:el}}catch($){return console.error($),{packMetadta:{},challenges:[]}}}),eu=(0,er.oM)({name:"codeChallenges",initialState:{navState:"current",loading:!0,refetch:!1,showSignUpNotification:!1,packs:{},currentPack:{packMetadata:{},challenges:[]},filters:{python:!1,html:!1,javascript:!1}},reducers:{updateFilters:($,et)=>{$.filters[et.payload.checkboxName]=!$.filters[et.payload.checkboxName]},setSignUpNotification:($,et)=>{$.showSignUpNotification=et.payload},setChallengePackNavState:($,et)=>{$.navState=et.payload}},extraReducers:$=>{$.addCase(es.pending,$=>{$.loading=!0}),$.addCase(es.fulfilled,($,et)=>{$.packs=et.payload,$.loading=!1,$.refetch=!1}),$.addCase(es.rejected,($,et)=>{$.refetch=!0}),$.addCase(el.pending,$=>{$.loading=!0}),$.addCase(el.fulfilled,($,et)=>{$.loading=!1,$.currentPack=et.payload}),$.addCase(el.rejected,($,et)=>{$.refetch=!0})}});et.ZP=eu.reducer;let{updateFilters:ed,setSignUpNotification:eh,setChallengePackNavState:ep}=eu.actions;function selectChallengePackNavState($){return $.codeChallenges.navState}function selectPacksRefetch($){return $.codeChallenges.refetch}function selectCurrentPack($){return $.codeChallenges.currentPack}},81776:function($,et,en){"use strict";en.d(et,{Ax:function(){return selectEarnedBadgesCount},BC:function(){return ef},Bu:function(){return selectBadgesFetched},CU:function(){return selectFeedLoading},Cg:function(){return ep},DE:function(){return ew},Pv:function(){return selectScrollPosition},TW:function(){return ev},VF:function(){return selectFeedInitialDone},Wx:function(){return selectFeedPage},Yl:function(){return eh},Ze:function(){return selectBadgeById},a3:function(){return em},bq:function(){return selectFeedPosts},cE:function(){return selectPostHeight},hO:function(){return selectCommunityOnboardingComplete},hl:function(){return selectFeedFilter},hu:function(){return ey},hx:function(){return selectShowcaseBuild},kI:function(){return selectMonthlyChallengeBannerImage},kx:function(){return selectBadges},n0:function(){return eg},pb:function(){return eu},qm:function(){return ex},sW:function(){return e_},uI:function(){return ed},vi:function(){return selectEarnedBadges}});var er=en(77236),ei=en(6345),eo=en(22955);let es=(0,ei.XB)().filter($=>"community-onboarding"===$.group).map($=>
1841$.id),el=(0,er.oM)({name:"profilesSlice",initialState:{monthlyChallenge:{},showcaseBuild:{title:"",type:"",id:"",subdomainSlug:"",slugTitle:""},feed:{},postHeights:{},scrollPositions:{},badges:{badges:[],isLoading:!1,fetched:!1}},reducers:{setMonthlyChallengeBannerImage($,et){let{postId:en,image:er}=et.payload;$.monthlyChallenge[en]||($.monthlyChallenge[en]={}),$.monthlyChallenge[en].bannerImage=er},setShowcaseBuild($,et){$.showcaseBuild=et.payload},setFeedFilter($,et){let{community:en,filter:er}=et.payload;$.feed[en]||($.feed[en]={}),$.feed[en].currentFilter=er},setFeedPosts($,et){let{posts:en,community:er,filter:ei}=et.payload;$.feed[er]||($.feed[er]={}),$.feed[er][ei]||($.feed[er][ei]={posts:[],page:0});let eo=$.feed[er][ei].posts;$.feed[er][ei].posts=[...eo,...en],$.feed[er][ei].page+=1},setFeedLoading($,et){let{community:en,filter:er,isLoading:ei}=et.payload;$.feed[en]||($.feed[en]={}),$.feed[en][er]||($.feed[en][er]={posts:[],page:0}),$.feed[en][er].isLoading=ei},setFeedInitialDone($,et){let{community:en,filter:er}=et.payload;$.feed[en]||($.feed[en]={}),$.feed[en][er]||($.feed[en][er]={posts:[],page:0}),$.feed[en][er].initialFetchDone=!0},setPostHeight($,et){let{postId:en,height:er}=et.payload;en&&"number"==typeof er&&($.postHeights[en]=er)},setScrollPosition($,et){let{community:en,scrollY:er}=et.payload;en&&"number"==typeof er&&($.scrollPositions[en]=er)},setBadges($,et){$.badges.badges=et.payload,$.badges.isLoading=!1,$.badges.fetched=!0},setBadgesLoading($,et){$.badges.isLoading=et.payload},clearBadges($){$.badges={badges:[],isLoading:!1,fetched:!1}},upsertBadges($,et){let en=Array.isArray(et.payload)?et.payload:[et.payload];en.forEach(et=>{let en=$.badges.badges.findIndex($=>$.id===et.id);en>=0?$.badges.badges[en]={...$.badges.badges[en],...et}:$.badges.badges.push(et)})}}});function selectMonthlyChallengeBannerImage($){let{postId:et}=$;return $=>{var en,er;let ei=null==$?void 0:null===(en=$.community)||void 0===en?void 0:en.monthlyChallenge;return ei&&(null===(er=ei[et])||void 0===er?void 0:er.bannerImage)||null}}function selectShowcaseBuild(){return $=>{var et;return(null==$?void 0:null===(et=$.community)||void 0===et?void 0:et.showcaseBuild)||null}}function selectFeedFilter($){let{community:et}=$;return $=>{var en,er,ei;return(null==$?void 0:null===(ei=$.community)||void 0===ei?void 0:null===(er=ei.feed)||void 0===er?void 0:null===(en=er[et])||void 0===en?void 0:en.currentFilter)||("home"===et?"top-posts":"newest")}}function selectFeedPosts($){let{community:et}=$;return $=>{var en,er,ei,eo,es,el,eu;let ed=(null==$?void 0:null===(ei=$.community)||void 0===ei?void 0:null===(er=ei.feed)||void 0===er?void 0:null===(en=er[et])||void 0===en?void 0:en.currentFilter)||("home"===et?"top-posts":"newest");return(null==$?void 0:null===(eu=$.community)||void 0===eu?void 0:null===(el=eu.feed)||void 0===el?void 0:null===(es=el[et])||void 0===es?void 0:null===(eo=es[ed])||void 0===eo?void 0:eo.posts)||[]}}function selectFeedPage($){let{community:et}=$;return $=>{var en,er,ei,eo,es,el,eu;let ed=(null==$?void 0:null===(ei=$.community)||void 0===ei?void 0:null===(er=ei.feed)||void 0===er?void 0:null===(en=er[et])||void 0===en?void 0:en.currentFilter)||("home"===et?"top-posts":"newest");return(null==$?void 0:null===(eu=$.community)||void 0===eu?void 0:null===(el=eu.feed)||void 0===el?void 0:null===(es=el[et])||void 0===es?void 0:null===(eo=es[ed])||void 0===eo?void 0:eo.page)||1}}function selectFeedLoading($){let{community:et}=$;return $=>{var en,er,ei,eo,es,el,eu;let ed=(null==$?void 0:null===(ei=$.community)||void 0===ei?void 0:null===(er=ei.feed)||void 0===er?void 0:null===(en=er[et])||void 0===en?void 0:en.currentFilter)||("home"===et?"top-posts":"newest");return(null==$?void 0:null===(eu=$.community)||void 0===eu?void 0:null===(el=eu.feed)||void 0===el?void 0:null===(es=el[et])||void 0===es?void 0:null===(eo=es[ed])||void 0===eo?void 0:eo.isLoading)||!1}}function selectFeedInitialDone($){let{community:et}=$;return $=>{var en,er,ei,eo,es,el,eu;let ed=(null==$?void 0:null===(ei=$.community)||void 0===ei?void 0:null===(er=ei.feed)||void 0===er?void 0:null===(en=er[et])||void 0===en?void 0:en.currentFilter)||("home"===et?"top-posts":"newest");return(null==$?void 0:null===(eu=$.community)||void 0===eu?void 0:null===(el=eu.feed)||void 0===el?void 0:null===(es=el[et])||void 0===es?void 0:null===(eo=es[ed])||void 0===eo?void 0:eo.initialFetchDone)||!1}}function selectPostHeight($){let{postId:et}=$;return $=>{var en,er,ei;return null!==(ei=null==$?void 0:null===(er=$.community)||void 0===er?void 0:null===(en=er.postHeights)||void 0===en?void 0:en[et])&&void 0!==ei?ei:null}}function selectScrollPosition($){let{community:et}=$;return $=>{var en,er,ei;return null!==(ei=null==$?void 0:null===(er=$.community)||void 0===er?void 0:null===(en=er.scrollPositions)||void 0===en?void 0:en[et])&&void 0!==ei?ei:0}}function selectBadges(){return $=>{var et,en;return(null==$?void 0:null===(en=$.community)||void 0===en?void 0:null===(et=en.badges)||void 0===et?void 0:et.badges)||[]}}function selectBadgesFetched(){return $=>{var et,en;return(null==$?void 0:null===(en=$.community)||void 0===en?void 0:null===(et=en.badges)||void 0===et?void 0:et.fetched)||
1841!1}}function selectBadgeById($){let{id:et}=$;return $=>{var en,er;let ei=(null==$?void 0:null===(er=$.community)||void 0===er?void 0:null===(en=er.badges)||void 0===en?void 0:en.badges)||[];return ei.find($=>$.id===et)||null}}function selectCommunityOnboardingComplete(){return $=>{var et,en;let er=(null==$?void 0:null===(en=$.community)||void 0===en?void 0:null===(et=en.badges)||void 0===et?void 0:et.badges)||[],ei=new Set(er.map($=>$.id));return es.every($=>ei.has($))}}function getEarnedBadges($){var et,en;return(0,eo.Tm)((null==$?void 0:null===(en=$.community)||void 0===en?void 0:null===(et=en.badges)||void 0===et?void 0:et.badges)||[])}function selectEarnedBadges(){return $=>getEarnedBadges($)}function selectEarnedBadgesCount(){return $=>getEarnedBadges($).length}let{setMonthlyChallengeBannerImage:eu,setShowcaseBuild:ed,setFeedFilter:eh,setFeedPosts:ep,setFeedLoading:em,setFeedInitialDone:ef,setPostHeight:eg,setScrollPosition:ey,setBadges:ev,setBadgesLoading:ex,clearBadges:e_,upsertBadges:ew}=el.actions;et.ZP=el.reducer},29796:function($,et,en){"use strict";en.d(et,{AY:function(){return es},XX:function(){return ei},sk:function(){return selectNotificationCount}});var er=en(77236);let ei=(0,er.hg)("notificationCount/getUserPermissions",($,et)=>{let{user:en}=et.getState();if(en.isSignedIn){let $=en.user.stats.totalXp;if($>=100)return{status:!0}}return{status:!1}}),eo=(0,er.oM)({name:"notificationCount",initialState:{notificationCount:0,canUserPost:!1},reducers:{setNotificationCount($,et){$.notificationCount=et.payload}},extraReducers:$=>{$.addCase(ei.fulfilled,($,et)=>{$.canUserPost=et.payload.status})}});function selectNotificationCount($){return $.notification.notificationCount}let{setNotificationCount:es}=eo.actions;et.ZP=eo.reducer},40321:function($,et,en){"use strict";en.d(et,{AP:function(){return eI},BB:function(){return es},BP:function(){return ew},CJ:function(){return eP},EB:function(){return selectHistoryStates},Ec:function(){return ej},Fg:function(){return e_},Ft:function(){return el},Gs:function(){return selectLanguageDetails},H2:function(){return selectUserStreakEntry},Hm:function(){return selectShowWelcomeBack},JC:function(){return eD},Kh:function(){return selectSelectedLanguage},M7:function(){return selectTriesUsed},M9:function(){return selectLeaderboardRank},N4:function(){return selectUserStats},NR:function(){return selectUserLeaderboardEntry},Oe:function(){return selectWallClockSolveTimeSeconds},Qw:function(){return selectSolveTimeSeconds},RK:function(){return selectTestCases},Rt:function(){return selectCompletionModel},S:function(){return selectFirstViewedAt},TM:function(){return selectInternalTimeSpent},Ug:function(){return selectStreakEntries},VN:function(){return eN},Wj:function(){return selectCurrentChallenge},Wk:function(){return eO},ZZ:function(){return selectTimeSpent},aE:function(){return selectTerminalFilter},aJ:function(){return ev},ai:function(){return selectChallenge},cA:function(){return selectLastSubmitResults},cm:function(){return eR},dv:function(){return selectDayId},en:function(){return eV},fu:function(){return eE},fw:function(){return eS},g3:function(){return ex},gg:function(){return eC},hW:function(){return selectCode},h_:function(){return selectTriesRemaining},i7:function(){return selectCurrentCode},jy:function(){return selectTestProgress},kD:function(){return eh},mW:function(){return eA},n4:function(){return em},oM:function(){return selectWon},ob:function(){return eu},om:function(){return ep},pT:function(){return selectIsFetching},pc:function(){return selectChallengeOutcome},qX:function(){return selectUserAllTimeEntry},rC:function(){return selectLeaderboardEntries},rQ:function(){return selectIsSubmitting},uC:function(){return selectAllTimeEntries},vQ:function(){return eT},xU:function(){return selectIsLoading},xi:function(){return ed},yT:function(){return selectTimeSpentPerTry},zZ:function(){return ek},zh:function(){return selectError}});var er=en(77236);let ei={challenge:null,dayId:null,triesUsed:0,triesRemaining:5,won:!1,firstViewedAt:null,completedAt:null,solveTimeSeconds:null,wallClockSolveTimeSeconds:null,leaderboardRank:null,code:{},selectedLanguage:"python",languageDetails:{python:{displayName:"Python",internaleName:"python",fileName:["main.py"]},javascript:{displayName:"JavaScript",internaleName:"javascript",fileName:["index.js"]}},terminalFilter:"terminal",runOutput:null,runError:null,lastRunTimeMs:null,lastSubmitResults:null,testProgress:[],testCases:[],leaderboardType:"daily",leaderboardEntries:[],allTimeEntries:[],streakEntries:[],userLeaderboardEntry:null,userAllTimeEntry:null,userStreakEntry:null,leaderboardTotalEntries:0,userStats:null,ui:{isLoading:!1,isRunning:!1,isSubmitting:!1,error:null,isFetching:!0},timeSpent:0,timeSpentPerTry:0,internalTimeSpentForGlobal:0,completionModel:null,historyStates:[]},eo=(0,er.oM)({name:"dailyChallenge",initialState:ei,reducers:{setChallengeLoading($,et){$.ui.isLoading=et.payload,et.payload&&($.ui.error=null)},setChallenge($,et){$.challenge=et.payload,$.dayId=et.payload.dayId,0===Object.keys($.code).length&&($.code={...et.payload.starterCode}),$.ui.isLoading=!1},setChallengeError($,et){$.ui.error=et.payload,$.ui.isLoading=!1},setUserDayState($,et){if($.triesUsed=et.payload.triesUsed,$.triesRemaining=5-et.payload.triesUsed,$.won=et.payload.won,$.firstViewedAt=et.payload.firstViewedAt,$.timeSpent=et.payload.timeSpent||0,$.wallClockSolveTimeSeconds=et.payload.wallClockSolveTimeSeconds||0,$.dayId){let en=$.historyStates.findIndex(et=>et.dayId===$.dayId),er={triesUsed:et.payload.triesUsed,won:et.payload.won,first
1841ViewedAt:et.payload.firstViewedAt};-1!==en?$.historyStates[en]={...$.historyStates[en],...er}:$.historyStates.push({dayId:$.dayId,resume:!0,...er})}},setSelectedLanguage($,et){$.selectedLanguage=et.payload},updateCode($,et){$.code[et.payload.language]=et.payload.code},setRunning($,et){$.ui.isRunning=et.payload,et.payload&&($.runOutput=null,$.runError=null)},setRunResult($,et){$.runOutput=et.payload.output,$.runError=et.payload.error||null,$.lastRunTimeMs=et.payload.executionTimeMs,$.ui.isRunning=!1},setRunError($,et){$.runError=et.payload,$.ui.isRunning=!1},setTerminalFilter($,et){$.terminalFilter=et.payload},setSubmitting($,et){$.ui.isSubmitting=et.payload,et.payload&&($.challenge&&($.testProgress=$.challenge.visibleTestCases.map($=>({testId:$.id,status:"pending"}))),$.lastSubmitResults=null,$.testCases=$.testCases.map($=>({...$,passed:void 0,output:void 0})))},updateTestProgress($,et){let{testId:en,status:er,message:ei}=et.payload,eo=$.testProgress.findIndex($=>$.testId===en);if(-1!==eo&&($.testProgress[eo]={testId:en,status:er,message:ei}),"passed"===er||"failed"===er){let{output:ei}=et.payload,eo=$.testCases.findIndex($=>$.id===en);-1!==eo&&($.testCases[eo]={...$.testCases[eo],passed:"passed"===er,output:null!=ei?ei:$.testCases[eo].output})}},setTestCases($,et){$.testCases=et.payload},setAnonSubmitResult($,et){let{triesUsed:en,won:er,testArray:ei}=et.payload;$.triesUsed=en,$.triesRemaining=Math.max(0,5-en),$.won=er,$.timeSpentPerTry=0;let eo=$.historyStates.findIndex(et=>et.dayId===$.dayId);if(-1!==eo){var es;let et=$.historyStates[eo],en=null!==(es=et.testResultsByTry)&&void 0!==es?es:[];$.historyStates[eo]={...et,triesUsed:$.triesUsed,won:$.won,testResultsByTry:[...en,...ei]}}else $.dayId&&$.historyStates.push({dayId:$.dayId,resume:!0,triesUsed:$.triesUsed,won:$.won,testResultsByTry:ei})},setSubmitResult($,et){var en,er;let ei=et.payload,eo=0===ei.attemptNumber;if($.lastSubmitResults=ei.results,$.ui.isSubmitting=!1,$.testProgress=ei.results.map($=>({testId:$.testId,status:$.passed?"passed":"failed",message:$.error})),$.testCases=$.testCases.map($=>{let et=ei.results.find(et=>et.testId===$.id);return et?{...$,passed:et.passed,output:et.output}:$}),eo)return;$.triesUsed=ei.attemptNumber,$.triesRemaining=ei.triesRemaining,$.won=ei.won,$.timeSpentPerTry=0,ei.won&&($.solveTimeSeconds=ei.solveTimeSeconds||null,$.leaderboardRank=ei.leaderboardRank||null,$.completedAt=new Date().toISOString(),$.wallClockSolveTimeSeconds=ei.wallClockSolveTimeSeconds||null);let es=null!==(en=ei.testArray)&&void 0!==en?en:[{["results-".concat(ei.attemptNumber)]:ei.results.map($=>$.passed)}],el=$.historyStates.findIndex(et=>et.dayId===$.dayId);if(-1!==el){let et=$.historyStates[el],en=null!==(er=et.testResultsByTry)&&void 0!==er?er:[];$.historyStates[el]={...et,triesUsed:$.triesUsed,won:$.won,testResultsByTry:[...en,...es]}}else $.dayId&&$.historyStates.push({dayId:$.dayId,resume:!0,triesUsed:$.triesUsed,won:$.won,testResultsByTry:es})},setSubmitError($,et){$.ui.error=et.payload,$.ui.isSubmitting=!1,$.testProgress=[]},setLeaderboard($,et){let en=et.payload;$.leaderboardType=en.type,$.leaderboardTotalEntries=en.totalEntries,"daily"===en.type?($.leaderboardEntries=en.entr
1841ies,$.userLeaderboardEntry=en.userEntry||null):"allTime"===en.type?($.allTimeEntries=en.entries,$.userAllTimeEntry=en.userEntry||null):"streak"===en.type&&($.streakEntries=en.entries,$.userStreakEntry=en.userEntry||null)},setUserStats($,et){$.userStats=et.payload},resetChallenge:$=>({...ei,selectedLanguage:$.selectedLanguage}),clearError($){$.ui.error=null},setTimeSpent($,et){let en=et.payload-$.timeSpent;$.timeSpent=et.payload,$.timeSpentPerTry=$.timeSpentPerTry+1,$.internalTimeSpentForGlobal=$.internalTimeSpentForGlobal+Math.max(0,en)},resetInternalTimeSpent($){$.internalTimeSpentForGlobal=0},setCompletionModel($,et){$.completionModel=et.payload},setHistoryState($,et){let en=et.payload.map($=>({...$,resume:!1})),er=[...$.historyStates];for(let $ of en){let et=er.findIndex(et=>et.dayId===$.dayId);-1!==et?er[et]={...$,...er[et]}:er.push($)}$.historyStates=er},setCurrentChallenge($,et){let en=et.payload,er=$.historyStates;if(0===er.length)return;let ei=er.find($=>$.dayId===en);ei&&($.dayId=ei.dayId,$.triesUsed=ei.triesUsed||0,$.triesRemaining=5-(ei.triesUsed||0),$.won=ei.won||!1,$.firstViewedAt=ei.firstViewedAt,$.completedAt=ei.completedAt||null,$.solveTimeSeconds=ei.solveTimeSeconds||null,$.leaderboardRank=ei.leaderboardRank||null,ei.code&&($.code={...$.code,...ei.code}))},setIsFetching($,et){$.ui.isFetching=et.payload},setResumed($){let et=$.dayId;$.historyStates=$.historyStates.map($=>$.dayId===et?{...$,resume:!0}:$)},setRestoredCode($,et){let{code:en,language:er}=et.payload;$.code[er]=en,$.selectedLanguage=er}}}),{setIsFetching:es,setChallengeLoading:el,setChallenge:eu,setChallengeError:ed,setUserDayState:eh,setSelectedLanguage:ep,updateCode:em,setRunning:ef,setRunResult:eg,setRunError:ey,setSubmitting:ev,updateTestProgress:ex,setSubmitResult:e_,setAnonSubmitResult:ew,setSubmitError:ek,setLeaderboard:eC,setUserStats:eE,resetChallenge:eI,clearError:eS,setTerminalFilter:eT,setTestCases:eA,setTimeSpent:eP,setCompletionModel:eN,setHistoryState:ej,setCurrentChallenge:eR,setResumed:eV,resetInternalTimeSpent:eD,setRestoredCode:eO}=eo.actions;function selectChallenge($){return $.dailyChallenge.challenge}function selectDayId($){return $.dailyChallenge.dayId}function selectTriesUsed($){return $.dailyChallenge.triesUsed}function selectTriesRemaining($){return $.dailyChallenge.triesRemaining}function selectWon($){return $.dailyChallenge.won}function selectSelectedLanguage($){return $.dailyChallenge.selectedLanguage}function selectLanguageDetails($){return $.dailyChallenge.languageDetails}function selectCode($){return $.dailyChallenge.code}function selectCurrentCode($){return $.dailyChallenge.code[$.dailyChallenge.selectedLanguage]||""}let selectTestProgress=$=>$.dailyChallenge.testProgress;function selectLastSubmitResults($){return $.dailyChallenge.lastSubmitResults}function selectLeaderboardEntries($){return $.dailyChallenge.leaderboardEntries}function selectUserLeaderboardEntry($){return $.dailyChallenge.userLeaderboardEntry}function selectAllTimeEntries($){return $.dailyChallenge.allTimeEntries}function selectStreakEntries($){return $.dailyChallenge.streakEntries}function selectUserAllTimeEntry($){return $.dailyChallenge.userAllTimeEntry}function selectUserStreakEntry($){return $.dailyChallenge.userStreakEntry}function selectUserStats($){return $.dailyChallenge.userStats}function selectIsLoading($){return $.dailyChallenge.ui.isLoading}function selectIsSubmitting($){return $.dailyChallenge.ui.isSubmitting}function selectError($){return $.dailyChallenge.ui.error}function selectSolveTimeSeconds($){return $.dailyChallenge.solveTimeSeconds}function selectFirstViewedAt($){return $.dailyChallenge.firstViewedAt}function selectWallClockSolveTimeSeconds($){return $.dailyChallenge.wallClockSolveTimeSeconds}function selectLeaderboardRank($){return $.dailyChallenge.leaderboardRank}function selectTerminalFilter($){return $.dailyChallenge.terminalFilter}function selectTestCases($){return $.dailyChallenge.testCases}function selectTimeSpent($){return $.dailyChallenge.timeSpent}function selectTimeSpentPerTry($){return $.dailyChallenge.timeSpentPerTry}function selectInternalTimeSpent($){return $.dailyChallenge.internalTimeSpentForGlobal}function selectCompletionModel($){return $.dailyChallenge.completionModel}function selectHistoryStates($){return $.dailyChallenge.historyStates}function selectChallengeOutcome($){let{won:et,triesUsed:en}=$.dailyChallenge;return et?"won":en>=5?"failed":"undetermined"}function selectIsFetching($){return $.dailyChallenge.ui.isFetching}function selectShowWelcomeBack($){let et=$.dailyChallenge.ui.isFetching,en=$.dailyChallenge.dayId,er=$.dailyChallenge.historyStates;if(et||!en)return!1;let ei=selectChallengeOutcome($);if("won"===ei||"failed"===ei)return!1;let eo=er.find($=>$.dayId===en);return(null==eo?void 0:eo.resume)===!1}function selectCurrentChallenge($){var et;let{dayId:en,historyStates:er}=$.dailyChallenge;return en&&null!==(et=er.find($=>$.dayId===en))&&void 0!==et?et:null}et.ZP=eo.reducer},52069:function($,et,en){"use strict";en.d(et,{$K:function(){return eo},In:function(){return eu},M7:function(){return es},SG:function(){return selectBuildsDomainSlug},X$:function(){return selectConnectionStatus},bl:function(){return el},he:function(){return selectBuildsTitle},ok:function(){return eh},us:function(){return ed},vf:function(){return selectHasRan}});var er=en(77236);let ei=(0,er.oM)({name:"editorSlice",initialState:{hasRan:!1,tokenStatus:"idle",connectionStatus:"disconnected",executionStatus:"idle",buildsDomainSlug:"",buildsTitle:""},reducers:{setHasRan($,et){$.hasRan=et.payload},setTokenStatus($,et){$.tokenStatus=et.payload},setConnectionStatus($,et){$.connectionStatus=et.payload},setExecutionStatus($,et){$.executionStatus=et.payload},setBuildsDomainSlug($,et){$.buildsDomainSlug=et.payload},setBuildsTitle($,et){$.buildsTitle=et.payload}}});function selectHasRan($){var et;return null==$?void 0:null===(et=$.editor)||void 0===et?void 0:et.hasRan}function selectConnectionStatus($){var et;return null==$?void 0:null===(et=$.editor)||void 0===et?void 0:et.connectionStatus}function selectBuildsDomainSlug($){var et;return null==$?void 0:null===(et=$.editor)||void 0===et?void 0:et.buildsDomainSlug}function selectBuildsTitle($){var et;return null==$?void 0:null===(et=$.editor)||void 0===et?void 0:et.buildsTitle}let{setHasRan:eo,setTokenStatus:es,setConnectionStatus:el,setExecutionStatus:eu,setBu
1841ildsDomainSlug:ed,setBuildsTitle:eh}=ei.actions;et.ZP=ei.reducer},38467:function($,et,en){"use strict";en.d(et,{$P:function(){return eu},A0:function(){return selectCurrentErrorValue},Ee:function(){return el},X7:function(){return selectCurrentClassStudents},Zv:function(){return ed},hO:function(){return selectSchoolNameAndLocation}});var er=en(77236),ei=en(28858),eo=en(23914),es=en(92369);let el=(0,er.hg)("educator/addStudentToClass",async($,et)=>{let{studentEmail:en}=$,{getState:er}=et,{functions:ei}=(0,es.UM)(),{schoolName:el,currentClassId:eu,schoolId:ed}=er().educator,{email:eh}=er().user,ep=(0,eo.V1)(ei,"addStudentToClass"),{data:em}=await ep({studentEmail:en,educatorEmail:eh,classId:eu,schoolName:el,schoolId:ed});if("error"===em.data)return"user-not-found"===em.type?et.rejectWithValue("Student not found."):"student-already-in-class"===em.type?et.rejectWithValue("Student already in class. "):et.rejectWithValue(em.error);if("success"==em.data){let $=(0,eo.V1)(ei,"fetchStudentsForAClass"),{data:{students:et}}=await $({educatorEmail:eh,schoolName:el,classId:eu,schoolId:ed});return{students:et}}}),eu=(0,er.hg)("educator/removeStudentFromClass",async($,et)=>{let{studentEmail:en}=$,{getState:er}=et,{functions:ei}=(0,es.UM)(),{schoolName:el,currentClassId:eu,schoolId:ed}=er().educator,{email:eh}=er().user,ep=(0,eo.V1)(ei,"removeStudentFromClass"),{data:em}=await ep({studentEmail:en,educatorEmail:eh,classId:eu,schoolName:el,schoolId:ed});if("error"===em.data)return"user-not-found"===em.type?et.rejectWithValue("Student not found."):"student-not-in-class"===em.type?et.rejectWithValue("Student not in class."):et.rejectWithValue(em.data);if("success"===em.data){let $=(0,eo.V1)(ei,"fetchStudentsForAClass"),{data:{students:et}}=await $({educatorEmail:eh,schoolName:el,classId:eu,schoolId:ed});return{students:et}}}),ed=(0,er.hg)("educator/updateNameLocation",async($,et)=>{let{schoolName:en,schoolLocation:er}=$;try{let{getState:$}=et,{schoolId:ei}=$().educator;console.log(ei),console.log(en),console.log(er);let eo=await fetch("/api/school/name-loc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({schoolId:ei,schoolName:en,schoolLocation:er})}),es=await eo.json();if(console.log(es),eo.ok)return{schoolName:en,schoolLocation:er};return et.rejectWithValue("Error updating school name and location.")}catch($){return console.log($),et.rejectWithValue($.message)}}),eh=(0,er.oM)({name:"educator",initialState:{loadingEducator:!0,loadingSchool:!0,loadingClasses:!0,loadingNewClass:!0,loadingNewStudent:!1,loadingCurrentClass:!0,error:null,errorValue:null,isEducator:!1,educatorType:null,educator:null,schoolName:null,schoolLocation:null,educators:[],classes:[],students:[],currentClassId:null,schoolId:null},reducers:{setCurrentSchool($,et){$.schoolName=et.payload.school.schoolName,$.schoolLocation=et.payload.school.schoolLocation,$.schoolId=et.payload.school.schoolId},setCurrentClassStudents($,et){$.currentClassId=et.payload.classId,$.students=et.payload.students},clearErrorValue($){$.errorValue=null}},extraReducers:$=>{$.addCase(ei.ju,($,et)=>({...$,...et.payload.educator})),$.addCase(el.pending,($,et)=>{$.loadingNewStudent=!0}),$.addCase(el.fulfilled,($,et)=>{$.loadingNewStudent=!1,$.students=et.payload.students}),$.addCase(el.rejected,($,et)=>{$.loadingNewStudent=!1,$.error=et.payload,$.errorValue=et.payload}),$.addCase(eu.pending,($,et)=>{$.loadingNewStudent=!0}),$.addCase(eu.fulfilled,($,et)=>{$.loadingNewStudent=!1,$.students=et.payload.students}),$.addCase(eu.rejected,($,et)=>{$.loadingNewStudent=!1,$.error=et.payload,$.errorValue=et.payload}),$.addCase(ed.pending,($,et)=>{$.loadingSchool=!0}),$.addCase(ed.fulfilled,($,et)=>{$.loadingSchool=!1,$.schoolName=et.payload.schoolName,$.schoolLocation=et.payload.schoolLocation})}}),{setCurrentClassStudents:ep,setCurrentSchool:em,clearErrorValue:ef}=eh.actions;function selectSchoolNameAndLocation($){return{schoolName:$.educator.schoolName,schoolLocation:$.educator.schoolLocation}}function selectCurrentClassStudents($){return $.educator.students}function selectCurrentErrorValue($){return $.educator.errorValue}et.ZP=eh.reducer},85673:function($,et,en){"use strict";en.d(et,{BZ:function(){return selectToasts},Cq:function(){return selectRouteHistory},Eo:function(){return selectEditorRanStatus},GV:function(){return ex},NS:function(){return selectCourseProjectStatus},QA:function(){return selectSuggestedUser},RS:function(){return ey},UX:function(){return ev},aB:function(){return selectTierInfo},aU:function(){return eC},cF:function(){return em},cM:function(){return selectCodedexSocials},f2:function(){return selectOverlayNotifications},fz:function(){return eg},l_:function(){return ek},lm:function(){return ew},uA:function(){return selectBuildThemes},um:function(){return e_}});var er=en(77236);let ei=(()=>{try{return window.localStorage}catch($){return null}})(),eo=(0,er.hg)("global/get-editor-token",async function($,et){try{let $=await fetch("/api/fetchEditorToken");
1841if(429===$.status)return console.log("Too many requests, try again later"),et.rejectWithValue({status:429,message:"Too many requests, try again later"});if(401===$.status)return console.log("Unauthorized"),et.rejectWithValue({status:401,message:"Unauthorized"});if(500===$.status)return console.log("Internal Server Error"),et.rejectWithValue({status:500,message:"Internal Server Error. If the problem persists after a refreshing the page, kindly contact us at [email protected]"});let en=await $.json(),er=en.token;return er}catch($){return console.error($),et.rejectWithValue("Internal Server Error. If the problem persists after a refreshing the page, kindly contact [email protected]")}}),es={toasts:[],overlayNotifications:[],colorMode:"light",editorToken:"",continueFetchingEditorToken:!1,editorResponseMessage:"",triesLeft:null,fetchResponseStatusCode:null,allowCodeExecution:!1,suggestedUsers:[],courseProjectsStatus:{},editorRan:!1,routeHistory:ei&&ei.getItem("routeHistory")?JSON.parse(ei.getItem("routeHistory")||"[]"):[],isCheckingOut:!1,codedexSocials:[{name:"instagram",link:"https://www.instagram.com/codedex.io"},{name:"twitter",link:"https://twitter.com/codedex_io"},{name:"github",link:"https://github.com/codedex-io"},{name:"youtube",link:"https://www.youtube.com/@codedex"},{name:"linkedin",link:"https://www.linkedin.com/company/codedex"},{name:"tiktok",link:"https://www.tiktok.com/@codedex.io",img:!0}],tierInfo:[{tierType:"Free",benefits:[["Early Chapters",!0,"Get access to early chapters of our courses."],["Projects",!0,"Choose from a catalog of real-world projects."],["Community",!0,"Connect with fellow coders in a Discord community."],["Weekly Events",!0,"Join weekly events such as Office Hours, Show & Tells, Game Nites, Watch Parties, and more."],["Project Reviews",!1],["Unlimited AI",!1,"Unlimited access to our Cod\xe9dex AI Bot."],["Certificates",!1],["Forever Access",!1,"Get access to all future courses and updates."]]},{tierType:"Club",benefits:[["Full Courses",!0,"Unlock complete courses such as âThe Legend of Pythonâ."],["Projects",!0,"Choose from a catalog of real-world projects."],["Community",!0,"Connect with fellow coders in a Discord community and level up together."],["Exclusive Events",!0,"Join exclusive events such as LinkedIn Profile & Resume Reviews, Technical Workshops and more."],["Code Mentors",!0,"Get live help from senior devs 24/7 with any coding questions."],["Project Reviews",!0,"Have your checkpoint and final projects reviewed by human experts."],["Unlimited AI",!0,"Unlimited access to our Cod\xe9dex AI Bot."],["Certificates",!0,"Earn certificates for completing courses."]]},{tierType:"4 Life",benefits:[["Lifetime Access",!0,"Get access to all future courses and updates."],["Support The Team",!0,"Be a part of the Cod\xe9dex journey."],["Rare Badge",!0,"Get a special Club 4 Life badge on your User Profile."]]}],buildThemes:{python:{backgroundColor:"#2ea1ff",backgroundImage:"/images/editor/python-grid.svg",logo:"/images/editor/python-logo.png",imageSize:175,title:"Python workspace",internalName:"Python",liveSite:!1},"html-css":{backgroundColor:"#ff7740",backgroundImage:"/images/editor/html-grid.svg",logo:"/images/editor/html-logo.png",imageSize:175,title:"Web dev workspace",internalName:"HTML/CSS/JS",liveSite:!0},"html-css-js":{backgroundColor:"#ff7740",backgroundImage:"/images/editor/html-grid.svg",logo:"/images/editor/html-logo.png",imageSize:175,title:"Web dev workspace",internalName:"HTML/CSS/JS",liveSite:!0},javascript:{backgroundColor:"#f7d524",backgroundImage:"/images/editor/js-grid.svg",logo:"/images/editor/javascript-logo.png",imageSize:175,title:"JavaScript workspace",internalName:"JavaScript",liveSite:!1},cpp:{backgroundColor:"#15ACFF",backgroundImage:"/images/editor/cpp-grid.svg",logo:"/images/courses/cpp-logo.svg",imageSize:200,title:"C++ workspace",internalName:"cpp",liveSite:!1},react:{backgroundColor:"#15ACFF",backgroundImage:"/images/editor/react-icon-grid.svg",logo:"/images/editor/react-icon.webp",imageSize:200,title:"React workspace",internalName:"React",liveSite:!1},java:{backgroundColor:"#f7d524",backgroundImage:"/images/editor/java-grid.svg",logo:"/images/java/java_logo.png",imageSize:200,title:"Java workspace",internalName:"Java",liveSite:!1},csharp:{backgroundColor:"#f7d524",backgroundImage:"/images/editor/java-grid.svg",logo:"/images/courses/csharp-logo.svg",imageSize:200,title:"C# workspace",internalName:"C#",liveSite:!1}}},el=(0,er.oM)({name:"global",initialState:es,reducers:{addToast($,et){$.toasts.push({id:Date.now(),message:et.payload.message,type:et.payload.type||"info",linkHref:et.payload.linkHref,linkLabel:et.payload.linkLabel,timeout:et.payload.timeout||3e3})},removeToast($,et){$.toasts=$.toasts.filter($=>$.id!==et.payload)},addOverlayNotification($,et){var en;$.overlayNotifications=$.overlayNotifications.filter($=>{var en,er;return $.type!==et.payload.type||"badge"===et.payload.type&&($.badgeType!==et.payload.badgeType||(null!==(en=$.level)&&void 0!==en?en:null)!==(null!==(er=et.payload.level)&&void 0!==er?er:null))}),$.overlayNotifications.push({id:Math.random().toString(36).substring(2,15),message:et.payload.message||"",type:et.payload.type||"info",header:et.payload.header||"",xp:et.payload.xp||0,persist:et.payload.persist||!1,timeout:et.payload.timeout||3e3,badgeType:et.payload.badgeType||"",level:null!==(en=et.payload.level)&&void 0!==en?en:null,info:et.payload.info||{challengeName:"",chapterName:"",courseName:"",xp:0}})},removeOverlayNotification($,et){$.overlayNotifications=$.overlayNotifications.filter($=>$.id!==et.payload)},removeAllOverlayNotification($){$.overlayNotifications=[]},toggleColorMode($,et){"light"===et.payload.colorMode?$.colorMode="light":$.colorMode="dark"},enableFetchingEditorToken($){$.continueFetchingEditorToken=!0},disableFetchingEditorToken($){$.continueFetchingEditorToken=!1},resetTokenFetchResponseCode($){$.fetchResponseStatusCode=null},addRouteToHistory($,et){if($.routeHistory.at(-1)!==et.payload){$.routeHistory.push(et.payload);let en=JSON.parse(ei.getItem("routeHistory")||"[]");en.push(et.payload),ei.setItem("routeHistory",JSON.stringify(en))}},removeRouteFromHistory($,et){let en=$.routeHistory.length;if(en>0){let et=JSON.parse(ei.getItem("routeHistory")||"[]");et.splice(en-1,1),ei.setItem("routeHistory",JSON.stringify(et)),$.routeHistory=et}else ei.setItem("routeHistory",JSON.stringify([]))},setIsCheckingOut($,et){$.isCheckingOut=et.payload},updateSuggestedUsers($,et){$.suggestedUsers=et.payload},updateCourseProjectsStatus($,et){let en=et.payload,er=$.courseProjectsStatus;er[en.internalCourseName]=en.data,$.courseProjectsStatus=er},updateEditorRanStatus($,et){$.editorRan=et.payload}},extraReducers:$=>{$.addCase(eo.fulfilled,($,et)=>{$.editorToken=et.payload,$.continueFetchingEditorToken=!0,$.allowCodeExecution=!0}),$.addCase(eo.rejected,($,et)=>{$.editorResponseMessage=et.payload.message,$.fetchResponseStatusCode=et.payload.status,$.allowCodeExecution=!1})}}),{toggleColorMode:eu,enableFetchingEditorToken:ed,disableFetchingEditorToken:eh,resetTokenFetchResponseCode:ep,addRouteToHistory:em,removeRouteFromHistory:ef,addToast:eg,removeToast:ey,addOverlayNotification:ev,removeOverlayNotification:ex,removeAllOverlayNotification:e_,updateSuggestedUsers:ew,updateCourseProjectsStatus:ek,updateEditorRanStatus:eC}=el.actions;function selectRouteHistory($){return $.global.routeHistory}function selectCodedexSocials($){return $.global.codedexSocials}function selectBuildThemes($){return $.global.buildThemes}function selectTierInfo($){let{index:et}=$;return $=>$.global.tierInfo[et]}function selectToasts($){return $.global.toasts}function selectOverlayNotifications($){return $.global.overlayNotifications}function selectSuggestedUser($){return $.global.suggestedUsers}function selectCourseProjectStatus($){let{internalCourseName:et}=$;return $=>{let en=$.global.courseProjectsStatus;return en[et]}}function selectEditorRanStatus($){return $.global.editorRan}et.ZP=el.reducer},88090:function($,et,en){"use strict";en.d(et,{Hq:function(){return eh},ZP:function(){return eC},TN:function(){return getLinkByChallenge},E3:function(){return ed},S4:function(){return ex},hI:function(){return eg},i1:function(){return ef},dh:function(){return selectAllCourseDetails},Jv:function(){return selectAllCourseNames},q9:function(){return selectAllCourseProgress},HZ:function(){return selectAllCoursesCompletedBadge},B8:function(){return selectAllCoursesData},ez:function(){return selectBadgeCardInfo},tL:function(){return selectBadgeList},T5:function(){return selectBadgeNames},Ib:function(){return selectChallengePackNextLinks},Of:function(){return selectChapterMusic},N:function(){return selectChapterXp},W_:function(){return selectCheatSheets},aA:function(){return selectCheckpointProjects},pN:function(){return selectCourseAuthors},NJ:function(){return selectCourseBaseLink},$y:function(){return selectCourseBonusArticles},_9:function(){return selectCourseCatalogName},a$:function(){return selectCourseCatalogNameUsingBaseUrl},Sb:function(){return selectCourseChallengePack},DF:function(){return selectCourseChapterData},_H:function(){return selectCourseChapterInterstitials},DK:function(){return selectCourseCompleteBadge},nf:function(){return selectCourseData},yw:function(){return selectCourseLinks},EH:function(){return selectCourseNumberOfChapters},EZ:function(){return selectCoursePrerequisites},W5:function(){return selectCourseSearchDetails},tp:function(){return selectCourseTags},be:function(){return selectCourseTimeToComplete},eC:function(){return selectCourseTotalExercises},EX:function(){return selectCourseTotalXp},I6:function(){return selectCurrentCourseChapter},R1:function(){return selectCutsceneAudioCurrentTime},P5:function(){return selectCutsceneAudioIsPlaying},uS:function(){return selectCutsceneAudioSrc}
1841,pE:function(){return selectFindBonusandChaptersData},e$:function(){return selectFindCheckpointandChaptersData},E0:function(){return selectIsCutsceneAudioMute},Hl:function(){return selectLastCourseExerciseLink},WT:function(){return selectNextChapterInterstitialInfo},Tl:function(){return selectNumProjectsToComplete},XU:function(){return selectPopupState},W2:function(){return selectPrevNextChallengeLinks},Gm:function(){return selectSingleCourseDetails},AW:function(){return selectUserCourseHistory},gK:function(){return em},Ss:function(){return e_},bT:function(){return ev},Oh:function(){return ek}});var er=en(77236),ei=en(78256);let eo={name:"cpp",courseUrl:"/cpp",title:"C++",badges:["hello-world","variables","conditionals","loops","vectors","functions","classes-and-objects","pointers-and-references"],catalogName:"C++",description:"Learn C++ and master object-oriented programming and data structures!",searchQuery:"cpp, c++, c plus plus, programming, coding, object-oriented programming, oop",community:{available:!1,link:"/community/"},shareButton:{"05-sign-bunny":"https://twitter.com/intent/tweet?text=Sign+Bunny+\uD83D\uDC30&hashtags=CodedexSignBunny+@codedex_io","12-cat-years":"https://twitter.com/intent/tweet?text=Cat+Years+\uD83D\uDC31&hashtags=CodedexCatYears+@codedex_io"},links:["/cpp","01-the-program","02-howdy","03-see-ya-later-alligator","04-ouija-board","05-sign-bunny","06-data-types","07-declaration-of-independence","08-ipo","09-temperature","10-knighthood","11-mom","12-cat-years","13-coin-flip","14-fever","15-levels-and-ranks","16-fortune-cookie","17-voting","18-trivia-quiz","19-enter-pin","20-guess-the-number","21-counting-sheep","22-99-bottles","23-fizz-buzz","24-survival-gear","25-lemonade-stand","26-order-cart","27-roadtrip-playlist","28-sum-of-even-product-of-odd","29-dry","30-food-menu","31-ooo","32-conversion","33-tips-calculator","34-restaurants","35-peter-luger-steak-house","36-old-money-new-money","37-bank-accounts","38-classic-cars","39-pet-rescue","40-memories","41-a-few-pointers","42-dereference","43-nullptr","44-celebrity-names","45-healing-potion","46-the-end"],courseCompleteBadge:{name:"C++ badge",imgSrc:"/images/badges/goldenCourseBadges/cpp.png"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:[],bannerImageLink:"/images/html-header.png",newCourse:!1,tags:["cpp","beginner","computer-science"],chapters:[{chapterIndex:0,chapterName:"Hello World",chapterDescription:"Learn how to write your first line of C++ by outputting messages to the terminal.",challenges:["The Program","Howdy","See Ya Later Alligator","Ouija Board","Sign Bunny"],titleImage:"",signUpPopups:["the-program","see-ya-later-alligator"],isComplete:!0,isClub:!1,xP:[10,10,10,15,15],internalChapterName:"hello-world",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/cpp.png",articleLink:"/cpp/bonus/compile-execute",description:"Compile & Execute",internalName:"compile-execute"}],internalChallengeNames:["the-program","howdy","see-ya-later-alligator","ouija-board","sign-bunny"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Variables",chapterDescription:"Create variables and learn about data types, arithmetic operators, and user input.",challenges:["Data Types","Declaration of Independence","IPO","Temperature","Knighthood","MoM","Cat Years"],titleImage:"",signUpPopups:["data-types","ipo"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,15,15],internalChapterName:"variables",internalChallengeNames:["data-types","declaration-of-independence","ipo","temperature","knighthood","mom","cat-years"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Conditionals",chapterDescription:"Use logical operators to control the order of program execution.",challenges:["Coin Flip","Fever","Levels and Ranks","Fortune Cookie","Voting","Trivia Quiz"],titleImage:"",signUpPopups:["coin-flip","levels-and-ranks"],isComplete:!0,isClub:!0,xP:[10,15,15,15,15,20],internalChapterName:"conditionals",internalChallengeNames:["coin-flip","fever","levels-and-ranks","fortune-cookie","voting","trivia-quiz"],badgeImage:"/images/badges/earth_badge.png",type:""}
1841,{chapterIndex:3,chapterName:"Loops",chapterDescription:"Repeat a block of code with while loops and for loops over, and over, and over again.",challenges:["Enter PIN","Guess the Number","Counting Sheep","99 Bottles","Fizz Buzz"],titleImage:"",signUpPopups:["enter-pin","counting-sheep"],isComplete:!0,isClub:!0,xP:[10,15,15,15,20],internalChapterName:"loops",internalChallengeNames:["enter-pin","guess-the-number","counting-sheep","99-bottles","fizz-buzz"],cheatSheets:[ei.S.cpp[0]],badgeImage:"/images/badges/earth_badge.png",type:""},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,challenges:["Area Calculator","Rock Paper Scissors","Terminal Adventure"],chapterDescription:"Practice your C++ chops with a checkpoint project! Choose from one of three projects and submit your code when you're done. Your project is reviewed by a mentor when you request a course certificate.",internalChallengeNames:["password-checker","simple-calculator","terminal-adventure-game"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"password-checker",emoji:"\uD83D\uDD10",backgroundColor:"#CC9400",text:"Password Checker"},{dataAosDuration:"1100",dataAos:"fade-up",link:"simple-calculator",emoji:"\uD83E\uDDEE",backgroundColor:"#7188DB",text:"Simple Calculator"},{dataAosDuration:"1350",dataAos:"fade-up",link:"terminal-adventure-game",emoji:"\uD83D\uDDA5ï¸",backgroundColor:"#886CE4",text:"Terminal Adventure Game"}]},{chapterIndex:4,chapterName:"Vectors",chapterDescription:"Store and manage dynamic lists of data with C++ vectors.",challenges:["Survival Gear","Lemonade Stand","Order Cart","Roadtrip Playlist","Sum of Even / Product of Odd"],titleImage:"",signUpPopups:["enter-pin","counting-sheep"],isComplete:!0,isClub:!0,xP:[10,15,15,20,20],internalChapterName:"vectors",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/cpp.png",articleLink:"/cpp/bonus/arrays",description:"Arrays",internalName:"arrays"}],internalChallengeNames:["survival-gear","lemonade-stand","order-cart","roadtrip-playlist","sum-of-even-product-of-odd"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:5,chapterName:"Functions",chapterDescription:"Break down code into reusable blocks with C++ functions.",challenges:["D.R.Y.","Food Menu","OOO","Conversions","Tips Calculator"],titleImage:"",signUpPopups:["dry","food-menu"],isComplete:!0,isClub:!0,xP:[10,15,15,20,20],internalChapterName:"functions",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/cpp.png",articleLink:"/cpp/bonus/scope",description:"Scope in C++",internalName:"scope"}],internalChallengeNames:["dry","food-menu","ooo","conversion","tips-calculator"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:6,chapterName:"Classes & Objects",chapterDescription:"Create your own types and use them to model everyday objects with unique characteristics and behaviors.",challenges:["Restaurants","Peter Luger Steak House","Old Money / New Money","Bank Accounts","Classic Cars","Animal Rescue"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,bonusArticle:[],xP:[15,15,15,20,20,25],internalChapterName:"classes-and-objects",internalChallengeNames:["restaurants","peter-luger-steak-house","old-money-new-money","bank-accounts","classic-cars","pet-rescue"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:7,chapterName:"Pointers & References",chapterDescription:"Learn about memory addresses, pointers, and references in C++.",challenges:["Memories","A Few Pointers","Dereference","Nullptr","Celebrity Names","Healing Potion","The End"],titleImage:"",signUpPopups:[],isComplete:!1,isClub:!0,bonusArticle:[],xP:[15,20,20,20,20,20,20],internalChapterName:"pointers-and-references",internalChallengeNames:["memories","a-few-pointers","dereference","nullptr","celebrity-names","healing-potion","the-end"],badgeImage:"/images/badges/earth_badge.png",type:""},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged C++ project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},es={name:"javascript",courseUrl:"/javascript",title:"The Origins III: JavaScript",catalogName:"JavaScript",tags:["web-dev","beginner","javascript"],searchQuery:"javascript, js, web, web development, frontend, front-end, html, css",description:"Learn variables, loops, functions, and events to start building interactive web apps with the programming language of the web â JavaScript!",community:{available:!0,link:"/community"},badges:["the-console","variables","conditionals","loops","arrays","functions","objects","trifecta"],shareButton:{"05-receipt":"https://twitter.com/intent/tweet?text=Receipt+\uD83E\uDDFE&hashtags=CodedexReceipt+@codedex_io","10-planet-weight":"https://twitter.com/intent/tweet?text=Planet+Weight+\uD83E\uDE90&hashtags=CodedexPlanetWeight+@codedex_io","17-rock-paper-scissors":"https://twitter.com/intent/tweet?text=Rock+Paper+Scissors+âï¸&hashtags=CodedexRockPaperScissors+@codedex_io","22-based-numbers":"https://twitter.com/intent/tweet?text=Based+Numbers+\uD83D\uDD22&hashtags=CodedexBasedNumbers+@codedex_io","28-dna":"https://twitter.com/intent/tweet?text=DNA+\uD83E\uDDEC&hashtags=CodedexDNA+@codedex_io","33-palindrome":"https://twitter.com/intent/tweet?text=Palindrome+\uD83D\uDD01&hashtags=CodedexPalindrome+@codedex_io","38-round-trip":"https://twitter.com/intent/tweet?text=Round+Trip+\uD83D\uDE97&hashtags=CodedexRoundTrip+@codedex_io","44-cap-that":"https://twitter.com/intent/tweet?text=Cap+That+\uD83E\uDDE2&hashtags=CodedexCapThat+@codedex_io"},links:["/javascript","01-setting-up","02-the-console","03-letter-tree","04-secret-recipe","05-receipt","06-let-const","07-data-types","08-temperature","09-bmi","10-planet-weight","11-coin-flip","12-good-morning","13-good-afternoon","14-ph-levels","15-magic-8-ball","16-air-quality-index","17-rock-paper-scissors","18
1841-duck-duck-goose","19-lucky-number","20-not-tell-lies","21-even-the-odds","22-based-numbers","23-five-boroughs","24-grocery-trip","25-times-tables","26-music-playlist","27-wheres-waldo","28-dna","29-greetings","30-blast-off","31-e-mc-2","32-clout","33-palindrome","34-pizza-party","35-dream-car","36-pokemon","37-animal-farm","38-round-trip","39-green-light-go","40-the-dom","41-hotline-bling","42-mood-ring","43-chill-pill","44-cap-that","final-project"],timeToComplete:0,prerequisiteCourses:["html","css"],recommendedCourses:["intermediate-javascript","framework-valley-react","nodejs"],bannerImageLink:"/images/javascript/javascript-course-banner.gif",authors:[{role:"Main curriculum writer (JavaScript)",name:"Sonny Li"},{role:"Curriculum editors",name:"Ellie"}],courseCompleteBadge:{name:"JavaScript badge",imgSrc:"/images/badges/goldenCourseBadges/js.png"},chapters:[{chapterIndex:0,chapterName:"The Console",chapterDescription:"Learn how to write your first line of JavaScript by logging messages to the console.",challenges:["Setting Up","The Console","Letter Tree","Secret Recipe","Receipt"],titleImage:"",isComplete:!0,isClub:!1,xP:[10,10,10,10,15],internalChapterName:"the-console",internalChallengeNames:["setting-up","the-console","letter-tree","secret-recipe","receipt"],signUpPopups:["setting-up","letter-tree"],badgeImage:"",editorState:{"setting-up":{enabled:!0},"the-console":{enabled:!0},"letter-tree":{enabled:!0},"secret-recipe":{enabled:!0},receipt:{enabled:!0}},bonusArticle:[{imageLink:"/images/courses/articleScreenshots/js-in-the-browser.png",articleLink:"/javascript/bonus/javascript-on-the-browser",description:"JavaScript on the Browser",internalName:"javascript-on-the-browser"}],badgeCardInfo:{imgLink:null,message:'Woohoo!! Give yourself a big pat on the back and take a breather. Pre-game is over, the real fun stuff is just about to start. console.log("(ââ¿â¼)");'},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(Full%20Version).mp3?alt=media&token=44ed4409-2273-451c-91b5-cd457e55c318"},{chapterIndex:1,chapterName:"Variables",chapterDescription:"Create variables and learn about data types, and arithmetic operators.",challenges:["Let & Const","Data Types","Temperature","BMI","Planet Weight"],titleImage:"",isComplete:!0,isClub:!1,xP:[15,15,15,15,20],internalChapterName:"variables",internalChallengeNames:["let-const","data-types","temperature","bmi","planet-weight"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/errors-in-js.png",articleLink:"/javascript/bonus/errors-in-javascript",description:"Errors in JavaScript",internalName:"errors-in-javascript"}],signUpPopups:["let-const","temperature"],badgeImage:"",editorState:{"let
1841-const":{enabled:!0},"data-types":{enabled:!0},temperature:{enabled:!0},bmi:{enabled:!0},"planet-weight":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Congrats! Your next badge proves that you have what it takes. Itâs special, because you have assigned a value to it hehe."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(Stinger).mp3?alt=media&token=584b2c00-6beb-49af-b235-54fbe190c683"},{chapterIndex:2,chapterName:"Conditionals",isClub:!0,chapterDescription:"Use logical operators to control the order of program execution. ",challenges:["Coin Flip","Good Morning","Good Afternoon","pH Levels","Magic 8 Ball","Air Quality","R-P-S"],titleImage:"",isComplete:!0,signUpPopups:["coin-flip","good-afternoon"],xP:[10,15,15,15,15,20,20],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/js-nested-if.png",articleLink:"/javascript/bonus/nested-conditionals",description:"Nested If Statements",internalName:"nested-conditionals"},{imageLink:"/images/courses/articleScreenshots/js-ternary.png",articleLink:"/javascript/bonus/ternary-operators-in-javascript",description:"Ternary Operators",internalName:"ternary-operators-in-javascript"}],challengePack:{imageLink:"",articleLink:"/challenges/conditionals/nite-owl",description:"Conditionals",internalName:"conditionals-javascript",internalChallengeLinks:["nite-owl","michelin-stars","tgif","decades","fitness-routine"],packXp:45},internalChapterName:"conditionals",internalChallengeNames:["coin-flip","good-morning","good-afternoon","ph-levels","magic-8-ball","air-quality-index","rock-paper-scissors"],badgeImage:"",editorState:{"coin-flip":{enabled:!0},"good-morning":{enabled:!0},"good-afternoon":{enabled:!0},"ph-levels":{enabled:!0},"magic-8-ball":{enabled:!0},"air-quality-index":{enabled:!0},"rock-paper-scissors":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"High five! You are on your way to becoming a champ! There are many options to take in life and now you can control the flow and direction. (ï¼¾Ïï¼¾)â¡ "},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(30s).mp3?alt=media&token=9c5d23dd-ddaa-4fe2-b5b4-4ac77019fe3f"},{chapterIndex:3,chapterName:"Loops",chapterDescription:"Repeat a block of code with while loops and for loops over, and over, and over again.",challenges:["Duck Duck Goose","Lucky Number","Not Tell Lies","Even the Odds","Based Numbers"],titleImage:"",isComplete:!0,isClub:!0,xP:[10,10,15,20,25],internalChapterName:"loops",internalChallengeNames:["duck-duck-goose","lucky-number","not-tell-lies","even-the-odds","based-numbers"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/js-loops.png",articleLink:"/javascript/bonus/nested-loops-in-javascript",description:"Nested Loops",internalName:"nested-loops-in-javascript"}],challengePack:{imageLink:"",articleLink:"/challenges/loops/blast-off",description:"Loops",internalName:"loops-javascript",internalChallengeLinks:["blast-off","swag-raffle","odd-cubes","dice-doubles","fibonacci-sequence"],packXp:45},cheatSheets:[ei.S.javascript[0]],signUpPopups:["duck-duck-goose","not-tell-lies"],badgeImage:"",editorState:{"duck-duck-goose":{enabled:!0},"lucky-number":{enabled:!0},"not-tell-lies":{enabled:!0},"even-the-odds":{enabled:!0},"based-numbers":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Many things come back to where they started. Programmers tend to revisit the same concept over and over again until they are comfortable with it. Always feel free to come back to do a few more reps!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(15s).mp3?alt=media&token=a71dee52-9b09-4787-9296-2b4f2b701006"},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,chapterDescription:"Practice your JavaScript chops with a checkpoint project! Choose from one of three projects and submit your code when you're done. Your project is reviewed by a mentor when you request a course certificate.",challenges:["Fizz Buzz","Horoscope","Leap Year Checker"],internalChallengeNames:["fizz-buzz","horoscope","leap-year-checker"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"fizz-buzz",emoji:"\uD83D\uDD22",backgroundColor:"#CC9400",text:"Fizz Buzz"},{dataAosDuration:"1100",dataAos:"fade-up",link:"horoscope",emoji:"\uD83D\uDD2E",backgroundColor:"#7188DB",text:"Horoscope"},{dataAosDuration:"1350",dataAos:"fade-up",link:"leap-year-checker",emoji:"\uD83D\uDCC5",backgroundColor:"#886CE4",text:"Leap Year Checker"}]},{chapterIndex:4,chapterName:"Arrays",chapterDescription:"Learn how to create, access, and update an array. ",challenges:["Five Boroughs","Grocery Trip","Times Tables","Music Playlist","Where's Waldo","DNA"],titleImage:"",isComplete:!0,isClub:!0,xP:[10,10,15,20,20,25],internalChapterName:"arrays",internalChallengeNames:["five-boroughs","grocery-trip","times-tables","music-playlist","wheres-waldo","dna"],badgeImage:"",editorState:{"five-boroughs":{enabled:!0},"grocery-trip":{enabled:!0},"times-tables":{enabled:!0},"music-playlist":{enabled:!0},"wheres-waldo":{enabled:!0},dna:{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Hip hip array! If your skills were an array after this chapter, what did you .push() to your toolkit? Now you can .unshift() some âconfidenceâ to the top!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(Full%20Version).mp3?alt=media&token=44ed4409-2273-451c-91b5-cd457e55c318"},{chapterIndex:5,chapterName:"Functions",chapterDescription:"Define and call a function â reusable block of code that performs a specific task.",challenges:["Greetings","Blast Off","E=mc\xb2","Clout","Palindrome"],titleImage:"",isComplete:!0,isClub:!0,xP:[15,20,20,20,25],internalChapterName:"functions",internalChallengeNames:["greetings","blast-off","e-mc-2","clout","palindrome"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/js-arrow-functions.png",articleLink:"/javascript/bonus/arrow-functions-in-javascript",description:"Arrow Functions",internalName:"arrow-functions-in-javascript"}],badgeImage:"",editorState:{greetings:{enabled:!0},"blast-off":{enabled:!0},"e-mc-2":{enabled:!0},clout:{enabled:!0},palindrome:{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Nothing's quite like that feeling when a puzzle piece snaps into place. Each piece plays a role in completing the bigger picture. Next time you find yourself reusing a block of code, turn it into a function!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(Stinger).mp3?alt=media&token=584b2c00-6beb-49af-b235-54fbe190c683"},{chapterIndex:6,chapterName:"Objects",chapterDescription:"Create a data type and use them to model everyday objects with unique characteristics and behaviors.",challenges:["Pizza Party","Dream Car","Pok\xe9mon","Animal Farm","Round Trip"],titleImage:"",isComplete:!0,isClub:!0,xP:[15,15,20,20,25],internalChapterName:"objects",internalChallengeNames:["pizza-party","dream-car","pokemon","animal-farm","round-trip"],badgeImage:"",editorState:{"pizza-party":{enabled:!0},"dream-car":{enabled:!0},pokemon:{enabled:!0},"animal-farm":{enabled:!0},"round-trip":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Yay! Now you can craft blueprints for your digital world and summon objects out of thin air (cue the mad scientist laugh). Next stop and the final stop: Trifecta."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(30s).mp3?alt=media&token=9c5d23dd-dd
1841aa-4fe2-b5b4-4ac77019fe3f"},{chapterIndex:7,chapterName:"Trifecta",chapterDescription:"It's time to put HTML, CSS, and JavaScript all together!",challenges:["Green Light Go!","The DOM","Hotline Bling","Mood Ring","Chill Pill","Cap That"],titleImage:"",isComplete:!1,isClub:!0,xP:[15,15,20,20,25,50],internalChapterName:"trifecta",cheatSheets:[ei.S.javascript[1]],internalChallengeNames:["green-light-go","the-dom","hotline-bling","mood-ring","chill-pill","cap-that"],badgeImage:"",editorState:{"green-light-go":{enabled:!0},"the-dom":{enabled:!0},"hotline-bling":{enabled:!0},"mood-ring":{enabled:!0},"chill-pill":{enabled:!0},"cap-that":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"The trifecta is officially complete. HTML, CSS, JavaScript â you now know how the core languages of the web come together to create stunning, interactive websites."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fjavascript%2F8%20Bits%20Journey%20(15s).mp3?alt=media&token=a71dee52-9b09-4787-9296-2b4f2b701006"},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged JavaScript project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},el={name:"java",courseUrl:"/java",title:"Java",badges:["hello-world","variables","control-flow","loops","arrays","methods","classes-and-objects","utility-classes"],catalogName:"Java",description:"Master Java by exploring object-oriented programming and essential data structures, building skills to create efficient and scalable applications!",searchQuery:"java, programming, coding, object-oriented programming, oop, data structures",community:{available:!1,link:"/community/"},shareButton:{"05-music-wrapped":"https://twitter.com/intent/tweet?text=Music+Wrapped+\uD83C\uDFB5&hashtags=CodedexMusic+@codedex_io"},courseCompleteBadge:{name:"Java Badge",imgSrc:"/images/badges/goldenCourseBadges/java.png"},links:["/java","01-first-program","02-hello-world","03-cooking-mama","04-error-logs","05-music-wrapped","06-storage-box","07-id-card","08-operation-0","09-escape-room","10-club-penguin","11-oatmeal","12-cat-owner","13-dog-owner","14-rollercoaster","15-coffee-order","16-rainbow-nums","17-all-the-while","18-affirmations","19-hit-the-breaks","20-playing-cards","21-survival-pack","22-position-0","23-gibberish","24-chill-lounge-friday-afternoon","25-clue","26-double-square","27-222","28-tv-channels","29-return-bins","30-voicemail","31-earths-moon","32-neopet","33-gravatia","34-under-construction","35-imacs","36-good-coffee-great-coffee","37-word-counter","38-is-this-your-card","39-rocket","40-bells","41-coin-exhange"],timeToComplete:0,prerequisiteCourses:[],recommendedCourses:[],bannerImageLink:"/images/java/java-banner-image.webp",newCourse:!1,tags:["java","beginner","computer-science"],authors:[{role:"Main curriculum writer (Git & GitHub)",name:"Estrella Popoca"},{role:"Curriculum editor",name:"Sonny"}],chapters:[{chapterIndex:0,chapterName:"Hello World",chapterDescription:"Learn the basics of Java and write your first program!",challenges:["First Program","Hello World","Cooking Mama","Error Logs","Music Wrapped"],titleImage:"",signUpPopups:["first-program","cooking-mama"],isComplete:!0,isClub:!1,xP:[10,10,10,10,10],internalChapterName:"hello-world",bonusArticle:[{imageLink:"",articleLink:"/java/bonus/set-up-your-java-dev-env",description:"Set Up your Java Development Environment with BlueJ",internalName:"set-up-your-java-dev-env"}],internalChallengeNames:["first-program","hello-world","cooking-mama","error-logs","music-wrapped"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Variables",chapterDescription:"Create variables and learn about data types.",challenges:["Storage Box","ID Card","Operation 0","Escape Room","Club Penguin"],titleImage:"",signUpPopups:["storage-box","operation-0"],isComplete:!0,isClub:!1,xP:[10,10,10,10,10],internalChapterName:"variables",internalChallengeNames:["storage-box","id-card","operation-0","escape-room","club-penguin"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Control Flow",chapterDescription:'Explore how programs "make decisions" with if/else statements, relational operators, *and* logical operators.',challenges:["Oatmeal","Cat Owner","Dog Owner","Rollercoaster","Coffee Order"],titleImage:"",signUpPopups:["oatmeal","dog-owner"],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"control-flow",internalChallengeNames:["oatmeal","cat-owner","dog-owner","rollercoaster","coffee-order"],badgeImage:"/images/badges/earth_badge.png",type:"",challengePack:{imageLink:"/images/courses/articleScreenshots/python-countdown.png",articleLink:"/challenges/control-flow/girl-scout-cookie
1841s",description:"Control Flow",internalName:"control-flow-java",internalChallengeLinks:["girl-scout-cookies","starbucks-cups","tip-calculator","work-hours","movie-tickets"],packXp:70}},{chapterIndex:3,chapterName:"Loops",chapterDescription:"Repeat a block of code with while loops and for loops over, and over, and over again.",challenges:["Rainbow Nums","All the While","Affirmations","Hit the Breaks","Playing Cards"],titleImage:"",signUpPopups:["rainbow-nums","affirmations"],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"loops",internalChallengeNames:["rainbow-nums","all-the-while","affirmations","hit-the-breaks","playing-cards"],badgeImage:"/images/badges/earth_badge.png",type:"",cheatSheets:[ei.S.java[0]],challengePack:{imageLink:"/images/courses/articleScreenshots/food-ratings.png",articleLink:"/challenges/loops/one-mississippi",description:"Loops",internalName:"loops-java",internalChallengeLinks:["one-mississippi","ticketmaster-queue","safe-word","piggy-bank","marathon-runner"],packXp:75}},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,challenges:["Adventure Game","Pet Simulator","Word Guesser Game"],chapterDescription:"Practice your Java skills by building a project that combines all the concepts you've learned so far!",internalChallengeNames:["adventure-game","pet-simulator","word-guesser-game"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"adventure-game",emoji:"\uD83C\uDFAE",backgroundColor:"#CC9400",text:"Adventure Game"},{dataAosDuration:"1100",dataAos:"fade-up",link:"pet-simulator",emoji:"\uD83D\uDC36",backgroundColor:"#7188DB",text:"Pet Simulator"},{dataAosDuration:"1350",dataAos:"fade-up",link:"word-guesser-game",emoji:"\uD83D\uDCDD",backgroundColor:"#886CE4",text:"Word Guesser Game"}]},{chapterIndex:4,chapterName:"Arrays",chapterDescription:"Learn how to create, access, and update an array.",challenges:["Survival Pack","Position 0","Gibberish","Chill Lounge Friday Afternoon","Clue"],titleImage:"",signUpPopups:["survival-pack","gibberish"],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"arrays",internalChallengeNames:["survival-pack","position-0","gibberish","chill-lounge-friday-afternoon","clue"],bonusArticle:[{imageLink:"",articleLink:"/java/bonus/arraylists",description:"Arraylists in Java",internalName:"arraylists"}],challengePack:{imageLink:"",articleLink:"/challenges/arrays/game-apps",description:"Arrays",internalName:"arrays-java",internalChallengeLinks:["game-apps","starting-lineup","national-parks-award","reverse-it","most-wanted"],packXp:70},badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:5,chapterName:"Methods",chapterDescription:"Learn how to create, access, and update an array.",challenges:["Double Square","222","TV Channels","Return Bins","Voicemail","Earth's Moon"],titleImage:"",signUpPopups:["double-square","return-bins"],isComplete:!0,isClub:!0,xP:[10,10,10,10,10,10],internalChapterName:"methods",internalChallengeNames:["double-square","222","tv-channels","return-bins","voicemail","earths-moon"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:6,chapterName:"Classes and Objects",chapterDescription:"Learn how to create, use, and manage objects.",challenges:["Neopet","Gravatia","Under Construction","iMacs","Good Coffee, Great Coffee"],titleImage:"",signUpPopups:[],bonusArticle:[{imageLink:"",articleLink:"/java/bonus/multi-file-compilation",description:"Multi-File Compilation",internalName:"multi-file-compilation"}],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"classes-and-objects",internalChallengeNames:["neopet","gravatia","under-construction","imacs","good-coffee-great-coffee"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:7,chapterName:"Utility Classes",chapterDescription:"Learn utility classes in Java.",challenges:["Word Counter","Is This Your Card?","Rocket","Bells","Coin Exchange"],titleImage:"",signUpPopups:[],bonusArticle:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"utility-classes",internalChallengeNames:["word-counter","is-this-your-card","rocket","bells","coin-exhange"],badgeImage:"/images/badges/earth_badge.png",type:""},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged Java project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},eu={name:"matplotlib",courseUrl:"/matplotlib",title:"Matplotlib",badges:["line-plots","and-beyond"],clubCourse:!1,newCourse:!0,tags:["intermediate","computer-science","data-science","ai"],catalogName:"Matplotlib",description:"Learn the powerful Python library for data visualization and create stunning plots, charts, and graphs, while transforming raw data into insightful visuals. Prereqs: Python, NumPy, Pandas",searchQuery:"python, matplotlib, data visualization, plots, graphs, charts, data science, visualization library",community:{available:!1,link:"/community"},shareButton:{},links:["/matplotlib","01-data-visualization","02-your-first-plot","03-the-canvas","04-daily-steps","05-gas-and-electric-bills","06-sports-rivalries","07-adopt-a-kitten","08-gearsparks-emporium","09-health-vs-wealth","10-aquariums","11-favorite-pizza-toppings","12-box-office-sales","13-subplots","14-multiline-expenses","15-save-the-bees"],bannerImageLink:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/courses%2Fmatplotlib%2Fbanner.gif?alt=media&token=664e8724-e9f4-4a80-bc5f-863c89787ac9",authors:[{role:"Main curriculum writer (Matplotlib)",name:"Ellie"},{role:"Curriculum editor",name:"Sonny"}
1841],courseCompleteBadge:{imgSrc:"/images/badges/goldenCourseBadges/matplotlib.png",name:"Matplotlib"},timeToComplete:0,prerequisiteCourses:["python","numpy","pandas"],recommendedCourses:["pandas","intermediate-python"],chapters:[{chapterIndex:0,chapterName:"Line Plots",chapterDescription:"Draw your first line plot and customize it to see data trends clearly.",challenges:["Data Visualization","Your First Plot","The Canvas","Daily Steps","Gas & Electric Bills","Sports Rivalries","Adopt a Kitten","Gearspark's Emporium"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,10,10,10,10,10,10,20],internalChapterName:"line-plots",internalChallengeNames:["data-visualization","your-first-plot","the-canvas","daily-steps","gas-and-electric-bills","sports-rivalries","adopt-a-kitten","gearsparks-emporium"],badgeImage:"/images/badges/matplotlib/line-plots.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"And Beyond",chapterDescription:"Learn about scatter plots, bar graphs, pie charts, subplots, and advanced customizations to create more eye-catching graphics.",challenges:["Health vs. Wealth","Aquariums","Favorite Pizza Toppings","Box Office Sales","Subplots","Multiline Expenses","Save the Bees"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,10,10,20],internalChapterName:"and-beyond",internalChallengeNames:["health-vs-wealth","aquariums","favorite-pizza-toppings","box-office-sales","subplots","multiline-expenses","save-the-bees"],badgeImage:"/images/badges/matplotlib/and-beyond.png",bonusArticle:[],type:"",cheatSheets:[ei.S.matplotlib[0]]}]},ed={courseDetails:{python:{name:"python",courseUrl:"/python",title:"The Legend of Python",catalogName:"Python",tags:["python","data-science","beginner"],description:"Learn programming fundamentals such as variables, control flow, and loops with the world's most popular and versatile coding language â Python!",searchQuery:"python programming, learn python, python basics",community:{available:!0,link:"/community/python",description:"Need Python Help?"},badges:["hello-world","variables","control-flow","loops","lists","functions","classes-and-objects","modules"],shareButton:{"05-snail-mail":"https://twitter.com/intent/tweet?text=Snail+Mail+\uD83D\uDC8C&hashtags=CodedexLetter+@codedex_io","10-currency":"https://twitter.com/intent/tweet?text=Currency+\uD83D\uDCB5&hashtags=CodedexCurrency+@codedex_io","16-sorting-hat":"https://twitter.com/intent/tweet?text=Sorting+Hat&hashtags=CodedexSortingHat+@codedex_io","21-fizz-buzz":"https://twitter.com/intent/tweet?text=Fizz+Buzz+\uD83D\uDC1D&hashtags=CodedexFizzBuzz+@codedex_io","27-bucket-list":"https://twitter.com/intent/tweet?text=Bucket+List+\uD83E\uDEA3&hashtags=CodedexBucketList+@codedex_io","33-drive-thru":"https://twitter.com/intent/tweet?text=Drive-Thru+\uD83C\uDFCEï¸&hashtags=CodedexDriveThru+@codedex_io","38-pokedex":"https://twitter.com/intent/tweet?text=Pok\xe9dex+\uD83D\uDC7E&hashtags=CodedexPokedex+@codedex_io","43-zen-of-python":"https://twitter.com/intent/tweet?text=Zen+of+Python+\uD83D\uDC0D&hashtags=CodedexZenOfPython+@codedex_io"},links:["/python","01-setting-up","02-hello-world","03-pattern","04-initials","05-snail-mail","06-data-types","07-temperature","08-bmi","09-pythagorean","10-currency","11-coin-flip","12-grades","13-ph-levels","14-magic-8-ball","15-the-cyclone","16-sorting-hat","17-enter-pin","18-guess-number","19-detention","20-99-bottles","21-fizz-buzz","22-grocery","23-to-do","24-inventory","25-reading-list","26-mixtape","27-bucket-list","28-dry","29-fortune-cookie","30-mars-orbiter","31-calculator","32-stonks","33-drive-thru","34-restaurants","35-bobs-burgers","36-favorite-cities","37-bank-accounts","38-pokedex","39-slot-machine","40-solar-system","41-countdown","42-forty-two","43-zen-of-python","final-project"],bannerImageLink:"/images/python/python-animated.gif",courseCompleteBadge:{imgSrc:"/images/badges/goldenCourseBadges/python.png",name:"The Zen of Python"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:["intermediate-python","numpy","data-structures-and-algorithms"],authors:[{role:"Main curriculum writer (Python)",name:"Sonny Li"},{role:"Curriculum editor",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Hello World",chapterDescription:"Learn how to write your first line of Python by printing messages to the terminal.",challenges:["
1841Setting Up","Hello World","Pattern","Initials","Snail Mail"],titleImage:"/images/badges/python/hello-world.png",signUpPopups:["setting-up","pattern"],isComplete:!0,xP:[10,10,10,15,15],internalChapterName:"hello-world",internalChallengeNames:["setting-up","hello-world","pattern","initials","snail-mail"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/setup-local-env.png",articleLink:"/python/bonus/set-up-your-local-environment-in-python",description:"Set Up Your Local Development Environment with Python",internalName:"set-up-your-local-environment-in-python"}],editorState:{"setting-up":{enabled:!0},"hello-world":{enabled:!0},pattern:{enabled:!0},initials:{enabled:!0},"snail-mail":{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/earthBadge.png",message:"Woohoo!! Give yourself a big pat on the back and take a breather. Pre-game is over, the real fun stuff is just about to start. (ââ¿â¼)"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fchapter1completion.mp3?alt=media&token=4c664097-c9e8-4642-9554-f0ea933432dc"},{chapterIndex:1,chapterName:"Variables",chapterDescription:"Create variables and learn about data types, arithmetic operators, and user input.",challenges:["Data Types","Temperature","BMI","Pythagorean","Currency"],titleImage:"/images/badges/python/variables.png",isComplete:!0,xP:[15,15,15,15,20],internalChapterName:"variables",signUpPopups:["data-types","bmi"],internalChallengeNames:["data-types","temperature","bmi","pythagorean","currency"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/errors-in-python.png",articleLink:"/python/bonus/errors-in-python",description:"Errors in Python",internalName:"errors-in-python"}],editorState:{"data-types":{enabled:!0},temperature:{enabled:!0},bmi:{enabled:!0},pythagorean:{enabled:!0},currency:{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/memoryBadge.png",message:"Congrats! Your next badge proves that you have what it takes. Itâs special, because you have assigned a value to it. (ââ¿â¼)"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fpython%2Fchapter2.mp3?alt=media&token=fc4bb461-48bd-4d48-b7a5-3de2d665182f",challengePack:{imageLink:"/images/courses/articleScreenshots/food-ratings.png",articleLink:"/challenges/variables/year-of-the-snake",description:"Variables",internalName:"variables-python",internalChallengeLinks:["year-of-the-snake","credit-card","moores-law","even-odd","pet-age"],packXp:30}},{chapterIndex:2,chapterName:"Control Flow",chapterDescription:'Explore how programs "make decisions" with if/else statements, relational operators, *and* logical operators.',challenges:["Coin Flip","Grades","pH Levels","Magic 8 Ball","The Cyclone","Sorting Hat"],titleImage:"/images/badges/python/control-flow.png",isComplete:!0,isClub:!0,xP:[10,10,15,15,15,15],internalChapterName:"control-flow",internalChallengeNames:["coin-flip","grades","ph-levels","magic-8-ball","the-cyclone","sorting-hat"],signUpPopups:["coin-flip","ph-levels"],challengePack:{imageLink:"/images/courses/articleScreenshots/food-ratings.png",articleLink:"/challenges/control-flow/food-ratings",description:"Control Flow",internalName:"control-flow-python",internalChallengeLinks:["food-ratings","high-school-grades","snapple-facts","seasons","planet-weights"],packXp:50},editorState:{"coin-flip":{enabled:!0},grades:{enabled:!0},"ph-levels":{enabled:!0},"magic-8-ball":{enabled:!0},"the-cyclone":{enabled:!0},"sorting-hat":{enabled:!0}},bonusArticle:[{imageLink:"/images/courses/articleScreenshots/nested-if-python.png",articleLink:"/python/bonus/nested-control-statements",description:"Nested If Statements",internalName:"nested-control-statements"}],badgeCardInfo:{imgLink:"/images/badges/roadBadge.png",message:"You are on your way to becoming a champ! There are many options to take in life and now you can control the flow and direction.ï¼ï¼¾Ïï¼¾ï¼â¡ Uh oh, there's a roundtable coming next, better buckle up!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fpython%2Fchapter3.mp3?alt=media&token=16f334ee-4051-4990-ac89-8c063f45e6e5"}
1841,{chapterIndex:3,chapterName:"Loops",chapterDescription:"Repeat a block of code with while loops and for loops over, and over, and over again.",challenges:["Enter PIN","Guess Number","Detention","99 Bottles","Fizz Buzz"],titleImage:"/images/badges/python/loops.png",isComplete:!0,isClub:!0,xP:[10,15,15,20,25],internalChapterName:"loops",internalChallengeNames:["enter-pin","guess-number","detention","99-bottles","fizz-buzz"],signUpPopups:["enter-pin","detention"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/python-nested-loops.png",articleLink:"/python/bonus/nested-loops",description:"Nested Loops",internalName:"nested-loops"}],cheatSheets:[ei.S.python[0]],challengePack:{imageLink:"/images/courses/articleScreenshots/python-countdown.png",articleLink:"/challenges/loops/are-we-there-yet",description:"Loops",internalName:"loops-python",internalChallengeLinks:["are-we-there-yet","new-year-countdown","snake-eyes","asterisks","sum-of-squares"],packXp:50},editorState:{"enter-pin":{enabled:!0},"guess-number":{enabled:!0},detention:{enabled:!0},"99-bottles":{enabled:!0},"fizz-buzz":{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/haloBadge.png",message:"Many things come back to where they started. Programmers tend to revisit the same concept over and over again until they are comfortable with it. Always feel free to come back to do a few more reps!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fchapter1completion.mp3?alt=media&token=4c664097-c9e8-4642-9554-f0ea933432dc"},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,challenges:["Area Calculator","Rock Paper Scissors","Terminal Adventure"],chapterDescription:"Practice your Python chops with a checkpoint project! Choose from one of three projects and submit your code when you're done. Your project is reviewed by a mentor when you request a course certificate.",internalChallengeNames:["area-calculator","rock-paper-scissors","terminal-adventure-game"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"area-calculator",emoji:"\uD83D\uDCD0",backgroundColor:"#CC9400",text:"Area Calculator"},{dataAosDuration:"1100",dataAos:"fade-up",link:"rock-paper-scissors",emoji:"âï¸",backgroundColor:"#7188DB",text:"Rock Paper Scissors"},{dataAosDuration:"1350",dataAos:"fade-up",link:"terminal-adventure-game",emoji:"\uD83D\uDDA5ï¸",backgroundColor:"#886CE4",text:"Terminal Adventure"}]},{chapterIndex:4,chapterName:"Lists",chapterDescription:"Store different items in lists and learn to use built-in functions and methods.",titleImage:"/images/badges/python/lists.png",isClub:!0,challenges:["Grocery","To-Do","Inventory","Reading","Mixtape","Bucket List"],isComplete:!0,xP:[10,15,15,15,15,20],internalChapterName:"lists",internalChallengeNames:["grocery","to-do","inventory","reading-list","mixtape","bucket-list"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/python-nested-lists.png",articleLink:"/python/bonus/nested-lists",description:"Nested Lists",internalName:"nested-lists"},{imageLink:"/images/courses/articleScreenshots/python-nested-lists.png",articleLink:"/python/bonus/dictionaries-and-sets-in-python",description:"Dictionaries and Sets",internalName:"dictionaries-and-sets"}],challengePack:{imageLink:"/images/courses/articleScreenshots/python-list.png",articleLink:"/challenges/lists/wishlist",description:"Lists",internalName:"lists-python",internalChallengeLinks:["wishlist","lottery","the-oscars","split-the-bill","dna"],packXp:50},editorState:{grocery:{enabled:!0},"to-do":{enabled:!0},inventory:{enabled:!0},"reading-list":{enabled:!0},mixtape:{enabled:!0},"bucket-list":{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/sequenceBadge.png",message:"High five! If your skills were a list after this chapter, what did you .append() to your toolkit? Now you can .insert() some âconfidenceâ to the top!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fpython%2Fchapter2.mp3?alt=media&token=fc4bb461-48bd-4d48-b7a5-3de2d665182f"},{chapterIndex:5,chapterName:"Functions",chapterDescription:"Define and call a function â reusable block of code that performs a specific task.",titleImage:"/images/badges/python/functions.png",isComplete:!0,isClub:!0,challenges:["D.R.Y.","Fortune Cookie","Mars Orbiter","Calculator","Stonks","Drive-Thru"],xP:[10,15,15,15,15,20],internalChapterName:"functions",internalChallengeNames:["dry","fortune-cookie","mars-orbiter","calculator","stonks","drive-thru"],bonusArticle:[{imageLink:"/images/courses/articleScreenshots/intro-to-lambda.png",articleLink:"/python/bonus/lambda-in-python",description:"Intro to Lambda",internalName:"lambda-in-python"}],challengePack:{imageLink:"/images/courses/articleScreenshots/kda-functions.png",articleLink:"/challenges/functions/james-bond",description:"Functions",internalName:"functions-python",internalChallengeLinks:["james-bond","average-number","kda-ratio","moon-phases","dog-years"],packXp:35},editorState:{dry:{enabled:!0},"fortune-cookie":{enabled:!0}
1841,"mars-orbiter":{enabled:!0},calculator:{enabled:!0},stonks:{enabled:!0},"drive-thru":{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/puzzleBadge.png",message:"Nothing's quite like that feeling when a puzzle piece snaps into place. Each piece plays a role in completing the bigger picture. Next time you find yourself reusing a block of code, turn it into a function!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fpython%2Fchapter3.mp3?alt=media&token=16f334ee-4051-4990-ac89-8c063f45e6e5"},{chapterIndex:6,chapterName:"Classes & Objects",chapterDescription:"Create your own data types and use them to model everyday objects with unique characteristics and behaviors.",titleImage:"/images/badges/python/classes-and-objects.png",isComplete:!0,isClub:!0,challenges:["Restaurants","Bob's Burgers","Favorite Cities","Bank Accounts","Pok\xe9dex"],xP:[15,15,15,15,20],internalChapterName:"classes-and-objects",internalChallengeNames:["restaurants","bobs-burgers","favorite-cities","bank-accounts","pokedex"],editorState:{restaurants:{enabled:!0},"bobs-burgers":{enabled:!0},"favorite-cities":{enabled:!0},"bank-accounts":{enabled:!0},pokedex:{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/python-badgecards/rubyBadge.png",message:"Yay! Now you can craft blueprints for your digital world and summon objects out of thin air (cue the mad scientist laugh). Next stop and the final stop: Modules."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fchapter1completion.mp3?alt=media&token=4c664097-c9e8-4642-9554-f0ea933432dc"},{chapterIndex:7,chapterName:"Modules",chapterDescription:"Import built-in modules and learn how to create our own.",isComplete:!0,isClub:!0,titleImage:"/images/badges/python/modules.png",challenges:["Slot Machine","Solar System","Countdown","Forty Two","Zen of Python"],cheatSheets:[ei.S.python[1]],xP:[15,15,20,20,50],internalChapterName:"modules",internalChallengeNames:["slot-machine","solar-system","countdown","forty-two","zen-of-python"],editorState:{"slot-machine":{enabled:!0},"birthday-card":{enabled:!0},countdown:{enabled:!0},"solar-system":{enabled:!0},"forty-two":{enabled:!0},"zen-of-python":{enabled:!0}},badgeCardInfo:{imgLink:"/images/badges/python-badgecards/filesBadge.png",message:'YOU FREAKING DID IT. From your first "Hello, World!" to importing modules, youâve officially completed the course. Youâve coded, debugged, and probably yelled at the screen once or twice. Go celebrate â you earned this. The Cod\xe9dex universe awaits your next adventure. â¨'},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fpython%2Fchapter2.mp3?alt=media&token=fc4bb461-48bd-4d48-b7a5-3de2d665182f"},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged Python project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},html:{name:"html",courseUrl:"/html",title:"The Origins I: HTML",catalogName:"HTML",tags:["web-dev","beginner"],description:"Create your first website with HTML, the building blocks of the web and dive into the world of web development.",searchQuery:"html, learn html, html basics, html tutorial",community:{available:!0,link:"/community/web-dev",description:"Need HTML Help?"},links:["/html","01-shooting-star","02-elemental","03-newspaper","04-corporate-talk","05-sous-chef","06-lost-pet","07-favorite-band","08-blueprint","09-family-tree","10-craigslist-ad","11-wiki-article","12-lorem-ipsum","13-power-rangers","14-myspace-top-8","15-google","16-sign-up-v1","17-sign-up-v2","18-rsvp","19-contact-us","20-welp","21-personal-blog","22-the-header","23-main-footer","24-blog-posts","25-figures","26-final-touches","final-project"],badges:["elements","structure","forms","semantic-html"],shareButton:{"07-favorite-band":"https://twitter.com/intent/tweet?text=Favorite+Band+Website+\uD83C\uDFB8&hashtags=Cod\xe9dexFavoriteBand&hashtags=HTML+@c
1841odedex_io","14-myspace-top-8":"https://twitter.com/intent/tweet?text=MySpace+Top+8+\uD83C\uDF10&hashtags=Cod\xe9dexMySpaceTop8&hashtags=HTML+@codedex_io","20-welp":"https://twitter.com/intent/tweet?text=Welp+\uD83C\uDF38&hashtags=Cod\xe9dexWelp&hashtags=HTML+@codedex_io","26-final-touches":"https://twitter.com/intent/tweet?text=Final+Touches+\uD83C\uDFA8&hashtags=Cod\xe9dexFinalTouches&hashtags=HTML+@codedex_io"},bannerImageLink:"/images/html/html-parralax-combined.gif",courseCompleteBadge:{name:"HTML Badge",imgSrc:"/images/badges/goldenCourseBadges/html.png"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:["css","javascript","command-line"],authors:[{role:"Main curriculum writer (HTML)",name:"Sonny Li"},{role:"Curriculum editor",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Elements",chapterDescription:"Create your first web page by learning about basic elements and tags.",challenges:["Shooting Star","Elemental","Newspaper","Corporate Talk","Sous-Chef","Lost Pet","Favorite Band"],titleImage:"/images/badges/html/elements.png",isComplete:!0,xP:[10,10,10,10,15,15,20],internalChapterName:"elements",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/html-developer-tools.png",articleLink:"/html/bonus/developer-tools",description:"Developer Tools",internalName:"developer-tools"}],internalChallengeNames:["shooting-star","elemental","newspaper","corporate-talk","sous-chef","lost-pet","favorite-band"],signUpPopups:["shooting-star","newspaper"],badgeImage:"/images/badges/html/elements.png",editorState:{"shooting-star":{enabled:!0},elemental:{enabled:!0},newspaper:{enabled:!0},"corporate-talk":{enabled:!0},"sous-chef":{enabled:!0},"lost-pet":{enabled:!0},"favorite-band":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Fire. Water. Earth. Air... and now HTML. Youâve unlocked the ancient elements â not just of web development, but of creation. The web bends to your will now. Onward!"},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fhtml%2FRetro%20Boy%20(Full%20Without%20Intro).mp3?alt=media&token=1819cb6b-dd1b-4bd0-94c2-2f8f247f61eb",challengePack:{articleLink:"/challenges/elements/garage-sale",description:"Elements",internalName:"elements-html",internalChallengeLinks:["garage-sale","movie-review","packing-list","map-directions","ramen-restaurant","for-rent"],packXp:65}},{chapterIndex:1,chapterName:"Structure",isClub:!0,chapterDescription:"Learn more about HTML structure, attributes, and classes vs id.",challenges:["Blueprint","Family Tree","Craigslist Ad","Wiki Article","Lorem Ipsum","Power Rangers","MySpace Top 8"],titleImage:"/images/badges/html/structure.png",isComplete:!0,xP:[10,15,15,15,15,20,25],internalChapterName:"structure",internalChallengeNames:["blueprint","family-tree","craigslist-ad","wiki-article","lorem-ipsum","power-rangers","myspace-top-8"],signUpPopups:["blueprint","craigslist-ad"],badgeImage:"/images/badges/html/structure.png",editorState:{blueprint:{enabled:!0},"family-tree":{enabled:!0},"craigslist-ad":{enabled:!0},"wiki-article":{enabled:!0},"lorem-ipsum":{enabled:!0},"power-rangers":{enabled:!0},"myspace-top-8":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Congrats! You just conjured structure from the void. Wild to think that every website on the internet works this way, right? Letâs keep the magic going."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fhtml%2FRetro%20Boy%20(Stinger).mp3?alt=media&token=67c0494f-4b7f-46dc-ac3c-1812b46a7344",challengePack:{articleLink:"/challenges/structure/song-lyrics",description:"Structure",internalName:"structure-html",internalChallengeLinks:["song-lyrics","metamorphosis","bestie-fan-page","messy-closet","i-spy","juliens-art-mart"],packXp:75}},{chapterIndex:2,chapterName:"Forms",chapterDescription:"Take input from the user with forms.",challenges:["Google","Sign Up v1","Sign Up v2","RSVP","Contact Us","Welp"],badgeImage:"/images/badges/html/forms.png",titleImage:"/images/badges/html/forms.png",isComplete:!0,isClub:!0,xP:[15,15,10,20,15,25],internalChapterName:"forms",internalChallengeNames:["google","sign-up-v1","sign-up-v2","rsvp","contact-us","welp"],editorState:{google:{enabled:!0},"sign-up-v1":{enabled:!0},"sign-up-v2":{enabled:!0},rsvp:{enabled:!0},"contact-us":{enabled:!0},welp:{enabled:!0}},badgeCardInfo:{imgLink:null,message:"High five! Forms are the portals between users and the web â and
1841you just opened the gate. For the first time, users can talk back. Let the interaction begin."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fhtml%2FRetro%20Boy%20(Bumper).mp3?alt=media&token=2acb975a-b145-4d88-9bfc-35b8dddbf23f"},{chapterIndex:3,chapterName:"Semantic HTML",chapterDescription:"Improve the foundation of any web page with semantic elements.",challenges:["Personal Blog","The Header","Main Footers","Blog Posts","Figures","Final Touches"],titleImage:"/images/badges/html/semantic-html.png",isComplete:!0,isClub:!0,xP:[15,15,20,20,25,30],internalChapterName:"semantic-html",internalChallengeNames:["personal-blog","the-header","main-footer","blog-posts","figures","final-touches"],badgeImage:"/images/badges/html/semantic-html.png",editorState:{"personal-blog":{enabled:!0},"the-header":{enabled:!0},"main-footer":{enabled:!0},"blog-posts":{enabled:!0},figures:{enabled:!0},"final-touches":{enabled:!0}},badgeCardInfo:{imgLink:null,message:"Letâs gooo! Semantics = clarity. You've just turned old-school HTML into crystal-clear structure. Clean. Readable. Powerful. Your code now meets the standards of the modern web."},music:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fhtml%2FRetro%20Boy%20(30s).mp3?alt=media&token=54351e64-48f1-48a4-b1da-a2da29c82d2b"},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged HTML project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},css:{name:"css",courseUrl:"/css",title:"The Origins II: CSS",catalogName:"CSS",searchQuery:"css, learn css, css basics, css tutorial, html",badges:["selectors","properties","box-model","layout","flexbox"],tags:["web-dev","creative","beginner"],description:"Learn to use CSS selectors and properties to stylize your HTML pages with colors, fonts, sizing, layouts, and more!",community:{available:!0,link:"/community/web-dev",description:"Need CSS Help?"},shareButton:{"05-concert-flyer":"https://twitter.com/intent/tweet?text=Concert+Flyer+\uD83C\uDFA4&hashtags=Cod\xe9dexConcertFlyer+@codedex_io","12-invitation":"https://twitter.com/intent/tweet?text=Cod\xe9dex+invitiation+\uD83D\uDCE8&hashtags=Cod\xe9dexInvitation+@codedex_io","18-local-library":"https://twitter.com/intent/tweet?text=Local+Library+\uD83D\uDCDA&hashtags=Cod\xe9dexLocalLibrary+@codedex_io","25-art-gallery":"https://twitter.com/intent/tweet?text=Art+Gallery+\uD83D\uDDBCï¸&hashtags=Cod\xe9dexArtGallery+@codedex_io"},links:["/css","01-picasso","02-syntax","03-selectors-1","04-selectors-2","05-concert-flyer","06-rainbow","07-measurements","08-five-families","09-spellcheck","10-wallpaper","11-shorthands","12-invitation","13-inspection","14-profile-status","15-wiggle-room","16-spaced-out","17-make-it-count","18-local-library","19-lines-and-blocks","20-go-with-the-flow","21-its-all-relative","22-absolute-removal","23-fixed-banner","24-sticky-elements","25-art-gallery","26-in-the-flex","27-directions","28-spacing","29-cross-axis","30-flexible-sizing","31-pokemon-cards","final-project"],bannerImageLink:"/images/css/css-course-banner.gif",courseCompleteBadge:{name:"CSS Badge",imgSrc:"/images/badges/goldenCourseBadges/css.png"},timeToComplete:0,prerequisiteCourses:["html"],recommendedCourses:["javascript","p5js","command-line"],authors:[{role:"Main curriculum writer (CSS)",name:"Sonny Li"},{role:"Curriculum editors",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Selectors",chapterDescription:"Learn how to use CSS selectors to start stylizing your HTML page.",challenges:["Picasso","Syntax","Selectors Pt. 1","Selectors Pt. 2","Concert Flyer"],isComplete:!0,xP:[10,10,15,15,20],internalChapterName:"selectors",internalChallengeNames:["picasso","syntax","selectors-1","selectors-2","concert-flyer"],badgeImage:"/images/badges/css/selectors.png",titleImage:"/images/badges/css/selectors.png",signUpPopups:["picasso","selectors-1"],editorState:{picasso:{enabled:!0},syntax:{enabled:!0},"selectors-1":{enabled:!0},"selectors-2":{enabled:!0},"concert-flyer":{enabled:!0}},bonusArticle:[{imageLink:"/images/courses/articleScreenshots/css-pseudo.png",articleLink:"/css/bonus/pseudo-elements-in-css",description:"Pseudo-elements",internalName:"pseudo-elements-in-css"}]},{chapterIndex:1,chapterName:"Properties",isClub:!0,chapterDescription:"Implement common CSS properties like color, image sizing, and font.",challenges:["Rainbow","Measurements","Five Families","Spellcheck","Wallpaper","Shorthands","Invitation"],isComplete:!0,xP:[10,10,15,15,20,20,25],internalChapterName:"properties",internalChallengeNames:["rainbow","measurements","five-families","spellcheck","wallpaper","shorthands","invitation"],signUpPopups:["rainbow","five-families"],badgeImage:"/images/badges/css/properties.png",titleImage:"/images/badges/css/properties.png",editorState:{rainbow:{enabled:!0},measurements:{enabled:!0}
1841,"five-families":{enabled:!0},spellcheck:{enabled:!0},wallpaper:{enabled:!0},shorthands:{enabled:!0},invitation:{enabled:!0}},bonusArticle:[{imageLink:"/images/courses/articleScreenshots/css-psuedo-classes.png",articleLink:"/css/bonus/pseudo-classes-in-css",description:"Pseudo-classes",internalName:"pseudo-classes-in-css"}]},{chapterIndex:2,chapterName:"Box Model",chapterDescription:"Interact with the Box Model to manipulate elements.",challenges:["Inspection","Profile Status","Wiggle Room","Spaced Out","Make It Count","Local Library"],isComplete:!0,isClub:!0,xP:[15,15,15,15,15,15],internalChapterName:"box-model",internalChallengeNames:["inspection","profile-status","wiggle-room","spaced-out","make-it-count","local-library"],badgeImage:"/images/badges/css/box-model.png",titleImage:"/images/badges/css/box-model.png",editorState:{inspection:{enabled:!0},"profile-status":{enabled:!0},"wiggle-room":{enabled:!0},"spaced-out":{enabled:!0},"make-it-count":{enabled:!0},"local-library":{enabled:!0}}},{chapterIndex:3,chapterName:"Layout",chapterDescription:"Learn about layout properties, flow, and controlling element position.",challenges:["Lines & Blocks","Go With The Flow","It's Relative","Absolute Removal","Fixed Banner","Sticky Elements","Art Gallery"],isClub:!0,isComplete:!0,xP:[15,15,15,20,20,25,30],internalChapterName:"layout",internalChallengeNames:["lines-and-blocks","go-with-the-flow","its-all-relative","absolute-removal","fixed-banner","sticky-elements","art-gallery"],badgeImage:"/images/badges/css/layout.png",titleImage:"/images/badges/css/layout.png",editorState:{"lines-and-blocks":{enabled:!0},"go-with-the-flow":{enabled:!0},"its-all-relative":{enabled:!0},"absolute-removal":{enabled:!0},"fixed-banner":{enabled:!0},"sticky-elements":{enabled:!0},"art-gallery":{enabled:!0}}},{chapterIndex:4,chapterName:"Flexbox",chapterDescription:"Learn how to use the Flexbox layout model to create flexible and responsive layouts.",challenges:["In the Flex","Directions","Spacing","Cross Axis","Flexible Sizing","Pokemon Cards"],isClub:!0,isComplete:!0,xP:[15,15,15,15,15,15],internalChapterName:"flexbox",internalChallengeNames:["in-the-flex","directions","spacing","cross-axis","flexible-sizing","pokemon-cards"],badgeImage:"/images/badges/css/flexbox.png",titleImage:"/images/badges/css/flexbox.png",editorState:{"in-the-flex":{enabled:!0},directions:{enabled:!0},spacing:{enabled:!0},"cross-axis":{enabled:!0},"flexible-sizing":{enabled:!0},"pokemon-cards":{enabled:!0}}},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged CSS project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},javascript:es,"command-line":{name:"command-line",courseUrl:"/command-line",title:"Command Line (Expansion)",catalogName:"Command Line",badges:["navigation","manipulation"],tags:["tools","beginner"],description:"Learn to navigate and manipulate your computer filesystem with the command line! Master the command line with Cod\xe9dex -- for free!",searchQuery:"command line, terminal, bash, shell, cli, command prompt, git",community:{available:!1,link:"/community/"},links:["/command-line","01-in-the-beginning","02-filesystem","03-moving-day","04-house-tour","05-clean-slate","06-scavenger-hunt","07-recipes","08-cuisine-type","09-grilled-cheese","10-move-around","11-copy-that","12-music-playlists"],bannerImageLink:"/images/sql/sqlbanner.gif",courseCompleteBadge:{name:"Command Line Badge",imgSrc:"/images/badges/goldenCourseBadges/command-line.png"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:["git-github","nodejs","cpp"],authors:[{role:"Main curriculum writer (Command Line)",name:"Sonny Li"},{role:"Curriculum editors",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Navigation",chapterDescription:"Explore the command line on your own machine.",challenges:["Beginning...","Filesystem","Moving Day","House Tour","Clean Slate","Scavenger Hunt"],titleImage:"",isComplete:!0,isClub:!1,xP:[10,10,10,15,15,20],internalChapterName:"navigation",internalChallengeNames:["in-the-beginning","filesystem","moving-day","house-tour","clean-slate","scavenger-hunt"],signUpPopups:["in-the-beginning","moving-day"],badgeImage:"/images/badges/command-line/navigation.png",editorState:{"in-the-beginning":{enabled:!0},filesystem:{enabled:!0},"moving-day":{enabled:!0},"house-tour":{enabled:!0},"clean-slate":{enabled:!0},"scavenger-hunt":{enabled:!0}}},{chapterIndex:1,chapterName:"Manipulation",chapterDescription:"Manipulate the contents of a filesystem.",challenges:["Recipes","Cuisine Type","Grilled Cheese","Move Around","Copy That","Music Playlists"],titleImage:"",isComplete:!1,isClub:!0,xP:[15,15,15,15,15,20],internalChapterName:"manipulation",cheatSheets:[ei.S["command-line"][0]],internalChallengeNames:["recipes","cuisine-type","grilled-cheese","move-around","copy-that","music-playlists"],badgeImage:"/images/badges/command-line/manipulation.png",editorState:{recipes:{enabled:!0},"cuisine-type":{enabled:!0},"grilled-cheese":{enabled:!0},"move-around":{enabled:!0},"copy-that":{enabled:!0},"music-playlists":{enabled:!0}}}]}
1841,"git-github":{name:"git-github",courseUrl:"/git-github",title:"GIT & GITHUB (EXPANSION)",catalogName:"Git & GitHub",badges:["your-first-repo","exploring-repos"],tags:["tools","intermediate"],description:"Learn to use Git for version control, and GitHub to collaborate on projects, track code changes, and contribute to open-source projects.",searchQuery:"git, github, version control, git tutorial, github tutorial, command line",community:{available:!1,link:"/community/"},links:["/git-github","01-introduction","02-repositories","03-git-commands","04-git-workflow","05-local-push","06-read-me","07-git-clone","08-branch-out","09-git-and-teams","10-merges","11-pull-requests","12-yearbook"],shareButton:{"06-read-me":"https://twitter.com/intent/tweet?text=Read+Me+\uD83D\uDCD6&hashtags=CodedexReadMe+@codedex_io","12-yearbook":"https://twitter.com/intent/tweet?text=Yearbook+\uD83D\uDDD3ï¸&hashtags=CodedexYearbook+@codedex_io"},timeToComplete:0,prerequisiteCourses:["command-line"],recommendedCourses:[],bannerImageLink:"https://cdn.wallpapersafari.com/26/68/CK7JQZ.jpg",courseCompleteBadge:{name:"Git & GitHub Badge",imgSrc:"/images/badges/goldenCourseBadges/github.png"},authors:[{role:"Main curriculum writer (Git & GitHub)",name:"Estrella Popoca"},{role:"Curriculum editors",name:"Sonny"}],chapters:[{chapterIndex:0,chapterName:"Your First Repo",chapterDescription:"Create your first repository using the command line to store and share your code.",challenges:["Introduction","Repositories","Git Commands","Git Workflow","Local Push","Read Me"],titleImage:"",isComplete:!0,isClub:!1,xP:[10,10,10,15,15,20],internalChapterName:"your-first-repo",internalChallengeNames:["introduction","repositories","git-commands","git-workflow","local-push","read-me"],signUpPopups:["introduction","git-workflow"],badgeImage:"/images/badges/git-github/your-first-repo.png",editorState:{introduction:{enabled:!0},repositories:{enabled:!0},gitCommands:{enabled:!0},"git-workflow":{enabled:!0},"local-push":{enabled:!0},"read-me":{enabled:!0}}},{chapterIndex:1,chapterName:"Exploring Repos",chapterDescription:"Learn how to collaborate with others on a repo, navigate merge conflicts, and create your first pull request.",challenges:["Git Clone","Branch Out","Git & Teams","Merges","Pull Requests","Yearbook"],titleImage:"",isComplete:!0,isClub:!0,xP:[10,15,15,15,15,15],internalChapterName:"exploring-repos",internalChallengeNames:["git-clone","branch-out","git-and-teams","merges","pull-requests","yearbook"],badgeImage:"/images/badges/git-github/exploring-repos.png",editorState:{"git-clone":{enabled:!0},"branch-out":{enabled:!0},"git-and-teams":{enabled:!0},merges:{enabled:!0},"pull-requests":{enabled:!0},yearbook:{enabled:!0}}}]},"framework-valley-react":{name:"framework-valley-react",courseUrl:"/react",title:"Framework Valley: React",catalogName:"React",tags:["web-dev","intermediate","javascript"],description:"Get introduced to React, an open-source JavaScript-based web development library originally created at Facebook. Learn to code React with Cod\xe9dex -- for free!",searchQuery:"react, learn react, react basics, react tutorial, javascript",community:{available:!1,link:"/community/",description:"Need React Help?"},badges:["first-react-app","jsx-&-components","props-&-state","events","forms","hooks","data-fetching","routing"],shareButton:{"05-social-post":"https://twitter.com/intent/tweet?text=Social+Post+\uD83D\uDCF1&hashtags=CodedexSocialPost+@codedex_io","10-hot-takes-pt-2":"https://twitter.com/intent/tweet?text=Hot+Takes+Pt+2+\uD83D\uDD25&hashtags=CodedexHotTakes+@codedex_io","15-trending-now":"https://twitter.com/intent/tweet?text=Trending+Now+\uD83D\uDCC8&hashtags=CodedexTrendingNow+@codedex_io"},links:["/react","01-first-reaction","02-our-workstation","03-writing-react","04-building-blocks","05-social-post","06-band-tour","07-embedded-js","08-travel-gallery","09-hot-takes-pt-1","10-hot-takes-pt-2","11-giving-props","12-notifications","13-stopwatch","14-quiz","15-trending-now","16-online-shopping","17-tooltips","18-a-focus-in-art","19-noise-levels","20-waterfest","21-newsletter","22-high-score-i","23-high-score-ii","24-animal-rescue","25-haiku","26-travel-log","27-cookie-clicker","28-color-effects-i","29-color-effects-ii","30-barbenheimer","31-kanban-board","32-our-universe","33-now-loading","34-i-am-error","35-data-evolution","36-book-finder","37-know-your-routes","38-bowser","39-paper-route","40-link-to-the-path","41-ponoplayer"],bannerImageLink:"/images/framework-valley-react/banner.gif",courseCompleteBadge:{name:"React Badge",imgSrc:"/images/badges/golde
1841nCourseBadges/react.png"},timeToComplete:0,prerequisiteCourses:["html","css","javascript"],recommendedCourses:["command-line","git-github","nodejs"],authors:[{role:"Main curriculum writer (React)",name:"Estrella Popoca"},{role:"Curriculum editor",name:"Sonny"}],chapters:[{chapterIndex:0,chapterName:"First React App",chapterDescription:"Learn about the early fundamentals of React, and create your first component.",challenges:["First Reaction","Our Workstation","Writing React","Building Blocks","Social Post"],titleImage:"",signUpPopups:["first-reaction","writing-react"],isComplete:!0,isClub:!1,xP:[10,10,15,20,20],internalChapterName:"first-react-app",internalChallengeNames:["first-reaction","our-workstation","writing-react","building-blocks","social-post"],badgeImage:"/images/badges/earth_badge.png",type:"",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/create-a-react-app-with-vite.png",articleLink:"/react/bonus/create-a-react-app-with-vite",description:"Create a React App with Vite",internalName:"create-a-react-app-with-vite"}]},{chapterIndex:1,chapterName:"JSX & Components",chapterDescription:"Use JSX, HTML-like JavaScript code, to render pages.",challenges:["Band Tour","Embedded JS","Travel Gallery","Hot Takes Pt. 1","Hot Takes Pt. 2"],titleImage:"",signUpPopups:["band-tour","travel-gallery"],isComplete:!0,isClub:!1,xP:[15,15,20,20,25],internalChapterName:"jsx-&-components",internalChallengeNames:["band-tour","embedded-js","travel-gallery","hot-takes-pt-1","hot-takes-pt-2"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:2,chapterName:"Props & State",chapterDescription:"Learn about props, and how state changes over time in a React component. ",challenges:["Giving Props","Notifications","Stopwatch","Quiz","Trending Now"],titleImage:"",signUpPopups:["giving-props","stopwatch"],isComplete:!0,isClub:!0,xP:[15,20,20,25,25],internalChapterName:"props-&-state",internalChallengeNames:["giving-props","notifications","stopwatch","quiz","trending-now"],badgeImage:"",bonusArticle:[],type:""},{chapterIndex:3,chapterName:"Events",chapterDescription:"Use common event types like hovering and clicking to add interaction to a React application.",challenges:["Online Shopping","Tooltips","A Focus in Art","Noise Levels","WaterFest"],titleImage:"",signUpPopups:["online-shopping","waterfest"],isComplete:!0,isClub:!0,xP:[15,20,20,25,30],internalChapterName:"events",internalChallengeNames:["online-shopping","tooltips","a-focus-in-art","noise-levels","waterfest"],badgeImage:"",bonusArticle:[],type:""},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,chapterDescription:"Practice your React chops with a checkpoint project! Choose from one of three projects and submit your code when you're done. Your project is reviewed by a mentor when you request a course certificate.",challenges:["Color Picker","Progress Bar","Quote Generator"],internalChallengeNames:["color-picker","progress-bar","quote-generator"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"color-picker",emoji:"\uD83C\uDF08",backgroundColor:"#CC9400",text:"Color Picker"},{dataAosDuration:"1100",dataAos:"fade-up",link:"progress-bar",emoji:"â³",backgroundColor:"#7188DB",text:"Progress Bar"},{dataAosDuration:"1350",dataAos:"fade-up",link:"quote-generator",emoji:"\uD83D\uDCAC",backgroundColor:"#886CE4",text:"Quote Generator"}]},{chapterIndex:4,chapterName:"Forms",chapterDescription:"Build Forms effectively in React to manage data entry. ",challenges:["Newsletter","High Score I","High Score II","Animal Rescue","Haiku","Travel Log"],titleImage:"",signUpPopups:["high-score-i","travel-log"],isComplete:!0,isClub:!0,xP:[20,20,25,25,25,30],internalChapterName:"forms",internalChallengeNames:["newsletter","high-score-i","high-score-ii","animal-rescue","haiku","travel-log"],badgeImage:"",bonusArticle:[],type:""},{chapterIndex:5,chapterName:"Hooks",chapterDescription:"Learn about common hooks in React like useEffect, useState, and useContext.",challenges:["Cookie Clicker","Color Effects I","Color Effects II","Barbenheimer","Kanban Board"],titleImage:"",signUpPopups:["cookie-clicker","barbenheimer"],isComplete:!0,isClub:!0,xP:[20,20,20,20,30],internalChapterName:"hooks",internalChallengeNames:["cookie-clicker","color-effects-i","color-effects-ii","barbenheimer","kanban-board"],badgeImage:"",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/useref-article.png",articleLink:"/react/bonus/useref",description:"useRef()",internalName:"useref"}],type:""},{chapterIndex:6,chapterName:"Data Fetching",chapterDescription:"Learn how to efficie
1841ntly fetch data with an API using React hooks. ",challenges:["Our Universe","Now Loading","I Am Error","Data Evolution","Book Finder"],titleImage:"",signUpPopups:["Now Loading"],isComplete:!0,isClub:!0,xP:[20,25,25,30,35],internalChapterName:"data-fetching",internalChallengeNames:["our-universe","now-loading","i-am-error","data-evolution","book-finder"],badgeImage:"",bonusArticle:[],type:""},{chapterIndex:7,chapterName:"Routing",chapterDescription:"Complete your React journey and create routes to other pages in your application.",challenges:["Know Your Routes","Bowser","Paper Route","Link to the Path","PonoPlayer"],titleImage:"",signUpPopups:["our-universe"],isComplete:!0,isClub:!0,xP:[25,30,35,35,40],internalChapterName:"routing",internalChallengeNames:["know-your-routes","bowser","paper-route","link-to-the-path","ponoplayer"],badgeImage:"",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/react-usenavigate.png",articleLink:"/react/bonus/usenavigate",description:"useNavigate()",internalName:"usenavigate"}],type:""},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged React project!"},{type:"certificate-tracker",chapterName:"Course Certificate",isClub:!0}]},"intermediate-python":{name:"intermediate-python",courseUrl:"/intermediate-python",title:"Intermediate Python",clubCourse:!0,catalogName:"Intermediate Python",tags:["python","intermediate","data-science"],description:"Begin learning intermediate Python with data structures.",community:{available:!0,link:"/community/python",description:"Need Python Help?"},searchQuery:"python, intermediate python, python data structures, python file handling, python functions, python testing",badges:["data-structures","file-and-error-handling","functional-programming","testing"],shareButton:{"05-post-game-stats":"https://twitter.com/intent/tweet?text=Post+Game+Stats+\uD83D\uDCCA&hashtags=CodedexPostGameStats+@codedex_io","10-packing-list":"https://twitter.com/intent/tweet?text=Packing+List+\uD83D\uDCE6&hashtags=CodedexPackingList+@codedex_io","15-so-random":"https://twitter.com/intent/tweet?text=So+Random+\uD83C\uDFB2&hashtags=CodedexSoRandom+@codedex_io","20-caffeinated":"https://twitter.com/intent/tweet?text=Caffeinated+â&hashtags=CodedexCaffeinated+@codedex_io"},links:["/intermediate-python","01-hi-bestie","02-find-my-friends","03-met-museum","04-fruit-cart","05-post-game-stats","06-dear-diary","07-the-file-realm","08-uncharted-files","09-bestsellers","10-packing-list","11-full-circle","12-hola","13-grammys","14-mental-math","15-so-random","16-test-run","17-assertions","18-unexpected","19-wealth-manager","20-caffeinated"],bannerImageLink:"/images/numpy/banner.gif",timeToComplete:0,prerequisiteCourses:["python"],recommendedCourses:["numpy","gen-ai","data-structures-and-algorithms"],courseCompleteBadge:{name:"Intermediate Python Badge",imgSrc:"/images/badges/goldenCourseBadges/int-python.png"},authors:[{role:"Main curriculum writer (Python)",name:"Sonny Li"},{role:"Curriculum editors",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Data Structures",chapterDescription:"Store data in tuples, dictionaries, and sets.",challenges:["Hi Bestie!","Find My Friends","Met Museum","Fruit Cart","Post Game Stats"],titleImage:"/images/badges/intermediate-python/data-structures.png",signUpPopups:["hi-bestie","met-museum"],isComplete:!0,isClub:!0,xP:[10,10,10,15,15],internalChapterName:"data-structures",internalChallengeNames:["hi-bestie","find-my-friends","met-museum","fruit-cart","post-game-stats"],badgeImage:"/images/badges/intermediate-python/data-structures.png",editorState:{"hi-bestie":{enabled:!0},"find-my-friends":{enabled:!0},"met-museum":{enabled:!0},"fruit-cart":{enabled:!0},"post-game-stats":{enabled:!0}}},{chapterIndex:1,chapterName:"File I/O",chapterDescription:"Save and read to a file using file input & output.",challenges:["Dear Diary","The File Realm","Uncharted Files","Bestsellers","Packing List"],titleImage:"/images/badges/intermediate-python/file-and-error-handling.png",signUpPopups:["dear-diary","uncharted-files"],isComplete:!0,isClub:!0,xP:[10,10,10,10,10],internalChapterName:"file-and-error-handling",internalChallengeNames:["dear-diary","the-file-realm","uncharted-files","bestsellers","packing-list"],badgeImage:"/images/badges/intermediate-python/file-and-error-handling.png",editorState:{"dear-diary":{enabled:!0},"the-file-realm":{enabled:!0},"uncharted-files":{enabled:!0},bestsellers:{enabled:!0},"packing-list":{enabled:!0}}},{chapterIndex:2,chapterName:"Functional Programming",chapterDescription:"Write code that is easier to understand, test, and maintain with functional programming.",challenges:["Full Circle","Hola","Grammys","Mental Math","So Random"],titleImage:"/images/badges/intermediate-python/file-and-error-handling.png",signUpPopups:["full-circle","grammys"],isComplete:!0,isClub:!0,xP:[10,10,10,10,10],internalChapterName:"functional-programming",internalChallengeNames:["full-circle","hola","grammys","mental-math","so-random"],badgeImage:"/images/badges/intermediate-python/functional-programming.png",editorState:{"full-circle":{enabled:!0},hola:{enabled:!0},grammys:{enabled:!0},"mental-math":{enabled:!0},"so-random":{enabled:!0}},bonusArticle:[{imageLink:"/images/courses/articleScreenshots/decorators-and-generators.png",articleLink:"/intermediate-python/bonus/decorators-and-generators",description:"Decorators & Generators",internalName:"decorators-and-generators"}]},{chapterIndex:3,chapterName:"Testing",chapterDescription:"Learn how to write basic unit tests in Python.",challenges:["Test Run","Assertions","Unexpected","Wealth Manager","Caffeinated"],titleImage:"",signUpPopups:["test-run","unexpected"],isComplete:!0,isClub:!0,xP:[15,20,25,25,30],internalChapterName:"testing",internalChallengeNames:["test-run","assertions","unexpected","wealth-manager","caffeinated"],badgeImage:"/images/badges/intermediate-python/testing.png",editorState:{"test-run":{enabled:!0},assertions:{enabled:!0}
1841,unexpected:{enabled:!0},"wealth-manager":{enabled:!0},caffeinated:{enabled:!0}},bonusArticle:[]}]},numpy:{name:"numpy",courseUrl:"/numpy",title:"NumPy",catalogName:"NumPy",badges:["dear-data","basic-operations"],tags:["python","data-science","intermediate"],description:"Learn the fundamentals of data manipulation using NumPy! Learn to code using NumPy with Cod\xe9dex -- for free!",searchQuery:"numpy, learn numpy, numpy basics, numpy tutorial, numpy arrays, machine learning, data science, python",community:{available:!1,link:"/community"},shareButton:{"06-dear-data":"https://twitter.com/intent/tweet?text=Dear+Data+\uD83D\uDCCA&hashtags=CodedexDearData+@codedex_io","11-titanic":"https://twitter.com/intent/tweet?text=Titanic+\uD83D\uDEA2&hashtags=CodedexTitanic+@codedex_io"},links:["/numpy","01-the-notebook","02-import","03-notifications","04-population","05-bad-eggs","06-dear-data","07-tallest-building","08-walking-steps","09-shape-of-you","10-halleys-comet","11-titanic"],bannerImageLink:"/images/intermediate-python/intermediate-python.gif",courseCompleteBadge:{name:"NumPy Badge",imgSrc:"/images/badges/goldenCourseBadges/numpy.png"},timeToComplete:0,prerequisiteCourses:["python"],recommendedCourses:["intermediate-python","sql","gen-ai"],authors:[{role:"Main curriculum writer (NumPy)",name:"Sonny Li"},{role:"Curriculum editors",name:"Ellie"}],chapters:[{chapterIndex:0,chapterName:"Dear Data",chapterDescription:"Store large amounts of numbers in 1D arrays and 2D arrays.",challenges:["The Notebook","Import","Notifications","Population","Bad Eggs","Dear Data"],titleImage:"",signUpPopups:["the-notebook","notifications"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,15],internalChapterName:"dear-data",internalChallengeNames:["the-notebook","import","notifications","population","bad-eggs","dear-data"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"Basic Operations",chapterDescription:"Perform calculations using math operations and math functions on datasets.",challenges:["Tallest Building","Walking Steps","Shape of You","Halley's Comet","Titanic"],titleImage:"",signUpPopups:["tallest-building","shape-of-you"],isComplete:!0,isClub:!0,xP:[15,15,15,15,20],internalChapterName:"basic-operations",internalChallengeNames:["tallest-building","walking-steps","shape-of-you","halleys-comet","titanic"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""}]},sql:{name:"sql",courseUrl:"/sql",title:"SQL",badges:["queries","aggregates","new-table","multiple-tables"],tags:["beginner","data-science"],catalogName:"SQL",description:"Learn database basics, queries, calculations, and more to start managing and analyzing data like a pro.",searchQuery:"sql, database, queries, data",community:{available:!1,link:"/community"},shareButton:{"08-nyc-restaurants":"https://twitter.com/intent/tweet?text=NYC+Restaurants+\uD83C\uDF7Dï¸&hashtags=CodedexRestaurants+@codedex_io","15-video-games":"https://twitter.com/intent/tweet?text=Video+Games+\uD83C\uDFAE&hashtags=CodedexVideoGames+@codedex_io","21-bffs":"https://twitter.com/intent/tweet?text=BFFs+\uD83D\uDC6F&hashtags=CodedexBFFs+@codedex_io"},links:["/sql","01-introduction","02-select","03-streaming-wars","04-rotten-tomatoes","05-like","06-golden-age","07-order-by","08-nyc-restaurants","09-music-playlist","10-counting-rows","11-old-&-new","12-total-playtime","13-billboard-hot-100","14-group-by","15-video-games","16-create-table","17-insert-into","18-alter-table","19-update-set","20-delete-from","21-bffs","22-joins","23-locked-in","24-inner-join","25-left-join","26-students-&-teachers","27-online-shop"],bannerImageLink:"/images/sql/seo-bannergif.gif",authors:[{role:"Main curriculum writer (NumPy)",name:"Sonny Li"},{role:"Curriculum editor",name:"Ellie"}],courseCompleteBadge:{name:"SQL Badge",imgSrc:"/images/badges/goldenCourseBadges/sql.png"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:["python","numpy","command-line"],chapters:[{chapterIndex:0,chapterName:"Queries",chapterDescription:"Write queries that the database understands using a shows table.",challenges:["Introduction","Select","Streaming Wars","Rotten Tomatoes","Like","Golden Age","ORDER BY","NYC Restaurants"],titleImage:"",signUpPopups:["introduction","streaming-wars"],isComplete:!0,isClub:!1,xP:[10,10,10,15,15,20,20,20],internalChapterName:"queries",internalChallengeNames:["introduction","select","streaming-wars","rotten-tomatoes","like","golden-age","order-by","nyc-restaurants"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/sql-bonus.png",articleLink:"/sql/bonus/relational-databases",description:"Relational Databases",internalName:"relational-databases"}],type:""},{chapterIndex:1,chapterName:"Aggregates",chapterDescription:"Perform math calculations using aggregate functions.",challenges:["Music Playlist","Counting Rows","Old & New","Total Playtime","Billboard 100","GROUP BY","Video Games"],titleImage:"",signUpPopups:["music-playlist","old-&-new"],isComplete:!0,isClub:!0,xP:[10,15,15,15,15,20,20],internalChapterName:"aggregates",internalChallengeNames:["music-playlist","counting-rows","old-&-new","total-playtime","billboard-hot-100","group-by","video-games"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:2,chapterName:"New Table",chapterDescription:"Create a new table and add/update/delete data.",challenges:["Create Table","Insert Into","Alter Table","Update Set","Delete From","BFFs"],titleImage:"",signUpPopups:["create-table","alter-table"],isComplete:!0,isClub:!0,xP:[10,10,10,10,10,15],internalChapterName:"new-table",internalChallengeNames:["create-table","insert-into","alter-table","update-set","delete-from","bffs"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/sql-bonus.png",articleLink:"/sql/bonus/sqlite",description:"Setting Up SQLite Locally",internalName:"sqlite"}],type:""},{chapterIndex:3,chapterName:"Multiple Tables",chapterDescription:"Interacting with multiple tables using joins.",challenges:["Joins","Locked In","Inner Join","Left Join","Students & Teachers","Online Shop"],titleImage:"",signUpPopups:["introduction","inner-join"],isComplete:!0,isClub:!0,xP:[15,15,15,20,20,25],internalChapterName:"multiple-tables",internalChallengeNames:["joins","locked-in","inner-join","left-join","students-&-teachers","online-shop"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/sql-cte.png",articleLink:"/sql/bonus/common-table-expression-cte-and-with",description:"Common Table Expression (CT
1841E) and WITH",internalName:"common-table-expression-cte-and-with"}],type:""}]},"intermediate-javascript":{name:"intermediate-javascript",courseUrl:"/intermediate-javascript",clubCourse:!0,title:"Intermediate JavaScript",catalogName:"Intermediate JavaScript",badges:["ecmascript","async-js"],tags:["web-dev","intermediate","javascript"],description:"Unleash the power of JavaScript with asynchronous programming.",searchQuery:"javascript, js, web development, web dev, frontend, frontend dev",community:{available:!0,link:"/community"},shareButton:{"06-reading-lists":"https://twitter.com/intent/tweet?text=Reading+Lists+\uD83D\uDCDA&hashtags=CodedexReadingLists+@codedex_io","12-cosmic-birthday":"https://twitter.com/intent/tweet?text=Cosmic+Birthday+\uD83C\uDF82&hashtags=CodedexCosmicBirthday+@codedex_io"},links:["/intermediate-javascript","01-introduction","02-arrow-logic","03-99-bottles","04-most-streamed-songs","05-pack-your-bags","06-reading-lists","07-on-the-side","08-subscribe-button","09-random-numbers","10-jokebook","11-trivia-night","12-cosmic-birthday"],bannerImageLink:"https://i.imgur.com/If0k6Qj.gif",courseCompleteBadge:{name:"Intermediate JavaScript Badge",imgSrc:"/images/badges/goldenCourseBadges/int-js.png"},timeToComplete:0,prerequisiteCourses:["javascript"],recommendedCourses:["framework-valley-react","nodejs","p5js"],authors:[{role:"Main curriculum writer (Git & GitHub)",name:"Estrella Popoca"},{role:"Curriculum editors",name:"Sonny"}],chapters:[{chapterIndex:0,chapterName:"ECMAScript",chapterDescription:"Explore how modern JavaScript lets you write functions and declarations more efficiently.",challenges:["Introduction","Arrow Logic","99 Bottles","Most Streamed Songs","Pack Your Bags","Reading Lists"],titleImage:"/images/badges/python/hello-world.png",signUpPopups:["arrow-logic","pack-your-bags"],isComplete:!0,isClub:!0,xP:[10,10,15,15,15,15],internalChapterName:"ecmascript",editorState:{introduction:{enabled:!0},"arrow-logic":{enabled:!0},"99-bottles":{enabled:!0},"most-streamed-songs":{enabled:!0},"pack-your-bags":{enabled:!0},"reading-lists":{enabled:!0}},internalChallengeNames:["introduction","arrow-logic","99-bottles","most-streamed-songs","pack-your-bags","reading-lists"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[]},{chapterIndex:1,chapterName:"Async JS",chapterDescription:"Create asynchronous functions to practice data fetching. ",challenges:["On The Side","Subscribe Button","Random Numbers","Jokebook","Trivia Night","Cosmic Birthday"],titleImage:"/images/badges/intermediate-javascript/async-js.png",signUpPopups:["on-the-side","jokebook"],isComplete:!0,isClub:!0,xP:[10,15,15,15,20,25],internalChapterName:"async-js",editorState:{"on-the-side":{enabled:!0},"subscribe-button":{enabled:!0},"random-numbers":{enabled:!0},jokebook:{enabled:!0},"trivia-night":{enabled:!0},"cosmic-birthday":{enabled:!0}},internalChallengeNames:["on-the-side","subscribe-button","random-numbers","jokebook","trivia-night","cosmic-birthday"],badgeImage:"/images/badges/intermediate-javascript/async-js.png",bonusArticle:[]}]},"gen-ai":{name:"gen-ai",courseUrl:"/gen-ai",title:"GenAI",catalogName:"GenAI",badges:["how-ai-thinks","prompt-engineering","embeddings","limitations-safety"],description:"Look inside language models to see how they actually work. Then learn prompting, embeddings, and where AI gets things wrong.",searchQuery:"gen ai, generative ai, ai for beginners, large language models, llm, chatgpt, openai, claude, tokens, tokenization, prompting, prompt engineering, few-shot prompting, chain of thought, embeddings, vector embeddings, semantic search, rag, ai safety, hallucinations, prompt injection, ai bias, python, machine learning, ai",community:{available:!1,link:"/community/"},authors:[{role:"Main curriculum writer",name:"Dharma Jethva"},{role:"Curriculum editor",name:"Sonny"}],recommendedCourses:["machine-learning","numpy","pandas"],shareButton:{"06-the-big-picture":"https://twitter.com/intent/tweet?text=I+built+my+own+next-word+predictor+\uD83E\uDD16&hashtags=CodedexHowAIThinks+@codedex_io","12-prompt-recap":"https://twitter.com/intent/tweet?text=I+leveled+up+my+prompting+â¨&hashtags=CodedexPromptEngineering+@codedex_io","17-semantic-search":"https://twitter.com/intent/tweet?text=I+built+a+semantic+search+engine+\uD83D\uDD0E&hashtags=CodedexEmbeddings+@codedex_io","24-ai-as-a-tool":"https://twitter.com/intent/tweet?text=I+learned+how+to+use+AI+like+a+pro+\uD83D\uDEE1ï¸&hashtags=CodedexLimitationsAndSafety+@codedex_io"},links:["/gen-ai","01-magic-trick","02-tokens","03-patterns","04-counting","05-predictor","06-the-big-picture","07-the-prompt-is-everything","08-be-specific","09-set-the-role","10-show-dont-tell","11-think-step-by-step","12-prompt-recap","13-from-patterns-to-meaning","14-words-as-numbers","15-bag-of-words","16-measuring-similarity","17-semantic-search","18-embeddings-recap","19-the-confident-wrong-answer","20-the-cutoff-problem","21-prompt-injection","22-bias-in-the-mirror","23-trust-but-verify","24-ai-as-a-tool"],newCourse:!0,tags:["creative","intermediate","python","ai"],courseCompleteBadge:{name:"GenAI badge",imgSrc:"/images/badges/golde
1841nCourseBadges/gen-ai.png"},timeToComplete:0,prerequisiteCourses:["python"],bannerImageLink:"/images/gen-ai/genai-banner.webp",chapters:[{chapterIndex:0,chapterName:"How AI Thinks",chapterDescription:"Peek inside a language model and see how it turns text into tokens, finds patterns, and predicts what comes next.",challenges:["The Magic Trick","Tokens","Patterns","Counting","Predictor","The Big Picture"],titleImage:"",signUpPopups:["magic-trick","patterns"],isComplete:!0,isClub:!1,xP:[10,10,15,15,20,15],internalChapterName:"how-ai-thinks",internalChallengeNames:["magic-trick","tokens","patterns","counting","predictor","the-big-picture"],badgeImage:"/images/badges/gen-ai/how-ai-thinks.png",type:""},{chapterIndex:1,chapterName:"Prompt Engineering",chapterDescription:"Learn the moves that turn vague prompts into reliable results: specificity, roles, examples, and step-by-step reasoning.",challenges:["The Prompt is Everything","Be Specific","Set the Role","Show, Don't Tell","Think Step by Step","Prompt Recap"],titleImage:"",signUpPopups:["the-prompt-is-everything","show-dont-tell"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,10],internalChapterName:"prompt-engineering",internalChallengeNames:["the-prompt-is-everything","be-specific","set-the-role","show-dont-tell","think-step-by-step","prompt-recap"],badgeImage:"/images/badges/gen-ai/prompt-engineering.png",type:""},{chapterIndex:2,chapterName:"Embeddings",chapterDescription:"Move past raw frequency counts. See how words become numbers that carry meaning, and turn prediction into understanding.",challenges:["From Patterns to Meaning","Words as Numbers","Bag of Words","Measuring Similarity","Semantic Search","Embeddings Recap"],titleImage:"",signUpPopups:["from-patterns-to-meaning","bag-of-words"],isComplete:!0,isClub:!1,xP:[10,15,15,20,20,15],internalChapterName:"embeddings",internalChallengeNames:["from-patterns-to-meaning","words-as-numbers","bag-of-words","measuring-similarity","semantic-search","embeddings-recap"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:3,chapterName:"Limitations & Safety",chapterDescription:"Hallucinations, knowledge cutoffs, bias, and prompt injection. Learn where LLMs go wrong and how to use them without getting burned.",challenges:["The Confident Wrong Answer","The Cutoff Problem","Prompt Injection","Bias in the Mirror","Trust but Verify","AI As a Tool"],titleImage:"",signUpPopups:["the-confident-wrong-answer","prompt-injection"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,20],internalChapterName:"limitations-safety",internalChallengeNames:["the-confident-wrong-answer","the-cutoff-problem","prompt-injection","bias-in-the-mirror","trust-but-verify","ai-as-a-tool"],badgeImage:"/images/badges/earth_badge.png",type:""}]},p5js:{name:"p5js",courseUrl:"/p5js",title:"p5.js",catalogName:"p5.js",badges:["canvas-elements"],description:"P5.js is a JavaScript library that makes coding accessible for artists, designers, and beginners.",searchQuery:"p5.js, p5js, javascript, js, web development, web dev, frontend, creative coding",community:{available:!1,link:"/community/"},shareButton:{"06-breakout":"https://twitter.com/intent/tweet?text=I+just+completed+the+Breakout+challenge+on+Cod\xe9dex!+\uD83C\uDF89&hashtags=CodedexBreakout+@codedex_io"},links:["/p5js","01-your-first-canvas","02-brat-summer","03-the-shape-tool","04-motion-picture","05-wasd","06-breakout"],tags:["web-dev","creative","intermediate","javascript"],courseCompleteBadge:null,timeToComplete:0,prerequisiteCourses:[],recommendedCourses:[],newCourse:!1,bannerImageLink:"/images/p5/p5courseimage.gif",chapters:[{chapterIndex:0,chapterName:"Canvas Elements",chapterDescription:"Learn the fundamentals of the p5.js library to get started with creating interactive and colorful one-pagers.",challenges:["Your First Canvas","Brat Summer","The Shape Tool","Motion Picture","WASD","Breakout"],titleImage:"",signUpPopups:["your-first-canvas","the-shape-tool"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,20],internalChapterName:"canvas-elements",internalChallengeNames:["your-first-canvas","brat-summer","the-shape-tool","motion-picture","wasd","breakout"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Coming Soon",chapterDescription:"Chapter 2 of p5.js coming soon!",type:"coming-soon"}]},cpp:eo,java:el,nodejs:{name:"nodejs",courseUrl:"/nodejs",title:"Node.js",clubCourse:!0,badges:["hello-world","modules","servers","http-methods"],catalogName:"Node.js",description:"Combine JavaScript with the power of Node.jsâunleash your full-stack potential with server-side programming & dynamic web applications!",community:{available:!1,link:"/community/"},searchQuery:"nodejs, node.js, javascript, js, web development, web dev, backend, backend dev",links:["/nodejs","01-what-is-nodejs","02-getting-started","03-average-joe","04-favorite-lyrics","05-golden-record","06-built-in-modules","07-dear-diary","08-unwritten","09-blank-page","10-chaotic-desktop","11-sleepyos","12-affirmations","13-tiny-server","14-deep-dive","15-emoji-story","16-cyber-ramen-shop","17-dream-house","18-pokemon-center","19-oh-crud","20-get-counter","21-post-tweet","22-put-and-patch-your-bio","23-delete-status","24-mood-tracker"],bannerImageLink:"/images/courses/nodejsbannerseo.png",newCourse:!1,tags:["nodejs","intermediate","javascript"],courseCompleteBadge:{name:"Node.js Badge",imgSrc:"/images/badges/golde
1841nCourseBadges/node.png"},timeToComplete:0,prerequisiteCourses:["html","css","javascript"],recommendedCourses:["framework-valley-react","git-github"],authors:[{role:"Main curriculum writer (Node.js)",name:"Julien Kris"},{role:"Curriculum editors",name:"Sonny, Ellie"}],chapters:[{chapterIndex:0,chapterName:"Hello World",chapterDescription:"Learn the basics of Node.js and write your first program!",challenges:["What is Node.js?","Getting Started","Average Joe","Favorite Lyrics","Golden Record"],titleImage:"",signUpPopups:["what-is-nodejs","favorite-lyrics"],isComplete:!0,isClub:!0,xP:[10,10,10,15,20],internalChapterName:"hello-world",bonusArticle:[],internalChallengeNames:["what-is-nodejs","getting-started","average-joe","favorite-lyrics","golden-record"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Modules",chapterDescription:"Learn the basics of Node.js modules!",challenges:["Built-In Modules","Dear Diary","Unwritten","Blank Page","Chaotic Desktop","SleepyOS","Affirmations"],titleImage:"",signUpPopups:["unwritten","sleepyos"],isComplete:!0,isClub:!0,xP:[10,10,10,10,15,15,20],internalChapterName:"modules",bonusArticle:[],internalChallengeNames:["built-in-modules","dear-diary","unwritten","blank-page","chaotic-desktop","sleepyos","affirmations"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Servers",chapterDescription:"Learn the basics of creating a server with Node.js!",challenges:["Tiny Server","Deep Dive","Emoji Story","Cyber Ramen Shop","Dream House","Pokemon Center"],titleImage:"",signUpPopups:["tiny-server","emoji-story"],isComplete:!0,isClub:!0,xP:[10,10,15,15,20,25],internalChapterName:"servers",bonusArticle:[],internalChallengeNames:["tiny-server","deep-dive","emoji-story","cyber-ramen-shop","dream-house","pokemon-center"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:3,chapterName:"HTTP Methods",chapterDescription:"Learn the basics of HTTP methods",challenges:["Oh, CRUD","GET Counter","POST Tweet","PUT & PATCH Your Bio","DELETE Status","Mood Tracker"],titleImage:"",signUpPopups:["tiny-server","emoji-story"],isComplete:!0,isClub:!0,xP:[10,10,15,15,20,25],internalChapterName:"http-methods",bonusArticle:[],internalChallengeNames:["oh-crud","get-counter","post-tweet","put-and-patch-your-bio","delete-status","mood-tracker"],badgeImage:"/images/badges/earth_badge.png",type:""}]},"data-structures-and-algorithms":{name:"data-structures-and-algorithms",courseUrl:"/data-structures-and-algorithms",clubCourse:!0,title:"Data Structures & Algorithms",badges:["introduction","list-algorithms"],catalogName:"Data Structures & Algorithms",description:"Learn fundamental concepts for organizing, storing, and processing data in Python to ace technical interviews, LeetCode problems, or a college DSA class!",searchQuery:"data structures, algorithms, python, coding interview, computer science",community:{available:!1,link:"/community/"},shareButton:{"05-amazon-delivery":"https://twitter.com/intent/tweet?text=Amazon+Delivery+\uD83D\uDE9A&hashtags=CodedexAmazonDelivery+@codedex_io"},links:["/data-structures-and-algorithms","01-welcome","02-data-structures","03-algorithms","04-efficiency","05-amazon-delivery","06-favorite-shows","07-linear-search","08-binary-search","09-selection-sort-i","10-selection-sort-ii","11-efficiency","12-review"],courseCompleteBadge:null,timeToComplete:0,prerequisiteCourses:["python"],recommendedCourses:[],bannerImageLink:"/images/courses/dsabanner.png",newCourse:!1,tags:["data-structures","intermediate","computer-science"],chapters:[{chapterIndex:0,chapterName:"Introduction",chapterDescription:"Get started with the basics of data structures and algorithms.",challenges:["Welcome","Data Structures","Algorithms","Efficiency","Amazon Delivery"],titleImage:"",signUpPopups:["welcome","algorithms"],isComplete:!0,isClub:!0,xP:[10,10,10,10,15],internalChapterName:"introduction",bonusArticle:[],internalChallengeNames:["welcome","data-structures","algorithms","efficiency","amazon-delivery"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"List Algorithms",chapterDescription:"Get started with the basics of list.",challenges:["Favorite Shows","Linear Search","Binary Search","Selection Sort I","Selection Sort II","Efficiency","Review"],titleImage:"",signUpPopups:["favorite-shows","algorithms"],isComplete:!0,isClub:!0,xP:[10,15,15,15,15,15,20],internalChapterName:"list-algorithms",bonusArticle:[],internalChallengeNames:["favorite-shows","linear-search","binary-search","selection-sort-i","selection-sort-ii","efficie
1841ncy","review"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Coming Soon",chapterDescription:"Chapter 3 of DSA coming soon!",type:"coming-soon"}]},phaser:{name:"phaser",courseUrl:"/phaser",title:"phaser",tags:["intermediate","creative","game-development","javascript"],badges:["your-first-quest","sprites-sprites-sprites","triple-jump","new-worldbuilder"],catalogName:"Phaser",description:"Phaser is a powerful HTML5 game framework for creating 2D games on the web. This course will guide you through the fundamentals of game dev, from setting up your environment to creating interactive game mechanics.",searchQuery:"phaser, phaser.js, game development, game dev, javascript, js, web development, web dev, frontend, creative coding",community:{available:!1,link:"/community"},links:["/phaser","01-press-start","02-new-game","03-ready-set-config","04-the-render-trio","05-wasd","06-power-up","07-happy-place","08-onward-hero","09-at-the-ready","10-spellbound-steps","11-object-of-the-game","12-the-turning-point","13-world-weaver","14-at-the-arcade","15-just-passing-through","16-solid-ground","17-punch-a-higher-floor","18-moving-the-goalposts","19-collect-m-all","20-obstacle-course","21-final-round","22-high-score","23-enemies","24-game-over","25-fresh-start","26-siren-song","27-final-boss"],bannerImageLink:"/images/banners/custom-phaser.gif",authors:[{role:"Main curriculum writer (Phaser)",name:"Julien"},{role:"Curriculum editor",name:"Sonny"}],courseCompleteBadge:{name:"Phaser badge",imgSrc:"/images/badges/goldenCourseBadges/phaser.png"},timeToComplete:0,prerequisiteCourses:["html","css","javascript"],recommendedCourses:["html","javascript"],chapters:[{chapterIndex:0,chapterName:"Your First Quest",chapterDescription:"Learn how to set up your development environment and understand the basics of Phaser.",challenges:["Press Start","New Game","Ready, Set, Config","The Render Trio","WASD","Power Up","Happy Place"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,10,10,15,15,15,20],internalChapterName:"your-first-quest",internalChallengeNames:["press-start","new-game","ready-set-config","the-render-trio","wasd","power-up","happy-place"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"Sprites, Sprites, Sprites!",chapterDescription:"In this chapter, you'll learn how to make your hero run! You'll implement basic movement mechanics and understand how to handle user input in Phaser.",challenges:["Onward Hero","At the Ready","Spellbound Steps","Object of the Game","The Turning Point","World Weaver"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,15,15,20,20,25],internalChapterName:"sprites-sprites-sprites",internalChallengeNames:["onward-hero","at-the-ready","spellbound-steps","object-of-the-game","the-turning-point","world-weaver"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:2,chapterName:"Triple Jump",chapterDescription:"In this chapter, you'll learn how to make your hero run! You'll implement basic movement mechanics and understand how to handle user input in Phaser.",challenges:["At the Arcade","Just Passing Through","Solid Ground","Punch a Higher Floor","Moving the Goalposts","Collect 'm All","Obstacle Course"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,15,15,20,25],internalChapterName:"triple-jump",internalChallengeNames:["at-the-arcade","just-passing-through","solid-ground","punch-a-higher-floor","moving-the-goalposts","collect-m-all","obstacle-course"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:3,chapterName:"New Worldbuilder",chapterDescription:"",challenges:["Final Round","High Score","Enemies","Game Over","Fresh Start","Siren Song","Final Boss"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,15,15,20,20,25],internalChapterName:"new-worldbuilder",internalChallengeNames:["final-round","high-score","enemies","game-over","fresh-start","siren-song","final-boss"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""}]},pandas:{name:"pandas",courseUrl:"/pandas",title:"Pandas",badges:["dataframe","data-cleaning"],tags:["beginner","data-science","python"],newCourse:!0,catalogName:"Pandas",description:"Learn how to use Python's go-to library for data analysis, Pandas, to clean, organize, and analyze data with ease.",searchQuery:"pandas, data analysis, data manipulation, python, data science, dataframe, series, machine learning",community:{available:!1,link:"/community"},shareButton:{},links:["/pandas","01-why-pandas","02-contact-list","03-mobile-apps","04-dungeons-&-dragons-i","05-dungeons-&-dragons-ii","06-sorting","07-review","08-messy-data","09-missing-mail","10-double-booking","11-somethings-fishy","12-partiful-responses","13-the-final-scrub"],bannerImageLink:"/images/css/banner.png",authors:[{role:"Main curriculum writer (Pandas)",name:"Alex Kuntz"},{role:"Curriculum editor",name:"Sonny"}],courseCompleteBadge:{name:"Pandas badge",imgSrc:"/images/badges/golde
1841nCourseBadges/pandas.png"},timeToComplete:0,prerequisiteCourses:["python","numpy"],recommendedCourses:["numpy","intermediate-python"],chapters:[{chapterIndex:0,chapterName:"DataFrame",chapterDescription:"Meet DataFrames, the core of the Pandas library, where data lives in rows and columns.",challenges:["Why Pandas?","Contact List","Mobile Apps","Dungeons & Dragons I","Dungeons & Dragons II","Sorting, Renaming, and Adding Columns","Review"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,10,10,10,10,10,15],internalChapterName:"dataframe",internalChallengeNames:["why-pandas","contact-list","mobile-apps","dungeons-&-dragons-i","dungeons-&-dragons-ii","sorting","review"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[{imageLink:"/images/courses/articleScreenshots/setup-local-env.png",articleLink:"/pandas/bonus/importing-datasets",description:"Importing Datasets with Pandas",internalName:"importing-datasets"}],type:""},{chapterIndex:1,chapterName:"Data Cleaning",chapterDescription:"Tidy up messy, missing, and duplicated data so your DataFrames are ready for analysis.",challenges:["Messy Data?","Missing Mail","Double Booking","Something's Fishy...","Partiful Responses","The Final Scrub"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,15,15,15,15,20],internalChapterName:"data-cleaning",internalChallengeNames:["messy-data","missing-mail","double-booking","somethings-fishy","partiful-responses","the-final-scrub"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""}]},"machine-learning":{name:"machine-learning",courseUrl:"/machine-learning",title:"Machine Learning",badges:["intro-to-machine-learning"],clubCourse:!0,newCourse:!0,tags:["intermediate","computer-science","data-science","ai"],catalogName:"Machine Learning",description:"Learn the fundamentals of machine learning and build models that can learn from data to make predictions.",searchQuery:"machine learning, supervised learning, unsupervised learning, regression, classification, clustering, python, data science",community:{available:!1,link:"/community"},shareButton:{},links:["/machine-learning","01-welcome-to-machine-learning","02-supervised-regression","03-supervised-classification","04-unsupervised-clustering","05-blind-spots","06-recap"],bannerImageLink:"/images/machine-learning/machine-learning-header.png",authors:[{role:"Main curriculum writer (Machine Learning)",name:"Sonny"},{role:"Curriculum editor",name:"Sonny"}],courseCompleteBadge:null,timeToComplete:0,prerequisiteCourses:["python","numpy","pandas","matplotlib"],recommendedCourses:["pandas","intermediate-python"],chapters:[{chapterIndex:0,chapterName:"Intro to Machine Learning",chapterDescription:"Get started with ML with an intro to supervised learning vs. unsupervised learning.",challenges:["Welcome to Machine Learning","Supervised: Regression","Supervised: Classification","Unsupervised: Clustering","Blind Spots","Recap"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,15,15,20],internalChapterName:"intro-to-machine-learning",internalChallengeNames:["welcome-to-machine-learning","supervised-regression","supervised-classification","unsupervised-clustering","blind-spots","recap"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"Coming Soon",chapterDescription:"Chapter 2 of Machine Learning coming soon!",type:"coming-soon"},{chapterIndex:2,chapterName:"Coming Soon",chapterDescription:"Chapter 3 of Machine Learning coming soon!",type:"coming-soon"}]},"github-copilot":{name:"github-copilot",courseUrl:"/github-copilot",title:"GitHub Copilot",badges:["setting-up","vibe-coding-a-gui-app"],tags:["intermediate","ai"],searchQuery:"github copilot, ai coding assistant, code completion, ai programming, ai",catalogName:"GitHub Copilot",description:"Learn how to use GitHub Copilot, your AI pair programmer, which helps you write code faster and with less effort.",community:{available:!1,link:"/community"},shareButton:{},links:["/github-copilot","01-vibe-check","02-setting-up","03-test-drive","04-review","05-rock-paper-scissors","06-inline-chat","07-copilot-chat","08-slash-commands","09-copilot-edits","10-code-review","11-calculator"],bannerImageLink:"/images/courses/github-copilots.gif",authors:[{role:"Main curriculum writer (GitHub Copilot)",name:"Sonny"},{role:"Curriculum editor",name:"Sonny"}
1841],courseCompleteBadge:{imgSrc:"/images/badges/goldenCourseBadges/github-copilot.png",name:"GitHub Copilot"},timeToComplete:0,prerequisiteCourses:["python"],recommendedCourses:["python","javascript"],chapters:[{chapterIndex:0,chapterName:"Setting Up",chapterDescription:"Get started with GitHub Copilot and learn the basics of how it works.",challenges:["Vibe Check","Setting Up","Test Drive","Review"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[50,10,10,10],internalChapterName:"setting-up",internalChallengeNames:["vibe-check","setting-up","test-drive","review"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"Vibe Coding a GUI App",chapterDescription:"Build a GUI application using Python's Tkinter library and GitHub Copilot.",challenges:["Rock Paper Scissors","Inline Chat","Copilot Chat","Slash Commands","Copilot Edits","Code Review","Calculator"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,10,10,15,15,15,20],internalChapterName:"vibe-coding-a-gui-app",internalChallengeNames:["rock-paper-scissors","inline-chat","copilot-chat","slash-commands","copilot-edits","code-review","calculator"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""}]},lua:{name:"lua",courseUrl:"/lua",title:"Lua",badges:["ola-lua","control-flow-and-loops","tables-and-functions","objects"],newCourse:!0,tags:["intermediate","game-development"],searchQuery:"lua, lua programming, lua scripting, lua language, lua coding",catalogName:"Lua",description:"Learn programming fundamentals with Lua to kickstart your game development journey with Roblox Studio and Lua frameworks in this fast-paced course. ",community:{available:!1,link:"/community"},shareButton:{},links:["/lua","01-opening-scene","02-player-card","03-score-calculation","04-title-sequence","05-fatal-error","06-what-if","07-boss-battle","08-ready-mode","09-enemy-spawn","10-final-battle","11-heroes-and-villains","12-on-a-quest","13-inventory","14-at-the-function","15-global-stars","16-merchant-merlin","17-hey-link","18-power-ups","19-healing-action","20-spells","21-on-an-adventure"],bannerImageLink:"/images/courses/lua-banner.gif",authors:[{role:"Main curriculum writer",name:"Ellie Popoca"},{role:"Curriculum editor",name:"Sonny"}],courseCompleteBadge:{name:"Lua badge",imgSrc:"/images/badges/goldenCourseBadges/lua.png"},timeToComplete:0,prerequisiteCourses:[],recommendedCourses:["phaser","javascript"],chapters:[{chapterIndex:0,chapterName:"Ol\xe1, Lua",chapterDescription:"Get started with Lua by learning the basics of the language and writing your first program.",challenges:["Opening Scene","Player Card","Score Calculation","Title Sequence","Fatal Error"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!1,xP:[10,10,10,10,25],internalChapterName:"ola-lua",internalChallengeNames:["opening-scene","player-card","score-calculation","title-sequence","fatal-error"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:1,chapterName:"Control Flow and Loops",chapterDescription:"Learn how to control the flow of your programs using conditionals and loops in Lua.",challenges:["What If","Boss Battle","Ready Mode","Enemy Spawn","Final Battle"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,25],internalChapterName:"control-flow-and-loops",internalChallengeNames:["what-if","boss-battle","ready-mode","enemy-spawn","final-battle"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:2,chapterName:"Tables and Functions",chapterDescription:"Master tables and functions to organize your code and create reusable components in Lua.",challenges:["Heroes and Villains","On a Quest","Inventory","At the Function","Global Stars","Merchant Merlin"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,10,25],internalChapterName:"tables-and-functions",internalChallengeNames:["heroes-and-villains","on-a-quest","inventory","at-the-function","global-stars","merchant-merlin"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{chapterIndex:3,chapterName:"Objects",chapterDescription:"Understand the principles of object-oriented programming and how to implement them in Lua.",challenges:["Hey Link","Power Ups","Healing Action","Spells","On an Adventure"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,25],internalChapterName:"objects",internalChallengeNames:["hey-l
1841ink","power-ups","healing-action","spells","on-an-adventure"],badgeImage:"/images/badges/earth_badge.png",bonusArticle:[],type:""},{type:"final-project",chapterName:"Final Project",isClub:!0,chapterDescription:"Ready to start building? Use the skills you've gained throughout the course to build out a fully-fledged Lua project!"}]},matplotlib:eu,"c-sharp":{name:"c-sharp",courseUrl:"/c-sharp",title:"C#",badges:["hello-world","variables","control-flow","loops","arrays"],catalogName:"C#",description:"Learn C# and master the fundamentals of programming with one of the most versatile languages!",searchQuery:"c#, csharp, c sharp, programming, coding, dotnet, .net, game development, unity",community:{available:!1,link:"/community/"},shareButton:{"05-personal-billboard":"https://twitter.com/intent/tweet?text=Personal+Billboard+\uD83C\uDFA8&hashtags=CodedexPersonalBillboard+@codedex_io","11-giant-plushie":"https://twitter.com/intent/tweet?text=Giant+Plushie+\uD83E\uDDF8&hashtags=CodedexGiantPlushie+@codedex_io"},links:["/c-sharp","01-playing-it-cool","02-baby-names","03-dream-journal","04-hot-take","05-personal-billboard","06-typecast","07-party-animal","08-celebrity-crush","09-math-is-mathing","10-year-of-the-x","11-giant-plushie","12-weekend-plans","13-the-reaper","14-plot-twist","15-basement-show","16-invite-only","17-aura-checker","18-love-hate-relationship","19-tickle-monster","20-disappearing-act","21-robocaller","22-in-the-spotlight","23-uno-reverse","24-mystery-machine","25-say-uncle","26-best-kept-secret","27-array-of-sunshine","28-soundtrack-to-my-life","29-hidden-gems","30-world-cup","31-notification-overload","32-emotional-support-plushie","33-doomsday-prepper","34-meet-the-methods","35-make-some-noise","36-the-cookout","37-ticket-pool","38-return-to-sender","39-calling-all-hackers"],courseCompleteBadge:null,bannerImageLink:"/images/csharp/charp.webp",newCourse:!0,tags:["c-sharp","beginner","computer-science"],chapters:[{chapterIndex:0,chapterName:"Hello World",chapterDescription:"Learn how to write your first C# program by outputting messages to the console.",challenges:["Playing It COOL","Baby Names","Dream Journal","Hot Take","Personal Billboard"],titleImage:"",signUpPopups:["playing-it-cool","dream-journal"],isComplete:!0,isClub:!1,xP:[10,10,10,15,20],internalChapterName:"hello-world",internalChallengeNames:["playing-it-cool","baby-names","dream-journal","hot-take","personal-billboard"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Variables",chapterDescription:"Create variables and learn about data types, arithmetic operators, and user input.",challenges:["Typecast","Party Animal","Celebrity Crush","Math Is Mathing","Year of the X","Giant Plushie"],titleImage:"",signUpPopups:["typecast","celebrity-crush"],isComplete:!0,isClub:!1,xP:[10,10,15,15,15,20],internalChapterName:"variables",internalChallengeNames:["typecast","party-animal","celebrity-crush","math-is-mathing","year-of-the-x","giant-plushie"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Control Flow",chapterDescription:'Explore how programs "make decisions" with if/else statements, relational operators, *and* logical operators.',challenges:["Weekend Plans","The Reaper","Plot Twist","Basement Show","Invite Only","Aura Checker","Love Hate Relationship"],titleImage:"",signUpPopups:["weekend-plans","the-reaper"],isComplete:!0,isClub:!0,xP:[10,10,10,15,15,15,20],internalChapterName:"control-flow",internalChallengeNames:["weekend-plans","the-reaper","plot-twist","basement-show","invite-only","aura-checker","love-hate-relationship"],challengePack:{imageLink:"",articleLink:"/challenges/control-flow/swipe-right",description:"Control Flow",internalName:"control-flow-c-sharp",internalChallengeLinks:["swipe-right","conspiracy-theories","karaoke-night","trading-cards","pr-nightmare"],packXp:70},badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:3,chapterName:"Loops",chapterDescription:"Repeat a block of code with while loops and for loops over, and over, and over again.",challenges:["Tickle Monster","Disappearing Act","Robocaller","In The Spotlight","Uno Reverse","Mystery Machine","Say Uncle","Best Kept Secret"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,10,15,15,15,20],internalChapterName:"loops",internalChallengeNames:["tickle-monster","disappearing-act","robocaller","in-the-spotlight","uno-reverse","mystery-machine","say-uncle","best-kept-secret"],badgeImage:"/images/badges/earth_badge.png",type:""},{type:"checkpoint-project",chapterName:"Checkpoint Project",isClub:!0,challenges:["Mad Lyricist","Area Calculator","Treasure Hunt"],chapterDescription:"Practice your C# chops with a checkpoint project! Choose from one of three projects and submit your co
1841de when you're done. Your project is reviewed by a mentor when you request a course certificate.",internalChallengeNames:["mad-lyricist","area-calculator","treasure-hunt"],displayProperties:[{dataAosDuration:"750",dataAos:"fade-up",link:"mad-lyricist",emoji:"\uD83C\uDFA4",backgroundColor:"#CC9400",text:"Mad Lyricist"},{dataAosDuration:"1100",dataAos:"fade-up",link:"area-calculator",emoji:"\uD83D\uDCD0",backgroundColor:"#7188DB",text:"Area Calculator"},{dataAosDuration:"1350",dataAos:"fade-up",link:"treasure-hunt",emoji:"\uD83E\uDE99",backgroundColor:"#886CE4",text:"Treasure Hunt"}]},{chapterIndex:4,chapterName:"Arrays",chapterDescription:"Learn how to store and manage collections of data using arrays in C#.",challenges:["Array of Sunshine","Soundtrack to My Life","Hidden Gems","World Cup","Notification Overload","Emotional Support Plushie","Doomsday Prepper"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[10,10,10,15,15,15,20],internalChapterName:"arrays",internalChallengeNames:["array-of-sunshine","soundtrack-to-my-life","hidden-gems","world-cup","notification-overload","emotional-support-plushie","doomsday-prepper"],badgeImage:"/images/badges/c-sharp/arrays.png",type:""},{chapterIndex:5,chapterName:"Methods",chapterDescription:"Learn methods in C#",challenges:["Meet the Methods","Make Some Noise","The Cookout","Ticket Pool","Return to Sender","Calling All Hackers"],titleImage:"",signUpPopups:[],isComplete:!0,isClub:!0,xP:[15,15,15,15,15,20],internalChapterName:"methods",internalChallengeNames:["meet-the-methods","make-some-noise","the-cookout","ticket-pool","return-to-sender","calling-all-hackers"],badgeImage:"/images/badges/c-sharp/arrays.png",type:""},{chapterIndex:6,chapterName:"Coming Soon",chapterDescription:"Chapter 7 coming soon!",type:"coming-soon"}]},"ui-ux-design":{name:"ui-ux-design",courseUrl:"/ui-ux-design",title:"UI/UX Design",badges:["the-world-of-design","design-as-problem-solving"],catalogName:"UI/UX Design",description:"Learn user interface / user experience design with guided project ideas, best practices and principles, and hands-on exercises in Figma, the industry-standard design tool.",searchQuery:"ui, ux, design",community:{available:!1,link:"/community/"},shareButton:{},links:["/ui-ux-design","01-introduction","02-design-process","03-design-tools","04-exploring-figma","05-first-edition","06-holographic","07-deck-builder","08-the-good-the-bad-and-the-ugly","09-empathize-and-define","10-ideate","11-prototype","12-wireframe","13-user-flows","14-interactive-prototypes","15-test-implement-iterate","16-recap"],courseCompleteBadge:null,bannerImageLink:"/images/ui-ux-design/uiux.gif",newCourse:!0,tags:["ui-ux","design","beginner","computer-science"],chapters:[{chapterIndex:0,chapterName:"The World of Design",chapterDescription:"Learn about UI/UX design and explore Figma, the industry-standard design tool.",challenges:["Introduction","Design Process","Design Tools","Exploring Figma","First Edition","Holographic","Deck Builder"],titleImage:"",isComplete:!0,isClub:!1,xP:[10,10,10,15,15,15,20],internalChapterName:"the-world-of-design",internalChallengeNames:["introduction","design-process","design-tools","exploring-figma","first-edition","holographic","deck-builder"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:1,chapterName:"Design as Problem Solving",chapterDescription:"Apply the design thinking process to solve real user problems.",challenges:["The Good, the Bad and the Ugly","Empathize and Define","Ideate","Prototype","Wireframe","User Flows","Interactive Prototypes","Test, Implement, and Iterate!","Recap"],titleImage:"",isComplete:!0,isClub:!0,xP:[10,10,15,15,20,15,20,20,20],internalChapterName:"design-as-problem-solving",internalChallengeNames:["the-good-the-bad-and-the-ugly","empathize-and-define","ideate","prototype","wireframe","user-flows","interactive-prototypes","test-implement-iterate","recap"],badgeImage:"/images/badges/earth_badge.png",type:""},{chapterIndex:2,chapterName:"Coming Soon",chapterDescription:"Chapter 3 coming soon!",type:"coming-soon"}]}},courseTags:[{internalName:"python",displayName:"Python"},{internalName:"web-dev",displayName:"Web Development"},{internalName:"data-science",displayName:"Data Science"},{internalName:"tools",displayName:"Tools"}
1841,{internalName:"creative",displayName:"Creative Coding"},{internalName:"beginner",displayName:"Beginner"},{internalName:"intermediate",displayName:"Intermediate"}],codeEval:{flow:"run-code",state:"idle",code:"",hint:""},cutSceneMusic:{audioSrc:"",isPlaying:!1,currentTime:0,mute:!1},userCourseHistory:[]},eh=Object.keys(ed.courseDetails),ep=(0,er.oM)({name:"language",initialState:ed,reducers:{setCutsceneAudioSrc($,et){$.cutSceneMusic.audioSrc=et.payload.audioSrc},playCutsceneAudio($){$.cutSceneMusic.isPlaying=!0},pauseCutsceneAudio($){$.cutSceneMusic.isPlaying=!1},toggleCutsceneAudio($){$.cutSceneMusic.isPlaying=!$.cutSceneMusic.isPlaying},updateCutsceneAudioTime($,et){$.cutSceneMusic.currentTime=et.payload.currentTime},muteCutsceneAudio($){$.cutSceneMusic.mute=!0},unmuteCutsceneAudio($){$.cutSceneMusic.mute=!1},toggleCutsceneAudioMute($){$.cutSceneMusic.mute=!$.cutSceneMusic.mute},updateUserCourseHistory($,et){let en=et.payload.courses.map($=>$.course);$.userCourseHistory=en}}}),{setCutsceneAudioSrc:em,playCutsceneAudio:ef,pauseCutsceneAudio:eg,toggleCutsceneAudio:ey,updateCutsceneAudioTime:ev,muteCutsceneAudio:ex,unmuteCutsceneAudio:e_,toggleCutsceneAudioMute:ew,updateUserCourseHistory:ek}=null==ep?void 0:ep.actions;function selectPopupState($){let{courseName:et,challengeName:en}=$;return en=en.replace(/^[0-9]*-/,""),function($){var er;let ei=null===(er=$.language.courseDetails[et].chapters.find(function($){var et;return null===(et=$.internalChallengeNames)||void 0===et?void 0:et.includes(en)}))||void 0===er?void 0:er.signUpPopups;return ei||null}}function selectCourseData($){return function(et){return et.language.courseDetails[$]}}function selectAllCoursesData($){return $.language.courseDetails}function selectCourseChapterData($){let{courseName:et,chapterName:en}=$;return function($){let er=$.language.courseDetails[et],ei=er.chapters.find(function($){return $.internalChapterName===en});return ei}}function selectBadgeList($){return function(et){let{badges:en}=et.language.courseDetails[$];return en}}function selectBadgeNames($){return function(et){let{chapters:en}=et.language.courseDetails[$];return Object.fromEntries(en.filter($=>$.internalChapterName).map($=>[$.internalChapterName,$.chapterName]))}}function selectPrevNextChallengeLinks($){let{currentChallengeLink:et,courseName:en="python"}=$;return function($){let er=$.language.courseDetails[en],ei=er.courseUrl,{links:eo}=er,es=!1,el=eo.findIndex(function($){return $===et}),eu=el-1,ed=ei;0!==eu&&(ed="".concat(ei,"/").concat(eo[eu]));let eh=null,ep=null,em=null,ef=null;if(el<eo.length-1&&(em=(ep=eo[eh=el+1]).replace(/^[0-9]*-/,"")),em){let $=er.chapters.find($=>!!$.internalChallengeNames&&$.internalChallengeNames.includes(em));(ef=null==$?void 0:$.internalChapterName)||(em=null)}return er.chapters.forEach($=>{if(!$.internalChallengeNames||!et)return;let en=et.replace(/^[0-9]*-/,"");$.internalChallengeNames.includes(en)&&$.internalChallengeNames.at(-1)===en&&(es=!0)}),{lastChallengeOfTheChapter:es,currentIndex:el,previousIndex:eu,nextIndex:eh,previousChallengeLink:ed,nextChallengeLink:ep,nextChallengeNameForDispatch:em,nextChallengeChapterNameForDispatch:ef}}}function selectCourseLinks($){let{courseName:et}=$;return function($){return $.language.courseDetails[et].links}}function selectCourseTotalXp($){let{courseName:et}=$;return function($){try{let er=$.language.courseDetails[et].chapters,ei=0;for(var en in er){let $=er[en].xP;if($){let et=$.reduce(($,et)=>$+et,0);ei+=et}}return ei}catch($){return 0}}}function selectCourseTotalExercises($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et].chapters,er=0,ei=["checkpoint-project","final-project","certificate-tracker","coming-soon","coming-soon-ai"];for(var eo in en){if(ei.includes(en[eo].type))continue;let $=en[eo].internalChallengeNames;er+=$.length}return er}}function selectAllCourseProgress($){let et=[],en=$.language.courseDetails;for(var er in en){var ei,eo,es,el;let en="git-github"!=er?$.language.courseDetails[er].title:"Git & GitHub (Expansion)",eu=$.language.courseDetails[er].bannerImageLink,ed=(null===(el=$.user)||void 0===el?void 0:null===(es=el.user)||void 0===es?void 0:null===(eo=es.stats)||void 0===eo?void 0:null===(ei=eo.courseXp[er])||void 0===ei?void 0:ei.courseXp)||0,eh=function(et){let en=$.language.courseDetails[et].chapters,er=0;for(var ei in en){let $=en[ei].xP;if($){let et=$.reduce(($,et)=>$+et,0);er+=et}}return er}(er),ep=$.language.courseDetails[er].catalogName;et.push({key:er,courseTitle:en,courseBannerImage:eu,userProgress:ed,courseTotalXp:eh,catalogName:ep})}return et}function selectCourseBaseLink($){return function(et){var en;return null===(en=et.language.courseDetails[$])||void 0===en?void 0:en.courseUrl}}function selectSingleCourseDetails($){let{courseName:et}=$;return function($){var en,er,ei,eo;let es=null===(eo=$.user)||void 0===eo?void 0:null===(ei=eo.user)||void 0===ei?void 0:null===(er=ei.stats)||void 0===er?void 0:null===(en=er.courseXp[et])||void 0===en?void 0:en.courseXp,el=selectCourseTotalXp({courseName:et})($),eu=isNaN(es)||isNaN(el)||0===el?0:Math.min(100,Math.round(es/el*100)),{courseUrl:ed="",newCourse:eh=null,tags:ep,bannerImageLink:em,catalogName:ef,description:eg,links:ey=[]}=$.language.courseDetails[et]||{};return{bannerImageLink:em,catalogName:ef,description:eg,tags:ep,newCourse:eh,courseUrl:ed,percentageCompleted:eu,firstExercise:ey[1]}}}function selectCourseSearchDetails($){let{courseName:et,type:en="courses"}=$;return function($){if("courses"!=en)return{bannerImageLink:"",catalogName:"",description:""};let{bannerImageLink:er,catalogName:ei,description:eo,courseUrl:es}=$.language.courseDetails[et]||{};return{bannerImageLink:er,catalogName:ei,description:eo,courseUrl:es}}}function selectCurrentCourseChapter($){let et=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(en){return en.language.courseDetails[$].chapters.at(et)}}function selectCourseTags($){return $.language.courseTags}function selectAllCourseDetails($){let et=$.language.courseDetails,en=[];return Object.keys(et).forEach(function(et,er){let{tags:ei,newCourse:eo}=$.language.courseDetails[et],es={internlName:et,tags:ei};eo?en.unshift(es):en.push(es)}),en}function selectNumProjectsToComplete($){let{courseName:et}=$;return function($){let en=["checkpoint-project","final-project"],er=$.language.courseDetails[et].chapters,ei=er.filter($=>en.includes($.type)).length;return ei}}function selectCoursePrerequisites($){let{courseName:et}=$;return function($){return $.language.courseDetails[et].prerequisiteCourses||[]}}function selectCourseAuthors($){let{courseName:et}=$;return function($){return $.language.courseDetails[et].authors||[]}}function selectCourseTimeToComplete($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et];if(en.timeToComplete)return en.timeToComplete;let er=(en.chapters||[]).filter($=>"coming-soon"!==$.type);return er.length<=1?0:2*er.length}}function selectCourseCompleteBadge($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et],er=en.courseCompleteBadge;return{...er,catalogName:en.catalogName}}}function selectCourseCatalogName($){let{courseName:et}=$;return function($){if(!et)return null;let en=$.language.courseDetails[et];return en.catalogName}}function selectCourseNumberOfChapters($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et],er=en.chapters;return{numOfChapters:er.length}}}function selectLastCourseExerciseLink($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et].links;return function($){let et=$.filter($=>/^\d+-/.test($));return et.length>0?et[et.length-1]:null}(en)||""}}let getLinkByChallenge=$=>{var et;let{challengeName:en,links:er}=$;return en&&null!==(et=er.find($=>$.split("-").slice(1).join("-")===en))&&void 0!==et?et:null};function selectCourseChapterInterstitials($){let{courseName:et,chapterName:en,challengeNameWithoutIndex:er,forType:ei="exercises"}=$;return function($){var eo,es,el,eu;if("exercises"!==ei)return{numOfExercises:0,currentExercisesIndex:0,showInterstitials:!1,interStitialsQue:[],chapterIndex:0};let ed=$.language.courseDetails[et];if(!ed)return null;let eh=!1,ep=null,em=null;for(let $=0;$<ed.chapters.length;
1841$++)if(ed.chapters[$].internalChapterName===en){ep=ed.chapters[$],em=ed.chapters[$+1]||null,eh=$+1===ed.chapters.length;break}let ef=(null==ep?void 0:ep.internalChallengeNames.length)||0,eg=null!==(el=null==ep?void 0:ep.internalChallengeNames.findIndex($=>$===er))&&void 0!==el?el:0,ey=[],ev=er===(null==ep?void 0:ep.internalChallengeNames[ep.internalChallengeNames.length-1]);return(null==ep?void 0:null===(eo=ep.cheatSheets)||void 0===eo?void 0:eo.length)>0&&ey.push("cheatSheet"),(null==ep?void 0:null===(es=ep.bonusArticle)||void 0===es?void 0:es.length)>0&&ey.push("bonusArticle"),(null==em?void 0:em.type)=="checkpoint-project"&&ey.push("checkpointProject"),(null==em?void 0:em.type)=="final-project"&&ey.push("finalProject"),eh&&(null==em?void 0:em.type)!="final-project"&&ed.chapters&&ey.push("credits"),(null==em?void 0:em.type)=="coming-soon"&&ed.chapters&&ey.push("comingSoon"),{numOfExercises:ef,currentExercisesIndex:eg,showInterstitials:ev,interStitialsQue:ey,chapterIndex:null!==(eu=null==ep?void 0:ep.chapterIndex)&&void 0!==eu?eu:0}}}function selectCourseBonusArticles($){let{courseName:et,chapterName:en}=$;return function($){var er;let ei=$.language.courseDetails[et],eo=null,es=-1;for(let $=0;$<ei.chapters.length;$++)if(ei.chapters[$].internalChapterName===en){es=(eo=ei.chapters[$]).chapterIndex;break}if(!eo)return null;let el=eo.bonusArticle;return{bonusArticles:el,chapterIndex:es,isLastChapter:(null===(er=ei.chapters.at(-1))||void 0===er?void 0:er.internalChapterName)===en}}}function selectCourseChallengePack($){let{courseName:et,chapterName:en}=$;return function($){let er=$.language.courseDetails[et],ei=null,eo=-1;for(let $=0;$<er.chapters.length;$++)if(er.chapters[$].internalChapterName===en){eo=(ei=er.chapters[$]).chapterIndex;break}if(!ei)return null;let es=ei.challengePack;return{challengePack:es,chapterIndex:eo,catalogName:null==er?void 0:er.catalogName}}}function selectChallengePackNextLinks($){let{courseName:et,challengeName:en,forType:er="challenge-pack"}=$;return function($){if("challenge-pack"!=er)return{prevCourseLink:"",nextCourseLink:"",course:et};let ei=$.language.courseDetails[et];if(!ei)return null;let{chapters:eo,links:es}=ei;for(let $=0;$<eo.length;$++){var el;let er;let ei=eo[$],eu=void 0!=ei.challengePack&&ei.challengePack.internalChallengeLinks.includes(en);if(!eu)continue;for(let et=$+1;et<eo.length;et++){let $="checkpoint-project"!=eo[et].type;if($){er=eo[et];break}}let ed="checkpoint-project"===eo[$+1].type,eh=ei.internalChallengeNames[ei.internalChallengeNames.length-1],ep=null==er?void 0:null===(el=er.internalChallengeNames)||void 0===el?void 0:el[0];return{prevCourseLink:getLinkByChallenge({challengeName:eh,links:es}),nextCourseLink:getLinkByChallenge({challengeName:ep,links:es}),course:et,nextSceneQue:ed?"checkpointProject":"nextChapter"}}return null}}function selectCheatSheets($){let{courseName:et,chapterName:en}=$;return function($){let er=$.language.courseDetails[et],ei=er.chapters.find(function($){return $.internalChapterName===en}),eo=ei.cheatSheets;return eo}}function selectChapterMusic($){let{courseName:et,chapterName:en}=$;return function($){let er=$.language.courseDetails[et],ei=null;for(let $=0;$<er.chapters.length;$++)if(er.chapters[$].internalChapterName===en){ei=er.chapters[$];break}if(!ei)return null;let eo=ei.music;return{music:eo||null}}}
1841function selectFindBonusandChaptersData($){let{courseName:et,articleName:en,forType:er="bonus-article"}=$;return function($){if("bonus-article"!=er)return null;let ei=$.language.courseDetails[et];if(!ei)return null;let{chapters:eo,links:es,courseUrl:el}=ei;for(let $=0;$<eo.length;$++){var eu;let et=eo[$],er=null===(eu=et.bonusArticle)||void 0===eu?void 0:eu.find($=>$.internalName===en);if(!er)continue;let ei=eo[$+1],ed=Array.isArray(et.internalChallengeNames)&&et.internalChallengeNames.length>0?et.internalChallengeNames[et.internalChallengeNames.length-1]:null,eh=null,ep=null,em=null,ef=null;if(ei&&Array.isArray(ei.internalChallengeNames)&&ei.internalChallengeNames.length>0)eh=ei.internalChallengeNames[0],em="/".concat(el,"/")+getLinkByChallenge({challengeName:eh,links:es});else if(ef=eo.find($=>"final-project"===$.type)){let $=es.find($=>"final-project"===$)||"final-project";em="".concat(el,"/").concat($)}return ep=ed?"/".concat(el,"/")+getLinkByChallenge({challengeName:ed,links:es}):null,{chapterName:et.internalChapterName,bonusArticle:er,bonusArticlePrevLink:ep,bonusArticleNextLink:em,isLastChapter:!ei&&!ef,checkpointNext:(null==ei?void 0:ei.type)==="checkpoint-project"||null,challengePackNext:!!et.challengePack||null,finalProjectNext:!!ef||null,nextChapterComingSoon:(null==ei?void 0:ei.type)==="coming-soon"||null}}return null}}function selectFindCheckpointandChaptersData($){let{courseName:et,project:en,forType:er="checkpoint-project"}=$;return function($){if("checkpoint-project"!=er)return null;let ei=$.language.courseDetails[et];if(!ei)return null;let{chapters:eo,links:es}=ei;for(let $=0;$<eo.length;$++){var el,eu;let et=eo[$],er=(null==et?void 0:et.type)=="checkpoint-project";if(!er)continue;let ei=null===(el=et.displayProperties)||void 0===el?void 0:el.find($=>$.link===en),ed=eo[$+1],eh=eo[$-1],ep=eh.internalChallengeNames[eh.internalChallengeNames.length-1],em=null==ed?void 0:null===(eu=ed.internalChallengeNames)||void 0===eu?void 0:eu[0];return{checkpoint:ei,checkpointPrevLink:getLinkByChallenge({challengeName:ep,links:es}),checkpointNextLink:getLinkByChallenge({challengeName:em,links:es}),nextChapterComingSoon:(null==ed?void 0:ed.type)==="coming-soon"||null}}return null}}function selectCheckpointProjects($){let{courseName:et}=$;return function($){let en=$.language.courseDetails[et],er=null,ei=-1;for(let $=0;$<en.chapters.length;$++)if("checkpoint-project"===en.chapters[$].type){er=en.chapters[$],ei=$;break}if(!er)return null;let eo=en.chapters[ei+1];return{projects:er,chapterIndex:ei,nextChapterComingSoon:(null==eo?void 0:eo.type)==="coming-soon"||null}}}function selectChapterXp($){let{courseName:et,chapterName:en}=$;return function($){var er;let ei=$.language.courseDetails[et],eo=ei.chapters.find(function($){return $.internalChapterName===en});if(!eo)return 0;let es=(null===(er=eo.xP)||void 0===er?void 0:er.reduce(($,et)=>$+et,0))||0;return es}}function selectBadgeCardInfo($){let{courseName:et,chapterName:en}=$;return function($){let er=$.language.courseDetails[et],ei=er.chapters.find(function($){return $.internalChapterName===en});if(!ei)return null;let eo=ei.badgeCardInfo||{},es=ei.chapterIndex,el={title:ei.chapterName,imgLink:"/images/badges/".concat(et,"/").concat(ei.internalChapterName,".png"),chapterIndex:es};return{showDefault:null==eo||"object"==typeof eo&&0===Object.keys(eo).length||null==eo.imgLink,badgeCardInfo:eo,defaultBadgeInfo:el,catalogName:er.catalogName,badgeName:ei.chapterName}}}function selectNextChapterInterstitialInfo($){let{courseName:et,chapterName:en}=$;return function($){var er;let ei=$.language.courseDetails[et],eo=null;for(let $=0;$<ei.chapters.length;$++){if("checkpoint-project"===en&&ei.chapters[$].type===en){eo=ei.chapters[$+1]||null;break}if(ei.chapters[$].internalChapterName===en){let et=ei.chapters[$+1]||null;eo=(null==et?void 0:et.type)==="checkpoint-project"?ei.chapters[$+2]||null:et;break}}if(!eo)return null;let{links:es}=ei;return{bannerImageLink:ei.bannerImageLink,nextChapterName:eo.chapterName,nextChapterDescription:eo.chapterDescription,nextChapterIndex:eo.chapterIndex,nextChapter
1841Link:getLinkByChallenge({challengeName:null===(er=eo.internalChallengeNames)||void 0===er?void 0:er[0],links:es}),isNextChapterComingSoon:"coming-soon"===eo.type}}}function selectCutsceneAudioSrc($){return $.language.cutSceneMusic.audioSrc}function selectCutsceneAudioIsPlaying($){return $.language.cutSceneMusic.isPlaying}function selectIsCutsceneAudioMute($){return $.language.cutSceneMusic.mute}function selectCutsceneAudioCurrentTime($){return $.language.cutSceneMusic.currentTime}function selectAllCoursesCompletedBadge($){let et=$.language.courseDetails,en=Object.keys(et).filter($=>et[$].courseCompleteBadge);return en.map($=>({courseName:$,badge:et[$].courseCompleteBadge}))}function selectCourseCatalogNameUsingBaseUrl($){let{baseUrl:et}=$;return et.startsWith("/")||(et="/".concat(et)),function($){try{let er=$.language.courseDetails,ei=Object.keys(er).find($=>er[$].courseUrl===et);if(ei){var en;return null===(en=er[ei])||void 0===en?void 0:en.catalogName}return""}catch($){return""}}}function selectUserCourseHistory($){return $.language.userCourseHistory}function selectAllCourseNames($){return Object.values($.language.courseDetails).map($=>$.catalogName)}var eC=ep.reducer},13903:function($,et,en){"use strict";en.d(et,{Hg:function(){return es},PM:function(){return selectUserProjects},dd:function(){return eo},gv:function(){return selectUserProfilePosts},u3:function(){return el}});var er=en(77236);let ei=(0,er.oM)({name:"profilesSlice",initialState:{profileProjects:{},profilePosts:{}},reducers:{addNewUsersProfileProjects($,et){$.profileProjects[et.payload.uid]=et.payload.projects},setUsersProfilePosts($,et){$.profilePosts[et.payload.uid]=et.payload.posts},addNewUsersProfilePosts($,et){let en=$.profilePosts[et.payload.uid]||[];$.profilePosts[et.payload.uid]=[...en,...et.payload.posts]}}});function selectUserProjects($){let{uid:et}=$;return $=>{var en;let er=null==$?void 0:null===(en=$.profile)||void 0===en?void 0:en.profileProjects;return er&&er[et]||[]}}function selectUserProfilePosts($){let{uid:et}=$;return $=>{var en;let er=null==$?void 0:null===(en=$.profile)||void 0===en?void 0:en.profilePosts;return er&&er[et]||[]}}let{addNewUsersProfileProjects:eo,setUsersProfilePosts:es,addNewUsersProfilePosts:el}=ei.actions;et.ZP=ei.reducer},28010:function($,et,en){"use strict";en.d(et,{Bn:function(){return selectOtherProjectsByAuthor},Y9:function(){return selectProject},a0:function(){return selectTags},a7:function(){return selectAllProjectsInternalTitle},sr:function(){return selectFirstThreeProjects},ur:function(){return selectLatestProjects},zt:function(){return selectIndividualProjectTags}});var er=en(77236);let ei=(0,er.oM)({name:"projects",initialState:{projects:[{title:"Add Interactable Objects to Your Godot Game",tags:["Game Dev","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fadd-interactable-objects-to-your-godot-game%2Fthumbnail.webp?alt=media",link:"/projects/add-interactable-objects-to-your-godot-game",projectInternalTitle:"add-interactable-objects-to-your-godot-game",uid:"rtocaE6Je8Tv1JG7AH8R7TVsRJ63"},{title:"Build a Pocket Rave with Arduino",tags:["C++","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fbuild-a-pocket-rave-with-arduino%2Fthumbnail.webp?alt=media",link:"/projects/build-a-pocket-rave-with-arduino",projectInternalTitle:"build-a-pocket-rave-with-arduino",uid:"ckIKPzTze9TMFFPNXZkKTfjDBiz1"},{title:"Create a GitHub Profile Pet with GraphQL",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-a-github-profile-pet-with-graphql%2Fthumbnail.webp?alt=media",link:"/projects/create-a-github-profile-pet-with-graphql",projectInternalTitle:"create-a-github-profile-pet-with-graphql",uid:"kpEBcP0g20SPY0Os4kzO4n656U02"},{title:"Build a Plant Buddy App with Electron",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-a-plant-buddy-with-electron%2Fthumbnail.webp?alt=media",link:"/projects/build-a-plant-buddy-with-electron",projectInternalTitle:"build-a-plant-buddy-with-electron",uid:"fLevTT7TaXRMpILsGeIl03pLkNu1"},{title:"Create Your First Scene with Unity and C#",tags:["C#","Game Dev"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-your-first-scene-with-unity-and-c-sharp%2Fthumbnail.webp?alt=media&token=9a4c0a1c-5c86-4940-96fd-89637fabde24",link:"/projects/create-your-first-scene-with-unity-and-c-sharp",projectInternalTitle:"create-your-first-scene-with-unity-and-c-sharp",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Create a Personal Website with HTML/CSS/JS and Cod\xe9dex Builds",tags:["HTML","JavaScript","Beginner"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-a-personal-website-with-html-css-js-and-codedex-builds%2Fheader.webp?alt=media&token=c9765ab9-f36d-4b16-ac99-449dcb118ab3",link:"/projects/create-a-personal-website-with-html-css-js-and-codedex-builds",projectInternalTitle:"create-a-personal-website-with-html-css-js-and-codedex-builds",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Create a Scrollable Text Wrap Effect with Pretext",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-a-scrollable-text-wrap-effect-with-pretext%2Fpretext.webp?alt=media&token=0c374aed-df1f-492b-8e9a-8d23456b16a0",link:"/projects/create-a-scrollable-text-wrap-effect-with-pretext",projectInternalTitle:"create-a-scrollable-text-wrap-effect-with-pretext",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Create a Doodle Gallery with Supabase",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-a-doodle-gallery-with-supabase%2Fimage.png?alt=media&token=6bad2291-9e4b-460c-87eb-513f333fa790",link:"/projects/create-a-doodle-gallery-with-supabase",projectInternalTitle:"create-a-doodle-gallery-with-supabase",uid:"CgUQBagDrWWBRUuoh3mkyi3aedg1"},{title:"Build a Pixel Art Maker with HTML, CSS and JavaScript",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fbuild-a-pixel-art-creator-with-html-css-and-javascript%2Fcard.png?alt=media&token=ab2b56a2-fc98-44af-9bb4-eef2cc22500e",link:"/projects/build-a-pixel-art-maker-with-html-css-and-javascript",projectInternalTitle:"build-a-pixel-art-maker-with-html-css-and-javascript",uid:"HQImLPf2Tmel6kw8hCis3vcJnLo2"},{title:"Analyze Baseball Stats with Pandas and Matplotlib",tags:["Python","Data Science","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fanalyze-baseball-stats-with-pandas-and-matplotlib%2Fmlb-pt-project-card.png?alt=media&token=41
1841d4a1a2-5c64-489f-bf31-9f142779da16",link:"/projects/analyze-baseball-stats-with-pandas-and-matplotlib",projectInternalTitle:"analyze-baseball-stats-with-pandas-and-matplotlib",uid:"ZjTU0yoJGgNolU9xIJGOR3bxYKm2"},{title:"Create a Minecraft Mod with Java",tags:["Java","Intermediate","Game Dev"],image:"/images/projects/card_images/daniels-minecraft.gif",link:"/projects/create-a-minecraft-mod-with-java",projectInternalTitle:"create-a-minecraft-mod-with-java",uid:"5k5WC31oPvcUQmaDCgK38v6Et133"},{title:"Create an RPG Map with L\xd6VE and Lua",tags:["Lua","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fcreate-an-rpg-map-with-love2d-and-lua%2FTileMAP-Project-Card.png?alt=media&token=9e71d189-12f1-4409-8d05-78ae89985e29",link:"/projects/create-an-rpg-map-with-love2d-and-lua",projectInternalTitle:"create-an-rpg-map-with-love2d-and-lua",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Analyze Twitch Data with SQLite",tags:["Data Science","Beginner"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fanalyze-twitch-data-with-sqlite%2Fanalyze-twitch-data-with-sqlite-card.png?alt=media&token=67b3c7f7-bb01-4faf-acde-43ff4fc9e161",link:"/projects/analyze-twitch-data-with-sqlite",projectInternalTitle:"analyze-twitch-data-with-sqlite",uid:"f3vq4kwmixfMb7pB3bTtKUHQMTx2"},{title:"Add Time Travel to Games with Phaser",author:"Julien Kris",authorAvatar:"https://i.imgur.com/gD4gB5N.jpeg",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fadd-time-travel-to-games-with-phaser%2Ftime-travel-project-card.png?alt=media&token=c3e56e8f-49bb-4a85-81de-9da22e26c17a",link:"/projects/add-time-travel-to-games-with-phaser",projectInternalTitle:"add-time-travel-to-games-with-phaser",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Build a Text to Speech App with Web Browsers",tags:["JavaScript","Beginner"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fbuild-a-tts-app-with-web-browsers%2Fcard_tts.png?alt=media&token=c4ffd516-5e15-4069-a18b-7f1533c9745f",link:"/projects/build-a-tts-app-with-web-browsers",projectInternalTitle:"build-a-tts-app-with-web-browsers",uid:"HQImLPf2Tmel6kw8hCis3vcJnLo2"},{title:"Make a Webcam Controlled Game with TensorFlow.js",tags:["JavaScript","Intermediate"],image:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/projects%2Fmake-a-webcam-controlled-game-with-tensorflowjs%2Fts-card.png?alt=media&token=62d0786e-816f-42c6-88bb-21fc46598372",link:"/projects/make-a-webcam-controlled-game-with-tensorflowjs",projectInternalTitle:"make-a-webcam-controlled-game-with-tensorflowjs",uid:"HQImLPf2Tmel6kw8hCis3vcJnLo2"},{title:"Add Easing to Your Game Animations With Phaser",tags:["JavaScript","Beginner"],image:"/images/projects/card_images/add-easing-to-your-game-animations-with-phaser.gif",link:"/projects/add-easing-to-your-game-animations-with-phaser",projectInternalTitle:"add-easing-to-your-game-animations-with-phaser",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Get Started with Love2D and Lua",tags:["Lua","Game Dev"],image:"/images/projects/card_images/get-started-with-love2d-and-lua.png",link:"/projects/get-started-with-love2d-and-lua",projectInternalTitle:"get-started-with-love2d-and-lua",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Get Started with Roblox Studio and Lua",tags:["Lua","Game Dev","Beginner"],image:"/images/projects/card_images/get-started-with-roblox-studio-and-lua.png",link:"/projects/get-started-with-roblox-studio-and-lua",projectInternalTitle:"get-started-with-roblox-studio-and-lua",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Make a GitHub Profile README",tags:["Beginner","GitHub"],image:"/images/projects/card_images/make-a-github-profile-readme.png",link:"/projects/make-a-github-profile-readme",projectInternalTitle:"make-a-github-profile-readme",uid:"CgUQBagDrWWBRUuoh3mkyi3aedg1"},{title:"Build a K-Nearest Neighbor Model",author:"Alex Kuntz",authorAvatar:"/images/projects/authors/alex.jpeg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_
1841images/nearest-model.png",link:"/projects/build-a-k-nearest-neighbor-model-with-p5js",projectInternalTitle:"build-a-k-nearest-neighbor-model-with-p5js",uid:"ZjTU0yoJGgNolU9xIJGOR3bxYKm2"},{title:"Make a Baldur's Gate 3 Mod",author:"Julien Kris",authorAvatar:"https://i.imgur.com/gD4gB5N.jpeg",tags:["Lua","Intermediate"],image:"/images/projects/card_images/make-a-bg3-mod-with-lua.png",link:"/projects/make-a-bg3-mod-with-lua",projectInternalTitle:"make-a-bg3-mod-with-lua",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Build a Cafe Finder with JavaScript",author:"Gabriela Banaag",authorAvatar:"https://www.codedex.io/images/blog/gabriela-banaag-thumbnail.jpg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/google-maps-thumbnail.png",link:"/projects/build-a-cafe-finder-with-javascript",projectInternalTitle:"build-a-cafe-finder-with-javascript",uid:"CgUQBagDrWWBRUuoh3mkyi3aedg1"},{title:"Create a Caesar Cipher with Java",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["Java","Intermediate"],image:"/images/projects/card_images/cipher_project_card.png",link:"/projects/create-a-caesar-cipher-with-java",projectInternalTitle:"create-a-caesar-cipher-with-java",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Set up a GUI with Java",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["Java","Beginner"],image:"/images/projects/card_images/gui_project_card.png",link:"/projects/set-up-a-gui-with-java",projectInternalTitle:"set-up-a-gui-with-java",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Build an Avatar Generator",author:"Julien Kris",authorAvatar:"https://i.imgur.com/gD4gB5N.jpeg",tags:["JavaScript","Intermediate","HTML"],image:"/images/projects/card_images/animate-html.png",link:"/projects/build-an-avatar-generator-with-html-css-js",projectInternalTitle:"build-an-avatar-generator-with-html-css-js",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Create a Voice Virtual Assistant",author:"Alexandre Sajus",authorAvatar:"/images/projects/authors/Alexandre.jpg",tags:["Python","Intermediate"],image:"/images/projects/card_images/create-a-voice-virtual-assistant-with-elevenlabs.png",link:"/projects/create-a-voice-virtual-assistant-with-elevenlabs",projectInternalTitle:"create-a-voice-virtual-assistant-with-elevenlabs",uid:"u2DitJXVOqWo18b
1841LsyXNLcVtufC2"},{title:"Animate Images with CSS keyframes",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["HTML","Beginner"],image:"/images/projects/card_images/htmlanimate.png",link:"/projects/animate-images-with-keyframes-using-css",projectInternalTitle:"animate-images-with-keyframes-using-css",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Analyze U.S. Census Data with SciPy",author:"Sade Snowden",authorAvatar:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/avatars%2FLC6iTrJZzITO0aBq3iaamSvy6Q93%2Fprofile.jpg?alt=media&token=0806f4f2-08ae-4e0b-b816-038c6e27fdf7",tags:["Python","Intermediate"],image:"/images/projects/card_images/scipy.png",link:"/projects/analyze-us-census-data-with-scipy",projectInternalTitle:"analyze-us-census-data-with-scipy",uid:"LC6iTrJZzITO0aBq3iaamSvy6Q93"},{title:"Build a Chat Game with p5.js",author:"Julien Kris",authorAvatar:"https://i.imgur.com/gD4gB5N.jpeg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/conversation-project-card.png",link:"/projects/build-a-conversational-game-in-p5js",projectInternalTitle:"build-a-conversational-game-in-p5js",uid:"Jps14SaCwqgdbbnYvoMpvMKv92P2"},{title:"Build a Word Guessing Game",author:"Daniel Li",authorAvatar:"/images/projects/authors/daniel-li.png",tags:["Python","Beginner"],image:"/images/projects/card_images/word-game.png",link:"/projects/build-a-word-guessing-game-with-python",projectInternalTitle:"build-a-word-guessing-game-with-python",uid:"5k5WC31oPvcUQmaDCgK38v6Et133"},{title:"Build Tic-Tac-Toe With JavaScript",author:"Daniel Li",authorAvatar:"/images/projects/authors/daniel-li.png",tags:["JavaScript","Beginner"],image:"/images/projects/card_images/tictactoe.png",link:"/projects/build-tic-tac-toe-with-javascript",projectInternalTitle:"build-tic-tac-toe-with-javascript",uid:"5k5WC31oPvcUQmaDCgK38v6Et133"},{title:"Build a 3D Model with Three.js",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["JavaScript","Intermediate","HTML"],image:"/images/projects/card_images/Threejs Project Card.png",link:"/projects/build-an-interactive-3d-model-with-threejs",projectInternalTitle:"build-an-interactive-3d-model-with-threejs",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Generate AI Art with Krea.AI",author:"Katherin Solis",authorAvatar:"/images/projects/authors/katherin_solis.png",tags:["Beginner","AI"],image:"/images/projects/card_images/Generate AI Art with Krea.AI.png",link:"/projects/generate-ai-art-with-krea-ai",projectInternalTitle:"generate-ai-art-with-krea-ai",uid:"Zai06xd7TDfDZgzx6MjUgvwYJe32"},{title:"Generate a Poem with Google Gemini",author:"Katherin Solis",authorAvatar:"/images/projects/authors/katherin_solis.png",tags:["JavaScript","AI","Intermediate"],image:"/images/projects/card_images/generate-a-poem-with-google-gemini.png",link:"/projects/generate-a-poem-with-google-gemini",projectInternalTitle:"generate-a-poem-with-google-gemini",uid:"Zai06xd7TDfDZgzx6MjUgvwYJe32"},{title:"Build a Search Engine with Exa",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["Python","AI","Advanced"],image:"/images/projects/card_images/exa-ai.png",link:"/projects/build-a-custom-search-engine-with-exa-ai",projectInternalTitle:"build-a-custom-search-engine-with-exa-ai",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Create a React App with Vite",author:"Brandon Dusch",authorAvatar:"/images/projects/authors/brandon.jpg",tags:["React","Intermediate","JavaScript"],image:"/images/projects/card_images/publish-vite.png",link:"/projects/create-a-react-app-with-vite",projectInternalTitle:"create-a-react-app-with-vite",uid:"H7lTRTjDJ0VbnaVUJdWSclFxwiH3"},{title:"Run a Website Locally with HTML",author:"Brandon Dusch",authorAvatar:"/images/projects/authors/brandon.jpg",tags:["HTML","Beginner"],image:"/images/projects/card_images/local-html.png",link:"/projects/run-a-website-locally-with-html",projectInternalTitle:"run-a-website-locally-with-html",uid:"H7lTRTjDJ0VbnaVUJdWSclFxwiH3"},{title:"Album Finder with Spotify API",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["JavaScript","Intermediate"],image:"/images/projects/card_
1841images/spotify.jpg",link:"/projects/build-an-album-finder-with-spotify-api",projectInternalTitle:"build-an-album-finder-with-spotify-api",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Predict Prices with Linear Regression",author:"Katherin Solis",authorAvatar:"/images/projects/authors/katherin_solis.png",tags:["Data Science","Intermediate","Python"],image:"/images/projects/card_images/linear-regression.jpg",link:"/projects/predict-home-prices-with-python-and-linear-regression",projectInternalTitle:"predict-home-prices-with-python-and-linear-regression",uid:"Zai06xd7TDfDZgzx6MjUgvwYJe32"},{title:"VR Solar System with A-Frame",author:"Tara Tran",authorAvatar:"/images/projects/authors/tara_tran.png",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/create-a-vr-solar-system-with-a-frame.png",link:"/projects/create-a-vr-solar-system-with-a-frame",projectInternalTitle:"create-a-vr-solar-system-with-a-frame",uid:"8PG5qRSzM5hsOXbm0qPtxBZt4wG2"},{title:"Create a To-Do List App with JavaScript",author:"Shadeira Nesmith",authorAvatar:"/images/projects/authors/shadeira-nesmith.png",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/create-a-to-do-list-app-with-html-css-js.png",link:"/projects/create-a-to-do-list-app-with-html-css-js",projectInternalTitle:"create-a-to-do-list-app-with-html-css-js",uid:"0UmUVZhNNjX6j6GKLr9GHu85vY13"},{title:"Debug Your Web App in VS Code",author:"Michael Wiltfong",authorAvatar:"/images/projects/authors/michael-wiltfong.png",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/debug-card.png",link:"/projects/debug-your-web-app-in-vs-code",projectInternalTitle:"debug-your-web-app-in-vs-code",uid:"inV9GLffvhafMJU3Le6tCezgbrZ2"},{title:"Deploy a Website with Vercel",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/deploy-vercel-project.png",link:"/projects/deploy-a-website-with-vercel",projectInternalTitle:"deploy-a-website-with-vercel",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Build a Soundboard with p5.js",author:"Ellie Popoca",authorAvatar:"/images/projects/authors/ellie-popoca.png",tags:["JavaScript","Beginner"],image:"/images/projects/card_images/p5.gif",link:"/projects/build-an-interactive-soundboard-with-p5js",projectInternalTitle:"build-an-interactive-soundboard-with-p5js",uid:"11zhRKeJCWWcD7IkTJBtuK3Mkvo1"},{title:"Weather with HTML, CSS, & JS",author:"Brandon Dusch",authorAvatar:"/images/projects/authors/brandon.jpg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/view-weather-with-html-css-js.png",link:"/projects/view-weather-with-html-css-js",projectInternalTitle:"view-weather-with-html-css-js",uid:"H7lTRTjDJ0VbnaVUJdWSclFxwiH3"},{title:"Build a Chat App With Socket.IO",author:"Dharma Jethva",authorAvatar:"/images/projects/authors/dharma-jethva.jpg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/chatapp-with-socket-io.png",link:"/projects/build-a-chat-app-with-socket-io",projectInternalTitle:"build-a-chat-app-with-socket-io",uid:"HQImLPf2Tmel6kw8hCis3vcJnLo2"},{title:"Analyze Best Selling Books with Pandas",author:"Grace Peters",authorAvatar:"/images/projects/authors/grace-peters-chatgpt.png",tags:["Data Science","Python","Intermediate"],image:"/images/projects/card_images/analyze-best-selling-books-with-pandas.png",link:"/projects/analyze-spreadsheet-data-with-pandas-chatgpt",projectInternalTitle:"analyze-spreadsheet-data-with-pandas-chatgpt",uid:"yg3FVew5LRTTw1OiTBEvg6AmM4s2"},{title:"Convert Roman Numerals in Python",author:"Daniel Li",authorAvatar:"/images/projects/authors/daniel-li.png",tags:["Python","Beginner"],image:"/images/projects/card_images/convert-roman-numerals-with-python.png",link:"/projects/convert-roman-numerals-with-python",projectInternalTitle:"convert-roman-numerals-with-python",uid:"5k5WC31oPvcUQmaDCgK38v6Et133"},{title:"Build a Flappy Bird Clone With Phaser",author:"David Verghese",authorAvatar:"/images/projects/authors/david-verghese.jpg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_
1841images/build-a-flappy-bird-clone-with-phaser.png",link:"/projects/build-a-flappy-bird-clone-with-phaser",projectInternalTitle:"build-a-flappy-bird-clone-with-phaser",uid:"FlZkdOjO3XVvyi4ucIePDHZFsAo2"},{title:"Build a Pomodoro App with JavaScript",author:"Dana Lee",authorAvatar:"/images/projects/authors/dana-lee.jpg",tags:["JavaScript","Intermediate"],image:"/images/projects/card_images/build-a-pomodoro-app-with-html-css-js.png",link:"/projects/build-a-pomodoro-app-with-html-css-js",projectInternalTitle:"build-a-pomodoro-app-with-html-css-js",uid:"sSD12kuK8caTMlEzrQkiaPktReD2"},{title:"Build a Discord Bot with Python",author:"Hong Jeon",authorAvatar:"/images/projects/authors/hong_jeon.jpg",tags:["Python","Intermediate"],image:"/images/projects/card_images/build-a-discord-bot-with-python.png",link:"/projects/build-a-discord-bot-with-python",projectInternalTitle:"build-a-discord-bot-with-python",uid:"IezwCzNM7dh7UBLAjogXEmLZc982"},{title:"Generate a Blog with OpenAI",author:"Asiqur Rahman",authorAvatar:"/images/projects/authors/asiqur_rahman.png",tags:["AI","Python","Intermediate"],image:"/images/projects/card_images/generate-a-blog-with-openai.png",link:"/projects/generate-a-blog-with-openai",projectInternalTitle:"generate-a-blog-with-openai",uid:"jHMm1llOHzRoM1tJpZK1dvqD0B92"},{title:"Create a GIF with Python",internalTempTitleForOtherSuggestion:"Create a GIF with Python",author:"Sonny Li",internalAuthorName:"sonnynomnom",authorAvatar:"/images/projects/authors/sonny_avatar.png",tags:["Python","Beginner"],image:"/images/projects/card_images/create-a-gif-with-python.png",link:"/projects/create-a-gif-with-python",projectInternalTitle:"create-a-gif-with-python",uid:"f3vq4kwmixfMb7pB3bTtKUHQMTx2"},{title:"Build Pong with PyGame",author:"ThousandthStar",authorAvatar:"/images/projects/authors/ThousandthStar.png",tags:["Python","Advanced"],image:"/images/projects/card_images/build-pong-with-pygame.png",link:"/projects/build-pong-with-pygame",projectInternalTitle:"build-pong-with-pygame",uid:"YJqTBdRSIJPK58S9Vx1iBJyuC7i2"},{title:"Automate Secret Santa Emails",internalTempTitleForOtherSuggestion:"Automate Secret Santa Emails with SMTP",author:"Jerry Zhu",internalAuthorName:"Jerry Zhu",authorAvatar:"/images/projects/authors/jerry_zhu.jpg",tags:["Python","Intermediate"],image:"/images/projects/card_images/automate-secret-santa-emails-with-smtp.png",link:"/projects/automate-secret-santa-emails-with-smtp",projectInternalTitle:"automate-secret-santa-emails-with-smtp",uid:"ulex9TQOjSawZi6dUSYRRtZOtp82"},{title:"Set Up Local Dev Env with Python",author:"Jerry Zhu",internalAuthorName:"Jerry Zhu",internalTempTitleForOtherSuggestion:"Set Up Your Local Development Environment with Python",authorAvatar:"/images/projects/authors/jerry_zhu.jpg",tags:["Python","Beginner"],image:"/images/projects/card_images/set-up-local-dev-environment-with-python.png",link:"/projects/set-up-your-local-environment-in-python",projectInternalTitle:"set-up-your-local-environment-in-python",uid:"ulex9TQOjSawZi6dUSYRRtZOtp82"},{title:"Web Scrape Amazon with BS4",author:"Ashutosh Krishna",authorAvatar:"/images/projects/authors/ashutosh_krishna.jpg",tags:["Data Science","Python","Intermediate"],image:"/images/projects/card_images/web-scrape-amazon-with-beautiful-soup.png",link:"/projects/web-scrape-amazon-with-beautiful-soup",projectInternalTitle:"web-scrape-amazon-with-beautiful-soup",uid:"3RTtQyoGydZpiEdrQdh5zalhOHc2"},{title:"Generate a QR Code with Python",internalTempTitleForOtherSuggestion:"Generate a QR Code with Python",author:"Jerry Zhu",internalAuthorName:"Jerry Zhu",authorAvatar:"/images/projects/authors/jerry_zhu.jpg",tags:["Python","Beginner"],image:"/images/projects/card_images/generate-a-qr-code-with-python.png",link:"/projects/generate-a-qr-code-with-python",projectInternalTitle:"generate-a-qr-code-with-python",uid:"ulex9TQOjSawZi6dUSYRRtZOtp82"},{title:"Animate Fireworks with JavaScript",author:"Olga Ivanova",authorAvatar:"/images/projects/authors/olga_ivanova.png",tags:["JavaScript","Advanced"],image:"/images/projects/card_images/fireworks-with-javascript-and-canvas.png",projectInternalTitle:"animate-fireworks-with-javascript-and-canvas",link:"/projects/animate-fireworks-with-javascript-and-canvas",uid:"K5DdIb3vuoU1QNxZbmPbBroLapO2"},{title:"Detect Hotdog With Hugging Face",author:"Dev Docs",authorAvatar:"/images/projects/authors/dev-docs.png",tags:["AI","Python","Intermediate"],image:"/images/projects/card_
1841images/detect-hotdog-with-hugging-face.png",link:"/projects/detect-hotdog-with-hugging-face",projectInternalTitle:"detect-hotdog-with-hugging-face",uid:"8WrnfNt7emVquDQU8zpEhwxejDq1"},{title:"Visualize YouTube Data with Plotly",author:"Miracle Awonuga",authorAvatar:"/images/projects/authors/miracle_awonuga.jpg",tags:["Data Science","Python","Beginner"],image:"/images/projects/card_images/visualize-youtube-data-with-plotly.png",link:"/projects/visualize-youtube-data-with-plotly",projectInternalTitle:"visualize-youtube-data-with-plotly",uid:"ipfLYA1TyJStSvYHqANEm8rGBmN2"},{title:"50 Terminal Project Ideas with Python",internalTempTitleForOtherSuggestion:"50 Terminal Project Ideas with Python",author:"Sonny Li",internalAuthorName:"sonnynomnom",authorAvatar:"/images/projects/authors/sonny_avatar.png",tags:["Python","Beginner"],image:"/images/projects/card_images/50-terminal-project-ideas-with-python.png",link:"/projects/50-terminal-project-ideas-using-python",projectInternalTitle:"50-terminal-project-ideas-using-python",uid:"f3vq4kwmixfMb7pB3bTtKUHQMTx2"}],searchTerm:"",filterCheckBoxes:{Python:!1,Beginner:!1,Intermediate:!1,Advanced:!1,JavaScript:!1,HTML:!1,"C++":!1,Lua:!1,AI:!1,"Data Science":!1,React:!1,Bookmarks:!1},tags:["Python","HTML","JavaScript","React","C++","Lua","AI","Data Science","Beginner","Intermediate","Advanced"],newest:{title:"Generate a Poem with Google Gemini",author:"Katherin Solis",expectedReleaseDate:"06/12/2024"},bookmarkedProjects:[]},reducers:{updateSearchTerm($,et){$.searchTerm=et.payload},updateCheckBox($,et){$.filterCheckBoxes[et.payload.checkboxName]=!$.filterCheckBoxes[et.payload.checkboxName]},clearAllFilters($){$.filterCheckBoxes={Python:!1,Beginner:!1,Intermediate:!1,Advanced:!1,JavaScript:!1,HTML:!1,"C++":!1,Lua:!1,Bookmarks:!1,AI:!1,"Data Science":!1,React:!1}}},extraReducers:$=>{}});function selectAllProjectsInternalTitle($){let et=$.projects.projects,en=[];return et.map($=>en.push($.projectInternalTitle)),en}function selectTags($){return $.projects.tags}function selectFirstThreeProjects($){return $.projects.projects.slice(0,3)}function selectOtherProjectsByAuthor($){let{authorUid:et,projectTitle:en}=$;return function($){let er=$.projects.projects,ei=er.filter($=>{let er=en.toLowerCase();try{var ei;let en=$.uid===et&&!(null===(ei=$.projectInternalTitle)||void 0===ei?void 0:ei.toLowerCase().includes(er));return en}catch($){return!1}});return ei.slice(0,3).map($=>$.projectInternalTitle)}}function selectProject($){let{projectInternalTitle:et}=$;return function($){let en=$.projects.projects;return en.find($=>$.projectInternalTitle===et)}}function selectIndividualProjectTags($){let{projectInternalTitle:et}=$;return function($){let en=$.projects.projects,er=en.find($=>$.projectInternalTitle===et);return null==er?void 0:er.tags}}function selectLatestProjects(){return function($){let et=$.projects.projects;return et.slice(0,3).map($=>$.projectInternalTitle)}}let{updateSearchTerm:eo,updateCheckBox:es,clearAllFilters:el}=ei.actions;et.ZP=ei.reducer},85307:function($,et,en){"use strict";en.d(et,{Z:function(){return getRank}});let er=[{level:1,xpThreshold:0,badge:"/images/rank_badges/level_1.png",color:"#C97356",rankName:"Bronze"},{level:2,xpThreshold:100,badge:"/images/rank_badges/level_1.png",color:"#C97356",rankName:"Bronze"},{level:3,xpThreshold:250,badge:"/images/rank_badges/level_1.png",color:"#C97356",rankName:"Bronze"},{level:4,xpThreshold:500,badge:"/images/rank_badges/level_1.png",color:"#C97356",rankName:"Bronze"},{level:5,xpThreshold:750,badge:"/images/rank_badges/level_1.png",color:"#C97356",rankName:"Bronze"},{level:6,xpThreshold:1e3,badge:"/images/rank_badges/level_2.png",color:"#C6C6C6",rankName:"Silver"},{level:7,xpThreshold:1500,badge:"/images/rank_badges/level_2.png",color:"#C6C6C6",rankName:"Silver"},{level:8,xpThreshold:2e3,badge:"/images/rank_badges/level_2.png",color:"#C6C6C6",rankName:"Silver"},{level:9,xpThreshold:2500,badge:"/images/rank_badges/level_2.png",color:"#C6C6C6",rankName:"Silver"},{level:10,xpThreshold:3e3,badge:"/images/rank_badges/level_2.png",color:"#C6C6C6",rankName:"Silver"},{level:11,xpThreshold:3500,badge:"/images/rank_badges/level_3.png",color:"#C6C6C6",rankName:"Gold"},{level:12,xpThreshold:4e3,badge:"/images/rank_badges/level_3.png",color:"#C6C6C6",rankName:"Gold"},{level:13,xpThreshold:4500,badge:"/images/rank_badges/level_3.png",color:"#C6C6C6",rankName:"Gold"},{level:14,xpThreshold:5e3,badge:"/images/rank_badges/level_3.png",color:"#C6C6C6",rankName:"Gold"},{level:15,xpThreshold:5500,badge:"/images/rank_badges/level_3.png",color:"#C6C6C6",rankName:"Gold"},{level:16,xpThreshold:6e3,badge:"/images/rank_badges/level_4.png",color:"#C6C6C6",rankName:"Platinum"},{level:17,xpThreshold:6500,badge:"/images/rank_badges/level_4.png",color:"#C6C6C6",rankName:"Platinum"},{level:18,xpThreshold:7e3,badge:"/images/rank_badges/level_4.png",color:"#C6C6C6",rankName:"Platinum"},{level:19,xpThreshold:7500,badge:"/images/rank_badges/level_4.png",color:"#C6C6C6",rankName:"Platinum"},{level:20,xpThreshold:8e3,badge:"/images/rank_badges/level_4.png",color:"#C6C6C6",rankName:"Platinum"},{level:21,xpThreshold:8500,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:22,xpThreshold:9e3,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:23,xpThreshold:9500,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:24,xpThreshold:1e4,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:25,xpThreshold:10500,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:26,xpThreshold:11e3,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:27,xpThreshold:11500,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:28,xpThreshold:12e3,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:29,xpThreshold:12500,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"},{level:30,xpThreshold:13e3,badge:"/images/rank_badges/level_5.png",color:"#C6C6C6",rankName:"Diamond"}];function getRank($){let et=er[0];for(let en of er){if($<en.xpThreshold)break;et=en}return et}},25751:function($,et,en){"use strict";en.d(et,{Y:function(){return ei}});var er=JSON.parse('{"version":"2026-06-16T15:44:17.025Z","schema":{"domains":["web-dev","game-dev","computer-science","data-science","tools","design"],"journeys":["web-dev","web-design","game-dev","computer-science","data-science","ai"],"roles":["starter","intermediate","terminal"]},"journeys":{"web-dev":{"displayName":"Web Dev","starters":[],"order":["html","css","javascript","command-line","git-github","intermediate-javascript","nodejs","framework-valley-react"]},"web-design":{"displayName":"Web Design","starters":[],"order":["ui-ux-design","html","css"]},"game-dev":{"displayName":"Game Dev","starters":[],"order":["javascript","phaser"]},"computer-science":{"displayName":"Computer Science","starters":["python","cpp","java"],"order":["data-structures-and-algorithms","command-line"],"continuesAt":"sql"},"data-science":{"displayName":"Data Science","starters":[],"order":["python","sql","numpy","pandas","matplotlib","machine-learning"]},"ai":{"displayName":"AI","starters":[],"order":["python","gen-ai"]}},"domains":{"web-dev":{"displayName":"Web Dev","courses":["html","css","javascript","command-line","intermediate-javascript","nodejs","framework-valley-react"]},"game-dev":{"displayName":"Game Dev","courses":["phaser","lua","c-sharp"]},"computer-science":{"displayName":"Computer Science","courses":["cpp","java","data-structures-and-algorithms"]},"data-science":{"displayName":"Data Science","courses":["python","sql","numpy","pandas","matplotlib","machine-learning","gen-ai","p5js","intermediate-python"]},"tools":{"displayName":"Tools","courses":["git-github","github-copilot"]},"design":{"displayName":"Design","courses":["ui-ux-design"]}},"courses":{"html":{"displayName":"HTML","primaryDomain":"web-dev","secondary
1841Domains":[],"journeyMemberships":[{"id":"web-dev","role":"starter","next":["css"]},{"id":"web-design","role":"intermediate","next":["css"]}],"hoursToComplete":8,"certificate":true},"css":{"displayName":"CSS","primaryDomain":"web-dev","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["javascript"]},{"id":"web-design","role":"terminal","next":[]}],"hoursToComplete":10,"certificate":true},"javascript":{"displayName":"JavaScript","primaryDomain":"web-dev","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["command-line"]},{"id":"game-dev","role":"starter","next":["phaser"]}],"hoursToComplete":16,"certificate":true},"command-line":{"displayName":"Command Line","primaryDomain":"web-dev","secondaryDomains":["tools"],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["git-github"]},{"id":"computer-science","role":"intermediate","next":["sql"]}],"hoursToComplete":4,"certificate":false},"git-github":{"displayName":"Git & GitHub","primaryDomain":"tools","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["intermediate-javascript"]}],"hoursToComplete":4,"certificate":false},"intermediate-javascript":{"displayName":"Intermediate JavaScript","primaryDomain":"web-dev","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["nodejs"]}],"hoursToComplete":4,"certificate":false},"nodejs":{"displayName":"Node.js","primaryDomain":"web-dev","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"intermediate","next":["framework-valley-react"]}],"hoursToComplete":8,"certificate":false},"framework-valley-react":{"displayName":"React","primaryDomain":"web-dev","secondaryDomains":[],"journeyMemberships":[{"id":"web-dev","role":"terminal","next":[]}],"hoursToComplete":16,"certificate":true},"ui-ux-design":{"displayName":"UI/UX","primaryDomain":"design","secondaryDomains":[],"journeyMemberships":[{"id":"web-design","role":"starter","next":["html"]}],"hoursToComplete":2,"certificate":false},"phaser":{"displayName":"Phaser","primaryDomain":"game-dev","secondaryDomains":[],"journeyMemberships":[{"id":"game-dev","role":"terminal","next":[]}],"hoursToComplete":8,"certificate":false},"python":{"displayName":"Python","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"computer-science","role":"starter","next":["data-structures-and-algorithms"]},{"id":"data-science","role":"starter","next":["sql"]},{"id":"ai","role":"starter","next":["gen-ai"]}],"hoursToComplete":16,"certificate":true},"cpp":{"displayName":"C++","primaryDomain":"computer-science","secondaryDomains":[],"journeyMemberships":[{"id":"computer-science","role":"starter","next":["data-structures-and-algorithms"]}],"hoursToComplete":16,"certificate":false},"java":{"displayName":"Java","primaryDomain":"computer-science","secondaryDomains":[],"journeyMemberships":[{"id":"computer-science","role":"starter","next":["data-structures-and-algorithms"]}],"hoursToComplete":16,"certificate":true},"data-structures-and-algorithms":{"displayName":"Data Structures and Algorithms","primaryDomain":"computer-science","secondaryDomains":[],"journeyMemberships":[{"id":"computer-science","role":"intermediate","next":["command-line"]}],"hoursToComplete":4,"certificate":false},"sql":{"displayName":"SQL","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"data-science","role":"intermediate","next":["numpy"]}],"hoursToComplete":8,"certificate":false},"numpy":{"displayName":"NumPy","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"data-science","role":"intermediate","next":["pandas"]}],"hoursToComplete":4,"certificate":false},"pandas":{"displayName":"Pandas","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"data-science","role":"intermediate","next":["matplotlib"]}],"hoursToComplete":4,"certificate":false},"matplotlib":{"displayName":"Matplotlib","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"data-science","role":"intermediate","next":["machine-learning"]}],"hoursToComplete":4,"certificate":false},"machine-learning":{"displayName":"Machine Learning","primaryDomain":"data-science","secondary
1841Domains":[],"journeyMemberships":[{"id":"data-science","role":"terminal","next":[]}],"hoursToComplete":2,"certificate":false},"gen-ai":{"displayName":"Gen AI","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[{"id":"ai","role":"terminal","next":[]}],"hoursToComplete":4,"certificate":false},"lua":{"displayName":"Lua","primaryDomain":"game-dev","secondaryDomains":[],"journeyMemberships":[],"hoursToComplete":8,"certificate":false},"c-sharp":{"displayName":"C#","primaryDomain":"game-dev","secondaryDomains":[],"journeyMemberships":[],"hoursToComplete":8,"certificate":false},"p5js":{"displayName":"p5.js","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[],"hoursToComplete":2,"certificate":false},"github-copilot":{"displayName":"GitHub Copilot","primaryDomain":"tools","secondaryDomains":[],"journeyMemberships":[],"hoursToComplete":4,"certificate":false},"intermediate-python":{"displayName":"Intermediate Python","primaryDomain":"data-science","secondaryDomains":[],"journeyMemberships":[],"hoursToComplete":8,"certificate":false}},"oneOffs":["c-sharp","github-copilot","intermediate-python","lua","p5js"],"warnings":[{"kind":"multi-domain-course","course":"command-line","primary":"web-dev","secondary":["tools"]}]}');let ei=er},33723:function($,et,en){"use strict";en.d(et,{EQ:function(){return es},RQ:function(){return selectGraphStatus},nR:function(){return selectActiveGraph}});var er=en(77236),ei=en(25751);let eo={graph:ei.Y,source:"bundled",version:ei.Y.version,status:"idle",error:null},es=(0,er.hg)("graph/fetchActive",async()=>{var $,et;let en=await fetch("/api/recommendations/graph");if(!en.ok)throw Error("graph fetch failed: HTTP ".concat(en.status));let er=await en.json();if(!(null==er?void 0:er.success)||!(null===($=er.data)||void 0===$?void 0:$.graph))throw Error(null!==(et=null==er?void 0:er.error)&&void 0!==et?et:"malformed graph response");return er.data}),el=(0,er.oM)({name:"graph",initialState:eo,reducers:{},extraReducers:$=>{$.addCase(es.pending,$=>{$.status="loading",$.error=null}),$.addCase(es.fulfilled,($,et)=>{$.status="succeeded",$.graph=et.payload.graph,$.source=et.payload.source,$.version=et.payload.version}),$.addCase(es.rejected,($,et)=>{var en;$.status="failed",$.error=null!==(en=et.error.message)&&void 0!==en?en:"fetch-failed"})}});et.ZP=el.reducer;let selectActiveGraph=$=>{var et,en;return null!==(en=null===(et=$.graph)||void 0===et?void 0:et.graph)&&void 0!==en?en:ei.Y},selectGraphStatus=$=>{var et,en;return null!==(en=null===(et=$.graph)||void 0===et?void 0:et.status)&&void 0!==en?en:"idle"}},98494:function($,et,en){"use strict";en.d(et,{Qy:function(){return useJourneyPlan},SH:function(){return useNextCourse},Sv:function(){return useRecommendations_useRecommendations}});var er=en(67294),ei=en(9473),eo=en(73845),es=en(33723);function useActiveGraph_useActiveGraph(){let $=(0,eo.T)(),et=(0,ei.v9)(es.RQ),en=(0,ei.v9)(es.nR);return(0,er.useEffect)(()=>{"idle"===et&&$((0,es.EQ)())},[et,$]),en}var el=en(22058),eu=en(25751);let ed=(()=>{let $={};for(let et of Object.keys(eu.Y.courses))try{let en=(0,el.U)({courseName:et}),er=0;for(let $ of Object.values(en.chapters))er+=Object.keys($.challenges).length;$[et]=er}catch(en){$[et]=0}return $})();function countCompletedChallenges($,et){if(!$)return 0;let en=$[et];if(!(null==en?void 0:en.chapters))return 0;let er=0;for(let $ of Object.values(en.chapters)){var ei;let et=null!==(ei=null==$?void 0:$.challenges)&&void 0!==ei?ei:{};for(let $ of Object.values(et))(null==$?void 0:$.status)==="complete"&&(er+=1)}return er}function useCompletedCourses_useCompletedCourses(){let $=(0,ei.v9)($=>{var et;return null===(et=$.userProgress)||void 0===et?void 0:et.courses}),et=useActiveGraph_useActiveGraph();return(0,er.useMemo)(()=>{let en=new Set;for(let ei of Object.keys(et.courses)){var er;let et=null!==(er=ed[ei])&&void 0!==er?er:0;if(0===et)continue;let eo=countCompletedChallenges($,ei);eo>=et&&en.add(ei)}return en},[$,et])}function byScoreDesc($,et){return et.score-$.score||$.courseName.localeCompare(et.courseName)}function useRecommendations_useRecommendations(){let{justFinished:$,limit:et}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},en=useCompletedCourses_useCompletedCourses(),eo=function(){let $=(0,ei.v9)($=>{var et;return null===(et=$.userProgress)||void 0===et?void 0:et.courses}),et=useActiveGraph_useActiveGraph();return(0,er.useMemo)(()=>{let en=new Set;for(let ei of Object.keys(et.courses)){var er;let et=null!==(er=ed[ei])&&void 0!==er?er:0;if(0===et)continue;let eo=countCompletedChallenges($,ei);eo>0&&eo<et&&en.add(ei)}return en},[$,et])}(),es=useActiveGraph_useActiveGraph();return(0,er.useMemo)(()=>{let er=new Set(en);$&&er.add($);let ei=new Set(eo);$&&ei.delete($);let el=function($,et){var en,er,ei,eo,es;
1841let{completedCourses:el,inProgressCourses:eu}=$,ed=new Map,upsert=($,en,er)=>{if(el.has($)||!et.courses[$])return;let ei=ed.get($);(!ei||ei.score<en)&&ed.set($,{courseName:$,score:en,reason:er})};if(0===el.size&&0===eu.size){let $=new Set;for(let[es,el]of Object.entries(et.journeys)){let ed=el.starters.length>0?el.starters:[el.order[0]];for(let el of ed)$.has(el)||upsert(el,50,{kind:"cold-start",journeyId:es,humanReadable:"Start with ".concat(null!==(ei=null===(en=et.courses[el])||void 0===en?void 0:en.displayName)&&void 0!==ei?ei:el),displayJourneyName:null!==(eo=null===(er=et.courses[el])||void 0===er?void 0:er.displayName)&&void 0!==eo?eo:el,started:eu.has(el)})}return[...ed.values()].sort(byScoreDesc)}for(let $ of el){let en=et.courses[$];if(en)for(let $ of en.journeyMemberships){let en=et.journeys[$.id],er=null!==(es=null==en?void 0:en.displayName)&&void 0!==es?es:$.id;for(let et of $.next)upsert(et,100,{kind:"continue-journey",journeyId:$.id,displayJourneyName:er,humanReadable:"Continue your ".concat(er," journey"),started:eu.has(et)})}}let eh=new Set;for(let $ of el){let en=et.courses[$];if(en)for(let $ of en.journeyMemberships)eh.add($.id)}for(let[$,en]of Object.entries(et.journeys)){if(eh.has($))continue;let et=en.starters.length>0?en.starters:[en.order[0]];for(let er of et)upsert(er,60,{kind:"start-new-journey",journeyId:$,humanReadable:"Try the ".concat(en.displayName," journey"),displayJourneyName:en.displayName,started:eu.has(er)})}for(let $ of et.oneOffs){let en=et.courses[$];en&&upsert($,20,{kind:"one-off-pick",domainId:en.primaryDomain,humanReadable:"A standalone favorite",displayJourneyName:en.displayName,started:eu.has($)})}return[...ed.values()].sort(byScoreDesc)}({completedCourses:er,inProgressCourses:ei},es);return null!=et?el.slice(0,et):el},[en,eo,$,et,es])}function useNextCourse($){var et;let en=useRecommendations_useRecommendations({justFinished:null==$?void 0:$.lastFinished,limit:1});return null!==(et=en[0])&&void 0!==et?et:null}function aggregate($){return $.reduce(($,et)=>({courses:$.courses+1,hoursToComplete:$.hoursToComplete+et.hoursToComplete,certificates:$.certificates+(et.hasCertificate?1:0)}),{courses:0,hoursToComplete:0,certificates:0})}function useJourneyPlan($){let et=useActiveGraph_useActiveGraph(),en=useCompletedCourses_useCompletedCourses();return(0,er.useMemo)(()=>(function($,et,en){let er=et.journeys[$];if(!er)return null;let ei=[...er.starters,...er.order],eo=ei.map($=>{var er,ei,eo;let es=et.courses[$];return{courseName:$,displayName:null!==(er=null==es?void 0:es.displayName)&&void 0!==er?er:$,hoursToComplete:null!==(ei=null==es?void 0:es.hoursToComplete)&&void 0!==ei?ei:0,hasCertificate:null!==(eo=null==es?void 0:es.certificate)&&void 0!==eo&&eo,completed:en.has($)}});return{journeyId:$,journeyName:er.displayName,courses:eo,total:aggregate(eo),remaining:aggregate(eo.filter($=>!$.completed))}})($,et,en),[$,et,en])}},609:function($,et,en){"use strict";en.d(et,{o2:function(){return eT},xG:function(){return eA},ZP:function(){return eW},BT:function(){return eR},T:function(){return ej},KC:function(){return eM},jl:function(){return selectAllCharacterModels},ef:function(){return selectAllUnlockableItems},RI:function(){return selectCourseXp},$u:function(){return selectCurrentCharacterModelIndex},ZQ:function(){return selectCurrentStreak},nU:function(){return selectCurrentXp},fI:function(){return selectCustomAvatar},s2:function(){return selectIsLastCharacter},Ao:function(){return selectIsLoadingUser},i4:function(){return selectIsMasterMute},ot:function(){return selectIsUserSignedIn},Nq:function(){return selectLoadingStateForUserSlice},XU:function(){return selectPopupState},zv:function(){return selectRefetchUser},IC:function(){return selectSignedInUser},S5:function(){return selectUserAdminStatus},Vv:function(){return selectUserBio},xF:function(){return selectUserClubStatus},Vl:function(){return selectUserCodeEditorTheme},o4:function(){return selectUserColorMode},I_:function(){return selectUserEmail},QP:function(){return selectUserExerciseSettings},r:function(){return selectUserFirstName},Uq:function(){return selectUserLastName},He:function(){return selectUserLocation},zr:function(){return selectUserName},zL:function(){return selectUserPausedStatus},TQ:function(){return selectUserProfileImage},Sv:function(){return selectUserSchool},cK:function(){return selectUserSkillset},EU:function(){return selectUserSocials},f8:function(){return selectUserUid},xp:function(){return selectUserUidIfSignedIn},O4:function(){return selectUserWebsite},zJ:function(){return selectUserWork},I:function(){return selectUsersName},ix:function(){return eU},i5:function(){return eS},Ii:function(){return eN},I0:function(){return eV},BW:function(){return eq},J:function(){return ew},ck:function(){return eD},h9:function(){return eZ},BA:function(){return eO},q1:function(){return eE}});var er=en(77236),ei=en(1027),eo=en(39828),es=en(16689),el=en(92369),eu=en(89762),ed=en.n(eu),eh=en(80109),ep=en(54575);function loadImage($){return new Promise((et,en)=>{let er=new Image;er.crossOrigin="anonymous",er.onload=()=>et(er),er.onerror=$=>en($),er.src=$})}
1841function applyPalettes($,et,en){if(!et.palettes||!et.palettes.length)return;let er=$.getContext("2d");if(!er)return;let ei=new Map;if(et.palettes.forEach($=>{let er=en[$.slotId];if(!er)return;let eo=(0,ep.zE)($.slotId,$.shades,er,et.id);eo.forEach(($,et)=>ei.set(et,$))}),!ei.size)return;let eo=er.getImageData(0,0,$.width,$.height);(0,ep.w)(eo,ei),er.putImageData(eo,0,0)}async function generateStaticPNG($,et){let en=eh.rw[$.archetypeId];if(!en)return;let er=[...en.layers].sort(($,et)=>$.zIndex-et.zIndex);if(!er.length)return;let ei=[];er.forEach(et=>{var en,er;let eo=null!==(er=null===(en=$.layerOverrides)||void 0===en?void 0:en[et.assetId])&&void 0!==er?er:et.assetId,es=eh.J1[eo];es&&ei.push({asset:es,zIndex:et.zIndex})});let eo=($.extraLayers||[]).map($=>{let et=eh.J1[$.assetId];return et?{asset:et,zIndex:$.zIndex}:null}).filter(Boolean),es=[...ei,...eo].sort(($,et)=>$.zIndex-et.zIndex);if(!es.length)return;let{asset:el}=es[0],{frameWidth:eu,frameHeight:ed}=el.standing,ep=document.createElement("canvas");ep.width=4*eu,ep.height=4*ed;let em=ep.getContext("2d");if(em){for(let en of(em.imageSmoothingEnabled=!1,em.fillStyle=et,em.fillRect(0,0,ep.width,ep.height),es)){let et=en.asset;try{let en=await loadImage(et.standing.source),er=document.createElement("canvas");
1841er.width=eu,er.height=ed;let ei=er.getContext("2d");if(!ei)continue;ei.drawImage(en,eu,0,eu,ed,0,0,eu,ed),applyPalettes(er,et,$.colors),em.drawImage(er,0,0,eu,ed,0,0,4*eu,4*ed)}catch($){console.warn("Failed to build layer for static PNG",et.id,$)}}return ep.toDataURL("image/png")}}async function generateAnimatedGIF($){let et=eh.rw[$.archetypeId];if(!et)return;let en=[...et.layers].sort(($,et)=>$.zIndex-et.zIndex);if(!en.length)return;let er=[];en.forEach(et=>{var en,ei;let eo=null!==(ei=null===(en=$.layerOverrides)||void 0===en?void 0:en[et.assetId])&&void 0!==ei?ei:et.assetId,es=eh.J1[eo];es&&er.push({asset:es,zIndex:et.zIndex})});let ei=($.extraLayers||[]).map($=>{let et=eh.J1[$.assetId];return et?{asset:et,zIndex:$.zIndex}:null}).filter(Boolean),eo=[...er,...ei].sort(($,et)=>$.zIndex-et.zIndex);if(!eo.length)return;let{asset:es}=eo[0],{frameWidth:el,frameHeight:eu,columns:ep,rows:em}=es.standing,ef=new(ed())({workers:2,quality:10,width:4*el,height:4*eu,transparent:"rgba(0,0,0,0)",workerScript:"/gif.worker.js"});for(let et=0;et<ep;et++){let en=document.createElement("canvas");en.width=4*el,en.height=4*eu;let er=en.getContext("2d");if(er){for(let en of(er.imageSmoothingEnabled=!1,eo)){let ei=en.asset;try{let en=await loadImage(ei.standing.source),eo=document.createElement("canvas");eo.width=el,eo.height=eu;let es=eo.getContext("2d");if(!es)continue;let ed=et*el;es.drawImage(en,ed,0,el,eu,0,0,el,eu),applyPalettes(eo,ei,$.colors),er.drawImage(eo,0,0,el,eu,0,0,4*el,4*eu)}catch($){console.warn("Failed to build layer for GIF frame",ei.id,$)}}ef.addFrame(en,{delay:200})}}return new Promise(($,et)=>{ef.on("finished",et=>{$(et)});try{ef.render()}catch($){console.error("GIF encoding error:",$),et($)}})}async function saveUserAvatar($,et){let en=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent",{firestore:er,storage:ei}=(0,el.UM)(),eu=await generateStaticPNG($,en);if(!eu)throw Error("Failed to generate static PNG");let ed=await generateAnimatedGIF($);if(!ed)throw Error("Failed to generate animated idle GIF");let eh=function($){let et=$.split(","),en=et[0].match(/:(.*?);/),er=en?en[1]:"image/png",ei=atob(et[1]),eo=ei.length,es=new Uint8Array(eo);for(;eo--;)es[eo]=ei.charCodeAt(eo);return new Blob([es],{type:er})}(eu),ep=(0,es.iH)(ei,"users/".concat(et,"/avatars/profile.png"));await (0,es.KV)(ep,eh);let em=await (0,es.Jt)(ep),ef=(0,es.iH)(ei,"users/".concat(et,"/avatars/profile-animated.gif"));await (0,es.KV)(ef,ed);let eg=await (0,es.Jt)(ef),ey=(0,eo.hJ)(er,"users/".concat(et,"/worldsAvatars")),ev={...$};ev.background||delete ev.background;let ex=await (0,eo.ET)(ey,{avatarConfig:ev,createdAt:(0,eo.Bt)(),profileImageUrl:em,animatedGifUrl:eg,name:"Custom Avatar"}),e_=(0,eo.JU)(er,"users/".concat(et));return await (0,eo.r7)(e_,{currentAvatarId:ex.id}),ex.id}var em=en(47922),ef=en(99445),eg=en(48645);let ey={35:"duck",65:"editorColorThemes",150:"aiBot"};async function getUserClaimsFromSession(){try{let $=await fetch("/api/auth/getClaims",{method:"GET",credentials:"include"}),et=await $.json();if("success"===et.status&&et.claims)return et.claims;return null}catch($){return console.error("Error getting user claims from session:",$),null}}let ev=(0,er.hg)("user/fetchClaims",async function($,et){try{let $=await getUserClaimsFromSession();if(!$)return et.rejectWithValue({error:"No claims found"});return $}catch($){return console.error("Error fetching user claims:",$),et.rejectWithValue({error:"Failed to fetch claims"})}});var ex=en(92614),e_=en(37009);let ew=(0,er.hg)("user/popup",async function($,et){try{let{type:et,status:en,properties:er}=$;return{type:et,status:en,properties:er}}catch($){console.error("Error while updating popup data")}}),ek=(0,er.hg)("user/fetchExerciseSettings",async function($,et){let{uid:en}=$;if(!en)return{anonymous:!0};try{let $=await (0,em.o1)({uid:en});return{anonymous:!1,skipPopup:$}}catch($){return console.error("Error while fetching user exercise settings"),{anonymous:!0,skipPopup:!1}}}),eC=(0,er.hg)("user/fetchSoundSettings",async function($,et){let{uid:en}=$;if(!en)return{anonymous:!0};try{let $=await (0,em.q_)({uid:en});return{anonymous:!1,...$}}catch($){return console.error("Error while fetching user sound settings"),{anonymous:!0,masterMute:!1}}}),eE=(0,er.hg)("user/updateSoundSettings",async function($,et){let{uid:en,masterMute:er}=$;try{return await (0,em.yA)({uid:en,masterMute:er}),{masterMute:er}}catch($){return console.error("Error while updating user sound settings"),et.rejectWithValue({error:"Failed to update sound settings"})}}),eI=(0,er.hg)("user/onBoarding",async function($,et){try{return $}catch($){console.error("Error while updating onboarding data")}}),eS=(0,er.hg)("user/toggleColorMode",async function($,et){let{c
1841olorMode:en}=$,er=et.getState(),{isSignedIn:ei}=er.user;if(window.localStorage.setItem("colorMode",en),!ei)return{colorMode:en};{let{uid:$}=er.user.user;try{await (0,em.x5)({colorMode:en,uid:$})}catch($){console.error($)}return{colorMode:en}}});(0,er.hg)("user/showModal",async function($){});let eT=(0,er.hg)("user/addXp",async function($,et){var en,er;let{xP:ei,challengeName:eo,chapterName:es,courseName:el}=$,{user:eu}=et.getState(),{isSignedIn:ed}=eu;if(et.dispatch(ej({totalXp:null===(er=eu.user)||void 0===er?void 0:null===(en=er.stats)||void 0===en?void 0:en.totalXp})),!ed)return{xP:ei,courseName:el,challengeName:eo,chapterName:es,isSignedIn:!1};{let $=eu.user,{uid:et}=$;return await (0,em.Vu)({uid:et,courseName:el,chapterName:es,challengeName:eo,xP:ei}),{xP:ei,courseName:el,chapterName:es,challengeName:eo,isSignedIn:!0}}}),eA=(0,er.hg)("user/streak",async function($,et){let{user:en}=et.getState(),{isSignedIn:er}=en;if(!er)return{noUpdate:!0,currentStreak:1,longestStreak:1,datesVisited:[]};{let $=en.user,{uid:et}=$,{currentStreak:er,longestStreak:ei,datesVisited:eo}=await (0,em.z2)({uid:et});return{currentStreak:er,longestStreak:ei,datesVisited:eo}}}),eP=(0,er.hg)("user/updateUsername",async function($,et){let{username:en}=$,{user:er}=et.getState();if(!er.isSignedIn)return{username:"Your name"};try{let $=await (0,em.$q)({username:en});return localStorage.setItem("username",$.username),{username:$.username}}catch($){var ei,eo;return et.rejectWithValue({code:null!==(ei=$.code)&&void 0!==ei?ei:"internal_error",message:null!==(eo=$.message)&&void 0!==eo?eo:"Failed to update username",retryAfter:$.retryAfter})}}),eN=(0,er.hg)("user/updateCharacterModel",async function($,et){let{characterModelIndex:en,lastCharacter:er=!1}=$,{user:ei}=et.getState(),eo=en;if(!0===er){let $=et.getState().user.characterModels.length;eo=$-1}if(!ei.isSignedIn)return{characterModelIndex:eo};{let{uid:$}=ei.user;try{return await (0,em.Oq)({characterModelIndex:eo,uid:$}),{characterModelIndex:eo}}catch($){console.log("Failed to update user character model!")}}}),ej=(0,er.hg)("user/getUnlockableItems",async function($){let{uid:et,totalXp:en}=$;try{let $=function($){let{uid:et,totalXp:en}=$;if(!en)return{duck:!1,editorColorThemes:!1,aiBot:!1};try{let $={};for(let et in ey)en>=Number(et)?$[ey[et]]=!0:$[ey[et]]=!1;return $}catch($){return{duck:!1,editorColorThemes:!1,aiBot:!1}}}({uid:et,totalXp:en});return $}catch($){return console.error($),{aiBot:!1,duck:!1,editorColorThemes:!1}}}),eR=(0,er.hg)("user/fetchUser",async function($,et){let{uid:en}=$;try{var er,eo;if(!en)return et.rejectWithValue({refetchUser:!0});let $=await (0,em.PR)({uid:en});if(!$.user)return et.rejectWithValue({refetchUser:!0});let es=await (0,ei.p)(en);if(et.dispatch(ek({uid:en})),et.dispatch(eC({uid:en})),et.dispatch((0,ef.el)({uid:en})),et.dispatch(ej({uid:en,totalXp:null==$?void 0:null===(eo=$.user)||void 0===eo?void 0:null===(er=eo.stats)||void 0===er?void 0:er.totalXp})),et.dispatch(ev()),et.dispatch((0,ef.xd)({uid:en})),et.dispatch((0,ex.Bl)({uid:en})),et.dispatch((0,e_.SQ)({uid:en})),!$.user)return et.rejectWithValue({refetchUser:!0});{localStorage.setItem("photoURL",$.user.photoURL||""),localStorage.setItem("username",$.user.username||"");let et=await (0,eg.sS)();return{user:$.user,isPaypal:et,customAvatarData:es}}}catch($){return console.error($),et.rejectWithValue({refetchUser:!0})}}),eV=(0,er.hg)("user/updateCodeEditorTheme",async function($,et){let{codeEditorTheme:en}=$;try{let{user:$}=et.getState();if(!$.isSignedIn)return{codeEditorTheme:en};{let{uid:et}=$.user;return await (0,em.HI)({uid:et,codeEditorTheme:en}),localStorage.setItem("codeEditorTheme",en),{codeEditorTheme:en}}}catch($){console.error("Error while updating code editor theme."),console.error($)}}),eD=(0,er.hg)("user/updateProfile",async function($,et){let{data:en}=$,{user:er}=et.getState();if(!er.isSignedIn)return et.rejectWithValue({message:"User not signed in"});try{let{uid:$}=er.user;return await (0,em.jr)({uid:$,data:en}),en}catch($){return console.error("updateProfile thunk error:",$),et.rejectWithValue({message:"Failed to update profile",error:$ instanceof Error?$.message:"Unknown error"})}}),eO=(0,er.hg)("user/updateAvatar",async function($,et){let{file:en}=$,{user:er}=et.getState();if(!er.isSignedIn)return et.rejectWithValue({message:"User not signed in"});try{let{uid:$}=er.user,ei=await (0,em.RO)({uid:$,file:en});if(!(null==ei?void 0:ei.photoURL))return et.rejectWithValue({message:"No photo URL returned"});return{photoURL:ei.photoURL}}catch($){return console.error("updateUserAvatar thunk error:",$),et.rejectWithValue({message:"Failed to upload avatar",error:$ instanceof Error?$.message:"Unknown error"})}}),eM=(0,er.hg)("user/saveCustomAvatar",async function($,et){let{user:en}=et.getState();if(!en.isSignedIn||!en.user.uid)return et.rejectWithValue("User must be signed in to save avatar");try{await saveUserAvatar($,en.user.uid);let et=await (0,ei.p)(en.user.uid);return et}catch($){return console.error("Failed to save custom avatar:",$),et.rejectWithValue($)}}),eF=function(){{let $=localStorage.getItem("colorMode");return $||"dark"}}(),eL={popup:{type:"",status:"hide",properties:{}},onboarding:{state:"idle",currentStep:0,totalSteps:0,properties:{}},exerciseSettings:{skipPopup:!1},soundSettings:{masterMute:!1},isSignedIn:!1,isClub:!1,isPaused:!1,isAdmin:!1,isEducator:!1,isPaypalUser:!1,claims:null,refetchUser:!1,tokenStatus:"idle",unlockableItems:{aiBot:{unlocked:!1,item:"aiBot",imageLink:"/images/unlockableItems/ai-bot-sprite.png",xpToUnlock:150},duck:{unlocked:!1,item:"duck",imageLink:"/images/unlockableItems/RubberDuck.png",xpToUnlock:35},editorColorThemes:{unlocked:!1,item:"editorColorThemes",imageLink:"/images/unlockableItems/editor-theme-brush.png",xpToUnlock:65}},bookmarks:null,user:{firstName:"coder",lastName:"friend",name:"user",username:"",uniqueUsername:"your-name",email:null,emailVerified:null,photoURL:null,uid:null,colorMode:eF,codeEditorTheme:"tomorrow-night-blue",roles:{isFree:!0,isCommunity:!1,isWorkshop:!1,isTrial:!1},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,socials:null,
1841stats:{achievements:[],totalXp:0,courseXp:{python:{courseName:"python",courseXp:0},html:{courseName:"html",courseXp:0},css:{courseName:"css",courseXp:0},javascript:{courseName:"javascript",courseXp:0},"command-line":{courseName:"command-line",courseXp:0},"git-github":{courseName:"git-github",courseXp:0}},streaks:{currentStreak:1,longestStreak:1,datesVisited:[]},characterModelIndex:0},bio:"",school:"",work:"",location:"",website:"",skillset:[],metadata:{creationTime:""}},isLoadingUser:!1,error:{status:!1,message:{description:"",metadata:""}},loading:!1,loadingImage:!1,characterModels:["/images/boy.gif","/images/girl.gif","/images/robot.gif","/images/foxboy.gif","/images/foxgirl.gif","/game-room/new-sheets/Thumbnails/chillsprite-idle.gif"],customAvatar:{config:null,animatedGifUrl:null,profileImageUrl:null}},eH=(0,er.oM)({name:"user",initialState:eL,reducers:{setSignIn($,et){$.user=et.payload.user,$.isSignedIn=et.payload.isSignedIn},setSignOut($){$.user=eL.user,$.isSignedIn=!1,$.isClub=!1,$.soundSettings=eL.soundSettings},setLoadingUser($,et){$.isLoadingUser=et.payload.status},updateExerciseSettings($,et){$.exerciseSettings={...$.exerciseSettings,...et.payload}},updateSoundSettings($,et){$.soundSettings={...$.soundSettings,...et.payload}}},extraReducers:$=>{$.addCase(ev.pending,function($,et){$.isLoadingUser=!0}),$.addCase(ev.fulfilled,function($,et){let en=et.payload;$.claims=en,$.isLoadingUser=!1,en&&($.isClub=(null==en?void 0:en.stripeRole)==="club",$.isAdmin=(null==en?void 0:en.admin)===!0||(null==en?void 0:en.isAdmin)===!0,$.isEducator=!!en.educator||"paideducator"===en.stripeRole,$.isPaused=!!en.paused,$.isPaypalUser=!!en.paypal)}),$.addCase(ef.pv.pending,function($){$.tokenStatus="loading"}),$.addCase(ef.pv.fulfilled,function($){$.tokenStatus="succeeded",setTimeout(function(){$.tokenStatus="idle"},2e3)}),$.addCase(ef.pv.rejected,function($){$.tokenStatus="failed",setTimeout(function(){$.tokenStatus="idle"},2e3)}),$.addCase(ef.xd.fulfilled,function($,et){$.bookmarks=et.payload}),$.addCase(ek.fulfilled,function($,et){et.payload.anonymous}),$.addCase(eC.fulfilled,function($,et){if(!et.payload.anonymous){var en;$.soundSettings.masterMute=null!==(en=et.payload.masterMute)&&void 0!==en&&en}}),$.addCase(eE.fulfilled,function($,et){$.soundSettings.masterMute=et.payload.masterMute}),$.addCase(ew.fulfilled,function($,et){$.popup=et.payload}),$.addCase(eI.fulfilled,function($,et){$.onboarding=et.payload}),$.addCase(ej.fulfilled,function($,et){for(let en in et.payload)$.unlockableItems[en].unlocked=et.payload[en]}),$.addCase(ef.el.pending,function($,et){"object"!=typeof $.user.integrations&&($.user.integrations={})}),$.addCase(ef.el.fulfilled,function($,et){$.user.integrations={...$.user.integrations,discord:et.payload}}),$.addCase(ef.el.rejected,function($,et){"object"!=typeof $.user.integrations?$.user.integrations={discord:null}:$.user.integrations={...$.user.integrations,discord:null}}),$.addCase(eS.fulfilled,function($,et){$.user.colorMode=et.payload.colorMode}),$.addCase(eS.rejected,function($,et){"light"===$.user.colorMode?$.user.colorMode="dark":$.user.colorMode="light"}),$.addCase(eT.pending,function($,et){$.loading=!0}),$.addCase(eT.fulfilled,function($,et){$.user.stats.totalXp+=Number(et.payload.xP);let en=$.user.stats.courseXp[et.payload.courseName];en?$.user.stats.courseXp[et.payload.courseName].courseXp+=Number(et.payload.xP):$.user.stats.courseXp[et.payload.courseName]={courseName:et.payload.courseName,courseXp:Number(et.payload.xP)},$.loading=!1}),$.addCase(eT.rejected,function($,et){$.error.status=!0,$.error.message.description="Failed to add XP!"}),$.addCase(eA.fulfilled,function($,et){$.user.stats.streaks.currentStreak=et.payload.currentStreak,$.user.stats.streaks.longestStreak=et.payload.longestStreak,$.user.stats.streaks.datesVisited=et.payload.datesVisited}),$.addCase(eP.pending,function($,et){}),$.addCase(eP.fulfilled,function($,et){$.user.username=et.payload.username}),$.addCase(eP.rejected,function($,et){var en;let er=null!==(en=et.payload)&&void 0!==en?en:{};$.error.message.description=er.message||"Problem with username update",$.error.status=!0}),$.addCase(eN.fulfilled,function($,et){$.user.stats.characterModelIndex=et.payload.characterModelIndex}),$.addCase(eR.pending,function($,et){$.isLoadingUser=!0,$.error.status=!1,$.refetchUser=!1}),$.addCase(eR.fulfilled,function($,et){var en;$.user=et.payload.user,$.isPaypalUser=null===(en=et.payload)||void 0===en?void 0:en.isPaypal,et.payload.customAvatarData&&($.customAvatar.config=et.payload.customAvatarData.config,$.customAvatar.animatedGifUrl=et.payload.customAvatarData.animatedGifUrl,$.customAvatar.profileImageUrl=et.payload.customAvatarData.profileImageUrl),$.isSignedIn=!0,$.isLoadingUser=!1,$.refetchUser=!1}),$.addCase(eR.rejected,function($,et){$.error.message={metadata:et.payload,description:"failed to fetch user from firebase"},$.error.status=!0,$.refetchUser=!0}),$.addCase(eV.fulfilled,function($,et){$.user.codeEditorTheme=et.payload.codeEditorTheme}),$.addCase(eV.rejected,function($,et){$.user.codeEditorTheme="tomorrow-night-blue"}),$.addCase(eD.pending,function($,et){$.loading=!0}),$.addCase(eD.fulfilled,function($,et){var en,er,ei,eo,es,el,eu,ed,eh,ep,em,ef,eg,ey,ev,ex,e_,ew,ek,eC,eE;$.loading=!1,et.payload&&($.user={...$.user,...et.payload,socials:{...$.user.socials,github:null!==(eh=null!==(ed=et.payload.github)&&void 0!==ed?ed:null===(en=$.user.socials)||void 0===en?void 0:en.github)&&void 0!==eh?eh:"",linkedin:null!==(em=null!==(ep=et.payload.linkedin)&&void 0!==ep?ep:null===(er=$.user.socials)||void 0===er?void 0:er.linkedin)&&void 0!==em?em:"",twitter:null!==(eg=null!==(ef=et.payload.twitter)&&void 0!==ef?ef:null===(ei=$.user.socials)||void 0===ei?void 0:ei.twitter)&&void 0!==eg?eg:"",instagram:null!==(ev=null!==(ey=et.payload.instagram)&&void 0!==ey?ey:null===(eo=$.user.socials)||void 0===eo?void 0:eo.instagram)&&void 0!==ev?ev:"",youtube:null!==(e_=null!==(ex=et.payload.youtube)&&void 0!==ex?ex:null===(es=$.user.socials)||void 0===es?void 0:es.youtube)&&void 0!==e_?e_:"",twitch:null!==(ek=null!==(ew=et.payload.twitch)&&void 0!==ew?ew:null===(el=$.user.socials)||void 0===el?void 0:el.twitch)&&void 0!==ek?ek:"",tiktok:null!==(eE=null!==(eC=et.payload.tiktok)&&void 0!==eC?eC:null===(eu=$.user.socials)||void 0===eu?void 0:eu.tiktok)&&void 0!==eE?eE:""}})}),$.addCase(eD.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Something went wrong while updating social links."}),$.addCase(eO.pending,function($,et){$.loadingImage=!0}),$.addCase(eO.fulfilled,function($,et){var en;(null==et?void 0:null===(en=et.payload)||void 0===en?void 0:en.photoURL)&&($.user.photoURL=et.payload.photoURL),$.loadingImage=!1}),$.addCase(eO.rejected,function($,et){$.loadingImage=!1,$.error.status=!0,$.error.message.description="Something went wrong while updating user avatar",$.user.photoURL="/images/default-profile-pic.jpg"}),$.addCase(eM.pending,function($,et){$.loading=!0}),$.addCase(eM.fulfilled,function($,et){et.payload&&($.customAvatar.config=et.payload.config,$.customAvatar.animatedGifUrl=et.payload.animatedGifUrl,$.customAvatar.profileImageUrl=et.payload.profileImageUrl,$.user.stats.characterModelIndex=5),$.loading=!1}),$.addCase(eM.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Failed to save custom avatar"})}}
1841),{setSignIn:eB,setSignOut:eU,setLoadingUser:ez,updateExerciseSettings:eq,updateSoundSettings:eZ}=eH.actions;var eW=eH.reducer;function selectCurrentXp($){try{var et,en,er;return null===(er=$.user)||void 0===er?void 0:null===(en=er.user)||void 0===en?void 0:null===(et=en.stats)||void 0===et?void 0:et.totalXp}catch($){return 0}}function selectRefetchUser($){return $.user.refetchUser}function selectCourseXp($){let{courseName:et}=$;return $=>{try{var en,er,ei,eo;return null===(eo=$.user)||void 0===eo?void 0:null===(ei=eo.user)||void 0===ei?void 0:null===(er=ei.stats)||void 0===er?void 0:null===(en=er.courseXp[et])||void 0===en?void 0:en.courseXp}catch($){return 0}}}function selectUserName($){try{var et,en,er,ei;if(null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.username)return null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.username;return""}catch($){return""}}function selectCurrentStreak($){try{var et,en,er,ei;let eo=null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:null===(en=er.stats)||void 0===en?void 0:null===(et=en.streaks)||void 0===et?void 0:et.currentStreak;if(!eo)return 0;return eo}catch($){return 0}}function selectIsUserSignedIn($){try{return $.user.isSignedIn}catch($){return!1}}function selectUserUidIfSignedIn($){try{let et=selectIsUserSignedIn($);if(et)return $.user.user.uid;return null}catch($){return""}}function selectSignedInUser($){try{return $.user.user}catch($){return null}}function selectLoadingStateForUserSlice($){try{return $.user.loading}catch($){return!1}}function selectIsLoadingUser($){try{return $.user.isLoadingUser}catch($){return!1}}function selectCurrentCharacterModelIndex($){try{return $.user.user.stats.characterModelIndex}catch($){return 0}}function selectIsLastCharacter($){try{let et=$.user.user.stats.characterModelIndex,en=$.user.characterModels;return et===en.length-1}catch($){return 0}}function selectUserClubStatus($){try{return $.user.isClub}catch($){return!1}}function selectUserUid($){try{if($.user.isSignedIn)return $.user.user.uid;return null}catch($){return null}}function selectUserCodeEditorTheme($){try{{var et,en,er,ei,eo,es;let el=localStorage.getItem("codeEditorTheme");if(!el)return localStorage.setItem("codeEditorTheme",(null===(ei=$.user.user)||void 0===ei?void 0:ei.codeEditorTheme)||"tomorrow-night-blue"),(null===(es=$.user)||void 0===es?void 0:null===(eo=es.user)||void 0===eo?void 0:eo.codeEditorTheme)||"tomorrow-night-blue";if($.user.isSignedIn&&el!==(null===(et=$.user.user)||void 0===et?void 0:et.codeEditorTheme))return localStorage.setItem("codeEditorTheme",null===(en=$.user.user)||void 0===en?void 0:en.codeEditorTheme),(null===(er=$.user.user)||void 0===er?void 0:er.codeEditorTheme)||"tomorrow-night-blue";return el}}catch($){return"tomorrow-night-blue"}}function selectUserSocials($){try{if(!$.user.isSignedIn)return null;{var et,en;let er=null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.socials;if(!er)return null;return er}}catch($){return null}}function selectUserFirstName($){try{if(!$.user.isSignedIn)return null;{var et,en;let er=null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.firstName;if("undefined"===er||!er)return"";return er}}catch($){return null}}function selectUserLastName($){try{if(!$.user.isSignedIn)return null;{var et,en;let er=null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.lastName;if("undefined"===er||!er)return"";return er}}catch($){return null}}function selectUserBio($){try{var et,en,er,ei;if(!$.user.isSignedIn)return null;if((null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.bio)===void 0)return"";{let et=null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.bio;if(!et)return"";return et}}catch($){return""}}function selectUserSchool($){try{var et,en,er;if(!$.user.isSignedIn)return null;if((null===(et=$.user.user)||void 0===et?void 0:et.school)!==void 0)return null===(er=$.user)||void 0===er?void 0:null===(en=er.user)||void 0===en?void 0:en.school;return""}catch($){return""}}function selectUserWebsite($){try{var et,en,er;if(!$.user.isSignedIn)return null;if((null===(et=$.user.user)||void 0===et?void 0:et.website)!==void 0)return null===(er=$.user)||void 0===er?void 0:null===(en=er.user)||void 0===en?void 0:en.website;return""}catch($){return""}}function selectUserWork($){try{var et,en,er,ei;if(!$.user.isSignedIn)return"";if((null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.work)!==void 0)return null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.work;return""}catch($){return""}}function selectUserProfileImage($){try{var et,en,er,ei;if(!$.user.isSignedIn||(null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.photoURL)===void 0)return"/images/default-profile-pic.jpg";{let et=null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.photoURL;if(!et)return"/images/default-profile-pic.jpg";return et}}catch($){return"/images/default-profile-pic.jpg"}}function selectUserLocation($){try{var et,en,er,ei;if(!$.user.isSignedIn)return null;if((null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.location)!==void 0)return(null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.location)||"";return""}catch($){return""}}function selectUsersName($){try{if($.user.isSignedIn){var et,en;return null==$?void 0:null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.name}}catch($){return""}}function selectUserSkillset($){try{if($.user.isSignedIn){var et,en;return(null==$?void 0:null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.skillset)||[]}}catch($){return[]}}function selectUserColorMode($){var et,en,er,ei;try{{let er=window.localStorage.getItem("colorMode");if(er)return er;return(null==$?void 0:null===(en=$.user)||void 0===en?void 0:null===(et=en.user)||void 0===et?void 0:et.colorMode)||"dark"}}catch(et){return(null===(ei=$.user)||void 0===ei?void 0:null===(er=ei.user)||void 0===er?void 0:er.colorMode)||"dark"}}function selectUserAdminStatus($){var et,en;return $.user.isAdmin||(null===(et=$.user.claims)||void 0===et?void 0:et.admin)||(null===(en=$.user.claims)||void 0===en?void 0:en.isAdmin)||!1}function selectAllUnlockableItems($){return $.user.unlockableItems}function selectUserPausedStatus($){return $.user.isPaused}function selectUserEmail($){return $.user.user.email}function selectPopupState($){return $.user.popup}function selectUserExerciseSettings($){return $.user.exerciseSettings}function selectIsMasterMute($){return $.user.soundSettings.masterMute}function selectAllCharacterModels($){let et=$.user.characterModels,en=$.user.customAvatar.animatedGifUrl;if(en){let $=[...et];return $[5]=en,$}return et}function selectCustomAvatar($){return $.user.customAvatar}},99445:function($,et,en){"use strict";en.d(et,{xd:function(){return ed},el:function(){return eu},pv:function(){return eh}});var er=en(77236),ei=en(39828),eo=en(92369);async function getUserDiscordData($){let{uid:et}=$,{firestore:en}=(0,eo.UM)(),er=(0,ei.hJ)(en,"users",et,"integrations"),es=(0,ei.JU)(er,"discord"),el=await (0,ei.QT)(es);if(!el.exists())return null;{let{discordId:$,username:et,discriminator:en,avatar:er}=el.data();return{discordId:$,username:et,discriminator:en,avatar:er}}}var es=en(62286),el=en.n(es);let eu=(0,er.hg)("user/fetchUserDiscordData",async function($){let{uid:et}=$;if(!et)return null;let en=await getUserDiscordData({uid:et});return null!==en?en:null}),ed=(0,er.hg)("user/fetchUserBookmarks",async function($){let{uid:et}=$;if(!et)return null;try{let $=await fetch("/api/bookmarks");if($.ok){let et=await $.json();if("success"===et.status)return et.data}}catch($){console.error("Error fetching user bookmarks in redux thunk:",$)}return null}),eh=(0,er.hg)("user/refetchCodedexToken",async function($,et){try{let{auth:$}=(0,eo.UM)();if(null!==$.currentUser){let et=await $.currentUser.getIdToken(!0);el().set(null,"codedextoken",et,{maxAge:604800,expires:new Date(Date.now()+6048e5),path:"/",sameSite:"lax",secure:!0});return}}catch($){et.rejectWithValue({error:"Error refreshing codedex token"});return}})},92614:function($,et,en){"use strict";en.d(et,{Bl:function(){return eu},_L:function(){return ed},cp:function(){return selectPackCompletionPercentage},k5:function(){return selectUserCodeChallengeStatus},sg:function(){return eh}});var er=en(77236),ei=en(66602),eo=en(95986),es=en(35336),el=en(41514);let eu=(0,er.hg)("userCodeChallenges/fetchCodeChallengesDataForUser",async($,et)=>{let{uid:en}=$,er=await (0,ei.C)({uid:en});if(null!=er)return er;et.rejectWithValue({status:"error",message:{description:"state-not-found"}})}),ed=(0,er.hg)("userCodeChallenges/loadChallengeState",async($,et)=>{var en,er,eo,es;let{packName:el,challengeName:eu}=$,ed=et.getState(),eh=null===(er=ed.user)||void 0===er?void 0:null===(en=er.user)||void 0===en?void 0:en.uid;if(eh){let{pack:$,challenge:et,status:en,code:er}=await (0,ei.S3)({uid:eh,challengeName:eu,packName:el});return{pack:$,challenge:et,status:en,code:er}}let ep=null===(es=ed.userCodeChallenges)||void 0===es?void 0:null===(eo=es.packs[el])||void 0===eo?void 0:eo.find($=>$.challenge===eu);return ep||{pack:el,challenge:eu,status:"opened"}}),eh=(0,er.hg)("userCodeChallenges/updateChallengeState",async($,et)=>{var en,er;let{packName:eu,challengeName:ed,status:eh,xp:ep}=$,em=et.getState(),ef=null===(er=em.user)||void 0===er?void 0:null===(en=er.user)||void 0===en?void 0:en.uid;return ef?("completed"===eh&&(await (0,ei.dp)({uid:ef,challengeName:ed,xp:ep}),(0,es.f)({uid:ef,type:"challenge-pack",xp:ep}),(0,el.C3)({eventName:"code-challenge-completed",properties:{challengeName:ed,uid:ef}})),await (0,ei.mK)({uid:ef,challengeName:ed,status:eh}
1841)):"completed"===eh&&et.dispatch((0,eo.ol)(!0)),{pack:eu,challenge:ed,status:eh}}),ep=(0,er.oM)({name:"userCodeChallenges",initialState:{loadingState:!1,error:!1,packs:{}},reducers:{},extraReducers:$=>{$.addCase(eu.pending,$=>{$.loadingState=!0}),$.addCase(eu.fulfilled,($,et)=>{$.packs=et.payload.packs}),$.addCase(eu.rejected,$=>{$.error=!0}),$.addCase(eh.pending,($,et)=>{$.loadingState=!0}),$.addCase(eh.fulfilled,($,et)=>{let{pack:en,challenge:er,status:ei}=et.payload;if($.packs[en]){let et=$.packs[en].find($=>$.challenge===er);et?et.status=ei:$.packs[en]=[...$.packs[en],{challenge:er,status:ei,code:{},pack:en}]}else $.packs[en]=[{challenge:er,status:ei,code:{},pack:en}]}),$.addCase(eh.rejected,($,et)=>{$.error=!0}),$.addCase(ed.pending,($,et)=>{$.loadingState=!0}),$.addCase(ed.fulfilled,($,et)=>{$.loadingState=!1;let{pack:en,challenge:er,status:ei}=et.payload;if($.packs[en]){let et=$.packs[en].find($=>$.challenge===er);et||($.packs[en]=[...$.packs[en],{challenge:er,status:ei,code:{},pack:en}])}else $.packs[en]=[{challenge:er,status:ei,code:{},pack:en}]})}});function selectUserCodeChallengeStatus($){let{packName:et,challengeName:en}=$;return function($){try{let er=$.userCodeChallenges.packs[et],ei=er.find($=>{let{challenge:et}=$;return et===en});if(ei)return ei.status;return"opened"}catch(ei){let er=$.user.isSignedIn;if(!er)return"opened";return fetch("/api/code-challenges/init",{method:"POST",body:JSON.stringify({packName:et,challengeName:en})}),"opened"}}}function selectPackCompletionPercentage($){let{packName:et}=$;return $=>{let en=$.userCodeChallenges.packs[et],er=$.codeChallenges.currentPack.challenges;if(!en||!er||!en||0===en.length)return 0;let ei=0;er.forEach($=>{let et=en.find(et=>et.challenge===$.name);et&&"completed"===et.status&&ei++});let eo=er.length;return ei/eo*100}}et.ZP=ep.reducer},37009:function($,et,en){"use strict";en.d(et,{ql:function(){return eI},lZ:function(){return eE},ZP:function(){return eH},iq:function(){return e_},iC:function(){return ew},SQ:function(){return eT},dK:function(){return ek},O4:function(){return ej},Ai:function(){return selectChapterProgress},Pb:function(){return selectCodeEvalState},zE:function(){return selectCompletedBonusArticlesForACourse},Wj:function(){return selectCurrentChallenge},hH:function(){return selectIndividualCourseCompleted},k9:function(){return selectLoadingForSignedInUser},mP:function(){return selectOpeningCutsceneViewed},vG:function(){return selectResumeLink},G8:function(){return selectShowSolutionState},y3:function(){return selectTotalCompleted},cC:function(){return selectUserAllCourseBadges},mC:function(){return selectUserAllCourseBadgesWithCourseInfo},k7:function(){return selectUserCurrentCourseBadges},D8:function(){return selectUserProgressLoading},L:function(){return selectUserProgressState},yj:function(){return eS},lY:function(){return eV},yb:function(){return eA},lv:function(){return eC},w$:function(){return eP},q7:function(){return eD},N$:function(){return eO},dS:function(){return eM},NQ:function(){return eL}});var er=en(77236),ei=en(47922),eo=en(39828),es=en(92369),el=en(51912),eu=en(48645),ed=en(94021),eh=en(88090);let{firestore:ep,analytics:em}=(0,es.UM)(),ef=(0,eo.hJ)(ep,"userProgressCollection");async function updateChallengeStatus($){let{uid:et,chapterName:en,challengeName:er,status:es,courseName:eh,retryCount:eg=0}=$;if(!0!==["locked","start","open","complete"].includes(es))throw Error("Status not found!");let wouldRegress=$=>"complete"===$&&"complete"!==es;try{var ey,ev,ex,e_,ew,ek;let $=(0,eo.JU)(ef,et),eu=await (0,eo.QT)($);if(!eu.exists())throw Error("User Progress not found!");let eg=(0,eo.JU)($,"courses",eh),eC=await (0,eo.QT)(eg);if(eC.exists()&&(null===(ey=eC.data())||void 0===ey?void 0:ey.version)===2){let $;let eu=eC.data(),ef=null==eu?void 0:null===(e_=eu.chapters)||void 0===e_?void 0:null===(ex=e_[en])||void 0===ex?void 0:null===(ev=ex.challenges)||void 0===ev?void 0:ev[er];if((null==ef?void 0:ef.status)==="complete")return{uid:et,chapterName:en,challengeName:er,status:es,updatedChapterDoc:eu.chapters[en],skipXp:!0};try{await fetch("/api/email/mark",{method:"POST",body:JSON.stringify({type:"course-started",courseName:eh}),headers:{"Content-Type":"application/json"}})}catch($){}let ey=!1;if(await (0,eo.i3)(ep,async et=>{var ei,el,eu,ed,eh;let ep=await et.get(eg),em=ep.data(),ef=null==em?void 0:null===(ed=em.chapters)||void 0===ed?void 0:null===(eu=ed[en])||void 0===eu?void 0:null===(el=eu.challenges)||void 0===el?void 0:null===(ei=el[er])||void 0===ei?void 0:ei.status;if(wouldRegress(ef)){$=null==em?void 0:null===(eh=em.chapters)||void 0===eh?void 0:eh[en];return}
1841et.update(eg,{["chapters.".concat(en,".challenges.").concat(er,".status")]:es,["chapters.".concat(en,".challenges.").concat(er,".challengeName")]:er,"metadata.updatedAt":eo.EK.now()}),ey=!0}),!ey)return{uid:et,chapterName:en,challengeName:er,status:"complete",updatedChapterDoc:$,skipXp:!0};let eE=ed.Z.getCourse(et,eh);if(eE&&eE.chapters){eE.chapters[en]||(eE.chapters[en]={chapterName:en,challenges:{}});let $=null===(ek=eE.chapters[en].challenges[er])||void 0===ek?void 0:ek.status;wouldRegress($)||(eE.chapters[en].challenges[er]={status:es,challengeName:er},ed.Z.setCourse(et,eh,eE),await (0,ei._E)({uid:et}))}try{"github-copilot"===eh&&trackGitHubCopilotCourseStart({uid:et,status:{started:"start"===es||"open"===es||"complete"===es}})}catch($){}em&&(0,el.logEvent)(em,"update_challenge_status",{courseName:eh,challengeName:er,status:es,uid:et});let eI=await (0,eo.QT)(eg),eS=eI.data(),eT=null==eS?void 0:null===(ew=eS.chapters)||void 0===ew?void 0:ew[en];return{uid:et,chapterName:en,challengeName:er,status:es,updatedChapterDoc:eT}}{let eu=(0,eo.JU)($,"courses",eh,"chapters",en),ep=await (0,eo.QT)(eu);if(!ep.exists())throw Error("Chapter ".concat(en," not found!"));if(void 0!=ep.data().challenges[er]){if("complete"===ep.data().challenges[er].status)return{uid:et,chapterName:en,challengeName:er,status:es,updatedChapterDoc:ep.data(),skipXp:!0};try{await fetch("/api/email/mark",{method:"POST",body:JSON.stringify({type:"course-started",courseName:eh}),headers:{"Content-Type":"application/json"}})}catch($){}await (0,eo.r7)(eu,{["challenges.".concat(er,".status")]:es})}else await (0,eo.r7)(eu,{["challenges.".concat(er)]:{challengeName:er,status:es}});try{"github-copilot"===eh&&trackGitHubCopilotCourseStart({uid:et,status:{started:"start"===es||"open"===es||"complete"===es}})}catch($){}let ef=ed.Z.getCourse(et,eh);ef&&ef.chapters&&(ef.chapters[en]||(ef.chapters[en]={chapterName:en,challenges:{}}),ef.chapters[en].challenges[er]={status:es,challengeName:er},ed.Z.setCourse(et,eh,ef),await (0,ei._E)({uid:et})),em&&(0,el.logEvent)(em,"update_challenge_status",{courseName:eh,challengeName:er,status:es,uid:et});let eg=await (0,eo.QT)(eu),ey=eg.data();return{uid:et,chapterName:en,challengeName:er,status:es,updatedChapterDoc:ey}}}catch($){if(eg>3)return console.error("Max retry count reached. Exiting..."),{uid:et,chapterName:en,challengeName:er,status:es};return await (0,eu.q6)(!0),console.log($),await new Promise($=>setTimeout($,1e3)),await updateChallengeStatus({uid:et,chapterName:en,challengeName:er,status:es,courseName:eh,retryCount:eg+1})}}async function addBadge($){var et;let{courseName:en,badge:er,uid:es}=$,el=(0,eo.JU)(ef,es),eu=await (0,eo.QT)(el);if(!eu.exists())return{badge:er,uid:es,courseName:en};let ep=(0,eo.JU)(el,"courses",en),em=await (0,eo.QT)(ep);if(!em.exists())return{badge:er,uid:es,courseName:en};let eg=em.data();if(null==eg?void 0:null===(et=eg.badgesEarned)||void 0===et?void 0:et.includes(er))return{badge:er,uid:es,courseName:en};try{let $=ed.Z.getProgressHash(es);if($){let et=await (0,ei.v9)({uid:es});if(et===$)try{let $=ed.Z.getCourse(es,en);$&&($.badgesEarned||($.badgesEarned=[]),$.badgesEarned.push(er),ed.Z.setCourse(es,en,$))}catch($){}else ed.Z.clearUserCache(es,eh.Hq)}return await (0,eo.r7)(ep,{badgesEarned:(0,eo.vr)(er)}),await (0,ei._E)({uid:es}),{badge:er,uid:es,courseName:en}}catch($){return console.error("Error adding badge:",$),{badge:er,uid:es,courseName:en}}}async function updateBonusArticleState($){var et;let{courseName:en,articleName:er,uid:ei}=$,es=(0,eo.JU)(ef,ei),el=await (0,eo.QT)(es);if(!el.exists())return{articleName:er,uid:ei,courseName:en};let eu=(0,eo.JU)(es,"courses",en),ed=await (0,eo.QT)(eu);if(!ed.exists())return{articleName:er,uid:ei,courseName:en};let eh=ed.data();return(null==eh?void 0:null===(et=eh.bonusArticlesRead)||void 0===et?void 0:et.includes(er))||await (0,eo.r7)(eu,{bonusArticlesRead:(0,eo.vr)(er)}),{articleName:er,uid:ei,courseName:en}}async function trackGitHubCopilotCourseStart($){let{uid:et,status:en}=$;try{await fetch("/api/rec/github-copilot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:en})})}catch($){}}var eg=en(609),ey=en(22058),ev=en(29796);let ex=ed.Z.getCurrentVersion(),e_=(0,er.hg)("userProgress/fetchAllCoursesProgress",async($,et)=>{let{uid:en}=$,er=ed.Z.getVersion();if(ed.Z.isVersionValid()||ed.Z.clearUserCache(en,eh.Hq),er===ex){let $=ed.Z.getProgressHash(en);if($){let er=null;try{er=await (0,ei.v9)({uid:en})}catch($){console.error("Error fetching user progress hash:",$),ed.Z.setProgressHash(en,"")}if(er&&$===er){let $={},er=!0;for(let et of eh.Hq)try{let ei=ed.Z.getCourse(en,et);
1841if(ei&&"object"==typeof ei){let{chapters:en}=(0,ey.U)({courseName:et}),eo=Object.keys((null==ei?void 0:ei.chapters)||{}).length,es=Object.keys(en).length;if(eo<es){er=!1;break}$[et]=ei}else{er=!1;break}}catch($){console.error("Error loading cached course progress for ".concat(et,":"),$),er=!1;break}if(er&&Object.keys($).length===eh.Hq.length)return et.dispatch((0,ev.XX)("")),{courses:$,signedIn:!0,fromCache:!0}}null===er&&ed.Z.clearUserCache(en,eh.Hq)}}try{let $=await fetch("/api/state/bundle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:en})});if(!$.ok)throw Error("Failed to fetch bundle");let er=await $.json();if("success"===er.status){for(let $ in ed.Z.setVersion(ex),er.courses)ed.Z.setCourse(en,$,er.courses[$]);return await (0,ei._E)({uid:en}),et.dispatch((0,ev.XX)("")),{courses:er.courses,signedIn:!0,fromCache:!1}}throw Error("Bundle API returned error status")}catch($){return console.error("Error fetching all courses progress:",$),et.rejectWithValue({error:"Failed to fetch all courses progress"})}}),ew=(0,er.hg)("userProgress/fetchCourseProgress",async($,et)=>{let{courseName:en,uid:er}=$;if(!er){let{course:$,chapters:et}=(0,ey.U)({courseName:en});return{courseName:en,courseProgress:{...$,chapters:et},signedIn:!1}}let eo=ed.Z.getVersion();if(ed.Z.isVersionValid()||ed.Z.clearUserCache(er,eh.Hq),eo===ex){let $=ed.Z.getProgressHash(er);if($){let eo=null;try{eo=await (0,ei.v9)({uid:er})}catch($){console.error("Error fetching user progress hash:",$),ed.Z.setProgressHash(er,"")}if(eo&&$===eo)try{let $=ed.Z.getCourse(er,en);if($&&"object"==typeof $){let{chapters:ei}=(0,ey.U)({courseName:en}),eo=Object.keys((null==$?void 0:$.chapters)||{}).length,es=Object.keys(ei).length;if(!(eo<es))return et.dispatch((0,ev.XX)("")),{courseName:en,courseProgress:$,signedIn:!0};ed.Z.clearUserCache(er,eh.Hq)}}catch($){console.error("Error loading cached course progress:",$)}null===eo&&ed.Z.clearUserCache(er,eh.Hq)}}let es=null;try{let $=await (0,ei.qk)({courseName:en,uid:er});es=$.courseProgress}catch($){return console.error("Error fetching course progress from API:",$),et.rejectWithValue({error:"Failed to fetch course progress",courseName:en})}return await (0,ei._E)({uid:er}),ed.Z.setCourse(er,en,es),et.dispatch((0,ev.XX)("")),{courseName:en,courseProgress:es,signedIn:!0}}),ek=(0,er.hg)("userProgress/openChallenge",async function($,et){let{courseName:en,chapterName:er,challengeName:eo}=$,{userProgress:es,user:el}=et.getState(),{isSignedIn:eu}=el,ed=es.courses[en].chapters[er].challenges;if(!Array.isArray(ed)){let $=es.courses[en].chapters[er].challenges[eo];if($){let et=$.status;if("complete"===et)return{courseName:en,chapterName:er,challengeName:eo,status:"complete"}}}if(!eu)return{courseName:en,chapterName:er,challengeName:eo,status:"open"};{let{uid:$}=el.user;try{let{updatedChapterDoc:et}=await updateChallengeStatus({uid:$,courseName:en,chapterName:er,challengeName:eo,status:"open"});try{await (0,ei.M)({uid:$,courseName:en})}catch($){console.error($)}return{courseName:en,chapterName:er,challengeName:eo,status:"open",updatedChapterDoc:et}}catch($){console.log($)}}}),eC=(0,er.hg)("userProgress/unlockChallenge",async function($,et){let{courseName:en="python",chapterName:er,challengeName:ei}=$,{userProgress:eo,user:es}=et.getState(),{isSignedIn:el}=es,eu=eo.courses[en].chapters[er].challenges[ei];if(eu){let $=eu.status;if("complete"===$)return{courseName:en,chapterName:er,challengeName:ei,status:"complete"};if("start"===$)return{courseName:en,chapterName:er,challengeName:ei,status:"start"}}if(!el)return{courseName:en,chapterName:er,challengeName:ei,status:"start"};{let $=es.user,{uid:et}=$;try{let{updatedChapterDoc:$}=await updateChallengeStatus({uid:et,courseName:en,chapterName:er,challengeName:ei,status:"start"});return{courseName:en,chapterName:er,challengeName:ei,status:"start",updatedChapterDoc:$}}catch($){console.log($)}}}),eE=(0,er.hg)("userProgress/completeChallenge",async function($,et){let{courseName:en,chapterName:er,challengeName:ei,xP:eo}=$,{userProgress:es,user:el}=et.getState(),{isSignedIn:eu}=el,ed=es.courses[en].chapters[er].challenges[ei];if(ed){let $=ed.status;if("complete"===$)return{courseName:en,chapterName:er,challengeName:ei,status:"complete"}}if(!eu)return et.dispatch((0,eg.o2)({xP:eo,courseName:en,chapterName:er,challengeName:ei})),{courseName:en,chapterName:er,challengeName:ei,status:"complete"};{let $=el.user,{uid:es}=$;
1841try{let{updatedChapterDoc:$,skipXp:el}=await updateChallengeStatus({uid:es,courseName:en,chapterName:er,challengeName:ei,status:"complete"});return el||et.dispatch((0,eg.o2)({xP:eo,courseName:en,chapterName:er,challengeName:ei})),{courseName:en,chapterName:er,challengeName:ei,status:"complete",updatedChapterDoc:$}}catch($){console.log($)}}}),eI=(0,er.hg)("userProgress/addBadge",async function($,et){let{courseName:en,badge:er}=$,{user:ei}=et.getState(),{isSignedIn:eo}=ei;if(!eo)return{courseName:en,badge:er};{let $=ei.user,{uid:et}=$;try{await addBadge({courseName:en,badge:er,uid:et})}catch($){console.log($),console.log("Failed to add badge")}return{courseName:en,badge:er}}}),eS=(0,er.hg)("userProgress/setCourseOpeningCutsceneState",async function($,et){let{uid:en,courseName:er}=$;if(!en)return{courseName:er,state:!0};try{let $=await (0,ei.dp)({uid:en,courseName:er});return{courseName:er,state:$}}catch($){return console.error($),{courseName:er,state:!1}}}),eT=(0,er.hg)("userProgress/fetchSolutionStateUser",async function($,et){let{uid:en}=$;if(!en)return{};try{let $=await (0,ei.MC)({uid:en});return $}catch($){return console.error($),{}}}),eA=(0,er.hg)("userProgress/showSolution",async function($,et){let{courseName:en,challengeName:er}=$,{user:eo}=et.getState(),{isSignedIn:es}=eo;if(!es)return{courseName:en,challengeName:er,status:!0};{let $=eo.user,{uid:et}=$;try{let $=await (0,ei.Un)({exerciseName:er,courseName:en,uid:et});if($)return{courseName:en,challengeName:er,status:$}}catch($){console.error($)}return{courseName:en,challengeName:er,status:!0}}}),eP=(0,er.hg)("userProgress/updateBonusArticleStatus",async function($,et){let{courseName:en,bonusArticleName:er}=$,{userProgress:eo,user:es}=et.getState(),{isSignedIn:el}=es;if(!el)return{courseName:en,bonusArticleName:er,status:"complete"};{let $=es.user,{uid:et}=$;try{let{articleName:$}=await updateBonusArticleState({uid:et,courseName:en,articleName:er}),eo=ed.Z.getProgressHash(et);if(eo){let er=await (0,ei.v9)({uid:et});if(er)try{let er=ed.Z.getCourse(et,en);er&&(void 0===er.bonusArticlesRead&&(er.bonusArticlesRead=[]),er.bonusArticlesRead.push($),ed.Z.setCourse(et,en,er))}catch($){}else ed.Z.clearUserCache(et,eh.Hq)}return await (0,ei._E)({uid:et}),{courseName:en,bonusArticleName:$,status:"complete"}}catch($){console.log($)}}}),eN=(0,er.hg)("userProgress/saveCheckpointProject",async function($,et){let{courseName:en,link:er}=$,{user:eo}=et.getState(),{isSignedIn:es}=eo;if(console.log("here"),!es)return{courseName:en,link:er};{let $=eo.user,{uid:et}=$;try{await (0,ei.KC)({uid:et,courseName:en,link:er})}catch($){console.log($),console.log("Failed to add checkpoint project")}return{courseName:en,link:er}}}),ej=(0,er.hg)("userProgress/resumeExercise",async function($,et){let{courseName:en,exerciseName:er}=$,{user:eo,language:es}=et.getState(),{isSignedIn:el}=eo,eu=es.courseDetails[en].links.slice(1),ed="";for(let $ of eu)if($.includes(er)){ed=$;break}if(el){let $=eo.user;await (0,ei.IK)({uid:$.uid,courseName:en,link:ed})}return{courseName:en,challengeLink:ed}}),eR=(0,er.oM)({name:"userProgress",initialState:{loading:!0,loadingForSignedInUser:!0,error:{status:!1,message:{metadata:"",description:""}},currentCourse:"python",signedInUserState:!1,courses:{},codeEval:{flow:"run-code",state:"idle",code:"",hint:"",runCallback:null,loading:!1},showSolution:{}},reducers:{setSignedInUserState($,et){$.signedInUserState=et.payload},updateCodeEval($,et){var en,er,ei,eo;$.codeEval.flow=et.payload.flow,$.codeEval.state=et.payload.state,(null===(en=et.payload)||void 0===en?void 0:en.code)&&($.codeEval.code=(null===(ei=et.payload)||void 0===ei?void 0:ei.code)||""),(null===(er=et.payload)||void 0===er?void 0:er.hint)&&($.codeEval.hint=(null===(eo=et.payload)||void 0===eo?void 0:eo.hint)||""),"check-answer"===et.payload.flow&&($.codeEval.loading=!1)},updateCodeEvalLoading($,et){$.codeEval.loading=et.payload},updateCodeEvalContextCode($,et){$.codeEval.code=et.payload},updateCodeEvalContextHint($,et){$.codeEval.hint=et.payload},updateRunCallback($,et){$.codeEval.runCallback=et.payload}},extraReducers:$=>{$.addCase(eA.pending,function($,et){}),$.addCase(eA.fulfilled,function($,et){"object"!=typeof $.showSolution?$.showSolution={[et.payload.courseName]:{[et.payload.challengeName]:!0}}:$.showSolution[et.payload.courseName]={...$.showSolution[et.payload.courseName],[et.payload.challengeName]:!0}}
1841),$.addCase(eS.fulfilled,function($,et){let{courseName:en,state:er}=et.payload;$.courses[en].openingCutsceneViewed=er}),$.addCase(eT.pending,function($,et){}),$.addCase(eT.fulfilled,function($,et){$.showSolution=et.payload}),$.addCase(e_.pending,function($,et){$.loading=!0,$.loadingForSignedInUser=!0}),$.addCase(e_.fulfilled,function($,et){let{courses:en,signedIn:er,fromCache:ei}=et.payload;for(let et in en)(void 0==$.courses[et]||$.signedInUserState)&&($.courses[et]=en[et]);$.loading=!1,er&&($.loadingForSignedInUser=!1)}),$.addCase(e_.rejected,function($,et){$.loading=!1,$.loadingForSignedInUser=!1,$.error.status=!0,$.error.message.description="Failed to fetch all courses progress"}),$.addCase(ew.pending,function($,et){$.loading=!0}),$.addCase(ew.fulfilled,function($,et){(void 0==$.courses[et.payload.courseName]||$.signedInUserState)&&($.courses[et.payload.courseName]=et.payload.courseProgress),$.loading=!1,et.payload.signedIn&&($.loadingForSignedInUser=!1)}),$.addCase(ej.fulfilled,function($,et){$.courses[et.payload.courseName].resumeExercise=et.payload.challengeLink}),$.addCase(eN.fulfilled,function($,et){$.courses[et.payload.courseName].checkpointProjectLink=et.payload.link}),$.addCase(ek.pending,function($,et){$.loading=!0}),$.addCase(ek.fulfilled,function($,et){$.loading=!1;let en=$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges;if(Array.isArray(en))$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges=et.payload.updatedChapterDoc.challenges;else{let en=$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName];en?en.status=et.payload.status:$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName]={challengeName:et.payload.challengeName,status:et.payload.status}}}),$.addCase(ek.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Set lesson open threw an error"}),$.addCase(eC.pending,function($,et){$.loading=!0}),$.addCase(eC.fulfilled,function($,et){$.loading=!1;let en=$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName];en?en.status=et.payload.status:$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName]={challengeName:et.payload.challengeName,status:et.payload.status}}),$.addCase(eC.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Set lesson unlock threw an error"}),$.addCase(eE.pending,function($,et){$.loading=!0}),$.addCase(eE.fulfilled,function($,et){$.loading=!1;let en=$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName];en?en.status=et.payload.status:$.courses[et.payload.courseName].chapters[et.payload.chapterName].challenges[et.payload.challengeName]={challengeName:et.payload.challengeName,status:et.payload.status}}),$.addCase(eE.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Set lesson complete threw an error"}),$.addCase(eI.pending,function($,et){$.loading=!0}),$.addCase(eI.fulfilled,function($,et){let en=$.courses[et.payload.courseName].badgesEarned;en.includes(et.payload.badge)||$.courses[et.payload.courseName].badgesEarned.push(et.payload.badge),$.loading=!1}),$.addCase(eI.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Add badge to course threw an error"}),$.addCase(eP.pending,function($,et){$.loading=!0}),$.addCase(eP.fulfilled,function($,et){let en=$.courses[et.payload.courseName].bonusArticlesRead;en||($.courses[et.payload.courseName].bonusArticlesRead=[]),(null==en?void 0:en.includes(et.payload.bonusArticleName))||$.courses[et.payload.courseName].bonusArticlesRead.push(et.payload.bonusArticleName),$.loading=!1}),$.addCase(eP.rejected,function($,et){$.loading=!1,$.error.status=!0,$.error.message.description="Update bonus article status threw an error"})}}),{setSignedInUserState:eV,updateCodeEval:eD,updateCodeEvalContextCode:eO,updateCodeEvalContextHint:eM,updateRunCallback:eF,updateCodeEvalLoading:eL}=eR.actions;var eH=eR.reducer;function selectResumeLink($){return function(et){try{return et.userProgress.courses[$].resumeExercise}catch($){return null}}}function selectUserProgressState($){try{return $.user.isSignedIn,$.userProgress.courses}catch(et){return $.userProgress.courses}}function selectChapterProgress($){let{courseName:et,chapterName:en}=$;return function($){var er,ei;let eo=null===(ei=$.userProgress)||void 0===ei?void 0:null===(er=ei.courses[et])||void 0===er?void 0:er.chapters[en];return eo||null}}function selectUserProgressLoading($){try{return $.userProgress.loading}catch($){return!0}}function selectCurrentChallenge($){let{courseName:et,chapterName:en,challengeName:er}=$;return function($){try{var ei,eo,es;let el=null===(es=$.userProgress)||void 0===es?void 0:null===(eo=es.courses[et])||void 0===eo?void 0:null===(ei=eo.chapters[en])||void 0===ei?void 0:ei.challenges[er];if(el)return el;return{challengeName:er,status:"open"}}catch($){return{challengeName:er,status:"open"}}}}function selectUserAllCourseBadges($){try{var et,en;let er=null===(et=$.userProgress)||void 0===et?void 0:et.courses,ei=[];for(let $ in er)ei.push(...null===(en=er[$])||void 0===en?void 0:en.badgesEarned);return ei}catch($){return[]}}function selectUserAllCourseBadgesWithCourseInfo($){try{var et,en,er,ei;let eo=null===(et=$.userProgress)||void 0===et?void 0:et.courses,es=null===(en=$.language)||void 0===en?void 0:en.courseDetails,el=[];for(let $ in eo){let et=(null===(er=eo[$])||void 0===er?void 0:er.badgesEarned)||[],en=null==es?void 0:es[$],eu=(null==en?void 0:en.catalogName)||$;for(let er of et){let et=null==en?void 0:null===(ei=en.chapters)||void 0===ei?void 0:ei.findIndex($=>$.internalChapterName===er),eo=null!=et&&et>=0?en.chapters[et]:void 0;el.push({courseName:$,courseDisplayName:eu,chapterName:er,chapterDisplayName:(null==eo?void 0:eo.chapterName)||er,chapterIndex:null!=et&&et>=0?et:-1,badge:er,imageSrc:"/images/badges/".concat($,"/").concat(er,".png")})}}return el}catch($){return[]}}function selectUserCurrentCourseBadges($){let{courseName:et}=$;return function($){try{var en,er;let ei=(null===(er=$.userProgress)||void 0===er?void 0:null===(en=er.courses[et])||void 0===en?void 0:en.badgesEarned)||[];return ei}catch($){return console.error($),[]}}}function selectTotalCompleted($){let et=0;try{for(let er in $.userProgress.courses)try{for(let ei in $.userProgress.courses[er].chapters){var en;let eo=null===(en=$.userProgress.courses[er].chapters[ei])||void 0===en?void 0:en.challenges;if(eo)for(let $ in eo)"complete"===eo[$].status&&(et+=1)}}catch($){console.error(er,$)}}catch($){return console.error($),0}return et}function selectIndividualCourseCompleted($){let{courseName:et}=$;return function($){let en=0;try{for(let ei in $.userProgress.courses[et].chapters){var er;let eo=null===(er=$.userProgress.courses[et].chapters[ei])||void 0===er?void 0:er.challenges;if(eo)for(let $ in eo)"complete"===eo[$].status&&(en+=1)}}catch($){console.error(et,$)}return en}}function selectLoadingForSignedInUser($){try{return $.userProgress.loadingForSignedInUser}catch($){return!1}}function selectCompletedBonusArticlesForACourse($){let{courseName:et}=$;return function($){var en;let er=(null===(en=$.userProgress.courses[et])||void 0===en?void 0:en.bonusArticlesRead)||[];return er}}function selectCodeEvalState($){return $.userProgress.codeEval}function selectShowSolutionState($){let{challengeName:et,courseName:en}=$;return function($){return"object"==typeof $.userProgress.showSolution&&!!$.userProgress.showSolution[en]&&!!$.userProgress.showSolution[en][et]}}function selectOpeningCutsceneViewed($){let{courseName:et}=$;return function($){var en;let er=(null===(en=$.userProgress.courses[et])||void 0===en?void 0:en.openingCutsceneViewed)||!1;return er}}},1027:function($,et,en){"use strict";en.d(et,{p:function(){return loadUserAvatar}});var er=en(39828),ei=en(92369);async function loadUserAvatar($){let{firestore:et}=(0,ei.UM)();try{let en=(0,er.JU)(et,"users/".concat($)),ei=await (0,er.QT)(en);if(!ei.exists())return null;let eo=ei.data(),es=null==eo?void 0:eo.currentAvatarId;if(es){let en=(0,er.JU)(et,"users/".concat($,"/worldsAvatars/").concat(es)),ei=await (0,er.QT)(en);if(ei.exists()){let $=ei.data();return{config:$.avatarConfig,animatedGifUrl:$.animatedGifUrl||null,profileImageUrl:$.profileImageUrl||null}}}return null}catch($){return console.error("Failed to load user avatar:",$),null}}},61123:function($,et,en){"use strict";en.d(et,{VW:function(){return clearCertData},ov:function(){return getUserCertificateProgressDoc}});var er=en(39828),ei=en(92369);let eo={checkpointProgress:{postLink:"",reviewed:!1},finalProgress:{postLink:"",reviewed:!1},certificateRequested:!1,certificateIssued:!1,nameOnCertificate:""};async function getUserInfo($){let{firestore:et}=(0,ei.UM)(),en=(0,er.JU)(et,"users",$);try{let $=await (0,er.QT)(en);if($.exists())return $.data();console.log("User document not found")}catch($){console.error("Error fetching user info: ",$)}}async function getUserCertificateProgressDoc($){let{uid:et,courseName:en}=$,{firestore:es}=(0,ei.UM)(),el=(0,er.JU)((0,er.hJ)(es,"users",et,"achievementCredentialProgress"),en);try{let $=await (0,er.QT)(el);if($.exists()){var eu;let et=$.data(),en=null==et?void 0:null===(eu=et.requestDetails)||void 0===eu?void 0:eu.reviewerUid,er=null;return en&&(er=await getUserInfo(en),console.log({reviewerInfo:er})),{...et,reviewerInfo:{name:(null==er?void 0:er.name)||"Coder Friend",photoURL:(null==er?void 0:er.photoURL)||""}}}try{await (0,er.pl)(el,eo)}catch($){console.error("Error adding certificate progress document: ",$)}return eo}catch($){console.error("Error getting certificate progress document: ",$);return}}let es={"checkpoint-project":"checkpointProgress","final-project":"finalProgress"};async function clearCertData($){let{uid:et,courseName:en,projectType:eo}=$,{firestore:el}=(0,ei.UM)(),eu=es[eo];try{let $=(0,er.JU)((0,er.hJ)(el,"users",et,"achievementCredentialProgress"),en);return await (0,er.r7)($,{[eu]:{postLink:"",reviewed:!1}}),{status:200}}catch($){return{status:500,err:$}}}},66602:function($,et,en){"use strict";en.d(et,{C:function(){return getAllCodeChallengesForUser},S3:function(){return createUserCodeChallengeDoc},_7:function(){return storeUserCodeForChallenge},dp:function(){return addXpOnCodeChallengeCompletion},jG:function(){return fetchUserCodeForChallenge},mK:function(){return updateUserCodeChallengeStatus}});var er=en(39828),ei=en(92369);async function createUserCodeChallengeRoot($){let{uid:et}=$,{firestore:en}=(0,ei.UM)(),eo=(0,er.JU)(en,"userCodeChallenges",et);try{let $=await (0,er.QT)(eo);if($.exists())return!0;await (0,er.pl)(eo,{uid:et,xp:0},{merge:!0})}catch($){console.error($)}}async function createUserCodeChallengeDoc($){let{uid:et,challengeName:en,packName:eo}=$,{firestore:es}=(0,ei.UM)();await createUserCodeChallengeRoot({uid:et});let el=(0,er.JU)(es,"userCodeChallenges",et,"codeChallenges",en);try{let $=await (0,er.QT)(el);if(!$.exists())return await (0,er.pl)(el,{pack:eo,challenge:en,status:"opened",code:{}}),{pack:eo,challenge:en,status,code:{}};{let{pack:et,challenge:en,status:er,code:ei}=$.data();return{pack:et,challenge:en,status:er,code:ei}}}catch($){return await (0,er.pl)(el,{pack:eo,challenge:en,status:"opened",code:{}}),{pack:eo,challenge:en,status,code:{}}}}async function updateUserCodeChallengeStatus($){let{uid:et,challengeName:en,status:eo}=$,{firestore:es}=(0,ei.UM)();try{let $=(0,er.JU)(es,"userCodeChallenges",et,"codeChallenges",en);await (0,er.pl)($,{status:eo},{merge:!0})}catch($){console.error($);return}}async function storeUserCodeForChallenge($){let{uid:et,packName:en,code:eo,language:es,challengeName:el}=$,{firestore:eu}=(0,ei.UM)(),ed=(0,er.JU)(eu,"userCodeChallenges",et,"codeChallenges",el);try{await (0,er.r7)(ed,{["code.".concat(es)]:eo})}catch($){return}}async function fetchUserCodeForChallenge($){let{uid:et,challengeName:en}=$,{firestore:eo}=(0,ei.UM)(),es=(0,er.JU)(eo,"userCodeChallenges",et,"codeChallenges",en);try{let $=await (0,er.QT)(es);return $.data().code}catch($){return}}async function getAllCodeChallengesForUser($){let{uid:et}=$,{firestore:en}=(0,ei.UM)(),eo=(0,er.hJ)(en,"userCodeChallenges",et,"codeChallenges");try{await createUserCodeChallengeRoot({uid:et});let $=await (0,er.PL)(eo),en=$.docs.map($=>$.data()),ei={};
1841return en.forEach($=>{void 0==ei[$.pack]?ei[$.pack]=[$]:ei[$.pack].push($)}),{packs:ei}}catch(en){let $=getAllCodeChallengesForUser({uid:et});return $}}async function addXpOnCodeChallengeCompletion($){let{uid:et,xp:en,challengeName:eo}=$,{firestore:es}=(0,ei.UM)();try{let $=(0,er.JU)(es,"users",et),ei=await (0,er.QT)($),el=(0,er.JU)(es,"userCodeChallenges",et),eu=(0,er.JU)(es,"userCodeChallenges",et,"codeChallenges",eo),ed=await (0,er.QT)(eu);ei.exists()&&"completed"!==ed.data().status&&(await (0,er.r7)($,{"stats.totalXp":(0,er.nP)(en),"metadata.updatedAt":new Date().toUTCString()}),await (0,er.pl)(el,{uid:et,xp:(0,er.nP)(en)},{merge:!0}))}catch($){console.log($)}}},92369:function($,et,en){"use strict";en.d(et,{UM:function(){return getFirebase},Vr:function(){return githubAuthProvider},qV:function(){return googleAuthProvider},X7:function(){return twitterAuthProvider}});var er=en(33310);/** 1842 * @license 1843 * Copyright 2020 Google LLC 1844 * 1845 * Licensed under the Apache License, Version 2.0 (the "License"); 1846 * you may not use this file except in compliance with the License. 1847 * You may obtain a copy of the License at 1848 * 1849 * http://www.apache.org/licenses/LICENSE-2.0 1850 * 1851 * Unless required by applicable law or agreed to in writing, software 1852 * distributed under the License is distributed on an "AS IS" BASIS, 1853 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1854 * See the License for the specific language governing permissions and 1855 * limitations under the License. 1856 */(0,er.KN)("firebase","12.6.0","app");var ei=en(39828),eo=en(16689),es=en(43910),el=en(23914);let eu={apiKey:"AIzaSyC6brQydsBGBHiZLhenPvHNRwb4Tm8AsXI",authDomain:"authenticate.codedex.io",projectId:"codedex-io",storageBucket:"codedex-io.appspot.com",messagingSenderId:"939154346570",appId:"1:939154346570:web:e20b0d05830131339d8cb3",measurementId:"G-XPV4EJTQN0"};function initialize(){let $=(0,er.ZF)(eu),et=(0,es.v0)($),ed=(0,ei.LV)($,{experimentalAutoDetectLongPolling:!0}),eh=(0,eo.cF)($),ep=(0,el.$C)($);{let er;return Promise.resolve().then(en.bind(en,51912)).then(et=>{let{getAnalytics:en,logEvent:ei}=et;ei(er=en($),"initialized")}),{analytics:er,firebaseApp:$,auth:et,firestore:ed,storage:eh,functions:ep}}}function getFirebase(){let $=(0,er.C6)().at(0);if($)return initialize();let et=function($){let{firebaseApp:et,auth:en,firestore:er,storage:ei,functions:eo,analytics:es}=$;return window.location.hostname,{firebaseApp:et,auth:en,firestore:er,storage:ei,functions:eo,analytics:es}}(initialize());return function($){let{firestore:et,firebaseApp:en,auth:er,storage:ei,functions:eo,analytics:es}=$;return{firestore:et,firebaseApp:en,auth:er,storage:ei,functions:eo,analytics:es}}(et)}let googleAuthProvider=()=>new es.hJ,twitterAuthProvider=()=>new es.c4,githubAuthProvider=()=>new es.GH},47922:function($,et,en){"use strict";en.d(et,{$q:function(){return updateUsernameOnFirebase},HI:function(){return updateCodeEditorThemeOnUserDoc},IK:function(){return updateResumeExerciseOnFirestore},KC:function(){return addCheckpointProjectLink},M:function(){return updateReEngagementEmailType},MC:function(){return fetchSolutionState},Oq:function(){return updateCharacterModelIndexOnFirebase},PR:function(){return getUser},RO:function(){return updateUserAvatarInUserDoc},Un:function(){return firstExecutionState},Vu:function(){return addXpOnExerciseCompletion},_E:function(){return updateProgressHash},dp:function(){return setCourseOpeningCutsceneState},jr:function(){return updateUserProfileData},o1:function(){return getUserExerciseSettings},q_:function(){return getUserSoundSettings},qk:function(){return getUserProgressForACourse},v9:function(){return getUserProgressHash},x5:function(){return updateUserColorMode},yA:function(){return setUserSoundSettings},z2:function(){return addDateForStreak}});var er=en(39828),ei=en(87047),eo=en(16689),es=en(92369),el=en(94021),eu=en(35336);let{firestore:ed}=(0,es.UM)(),eh=(0,er.hJ)(ed,"users"),ep=(0,er.hJ)(ed,"userProgressCollection"),em=(0,er.hJ)(ed,"userFirstExecutionCollection");async function getUserDoc($){let et,{uid:en}=$;try{let $=(0,er.JU)(eh,en);et=await (0,er.QT)($)}catch($){console.error("Error while fetching user!"),console.error($)}finally{return et}}async function getUser($){let{user:et,uid:en}=$;if(en)try{let $=(0,er.JU)(eh,en),et=await (0,er.QT)($);if(!et.exists())return{user:null};{let $=et.data();return{user:$}}}catch($){return console.error("Error while fetching user!"),console.error($),{user:null}}}async function getUserProgressHash($){let{uid:et}=$;try{let $=(0,er.JU)(ep,et),en=await (0,er.QT)($);if(en.exists()){let{progressHash:$}=en.data();return $}return null}catch($){return null}}async function updateProgressHash($){let{uid:et}=$,en=(0,er.JU)(ep,et),ei="xxxx-xxxx-xxx-xxxx".replace(/[x]/g,()=>{let $=Math.floor(16*Math.random());return $.toString(16)});try{await (0,er.pl)(en,{progressHash:ei},{merge:!0}),el.Z.setProgressHash(et,ei)}catch($){}}async function getUserProgressForACourse($){let{uid:et,courseName:en,count:er=0}=$;if(er>=3)return await getUserProgressForACourse({uid:et,courseName:en});try{let $=await fetch("/api/get-state/course",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({uid:et,courseName:en})}),ei=await $.json(),{status:eo}=ei;if("success"!==eo)return await new Promise($=>setTimeout($,1e3*er)),await getUserProgressForACourse({uid:et,courseName:en,count:er+1});{let{courseDocData:$}=ei;return{courseName:en,courseProgress:$}}}catch($){return console.log($),await new Promise($=>setTimeout($,1e3*er)),await getUserProgressForACourse({uid:et,courseName:en,count:er+1})}}async function addXpOnExerciseCompletion($){let{uid:et,courseName:en,chapterName:ei,challengeName:eo,xP:es}=$;
1856try{let $=(0,er.JU)(ed,"users",et),eo=await (0,er.QT)($);if(!eo.exists())return;let el=(0,er.JU)(ep,et),eh=(0,er.JU)(el,"courses",en),em=await (0,er.QT)(eh);if(!em.exists())return;let ef=em.data(),eg=null;if((null==ef?void 0:ef.version)===2&&(null==ef?void 0:ef.chapters))eg=ef.chapters[ei];else{let $=(0,er.JU)(el,"courses",en,"chapters",ei),et=await (0,er.QT)($);et.exists()&&(eg=et.data())}eg&&(await (0,er.r7)($,{"stats.totalXp":(0,er.nP)(es),["stats.courseXp.".concat(en,".courseXp")]:(0,er.nP)(es),"metadata.updatedAt":new Date().toUTCString()}),(0,eu.f)({uid:et,type:en,xp:es}))}catch($){console.log($)}}async function addDateForStreak($){let{uid:et}=$,en=function(){let $=new Date,et=String($.getDate()).padStart(2,"0"),en=String($.getMonth()+1).padStart(2,"0"),er=$.getFullYear();return"".concat(en,"/").concat(et,"/").concat(er)}();try{let $=(0,er.JU)(ed,"users",et),eo=await (0,er.QT)($);if(eo.exists()){let et=eo.data();if(et.stats.streaks.datesVisited.includes(en))return{...et.stats.streaks};{let{currentStreak:eo,longestStreak:es}=(0,ei.Sp)({dates:[...et.stats.streaks.datesVisited,en]});await (0,er.r7)($,{"stats.streaks.datesVisited":(0,er.vr)(en),"stats.streaks.currentStreak":eo,"stats.streaks.longestStreak":es});let el=await (0,er.QT)($),eu=el.data();return{...eu.stats.streaks}}}}catch($){return console.error("addDateforStreak threw an error"),console.error($),{currentStreak:1,longestStreak:1,datesVisited:[]}}}let UsernameUpdateError=class UsernameUpdateError extends Error{constructor($,et,en){super(et),this.code=$,this.retryAfter=en,this.name="UsernameUpdateError"}};async function updateUsernameOnFirebase($){let{username:et}=$,en=await fetch("/api/account/update-username",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:et})}),er=null;try{er=await en.json()}catch($){}if(!en.ok||(null==er?void 0:er.status)!=="success"){var ei,eo,es,el,eu;let $=null!==(el=null==er?void 0:null===(ei=er.error)||void 0===ei?void 0:ei.code)&&void 0!==el?el:"internal_error",et=null!==(eu=null==er?void 0:null===(eo=er.error)||void 0===eo?void 0:eo.message)&&void 0!==eu?eu:"Failed to update username",en=null==er?void 0:null===(es=er.error)||void 0===es?void 0:es.retryAfter;throw new UsernameUpdateError($,et,en)}return er.data}async function updateCharacterModelIndexOnFirebase($){let{characterModelIndex:et,uid:en}=$;try{let $=(0,er.JU)(eh,en),ei=await (0,er.QT)($);ei.exists()&&await (0,er.r7)($,{"stats.characterModelIndex":et})}catch($){console.log($),console.log("something went wrong while updating character model")}}async function updateCodeEditorThemeOnUserDoc($){let{uid:et,codeEditorTheme:en}=$;try{let $=await getUserDoc({uid:et});if($)return await (0,er.r7)($.ref,{codeEditorTheme:en}),{uid:et,codeEditorTheme:en}}catch($){console.error($)}}async function updateUserProfileData($){let{uid:et,data:en}=$,ei=await getUserDoc({uid:et});if(!ei)throw Error("User document not found");try{let{name:$,bio:eo,username:es,school:el,work:eu,website:ed,location:eh,github:ep,twitter:em,instagram:ef,youtube:eg,twitch:ey,tiktok:ev,linkedin:ex,...e_}=en,ew={};if(void 0!==$){let et=$.split(" ");ew.name=$,ew.firstName=et.slice(0,et.length-1).join(" ")||"",ew.lastName=et[et.length-1]||""}void 0!==eo&&(ew.bio=eo),void 0!==el&&(ew.school=el),void 0!==eu&&(ew.work=eu),void 0!==ed&&(ew.website=ed),void 0!==eh&&(ew.location=eh),void 0!==es&&await updateUsernameOnFirebase({username:es});let ek=Object.keys(e_).map($=>{if($.includes("skillset_")&&e_[$])return $.split("_")[1]}).filter($=>void 0!==$);ek.length>0&&(ew.skillset=ek),Object.keys(ew).length>0&&await (0,er.pl)(ei.ref,ew,{merge:!0});let eC={};return void 0!==ep&&(eC["socials.github"]=ep),void 0!==eg&&(eC["socials.youtube"]=eg),void 0!==em&&(eC["socials.twitter"]=em),void 0!==ef&&(eC["socials.instagram"]=ef),void 0!==ey&&(eC["socials.twitch"]=ey),void 0!==ev&&(eC["socials.tiktok"]=ev),void 0!==ex&&(eC["socials.linkedin"]=ex),Object.keys(eC).length>0&&await (0,er.r7)(ei.ref,eC),{uid:et,data:en}}catch($){throw console.error("Error updating profile data:",$),$}}async function updateUserAvatarInUserDoc($){let{uid:et,file:en}=$,ei=await getUserDoc({uid:et});if(!ei)throw Error("User document not found");let{storage:el}=(0,es.UM)(),eu=(0,eo.iH)(el,"/avatars/".concat(et,"/").concat(en.name));try{await (0,eo.KV)(eu,en);let $=await (0,eo.Jt)(eu);return await (0,er.pl)(ei.ref,{photoURL:$},{merge:!0}),{photoURL:$}}catch($){throw console.error("Error uploading profile picture:",$),$}}async function updateUserColorMode($){let{uid:et,colorMode:en}=$,{firestore:ei}=(0,es.UM)();try{let $=(0,er.JU)(ei,"users",et);await (0,er.pl)($,{colorMode:en},{merge:!0})}catch($){console.error($)}}async function updateResumeExerciseOnFirestore($){let{uid:et,courseName:en,link:ei}=$,eo=(0,er.JU)(ep,et,"courses",en);await (0,er.pl)(eo,{resumeExercise:ei},{merge:!0});let es=el.Z.getCourse(et,en);es&&(es.resumeExercise=ei,el.Z.setCourse(et,en,es))}async function updateReEngagementEmailType($){let{courseName:et,uid:en}=$,{firestore:ei}=(0,es.UM)(),eo=(0,er.JU)(ei,"re-engagement-emails",en);try{let $=await (0,er.QT)(eo);if(!$.exists()){console.log("doc does not exist");return}}catch($){console.log($);return}try{"javascript"===et&&(et="js"),await (0,er.r7)(eo,{type:"complete_free_content_".concat(et),courseName:et})}catch($){console.error($)}}async function addCheckpointProjectLink($){let{uid:et,link:en,courseName:ei}=$,eo=(0,er.JU)(ep,et,"courses",ei);await (0,er.pl)(eo,{checkpointProjectLink:en},{merge:!0});try{let $=el.Z.getCourse(et,ei);$&&($.checkpointProjectLink=en,el.Z.setCourse(et,ei,$))}catch($){console.error("error",$)}}async function fetchSolutionState($){let{uid:et}=$;if(!et)return{};let en=(0,er.JU)(em,et),ei=(0,er.hJ)(en,"courses"),eo=await (0,er.PL)(ei),es={};return eo.forEach($=>{let et=$.data();es[$.id]=et}),es}async function firstExecutionState($){let{uid:et,courseName:en,exerciseName:ei}=$,eo=(0,er.JU)(em,et),es=(0,er.hJ)(eo,"courses"),el=(0,er.JU)(es,en),eu=await (0,er.QT)(el);if(!eu.exists())return await (0,er.pl)(el,{[ei]:!0},{merge:!0}),!0;{let $=eu.data();return!$[ei]&&(await (0,er.pl)(el,{[ei]:!0},{merge:!0}),!0)}}async function setCourseOpeningCutsceneState($){let{uid:et,courseName:en}=$;if(!et||!en)return!1;let ei=(0,er.JU)(ep,et,"courses",en);try{return await (0,er.pl)(ei,{openingCutsceneViewed:!0,"metadata.updatedAt":(0,er.Bt)()},{merge:!0}),!0}catch($){}return!1}async function getUserExerciseSettings($){let{uid:et}=$;try{let{firestore:$}=(0,es.UM)(),en=(0,er.JU)((0,er.hJ)($,"users",et,"settings"),"exercise"),ei=await (0,er.QT)(en),eo=ei.data();ei.exists()||await (0,er.pl)(en,{skipSkipExercisePopup:!1},{merge:!0});let el=null==eo?void 0:eo.skipSkipExercisePopup;if(el)return!0}catch($){}}async function getUserSoundSettings($){let{uid:et}=$;try{var en;let{firestore:$}=(0,es.UM)(),ei=(0,er.JU)((0,er.hJ)($,"users",et,"settings"),"sound"),eo=await (0,er.QT)(ei);if(!eo.exists())return await (0,er.pl)(ei,{masterMute:!1},{merge:!0}),{masterMute:!1};let el=eo.data();return{masterMute:null!==(en=null==el?void 0:el.masterMute)&&void 0!==en&&en}}catch($){return console.error("Error while fetching user sound settings"),{masterMute:!1}}}async function setUserSoundSettings($){let{uid:et,masterMute:en}=$;
1856try{let{firestore:$}=(0,es.UM)(),ei=(0,er.JU)((0,er.hJ)($,"users",et,"settings"),"sound");return await (0,er.pl)(ei,{masterMute:en},{merge:!0}),{masterMute:en}}catch($){throw console.error("Error while saving user sound settings"),$}}},48645:function($,et,en){"use strict";en.d(et,{$:function(){return checkUserStripeEducator},F1:function(){return isUserClubSubscriber},Fw:function(){return isUserForLiferClub},Rb:function(){return isUserEducator},oG:function(){return isUserGitHubStudent},q6:function(){return getUserClaims},sS:function(){return isPaypalUser},uG:function(){return isUserStudent}});var er=en(43910),ei=en(92369);async function getUserClaims(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let{auth:et}=(0,ei.UM)();if(null===et.currentUser)return null;{let en=await (0,er.ag)(et.currentUser,$);return en}}catch($){return console.error("Error getting user claims:",$),null}}async function isPaypalUser(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return!1;return(null===(et=en.claims)||void 0===et?void 0:et.paypal)===!0}catch($){return console.error("Error getting user claims:",$),!1}}async function checkUserStripeEducator(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return!1;return(null===(et=en.claims)||void 0===et?void 0:et.stripeRole)==="paideducator"}catch($){return console.error("Error getting user claims:",$),!1}}async function isUserClubSubscriber(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return!1;return(null===(et=en.claims)||void 0===et?void 0:et.stripeRole)==="club"}catch($){return console.error("Error getting user claims:",$),!1}}async function isUserEducator(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et,en;let er=await getUserClaims($);if(null===er)return!1;return(null===(et=er.claims)||void 0===et?void 0:et.educator)===!0||(null===(en=er.claims)||void 0===en?void 0:en.stripeRole)==="paideducator"}catch($){return console.error("Error getting user claims:",$),!1}}async function isUserStudent(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return!1;return(null===(et=en.claims)||void 0===et?void 0:et.student)===!0}catch($){return console.error("Error getting user claims:",$),!1}}async function isUserGitHubStudent(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return;return(null===(et=en.claims)||void 0===et?void 0:et.githubStudent)===!0||void 0}catch($){return console.error("Error getting user claims:",$),!1}}async function isUserForLiferClub(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var et;let en=await getUserClaims($);if(null===en)return!1;return(null===(et=en.claims)||void 0===et?void 0:et.forever)===!0}catch($){return console.error("Error getting user claims:",$),!1}}},35336:function($,et,en){"use strict";en.d(et,{f:function(){return addWeeklyXp}});var er=en(39828),ei=en(51226),eo=en(92369);let{firestore:es}=(0,eo.UM)();async function addWeeklyXp($){let{uid:et,type:en,xp:eo}=$,{formattedDate:el}=(0,ei.P)();try{let $=(0,er.JU)(es,"leaderboards","weekly-leaderboard",el,et),ei=await (0,er.QT)($);return ei.exists()?await (0,er.r7)($,{[en]:(0,er.nP)(eo),totalXp:(0,er.nP)(eo)}):await (0,er.pl)($,{[en]:eo,totalXp:eo,uid:et}),{status:200,message:"Leaderboard updated successfully"}}catch($){throw console.error("Error updating leaderboard:",$),$}}},27741:function($,et,en){"use strict";en.d(et,{Q:function(){return getChatLimit},f:function(){return updateChatLimit}});var er=en(39828),ei=en(92369);let{firestore:eo}=(0,ei.UM)();async function updateChatLimit($){let{uid:et,whichChat:en="chat"}=$;if(!et)throw Error("Missing required field: uid is required");try{let $=new Date().toDateString(),ei=(0,er.JU)(eo,"ai",et),es={chat:{chatsSent:(0,er.nP)(1),lastUpdated:$,uid:et},lumiChat:{lumiChatsSent:(0,er.nP)(1),lastUpdatedLumi:$,uid:et}};return await (0,er.pl)(ei,es[en],{merge:!0}),{status:200,message:"Chat saved successfully"}}catch($){throw console.error("Error in updateChatLimit:",$),$}}async function getChatLimit($){let{uid:et,whichChat:en="chat"}=$;if(!et)throw Error("Missing required field: uid is required");try{let $=new Date().toDateString(),ei=(0,er.JU)(eo,"ai",et),es=await (0,er.QT)(ei),el={chat:{countField:"chatsSent",dateField:"lastUpdated"},lumiChat:{countField:"lumiChatsSent",dateField:"lastUpdatedLumi"}}[en];if(!es.exists())return await (0,er.pl)(ei,{[el.countField]:0,[el.dateField]:$,uid:et}),{[el.countField]:0};let eu=es.data(),ed=eu[el.dateField];if(ed===$)return{[el.countField]:eu[el.countField]||0};return await (0,er.pl)(ei,{[el.countField]:0,[el.dateField]:$,uid:et},{merge:!0}),{[el.countField]:0}}catch($){throw console.error("Error in getChatLimit:",$),$}}},57881:function($,et,en){"use strict";en.d(et,{Aj:function(){return saveAiChat},ZE:function(){return getLatestChats},dT:function(){return deleteAiChat},fT:function(){return generateChatId},n6:function(){return getLumiChat},z8:function(){return saveChatTitleAndType}});var er=en(39828),ei=en(92369);let{firestore:eo}=(0,ei.UM)();async function saveAiChat($){let{uid:et,newChat:en,docId:ei,subCollection:es="chats"}=$;if(!et||!ei||!en)throw Error("Missing required fields: uid, docId, and newChat are all required");let el=Array.isArray(en)?en:[en];try{let $=(0,er.JU)(eo,"ai",et,es,ei);return await (0,er.pl)($,{chatHistory:(0,er.vr)(...el),updated:(0,er.Bt)(),uid:et},{merge:!0}),{status:200,message:"Chat saved successfully"}}catch($){throw console.error("Error in saveAiChat:",$),$}}function generateChatId(){return(0,er.JU)((0,er.hJ)(eo,"_")).id}async function saveChatTitleAndType($){let{uid:et,docId:en,title:ei,subCollection:es="chats",chatType:el}=$;if(!et||!en||!ei)throw Error("Missing required fields: uid, docId, and title are all required");try{let $=(0,er.JU)(eo,"ai",et,es,en);return await (0,er.pl)($,{title:ei,chatType:el,createdAt:(0,er.Bt)()},{merge:!0}),{status:200,message:"Chat saved successfully"}}catch($){throw console.error("Error in saveAiChat:",$),$}}async function getLatestChats($){let{uid:et,subCollection:en="chats",limitCount:ei=10,lastDoc:es=null}=$;if(!et)throw Error("Missing required field: uid is required");try{let $;let el=(0,er.hJ)(eo,"ai",et,en);$=es?(0,er.IO)(el,(0,er.Xo)("updated","desc"),(0,er.TQ)(es),(0,er.b9)(ei)):(0,er.IO)(el,(0,er.Xo)("updated","desc"),(0,er.b9)(ei));let eu=await (0,er.PL)($),ed=[];eu.forEach($=>{ed.push({id:$.id,...$.data()})});let eh=eu.docs[eu.docs.length-1];return{status:200,data:ed,lastDoc:eh,hasMore:ed.length===ei}}catch($){throw console.log("Error in getLatestChats:",$),$}}async function getLumiChat($){let{uid:et,docId:en,subCollection:ei="chats"}=$;if(!et||!en)throw Error("Missing required fields: uid and docId are required");try{let $=(0,er.JU)(eo,"ai",et,ei,en),es=await (0,er.QT)($);if(!es.exists())return{status:404,message:"Chat not found",data:null};return{status:200,message:"Chat retrieved successfully",data:{id:es.id,...es.data()}}}catch($){throw console.error("Error in getAiChat:",$),$}}async function deleteAiChat($){let{uid:et,docId:en,subCollection:ei="chats"}=$;if(!et||!en)throw Error("Missing required fields: uid and docId are required");try{let $=(0,er.JU)(eo,"ai",et,ei,en);return await (0,er.oe)($),{status:200,message:"Chat deleted successfully"}}catch($){throw console.error("Error in deleteAiChat:",$),$}}},47240:function($,et,en){"use strict";en.d(et,{cZ:function(){return extractRepresentativeColors},gK:function(){return getOutfitRepresentativeColors},wt:function(){return getColorPaletteByRepresentative}});var er=en(22659);function extractRepresentativeColors(){return{skin:["#f8dbba","#f9bc93","#db9c77","#c98361","#bb6e5a","#c56b4b","#704340"],hair:["#ffaa32","#926f55","#a65050","#5c606a","#a5becd","#f08358","#e65078","#e65ae6","#64a51e","#14a0cd"],outfit:{"outfit-style-1":["#1469c3","#c36e14","#14c322","#7a14c3","#c3143d"],"outfit-style-2":["#ffaa32","#2789cd","#2bcd27","#27cdb3","#b927cd"],"outfit-style-3":["#64a51e","#785c7d","#a51e7f","#1ea575","#1e66a5"],"outfit-style-4":["#e66e46","#46bee6","#c146e6","#93e646","#46e68e"],"outfit-style-5":["#e63cda","#3ce648","#3cc6e6","#e6de3c","#3ce6c8"],"outfit-style-6":["#7891a5","#a59778","#83a578","#a278a5","#a5787b"]}}}function getOutfitRepresentativeColors($){let et=extractRepresentativeColors();return et.outfit[$]||et.outfit["outfit-style-1"]}function getColorPaletteByRepresentative($,et,en){let ei=extractRepresentativeColors();if("skin"===et){let et=ei.skin.indexOf($);return -1===et?er.ZX[0]:er.ZX[et]}if("hair"===et){let et=ei.hair.indexOf($);return -1===et?er.$Z[0]:er.$Z[et]}if("outfit"===et){let et=en?getOutfitRepresentativeColors(en):ei.outfit["outfit-style-1"],eo=et.indexOf($);if(-1===eo)return er.HE[0];let es={"outfit-style-1":er.HE,"outfit-style-2":er.EM,"outfit-style-3":er.QI,"outfit-style-4":er.gz,"outfit-style-5":er.bX,"outfit-style-6":er.zK},el=en&&es[en]||er.HE;return el[eo]||el[0]}return[]}},54575:function($,et,en){"use strict";en.d(et,{zE:function(){return buildColorMapForSlot},oo:function(){return hexToRgb},w:function(){return recolorImageData},vq:function(){return rgbToHex}});var er=en(47240);let ei={SKIN:"skin",HAIR:"hair",OUTFIT:"outfit"};var eo=en(22659);function hexToRgb($){let et=$.replace("#",""),en=3===et.length?et.split("").map($=>$+$).join(""):et.padStart(6,"0"),er=parseInt(en,16);return[er>>16&255,er>>8&255,255&er]}function rgbToHex($){let[et,en,er]=$,toSegment=$=>$.toString(16).padStart(2,"0");return"#".concat(toSegment(et)).concat(toSegment(en)).concat(toSegment(er))}function mixChannel($,et,en){return Math.round($+(et-$)*en)}function buildColorMapForSlot($,et,en,es){return $&&et&&et.length&&en&&/^#[0-9a-f]{6}$/i.test(en)?$===ei.OUTFIT&&es?function($,et,en){let eo=new Map,es=(0,er.wt)(et,ei.OUTFIT,en),el=es.map($=>{let et=hexToRgb($);return[...et,255]}),eu=function($){let et=(0,er.gK)($);return et[0]||"#1469c3"}(en),ed=(0,er.wt)(eu,ei.OUTFIT,en);return $.forEach($=>{let et=rgbToHex($.slice(0,3)),en=ed.findIndex($=>$.toLowerCase()===et.toLowerCase());if(-1!==en&&en<el.length){let et=$.join(","),er=el[en];eo.set(et,er)}}),eo}(et,en,es):$===ei.HAIR?function($,et){let en=new Map,er=["#ffaa32","#926f55","#a65050","#5c606a","#a5becd","#f08358","#e65078","#e65ae6","#64a51e","#14a0cd"].findIndex($=>$.toLowerCase()===et.toLowerCase());if(-1===er)return en;
1856let ei=eo.$Z[er],es=ei.map($=>{let et=hexToRgb($);return[...et,255]}),el=eo.$Z[0];return $.forEach($=>{let et=rgbToHex($.slice(0,3)),er=el.findIndex($=>$.toLowerCase()===et.toLowerCase());if(-1!==er&&er<es.length){let et=$.join(","),ei=es[er];en.set(et,ei)}}),en}(et,en):$===ei.SKIN?function($,et){let en=new Map,er=["#f8dbba","#f9bc93","#db9c77","#c98361","#bb6e5a","#c56b4b","#704340"].findIndex($=>$.toLowerCase()===et.toLowerCase());if(-1===er)return en;let ei=eo.ZX[er],es=ei.map($=>{let et=hexToRgb($);return[...et,255]}),el=eo.ZX[0];return $.forEach($=>{let et=rgbToHex($.slice(0,3)),er=el.findIndex($=>$.toLowerCase()===et.toLowerCase());if(-1!==er&&er<es.length){let et=$.join(","),ei=es[er];en.set(et,ei)}}),en}(et,en):function($,et){let en=new Map;return Object.entries($).forEach($=>{let[er,ei]=$,eo=et[er];if(!ei||!ei.shades.length||!eo)return;let es=ei.shades,el=es.map($=>{let[et,en,er]=$;return function($){let[et,en,er]=$;return .2126*et+.7152*en+.0722*er}([et,en,er])}),eu=Math.min(...el),ed=Math.max(...el),eh=hexToRgb(eo);ei.shades.forEach(($,et)=>{let er=$.join(","),ei=ed===eu?.5:(el[et]-eu)/(ed-eu),eo=function($,et){let en=$.map($=>mixChannel($,0,.65)),er=$.map($=>mixChannel($,255,.45));return en.map(($,en)=>{let ei=$+(er[en]-$)*et;return ei<0?0:ei>255?255:Math.round(ei)})}(eh,ei);en.set(er,[...eo,$[3]])})}),en}({[$]:{shades:et}},{[$]:en}):new Map}function recolorImageData($,et){if(!et.size)return;let en=$.data,er=[];et.forEach(($,et)=>{let en=et.split(",").map(Number);4===en.length&&er.push({src:en,target:$})});for(let $=0;$<en.length;$+=4){let et=en[$],ei=en[$+1],eo=en[$+2],es=en[$+3];if(0!==es)for(let el of er){let er=el.src;if(Math.abs(es-er[3])>5)continue;let eu=Math.abs(et-er[0])+Math.abs(ei-er[1])+Math.abs(eo-er[2]);if(eu<=15){let et=el.target;en[$]=et[0],en[$+1]=et[1],en[$+2]=et[2],en[$+3]=et[3];break}}}}},22659:function($,et,en){"use strict";en.d(et,{$Z:function(){return ei},EM:function(){return es},HE:function(){return eo},QI:function(){return el},ZX:function(){return er},bX:function(){return ed},gz:function(){return eu},zK:function(){return eh}});let er=[["#341300","#753303","#a16567","#e7aba3","#f8dbba","#f9989b","#9badb7","#cbdbfc","#ffffff"],["#341300","#753303","#97574b","#d38972","#f9bc93","#f9989b","#9badb7","#cbdbfc","#ffffff"],["#341300","#753303","#7d4b43","#b86f56","#db9c77","#f9989b","#9badb7","#cbdbfc","#ffffff"],["#341300","#753303","#632d19","#995634","#c98361","#f9989b","#9badb7","#cbdbfc","#ffffff"],["#341300","#753303","#632d19","#784836","#bb6e5a","#f9989b","#9badb7","#cbdbfc","#ffffff"],["#341706","#753b11","#611a22","#823935","#c56b4b","#f9a4a6","#9badb7","#cbdbfc","#ffffff"],["#341300","#753303","#2b1420","#571520","#704340","#f9989b","#9badb7","#cbdbfc","#ffffff"]],ei=[["#341300","#ad3f06","#f06923","#ffaa32","#e3e6ff"],["#341300","#61483b","#805039","#926f55","#e3e6ff"],["#341300","#5a1423","#75332a","#a65050","#e3e6ff"],["#341300","#303135","#484d58","#5c606a","#e3e6ff"],["#341300","#55647d","#7891a5","#a5becd","#e3e6ff"],["#341300","#9d2d12","#c65439","#f08358","#e3e6ff"],["#341300","#820a64","#b4236e","#e65078","#e3e6ff"],["#341300","#6f1f9d","#a041d7","#e65ae6","#e3e6ff"],["#341300","#17600b","#237d14","#64a51e","#e3e6ff"],["#341300","#08478a","#1469c3","#14a0cd","#e3e6ff"]],eo=[["#341300","#7d0041","#aa143c","#d72d2d","#024e9f","#1469c3","#14a0cd","#a5becd","#c8e1eb","#ffffff"],["#341300","#007d3c","#14aa82","#2dd7d7","#9f5302","#c36e14","#f78c19","#cdb4a5","#ebd2c8","#ffffff"],["#341300","#06007d","#4114aa","#8d2dd7","#029f0f","#14c322","#7fcc6e","#a7cda5","#cdebc8","#ffffff"],["#341300","#7d4400","#aa8c14","#ccd72d","#5d029f","#7a14c3","#9a63c2","#b7a5cd","#d4c8eb","#ffffff"],["#341300","#227d00","#16aa14","#2dd758","#9f0227","#c3143d","#c25972","#cda5b4","#ebc8d8","#ffffff"]],es=[["#341300","#f06923","#ffaa32","#ffe65a","#b4236e","#e65078","#ff8c8c","#642db4","#a041d7","#e65ae6"],["#341300","#42bfe8","#2789cd","#3f5f9e","#2a987b","#50e6be","#8cffff","#78d741","#7db42d","#c4f129"],["#341300","#61e842","#2bcd27","#3f9e55","#92b53f","#b9e650","#beff8c","#b42d31","#d75f41","#f12953"],["#341300","#3f959e","#27cdb3","#42e8b3","#40b854","#50e669","#8cffbe","#b49e2d","#cdd741","#f4ff57"],["#341300","#b942e8","#b927cd","#9e3f92","#76569c","#8c65b8","#c28cff","#2db4a3","#41c8d7","#29f1b3"]],el=[["#341300","#0f5519","#237d14","#64a51e","#c8e1eb","#70192c","#8c3c32","#97574b","#b26247","#37415a","#55647d","#7891a5"],["#341300","#550f4b","#6e147d","#785c7d","#ebd2c8","#19705d","#32828c","#2f85a2","#4797b2","#695c47","#7d6e55","#a58c78"],["#341300","#550f13","#7d1438","#a51e7f","#e8ebc8","#193d70","#323a8c","#3e389f","#4d47b2","#566344","#6c7d55","#9aa578"],["#341300","#0f3f55","#147a7d","#1ea575","#d8c8eb","#706c19","#738c32","#76a337ff","#85b247","#614169","#75557d","#9478a5"],["#341300","#180f55","#14257d","#1e66a5","#ebc8e2","#2d7019","#328c3b","#359a4d","#47b260","#634450","#7d5565","#a57892"]],eu=[["#341300","#8c2323","#c3412d","#e66e46","#37415a","#55647d","#7891a5","#65261e","#8c3c32","#b26247"],["#341300","#1d7373","#289cad","#46bee6","#5a5037","#7d6e55","#a58c78","#27636b","#32828c","#4797b2"],["#341300","#59238c","#8f2dc3","#c146e6","#375a3f","#557d5b","#7aa578","#6b328c","#723585","#9947b2"],["#341300","#708c23","#87c32d","#93e646","#59375a","#79557d","#9878a5","#5d8736","#6a8c32","#7ab247"],["#341300","#238c38","#2dc35f","#46e68e","#5a373a","#7d555c","#a57888","#2a7542","#328c4e","#47b277"]],ed=[["#341300","#882b5c","#b2478f","#e63cda","#7a4841","#b3669a","#d77bba"],["#341300","#2b8857","#47b26a","#3ce648","#549468","#66b37f","#7bd798"],["#341300","#2b5188","#4783b2","#3cc6e6","#6089a8","#6691b3","#7bafd7"],["#341300","#67882b","#9bb247","#e6de3c","#859153","#a3b366","#c5d77b"],["#341300","#2b7388","#47aab2","#3ce6c8","#50878c","#66adb3","#7bd1d7"]],eh=[["#341300","#37415a","#55647d","#7891a5","#a5becd","#ffffff","#7a4841","#ad7757","#c09473","#c8e1eb"],["#341300","#5a5937","#7d7855","#a59778","#cdbea5","#ffffff","#41657a","#5777ad","#738cc0","#ebdbc8"],["#341300","#375a38","#577d55","#83a578","#b1cda5","#ffffff","#5a417a","#9257ad","#ac73c0","#d6ebc8"],["#341300","#5a3753","#7d5579","#a278a5","#c7a5cd","#ffffff","#577a41","#63ad57","#7ac073","#e3c8eb"],["#341300","#5a3f37","#7d5a55","#a5787b","#cda5aa","#ffffff","#417a65","#57ada2","#73c0bb","#ebc8cf"]]},82846:function($,et,en){"use strict";function reduxToAvatarConfig($,et){let en={};$.hair.color&&(en.hair=$.hair.color),$.skin.color&&(en.skin=$.skin.color),$.shirt.color&&(en.outfit=$.shirt.color);let er=[];return $.hair.type&&er.push({assetId:$.hair.type,zIndex:1}),$.shirt.type&&er.push({assetId:$.shirt.type,zIndex:2}),{archetypeId:"babysprite",colors:en,extraLayers:er.length>0?er:void 0,background:et||void 0}}function avatarConfigToRedux($){var et,en,er,ei,eo;let es=null===(et=$.extraLayers)||void 0===et?void 0:et.find($=>$.assetId.startsWith("hair")),el=null===(en=$.extraLayers)||void 0===en?void 0:en.find($=>$.assetId.startsWith("outfit"));return{hair:{type:(null==es?void 0:es.assetId)||null,color:(null===(er=$.colors)||void 0===er?void 0:er.hair)||null},shirt:{type:(null==el?void 0:el.assetId)||null,color:(null===(ei=$.colors)||void 0===ei?void 0:ei.outfit)||null},skin:{type:null,color:(null===(eo=$.colors)||void 0===eo?void 0:eo.skin)||null},background:$.background||null}}en.d(et,{W:function(){return reduxToAvatarConfig},c:function(){return avatarConfigToRedux}})},80109:function($,et,en){"use strict";en.d(et,{$w:function(){return em},Gx:function(){return eu},I7:function(){return ei},J1:function(){return eo},LP:function(){return ep},lf:function(){return el},rw:function(){return es},v2:function(){return ed}});var er=en(47240);let ei={hair:{id:"hair",label:"Hair",options:["#1f2937","#6b3f26","#b45309","#d97706","#dc2626","#ec4899","#0ea5e9"],defaultColor:"#2d1f1f"},skin:{id:"skin",label:"Skin",options:["#f9e8d8","#f5c8a0","#d19974","#b2774a","#8d5524"],defaultColor:"#f5c8a0"},outfit:{id:"outfit",label:"Outfit",options:["#2563eb","#0ea5e9","#22c55e","#ef4444","#a855f7","#f97316","#facc15","#6b7280"],defaultColor:"#3b82f6"}};function createSpriteSheetDefinition($,et,en,er,ei,eo){return{textureKey:$,source:et,frameWidth:en,frameHeight:er,columns:ei,rows:eo}}let eo={"boysprite-base":{id:"boysprite-base",label:"Boysprite Base",walking:createSpriteSheetDefinition("boysprite","/game-room/processed-assets/boy-spritesheet.png",24,24,6,4),standing:createSpriteSheetDefinition("boysprite-standing","/game-room/processed-assets/boy-spritesheet-standing.png",24,24,10,4),palettes:[]},"girlsprite-base":{id:"girlsprite-base",label:"Girlsprite Base",walking:createSpriteSheetDefinition("girlsprite","/game-room/processed-assets/girl-spritesheet.png",24,24,6,4),standing:createSpriteSheetDefinition("girlsprite-standing","/game-room/processed-assets/girl-spritesheet-standing.png",24,24,10,4),palettes:[]},"girlsprite-hair-layer":{id:"girlsprite-hair-layer",label:"Girlsprite Hair Overlay",walking:createSpriteSheetDefinition("girlsprite-hair-layer","/game-room/processed-assets/girl-hair-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("girlsprite-hair-layer
1856-standing","/game-room/processed-assets/girl-hair-layer-standing.png",24,24,10,4),palettes:[]},"foxboysprite-base":{id:"foxboysprite-base",label:"Foxboysprite Base",walking:createSpriteSheetDefinition("foxboysprite","/game-room/processed-assets/foxboysprite-spritesheet.png",24,24,6,4),standing:createSpriteSheetDefinition("foxboysprite-standing","/game-room/processed-assets/foxboysprite-spritesheet-standing.png",24,24,10,4),palettes:[]},"foxgirlsprite-base":{id:"foxgirlsprite-base",label:"Foxgirlsprite Base",walking:createSpriteSheetDefinition("foxgirlsprite","/game-room/processed-assets/foxgirlsprite-spritesheet.png",24,24,6,4),standing:createSpriteSheetDefinition("foxgirlsprite-standing","/game-room/processed-assets/foxgirlsprite-spritesheet-standing.png",24,24,10,4),palettes:[]},"robotsprite-base":{id:"robotsprite-base",label:"Robotsprite Base",walking:createSpriteSheetDefinition("robotsprite","/game-room/processed-assets/robot-spritesheet.png",24,24,6,4),standing:createSpriteSheetDefinition("robotsprite-standing","/game-room/processed-assets/robot-spritesheet-standing.png",24,24,10,4),palettes:[]},"boy-hair-layer":{id:"boy-hair-layer",label:"Boysprite Hair Overlay",walking:createSpriteSheetDefinition("boy-hair-layer","/game-room/processed-assets/boy-hair-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("boy-hair-layer-standing","/game-room/processed-assets/boy-hair-layer-standing.png",24,24,10,4),palettes:[]},"foxboy-hair-layer":{id:"foxboy-hair-layer",label:"Foxboy Hair Overlay",walking:createSpriteSheetDefinition("foxboy-hair-layer","/game-room/processed-assets/foxboy-hair-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("foxboy-hair-layer-standing","/game-room/processed-assets/foxboy-hair-layer-standing.png",24,24,10,4),palettes:[]},"foxgirl-hair-layer":{id:"foxgirl-hair-layer",label:"Foxgirl Hair Overlay",walking:createSpriteSheetDefinition("foxgirl-hair-layer","/game-room/processed-assets/foxgirl-hair-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("foxgirl-hair-layer-standing","/game-room/processed-assets/foxgirl-hair-layer-standing.png",24,24,10,4),palettes:[]},"robot-top-layer":{id:"robot-top-layer",label:"Robotsprite Top Overlay",walking:createSpriteSheetDefinition("robot-top-layer","/game-room/processed-assets/robot-top-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("robot-top-layer-standing","/game-room/processed-assets/robot-top-layer-standing.png",24,24,10,4),palettes:[]},"girlsprite-outfit-layer":{id:"girlsprite-outfit-layer",label:"Girlsprite Outfit Overlay",walking:createSpriteSheetDefinition("girlsprite-outfit-layer","/game-room/processed-assets/girl-outfit-layer.png",24,24,6,4),standing:createSpriteSheetDefinition("girlsprite-outfit-layer-standing","/game-room/processed-assets/girl-outfit-layer-standing.png",24,24,10,4),palettes:[]},"babysprite-base":{id:"babysprite-base",label:"Babysprite Base",walking:createSpriteSheetDefinition("babysprite","/game-room/new-sheets/Spritesheets/body-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("babysprite-standing","/game-room/new-sheets/Spritesheets/body-idle.png",24,24,10,4),palettes:[{slotId:"skin",shades:[[52,19,0,255],[117,51,3,255],[161,101,103,255],[231,171,163,255],[248,219,186,255],[249,152,155,255],[155,173,183,255],[203,219,252,255],[255,255,255,255]]}]},"hair-style-1":{id:"hair-style-1",label:"Hair Style 1",thumbnail:"/game-room/new-sheets/Thumbnails/hair1.png",walking:createSpriteSheetDefinition("hair1-walk","/game-room/new-sheets/Spritesheets/hair1-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("hair1-idle","/game-room/new-sheets/Spritesheets/hair1-idle.png",24,24,10,4),palettes:[{slotId:"hair",shades:[[52,19,0,255],[173,63,6,255],[240,105,35,255],[255,170,50,255],[227,230,255,255]]}]},"hair-style-2":{id:"hair-style-2",label:"Hair Style 2",thumbnail:"/game-room/new-sheets/Thumbnails/hair2.png",walking:createSpriteSheetDefinition("hair2-walk","/game-room/new-sheets/Spritesheets/hair2-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("hair2-idle","/game-room/new-sheets/Spritesheets/hair2-idle.png",24,24,10,4),palettes:[{slotId:"hair",shades:[[52,19,0,255],[173,63,6,255],[240,105,35,255],[255,170,50,255],[227,230,255,255]]}]},"hair-style-3":{id:"hair-style-3",label:"Hair Style 3",thumbnail:"/game-room/new-sheets/Thumbnails/hair3.png",walking:createSpriteSheetDefinition("hair3-walk","/game-room/new-sheets/Spritesheets/hair3-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("hair3-idle","/game-room/new-sheets/Spritesheets/hair3-idle.png",24,24,10,4),palettes:[{slotId:"hair",shades:[[52,19,0,255],[173,63,6,255],[240,105,35,255],[255,170,50,255],[227,230,255,255]]}]},"hair-style-4":{id:"hair-style-4",label:"Hair Style 4",thumbnail:"/game-room/new-sheets/Thumbnails/hair4.png",w
1856alking:createSpriteSheetDefinition("hair4-walk","/game-room/new-sheets/Spritesheets/hair4-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("hair4-idle","/game-room/new-sheets/Spritesheets/hair4-idle.png",24,24,10,4),palettes:[{slotId:"hair",shades:[[52,19,0,255],[173,63,6,255],[240,105,35,255],[255,170,50,255],[227,230,255,255]]}]},"hair-style-5":{id:"hair-style-5",label:"Hair Style 5",thumbnail:"/game-room/new-sheets/Thumbnails/hair5.png",walking:createSpriteSheetDefinition("hair5-walk","/game-room/new-sheets/Spritesheets/hair5-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("hair5-idle","/game-room/new-sheets/Spritesheets/hair5-idle.png",24,24,10,4),palettes:[{slotId:"hair",shades:[[52,19,0,255],[173,63,6,255],[240,105,35,255],[255,170,50,255],[227,230,255,255]]}]},"outfit-style-1":{id:"outfit-style-1",label:"Outfit Style 1",thumbnail:"/game-room/new-sheets/Thumbnails/outfit1.png",walking:createSpriteSheetDefinition("outfit1-walk","/game-room/new-sheets/Spritesheets/outfit1-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit1-idle","/game-room/new-sheets/Spritesheets/outfit1-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[125,0,65,255],[170,20,60,255],[215,45,45,255],[2,78,159,255],[20,105,195,255],[20,160,205,255],[165,190,205,255],[200,225,235,255],[255,255,255,255]]}]},"outfit-style-2":{id:"outfit-style-2",label:"Outfit Style 2",thumbnail:"/game-room/new-sheets/Thumbnails/outfit2.png",walking:createSpriteSheetDefinition("outfit2-walk","/game-room/new-sheets/Spritesheets/outfit2-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit2-idle","/game-room/new-sheets/Spritesheets/outfit2-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[240,105,35,255],[255,170,50,255],[255,230,90,255],[180,35,110,255],[230,80,120,255],[255,140,140,255],[100,45,180,255],[160,65,215,255],[230,90,230,255]]}]},"outfit-style-3":{id:"outfit-style-3",label:"Outfit Style 3",thumbnail:"/game-room/new-sheets/Thumbnails/outfit3.png",walking:createSpriteSheetDefinition("outfit3-walk","/game-room/new-sheets/Spritesheets/outfit3-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit3-idle","/game-room/new-sheets/Spritesheets/outfit3-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[15,85,25,255],[35,125,20,255],[100,165,30,255],[200,225,235,255],[112,25,44,255],[140,60,50,255],[151,87,75,255],[178,98,71,255],[55,65,90,255],[85,100,125,255],[120,145,165,255]]}]},"outfit-style-4":{id:"outfit-style-4",label:"Outfit Style 4",thumbnail:"/game-room/new-sheets/Thumbnails/outfit4.png",w
1856alking:createSpriteSheetDefinition("outfit4-walk","/game-room/new-sheets/Spritesheets/outfit4-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit4-idle","/game-room/new-sheets/Spritesheets/outfit4-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[140,35,35,255],[195,65,45,255],[230,110,70,255],[55,65,90,255],[85,100,125,255],[120,145,165,255],[101,38,30,255],[140,60,50,255],[178,98,71,255]]}]},"outfit-style-5":{id:"outfit-style-5",label:"Outfit Style 5",thumbnail:"/game-room/new-sheets/Thumbnails/outfit5.png",walking:createSpriteSheetDefinition("outfit5-walk","/game-room/new-sheets/Spritesheets/outfit5-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit5-idle","/game-room/new-sheets/Spritesheets/outfit5-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[136,43,92,255],[178,71,143,255],[230,60,218,255],[122,72,65,255],[179,102,154,255],[215,123,186,255]]}]},"outfit-style-6":{id:"outfit-style-6",label:"Outfit Style 6",thumbnail:"/game-room/new-sheets/Thumbnails/outfit6.png",walking:createSpriteSheetDefinition("outfit6-walk","/game-room/new-sheets/Spritesheets/outfit6-walk.png",24,24,6,4),standing:createSpriteSheetDefinition("outfit6-idle","/game-room/new-sheets/Spritesheets/outfit6-idle.png",24,24,10,4),palettes:[{slotId:"outfit",shades:[[52,19,0,255],[55,65,90,255],[85,100,125,255],[120,145,165,255],[165,190,205,255],[255,255,255,255],[122,72,65,255],[173,119,87,255],[192,148,115,255],[200,225,235,255]]}]}},es={boysprite:{id:"boysprite",label:"Explorer",previewImage:"/images/boy.gif",layers:[{assetId:"boysprite-base",zIndex:0}],colorSlots:[],isCustomizable:!1},girlsprite:{id:"girlsprite",label:"Adventurer",previewImage:"/images/girl.gif",layers:[{assetId:"girlsprite-base",zIndex:0}],colorSlots:[],isCustomizable:!1},foxboysprite:{id:"foxboysprite",label:"Fox Boy",previewImage:"/images/foxboy.gif",layers:[{assetId:"foxboysprite-base",zIndex:0}],colorSlots:[],isCustomizable:!1},foxgirlsprite:{id:"foxgirlsprite",label:"Fox Girl",previewImage:"/images/foxgirl.gif",layers:[{assetId:"foxgirlsprite-base",zIndex:0}],colorSlots:["hair","skin","outfit"],isCustomizable:!1},robotsprite:{id:"robotsprite",label:"Robo Pal",previewImage:"/images/robot.gif",layers:[{assetId:"robotsprite-base",zIndex:0}],colorSlots:["hair","skin","outfit"],isCustomizable:!1},babysprite:{id:"babysprite",label:"Baby Sprite",previewImage:"/game-room/new-sheets/Thumbnails/chillsprite-idle.gif",layers:[{assetId:"babysprite-base",zIndex:0}],colorSlots:["hair","skin","outfit"],isCustomizable:!0}},el=Object.values(es).reduce(($,et)=>($[et.previewImage]=et,$),{}),eu=["hair-style-1","hair-style-2","hair-style-3"].map($=>eo[$]).filter(Boolean),ed=["outfit-style-1","outfit-style-2","outfit-style-3","outfit-style-4"].map($=>eo[$]).filter(Boolean),eh=(0,er.cZ)(),ep=eh.hair,em=eh.skin;eh.outfit},78256:function($,et,en){"use strict";en.d(et,{S:function(){return er}});let er={python:[{name:"Python: Basics I",link:"https://www.codedex.io/cheatsheets/python-1.pdf",badge:"loops",badgeImage:"",unlocks:"Unlock after Ch. 4"},{name:"Python: Basics II",link:"https://www.codedex.io/cheatsheets/python-2.pdf",badge:"modules",badgeImage:"",unlocks:"Unlock after Ch. 8"}],javascript:[{name:"JavaScript: Basics I",link:"https://www.codedex.io/cheatsheets/javascript-1.pdf",badge:"loops",badgeImage:"",unlocks:"Unlock after Ch. 4"},{name:"JavaScript: Basics II",link:"https://www.codedex.io/cheatsheets/javascript-2.pdf",badge:"trifecta",badgeImage:"",unlocks:"Unlock after Ch. 8"}],"command-line":[{name:"Command Line: Basics",link:"https://www.codedex.io/cheatsheets/command-line-1.pdf",badge:"manipulation",badgeImage:"",unlocks:"Unlock after Ch. 2"}],java:[{name:"Java: Basics I",link:"https://www.codedex.io/cheatsheets/java-1.pdf",badge:"loops",badgeImage:"",unlocks:"Unlock after Ch. 4"},{name:"Java: Basics II",link:"https://www.codedex.io/cheatsheets/java-2.pdf",badge:"utility-classes",badgeImage:"",unlocks:"Unlock after Ch. 8"}],cpp:[{name:"C++: Basics I",link:"https://www.codedex.io/cheatsheets/cpp-1.pdf",badge:"loops",badgeImage:"",unlocks:"Unlock after Ch. 4"},{name:"C++: Basics II",link:"https://www.codedex.io/cheatsheets/cpp-2.pdf",badge:"pointers-and-references",badgeImage:"",unlocks:"Unlock after Ch. 8"}],html:[{name:"HTML: Basics I",link:"https://www.codedex.io/cheatsheets/html-1.pdf",badge:"structure",badgeImage:"",unlocks:"Unlock after Ch. 2"}],css:[{name:"CSS: Basics I",link:"https://www.codedex.io/cheatsheets/css-1.pdf",badge:"properties",badgeImage:"",unlocks:"Unlock after Ch. 2"}],sql:[{name:"SQL: Basics I",link:"https://www.codedex.io/cheatsheets/sql-1.pdf",badge:"aggregates",badgeImage:"",unlocks:"Unlock after Ch. 2"},{name:"SQL: Basics II",link:"https://www.codedex.io/cheatsheets/sql-2.pdf",badge:"multiple-tables",badgeImage:"",unlocks:"Unlock after Ch. 4"}],"git-github":[{name:"Git & GitHub: Basics",link:"https://www.codedex.io/cheatsheets/git-github-1.pdf",badge:"exploring-repos",badgeImage:"",unlocks:"Unlock after Ch. 2"}],numpy:[{name:"NumPy: Basics I",link:"https://www.codedex.io/cheatsheets/numpy-1.pdf",badge:"basic-operations",badgeImage:"",unlocks:"Unlock after Ch. 2"}],matplotlib:[{name:"Matplotlib: Basics I",link:"https://www.codedex.io/cheatsheets/matplotlib-1.pdf",badge:"and-beyond",unlocks:"Unlock after Ch. 2",badgeImage:""}]}},34150:function($,et,en){"use strict";en.d(et,{P:function(){return followUser}}
1856);var er=en(39828),ei=en(92369);async function followUser($){let{userId:et,accountToFollowUid:en}=$;try{let{firestore:$}=(0,ei.UM)(),eo=(0,er.qs)($),es=(0,er.JU)((0,er.hJ)($,"followers-following"),et);eo.set(es,{totalFollowingCount:(0,er.nP)(1),following:(0,er.vr)(en)},{merge:!0});let el=(0,er.JU)((0,er.hJ)($,"followers-following"),en);return eo.set(el,{totalFollowersCount:(0,er.nP)(1),followers:(0,er.vr)(et)},{merge:!0}),eo.update(el,{["followersTimestamp.".concat(et)]:(0,er.Bt)()}),await eo.commit(),{status:200}}catch($){throw Error("Completely failed: "+$.message)}}},53971:function($,et,en){"use strict";en.d(et,{F:function(){return unfollowUser}});var er=en(39828),ei=en(92369);async function unfollowUser($){let{userId:et,accountToFollowUid:en}=$;try{let{firestore:$}=(0,ei.UM)(),eo=(0,er.qs)($),es=(0,er.JU)((0,er.hJ)($,"followers-following"),et);eo.set(es,{totalFollowingCount:(0,er.nP)(-1),following:(0,er.Ab)(en)},{merge:!0});let el=(0,er.JU)((0,er.hJ)($,"followers-following"),en);return eo.set(el,{totalFollowersCount:(0,er.nP)(-1),followers:(0,er.Ab)(et)},{merge:!0}),await eo.commit(),{status:200}}catch($){throw Error("Completely failed: "+$.message)}}},83584:function($,et,en){"use strict";en.d(et,{l:function(){return createFollowNotification}});var er=en(39828),ei=en(92369);async function createFollowNotification(){let $=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"comment",et=arguments.length>1?arguments[1]:void 0,en=arguments.length>2?arguments[2]:void 0;if(!et||!en)throw Error("postOwnerUid, senderUid, postId, and postLink are required fields.");let{firestore:eo}=(0,ei.UM)();try{let ei=(0,er.JU)(eo,"communityNotifications",et),es=(0,er.hJ)(ei,"notifications"),el=(0,er.IO)(es,(0,er.ar)("type","==",$),(0,er.ar)("receiver","==",et),(0,er.ar)("senderUid","==",en)),eu=await (0,er.PL)(el);if(0===eu.size){let ei={type:$,senderUid:en,read:!1,receiver:et,createdAt:(0,er.Bt)()};return await (0,er.ET)(es,ei),{status:200}}}catch($){return console.log("Error creating notification: ",$),{status:500}}}},62347:function($,et,en){"use strict";en.d(et,{C:function(){return updateCommentReadForAPost},_:function(){return updateReads}});var er=en(39828),ei=en(92369);async function updateReads($,et){if(!$||!et)throw Error("uid and listOfPosts are required fields.");let{firestore:en}=(0,ei.UM)(),eo=(0,er.qs)(en);try{let ei=(0,er.JU)(en,"communityNotifications",$),es=(0,er.hJ)(ei,"notifications");et.forEach($=>{let et=(0,er.JU)(es,$);eo.update(et,{read:!0})}),await eo.commit()}catch($){console.error("Error updating read status: "+$.message)}}async function updateCommentReadForAPost($,et){let{firestore:en}=(0,ei.UM)();try{let ei=(0,er.JU)(en,"communityNotifications",$),eo=(0,er.hJ)(ei,"notifications"),es=await (0,er.PL)((0,er.IO)(eo,(0,er.ar)("postId","==",et),(0,er.ar)("type","==","comment")));if(es.empty)return;es.forEach($=>{console.log($.data()),(0,er.r7)($.ref,{read:!0})})}catch($){console.error("Error updating read status: "+$.message)}}},52165:function($,et,en){"use strict";function combineExerciseDetails($){let{arr1:et,arr2:en,exerciseXp:er,chapters:ei,completedExercises:eo,courseLinks:es=[],chapterIndex:el,internalChapterName:eu,internalCourseName:ed,courseUrl:eh}=$;if(!eo)return;if(null==et||et.length,null==en||en.length,null==eo?void 0:eo.length)throw Error("Exercise names and internal names does not match in length");let ep=[];for(let $ in et){var em,ef;let eg=en[$],ey=er[$],ev=(null===(em=eo[eg])||void 0===em?void 0:em.status)||((null===(ef=ep.at(-1))||void 0===ef?void 0:ef.status)!=="complete"&&ep.length?"locked":"start"),ex=function($,et,en){let er=0;for(let en of $){var ei;if((null==en?void 0:en.type)!=="checkpoint-project"){if(en.chapterIndex===et)break;er+=(null===(ei=en.challenges)||void 0===ei?void 0:ei.length)||0}}return er+(en+1)}(ei,el,Number($))||0,e_=es[ex];ep.push({displayName:et[$],internalName:eg,status:ev,internalChapterName:eu,internalCourseName:ed,link:"".concat(eh,"/").concat(e_),xp:ey,displayIndex:ex})}return ep}function chapterCompletionPercentage($){let{internalChapterData:et,chapterData:en}=$,er=null==et?void 0:et.internalChallengeNames,ei=null==en?void 0:en.challenges;if(er&&ei){let $=null==er?void 0:er.length,et=0;
1856for(let $ of er){let en=ei[$];(null==en?void 0:en.status)==="complete"&&(et+=1)}return{numOfExercises:$,completedCount:et,percentage:et/$*100}}return{numOfExercises:0,completedCount:0,percentage:0}}function determinePercentageType($){var et,en;let{type:er,courseProjectsData:ei,percentage:eo}=$;return ei?"checkpoint-project"===er?(null==ei?void 0:null===(et=ei.checkpointProgress)||void 0===et?void 0:et.reviewed)?100:0:"final-project"===er?(null==ei?void 0:null===(en=ei.finalProgress)||void 0===en?void 0:en.reviewed)?100:0:"certificate-tracker"===er?(null==ei?void 0:ei.certificateIssued)||(null==ei?void 0:ei.certData)?100:0:eo:0}en.d(et,{jj:function(){return combineExerciseDetails},rZ:function(){return chapterCompletionPercentage},s6:function(){return determinePercentageType}})},22058:function($,et,en){"use strict";en.d(et,{U:function(){return getCourseState}});let er={courseName:"c-sharp",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-playing-it-cool"},ei={"hello-world":{chapterName:"hello-world",challenges:{"playing-it-cool":{challengeName:"playing-it-cool",status:"start"},"baby-names":{challengeName:"baby-names",status:"locked"},"dream-journal":{challengeName:"dream-journal",status:"locked"},"hot-take":{challengeName:"hot-take",status:"locked"},"personal-billboard":{challengeName:"personal-billboard",status:"locked"}}},variables:{chapterName:"variables",challenges:{typecast:{challengeName:"typecast",status:"start"},"party-animal":{challengeName:"party-animal",status:"locked"},"celebrity-crush":{challengeName:"celebrity-crush",status:"locked"},"math-is-mathing":{challengeName:"math-is-mathing",status:"locked"},"year-of-the-x":{challengeName:"year-of-the-x",status:"locked"},"giant-plushie":{challengeName:"giant-plushie",status:"locked"}}},"control-flow":{chapterName:"control-flow",challenges:{"weekend-plans":{challengeName:"weekend-plans",status:"start"},"the-reaper":{challengeName:"the-reaper",status:"locked"},"plot-twist":{challengeName:"plot-twist",status:"locked"},"basement-show":{challengeName:"basement-show",status:"locked"},"invite-only":{challengeName:"invite-only",status:"locked"},"aura-checker":{challengeName:"aura-checker",status:"locked"},"love-hate-relationship":{challengeName:"love-hate-relationship",status:"locked"}}},loops:{chapterName:"loops",challenges:{"tickle-monster":{challengeName:"tickle-monster",status:"start"},"disappearing-act":{challengeName:"disappearing-act",status:"locked"},robocaller:{challengeName:"robocaller",status:"locked"},"in-the-spotlight":{challengeName:"in-the-spotlight",status:"locked"},"uno-reverse":{challengeName:"uno-reverse",status:"locked"},"mystery-machine":{challengeName:"mystery-machine",status:"locked"},"say-uncle":{challengeName:"say-uncle",status:"locked"},"best-kept-secret":{challengeName:"best-kept-secret",status:"locked"}}},arrays:{chapterName:"arrays",challenges:{"array-of-sunshine":{challengeName:"array-of-sunshine",status:"start"},"soundtrack-to-my-life":{challengeName:"soundtrack-to-my-life",status:"locked"},"hidden-gems":{challengeName:"hidden-gems",status:"locked"},"world-cup":{challengeName:"world-cup",status:"locked"},"notification-overload":{challengeName:"notification-overload",status:"locked"},"emotional-support-plushie":{challengeName:"emotional-support-plushie",status:"locked"},"doomsday-prepper":{challengeName:"doomsday-prepper",status:"locked"}}},methods:{chapterName:"methods",challenges:{"meet-the-methods":{challengeName:"meet-the-methods",status:"start"},"make-some-noise":{challengeName:"make-some-noise",status:"locked"},"the-cookout":{challengeName:"the-cookout",status:"locked"},"ticket-pool":{challengeName:"ticket-pool",status:"locked"},"return-to-sender":{challengeName:"return-to-sender",status:"locked"},"calling-all-hackers":{challengeName:"calling-all-hackers",status:"locked"}}}},eo={courseName:"command-line",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-in-the-beginning"},es={navigation:{chapterName:"navigation",challenges:{"in-the-beginning":{challengeName:"in-the-beginning",status:"start"},filesystem:{challengeName:"filesystem",status:"locked"},"moving-day":{challengeName:"moving-day",status:"locked"},"house-tour":{challengeName:"house-tour",status:"locked"},"clean-slate":{challengeName:"clean-slate",status:"locked"},"scavenger-hunt":{challengeName:"scavenger-hunt",status:"locked"}}},manipulation:{chapterName:"manipulation",challenges:{recipes:{challengeName:"recipes",status:"start"},"cuisine-type":{challengeName:"cuisine-type",status:"locked"},"grilled-cheese":{challengeName:"grilled-cheese",status:"locked"},"move-around":{challengeName:"move-around",status:"locked"},"copy-that":{challengeName:"copy-that",status:"locked"},"music-playlists":{challengeName:"music-playlists",status:"locked"}}}},el={courseName:"cpp",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-the-program"},eu={"hello-world":{chapterName:"hello-world",challenges:{"the-program":{challengeName:"the-program",status:"start"},howdy:{challengeName:"howdy",status:"locked"},"see-ya-later-alligator":{challengeName:"see-ya-later-alligator",status:"locked"},"ouija-board":{challengeName:"ouija-board",status:"locked"},"sign-bunny":{challengeName:"sign-bunny",status:"locked"}}},variables:{chapterName:"variables",challenges:{"data-types":{challengeName:"data-types",status:"start"},"declaration-of-independence":{challengeName:"declaration-of-independence",status:"locked"},ipo:{challengeName:"ipo",status:"locked"},temperature:{challengeName:"temperature",status:"locked"},knighthood:{challengeName:"knighthood",status:"locked"},mom:{challengeName:"mom",status:"locked"},"cat-years":{challengeName:"cat-years",status:"locked"}}},conditionals:{chapterName:"conditionals",challenges:{"coin-flip":{challengeName:"coin-flip",status:"start"},fever:{challengeName:"fever",status:"locked"},"levels-and-ranks":{challengeName:"levels-and-ranks",status:"locked"},"fortune-cookie":{challengeName:"fortune-cookie",status:"locked"},voting:{challengeName:"voting",status:"locked"},"trivia-quiz":{challengeName:"trivia-quiz",status:"locked"}}},loops:{chapterName:"loops",challenges:{"enter-pin":{challengeName:"enter-pin",status:"start"},"guess-the-number":{challengeName:"guess-the-number",status:"locked"},"counting-sheep":{challengeName:"counting-sheep",status:"locked"},"99-bottles":{challengeName:"99-bottles",status:"locked"},"fizz-buzz":{challengeName:"fizz-buzz",status:"locked"}}},vectors:{chapterName:"vectors",challenges:{"survival-gear":{challengeName:"survival-gear",status:"start"},"lemonade-stand":{challengeName:"lemonade-stand",status:"locked"},"order-cart":{challengeName:"order-cart",status:"locked"},"roadtrip-playlist":{challengeName:"roadtrip-playlist",status:"locked"},"sum-of-even-product-of-odd":{challengeName:"sum-of-even-product-of-odd",status:"locked"}}},functions:{chapterName:"functions",challenges:{dry:{challengeName:"dry",status:"start"},"food-menu":{challengeName:"food-menu",status:"locked"},ooo:{challengeName:"ooo",status:"locked"},conversion:{challengeName:"conversion",status:"locked"},"tips-calculator":{challengeName:"tips-calculator",status:"locked"}}},"classes-and-objects":{chapterName:"classes-and-objects",challenges:{restaurants:{challengeName:"restaurants",status:"start"},"peter-luger-steak-house":{challengeName:"peter-luger-steak-house",status:"locked"},"old-money-new-money":{challengeName:"old-money-new-money",status:"locked"},"bank-accounts":{challengeName:"bank-accounts",status:"locked"},"classic-cars":{challengeName:"classic-cars",status:"locked"},"pet-rescue":{challengeName:"pet-rescue",status:"locked"}}},"pointers-and-references":{chapterName:"pointers-and-references",challenges:{memories:{challengeName:"memories",status:"start"},"a-few-pointers":{challengeName:"a-few-pointers",status:"locked"},dereference:{challengeName:"dereference",status:"locked"},nullptr:{challengeName:"nullptr",status:"locked"},"celebrity-names":{challengeName:"celebrity-names",status:"locked"},"healing-potion":{challengeName:"healing-potion",status:"locked"},"the-end":{challengeName:"the-end",status:"locked"}}}},ed={courseName:"css",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-picasso"},eh={selectors:{chapterName:"selectors",challenges:{picasso:{challengeName:"picasso",status:"start"},syntax:{challengeName:"syntax",status:"locked"},"selectors-1":{challengeName:"selectors-1",status:"locked"},"selectors-2":{challengeName:"selectors-2",status:"locked"},"concert-flyer":{challengeName:"concert-flyer",status:"locked"}}},properties:{chapterName:"properties",challenges:{rainbow:{challengeName:"rainbow",status:"start"},measurements:{challengeName:"measurements",status:"locked"},"five-families":{challengeName:"five-families",status:"locked"},spellcheck:{challengeName:"spellcheck",status:"locked"},wallpaper:{challengeName:"wallpaper",status:"locked"},shorthands:{challengeName:"shorthands",status:"locked"},invitation:{challengeName:"invitation",status:"locked"}}},"box-model":{chapterName:"box-model",challenges:{inspection:{challengeName:"inspection",status:"start"},"profile-status":{challengeName:"profile-status",status:"locked"},"wiggle-room":{challengeName:"wiggle-room",status:"locked"},"spaced-out":{challengeName:"spaced-out",status:"locked"},"make-it-count":{challengeName:"make-it-count",status:"locked"},"local-library":{challengeName:"local-library",status:"locked"}}},layout:{chapterName:"layout",challenges:{"lines-and-blocks":{challengeName:"lines-and-blocks",status:"start"},"go-with-the-flow":{challengeName:"go-with-the-flow",status:"locked"},"its-all-relative":{challengeName:"its-all-relative",status:"locked"},"absolute-removal":{challengeName:"absolute-removal",status:"locked"},"fixed-banner":{challengeName:"fixed-banner",status:"locked"},"sticky-elements":{challengeName:"sticky-elements",status:"locked"},"art-gallery":{challengeName:"art-gallery",status:"locked"}}},flexbox:{chapterName:"flexbox",challenges:{"in-the-flex":{challengeName:"in-the-flex",
1856status:"start"},directions:{challengeName:"directions",status:"locked"},spacing:{challengeName:"spacing",status:"locked"},"cross-axis":{challengeName:"cross-axis",status:"locked"},"flexible-sizing":{challengeName:"flexible-sizing",status:"locked"},"pokemon-cards":{challengeName:"pokemon-cards",status:"locked"}}}},ep={courseName:"data-structures-and-algorithms",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-welcome"},em={introduction:{chapterName:"introduction",challenges:{welcome:{challengeName:"welcome",status:"start"},"data-structures":{challengeName:"data-structures",status:"locked"},algorithms:{challengeName:"algorithms",status:"locked"},efficiency:{challengeName:"efficiency",status:"locked"},"amazon-delivery":{challengeName:"amazon-delivery",status:"locked"}}},"list-algorithms":{chapterName:"list-algorithms",challenges:{"favorite-shows":{challengeName:"favorite-shows",status:"start"},"linear-search":{challengeName:"linear-search",status:"locked"},"binary-search":{challengeName:"binary-search",status:"locked"},"selection-sort-i":{challengeName:"selection-sort-i",status:"locked"},"selection-sort-ii":{challengeName:"selection-sort-ii",status:"locked"},efficiency:{challengeName:"efficiency",status:"locked"},review:{challengeName:"review",status:"locked"}}}},ef={courseName:"framework-valley-react",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-first-reaction"},eg={"first-react-app":{chapterName:"first-react-app",challenges:{"first-reaction":{challengeName:"first-reaction",status:"start"},"our-workstation":{challengeName:"our-workstation",status:"locked"},"writing-react":{challengeName:"writing-react",status:"locked"},"building-blocks":{challengeName:"building-blocks",status:"locked"},"social-post":{challengeName:"social-post",status:"locked"}}},"jsx-&-components":{chapterName:"jsx-&-components",challenges:{"band-tour":{challengeName:"band-tour",status:"start"},"embedded-js":{challengeName:"embedded-js",status:"locked"},"travel-gallery":{challengeName:"travel-gallery",status:"locked"},"hot-takes-pt-1":{challengeName:"hot-takes-pt-1",status:"locked"},"hot-takes-pt-2":{challengeName:"hot-takes-pt-2",status:"locked"}}},"props-&-state":{chapterName:"props-&-state",challenges:{"giving-props":{challengeName:"giving-props",status:"start"},notifications:{challengeName:"notifications",status:"locked"},stopwatch:{challengeName:"stopwatch",status:"locked"},quiz:{challengeName:"quiz",status:"locked"},"trending-now":{challengeName:"trending-now",status:"locked"}}},events:{chapterName:"events",challenges:{"online-shopping":{challengeName:"online-shopping",status:"start"},tooltips:{challengeName:"tooltips",status:"locked"},"a-focus-in-art":{challengeName:"a-focus-in-art",status:"locked"},"noise-levels":{challengeName:"noise-levels",status:"locked"},waterfest:{challengeName:"waterfest",status:"locked"}}},forms:{chapterName:"forms",challenges:{newsletter:{challengeName:"newsletter",status:"start"},"high-score-i":{challengeName:"high-score-i",status:"locked"},"high-score-ii":{challengeName:"high-score-ii",status:"locked"},"animal-rescue":{challengeName:"animal-rescue",status:"locked"},haiku:{challengeName:"haiku",status:"locked"},"travel-log":{challengeName:"travel-log",status:"locked"}}},hooks:{chapterName:"hooks",challenges:{"cookie-clicker":{challengeName:"cookie-clicker",status:"start"},"color-effects-i":{challengeName:"color-effects-i",status:"locked"},"color-effects-ii":{challengeName:"color-effects-ii",status:"locked"},barbenheimer:{challengeName:"barbenheimer",status:"locked"},"kanban-board":{challengeName:"kanban-board",status:"locked"}}},"data-fetching":{chapterName:"data-fetching",challenges:{"our-universe":{challengeName:"our-universe",status:"start"},"now-loading":{challengeName:"now-loading",status:"locked"},"i-am-error":{challengeName:"i-am-error",status:"locked"},"data-evolution":{challengeName:"data-evolution",status:"locked"},"book-finder":{challengeName:"book-finder",status:"locked"}}},routing:{chapterName:"routing",challenges:{"know-your-routes":{challengeName:"know-your-routes",status:"start"},bowser:{challengeName:"bowser",status:"locked"},"paper-route":{challengeName:"paper-route",status:"locked"},"link-to-the-path":{challengeName:"link-to-the-path",status:"locked"},ponoplayer:{challengeName:"ponoplayer",status:"locked"}}}},ey={courseName:"gen-ai",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-magic-trick"},ev={"how-ai-thinks":{chapterName:"how-ai-thinks",challenges:{"magic-trick":{challengeName:"magic-trick",status:"start"}
1856,tokens:{challengeName:"tokens",status:"locked"},patterns:{challengeName:"patterns",status:"locked"},counting:{challengeName:"counting",status:"locked"},predictor:{challengeName:"predictor",status:"locked"},"the-big-picture":{challengeName:"the-big-picture",status:"locked"}}},"prompt-engineering":{chapterName:"prompt-engineering",challenges:{"the-prompt-is-everything":{challengeName:"the-prompt-is-everything",status:"start"},"be-specific":{challengeName:"be-specific",status:"locked"},"set-the-role":{challengeName:"set-the-role",status:"locked"},"show-dont-tell":{challengeName:"show-dont-tell",status:"locked"},"think-step-by-step":{challengeName:"think-step-by-step",status:"locked"},"prompt-recap":{challengeName:"prompt-recap",status:"locked"}}},embeddings:{chapterName:"embeddings",challenges:{"from-patterns-to-meaning":{challengeName:"from-patterns-to-meaning",status:"start"},"words-as-numbers":{challengeName:"words-as-numbers",status:"locked"},"bag-of-words":{challengeName:"bag-of-words",status:"locked"},"measuring-similarity":{challengeName:"measuring-similarity",status:"locked"},"semantic-search":{challengeName:"semantic-search",status:"locked"},"embeddings-recap":{challengeName:"embeddings-recap",status:"locked"}}},"limitations-safety":{chapterName:"limitations-safety",challenges:{"the-confident-wrong-answer":{challengeName:"the-confident-wrong-answer",status:"start"},"the-cutoff-problem":{challengeName:"the-cutoff-problem",status:"locked"},"prompt-injection":{challengeName:"prompt-injection",status:"locked"},"bias-in-the-mirror":{challengeName:"bias-in-the-mirror",status:"locked"},"trust-but-verify":{challengeName:"trust-but-verify",status:"locked"},"ai-as-a-tool":{challengeName:"ai-as-a-tool",status:"locked"}}}},ex={courseName:"git-github",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-introduction"},e_={"your-first-repo":{chapterName:"your-first-repo",challenges:{introduction:{challengeName:"introduction",status:"start"},repositories:{challengeName:"repositories",status:"locked"},"git-commands":{challengeName:"git-commands",status:"locked"},"git-workflow":{challengeName:"git-workflow",status:"locked"},"local-push":{challengeName:"local-push",status:"locked"},"read-me":{challengeName:"read-me",status:"locked"}}},"exploring-repos":{chapterName:"exploring-repos",challenges:{"git-clone":{challengeName:"git-clone",status:"start"},"branch-out":{challengeName:"branch-out",status:"locked"},"git-and-teams":{challengeName:"git-and-teams",status:"locked"},merges:{challengeName:"merges",status:"locked"},"pull-requests":{challengeName:"pull-requests",status:"locked"},yearbook:{challengeName:"yearbook",status:"locked"}}}},ew={courseName:"github-copilot",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-vibe-check"},ek={"setting-up":{chapterName:"setting-up",challenges:{"vibe-check":{challengeName:"vibe-check",status:"start"},"setting-up":{challengeName:"setting-up",status:"locked"},"test-drive":{challengeName:"test-drive",status:"locked"},review:{challengeName:"review",status:"locked"}}},"vibe-coding-a-gui-app":{chapterName:"vibe-coding-a-gui-app",challenges:{"rock-paper-scissors":{challengeName:"rock-paper-scissors",status:"start"},"inline-chat":{challengeName:"inline-chat",status:"locked"},"copilot-chat":{challengeName:"copilot-chat",status:"locked"},"slash-commands":{challengeName:"slash-commands",status:"locked"},"copilot-edits":{challengeName:"copilot-edits",status:"locked"},"code-review":{challengeName:"code-review",status:"locked"},calculator:{challengeName:"calculator",status:"locked"}}}},eC={courseName:"html",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-shooting-star"},eE={elements:{chapterName:"elements",challenges:{"shooting-star":{challengeName:"shooting-star",status:"start"},elemental:{challengeName:"elemental",status:"locked"},newspaper:{challengeName:"newspaper",status:"locked"},"corporate-talk":{challengeName:"corporate-talk",status:"locked"},"sous-chef":{challengeName:"sous-chef",status:"locked"},"lost-pet":{challengeName:"lost-pet",status:"locked"},"favorite-band":{challengeName:"favorite-band",status:"locked"}}},structure:{chapterName:"structure",challenges:{blueprint:{challengeName:"blueprint",status:"start"},"family-tree":{challengeName:"family-tree",status:"locked"},"craigslist-ad":{challengeName:"craigslist-ad",status:"locked"},"wiki-article":{challengeName:"wiki-article",status:"locked"},"lorem-ipsum":{challengeName:"lorem-ipsum",status:"locked"},"power-rangers":{challengeName:"power-rangers",status:"locked"},"myspace-top-8":{challengeName:"myspace-top-8",status:"locked"}}},forms:{chapterName:"forms",challenges:{google:{challengeName:"google",status:"start"},"sign-up-v1":{challengeName:"sign-up-v1",status:"locked"},"sign-up-v2":{challengeName:"sign-up-v2",status:"locked"},rsvp:{challengeName:"rsvp",status:"locked"},"contact-us":{challengeName:"contact-us",status:"locked"},welp:{challengeName:"welp",status:"locked"}}},"semantic-html":{chapterName:"semantic-html",challenges:{"personal-blog":{challengeName:"personal-blog",status:"start"},"the-header":{challengeName:"the-header",status:"locked"},"main-footer":{challengeName:"main-footer",status:"locked"},"blog-posts":{challengeName:"blog-posts",status:"locked"},figures:{challengeName:"figures",status:"locked"},"final-touches":{challengeName:"final-touches",status:"locked"}}}},eI={courseName:"intermediate-javascript",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-introduction"},eS={ecmascript:{chapterName:"ecmascript",challenges:{introduction:{challengeName:"introduction",status:"start"},"arrow-logic":{challengeName:"arrow-logic",status:"locked"},"99-bottles":{challengeName:"99-bottles",status:"locked"},"most-streamed-songs":{challengeName:"most-streamed-songs",status:"locked"},"pack-your-bags":{challengeName:"pack-your-bags",status:"locked"},"reading-lists":{challengeName:"reading-lists",status:"locked"}}},"async-js":{chapterName:"async-js",challenges:{"on-the-side":{challengeName:"on-the-side",status:"start"},"subscribe-button":{challengeName:"subscribe-button",status:"locked"},"random-numbers":{challengeName:"random-numbers",status:"locked"},jokebook:{challengeName:"jokebook",status:"locked"},"trivia-night":{challengeName:"trivia-night",status:"locked"},"cosmic-birthday":{challengeName:"cosmic-birthday",status:"locked"}}}},eT={courseName:"intermediate-python",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-hi-bestie"},eA={"data-structures":{chapterName:"data-structures",challenges:{"hi-bestie":{challengeName:"hi-bestie",status:"start"},"find-my-friends":{challengeName:"find-my-friends",status:"locked"},"met-museum":{challengeName:"met-museum",status:"locked"},"fruit-cart":{challengeName:"fruit-cart",status:"locked"},"post-game-stats":{challengeName:"post-game-stats",status:"locked"}}},"file-and-error-handling":{chapterName:"file-and-error-handling",challenges:{"dear-diary":{challengeName:"dear-diary",status:"start"},"the-file-realm":{challengeName:"the-file-realm",status:"locked"},"uncharted-files":{challengeName:"uncharted-files",status:"locked"},bestsellers:{challengeName:"bestsellers",status:"locked"},"packing-list":{challengeName:"packing-list",status:"locked"}}},"functional-programming":{chapterName:"functional-programming",challenges:{"full-circle":{challengeName:"full-circle",status:"start"},hola:{challengeName:"hola",status:"locked"},grammys:{challengeName:"grammys",status:"locked"},"mental-math":{challengeName:"mental-math",status:"locked"},"so-random":{challengeName:"so-random",status:"locked"}}},testing:{chapterName:"testing",challenges:{"test-run":{challengeName:"test-run",status:"start"},assertions:{challengeName:"assertions",status:"locked"},unexpected:{challengeName:"unexpected",status:"locked"}
1856,"wealth-manager":{challengeName:"wealth-manager",status:"locked"},caffeinated:{challengeName:"caffeinated",status:"locked"}}}},eP={courseName:"java",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-first-program"},eN={"hello-world":{chapterName:"hello-world",challenges:{"first-program":{challengeName:"first-program",status:"start"},"hello-world":{challengeName:"hello-world",status:"locked"},"cooking-mama":{challengeName:"cooking-mama",status:"locked"},"error-logs":{challengeName:"error-logs",status:"locked"},"music-wrapped":{challengeName:"music-wrapped",status:"locked"}}},variables:{chapterName:"variables",challenges:{"storage-box":{challengeName:"storage-box",status:"start"},"id-card":{challengeName:"id-card",status:"locked"},"operation-0":{challengeName:"operation-0",status:"locked"},"escape-room":{challengeName:"escape-room",status:"locked"},"club-penguin":{challengeName:"club-penguin",status:"locked"}}},"control-flow":{chapterName:"control-flow",challenges:{oatmeal:{challengeName:"oatmeal",status:"start"},"cat-owner":{challengeName:"cat-owner",status:"locked"},"dog-owner":{challengeName:"dog-owner",status:"locked"},rollercoaster:{challengeName:"rollercoaster",status:"locked"},"coffee-order":{challengeName:"coffee-order",status:"locked"}}},loops:{chapterName:"loops",challenges:{"rainbow-nums":{challengeName:"rainbow-nums",status:"start"},"all-the-while":{challengeName:"all-the-while",status:"locked"},affirmations:{challengeName:"affirmations",status:"locked"},"hit-the-breaks":{challengeName:"hit-the-breaks",status:"locked"},"playing-cards":{challengeName:"playing-cards",status:"locked"}}},arrays:{chapterName:"arrays",challenges:{"survival-pack":{challengeName:"survival-pack",status:"start"},"position-0":{challengeName:"position-0",status:"locked"},gibberish:{challengeName:"gibberish",status:"locked"},"chill-lounge-friday-afternoon":{challengeName:"chill-lounge-friday-afternoon",status:"locked"},clue:{challengeName:"clue",status:"locked"}}},methods:{chapterName:"methods",challenges:{222:{challengeName:"222",status:"locked"},"double-square":{challengeName:"double-square",status:"start"},"tv-channels":{challengeName:"tv-channels",status:"locked"},"return-bins":{challengeName:"return-bins",status:"locked"},voicemail:{challengeName:"voicemail",status:"locked"},"earths-moon":{challengeName:"earths-moon",status:"locked"}}},"classes-and-objects":{chapterName:"classes-and-objects",challenges:{neopet:{challengeName:"neopet",status:"start"},gravatia:{challengeName:"gravatia",status:"locked"},"under-construction":{challengeName:"under-construction",status:"locked"},imacs:{challengeName:"imacs",status:"locked"},"good-coffee-great-coffee":{challengeName:"good-coffee-great-coffee",status:"locked"}}},"utility-classes":{chapterName:"utility-classes",challenges:{"word-counter":{challengeName:"word-counter",status:"start"},"is-this-your-card":{challengeName:"is-this-your-card",status:"locked"},rocket:{challengeName:"rocket",status:"locked"},bells:{challengeName:"bells",status:"locked"},"coin-exhange":{challengeName:"coin-exhange",status:"locked"}}}},ej={courseName:"javascript",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-setting-up"},eR={"the-console":{chapterName:"the-console",challenges:{"setting-up":{challengeName:"setting-up",status:"start"},"the-console":{challengeName:"the-console",status:"locked"},"letter-tree":{challengeName:"letter-tree",status:"locked"},"secret-recipe":{challengeName:"secret-recipe",status:"locked"},receipt:{challengeName:"receipt",status:"locked"}}},variables:{chapterName:"variables",challenges:{"let-const":{challengeName:"let-const",status:"start"},"data-types":{challengeName:"data-types",status:"locked"},temperature:{challengeName:"temperature",status:"locked"},bmi:{challengeName:"bmi",status:"locked"},"planet-weight":{challengeName:"planet-weight",status:"locked"}}},conditionals:{chapterName:"conditionals",challenges:{"coin-flip":{challengeName:"coin-flip",status:"start"},"good-morning":{challengeName:"good-morning",status:"locked"}
1856,"good-afternoon":{challengeName:"good-afternoon",status:"locked"},"ph-levels":{challengeName:"ph-levels",status:"locked"},"magic-8-ball":{challengeName:"magic-8-ball",status:"locked"},"air-quality-index":{challengeName:"air-quality-index",status:"locked"},"rock-paper-scissors":{challengeName:"rock-paper-scissors",status:"locked"}}},loops:{chapterName:"loops",challenges:{"duck-duck-goose":{challengeName:"duck-duck-goose",status:"start"},"lucky-number":{challengeName:"lucky-number",status:"locked"},"not-tell-lies":{challengeName:"not-tell-lies",status:"locked"},"even-the-odds":{challengeName:"even-the-odds",status:"locked"},"based-numbers":{challengeName:"based-numbers",status:"locked"}}},arrays:{chapterName:"arrays",challenges:{"five-boroughs":{challengeName:"five-boroughs",status:"start"},"grocery-trip":{challengeName:"grocery-trip",status:"locked"},"times-tables":{challengeName:"times-tables",status:"locked"},"music-playlist":{challengeName:"music-playlist",status:"locked"},"wheres-waldo":{challengeName:"wheres-waldo",status:"locked"},dna:{challengeName:"dna",status:"locked"}}},functions:{chapterName:"functions",challenges:{greetings:{challengeName:"greetings",status:"start"},"blast-off":{challengeName:"blast-off",status:"locked"},"e-mc-2":{challengeName:"e-mc-2",status:"locked"},clout:{challengeName:"clout",status:"locked"},palindrome:{challengeName:"palindrome",status:"locked"}}},objects:{chapterName:"objects",challenges:{"pizza-party":{challengeName:"pizza-party",status:"start"},"dream-car":{challengeName:"dream-car",status:"locked"},pokemon:{challengeName:"pokemon",status:"locked"},"animal-farm":{challengeName:"animal-farm",status:"locked"},"round-trip":{challengeName:"round-trip",status:"locked"}}},trifecta:{chapterName:"trifecta",challenges:{"green-light-go":{challengeName:"green-light-go",status:"start"},"the-dom":{challengeName:"the-dom",status:"locked"},"hotline-bling":{challengeName:"hotline-bling",status:"locked"},"mood-ring":{challengeName:"mood-ring",status:"locked"},"chill-pill":{challengeName:"chill-pill",status:"locked"},"cap-that":{challengeName:"cap-that",status:"locked"}}}},eV={courseName:"lua",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-opening-scene"},eD={"ola-lua":{chapterName:"ola-lua",challenges:{"opening-scene":{challengeName:"opening-scene",status:"start"},"player-card":{challengeName:"player-card",status:"locked"},"score-calculation":{challengeName:"score-calculation",status:"locked"},"title-sequence":{challengeName:"title-sequence",status:"locked"},"fatal-error":{challengeName:"fatal-error",status:"locked"}}},"control-flow-and-loops":{chapterName:"control-flow-and-loops",challenges:{"what-if":{challengeName:"what-if",status:"start"},"boss-battle":{challengeName:"boss-battle",status:"locked"},"ready-mode":{challengeName:"ready-mode",status:"locked"},"enemy-spawn":{challengeName:"enemy-spawn",status:"locked"},"final-battle":{challengeName:"final-battle",status:"locked"}}},"tables-and-functions":{chapterName:"tables-and-functions",challenges:{"heroes-and-villains":{challengeName:"heroes-and-villains",status:"start"},"on-a-quest":{challengeName:"on-a-quest",status:"locked"},inventory:{challengeName:"inventory",status:"locked"},"at-the-function":{challengeName:"at-the-function",status:"locked"},"global-stars":{challengeName:"global-stars",status:"locked"},"merchant-merlin":{challengeName:"merchant-merlin",status:"locked"}}},objects:{chapterName:"objects",challenges:{"hey-link":{challengeName:"hey-link",status:"start"},"power-ups":{challengeName:"power-ups",status:"locked"},"healing-action":{challengeName:"healing-action",status:"locked"},spells:{challengeName:"spells",status:"locked"},"on-an-adventure":{challengeName:"on-an-adventure",status:"locked"}}}},eO={courseName:"machine-learning",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-welcome-to-machine-learning"},eM={"intro-to-machine-learning":{chapterName:"intro-to-machine-learning",challenges:{"welcome-to-machine-learning":{challengeName:"welcome-to-machine-learning",status:"start"},"supervised-regression":{challengeName:"supervised-regression",status:"locked"},"supervised-classification":{challengeName:"supervised-classification",status:"locked"},"unsupervised-clustering":{challengeName:"unsupervised-clustering",status:"locked"},"blind-spots":{challengeName:"blind-spots",status:"locked"},recap:{challengeName:"recap",status:"locked"}}}},eF={courseName:"matplotlib",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-data-visualization"},eL={"line-plots":{chapterName:"line-plots",challenges:{"data-visualization":{challengeName:"data-visualization",status:"start"},"your-first-plot":{challengeName:"your-first-plot",status:"locked"},"the-canvas":{challengeName:"the-canvas",status:"locked"},"daily-steps":{challengeName:"daily-steps",status:"locked"},"gas-and-electric-bills":{challengeName:"gas-and-electric-bills",status:"locked"},"sports-rivalries":{challengeName:"sports-rivalries",status:"locked"},"adopt-a-kitten":{challengeName:"adopt-a-kitten",status:"locked"},"gearsparks-emporium":{challengeName:"gearsparks-emporium",status:"locked"}}},"and-beyond":{chapterName:"and-beyond",challenges:{"health-vs-wealth":{challengeName:"health-vs-wealth",status:"start"},aquariums:{challengeName:"aquariums",status:"locked"},"favorite-pizza-toppings":{challengeName:"favorite-pizza-toppings",status:"locked"},"box-office-sales":{challengeName:"box-office-sales",status:"locked"},subplots:{challengeName:"subplots",status:"locked"},"multiline-expenses":{challengeName:"multiline-expenses",status:"locked"},"save-the-bees":{challengeName:"save-the-bees",status:"locked"}}}},eH={courseName:"nodejs",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-what-is-nodejs"},eB={"hello-world":{chapterName:"hello-world",challenges:{"what-is-nodejs":{challengeName:"what-is-nodejs",status:"start"},"getting-started":{challengeName:"getting-started",status:"locked"},"average-joe":{challengeName:"average-joe",status:"locked"},"favorite-lyrics":{challengeName:"favorite-lyrics",status:"locked"},"golden-record":{challengeName:"golden-record",status:"locked"}}},modules:{chapterName:"modules",challenges:{"built-in-modules":{challengeName:"built-in-modules",status:"start"},"dear-diary":{challengeName:"dear-diary",status:"locked"},unwritten:{challengeName:"unwritten",status:"locked"},"blank-page":{challengeName:"blank-page",status:"locked"},"chaotic-desktop":{challengeName:"chaotic-desktop",status:"locked"},sleepyos:{challengeName:"sleepyos",status:"locked"},affirmations:{challengeName:"affirmations",status:"locked"}}},servers:{chapterName:"servers",challenges:{"tiny-server":{challengeName:"tiny-server",status:"start"},"deep-dive":{challengeName:"deep-dive",status:"locked"},"emoji-story":{challengeName:"emoji-story",status:"locked"},"cyber-ramen-shop":{challengeName:"cyber-ramen-shop",status:"locked"},"dream-house":{challengeName:"dream-house",status:"locked"},"pokemon-center":{challengeName:"pokemon-center",status:"locked"}}}
1856,"http-methods":{chapterName:"http-methods",challenges:{"oh-crud":{challengeName:"oh-crud",status:"start"},"get-counter":{challengeName:"get-counter",status:"locked"},"post-tweet":{challengeName:"post-tweet",status:"locked"},"put-and-patch-your-bio":{challengeName:"put-and-patch-your-bio",status:"locked"},"delete-status":{challengeName:"delete-status",status:"locked"},"mood-tracker":{challengeName:"mood-tracker",status:"locked"}}}},eU={courseName:"numpy",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-the-notebook"},ez={"dear-data":{chapterName:"dear-data",challenges:{"the-notebook":{challengeName:"the-notebook",status:"start"},import:{challengeName:"import",status:"locked"},notifications:{challengeName:"notifications",status:"locked"},population:{challengeName:"population",status:"locked"},"bad-eggs":{challengeName:"bad-eggs",status:"locked"},"dear-data":{challengeName:"dear-data",status:"locked"}}},"basic-operations":{chapterName:"basic-operations",challenges:{"tallest-building":{challengeName:"tallest-building",status:"start"},"walking-steps":{challengeName:"walking-steps",status:"locked"},"shape-of-you":{challengeName:"shape-of-you",status:"locked"},"halleys-comet":{challengeName:"halleys-comet",status:"locked"},titanic:{challengeName:"titanic",status:"locked"}}}},eq={courseName:"p5js",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-your-first-canvas"},eZ={"canvas-elements":{chapterName:"canvas-elements",challenges:{"your-first-canvas":{challengeName:"your-first-canvas",status:"start"},"brat-summer":{challengeName:"brat-summer",status:"locked"},"the-shape-tool":{challengeName:"the-shape-tool",status:"locked"},"motion-picture":{challengeName:"motion-picture",status:"locked"},wasd:{challengeName:"wasd",status:"locked"},breakout:{challengeName:"breakout",status:"locked"}}}},eW={courseName:"pandas",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-why-pandas"},eG={dataframe:{chapterName:"dataframe",challenges:{"why-pandas":{challengeName:"why-pandas",status:"start"},"contact-list":{challengeName:"contact-list",status:"locked"},"mobile-apps":{challengeName:"mobile-apps",status:"locked"},"dungeons-&-dragons-i":{challengeName:"dungeons-&-dragons-i",status:"locked"},"dungeons-&-dragons-ii":{challengeName:"dungeons-&-dragons-ii",status:"locked"},sorting:{challengeName:"sorting",status:"locked"},review:{challengeName:"review",status:"locked"}}},"data-cleaning":{chapterName:"data-cleaning",challenges:{"messy-data":{challengeName:"messy-data",status:"start"},"missing-mail":{challengeName:"missing-mail",status:"locked"},"double-booking":{challengeName:"double-booking",status:"locked"},"somethings-fishy":{challengeName:"somethings-fishy",status:"locked"},"partiful-responses":{challengeName:"partiful-responses",status:"locked"},"the-final-scrub":{challengeName:"the-final-scrub",status:"locked"}}}},e$={courseName:"phaser",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-press-start"},eJ={"your-first-quest":{chapterName:"your-first-quest",challenges:{"press-start":{challengeName:"press-start",status:"start"},"new-game":{challengeName:"new-game",status:"locked"},"ready-set-config":{challengeName:"ready-set-config",status:"locked"},"the-render-trio":{challengeName:"the-render-trio",status:"locked"},wasd:{challengeName:"wasd",status:"locked"},"power-up":{challengeName:"power-up",status:"locked"},"happy-place":{challengeName:"happy-place",status:"locked"}}},"sprites-sprites-sprites":{chapterName:"sprites-sprites-sprites",challenges:{"onward-hero":{challengeName:"onward-hero",status:"start"},"at-the-ready":{challengeName:"at-the-ready",status:"locked"},"spellbound-steps":{challengeName:"spellbound-steps",status:"locked"},"object-of-the-game":{challengeName:"object-of-the-game",status:"locked"},"the-turning-point":{challengeName:"the-turning-point",status:"locked"},"world-weaver":{challengeName:"world-weaver",status:"locked"}}},"triple-jump":{chapterName:"triple-jump",challenges:{"at-the-arcade":{challengeName:"at-the-arcade",status:"start"},"just-passing-through":{challengeName:"just-passing-through",status:"locked"},"solid-ground":{challengeName:"solid-ground",status:"locked"},"punch-a-higher-floor":{challengeName:"punch-a-higher-floor",status:"locked"},"moving-the-goalposts":{challengeName:"moving-the-goalposts",status:"locked"},"collect-m-all":{challengeName:"collect-m-all",status:"locked"},"obstacle-course":{challengeName:"obstacle-course",status:"locked"}}},"new-worldbuilder":{chapterName:"new-worldbuilder",challenges:{"final-round":{challengeName:"final-round",status:"start"},"high-score":{challengeName:"high-score",status:"locked"},enemies:{challengeName:"enemies",status:"locked"},"game-over":{challengeName:"game-over",status:"locked"},"fresh-start":{challengeName:"fresh-start",status:"locked"},"siren-song":{challengeName:"siren-song",status:"locked"},"final-boss":{challengeName:"final-boss",status:"locked"}}}},eK={courseName:"python",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-setting-up"},eQ={"hello-world":{chapterName:"hello-world",challenges:{"setting-up":{challengeName:"setting-up",status:"start"},"hello-world":{challengeName:"hello-world",status:"locked"},pattern:{challengeName:"pattern",status:"locked"},initials:{challengeName:"initials",status:"locked"},"snail-mail":{challengeName:"snail-mail",status:"locked"}}},variables:{chapterName:"variables",challenges:{"data-types":{challengeName:"data-types",status:"start"},temperature:{challengeName:"temperature",status:"locked"},bmi:{challengeName:"bmi",status:"locked"},pythagorean:{challengeName:"pythagorean",status:"locked"},currency:{challengeName:"currency",status:"locked"}}},"control-flow":{chapterName:"control-flow",challenges:{"coin-flip":{challengeName:"coin-flip",status:"start"},grades:{challengeName:"grades",status:"locked"},"ph-levels":{challengeName:"ph-levels",status:"locked"},"magic-8-ball":{challengeName:"magic-8-ball",status:"locked"},"the-cyclone":{challengeName:"the-cyclone",status:"locked"},"sorting-hat":{challengeName:"sorting-hat",status:"locked"}}},loops:{chapterName:"loops",challenges:{"enter-pin":{challengeName:"enter-pin",status:"start"},"guess-number":{challengeName:"guess-number",status:"locked"},detention:{challengeName:"detention",status:"locked"},"99-bottles":{challengeName:"99-bottles",status:"locked"},"fizz-buzz":{challengeName:"fizz-buzz",status:"locked"}}},lists:{chapterName:"lists",challenges:{grocery:{challengeName:"grocery",status:"start"},"to-do":{challengeName:"to-do",status:"locked"},inventory:{challengeName:"inventory",status:"locked"},"reading-list":{challengeName:"reading-list",status:"locked"},mixtape:{challengeName:"mixtape",status:"locked"},"bucket-list":{challengeName:"bucket-list",status:"locked"}}},functions:{chapterName:"functions",challenges:{dry:{challengeName:"dry",status:"start"},"fortune-cookie":{challengeName:"fortune-cookie",status:"locked"}
1856,"mars-orbiter":{challengeName:"mars-orbiter",status:"locked"},calculator:{challengeName:"calculator",status:"locked"},stonks:{challengeName:"stonks",status:"locked"},"drive-thru":{challengeName:"drive-thru",status:"locked"}}},"classes-and-objects":{chapterName:"classes-and-objects",challenges:{restaurants:{challengeName:"restaurants",status:"start"},"bobs-burgers":{challengeName:"bobs-burgers",status:"locked"},"favorite-cities":{challengeName:"favorite-cities",status:"locked"},"bank-accounts":{challengeName:"bank-accounts",status:"locked"},pokedex:{challengeName:"pokedex",status:"locked"}}},modules:{chapterName:"modules",challenges:{"slot-machine":{challengeName:"slot-machine",status:"start"},"solar-system":{challengeName:"solar-system",status:"locked"},countdown:{challengeName:"countdown",status:"locked"},"forty-two":{challengeName:"forty-two",status:"locked"},"zen-of-python":{challengeName:"zen-of-python",status:"locked"}}}},eX={courseName:"sql",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-introduction"},eY={queries:{chapterName:"queries",challenges:{introduction:{challengeName:"introduction",status:"start"},select:{challengeName:"select",status:"locked"},"streaming-wars":{challengeName:"streaming-wars",status:"locked"},"rotten-tomatoes":{challengeName:"rotten-tomatoes",status:"locked"},like:{challengeName:"like",status:"locked"},"golden-age":{challengeName:"golden-age",status:"locked"},"order-by":{challengeName:"order-by",status:"locked"},"nyc-restaurants":{challengeName:"nyc-restaurants",status:"locked"}}},aggregates:{chapterName:"aggregates",challenges:{"music-playlist":{challengeName:"music-playlist",status:"start"},"counting-rows":{challengeName:"counting-rows",status:"locked"},"old-&-new":{challengeName:"old-&-new",status:"locked"},"total-playtime":{challengeName:"total-playtime",status:"locked"},"billboard-hot-100":{challengeName:"billboard-hot-100",status:"locked"},"group-by":{challengeName:"group-by",status:"locked"},"video-games":{challengeName:"video-games",status:"locked"}}},"new-table":{chapterName:"new-table",challenges:{"create-table":{challengeName:"create-table",status:"start"},"insert-into":{challengeName:"insert-into",status:"locked"},"alter-table":{challengeName:"alter-table",status:"locked"},"update-set":{challengeName:"update-set",status:"locked"},"delete-from":{challengeName:"delete-from",status:"locked"},bffs:{challengeName:"bffs",status:"locked"}}},"multiple-tables":{chapterName:"multiple-tables",challenges:{joins:{challengeName:"joins",status:"start"},"locked-in":{challengeName:"locked-in",status:"locked"},"inner-join":{challengeName:"inner-join",status:"locked"},"left-join":{challengeName:"left-join",status:"locked"},"students-&-teachers":{challengeName:"students-&-teachers",status:"locked"},"online-shop":{challengeName:"online-shop",status:"locked"}}}},e0={courseName:"ui-ux-design",badgesEarned:[],createdAt:new Date().toString(),resumeExercise:"01-introduction"},e1={"the-world-of-design":{chapterName:"the-world-of-design",challenges:{introduction:{challengeName:"introduction",status:"start"},"design-process":{challengeName:"design-process",status:"locked"},"design-tools":{challengeName:"design-tools",status:"locked"},"exploring-figma":{challengeName:"exploring-figma",status:"locked"},"first-edition":{challengeName:"first-edition",status:"locked"},holographic:{challengeName:"holographic",status:"locked"},"deck-builder":{challengeName:"deck-builder",status:"locked"}}},"design-as-problem-solving":{chapterName:"design-as-problem-solving",challenges:{"the-good-the-bad-and-the-ugly":{challengeName:"the-good-the-bad-and-the-ugly",status:"start"},"empathize-and-define":{challengeName:"empathize-and-define",status:"locked"},ideate:{challengeName:"ideate",status:"locked"},prototype:{challengeName:"prototype",status:"locked"},wireframe:{challengeName:"wireframe",status:"locked"},"user-flows":{challengeName:"user-flows",status:"locked"},"interactive-prototypes":{challengeName:"interactive-prototypes",status:"locked"},"test-implement-iterate":{challengeName:"test-implement-iterate",status:"locked"},recap:{challengeName:"recap",status:"locked"}}}};function getCourseState($){let{courseName:et}=$;switch(et){case"c-sharp":default:return{course:er,chapters:ei};case"command-line":return{course:eo,chapters:es};case"cpp":return{course:el,chapters:eu};case"css":return{course:ed,chapters:eh};case"data-structures-and-algorithms":return{course:ep,chapters:em};case"framework-valley-react":return{course:ef,chapters:eg};case"gen-ai":return{course:ey,chapters:ev};case"git-github":return{course:ex,chapters:e_};case"github-copilot":return{course:ew,chapters:ek};case"html":return{course:eC,chapters:eE};case"intermediate-javascript":return{course:eI,chapters:eS};case"intermediate-python":return{course:eT,chapters:eA};case"java":return{course:eP,chapters:eN};case"javascript":return{course:ej,chapters:eR};case"lua":return{course:eV,chapters:eD};case"machine-learning":return{course:eO,chapters:eM};case"matplotlib":return{course:eF,chapters:eL};case"nodejs":return{course:eH,chapters:eB};case"numpy":return{course:eU,chapters:ez};case"p5js":return{course:eq,chapters:eZ};case"pandas":return{course:eW,chapters:eG};case"phaser":return{course:e$,chapters:eJ};case"python":return{course:eK,chapters:eQ};case"sql":return{course:eX,chapters:eY};case"ui-ux-design":return{course:e0,chapters:e1}}}},17593:function($,et,en){"use strict";en.d(et,{JP:function(){return el},Ji:function(){return currencyBasedOnTimeZone},LR:function(){return getCurrencyObject},PB:function(){return es},a7:function(){return eu}});let er={us:{currency:"USD",sign:"$",timezones:[],club:{monthly:"$19.99",annual:"$9.99",annualTotal:"$119.88",monthlyNumber:19.99,annualNumber:9.99,annualTotalNumber:119.88},workshop:{monthly:"$24.99",annual:"$19.99"}},argentina:{currency:"ARS",sign:"ARS$",timezones:["America/Argentina/Buenos_Aires","America/Argentina/Cordoba","America/Argentina/Salta","America/Argentina/Jujuy","America/Argentina/Tucuman","America/Argentina/Catamarca","America/Argentina/La_Rioja","America/Argentina/San_Juan","America/Argentina/Mendoza","America/Argentina/San_Luis","America/Argentina/Rio_Gallegos","America/Argentina/Ushuaia","America/Argentina/ComodRivadavia"],club:{monthly:"14665 ARS",annual:"7249 ARS",annualTotal:"86999 ARS",monthlyNumber:14665,annualNumber:7249,annualTotalNumber:86999},workshop:{monthly:"$24.99",annual:"$19.99"}},brazil:{currency:"BRL",sign:"R$",timezones:["America/Sao_Paulo","America/Noronha","America/Belem","America/Fortaleza","America/Recife","America/Araguaina","America/Maceio","America/Bahia","America/Santarem","Brazil/Acre","Brazil/DeNoronha","Brazil/West","Brazil/East"],club:{monthly:"R$ 55.00",annual:"R$ 27.66",annualTotal:"R$ 331.99",monthlyNumber:55,annualNumber:27.66,annualTotalNumber:331.99},workshop:{monthly:"R$ 140",annual:"R$ 99"}},chile:{currency:"CLP",sign:"$",timezones:["America/Santiago","Pacific/Easter"],club:{monthly:"9332",annual:"4558.25",annualTotal:"54699",monthlyNumber:9332,annualNumber:4558.25,annualTotalNumber:54699},workshop:{monthly:"$24.99",annual:"$19.99"}},colombia:{currency:"COP",sign:"COP$",timezones:["America/Bogota","America/Rio_Branco","America/Eirunepe","America/Porto_Velho","America/Boa_Vista","America/Manaus"],club:{monthly:"38665 COP",annual:"19291.5 COP",annualTotal:"231499 COP",monthlyNumber:38665,annualNumber:19291.5,annualTotalNumber:231499},workshop:{monthly:"$24.99",annual:"$19.99"}},india:{currency:"INR",sign:"â¹",timezones:["Asia/Kolkata","Asia/Calcutta"],club:{monthly:"479 INR",annual:"224 INR",annualTotal:"2699 INR",monthlyNumber:479,annualNumber:224.91,annualTotalNumber:2699},workshop:{monthly:"3300 INR",annual:"2300 INR"}}
1856,indonesia:{currency:"IDR",sign:"Rp",timezones:["Asia/Jakarta","Asia/Pontianak","Asia/Makassar","Asia/Jayapura"],club:{monthly:"167265 IDR",annual:"83566 IDR",annualTotal:"1002799 IDR",monthlyNumber:167265,annualNumber:83566,annualTotalNumber:1002799},workshop:{monthly:"$24.99",annual:"$19.99"}},mexico:{currency:"MXN",sign:"$",timezones:["America/Mexico_City","America/Monterrey","America/Merida","America/Mazatlan","America/Chihuahua","America/Hermosillo","America/Tijuana","America/Cancun","America/Bahia_Banderas","America/Matamoros","America/Ojinaga","America/Ciuadad_Juarez","America/Ensenada","America/Rosarito","America/Santa_Isabel","America/Tecate","America/Atikokan","America/Cambridge_Bay","America/Coral_Harbour","America/Creston"],club:{monthly:"180 MXN",annual:"91.5 MXN",annualTotal:"1099 MXN",monthlyNumber:180,annualNumber:91.5,annualTotalNumber:1099},workshop:{monthly:"700 MXN",annual:"489.99 MXN"}},philippines:{currency:"PHP",sign:"â±",timezones:["Asia/Manila"],club:{monthly:"599 PHP",annual:"295.75 PHP",annualTotal:"3549 PHP",monthlyNumber:599,annualNumber:295.75,annualTotalNumber:3549},workshop:{monthly:"$24.99",annual:"$19.99"}},vietnam:{currency:"VND",sign:"â«",timezones:["Asia/Ho_Chi_Minh","Asia/Hanoi"],club:{monthly:"133332 VND",annual:"65791.5 VND",annualTotal:"789499 VND",monthlyNumber:133332,annualNumber:65791.5,annualTotalNumber:789499},workshop:{monthly:"$24.99",annual:"$19.99"}}},ei={},eo={};for(let $ of Object.values(er))ei[$.currency]=$.sign,eo[$.currency]=Math.round((1-$.club.annualNumber/$.club.monthlyNumber)*100);let es=ei,el=eo,eu={club:er.us.club,workshop:er.us.workshop,type:er.us.currency,sign:er.us.sign},ed=Object.keys(er);function currencyBasedOnTimeZone(){let $=Intl.DateTimeFormat().resolvedOptions().timeZone,et=Object.entries(er).find(et=>{let[,en]=et;return en.timezones.includes($)});return et?et[0]:null}async function getCurrencyObject(){var $;let et=currencyBasedOnTimeZone();if(!et)try{let $=await fetch("/api/ip/check"),en=await $.json();et=en.country.toLowerCase(),ed.includes(et)||(et="us")}catch($){et="us"}let en=null!==($=er[et])&&void 0!==$?$:er.us;return{type:en.currency,sign:en.sign,club:en.club,workshop:en.workshop}}},55122:function($,et,en){"use strict";en.d(et,{I:function(){return useCompletedCourses}});var er=en(67294),ei=en(9473),eo=en(88090),es=en(37009);function useCompletedCourses($){let et=(0,ei.v9)(eo.B8),en=(0,ei.v9)(es.L),el=null!=$?$:en;return(0,er.useMemo)(()=>{let $=[];if(!el)return $;for(let ei in et){var en,er;let eo=null===(en=et[ei])||void 0===en?void 0:en.chapters,es=null===(er=el[ei])||void 0===er?void 0:er.chapters;if(!(null==eo?void 0:eo.length)||!es)continue;let eu=eo.every($=>{var et;let en=null==$?void 0:$.internalChallengeNames,er=null===(et=es[null==$?void 0:$.internalChapterName])||void 0===et?void 0:et.challenges;return null==en||!en.length||!!er&&en.every($=>{var et;return(null===(et=er[$])||void 0===et?void 0:et.status)==="complete"})});eu&&$.push(ei)}return $},[et,el])}},80386:function($,et,en){"use strict";en.d(et,{y:function(){return useBodyScrollLock}});var er=en(67294);function useBodyScrollLock(){(0,er.useEffect)(()=>{let $=window.scrollY,{style:et}=document.body;return et.overflow="hidden",et.position="fixed",et.top="-".concat($,"px"),et.width="100%",()=>{et.overflow="",et.position="",et.top="",et.width="",window.scrollTo({top:$,behavior:"instant"})}},[])}},20979:function($,et,en){"use strict";en.d(et,{v:function(){return useUsernameValidation}});var er=en(67294),ei=en(23914),eo=en(92369);let es=/^[a-zA-Z0-9-]+$/,el=new Set(["admin","administrator","root","support","staff","moderator","mod","system","official","codedex","team","help","info","contact","me","you","null","undefined","anonymous","user","guest","login","signup","logout","forgot","account","settings","profile","onboarding","about","api","app","ask","badges","blog","bookmarks","builds","certificates","challenges","club","community","courses","daily-challenge","daily-challenges","editor","educators","hackathon","home","index","invite","lumi","newsletter","pricing","privacy","projects","redirect","search","shop","sitemap","terms","test","ugc","worlds"]),eu={username_required:"Username is required",username_too_short:"Username must be at least ".concat(3," characters"),username_too_long:"Username cannot exceed ".concat(15," characters"),username_invalid_chars:"Username can only contain letters, numbers, and hyphens",username_invalid_format:"Username cannot start or end with a hyphen",username_reserved:"This username is reserved"};function fail($){return{isValid:!1,code:$,error:eu[$]}}var ed=en(36180);function useUsernameValidation($,et,en){let[eu,eh]=(0,er.useState)({status:"idle",error:null}),ep=(0,ed.Z)($,400),em=(0,er.useRef)(null);return(0,er.useEffect)(()=>
1856{if(em.current&&em.current.abort(),!ep){eh({status:"idle",error:null});return}if(ep.toLowerCase()===(null==et?void 0:et.toLowerCase())){eh({status:"valid",error:null});return}if(ep.length<3){let $=setTimeout(()=>{eh({status:"invalid",error:"Username must be at least ".concat(3," characters")})},1500);return()=>clearTimeout($)}let $=function($){let et=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return $?et.currentUsername&&$.toLowerCase()===et.currentUsername.toLowerCase()?{isValid:!0,error:null}:$.length<3?fail("username_too_short"):$.length>15?fail("username_too_long"):es.test($)?$.startsWith("-")||$.endsWith("-")?fail("username_invalid_format"):el.has($.toLowerCase())?fail("username_reserved"):{isValid:!0,error:null}:fail("username_invalid_chars"):fail("username_required")}(ep);if(!$.isValid){eh({status:"invalid",error:$.error});return}eh({status:"validating",error:null});let er=new AbortController;em.current=er;let{functions:eu}=(0,eo.UM)(),ed=(0,ei.V1)(eu,"checkUniqueUsername");return ed({username:ep,uid:en}).then($=>{if(er.signal.aborted)return;let et=$.data.data;"unique"===et?eh({status:"valid",error:null}):"non-unique"===et?eh({status:"invalid",error:"Username is already taken"}):eh({status:"invalid",error:"Invalid username format"})}).catch($=>{er.signal.aborted||(console.error("Username check failed:",$),eh({status:"invalid",error:"Failed to check username"}))}),()=>{er.abort()}},[ep,et,en]),eu}},94021:function($,et,en){"use strict";var er=en(26961);let LocalStorageCache=class LocalStorageCache{static getCurrentVersion(){return this.CURRENT_VERSION}static isAvailable(){try{let $="__localStorage_test__";return localStorage.setItem($,$),localStorage.removeItem($),!0}catch($){return console.warn("localStorage is not available:",$),!1}}static compress($){try{return er.compressToUTF16($)}catch(et){return console.error("Error compressing data:",et),$}}static decompress($){try{return er.decompressFromUTF16($)}catch($){return console.error("Error decompressing data:",$),null}}static setCourse($,et,en){if(!this.isAvailable())return!1;try{let er=JSON.stringify(en),ei=this.compress(er),eo="".concat(this.COMPRESSION_PREFIX).concat($,"-").concat(et);return localStorage.setItem(eo,ei),this.setMetadata($,et),!0}catch($){return console.error("Error setting course cache for ".concat(et,":"),$),!1}}static getCourse($,et){if(!this.isAvailable())return null;try{let en="".concat(this.COMPRESSION_PREFIX).concat($,"-").concat(et),er=localStorage.getItem(en);if(er){let $=this.decompress(er);if($)return JSON.parse($)}let ei="".concat($,"-").concat(et);if(er=localStorage.getItem(ei))try{let en=JSON.parse(er);return en&&"object"==typeof en&&(this.setCourse($,et,en),localStorage.removeItem(ei)),en}catch($){console.error("Error parsing uncompressed course data for ".concat(et,":"),$)}return null}catch($){return console.error("Error getting course cache for ".concat(et,":"),$),null}}static setMetadata($,et){try{let en={version:this.CURRENT_VERSION,timestamp:Date.now(),compressed:!0},er="".concat(this.COMPRESSION_PREFIX,"meta-").concat($,"-").concat(et);localStorage.setItem(er,JSON.stringify(en))}catch($){console.error("Error setting metadata:",$)}}static getMetadata($,et){try{let en="".concat(this.COMPRESSION_PREFIX,"meta-").concat($,"-").concat(et),er=localStorage.getItem(en);if(er)return JSON.parse(er);return null}catch($){return console.error("Error getting metadata:",$),null}}static setProgressHash($,et){if(!this.isAvailable())return!1;try{return localStorage.setItem("progressHash-".concat($),et),!0}catch($){return console.error("Error setting progress hash:",$),!1}}static getProgressHash($){if(!this.isAvailable())return null;try{return localStorage.getItem("progressHash-".concat($))}catch($){return console.error("Error getting progress hash:",$),null}}static setVersion($){if(!this.isAvailable())return!1;try{return localStorage.setItem("curr-version",$||this.CURRENT_VERSION),!0}catch($){return console.error("Error setting version:",$),!1}}static getVersion(){if(!this.isAvailable())return null;try{return localStorage.getItem("curr-version")}catch($){return console.error("Error getting version:",$),null}}static isVersionValid(){let $=this.getVersion();return $===this.CURRENT_VERSION}static clearUserCache($,et){if(this.isAvailable())try{for(let en of(localStorage.removeItem("progressHash-".concat($)),et))localStorage.removeItem("".concat(this.COMPRESSION_PREFIX).concat($,"-").concat(en)),localStorage.removeItem("".concat(this.COMPRESSION_PREFIX,"meta-").concat($,"-").concat(en)),localStorage.removeItem("".concat($,"-").concat(en))}catch($){console.error("Error clearing user cache:",$)}}static getCacheStats($,et){let en=0,er=0,ei=0;for(let eo of et){let et=localStorage.getItem("".concat(this.COMPRESSION_PREFIX).concat($,"-").concat(eo)),es=localStorage.getItem("".concat($,"-").concat(eo));if(et){er+=2*et.length,ei++;let $=this.decompress(et);$&&(en+=2*$.length)}else es&&(en+=2*es.length,ei++)}
1856return{totalSize:en,compressedSize:er||en,courseCount:ei,compressionRatio:er>0?en/er:1}}static migrateToCompressed($,et){let en=0,er=0;for(let ei of et){let et="".concat($,"-").concat(ei),eo=localStorage.getItem(et);if(eo)try{let es=JSON.parse(eo);this.setCourse($,ei,es)?(localStorage.removeItem(et),en++):er++}catch($){console.error("Failed to migrate ".concat(ei,":"),$),er++}}return{migrated:en,failed:er}}};LocalStorageCache.CURRENT_VERSION="2.0.3",LocalStorageCache.COMPRESSION_PREFIX="lz_",et.Z=LocalStorageCache},68551:function($,et,en){"use strict";en.d(et,{Tj:function(){return eo},t:function(){return er},yP:function(){return ei}});let er="price_1ShTG0LPLaa9XJOq4hBZDcIA",ei="price_1TCSFJLPLaa9XJOqZ9FSYruC",eo="pk_live_51ITIpTLPLaa9XJOqQFaVOPgnoVWfQvDzHSp3iA6B3GjlaWVIKMDjl7hXjGsjt0RftjTnipd2BBb9dKYSbYBs0wHI00xY1BY3uX"},65519:function($,et,en){"use strict";en.d(et,{G:function(){return getUserCurrency},R:function(){return isChineseCubaIranTz}});var er=en(17593);async function getUserCurrency(){let $=await (0,er.LR)();return $}function isChineseCubaIranTz(){let $=Intl.DateTimeFormat().resolvedOptions().timeZone;return"Asia/Shanghai"===$||"America/Havana"===$||"Asia/Tehran"===$||"Asia/Karachi"===$}},36326:function($,et,en){"use strict";en.d(et,{n:function(){return eo}});let er={bugReport:"jOxqq3Sf",opcFeedback:"RZ5rlOsg",requestContent:"GNDloYr1"},ei="https://form.typeform.com/to",eo={bugReport:"".concat(ei,"/").concat(er.bugReport),opcFeedback:"".concat(ei,"/").concat(er.opcFeedback),requestContent:"".concat(ei,"/").concat(er.requestContent)}},71486:function($,et,en){"use strict";function formatEarnedAt($){return $?new Date($).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):null}en.d(et,{l:function(){return formatEarnedAt}})},6345:function($,et,en){"use strict";en.d(et,{Dc:function(){return isBadgeId},V2:function(){return tiersCrossed},XB:function(){return flattenBadges},Xq:function(){return getBadge},YP:function(){return resolveBadge}});let er=[{kind:"state",id:"newbie",group:"community-onboarding",name:"Newbie",icon:"/images/badges/community/newbie.png",requirement:"Read Community Guidelines"},{kind:"state",id:"main-character",group:"community-onboarding",name:"Main Character",icon:"/images/badges/community/main-character.png",requirement:"Add an avatar and bio"},{kind:"state",id:"hello-world",group:"community-onboarding",icon:"/images/badges/community/hello-world.png",name:"Hello World!",requirement:"Post in #Introductions"},{kind:"state",id:"two-cents",group:"community-onboarding",name:"Two Cents",icon:"/images/badges/community/two-cents.png",requirement:"Answer #Question of the Week"},{kind:"threshold",id:"likes",group:"community",metric:"likesGiven",label:$=>"Like ".concat($," posts"),tiers:[{level:1,threshold:10,name:"Pep Squad",icon:"/images/badges/community/likes.png"},{level:2,threshold:50,name:"Cheerleader",icon:"/images/badges/community/cheerleader.png"}]},{kind:"threshold",id:"comments",group:"community",metric:"commentsMade",label:$=>"Make ".concat($," comments"),tiers:[{level:1,threshold:10,name:"Chatterbox",icon:"/images/badges/community/comment.png"},{level:2,threshold:50,name:"Certified Yapper",icon:"/images/badges/community/yapper.png"}]},{kind:"threshold",id:"following",group:"community",metric:"following",label:$=>"Follow ".concat($," people"),tiers:[{level:1,threshold:10,name:"Social Butterfly",icon:"/images/badges/community/butterfly.png"},{level:2,threshold:50,name:"Network Builder",icon:"/images/badges/community/networkbuilder.png"}]},{kind:"threshold",id:"followers",group:"community",metric:"followers",label:$=>"Reach ".concat($," followers"),tiers:[{level:1,threshold:50,name:"Internet Famous",icon:"/images/badges/community/internet-famous.png"},{level:2,threshold:100,name:"Celebrity Status",icon:"/images/badges/community/100followers.png"}]},{kind:"threshold",id:"monthly-challenge-entrant",group:"community",metric:"challengesEntered",label:$=>"Enter ".concat($," Monthly Challenge"),tiers:[{level:1,threshold:1,name:"Challenge Accepted",icon:"/images/badges/community/challenge-accepted.png"}]},{kind:"state",id:"monthly-challenge-winner",group:"community",name:"Monthly Challenge Winner",icon:"/images/badges/community/monthly-challenge-winner.png",requirement:"Win a Monthly Challenge"},{kind:"threshold",id:"icebreaker",group:"community",metric:"introComments",label:$=>"Comment on ".concat($," #Introductions"),tiers:[{level:1,threshold:3,name:"Icebreaker",icon:"/images/badges/community/icebreaker.png"}]},{kind:"state",id:"campus-tour-2024",group:"special",name:"Campus Tour 2024",icon:"/images/badges/campus-tour.png",requirement:"Attend a 2024 Cod\xe9dex Campus Tour event",claimId:"asiOHzRoM1tZK1dvqur"},{kind:"state",id:"campus-tour-2025",group:"special",name:"Campus Tour 2025",icon:"/images/badges/campus-tour-2025.png",requirement:"Attend a 2025 Cod\xe9dex Campus Tour event",claimId:"oz3ZVbGvbJciWg2alRR"}
1856,{kind:"state",id:"assembly-club-2026",group:"special",name:"Assembly Club 2026",icon:"/images/badges/assembly-club-2026.png",requirement:"Attend a 2026 Cod\xe9dex Assembly Club event",claimId:"J9D2EgWyvGmh7y9kW5p"},{kind:"state",id:"gen-z-builders-networking-nite-2026",group:"special",name:"Gen Z Builders Networking Nite 2026",icon:"/images/gen-z-builders-networking-nite-2026.png",requirement:"Attend the 2026 Gen Z Builders Networking Nite",claimId:"3qqxqozfFrRxEZ1k2t7Z"},{kind:"state",id:"summer-hackathon-2024-hacker",group:"special",name:"Cod\xe9dex Summer Hackathon 2024 Hacker",icon:"/images/badges/summer-hackathon-2024/summer-2024-hackathon-hacker.png",requirement:"Compete in the Cod\xe9dex Summer Hackathon 2024"},{kind:"state",id:"summer-hackathon-2024-winner",group:"special",name:"Cod\xe9dex Summer Hackathon 2024 Winner",icon:"/images/badges/summer-hackathon-2024/summer-2024-hackathon-winner.png",requirement:"Win the Cod\xe9dex Summer Hackathon 2024"},{kind:"state",id:"club-for-life",group:"special",name:"Club for Life",icon:"/images/badges/club-for-life/club-for-life.png",requirement:"Become a Cod\xe9dex Club for Life member"},{kind:"state",id:"mini-holiday-hackathon-2024-hacker",group:"special",name:"Cod\xe9dex Mini Holiday Hackathon 2024 Hacker",icon:"/images/badges/mini-holiday-hackathon-2024/mini-holiday-hackathon-hacker.png",requirement:"Compete in the Cod\xe9dex Mini Holiday Hackathon 2024"},{kind:"state",id:"mini-holiday-hackathon-2024-winner",group:"special",name:"Cod\xe9dex Mini Holiday Hackathon 2024 Winner",icon:"/images/badges/mini-holiday-hackathon-2024/mini-holiday-hackathon-winner.png",requirement:"Win the Cod\xe9dex Mini Holiday Hackathon 2024"}],ei=new Set(er.map($=>$.id)),isBadgeId=$=>ei.has($),eo=new Map(er.map($=>[$.id,$]));function getBadge($){let et=eo.get($);if(!et)throw Error("Unknown badge: ".concat($));return et}function tiersCrossed($,et,en){let er=getBadge($);return"threshold"!==er.kind?[]:er.tiers.filter($=>et<$.threshold&&en>=$.threshold)}function flattenBadges(){return er.flatMap($=>(function($){let et={badgeId:$.id,kind:$.kind,group:$.group};return"threshold"===$.kind?[...$.tiers].sort(($,et)=>$.threshold-et.threshold).map(en=>({...et,id:"".concat($.id,"-").concat(en.level),metric:$.metric,level:en.level,threshold:en.threshold,name:en.name,icon:en.icon,requirement:$.label(en.threshold)})):[{...et,id:$.id,metric:null,level:null,threshold:null,name:$.name,icon:$.icon,requirement:$.requirement}]})($))}let es=new Map(flattenBadges().map($=>[$.id,$]));function resolveBadge($){var et;let en=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,er=eo.get($);if(!er)return null;let ei="threshold"===er.kind?"".concat($,"-").concat(en):$;return null!==(et=es.get(ei))&&void 0!==et?et:null}},22955:function($,et,en){"use strict";en.d(et,{NH:function(){return toEarnedBadges},Tm:function(){return filterEarnedBadges},ho:function(){return mergeSpecialBadges}});var er=en(6345);function toEarnedBadge($){var et;let en=null!==(et=null==$?void 0:$.ui)&&void 0!==et?et:$,ei=(null==en?void 0:en.badgeInternalName)||(null==en?void 0:en.name);if(!ei)return null;let eo=function($){if(!$)return null;if($ instanceof Date)return $.toISOString();if("function"==typeof(null==$?void 0:$.toDate))return $.toDate().toISOString();if("string"==typeof $){let et=new Date($);return Number.isNaN(et.getTime())?null:et.toISOString()}return null}(null==en?void 0:en.date);if((0,er.Dc)(ei)){let $=(0,er.Xq)(ei);if("threshold"!==$.kind)return{id:$.id,badgeId:$.id,kind:$.kind,group:$.group,level:null,name:$.name,icon:$.icon,requirement:$.requirement,earnedAt:eo,count:null,earned:!0,threshold:null}}return{id:ei,badgeId:ei,kind:"event",group:"special",level:null,name:(null==en?void 0:en.name)||ei,icon:(null==en?void 0:en.img)||"",requirement:"",earnedAt:eo,count:null,earned:!0,threshold:null}}function toEarnedBadges($){return Array.isArray($)?$.map(toEarnedBadge).filter($=>null!=$):[]}function mergeSpecialBadges($,et){let en=new Set($.map($=>$.id));return[...$,...et.filter($=>!en.has($.id))]}function filterEarnedBadges($){let et=new Map($.map($=>[$.id,$]));return(0,er.XB)().filter($=>{var en,er;let ei=et.get($.id);return"threshold"===$.kind?(null!==(en=null==ei?void 0:ei.count)&&void 0!==en?en:0)>=(null!==(er=$.threshold)&&void 0!==er?er:1/0):null!=ei}).map($=>{var en,er;return{...$,earnedAt:null!==(er=null===(en=et.get($.id))||void 0===en?void 0:en.earnedAt)&&void 0!==er?er:null}})}},67687:function($,et,en){"use strict";en.d(et,{h:function(){return checkNightsOfCodeRegistration},t:function(){return storeNightsOfCodeRegistration}});var er=en(39828),ei=en(92369),eo=en(26642);async function storeNightsOfCodeRegistration($){let{uid:et,pet:en,petName:eo}=$,es=function(){let $=new Date(new Date().toUTCString()),et={};for(let en=0;en<30;en++){let er=new Date($);er.setDate($.getDate()+en);let ei=er.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit"});et[ei]={}}return et}();try{let{firestore:$}=(0,ei.UM)(),el=(0,er.hJ)($,"users",et,"nights-of-code"),eu=(0,er.hJ)(el,"attempts","attempts"),ed=await (0,er.ET)(eu,{pet:en,petName:eo,registered:!0,createdAt:(0,er.Bt)(),tracker:es,aliveStatus:"alive",daysCompleted:0});try{await fetch("/api/email/merge-field",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mergeFields:{PET_NAME:eo}})})}catch($){}try{await fetch("/api/email/mark",{method:"POST",body:JSON.stringify({type:"30nites-registration"}),headers:{"Content-Type":"application/json"}})}catch($){console.error($)}try{await (0,er.pl)((0,er.JU)((0,er.hJ)($,"activePets"),ed.id),{pet:en,petName:eo,userId:et,createdAt:(0,er.Bt)(),lastFed:(0,er.Bt)(),daysMissed:{}})}catch($){}let eh=(0,er.JU)(el,"meta-data");try{await (0,er.pl)(eh,{activeDoc:ed.id},{merge:!0})}catch($){console.log($)}return{status:200,message:"Nights of Code registration successful"}}catch($){console.error("Error storing Nights of Code registration:",$.message)}}async function checkNightsOfCodeRegistration($){let{uid:et}=$;try{let{firestore:$}=(0,ei.UM)(),es=(0,er.hJ)($,"users",et,"nights-of-code"),el=(0,er.JU)(es,"meta-data"),eu=await (0,er.QT)(el),ed=eu.data(),eh=(0,er.JU)(es,"attempts","attempts",ed.activeDoc),ep=await (0,er.QT)(eh),em=ep.data(),ef=Object.entries(em.tracker).sort(($,et)=>{let[en]=$,[er]=et,ei=new Date(en),eo=new Date(er);return ei.getTime()-eo.getTime()}).map($=>{let[et,en]=$;return{date:et,details:en}}),eg=new Date().toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit"});var en=ef.findIndex(function($){return $.date===eg});let ey=ef[en-1],ev=ef[en],ex=(0,eo.IT)({days:ef,dayIndex:en,currentDate:eg});if(!0===em.registered)return{status:200,message:"User is registered for Nights of Code",pet:em.pet,petName:em.petName,emotion:(ev&&ey?ev.details.twitterLink?"happy":!ev.details.twitterLink&&ey.details.twitterLink?"neutral":ey.details.twitterLink||ev.details.twitterLink?"neutral":"sad":"neutral")||"neutral",evolutionPhase:em.evolutionPhase,aliveStatus:ex>=3?"dead":em.aliveStatus,day:ef[en]?en+1:30,sortedDays:ef,dayIndex:ef[en],lastDay:ef[ef.length-1],isFed:!ef[en]||ev.details.twitterLink};return{status:404,message:"User is not registered for Nights of Code"}}catch($){return console.error("Error checking Nights of Code registration:",$.message),{status:404,message:"User is not registered for Nights of Code"}}}},97498:function($,et){"use strict";var en,er;
1856Object.defineProperty(et,"__esModule",{value:!0}),function($,et){for(var en in et)Object.defineProperty($,en,{enumerable:!0,get:et[en]})}(et,{PrefetchKind:function(){return en},ACTION_REFRESH:function(){return ei},ACTION_NAVIGATE:function(){return eo},ACTION_RESTORE:function(){return es},ACTION_SERVER_PATCH:function(){return el},ACTION_PREFETCH:function(){return eu},ACTION_FAST_REFRESH:function(){return ed},ACTION_SERVER_ACTION:function(){return eh}});let ei="refresh",eo="navigate",es="restore",el="server-patch",eu="prefetch",ed="fast-refresh",eh="server-action";(er=en||(en={})).AUTO="auto",er.FULL="full",er.TEMPORARY="temporary",("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esModule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},10030:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"getDomainLocale",{enumerable:!0,get:function(){return getDomainLocale}});let er=en(22866);function getDomainLocale($,et,ei,eo){{let es=en(33530).normalizeLocalePath,el=en(16728).detectDomainLocale,eu=et||es($,ei).detectedLocale,ed=el(eo,void 0,eu);if(ed){let et="http"+(ed.http?"":"s")+"://",en=eu===ed.defaultLocale?"":"/"+eu;return""+et+ed.domain+(0,er.normalizePathTrailingSlash)(""+en+$)}return!1}}("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esModule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},40768:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return Image}});let er=en(38754),ei=en(61757),eo=ei._(en(67294)),es=er._(en(79201)),el=en(85494),eu=en(40920),ed=en(30869);en(81905);let eh=en(22866);function normalizeSrc($){return"/"===$[0]?$.slice(1):$}let ep={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1},em=new Set,ef="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",eg=new Map([["default",function($){let{config:et,src:en,width:er,quality:ei}=$;return en.endsWith(".svg")&&!et.dangerouslyAllowSVG?en:(0,eh.normalizePathTrailingSlash)(et.path)+"?url="+encodeURIComponent(en)+"&w="+er+"&q="+(ei||75)}],["imgix",function($){let{config:et,src:en,width:er,quality:ei}=$,eo=new URL(""+et.path+normalizeSrc(en)),es=eo.searchParams;return es.set("auto",es.getAll("auto").join(",")||"format"),es.set("fit",es.get("fit")||"max"),es.set("w",es.get("w")||er.toString()),ei&&es.set("q",ei.toString()),eo.href}],["cloudinary",function($){let{config:et,src:en,width:er,quality:ei}=$,eo=["f_auto","c_limit","w_"+er,"q_"+(ei||"auto")].join(",")+"/";return""+et.path+eo+normalizeSrc(en)}],["akamai",function($){let{config:et,src:en,width:er}=$;return""+et.path+normalizeSrc(en)+"?imwidth="+er}],["custom",function($){let{src:et}=$;throw Error('Image with src "'+et+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}]]);function isStaticRequire($){return void 0!==$.default}function generateImgAttrs($){let{config:et,src:en,unoptimized:er,layout:ei,width:eo,quality:es,sizes:el,loader:eu}=$;if(er)return{src:en,srcSet:void 0,sizes:void 0};let{widths:ed,kind:eh}=function($,et,en,er){let{deviceSizes:ei,allSizes:eo}=$;if(er&&("fill"===en||"responsive"===en)){let $=/(^|\s)(1?\d?\d)vw/g,et=[];for(let en;en=$.exec(er);en)et.push(parseInt(en[2]));if(et.length){let $=.01*Math.min(...et);return{widths:eo.filter(et=>et>=ei[0]*$),kind:"w"}}return{widths:eo,kind:"w"}}if("number"!=typeof et||"fill"===en||"responsive"===en)return{widths:ei,kind:"w"};let es=[...new Set([et,2*et].map($=>eo.find(et=>et>=$)||eo[eo.length-1]))];return{widths:es,kind:"x"}}(et,eo,ei,el),ep=ed.length-1;return{sizes:el||"w"!==eh?el:"100vw",srcSet:ed.map(($,er)=>eu({config:et,src:en,quality:es,width:$})+" "+("w"===eh?$:er+1)+eh).join(", "),src:eu({config:et,src:en,quality:es,width:ed[ep]})}}function getInt($){return"number"==typeof $?$:"string"==typeof $?parseInt($,10):void 0}function defaultImageLoader($){var et;let en=(null==(et=$.config)?void 0:et.loader)||"default",er=eg.get(en);if(er)return er($);throw Error('Unknown "loader" found in "next.config.js". Expected: '+el.VALID_LOADERS.join(", ")+". Received: "+en)}function handleLoading($,et,en,er,ei,eo){if(!$||$.src===ef||$["data-loaded-src"]===et)return;$["data-loaded-src"]=et;let es="decode"in $?$.decode():Promise.resolve();es.catch(()=>{}).then(()=>
1856{if($.parentNode&&(em.add(et),"blur"===er&&eo(!0),null==ei?void 0:ei.current)){let{naturalWidth:et,naturalHeight:en}=$;ei.current({naturalWidth:et,naturalHeight:en})}})}let ImageElement=$=>{let{imgAttributes:et,heightInt:en,widthInt:er,qualityInt:ei,layout:es,className:el,imgStyle:eu,blurStyle:ed,isLazy:eh,placeholder:ep,loading:em,srcString:ef,config:eg,unoptimized:ey,loader:ev,onLoadingCompleteRef:ex,setBlurComplete:e_,setIntersection:ew,onLoad:ek,onError:eC,isVisible:eE,noscriptSizes:eI,...eS}=$;return em=eh?"lazy":em,eo.default.createElement(eo.default.Fragment,null,eo.default.createElement("img",{...eS,...et,decoding:"async","data-nimg":es,className:el,style:{...eu,...ed},ref:(0,eo.useCallback)($=>{ew($),(null==$?void 0:$.complete)&&handleLoading($,ef,es,ep,ex,e_)},[ew,ef,es,ep,ex,e_]),onLoad:$=>{let et=$.currentTarget;handleLoading(et,ef,es,ep,ex,e_),ek&&ek($)},onError:$=>{"blur"===ep&&e_(!0),eC&&eC($)}}),(eh||"blur"===ep)&&eo.default.createElement("noscript",null,eo.default.createElement("img",{...eS,loading:em,decoding:"async","data-nimg":es,style:eu,className:el,...generateImgAttrs({config:eg,src:ef,unoptimized:ey,layout:es,width:er,quality:ei,sizes:eI,loader:ev})})))};function Image($){var et;let en,{src:er,sizes:ei,unoptimized:eh=!1,priority:eg=!1,loading:ey,lazyRoot:ev=null,lazyBoundary:ex,className:e_,quality:ew,width:ek,height:eC,style:eE,objectFit:eI,objectPosition:eS,onLoadingComplete:eT,placeholder:eA="empty",blurDataURL:eP,...eN}=$,ej=(0,eo.useContext)(ed.ImageConfigContext),eR=(0,eo.useMemo)(()=>{let $=ep||ej||el.imageConfigDefault,et=[...$.deviceSizes,...$.imageSizes].sort(($,et)=>$-et),en=$.deviceSizes.sort(($,et)=>$-et);return{...$,allSizes:et,deviceSizes:en}},[ej]),eV=ei?"responsive":"intrinsic";"layout"in eN&&(eN.layout&&(eV=eN.layout),delete eN.layout);let eD=defaultImageLoader;if("loader"in eN){if(eN.loader){let $=eN.loader;eD=et=>{let{config:en,...er}=et;return $(er)}}delete eN.loader}let eO="";if("object"==typeof(et=er)&&(isStaticRequire(et)||void 0!==et.src)){let $=isStaticRequire(er)?er.default:er;if(!$.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify($));if(eP=eP||$.blurDataURL,eO=$.src,(!eV||"fill"!==eV)&&(eC=eC||$.height,ek=ek||$.width,!$.height||!$.width))throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify($))}let eM=!eg&&("lazy"===ey||void 0===ey);((er="string"==typeof er?er:eO).startsWith("data:")||er.startsWith("blob:"))&&(eh=!0,eM=!1),em.has(er)&&(eM=!1),eR.unoptimized&&(eh=!0);let[eF,eL]=(0,eo.useState)(!1),[eH,eB,eU]=(0,eu.useIntersection)({rootRef:ev,rootMargin:ex||"200px",disabled:!eM}),ez=!eM||eB,eq={boxSizing:"border-box",display:"block",overflow:"hidden",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},eZ={boxSizing:"border-box",display:"block",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},eW=!1,eG=getInt(ek),e$=getInt(eC),eJ=getInt(ew),eK=Object.assign({},eE,{position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:eI,objectPosition:eS}),eQ="blur"!==eA||eF?{}:{backgroundSize:eI||"cover",backgroundPosition:eS||"0% 0%",filter:"blur(20px)",backgroundImage:'url("'+eP+'")'};if("fill"===eV)eq.display="block",eq.position="absolute",eq.top=0,eq.left=0,eq.bottom=0,eq.right=0;else if(void 0!==eG&&void 0!==e$){let $=e$/eG,et=isNaN($)?"100%":""+100*$+"%";"responsive"===eV?(eq.display="block",eq.position="relative",eW=!0,eZ.paddingTop=et):"intrinsic"===eV?(eq.display="inline-block",eq.position="relative",eq.maxWidth="100%",eW=!0,eZ.maxWidth="100%",en="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27"+eG+"%27%20height=%27"+e$+"%27/%3e"):"fixed"===eV&&(eq.display="inline-block",eq.position="relative",eq.width=eG,eq.height=e$)}let eX={src:ef,srcSet:void 0,sizes:void 0};ez&&(eX=generateImgAttrs({config:eR,src:er,unoptimized:eh,layout:eV,width:eG,quality:eJ,sizes:ei,loader:eD}));let eY=er,e0={imageSrcSet:eX.srcSet,imageSizes:eX.sizes,crossOrigin:eN.crossOrigin,referrerPolicy:eN.referrerPolicy},e1=eo.default.useLayoutEffect,e2=(0,eo.useRef)(eT),e5=(0,eo.useRef)(er);(0,eo.useEffect)(()=>{e2.current=eT},[eT]),e1(()=>{e5.current!==er&&(eU(),e5.current=er)},[eU,er]);let e3={isLazy:eM,imgAttributes:eX,heightInt:e$,widthInt:eG,qualityInt:eJ,layout:eV,className:e_,imgStyle:eK,blurStyle:eQ,loading:ey,config:eR,unoptimized:eh,placeholder:eA,loader:eD,srcString:eY,onLoadingCompleteRef:e2,setBlurComplete:eL,setIntersection:eH,isVisible:ez,noscriptSizes:ei,...eN};return eo.default.createElement(eo.default.Fragment,null,eo.default.createElement("span",{style:eq},eW?eo.default.createElement("span",{style:eZ},en?eo.default.createElement("img",{style:{display:"block",maxWidth:"100%",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},alt:"","aria-hidden":!0,src:en}):null):null,eo.default.createElement(ImageElement,e3)),eg?eo.default.createElement(es.default,null,eo.default.createElement("link",{key:"__nimg-"+eX.src+eX.srcSet+eX.sizes,rel:"preload",as:"image",href:eX.srcSet?void 0:eX.src,...e0})):null)}("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esMo
1856dule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},65170:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"default",{enumerable:!0,get:function(){return e_}});let er=en(38754),ei=er._(en(67294)),eo=en(74450),es=en(92227),el=en(64364),eu=en(10109),ed=en(73607),eh=en(11823),ep=en(89031),em=en(40920),ef=en(10030),eg=en(77192),ey=en(97498),ev=new Set;function prefetch($,et,en,er,ei,eo){if(!eo&&!(0,es.isLocalURL)(et))return;if(!er.bypassPrefetchedCheck){let ei=void 0!==er.locale?er.locale:"locale"in $?$.locale:void 0,eo=et+"%"+en+"%"+ei;if(ev.has(eo))return;ev.add(eo)}let el=eo?$.prefetch(et,ei):$.prefetch(et,en,er);Promise.resolve(el).catch($=>{})}function formatStringOrUrl($){return"string"==typeof $?$:(0,el.formatUrl)($)}let ex=ei.default.forwardRef(function($,et){let en,er;let{href:el,as:ev,children:ex,prefetch:e_=null,passHref:ew,replace:ek,shallow:eC,scroll:eE,locale:eI,onClick:eS,onMouseEnter:eT,onTouchStart:eA,legacyBehavior:eP=!1,...eN}=$;en=ex,eP&&("string"==typeof en||"number"==typeof en)&&(en=ei.default.createElement("a",null,en));let ej=ei.default.useContext(eh.RouterContext),eR=ei.default.useContext(ep.AppRouterContext),eV=null!=ej?ej:eR,eD=!ej,eO=!1!==e_,eM=null===e_?ey.PrefetchKind.AUTO:ey.PrefetchKind.FULL,{href:eF,as:eL}=ei.default.useMemo(()=>{if(!ej){let $=formatStringOrUrl(el);return{href:$,as:ev?formatStringOrUrl(ev):$}}let[$,et]=(0,eo.resolveHref)(ej,el,!0);return{href:$,as:ev?(0,eo.resolveHref)(ej,ev):et||$}},[ej,el,ev]),eH=ei.default.useRef(eF),eB=ei.default.useRef(eL);eP&&(er=ei.default.Children.only(en));let eU=eP?er&&"object"==typeof er&&er.ref:et,[ez,eq,eZ]=(0,em.useIntersection)({rootMargin:"200px"}),eW=ei.default.useCallback($=>{(eB.current!==eL||eH.current!==eF)&&(eZ(),eB.current=eL,eH.current=eF),ez($),eU&&("function"==typeof eU?eU($):"object"==typeof eU&&(eU.current=$))},[eL,eU,eF,eZ,ez]);ei.default.useEffect(()=>{eV&&eq&&eO&&prefetch(eV,eF,eL,{locale:eI},{kind:eM},eD)},[eL,eF,eq,eI,eO,null==ej?void 0:ej.locale,eV,eD,eM]);let eG={ref:eW,onClick($){eP||"function"!=typeof eS||eS($),eP&&er.props&&"function"==typeof er.props.onClick&&er.props.onClick($),eV&&!$.defaultPrevented&&function($,et,en,er,eo,el,eu,ed,eh,ep){let{nodeName:em}=$.currentTarget,ef="A"===em.toUpperCase();if(ef&&(function($){let et=$.currentTarget,en=et.getAttribute("target");return en&&"_self"!==en||$.metaKey||$.ctrlKey||$.shiftKey||$.altKey||$.nativeEvent&&2===$.nativeEvent.which}($)||!eh&&!(0,es.isLocalURL)(en)))return;$.preventDefault();let navigate=()=>{let $=null==eu||eu;"beforePopState"in et?et[eo?"replace":"push"](en,er,{shallow:el,locale:ed,scroll:$}):et[eo?"replace":"push"](er||en,{forceOptimisticNavigation:!ep,scroll:$})};eh?ei.default.startTransition(navigate):navigate()}($,eV,eF,eL,ek,eC,eE,eI,eD,eO)},onMouseEnter($){eP||"function"!=typeof eT||eT($),eP&&er.props&&"function"==typeof er.props.onMouseEnter&&er.props.onMouseEnter($),eV&&(eO||!eD)&&prefetch(eV,eF,eL,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},{kind:eM},eD)},onTouchStart($){eP||"function"!=typeof eA||eA($),eP&&er.props&&"function"==typeof er.props.onTouchStart&&er.props.onTouchStart($),eV&&(eO||!eD)&&prefetch(eV,eF,eL,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},{kind:eM},eD)}};if((0,eu.isAbsoluteUrl)(eL))eG.href=eL;else if(!eP||ew||"a"===er.type&&!("href"in er.props)){let $=void 0!==eI?eI:null==ej?void 0:ej.locale,et=(null==ej?void 0:ej.isLocaleDomain)&&(0,ef.getDomainLocale)(eL,$,null==ej?void 0:ej.locales,null==ej?void 0:ej.domainLocales);eG.href=et||(0,eg.addBasePath)((0,ed.addLocale)(eL,$,null==ej?void 0:ej.defaultLocale))}return eP?ei.default.cloneElement(er,eG):ei.default.createElement("a",{...eN,...eG},en)}),e_=ex;("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esModule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},33530:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"normalizeLocalePath",{enumerable:!0,get:function(){return normalizeLocalePath}});let normalizeLocalePath=($,et)=>en(11774).normalizeLocalePath($,et);("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esMo
1856dule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},40920:function($,et,en){"use strict";Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"useIntersection",{enumerable:!0,get:function(){return useIntersection}});let er=en(67294),ei=en(63436),eo="function"==typeof IntersectionObserver,es=new Map,el=[];function useIntersection($){let{rootRef:et,rootMargin:en,disabled:eu}=$,ed=eu||!eo,[eh,ep]=(0,er.useState)(!1),em=(0,er.useRef)(null),ef=(0,er.useCallback)($=>{em.current=$},[]);(0,er.useEffect)(()=>{if(eo){if(ed||eh)return;let $=em.current;if($&&$.tagName){let er=function($,et,en){let{id:er,observer:ei,elements:eo}=function($){let et;let en={root:$.root||null,margin:$.rootMargin||""},er=el.find($=>$.root===en.root&&$.margin===en.margin);if(er&&(et=es.get(er)))return et;let ei=new Map,eo=new IntersectionObserver($=>{$.forEach($=>{let et=ei.get($.target),en=$.isIntersecting||$.intersectionRatio>0;et&&en&&et(en)})},$);return et={id:en,observer:eo,elements:ei},el.push(en),es.set(en,et),et}(en);return eo.set($,et),ei.observe($),function(){if(eo.delete($),ei.unobserve($),0===eo.size){ei.disconnect(),es.delete(er);let $=el.findIndex($=>$.root===er.root&&$.margin===er.margin);$>-1&&el.splice($,1)}}}($,$=>$&&ep($),{root:null==et?void 0:et.current,rootMargin:en});return er}}else if(!eh){let $=(0,ei.requestIdleCallback)(()=>ep(!0));return()=>(0,ei.cancelIdleCallback)($)}},[ed,en,et,eh,em.current]);let eg=(0,er.useCallback)(()=>{ep(!1)},[]);return[ef,eh,eg]}("function"==typeof et.default||"object"==typeof et.default&&null!==et.default)&&void 0===et.default.__esModule&&(Object.defineProperty(et.default,"__esModule",{value:!0}),Object.assign(et.default,et),$.exports=et.default)},72123:function($,et,en){"use strict";en.r(et),en.d(et,{default:function(){return _app}});var er,ei=en(85893);en(25538),en(70415),en(45795),en(16713),en(92261),en(56735),en(69831),en(97480),en(14531);var eo=en(9473),es=en(4298),el=en.n(es),eu=en(61149),ed=en(73845),eh=en(62286),ep=en.n(eh),em=en(67294),ef=en(43910),eg=en(92369),ey=en(609),ev=en(48645),ex=en(37009),e_=en(11163),ew=en(88090),atoms_AuthState=function($){let{children:et}=$,en=(0,ed.T)(),er=(0,eo.v9)(ey.zv),es=(0,e_.useRouter)(),[el,eu]=(0,em.useState)(null),{auth:eh}=(0,eg.UM)(),ek=(0,em.useRef)(!1),eC=(0,em.useRef)(!1),eE=(0,em.useRef)(0),eI=(0,em.useRef)(0),eS=(0,em.useRef)(0);return(0,em.useEffect)(()=>{if(el)ek.current||(ek.current=!0,eS.current=0,en((0,ey.BT)({uid:el})),en((0,ex.iq)({uid:el})),(0,ev.F1)().then($=>{localStorage.setItem("headercheck",$.toString())}).catch(()=>!1),fetch("/api/email/mark",{method:"POST",body:JSON.stringify({type:"login"}),headers:{"Content-Type":"application/json"}}).catch(()=>{}));else{if(eC.current)return;for(let $ of(eC.current=!0,ew.Hq))en((0,ex.iC)({courseName:$}))}},[en,es,el]),(0,em.useEffect)(()=>{if(!er)return;let $=null==eh?void 0:eh.currentUser;if(!$||eS.current>=8)return;let et=Math.min(500*2**eS.current,8e3),ei=setTimeout(()=>{eS.current++,en((0,ey.BT)({uid:$.uid})),en((0,ex.lY)(!0))},et);return()=>clearTimeout(ei)},[en,er,eh]),(0,em.useEffect)(function(){if(!es||!en||!eh)return;let $=(0,ef.Aj)(eh,async $=>{if($)en((0,ex.lY)(!0)),eu($.uid),"/"===es.pathname&&setTimeout(()=>es.push("/home"),2e3);else if(localStorage.removeItem("photoURL"),ep().destroy(null,"codedextoken",{path:"/"}),"/home"===es.pathname)return es.push("/")}),et=(0,ef.MX)(eh,async $=>{if($)try{let et=await (null==$?void 0:$.getIdToken());ep().set(null,"codedextoken",et,{maxAge:1209600,expires:new Date(Date.now()+12096e5),path:"/",sameSite:"lax",secure:!0});let en=Date.now();if(en-eE.current<36e5&&en<eI.current)return;try{let $=await fetch("/api/auth/verifySession"),er=await $.json();eE.current=en,er.authenticated?eI.current=en+6048e5:(await fetch("/api/auth/sessionLogin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:et})}),eI.current=en+12096e5)}catch($){console.error("Error managing session cookie:",$)}}catch($){console.error("error getting token",$)}});return()=>{et&&et(),$&&$()}},[eh,en,es]),(0,em.useEffect)(()=>{let $=setInterval(async()=>
1856{if(el){if(!(null==eh?void 0:eh.currentUser)){clearInterval($);return}let en=Date.now();if(!(en<eI.current))try{let $=await fetch("/api/auth/verifySession"),er=await $.json();if(eE.current=en,er.authenticated)eI.current=en+6048e5;else{var et;let $=await (null==eh?void 0:null===(et=eh.currentUser)||void 0===et?void 0:et.getIdToken(!0));$&&(ep().set(null,"codedextoken",$,{maxAge:1209600,expires:new Date(Date.now()+12096e5),path:"/",sameSite:"lax",secure:!0}),await fetch("/api/auth/sessionLogin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:$})}),eI.current=en+12096e5)}}catch($){console.error("Error checking/refreshing session:",$)}}else clearInterval($)},3e5);return()=>{$&&clearInterval($)}},[null==eh?void 0:eh.currentUser,el]),(0,ei.jsx)(ei.Fragment,{children:et})},ek=en(19521),eC=en(82133),eE=en(85673),eI=en(50037),eS=en(64742),eT=en(41514),eA=en(82729),eP=en(20759),eN=en(81798);function _templateObject(){let $=(0,eA._)(["\n margin-top: 2rem;\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 800px;\n width: 100%;\n\n .progress-bar {\n flex: 1;\n width: 100%;\n height: 12px;\n transition: background 0.1s ease;\n }\n\n .onboarding-skip-btn {\n margin: 0px;\n color: #475569;\n color: ",';\n\n font-family: "Mulish", sans-serif;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n padding: 0px 4px;\n }\n']);return _templateObject=function(){return $},$}let ej=ek.default.div.withConfig({componentId:"sc-d1d1ffad-0"})(_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]});var onBoarding_OnBoardingProgressBar=function($){let{prevScene:et,percentageCompleted:en,darkTheme:er,sceneIndex:eo=null}=$,[es,el]=(0,em.useState)(0),eu=(0,em.useRef)(0);(0,em.useRef)(null);let eh=(0,ed.T)(),ep=(0,e_.useRouter)();return(0,em.useEffect)(()=>{let $,et;return en!==eu.current&&(cancelAnimationFrame(et),et=requestAnimationFrame(function animateProgress(er){$||($=er);let ei=er-$,eo=en-eu.current,es=Math.min(eu.current+ei/500*eo,en);el(es),es<en?et=requestAnimationFrame(animateProgress):eu.current=en})),()=>cancelAnimationFrame(et)},[en]),(0,ei.jsxs)(ej,{children:[0!=eo&&(0,ei.jsx)(eN.Z,{onClick:()=>et(),className:"nes-pointer base-arrow-bar",color:er?"#94A3B8":"#64748B"}),(0,ei.jsx)(eP.Z,{borderColor:er?"475569":"94A3B8",className:"progress-bar",style:{background:"linear-gradient(to right, #A3E635 ".concat(es,"%, ").concat(er?"#1E293A":"#F1F5F9"," ").concat(es,"%)")}}),(0,ei.jsx)("p",{className:"onboarding-skip-btn nes-pointer",onClick:()=>void(eh((0,ey.J)({type:null,status:"hide",properties:{}})),"/onboarding"===ep.pathname&&ep.push("/home")),children:"Skip"})]})},eR=en(75659),eV=en(25294),eD=en(73857);function OnboardingStepConsumer_templateObject(){let $=(0,eA._)(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100dvh;\n padding: 0px 24px;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index: 100;\n background-color: ",";\n overflow: auto;\n\n image-rendering: -moz-crisp-edges;\n image-rendering: -webkit-crisp-edges;\n image-rendering: pixelated;\n image-rendering: crisp-edges;\n\n .cutscene-main-content {\n display: flex;\n justify-content: center;\n width: 100%;\n padding-top: 32px;\n align-items: safe center;\n flex: 1;\n height: auto;\n overflow: scroll;\n scrollbar-width: none;\n\n "," {\n flex: initial;\n align-items: center;\n min-height: fit-content;\n overflow: visible;\n }\n }\n\n .cutscene-button-wrapper {\n a {\n text-decoration: none;\n }\n padding: 16px 0px 24px 0px;\n\n "," {\n padding: 32px 24px 80px 24px;\n }\n\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n width: 100%;\n\n button {\n width: 100%;\n \n "," {\n width: 240px;\n }\n }\n }\n"]);return OnboardingStepConsumer_templateObject=function(){return $},$}
1856function _templateObject1(){let $=(0,eA._)(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100vh;\n z-index: 101;\n pointer-events: none;\n\n opacity: ",";\n transition: opacity 1.5s ease-in-out;\n animation: ",";\n\n background: url(",") 50% / cover no-repeat;\n image-rendering: -moz-crisp-edges;\n image-rendering: -webkit-crisp-edges;\n image-rendering: pixelated;\n image-rendering: crisp-edges;\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n"]);return _templateObject1=function(){return $},$}let eO=ek.default.div.withConfig({componentId:"sc-319d7b0d-0"})(OnboardingStepConsumer_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.sm});ek.default.div.withConfig({componentId:"sc-319d7b0d-1"})(_templateObject1(),$=>{let{fadeOut:et}=$;return et?0:1},$=>{let{fadeOut:et}=$;return et?"fadeOut 2s ease-in-out forwards":"fadeIn 2s ease-in-out forwards"},$=>{let{bannerImageLink:et}=$;return et});var onBoarding_OnboardingStepConsumer=function($){let{buttons:et=(0,ei.jsx)(ei.Fragment,{}),children:en,disableSkip:er=!1,progress:eo,...es}=$;return(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsxs)(eO,{...es,children:[eo,(0,ei.jsx)("div",{className:"cutscene-main-content",children:en}),(0,ei.jsx)("div",{className:"cutscene-button-wrapper",children:et})]})})};function OnBoardingWelcome_templateObject(){let $=(0,eA._)(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n\n .top-container {\n display: flex;\n justify-content: center;\n flex-direction: column;\n gap: 24px;\n\n .bot-image {\n display: flex;\n justify-content: center;\n\n img {\n width: 200px;\n height: 200px;\n }\n }\n\n .messages {\n display: flex;\n justify-content: center;\n }\n }\n"]);return OnBoardingWelcome_templateObject=function(){return $},$}let eM=ek.default.div.withConfig({componentId:"sc-c88d533e-0"})(OnBoardingWelcome_templateObject()),eF=["Hey there! I'm your personal coding companion!","I'm here to help you start your learning journey!","But enough about me â let's talk about you!"];var onBoarding_OnBoardingWelcome=function($){let{componentPadding:et,setSceneIndex:en,progress:er,maxWidth:eo}=$,[es,el]=(0,em.useState)(0);return(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{buttons:(0,ei.jsx)(eD.Z,{variant:"blue",onClick:()=>(function(){if(es===eF.length-1)return en($=>$+1);el(es+1)})(),children:"Continue"}),progress:er,children:(0,ei.jsx)(eM,{style:{maxWidth:eo},children:(0,ei.jsxs)("div",{className:"top-container",children:[(0,ei.jsx)("div",{className:"bot-image",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"messages",children:(0,ei.jsx)(eV.Z,{message:eF[es],firstScene:!0})})]})})})},eL=en(81043),eH=en(82846),eB=en(76190);function OnBoardingCharacterSelection_templateObject(){let $=(0,eA._)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 3rem;\n\n .top-container {\n display: flex;\n gap: 16px;\n width: 100%;\n flex: 1;\n\n .inner-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n height: inherit;\n gap: 24px;\n\n .image-message {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n }\n\n .message-container {\n flex: 1;\n width: 100%;\n }\n\n .image-container {\n flex-shrink: 0;\n\n img {\n width: 102px;\n height: 102px;\n }\n }\n }\n\n .customizer-outter-wrapper {\n flex: 1;\n display: flex;\n align-items: center;\n }\n }\n }\n\n .button-container {\n display: flex;\n justify-content: center;
1856\n align-items: center;\n height: 250px;\n background-color: ",";\n\n button {\n width: 200px;\n }\n }\n"]);return OnBoardingCharacterSelection_templateObject=function(){return $},$}let eU=ek.default.div.withConfig({componentId:"sc-6cdca08a-0"})(OnBoardingCharacterSelection_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]});var onBoarding_OnBoardingCharacterSelection=function($){let{componentPadding:et,setSceneIndex:en,progress:er,maxWidth:es}=$,el=(0,ed.T)(),eu=(0,eo.v9)(ey.$u)||0,eh=(0,em.useRef)(!1),[ep,ef]=(0,em.useState)(!1),[eg,ev]=(0,em.useState)(!0),ex=(0,eo.v9)(eB.Lb),e_=(0,eo.v9)(eB.Om),ew=(0,eo.v9)(eB.aW);async function handleSaveAvatar(){let $=(0,eH.W)(e_,ew);if($)try{ef(!0),await el((0,ey.KC)($)).unwrap()}catch($){console.log("Failed to save avatar:",$),alert("Failed to save avatar. Please try again.")}finally{ef(!1)}}async function handleClick(){if(eg){eh.current=!0,setTimeout(()=>{eh.current=!1},500),"custom"===ex?await handleSaveAvatar():await el((0,ey.Ii)({characterModelIndex:eu})),el((0,eE.fz)({message:"Character saved!",type:"success",timeout:1500})),ev(!1);return}en($=>$+=1)}return(0,em.useEffect)(()=>{eh.current||ev(!0)},[e_,eu]),(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{buttons:(0,ei.jsx)(eD.Z,{variant:eg?"subtle":"blue",onClick:()=>handleClick(),isLoading:ep,children:eg?"Save changes":"Continue"}),progress:er,children:(0,ei.jsx)(eU,{style:{maxWidth:es},children:(0,ei.jsx)("div",{className:"top-container",children:(0,ei.jsxs)("div",{className:"inner-container",children:[(0,ei.jsxs)("div",{className:"image-message",children:[(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"message-container",children:(0,ei.jsx)(eV.Z,{message:"First, let's choose your look. You can switch this up later, too."})})]}),(0,ei.jsx)("div",{className:"customizer-outter-wrapper",children:(0,ei.jsx)(eL.Z,{forOnboarding:!0})})]})})})})},ez=en(3649),eq=en(20979),icons_CharacterPlatformSvg=function($){let{color:et="#E2E8F0",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"164",height:"33",viewBox:"0 0 164 33",fill:"none",...en,children:(0,ei.jsx)("ellipse",{cx:"82",cy:"16.5",rx:"81.5",ry:"16.5",fill:et})})},eZ=en(45121),eW=en(5592),eG=en(83782);function ObUsernameUpdate_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 32px;\n position: relative;\n\n .platform {\n z-index: 1;\n position: absolute;\n top: 148px;\n left: 49%;\n transform: translateX(-49%);\n }\n\n .character-container {\n position: relative;\n z-index: 4;\n display: flex;\n justify-content: center;\n\n img {\n height: 180px;\n width: auto;\n }\n }\n\n .username-update {\n display: flex;\n flex-direction: column;\n gap: 12px;\n position: relative;\n\n .username-label {\n margin: 0px;\n font-family: "Mulish", sans-serif;\n font-weight: 800;\n }\n\n .input-container {\n padding: 12px 16px;\n display: flex;\n position: relative;\n\n input {\n border: none;\n outline: none;\n background: none;\n box-shadow: none;\n padding: 0;\n font-family: "Mulish", sans-serif;\n width: 228px;\n\n color: ',";\n\n ::placeholder {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 0px;\n }\n\n font-weight: 500;\n }\n }\n\n .result-message {\n position: absolute;\n width: 100%;\n top: calc(100% + 8px);\n left: 0px;\n font-family: "Mulish", sans-serif;\n\n p {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n\n .validating {\n color: ',";\n }\n\n .unique {\n color: ",";\n }\n\n .non-unique {\n color: ",";\n }\n }\n }\n"]);
1856return ObUsernameUpdate_templateObject=function(){return $},$}let e$=ek.default.div.withConfig({componentId:"sc-1a023590-0"})(ObUsernameUpdate_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["50"]:et.colors.palette.grey["950"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.green["300"]:et.colors.palette.green["800"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.red["300"]:et.colors.palette.red["800"]});var onBoarding_ObUsernameUpdate=function($){let{newUserName:et,setNewUserName:en,messageIndex:er,setUserNameCheckPassed:es}=$,el=(0,eo.v9)(ey.f8),eu=(0,eo.v9)(ey.zr),ed=(0,eo.v9)(ey.o4)||"dark",eh=(0,eo.v9)(ey.jl),ep=(0,eo.v9)(ey.$u)||0,ef=(0,eq.v)(et,eu,el);return(0,em.useEffect)(()=>{es("valid"===ef.status)},[ef.status,es]),(0,ei.jsxs)(e$,{children:[(0,ei.jsx)(icons_CharacterPlatformSvg,{className:"platform",color:"dark"===ed?"#334155":"#E2E8F0"}),(0,ei.jsx)("div",{className:"character-container",children:(0,ei.jsx)("img",{src:eh[ep],className:"nes-pointer",alt:""})}),(0,ei.jsxs)("div",{className:"username-update",style:{opacity:0===er?1:0},children:[(0,ei.jsx)(ez.Z,{className:"input-container",borderColor:et?"invalid"===ef.status?"9f1239":"valid"===ef.status?"22C55E":"14ADFF":"94A3B8",children:(0,ei.jsx)("input",{value:et,placeholder:"Choose a username",onChange:$=>{es(!1);let et=$.target.value.replace(/\s+/g,"");en(et.length<=15?et:et.slice(0,15))}})}),(0,ei.jsxs)("div",{className:"result-message",children:["validating"===ef.status&&(0,ei.jsxs)("p",{className:"validating",children:[(0,ei.jsx)(eZ.Z,{}),"Checking availability..."]}),"valid"===ef.status&&(0,ei.jsxs)("p",{className:"unique",children:[(0,ei.jsx)(eW.Z,{}),"Username is available!"]}),"invalid"===ef.status&&ef.error&&(0,ei.jsxs)("p",{className:"non-unique",children:[(0,ei.jsx)(eG.Z,{}),ef.error]})]})]})]})},eJ=en(47010);function onBoardingUsername_templateObject(){let $=(0,eA._)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 4rem;\n\n .top-container {\n display: flex;\n align-items: center;\n gap: 16px;\n width: 100%;\n flex: 1;\n\n .inner-container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n .image-message {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n }\n\n .message-container {\n flex: 1;\n width: 100%;\n }\n\n .image-container {\n flex-shrink: 0;\n\n img {\n width: 102px;\n height: 102px;\n }\n }\n }\n\n .username-update-wrapper {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n }\n }\n\n .button-container {\n display: flex;\n justify-content: center;
1856\n align-items: center;\n height: 250px;\n background-color: ",";\n\n button {\n width: 200px;\n\n .loader {\n display: flex;\n align-items: center;\n\n padding-top: 6px;\n }\n }\n }\n"]);return onBoardingUsername_templateObject=function(){return $},$}let eK=ek.default.div.withConfig({componentId:"sc-7ff0b6df-0"})(onBoardingUsername_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]});var onBoardingUsername=function($){let{componentPadding:et,setSceneIndex:en,progress:er,maxWidth:es}=$,el=(0,ed.T)();(0,eo.v9)(ey.f8);let eu=(0,eo.v9)(ey.zr),[eh,ep]=(0,em.useState)(""),[ef,eg]=(0,em.useState)(0),[ev,ex]=(0,em.useState)(!1),[e_,ew]=(0,em.useState)(!1),[ek,eC]=(0,em.useState)(!1),eI=e_?eu:eh,eS=["Looking good! What should I call you?",e_?"I'll call you <strong>".concat(eI,"</strong>, but you can always change this later."):"Nice to meet you <strong>".concat(eI,"</strong>. Now let's find something to learn!")];async function updateUsername(){try{var $;eC(!0);let et=await el((0,ey.ck)({data:{username:eh}}));(null==et?void 0:null===($=et.meta)||void 0===$?void 0:$.requestStatus)=="fulfilled"?eg(ef+1):el((0,eE.fz)({message:"Failed to save username. Please try again.",type:"error",timeout:3e3}))}finally{eC(!1)}}return(0,em.useEffect)(()=>{let $=document.getElementById("onboarding-username-confirm-btn");$&&$.scrollIntoView({behavior:"smooth"})},[]),(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{progress:er,buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{id:"onboarding-username-confirm-btn",variant:"blue",disabled:0===ef&&!ev,onClick:()=>(function(){if(ef===eS.length-1)return en($=>$+=1);updateUsername()})(),children:ek?(0,ei.jsx)(eJ.Z,{color:"#E2E8F0",className:"loader"}):"Continue"}),0===ef&&(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>void(ew(!0),eg(1)),children:"I'll decide later"})]}),children:(0,ei.jsx)(eK,{style:{maxWidth:es},children:(0,ei.jsx)("div",{className:"top-container",children:(0,ei.jsxs)("div",{className:"inner-container",children:[(0,ei.jsxs)("div",{className:"image-message",children:[(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"message-container",children:(0,ei.jsx)(eV.Z,{message:eS[ef],height:1===ef&&"86px"})})]}),(0,ei.jsx)("div",{className:"username-update-wrapper",children:(0,ei.jsx)(onBoarding_ObUsernameUpdate,{newUserName:eh,setNewUserName:ep,messageIndex:ef,setUserNameCheckPassed:ex})})]})})})})};function ObQuestion_templateObject(){let $=(0,eA._)(["\n position: relative;\n\n "," {\n height: fit-content !important;\n }\n\n "," {\n height: 88px !important;\n }\n\n p {\n margin: 0px;\n }\n\n .cursor-icon {\n position: absolute;\n left: -90px;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .pixel-container {\n "," {\n height: fit-content;\n }\n\n "," {\n height: inherit;\n }\n\n .inner-pixel-container {\n height: 95.5%;\n padding: 16px;\n display: flex;\n align-items: center;\n gap: 16px;\n\n .question-content {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n .description {\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n }\n']);return ObQuestion_templateObject=function(){return $},$}let eQ=ek.default.div.withConfig({componentId:"sc-1a2b62d6-0"})(ObQuestion_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["50"]:et.colors.palette.grey["950"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]});var onBoarding_ObQuestion=function($){let{selected:et,answers:en,...er}=$,es=(0,eo.v9)(ey.o4)||"dark",el="dark"===es;return(0,ei.jsx)(eQ,{...er,style:{height:(null==en?void 0:en.description)?"88px":"72px"},children:(0,ei.jsx)(ez.Z,{borderColor:et?"14adff":el?"64748B":"CBD5E1",className:"pixel-container nes-pointer",style:{background:et?el?"#00568D":"#B6E4FF":""},children:(0,ei.jsxs)(ez.Z,{borderColor:et?"14adff":el?"64748B":"CBD5E1",className:"inner
1856-pixel-container",style:{background:et?el?"#042D4D":"#DEF1FF":""},children:[en.icon,(0,ei.jsxs)("div",{className:"question-content",children:[(0,ei.jsx)("p",{className:"title",children:en.title}),(null==en?void 0:en.description)&&(0,ei.jsx)("p",{className:"description",children:en.description})]})]})})})};function OnBoardingQuestion_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n\n to {\n opacity: 1;\n transform: translateZ(0);\n }\n"]);return OnBoardingQuestion_templateObject=function(){return $},$}function OnBoardingQuestion_templateObject1(){let $=(0,eA._)(["\n /* height: 100%; */\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 32px;\n /* background-color: ","; */\n\n height: 100%;\n\n .top-container {\n display: flex;\n width: 100%;\n flex: 1;\n\n .inner-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n height: inherit;\n gap: 16px;\n\n .image-message {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n }\n\n .message-container {\n width: 100%;\n flex: 1;\n }\n\n .image-container {\n flex-shrink: 0;\n\n img {\n width: 102px;\n height: 102px;\n }\n }\n }\n\n .questions-container {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 8px;\n\n .question-item {\n opacity: 0;\n animation: "," 400ms ease forwards;\n animation-delay: calc(var(--item-index, 0) * 100ms + 200ms);\n }\n }\n }\n }\n\n"]);return OnBoardingQuestion_templateObject1=function(){return $},$}let eX=(0,ek.keyframes)(OnBoardingQuestion_templateObject()),eY=ek.default.div.withConfig({componentId:"sc-10b0932a-0"})(OnBoardingQuestion_templateObject1(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]},$=>{let{theme:et}=$;return et.breakpoints.sm},eX);var onBoarding_OnBoardingQuestion=function($){let{componentPadding:et,answers:en,question:er,setSceneIndex:eo,setAnswers:es,questionType:el,maxWidth:eu,progress:ed}=$,[eh,ep]=(0,em.useState)(null);return(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{progress:ed,buttons:(0,ei.jsx)(eD.Z,{id:"onboarding-question-confirm-btn",variant:"blue",onClick:()=>{es($=>({...$,[el]:eh})),eo($=>$+1),(0,eT.L7)({eventName:"onboarding-".concat(eh)})},disabled:!eh,children:"Continue"}),children:(0,ei.jsx)(eY,{style:{maxWidth:eu},id:"aos-anchor",children:(0,ei.jsx)("div",{className:"top-container",children:(0,ei.jsxs)("div",{className:"inner-container",children:[(0,ei.jsxs)("div",{className:"image-message",children:[(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"message-container",children:(0,ei.jsx)(eV.Z,{message:er})})]}),(0,ei.jsx)("div",{className:"questions-container",children:en.map(($,et)=>(0,ei.jsx)("div",{className:"question-item",style:{"--item-index":et},children:(0,ei.jsx)(onBoarding_ObQuestion,{selected:eh===$.internalName,answers:$,onClick:()=>(function($){let{answer:et}=$;ep(et.internalName);let en=document.getElementById("onboarding-question-confirm-btn");en&&en.scrollIntoView({behavior:"smooth"})})({answer:$})})},$.internalName))})]})})})})},e0=en(75128);function ObCourseCard_templateObject(){let $=(0,eA._)(["\n border-radius: 8px;\n padding: 24px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n flex: 1;\n\n &.selected {\n background-color: ",";\n }\n\n button {\n width: 100%;\n }\n\n /* color: ","; */\n"]);return ObCourseCard_templateObject=function(){return $},$}let e1=ek.default.div.withConfig({componentId:"sc-ed920bff-0"})(ObCourseCard_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["950"]:et.colors.palette.blue["50"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]});var onBoarding_ObCourseCard=function($){let{courseName:et,selected:en=!0,preventLink:er=!1,btnAction:eo=()=>{},...es}=$;return(0,ei.jsxs)(e1,{className:"".concat(en&&"selected"),...es,children:[(0,ei.jsx)(e0.Z,{courseName:et,isLoading:!1,cardWidth:"100%",onClick:$=>{er&&$.preventDefault()}}),en&&(0,ei.jsx)(eD.Z,{onClick:()=>eo(),children:"Start Learning"})]})};
1856function ExploreCatalog_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n\n to {\n opacity: 1;\n transform: translateZ(0);\n }\n"]);return ExploreCatalog_templateObject=function(){return $},$}function ExploreCatalog_templateObject1(){let $=(0,eA._)(['\n display: flex;\n align-items: center;\n flex-direction: column;\n padding-bottom: 3rem;\n p {\n margin: 0px;\n }\n .course-tags {\n margin-top: 1rem;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n font-family: "Mulish", sans-serif;\n\n .tag {\n padding: 8px 16px;\n border-radius: 200px;\n border: 2px solid\n ',";\n transition-duration: 0.2s;\n\n p {\n color: ",";\n\n text-align: center;\n\n font-style: normal;\n font-weight: 600;\n\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n "," {\n font-size: 14px;\n }\n "," {\n font-size: 16px;\n }\n }\n\n :hover {\n background: ",";\n }\n }\n\n .tag-selected {\n border: 2px solid ",";\n background: ",";\n p {\n color: ",";\n }\n }\n }\n\n .course-list {\n margin-top: 32px;\n display: grid;\n gap: 32px 24px;\n\n .course-item {\n opacity: 0;\n animation: "," 800ms ease forwards;\n animation-delay: calc(var(--item-index, 0) * 50ms + 50ms);\n }\n\n "," {\n grid-template-columns: repeat(1, 1fr);\n padding: 0rem;\n }\n "," {\n grid-template-columns: repeat(2, 1fr);\n padding: 0rem 2rem;\n }\n\n "," {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n"]);return ExploreCatalog_templateObject1=function(){return $},$}let e2=(0,ek.keyframes)(ExploreCatalog_templateObject()),e5=ek.default.div.withConfig({componentId:"sc-5592ce43-0"})(ExploreCatalog_templateObject1(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["600"]:et.colors.palette.grey["300"]},$=>{let{theme:et}=$;return"dark"==et.mode?"#fff":"#020617"},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["800"]:et.colors.palette.grey["100"]},$=>{let{theme:et}=$;return et.colors.palette.blue["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["950"]:et.colors.palette.blue["50"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.blue["400"]:et.colors.palette.blue["700"]},e2,$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md});var onBoarding_ExploreCatalog=function($){let{componentPadding:et,defaultTag:en,setUserSelectedCourse:er}=$,[es,el]=(0,em.useState)(en?[en]:[]),eu=(0,eo.v9)(ew.tp),ed=(0,eo.v9)(ew.dh),eh=(0,em.useCallback)($=>{el(et=>"all"===$?[]:et.includes($)?et.filter(et=>et!==$):[$])},[]);return(0,ei.jsxs)(e5,{children:[(0,ei.jsxs)("div",{className:"course-tags desktop-filters",children:[(0,ei.jsx)("div",{className:"tag nes-pointer",onClick:()=>eh("all"),id:"anchor",children:(0,ei.jsx)("p",{children:"All"})}),eu.map($=>(0,ei.jsx)("div",{className:"tag nes-pointer ".concat(es.includes($.internalName)&&"tag-selected"),onClick:()=>eh($.internalName),children:(0,ei.jsx)("p",{children:$.displayName})},$.internalName))]}),(0,ei.jsx)("div",{className:"course-list",children:ed.map(($,et)=>{if(es.some(et=>$.tags.includes(et))||0===es.length)return(0,ei.jsx)("div",{className:"course-item",style:{"--item-index":et},children:(0,ei.jsx)(e0.Z,{courseName:$.internlName,cardWidth:"100%",isLoading:!1,onClick:et=>{et.preventDefault(),er($.internlName)}})},$.internlName)})})]})};function RecommendCourse_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"]);return RecommendCourse_templateObject=function(){return $},$}function RecommendCourse_templateObject1(){let $=(0,eA._)(["\n display: flex;\n justify-content: center;\n padding: 1rem;\n\n opacity: 0;\n animation: "," 1s ease-in-out forwards;
1856\n\n .recommened-course-inner-container {\n width: 391px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .title-container {\n display: flex;\n align-items: center;\n gap: 12px;\n\n .line {\n height: 2px;\n background-color: ",";\n flex: 1;\n }\n\n p {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n .explore-more {\n margin: 0px;\n text-align: center;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n']);return RecommendCourse_templateObject1=function(){return $},$}let e3=(0,ek.keyframes)(RecommendCourse_templateObject()),e6=ek.default.div.withConfig({componentId:"sc-193aa106-0"})(RecommendCourse_templateObject1(),e3,$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["700"]:et.colors.palette.grey["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]});var onBoarding_RecommendCourse=function($){let{courseName:et,exploreMore:en,componentPadding:er,setUserSelectedCourse:eo}=$,[es,el]=(0,em.useState)(!1);return(0,ei.jsxs)(e6,{children:[es&&(0,ei.jsx)(onBoarding_ExploreCatalog,{defaultTag:"all"==en?null:en,componentPadding:er,setUserSelectedCourse:eo}),!es&&(0,ei.jsxs)("div",{className:"recommened-course-inner-container",children:[(0,ei.jsxs)("div",{className:"title-container",children:[(0,ei.jsx)("div",{className:"line"}),(0,ei.jsx)("p",{children:"Recommended COURSE â¨"}),(0,ei.jsx)("div",{className:"line"})]}),(0,ei.jsx)(onBoarding_ObCourseCard,{courseName:et,onClick:()=>eo(et),preventLink:!0}),en&&(0,ei.jsx)("p",{className:"explore-more nes-pointer",onClick:()=>el(!0),children:"Explore more courses"})]})]})};function RecommendPath_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"]);return RecommendPath_templateObject=function(){return $},$}function RecommendPath_templateObject1(){let $=(0,eA._)(["\n display: flex;\n justify-content: center;\n padding: 1rem;\n\n .recommened-path-inner-container {\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .title-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n opacity: 0;\n animation: "," 1s ease-in-out forwards;\n\n .inner-title-container {\n display: flex;\n align-items: center;\n gap: 12px;\n\n .line {\n height: 2px;\n background-color: ",";\n flex: 1;\n }\n\n p {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n h2 {\n margin: 0px;\n text-align: center;\n color: ',';\n font-family: "PixelGridS";\n font-size: 24px;\n\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n .description {\n text-align: center;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n }\n }\n\n .surfaced-courses {\n opacity: 0;\n animation: '," 1.5s ease-in-out forwards;\n display: grid;\n "," {\n grid-template-columns: repeat(1, 1fr);\n }\n "," {\n grid-template-columns: repeat(2, 1fr);\n }\n\n "," {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n\n .explore-more {\n margin: 0px;\n text-align: center;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n']);
1856return RecommendPath_templateObject1=function(){return $},$}let e4=(0,ek.keyframes)(RecommendPath_templateObject()),e9=ek.default.div.withConfig({componentId:"sc-4af01b3-0"})(RecommendPath_templateObject1(),e4,$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["700"]:et.colors.palette.grey["200"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["400"]:et.colors.palette.grey["500"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["50"]:et.colors.palette.grey["950"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]},e4,$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["300"]:et.colors.palette.grey["600"]});var onBoarding_RecommendPath=function($){let{recommendation:et,componentPadding:en,setUserSelectedCourse:er}=$,[eo,es]=(0,em.useState)(!1),[el,eu]=(0,em.useState)(0);return(0,ei.jsxs)(e9,{children:[eo&&(0,ei.jsx)(onBoarding_ExploreCatalog,{defaultTag:(null==et?void 0:et.exploreMore)=="all"?null:null==et?void 0:et.exploreMore,componentPadding:en,setUserSelectedCourse:er}),!eo&&(0,ei.jsxs)("div",{className:"recommened-path-inner-container",children:[(0,ei.jsxs)("div",{style:{padding:en},className:"title-container",children:[(0,ei.jsxs)("div",{className:"inner-title-container",children:[(0,ei.jsx)("div",{className:"line"}),(0,ei.jsx)("p",{children:"Recommended journey â¨"}),(0,ei.jsx)("div",{className:"line"})]}),(0,ei.jsx)("h2",{children:et.trackName}),(0,ei.jsx)("p",{className:"description",children:et.trackDescription})]}),(0,ei.jsx)("div",{className:"surfaced-courses",children:et.courses.map(($,et)=>(0,ei.jsx)(onBoarding_ObCourseCard,{courseName:$,selected:el===et,preventLink:!0,btnAction:()=>er($),onClick:()=>{eu(et)}},$))}),(null==et?void 0:et.exploreMore)&&(0,ei.jsx)("p",{className:"explore-more nes-pointer",onClick:()=>es(!0),children:"Explore more courses"})]})]})};function OnBoardingRecommendation_templateObject(){let $=(0,eA._)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: ",";\n\n .top-container {\n display: flex;\n align-items: center;\n gap: 16px;\n width: 100%;\n padding-bottom: 3rem;\n\n .inner-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 2rem;\n\n .image-message {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n }\n\n .message-container {\n flex: 1;\n width: 100%;\n }\n\n .image-container {\n flex-shrink: 0;\n\n img {\n width: 102px;\n height: 102px;\n }\n }\n }\n }\n }\n"]);return OnBoardingRecommendation_templateObject=function(){return $},$}let e8=ek.default.div.withConfig({componentId:"sc-51197e5e-0"})(OnBoardingRecommendation_templateObject(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]},$=>{let{theme:et}=$;return et.breakpoints.sm});var onBoarding_OnBoardingRecommendation=function($){let{componentPadding:et,setSceneIndex:en,finishedAnswers:er,setUserSelectedCourse:eo,maxWidth:es,progress:el}=$,[eu,ed]=(0,em.useState)(!1),eh=function($){let et,{difficulty:en,answer:er}=$;switch(en){case"beginner":et=function($){let et;switch($){case"programming_fundamentals":case"not_sure":et={type:"single_course",course:"python",exploreMore:"beginner"};break;case"analyzing_data":et={type:"track",trackName:"The Legend of Python",trackDescription:"Start learning Python, a beginner-friendly language perfect for coding basics\n and data analysis. Start from the very beginning or skip ahead!",courses:["python","intermediate-python","numpy"],exploreMore:"data-science"};break;case"building_websites":et={type:"track",trackName:"The Origins Trilogy",trackDescription:"Want to create your own website? Learn HTML, CSS, and JavaScript: the three core technologies that make up the web.",courses:["html","css","javascript"],exploreMore:"web-dev"};break;case"something_else":et={type:"explore",defaultTag:"beginner"}}return et}(er);break;case"intermediate":et=function($){let et;switch($){case"programming_fundamentals":et={type:"single_course",course:"python",exploreMore:"all"};break;case"analyzing_data":et={type:"track",trackName:"The Legend of Python",trackDescription:"Start learning Python, a beginner-friendly language perfect for coding basics\n and data analysis. Start from the very beginning or skip ahead!",courses:["python","intermediate-python","numpy"],exploreMore:"data-science"};break;case"building_websites":et={type:"track",trackName:"The Origins Trilogy",trackDescription:"Want to create your own website? Learn HTML, CSS, and JavaScript: the three core technologies that make up the web.",courses:["html","css","javascript"],exploreMore:"web-dev"};break;case"something_else":case"not_sure":et={type:"explore",defaultTag:""}}return et}(er);break;
1856case"advanced":et=function($){let et;switch($){case"programming_fundamentals":et={type:"single_course",course:"python",exploreMore:"all"};break;case"analyzing_data":et={type:"explore",defaultTag:"data-science"};break;case"building_websites":et={type:"explore",defaultTag:"web-dev"};break;case"something_else":case"not_sure":et={type:"explore",defaultTag:""}}return et}(er);break;default:throw Error("Invalid difficulty type")}return et}({difficulty:null==er?void 0:er.diffAnswer,answer:null==er?void 0:er.pathAnswer}),ep={single_course:(0,ei.jsx)(onBoarding_RecommendCourse,{componentPadding:et,courseName:eh.course,exploreMore:eh.exploreMore,setUserSelectedCourse:eo}),track:(0,ei.jsx)(onBoarding_RecommendPath,{componentPadding:et,recommendation:eh,setUserSelectedCourse:eo}),explore:(0,ei.jsx)(onBoarding_ExploreCatalog,{componentPadding:et,defaultTag:eh.defaultTag,setUserSelectedCourse:eo})};return(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{progress:el,children:(0,ei.jsx)(e8,{style:{maxWidth:1200},children:(0,ei.jsx)("div",{className:"top-container",children:(0,ei.jsxs)("div",{className:"inner-container",children:[(0,ei.jsxs)("div",{className:"image-message",style:{padding:et},children:[(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"message-container",children:(0,ei.jsx)(eV.Z,{message:"explore"===eh.type?"Take a look through our courses~":"Here's what I found just for you!",setAction:()=>ed(!0)})})]}),eu&&(0,ei.jsx)(ei.Fragment,{children:ep[eh.type]})]})})})})},icons_DifficultyBar=function($){let{color:et="black",fillBar:en,fillColor:er="#CBD5E1",...eo}=$;return(0,ei.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...eo,children:[(0,ei.jsx)("rect",{width:"5.33333",height:"5.33333",transform:"matrix(1 0 0 -1 5.3335 24)",fill:er}),(0,ei.jsx)("rect",{width:"5.33333",height:"10.6667",transform:"matrix(1 0 0 -1 13.3335 24)",fill:er,"fill-opacity":en>=2?"1":".3"}),(0,ei.jsx)("rect",{width:"5.33333",height:"16",transform:"matrix(1 0 0 -1 21.3335 24)",fill:er,"fill-opacity":en>=3?"1":".3"})]})},e7=en(20517),tt=en(47158),tn=en(56016),tr=en(17249),ti=en(64342),to=en(24207),ts=en(53116);function ObPricingPage_templateObject(){let $=(0,eA._)(['\n position: fixed;\n top: 0;\n left: 0px;\n font-family: "Mulish", sans-serif;\n width: 100%;\n overflow: auto;\n height: 100vh;\n opacity: 0;\n z-index: 20;\n\n animation: fadeIn 1s forwards;\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin: 0;\n }\n']);return ObPricingPage_templateObject=function(){return $},$}let tl=ek.default.div.withConfig({componentId:"sc-d6c259a1-0"})(ObPricingPage_templateObject());var onBoarding_ObPricingPage=function($){let{setShowExtraScene:et}=$;return(0,ei.jsxs)(tl,{children:[(0,ei.jsx)(tn.Z,{setShowExtraScene:et,forOb:!0}),(0,ei.jsx)(tr.Z,{coursePage:!0}),(0,ei.jsx)(ti.Z,{}),(0,ei.jsx)(to.Z,{}),(0,ei.jsx)(ts.Z,{})]})};function ObContinueToPricing_templateObject(){let $=(0,eA._)(["\n margin-top: 2rem;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n .top-container {\n display: flex;\n justify-content: center;\n flex-direction: column;\n gap: 24px;\n\n .bot-image {\n display: flex;\n justify-content: center;\n img {\n width: 200px;\n height: 200px;\n }\n }\n\n .messages {\n display: flex;\n justify-content: center;\n }\n }\n\n .button-container {\n display: flex;\n justify-content: center;
1856\n align-items: center;\n height: 250px;\n\n button {\n width: 200px;\n }\n }\n"]);return ObContinueToPricing_templateObject=function(){return $},$}let tc=ek.default.div.withConfig({componentId:"sc-17f025f0-0"})(ObContinueToPricing_templateObject());var onBoarding_ObContinueToPricing=function($){let{setShowPricing:et,maxWidth:en,progress:er}=$,[eo,es]=(0,em.useState)(0);return(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{buttons:(0,ei.jsx)(eD.Z,{variant:"blue",onClick:()=>et(!0),children:"Continue"}),progress:er,children:(0,ei.jsx)(tc,{style:{maxWidth:en},children:(0,ei.jsxs)("div",{className:"top-container",children:[(0,ei.jsx)("div",{className:"bot-image",children:(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"})}),(0,ei.jsx)("div",{className:"messages",children:(0,ei.jsx)(eV.Z,{message:"Almost done! Before you start coding, let's choose a plan to set you up for success.",firstScene:!0})})]})})})};function DecisionLoader_templateObject(){let $=(0,eA._)(['\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n height: 70%;\n\n img {\n width: 160px;\n height: 160px;\n }\n\n p {\n margin-top: 2rem;\n display: flex;\n flex-direction: column;\n height: 50px;\n\n .python-typewriter {\n margin: 0px;\n text-align: center;\n\n color: #020617;\n\n font-family: "PixelGridM";\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n }\n\n .python-typewriter-cursor {\n display: none;\n }\n }\n']);return DecisionLoader_templateObject=function(){return $},$}let tu=ek.default.div.withConfig({componentId:"sc-ed109df3-0"})(DecisionLoader_templateObject());var onBoarding_DecisionLoader=function($){let{setSceneIndex:et,componentPadding:en,showExtraScene:er,setShowExtraScene:es,maxWidth:el,progress:eu}=$,eh=(0,eo.v9)(ey.XU),ep=(0,ed.T)(),[ef,eg]=(0,em.useState)(!1),[ev,ex]=(0,em.useState)(!1);return(0,em.useEffect)(()=>{let $=(null==eh?void 0:eh.status)==="trigger-next-step-in-on";$&&es(!1)},[ep,null==eh?void 0:eh.status,null==eh?void 0:eh.type,es]),(0,em.useEffect)(()=>{if(ef){let $=setTimeout(()=>{et($=>$+1)},2100);return()=>clearTimeout($)}},[ef,et]),(0,ei.jsx)(ei.Fragment,{children:er?(0,ei.jsx)(ei.Fragment,{children:ev?(0,ei.jsx)(onBoarding_ObPricingPage,{setShowExtraScene:es}):(0,ei.jsx)(onBoarding_ObContinueToPricing,{setShowPricing:ex,maxWidth:el,progress:eu})}):(0,ei.jsx)(onBoarding_OnboardingStepConsumer,{progress:eu,children:(0,ei.jsxs)(tu,{children:[(0,ei.jsx)("img",{src:eR.zv,alt:"codedex bot"}),(0,ei.jsxs)("p",{children:[(0,ei.jsx)(tt.Z,{text:"Beep boop...",setAction:()=>eg(!0),typingSpeed:70}),ef&&(0,ei.jsx)(tt.Z,{text:"Finding a course...",typingSpeed:70})]})]})})})},td=en(46331),th=en(8171),tp=en(30424),tm=en(78590);function CutsceneNav_templateObject(){let $=(0,eA._)(["\n padding: 19px 0px;\n display: flex;\n justify-content: space-between;\n z-index: 102;\n\n .btn-wrapper {\n "," {\n width: fit-content;\n }\n\n "," {\n width: 165px;\n }\n\n button {\n svg {\n "," {\n margin-right: 0px;\n }\n\n "," {\n margin-right: 8px;\n }\n\n path {\n fill: ",";\n }\n }\n\n .btn-text {\n "," {\n display: none;\n }\n\n "," {\n display: inline-block;\n }\n }\n }\n\n .cutscene-skip-arrow {\n transform: rotate(180deg);\n margin-right: 0px;\n margin-left: 8px;\n\n "," {\n margin-left: 0px;\n }\n\n "," {\n margin-left: 8px;\n }\n }\n }\n\n .skip {\n display: flex;\n justify-content: end;\n\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n .codedex-logo-wrapper {\n flex: 1;\n display: flex;\n justify-content: center;
1856\n align-items: center;\n\n .global-logo {\n color: #fff;\n }\n\n .club-notification {\n display: none;\n }\n }\n"]);return CutsceneNav_templateObject=function(){return $},$}let tf=ek.default.div.withConfig({componentId:"sc-33d44be9-0"})(CutsceneNav_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var cutscenes_CutsceneNav=function($){let{disableSkip:et=!1}=$,en=(0,ed.T)(),er=(0,e_.useRouter)(),es=(0,eo.v9)(ey.XU),el=(0,eo.v9)(ew.E0),eu=(0,eo.v9)(ey.i4),eh=el||eu,ep=!et&&["startCourse","credits"].includes(es.properties.type);return(0,ei.jsxs)(tf,{className:"cutscene-consumer-nav-wrapper",children:[(0,ei.jsx)("div",{className:"btn-wrapper",children:(0,ei.jsxs)(eD.Z,{variant:"subtle",size:"small",onClick:()=>void(eh?(en((0,ew.Ss)()),eu&&en((0,ey.h9)({masterMute:!1}))):en((0,ew.S4)())),children:[eh?(0,ei.jsx)(tp.Z,{}):(0,ei.jsx)(th.Z,{}),(0,ei.jsxs)("span",{className:"btn-text",children:["Sound ",eh?"off":"on"]})]})}),(0,ei.jsx)("div",{className:"codedex-logo-wrapper",onClick:()=>void(en((0,ey.J)({type:"",status:"hide",properties:{}})),er.push("/home")),children:(0,ei.jsx)(tm.Z,{})}),(0,ei.jsx)("div",{className:"btn-wrapper skip",style:{opacity:ep?"1":"0"},children:(0,ei.jsxs)(eD.Z,{variant:"subtle",size:"small",onClick:()=>void en((0,ey.J)({...es,properties:{...es.properties,skip:!0}})),disabled:!ep,children:[(0,ei.jsx)("span",{className:"btn-text",children:"Skip"}),(0,ei.jsx)(td.Z,{className:"cutscene-skip-arrow"})]})})]})};function CutsceneConsumer_templateObject(){let $=(0,eA._)(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100dvh;\n padding: 0px 24px;\n display: flex;\n flex-direction: column;\n z-index: 100;\n\n "," {\n overflow: hidden;\n }\n\n "," {\n overflow: auto;\n }\n\n background: ",";\n\n image-rendering: -moz-crisp-edges;\n image-rendering: -webkit-crisp-edges;\n image-rendering: pixelated;\n image-rendering: crisp-edges;\n\n .cutscene-main-content {\n display: flex;\n justify-content: center;\n\n "," {\n align-items: safe center;\n padding: 1rem 0rem;\n flex: 1;\n height: auto;\n overflow: scroll;\n }\n\n "," {\n align-items: center;\n padding: 0rem;\n min-height: fit-content;\n overflow: visible;\n }\n }\n\n .cutscene-button-wrapper {\n a {\n text-decoration: none;\n }\n\n "," {\n padding: 16px 0px 24px 0px;\n }\n\n "," {\n padding: 32px 24px 80px 24px;\n }\n\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n button {\n "," {\n width: 100%;\n }\n\n "," {\n width: 240px;\n }\n }\n }\n"]);return CutsceneConsumer_templateObject=function(){return $},$}function CutsceneConsumer_templateObject1(){let $=(0,eA._)(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100vh;\n z-index: 101;\n pointer-events: none;\n\n opacity: ",";\n transition: opacity 1.5s ease-in-out;\n animation: ",";\n\n background: url(",") 50% / cover no-repeat;\n image-rendering: -moz-crisp-edges;\n image-rendering: -webkit-crisp-edges;\n image-rendering: pixelated;\n image-rendering: crisp-edges;\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n"]);return CutsceneConsumer_templateObject1=function(){return $},$}function _templateObject2(){let $=(0,eA._)(["\n .cutscene-consumer-nav-wrapper {\n position: fixed;\n top: 0px;\n padding: 19px 24px;\n width: 100%;\n opacity: ",";\n transition: opacity 1.5s ease-in-out;\n }\n"]);
1856return _templateObject2=function(){return $},$}let tg=ek.default.div.withConfig({componentId:"sc-7afd12b6-0"})(CutsceneConsumer_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{bannerImageLink:et,fadeInBg:en}=$;return en?"#020617":et?"linear-gradient(180deg, rgba(2, 6, 23, 0.6) 0%, rgba(2, 6, 23, 0.8) 100%),\n url(".concat(et,") lightgray 50% / cover no-repeat"):"#020617"},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),ty=ek.default.div.withConfig({componentId:"sc-7afd12b6-1"})(CutsceneConsumer_templateObject1(),$=>{let{fadeOut:et}=$;return et?0:1},$=>{let{fadeOut:et}=$;return et?"fadeOut 2s ease-in-out forwards":"fadeIn 2s ease-in-out forwards"},$=>{let{bannerImageLink:et}=$;return et}),tb=ek.default.div.withConfig({componentId:"sc-7afd12b6-2"})(_templateObject2(),$=>{let{fadeOut:et}=$;return et?0:1});var cutscenes_CutsceneConsumer=function($){let{bannerImageLink:et=null,buttons:en=(0,ei.jsx)(ei.Fragment,{}),children:er,fadeInBg:eo={show:!1,bannerImageLink:"",fadeOut:!1},disableSkip:es=!1,...el}=$;return(0,ei.jsxs)(ei.Fragment,{children:[eo.show&&(0,ei.jsxs)(tb,{fadeOut:eo.fadeOut,children:[(0,ei.jsx)(cutscenes_CutsceneNav,{}),(0,ei.jsx)(ty,{bannerImageLink:eo.bannerImageLink,fadeOut:eo.fadeOut})]}),(0,ei.jsxs)(tg,{...el,bannerImageLink:et,fadeInBg:eo.show,children:[(0,ei.jsx)(cutscenes_CutsceneNav,{disableSkip:es}),(0,ei.jsx)("div",{className:"cutscene-main-content",children:er}),(0,ei.jsx)("div",{className:"cutscene-button-wrapper",children:en})]})]})};function StartCourseScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n .character-wrapper {\n position: relative;\n }\n\n .character,\n .filler {\n width: 125px;\n height: auto;\n }\n\n .filler {\n opacity: 0;\n }\n\n .character {\n position: absolute;\n top: 0px;\n transition:\n transform 5s ease,\n opacity 5s ease;\n }\n\n .remove-character {\n transform: translateY(-5rem);\n opacity: 0;\n }\n\n .outer-course-text {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n .start-course-text {\n position: relative;\n\n .header,\n .python-typewriter {\n text-align: center;\n margin: 0px;\n color: #fff;\n font-family: "PixelGridM";\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 750px;\n opacity: 0;\n\n '," {\n font-size: 24px;\n }\n\n "," {\n font-size: 32px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n }\n\n .remove-text {\n opacity: 0;\n transition-duration: 0.5s;\n }\n"]);return StartCourseScene_templateObject=function(){return $},$}let tv=ek.default.div.withConfig({componentId:"sc-bd93b0b4-0"})(StartCourseScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_StartCourseScene=function($){let{courseName:et,linkTo:en}=$,er=(0,e_.useRouter)(),es=(0,ed.T)(),{properties:el}=(0,eo.v9)(ey.XU),eu=(0,eo.v9)(ey.jl),eh=(0,eo.v9)(ey.$u)||0,ep=(0,eo.v9)(ey.f8),[ef,eg]=(0,em.useState)(!1),[ev,ek]=(0,em.useState)(!1),[eC,eE]=(0,em.useState)(!1),{bannerImageLink:eI,catalogName:eS,firstExercise:eT,courseUrl:eA}=(0,eo.v9)((0,ew.Gm)({courseName:et})),[eP,eN]=(0,em.useState)({firstTrigger:!1,startTyping:!1,remove:!1});(0,em.useEffect)(()=>{es((0,ew.gK)({audioSrc:"https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2FRetro%20Boy%20(SFX%201).mp3?alt=media&token=10709bea-cb09-4ac0-8969-ad23e94d5169"}))},[es]),(0,em.useEffect)(()=>{ep&&et&&es((0,ex.yj)({courseName:et,uid:ep}))},[ep,et,es]),(0,em.useEffect)(()=>{let $=setTimeout(function(){eN($=>({...$,firstTrigger:!0}))},1e3),et=setTimeout(function(){eN($=>({...$,startTyping:!0}))},2200);return()=>{clearTimeout($),clearTimeout(et)}},[]);let ej=(0,em.useCallback)(()=>{es((0,ey.J)({type:"",status:"hide",properties:{}}))},[es]),eR=(0,em.useCallback)(()=>{es((0,ew.gK)({audioSrc:""})),er.push(en||"".concat(eA,"/").concat(eT)),eg(!0);let $=setTimeout(()=>{ej()},1500);return()=>clearTimeout($)},[ej,es,en,er,eT]),eV=(0,em.useCallback)(()=>{let $=setTimeout(()=>{eN($=>({...$,remove:!0})),es((0,ew.i1)())},1e3),et=setTimeout(()=>{eE(!0)},2500),en=setTimeout(()=>{eR()},7500);return()=>{clearTimeout($),clearTimeout(et),clearTimeout(en)}},[es,eR]),eD=(0,em.useCallback)(()=>{ek(!0)},[]);return(0,em.useEffect)(()=>{el.skip&&eR()},[el.skip,eR]),(0,ei.jsx)(cutscenes_CutsceneConsumer,{fadeInBg:{show:eC,bannerImageLink:eI,fadeOut:ef},style:{opacity:ef?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(tv,{children:[(0,ei.jsxs)("div",{className:"character-wrapper",children:[(0,ei.jsx)("img",{src:eu[eh],alt:"filler",className:"filler"}),(0,ei.jsx)("img",{src:eu[eh],className:"character ".concat(eP.remove&&"remove-character"),alt:"","data-aos":"zoom-in","data-aos-duration":"800","data-aos-delay":"1000"})]}),(0,ei.jsxs)("div",{className:"outer-course-text",children:[(0,ei.jsxs)("div",{className:"start-course-text ".concat(eP.remove&&"remove-text"),children:[(0,ei.jsx)("p",{className:"header",children:"And thus, began your journey to"}),eP.startTyping&&(0,ei.jsx)(tt.Z,{text:"And thus, began your journey to",disableCursor:!0,playSound:!eC,setA
1856ction:eD,lightTextOnly:!0})]}),(0,ei.jsxs)("div",{className:"start-course-text ".concat(eP.remove&&"remove-text"),children:[(0,ei.jsxs)("p",{className:"header",children:["the land of ",eS,"..."]}),ev&&(0,ei.jsx)(ei.Fragment,{children:eP.startTyping&&(0,ei.jsx)(tt.Z,{text:"the land of ".concat(eS,"..."),disableCursor:!0,playSound:!eC,setAction:eV,lightTextOnly:!0})})]})]})]})})},tx=en(3816),t_=en(2711),tw=en.n(t_);en(20927);var tk=en(45198);function UserOnboarding_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"]);return UserOnboarding_templateObject=function(){return $},$}function UserOnboarding_templateObject1(){let $=(0,eA._)(["\n z-index: 99;\n width: 100vw;\n height: 100vh;\n top: 0;\n position: fixed;\n padding: 2rem 0rem;\n background-color: ",";\n opacity: 0;\n animation: "," 0.5s ease-in-out forwards;\n overflow: auto;\n\n .main-container {\n display: flex;\n flex-direction: column;\n gap: 32px;\n }\n\n"]);return UserOnboarding_templateObject1=function(){return $},$}let tC=(0,ek.keyframes)(UserOnboarding_templateObject());ek.default.div.withConfig({componentId:"sc-c690059e-0"})(UserOnboarding_templateObject1(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]},tC);let tE=[{internalName:"programming_fundamentals",icon:(0,ei.jsx)(e7.Z,{}),title:"Programming fundamentals"},{internalName:"analyzing_data",icon:(0,ei.jsx)(function($){let{color:et="black",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.33331H6.66667V24H28V26.6666H6.66667H4V24V5.33331ZM12 18.6666H9.33333V21.3333H12V18.6666ZM14.6667 16V18.6666H12V16H14.6667ZM17.3333 16V13.3333H14.6667V16H17.3333ZM20 16H17.3333V18.6666H20V16ZM22.6667 13.3333H20V16H22.6667V13.3333ZM25.3333 10.6666V13.3333H22.6667V10.6666H25.3333ZM25.3333 10.6666V7.99998H28V10.6666H25.3333Z",fill:"#475569"})})},{}),title:"Analyzing data"},{internalName:"building_websites",icon:(0,ei.jsx)(function($){let{color:et="black",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.6668 4H5.33317H2.6665V6.66667V19.9999V22.6666V22.6667H5.33317V22.6666H13.3332V25.3333H10.6665V27.9999H13.3332H18.6665H21.3332V25.3333H18.6665V22.6666H26.6668V22.6667H29.3335V4H29.3332H26.6668ZM18.6665 19.9999H13.3332H5.33317V6.66667H26.6668V19.9999H18.6665Z",fill:"#475569"})})},{}),title:"Building websites or web apps"},{internalName:"something_else",icon:(0,ei.jsx)(function($){let{color:et="black",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 12H9.3335V20H1.3335V12ZM4.00016 14.6667V17.3333H6.66683V14.6667H4.00016ZM12.0002 12H20.0002V20H12.0002V12ZM14.6668 14.6667V17.3333H17.3335V14.6667H14.6668ZM22.6668 12H30.6668V20H22.6668V12ZM25.3335 14.6667V17.3333H28.0002V14.6667H25.3335Z",fill:"#475569"})})},{}),title:"Something else"},{internalName:"not_sure",icon:(0,ei.jsx)(function($){let{color:et="black",...en}=$;return(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6665 2.66666H13.3332V5.33332H15.9998V7.99999H13.3332V21.3333H10.6665V7.99999H7.99984V5.33332H10.6665V2.66666ZM5.33317 10.6667V7.99999H7.99984V10.6667H5.33317ZM7.99984 24V26.6667H5.33317V29.3333H2.6665V10.6667H5.33317V24H7.99984ZM7.99984 24H10.6665V21.3333H7.99984V24ZM15.9998 24H13.3332V21.3333H15.9998V24ZM18.6665 10.6667V7.99999H15.9998V10.6667H18.6665ZM21.3332 10.6667H18.6665V24H15.9998V26.6667H18.6665V29.3333H21.3332V26.6667H23.9998V24H26.6665V21.3333H29.3332V5.33332V2.66666H26.6665V5.33332H23.9998V7.99999H21.3332V10.6667ZM21.3332 10.6667H23.9998V7.99999H26.6665V21.3333H23.9998V24H21.3332V10.6667Z",fill:"#475569"})})},{}),title:"I'm not sure! I just want to explore"}];var onBoarding_UserOnboarding=function(){let $=(0,tk.i)(),et=(0,eu.o)(),[en,er]=(0,em.useState)(0),[es,el]=(0,em.useState)({}),[ed,eh]=(0,em.useState)(null),ep=(0,eo.v9)(ey.o4)||"dark",ef="dark"===ep,eg=(0,eo.v9)(ey.ot),ev=$.width>1024?"0rem 13rem":"0rem",ex=$.width>1024?"0rem 15rem":"0rem",[e_,ew]=(0,em.useState)(!0),[ek,eC]=(0,em.useState)(!0);(0,em.useEffect)(()=>{e_&&eC(!0)},[en,e_]),(0,em.useEffect)(()=>{tw().init({mirror:!1,disable:"mobile",once:!0}),et.update({hideDefaultLauncher:!0})},[et]);let eE=[{internalName:"beginner",icon:(0,ei.jsx)(icons_DifficultyBar,{fillBar:1,fillColor:ef?"#CBD5E1":"#475569"}),title:"Beginner",description:"I've never coded before / I know some basics."},{internalName:"intermediate",icon:(0,ei.jsx)(icons_DifficultyBar,{fillBar:2,fillColor:ef?"#CBD5E1":"#475569"}),title:"Intermediate",description:"I have some knowledge, and may have built one or tw
1856o projects."},{internalName:"advanced",icon:(0,ei.jsx)(icons_DifficultyBar,{fillBar:3,fillColor:ef?"#CBD5E1":"#475569"}),title:"Advanced",description:"I'm very comfortable coding and I've built multiple projects before."}],eI=(0,em.useMemo)(()=>(0,ei.jsx)(onBoarding_OnBoardingProgressBar,{prevScene:prevScene,percentageCompleted:Math.floor((en+1)/7*100),darkTheme:ef,sceneIndex:en}),[prevScene,en,ef]),eS=[(0,ei.jsx)(onBoarding_OnBoardingWelcome,{componentPadding:ev,setSceneIndex:er,maxWidth:800,progress:eI},0),(0,ei.jsx)(onBoarding_OnBoardingCharacterSelection,{componentPadding:ev,setSceneIndex:er,maxWidth:800,progress:eI},1),(0,ei.jsx)(onBoardingUsername,{componentPadding:ev,maxWidth:800,progress:eI,setSceneIndex:er},2),(0,ei.jsx)(onBoarding_OnBoardingQuestion,{componentPadding:ev,answers:eE,question:"What's your experience with coding?",setSceneIndex:er,setAnswers:el,questionType:"diffAnswer",maxWidth:800,progress:eI},3),(0,ei.jsx)(onBoarding_OnBoardingQuestion,{componentPadding:ev,answers:tE,question:"What are you most interested in?",setSceneIndex:er,setAnswers:el,questionType:"pathAnswer",maxWidth:800,progress:eI},4),(0,ei.jsx)(onBoarding_DecisionLoader,{setSceneIndex:er,componentPadding:ev,showExtraScene:ek,setShowExtraScene:eC,maxWidth:800,progress:eI},5),(0,ei.jsx)(onBoarding_OnBoardingRecommendation,{componentPadding:ex,setSceneIndex:er,finishedAnswers:es,setUserSelectedCourse:eh,maxWidth:800,progress:eI},6)];function prevScene(){if(0!==en){if(en===eS.length-1)return er(en-2);er(en-1)}}return eg?(0,ei.jsxs)(ei.Fragment,{children:[ed&&(0,ei.jsx)(courses_StartCourseScene,{courseName:ed,linkTo:null}),!ed&&(0,ei.jsx)(ei.Fragment,{children:eS[en]})]}):(0,ei.jsx)(tx.Z,{})},tI=en(80386),tS=en(79311);function NotificationHubHeader_templateObject(){let $=(0,eA._)(["\n padding: 10px 12px 10px 12px;\n background: ",";\n border-bottom: 2px solid ",";\n display: flex;\n align-items: center;\n gap: 16px;\n\n .top-bar {\n padding: 8px;\n width: fit-content;\n border-radius: 4px;\n\n color: ",";\n\n :hover {\n background: ",";\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n\n .notification-label {\n color: ",";\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 120%; /* 24px */\n }\n"]);return NotificationHubHeader_templateObject=function(){return $},$}let tT=ek.default.div.withConfig({componentId:"sc-b6834b44-0"})(NotificationHubHeader_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.primary});var notificationHub_NotificationHubHeader=function($){let{closePopup:et}=$;return(0,ei.jsxs)(tT,{children:[(0,ei.jsx)("div",{className:"top-bar nes-pointer",onClick:()=>et(),children:(0,ei.jsx)(tS.x8P,{})}),(0,ei.jsx)("p",{className:"notification-label",children:"Notifications"})]})},tA=en(41664),tP=en.n(tA),notifications_NotificationHeartIcon=function($){let{...et}=$;return(0,eo.v9)(ey.o4),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,ei.jsx)("path",{d:"M6.00008 1.3335H3.33341V2.66683H2.00008V4.00016H0.666748V8.00016H2.00008V9.3335H3.33341V10.6668H4.66675V12.0002H6.00008V13.3335H7.33341V14.6668H8.66675V13.3335H10.0001V12.0002H11.3334V10.6668H12.6667V9.3335H14.0001V8.00016H15.3334V4.00016H14.0001V2.66683H12.6667V1.3335H10.0001V2.66683H8.66675V4.00016H7.33341V2.66683H6.00008V1.3335Z",fill:"#EC4899"})})},notifications_NotificationCommentIcon=function($){let{...et}=$;return(0,eo.v9)(ey.o4),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.6668 1.3335H1.3335V2.66679H1.33325V10.6668H3.99992V10.6668H1.33341V12.0001H3.99992V14.6668H5.33325H6.66658V13.3335H7.99992V12.0001H14.6666V10.6668V2.66683H14.6668V1.3335Z",fill:"#84CC16"})})},notifications_NotificationFollowIcon=function($){let{...et}=$;return(0,eo.v9)(ey.o4),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0001 1.33301H8.00008V2.66634H6.66675V6.66634H8.00008V7.99967H12.0001V6.66634V2.66634V1.33301ZM12.0002 2.66631H13.3336V6.66631H12.0002V2.66631ZM4.66675 10.6663H6.00008V9.33301H14.0001V10.6663V10.6663V13.333H14.0002V10.6663H15.3335V14.6663H15.3334V14.6663H4.66675V14.6663V13.333V10.6663ZM2.00008 5.33301H3.33341V6.66634H4.66675V7.99967H3.33341V9.33301H2.00008V7.99967H0.666748V6.66634H2.00008V5.33301Z",fill:"#14ADFF"})})},notifications_NotificationReplyIcon=function($){let{...et}=$;return(0,eo.v9)(ey.o4),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.66659 3.33301H7.99992V5.99967H11.9999V7.33301H13.3333V11.333H11.9999V9.99967H7.99992V12.6663H6.66659V11.333H5.33325V9.99967H3.99992V8.66634H2.66659V7.33301H3.99992V5.99967H5.33325V4.66634H6.66659V3.33301Z",fill:"#84CC16"})})},notifications_AnnouncementIcon=function($){let{...et}=$;return(0,eo.v9)(ey.o4),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0002 2H10.6668V3.33333H12.0002V11.3335H10.6668V12.6668H12.0002V12.6667H13.3335V2H12.0002H12.0002ZM10.6668 3.33341H6.66682V4.66675H10.6668V3.33341ZM6.66683 10V8.66671V8.66667V6.00016V6.00004V4.66683H4.00016V6.00004V6.00016V8.66667V8.66671V10H6.66683ZM6.66682 10.0001H10.6668V11.3334H6.66682V10.0001ZM4.00016 13.3334H5.33349V10.0001H6.66682V14.6667H5.33349H5.33349H4.00016V13.3334ZM14.6668 6.00004H13.3335V8.66671H14.6668V6.00004ZM2.66683 4.66683H4.00015V10.0001V10.0002V14.6667H2.66682V10.0002H1.3335V4.66683H2.66682H2.66683Z",fill:"#14ADFF"})})},tN=en(63877),tj=en(6345);
1856function NotificationCard_templateObject(){let $=(0,eA._)(["\n padding: 12px;\n display: flex;\n gap: 16px;\n border-radius: 4px;\n transition-duration: 0.2s;\n\n &.unread {\n background-color: ",";\n\n :hover {\n background-color: ",";\n }\n }\n\n :hover {\n background-color: ",";\n }\n\n .avater-container {\n width: 56px;\n position: relative;\n flex-shrink: 0;\n\n .inner-avater-container {\n position: relative;\n transition-duration: 0.2s;\n\n :hover {\n opacity: 0.8;\n }\n\n img {\n width: 40px;\n height: 40px;\n object-fit: cover;\n border-radius: 50%;\n }\n\n .icon-badge {\n image-rendering: pixelated;\n background-color: ",";\n }\n\n .notification-type-icon {\n position: absolute;\n right: -2px;\n bottom: -9px;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background-color: #9d174d;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 2px solid ",";\n }\n\n .like,\n .comment-like,\n .reply-like {\n background-color: ",";\n }\n\n .team,\n .badge {\n background-color: ",";\n }\n\n .comment,\n .mention {\n background-color: ",";\n }\n\n .follow {\n background-color: ",";\n }\n\n .reply,\n .subreply {\n background-color: ",";\n }\n }\n }\n\n .notification-content {\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 1;\n\n .notification-title {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n\n a {\n text-decoration-color: ",";\n }\n\n span {\n color: ",";\n\n font-weight: 700;\n line-height: 150%;\n }\n }\n\n .content-text {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n }\n\n .content-team {\n color: ",";\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n\n a {\n text-decoration: underline;\n\n &:hover {\n opacity: 0.8;\n }\n }\n }\n\n img {\n border-radius: 8px;\n max-width: 200px;\n object-fit: cover;\n }\n }\n\n .notiifcation-time {\n flex-shrink: 0;\n\n p {\n color: ",";\n\n font-size: 14px;\n\n font-weight: 500;\n line-height: 150%;\n }\n }\n"]);return NotificationCard_templateObject=function(){return $},$}let tR=ek.default.div.withConfig({componentId:"sc-48b7e0e5-0"})(NotificationCard_templateObject(),$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.background.blue.secondary},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return"dark"==et.mode?"#831843":"#FCE7F3"},$=>{let{theme:et}=$;return et.colors.background.blue.secondary},$=>{let{theme:et}=$;return et.colors.background.green.secondary},$=>{let{theme:et}=$;return et.colors.background.blue.secondary},$=>{let{theme:et}=$;return et.colors.background.green.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary});var notificationHub_NotificationCard=function($){var et,en,er,eo,es,el,eu,eh,ep,em,ef,eg,ev,ex,e_,ew,ek,eC,eE,eI,eS;let{notification:eA,closePopup:eP}=$,eN=(0,ed.T)(),ej="badge"==eA.type?(0,tj.YP)(eA.badgeId,eA.level):null,eR={badge:{title:(0,ei.jsx)("p",{className:"notification-title",children:(0,ei.jsxs)("span",{children:["New Badge: ",null==ej?void 0:ej.name]})}),content:(0,ei.jsx)("p",{className:"content-text",children:null==ej?void 0:ej.requirement}),icon:(0,ei.jsx)(notifications_AnnouncementIcon,{})},team:{title:(0,ei.jsx)("p",{className:"notification-title",children:(0,ei.jsx)("span",{children:"Cod\xe9dex Team"})}),content:(0,ei.jsx)("p",{className:"content-team",dangerouslySetInnerHTML:{__html:null==eA?void 0:eA.content}}),icon:(0,ei.jsx)(notifications_AnnouncementIcon,{}),image:(null==eA?void 0:eA.image)?(0,ei.jsx)("img",{src:eA.image,alt:"notif-image",style:{marginTop:".25rem"}}):null}
1856,like:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(et=eA.senderData)||void 0===et?void 0:et.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(en=eA.senderData)||void 0===en?void 0:en.name})})," ","liked your post."]}),content:(0,ei.jsx)("p",{className:"content-text",children:eA.postTitle}),icon:(0,ei.jsx)(notifications_NotificationHeartIcon,{})},comment:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(er=eA.senderData)||void 0===er?void 0:er.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(eo=eA.senderData)||void 0===eo?void 0:eo.name})})," ","commented on your post."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),image:(null==eA?void 0:null===(es=eA.giphyData)||void 0===es?void 0:es.imageUrl)?(0,ei.jsx)("img",{src:null==eA?void 0:null===(el=eA.giphyData)||void 0===el?void 0:el.imageUrl,alt:"comment"}):null,icon:(0,ei.jsx)(notifications_NotificationCommentIcon,{})},"comment-like":{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(eu=eA.senderData)||void 0===eu?void 0:eu.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(eh=eA.senderData)||void 0===eh?void 0:eh.name})})," ","liked your comment."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),icon:(0,ei.jsx)(notifications_NotificationHeartIcon,{})},follow:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(ep=eA.senderData)||void 0===ep?void 0:ep.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(em=eA.senderData)||void 0===em?void 0:em.name})})," ","followed you."]}),content:null,icon:(0,ei.jsx)(notifications_NotificationFollowIcon,{})},reply:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(ef=eA.senderData)||void 0===ef?void 0:ef.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(eg=eA.senderData)||void 0===eg?void 0:eg.name})})," ","replied to your comment."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),icon:(0,ei.jsx)(notifications_NotificationReplyIcon,{})},"reply-like":{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(ev=eA.senderData)||void 0===ev?void 0:ev.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(ex=eA.senderData)||void 0===ex?void 0:ex.name})})," ","liked your reply."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),icon:(0,ei.jsx)(notifications_NotificationHeartIcon,{})},subreply:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(e_=eA.senderData)||void 0===e_?void 0:e_.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(ew=eA.senderData)||void 0===ew?void 0:ew.name})})," ","replied to your comment."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),icon:(0,ei.jsx)(notifications_NotificationReplyIcon,{})},mention:{title:(0,ei.jsxs)("p",{className:"notification-title",children:[(0,ei.jsx)(tP(),{href:"/@".concat(null==eA?void 0:null===(ek=eA.senderData)||void 0===ek?void 0:ek.username),children:(0,ei.jsx)("span",{children:null==eA?void 0:null===(eC=eA.senderData)||void 0===eC?void 0:eC.name})})," ","mentioned you in a ",(null==eA?void 0:eA.context)==="post"?"post":"comment","."]}),content:(0,ei.jsx)("p",{className:"content-text",children:null==eA?void 0:eA.postContent}),icon:(0,ei.jsx)(notifications_NotificationCommentIcon,{})}},eV=eR[eA.type],eD=function($){var et;let{type:en,postId:er,senderData:ei,linkTo:eo}=null!=$?$:{},es=null!==(et=null==$?void 0:$.postLink)&&void 0!==et?et:"";switch(en){case"team":return eo;case"follow":return"/@".concat(null==ei?void 0:ei.username);
1856case"like":case"comment-like":case"reply-like":return function($){let{postId:et,postLink:en}=$,[,er]=en.split("#"),ei=er?"#".concat(er):"";return en.startsWith("/monthly-challenge/")?"/community/monthly-challenge/submission/".concat(et).concat(ei):en.startsWith("/post/")?"/community/main/".concat(et).concat(ei):"/community".concat(en)}({postId:er,postLink:es});default:return es}}(eA);function handleClick(){(null==eA?void 0:eA.type)==="team"&&(0,eT.C3)({eventName:null==eA?void 0:eA.notifId}),"badge"===eA.type?eN((0,ey.J)({type:"badges",status:"show",properties:{}})):eP()}let eO="badge"==eA.type?null==ej?void 0:ej.icon:null==eA?void 0:null===(eE=eA.senderData)||void 0===eE?void 0:eE.photoURL,eM=(null==eA?void 0:eA.type)==="team"&&(null==eA?void 0:null===(eI=eA.content)||void 0===eI?void 0:eI.includes("<a"));return eM?(0,ei.jsxs)(tR,{className:"".concat((null==eA?void 0:eA.read)===!1&&"unread"," nes-pointer"),onClick:handleClick,children:[(0,ei.jsx)("div",{className:"avater-container",children:(0,ei.jsx)(tP(),{href:null==eA?void 0:eA.linkTo,children:(0,ei.jsxs)("div",{className:"inner-avater-container",children:[(0,ei.jsx)("img",{src:eO,alt:"avater",className:"icon-".concat(eA.type)}),(0,ei.jsx)("div",{className:"notification-type-icon ".concat(null==eA?void 0:eA.type),children:null==eV?void 0:eV.icon})]})})}),(0,ei.jsxs)("div",{className:"notification-content",children:[null==eV?void 0:eV.title,null==eV?void 0:eV.content,null==eV?void 0:eV.image]}),(0,ei.jsx)("div",{className:"notiifcation-time",children:(0,ei.jsx)("p",{children:(0,tN.F)(null==eA?void 0:eA.createdAt)})})]}):(0,ei.jsx)(tP(),{href:eD,style:{textDecoration:"none"},onClick:handleClick,children:(0,ei.jsxs)(tR,{className:"".concat((null==eA?void 0:eA.read)===!1&&"unread"," nes-pointer"),children:[(0,ei.jsx)("div",{className:"avater-container",children:(0,ei.jsx)(tP(),{href:"".concat((null==eA?void 0:eA.type)=="team"?null==eA?void 0:eA.linkTo:"/@".concat(null==eA?void 0:null===(eS=eA.senderData)||void 0===eS?void 0:eS.username)),children:(0,ei.jsxs)("div",{className:"inner-avater-container",children:[(0,ei.jsx)("img",{src:eO,alt:"avater",className:"icon-".concat(eA.type)}),(0,ei.jsx)("div",{className:"notification-type-icon ".concat(null==eA?void 0:eA.type),children:null==eV?void 0:eV.icon})]})})}),(0,ei.jsxs)("div",{className:"notification-content",children:[null==eV?void 0:eV.title,null==eV?void 0:eV.content,null==eV?void 0:eV.image]}),(0,ei.jsx)("div",{className:"notiifcation-time",children:(0,ei.jsx)("p",{children:(0,tN.F)(null==eA?void 0:eA.createdAt)})})]})})},tV=en(62347),tD=en(58533),tO=en(25670),tM=en(62030);function NoNotification_templateObject(){let $=(0,eA._)(["\n padding: 40px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n\n .bell-container {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n display: flex;\n justify-content: center;
1856\n align-items: center;\n background: ",";\n\n color: ",";\n\n svg {\n width: 47.407px;\n height: 47.407px;\n }\n }\n\n .no-notif {\n color: ",";\n text-align: center;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n"]);return NoNotification_templateObject=function(){return $},$}let tF=ek.default.div.withConfig({componentId:"sc-87e96952-0"})(NoNotification_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary});var notificationHub_NoNotification=function(){let $=(0,eo.v9)(ey.o4)||"dark";return(0,ei.jsxs)(tF,{children:[(0,ei.jsx)("div",{className:"bell-container",children:(0,ei.jsx)(tM.Z,{fill:"dark"===$?"#64748B":"#94A3B8"})}),(0,ei.jsx)("p",{className:"no-notif",children:"You don't have any notifications yet. Check back soon!"})]})};function NotificationHubContent_templateObject(){let $=(0,eA._)(["\n flex: 1;\n background: ",";\n padding: 12px;\n overflow: auto;\n\n .notification-feed {\n height: inherit;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n"]);return NotificationHubContent_templateObject=function(){return $},$}let tL=ek.default.div.withConfig({componentId:"sc-c138efa7-0"})(NotificationHubContent_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.primary});var notificationHub_NotificationHubContent=function($){let{notifications:et,uid:en,setNotifications:er,noMorePosts:eo,noNotifications:es}=$,el=(0,ed.T)(),[eu,eh]=(0,em.useState)(1),[ep,ef]=(0,em.useState)(!0);(0,em.useEffect)(()=>{eo&&ef(!1)},[eo]);let eg=(0,em.useCallback)(async()=>{try{let $=eu+1,et=await fetch("/api/community/notifications/getNotifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:en,page:$})}),ei=await et.json(),eo=ei.notification,es=null==eo?void 0:eo.map($=>$.id);0!=eo.length&&(eh($),er($=>[...$,...eo]),(0,tV._)(en,es)),eo.length<9&&ef(!1)}catch($){console.error("Error fetching more posts:",$),ef(!1)}},[eu,er,en]);function closePopup(){el((0,ey.J)({type:"",status:"hide",properties:{}}))}return(0,ei.jsxs)(tL,{id:"notification-container",children:[es&&(0,ei.jsx)(notificationHub_NoNotification,{}),(0,ei.jsx)(tD.Z,{dataLength:et.length,next:eg,hasMore:ep,loader:(0,ei.jsx)(tO.Z,{}),scrollThreshold:.5,scrollableTarget:"notification-container",className:"notification-feed",children:et.map($=>(0,ei.jsx)(notificationHub_NotificationCard,{notification:$,closePopup:closePopup},$.id))})]})},tH=en(33846);function NotificationHub_templateObject(){let $=(0,eA._)(["\n from {\n right: -","px;\n }\n to {\n right: 0px;\n }\n"]);return NotificationHub_templateObject=function(){return $},$}function NotificationHub_templateObject1(){let $=(0,eA._)(["\n from {\n right: 0px;\n }\n to {\n right: -","px;\n }\n"]);return NotificationHub_templateObject1=function(){return $},$}function NotificationHub_templateObject2(){let $=(0,eA._)(['\n z-index: 14;\n position: fixed;\n top: 0px;\n left: 0%;\n height: 100vh;\n width: 100vw;\n font-family: "Mulish", sans-serif;\n opacity: 0;\n animation: opac 0.2s ease-out forwards;\n pointer-events: none;\n\n p {\n margin: 0px;\n }\n\n @keyframes opac {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .notification-hub-outer-container {\n width: inherit;\n height: inherit;\n position: relative;\n\n .notification-hub-container {\n pointer-events: auto;\n position: absolute;\n top: 0px;\n right: -',"px;\n height: inherit;\n width: ","px;\n max-width: 101%;\n border-left: 2px solid ",";\n display: flex;\n flex-direction: column;\n animation: "," 0.3s forwards;\n box-shadow: 0px 4px 32px 0px\n ",";\n transition: right 0.3s ease-out;\n\n &.slide-out {\n animation: "," 0.3s forwards;\n }\n }\n }\n"]);return NotificationHub_templateObject2=function(){return $},$}
1856let tB=(0,ek.keyframes)(NotificationHub_templateObject(),400),tU=(0,ek.keyframes)(NotificationHub_templateObject1(),400),tz=ek.default.div.withConfig({componentId:"sc-f4d13fdd-0"})(NotificationHub_templateObject2(),400,400,$=>{let{theme:et}=$;return et.colors.border.grey.medium},tB,$=>{let{theme:et}=$;return et.colors.background.grey.boxshadow},tU);var organisms_NotificationHub=function(){let $=(0,ed.T)(),et=(0,eo.v9)(ey.f8),en=(0,em.useRef)(null),[er,es]=(0,em.useState)([]),[el,eu]=(0,em.useState)([]),[eh,ep]=(0,em.useState)(!1),[ef,eg]=(0,em.useState)(!0),[ev,ex]=(0,em.useState)(!1);(0,tI.y)();let e_=(0,em.useCallback)(async()=>{if(et)try{let $=await fetch("/api/community/notifications/getNotifications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:et})});if(!$.ok)throw Error("Network response was not ok");let en=await $.json(),er=en.notification,ei=er.map($=>$.id);er.length<9&&ep(!0),es(er),eu($=>[...$,...ei]),eg(!1)}catch($){console.error("Error fetching post:",$),ep(!0),eg(!1)}},[et]);function closePopup(){ex(!0),setTimeout(()=>{$((0,ey.J)({type:"",status:"hide",properties:{}}))},300)}return(0,em.useEffect)(()=>{e_()},[e_]),(0,em.useEffect)(()=>{et&&el&&(0,tV._)(et,el)},[el,et]),(0,tH.Z)(en,()=>{closePopup()}),(0,ei.jsx)(tz,{id:"global-notification",children:(0,ei.jsx)("div",{className:"notification-hub-outer-container",children:(0,ei.jsxs)("div",{className:"notification-hub-container ".concat(ev?"slide-out":""),ref:en,children:[(0,ei.jsx)(notificationHub_NotificationHubHeader,{closePopup:closePopup}),(0,ei.jsx)(notificationHub_NotificationHubContent,{notifications:er,setNotifications:es,uid:et,noMorePosts:eh,noNotifications:0===er.length&&!ef})]})})})},tq=en(74347),tZ=en(65893);function PostLikedByPopup_templateObject(){let $=(0,eA._)(["\n z-index: 12;\n height: 100vh;\n width: 100vw;\n position: fixed;\n top: 0px;\n left: 0px;\n background: ",';\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: "Mulish", sans-serif;\n\n p {\n margin: 0px;\n }\n\n .liked-by-container {\n background-color: ',";\n width: 506px;\n max-width: calc(100vw - 24px);\n height: 500px;\n position: relative;\n display: flex;\n flex-direction: column;\n\n .liked-by-header {\n margin: 2px 2px 0px 2px;\n\n padding: 6px 6px 6px 30px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition-duration: 0.2s;\n border-bottom: 2px solid ",";\n background-color: ",";\n border-top-right-radius: 10px;\n border-top-left-radius: 10px;\n\n p {\n color: ",";\n font-size: 20px;\n font-weight: 700;\n }\n\n .close-icon {\n padding: 6px 8px 8px 8px;\n width: fit-content;\n border-radius: 4px;\n\n :hover {\n /* background: ","; */\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n }\n\n .liked-by-feed {\n padding: 24px 32px;\n flex: 1;\n overflow: auto;\n margin-bottom: 2px;\n\n .infinite {\n display: flex;\n flex-direction: column;\n gap: 24px;\n }\n }\n }\n"]);return PostLikedByPopup_templateObject=function(){return $},$}let tW=ek.default.div.withConfig({componentId:"sc-f5cdd3d2-0"})(PostLikedByPopup_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.overlay},$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var stats_PostLikedByPopup=function(){var $,et;let en=(0,ed.T)(),er=(0,eo.v9)(ey.o4)||"dark",es="dark"===er,el=(0,eo.v9)(ey.f8),eu=(0,eo.v9)(ey.XU),eh=null==eu?void 0:null===($=eu.properties)||void 0===$?void 0:$.communityName,ep=null==eu?void 0:null===(et=eu.properties)||void 0===et?void 0:et.postId,[ef,eg]=(0,em.useState)([]),[ev,ex]=(0,em.useState)(1),[e_,ew]=(0,em.useState)(!0),ek=(0,em.useCallback)(async()=>{let $=await fetch("/api/community/getLikedList?communityName=".concat(eh,"&postId=").concat(ep)),et=await $.json();eg(et.posts),et.posts.length<9&&ew(!1)},[]);(0,em.useEffect)(()=>{ek()},[ek]);let eC=(0,em.useCallback)(async()=>{try{let $=ev+1,et=await fetch("/api/community/getLikedList?communityName=".concat(eh,"&postId=").concat(ep,"&page=").concat($)),en=await et.json(),er=en.posts;0!=er.length&&(ex($),eg($=>[...$,...er])),er.length<9&&ew(!1)}catch($){console.error("Error fetching more posts:",$)}},[ev,eg,eh,ep]),[eE,eI]=(0,em.useState)([]);function closePopup(){document.body.style.overflow="",en((0,ey.J)({type:"",status:"hide",properties:{}}))}return(0,em.useEffect)(()=>{let $=sessionStorage.getItem("userFollowing");async function getUserFollowers(){let $=await fetch("/api/community/getFollowing",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:el})}),et=await $.json();eI(et.userFollowing),sessionStorage.setItem("userFollowing",JSON.stringify(null==et?void 0:et.userFollowing))}el&&($&&void 0!==$?eI(JSON.parse($)||[]):getUserFollowers())},[el]),(0,em.useEffect)(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),(0,ei.jsx)(tW,{onClick:()=>
1856closePopup(),children:(0,ei.jsxs)(ez.Z,{borderColor:es?"475569":"CBD5E1",className:"liked-by-container",onClick:$=>$.stopPropagation(),children:[(0,ei.jsxs)("div",{className:"liked-by-header",children:[(0,ei.jsx)("p",{children:"Liked by"}),(0,ei.jsx)("div",{className:"close-icon nes-pointer",onClick:()=>closePopup(),children:(0,ei.jsx)(tq.Z,{fill:es?"#94A3B8":"#64748B"})})]}),(0,ei.jsx)("div",{className:"liked-by-feed",id:"liked-by-feed",children:(0,ei.jsx)(tD.Z,{dataLength:ef.length,next:eC,hasMore:e_,loader:(0,ei.jsx)(tO.Z,{}),scrollableTarget:"liked-by-feed",scrollThreshold:.5,className:"infinite",children:ef&&ef.map($=>(0,ei.jsx)(tZ.Z,{user:$.user,following:eE,setFollowing:eI},$.id))})})]})})},tG=en(72502),t$=en(45540),tJ=en(63248);function GuidelineList_templateObject(){let $=(0,eA._)(["\n * {\n margin: 0px;\n }\n\n .guideline-wrapper {\n width: 500px;\n height: fit-content;\n overflow: auto;\n color: ",";\n\n h2 {\n font-size: 24px;\n font-weight: 700;\n margin-bottom: 1rem;\n }\n\n ul {\n margin-top: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n list-style-type: none;\n width: 100%;\n padding: 0px;\n\n h3 {\n margin: 0px;\n font-weight: 600;\n }\n\n p {\n margin: 0px;\n margin-top: 0.5rem;\n }\n }\n\n .team {\n margin-top: 1rem;\n color: ",";\n }\n }\n"]);return GuidelineList_templateObject=function(){return $},$}let tK=(0,ek.default)(tG.Z).withConfig({componentId:"sc-95c443c6-0"})(GuidelineList_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var community_GuidelineList=function(){let $=(0,ed.T)(),{handleBadgeEvent:et}=(0,tJ.g)(),en=(0,em.useCallback)(()=>{$((0,ey.J)({type:"",status:"hide",properties:{}}))},[$]);return(0,em.useEffect)(()=>{et({badgeType:"newbie"})},[et]),(0,ei.jsx)(tK,{setShowModel:en,children:(0,ei.jsxs)(t$.Z,{className:"guideline-wrapper",iconAction:en,children:[(0,ei.jsx)("h2",{children:"Community Guidelines"}),(0,ei.jsxs)("p",{children:[(0,ei.jsx)("strong",{children:"Welcome!"})," Weâre all here to learn, practice, build, and meet other people who are learning too. Here are a few ways you can help keep Cod\xe9dex the best place to do that:"]}),(0,ei.jsxs)("ul",{children:[(0,ei.jsxs)("li",{children:[(0,ei.jsx)("h3",{children:"1ï¸â£ Be respectful; be kind."}),(0,ei.jsx)("p",{children:"This means no hateful, rude, or harassing comments. Treat others the way you want to be treated, and donât invalidate othersâ experiences."})]}),(0,ei.jsxs)("li",{children:[(0,ei.jsx)("h3",{children:"2ï¸â£ Keep it appropriate."}),(0,ei.jsx)("p",{children:"Think about what you share. Avoid offensive, insensitive, or NSFW content, and respect the privacy of yourself and others."})]}),(0,ei.jsxs)("li",{children:[(0,ei.jsx)("h3",{children:"3ï¸â£ No spamming or tasteless self-promotion."}),(0,ei.jsx)("p",{children:"Your post should not âfeel spammyâ. When in doubt, contact a member of the team or a moderator and ask them to review your post."})]}),(0,ei.jsxs)("li",{children:[(0,ei.jsx)("h3",{children:"4ï¸â£ Keep posts in the appropriate channels."}),(0,ei.jsx)("p",{children:"Each channel has a specific purpose; please follow that purpose so conversations stay organized and easy to find."})]}),(0,ei.jsxs)("li",{children:[(0,ei.jsx)("h3",{children:"5ï¸â£ No plagiarism."}),(0,ei.jsx)("p",{children:"Projects and content you share should be your own. If you use someone elseâs work, give them credit."})]})]}),(0,ei.jsx)("p",{className:"team",children:"- Team Cod\xe9dex \uD83E\uDEF6"})]})})},tQ=en(61123);function OpcDelete_templateObject(){let $=(0,eA._)(["\n z-index: 12;\n height: 100vh;\n width: 100vw;\n position: fixed;\n top: 0px;\n left: 0px;\n background: ",';\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: "Mulish", sans-serif;\n\n .opc-delete-action {\n height: fit-content;\n width: 500px;\n max-height: calc(100vh - 1rem);\n max-width: calc(100vw - 1rem);\n\n h3 {\n color: ',";\n font-weight: 700;\n font-size: 24px;\n }\n\n p {\n color: ",";\n font-weight: 700;\n }\n\n .btn-container {\n margin-top: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 1rem;\n }\n }\n"]);
1856return OpcDelete_templateObject=function(){return $},$}let tX=ek.default.div.withConfig({componentId:"sc-d51639a8-0"})(OpcDelete_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.overlay},$=>{let{theme:et}=$;return et.colors.text.accent.red},$=>{let{theme:et}=$;return et.colors.text.secondary});var models_OpcDelete=function(){let $=(0,ed.T)(),et=(0,e_.useRouter)();(0,eo.v9)(ey.o4),(0,eo.v9)(ey.f8);let{properties:en}=(0,eo.v9)(ey.XU),er=null==en?void 0:en.post,es=null==en?void 0:en.targetCollection,el=null==en?void 0:en.type;function closePopup(){document.body.style.overflow="",$((0,ey.J)({type:"",status:"hide",properties:{}}))}let eu=(0,em.useCallback)(async function(){let $=await fetch("/api/community/deletePostUser",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({postId:er.postId,targetCollection:es,communityName:er.communityName,itemType:el})});if($.ok&&((null==en?void 0:en.forProjectReview)&&(0,tQ.VW)({uid:null==er?void 0:er.ownerUid,courseName:null==er?void 0:er.projectSubmissionForCourse,projectType:null==er?void 0:er.communityName}),$.ok)){var ei;sessionStorage.clear(),(null==er?void 0:null===(ei=er.parent)||void 0===ei?void 0:ei.id)?et.reload():et.push("/community"),closePopup()}},[er]);return(0,ei.jsx)(tX,{children:(0,ei.jsxs)(t$.Z,{iconAction:()=>
1856closePopup(),className:"opc-delete-action",children:[(0,ei.jsx)("h3",{children:"Delete Post"}),(0,ei.jsx)("p",{children:"Are your sure you want to delete this post? This canât be undone and the post will be removed from your profile."}),(0,ei.jsxs)("div",{className:"btn-container",children:[(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>closePopup(),children:"Cancel"}),(0,ei.jsx)(eD.Z,{variant:"red",onClick:()=>eu(),children:"Delete"})]})]})})},tY=en(67687);function NavOnboarding30Noc_templateObject(){let $=(0,eA._)(["\n padding: 16px 24px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n\n .progress-bar {\n flex: 1;\n max-width: 800px;\n }\n\n .onboarding-skip-btn,\n .base-arrow-bar {\n display: none;\n }\n\n .btn-wrapper {\n "," {\n width: fit-content;\n }\n\n "," {\n width: 165px;\n }\n }\n\n button {\n svg {\n "," {\n margin-right: 0px;\n }\n\n "," {\n margin-right: 8px;\n }\n\n path {\n fill: ",";\n }\n }\n\n .btn-text {\n "," {\n display: none;\n }\n\n "," {\n display: inline-block;\n }\n }\n }\n"]);return NavOnboarding30Noc_templateObject=function(){return $},$}let t0=ek.default.div.withConfig({componentId:"sc-eaa2cc3d-0"})(NavOnboarding30Noc_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_NavOnboarding30Noc=function($){let{prevScene:et,sceneIndex:en,sceneLength:er}=$,eo=(0,em.useRef)(new Audio("/audio/nites-of-code/chill-onboarding.mp3")),es=(0,ed.T)(),[el,eu]=(0,em.useState)(!1);return(0,em.useEffect)(()=>{let $=eo.current;$.volume=0,$.loop=!0,$.play();let et=0,en=setInterval(()=>{et<1?(et=Math.min(et+.05,1),$.volume=et):clearInterval(en)},200);return()=>clearInterval(en)},[]),(0,em.useEffect)(()=>()=>{eo.current.pause(),eo.current.currentTime=0},[]),(0,ei.jsxs)(t0,{children:[(0,ei.jsx)("div",{className:"btn-wrapper",children:(0,ei.jsxs)(eD.Z,{variant:"subtle",onClick:()=>void es((0,ey.J)({type:"",status:"hide",properties:{}})),children:[(0,ei.jsx)(td.Z,{}),(0,ei.jsx)("span",{className:"btn-text",children:"Exit"})]})}),(0,ei.jsx)("div",{className:"progress-bar",children:(0,ei.jsx)(onBoarding_OnBoardingProgressBar,{prevScene:et,percentageCompleted:Math.floor((en+1)/er*100),darkTheme:!0})}),(0,ei.jsx)("div",{className:"btn-wrapper",children:(0,ei.jsxs)(eD.Z,{variant:"subtle",onClick:()=>(function(){let $=eo.current;el?($.volume=1,eu(!1)):($.volume=0,eu(!0))})(),children:[el?(0,ei.jsx)(tp.Z,{}):(0,ei.jsx)(th.Z,{}),(0,ei.jsx)("span",{className:"btn-text",children:"Sound on"})]})})]})};function FirstScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .scene-title {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n\n .top-text {\n color: #cbd5e1;\n font-family: "ScrambledEggs", sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .main-text {\n color: #fff;\n text-shadow: 0px 6px 0px #475569;\n font-family: "ScrambledEggs", sans-serif;\n font-size: 64px;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 1.92px;\n\n '," {\n font-size: 32px;\n }\n\n ",' {\n font-size: 64px;\n }\n }\n\n .bottom-text {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n }\n }\n\n .image-container {\n img {\n width: 373px;\n height: 266px;\n }\n }\n']);
1856return FirstScene_templateObject=function(){return $},$}let t1=ek.default.div.withConfig({componentId:"sc-31a87243-0"})(FirstScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_FirstScene=function(){return(0,ei.jsxs)(t1,{children:[(0,ei.jsxs)("div",{className:"scene-title",children:[(0,ei.jsx)("p",{className:"top-text",children:"Welcome to"}),(0,ei.jsx)("p",{className:"main-text",children:"#30NitesOfCode"}),(0,ei.jsx)("p",{className:"bottom-text",children:"Let's get you ready for 30 days of learning and building."})]}),(0,ei.jsx)("div",{className:"image-container",children:(0,ei.jsx)("img",{src:"/images/character_gifs/winners.gif",alt:"characters dancing"})})]})};function SelectEgg_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n width: 100%;\n\n .scene-title {\n p {\n color: #fff;\n\n font-family: "ScrambledEggs", sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n "," {\n font-size: 32px;\n }\n }\n }\n\n .eggs {\n width: inherit;\n display: flex;\n align-items: center;\n gap: 32px;\n\n "," {\n flex-direction: column;\n }\n\n "," {\n flex-direction: row;\n }\n\n .egg {\n width: inherit;\n display: flex;\n justify-content: center;\n "," {\n padding: 16px;\n }\n\n "," {\n padding: 24px;\n }\n\n img {\n flex-shrink: 0;\n\n "," {\n width: 80px;\n height: 80px;\n }\n\n "," {\n width: 141px;\n height: 141px;\n }\n }\n\n :hover {\n background-color: #042d4d;\n }\n }\n }\n"]);return SelectEgg_templateObject=function(){return $},$}let t2=ek.default.div.withConfig({componentId:"sc-1d189f13-0"})(SelectEgg_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_SelectEgg=function($){let{selectedEgg:et,setSelectedEgg:en,eggs:er}=$;return(0,ei.jsxs)(t2,{children:[(0,ei.jsx)("div",{className:"scene-title",children:(0,ei.jsx)("p",{children:"Select an egg:"})}),(0,ei.jsx)("div",{className:"eggs",children:er.map($=>(0,ei.jsx)(eP.Z,{className:"egg nes-pointer",borderColor:et.name===$.name?"14ADFF":"64748b",onClick:()=>en($),style:{backgroundColor:et.name===$.name&&"#042d4d"},children:(0,ei.jsx)("img",{src:$.imgSrc,alt:"egg"})},$.name))})]})},t5=en(99281);function PetName_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n width: inherit;\n\n .scene-title {\n p {\n color: #fff;\n text-align: center;\n font-family: "ScrambledEggs", sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n "," {\n font-size: 32px;\n }\n }\n }\n\n .dynamic-input {\n width: 100%;\n max-width: 390px;\n }\n"]);return PetName_templateObject=function(){return $},$}let t3=ek.default.div.withConfig({componentId:"sc-d6745469-0"})(PetName_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_PetName=function($){let{petName:et,setPetName:en}=$;return(0,ei.jsxs)(t3,{children:[(0,ei.jsx)("div",{className:"scene-title",children:(0,ei.jsx)("p",{children:"Give your pet a name!"})}),(0,ei.jsx)(t5.Z,{placeholder:"Your pet's name",setValue:en,value:et})]})};
1856function WelcomePet_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n .scene-title {\n p {\n color: #fff;\n font-family: "ScrambledEggs", sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n "," {\n font-size: 32px;\n }\n\n span {\n color: #14adff;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n }\n }\n }\n\n .img-container {\n img {\n width: 200px;\n height: 200px;\n }\n }\n"]);return WelcomePet_templateObject=function(){return $},$}let t6=ek.default.div.withConfig({componentId:"sc-d73f0b63-0"})(WelcomePet_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_WelcomePet=function($){let{petName:et,selectedEgg:en}=$;return(0,ei.jsxs)(t6,{children:[(0,ei.jsx)("div",{className:"scene-title",children:(0,ei.jsxs)("p",{children:["Say hi to ",(0,ei.jsx)("span",{children:et}),"!"]})}),(0,ei.jsx)("div",{className:"img-container",children:(0,ei.jsx)("img",{src:en.imgSrc,alt:"selected pet"})})]})};function LogDays_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .scene-title {\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .scene-cta {\n color: #fff;\n font-family: "ScrambledEggs", sans-serif;\n text-align: center;\n\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n\n span {\n color: #14adff;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n }\n }\n\n .bottom-cta {\n color: #cbd5e1;\n text-align: center;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n\n .pet-display {\n padding: 32px 0px;\n display: flex;\n flex-direction: column;\n\n .pet-apple {\n z-index: 1;\n margin-bottom: -16px;\n display: flex;\n align-items: end;\n justify-content: center;\n gap: 12px;\n\n .apple {\n width: 79px;\n height: 79px;\n }\n\n .pet {\n width: 110px;\n height: 110px;\n }\n }\n }\n']);return LogDays_templateObject=function(){return $},$}let t4=ek.default.div.withConfig({componentId:"sc-75ae6fa4-0"})(LogDays_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_LogDays=function($){let{petName:et,selectedEgg:en}=$;return(0,ei.jsxs)(t4,{children:[(0,ei.jsxs)("div",{className:"scene-title",children:[(0,ei.jsxs)("p",{className:"scene-cta",children:["Log your coding progress every day to feed ",(0,ei.jsx)("span",{children:et}),"."]}),(0,ei.jsx)("p",{className:"bottom-cta",children:"Only have a few minutes? Even the smallest progress counts!"})]}),(0,ei.jsxs)("div",{className:"pet-display",children:[(0,ei.jsxs)("div",{className:"pet-apple",children:[(0,ei.jsx)("img",{src:"/images/code-nights/apple.png",alt:"apple",className:"apple"}),(0,ei.jsx)("img",{src:en.imgSrc,alt:"pet",className:"pet"})]}),(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"221",height:"31",viewBox:"0 0 221 31",fill:"none",children:(0,ei.jsx)("ellipse",{cx:"110.33",cy:"15.2937",rx:"110",ry:"15",fill:"#020617","fill-opacity":"0.6"})})]})]})},t9=en(78635);function Health_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .scene-title {\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .scene-cta {\n color: #fff;\n font-family: "ScrambledEggs", sans-serif;\n text-align: center;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .bottom-cta {\n color: #cbd5e1;\n text-align: center;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n\n .hearts {\n padding: 32px 0px;\n display: flex;\n gap: 65px;
1856\n align-items: center;\n\n svg {\n transform: scale(3);\n }\n }\n']);return Health_templateObject=function(){return $},$}let t8=ek.default.div.withConfig({componentId:"sc-b03b1777-0"})(Health_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var onboarding_Health=function(){return(0,ei.jsxs)(t8,{children:[(0,ei.jsxs)("div",{className:"scene-title",children:[(0,ei.jsx)("p",{className:"scene-cta",children:"Your pet needs daily care."}),(0,ei.jsx)("p",{className:"bottom-cta",children:"Make sure not to miss 3 days in a row, otherwise... let's just hope we don't find out!"})]}),(0,ei.jsxs)("div",{className:"hearts",children:[(0,ei.jsx)(t9.Z,{isLiked:!0}),(0,ei.jsx)(t9.Z,{isLiked:!1}),(0,ei.jsx)(t9.Z,{isLiked:!1})]})]})};function LastScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .scene-title {\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .scene-cta {\n color: #fff;\n font-family: "ScrambledEggs", sans-serif;\n text-align: center;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n letter-spacing: 0.96px;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .bottom-cta {\n color: #cbd5e1;\n text-align: center;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n\n .pet-and-character {\n display: flex;\n align-items: end;\n position: relative;\n\n .character {\n img {\n height: 242px;\n width: auto;\n z-index: 2;\n }\n\n svg {\n height: 242px;\n }\n }\n\n .egg {\n img {\n height: 157px;\n width: auto;\n z-index: 2;\n }\n\n svg {\n width: 157px;\n }\n }\n\n .character,\n .egg {\n svg {\n margin-top: -3.5rem;\n height: fit-content;\n z-index: 1;\n }\n }\n }\n']);return LastScene_templateObject=function(){return $},$}let t7=ek.default.div.withConfig({componentId:"sc-b9f3be2b-0"})(LastScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nt=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"221",height:"31",viewBox:"0 0 221 31",fill:"none",children:(0,ei.jsx)("ellipse",{cx:"110.33",cy:"15.2937",rx:"110",ry:"15",fill:"#020617","fill-opacity":"0.6"})});var onboarding_LastScene=function($){let{selectedEgg:et}=$,en=(0,eo.v9)(ey.jl),er=(0,eo.v9)(ey.$u)||0;return(0,ei.jsxs)(t7,{children:[(0,ei.jsxs)("div",{className:"scene-title",children:[(0,ei.jsx)("p",{className:"scene-cta",children:"That's it! You're ready for #30NitesofCode."}),(0,ei.jsx)("p",{className:"bottom-cta",children:"Already have progress to log for today? Feel free to add it nowâor make sure to come back later today!"})]}),(0,ei.jsxs)("div",{className:"pet-and-character",children:[(0,ei.jsxs)("div",{className:"character",children:[(0,ei.jsx)("img",{src:en[er],alt:""}),nt]}),(0,ei.jsxs)("div",{className:"egg",children:[(0,ei.jsx)("img",{src:et.imgSrc,alt:"selected pet"}),nt]})]})]})};function Onboarding30NOC_templateObject(){let $=(0,eA._)(['\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: linear-gradient(180deg, #020617 0%, #2e1065 100%);\n gap: 64px;\n z-index: 20;\n opacity: 0;\n animation: fadeIn 0.25s ease-in forwards;\n overflow: auto;\n\n .outer-wrapper {\n width: 100%;\n min-height: 100vh;\n height: fit-content;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-image: url("/images/30-nites-of-code/star-bg.png");\n background-size: 300px;\n image-rendering: pixelated;\n\n .scene-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n max-width: 724px;\n padding: 24px 1rem;\n /* margin-top: 64px; */\n flex: 1;\n }\n\n .btn-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n gap: 12px;\n\n '," {\n padding: 32px 16px;\n }\n\n "," {\n padding: 32px 0px 80px 0px;\n }\n\n button {\n "," {\n width: 100%;\n }\n\n "," {\n width: 240px;\n }\n }\n\n .extend {\n "," {\n width: 100%;\n }\n\n "," {\n width: 395px;\n }\n }\n }\n }\n\n p {\n margin: 0px;\n }\n"]);
1856return Onboarding30NOC_templateObject=function(){return $},$}let nn=ek.default.div.withConfig({componentId:"sc-ce16c931-0"})(Onboarding30NOC_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nr=[{name:"duck",imgSrc:"/images/code-nights/duck.gif"},{name:"dinosaur",imgSrc:"/images/code-nights/dinosaur.gif"},{name:"dragon",imgSrc:"/images/code-nights/dragon.gif"}];var _30NitesOfCode_Onboarding30NOC=function(){let $=(0,ed.T)(),et=(0,eo.v9)(ey.f8),[en,er]=(0,em.useState)(0),[es,el]=(0,em.useState)({}),[eu,eh]=(0,em.useState)(""),ep=(0,eo.v9)(ey.zr),ef=(0,e_.useRouter)();async function register(){let $=await (0,tY.t)({uid:et,pet:es.name,petName:eu});200===$.status&&ef.push("/@".concat(ep,"/30-nites-of-code"))}let eg=[(0,ei.jsx)(onboarding_FirstScene,{},"first-scene"),(0,ei.jsx)(onboarding_SelectEgg,{selectedEgg:es,setSelectedEgg:el,eggs:nr},"select-egg"),(0,ei.jsx)(onboarding_PetName,{petName:eu,setPetName:eh},"pet-name"),(0,ei.jsx)(onboarding_WelcomePet,{petName:eu,selectedEgg:es},"welcome-pet"),(0,ei.jsx)(onboarding_LogDays,{petName:eu,selectedEgg:es},"log-days"),(0,ei.jsx)(onboarding_Health,{},"health"),(0,ei.jsx)(onboarding_LastScene,{selectedEgg:es},"last-scene")];function closePopup(){$((0,ey.J)({type:"",status:"hide",properties:{}}))}return(0,ei.jsx)(nn,{children:(0,ei.jsxs)("div",{className:"outer-wrapper",children:[(0,ei.jsx)(onboarding_NavOnboarding30Noc,{prevScene:function(){if(0!==en){if(en===eg.length-1)return er(en-2);er(en-1)}},sceneIndex:en,sceneLength:null==eg?void 0:eg.length}),(0,ei.jsx)("div",{className:"scene-container",children:eg[en]}),(0,ei.jsx)("div",{className:"btn-container",children:6===en?(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{onClick:()=>
1856closePopup(),className:"extend",children:"Add progress +10 XP"}),(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>{ef.push("/home"),closePopup()},className:"extend",children:"Return to dashboard"})]}):(0,ei.jsx)(eD.Z,{onClick:function(){2===en&&eu&®ister(),en<eg.length-1&&er(en+1)},disabled:!es.imgSrc&&1===en||2===en&&!eu,children:"Continue"})})]})})},ni=en(49691);function SearchDrawerHeader_templateObject(){let $=(0,eA._)(["\n padding: 10px 12px 10px 12px;\n border-bottom: 2px solid ",';\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-family: "Mulish", sans-serif;\n\n .search-drawer-input {\n flex: 1;\n padding: 0px 12px;\n display: flex;\n align-items: center;\n gap: 12px;\n\n svg {\n path {\n fill: ',";\n }\n }\n\n input {\n flex: 1;\n font-size: 16px;\n background-color: transparent;\n outline: none;\n border: none;\n min-width: 0;\n color: ",";\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n caret-color: ",";\n\n ::placeholder {\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .clear-button {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n margin: 0px;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n padding: 8px;\n border-radius: 4px;\n\n :hover {\n background-color: ",";\n }\n }\n }\n\n .search-drawer-close-icon {\n padding: 6px 8px 8px 8px;\n width: fit-content;\n border-radius: 4px;\n\n svg {\n width: 24px;\n height: 24px;\n path {\n fill: ",";\n }\n }\n\n :hover {\n background: ",";\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n"]);return SearchDrawerHeader_templateObject=function(){return $},$}let na=ek.default.div.withConfig({componentId:"sc-80bf34da-0"})(SearchDrawerHeader_templateObject(),$=>{let{theme:et}=$;return et.colors.border.grey.light},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.border.grey.dark},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var searchDrawer_SearchDrawerHeader=function($){let{searchQuery:et,setSearchQuery:en,closePopup:er,handleKeyDown:eo}=$;return(0,ei.jsxs)(na,{children:[(0,ei.jsxs)("div",{className:"search-drawer-input",children:[(0,ei.jsx)(ni.Z,{}),(0,ei.jsx)("input",{placeholder:"Search courses, users, and more...",autoFocus:!0,value:et,onChange:$=>en($.target.value),onKeyDown:eo}),et&&(0,ei.jsx)("button",{className:"clear-button nes-pointer",onClick:()=>en(""),children:"Clear"})]}),(0,ei.jsx)("div",{className:"search-drawer-close-icon nes-pointer",onClick:()=>{er()},children:(0,ei.jsx)(tq.Z,{})})]})},no=en(16244),ns=en(33896),nl=en(49656),nu=en(11924);function SearchSeeAllButton_templateObject(){let $=(0,eA._)(["\n padding: 0px 12px 16px 12px;\n\n button {\n width: 100%;\n svg {\n transform: rotate(180deg);\n width: 24px;\n height: 24px;\n path {\n fill: ",";\n }\n }\n }\n"]);return SearchSeeAllButton_templateObject=function(){return $},$}let nd=(0,ek.default)(tP()).withConfig({componentId:"sc-fe3a6c05-0"})(SearchSeeAllButton_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary});var search_SearchSeeAllButton=function($){let{totalItems:et,searchQuery:en,closePopup:er}=$;return et<9?null:(0,ei.jsx)(nd,{href:"/search?q=".concat(en),style:{textDecoration:"none"},onClick:er,children:(0,ei.jsxs)(eD.Z,{variant:"subtle",children:["See all ",et," results ",(0,ei.jsx)(td.Z,{})]})})};
1856function SearchDrawerNoresults_templateObject(){let $=(0,eA._)(["\n min-height: 202px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n\n img {\n width: 100px;\n height: 100px;\n aspect-ratio: 1/1;\n }\n\n .no-search-results {\n color: ",";\n text-align: center;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n display: flex;\n flex-direction: column;\n align-items: center;\n\n span {\n font-weight: 700;\n word-wrap: break-word;\n overflow-wrap: anywhere;\n max-width: 90%;\n text-align: center;\n }\n }\n"]);return SearchDrawerNoresults_templateObject=function(){return $},$}let nh=ek.default.div.withConfig({componentId:"sc-99492f64-0"})(SearchDrawerNoresults_templateObject(),$=>{let{theme:et}=$;return et.colors.text.tertiary});var searchDrawer_SearchDrawerNoresults=function($){let{searchQuery:et,show:en}=$;return en?(0,ei.jsxs)(nh,{children:[(0,ei.jsx)("img",{src:"/images/character_gifs/search.gif",alt:"searching gif"}),(0,ei.jsxs)("p",{className:"no-search-results",children:["Uh oh, we didn't find anything for ",(0,ei.jsx)("span",{children:'"'.concat(et,'"')})]})]}):null},np=en(12238),nm=en.n(np);function SearchDrawer_templateObject(){let $=(0,eA._)(["\n from {\n right: -","px;\n }\n to {\n right: 0px;\n }\n"]);return SearchDrawer_templateObject=function(){return $},$}function SearchDrawer_templateObject1(){let $=(0,eA._)(["\n from {\n right: 0px;\n }\n to {\n right: -","px;\n }\n"]);return SearchDrawer_templateObject1=function(){return $},$}function SearchDrawer_templateObject2(){let $=(0,eA._)(['\n z-index: 14;\n position: fixed;\n top: 0px;\n left: 0%;\n height: 100vh;\n width: 100vw;\n font-family: "Mulish", sans-serif;\n opacity: 0;\n animation: opac 0.2s ease-out forwards;\n pointer-events: none;\n\n p,\n label {\n margin: 0px;\n }\n\n @keyframes opac {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .notification-hub-outer-container {\n width: inherit;\n height: inherit;\n position: relative;\n\n .notification-hub-container {\n pointer-events: auto;\n position: absolute;\n top: 0px;\n right: -',"px;\n height: inherit;\n width: ","px;\n max-width: 101%;\n background-color: ",";\n border-left: 2px solid ",";\n display: flex;\n flex-direction: column;\n animation: "," 0.3s forwards;\n box-shadow: 0px 4px 32px 0px\n ",";\n transition: right 0.3s ease-out;\n\n &.slide-out {\n animation: "," 0.3s forwards;\n }\n\n .catagories-wrapper {\n flex: 1;\n padding: 24px 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n overflow: auto;\n }\n }\n }\n"]);return SearchDrawer_templateObject2=function(){return $},$}let nf=(0,ek.keyframes)(SearchDrawer_templateObject(),450),ng=(0,ek.keyframes)(SearchDrawer_templateObject1(),450),ny=ek.default.div.withConfig({componentId:"sc-ee4d1f67-0"})(SearchDrawer_templateObject2(),450,450,$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.border.grey.medium},nf,$=>{let{theme:et}=$;return et.colors.background.grey.boxshadow},ng);var organisms_SearchDrawer=function(){let $=(0,ed.T)(),et=(0,e_.useRouter)(),en=(0,nu.Z)(),[er,eo]=(0,em.useState)(!1),[es,el]=(0,em.useState)(0),[eu,eh]=(0,em.useState)(""),[ep,ef]=(0,em.useState)(en),[eg,ev]=(0,em.useState)(0),[ex,ew]=(0,em.useState)(!1),ek=(0,em.useCallback)(async()=>{console.log("infinite run test");let et=new(nm()),er=et.isProfane(eu);if(er)return $((0,eE.fz)({message:"Search not allowed"})),eh(""),null;try{if(!eu){ef(en),el(0),ev(0),ew(!1);return}ew(!1),eo(!0),el($=>$+1);let $=await fetch("/api/search?q=".concat(encodeURIComponent(eu)),{method:"GET"});if(!$.ok)throw Error("Error: ".concat($.statusText));if(200===$.status){let et=await $.json();ef(et.results),ev(et.totalItemsCount),0===et.totalItemsCount&&ew(!0),eo(!1)}}catch($){ew(!0),eo(!1)}},[en,$,eu]);(0,no.Z)(ek,500);let eC=(0,em.useRef)(null),[eI,eS]=(0,em.useState)(!1);function closePopup(){eS(!0),setTimeout(()=>{$((0,ey.J)({type:"",status:"hide",properties:{}}))},300)}(0,tI.y)(),(0,tH.Z)(eC,()=>{closePopup()});let eT=er&&1===es;return(0,ei.jsx)(ny,{id:"global-notification",children:(0,ei.jsx)("div",{className:"notification-hub-outer-container",children:(0,ei.jsxs)("div",{className:"notification-hub-container ".concat(eI?"slide-out":""),ref:eC,children:[(0,ei.jsx)(searchDrawer_SearchDrawerHeader,{searchQuery:eu,setSearchQuery:eh,closePopup:closePopup,handleKeyDown:function($){"Enter"===$.key&&(et.push("/search?q=".concat(eu)),closePopup())}}),(0,ei.jsxs)("div",{className:"catagories-wrapper",children:[(0,ei.jsx)(search_SearchSeeAllButton,{searchQuery:eu,totalItems:eg,closePopup:closePopup}),(0,ei.jsx)(searchDrawer_SearchDrawerNoresults,{searchQuery:eu,show:ex}),eT&&(0,ei.jsx)(nl.Z,{searchQuery:eu}),!eT&&ep.map($=>(0,ei.jsx)(ns.Z,{catagory:$},$.type))]})]})})})};
1856function CutSceneStatCard_templateObject(){let $=(0,eA._)(['\n padding: 16px;\n background-color: #020617;\n display: flex;\n align-items: center;\n gap: 16px;\n\n .noc-stat {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .num {\n color: #fff;\n font-family: "PixelGridM";\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n\n '," {\n font-size: 16px;\n }\n\n "," {\n font-size: 20px;\n }\n }\n\n .stat-copy {\n color: #94a3b8;\n font-family: Mulish;\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n }\n\n img {\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n }\n"]);return CutSceneStatCard_templateObject=function(){return $},$}let nv=(0,ek.default)(eP.Z).withConfig({componentId:"sc-f04dabab-0"})(CutSceneStatCard_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_CutSceneStatCard=function($){let{num:et,copy:en,svg:er,...eo}=$;return(0,ei.jsxs)(nv,{borderColor:"475569",className:"cutscene-stats",...eo,children:[er,(0,ei.jsxs)("div",{className:"noc-stat",children:[(0,ei.jsx)("p",{className:"num",children:et}),(0,ei.jsx)("p",{className:"stat-copy",children:en})]})]})},nx=en(42392),n_=en(19907),nw=en(85307);let nk=["Woohoo! You just wrapped up your very first chapter of the {{COURSE_NAME}} course⦠This is a HUGE first step in your personal growth.","Congrats! Two chapters down and you're picking up speed. Keep that momentum going!","You're on a roll! Three chapters in and your skills are leveling up fast. The grind is paying off!","Four chapters down â you're crushing it. Keep pushing forward! \uD83D\uDE80","High five! Five chapters in and your progress is seriously impressive. Stay sharp â you're getting close.","Six chapters?! That's some serious dedication. The finish line is coming into view. Just keep swimming~","Seven chapters behind you, keep pushing ahead. Let's finish strong."];function ChapterComplete_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .sub-header {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n max-width: 724px;\n transition-duration: 3s;\n }\n\n .character-and-stats {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .character {\n width: auto;\n height: 164px;\n }\n\n .stats {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n transition-duration: 2s;\n\n .cutscene-stats {\n '," {\n width: 100%;\n }\n\n ",' {\n width: 267px;\n }\n }\n }\n }\n\n [data-aos="fade-up"] {\n transform: translate3d(0, 35px, 0);\n }\n']);return ChapterComplete_templateObject=function(){return $},$}let nC=ek.default.div.withConfig({componentId:"sc-ed379b0-0"})(ChapterComplete_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_ChapterComplete=function($){let{courseName:et,chapterName:en,chapterIndex:er,nextCutScene:es=()=>{}}=$,el=(0,eo.v9)(ey.jl),eu=(0,eo.v9)(ey.$u)||0,eh=(0,ed.T)(),ep=(0,eo.v9)(ey.nU),ef=(0,nw.Z)(ep),[eg,ev]=(0,em.useState)(!1),[ex,e_]=(0,em.useState)({firstTrigger:!1,typingComplete:!1,showStats:!1,showBtns:!1});(0,em.useEffect)(()=>{setTimeout(function(){e_({...ex,firstTrigger:!0})},1e3)},[]);let ek=(0,em.useCallback)(()=>{ev(!0),eh((0,ew.i1)()),setTimeout(()=>{e_($=>({...$,typingComplete:!0}))},2e3),setTimeout(()=>{e_($=>({...$,showStats:!0}))},3800),setTimeout(()=>{e_($=>({...$,showBtns:!0}))},7e3)},[ev]),eC=(0,eo.v9)((0,ey.RI)({courseName:et})),eE=(0,eo.v9)((0,ew.N)({courseName:et,chapterName:en})),{badgeCardInfo:eI,catalogName:eS}=(0,eo.v9)((0,ew.ez)({courseName:et,chapterName:en}));return(0,ei.jsxs)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{style:{opacity:ex.showBtns?1:0,transition:"opacity 500ms"},onClick:es,children:"Continue"})}),children:[(0,ei.jsx)(n_.Z,{triggerConfetti:eg,setTriggerConfetti:ev}),(0,ei.jsxs)(nC,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsxs)("p",{className:"header",children:["Chapter ",er+1," complete!"]}),ex.firstTrigger&&(0,ei.jsx)(tt.Z,{text:"Chapter ".concat(er+1," complete!"),disableCursor:!0,setAction:ek,playSound:!0,lightTextOnly:!0})]}),(0,ei.jsx)("p",{className:"sub-header",style:{opacity:ex.showStats?1:0},"data-aos":"fade-up","data-aos-duration":"800",children:eI.message||function($){let{chapterIndex:et,courseName:en}=$,er=nk[et];return er?er.replace(/\{\{COURSE_NAME\}\}/g,en):""}({chapterIndex:er,courseName:eS})||""},ex.showStats),(0,ei.jsxs)("div",{className:"character-and-stats",children:[(0,ei.jsx)("img",{src:el[eu],className:"character",alt:""}),(0,ei.jsxs)("div",{className:"stats",style:{opacity:ex.showStats?1:0},children:[(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(nx.Z,{}),num:"".concat(eE||0," XP"),copy:"Earned IN CHAPTER","data-aos":"zoom-in","data-aos-delay":"1000"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(nx.Z,{}),num:"".concat(eC||0," XP"),copy:"Total earned","data-aos":"zoom-in","data-aos-delay":"1500"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)("img",{src:ef.badge,alt:"rank image"}),num:"Level ".concat(ef.level),copy:"Current Level","data-aos":"zoom-in","data-aos-delay":"2000"})]},ex.showStats)]})]})]})},nE=en(77521);
1856function DefaultBadgeCard_templateObject(){let $=(0,eA._)(["\n padding: 24px;\n background-color: #1e293b;\n\n display: flex;\n align-items: center;\n gap: 24px;\n\n "," {\n max-width: 400px;\n width: 100%;\n }\n\n ",' {\n width: 400px;\n max-width: 100%;\n }\n\n p {\n margin: 0px;\n }\n\n .badge-meta {\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .chapter-index {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n .chapter-title {\n color: #fff;\n font-family: "PixelGridM";\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n }\n }\n\n .default-badge-image {\n width: 64px;\n height: 64px;\n aspect-ratio: 1/1;\n }\n']);return DefaultBadgeCard_templateObject=function(){return $},$}let nI=(0,ek.default)(eP.Z).withConfig({componentId:"sc-e45177fd-0"})(DefaultBadgeCard_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_DefaultBadgeCard=function($){let{defaultBadgeInfo:et}=$;return(0,ei.jsxs)(nI,{borderColor:"475569",children:[(0,ei.jsx)("img",{src:et.imgLink,alt:"badge",className:"default-badge-image"}),(0,ei.jsxs)("div",{className:"badge-meta",children:[(0,ei.jsxs)("p",{className:"chapter-index",children:["Chapter ",et.chapterIndex+1||1]}),(0,ei.jsx)("p",{className:"chapter-title",children:et.title})]})]})};function BadgeEarnedCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 40px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n "," {\n font-size: 32px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .tilt-wrapper {\n display: flex;\n justify-content: center;\n max-width: calc(100% - 1.5rem);\n }\n\n .badge-image {\n width: 413.479px;\n height: auto;\n }\n\n .btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n justify-content: center;\n\n button {\n "," {\n width: 100%;\n }\n\n "," {\n width: fit-content;\n }\n\n svg {\n margin-right: 8px;\n }\n }\n }\n"]);return BadgeEarnedCutScene_templateObject=function(){return $},$}let nS=ek.default.div.withConfig({componentId:"sc-2c2b5dbf-0"})(BadgeEarnedCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nT=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"16",viewBox:"0 0 20 16",fill:"none",children:(0,ei.jsx)("path",{d:"M17.4043 4.56773C17.4043 4.74677 17.4043 4.88999 17.4043 5.06903C17.4043 10.0462 13.6445 15.7396 6.73372 15.7396C4.58529 15.7396 2.61589 15.1309 0.96875 14.0567C1.25521 14.0925 1.54167 14.1283 1.86393 14.1283C3.61849 14.1283 5.22982 13.5196 6.51888 12.5169C4.87174 12.4811 3.47526 11.4069 3.00977 9.90302C3.26042 9.93882 3.47526 9.97463 3.72591 9.97463C4.04818 9.97463 4.40625 9.90302 4.69271 9.8314C2.97396 9.47333 1.6849 7.96942 1.6849 6.14325V6.10744C2.1862 6.3939 2.79492 6.53713 3.40365 6.57294C2.36523 5.8926 1.7207 4.74677 1.7207 3.4577C1.7207 2.74156 1.89974 2.09703 2.22201 1.55992C4.08398 3.81578 6.87695 5.31968 9.99219 5.49872C9.92057 5.21226 9.88477 4.9258 9.88477 4.63934C9.88477 2.56252 11.5677 0.879578 13.6445 0.879578C14.7187 0.879578 15.6855 1.30927 16.4017 2.06122C17.2253 1.88218 18.0488 1.55992 18.765 1.13023C18.4785 2.02541 17.9056 2.74156 17.1178 3.20705C17.8698 3.13544 18.6217 2.92059 19.2663 2.63414
1856C18.765 3.38609 18.1204 4.03062 17.4043 4.56773Z",fill:"white"})}),nA=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",children:(0,ei.jsx)("path",{d:"M17.3743 2.27081C17.9831 2.27081 18.5202 2.80792 18.5202 3.45245V17.1666C18.5202 17.8112 17.9831 18.3125 17.3743 18.3125H3.58854C2.97982 18.3125 2.47852 17.8112 2.47852 17.1666V3.45245C2.47852 2.80792 2.97982 2.27081 3.58854 2.27081H17.3743ZM7.3125 16.0208V8.39386H4.94922V16.0208H7.3125ZM6.13086 7.31964C6.88281 7.31964 7.49154 6.71092 7.49154 5.95896C7.49154 5.20701 6.88281 4.56248 6.13086 4.56248C5.3431 4.56248 4.73438 5.20701 4.73438 5.95896C4.73438 6.71092 5.3431 7.31964 6.13086 7.31964ZM16.2285 16.0208V11.8314C16.2285 9.79034 15.763 8.17902 13.3639 8.17902C12.2181 8.17902 11.4303 8.82355 11.1081 9.43227H11.0723V8.39386H8.81641V16.0208H11.1797V12.261C11.1797 11.2584 11.3587 10.2916 12.612 10.2916C13.8294 10.2916 13.8294 11.4375 13.8294 12.2969V16.0208H16.2285Z",fill:"white"})});var courses_BadgeEarnedCutScene=function($){let{courseName:et,chapterName:en,badgeLink:er,nextCutScene:es=()=>{}}=$,{showDefault:el,badgeCardInfo:eu,defaultBadgeInfo:ed,badgeName:eh}=(0,eo.v9)((0,ew.ez)({courseName:et,chapterName:en})),ep=(0,eo.v9)((0,ew._9)({courseName:et})),[ef,eg]=(0,em.useState)({firstTrigger:!0,typingComplete:!1,showNext:!1});console.log(eh);let ey=(0,em.useCallback)(()=>{eg($=>({...$,typingComplete:!0})),setTimeout(()=>{eg($=>({...$,showNext:!0}))},1e3)},[]),ev="https://twitter.com/intent/tweet?text=I+just+earned+".concat(eh.replace(/\s+/g,"+"),"+Badge+on+Cod\xe9dex!&hashtags=").concat(ep,",Codedex+@codedex_io"),ex="https://www.linkedin.com/sharing/share-offsite/?url=https://codedex.io&summary=I+just+earned+".concat(eh.replace(/\s+/g,"+"),"+Badge+on+Cod\xe9dex!+%23").concat(ep.replace(/\s+/g,""),"+%23Codedex");return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{style:{opacity:ef.showNext?1:0},onClick:es,children:"Continue"})}),children:(0,ei.jsxs)(nS,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:"You earned a new badge!"}),ef.firstTrigger&&(0,ei.jsx)(tt.Z,{text:"You earned a new badge!",disableCursor:!0,setAction:ey,typingSpeed:30,lightTextOnly:!0})]}),(0,ei.jsx)(nE.Z,{tiltMaxAngleX:15,tiltMaxAngleY:15,className:"tilt-wrapper",children:el?(0,ei.jsx)(courses_DefaultBadgeCard,{defaultBadgeInfo:ed}):(0,ei.jsx)("img",{className:"badge-image",src:eu.imgLink,alt:"badge"})}),(0,ei.jsxs)("div",{className:"btn-container",style:{opacity:ef.typingComplete?1:0},children:[(0,ei.jsx)(tP(),{href:er||ev,target:"_blank",style:{textDecoration:"none"},children:(0,ei.jsxs)(eD.Z,{size:"small",variant:"subtle",children:[nT,"Share to X/Twitter"]})}),(0,ei.jsx)(tP(),{href:ex,target:"_blank",style:{textDecoration:"none"},children:(0,ei.jsxs)(eD.Z,{size:"small",variant:"subtle",children:[nA,"Share to LinkedIn"]})})]})]})})};function BonusArticleCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .next {\n color: #fde047;\n font-family: "PixelGridM", sans-serif;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n\n '," {\n font-size: 16px;\n }\n\n ",' {\n font-size: 20px;\n }\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 600px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n }\n\n svg {\n image-rendering: pixelated;\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 27px */\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n "," {\n br {\n display: block;\n }\n }\n }\n"]);
1856return BonusArticleCutScene_templateObject=function(){return $},$}let nP=ek.default.div.withConfig({componentId:"sc-aa64c474-0"})(BonusArticleCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nN=(0,ei.jsxs)("svg",{width:"128",height:"128",viewBox:"0 0 128 128",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,ei.jsx)("rect",{width:"128",height:"128",fill:"url(#pattern0_436_11891)"}),(0,ei.jsxs)("defs",{children:[(0,ei.jsx)("pattern",{id:"pattern0_436_11891",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,ei.jsx)("use",{xlinkHref:"#image0_436_11891",transform:"scale(0.03125)"})}),(0,ei.jsx)("image",{id:"image0_436_11891",width:"32",height:"32",preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAARhJREFUWIVjZGBgYOAX1/rPQCPw8eU1RnzyjPziWv8vXzzGwM/LSXXLbz14weDi5InXEUwMDAw0sZyBgYFBTUGCoBommthMAhhwB7CgC9x68IIojcQELzFgwENg1AGjDsDIBdRK3cSCAQ+BAXcARhQsXrefYkNjgxzJdwApmqkBRqNgNApGo2DoRgEpIYWv2U+XKLh88RhWcV19K4gDPn7+TrOmOQMDA8PLtx9xytE0DXz8/J2gGngUEKOYXHDq3BWcckwMDAwMm3cfxRtM5AKYmecvXsOQg4kxMjBAUmlbTzeDmZEO1R1x6twVhqqSUobQ2EQU8dWL5zN8fHmNEd5phDmCVgDZETDLGRigIYDsCJq5AAkg95YBeXxb2v5DaI0AAAAASUVORK5CYII="})]})]});var courses_BonusArticleCutScene=function($){let{courseName:et,chapterName:en,skipToChapter:er}=$,es=(0,e_.useRouter)(),el=(0,eo.v9)((0,ew._9)({courseName:et})),eu=(0,ed.T)(),{bonusArticles:eh,chapterIndex:ep,isLastChapter:ef}=(0,eo.v9)((0,ew.$y)({courseName:et,chapterName:en})),[eg,ev]=(0,em.useState)({}),[ex,ek]=(0,em.useState)(!1);return(0,em.useEffect)(()=>{let $=null==es?void 0:es.asPath,et=eh.find(et=>et.articleLink===$);if(!et){let $=eh[0];ev($)}},[eh,null==es?void 0:es.asPath]),(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{onClick:()=>{es.push(null==eg?void 0:eg.articleLink),ek(!0),setTimeout(()=>{eu((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)},children:"Read Article"}),(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:er,children:ef?"Continue":ep<7?(0,ei.jsxs)(ei.Fragment,{children:["Skip to Chapter ",ep+2]}):"Final Project"})]}),style:{opacity:ex?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nP,{children:[(0,ei.jsx)("p",{className:"next",children:"Next up: Bonus Article"}),(0,ei.jsx)("div",{className:"header-wrapper",children:(0,ei.jsx)("p",{className:"header",children:null==eg?void 0:eg.description})}),(0,ei.jsxs)("p",{className:"description",children:["Finish off this chapter with an optional bonus article in ",el,". ",(0,ei.jsx)("br",{}),"Want to continue learning? Skip ahead and read anytime!"]}),nN]})})};function ComingSoonCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-size: 32px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n text-align: center;\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .description {\n color: #fff;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n "," {\n br {\n display: inline-block;\n }\n }\n }\n"]);return ComingSoonCutScene_templateObject=function(){return $},$}let nj=ek.default.div.withConfig({componentId:"sc-79b2b374-0"}
1856)(ComingSoonCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_ComingSoonCutScene=function($){let{courseName:et}=$,en=(0,e_.useRouter)(),er=(0,ed.T)(),[es,el]=(0,em.useState)(!1),{bannerImageLink:eu,catalogName:eh}=(0,eo.v9)((0,ew.Gm)({courseName:et})),ep="More adventure awaits...!";return(0,ei.jsx)(cutscenes_CutsceneConsumer,{bannerImageLink:eu,buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>(function(){let $="framework-valley-react"===et?"react":et;en.push("/".concat($)),el(!0),setTimeout(()=>{er((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)})(),children:"Back to course"})}),style:{opacity:es?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nj,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:ep}),(0,ei.jsx)(tt.Z,{text:ep,disableCursor:!0,lightTextOnly:!0})]}),(0,ei.jsxs)("p",{className:"description",children:["We're hard at work bringing you the courses you love. ",(0,ei.jsx)("br",{}),"Stay tuned for more to learn in ",eh,", coming soon!"]})]})})};function NextChapter_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .next {\n color: #fde047;\n\n font-family: "PixelGridM", sans-serif;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-size: 48px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n }\n']);return NextChapter_templateObject=function(){return $},$}let nR=ek.default.div.withConfig({componentId:"sc-4a392eca-0"})(NextChapter_templateObject());var courses_NextChapter=function($){let{courseName:et,chapterName:en}=$,er=(0,e_.useRouter)(),es=(0,ed.T)(),[el,eu]=(0,em.useState)(!1),[eh,ep]=(0,em.useState)({firstTrigger:!0,typingComplete:!1,showNext:!1}),ef=(0,eo.v9)((0,ew.WT)({courseName:et,chapterName:en}));if(ef.isNextChapterComingSoon)return(0,ei.jsx)(courses_ComingSoonCutScene,{courseName:et});let{nextChapterName:eg,nextChapterIndex:ev,nextChapterDescription:ex,bannerImageLink:ek,nextChapterLink:eC}=ef;function handleArticleRouting($){let{forBackToCourse:en=!1}=$,ei="framework-valley-react"===et?"react":et;en?er.push("/".concat(ei)):er.push("/".concat(ei,"/").concat(eC)),eu(!0),setTimeout(()=>{es((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)}return(0,ei.jsx)(cutscenes_CutsceneConsumer,{bannerImageLink:ek,buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{onClick:()=>handleArticleRouting({forBackToCourse:!1}),children:"Start learning"}),(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>handleArticleRouting({forBackToCourse:!0}),children:"Back to course"})]}),style:{opacity:el?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nR,{children:[(0,ei.jsxs)("p",{className:"next",children:["Next up: Chapter ",ev+1]}),(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:eg}),eh.firstTrigger&&(0,ei.jsx)(tt.Z,{text:eg,disableCursor:!0,lightTextOnly:!0})]}),(0,ei.jsx)("p",{className:"description",children:ex})]})})};function CheatSheetCutscene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: start;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;
1856\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 650px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 27px */\n transition-duration: 1s;\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n ",' {\n br {\n display: inline-block;\n }\n }\n }\n\n .scroll-svg {\n width: 128px;\n height: 128px;\n image-rendering: pixelated;\n }\n\n .link {\n display: flex;\n align-items: center;\n color: #2cbaff;\n\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n\n svg {\n margin-left: 8px;\n image-rendering: pixelated;\n }\n }\n']);return CheatSheetCutscene_templateObject=function(){return $},$}let nV=ek.default.div.withConfig({componentId:"sc-c992258f-0"})(CheatSheetCutscene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_CheatSheetCutscene=function($){let{courseName:et,chapterName:en,nextCutScene:er}=$,es=(0,eo.v9)((0,ew.W_)({courseName:et,chapterName:en})),el=(0,eo.v9)((0,ew._9)({courseName:et})),eu=es[0].name;return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{onClick:er,children:"Continue"})}),children:(0,ei.jsxs)(nV,{children:[(0,ei.jsx)("div",{className:"header-wrapper",children:(0,ei.jsx)("p",{className:"header",children:eu})}),(0,ei.jsxs)("p",{className:"description",children:["Brush up on ",el," concepts with Cheat Sheets. Download ",(0,ei.jsx)("br",{}),"anytime from the Course page!"]}),(0,ei.jsxs)("svg",{width:"128",height:"129",viewBox:"0 0 128 129",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"scroll-svg",children:[(0,ei.jsx)("rect",{y:"0.5",width:"128",height:"128",fill:"url(#pattern0_436_11858)"}),(0,ei.jsxs)("defs",{children:[(0,ei.jsx)("pattern",{id:"pattern0_436_11858",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,ei.jsx)("use",{xlinkHref:"#image0_436_11858",transform:"scale(0.03125)"})}),(0,ei.jsx)("image",{id:"image0_436_11858",width:"32",height:"32",preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAhJJREFUWIXtVz1PAkEQfWtIKGn0On/AYaIgFSaEyk4TOwtL/gIVZylUdtaUFPRWdoQEKg8wkfsBdnDNdZKYnAXZZXdu9zi+zsaXEHZndzPvZmZnZxgk2FYuRArwZgHjYzGwrVzYay9wcvmMuVsHAGVM0R+XxbhSGIqx6Ux/XEalMES1llVIMKo8CXQK1p2du3VUa1k8XJ0DADqDD3izgDHbyoXTUVNsDI8vAADMn4g5H++CfNERyjk6gw9kqGLdnK7J5KicyuT9AGCXMvDef2CXMsAAKwKbQKckTi4rl/8B4CjJwX1BDlaFQJrgJB5fXHizgGld0LpvRGSNbksrN+1pdFuRdX4FAXd1DW0rF35+vSb/hC3A/AnyRUdJQBypu+CfAMXaINQFX9KATAKRig+dC85Ob/RB6M0Cli86B1UOAL32QvvcpxYDptdSENjHixcHk4uVgoQmpE0yYpycw3+7RrWWNVdEhw5GXUZUovIv0nLqiYiWcxECPBhpUDJ/In46JA1iehsUAjwnUBImMqY13Vwu46ajpsgJkcwErAJyV8gFLi9uZVm+6JhrQuorarq5W19bisvWMFosrW4IAKajpkJcWODQVw9YPkbcqivrZqMuoH7SIS5Z6XoGLpPbuSXc+NaM+jmJ302Yu3VYt994uqsAkFozvoGT4E0khUkurwP62l8+r21OZRKbfdd2kN+CX7k4LuBVKfIHAAAAAElFTkSuQmCC"})]})]}),(0,ei.jsxs)(tP(),{className:"link",href:es[0].link,target:"_blank",rel:"noreferrer",children:[eu,(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.5 11.5V5.5V3.5H19.5H13.5V5.5H17.5V7.5H15.5V9.5H13.5V11.5H11.5V13.5H9.5V15.5H11.5V13.5H13.5V11.5H15.5V9.5H17.5V7.5H19.5V11.5H21.5ZM11.5 5.5H5.5H3.5V7.5V19.5V21.5H5.5H17.5H19.5V19.5V13.5H17.5V19.5H5.5V7.5H11.5V5.5Z",fill:"#2CBAFF"})})]})]})})};
1856function CheckpointProjectCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .next {\n color: #fde047;\n font-family: "PixelGridM", sans-serif;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n\n '," {\n font-size: 16px;\n }\n\n ",' {\n font-size: 20px;\n }\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 600px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n }\n\n .projects-list {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 1rem;\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 27px */\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n "," {\n br {\n display: block;\n }\n }\n }\n"]);return CheckpointProjectCutScene_templateObject=function(){return $},$}function CheckpointProjectCutScene_templateObject1(){let $=(0,eA._)(["\n flex: 1;\n display: flex;\n justify-content: center;\n\n .project-container {\n height: 200px;\n width: 225px;\n\n .inner-project-container {\n padding: 16px;\n height: calc(100% - 4px);\n\n /* background-color: ","; */\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 12px;\n transition: 0.2s;\n\n p {\n margin: 0px;\n }\n\n .project-image {\n font-size: 35px;\n }\n\n .project-title {\n color: ",";\n\n color: ",';\n\n text-align: center;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .completed {\n padding: 5px 12px;\n border-radius: 100px;\n background-color: ',";\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n }\n\n :hover {\n background: ',";\n }\n }\n }\n"]);return CheckpointProjectCutScene_templateObject1=function(){return $},$}let nD=ek.default.div.withConfig({componentId:"sc-d85166df-0"})(CheckpointProjectCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nO=ek.default.div.withConfig({componentId:"sc-d85166df-1"})(CheckpointProjectCutScene_templateObject1(),$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["950"]:et.colors.palette.grey["50"]},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["50"]:et.colors.palette.grey["950"]},$=>{let{theme:et}=$;return et.colors.palette.grey["50"]},$=>{let{theme:et}=$;return et.colors.background.green.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.green},$=>{let{theme:et}=$;return"dark"==et.mode?et.colors.palette.grey["900"]:et.colors.palette.grey["100"]});var courses_CheckpointProjectCutScene=function($){var et;let{courseName:en,skipToChapter:er,skipToComingSoon:es}=$,el=(0,e_.useRouter)(),{projects:eu,chapterIndex:eh,nextChapterComingSoon:ep}=(0,eo.v9)((0,ew.aA)({courseName:en})),ef=(0,eo.v9)((0,eE.NS)({internalCourseName:en})),eg=(0,ed.T)(),ev=(0,eo.v9)((0,ew._9)({courseName:en})),ex=(0,eo.v9)((0,ew.NJ)(en)),[ek,eC]=(0,em.useState)(!1),[eI,eS]=(0,em.useState)(null);return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{disabled:!eI,onClick:()=>{eC(!0),el.push("".concat(ex,"/checkpoint-project/").concat(eI)),setTimeout(()=>{eg((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)},children:"Start project"}),(0,ei.jsxs)(eD.Z,{variant:"subtle",onClick:ep?es:er,children:["Skip to Chapter ",eh+1]})]}),style:{opacity:ek?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nD,{children:[(0,ei.jsx)("p",{className:"next",children:"Next up:"}),(0,ei.jsx)("div",{className:"header-wrapper",children:(0,ei.jsxs)("p",{className:"header",children:[ev," Checkpoint Project"]})}),(0,ei.jsxs)("p",{className:"description",children:["You've got the basics down. Now let's get hands on and build something! ",(0,ei.jsx)("br",{}),"Select a Checkpoint Project to get started:"]}),(0,ei.jsx)("div",{className:"projects-list",children:null==eu?void 0:null===(et=eu.displayProperties)||void 0===et?void 0:et.map($=>(0,ei.jsx)(nO,{onClick:()=>eS($.link),children:(0,ei.jsx)(eP.Z,{borderColor:eI==$.link?"14ADFF":"475569",className:"project-container nes-pointer",style:{backgroundColor:eI==$.link?"#00568D":"#1e293b"},children:(0,ei.jsxs)(eP.Z,{borderColor:eI==$.link?"14ADFF":"475569",className:"inner
1856-project-container",style:{backgroundColor:eI==$.link?"#042D4D":"#020617"},children:[(0,ei.jsx)("p",{className:"project-image",children:$.emoji}),(0,ei.jsx)("p",{className:"project-title",children:$.text}),ef&&ef["checkpoint-project"]&&ef["checkpoint-project"][$.link]&&(0,ei.jsx)("p",{className:"completed",children:"Completed"})]})})},$.link))})]})})};function FinalProjectCutscene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: start;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .next {\n color: #fde047;\n font-family: "PixelGridM", sans-serif;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n\n '," {\n font-size: 16px;\n }\n\n ",' {\n font-size: 20px;\n }\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n max-width: 600px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n max-width: 600px;\n text-align: center;\n }\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 27px */\n transition-duration: 1s;\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n "," {\n br {\n display: block;\n }\n }\n }\n\n img {\n width: 480px;\n height: auto;\n transition-duration: 1s;\n }\n"]);return FinalProjectCutscene_templateObject=function(){return $},$}let nM=ek.default.div.withConfig({componentId:"sc-56064a1d-0"})(FinalProjectCutscene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_FinalProjectCutscene=function($){let{courseName:et}=$,en=(0,e_.useRouter)(),er=(0,ed.T)(),[es,el]=(0,em.useState)({firstTrigger:!0,typingComplete:!1,showNext:!1}),[eu,eh]=(0,em.useState)(!1),ep=(0,eo.v9)((0,ew._9)({courseName:et})),ef="".concat(ep," Final Project");function handleArticleRouting($){let{forBackToCourse:ei=!1}=$,eo="framework-valley-react"===et?"react":et;ei?en.push("/".concat(eo)):en.push("/".concat(eo,"/final-project")),eh(!0),setTimeout(()=>{er((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)}return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{onClick:()=>{handleArticleRouting({forBackToCourse:!1})},children:"Start Final Project"}),(0,ei.jsx)(eD.Z,{variant:"subtle",onClick:()=>{handleArticleRouting({forBackToCourse:!0})},children:"Back to course"})]}),style:{opacity:eu?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nM,{children:[(0,ei.jsx)("p",{className:"next",children:"Next up: Project"}),(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:ef}),es.firstTrigger&&(0,ei.jsx)(tt.Z,{text:ef,disableCursor:!0,typingSpeed:40,setAction:function(){el($=>({...$,typingComplete:!0,showNext:!0}))},lightTextOnly:!0})]}),(0,ei.jsxs)("p",{className:"description",style:{opacity:es.typingComplete?1:0},children:["The journey's not over yet! Use the skills you've gained to build out a fully-fledged ",ep," project. ",(0,ei.jsx)("br",{}),"Choose-your-own-adventure with three project tutorials ranging from beginner-friendly to immediate."]}),(0,ei.jsx)("img",{src:"/images/character_gifs/battle-cropped.gif",alt:"",style:{opacity:es.typingComplete?1:0}})]})})},nF=en(49984),nL=en(46869);
1856function ChallengePackCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .next {\n color: #fde047;\n font-family: "PixelGridM", sans-serif;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.6px;\n\n '," {\n font-size: 16px;\n }\n\n ",' {\n font-size: 20px;\n }\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 600px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n }\n\n img {\n image-rendering: pixelated;\n width: 64px;\n height: 64px;\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n "," {\n br {\n display: block;\n }\n }\n }\n\n .deck-wrapper {\n margin-top: 1rem;\n width: 150px;\n height: 200px;\n position: relative;\n\n .individual-deck-wrapper {\n width: 300px;\n height: 400px;\n transform: scale(0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform-origin: center;\n transform: translate(-50%, -50%) scale(0.5);\n }\n }\n"]);return ChallengePackCutScene_templateObject=function(){return $},$}let nH=ek.default.div.withConfig({componentId:"sc-2861cedd-0"})(ChallengePackCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var courses_ChallengePackCutScene=function($){let{courseName:et,chapterName:en,skipToChapter:er}=$,es=(0,e_.useRouter)(),el=(0,ed.T)(),{challengePack:{articleLink:eu,internalName:eh},chapterIndex:ep,catalogName:ef=""}=(0,eo.v9)((0,ew.Sb)({courseName:et,chapterName:en}))||{challengePack:{articleLink:"",internalName:""},chapterIndex:0,catalogName:""},{language:eg,title:ev}=nL.Rn[eh],[ex,ek]=(0,em.useState)(!1);return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(eD.Z,{onClick:()=>{!function(){let $="framework-valley-react"===et?"react":et;es.push("/".concat($).concat(eu)),ek(!0),setTimeout(()=>{el((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)}()},children:"Start challenge"}),(0,ei.jsxs)(eD.Z,{variant:"subtle",onClick:er,children:["Skip to Chapter ",ep+2]})]}),style:{opacity:ex?0:1,transition:"opacity 1.5s ease-in-out"},children:(0,ei.jsxs)(nH,{children:[(0,ei.jsx)("p",{className:"next",children:"Next up: Challenge Pack"}),(0,ei.jsx)("div",{className:"header-wrapper",children:(0,ei.jsxs)("p",{className:"header",children:[eg," ",ev]})}),(0,ei.jsxs)("p",{className:"description",children:["Finish off this chapter with an optional bonus article in ",ef,". ",(0,ei.jsx)("br",{}),"Want to continue learning? Skip ahead and read anytime!"]}),(0,ei.jsx)("div",{className:"deck-wrapper",children:(0,ei.jsx)(nF.Z,{internalPackName:eh,pack:{packMetadata:{}},disableOverlay:!0})})]})})},nB=en(95986);function ChallengePackComplete_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n opacity: 0;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .sub-header {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n max-width: 724px;\n transition-duration: 3s;\n }\n\n .character-and-stats {\n display: flex;\n flex-direction: column;
1856\n align-items: center;\n gap: 32px;\n\n .character {\n width: auto;\n height: 214px;\n }\n\n .stats {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n transition-duration: 2s;\n\n .cutscene-stats {\n '," {\n width: 100%;\n }\n\n ",' {\n width: 267px;\n }\n }\n }\n }\n\n [data-aos="fade-up"] {\n transform: translate3d(0, 35px, 0);\n }\n']);return ChallengePackComplete_templateObject=function(){return $},$}let nU=ek.default.div.withConfig({componentId:"sc-60086d19-0"})(ChallengePackComplete_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm}),nz="Challenge Pack complete!",nq=["/images/character_gifs/wMCUVlB.gif","/images/character_gifs/winners.gif","/images/character_gifs/dZ7Qu9K.gif"];var courses_ChallengePackComplete=function($){let{inCoursePack:et,nextCutScene:en=()=>{}}=$,er=(0,e_.useRouter)(),es=(0,ed.T)(),el=(0,eo.v9)(ey.nU),eu=(0,eo.v9)(ey.i4),eh=(0,nw.Z)(el),ep=(0,eo.v9)(nB.u3),ef=(0,em.useMemo)(()=>ep.challenges.reduce(($,et)=>$+et.xp,0),[ep]),[eg,ev]=(0,em.useState)(!1),[ex,ew]=(0,em.useState)({firstTrigger:!1,typingComplete:!1,showStats:!1,showBtns:!1}),[ek]=(0,em.useState)(()=>{let $=Math.floor(Math.random()*nq.length);return nq[$]}),eC=(0,em.useRef)(new Audio("https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fchapter1completion.mp3?alt=media&token=4c664097-c9e8-4642-9554-f0ea933432dc"));(0,em.useEffect)(()=>{setTimeout(function(){ew({...ex,firstTrigger:!0})},1e3)},[]),(0,em.useEffect)(()=>{eC.current&&(eC.current.muted=eu)},[eu]);let eE=(0,em.useCallback)(()=>{ev(!0),eu||eC.current.play(),setTimeout(()=>{ew($=>({...$,typingComplete:!0}))},2e3),setTimeout(()=>{ew($=>({...$,showStats:!0}))},3800),setTimeout(()=>{ew($=>({...$,showBtns:!0}))},7e3)},[ev]),[eI,eS]=(0,em.useState)(!1);return(0,em.useEffect)(()=>()=>{let $=eC.current;$&&($.pause(),$.currentTime=0,$.src="")},[]),(0,ei.jsxs)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:et?(0,ei.jsx)(eD.Z,{style:{opacity:ex.showBtns?1:0,transition:"opacity 500ms"},onClick:en,children:"Continue"}):(0,ei.jsx)(eD.Z,{style:{opacity:ex.showBtns?1:0,transition:"opacity 500ms",width:"fit-content"},onClick:()=>void(er.push("/challenges"),eS(!0),setTimeout(()=>{es((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)),children:"Back to Challenge Packs"})}),style:{opacity:eI?0:1,transition:"opacity 1.5s ease-in-out"},children:[(0,ei.jsx)(n_.Z,{triggerConfetti:eg,setTriggerConfetti:ev}),(0,ei.jsxs)(nU,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:nz}),ex.firstTrigger&&(0,ei.jsx)(tt.Z,{text:nz,disableCursor:!0,setAction:eE,playSound:!0,lightTextOnly:!0})]}),(0,ei.jsxs)("div",{className:"character-and-stats",children:[(0,ei.jsx)("img",{src:ek,className:"character",alt:""}),(0,ei.jsxs)("div",{className:"stats",style:{opacity:ex.showStats?1:0},children:[(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(nx.Z,{}),num:"".concat(ef," XP"),copy:"Earned IN THIS PACK","data-aos":"zoom-in","data-aos-delay":"1000"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(nx.Z,{}),num:"".concat(el," XP"),copy:"Total earned","data-aos":"zoom-in","data-aos-delay":"1500"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)("img",{src:eh.badge,alt:"rank image"}),num:"Level ".concat(eh.level),copy:"Current Level","data-aos":"zoom-in","data-aos-delay":"2000"})]},ex.showStats)]})]})]})};function CourseCredits_templateObject(){let $=(0,eA._)(['\n position: fixed;\n top: 0px;\n left: 0px;\n z-index: 100;\n background-color: #020617;\n opacity: 0;\n animation: fadeIn 1s forwards;\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .cutscene-consumer-nav-wrapper {\n position: fixed;\n top: 0px;\n padding: 19px 24px;\n width: 100%;\n transition: opacity 1.5s ease-in-out;\n }\n\n .cutscene-container {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n max-height: 100vh;\n height: 100vh;\n width: 100vw;\n background-size: 300px;\n image-rendering: pixelated;\n overflow: scroll;\n position: relative;\n }\n\n .wrapper {\n margin: 0px 24px;\n }\n\n .test {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 23;\n }\n\n .sunset-bg {\n background: url("/images/cutscenes/beach-ending.gif");\n width: 100vw;\n height: 100vh;\n position: fixed;\n background-size: cover;\n background-position: center;\n opacity: 1;\n z-index: 0;\n }\n\n .fade {\n position: fixed;\n height: 160px;\n background: linear-gradient(\n 0deg,\n rgba(2, 6, 23, 0) 0%,\n rgba(2, 6, 23, 1) 75%,\n rgba(2, 6, 23, 1) 100%\n );\n width: 100vw;\n left: 0px;\n top: 0;\n z-index: 2;\n opacity: 0;\n }\n\n .credits {\n position: fixed;\n left: 0;\n width: 100vw;\n z-index: 1;\n top: 100vh;\n color: white;\n text-align: center;\n }\n\n .credit-section {\n margin-bottom: 200px;\n\n display: flex;\n flex-direction: column;\n gap: 20px;\n\n p,\n h1 {\n margin: 0px;\n }\n\n p {\n color: #fff;\n text-align: center;
1856\n font-family: "PixelGridS", sans-serif;\n font-size: 24px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n h1 {\n color: #fff;\n text-align: center;\n font-family: "PixelGridM", sans-serif;\n font-size: 32px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n }\n }\n\n .characterImages {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n z-index: 1;\n }\n\n .characterImage {\n height: 200px;\n position: fixed;\n opacity: 0;\n user-select: none;\n -webkit-user-drag: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n }\n\n .image1 {\n top: 10vh;\n left: 10vw;\n }\n\n .image2 {\n top: 30vh;\n right: 10vw;\n }\n\n .image3 {\n bottom: 15vh;\n left: 5vw;\n }\n\n .image4 {\n top: 15vh;\n right: 8vw;\n }\n\n .image5 {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n width: 403.5px;\n height: 269px;\n aspect-ratio: 403.5/269;\n }\n\n .scene {\n display: block;\n max-width: 680px;\n margin: auto;\n width: 100%;\n z-index: 3;\n position: relative;\n }\n\n .scene-wrapper {\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n }\n\n .step-container {\n text-align: center;\n flex-grow: 1;\n display: flex;\n padding: 32px 0px;\n }\n\n .step-contents {\n margin: auto;\n max-width: 100%;\n }\n\n @media (max-width: 768px) {\n .wrapper {\n margin: 0px 16px;\n }\n\n .scene-wrapper {\n height: 100vh;\n display: flex;\n flex-direction: column;\n }\n\n .step-container {\n overflow-y: scroll;\n overflow-x: hidden;\n }\n }\n']);return CourseCredits_templateObject=function(){return $},$}let nZ=ek.default.div.withConfig({componentId:"sc-1e85c5d9-0"})(CourseCredits_templateObject()),nW=[{role:"Software engineers",name:"Asiqur, Dharma"},{role:"Product designer",name:"Jackie"},{role:"with additional support from",name:"Eric, Lil, Naomi, Colin"},{name:"Codedex",copyright:"\xa9 ".concat(new Date().getFullYear()," Niteowl, Inc.")}],nG=["/images/character_gifs/club-feedback.gif","/images/character_gifs/tekmLsi.gif","/images/character_gifs/rock-paper-scissors.gif","/images/character_gifs/battle-cropped.gif","/images/character_gifs/qOSmiVc.gif"];var creditScene_CourseCredits=function($){let{nextCutScene:et,audioRef:en,audioReady:er,courseName:es}=$,el=(0,eo.v9)((0,ew.pN)({courseName:es})),eu=[...el,...nW],ed=(0,em.useRef)(null),eh=(0,em.useRef)(null),ep=(0,em.useRef)(null),ef=(0,em.useRef)([]),eg=(0,em.useCallback)(()=>{var $;if(!en.current)return;en.current.play();let er=(null===($=ed.current)||void 0===$?void 0:$.offsetHeight)||0;setTimeout(()=>{ed.current&&ed.current.animate([{top:"100vh"},{top:"calc(100vh - ".concat(er,"px - 50vh)")}],{duration:36e3,iterations:1,fill:"forwards"}),eh.current&&eh.current.animate([{opacity:1},{opacity:0}],{fill:"forwards",duration:12e3,iterations:1})},1e4),setTimeout(()=>{ep.current&&ep.current.animate([{opacity:0},{opacity:1}],{fill:"forwards",duration:3e3,iterations:1})},18e3);let ei=[,,,,,].fill(0);ei.forEach(($,et)=>{let en=ef.current[et];en&&(setTimeout(()=>{en.animate([{opacity:0},{opacity:1}],{fill:"forwards",duration:2e3,iterations:1})},2e4+6500*et),setTimeout(()=>{en.animate([{opacity:1},{opacity:0}],{fill:"forwards",duration:2e3,iterations:1})},25e3+6500*et))}),setTimeout(()=>{if(ed.current){let $=ed.current.animate([{opacity:1},{opacity:0}],{fill:"forwards",duration:2e3,iterations:1});$.addEventListener("finish",()=>{setTimeout(()=>{et()},1e3)})}},52e3)},[en,et]);return(0,em.useEffect)(()=>{er&&en.current&&eg()},[er,en,eg]),(0,ei.jsxs)(nZ,{children:[(0,ei.jsx)(cutscenes_CutsceneNav,{}),(0,ei.jsxs)("div",{className:"cutscene-container",children:[(0,ei.jsxs)("div",{className:"wrapper",children:[(0,ei.jsx)("div",{className:"fade",ref:ep}),(0,ei.jsx)("div",{className:"credits",ref:ed,children:eu.map(($,et)=>(0,ei.jsxs)("div",{className:"credit-section",children:[$.role&&(0,ei.jsx)("p",{children:$.role}),(0,ei.jsx)("h1",{children:$.name}),$.copyright&&(0,ei.jsx)("p",{children:$.copyright})]},et))}),(0,ei.jsx)("div",{className:"characterImages",children:nG.map(($,et)=>(0,ei.jsx)("img",{className:"characterImage image".concat(et+1),src:$,alt:"Character ".concat(et+1),ref:$=>{ef.current[et]=$}},et))})]}),(0,ei.jsx)("div",{className:"sunset-bg",ref:eh})]})]})},n$=en(76086);let nJ={python:"python-completed",html:"html-completed"};
1856function CourseCompleteCutScene_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 1.44px;\n color: #fde047 !important;\n opacity: 0;\n\n '," {\n font-size: 32px;\n }\n\n ",' {\n font-size: 48px;\n }\n }\n\n .python-typewriter {\n position: absolute;\n left: 0px;\n top: 0px;\n text-align: start;\n opacity: 1;\n text-align: center;\n }\n }\n\n .sub-header {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n text-align: center;\n max-width: 724px;\n transition-duration: 3s;\n }\n\n .character-and-stats {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n\n .character {\n width: auto;\n height: 164px;\n }\n\n .stats {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n transition-duration: 2s;\n\n .cutscene-stats {\n '," {\n width: 100%;\n }\n\n ",' {\n width: 267px;\n }\n }\n }\n }\n\n [data-aos="fade-up"] {\n transform: translate3d(0, 35px, 0);\n }\n']);return CourseCompleteCutScene_templateObject=function(){return $},$}let nK=ek.default.div.withConfig({componentId:"sc-58917c1e-0"})(CourseCompleteCutScene_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var creditScene_CourseCompleteCutScene=function($){let{courseName:et,disableSkip:en,nextCutScene:er=()=>{}}=$,es=(0,eo.v9)(ey.jl),el=(0,eo.v9)(ey.$u)||0,eu=(0,eo.v9)(ey.nU),ed=(0,nw.Z)(eu),eh=(0,eo.v9)((0,ew.eC)({courseName:et})),{catalogName:ep}=(0,eo.v9)((0,ew.Gm)({courseName:et})),[ef,eg]=(0,em.useState)(!1),[ev,ex]=(0,em.useState)({firstTrigger:!1,typingComplete:!1,showStats:!1,showBtns:!1});(0,em.useEffect)(()=>{setTimeout(function(){ex({...ev,firstTrigger:!0})},1e3)},[]);let e_=(0,em.useRef)(!1);(0,em.useEffect)(()=>{!e_.current&&"string"==typeof et&&et in nJ&&(e_.current=!0,fetch("/api/email/mark",{method:"POST",body:JSON.stringify({type:"course-completed",courseName:et}),headers:{"Content-Type":"application/json"}}).catch($=>{console.error("Failed to fire course-completed tag",$)}))},[et]);let ek=(0,em.useCallback)(()=>{eg(!0),setTimeout(()=>{ex($=>({...$,typingComplete:!0}))},2e3),setTimeout(()=>{ex($=>({...$,showStats:!0}))},3800),setTimeout(()=>{ex($=>({...$,showBtns:!0}))},7e3)},[eg]),eC=(0,eo.v9)((0,ey.RI)({courseName:et}));return(0,ei.jsxs)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{style:{opacity:ev.showBtns?1:0,transition:"opacity 500ms"},onClick:er,children:"Continue"})}),disableSkip:en,children:[(0,ei.jsx)(n_.Z,{triggerConfetti:ef,setTriggerConfetti:eg}),(0,ei.jsxs)(nK,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("p",{className:"header",children:"Congratulations!"}),ev.firstTrigger&&(0,ei.jsx)(tt.Z,{text:"Congratulations!",disableCursor:!0,setAction:ek,playSound:!0,lightTextOnly:!0})]}),(0,ei.jsxs)("p",{className:"sub-header",style:{opacity:ev.showStats?1:0},"data-aos":"fade-up","data-aos-duration":"800",children:["YOU DID IT!!! You completed the entirety of ",ep,". Let's celebrate your hard work and the journey you had along the way!"]},ev.showStats),(0,ei.jsxs)("div",{className:"character-and-stats",children:[(0,ei.jsx)("img",{src:es[el],className:"character",alt:""}),(0,ei.jsxs)("div",{className:"stats",style:{opacity:ev.showStats?1:0},children:[(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(n$.Z,{}),num:"".concat(eh||0),copy:"EXERCISES COMPLETED","data-aos":"zoom-in","data-aos-delay":"1000"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)(nx.Z,{}),num:"".concat(eC||0," XP"),copy:"TOTAL EARNED","data-aos":"zoom-in","data-aos-delay":"1500"}),(0,ei.jsx)(courses_CutSceneStatCard,{svg:(0,ei.jsx)("img",{src:ed.badge,alt:"rank image"}),num:"Level ".concat(ed.level),copy:"Current Level","data-aos":"zoom-in","data-aos-delay":"2000"})]},ev.showStats)]})]})]})};
1856function GlowingBadge_templateObject(){let $=(0,eA._)(['\n position: relative;\n width: 400px;\n height: 400px;\n margin: auto;\n display: flex;\n position: relative;\n\n p {\n margin: 0px;\n }\n\n .copy-wrapper {\n width: 100%;\n position: absolute;\n bottom: 25px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n text-align: center;\n\n .title {\n color: #fff;\n font-family: "PixelGridM";\n font-size: 24px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n .lower-copy {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n']);return GlowingBadge_templateObject=function(){return $},$}function GlowingBadge_templateObject1(){let $=(0,eA._)(["\n background: radial-gradient(\n 49.81% 49.81% at 50% 50.19%,\n #fefce8 0%,\n #fef08a 10%,\n rgba(254, 240, 138, 0) 100%\n );\n position: absolute;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n"]);return GlowingBadge_templateObject1=function(){return $},$}function GlowingBadge_templateObject2(){let $=(0,eA._)(["\n height: 144px;\n margin: auto;\n width: auto;\n transform: rotate3d(0, 1, 0, 0deg);\n"]);return GlowingBadge_templateObject2=function(){return $},$}let nQ=ek.default.div.withConfig({componentId:"sc-72b51ed5-0"})(GlowingBadge_templateObject()),nX=ek.default.div.withConfig({componentId:"sc-72b51ed5-1"})(GlowingBadge_templateObject1()),nY=ek.default.img.withConfig({componentId:"sc-72b51ed5-2"})(GlowingBadge_templateObject2());var creditScene_GlowingBadge=function($){let{courseName:et}=$,en=(0,em.useRef)(null),er=(0,em.useRef)(null),es=(0,eo.v9)((0,ew.DK)({courseName:et}));return(0,em.useEffect)(()=>{let $=en.current,et=er.current;if($&&et){let en=$.animate([{transform:"rotate3d(0,1,0,0deg)"},{transform:"rotate3d(0,1,0,360deg)"}],{iterations:1/0,duration:7e3}),er=et.animate([{transform:"scale(1)",opacity:.8},{transform:"scale(1.05)",opacity:1}],{iterations:1/0,duration:1500,direction:"alternate-reverse"});return()=>{en.cancel(),er.cancel()}}},[]),(0,ei.jsxs)(nQ,{children:[(0,ei.jsx)(nX,{ref:er}),(0,ei.jsx)(nY,{ref:en,src:es.imgSrc||"/images/badges/goldenCourseBadges/golde
1856n-trophy-badge.png",alt:"Badge"}),(0,ei.jsxs)("div",{className:"copy-wrapper",children:[(0,ei.jsx)("p",{className:"title",children:es.name||"".concat(es.catalogName," badge")}),(0,ei.jsx)("p",{className:"lower-copy",children:"Now viewable on your user profile!"})]})]})};function GoldenBadgeEarned_templateObject(){let $=(0,eA._)(['\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: start;\n gap: 24px;\n\n p {\n margin: 0px;\n }\n\n .header-wrapper {\n position: relative;\n\n .header,\n .python-typewriter {\n color: #fff;\n font-family: "PixelGridM", sans-serif;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n max-width: 650px;\n text-align: center;\n\n '," {\n font-size: 24px;\n }\n\n ",' {\n font-size: 32px;\n }\n }\n }\n\n .description {\n color: #cbd5e1;\n font-family: "Mulish", sans-serif;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 27px */\n transition-duration: 1s;\n text-align: center;\n\n '," {\n br {\n display: none;\n }\n }\n\n ",' {\n br {\n display: inline-block;\n }\n }\n }\n\n .scroll-svg {\n width: 128px;\n height: 128px;\n image-rendering: pixelated;\n }\n\n .link {\n display: flex;\n align-items: center;\n color: #2cbaff;\n\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n\n svg {\n margin-left: 8px;\n image-rendering: pixelated;\n }\n }\n']);return GoldenBadgeEarned_templateObject=function(){return $},$}let n0=ek.default.div.withConfig({componentId:"sc-d6c135ab-0"}
1856)(GoldenBadgeEarned_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var creditScene_GoldenBadgeEarned=function($){let{courseName:et,nextCutScene:en,disableSkip:er}=$;return(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{onClick:en,children:"Continue"})}),disableSkip:er,children:(0,ei.jsxs)(n0,{children:[(0,ei.jsx)("div",{className:"header-wrapper",children:(0,ei.jsx)("p",{className:"header",children:"You earned a new badge!"})}),(0,ei.jsx)(creditScene_GlowingBadge,{courseName:et})]})})};function PathCourseCard_templateObject(){let $=(0,eA._)(["\n max-width: 360px;\n width: 100%;\n border: 4px solid transparent;\n border-radius: 16px;\n background-color: transparent;\n z-index: 1;\n padding: 20px 16px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n gap: 16px;\n position: relative;\n\n &.active {\n /* transition-duration: 0.2s; */\n border-color: ",";\n background-color: ",";\n\n button {\n opacity: 1;\n }\n }\n\n label {\n color: ",";\n font-size: 18px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n text-align: center;\n }\n\n .recommended {\n position: absolute;\n top: -12px;\n left: 50%;\n transform: translateX(-50%);\n width: fit-content;\n padding: 5px 12px;\n border-radius: 100px;\n background-color: ",";\n color: ",";\n font-size: 12px;\n font-style: normal;\n font-weight: 700;\n line-height: normal;\n letter-spacing: 1.68px;\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n button {\n opacity: 0;\n width: 100%;\n }\n"]);return PathCourseCard_templateObject=function(){return $},$}let n1=ek.default.div.withConfig({componentId:"sc-d34d9d6-0"})(PathCourseCard_templateObject(),$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.background.blue.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.background.yellow.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.yellow});var whatsNext_PathCourseCard=function($){let{index:et,path:en,course:er,recommended:eo=!1,active:es=!1,setActive:el,disableLabels:eu=!1,hasStarted:ed=!1,handleRouting:eh=()=>{}}=$;return(0,ei.jsxs)(n1,{onClick:()=>el(et),className:"nes-pointer ".concat(es?"active":""),children:[!eu&&(0,ei.jsxs)(ei.Fragment,{children:[eo&&(0,ei.jsx)("div",{className:"recommended",children:"RECOMMENDED JOURNEY"}),(0,ei.jsx)("label",{className:"path",children:en})]}),(0,ei.jsx)(e0.Z,{courseName:er,cardWidth:"100%",isLoading:!1,onClick:$=>{$.preventDefault()}}),(0,ei.jsx)(tP(),{href:"/".concat("framework-valley-react"==er?"react":er),style:{textDecoration:"none",width:"100%"},children:(0,ei.jsx)(eD.Z,{onClick:()=>{es&&eh()},children:ed?"Resume Learning":"Start Learning"})})]})};function LineConnectors_templateObject(){let $=(0,eA._)(["\n --color: ",";\n --active-color: ",";\n --stroke: 6px;\n --radius: 60px;\n\n --seg1-width: calc(33.3333% / 2);\n --seg1-height: 120px;\n --seg1-top: calc(var(--seg1-height) - 47px);\n\n --seg2-width: calc(33.3333% / 2);\n --seg2-height: 40px;\n --seg2-top: 39px;\n\n --vert-height: 192px;\n\n --seg-position-percentage: ",";\n\n position: absolute;\n width: 100%;\n\n "," {\n display: none;\n }\n\n "," {\n display: inline;\n }\n\n .line.active {\n /* transition-duration: 0.6s; */\n border-color: var(--active-color);\n }\n\n .line {\n border-width: var(--stroke);\n border-color: var(--color);\n position: absolute;\n box-sizing: border-box;\n }\n\n .left-seg1 {\n width: var(--seg1-width);\n height: var(--seg1-height);\n top: var(--seg1-top);\n left: calc(var(--seg-position-percentage) / 2);\n border-top-style: solid;\n border-left-style: solid;\n border-top-left-radius: var(--radius);\n }\n\n .left-seg2 {\n width: var(--seg2-width);\n height: var(--seg2-height);\n top: var(--seg2-top);\n left: calc(33.3333% - var(--stroke) / 2);\n border-bottom-style: solid;\n border-right-style: solid;\n border-bottom-right-radius: var(--radius);\n }\n\n .vertical {\n left: calc(50% - var(--stroke) / 2);\n height: var(--vert-height);\n width: 0;\n border-left-style: solid;\n top: 0;\n }\n\n .right-seg1 {\n width: var(--seg1-width);\n height: var(--seg1-height);\n top: var(--seg1-top);\n right: calc(var(--seg-position-percentage) / 2);\n border-top-style: solid;\n border-right-style: solid;\n border-top-right-radius: var(--radius);\n }\n\n .right-seg2 {\n width: var(--seg2-width);\n height: var(--seg2-height);\n top: var(--seg2-top);\n right: calc(33.3333% - var(--stroke) / 2);\n border-bottom-style: solid;\n border-left-style: solid;\n border-bottom-left-radius: var(--radius);\n }\n"]);
1856return LineConnectors_templateObject=function(){return $},$}let n2=ek.default.div.withConfig({componentId:"sc-ccc3562f-0"})(LineConnectors_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{lines:et}=$;return 3===et?"33.3333%":"50%"},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm});var whatsNext_LineConnectors=function($){let{activeIndex:et,lines:en}=$;return(0,ei.jsxs)(n2,{lines:en,children:[1!=en&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("div",{className:"left-seg1 line ".concat(0===et?"active":"")}),(0,ei.jsx)("div",{className:"left-seg2 line ".concat(0===et?"active":"")})]}),2!=en&&(0,ei.jsx)("div",{className:"vertical line ".concat(1===et||1===en?"active":"")}),1!=en&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("div",{className:"right-seg1 line ".concat(2===et?"active":"")}),(0,ei.jsx)("div",{className:"right-seg2 line ".concat(2===et?"active":"")})]})]})},n5=en(98494);function NextCourseInPath_templateObject(){let $=(0,eA._)(['\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: "Mulish", sans-serif;\n\n .container {\n max-width: 1080px;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 77px;\n position: relative;\n width: fit-content;\n\n .card-wrapper {\n display: flex;\n justify-content: center;\n width: 100%;\n\n '," {\n flex-direction: column;\n }\n\n "," {\n flex-direction: row;\n }\n }\n\n .base-wrapper {\n position: relative;\n z-index: 1;\n\n "," {\n display: none;\n }\n\n "," {\n display: inline;\n }\n\n .base {\n width: 80px;\n height: 40px;\n background-color: ",";\n clip-path: ellipse(40px 20px);\n margin: auto;\n }\n\n img {\n position: absolute;\n bottom: 15%;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1;\n width: 80px;\n height: auto;\n }\n }\n }\n"]);return NextCourseInPath_templateObject=function(){return $},$}let n3=ek.default.div.withConfig({componentId:"sc-e4ed2192-0"})(NextCourseInPath_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var whatsNext_NextCourseInPath=function($){let{courseName:et,handleRouting:en}=$,er=(0,n5.SH)({lastFinished:et}),eo=(0,n5.Sv)({justFinished:et,limit:3}),es=eo.filter($=>100==$.score),el=es.findIndex($=>$.courseName===er.courseName),eu=-1!==el?el:3===es.length?1:0,[ed,eh]=(0,em.useState)(eu);return(0,em.useEffect)(()=>{-1!==el&&eh(el)},[el]),console.log({recommendations:eo}),(0,ei.jsx)(n3,{children:(0,ei.jsxs)("div",{className:"container",children:[(0,ei.jsxs)("div",{className:"base-wrapper",children:[(0,ei.jsx)("div",{className:"base"}),(0,ei.jsx)("img",{src:"/images/robot.gif",alt:"star"})]}),(0,ei.jsx)(whatsNext_LineConnectors,{activeIndex:ed,lines:100==er.score?es.length:eo.length}),(0,ei.jsxs)("div",{className:"card-wrapper",children:[es.map(($,et)=>(0,ei.jsx)(whatsNext_PathCourseCard,{index:et,path:$.reason.displayJourneyName,course:$.courseName,setActive:eh,active:ed===et,recommended:$.courseName===er.courseName,hasStarted:$.reason.started,handleRouting:en},$.courseName)),100!=er.score&&(0,ei.jsx)(ei.Fragment,{children:eo.map(($,et)=>(0,ei.jsx)(whatsNext_PathCourseCard,{index:et,path:$.reason.displayJourneyName,course:$.courseName,setActive:eh,active:ed===et,recommended:$.courseName===er.courseName,disableLabels:!0,hasStarted:$.reason.started,handleRouting:en},$.courseName))})]})]})})};function CutSceneRecommenedCourses_templateObject(){let $=(0,eA._)(["\n height: 100%;\n\n * {\n margin: 0px;\n }\n\n display: flex;\n flex-direction: column;\n\n "," {\n gap: 40px;\n }\n\n "," {\n gap: 80px;\n }\n\n .header-wrapper {\n display: flex;\n flex-direction: column;
1856\n align-items: center;\n gap: 24px;\n text-align: center;\n\n h2 {\n color: ",';\n font-family: "PixelGridM";\n font-size: 32px;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n }\n\n p {\n color: ',';\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n font-family: "Mulish", sans-serif;\n }\n }\n']);return CutSceneRecommenedCourses_templateObject=function(){return $},$}let n6=ek.default.div.withConfig({componentId:"sc-8f6029f6-0"})(CutSceneRecommenedCourses_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var creditScene_CutSceneRecommenedCourses=function($){let{courseName:et,disableSkip:en}=$,er=(0,e_.useRouter)(),eo=(0,ed.T)(),[es,el]=(0,em.useState)(null),[eu,eh]=(0,em.useState)(!1);function handleRouting($){let{forLabel:et=!1}=$;et&&er.push("/courses"),eh(!0),setTimeout(()=>{eo((0,ey.J)({type:"",status:"hide",properties:{}}))},1500)}return(0,em.useEffect)(()=>{function updateCardWidth(){let $=document.getElementsByClassName("recommned-wrapper");if(0===$.length)return;let et=$[0].clientWidth,en=document.documentElement.clientWidth,er=3;er=en>=1024?3:en>=768?2:1;let ei=3==er?50:2===er?24:0;el(Math.ceil((et-ei)/er))}return updateCardWidth(),window.addEventListener("resize",updateCardWidth),()=>{window.removeEventListener("resize",updateCardWidth)}},[]),(0,ei.jsx)(cutscenes_CutsceneConsumer,{buttons:(0,ei.jsx)(ei.Fragment,{children:(0,ei.jsx)(eD.Z,{onClick:()=>{handleRouting({forLabel:!1}),er.push("/".concat("framework-valley-react"==et?"react":et))},variant:"subtle",children:"Back to course"})}),style:{opacity:eu?0:1,transition:"opacity 1.5s ease-in-out"},disableSkip:en,children:(0,ei.jsxs)(n6,{children:[(0,ei.jsxs)("div",{className:"header-wrapper",children:[(0,ei.jsx)("h2",{children:"Choose your own adventure...!"}),(0,ei.jsx)("p",{children:"There's still so much to learn after Python! Choose one of our recommended learning journeys to continue the adventure."})]}),(0,ei.jsx)(whatsNext_NextCourseInPath,{courseName:et,handleRouting:()=>handleRouting({forLabel:!1})})]})})},CourseCreditCutScene=function($){let{courseName:et}=$,en=(0,ed.T)(),{properties:er}=(0,eo.v9)(ey.XU),es=(0,eo.v9)(ey.i4),el=(0,eo.v9)((0,ew.EH)({courseName:et})),[eu,eh]=(0,em.useState)(0),[ep,ef]=(0,em.useState)(!1),eg=(0,em.useRef)(null);(0,em.useEffect)(()=>{er.skip&&eh(1)},[er.skip]),(0,em.useEffect)(()=>(en((0,ew.hI)()),el.numOfChapters<=2&&eh(1),eg.current=new Audio("/audio/30-nites-of-code/ending.mp3"),ef(!0),()=>{eg.current&&(eg.current.pause(),eg.current=null)}),[el.numOfChapters,en]),(0,em.useEffect)(()=>{eg.current&&(eg.current.muted=es)},[es]);let ev={0:(0,ei.jsx)(creditScene_CourseCredits,{nextCutScene:()=>eh(1),audioRef:eg,audioReady:ep,courseName:et}),1:(0,ei.jsx)(creditScene_CourseCompleteCutScene,{courseName:et,disableSkip:!0,nextCutScene:()=>eh(2)}),2:(0,ei.jsx)(creditScene_GoldenBadgeEarned,{courseName:et,disableSkip:!0,nextCutScene:()=>eh(3)}),3:(0,ei.jsx)(creditScene_CutSceneRecommenedCourses,{courseName:et,disableSkip:!0})};return(0,ei.jsx)(ei.Fragment,{children:ev[eu]})};let n4=["https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Loop.wav?alt=media&token=261989ac-6547-411f-98a1-67ed55617db5","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Short.wav?alt=media&token=d1a2f180-a6f5-4c9c-922c-feee3f631e0a","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Sting.wav?alt=media&token=e0b364ff-bd8e-4502-b3f7-59d2d88a2432","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-60sec.wav?alt=media&token=3d521f0f-32d3-4407-85d7-bcaf34f01dc3","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Loop.wav?alt=media&token=261989ac-6547-411f-98a1-67ed55617db5","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Short.wav?alt=media&token=d1a2f180-a6f5-4c9c-922c-feee3f631e0a","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-Sting.wav?alt=media&token=e0b364ff-bd8e-4502-b3f7-59d2d88a2432","https://firebasestorage.googleapis.com/v0/b/codedex-io.appspot.com/o/audio%2Fcutscenes%2Fgeneral%2FUpbeat%208-Bit-60sec.wav?alt=media&token=3d521f0f-32d3-4407-85d7-bcaf34f01dc3"];var cutscenes_CutsceneAudioManager=function(){let $=(0,ed.T)(),et=(0,eo.v9)(ew.uS),en=(0,eo.v9)(ew.P5),er=(0,eo.v9)(ew.E0),es=(0,eo.v9)(ey.i4),el=er||es,eu=(0,em.useRef)(null),eh=(0,em.useRef)(null),ep=(0,eo.v9)(ew.R1);function fadeOut($){let et=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;return new Promise(en=>{if(!$){en();return}let er=$.volume,ei=er/(et/50);eh.current=setInterval(()=>{$.volume>ei?$.volume-=ei:($.volume=0,$.pause(),clearInterval(eh.current),eh.current=null,en())},50)})}function clearFade(){eh.current&&(clearInterval(eh.current),eh.current=null)}return(0,em.useEffect)(()=>
1856{et&&(clearFade(),eu.current&&eu.current.pause(),eu.current=new Audio(et),eu.current.currentTime=ep,eu.current.loop=!1,eu.current.muted=el,en&&eu.current.play())},[ep,et,en,el]),(0,em.useEffect)(()=>{eu.current&&(eu.current.currentTime=ep)},[ep]),(0,em.useEffect)(()=>{eu.current&&(clearFade(),en?eu.current.play():fadeOut(eu.current))},[en]),(0,em.useEffect)(()=>{eu.current&&(eu.current.muted=el)},[el]),(0,em.useEffect)(()=>()=>{clearFade(),eu.current&&(eu.current.volume>0?fadeOut(eu.current,300).then(()=>{eu.current&&(eu.current=null)}):(eu.current.pause(),eu.current=null)),$((0,ew.hI)()),$((0,ew.bT)({currentTime:0}))},[$]),(0,ei.jsx)(ei.Fragment,{})},courses_CourseCutsceneManager=function(){let $=(0,ed.T)(),{properties:et}=(0,eo.v9)(ey.XU),[en,er]=(0,em.useState)((null==et?void 0:et.type)||"chapter"),[es,el]=(0,em.useState)(0),eu=(0,eo.v9)((0,ew.Of)({courseName:null==et?void 0:et.courseName,chapterName:(null==et?void 0:et.chapterName)||0}));function nextCutScene(){let $=(null==et?void 0:et.interStitialsQue)||[];if(es>=$.length){er("nextChapter");return}er($[es]),el($=>$+1)}(0,em.useEffect)(()=>{((null==et?void 0:et.type)===void 0||(null==et?void 0:et.type)===null)&&$((0,ew.gK)({audioSrc:eu.music||n4[(null==et?void 0:et.chapterIndex)||0]||""}))},[$,eu,null==et?void 0:et.chapterIndex,null==et?void 0:et.type]);let eh={startCourse:(0,ei.jsx)(courses_StartCourseScene,{courseName:null==et?void 0:et.courseName,linkTo:null==et?void 0:et.linkTo}),chapter:(0,ei.jsx)(courses_ChapterComplete,{nextCutScene:()=>er("badge"),courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName,chapterIndex:(null==et?void 0:et.chapterIndex)||0}),badge:(0,ei.jsx)(courses_BadgeEarnedCutScene,{nextCutScene:()=>nextCutScene(),courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName,badgeLink:null==et?void 0:et.badgeLink}),bonusArticle:(0,ei.jsx)(courses_BonusArticleCutScene,{courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName,skipToChapter:()=>nextCutScene()}),cheatSheet:(0,ei.jsx)(courses_CheatSheetCutscene,{courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName,nextCutScene:()=>nextCutScene()}),challengePack:(0,ei.jsx)(courses_ChallengePackCutScene,{courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName,skipToChapter:()=>er("nextChapter")}),challengePackComplete:(0,ei.jsx)(courses_ChallengePackComplete,{nextCutScene:()=>er(null==et?void 0:et.nextSceneQue),inCoursePack:null==et?void 0:et.inCoursePack}),nextChapter:(0,ei.jsx)(courses_NextChapter,{courseName:null==et?void 0:et.courseName,chapterName:null==et?void 0:et.chapterName}),checkpointProject:(0,ei.jsx)(courses_CheckpointProjectCutScene,{courseName:null==et?void 0:et.courseName,skipToChapter:()=>er("nextChapter"),skipToComingSoon:()=>er("comingSoon")}),finalProject:(0,ei.jsx)(courses_FinalProjectCutscene,{courseName:null==et?void 0:et.courseName}),credits:(0,ei.jsx)(CourseCreditCutScene,{courseName:null==et?void 0:et.courseName}),comingSoon:(0,ei.jsx)(courses_ComingSoonCutScene,{courseName:null==et?void 0:et.courseName})};return(0,em.useEffect)(()=>{tw().init({mirror:!1,disable:"mobile"})},[]),(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(cutscenes_CutsceneAudioManager,{}),eh[en]]})},n9=en(39828),n8=en(33599),PaymentSuccessPopup_WelcomeView=function($){let{setView:et}=$;return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("img",{className:"success",src:"/images/payments/payment_success_card.gif",alt:"Payment Success"}),(0,ei.jsx)("h2",{children:"Welcome to the Club!"}),(0,ei.jsx)("p",{className:"main-text",children:"Congratulations! You're now a Cod\xe9dex Club member. Say hello to unlimited access to all of our learning content, help from our AI coding companion, course certificates, and more. \uD83E\uDD73"}),(0,ei.jsx)(eD.Z,{variant:"blue",onClick:()=>et(),children:"Continue"}),(0,ei.jsx)("span",{className:"progression",children:"1 / 3"})]})},n7=en(18268),PaymentSuccessPopup_DiscordView=function($){let{setView:et}=$,en=(0,em.useContext)(ek.ThemeContext);return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("img",{className:"discord",src:"/images/pop-ups/discord-unlock.gif",alt:"Payment Success"}),(0,ei.jsx)("h2",{children:"Get Club-only perks on Discord"}),(0,ei.jsxs)("p",{className:"main-text",children:["Did you know: Club members unlock exclusive channels on our"," ",(0,ei.jsx)(tP(),{href:"https://discord.gg/vSKEhP9fY2",target:"_blank",children:"Discord"}),"! Get help from code mentors, receive support with your projects, and beta test new features."]}),(0,ei.jsxs)(tP(),{href:"https://discord.gg/vSKEhP9fY2",target:"_blank",children:["Join the Discord"," ",(0,ei.jsx)(n7.Z,{color:en.colors.text.accent.blue,width:24,height:24})]}),(0,ei.jsx)(eD.Z,{variant:"blue",onClick:()=>et(),children:"Continue"}),(0,ei.jsx)("span",{className:"progression",children:"2 / 3"})]})},PaymentSuccessPopup_FeedbackView=function(){let[$,et]=(0,em.useState)(""),en=(0,e_.useRouter)(),er=(0,em.useCallback)(async function(){try{if(!$.trim())return;await fetch("/api/feedback",{method:"POST",body:JSON.stringify({feedback:$,question:"Share questions or comments about Cod\xe9dex Club"})}),et("")}catch($){console.error($)}},[$]);return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("img",{className:"discord",src:"images/pop-ups/club-feedback.gif",alt:"Payment Success"}),(0,ei.jsx)("h2",{children:"Have feedback? Let us know!"}),(0,ei.jsx)("p",{className:"main-text label",children:"Share questions or comments about Cod\xe9dex Club with us (Optional)"}),(0,ei.jsx)(t5.Z,{value:$,setValue:et,autoFocus:!0,placeholder:"Add your response here",rows:4}),(0,ei.jsx)(eD.Z,{variant:"blue",onClick:()=>{er();let{auth:$}=(0,eg.UM)();setTimeout(()=>{$.currentUser.getIdToken(!0),ep().destroy(null,"codedextoken"),en.reload()},2e3),en.reload()},children:"Submit and continue"}),(0,ei.jsx)("span",{className:"progression",children:"3 / 3"})]})};
1856function PaySuccessPopupContainer_templateObject(){let $=(0,eA._)(["\n position: fixed;\n height: 100vh;\n width: 100vw;\n top: 0;\n left: 0;\n z-index: 6;\n background: ",';\n opacity: 0;\n animation: opac 0.5s ease-out forwards;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: "Mulish", sans-serif;\n\n @keyframes opac {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .main-success-popup {\n height: fit-content;\n max-height: calc(100vh - 2rem);\n max-width: 616px;\n overflow: auto;\n width: 616px;\n display: flex;\n flex-direction: column;\n padding: 16px;\n\n main {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n color: ',";\n\n img {\n width: 100%;\n height: auto;\n &.success {\n max-width: 224px;\n }\n &.discord {\n max-width: 336px;\n }\n }\n\n h2 {\n margin: 0px;\n font-size: 24px;\n font-weight: 700;\n text-align: center;\n color: ",";\n }\n\n a {\n color: ",";\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n span.progression {\n font-family: Mulish;\n font-weight: 600;\n font-size: 16px;\n line-height: 150%;\n text-align: center;\n color: ",";\n }\n\n button {\n margin-top: 8px;\n }\n\n p.main-text {\n text-align: center;\n margin: 0;\n }\n\n p.label {\n font-family: Mulish;\n font-weight: 700;\n font-style: Bold;\n font-size: ","px;\n line-height: 150%;\n }\n\n .dynamic-input {\n width: 100%;\n min-height: 100px;\n }\n }\n }\n"]);return PaySuccessPopupContainer_templateObject=function(){return $},$}let re=ek.default.div.withConfig({componentId:"sc-f61dc9e6-0"})(PaySuccessPopupContainer_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.overlay},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.fontSize.m});function PaymentSuccess(){let[$,et]=(0,em.useState)(!1),[en,er]=(0,em.useState)(!1),es=(0,e_.useRouter)(),[el,eu]=(0,em.useState)("welcome"),eh=(0,eo.v9)(ey.f8),ev=(0,eo.v9)(ey.ot),{auth:ex}=(0,eg.UM)(),ew=(0,ed.T)(),ek=(0,em.useCallback)(()=>{ew((0,ey.J)({type:"",status:"hide"}))},[ew]);return((0,em.useEffect)(function(){(async function(){let{codedextoken:$}=ep().get();if(void 0!==$&&ev&&null!==ex.currentUser){var et;await (0,ef.wU)(null==ex?void 0:ex.currentUser,!0);let $=await (0,ef.ag)(ex.currentUser,!0);null==$||null===(et=$.claims)||void 0===et||et.stripeRole,er(!0)}})()},[ex.currentUser,ev,es]),(0,em.useEffect)(function(){(async function(){let{firestore:$}=(0,eg.UM)(),et=(0,n9.JU)((0,n9.hJ)($,"users"),eh),en=await (0,n9.QT)(et),er=en.data(),ei=new Date().toLocaleDateString("en-US");if("object"!=typeof er.notifications_tracker)await (0,n9.pl)(et,{notifications_tracker:{send_welcome_club_email:[ei]}},{merge:!0});else{if(er.notifications_tracker.send_welcome_club_email.includes(ei))return;await (0,n9.r7)(et,{"notifications_tracker.send_welcome_club_email":(0,n9.vr)(ei)})}Array.isArray(er.notifications)?await (0,n9.r7)(et,{notifications:(0,n9.vr)("send_welcome_club_email")}):await (0,n9.pl)(et,{notifications:["send_welcome_club_email"]},{merge:!0}),await (0,n9.r7)(et,{notifications:(0,n9.Ab)("send_welcome_club_email")})})()},[en,eh]),(0,em.useEffect)(function(){et(!0)},[]),$)?(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(re,{children:(0,ei.jsx)(t$.Z,{className:"main-success-popup",onClick:$=>$.stopPropagation(),iconAction:ek,children:(0,ei.jsxs)("main",{className:"is-rounded",children:["welcome"===el&&(0,ei.jsx)(PaymentSuccessPopup_WelcomeView,{setView:()=>eu("discord")}),"discord"===el&&(0,ei.jsx)(PaymentSuccessPopup_DiscordView,{setView:()=>eu("feedback")}),"feedback"===el&&(0,ei.jsx)(PaymentSuccessPopup_FeedbackView,{})]})})}),(0,ei.jsx)(n8.Z,{fire:!0})]}):null}var rt=en(79044),rn=en(81776),rr=en(71486);
1856function GlobalBadge_templateObject(){let $=(0,eA._)(["\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n\n img {\n width: 64px;\n height: 64px;\n aspect-ratio: 1/1;\n image-rendering: pixelated;\n }\n\n .info {\n .badge-name {\n text-align: center;\n color: ",";\n font-size: 16px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .requirement {\n margin-top: 4px;\n color: ",";\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n line-height: 150%;\n }\n\n .earned-at {\n margin-top: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n color: ",";\n font-size: 12px;\n font-weight: 500;\n line-height: 150%;\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n"]);return GlobalBadge_templateObject=function(){return $},$}let ri=ek.default.div.withConfig({componentId:"sc-af8ae5dc-0"})(GlobalBadge_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary},$=>{let{theme:et}=$;return et.colors.text.accent.green},$=>{let{theme:et}=$;return et.colors.text.accent.green});var badges_GlobalBadge=function($){let{imgSrc:et,badgeName:en,requirement:er,earnedAt:eo=null}=$,es=(0,rr.l)(eo);return(0,ei.jsxs)(ri,{children:[(0,ei.jsx)("img",{src:et,alt:"badge"}),(0,ei.jsxs)("div",{className:"info",children:[(0,ei.jsx)("p",{className:"badge-name",children:en}),(0,ei.jsx)("p",{className:"requirement",children:er}),es&&(0,ei.jsxs)("p",{className:"earned-at",children:[ro," ",es]})]})]})};let ro=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",children:(0,ei.jsx)("path",{d:"M4 8H2.66699V6.66699H4V8ZM2.66699 6.66699H1.33301V5.33301H2.66699V6.66699ZM5.33301 5.33301V6.66699H4V5.33301H5.33301ZM1.33301 5.33301H0V4H1.33301V5.33301ZM6.66699 5.33301H5.33301V4H6.66699V5.33301ZM8 4H6.66699V2.66699H8V4ZM9.33301 2.66699H8V1.33301H9.33301V2.66699ZM10.667 1.33301H9.33301V0H10.667V1.33301Z",fill:"#3F6212"})});var rs=en(55122);function BadgeCollection_templateObject(){let $=(0,eA._)(["\n .badge-collection-popup {\n width: 800px;\n height: 731px;\n }\n\n .tags-wrapper {\n margin-top: 24px;\n display: flex;\n gap: 8px;\n overflow: scroll;\n flex-shrink: 0;\n }\n\n .inner-popup-container {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n\n .individual-badges-wrapper {\n min-height: 0;\n overflow: scroll;\n margin-top: 32px;\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n align-items: center;\n gap: 60px 32px;\n\n "," {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n\n .empty {\n display: flex;\n flex-direction: column;\n justify-content: center;
1856\n align-items: center;\n gap: 32px;\n flex: 1;\n\n p {\n color: ",";\n text-align: center;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%; /* 24px */\n max-width: 275px;\n }\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n"]);return BadgeCollection_templateObject=function(){return $},$}let rl=(0,ek.default)(tG.Z).withConfig({componentId:"sc-8fa273f1-0"})(BadgeCollection_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.tertiary}),rc=[{text:"All",tag:"all"},{text:"Courses",tag:"courses"},{text:"Community",tag:"community"},{text:"Special",tag:"special"}];var badges_BadgeCollection=function($){let{setShowModel:et}=$,en=(0,ed.T)(),[er,es]=(0,em.useState)("all");(0,eo.v9)(ey.r);let el=(0,eo.v9)(ex.mC),eu=(0,eo.v9)((0,rn.vi)()),eh=eu.filter($=>"special"===$.group),ep=eu.filter($=>"special"!==$.group),ef=(0,rs.I)(),eg=(0,eo.v9)(ew.B8),ev=(0,eo.v9)(ew.HZ),e_=ev.filter($=>{let{courseName:et}=$;return ef.includes(et)}),ek=el.length+eu.length+ef.length,eC={all:ek,courses:el.length+e_.length,community:ep.length,special:eh.length},eE=rc.filter($=>eC[$.tag]>0);function Close(){et(!1),en((0,ey.J)({type:"",status:"hide",properties:{}}))}return(0,ei.jsx)(rl,{setShowModel:()=>Close(),children:(0,ei.jsx)(t$.Z,{className:"badge-collection-popup",iconAction:()=>Close(),headerTitle:"My Badge's (".concat(ek,")"),children:0==ek?(0,ei.jsxs)("div",{className:"empty",children:[ru,(0,ei.jsx)("p",{children:"You don't have any badges yet. When you do, you'll see them here!"})]}):(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("div",{className:"tags-wrapper",children:eE.map($=>(0,ei.jsx)(rt.Z,{tag:$.tag,isSelected:$.tag===er,displayName:$.text,onToggle:es},$.text))}),(0,ei.jsxs)("div",{className:"individual-badges-wrapper",children:[("all"===er||"courses"===er)&&el.map($=>(0,ei.jsx)(badges_GlobalBadge,{imgSrc:$.imageSrc,badgeName:"".concat($.courseDisplayName,": ").concat($.chapterDisplayName),requirement:"Complete ".concat($.courseDisplayName,": Chapter ").concat($.chapterIndex+1)},$.imageSrc)),("all"===er||"courses"===er)&&e_.map($=>{var et;let{courseName:en,badge:er}=$,eo=(null==eg?void 0:null===(et=eg[en])||void 0===et?void 0:et.catalogName)||en;return(0,ei.jsx)(badges_GlobalBadge,{imgSrc:er.imgSrc,badgeName:er.name,requirement:"Complete ".concat(eo)},er.imgSrc)}),("all"===er||"community"===er)&&ep.map($=>(0,ei.jsx)(badges_GlobalBadge,{imgSrc:$.icon,badgeName:$.name,requirement:$.requirement,earnedAt:$.earnedAt},$.name)),("all"===er||"special"===er)&&eh.map($=>(0,ei.jsx)(badges_GlobalBadge,{imgSrc:$.icon,badgeName:$.name,requirement:$.requirement,earnedAt:$.earnedAt},$.name))]})]})})})};let ru=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:(0,ei.jsx)("path",{d:"M32.0005 44H16.0005V40H22.0005V32H16.0005V28H32.0005V32H26.0005V40H32.000
18565V44ZM36.0005 8H44.0005V24H40.0005V12H36.0005V24H40.0005V28H32.0005V8H16.0005V28H8.00049V24H12.0005V12H8.00049V24H4.00049V8H12.0005V4H36.0005V8Z",fill:"#94A3B8"})});var organisms_GlobalPopups=function(){let $=(0,eo.v9)(ey.XU),et={onboarding:(0,ei.jsx)(onBoarding_UserOnboarding,{}),notificationHub:(0,ei.jsx)(organisms_NotificationHub,{}),postLikedBy:(0,ei.jsx)(stats_PostLikedByPopup,{}),communityGuidline:(0,ei.jsx)(community_GuidelineList,{}),deleteOpcItem:(0,ei.jsx)(models_OpcDelete,{}),nocOnboarding:(0,ei.jsx)(_30NitesOfCode_Onboarding30NOC,{}),searchDrawer:(0,ei.jsx)(organisms_SearchDrawer,{}),courseCutscene:(0,ei.jsx)(courses_CourseCutsceneManager,{}),paymentSuccess:(0,ei.jsx)(PaymentSuccess,{}),badges:(0,ei.jsx)(badges_BadgeCollection,{setShowModel:()=>{}})};return(null==$?void 0:$.type)==""||(null==$?void 0:$.type)==null?null:(0,ei.jsx)(ei.Fragment,{children:et[null==$?void 0:$.type]})};function Toast_templateObject(){let $=(0,eA._)(["\n from {\n transform: scale(0.8);\n visibility: hidden;\n opacity: 0;\n } to {\n transform: scale(1);\n visibility: visible;\n opacity: 1;\n }\n"]);return Toast_templateObject=function(){return $},$}function Toast_templateObject1(){let $=(0,eA._)(["\n position: fixed;\n /* bottom: ","; */\n bottom: 3rem;\n left: 50%;\n //background-color: ",";\n color: ",";\n z-index: 9999;\n transform: translateX(-50%);\n background-color: transparent;\n\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 10px;\n\n .animate {\n animation: "," 0.2s ease-in;\n }\n\n &.animate-exit {\n animation: "," 0.2s ease-out;\n }\n\n &.show {\n visibility: visible;\n }\n &.hide {\n visibility: hidden;\n }\n"]);return Toast_templateObject1=function(){return $},$}function Toast_templateObject2(){let $=(0,eA._)(["\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"]);return Toast_templateObject2=function(){return $},$}function _templateObject3(){let $=(0,eA._)(["\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-20px);\n display: none;\n }\n"]);return _templateObject3=function(){return $},$}function _templateObject4(){let $=(0,eA._)(["\n padding: 16px;\n border-radius: 8px;\n animation:\n "," 0.3s ease-in,\n "," 0.3s ease-out 3s forwards;\n\n display: flex;\n align-items: center;\n gap: 12px;\n\n background: ",";\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 150%;\n\n .icon {\n width: 24px;\n height: 24px;\n }\n\n &.warning {\n background-color: ',";\n color: ",";\n }\n"]);return _templateObject4=function(){return $},$}let rd=(0,ek.keyframes)(Toast_templateObject()),rh=ek.default.div.withConfig({componentId:"sc-73d2a0c-0"})(Toast_templateObject1(),$=>{let{bottomRem:et}=$;return"".concat(null!=et?et:2,"rem")},$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>{let{theme:et}=$;return et.colors.semantic.background.grey.primary},rd,rd),rp=(0,ek.keyframes)(Toast_templateObject2()),rm=(0,ek.keyframes)(_templateObject3()),rf=ek.default.span.withConfig({componentId:"sc-73d2a0c-1"})(_templateObject4(),rp,rm,$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>{let{theme:et}=$;return et.colors.semantic.background.grey.primary},$=>{let{theme:et}=$;return et.colors.background.red.tertiary},$=>{let{theme:et}=$;return et.colors.text.primary});var atoms_Toast=function(){let $=(0,ed.T)(),et=(0,eo.v9)(eE.BZ),en=(0,em.useContext)(ek.ThemeContext),er=function(){let $=document.getElementById("challenge-footer-container");return $?5:2}();return(0,em.useEffect)(()=>{let en=et.map(et=>setTimeout(()=>$((0,eE.RS)(et.id)),et.timeout));return()=>en.forEach(clearTimeout)},[$,et]),(0,ei.jsx)(rh,{bottomRem:er,children:et.map($=>(0,ei.jsxs)(rf,{type:$.type,className:$.type,children:["success"===$.type&&(0,ei.jsx)(eW.Z,{className:"icon",fill:en.colors.semantic.border.grey.dark}),$.message,$.linkHref&&$.linkLabel&&(0,ei.jsx)(tP(),{href:$.linkHref,children:$.linkLabel})]},$.id))})},rg=en(77265);
1856function OverlayNotificationContainer_templateObject(){let $=(0,eA._)(["\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"]);return OverlayNotificationContainer_templateObject=function(){return $},$}function OverlayNotificationContainer_templateObject1(){let $=(0,eA._)(["\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-20px);\n display: none;\n }\n"]);return OverlayNotificationContainer_templateObject1=function(){return $},$}function OverlayNotificationContainer_templateObject2(){let $=(0,eA._)(["\n "," {\n width: 367px;\n max-width: calc(100% - 2rem);\n border-radius: 8px;\n padding: 16px 20px;\n\n animation: "," 0.25s ease-in;\n box-shadow: 0px 4px 12px ",";\n\n ","\n }\n\n "," {\n ","\n }\n\n "," {\n }\n"]);return OverlayNotificationContainer_templateObject2=function(){return $},$}let ry=(0,ek.keyframes)(OverlayNotificationContainer_templateObject());(0,ek.keyframes)(OverlayNotificationContainer_templateObject1());let rb=ek.default.div.withConfig({componentId:"sc-554e2faa-0"})(OverlayNotificationContainer_templateObject2(),$=>{let{theme:et}=$;return et.breakpoints.xs},ry,$=>{let{theme:et}=$;return et.colors.background.grey.boxshadow},$=>{let{type:et,theme:en}=$;return"success"===et?"\n border: 2px solid ".concat(en.colors.background.green.tertiary,";\n background: ").concat(en.colors.semantic.background.green.primary,";\n "):"warning"===et?"\n border: 2px solid ".concat(en.colors.palette.yellow["500"],";\n background: ").concat(en.colors.semantic.background.yellow.primary,";\n "):"info"===et?"\n background: ".concat(en.colors.palette.blue["500"],";\n border: 2px solid ").concat(en.colors.palette.blue["700"],";\n "):"error"===et?"\n background: ".concat(en.colors.background.red.primary,";\n border: 2px solid ").concat(en.colors.background.red.tertiary,";\n "):"xp"===et||"badge"===et?"\n border: 2px solid ".concat(en.colors.background.blue.tertiary,";\n background: ").concat(en.colors.background.blue.primary,";\n "):"ai"===et?"\n border: 2px solid ".concat(en.colors.background.yellow.tertiary,";\n background: ").concat(en.colors.background.yellow.primary,";\n width: 480px;\n padding: 16px;\n "):"\n border: 2px solid ".concat(en.colors.border.grey.light,";\n background: ").concat(en.colors.background.grey.primary,";\n ")},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{type:et,theme:en}=$;return"success"===et||"warning"===et||"info"===et||"error"===et||"xp"===et||"badge"===et?"\n ":"ai"===et?"\n width: 480px;\n ":"\n "},$=>{let{theme:et}=$;return et.breakpoints.md});var icons_XPStar=function(){return(0,ei.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",children:[(0,ei.jsxs)("g",{"clip-path":"url(#clip0_793_79456)",children:[(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 0.5H18.5V2.5H14.5V0.5ZM12.5 6.5V2.5H14.5V6.5H12.5ZM10.5 10.5V6.5H12.5V10.5H10.5ZM6.5 12.5V10.5H10.5V12.5H6.5ZM2.5 14.5V12.5H6.5V14.5H2.5ZM2.5 18.5H0.5V14.5H2.5V18.5ZM6.5 20.5H2.5V18.5H6.5V20.5ZM10.5 22.5H6.5V20.5H10.5V22.5ZM12.5 26.5H10.5V22.5H12.5V26.5ZM14.5 30.5V26.5H12.5V30.5H14.5ZM18.5 30.5V32.5H14.5V30.5H18.5ZM20.5 26.5V30.5H18.5V26.5H20.5ZM22.5 22.5V26.5H20.5V22.5H22.5ZM26.5 20.5V22.5H22.5V20.5H26.5ZM30.5 18.5V20.5H26.5V18.5H30.5ZM30.5 14.5H32.5V18.5H30.5V14.5ZM26.5 12.5H30.5V14.5H26.5V12.5ZM22.5 10.5H26.5V12.5H22.5V10.5ZM20.5 6.5H22.5V10.5H20.5V6.5ZM20.5 6.5V2.5H18.5V6.5H20.5Z",fill:"#020617"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 2.5H18.5V6.5H20.5V10.5H22.5V12.5H26.5V14.5H30.5V18.5H26.5V20.5H22.5V22.5H20.5V26.5H18.5V30.5H14.5V26.5H12.5V22.5H10.5V20.5H6.5V18.5H2.5V14.5H6.5V12.5H10.5V10.5H12.5V6.5H14.5V2.5Z",fill:"#EAB308"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 2.5H16.5V16.5H18.5H20.5H22.5H26.5V12.5H22.5V10.5H20.5V6.5H18.5V2.5Z",fill:"#FDE047"}),(0,ei.jsx)("rect",{x:"26.5",y:"14.5",width:"4",height:"2",fill:"#FDE047"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 2.5H16.5V6.5H18.5V10.5H20.5V12.5H22.5V14.5H26.5V16.5H30.5V14.5H26.5V12.5H22.5V10.5H20.5V6.5H18.5V2.5Z",fill:"white"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 16.5H14.5H16.5V30.5H14.5V26.5H12.5V22.5H10.5V20.5H6.5V18.5H2.5V16.5Z",fill:"#CA8A04"}),(0,ei.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5 16.5H2.5V18.5H6.5V20.5H10.5V22.5H12.5V26.5H14.5V30.5H16.5V26.5V22.5V20.5V18.5V16.5Z",fill:"#CA8A04"})]}),(0,ei.jsx)("defs",{children:(0,ei.jsx)("clipPath",{id:"clip0_793_79456",children:(0,ei.jsx)("rect",{width:"32",height:"32",fill:"white",transform:"translate(0.5 0.5)"})})})]})};
1856function XP_templateObject(){let $=(0,eA._)(["\n "," {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n position: relative;\n .close {\n position: absolute;\n top: -2px;\n right: -6px;\n }\n\n .xp-icon {\n display: flex;\n gap: 16px;\n align-items: center;\n\n .xp-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n h2 {\n margin: 0;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n margin: 0px;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n }\n }\n']);return XP_templateObject=function(){return $},$}let rv=ek.default.div.withConfig({componentId:"sc-4caf6628-0"})(XP_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var XP=function($){var et;let{xp:en,id:er}=$,eo=(0,ed.T)(),es=(0,em.useContext)(ek.ThemeContext),[el,eu]=(0,em.useState)(!1),eh=(0,e_.useRouter)(),ep=null===(et=eh.pathname)||void 0===et?void 0:et.includes("challenges");return(0,ei.jsxs)(rv,{children:[(0,ei.jsxs)("div",{className:"xp-icon",children:[(0,ei.jsx)(icons_XPStar,{}),(0,ei.jsxs)("div",{className:"xp-text",children:[(0,ei.jsxs)("h2",{children:["+",en," XP"]}),(0,ei.jsx)("p",{children:ep?(0,ei.jsx)(ei.Fragment,{children:"You just gained XP. Keep it up!"}):(0,ei.jsxs)(ei.Fragment,{children:["You earned XP for this exercise. ",(0,ei.jsx)("br",{})," Keep it up!"]})})]})]}),(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",onClick:()=>{eo((0,eE.GV)(er))},onMouseOver:()=>{eu(!0)},onMouseOut:()=>{eu(!1)},fill:el?es.colors.semantic.text.primary:es.colors.semantic.text.tertiary})})]})};function Success_templateObject(){let $=(0,eA._)(["\n "," {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n position: relative;\n .close {\n position: absolute;\n top: -2px;\n right: -6px;\n }\n\n .success-icon {\n display: flex;\n gap: 16px;\n align-items: center;\n\n span {\n font-size: 24px;\n }\n\n .success-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n h2 {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n margin: 0;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n }\n }\n']);return Success_templateObject=function(){return $},$}let rx=ek.default.div.withConfig({componentId:"sc-b013424e-0"})(Success_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var Success=function($){let{id:et}=$,en=(0,ed.T)(),er=(0,em.useContext)(ek.ThemeContext),[eo,es]=(0,em.useState)(!1);return(0,ei.jsxs)(rx,{children:[(0,ei.jsxs)("div",{className:"success-icon",children:[(0,ei.jsx)("span",{children:"\uD83C\uDF89"}),(0,ei.jsxs)("div",{className:"success-text",children:[(0,ei.jsx)("h2",{children:"You got it!"}),(0,ei.jsx)("p",{children:'Press "Next" to continue.'})]})]}),(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",style:{transition:"fill 0.3s ease"},onClick:()=>{en((0,eE.GV)(et))},onMouseOver:()=>{es(!0)},onMouseOut:()=>{es(!1)},fill:eo?er.colors.semantic.text.primary:er.colors.semantic.text.tertiary})})]})},r_=en(38444),rw=en(99979);
1856function AiWrongAnswer_templateObject(){let $=(0,eA._)(["\n width: 100%;\n\n ::-webkit-scrollbar {\n width: 5px;\n }\n\n display: flex;\n flex-flow: column nowrap;\n align-items: start;\n\n h2,\n p {\n margin: 0px;\n }\n\n h2 {\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n font-size: 16px;\n line-height: 150%;\n }\n\n .need-more-help-container {\n width: 100%;\n display: flex;\n justify-content: space-between;\n padding: 16px;\n flex-flow: row wrap;\n gap: 8px;\n align-items: center;\n background-color: ',";\n border-radius: 8px;\n\n .button-container {\n display: flex;\n gap: 8px;\n flex-flow: row wrap;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n\n .btn-content {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n }\n }\n\n .disclaimer {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n\n .actually-correct {\n color: ',';\n font-family: "Mulish", sans-serif;\n font-family: Mulish;\n font-size: 14px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-skip-ink: auto;\n text-decoration-thickness: auto;\n text-underline-offset: auto;\n text-underline-position: from-font;\n margin: 8px 0px 12px 0px;\n }\n\n .hint-container {\n p:first-child {\n margin-top: 0;\n margin-bottom: 0;\n }\n }\n']);return AiWrongAnswer_templateObject=function(){return $},$}let rk=ek.default.div.withConfig({componentId:"sc-f6313855-0"})(AiWrongAnswer_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.semantic.background.yellow.secondary},$=>{let{theme:et}=$;return et.colors.text.secondary},$=>{let{theme:et}=$;return et.colors.text.accent.blue});var AiWrongAnswer=function($){let{answerIsActuallyCorrectPopup:et}=$,en=(0,ed.T)(),er=(0,eo.v9)(ey.f8),es=(0,em.useContext)(ek.ThemeContext),el=(0,eo.v9)(ex.Pb),[eu,eh]=(0,em.useState)(!1);async function handleButtonClick(){en((0,ex.q7)({flow:"check-answer",state:"get-ai-help"})),en((0,rw.P_)({content:"Get a hint from AI",uid:er})),await new Promise($=>setTimeout($,2)),en((0,rw.P_)({content:null==el?void 0:el.hint,uid:er,role:"assistant"}))}return(0,ei.jsxs)(rk,{children:[(0,ei.jsx)("h2",{children:"Oops, your answer doesn't look right"}),(0,ei.jsxs)("div",{children:[(0,ei.jsx)("p",{className:"disclaimer",children:"Correctness is determined with AI and results may be inaccurate."}),(0,ei.jsx)("p",{className:"actually-correct nes-pointer",onClick:()=>{et.setShow(!0)},children:"My answer is actually correct."})]}),(0,ei.jsxs)(eD.Z,{variant:"subtle",size:"small",onClick:()=>{handleButtonClick()},children:[(0,ei.jsx)(r_.Z,{fill:es.colors.semantic.text.primary})," ",(0,ei.jsx)("span",{children:"Get a hint from AI"})]})]})};function Feedback_templateObject(){let $=(0,eA._)(["\n margin: 12px 0px;\n\n .button-container {\n display: flex;\n align-items: center;\n gap: 8px;\n\n button {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n padding: 8px;\n border-radius: 4px;\n\n /* display: flex; */\n /* align-items: center; */\n /* justify-content: center; */\n\n :hover {\n transition-duration: 0.2s;\n background-color: ",";\n\n svg {\n path {\n fill: ",";\n }\n }\n }\n }\n\n .responded {\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n }\n"]);return Feedback_templateObject=function(){return $},$}let rC=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",children:(0,ei.jsx)("path",{d:"M6 20H0V10H6V20ZM10 18H20V20H8V10H10V18ZM2 18H4V12H2V18ZM22 18H20V16H22V18ZM24 16H22V8H16V2H18V6H24V16ZM12 10H10V6H12V10ZM14 6H12V2H14
1856V6ZM16 2H14V0H16V2Z",fill:"#64748B"})}),rE=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,ei.jsx)("path",{d:"M6 2H0V12H6V2ZM10 4H20V2H8V12H10V4ZM2 4H4V10H2V4ZM22 4H20V6H22V4ZM24 6H22V14H16V20H18V16H24V6ZM12 12H10V16H12V12ZM14 16H12V20H14V16ZM16 20H14V22H16V20Z",fill:"#64748B"})}),rI=(0,ei.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",children:(0,ei.jsx)("path",{d:"M2 2H14V0H0V16H2V2ZM12 20V18H14V16H12V14H14V16H16V14H18V4H4V20H12ZM6 18V6H16V12H10V18H6Z",fill:"#64748B"})}),rS=ek.default.div.withConfig({componentId:"sc-67dee6d-0"})(Feedback_templateObject(),$=>{let{theme:et}=$;return et.colors.background.yellow.secondary},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.text.tertiary});var common_Feedback=function($){let{setShowFeedbackPopup:et,feedbackSubmitted:en,setFeedbackSubmitted:er="",feedback:eo}=$,es=(0,ed.T)(),el=(0,rg.lL)(),eu=(0,em.useRef)(null),eh=(0,em.useRef)(null),ep=(0,em.useRef)(null);return(0,ei.jsx)(rS,{children:(0,ei.jsxs)("div",{className:"button-container",children:[(0,ei.jsx)("button",{className:"nes-pointer",onClick:()=>{navigator.clipboard.writeText(eo),es((0,eE.fz)({message:"Copied to clipboard"}))},onMouseEnter:()=>{el.showTooltip("Copy",eu.current,"bottom")},onMouseLeave:()=>{el.hideTooltip()},ref:eu,children:rI}),en?(0,ei.jsx)("div",{className:"responded",children:(0,ei.jsx)("span",{children:"Thanks! This helps us improve Cod\xe9dex."})}):(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("button",{className:"nes-pointer",onClick:()=>{et({show:!0,helpful:"yes"})},onMouseEnter:()=>{el.showTooltip("Helpful",eh.current,"bottom")},onMouseLeave:()=>{el.hideTooltip()},ref:eh,children:rC}),(0,ei.jsx)("button",{className:"nes-pointer",onClick:()=>{et({show:!0,helpful:"no"})},onMouseEnter:()=>{el.showTooltip("Not helpful",ep.current,"bottom")},onMouseLeave:()=>{el.hideTooltip()},ref:ep,children:rE})]})]})})};function HintStyles_templateObject(){let $=(0,eA._)(["\n max-width: 100%;\n width: 100%;\n color: ",";\n\n h1.typewriter {\n color: ",';\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n display: block;\n font-weight: bold;\n scroll-margin-top: 8rem;\n }\n\n h1 code {\n font-family: "PixelGridM";\n letter-spacing: 0.03rem;\n }\n\n h2 code,\n h3 code,\n h4 code,\n h5 code,\n h6 code {\n font-family: "PixelGridS";\n letter-spacing: 0.03rem;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n span {\n color: ',";\n }\n }\n\n a {\n color: ",';\n }\n\n a,\n strong {\n white-space: pre-wrap; /* CSS3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n }\n\n strong {\n font-weight: 800;\n }\n\n p {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 0;\n margin-right: 0;\n }\n\n figure {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 40px;\n margin-right: 40px;\n }\n\n blockquote {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 40px;\n margin-right: 40px;\n margin-left: 0;\n padding-left: 1rem;\n border-left: 0.25rem solid #3d444d;\n }\n\n dl {\n display: block;\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 0;\n margin-right: 0;\n }\n\n dd {\n display: block;\n margin-left: 40px;\n }\n\n p,\n li,\n kbd {\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-weight: 500;\n }\n\n .li-p-with-image {\n p {\n all: unset;\n }\n }\n\n td,\n th {\n color: black;\n }\n\n .nes-balloon {\n color: black;\n }\n\n /* Code in text */\n p code,\n li code,\n dd code,\n td code {\n /* font-family: "Work Sans", Dogica, monospace; */\n /* font-family: "Fira Code", monospace; */\n font-family: "Noto Sans Mono", monospace;\n font-weight: 400;\n background: rgba(175, 184, 193, 0.2);\n word-wrap: break-word;\n box-decoration-break: clone;\n padding: 0.05em 0.2em;\n border-radius: 6px;\n font-size: 15px;\n }\n\n pre {\n background-color: #0d1117;\n border-radius: 5px;\n position: relative;\n }\n\n pre code {\n display: block;\n font-family: monospace;\n font-size: inherit;\n }\n\n kbd {\n background-color: #eee;\n border-radius: 3px;\n border: 1px solid #b4b4b4;\n box-shadow:\n 0 1px 1px rgba(0, 0, 0, 0.2),\n 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;\n color: #333;\n display: inline-block;\n font-size: 0.8em;
1856\n //font-weight: 700;\n text-shadow: 0 1px 0 white;\n line-height: 1;\n padding: 2px 6px;\n white-space: nowrap;\n }\n\n details {\n margin-top: 3rem;\n margin-bottom: 2rem;\n }\n\n summary::-webkit-details-marker {\n display: none;\n }\n\n summary > div {\n width: calc(100% - 50px);\n display: inline-block;\n vertical-align: middle;\n }\n\n summary {\n display: block;\n cursor:\n url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC)\n 14 0,\n pointer;\n }\n\n summary:before {\n /* content: "âº"; */\n margin: 0px 10px 0 0;\n width: 20px;\n }\n\n details[open] summary:before {\n /* content: "â¼"; */\n }\n\n img {\n border-radius: 5px;\n }\n\n th {\n text-align: center;\n margin: 10px;\n background-color: ',';\n font-family: "Mulish", sans-serif;\n font-weight: 500;\n border: 2px solid ',";\n font-size: 16px;\n padding: 10px;\n min-width: fit-content;\n color: ",' !important;\n line-height: 26px;\n }\n\n td {\n color: #212529;\n font-family: "Mulish", sans-serif;\n font-weight: 500;\n font-size: 16px;\n font-style: normal;\n //font-weight: 400;\n line-height: 26px;\n border: 2px solid #212529;\n border: 2px solid ',";\n padding: 7px;\n padding-left: 10px;\n color: "," !important;\n }\n\n .mdx-content-container {\n width: 100%;\n max-width: 100%;\n\n div.table-container {\n overflow-x: auto;\n width: 100%;\n max-width: 100%;\n\n table {\n min-width: 350px;\n width: 100%;\n overflow-x: auto;\n display: block;\n }\n }\n }\n\n ",' {\n h1 {\n margin: 32px 0;\n font-size: 1.5rem;\n\n font-feature-settings:\n "liga" off,\n "clig" off;\n /* Pixel Grid/3XL */\n font-family: "PixelGridM";\n letter-spacing: 0.03rem;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.96px;\n }\n\n h2 {\n margin: 2rem 0 1.5rem 0;\n font-size: 1.1rem;\n font-feature-settings:\n "liga" off,\n "clig" off;\n /* Pixel Grid/2XL */\n font-family: "PixelGridS";\n letter-spacing: 0.03rem;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n\n h3 {\n margin: 2rem 0;\n font-size: 0.9rem;\n font-feature-settings:\n "liga" off,\n "clig" off;\n /* Pixel Grid/2XL */\n font-family: "PixelGridS";\n letter-spacing: 0.03rem;\n font-style: normal;\n font-weight: 700;\n line-height: 140%;\n letter-spacing: 0.72px;\n }\n h4 {\n margin: 1.5rem 0;\n font-size: 0.8rem;\n }\n h5 {\n margin: 1rem 0;\n font-size: 0.6rem;\n }\n\n pre code {\n display: block;\n font-family: monospace;\n font-size: inherit;\n padding: 1rem 2rem;\n }\n\n .table-container {\n overflow: auto;\n }\n }\n\n '," {\n h1 {\n margin: 3rem 0;\n font-size: 1.5rem;\n }\n h2 {\n margin: 2.5rem 0 1.5rem 0;\n font-size: 1.2rem;\n }\n\n h3 {\n margin: 2rem 0;\n font-size: 1rem;\n }\n h4 {\n margin: 1.5rem 0;\n font-size: 0.8rem;\n }\n h5 {\n margin: 1rem 0;\n font-size: 0.6rem;\n }\n\n pre code {\n display: block;\n font-family: monospace;\n font-size: inherit;\n padding: 1rem 2rem;\n }\n }\n\n "," {\n overflow-wrap: break-word;\n\n /* IE and Edge */\n -ms-overflow-style: none;\n\n /* Firefox */\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n // stops the overflow bug in chromium based browsers for mathematical equations\n .katex-mathml {\n display: none !important;\n }\n\n h1 {\n margin: 32px 0;\n font-size: 1.4rem;\n }\n\n h2 {\n margin: 2rem 0 1.5rem 0;\n font-size: 1.2rem;\n }\n\n h3 {\n margin: 2rem 0;\n font-size: 1rem;\n }\n h4 {\n margin: 1.5rem 0;\n font-size: 0.8rem;\n }\n h5 {\n margin: 1rem 0;\n font-size: 0.8rem;\n }\n pre code {\n display: block;\n font-family: monospace;\n font-size: inherit;\n padding: 1rem 2rem;\n }\n }\n\n ",' {\n h1 {\n margin: 32px 0;\n font-size: 28px;\n }\n\n h2 {\n margin: 2rem 0 1.5rem 0;\n font-size: 22px;\n }\n h3 {\n margin: 2rem 0;\n font-size: 20px;\n }\n h4 {\n margin: 1.5rem 0;\n font-size: 1rem;\n }\n h5 {\n margin: 1rem 0;\n font-size: 1rem;\n }\n }\n\n p.need-help:hover {\n cursor:\n url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC)\n 14 0,\n pointer;\n }\n\n &.dark {\n pre {\n background-color: #1d2332;\n code {\n background-color: #1d2332;\n }\n }\n }\n\n .demo {\n all: unset;\n font-family: "Mulish", sans-serif;\n font-weight: 500;\n max-width: 100%;\n }\n']);
1856return HintStyles_templateObject=function(){return $},$}let rT=ek.default.section.withConfig({componentId:"sc-f28cabec-0"})(HintStyles_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>"incorrect"===$.state?$.theme.colors.semantic.text.accent.yellow:$.theme.colors.text1,$=>$.theme.colors.hyperLink,$=>$.theme.colors.hyperLink,$=>"light"===$.theme.mode?"#f9f5fe":"#52A5FF",$=>"light"===$.theme.mode?"black":"#244B71",$=>"incorrect"===$.state?$.theme.colors.semantic.text.accent.yellow:$.theme.colors.text1,$=>"light"===$.theme.mode?"#212529":"#244C73",$=>"incorrect"===$.state?$.theme.colors.semantic.text.accent.yellow:$.theme.colors.text1,$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{theme:et}=$;return et.breakpoints.md},$=>{let{theme:et}=$;return et.breakpoints.lg});function AiFeedback_templateObject(){let $=(0,eA._)(['\n width: 100%;\n\n max-height: 600px;\n overflow-y: auto;\n\n ::-webkit-scrollbar {\n width: 5px;\n }\n\n display: flex;\n flex-flow: column nowrap;\n align-items: start;\n font-family: "Mulish", sans-serif;\n\n h2,\n p {\n margin: 0px;\n }\n\n h2 {\n color: ',";\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n margin-bottom: 4px;\n }\n\n .disclaimer {\n margin: 0px;\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n\n .actually-correct {\n color: ",";\n font-size: 14px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-skip-ink: auto;\n text-decoration-thickness: auto;\n text-underline-offset: auto;\n text-underline-position: from-font;\n }\n\n .more-help {\n width: 100%;\n display: flex;\n justify-content: space-between;\n padding: 16px;\n align-items: center;\n background-color: ",";\n border-radius: 8px;\n flex-flow: row wrap;\n gap: 8px;\n\n p {\n margin-bottom: 0;\n color: ",";\n font-size: 18px;\n font-weight: bold;\n margin-top: 0;\n }\n }\n"]);return AiFeedback_templateObject=function(){return $},$}let rA=ek.default.div.withConfig({componentId:"sc-71d24d8d-0"})(AiFeedback_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.accent.yellow},$=>{let{theme:et}=$;return et.colors.text.accent.blue},$=>{let{theme:et}=$;return et.colors.semantic.background.yellow.secondary},$=>{let{theme:et}=$;return et.colors.semantic.text.accent.yellow});var states_AiFeedback=function($){let{setShowFeedbackPopup:et,feedbackSubmitted:en,answerIsActuallyCorrectPopup:er}=$,es=(0,eo.v9)(ex.Pb);return(0,ei.jsxs)(rA,{children:[(0,ei.jsx)("h2",{children:"AI hint "}),(0,ei.jsx)(rT,{state:"incorrect",children:(0,ei.jsx)("p",{children:null==es?void 0:es.hint})}),(0,ei.jsx)(common_Feedback,{setShowFeedbackPopup:et,feedbackSubmitted:en,feedback:null==es?void 0:es.hint}),(0,ei.jsx)("div",{children:(0,ei.jsx)("p",{className:"actually-correct nes-pointer",onClick:()=>{er.setShow(!0)},children:"My answer is actually correct."})})]})};function TextArea_templateObject(){let $=(0,eA._)(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .input-pixel-border {\n padding: 12px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n\n background-color: ",";\n\n textarea {\n outline: none;\n border: none;\n background: none;\n padding: 0px;\n margin: 0px;\n box-shadow: none;\n flex: 1;\n\n color: ",';\n font-family: "Mulish", sans-serif;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n\n ::placeholder {\n color: ',';\n }\n }\n }\n\n .error {\n font-family: "Mulish", sans-serif;\n margin: 0px;\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n }\n']);
1856return TextArea_templateObject=function(){return $},$}let rP=ek.default.div.withConfig({componentId:"sc-d297d814-0"})(TextArea_templateObject(),$=>{let{theme:et}=$;return et.colors.background.grey.secondary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.tertiary});var Inputs_TextArea=function($){let{placeholder:et="Placeholder text",error:en=null,icon:er=null,iconAction:es=()=>{},value:el,setValue:eu,...ed}=$,eh=(0,eo.v9)(ey.o4)||"dark",[ep,ef]=(0,em.useState)(!1),eg={critical:{borderColor:"F43F5E",textColor:"#9F1239",icon:(0,ei.jsx)(eG.Z,{})}},ev=en&&eg[null==en?void 0:en.type],ex=ev?ev.borderColor:ep?"14ADFF":"dark"===eh?"64748B":"94A3B8";return(0,ei.jsxs)(rP,{className:"dynamic-input",children:[(0,ei.jsxs)(ez.Z,{borderColor:ex,className:"input-pixel-border",children:[(0,ei.jsx)("textarea",{placeholder:et,onFocus:()=>ef(!0),onBlur:()=>ef(!1),value:el,onChange:$=>eu($.target.value),...ed}),er&&(0,ei.jsx)("span",{onClick:()=>es(),className:"nes-pointer",children:er})]}),en&&(0,ei.jsxs)("p",{className:"error",style:{color:ev.textColor},children:[ev.icon,en.message]})]})},rN=en(84514);function FeedbackPopup_templateObject(){let $=(0,eA._)(["\n from {\n transform: scale(0.8);\n visibility: hidden;\n opacity: 0;\n } to {\n transform: scale(1);\n visibility: visible;\n opacity: 1;\n }\n"]);return FeedbackPopup_templateObject=function(){return $},$}function FeedbackPopup_templateObject1(){let $=(0,eA._)(['\n z-index: 9999;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n background: rgba(0, 0, 0, 0.5);\n font-family: "Mulish", sans-serif;\n\n .show-solutions {\n animation: '," 0.2s ease-in;\n width: 548px;\n height: 340px;\n max-width: 95%;\n max-height: 95%;\n overflow: auto;\n\n background: ",";\n\n .copy-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n p,\n h2 {\n margin: 0px;\n }\n\n h2 {\n color: ",";\n text-align: center;\n font-size: 24px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n }\n }\n .input-container {\n margin-top: 16px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 16px;\n\n button {\n min-width: 170px;\n }\n }\n }\n"]);return FeedbackPopup_templateObject1=function(){return $},$}let rj=(0,ek.keyframes)(FeedbackPopup_templateObject()),rR=ek.default.div.withConfig({componentId:"sc-b775363d-0"})(FeedbackPopup_templateObject1(),rj,$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary});var common_FeedbackPopup=function($){let{showFeedbackPopup:et,setShowFeedbackPopup:en,setFeedbackSubmitted:er}=$,[es,el]=(0,em.useState)(""),eu=(0,e_.useRouter)(),ed=(0,eo.v9)(ex.Pb),eh=(0,eo.v9)(ey.xp),ep=(0,em.useCallback)(async function(){let{asPath:$}=eu,ei="string"==typeof $?null==$?void 0:$.split("/")[1]:"",eo="string"==typeof $?null==$?void 0:$.split("/")[2]:"";try{let{firestore:$}=(0,eg.UM)(),en=(0,rN.hJ)($,"aiExecFeedback");await (0,rN.ET)(en,{helpful:et.helpful,uid:eh,timestamp:(0,n9.Bt)(),generatedResponse:ed.hint,courseName:ei,challengeName:eo,feedbackResponse:es})}catch($){console.error("Error adding document: ",$)}"yes"===et.helpful?(0,eT.t)({eventName:"ai-feedback-helpful-v2",uid:eh,generatedResponse:ed.hint,feedbackResponse:es,courseName:ei,exerciseName:eo}):(0,eT.t)({eventName:"ai-feedback-not-helpful-v2",uid:eh,generatedResponse:ed.hint,feedbackResponse:es,courseName:ei,exerciseName:eo}),await new Promise($=>setTimeout($,1e3)),el(""),en({show:!1,helpful:""}),er(!0)},[null==ed?void 0:ed.hint,eu,er,en,et,eh,es]);return et&&et.show?(0,ei.jsx)(rR,{children:(0,ei.jsxs)(t$.Z,{iconAction:()=>{en(!1)},className:"show-solutions",children:[(0,ei.jsxs)("div",{className:"copy-container",children:[(0,ei.jsx)("h2",{children:"Tell us more"}),(0,ei.jsxs)("p",{children:["What was ","yes"!=et.helpful&&"not"," helpful about this response?"]})]}),(0,ei.jsx)("div",{className:"input-container",children:(0,ei.jsx)(Inputs_TextArea,{value:es,setValue:el,placeholder:"Provide additional feedback",rows:3})}),(0,ei.jsx)("div",{className:"button-container",children:(0,ei.jsx)(eD.Z,{size:"normal",onClick:()=>{ep()},className:"btn-content",disabled:!es,children:"Submit"})})]})}):null};
1856function AnswerIsActuallyCorrect_templateObject(){let $=(0,eA._)(["\n from {\n transform: scale(0.8);\n visibility: hidden;\n opacity: 0;\n } to {\n transform: scale(1);\n visibility: visible;\n opacity: 1;\n }\n"]);return AnswerIsActuallyCorrect_templateObject=function(){return $},$}function AnswerIsActuallyCorrect_templateObject1(){let $=(0,eA._)(['\n z-index: 9999;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n background: rgba(0, 0, 0, 0.5);\n font-family: "Mulish", sans-serif;\n\n .show-solutions {\n animation: '," 0.2s ease-in;\n width: 548px;\n height: 454px;\n max-width: 95%;\n max-height: 95%;\n overflow: auto;\n\n background: ",";\n\n .copy-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n p,\n h2 {\n margin: 0px;\n }\n\n h2 {\n color: ",";\n font-family: Mulish;\n font-size: var(--Text-Sizes-2XL, 24px);\n font-style: normal;\n font-weight: 700;\n line-height: 150%; /* 36px */\n text-align: center;\n }\n\n p {\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 150%;\n text-align: center;\n }\n }\n .input-container {\n margin-top: 16px;\n\n label {\n color: ",";\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 16px;\n\n button {\n min-width: 170px;\n }\n }\n }\n"]);return AnswerIsActuallyCorrect_templateObject1=function(){return $},$}let rV=(0,ek.keyframes)(AnswerIsActuallyCorrect_templateObject()),rD=ek.default.div.withConfig({componentId:"sc-f4a3ee82-0"})(AnswerIsActuallyCorrect_templateObject1(),rV,$=>{let{theme:et}=$;return et.colors.background.grey.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary});var AnswerIsActuallyCorrect=function($){let{showAnswerIsActuallyCorrectPopup:et,setShowAnswerIsActuallyCorrectPopup:en,challengeName:er,chapterName:es,courseName:el,xP:eu}=$,[eh,ep]=(0,em.useState)(""),[ef,ev]=(0,em.useState)(!1),ew=(0,e_.useRouter)(),ek=(0,eo.v9)(ex.Pb),eC=(0,eo.v9)(ex.Pb),eI=(0,eo.v9)(ey.xp),eS=(0,ed.T)(),eA=(0,em.useCallback)(async function(){ev(!0);let{asPath:$}=ew,et="string"==typeof $?null==$?void 0:$.split("/")[2]:"",ei=(null==eC?void 0:eC.code)?null==eC?void 0:eC.code:"# Write code below";try{let{firestore:$}=(0,eg.UM)(),en=(0,rN.hJ)($,"aiExecFeedback");await (0,rN.ET)(en,{helpful:"correct-answer-marked-incorrect-v2",uid:eI,timestamp:(0,n9.Bt)(),generatedResponse:null==ek?void 0:ek.hint,courseName:el,challengeName:et,feedbackResponse:eh,userCode:ei})}catch($){console.error("Error adding document: ",$)}(0,eT.t)({eventName:"correct-answer-marked-incorrect-v2",uid:eI,generatedResponse:null==ek?void 0:ek.hint,feedbackResponse:eh,courseName:el,exerciseName:et}),(0,eT.t)({eventName:"correct-answer-marked-incorrect-v2-new-denom",uid:eI,generatedResponse:null==ek?void 0:ek.hint,feedbackResponse:eh,courseName:el,exerciseName:et});try{eS((0,ex.lZ)({xP:eu,challengeName:er,chapterName:es,courseName:el})),eS((0,eE.um)())}catch($){}await new Promise($=>setTimeout($,1e3)),ep(""),ev(!1),en(!1)},[null==ek?void 0:ek.hint,er,es,null==eC?void 0:eC.code,el,eS,ew,en,eI,eh,eu]);return et?(0,ei.jsx)(rD,{children:(0,ei.jsxs)(t$.Z,{iconAction:()=>{en(!1)},className:"show-solutions",children:[(0,ei.jsxs)("div",{className:"copy-container",children:[(0,ei.jsx)("h2",{children:"Our bad, let's keep you moving!"}),(0,ei.jsx)("p",{children:"Our AI-based code evaluation occasionally makes mistakes. Your feedback allows us to fine tune our system to keep it accurate and helpful."})]}),(0,ei.jsxs)("div",{className:"input-container",children:[(0,ei.jsx)("label",{htmlFor:"correct-answer-marked-incorrect",children:"Share more feedback"}),(0,ei.jsx)(Inputs_TextArea,{id:"correct-answer-marked-incorrect",value:eh,setValue:ep,placeholder:"Provide additional feedback",rows:3})]}),(0,ei.jsx)("div",{className:"button-container",children:(0,ei.jsx)(eD.Z,{size:"normal",onClick:()=>{eA()},className:"btn-content",children:ef?(0,ei.jsx)(eJ.Z,{}):"Submit"})})]})}):null};
1856function RegexIncorrectAnswer_templateObject(){let $=(0,eA._)(["\n width: 100%;\n\n ::-webkit-scrollbar {\n width: 5px;\n }\n\n display: flex;\n flex-flow: column nowrap;\n //gap: 10px;\n gap: 4px;\n align-items: start;\n\n font-family: Mulish, sans-serif;\n color: ",";\n\n h2 {\n margin: 0px;\n color: ",';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n }\n\n p {\n margin: 0;\n color: ',';\n font-family: "Mulish", sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 150%;\n }\n']);return RegexIncorrectAnswer_templateObject=function(){return $},$}let rO=ek.default.div.withConfig({componentId:"sc-a69cfc64-0"})(RegexIncorrectAnswer_templateObject(),$=>{let{theme:et}=$;return et.colors.semantic.text.accent.yellow},$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.primary});var RegexIncorrectAnswer=function(){let $=(0,eo.v9)(ex.Pb);return(0,ei.jsxs)(rO,{children:[(0,ei.jsx)("h2",{children:"Oops, try again!"}),(0,ei.jsx)("p",{className:"regex-hint",children:null==$?void 0:$.hint})]})};function AiStates_templateObject(){let $=(0,eA._)(["\n "," {\n position: relative;\n .close {\n position: absolute;\n top: -4px;\n right: -4px;\n }\n }\n"]);return AiStates_templateObject=function(){return $},$}let rM=ek.default.div.withConfig({componentId:"sc-59fe6512-0"})(AiStates_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs});var AiStates=function($){let{id:et,info:en={challengeName:"",chapterName:"",courseName:"",xp:0}}=$,er=(0,ed.T)(),es=(0,eo.v9)(ex.Pb),el=(0,em.useContext)(ek.ThemeContext),[eu,eh]=(0,em.useState)(!1),[ep,ef]=(0,em.useState)(!1),[eg,ey]=(0,em.useState)(!1),[ev,e_]=(0,em.useState)(!1);return(0,ei.jsxs)(rM,{children:["check-answer"===es.flow&&({"regex-incorrect-answer":(0,ei.jsx)(RegexIncorrectAnswer,{}),"incorrect-answer":(0,ei.jsx)(AiWrongAnswer,{answerIsActuallyCorrectPopup:{show:eg,setShow:ey}}),"get-ai-help":(0,ei.jsx)(states_AiFeedback,{setShowFeedbackPopup:eh,feedbackSubmitted:ep,answerIsActuallyCorrectPopup:{show:eg,setShow:ey}})})[es.state],(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",onClick:()=>{er((0,eE.GV)(et))},onMouseOver:()=>{e_(!0)},onMouseOut:()=>{e_(!1)},fill:ev?el.colors.semantic.text.primary:el.colors.semantic.text.tertiary})}),(0,ei.jsx)(common_FeedbackPopup,{showFeedbackPopup:eu,setShowFeedbackPopup:eh,setFeedbackSubmitted:ef}),(0,ei.jsx)(AnswerIsActuallyCorrect,{showAnswerIsActuallyCorrectPopup:eg,setShowAnswerIsActuallyCorrectPopup:ey,challengeName:en.challengeName,chapterName:en.chapterName,courseName:en.courseName,xP:en.xp})]})},rF=en(14349),rL=en(83624),rH=en(6052);function Warning_templateObject(){let $=(0,eA._)(["\n "," {\n position: relative;\n .close {\n position: absolute;\n top: -10px;\n right: -10px;\n }\n }\n"]);return Warning_templateObject=function(){return $},$}function Warning_templateObject1(){let $=(0,eA._)(["\n width: 100%;\n\n ::-webkit-scrollbar {\n width: 5px;\n }\n\n display: flex;\n flex-flow: column nowrap;\n //gap: 10px;\n gap: 4px;\n align-items: start;\n\n font-family: Mulish, sans-serif;\n color: ",";\n\n h2 {\n font-size: 18px;\n line-height: 150%;\n font-weight: bold;\n letter-spacing: 0;\n margin-bottom: 0;\n margin-top: 0;\n font-family: Mulish, sans-serif;\n\n display: flex;\n align-items: center;\n gap: 8px;\n color: ",";\n }\n\n p {\n font-size: 16px;\n line-height: 150%;\n color: ",";\n margin: 0;\n }\n"]);return Warning_templateObject1=function(){return $},$}let rB=ek.default.div.withConfig({componentId:"sc-416f464e-0"})(Warning_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs}),rU=ek.default.div.withConfig({componentId:"sc-416f464e-1"})(Warning_templateObject1(),$=>{let{theme:et}=$;return et.colors.semantic.text.accent.yellow},$=>{let{theme:et}=$;return et.colors.semantic.text.primary},$=>{let{theme:et}=$;return et.colors.semantic.text.primary}),rz={Link:tP(),Hint:rH.Z,PythonTypeWriter:tt.Z,CustomTable:rL.Z};var Warning=function($){let{id:et,message:en}=$,er=(0,ed.T)(),eo=(0,em.useContext)(ek.ThemeContext),[es,el]=(0,em.useState)(!1);return(0,ei.jsxs)(rB,{children:[(0,ei.jsxs)(rU,{children:[(0,ei.jsx)("h2",{children:"Oops, try again!"}),"string"==typeof en?(0,ei.jsx)("p",{className:"regex-hint",children:en}):(0,ei.jsx)(rT,{children:(0,ei.jsx)(rF.R,{...en,components:rz})})]}),(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",onClick:()=>{er((0,eE.GV)(et))},onMouseOver:()=>{el(!0)},onMouseOut:()=>{el(!1)},fill:es?eo.colors.semantic.text.primary:eo.colors.semantic.text.tertiary})})]})};
1856function BadgeEarned_templateObject(){let $=(0,eA._)(['\n display: flex;\n align-items: start;\n gap: 16px;\n font-family: "Mulish", sans-serif;\n\n * {\n margin: 0px;\n }\n\n img {\n width: 32px;\n height: 32px;\n flex-shrink: 0;\n image-rendering: pixelated;\n flex-shrink: 0;\n }\n\n .badge-info {\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 1;\n\n .name {\n color: ',";\n font-size: 16px;\n font-weight: 700;\n line-height: 150%;\n }\n\n .requirement {\n color: ",";\n font-size: 14px;\n font-weight: 500;\n line-height: 150%;\n }\n }\n"]);return BadgeEarned_templateObject=function(){return $},$}let rq=ek.default.div.withConfig({componentId:"sc-c8d283b0-0"})(BadgeEarned_templateObject(),$=>{let{theme:et}=$;return et.colors.text.primary},$=>{let{theme:et}=$;return et.colors.text.secondary});var states_BadgeEarned=function($){let{id:et,badgeType:en,level:er=null}=$,eo=(0,ed.T)(),es=(0,em.useContext)(ek.ThemeContext),[el,eu]=(0,em.useState)(!1),eh=(0,tj.Xq)(en);if("threshold"===eh.kind){let $=eh.tiers.find($=>$.level===er);return $?(0,ei.jsxs)(rq,{children:[(0,ei.jsx)("img",{src:$.icon,alt:"badge icon"}),(0,ei.jsxs)("div",{className:"badge-info",children:[(0,ei.jsxs)("p",{className:"name",children:["New Badge: ",$.name]}),(0,ei.jsx)("p",{className:"requirement",children:eh.label($.threshold)})]}),(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",onClick:()=>{eo((0,eE.GV)(et))},onMouseOver:()=>{eu(!0)},onMouseOut:()=>{eu(!1)},fill:el?es.colors.semantic.text.primary:es.colors.semantic.text.tertiary})})]}):null}return(0,ei.jsxs)(rq,{children:[(0,ei.jsx)("img",{src:eh.icon,alt:"badge icon"}),(0,ei.jsxs)("div",{className:"badge-info",children:[(0,ei.jsxs)("p",{className:"name",children:["New Badge: ",eh.name]}),(0,ei.jsx)("p",{className:"requirement",children:eh.requirement})]}),(0,ei.jsx)("div",{className:"close",children:(0,ei.jsx)(tq.Z,{className:"nes-pointer",onClick:()=>{eo((0,eE.GV)(et))},onMouseOver:()=>{eu(!0)},onMouseOut:()=>{eu(!1)},fill:el?es.colors.semantic.text.primary:es.colors.semantic.text.tertiary})})]})},overlayNotifications_OverlayNotificationContent=function($){let{type:et,id:en,xp:er,info:eo,message:es,badgeType:el="",level:eu=null}=$;switch(et){case"success":return(0,ei.jsx)(Success,{id:en});case"error":case"info":default:return(0,ei.jsx)("div",{style:{}});case"warning":return(0,ei.jsx)(Warning,{id:en,message:es});case"xp":return(0,ei.jsx)(XP,{xp:er,id:en});case"ai":return(0,ei.jsx)(AiStates,{info:eo,id:en});case"badge":return(0,ei.jsx)(states_BadgeEarned,{id:en,badgeType:el,level:eu})}};function OverlayNotification_templateObject(){let $=(0,eA._)(["\n "," {\n position: fixed;\n right: 0px;\n bottom: 125px;\n color: ",";\n z-index: 9999;\n background-color: transparent;\n\n display: flex;\n justify-content: center;
1856\n align-items: center;\n flex-direction: column;\n gap: 10px;\n width: 100%;\n }\n\n "," {\n right: 24px;\n bottom: ",";\n width: fit-content;\n align-items: end;\n }\n\n &.show {\n visibility: visible;\n }\n &.hide {\n visibility: hidden;\n }\n"]);return OverlayNotification_templateObject=function(){return $},$}let rZ=ek.default.div.withConfig({componentId:"sc-f549fdd5-0"})(OverlayNotification_templateObject(),$=>{let{theme:et}=$;return et.breakpoints.xs},$=>{let{theme:et}=$;return et.colors.semantic.background.grey.primary},$=>{let{theme:et}=$;return et.breakpoints.sm},$=>{let{bottom:et}=$;return null!=et?et:"24px"});var OverlayNotification=function(){var $;let et=(0,ed.T)(),en=(0,eo.v9)(eE.f2),er=(0,e_.useRouter)(),[es,el]=(0,em.useState)({}),eu=(0,em.useRef)(0),eh=(0,em.useRef)({});return(0,em.useEffect)(()=>{let $=new Set(en.map($=>$.id));Object.keys(eh.current).forEach(et=>{$.has(et)||(clearTimeout(eh.current[et]),delete eh.current[et])}),el(et=>{let en=Object.fromEntries(Object.entries(et).filter(et=>{let[en]=et;return $.has(en)}));return Object.keys(en).length===Object.keys(et).length?et:en})},[en]),(0,em.useEffect)(()=>{let $=en.find($=>!es[$.id]);if(!$)return;let et=Math.max(0,400-(Date.now()-eu.current)),er=setTimeout(()=>{eu.current=Date.now(),el(et=>({...et,[$.id]:!0}))},et);return()=>clearTimeout(er)},[en,es]),(0,em.useEffect)(()=>{en.forEach($=>{$.persist||!es[$.id]||eh.current[$.id]||(eh.current[$.id]=setTimeout(()=>et((0,eE.GV)($.id)),3e3))})},[et,en,es]),(0,em.useEffect)(()=>{let $=eh.current;return()=>{Object.values($).forEach(clearTimeout)}},[]),(0,em.useEffect)(()=>{er.events.on("routeChangeStart",()=>{et((0,eE.um)())})},[et,null==er?void 0:er.events]),(0,ei.jsx)(rZ,{bottom:($=er.pathname,/^\/[^/]+\/\[challenge\]$/.test($)||$.split("/").includes("challenges"))?"88px":"24px",children:en.filter($=>es[$.id]).map($=>(0,ei.jsx)(rb,{className:"",type:$.type,children:(0,ei.jsx)(overlayNotifications_OverlayNotificationContent,{type:$.type,id:$.id,xp:$.xp,info:$.info,message:$.message,badgeType:$.badgeType,level:$.level})},$.id))})},rW=en(22955);async function fetchCommunityBadges($){var et,en;let er=await fetch("/api/badges/getUserBadges?uid=".concat(encodeURIComponent($.trim())));if(!er.ok)throw Error("getUserBadges ".concat(er.status));let ei=await er.json();return{badges:null!==(et=ei.badges)&&void 0!==et?et:[],backfilled:!!ei.backfilled,earnedBadges:null!==(en=ei.earnedBadges)&&void 0!==en?en:[]}}async function fetchSpecialBadges($){if(!$)return[];try{let et=await fetch("/api/cert/badges/userBadges",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:$})});if(!et.ok)throw Error("userBadges ".concat(et.status));let en=await et.json();return(0,rW.NH)(en.data)}catch($){return console.error("Failed to fetch special badges",$),[]}}var rG=(er=function($){let{children:et}=$,en=(0,eo.v9)(ey.o4)||"dark",[er,es]=(0,em.useState)(!1);(function(){let $=(0,e_.useRouter)(),et=$.asPath;(0,em.useEffect)(()=>{(0,eI.ib)()},[]);let en=(0,eo.v9)(ey.ot),er=(0,ed.T)();(0,eS.t)(),(0,em.useEffect)(function(){if(en)try{er((0,ey.xG)(""))}catch($){console.log($,"in global header")}},[en,er]),(0,em.useEffect)(()=>{er((0,eE.cF)(et))},[et,er]),(0,em.useEffect)(()=>{function handleRouteChange(){(0,eI.ut)()}return $.events.on("routeChangeComplete",handleRouteChange),()=>{$.events.off("routeChangeComplete",handleRouteChange)}},[$.events])})(),function(){let $=(0,eo.I0)(),et=(0,eo.v9)(ey.f8),en=(0,eo.v9)(ey.zr),er=(0,eo.v9)((0,rn.Bu)());(0,em.useEffect)(()=>{if(!et){$((0,rn.sW)());return}if(er)return;let ei=!1;return $((0,rn.qm)(!0)),(async()=>{try{let[eo,es]=await Promise.all([fetchCommunityBadges(et),fetchSpecialBadges(en)]),el=(0,rW.ho)(eo.badges,es);if(ei)return;if($((0,rn.TW)(el)),eo.backfilled)for(let{badgeId:et,tier:en}of eo.earnedBadges){var er;$((0,eE.UX)({type:"badge",message:"Badge earned!",persist:!0,badgeType:et,level:null!==(er=null==en?void 0:en.level)&&void 0!==er?er:null}))}}catch(et){console.error("Failed to fetch user badges",et),ei||$((0,rn.qm)(!1))}})(),()=>{ei=!0}},[et,en,er,$])}();let el=(0,em.useMemo)(()=>
1856"light"===en?{lightTheme:eC.ib,darkTheme:eC.Cs,...eC.ib}:{lightTheme:eC.ib,darkTheme:eC.Cs,...eC.Cs},[en]);return((0,em.useEffect)(function(){es(!0)},[]),(0,em.useEffect)(function(){er&&(0,eT.UK)()},[er]),er)?(0,ei.jsx)(ek.ThemeProvider,{theme:el,children:(0,ei.jsxs)(rg.Nj,{children:[(0,ei.jsx)(eC.nz,{}),(0,ei.jsx)(organisms_GlobalPopups,{}),(0,ei.jsx)(atoms_Toast,{}),(0,ei.jsx)(OverlayNotification,{}),et]})}):null},class extends em.Component{static getDerivedStateFromError($){return{hasError:!0,error:$}}componentDidCatch($,et){console.error("Error caught in HOC:",$,et),this.setState({error:$,errorInfo:et})}render(){var $;return(null===($=this.state)||void 0===$?void 0:$.hasError)?(0,ei.jsxs)("div",{style:{padding:"20px 100px",borderRadius:"8px",fontFamily:"Mulish, sans-serif"},children:[(0,ei.jsx)("h2",{style:{fontSize:"40px"},children:"Something went wrong."}),(0,ei.jsxs)("p",{style:{fontSize:"24px"},children:["Please screenrecord your console.logs and email us at",(0,ei.jsx)("strong",{children:" [email protected] "})," with details about how this error occurred."]}),(0,ei.jsxs)("p",{style:{fontSize:"24px"},children:["Current Route:"," ",(0,ei.jsxs)("strong",{children:[" ",window.location.pathname]})]}),(0,ei.jsxs)("div",{style:{backgroundColor:"#ffeeee",padding:"20px",borderRadius:"20px",fontFamily:"Mulish, sans-serif"},children:[this.state.error&&(0,ei.jsx)("pre",{style:{color:"#a00",whiteSpace:"pre-wrap",fontFamily:"Mulish, sans-serif"},children:this.state.error.toString()}),this.state.errorInfo&&(0,ei.jsx)("pre",{style:{color:"#a00",whiteSpace:"pre-wrap",fontFamily:"Mulish, sans-serif"},children:this.state.errorInfo.componentStack})]})]}):(0,ei.jsx)(er,{...this.props})}constructor($){super($),this.state={hasError:!1,error:null,errorInfo:null}}}),r$=en(9008),rJ=en.n(r$);en(34155);function resolveImageUrl($){return $}var atoms_MetaTags=function($){var et,en;let{metatags:er}=$;return er?(0,ei.jsxs)(rJ(),{children:[(0,ei.jsx)("meta",{property:"og:site_name",content:"Cod\xe9dex"},"og-site_name"),(0,ei.jsx)("meta",{property:"og:locale",content:"en_US"},"og-locale"),(0,ei.jsx)("meta",{charSet:"UTF-8"}),(0,ei.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,ei.jsx)("link",{rel:"icon",type:"image/png",href:"/images/favicon.png",sizes:"96x96"}),(0,ei.jsx)("link",{rel:"icon",type:"image/svg+xml",href:"/images/favicon.svg"}),(0,ei.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/images/apple-touch-icon.png"}),(0,ei.jsx)("title",{children:er.title}),er.robots&&(0,ei.jsx)("meta",{name:"robots",content:er.robots},"robots"),(0,ei.jsx)("link",{rel:"canonical",href:er.canonical||er.og.url}),(0,ei.jsx)("meta",{property:"og:title",content:er.ogTitle||er.title},"og-title"),(0,ei.jsx)("meta",{property:"og:url",content:er.og.url},"og-url"),(null==er?void 0:er.image)&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("meta",{property:"og:image",content:er.image},"og-image"),er.imageWidth&&er.imageHeight&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("meta",{property:"og:image:width",content:String(er.imageWidth)},"og-image-width"),(0,ei.jsx)("meta",{property:"og:image:height",content:String(er.imageHeight)},"og-image-height")]}),(0,ei.jsx)("meta",{property:"og:image:type",content:function($){let et=$.split("?")[0].split("#")[0].toLowerCase();return et.endsWith(".gif")?"image/gif":et.endsWith(".webp")?"image/webp":et.endsWith(".jpg")||et.endsWith(".jpeg")?"image/jpeg":"image/png"}(er.image)},"og-image-type"),(0,ei.jsx)("meta",{property:"og:image:alt",content:null!==(et=er.imageAlt)&&void 0!==et?et:er.title},"og-image-alt")]}),(0,ei.jsx)("meta",{property:"og:description",content:er.ogDescription||er.description},"og-description"),(0,ei.jsx)("meta",{property:"og:type",content:er.og.type},"og-type"),(null==er?void 0:er.image)&&(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)("meta",{property:"twitter:image",content:er.image},"twitter-image"),(0,ei.jsx)("meta",{name:"twitter:image:alt",content:null!==(en=er.imageAlt)&&void 0!==en?en:er.title},"twitter-image-alt")]}),(0,ei.jsx)("meta",{name:"twitter:title",content:er.ogTitle||er.title},"twitter-title"),(0,ei.jsx)("meta",{name:"twitter:description",content:er.ogDescription||er.description},"twitter-description"),(0,ei.jsx)("meta",{name:"twitter:card",content:er.twitter.card},"twitter-card"),(0,ei.jsx)("meta",{name:"twitter:site",content:er.twitter.site}
1856,"twitter-site"),(0,ei.jsx)("meta",{name:"twitter:creator",content:er.twitter.creator},"twitter-creator"),(0,ei.jsx)("meta",{name:"description",content:er.description},"description"),(0,ei.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"WebSite",name:"Cod\xe9dex",url:"https://www.codedex.io/"})}}),(0,ei.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"EducationalOrganization",name:"Cod\xe9dex",url:"https://www.codedex.io",logo:"https://www.codedex.io/images/favicon.png",description:"Learn to code with interactive courses in Python, HTML, CSS, JavaScript and more",sameAs:["https://twitter.com/codedex_io","https://github.com/codedex-io"],contactPoint:{"@type":"ContactPoint",contactType:"customer support",availableLanguage:["English"]}})}})]}):(0,ei.jsxs)(rJ(),{children:[(0,ei.jsx)("meta",{charSet:"UTF-8"}),(0,ei.jsx)("link",{rel:"icon",type:"image/png",href:"/images/favicon.png",sizes:"96x96"}),(0,ei.jsx)("link",{rel:"icon",type:"image/svg+xml",href:"/images/favicon.svg"}),(0,ei.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/images/apple-touch-icon.png"})]})},atoms_SEOMarkup=function($){let{breadCrumbs:et=null,courseSchema:en=null,faqSchema:er=null}=$;return null===et&&null===en&&null===er?null:(0,ei.jsxs)(rJ(),{children:[et&&(0,ei.jsx)("script",{type:"application/ld+json",id:"rich-seo-breadcrumbs",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:et})}}),en&&(0,ei.jsx)("script",{type:"application/ld+json",id:"rich-seo-course",dangerouslySetInnerHTML:{__html:JSON.stringify(en)}}),er&&(0,ei.jsx)("script",{type:"application/ld+json",id:"rich-seo-faq",dangerouslySetInnerHTML:{__html:JSON.stringify(er)}})]})},fbpixel_PixelScript=function(){return eI.ng?(0,ei.jsx)(el(),{id:"fb-pixel",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '".concat(eI.ng,"');\n fbq('track', 'PageView');\n ")}}):null},rK=en(23992),twitter_TwitterPixelScript=function(){return(0,ei.jsx)(el(),{id:"tw-pixel",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);\n},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',\na=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');\ntwq('config','".concat(rK.T,'\');\nconsole.log("Twitter pixel loaded");\n')}})},_app=function($){let{Component:et,pageProps:en}=$,{store:er}=ed.Y.useWrappedStore(en),es=en.metatags;return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(atoms_MetaTags,{metatags:es}),(0,ei.jsx)(atoms_SEOMarkup,{breadCrumbs:null==es?void 0:es.breadCrumbs,courseSchema:null==es?void 0:es.courseSchema,faqSchema:null==es?void 0:es.faqSchema}),(0,ei.jsx)(el(),{defer:!0,"data-domain":"codedex.io",src:"https://plausible.io/js/plausible.js"}),(0,ei.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),(0,ei.jsx)("link",{rel:"preload",href:"/fonts/Hack-Regular.ttf",as:"font",crossOrigin:""}),(0,ei.jsx)("link",{rel:"preload",href:"/fonts/pixelgrid-squarebolds.woff",as:"font",crossOrigin:""}),(0,ei.jsx)("link",{rel:"preload",href:"/fonts/pixelgrid-squareboldm.woff",as:"font",crossOrigin:""}),(0,ei.jsx)("link",{rel:"preload",href:"/fonts/pixelgrid-squareboldxl.woff",as:"font",crossOrigin:""}),(0,ei.jsx)(fbpixel_PixelScript,{}),(0,ei.jsx)(twitter_TwitterPixelScript,{}),(0,ei.jsx)(eo.zt,{store:er,children:(0,ei.jsx)(eu.H,{appId:"sy5cxa9d",initializeDelay:3e4,autoBoot:!0,children:(0,ei.jsx)(atoms_AuthState,{children:(0,ei.jsx)(rG,{children:(0,ei.jsx)(et,{...en})})})})})]})}},73845:function($,et,en){"use strict";en.d(et,{T:function(){return eS},Y:function(){return eT}});var er=en(77236),ei=en(28858),eo=en(609),es=en(88090),el=en(28010),eu=en(85673),ed=en(37009),eh=en(38467),ep=en(99691),em=en(92614),ef=en(9598
18566),eg=en(29796),ey=en(99979),ev=en(13903),ex=en(76190),e_=en(40321),ew=en(50528),ek=en(81776),eC=en(52069),eE=en(33723),eI=en(9473);let eS=eI.I0,eT=(0,ei.KV)(function(){return(0,er.xC)({reducer:{user:eo.ZP,language:es.ZP,projects:el.ZP,global:eu.ZP,userProgress:ed.ZP,educator:eh.ZP,blogs:ep.ZP,userCodeChallenges:em.ZP,codeChallenges:ef.ZP,notification:eg.ZP,ai:ey.ZP,profile:ev.ZP,characterCustomizer:ex.ZP,dailyChallenge:e_.ZP,lumi:ew.ZP,community:ek.ZP,editor:eC.ZP,graph:eE.ZP},devTools:!1})})},64988:function($,et,en){"use strict";en.d(et,{M:function(){return eh}});var er=en(39828),ei=en(91296),eo=en.n(ei),es=en(92369),el=en(68551);let eu=el.yP,ed=el.t;async function setCheckoutReminderTrigger($){let{uid:et,email:en}=$,{firestore:ei}=(0,es.UM)();if(!et)return;let eo=(0,er.JU)(ei,"checkoutSessions",et);try{await (0,er.pl)(eo,{uid:et,hasCheckoutOut:!0,email:en,timestamp:(0,er.Bt)()},{merge:!0})}catch($){console.error($)}}let eh=eo()(async $=>{var et;let{annual:en=!1}=$,{firestore:ei,auth:eo}=(0,es.UM)(),el=null;if(null==eo||!eo.currentUser)return{status:"not-signed-in"};
1856if(el=null===(et=eo.currentUser)||void 0===et?void 0:et.uid){try{await setCheckoutReminderTrigger({uid:el,email:eo.currentUser.email})}catch($){}try{let $=(0,er.hJ)(ei,"users",el,"checkout_sessions"),et=eu;en&&(et=ed),await (0,er.ET)($,{allow_promotion_codes:!0,price:et,success_url:window.location.origin+"/payment_success?session_id={CHECKOUT_SESSION_ID}",cancel_url:window.location.origin+"/payment_failure"})}catch($){console.error("error while creating the checkout session!"),console.error($)}}return{status:"fail"}},3e3,{leading:!0,maxWait:5e3})},42696:function($,et,en){"use strict";en.d(et,{F:function(){return isUserClubSubscriber}});var er=en(92369);async function isUserClubSubscriber(){let $=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{auth:et}=(0,er.UM)();if(!et.currentUser)return!1;{var en,ei,eo;await (null===(en=et.currentUser)||void 0===en?void 0:en.getIdToken($));let er=await (null===(ei=et.currentUser)||void 0===ei?void 0:ei.getIdTokenResult());return(null==er?void 0:null===(eo=er.claims)||void 0===eo?void 0:eo.stripeRole)==="club"}}},82133:function($,et,en){"use strict";en.d(et,{Cs:function(){return ep},ib:function(){return eh},nz:function(){return em}});var er=en(82729),ei=en(19521);function _templateObject(){let $=(0,er._)(["\n body {\n background-color: ",";\n transition: all 0.25s ease;\n }\n\n /* html {\n overflow: hidden;\n height: 100%;\n } */\n"]);return _templateObject=function(){return $},$}let eo={grey:{50:"#F8FAFC",100:"#F1F5F9",200:"#E2E8F0",300:"#CBD5E1",400:"#94A3B8",500:"#64748B",600:"#475569",700:"#334155",800:"#1E293B",900:"#0F172A",950:"#020617"},blue:{50:"#EFF8FF",100:"#DEF1FF",200:"#B6E4FF",300:"#75D1FF",400:"#2CBAFF",500:"#14ADFF",600:"#0080D4",700:"#0065AB",800:"#00568D",900:"#064874",950:"#042D4D"},yellow:{50:"#FEFCE8",100:"#FEF9C3",200:"#FEF08A",300:"#FDE047",400:"#FACC15",500:"#EAB308",600:"#CA8A04",700:"#A16207",800:"#854D0E",900:"#713F12",950:"#422006"},green:{50:"#F7FEE7",100:"#ECFCCB",200:"#D9F99D",300:"#BEF264",400:"#A3E635",500:"#84CC16",600:"#65A30D",700:"#4D7C0F",800:"#3F6212",900:"#365314",950:"#1A2E05"},red:{50:"#FFF1F2",100:"#FFE4E6",200:"#FECDD3",300:"#FDA4AF",400:"#FB7185",500:"#F43F5E",600:"#E11D48",700:"#BE123C",800:"#9F1239",900:"#881337",950:"#4C0519"},purple:{50:"#F5F3FF",100:"#EDE9FE",200:"#DDD6FE",300:"#C4B5FD",400:"#A78BFA",500:"#8B5CF6",600:"#7C3AED",700:"#6D28D9",800:"#5B21B6",900:"#4C1D95",950:"#2E1065"},pink:{50:"#FDF2F8",100:"#FCE7F3",200:"#FBCFE8",300:"#F9A8D4",400:"#F472B6",500:"#EC4899",600:"#DB2777",700:"#BE185D",800:"#9D174D",900:"#831843",950:"#500724"}},es={grey:{50:"F8FAFC",100:"F1F5F9",200:"E2E8F0",300:"CBD5E1",400:"94A3B8",500:"64748B",600:"475569",700:"334155",800:"1E293B",900:"0F172A",950:"020617"},blue:{50:"EFF8FF",100:"DEF1FF",200:"B6E4FF",300:"75D1FF",400:"2CBAFF",500:"14ADFF",600:"0080D4",700:"0065AB",800:"00568D",900:"064874",950:"042D4D"},yellow:{50:"FEFCE8",100:"FEF9C3",200:"FEF08A",300:"FDE047",400:"FACC15",500:"EAB308",600:"CA8A04",700:"A16207",800:"854D0E",900:"713F12",950:"422006"},green:{50:"F7FEE7",100:"ECFCCB",200:"D9F99D",300:"BEF264",400:"A3E635",500:"84CC16",600:"65A30D",700:"4D7C0F",800:"3F6212",900:"365314",950:"1A2E05"},red:{50:"FFF1F2",100:"FFE4E6",200:"FECDD3",300:"FDA4AF",400:"FB7185",500:"F43F5E",600:"E11D48",700:"BE123C",800:"9F1239",900:"881337",950:"4C0519"},purple:{50:"F5F3FF",100:"EDE9FE",200:"DDD6FE",300:"C4B5FD",400:"A78BFA",500:"8B5CF6",600:"7C3AED",700:"6D28D9",800:"5B21B6",900:"4C1D95",950:"2E1065"},pink:{50:"FDF2F8",100:"FCE7F3",200:"FBCFE8",300:"F9A8D4",400:"F472B6",500:"EC4899",600:"DB2777",700:"BE185D",800:"9D174D",900:"831843",950:"500724"}},el={text:{primary:"#020617",secondary:"#475569",tertiary:"#64748B",accent:{blue:"#0065AB",red:"#9F1239",green:"#3F6212",yellow:"#854D0E"}},border:{grey:{light:"#E2E8F0",medium:"#CBD5E1",dark:"#94A3B8"}},background:{grey:{primary:"#FFFFFF",secondary:"#F8FAFC",tertiary:"#F1F5F9",overlay:"rgba(2, 6, 23, 0.6)",boxshadow:"rgba(2, 6, 23, 0.20)",hovershadow:"rgba(2, 6, 23, 0.15)"},blue:{primary:"#EFF8FF",secondary:"#DEF1FF",tertiary:"#B6E4FF"},yellow:{primary:"#FEFCE8",secondary:"#FEF9C3",tertiary:"#FEF08A"},red:{primary:"#FFF1F2",secondary:"#FFE4E6",tertiary:"#FECDD3"},green:{primary:"#F7FEE7",secondary:"#ECFCCB",tertiary:"#D9F99D"},purple:{secondary:"#EDE9FE"}}}
1856,eu={text:{primary:"#F8FAFC",secondary:"#CBD5E1",tertiary:"#94A3B8",accent:{blue:"#2CBAFF",red:"#FECDD3",green:"#D9F99D",yellow:"#FEF08A"}},border:{grey:{light:"#334155",medium:"#475569",dark:"#64748B"}},background:{grey:{primary:"#020617",secondary:"#0F172A",tertiary:"#1E293B",overlay:"rgba(51, 65, 85, 0.6)",boxshadow:"rgba(255, 255, 255, 0.2)",hovershadow:"rgba(255, 255, 255, 0.15)"},blue:{primary:"#042D4D",secondary:"#064874",tertiary:"#00568D"},yellow:{primary:"#422006",secondary:"#713F12",tertiary:"#854D0E"},red:{primary:"#4C0519",secondary:"#881337",tertiary:"#9F1239"},green:{primary:"#1A2E05",secondary:"#365314",tertiary:"#3F6212"},purple:{secondary:"#4C1D95"}}},ed={xs:"@media only screen and (min-width: 320px)",sm:"@media only screen and (min-width: 768px)",md:"@media only screen and (min-width: 1024px)",lg:"@media only screen and (min-width: 1200px)",xl:"@media only screen and (min-width: 1400px)"},eh={mode:"light",colors:{body:"#FDFDFD",primary:"#FFFFFF",secondary:"#ffffff",text1:"black",text2:"black",text3:"black",text4:"black",text5:"black",profileBorder:"#DADADA",profileBackground:"#f7f7f7",chapterBackground:"white",borderColor:"black",borderColor2:"black",borderColor3:"black",navBorder:"#d2d7da",nav:"",navDropDown:"#FDFDFD",hyperLink:"#007BFF",checkBox:"black",tabFileNameBorder:"rgba(0,0,0,0.1)",palette:eo,paletteWithoutHash:es,semantic:el,background:el.background,border:el.border,backgroundHighlight:"#F1F5F9",highlightBlue:"#0065AB",textTertiary:"#64748B",footerBackground:"#F8FAFC",text:el.text},fontFamily:{},fontSize:{xs:12,s:14,m:16,l:18,xl:20,"2xl":24,"3xl":32,"4xl":48,"5xl":64},fontWeight:{normal:400,semibold:600,bold:700},lineHeight:{},spacing:{0:"0",4:"0.25rem",8:"0.5rem",12:"0.75rem",16:"1rem",20:"1.25rem",24:"1.5rem",32:"2rem",40:"2.5rem",48:"3rem",64:"4rem",96:"6rem"},breakpoints:ed},ep={mode:"dark",colors:{body:"#0F1524",primary:"#1F222A",secondary:"#1B2233",text1:"white",text2:"#D3D3D3",text3:"white",text4:"hsla(0, 0%, 100%, 0.87)",text5:"rgba(255, 255, 255, 0.87)",profileBorder:"#25314B",profileBackground:"#1B2238",chapterBackground:"#0F1524",borderColor:"#E3E6E7",borderColor2:"#244c73",borderColor3:"#244C73",borderTextColor:"#f8d57a",navBorder:"#818589",nav:"#0F1524",navDropDown:"#0F1524",hyperLink:"#52a5ff",checkBox:"#fafafa",tabFileNameBorder:"white",palette:eo,paletteWithoutHash:es,semantic:eu,background:eu.background,border:eu.border,backgroundHighlight:"#1E293B",highlightBlue:"#2cbaff",textTertiary:"#94A3B8",footerBackground:"#0F172A",text:eu.text},fontFamily:{},fontSize:{xs:12,s:14,m:16,l:18,xl:20,"2xl":24,"3xl":32,"4xl":48,"5xl":64},fontWeight:{normal:400,semibold:600,bold:700},lineHeight:{},spacing:{0:"0",4:"0.25rem",8:"0.5rem",12:"0.75rem",16:"1rem",20:"1.25rem",24:"1.5rem",32:"2rem",40:"2.5rem",48:"3rem",64:"4rem",96:"6rem"},breakpoints:ed},em=(0,ei.createGlobalStyle)(_templateObject(),$=>$.theme.colors.background.grey.primary)},20927:function(){},25538:function(){},97480:function(){},14531:function(){},69831:function(){},56735:function(){},92261:function(){},70415:function(){},16713:function(){},45795:function(){},9008:function($,et,en){$.exports=en(79201)},89755:function($,et,en){$.exports=en(40768)},41664:function($,et,en){$.exports=en(65170)},11163:function($,et,en){$.exports=en(59974)},4298:function($,et,en){$.exports=en(85354)},62286:function($,et,en){"use strict";var er=this&&this.__assign||function(){return(er=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)};Object.defineProperty(et,"__esModule",{value:!0}),et.destroyCookie=et.setCookie=et.parseCookies=void 0;var ei=en(10026),eo=en(69328),es=en(51022);function parseCookies($,et){var en,er;return(null===(er=null===(en=null==$?void 0:$.req)||void 0===en?void 0:en.headers)||void 0===er?void 0:er.cookie)?ei.parse($.req.headers.cookie,et):es.isBrowser()?ei.parse(document.cookie,et):{}}function setCookie($,et,en,el){var eu,ed;if(void 0===el&&(el={}),(null===(eu=null==$?void 0:$.res)||void 0===eu?void 0:eu.getHeader)&&$.res.setHeader){if(null===(ed=null==$?void 0:$.res)||void 0===ed?void 0:ed.finished)return console.warn('Not setting "'+et+'" cookie. Response has finished.'),console.warn("You should set cookie before res.send()"),{};var eh=$.res.getHeader("Set-Cookie")||[];"string"==typeof eh&&(eh=[eh]),"number"==typeof eh&&(eh=[]);var ep=eo.parse(eh,{decodeValues:!1}),em=es.createCookie(et,en,el),ef=[];ep.forEach(function($){if(!es.areCookiesEqual($,em)){var et=ei.serialize($.name,$.value,er({encode:function($){return $}},$));ef.push(et)}}),ef.push(ei.serialize(et,en,el)),$.res.setHeader("Set-Cookie",ef)}if(es.isBrowser()){if(el&&el.httpOnly)throw Error("Can not set a httpOnly cookie in the browser.");document.cookie=ei.serialize(et,en,el)}return{}}function destroyCookie($,et,en){return setCookie($,et,"",er(er({},en||{}),{maxAge:-1}))}et.parseCookies=parseCookies,et.setCookie=setCookie,et.destroyCookie=destroyCookie,et.default={set:setCookie,get:parseCookies,destroy:destroyCookie}},51022:function($,et){"use strict";var en=this&&this.__assign||function(){return(en=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)};function hasSameProperties($,et){var en=Object.getOwnPropertyNames($),er=Object.getOwnPropertyNames(et);if(en.length!==er.length)return!1;for(var ei=0;ei<en.length;ei++){var eo=en[ei];if($[eo]!==et[eo])return!1}return!0}
1856Object.defineProperty(et,"__esModule",{value:!0}),et.areCookiesEqual=et.hasSameProperties=et.createCookie=et.isBrowser=void 0,et.isBrowser=function(){return"undefined"!=typeof window},et.createCookie=function($,et,er){var ei=er.sameSite;!0===ei&&(ei="strict"),(void 0===ei||!1===ei)&&(ei="lax");var eo=en(en({},er),{sameSite:ei});return delete eo.encode,en({name:$,value:et},eo)},et.hasSameProperties=hasSameProperties,et.areCookiesEqual=function($,et){var er=$.sameSite===et.sameSite;return"string"==typeof $.sameSite&&"string"==typeof et.sameSite&&(er=$.sameSite.toLowerCase()===et.sameSite.toLowerCase()),hasSameProperties(en(en({},$),{sameSite:void 0}),en(en({},et),{sameSite:void 0}))&&er}},10026:function($,et){"use strict";/*! 1857 * cookie 1858 * Copyright(c) 2012-2014 Roman Shtylman 1859 * Copyright(c) 2015 Douglas Christopher Wilson 1860 * MIT Licensed 1861 */et.parse=function($,et){if("string"!=typeof $)throw TypeError("argument str must be a string");for(var er={},ei=$.split(";"),eo=(et||{}).decode||en,es=0;es<ei.length;es++){var el=ei[es],eu=el.indexOf("=");if(!(eu<0)){var ed=el.substring(0,eu).trim();if(void 0==er[ed]){var eh=el.substring(eu+1,el.length).trim();'"'===eh[0]&&(eh=eh.slice(1,-1)),er[ed]=function($,et){try{return et($)}catch(et){return $}}(eh,eo)}}}return er},et.serialize=function($,et,en){var eo=en||{},es=eo.encode||er;if("function"!=typeof es)throw TypeError("option encode is invalid");if(!ei.test($))throw TypeError("argument name is invalid");var el=es(et);if(el&&!ei.test(el))throw TypeError("argument val is invalid");var eu=$+"="+el;if(null!=eo.maxAge){var ed=eo.maxAge-0;if(isNaN(ed)||!isFinite(ed))throw TypeError("option maxAge is invalid");eu+="; Max-Age="+Math.floor(ed)}if(eo.domain){if(!ei.test(eo.domain))throw TypeError("option domain is invalid");eu+="; Domain="+eo.domain}if(eo.path){if(!ei.test(eo.path))throw TypeError("option path is invalid");eu+="; Path="+eo.path}if(eo.expires){if("function"!=typeof eo.expires.toUTCString)throw TypeError("option expires is invali
1861d");eu+="; Expires="+eo.expires.toUTCString()}if(eo.httpOnly&&(eu+="; HttpOnly"),eo.secure&&(eu+="; Secure"),eo.sameSite)switch("string"==typeof eo.sameSite?eo.sameSite.toLowerCase():eo.sameSite){case!0:case"strict":eu+="; SameSite=Strict";break;case"lax":eu+="; SameSite=Lax";break;case"none":eu+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return eu};var en=decodeURIComponent,er=encodeURIComponent,ei=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},34155:function($){var et,en,er,ei=$.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout($){if(et===setTimeout)return setTimeout($,0);if((et===defaultSetTimout||!et)&&setTimeout)return et=setTimeout,setTimeout($,0);try{return et($,0)}catch(en){try{return et.call(null,$,0)}catch(en){return et.call(this,$,0)}}}!function(){try{et="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch($){et=defaultSetTimout}try{en="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch($){en=defaultClearTimeout}}();var eo=[],es=!1,el=-1;function cleanUpNextTick(){es&&er&&(es=!1,er.length?eo=er.concat(eo):el=-1,eo.length&&drainQueue())}function drainQueue(){if(!es){var $=runTimeout(cleanUpNextTick);es=!0;for(var et=eo.length;et;){for(er=eo,eo=[];++el<et;)er&&er[el].run();el=-1,et=eo.length}er=null,es=!1,function($){if(en===clearTimeout)return clearTimeout($);if((en===defaultClearTimeout||!en)&&clearTimeout)return en=clearTimeout,clearTimeout($);try{en($)}catch(et){try{return en.call(null,$)}catch(et){return en.call(this,$)}}}($)}}function Item($,et){this.fun=$,this.array=et}function noop(){}ei.nextTick=function($){var et=Array(arguments.length-1);if(arguments.length>1)for(var en=1;en<arguments.length;en++)et[en-1]=arguments[en];eo.push(new Item($,et)),1!==eo.length||es||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},ei.title="browser",ei.browser=!0,ei.env={},ei.argv=[],ei.version="",ei.versions={},ei.on=noop,ei.addListener=noop,ei.once=noop,ei.off=noop,ei.removeListener=noop,ei.removeAllListeners=noop,ei.emit=noop,ei.prependListener=noop,ei.prependOnceListener=noop,ei.listeners=function($){return[]},ei.binding=function($){throw Error("process.binding is not supported")},ei.cwd=function(){return"/"},ei.chdir=function($){throw Error("process.chdir is not supported")},ei.umask=function(){return 0}},49155:function($,et,en){"use strict";var er,ei=this&&this.__extends||(er=function($,et){return(er=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function($,et){$.__proto__=et}||function($,et){for(var en in et)Object.prototype.hasOwnProperty.call(et,en)&&($[en]=et[en])})($,et)},function($,et){if("function"!=typeof et&&null!==et)throw TypeError("Class extends value "+String(et)+" is not a constructor or null");function __(){this.constructor=$}er($,et),$.prototype=null===et?Object.create(et):(__.prototype=et.prototype,new __)}),eo=this&&this.__rest||function($,et){var en={};for(var er in $)Object.prototype.hasOwnProperty.call($,er)&&0>et.indexOf(er)&&(en[er]=$[er]);if(null!=$&&"function"==typeof Object.getOwnPropertySymbols)for(var ei=0,er=Object.getOwnPropertySymbols($);ei<er.length;ei++)0>et.indexOf(er[ei])&&Object.prototype.propertyIsEnumerable.call($,er[ei])&&(en[er[ei]]=$[er[ei]]);return en},es=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(et,"__esModule",{value:!0});var el=es(en(39883)),eu=es(en(67294)),ed=function($){function ReactCanvasConfetti(et){var en=$.call(this,et)||this;return en.refCanvas=eu.default.createRef(),en.confetti=null,en}return ei(ReactCanvasConfetti,$),ReactCanvasConfetti.prototype.componentDidMount=function(){if(this.refCanvas.current){var $=this.props,et=$.resize,en=$.useWorker;this.confetti=el.default.create(this.refCanvas.current,{resize:void 0===et||et,useWorker:void 0===en||en}),this.setRefConfetti()}},ReactCanvasConfetti.prototype.componentDidUpdate=function($){var et=this.props,en=et.fire,er=et.reset,ei=en!==$.fire;en&&ei&&this.fireConfetti();var eo=er!==$.reset;er&&eo&&this.resetConfetti()},ReactCanvasConfetti.prototype.componentWillUnmount=function(){this.unsetRefConfetti()},ReactCanvasConfetti.prototype.setRefConfetti=function(){var $=this.props.refConfetti;$&&$(this.confetti)},ReactCanvasConfetti.prototype.unsetRefConfetti=function(){var $=this.props.refConfetti;$&&$(null)},ReactCanvasConfetti.prototype.fireConfetti=function(){if(this.confetti){var $=this.props,et=$.onFire,en=$.onDecay,er=($.onReset,$.className,$.style,$.width,$.height,$.refConfetti,$.fire,$.reset,eo($,["onFire","onDecay","onReset","className","style","width","height","refConfetti","fire","reset"]));et&&et();var ei=this.confetti(er);ei&&ei.then(function(){en&&en()})}},ReactCanvasConfetti.prototype.resetConfetti=function(){if(this.confetti){this.confetti.reset();var $=this.props.onReset;$&&$()}},ReactCanvasConfetti.prototype.render=function(){var $=this.props,et=$.style,en=$.className,er=$.width,ei=$.height;return eu.default.createElement("canvas",{ref:this.refCanvas,style:et,className:en,width:er,height:ei})},ReactCanvasConfetti}(eu.default.Component);et.default=ed},88357:function($,et,en){"use strict";en.d(et,{w_:function(){return GenIcon}});var er=en(67294),ei={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},eo=er.createContext&&er.createContext(ei),__assign=function(){return(__assign=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)},__rest=function($,et){var en={};for(var er in $)Object.prototype.hasOwnProperty.call($,er)&&0>et.indexOf(er)&&(en[er]=$[er]);if(null!=$&&"function"==typeof Object.getOwnPropertySymbols)for(var ei=0,er=Object.getOwnPropertySymbols($);ei<er.length;ei++)0>et.indexOf(er[ei])&&Object.prototype.propertyIsEnumerable.call($,er[ei])&&(en[er[ei]]=$[er[ei]]);return en};function GenIcon($){return function(et){return er.createElement(IconBase,__assign({attr:__assign({},$.attr)},et),function Tree2Element($){return $&&$.map(function($,et){return er.createElement($.tag,__assign({key:et},$.attr),Tree2Element($.child))})}($.child))}}function IconBase($){var elem=function(et){var en,ei=$.attr,eo=$.size,es=$.t
1861itle,el=__rest($,["attr","size","title"]),eu=eo||et.size||"1em";return et.className&&(en=et.className),$.className&&(en=(en?en+" ":"")+$.className),er.createElement("svg",__assign({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},et.attr,ei,el,{className:en,style:__assign(__assign({color:$.color||et.color},et.style),$.style),height:eu,width:eu,xmlns:"http://www.w3.org/2000/svg"}),es&&er.createElement("title",null,es),$.children)};return void 0!==eo?er.createElement(eo.Consumer,null,function($){return elem($)}):elem(ei)}},5434:function($,et,en){"use strict";en.d(et,{Ix0:function(){return MdKeyboardArrowDown},Ssb:function(){return MdOutlineReportProblem},lTq:function(){return MdOutlineClose}});var er=en(88357);function MdKeyboardArrowDown($){return(0,er.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})($)}function MdOutlineReportProblem($){return(0,er.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}}]})($)}function MdOutlineClose($){return(0,er.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}}]})($)}},58533:function($,et,en){"use strict";var er=en(67294),extendStatics=function($,et){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function($,et){$.__proto__=et}||function($,et){for(var en in et)et.hasOwnProperty(en)&&($[en]=et[en])})($,et)},__assign=function(){return(__assign=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)},ei={Pixel:"Pixel",Percent:"Percent"},eo={unit:ei.Percent,value:.8};function parseThreshold($){return"number"==typeof $?{unit:ei.Percent,value:100*$}:"string"==typeof $?$.match(/^(\d*(\.\d+)?)px$/)?{unit:ei.Pixel,value:parseFloat($)}:$.match(/^(\d*(\.\d+)?)%$/)?{unit:ei.Percent,value:parseFloat($)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),eo):(console.warn("scrollThreshold should be string or number"),eo)}var es=function($){function InfiniteScroll(et){var en=$.call(this,et)||this;return en.lastScrollTop=0,en.actionTriggered=!1,en.startY=0,en.currentY=0,en.dragging=!1,en.maxPullDownDistance=0,en.getScrollableTarget=function(){return en.props.scrollableTarget instanceof HTMLElement?en.props.scrollableTarget:"string"==typeof en.props.scrollableTarget?document.getElementById(en.props.scrollableTarget):(null===en.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},en.onStart=function($){!en.lastScrollTop&&(en.dragging=!0,$ instanceof MouseEvent?en.startY=$.pageY:$ instanceof TouchEvent&&(en.startY=$.touches[0].pageY),en.currentY=en.startY,en._infScroll&&(en._infScroll.style.willChange="transform",en._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},en.onMove=function($){en.dragging&&($ instanceof MouseEvent?en.currentY=$.pageY:$ instanceof TouchEvent&&(en.currentY=$.touches[0].pageY),en.currentY<en.startY||(en.currentY-en.startY>=Number(en.props.pullDownToRefreshThreshold)&&en.setState({pullToRefreshThresholdBreached:!0}),en.currentY-en.startY>1.5*en.maxPullDownDistance||!en._infScroll||(en._infScroll.style.overflow="visible",en._infScroll.style.transform="translate3d(0px, "+(en.currentY-en.startY)+"px, 0px)")))},en.onEnd=function(){en.startY=0,en.currentY=0,en.dragging=!1,en.state.pullToRefreshThresholdBreached&&(en.props.refreshFunction&&en.props.refreshFunction(),en.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){en._infScroll&&(en._infScroll.
1861style.overflow="auto",en._infScroll.style.transform="none",en._infScroll.style.willChange="unset")})},en.onScrollListener=function($){"function"==typeof en.props.onScroll&&setTimeout(function(){return en.props.onScroll&&en.props.onScroll($)},0);var et=en.props.height||en._scrollableNode?$.target:document.documentElement.scrollTop?document.documentElement:document.body;en.actionTriggered||((en.props.inverse?en.isElementAtTop(et,en.props.scrollThreshold):en.isElementAtBottom(et,en.props.scrollThreshold))&&en.props.hasMore&&(en.actionTriggered=!0,en.setState({showLoader:!0}),en.props.next&&en.props.next()),en.lastScrollTop=et.scrollTop)},en.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:et.dataLength},en.throttledOnScrollListener=(function($,et,en,er){var ei,eo=!1,es=0;function clearExistingTimeout(){ei&&clearTimeout(ei)}function wrapper(){var el=this,eu=Date.now()-es,ed=arguments;function exec(){es=Date.now(),en.apply(el,ed)}eo||(er&&!ei&&exec(),clearExistingTimeout(),void 0===er&&eu>$?exec():!0!==et&&(ei=setTimeout(er?function(){ei=void 0}:exec,void 0===er?$-eu:$)))}return"boolean"!=typeof et&&(er=en,en=et,et=void 0),wrapper.cancel=function(){clearExistingTimeout(),eo=!0},wrapper})(150,en.onScrollListener).bind(en),en.onStart=en.onStart.bind(en),en.onMove=en.onMove.bind(en),en.onEnd=en.onEnd.bind(en),en}return!function($,et){function __(){this.constructor=$}extendStatics($,et),$.prototype=null===et?Object.create(et):(__.prototype=et.prototype,new __)}(InfiniteScroll,$),InfiniteScroll.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},InfiniteScroll.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},InfiniteScroll.prototype.componentDidUpdate=function($){this.props.dataLength!==$.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},InfiniteScroll.getDerivedStateFromProps=function($,et){return $.dataLength!==et.prevDataLength?__assign(__assign({},et),{prevDataLength:$.dataLength}):null},InfiniteScroll.prototype.isElementAtTop=function($,et){void 0===et&&(et=.8);var en=$===document.body||$===document.documentElement?window.screen.availHeight:$.clientHeight,er=parseThreshold(et);return er.unit===ei.Pixel?$.scrollTop<=er.value+en-$.scrollHeight+1:$.scrollTop<=er.value/100+en-$.scrollHeight+1},InfiniteScroll.prototype.isElementAtBottom=function($,et){void 0===et&&(et=.8);var en=$===document.body||$===document.documentElement?window.screen.availHeight:$.clientHeight,er=parseThreshold(et);return er.unit===ei.Pixel?$.scrollTop+en>=$.scrollHeight-er.value:$.scrollTop+en>=er.value/100*$.scrollHeight},InfiniteScroll.prototype.render=function(){var $=this,et=__assign({he
1861ight:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),en=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),ei=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return er.createElement("div",{style:ei,className:"infinite-scroll-component__outerdiv"},er.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(et){return $._infScroll=et},style:et},this.props.pullDownToRefresh&&er.createElement("div",{style:{position:"relative"},ref:function(et){return $._pullDown=et}},er.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!en&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},InfiniteScroll}(er.Component);et.Z=es},69921:function($,et){"use strict";/** @license React v16.13.1 1862 * react-is.production.min.js 1863 * 1864 * Copyright (c) Facebook, Inc. and its affiliates. 1865 * 1866 * This source code is licensed under the MIT license found in the 1867 * LICENSE file in the root directory of this source tree. 1868 */var en="function"==typeof Symbol&&Symbol.for,er=en?Symbol.for("react.element"):60103,ei=en?Symbol.for("react.portal"):60106,eo=en?Symbol.for("react.fragment"):60107,es=en?Symbol.for("react.strict_mode"):60108,el=en?Symbol.for("react.profiler"):60114,eu=en?Symbol.for("react.provider"):60109,ed=en?Symbol.for("react.context"):60110,eh=en?Symbol.for("react.async_mode"):60111,ep=en?Symbol.for("react.concurrent_mode"):60111,em=en?Symbol.for("react.forward_ref"):60112,ef=en?Symbol.for("react.suspense"):60113,eg=en?Symbol.for("react.suspense_list"):60120,ey=en?Symbol.for("react.memo"):60115,ev=en?Symbol.for("react.lazy"):60116,ex=en?Symbol.for("react.block"):60121,e_=en?Symbol.for("react.fundamental"):60117,ew=en?Symbol.for("react.responder"):60118,ek=en?Symbol.for("react.scope"):60119;function z($){if("object"==typeof $&&null!==$){var et=$.$$typeof;switch(et){case er:switch($=$.type){case eh:case ep:case eo:case el:case es:case ef:return $;default:switch($=$&&$.$$typeof){case ed:case em:case ev:case ey:case eu:return $;default:return et}}case ei:return et}}}function A($){return z($)===ep}et.AsyncMode=eh,et.ConcurrentMode=ep,et.ContextConsumer=ed,et.ContextProvider=eu,et.Element=er,et.ForwardRef=em,et.Fragment=eo,et.Lazy=ev,et.Memo=ey,et.Portal=ei,et.Profiler=el,et.StrictMode=es,et.Suspense=ef,et.isAsyncMode=function($){return A($)||z($)===eh},et.isConcurrentMode=A,et.isContextConsumer=function($){return z($)===ed},et.isContextProvider=function($){return z($)===eu},et.isElement=function($){return"object"==typeof $&&null!==$&&$.$$typeof===er},et.isForwardRef=function($){return z($)===em},et.isFragment=function($){return z($)===eo},et.isLazy=function($){return z($)===ev},et.isMemo=function($){return z($)===ey},et.isPortal=function($){return z($)===ei},et.isProfiler=function($){return z($)===el},et.isStrictMode=function($){return z($)===es},et.isSuspense=function($){return z($)===ef},et.isValidElementType=function($){return"string"==typeof $||"function"==typeof $||$===eo||$===ep||$===el||$===es||$===ef||$===eg||"object"==typeof $&&null!==$&&($.$$typeof===ev||$.$$typeof===ey||$.$$typeof===eu||$.$$typeof===ed||$.$$typeof===em||$.$$typeof===e_||$.$$typeof===ew||$.$$typeof===ek||$.$$typeof===ex)},et.typeOf=z},59864:function($,et,en){"use strict";$.exports=en(69921)},77521:function($,et,en){"use strict";en.d(et,{Z:function(){return o}});var er=en(67294);"function"==typeof SuppressedError&&SuppressedError;let n=($,et,en,er)=>{$.style.transition=`${et} ${en}ms ${er}`},s=($,et,en)=>Math.min(Math.max($,et),en);let r=class r{constructor($,et){this.glareAngle=0,this.glareOpacity=0,this.calculateGlareSize=$=>{let{width:et,height:en}=$,er=Math.sqrt(Math.pow(et,2)+Math.pow(en,2));return{width:er,height:er}},this.setSize=$=>{let et=this.calculateGlareSize($);this.glareEl.style.width=`${et.width}px`,this.glareEl.style.height=`${et.height}px`},this.update=($,et,en,er)=>
1868{this.updateAngle($,et.glareReverse),this.updateOpacity($,et,en,er)},this.updateAngle=($,et)=>{let{xPercentage:en,yPercentage:er}=$,ei=180/Math.PI,eo=en?Math.atan2(er,-en)*ei:0;this.glareAngle=eo-(et?180:0)},this.updateOpacity=($,et,en,er)=>{let{xPercentage:ei,yPercentage:eo}=$,{glarePosition:es,glareReverse:el,glareMaxOpacity:eu}=et,ed=en?-1:1,eh=er?-1:1,ep=el?-1:1,em=0;switch(es){case"top":em=-ei*ed*ep;break;case"right":em=eo*eh*ep;break;case"bottom":case void 0:em=ei*ed*ep;break;case"left":em=-eo*eh*ep;break;case"all":em=Math.hypot(ei,eo)}let ef=s(em,0,100);this.glareOpacity=ef*eu/100},this.render=$=>{let{glareColor:et}=$;this.glareEl.style.transform=`rotate(${this.glareAngle}deg) translate(-50%, -50%)`,this.glareEl.style.opacity=this.glareOpacity.toString(),this.glareEl.style.background=`linear-gradient(0deg, rgba(255,255,255,0) 0%, ${et} 100%)`},this.glareWrapperEl=document.createElement("div"),this.glareEl=document.createElement("div"),this.glareWrapperEl.appendChild(this.glareEl),this.glareWrapperEl.className="glare-wrapper",this.glareEl.className="glare";let en=this.calculateGlareSize($),er={position:"absolute",top:"50%",left:"50%",transformOrigin:"0% 0%",pointerEvents:"none",width:`${en.width}px`,height:`${en.height}px`};Object.assign(this.glareWrapperEl.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden",borderRadius:et,WebkitMaskImage:"-webkit-radial-gradient(white, black)",pointerEvents:"none"}),Object.assign(this.glareEl.style,er)}};let l=class l{constructor(){this.glareAngle=0,this.glareOpacity=0,this.tiltAngleX=0,this.tiltAngleY=0,this.tiltAngleXPercentage=0,this.tiltAngleYPercentage=0,this.update=($,et)=>{this.updateTilt($,et),this.updateTiltManualInput($,et),this.updateTiltReverse(et),this.updateTiltLimits(et)},this.updateTilt=($,et)=>{let{xPercentage:en,yPercentage:er}=$,{tiltMaxAngleX:ei,tiltMaxAngleY:eo}=et;this.tiltAngleX=en*ei/100,this.tiltAngleY=-(er*eo/100*1)},this.updateTiltManualInput=($,et)=>{let{tiltAngleXManual:en,tiltAngleYManual:er,tiltMaxAngleX:ei,tiltMaxAngleY:eo}=et;(null!==en||null!==er)&&(this.tiltAngleX=null!==en?en:0,this.tiltAngleY=null!==er?er:0,$.xPercentage=100*this.tiltAngleX/ei,$.yPercentage=100*this.tiltAngleY/eo)},this.updateTiltReverse=$=>{let et=$.tiltReverse?-1:1;this.tiltAngleX=et*this.tiltAngleX,this.tiltAngleY=et*this.tiltAngleY},this.updateTiltLimits=$=>{let{tiltAxis:et}=$;this.tiltAngleX=s(this.tiltAngleX,-90,90),this.tiltAngleY=s(this.tiltAngleY,-90,90),et&&(this.tiltAngleX="x"===et?this.tiltAngleX:0,this.tiltAngleY="y"===et?this.tiltAngleY:0)},this.updateTiltAnglesPercentage=$=>{let{tiltMaxAngleX:et,tiltMaxAngleY:en}=$;this.tiltAngleXPercentage=this.tiltAngleX/et*100,this.tiltAngleYPercentage=this.tiltAngleY/en*100},this.render=$=>{$.style.transform+=`rotateX(${this.tiltAngleX}deg) rotateY(${this.tiltAngleY}deg) `}}};let ei=Object.assign(Object.assign({scale:1,perspective:1e3,flipVertically:!1,flipHorizontally:!1,reset:!0,transitionEasing:"cubic-bezier(.03,.98,.52,.99)",transitionSpeed:400,trackOnWindow:!1,gyroscope:!1},{tiltEnable:!0,tiltReverse:!1,tiltAngleXInitial:0,tiltAngleYInitial:0,tiltMaxAngleX:20,tiltMaxAngleY:20,tiltAxis:void 0,tiltAngleXManual:null,tiltAngleYManual:null}),{glareEnable:!1,glareMaxOpacity:.7,glareColor:"#ffffff",glarePosition:"bottom",glareReverse:!1,glareBorderRadius:"0"});let o=class o extends er.PureComponent{constructor(){super(...arguments),this.wrapperEl={node:null,size:{width:0,height:0,left:0,top:0},clientPosition:{x:null,y:null,xPercentage:0,yPercentage:0},updateAnimationId:null,scale:1},this.tilt=null,this.glare=null,this.addDeviceOrientationEventListener=()=>{var $,et,en,er;return $=this,et=void 0,en=void 0,er=function*(){if(!window.DeviceOrientationEvent)return;let $=DeviceOrientationEvent.requestPermission;"function"==typeof $?"granted"===(yield $())&&window.addEventListener("deviceorientation",this.onMove):window.addEventListener("deviceorientation",this.onMove)},new(en||(en=Promise))(function(ei,eo){function l($){try{o(er.next($))}catch($){eo($)}}function a($){try{o(er.throw($))}catch($){eo($)}}function o($){var et;$.done?ei($.value):((et=$.value)instanceof en?et:new en(function($){$(et)})).then(l,a)}o((er=er.apply($,et||[])).next())})},this.setSize=()=>{this.setWrapperElSize(),this.glare&&this.glare.setSize(this.wrapperEl.size)},this.mainLoop=$=>{null!==this.wrapperEl.updateAnimationId&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.processInput($),this.update($.type),this.wrapperEl.updateAnimationId=requestAnimationFrame(this.renderFrame)},this.onEnter=$=>{let{onEnter:et}=this.props;this.setSize(),this.wrapperEl.node.style.willChange="transform",this.setTransitions(),et&&et($.type)},this.onMove=$=>{this.mainLoop($),this.emitOnMove($)},this.onLeave=$=>{let{onLeave:et}=this.props;if(this.setTransitions(),et&&et($.type),this.props.reset){let $=new CustomEvent("autoreset");this.onMove($)}},this.processInput=$=>{let{scale:et}=this.props;switch($.type){case"mousemove":this.wrapperEl.clientPosition.x=$.pageX,this.wrapperEl.clientPosition.y=$.pageY,this.wrapperEl.scale=et;break;case"touchmove":this.wrapperEl.clientPosition.x=$.touches[0].pageX,this.wrapperEl.clientPosition.y=$.touches[0].pageY,this.wrapperEl.scale=et;break;case"deviceorientation":this.processInputDeviceOrientation($),this.wrapperEl.scale=et;break;case"autoreset":let{tiltAngleXInitial:en,tiltAngleYInitial:er,tiltMaxAngleX:ei,tiltMaxAngleY:eo}=this.props;this.wrapperEl.clientPosition.xPercentage=s(en/ei*100,-100,100),this.wrapperEl.clientPosition.yPercentage=s(er/eo*100,-100,100),this.wrapperEl.scale=1}},this.processInputDeviceOrientation=$=>{if(!$.gamma||!$.beta||!this.props.gyroscope)return;let{tiltMaxAngleX:et,tiltMaxAngleY:en}=this.props,er=$.gamma;this.wrapperEl.clientPosition.xPercentage=$.beta/et*100,this.wrapperEl.clientPosition.yPercentage=er/en*100,this.wrapperEl.clientPosition.xPercentage=s(this.wrapperEl.clientPosition.xPercentage,-100,100),this.wrapperEl.clientPosition.yPercentage=s(this.wrapperEl.clientPosition.yPercentage,-100,100)},this.update=$=>{let{tiltEnable:et,flipVertically:en,flipHorizontally:er}=this.props;"autoreset"!==$&&"deviceorientation"!==$&&"propChange"!==$&&this.updateClientInput(),et&&this.tilt.update(this.wrapperEl.clientPosition,this.props),this.updateFlip(),this.tilt.updateTiltAnglesPercentage(this.props),this.glare&&this.glare.update(this.wrapperEl.clientPosition,this.props,en,er)},this.updateClientInput=()=>{let $,et;let{trackOnWindow:en}=this.props;if(en){let{x:en,y:er}=this.wrapperEl.clientPosition;$=er/window.innerHeight*200-100,et=en/window.innerWidth*200-100}
1868else{let{size:{width:en,height:er,left:ei,top:eo},clientPosition:{x:es,y:el}}=this.wrapperEl;$=(el-eo)/er*200-100,et=(es-ei)/en*200-100}this.wrapperEl.clientPosition.xPercentage=s($,-100,100),this.wrapperEl.clientPosition.yPercentage=s(et,-100,100)},this.updateFlip=()=>{let{flipVertically:$,flipHorizontally:et}=this.props;$&&(this.tilt.tiltAngleX+=180,this.tilt.tiltAngleY*=-1),et&&(this.tilt.tiltAngleY+=180)},this.renderFrame=()=>{this.resetWrapperElTransform(),this.renderPerspective(),this.tilt.render(this.wrapperEl.node),this.renderScale(),this.glare&&this.glare.render(this.props)}}componentDidMount(){if(this.tilt=new l,this.initGlare(),this.addEventListeners(),"undefined"==typeof CustomEvent)return;let $=new CustomEvent("autoreset");this.mainLoop($);let et=new CustomEvent("initial");this.emitOnMove(et)}componentWillUnmount(){null!==this.wrapperEl.updateAnimationId&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.removeEventListeners()}componentDidUpdate(){let $=new CustomEvent("propChange");this.mainLoop($),this.emitOnMove($)}addEventListeners(){let{trackOnWindow:$,gyroscope:et}=this.props;window.addEventListener("resize",this.setSize),$&&(window.addEventListener("mouseenter",this.onEnter),window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseout",this.onLeave),window.addEventListener("touchstart",this.onEnter),window.addEventListener("touchmove",this.onMove),window.addEventListener("touchend",this.onLeave)),et&&this.addDeviceOrientationEventListener()}removeEventListeners(){let{trackOnWindow:$,gyroscope:et}=this.props;window.removeEventListener("resize",this.setSize),$&&(window.removeEventListener("mouseenter",this.onEnter),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseout",this.onLeave),window.removeEventListener("touchstart",this.onEnter),window.removeEventListener("touchmove",this.onMove),window.removeEventListener("touchend",this.onLeave)),et&&window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this.onMove)}setWrapperElSize(){let $=this.wrapperEl.node.getBoundingClientRect();this.wrapperEl.size.width=this.wrapperEl.node.offsetWidth,this.wrapperEl.size.height=this.wrapperEl.node.offsetHeight,this.wrapperEl.size.left=$.left+window.scrollX,this.wrapperEl.size.top=$.top+window.scrollY}initGlare(){let{glareEnable:$,glareBorderRadius:et}=this.props;$&&(this.glare=new r(this.wrapperEl.size,et),this.wrapperEl.node.appendChild(this.glare.glareWrapperEl))}emitOnMove($){let{onMove:et}=this.props;if(!et)return;let en=0,er=0;this.glare&&(en=this.glare.glareAngle,er=this.glare.glareOpacity),et({tiltAngleX:this.tilt.tiltAngleX,tiltAngleY:this.tilt.tiltAngleY,tiltAngleXPercentage:this.tilt.tiltAngleXPercentage,tiltAngleYPercentage:this.tilt.tiltAngleYPercentage,glareAngle:en,glareOpacity:er,eventType:$.type})}resetWrapperElTransform(){this.wrapperEl.node.style.transform=""}renderPerspective(){let{perspective:$}=this.props;this.wrapperEl.node.style.transform+=`perspective(${$}px) `}renderScale(){let{scale:$}=this.wrapperEl;this.wrapperEl.node.style.transform+=`scale3d(${$},${$},${$})`}setTransitions(){let{transitionSpeed:$,transitionEasing:et}=this.props;n(this.wrapperEl.node,"all",$,et),this.glare&&n(this.glare.glareEl,"opacity",$,et)}render(){let{children:$,className:et,style:en}=this.props;return er.createElement("div",{ref:$=>this.wrapperEl.node=$,onMouseEnter:this.onEnter,onMouseMove:this.onMove,onMouseLeave:this.onLeave,onTouchStart:this.onEnter,onTouchMove:this.onMove,onTouchEnd:this.onLeave,className:et,style:en},$)}};o.defaultProps=ei},25726:function($,et,en){"use strict";function _arrayLikeToArray($,et){(null==et||et>$.length)&&(et=$.length);for(var en=0,er=Array(et);en<et;en++)er[en]=$[en];return er}function PropertyInfoRecord($,et,en,er,ei,eo,es){this.acceptsBooleans=2===et||3===et||4===et,this.attributeName=er,this.attributeNamespace=ei,this.mustUseProperty=en,this.propertyName=$,this.type=et,this.sanitizeURL=eo,this.removeEmptyString=es}Object.defineProperty(et,"__esModule",{value:!0});var er={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function($){er[$]=new PropertyInfoRecord($,0,!1,$,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
1868h(function($){var et=function($){if(Array.isArray($))return $}($)||function($,et){var en,er,ei=null==$?null:"undefined"!=typeof Symbol&&$[Symbol.iterator]||$["@@iterator"];if(null!=ei){var eo=[],es=!0,el=!1;try{for(ei=ei.call($);!(es=(en=ei.next()).done)&&(eo.push(en.value),!et||eo.length!==et);es=!0);}catch($){el=!0,er=$}finally{try{es||null==ei.return||ei.return()}finally{if(el)throw er}}return eo}}($,2)||function($,et){if($){if("string"==typeof $)return _arrayLikeToArray($,et);var en=Object.prototype.toString.call($).slice(8,-1);if("Object"===en&&$.constructor&&(en=$.constructor.name),"Map"===en||"Set"===en)return Array.from($);if("Arguments"===en||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(en))return _arrayLikeToArray($,et)}}($,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),en=et[0],ei=et[1];er[en]=new PropertyInfoRecord(en,1,!1,ei,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function($){er[$]=new PropertyInfoRecord($,2,!1,$.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function($){er[$]=new PropertyInfoRecord($,2,!1,$,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function($){er[$]=new PropertyInfoRecord($,3,!1,$.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function($){er[$]=new PropertyInfoRecord($,3,!0,$,null,!1,!1)}),["capture","download"].forEach(function($){er[$]=new PropertyInfoRecord($,4,!1,$,null,!1,!1)}),["cols","rows","size","span"].forEach(function($){er[$]=new PropertyInfoRecord($,6,!1,$,null,!1,!1)}),["rowSpan","start"].forEach(function($){er[$]=new PropertyInfoRecord($,5,!1,$.toLowerCase(),null,!1,!1)});var ei=/[\-\:]([a-z])/g,capitalize=function($){return $[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function($){var et=$.replace(ei,capitalize);er[et]=new PropertyInfoRecord(et,1,!1,$,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function($){var et=$.replace(ei,capitalize);er[et]=new PropertyInfoRecord(et,1,!1,$,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function($){var et=$.replace(ei,capitalize);er[et]=new PropertyInfoRecord(et,1,!1,$,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function($){er[$]=new PropertyInfoRecord($,1,!1,$.toLowerCase(),null,!1,!1)}),er.xlinkHref=new PropertyInfoRecord("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function($){er[$]=new PropertyInfoRecord($,1,!1,$.toLowerCase(),null,!0,!0)});var eo=en(78229),es=eo.CAMELCASE,el=eo.SAME,eu=eo.possibleStandardNames,ed=RegExp.prototype.test.bind(RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
1868037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),eh=Object.keys(eu).reduce(function($,et){var en=eu[et];return en===el?$[et]=et:en===es?$[et.toLowerCase()]=et:$[et]=en,$},{});et.BOOLEAN=3,et.BOOLEANISH_STRING=2,et.NUMERIC=5,et.OVERLOADED_BOOLEAN=4,et.POSITIVE_NUMERIC=6,et.RESERVED=0,et.STRING=1,et.getPropertyInfo=function($){return er.hasOwnProperty($)?er[$]:null},et.isCustomAttribute=ed,et.possibleStandardNames=eh},78229:function($,et){et.SAME=0,et.CAMELCASE=1,et.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode
1868-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},9473:function($,et,en){"use strict";en.d(et,{zt:function(){return components_Provider},I0:function(){return ef},v9:function(){return eu}});var er=en(61688),ei=en(52798),eo=en(73935);let batch=function($){$()},getBatch=()=>batch;var es=en(67294);let el=es.createContext(null);function useReduxContext_useReduxContext(){let $=(0,es.useContext)(el);return $}let useSyncExternalStoreWithSelector=()=>{throw Error("uSES not initialized!")},refEquality=($,et)=>$===et,eu=function($=el){let et=$===el?useReduxContext_useReduxContext:()=>(0,es.useContext)($);return function($,en=refEquality){let{store:er,subscription:ei,getServerState:eo}=et(),el=useSyncExternalStoreWithSelector(ei.addNestedSub,er.getState,eo||er.getState,$,en);return(0,es.useDebugValue)(el),el}}();en(8679),en(72973);let ed={notify(){},get:()=>[]},eh=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement),ep=eh?es.useLayoutEffect:es.useEffect;var components_Provider=function({store:$,context:et,children:en,serverState:er}){let ei=(0,es.useMemo)(()=>{let et=function($,et){let en;let er=ed;function handleChangeWrapper(){ei.onStateChange&&ei.onStateChange()}function trySubscribe(){en||(en=et?et.addNestedSub(handleChangeWrapper):$.subscribe(handleChangeWrapper),er=function(){let $=getBatch(),et=null,en=null;return{clear(){et=null,en=null},notify(){$(()=>{let $=et;for(;$;)$.callback(),$=$.next})},get(){let $=[],en=et;for(;en;)$.push(en),en=en.next;return $},subscribe($){let er=!0,ei=en={callback:$,next:null,prev:en};return ei.prev?ei.prev.next=ei:et=ei,function(){er&&null!==et&&(er=!1,ei.next?ei.next.prev=ei.prev:en=ei.prev,ei.prev?ei.prev.next=ei.next:et=ei.next)}}}}())}let ei={addNestedSub:function($){return trySubscribe(),er.subscribe($)},notifyNestedSubs:function(){er.notify()},handleChangeWrapper,isSubscribed:function(){return!!en},trySubscribe,tryUnsubscribe:function(){en&&(en(),en=void 0,er.clear(),er=ed)},getListeners:()=>er};return ei}($);return{store:$,subscription:et,getServerState:er?()=>er:void 0}},[$,er]),eo=(0,es.useMemo)(()=>$.getState(),[$]);ep(()=>{let{subscription:et}=ei;return et.onStateChange=et.notifyNestedSubs,et.trySubscribe(),eo!==$.getState()&&et.notifyNestedSubs(),()=>{et.tryUnsubscribe(),et.onStateChange=void 0}},[ei,eo]);let eu=et||el;return es.createElement(eu.Provider,{value:ei},en)};function createStoreHook($=el){let et=$===el?useReduxContext_useReduxContext:()=>(0,es.useContext)($);return function(){let{store:$}=et();return $}}let em=createStoreHook(),ef=function($=el){let et=$===el?em:createStoreHook($);return function(){let $=et();return $.dispatch}}();useSyncExternalStoreWithSelector=ei.useSyncExternalStoreWithSelector,er.useSyncExternalStore,batch=eo.unstable_batchedUpdates},88359:function($,et){"use strict";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.module.reference")},72973:function($,et,en){"use strict";en(88359)},47010:function($,et,en){"use strict";en.d(et,{Z:function(){return esm_BeatLoader}});var er=en(67294),ei={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function cssValue($){var et=function($){if("number"==typeof $)return{value:$,unit:"px"};var et,en=($.match(/^[0-9.]*/)||"").toString();et=en.includes(".")?parseFloat(en):parseInt(en,10);var er=($.match(/[^0-9]*$/)||"").toString();return ei[er]?{value:et,unit:er}:(console.warn("React Spinners: ".concat($," is not a valid css value. Defaulting to ").concat(et,"px.")),{value:et,unit:"px"})}($);return"".concat(et.value).concat(et.unit)}var __assign=function(){return(__assign=Object.assign||function($){for(var et,en=1,er=arguments.length;en<er;en++)for(var ei in et=arguments[en])Object.prototype.hasOwnProperty.call(et,ei)&&($[ei]=et[ei]);return $}).apply(this,arguments)},__rest=function($,et){var en={};for(var er in $)Object.prototype.hasOwnProperty.call($,er)&&0>et.indexOf(er)&&(en[er]=$[er]);if(null!=$&&"function"==typeof Object.getOwnPropertySymbols)for(var ei=0,er=Object.getOwnPropertySymbols($);ei<er.length;ei++)0>et.indexOf(er[ei])&&Object.prototype.propertyIsEnumerable.call($,er[ei])&&(en[er[ei]]=$[er[ei]]);return en},eo=function($,et,en){var er="react-spinners-".concat($,"-").concat(en);if("undefined"==typeof window||!window.document)return er;var ei=document.createElement("style");document.head.appendChild(ei);var eo=ei.sheet,es="\n @keyframes ".concat(er," {\n ").concat(et,"\n }\n ");return eo&&eo.insertRule(es,0),er}("BeatLoader","50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}","beat"),esm_BeatLoader=function($){var et=$.loading,en=$.color,ei=void 0===en?"#000000":en,es=$.speedMultiplier,el=void 0===es?1:es,eu=$.cssOverride,ed=$.size,eh=void 0===ed?15:ed,ep=$.margin,em=void 0===ep?2:ep,ef=__rest($,["loading","color","speedMultiplier","cssOverride","size","margin"]),eg=__assign({display:"inherit"},void 0===eu?{}:eu),style=function($){return{display:"inline-block",backgroundColor:ei,width:cssValue(eh),height:cssValue(eh),margin:cssValue(em),borderRadius:"100%",animation:"".concat(eo," ").concat(.7/el,"s ").concat($%2?"0s":"".concat(.35/el,"s")," infinite linear"),animationFillMode:"both"}};return void 0===et||et?er.createElement("span",__assign({style:eg},ef),er.createElement("span",{style:style(1)}),er.createElement("span",{style:style(2)}
1868),er.createElement("span",{style:style(3)})):null}},61149:function($,et,en){"use strict";en.d(et,{H:function(){return IntercomProvider},o:function(){return useIntercom}});var er=en(67294);function _extends(){return(_extends=Object.assign||function($){for(var et=1;et<arguments.length;et++){var en=arguments[et];for(var er in en)Object.prototype.hasOwnProperty.call(en,er)&&($[er]=en[er])}return $}).apply(this,arguments)}var log=function($,et){},ei="undefined"==typeof window,IntercomAPI=function($){if(!ei&&window.Intercom){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];return window.Intercom.apply(null,[$].concat(en))}log("error",$+" Intercom instance is not initalized yet")},eo=(0,er.createContext)(void 0),initialize=function($,et){void 0===et&&(et=0);var en=window,er=en.Intercom;if("function"==typeof er)er("reattach_activator"),er("update",en.intercomSettings);else{var ei=document,i=function i(){i.c(arguments)};i.q=[],i.c=function($){i.q.push($)},en.Intercom=i;var l=function(){setTimeout(function(){var et=ei.createElement("script");et.type="text/javascript",et.async=!0,et.src="https://widget.intercom.io/widget/"+$;var en=ei.getElementsByTagName("script")[0];en.parentNode.insertBefore(et,en)},et)};"complete"===document.readyState?l():en.attachEvent?en.attachEvent("onload",l):en.addEventListener("load",l,!1)}},mapDataAttributesCompanyToRawDataAttributesCompany=function($){return _extends({company_id:$.companyId,name:$.name,created_at:$.createdAt,plan:$.plan,monthly_spend:$.monthlySpend,user_count:$.userCount,size:$.size,website:$.website,industry:$.industry},$.customAttributes)},mapDataAttributesToRawDataAttributes=function($){var et,en;return _extends({email:$.email,user_id:$.userId,created_at:$.createdAt,name:$.name,phone:$.phone,last_request_at:$.lastRequestAt,unsubscribed_from_emails:$.unsubscribedFromEmails,language_override:$.languageOverride,utm_campaign:$.utmCampaign,utm_content:$.utmContent,utm_medium:$.utmMedium,utm_source:$.utmSource,utm_term:$.utmTerm,avatar:$.avatar&&{type:(en=$.avatar).type,image_url:en.imageUrl},user_hash:$.userHash,company:$.company&&mapDataAttributesCompanyToRawDataAttributesCompany($.company),companies:null==(et=$.companies)?void 0:et.map(mapDataAttributesCompanyToRawDataAttributesCompany)},$.customAttributes)},mapIntercomPropsToRawIntercomProps=function($){return function removeUndefined($){return Object.keys($).forEach(function(et){$[et]&&"object"==typeof $[et]?removeUndefined($[et]):void 0===$[et]&&delete $[et]}),$}(_extends({},{custom_launcher_selector:$.customLauncherSelector,alignment:$.alignment,vertical_padding:$.verticalPadding,horizontal_padding:$.horizontalPadding,hide_default_launcher:$.hideDefaultLauncher,session_duration:$.sessionDuration,action_color:$.actionColor,background_color:$.backgroundColor},mapDataAttributesToRawDataAttributes($)))},IntercomProvider=function($){var et=$.appId,en=$.autoBoot,es=$.autoBootProps,el=$.children,eu=$.onHide,ed=$.onShow,eh=$.onUnreadCountChange,ep=$.shouldInitialize,em=void 0===ep?!ei:ep,ef=$.apiBase,eg=$.initializeDelay;!function($,et){if(null!=$){var en,er,ei={},eo=Object.keys($);for(er=0;er<eo.length;er++)et.indexOf(en=eo[er])>=0||(ei[en]=$[en])}}($,["appId","autoBoot","autoBootProps","children","onHide","onShow","onUnreadCountChange","shouldInitialize","apiBase","initializeDelay"]);var ey=(0,er.useRef)(!1),ev=(0,er.useRef)(!1),ex=(0,er.useCallback)(function($){if(!window.Intercom&&!em){log("warn","Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`");return}if(!ey.current){var en=_extends({app_id:et},ef&&{api_base:ef},$&&mapIntercomPropsToRawIntercomProps($));window.intercomSettings=en,IntercomAPI("boot",en),ey.current=!0}},[ef,et,em]);ei||!em||ev.current||(initialize(et,eg),eu&&IntercomAPI("onHide",eu),ed&&IntercomAPI("onShow",ed),eh&&IntercomAPI("onUnreadCountChange",eh),void 0!==en&&en&&ex(es),ev.current=!0);var e_=(0,er.useCallback)(function($,et){if(void 0===$&&($="A function"),!window.Intercom&&!em){log("warn","Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`");return}if(!ey.current){log("warn",["'"+$+"' was called but Intercom has not booted yet. ","Please call 'boot' before calling '"+$+"' or ","set 'autoBoot' to true in the IntercomProvider."].join(""));return}return et()},[em]),ew=(0,er.useCallback)(function(){ey.current&&(IntercomAPI("shutdown"),delete window.intercomSettings,ey.current=!1)},[]),ek=(0,er.useCallback)(function(){ey.current&&(IntercomAPI("shutdown"),delete window.Intercom,delete window.intercomSettings,ey.current=!1)},[]),eC=(0,er.useCallback)(function(){e_("update",function(){IntercomAPI("update",{last_requested_at:new Date().getTime()})})},[e_]),eE=(0,er.useCallback)(function($){e_("update",function(){if(!$){eC();return}var et=mapIntercomPropsToRawIntercomProps($);window.intercomSettings=_extends({},window.intercomSettings,et),IntercomAPI("update",et)})},[e_,eC]),eI=(0,er.useCallback)(function(){e_("hide",function(){IntercomAPI("hide")})},[e_]),eS=(0,er.useCallback)(function(){e_("show",function(){return IntercomAPI("show")})},[e_]),eT=(0,er.useCallback)(function(){e_("showMessages",function(){IntercomAPI("showMessages")})},[e_]),eA=(0,er.useCallback)(function($){e_("showNewMessage",function(){$?IntercomAPI("showNewMessage",$):IntercomAPI("showNewMessage")})},[e_]),eP=(0,er.useCallback)(function(){return e_("getVisitorId",function(){return IntercomAPI("getVisitorId")})},[e_]),eN=(0,er.useCallback)(function($){e_("startTour",function(){IntercomAPI("startTour",$)})},[e_]),ej=(0,er.useCallback)(function($,et){e_("trackEvent",function(){et?IntercomAPI("trackEvent",$,et):IntercomAPI("trackEvent",$)})},[e_]),eR=(0,er.useCallback)(function($){return e_("showArticle",function(){IntercomAPI("showArticle",$)})},[e_]),eV=(0,er.useMemo)(function(){return{boot:ex,shutdown:ew,hardShutdown:ek,update:eE,hide:eI,show:eS,showMessages:eT,showNewMessages:eA,getVisitorId:eP,startTour:eN,trackEvent:ej,showArticle:eR}},[ex,ew,ek,eE,eI,eS,eT,eA,eP,eN,ej,eR]);return(0,er.createElement)(eo.Provider,{value:eV},el)},useIntercom=function(){return(0,er.useContext)(eo)}},68356:function($,et,en){"use strict";function _typeof($){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function($){return typeof $}:function($){return $&&"function"==typeof Symbol&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $})($)}function ownKeys($,et){var en=Object.keys($);if(Object.getOwnPropertySymbols){var er=Object.getOwnPropertySymbols($);et&&(er=er.filter(function(et){return Object.getOwnPropertyDescriptor($,et).enumerable})),en.push.apply(en,er)}return en}
1868function _objectSpread2($){for(var et=1;et<arguments.length;et++){var en=null!=arguments[et]?arguments[et]:{};et%2?ownKeys(Object(en),!0).forEach(function(et){!function($,et,en){var er;(er=function($,et){if("object"!=_typeof($)||!$)return $;var en=$[Symbol.toPrimitive];if(void 0!==en){var er=en.call($,et||"default");if("object"!=_typeof(er))return er;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===et?String:Number)($)}(et,"string"),(et="symbol"==_typeof(er)?er:er+"")in $)?Object.defineProperty($,et,{value:en,enumerable:!0,configurable:!0,writable:!0}):$[et]=en}($,et,en[et])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(en)):ownKeys(Object(en)).forEach(function(et){Object.defineProperty($,et,Object.getOwnPropertyDescriptor(en,et))})}return $}function formatProdErrorMessage($){return"Minified Redux error #"+$+"; visit https://redux.js.org/Errors?code="+$+" for the full message or use the non-minified dev environment for full errors. "}en.d(et,{md:function(){return applyMiddleware},UY:function(){return combineReducers},qC:function(){return compose},MT:function(){return createStore}});var er="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ei={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function createStore($,et,en){if("function"==typeof et&&"function"==typeof en||"function"==typeof en&&"function"==typeof arguments[3])throw Error(formatProdErrorMessage(0));if("function"==typeof et&&void 0===en&&(en=et,et=void 0),void 0!==en){if("function"!=typeof en)throw Error(formatProdErrorMessage(1));return en(createStore)($,et)}if("function"!=typeof $)throw Error(formatProdErrorMessage(2));var eo,es=$,el=et,eu=[],ed=eu,eh=!1;function ensureCanMutateNextListeners(){ed===eu&&(ed=eu.slice())}function getState(){if(eh)throw Error(formatProdErrorMessage(3));return el}function subscribe($){if("function"!=typeof $)throw Error(formatProdErrorMessage(4));if(eh)throw Error(formatProdErrorMessage(5));var et=!0;return ensureCanMutateNextListeners(),ed.push($),function(){if(et){if(eh)throw Error(formatProdErrorMessage(6));et=!1,ensureCanMutateNextListeners();var en=ed.indexOf($);ed.splice(en,1),eu=null}}}function dispatch($){if(!function($){if("object"!=typeof $||null===$)return!1;for(var et=$;null!==Object.getPrototypeOf(et);)et=Object.getPrototypeOf(et);return Object.getPrototypeOf($)===et}($))throw Error(formatProdErrorMessage(7));if(void 0===$.type)throw Error(formatProdErrorMessage(8));if(eh)throw Error(formatProdErrorMessage(9));try{eh=!0,el=es(el,$)}finally{eh=!1}for(var et=eu=ed,en=0;en<et.length;en++)(0,et[en])();return $}return dispatch({type:ei.INIT}),(eo={dispatch:dispatch,subscribe:subscribe,getState:getState,replaceReducer:function($){if("function"!=typeof $)throw Error(formatProdErrorMessage(10));es=$,dispatch({type:ei.REPLACE})}})[er]=function(){var $;return($={subscribe:function($){if("object"!=typeof $||null===$)throw Error(formatProdErrorMessage(11));function observeState(){$.next&&$.next(getState())}return observeState(),{unsubscribe:subscribe(observeState)}}})[er]=function(){return this},$},eo}function combineReducers($){for(var et,en=Object.keys($),er={},eo=0;eo<en.length;eo++){var es=en[eo];"function"==typeof $[es]&&(er[es]=$[es])}var el=Object.keys(er);try{!function($){Object.keys($).forEach(function(et){var en=$[et];if(void 0===en(void 0,{type:ei.INIT}))throw Error(formatProdErrorMessage(12));if(void 0===en(void 0,{type:ei.PROBE_UNKNOWN_ACTION()}))throw Error(formatProdErrorMessage(13))})}(er)}catch($){et=$}return function($,en){if(void 0===$&&($={}),et)throw et;for(var ei=!1,eo={},es=0;es<el.length;es++){var eu=el[es],ed=er[eu],eh=$[eu],ep=ed(eh,en);if(void 0===ep)throw en&&en.type,Error(formatProdErrorMessage(14));eo[eu]=ep,ei=ei||ep!==eh}return(ei=ei||el.length!==Object.keys($).length)?eo:$}}function compose(){for(var $=arguments.length,et=Array($),en=0;en<$;en++)et[en]=arguments[en];return 0===et.length?function($){return $}:1===et.length?et[0]:et.reduce(function($,et){return function(){return $(et.apply(void 0,arguments))}})}function applyMiddleware(){for(var $=arguments.length,et=Array($),en=0;en<$;en++)et[en]=arguments[en];return function($){return function(){var en=$.apply(void 0,arguments),_dispatch=function(){throw Error(formatProdErrorMessage(15))},er={getState:en.getState,dispatch:function(){return _dispatch.apply(void 0,arguments)}},ei=et.map(function($){return $(er)});return _dispatch=compose.apply(void 0,ei)(en.dispatch),_objectSpread2
1868(_objectSpread2({},en),{},{dispatch:_dispatch})}}}},69328:function($){"use strict";var et={decodeValues:!0,map:!1,silent:!1};function isNonEmptyString($){return"string"==typeof $&&!!$.trim()}function parseString($,en){var er,ei,eo,es,el=$.split(";").filter(isNonEmptyString),eu=(er=el.shift(),ei="",eo="",(es=er.split("=")).length>1?(ei=es.shift(),eo=es.join("=")):eo=er,{name:ei,value:eo}),ed=eu.name,eh=eu.value;en=en?Object.assign({},et,en):et;try{eh=en.decodeValues?decodeURIComponent(eh):eh}catch($){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+eh+"'. Set options.decodeValues to false to disable this feature.",$)}var ep={name:ed,value:eh};return el.forEach(function($){var et=$.split("="),en=et.shift().trimLeft().toLowerCase(),er=et.join("=");"expires"===en?ep.expires=new Date(er):"max-age"===en?ep.maxAge=parseInt(er,10):"secure"===en?ep.secure=!0:"httponly"===en?ep.httpOnly=!0:"samesite"===en?ep.sameSite=er:ep[en]=er}),ep}function parse($,en){if(en=en?Object.assign({},et,en):et,!$)return en.map?{}:[];if($.headers&&$.headers["set-cookie"])$=$.headers["set-cookie"];else if($.headers){var er=$.headers[Object.keys($.headers).find(function($){return"set-cookie"===$.toLowerCase()})];er||!$.headers.cookie||en.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),$=er}return(Array.isArray($)||($=[$]),(en=en?Object.assign({},et,en):et).map)?$.filter(isNonEmptyString).reduce(function($,et){var er=parseString(et,en);return $[er.name]=er,$},{}):$.filter(isNonEmptyString).map(function($){return parseString($,en)})}$.exports=parse,$.exports.parse=parse,$.exports.parseString=parseString,$.exports.splitCookiesString=function($){if(Array.isArray($))return $;if("string"!=typeof $)return[];var et,en,er,ei,eo,es=[],el=0;function skipWhitespace(){for(;el<$.length&&/\s/.test($.charAt(el));)el+=1;return el<$.length}for(;el<$.length;){for(et=el,eo=!1;skipWhitespace();)if(","===(en=$.charAt(el))){for(er=el,el+=1,skipWhitespace(),ei=el;el<$.length&&"="!==(en=$.charAt(el))&&";"!==en&&","!==en;)el+=1;el<$.length&&"="===$.charAt(el)?(eo=!0,el=ei,es.push($.substring(et,er)),et=el):el=er+1}else el+=1;(!eo||el>=$.length)&&es.push($.substring(et,$.length))}return es}},96774:function($){$.exports=function($,et,en,er){var ei=en?en.call(er,$,et):void 0;if(void 0!==ei)return!!ei;if($===et)return!0;if("object"!=typeof $||!$||"object"!=typeof et||!et)return!1;var eo=Object.keys($),es=Object.keys(et);if(eo.length!==es.length)return!1;for(var el=Object.prototype.hasOwnProperty.bind(et),eu=0;eu<eo.length;eu++){var ed=eo[eu];if(!el(ed))return!1;var eh=$[ed],ep=et[ed];if(!1===(ei=en?en.call(er,eh,ep,ed):void 0)||void 0===ei&&eh!==ep)return!1}return!0}},41476:function($,et,en){"use strict";var er=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};et.__esModule=!0;var ei=er(en(48849)),eo=en(26678);et.default=function($,et){var en={};return $&&"string"==typeof $&&(0,ei.default)($,function($,er){$&&er&&(en[(0,eo.camelCase)($,et)]=er)}),en}},26678:function($,et){"use strict";et.__esModule=!0,et.camelCase=void 0;var en=/^--[a-zA-Z0-9-]+$/,er=/-([a-z])/g,ei=/^[^-]+$/,eo=/^-(webkit|moz|ms|o|khtml)-/,es=/^-(ms)-/,capitalize=function($,et){return et.toUpperCase()},trimHyphen=function($,et){return"".concat(et,"-")};et.camelCase=function($,et){var el;return(void 0===et&&(et={}),!(el=$)||ei.test(el)||en.test(el))?$:($=$.toLowerCase(),($=et.reactCompat?$.replace(es,trimHyphen):$.replace(eo,trimHyphen)).replace(er,capitalize))}},48849:function($,et,en){var er=en(18139);function StyleToObject($,et){var en,ei,eo,es=null;if(!$||"string"!=typeof $)return es;for(var el=er($),eu="function"==typeof et,ed=0,eh=el.length;ed<eh;ed++)ei=(en=el[ed]).property,eo=en.value,eu?et(ei,eo,en):eo&&(es||(es={}),es[ei]=eo);return es}$.exports=StyleToObject,$.exports.default=StyleToObject},19521:function($,et,en){"use strict";en.r(et),en.d(et,{ServerStyleSheet:function(){return e2},StyleSheetConsumer:function(){return eU},StyleSheetContext:function(){return eB},StyleSheetManager:function(){return me},ThemeConsumer:function(){return eY},ThemeContext:function(){return eX},ThemeProvider:function(){return Le},__PRIVATE__:function(){return e5},createGlobalStyle:function(){return $e},css:function(){return Ae},default:function(){return e3},isStyledComponent:function(){return _},keyframes:function(){return We},useTheme:function(){return Xe},version:function(){return ex},withTheme:function(){return Je}});var er,ei=en(59864),eo=en(67294),es=en(96774),el=en.n(es),stylis_browser_esm=function($){function X($,et,en){var er=et.trim().split(es);et=er;var ei=er.length,eo=$.length;switch(eo){case 0:case 1:var el=0;for($=0===eo?"":$[0]+" ";el<ei;++el)et[el]=Z($,et[el],en).trim();break;default:var eu=el=0;for(et=[];el<ei;++el)for(var ed=0;ed<eo;++ed)et[eu++]=Z($[ed]+" ",er[el],en).trim()}return et}function Z($,et,en){var er=et.charCodeAt(0);switch(33>
vendor: 4,259 bytes, line 1868
1868er&&(er=(et=et.trim()).charCodeAt(0)),er){case 38:return et.replace(el,"$1"+$.trim());case 58:return $.trim()+et.replace(el,"$1"+$.trim());default:if(0<1*en&&0<et.indexOf("\f"))return et.replace(el,(58===$.charCodeAt(0)?"":"$1")+$.trim())}return $+et}function P($,et,en,es){var el=$+";",eu=2*et+3*en+4*es;if(944===eu){$=el.indexOf(":",9)+1;var ed=el.substring($,el.length-1).trim();return ed=el.substring(0,$).trim()+ed+";",1===eC||2===eC&&L(ed,1)?"-webkit-"+ed+ed:ed}if(0===eC||2===eC&&!L(el,1))return el;switch(eu){case 1015:return 97===el.charCodeAt(10)?"-webkit-"+el+el:el;case 951:return 116===el.charCodeAt(3)?"-webkit-"+el+el:el;case 963:return 110===el.charCodeAt(5)?"-webkit-"+el+el:el;case 1009:if(100!==el.charCodeAt(4))break;case 969:case 942:return"-webkit-"+el+el;case 978:return"-webkit-"+el+"-moz-"+el+el;case 1019:case 983:return"-webkit-"+el+"-moz-"+el+"-ms-"+el+el;case 883:if(45===el.charCodeAt(8))return"-webkit-"+el+el;if(0<el.indexOf("image-set(",11))return el.replace(ex,"$1-webkit-$2")+el;break;case 932:if(45===el.charCodeAt(4))switch(el.charCodeAt(5)){case 103:return"-webkit-box-"+el.replace("-grow","")+"-webkit-"+el+"-ms-"+el.replace("grow","positive")+el;case 115:return"-webkit-"+el+"-ms-"+el.replace("shrink","negative")+el;case 98:return"-webkit-"+el+"-ms-"+el.replace("basis","preferred-size")+el}return"-webkit-"+el+"-ms-"+el+el;case 964:return"-webkit-"+el+"-ms-flex-"+el+el;case 1023:if(99!==el.charCodeAt(8))break;return"-webkit-box-pack"+(ed=el.substring(el.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+el+"-ms-flex-pack"+ed+el;case 1005:return ei.test(el)?el.replace(er,":-webkit-")+el.replace(er,":-moz-")+el:el;case 1e3:switch(et=(ed=el.substring(13).trim()).indexOf("-")+1,ed.charCodeAt(0)+ed.charCodeAt(et)){case 226:ed=el.replace(ep,"tb");break;case 232:ed=el.replace(ep,"tb-rl");break;case 220:ed=el.replace(ep,"lr");break;default:return el}return"-webkit-"+el+"-ms-"+ed+el;case 1017:if(-1===el.indexOf("sticky",9))break;case 975:switch(et=(el=$).length-10,eu=(ed=(33===el.charCodeAt(et)?el.substring(0,et):el).substring($.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|ed.charCodeAt(7))){case 203:if(111>ed.charCodeAt(8))break;case 115:el=el.replace(ed,"-webkit-"+ed)+";"+el;break;case 207:case 102:el=el.replace(ed,"-webkit-"+(102<eu?"inline-":"")+"box")+";"+el.replace(ed,"-webkit-"+ed)+";"+el.replace(ed,"-ms-"+ed+"box")+";"+el}return el+";";case 938:if(45===el.charCodeAt(5))switch(el.charCodeAt(6)){case 105:return ed=el.replace("-items",""),"-webkit-"+el+"-webkit-box-"+ed+"-ms-flex-"+ed+el;case 115:return"-webkit-"+el+"-ms-flex-item-"+el.replace(eg,"")+el;default:return"-webkit-"+el+"-ms-flex-line-pack"+el.replace("align-content","").replace(eg,"")+el}break;case 973:case 989:if(45!==el.charCodeAt(3)||122===el.charCodeAt(4))break;case 931:case 953:if(!0===ev.test($))return 115===(ed=$.substring($.indexOf(":")+1)).charCodeAt(0)?P($.replace("stretch","fill-available"),et,en,es).replace(":fill-available",":stretch"):el.replace(ed,"-webkit-"+ed)+el.replace(ed,"-moz-"+ed.replace("fill-",""))+el;break;case 962:if(el="-webkit-"+el+(102===el.charCodeAt(5)?"-ms-"+el:"")+el,211===en+es&&105===el.charCodeAt(13)&&0<el.indexOf("transform",10))return el.substring(0,el.indexOf(";",27)+1).replace(eo,"$1-webkit-$2")+el}return el}function L($,et){var en=$.indexOf(1===et?":":"{"),er=$.substring(0,3!==et?en:10);return en=$.substring(en+1,$.length-1),eT(2!==et?er:er.replace(ey,"$1"),en,et)}function ea($,et){var en=P(et,et.charCodeAt(0),et.charCodeAt(1),et.charCodeAt(2));return en!==et+";"?en.replace(ef," or ($1)").substring(4):"("+et+")"}function H($,et,en,er,ei,eo,es,el,eu,ed){for(var eh,ep=0,em=et;ep<eS;++ep)switch(eh=eI[ep].call(B,$,em,en,er,ei,eo,es,el,eu,ed)){case void 0:case!1:case!0:case null:break;default:em=eh}if(em!==et)return em}function U($){return void 0!==($=$.prefix)&&(eT=null,$?"function"!=typeof $?eC=1:(eC=2,eT=$):eC=0),U}function B($,er){var ei=$;if(33>ei.charCodeAt(0)&&(ei=ei.trim()),ei=[ei],0<eS){var eo=H(-1,er,ei,ei,ew,e_,0,0,0,0);void 0!==eo&&"string"==typeof eo&&(er=eo)}var es=function M($,er,ei,eo,es){for(var el,ep,ef,eg,ey,ev=0,ex=0,eI=0,eT=0,eP=0,eN=0,ej=ef=el=0,eR=0,eV=0,eD=0,eO=0,eM=ei.length,eF=eM-1,eL="",eH="",eB="",eU="";eR<eM;
vendor: 1,433 bytes, line 1868
1868){if(ep=ei.charCodeAt(eR),eR===eF&&0!==ex+eT+eI+ev&&(0!==ex&&(ep=47===ex?10:47),eT=eI=ev=0,eM++,eF++),0===ex+eT+eI+ev){if(eR===eF&&(0<eV&&(eL=eL.replace(en,"")),0<eL.trim().length)){switch(ep){case 32:case 9:case 59:case 13:case 10:break;default:eL+=ei.charAt(eR)}ep=59}switch(ep){case 123:for(el=(eL=eL.trim()).charCodeAt(0),ef=1,eO=++eR;eR<eM;){switch(ep=ei.charCodeAt(eR)){case 123:ef++;break;case 125:ef--;break;case 47:switch(ep=ei.charCodeAt(eR+1)){case 42:case 47:e:{for(ej=eR+1;ej<eF;++ej)switch(ei.charCodeAt(ej)){case 47:if(42===ep&&42===ei.charCodeAt(ej-1)&&eR+2!==ej){eR=ej+1;break e}break;case 10:if(47===ep){eR=ej+1;break e}}eR=ej}}break;case 91:ep++;case 40:ep++;case 34:case 39:for(;eR++<eF&&ei.charCodeAt(eR)!==ep;);}if(0===ef)break;eR++}if(ef=ei.substring(eO,eR),0===el&&(el=(eL=eL.replace(et,"").trim()).charCodeAt(0)),64===el){switch(0<eV&&(eL=eL.replace(en,"")),ep=eL.charCodeAt(1)){case 100:case 109:case 115:case 45:eV=er;break;default:eV=eE}if(eO=(ef=M(er,eV,ef,ep,es+1)).length,0<eS&&(ey=H(3,ef,eV=X(eE,eL,eD),er,ew,e_,eO,ep,es,eo),eL=eV.join(""),void 0!==ey&&0===(eO=(ef=ey.trim()).length)&&(ep=0,ef="")),0<eO)switch(ep){case 115:eL=eL.replace(em,ea);case 100:case 109:case 45:ef=eL+"{"+ef+"}";break;case 107:ef=(eL=eL.replace(eu,"$1 $2"))+"{"+ef+"}",ef=1===eC||2===eC&&L("@"+ef,3)?"@-webkit-"+ef+"@"+ef:"@"+ef;break;default:ef=eL+ef,112===eo&&(eH+=ef,ef="")}else ef=""}else ef=M(er,X(er,eL,eD),ef,eo,es+1);
vendor: 4,551 bytes, line 1868
1868eB+=ef,ef=eD=eV=ej=el=0,eL="",ep=ei.charCodeAt(++eR);break;case 125:case 59:if(1<(eO=(eL=(0<eV?eL.replace(en,""):eL).trim()).length))switch(0===ej&&(45===(el=eL.charCodeAt(0))||96<el&&123>el)&&(eO=(eL=eL.replace(" ",":")).length),0<eS&&void 0!==(ey=H(1,eL,er,$,ew,e_,eH.length,eo,es,eo))&&0===(eO=(eL=ey.trim()).length)&&(eL="\x00\x00"),el=eL.charCodeAt(0),ep=eL.charCodeAt(1),el){case 0:break;case 64:if(105===ep||99===ep){eU+=eL+ei.charAt(eR);break}default:58!==eL.charCodeAt(eO-1)&&(eH+=P(eL,el,ep,eL.charCodeAt(2)))}eD=eV=ej=el=0,eL="",ep=ei.charCodeAt(++eR)}}switch(ep){case 13:case 10:47===ex?ex=0:0===1+el&&107!==eo&&0<eL.length&&(eV=1,eL+="\x00"),0<eS*eA&&H(0,eL,er,$,ew,e_,eH.length,eo,es,eo),e_=1,ew++;break;case 59:case 125:if(0===ex+eT+eI+ev){e_++;break}default:switch(e_++,eg=ei.charAt(eR),ep){case 9:case 32:if(0===eT+ev+ex)switch(eP){case 44:case 58:case 9:case 32:eg="";break;default:32!==ep&&(eg=" ")}break;case 0:eg="\\0";break;case 12:eg="\\f";break;case 11:eg="\\v";break;case 38:0===eT+ex+ev&&(eV=eD=1,eg="\f"+eg);break;case 108:if(0===eT+ex+ev+ek&&0<ej)switch(eR-ej){case 2:112===eP&&58===ei.charCodeAt(eR-3)&&(ek=eP);case 8:111===eN&&(ek=eN)}break;case 58:0===eT+ex+ev&&(ej=eR);break;case 44:0===ex+eI+eT+ev&&(eV=1,eg+="\r");break;case 34:case 39:0===ex&&(eT=eT===ep?0:0===eT?ep:eT);break;case 91:0===eT+ex+eI&&ev++;break;case 93:0===eT+ex+eI&&ev--;break;case 41:0===eT+ex+ev&&eI--;break;case 40:0===eT+ex+ev&&(0===el&&(2*eP+3*eN==533||(el=1)),eI++);break;case 64:0===ex+eI+eT+ev+ej+ef&&(ef=1);break;case 42:case 47:if(!(0<eT+ev+eI))switch(ex){case 0:switch(2*ep+3*ei.charCodeAt(eR+1)){case 235:ex=47;break;case 220:eO=eR,ex=42}break;case 42:47===ep&&42===eP&&eO+2!==eR&&(33===ei.charCodeAt(eO+2)&&(eH+=ei.substring(eO,eR+1)),eg="",ex=0)}}0===ex&&(eL+=eg)}eN=eP,eP=ep,eR++}if(0<(eO=eH.length)){if(eV=er,0<eS&&void 0!==(ey=H(2,eH,eV,$,ew,e_,eO,eo,es,eo))&&0===(eH=ey).length)return eU+eH+eB;if(eH=eV.join(",")+"{"+eH+"}",0!=eC*ek){switch(2!==eC||L(eH,2)||(ek=0),ek){case 111:eH=eH.replace(eh,":-moz-$1")+eH;break;case 112:eH=eH.replace(ed,"::-webkit-input-$1")+eH.replace(ed,"::-moz-$1")+eH.replace(ed,":-ms-input-$1")+eH}ek=0}}return eU+eH+eB}(eE,ei,er,0,0);return 0<eS&&void 0!==(eo=H(-2,es,ei,ei,ew,e_,es.length,0,0,0))&&(es=eo),ek=0,e_=ew=1,es}var et=/^\0+/g,en=/[\0\r\f]/g,er=/: */g,ei=/zoo|gra/,eo=/([,: ])(transform)/g,es=/,\r+?/g,el=/([\t\r\n ])*\f?&/g,eu=/@(k\w+)\s*(\S*)\s*/,ed=/::(place)/g,eh=/:(read-only)/g,ep=/[svh]\w+-[tblr]{2}/,em=/\(\s*(.*)\s*\)/g,ef=/([\s\S]*?);/g,eg=/-self|flex-/g,ey=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ev=/stretch|:\s*\w+\-(?:conte|avail)/,ex=/([^-])(image-set\()/,e_=1,ew=1,ek=0,eC=1,eE=[],eI=[],eS=0,eT=null,eA=0;return B.use=function T($){switch($){case void 0:case null:eS=eI.length=0;break;default:if("function"==typeof $)eI[eS++]=$;else if("object"==typeof $)for(var et=0,en=$.length;et<en;++et)T($[et]);else eA=0|!!$}return T},B.set=U,void 0!==$&&U($),B},eu={animationIterationCount: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,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},ed=/^((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|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|playsInl
vendor: 15,828 bytes, line 1868
1868ine|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)-.*))$/,eh=(er=Object.create(null),function($){return void 0===er[$]&&(er[$]=ed.test($)||111===$.charCodeAt(0)&&110===$.charCodeAt(1)&&91>$.charCodeAt(2)),er[$]}),ep=en(8679),em=en.n(ep),ef=en(34155);function y(){return(y=Object.assign||function($){for(var et=1;et<arguments.length;et++){var en=arguments[et];for(var er in en)Object.prototype.hasOwnProperty.call(en,er)&&($[er]=en[er])}return $}).apply(this,arguments)}var v=function($,et){for(var en=[$[0]],er=0,ei=et.length;er<ei;er+=1)en.push(et[er],$[er+1]);return en},g=function($){return null!==$&&"object"==typeof $&&"[object Object]"===($.toString?$.toString():Object.prototype.toString.call($))&&!(0,ei.typeOf)($)},eg=Object.freeze([]),ey=Object.freeze({});function E($){return"function"==typeof $}function b($){return $.displayName||$.name||"Component"}function _($){return $&&"string"==typeof $.styledComponentId}var ev=void 0!==ef&&void 0!==ef.env&&(ef.env.REACT_APP_SC_ATTR||ef.env.SC_ATTR)||"data-styled",ex="5.3.11",e_="undefined"!=typeof window&&"HTMLElement"in window,ew=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==ef&&void 0!==ef.env&&(void 0!==ef.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==ef.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==ef.env.REACT_APP_SC_DISABLE_SPEEDY&&ef.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==ef.env.SC_DISABLE_SPEEDY&&""!==ef.env.SC_DISABLE_SPEEDY&&"false"!==ef.env.SC_DISABLE_SPEEDY&&ef.env.SC_DISABLE_SPEEDY)),ek={};function D($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];throw Error("An error occurred. See https://git.io/JUIaE#"+$+" for more information."+(en.length>0?" Args: "+en.join(", "):""))}var eC=function(){function e($){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=$}var $=e.prototype;return $.indexOfGroup=function($){for(var et=0,en=0;en<$;en++)et+=this.groupSizes[en];return et},$.insertRules=function($,et){if($>=this.groupSizes.length){for(var en=this.groupSizes,er=en.length,ei=er;$>=ei;)(ei<<=1)<0&&D(16,""+$);this.groupSizes=new Uint32Array(ei),this.groupSizes.set(en),this.length=ei;for(var eo=er;eo<ei;eo++)this.groupSizes[eo]=0}for(var es=this.indexOfGroup($+1),el=0,eu=et.length;el<eu;el++)this.tag.insertRule(es,et[el])&&(this.groupSizes[$]++,es++)},$.clearGroup=function($){if($<this.length){var et=this.groupSizes[$],en=this.indexOfGroup($),er=en+et;this.groupSizes[$]=0;for(var ei=en;ei<er;ei++)this.tag.deleteRule(en)}},$.getGroup=function($){var et="";if($>=this.length||0===this.groupSizes[$])return et;for(var en=this.groupSizes[$],er=this.indexOfGroup($),ei=er+en,eo=er;eo<ei;eo++)et+=this.tag.getRule(eo)+"/*!sc*/\n";return et},e}(),eE=new Map,eI=new Map,eS=1,V=function($){if(eE.has($))return eE.get($);for(;eI.has(eS);)eS++;var et=eS++;return eE.set($,et),eI.set(et,$),et},z=function($,et){et>=eS&&(eS=et+1),eE.set($,et),eI.set(et,$)},eT="style["+ev+'][data-styled-version="5.3.11"]',eA=RegExp("^"+ev+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function($,et,en){for(var er,ei=en.split(","),eo=0,es=ei.length;eo<es;eo++)(er=ei[eo])&&$.registerName(et,er)},F=function($,et){for(var en=(et.textContent||"").split("/*!sc*/\n"),er=[],ei=0,eo=en.length;ei<eo;ei++){var es=en[ei].trim();if(es){var el=es.match(eA);if(el){var eu=0|parseInt(el[1],10),ed=el[2];0!==eu&&(z(ed,eu),L($,ed,el[3]),$.getTag().insertRules(eu,er)),er.length=0}else er.push(es)}}},Y=function(){return en.nc},q=function($){var et=document.head,en=$||et,er=document.createElement("style"),ei=function($){for(var et=$.childNodes,en=et.length;en>=0;en--){var er=et[en];if(er&&1===er.nodeType&&er.hasAttribute(ev))return er}}(en),eo=void 0!==ei?ei.nextSibling:null;er.setAttribute(ev,"active"),er.setAttribute("data-styled-version","5.3.11");var es=Y();return es&&er.setAttribute("nonce",es),en.insertBefore(er,eo),er},eP=function(){function e($){var et=this.element=q($);et.appendChild(document.createTextNode("")),this.sheet=function($){if($.sheet)return $.sheet;for(var et=document.styleSheets,en=0,er=et.length;en<er;en++){var ei=et[en];if(ei.ownerNode===$)return ei}D(17)}(et),this.length=0}var $=e.prototype;return $.insertRule=function($,et){try{return this.sheet.insertRule(et,$),this.length++,!0}catch($){return!1}},$.deleteRule=function($){this.sheet.deleteRule($),this.length--},$.getRule=function($){var et=this.sheet.cssRules[$];return void 0!==et&&"string"==typeof et.cssText?et.cssText:""},e}(),eN=function(){function e($){var et=this.element=q($);this.nodes=et.childNodes,this.length=0}var $=e.prototype;return $.insertRule=function($,et){if($<=this.length&&$>=0){var en=document.createTextNode(et),er=this.nodes[$];return this.element.insertBefore(en,er||null),this.length++,!0}return!1},$.deleteRule=function($){this.element.removeChild(this.nodes[$]),this.length--},$.getRule=function($){return $<this.length?this.nodes[$].textContent:""},e}(),ej=function(){function e($){this.rules=[],this.length=0}var $=e.prototype;return $.insertRule=function($,et){return $<=this.length&&(this.rules.splice($,0,et),this.length++,!0)},$.deleteRule=function($){this.rules.splice($,1),this.length--},$.getRule=function($){return $<this.length?this.rules[$]:""},e}(),eR=e_,eV={isServer:!e_,useCSSOMInjection:!ew},eD=function(){function e($,et,en){void 0===$&&($=ey),void 0===et&&(et={}),this.options=y({},eV,{},$),this.gs=et,this.names=new Map(en),this.server=!!$.isServer,!this.server&&e_&&eR&&(eR=!1,function($){for(var et=document.querySelectorAll(eT),en=0,er=et.length;en<er;en++){var ei=et[en];ei&&"active"!==ei.getAttribute(ev)&&(F($,ei),ei.parentNode&&ei.parentNode.removeChild(ei))}}(this))}e.registerId=function($){return V($)};var $=e.prototype;return $.reconstructWithOptions=function($,et){return void 0===et&&(et=!0),new e(y({},this.options,{},$),this.gs,et&&this.names||void 0)},$.allocateGSInstance=function($){return this.gs[$]=(this.gs[$]||0)+1},$.getTag=function(){var $,et,en,er,ei;return this.tag||(this.tag=(en=(et=this.options).isServer,er=et.useCSSOMInjection,ei=et.target,$=en?new ej(ei):er?new eP(ei):new eN(ei),new eC($)))},$.hasNameForId=function($,et){return this.names.has($)&&this.names.get($).has(et)},$.registerName=function($,et){if(V($),this.names.has($))this.names.get($).add(et);else{var en=new Set;en.add(et),this.names.set($,en)}},$.insertRules=function($,et,en){this.registerName($,et),this.getTag().insertRules(V($),en)},$.clearNames=function($){this.names.has($)&&this.names.get($).clear()},$.clearRules=function($){this.getTag().clearGroup(V($)),this.clearNames($)},$.clearTag=function(){this.tag=void 0},$.toString=function(){return function($){for(var et=$.getTag(),en=et.length,er="",ei=0;ei<en;ei++){var eo,es=(eo=ei,eI.get(eo));if(void 0!==es){var el=$.names.get(es),eu=et.getGroup(ei);if(el&&eu&&el.size){var ed=ev+".g"+ei+'[id="'+es+'"]',eh="";void 0!==el&&el.forEach(function($){$.length>0&&(eh+=$+",")}),er+=""+eu+ed+'{content:"'+eh+'"}/*!sc*/\n'}}}return er}(this)},e}(),eO=/(a)(d)/gi,K=function($){return String.fromCharCode($+($>25?39:97))};function Q($){var et,en="";for(et=Math.abs($);et>52;et=et/52|0)en=K(et%52)+en;return(K(et%52)+en).replace(eO,"$1-$2")}var ee=function($,et){for(var en=et.length;en;)$=33*$^et.charCodeAt(--en);return $},te=function($){return ee(5381,$)};function ne($){for(var et=0;et<$.length;et+=1){var en=$[et];if(E(en)&&!_(en))return!1}return!0}var eM=te("5.3.11"),eF=function(){function e($,et,en){this.rules=$,this.staticRulesId="",this.isStatic=(void 0===en||en.isStatic)&&ne($),this.componentId=et,this.baseHash=ee(eM,et),this.baseStyle=en,eD.registerId(et)}return e.prototype.generateAndInjectStyles=function($,et,en){var er=this.componentId,ei=[];if(this.baseStyle&&ei.push(this.baseStyle.generateAndInjectStyles($,et,en)),this.isStatic&&!en.hash){if(this.staticRulesId&&et.hasNameForId(er,this.staticRulesId))ei.push(this.staticRulesId);else{var eo=_e(this.rules,$,et,en).join(""),es=Q(ee(this.baseHash,eo)>>>0);if(!et.hasNameForId(er,es)){var el=en(eo,"."+es,void 0,er);et.insertRules(er,es,el)}ei.push(es),this.staticRulesId=es}}else{for(var eu=this.rules.length,ed=ee(this.baseHash,en.hash),eh="",ep=0;ep<eu;ep++){var em=this.rules[ep];if("string"==typeof em)eh+=em;else if(em){var ef=_e(em,$,et,en),eg=Array.isArray(ef)?ef.join(""):ef;ed=ee(ed,eg+ep),eh+=eg}}if(eh){var ey=Q(ed>>>0);if(!et.hasNameForId(er,ey)){var ev=en(eh,"."+ey,void 0,er);et.insertRules(er,ey,ev)}ei.push(ey)}}return ei.join(" ")},e}(),eL=/^\s*\/\/.*$/gm,eH=[":","[",".","#"];function ae($){var et,en,er,ei,eo=void 0===$?ey:$,es=eo.options,el=void 0===es?ey:es,eu=eo.plugins,ed=void 0===eu?eg:eu,eh=new stylis_browser_esm(el),ep=[],em=function($){function t(et){if(et)try{$(et+"}")}catch($){}}return function(et,en,er,ei,eo,es,el,eu,ed,eh){switch(et){case 1:if(0===ed&&64===en.charCodeAt(0))return $(en+";"),"";break;case 2:if(0===eu)return en+"/*|*/";break;case 3:switch(eu){case 102:case 112:return $(er[0]+en),"";default:return en+(0===eh?"/*|*/":"")}case -2:en.split("/*|*/}").forEach(t)}}}(function($){ep.push($)}),f=function($,er,eo){return 0===er&&-1!==eH.indexOf(eo[en.length])||eo.match(ei)?$:"."+et};function m($,eo,es,el){void 0===el&&(el="&");var eu=$.replace(eL,""),ed=eo&&es?es+" "+eo+" { "+eu+" }":eu;return et=el,er=RegExp("\\"+(en=eo)+"\\b","g"),ei=RegExp("(\\"+en+"\\b){2,}"),eh(es||!eo?"":eo,ed)}return eh.use([].concat(ed,[function($,et,ei){2===$&&ei.length&&ei[0].lastIndexOf(en)>0&&(ei[0]=ei[0].replace(er,f))},em,function($){if(-2===$){var et=ep;return ep=[],et}}])),m.hash=ed.length?ed.reduce(function($,et){return et.name||D(15),ee($,et.name)},5381).toString():"",m}var eB=eo.createContext(),eU=eB.Consumer,ez=eo.createContext(),eq=(ez.Consumer,new eD),eZ=ae();function pe(){return(0,eo.useContext)(eB)||eq}function fe(){return(0,eo.useContext)(ez)||eZ}function me($){var et=(0,eo.useState)($.stylisPlugins),en=et[0],er=et[1],ei=pe(),es=(0,eo.useMemo)(function(){var et=ei;return $.sheet?et=$.sheet:$.target&&(et=et.reconstructWithOptions({target:$.target},!1)),$.disableCSSOMInjection&&(et=et.reconstructWithOptions({useCSSOMInjection:!1})),et},[$.disableCSSOMInjection,$.sheet,$.target]),eu=(0,eo.useMemo)(function(){return ae({options:{prefix:!$.disableVendorPrefixes},plugins:en})},[$.disableVendorPrefixes,en]);return(0,eo.useEffect)(function(){el()(en,$.stylisPlugins)||er($.stylisPlugins)},[$.stylisPlugins]),eo.createElement(eB.Provider,{value:es},eo.createElement(ez.Provider,{value:eu},$.children))}var eW=function(){function e($,et){var en=this;this.inject=function($,et){void 0===et&&(et=eZ);var er=en.name+et.hash;$.hasNameForId(en.id,er)||$.insertRules(en.id,er,et(en.rules,er,"@keyframes"))},this.toString=function(){return D(12,String(en.name))},this.name=$,this.id="sc-keyframes-"+$,this.rules=et}return e.prototype.getName=function($){return void 0===$&&($=eZ),this.name+$.hash},e}(),eG=/([A-Z])/,e$=/([A-Z])/g,eJ=/^ms-/,we=function($){return"-"+$.toLowerCase()};function Ee($){return eG.test($)?$.replace(e$,we).replace(eJ,"-ms-"):$}var be=function($){return null==$||!1===$||""===$};function _e($,et,en,er){if(Array.isArray($)){for(var ei,eo=[],es=0,el=$.length;es<el;es+=1)""!==(ei=_e($[es],et,en,er))&&(Array.isArray(ei)?eo.push.apply(eo,ei):eo.push(ei));return eo}return be($)?"":_($)?"."+$.styledComponentId:E($)?"function"!=typeof $||$.prototype&&$.prototype.isReactComponent||!et?$:_e($(et),et,en,er):$ instanceof eW?en?($.inject(en,er),$.getName(er)):$:g($)?function e($,et){var en,er=[];for(var ei in $)$.hasOwnProperty(ei)&&!be($[ei])&&(Array.isArray($[ei])&&$[ei].isCss||E($[ei])?er.push(Ee(ei)+":",$[ei],";"):g($[ei])?er.push.apply(er,e($[ei],ei)):er.push(Ee(ei)+": "+(null==(en=$[ei])||"boolean"==typeof en||""===en?"":"number"!=typeof en||0===en||ei in eu||ei.startsWith("--")?String(en).trim():en+"px")+";"));return et?[et+" {"].concat(er,["}"]):er}($):$.toString()}var Ne=function($){return Array.isArray($)&&($.isCss=!0),$};function Ae($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];return E($)||g($)?Ne(_e(v(eg,[$].concat(en)))):0===en.length&&1===$.length&&"string"==typeof $[0]?$:Ne(_e(v($,en)))}var Oe=function($,et,en){return void 0===en&&(en=ey),$.theme!==en.theme&&$.theme||et||en.theme},eK=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eQ=/(^-|-$)/g;function je($){return $.replace(eK,"-").replace(eQ,"")}var Te=function($){return Q(te($)>>>0)};function xe($){return"string"==typeof $}var ke=function($){return"function"==typeof $||"object"==typeof $&&null!==$&&!Array.isArray($)},eX=eo.createContext(),eY=eX.Consumer;function Le($){var et=(0,eo.useContext)(eX),en=(0,eo.useMemo)(function(){var en;return(en=$.theme)?E(en)?en(et):Array.isArray(en)||"object"!=typeof en?D(8):et?y({},et,{},en):en:D(14)},[$.theme,et]);return $.children?eo.createElement(eX.Provider,{value:en},$.children):null}var e0={}
1868,qe=function($){return function e($,et,en){if(void 0===en&&(en=ey),!(0,ei.isValidElementType)(et))return D(1,String(et));var s=function(){return $(et,en,Ae.apply(void 0,arguments))};return s.withConfig=function(er){return e($,et,y({},en,{},er))},s.attrs=function(er){return e($,et,y({},en,{attrs:Array.prototype.concat(en.attrs,er).filter(Boolean)}))},s}(function Ye($,et,en){var er=_($),ei=!xe($),es=et.attrs,el=void 0===es?eg:es,eu=et.componentId,ed=void 0===eu?(ew=et.displayName,ek=et.parentComponentId,e0[eC="string"!=typeof ew?"sc":je(ew)]=(e0[eC]||0)+1,eE=eC+"-"+Te("5.3.11"+eC+e0[eC]),ek?ek+"-"+eE:eE):eu,ep=et.displayName,ef=void 0===ep?xe($)?"styled."+$:"Styled("+b($)+")":ep,ev=et.displayName&&et.componentId?je(et.displayName)+"-"+et.componentId:et.componentId||ed,ex=er&&$.attrs?Array.prototype.concat($.attrs,el).filter(Boolean):el,e_=et.shouldForwardProp;er&&$.shouldForwardProp&&(e_=et.shouldForwardProp?function(en,er,ei){return $.shouldForwardProp(en,er,ei)&&et.shouldForwardProp(en,er,ei)}:$.shouldForwardProp);var ew,ek,eC,eE,eI,eS=new eF(en,ev,er?$.componentStyle:void 0),eT=eS.isStatic&&0===el.length,P=function($,et){return function($,et,en,er){var ei,es,el,eu,ed,ep=$.attrs,em=$.componentStyle,ef=$.defaultProps,eg=$.foldedComponentIds,ev=$.shouldForwardProp,ex=$.styledComponentId,e_=$.target,ew=(void 0===(ei=Oe(et,(0,eo.useContext)(eX),ef)||ey)&&(ei=ey),es=y({},et,{theme:ei}),el={},ep.forEach(function($){var et,en,er,ei=$;for(et in E(ei)&&(ei=ei(es)),ei)es[et]=el[et]="className"===et?(en=el[et],er=ei[et],en&&er?en+" "+er:en||er):ei[et]}),[es,el]),ek=ew[0],eC=ew[1],eE=(eu=pe(),ed=fe(),er?em.generateAndInjectStyles(ey,eu,ed):em.generateAndInjectStyles(ek,eu,ed)),eI=eC.$as||et.$as||eC.as||et.as||e_,eS=xe(eI),eT=eC!==et?y({},et,{},eC):et,eA={};for(var eP in eT)"$"!==eP[0]&&"as"!==eP&&("forwardedAs"===eP?eA.as=eT[eP]:(ev?ev(eP,eh,eI):!eS||eh(eP))&&(eA[eP]=eT[eP]));return et.style&&eC.style!==et.style&&(eA.style=y({},et.style,{},eC.style)),eA.className=Array.prototype.concat(eg,ex,eE!==ex?eE:null,et.className,eC.className).filter(Boolean).join(" "),eA.ref=en,(0,eo.createElement)(eI,eA)}(eI,$,et,eT)};return P.displayName=ef,(eI=eo.forwardRef(P)).attrs=ex,eI.componentStyle=eS,eI.displayName=ef,eI.shouldForwardProp=e_,eI.foldedComponentIds=er?Array.prototype.concat($.foldedComponentIds,$.styledComponentId):eg,eI.styledComponentId=ev,eI.target=er?$.target:$,eI.withComponent=function($){var er=et.componentId,ei=function($,et){if(null==$)return{};var en,er,ei={},eo=Object.keys($);for(er=0;er<eo.length;er++)et.indexOf(en=eo[er])>=0||(ei[en]=$[en]);return ei}(et,["componentId"]),eo=er&&er+"-"+(xe($)?$:je(b($)));return Ye($,y({},ei,{attrs:ex,componentId:eo}),en)},Object.defineProperty(eI,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(et){this._foldedDefaultProps=er?function ze($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];for(var ei=0;ei<en.length;ei++){var eo=en[ei];if(ke(eo))for(var es in eo)"__proto__"!==es&&"constructor"!==es&&"prototype"!==es&&function($,et,en){var er=$[en];ke(et)&&ke(er)?ze(er,et):$[en]=et}($,eo[es],es)}return $}({},$.defaultProps,et):et}}),Object.defineProperty(eI,"toString",{value:function(){return"."+eI.styledComponentId}}),ei&&em()(eI,$,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),eI},$)};["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","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function($){qe[$]=qe($)});var e1=function(){function e($,et){this.rules=$,this.componentId=et,this.isStatic=ne($),eD.registerId(this.componentId+1)}var $=e.prototype;return $.createStyles=function($,et,en,er){var ei=er(_e(this.rules,et,en,er).join(""),""),eo=this.componentId+$;en.insertRules(eo,eo,ei)},$.removeStyles=function($,et){et.clearRules(this.componentId+$)},$.renderStyles=function($,et,en,er){$>2&&eD.registerId(this.componentId+$),this.removeStyles($,en),this.createStyles($,et,en,er)},e}();function $e($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];var ei=Ae.apply(void 0,[$].concat(en)),es="sc-global-"+Te(JSON.stringify(ei)),el=new e1(ei,es);function d($){var et=pe(),en=fe(),er=(0,eo.useContext)(eX),ei=(0,eo.useRef)(et.allocateGSInstance(es)).current;return et.server&&h(ei,$,et,er,en),(0,eo.useLayoutEffect)(function(){if(!et.server)return h(ei,$,et,er,en),function(){return el.removeStyles(ei,et)}},[ei,$,et,er,en]),null}
1868function h($,et,en,er,ei){if(el.isStatic)el.renderStyles($,ek,en,ei);else{var eo=y({},et,{theme:Oe(et,er,d.defaultProps)});el.renderStyles($,eo,en,ei)}}return eo.memo(d)}function We($){for(var et=arguments.length,en=Array(et>1?et-1:0),er=1;er<et;er++)en[er-1]=arguments[er];var ei=Ae.apply(void 0,[$].concat(en)).join(""),eo=Te(ei);return new eW(eo,ei)}var e2=function(){function e(){var $=this;this._emitSheetCSS=function(){var et=$.instance.toString();if(!et)return"";var en=Y();return"<style "+[en&&'nonce="'+en+'"',ev+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+et+"</style>"},this.getStyleTags=function(){return $.sealed?D(2):$._emitSheetCSS()},this.getStyleElement=function(){if($.sealed)return D(2);var et,en=((et={})[ev]="",et["data-styled-version"]="5.3.11",et.dangerouslySetInnerHTML={__html:$.instance.toString()},et),er=Y();return er&&(en.nonce=er),[eo.createElement("style",y({},en,{key:"sc-0-0"}))]},this.seal=function(){$.sealed=!0},this.instance=new eD({isServer:!0}),this.sealed=!1}var $=e.prototype;return $.collectStyles=function($){return this.sealed?D(2):eo.createElement(me,{sheet:this.instance},$)},$.interleaveWithNodeStream=function($){return D(3)},e}(),Je=function($){var et=eo.forwardRef(function(et,en){var er=Oe(et,(0,eo.useContext)(eX),$.defaultProps);return eo.createElement($,y({},et,{theme:er,ref:en}))});return em()(et,$),et.displayName="WithTheme("+b($)+")",et},Xe=function(){return(0,eo.useContext)(eX)},e5={StyleSheet:eD,masterSheet:eq},e3=qe},53250:function($,et,en){"use strict";/** 1869 * @license React 1870 * use-sync-external-store-shim.production.min.js 1871 * 1872 * Copyright (c) Facebook, Inc. and its affiliates. 1873 * 1874 * This source code is licensed under the MIT license found in the 1875 * LICENSE file in the root directory of this source tree. 1876 */var er=en(67294),ei="function"==typeof Object.is?Object.is:function($,et){return $===et&&(0!==$||1/$==1/et)||$!=$&&et!=et},eo=er.useState,es=er.useEffect,el=er.useLayoutEffect,eu=er.useDebugValue;function r($){var et=$.getSnapshot;$=$.value;try{var en=et();return!ei($,en)}catch($){return!0}}var ed="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function($,et){return et()}:function($,et){var en=et(),er=eo({inst:{value:en,getSnapshot:et}}),ei=er[0].inst,ed=er[1];return el(function(){ei.value=en,ei.getSnapshot=et,r(ei)&&ed({inst:ei})},[$,en,et]),es(function(){return r(ei)&&ed({inst:ei}),$(function(){r(ei)&&ed({inst:ei})})},[$]),eu(en),en};et.useSyncExternalStore=void 0!==er.useSyncExternalStore?er.useSyncExternalStore:ed},50139:function($,et,en){"use strict";/** 1877 * @license React 1878 * use-sync-external-store-shim/with-selector.production.min.js 1879 * 1880 * Copyright (c) Facebook, Inc. and its affiliates. 1881 * 1882 * This source code is licensed under the MIT license found in the 1883 * LICENSE file in the root directory of this source tree. 1884 */var er=en(67294),ei=en(61688),eo="function"==typeof Object.is?Object.is:function($,et){return $===et&&(0!==$||1/$==1/et)||$!=$&&et!=et},es=ei.useSyncExternalStore,el=er.useRef,eu=er.useEffect,ed=er.useMemo,eh=er.useDebugValue;et.useSyncExternalStoreWithSelector=function($,et,en,er,ei){var ep=el(null);if(null===ep.current){var em={hasValue:!1,value:null};ep.current=em}else em=ep.current;var ef=es($,(ep=ed(function(){function a(et){if(!el){if(el=!0,$=et,et=er(et),void 0!==ei&&em.hasValue){var en=em.value;if(ei(en,et))return es=en}return es=et}if(en=es,eo($,et))return en;var eu=er(et);return void 0!==ei&&ei(en,eu)?en:($=et,es=eu)}var $,es,el=!1,eu=void 0===en?null:en;return[function(){return a(et())},null===eu?void 0:function(){return a(eu())}]},[et,en,er,ei]))[0],ep[1]);return eu(function(){em.hasValue=!0,em.value=ef},[ef]),eh(ef),ef}},61688:function($,et,en){"use strict";$.exports=en(53250)},52798:function($,et,en){"use strict";$.exports=en(50139)},32746:function($,et,en){"use strict";$.exports.jsxRuntime=en(85893)},33310:function($,et,en){"use strict";en.d(et,{C6:function(){return getApps},Jn:function(){return ev},KN:function(){return registerVersion},Mq:function(){return getApp},Xd:function(){return _registerComponent},ZF:function(){return initializeApp},qX:function(){return _getProvider},rh:function(){return _isFirebaseServerApp}});var er=en(75),ei=en(44645),eo=en(99711),es=en(26531);/** 1885 * @license 1886 * Copyright 2019 Google LLC 1887 * 1888 * Licensed under the Apache License, Version 2.0 (the "License");
1889 * you may not use this file except in compliance with the License. 1890 * You may obtain a copy of the License at 1891 * 1892 * http://www.apache.org/licenses/LICENSE-2.0 1893 * 1894 * Unless required by applicable law or agreed to in writing, software 1895 * distributed under the License is distributed on an "AS IS" BASIS, 1896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1897 * See the License for the specific language governing permissions and 1898 * limitations under the License. 1899 */let PlatformLoggerServiceImpl=class PlatformLoggerServiceImpl{constructor($){this.container=$}getPlatformInfoString(){let $=this.container.getProviders();return $.map($=>{if(!function($){let et=$.getComponent();return et?.type==="VERSION"}($))return null;{let et=$.getImmediate();return`${et.library}/${et.version}`}}).filter($=>$).join(" ")}};let el="@firebase/app",eu="0.14.6",ed=new ei.Yd("@firebase/app"),eh="[DEFAULT]",ep={[el]:"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/ai":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},em=new Map,ef=new Map,eg=new Map;function _addComponent($,et){try{$.container.addComponent(et)}catch(en){ed.debug(`Component ${et.name} failed to register with FirebaseApp ${$.name}`,en)}}function _registerComponent($){let et=$.name;if(eg.has(et))return ed.debug(`There were multiple attempts to register component ${et}.`),!1;
1899for(let en of(eg.set(et,$),em.values()))_addComponent(en,$);for(let et of ef.values())_addComponent(et,$);return!0}function _getProvider($,et){let en=$.container.getProvider("heartbeat").getImmediate({optional:!0});return en&&en.triggerHeartbeat(),$.container.getProvider(et)}function _isFirebaseServerApp($){return null!=$&&void 0!==$.settings}let ey=new eo.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});/** 1900 * @license 1901 * Copyright 2019 Google LLC 1902 * 1903 * Licensed under the Apache License, Version 2.0 (the "License"); 1904 * you may not use this file except in compliance with the License. 1905 * You may obtain a copy of the License at 1906 * 1907 * http://www.apache.org/licenses/LICENSE-2.0 1908 * 1909 * Unless required by applicable law or agreed to in writing, software 1910 * distributed under the License is distributed on an "AS IS" BASIS, 1911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1912 * See the License for the specific language governing permissions and 1913 * limitations under the License. 1914 */let FirebaseAppImpl=class FirebaseAppImpl{constructor($,et,en){this._isDeleted=!1,this._options={...$},this._config={...et},this._name=et.name,this._automaticDataCollectionEnabled=et.automaticDataCollectionEnabled,this._container=en,this.container.addComponent(new er.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled($){this.checkDestroyed(),this._automaticDataCollectionEnabled=$}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($){this._isDeleted=$}checkDestroyed(){if(this.isDeleted)throw ey.create("app-deleted",{appName:this._name})}};/** 1915 * @license 1916 * Copyright 2019 Google LLC 1917 * 1918 * Licensed under the Apache License, Version 2.0 (the "License"); 1919 * you may not use this file except in compliance with the License. 1920 * You may obtain a copy of the License at 1921 * 1922 * http://www.apache.org/licenses/LICENSE-2.0 1923 * 1924 * Unless required by applicable law or agreed to in writing, software 1925 * distributed under the License is distributed on an "AS IS" BASIS, 1926 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1927 * See the License for the specific language governing permissions and 1928 * limitations under the License. 1929 */let ev="12.6.0";function initializeApp($,et={}){let en=$;if("object"!=typeof et){let $=et;et={name:$}}let ei={name:eh,automaticDataCollectionEnabled:!0,...et},es=ei.name;if("string"!=typeof es||!es)throw ey.create("bad-app-name",{appName:String(es)});if(en||(en=(0,eo.aH)()),!en)throw ey.create("no-options");let el=em.get(es);if(el){if((0,eo.vZ)(en,el.options)&&(0,eo.vZ)(ei,el.config))return el;throw ey.create("duplicate-app",{appName:es})}let eu=new er.H0(es);for(let $ of eg.values())eu.addComponent($);let ed=new FirebaseAppImpl(en,ei,eu);return em.set(es,ed),ed}function getApp($=eh){let et=em.get($);if(!et&&$===eh&&(0,eo.aH)())return initializeApp();if(!et)throw ey.create("no-app",{appName:$});return et}function getApps(){return Array.from(em.values())}function registerVersion($,et,en){let ei=ep[$]??$;en&&(ei+=`-${en}`);let eo=ei.match(/\s|\//),es=et.match(/\s|\//);if(eo||es){let $=[`Unable to register library "${ei}" with version "${et}":`];eo&&$.push(`library name "${ei}" contains illegal characters (whitespace or "/")`),eo&&es&&$.push("and"),es&&$.push(`version name "${et}" contains illegal characters (whitespace or "/")`),ed.warn($.join(" "));return}_registerComponent(new er.wA(`${ei}-version`,()=>({library:ei,version:et}),"VERSION"))}let ex="firebase-heartbeat-store",e_=null;function getDbPromise(){return e_||(e_=(0,es.X3)("firebase-heartbeat-database",1,{upgrade:($,et)=>{if(0===et)try{$.createObjectStore(ex)}catch($){console.warn($)}}}).catch($=>{throw ey.create("idb-open",{originalErrorMessage:$.message})})),e_}async function readHeartbeatsFromIndexedDB($){try{let et=await getDbPromise(),en=et.transaction(ex),er=await en.objectStore(ex).get(computeKey($));return await en.done,er}catch($){if($ instanceof eo.ZR)ed.warn($.message);else{let et=ey.create("idb-get",{originalErrorMessage:$?.message});ed.warn(et.message)}}}async function writeHeartbeatsToIndexedDB($,et){try{let en=await getDbPromise(),er=en.transaction(ex,"readwrite"),ei=er.objectStore(ex);await ei.put(et,computeKey($)),await er.done}catch($){if($ instanceof eo.ZR)ed.warn($.message);else{let et=ey.create("idb-set",{originalErrorMessage:$?.message});ed.warn(et.message)}}}function computeKey($){return`${$.name}!${$.options.appId}`}let HeartbeatServiceImpl=class HeartbeatServiceImpl{constructor($){this.container=$,this._heartbeatsCache=null;let et=this.container.getProvider("app").getImmediate();this._storage=new HeartbeatStorageImpl(et),this._heartbeatsCachePromise=this._storage.read().then($=>(this._heartbeatsCache=$,$))}async triggerHeartbeat(){try{let $=this.container.getProvider("platform-logger").getImmediate(),et=$.getPlatformInfoString(),en=getUTCDateString();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===en||this._heartbeatsCache.heartbeats.some($=>$.date===en))return;if(this._heartbeatsCache.heartbeats.push({date:en,agent:et}),this._heartbeatsCache.heartbeats.length>30){let $=function($){if(0===$.length)return -1;let et=0,en=$[0].date;for(let er=1;er<$.length;er++)$[er].date<en&&(en=$[er].date,et=er);return et}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice($,1)}return this._storage.overwrite(this._heartbeatsCache)}catch($){ed.warn($)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||0===this._heartbeatsCache.heartbeats.length)return"";let $=getUTCDateString(),{heartbeatsToSend:et,unsentEntries:en}=function($,et=1024){let en=[],er=$.slice();for(let ei of $){let $=en.find($=>$.agent===ei.agent);if($){if($.dates.push(ei.date),countBytes(en)>et){$.dates.pop();break}}else if(en.push({agent:ei.agent,dates:[ei.date]}),countBytes(en)>et){en.pop();break}er=er.slice(1)}return{heartbeatsToSend:en,unsentEntries:er}}(this._heartbeatsCache.heartbeats),er=(0,eo.L)(JSON.stringify({version:2,heartbeats:et}));return this._heartbeatsCache.lastSentHeartbeatDate=$,en.length>0?(this._heartbeatsCache.heartbeats=en,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),er}catch($){return ed.warn($),""}}};function getUTCDateString(){let $=new Date;return $.toISOString().substring(0,10)}let HeartbeatStorageImpl=class HeartbeatStorageImpl{constructor($){this.app=$,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,eo.hl)()&&(0,eo.eu)().then(()=>!0).catch(()=>!1)}async read(){let $=await this._canUseIndexedDBPromise;if(!$)return{heartbeats:[]};{let $=await readHeartbeatsFromIndexedDB(this.app);return $?.heartbeats?$:{heartbeats:[]}}}async overwrite($){let et=await this._canUseIndexedDBPromise;if(et){let et=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:$.lastSentHeartbeatDate??et.lastSentHeartbeatDate,heartbeats:$.heartbeats})}}async add($){let et=await this._canUseIndexedDBPromise;if(et){let et=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:$.lastSentHeartbeatDate??et.lastSentHeartbeatDate,heartbeats:[...et.heartbeats,...$.heartbeats]})}}};function countBytes($){return(0,eo.L)(JSON.stringify({version:2,heartbeats:$})).length}_registerComponent(new er.wA("platform-logger",$=>new PlatformLoggerServiceImpl($),"PRIVATE")),_registerComponent(new er.wA("heartbeat",$=>new HeartbeatServiceImpl($),"PRIVATE")),registerVersion(el,eu,""),registerVersion(el,eu,"esm2020"),registerVersion("fire-js","")},75:function($,et,en){"use strict";en.d(et,{H0:function(){return ComponentContainer},wA:function(){return Component}});var er=en(99711);let Component=class Component{constructor($,et,en){this.name=$,this.instanceFactory=et,this.type=en,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode($){return this.instantiationMode=$,this}setMultipleInstances($){return this.multipleInstances=$,this}setServiceProps($){return this.serviceProps=$,this}setInstanceCreatedCallback($){return this.onInstanceCreated=$,this}};/** 1930 * @license 1931 * Copyright 2019 Google LLC 1932 * 1933 * Licensed under the Apache License, Version 2.0 (the "License");
1934 * you may not use this file except in compliance with the License. 1935 * You may obtain a copy of the License at 1936 * 1937 * http://www.apache.org/licenses/LICENSE-2.0 1938 * 1939 * Unless required by applicable law or agreed to in writing, software 1940 * distributed under the License is distributed on an "AS IS" BASIS, 1941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1942 * See the License for the specific language governing permissions and 1943 * limitations under the License. 1944 */let ei="[DEFAULT]";/** 1945 * @license 1946 * Copyright 2019 Google LLC 1947 * 1948 * Licensed under the Apache License, Version 2.0 (the "License"); 1949 * you may not use this file except in compliance with the License. 1950 * You may obtain a copy of the License at 1951 * 1952 * http://www.apache.org/licenses/LICENSE-2.0 1953 * 1954 * Unless required by applicable law or agreed to in writing, software 1955 * distributed under the License is distributed on an "AS IS" BASIS, 1956 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1957 * See the License for the specific language governing permissions and 1958 * limitations under the License. 1959 */let Provider=class Provider{constructor($,et){this.name=$,this.container=et,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get($){let et=this.normalizeInstanceIdentifier($);if(!this.instancesDeferred.has(et)){let $=new er.BH;if(this.instancesDeferred.set(et,$),this.isInitialized(et)||this.shouldAutoInitialize())try{let en=this.getOrInitializeService({instanceIdentifier:et});en&&$.resolve(en)}catch($){}}return this.instancesDeferred.get(et).promise}getImmediate($){let et=this.normalizeInstanceIdentifier($?.identifier),en=$?.optional??!1;if(this.isInitialized(et)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:et})}catch($){if(en)return null;throw $}else{if(en)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent($){if($.name!==this.name)throw Error(`Mismatching Component ${$.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=$,this.shouldAutoInitialize()){if("EAGER"===$.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:ei})}catch($){}for(let[$,et]of this.instancesDeferred.entries()){let en=this.normalizeInstanceIdentifier($);try{let $=this.getOrInitializeService({instanceIdentifier:en});et.resolve($)}catch($){}}}}clearInstance($=ei){this.instancesDeferred.delete($),this.instancesOptions.delete($),this.instances.delete($)}async delete(){let $=Array.from(this.instances.values());await Promise.all([...$.filter($=>"INTERNAL"in $).map($=>$.INTERNAL.delete()),...$.filter($=>"_delete"in $).map($=>$._delete())])}isComponentSet(){return null!=this.component}isInitialized($=ei){return this.instances.has($)}getOptions($=ei){return this.instancesOptions.get($)||{}}initialize($={}){let{options:et={}}=$,en=this.normalizeInstanceIdentifier($.instanceIdentifier);if(this.isInitialized(en))throw Error(`${this.name}(${en}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let er=this.getOrInitializeService({instanceIdentifier:en,options:et});for(let[$,et]of this.instancesDeferred.entries()){let ei=this.normalizeInstanceIdentifier($);en===ei&&et.resolve(er)}return er}onInit($,et){let en=this.normalizeInstanceIdentifier(et),er=this.onInitCallbacks.get(en)??new Set;er.add($),this.onInitCallbacks.set(en,er);let ei=this.instances.get(en);return ei&&$(ei,en),()=>{er.delete($)}}invokeOnInitCallbacks($,et){let en=this.onInitCallbacks.get(et);if(en)for(let er of en)try{er($,et)}catch{}}getOrInitializeService({instanceIdentifier:$,options:et={}}){let en=this.instances.get($);if(!en&&this.component&&(en=this.component.instanceFactory(this.container,{instanceIdentifier:$===ei?void 0:$,options:et}),this.instances.set($,en),this.instancesOptions.set($,et),this.invokeOnInitCallbacks(en,$),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,$,en)}catch{}return en||null}normalizeInstanceIdentifier($=ei){return this.component?this.component.multipleInstances?$:ei:$}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}};/** 1960 * @license 1961 * Copyright 2019 Google LLC 1962 * 1963 * Licensed under the Apache License, Version 2.0 (the "License");
1964 * you may not use this file except in compliance with the License. 1965 * You may obtain a copy of the License at 1966 * 1967 * http://www.apache.org/licenses/LICENSE-2.0 1968 * 1969 * Unless required by applicable law or agreed to in writing, software 1970 * distributed under the License is distributed on an "AS IS" BASIS, 1971 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1972 * See the License for the specific language governing permissions and 1973 * limitations under the License. 1974 */let ComponentContainer=class ComponentContainer{constructor($){this.name=$,this.providers=new Map}addComponent($){let et=this.getProvider($.name);if(et.isComponentSet())throw Error(`Component ${$.name} has already been registered with ${this.name}`);et.setComponent($)}addOrOverwriteComponent($){let et=this.getProvider($.name);et.isComponentSet()&&this.providers.delete($.name),this.addComponent($)}getProvider($){if(this.providers.has($))return this.providers.get($);let et=new Provider($,this);return this.providers.set($,et),et}getProviders(){return Array.from(this.providers.values())}}},44645:function($,et,en){"use strict";var er,ei;en.d(et,{Yd:function(){return Logger},in:function(){return er}});/** 1975 * @license 1976 * Copyright 2017 Google LLC 1977 * 1978 * Licensed under the Apache License, Version 2.0 (the "License"); 1979 * you may not use this file except in compliance with the License. 1980 * You may obtain a copy of the License at 1981 * 1982 * http://www.apache.org/licenses/LICENSE-2.0 1983 * 1984 * Unless required by applicable law or agreed to in writing, software 1985 * distributed under the License is distributed on an "AS IS" BASIS, 1986 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1987 * See the License for the specific language governing permissions and 1988 * limitations under the License. 1989 */let eo=[];(ei=er||(er={}))[ei.DEBUG=0]="DEBUG",ei[ei.VERBOSE=1]="VERBOSE",ei[ei.INFO=2]="INFO",ei[ei.WARN=3]="WARN",ei[ei.ERROR=4]="ERROR",ei[ei.SILENT=5]="SILENT";let es={debug:er.DEBUG,verbose:er.VERBOSE,info:er.INFO,warn:er.WARN,error:er.ERROR,silent:er.SILENT},el=er.INFO,eu={[er.DEBUG]:"log",[er.VERBOSE]:"log",[er.INFO]:"info",[er.WARN]:"warn",[er.ERROR]:"error"},defaultLogHandler=($,et,...en)=>{if(et<$.logLevel)return;let er=new Date().toISOString(),ei=eu[et];if(ei)console[ei](`[${er}] ${$.name}:`,...en);else throw Error(`Attempted to log a message with an invalid logType (value: ${et})`)};let Logger=class Logger{constructor($){this.name=$,this._logLevel=el,this._logHandler=defaultLogHandler,this._userLogHandler=null,eo.push(this)}get logLevel(){return this._logLevel}set logLevel($){if(!($ in er))throw TypeError(`Invalid value "${$}" assigned to \`logLevel\``);this._logLevel=$}setLogLevel($){this._logLevel="string"==typeof $?es[$]:$}get logHandler(){return this._logHandler}set logHandler($){if("function"!=typeof $)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=$}get userLogHandler(){return this._userLogHandler}set userLogHandler($){this._userLogHandler=$}debug(...$){this._userLogHandler&&this._userLogHandler(this,er.DEBUG,...$),this._logHandler(this,er.DEBUG,...$)}log(...$){this._userLogHandler&&this._userLogHandler(this,er.VERBOSE,...$),this._logHandler(this,er.VERBOSE,...$)}info(...$){this._userLogHandler&&this._userLogHandler(this,er.INFO,...$),this._logHandler(this,er.INFO,...$)}warn(...$){this._userLogHandler&&this._userLogHandler(this,er.WARN,...$),this._logHandler(this,er.WARN,...$)}error(...$){this._userLogHandler&&this._userLogHandler(this,er.ERROR,...$),this._logHandler(this,er.ERROR,...$)}}},82729:function($,et,en){"use strict";function _tagged_template_literal($,et){return et||(et=$.slice(0)),Object.freeze(Object.defineProperties($,{raw:{value:Object.freeze(et)}}))}en.d(et,{_:function(){return _tagged_template_literal}})},87066:function($,et,en){"use strict";en.d(et,{Z:function(){return tx}});var er,ei,eo,es,el,eu,ed,eh,ep={};function bind($,et){return function(){return $.apply(et,arguments)}}en.r(ep),en.d(ep,{hasBrowserEnv:function(){return e0},hasStandardBrowserEnv:function(){return e2},hasStandardBrowserWebWorkerEnv:function(){return e5},navigator:function(){return e1},origin:function(){return e3}});var em=en(34155);let{toString:ef}=Object.prototype,{getPrototypeOf:eg}=Object,{iterator:ey,toStringTag:ev}=Symbol,ex=(el=Object.create(null),$=>{let et=ef.call($);return el[et]||(el[et]=et.slice(8,-1).toLowerCase())}),kindOfTest=$=>($=$.toLowerCase(),et=>ex(et)===$),typeOfTest=$=>et=>typeof et===$,{isArray:e_}=Array,ew=typeOfTest("undefined");function isBuffer($){return null!==$&&!ew($)&&null!==$.constructor&&!ew($.constructor)&&eE($.constructor.isBuffer)&&$.constructor.isBuffer($)}let ek=kindOfTest("ArrayBuffer"),eC=typeOfTest("string"),eE=typeOfTest("function"),eI=typeOfTest("number"),isObject=$=>null!==$&&"object"==typeof $,isPlainObject=$=>{if("object"!==ex($))return!1;let et=eg($);return(null===et||et===Object.prototype||null===Object.getPrototypeOf(et))&&!(ev in $)&&!(ey in $)},eS=kindOfTest("Date"),eT=kindOfTest("File"),eA=kindOfTest("Blob"),eP=kindOfTest("FileList"),eN=kindOfTest("URLSearchParams"),[ej,eR,eV,eD]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach($,et,{allOwnKeys:en=!1}={}){let er,ei;if(null!=$){if("object"!=typeof $&&($=[$]),e_($))for(er=0,ei=$.length;er<ei;er++)et.call(null,$[er],er,$);else{let ei;if(isBuffer($))return;let eo=en?Object.getOwnPropertyNames($):Object.keys($),es=eo.length;for(er=0;er<es;er++)ei=eo[er],et.call(null,$[ei],ei,$)}}}function findKey($,et){let en;if(isBuffer($))return null;et=et.toLowerCase();let er=Object.keys($),ei=er.length;for(;ei-- >0;)if(et===(en=er[ei]).toLowerCase())return en;return null}let eO="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=$=>!ew($)&&$!==eO,eM=(eu="undefined"!=typeof Uint8Array&&eg(Uint8Array),$=>eu&&$ instanceof eu),eF=kindOfTest("HTMLFormElement"),eL=(({hasOwnProperty:$})=>(et,en)=>$.call(et,en))(Object.prototype),eH=kindOfTest("RegExp"),reduceDescriptors=($,et)=>{let en=Object.getOwnPropertyDescriptors($),er={};forEach(en,(en,ei)=>{let eo;!1!==(eo=et(en,ei,$))&&(er[ei]=eo||en)}),Object.defineProperties($,er)},eB=kindOfTest("AsyncFunction"),eU=(er="function"==typeof setImmediate,ei=eE(eO.postMessage),er?setImmediate:ei?(eo=`axios@${Math.random()}`,es=[],eO.addEventListener("message",({source:$,data:et})=>{$===eO&&et===eo&&es.length&&es.shift()()},!1),$=>{es.push($),eO.postMessage(eo,"*")}):$=>setTimeout($)),ez="undefined"!=typeof queueMicrotask?queueMicrotask.bind(eO):void 0!==em&&em.nextTick||eU;var eq={isArray:e_,isArrayBuffer:ek,isBuffer,isFormData:$=>{let et;return $&&("function"==typeof FormData&&$ instanceof FormData||eE($.a
1989ppend)&&("formdata"===(et=ex($))||"object"===et&&eE($.toString)&&"[object FormData]"===$.toString()))},isArrayBufferView:function($){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView($):$&&$.buffer&&ek($.buffer)},isString:eC,isNumber:eI,isBoolean:$=>!0===$||!1===$,isObject,isPlainObject,isEmptyObject:$=>{if(!isObject($)||isBuffer($))return!1;try{return 0===Object.keys($).length&&Object.getPrototypeOf($)===Object.prototype}catch($){return!1}},isReadableStream:ej,isRequest:eR,isResponse:eV,isHeaders:eD,isUndefined:ew,isDate:eS,isFile:eT,isBlob:eA,isRegExp:eH,isFunction:eE,isStream:$=>isObject($)&&eE($.pipe),isURLSearchParams:eN,isTypedArray:eM,isFileList:eP,forEach,merge:function merge(){let{caseless:$,skipUndefined:et}=isContextDefined(this)&&this||{},en={},assignValue=(er,ei)=>{if("__proto__"===ei||"constructor"===ei||"prototype"===ei)return;let eo=$&&findKey(en,ei)||ei;isPlainObject(en[eo])&&isPlainObject(er)?en[eo]=merge(en[eo],er):isPlainObject(er)?en[eo]=merge({},er):e_(er)?en[eo]=er.slice():et&&ew(er)||(en[eo]=er)};for(let $=0,et=arguments.length;$<et;$++)arguments[$]&&forEach(arguments[$],assignValue);return en},extend:($,et,en,{allOwnKeys:er}={})=>(forEach(et,(et,er)=>{en&&eE(et)?Object.defineProperty($,er,{value:bind(et,en),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty($,er,{value:et,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:er}),$),trim:$=>$.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:$=>(65279===$.charCodeAt(0)&&($=$.slice(1)),$),inherits:($,et,en,er)=>{$.prototype=Object.create(et.prototype,er),Object.defineProperty($.prototype,"constructor",{value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{value:et.prototype}),en&&Object.assign($.prototype,en)},toFlatObject:($,et,en,er)=>{let ei,eo,es;let el={};if(et=et||{},null==$)return et;do{for(eo=(ei=Object.getOwnPropertyNames($)).length;eo-- >0;)es=ei[eo],(!er||er(es,$,et))&&!el[es]&&(et[es]=$[es],el[es]=!0);$=!1!==en&&eg($)}while($&&(!en||en($,et))&&$!==Object.prototype);return et},kindOf:ex,kindOfTest,endsWith:($,et,en)=>{$=String($),(void 0===en||en>$.length)&&(en=$.length),en-=et.length;let er=$.indexOf(et,en);return -1!==er&&er===en},toArray:$=>{if(!$)return null;if(e_($))return $;let et=$.length;if(!eI(et))return null;let en=Array(et);for(;et-- >0;)en[et]=$[et];return en},forEachEntry:($,et)=>{let en;let er=$&&$[ey],ei=er.call($);for(;(en=ei.next())&&!en.done;){let er=en.value;et.call($,er[0],er[1])}},matchAll:($,et)=>{let en;let er=[];for(;null!==(en=$.exec(et));)er.push(en);return er},isHTMLForm:eF,hasOwnProperty:eL,hasOwnProp:eL,reduceDescriptors,freezeMethods:$=>{reduceDescriptors($,(et,en)=>{if(eE($)&&-1!==["arguments","caller","callee"].indexOf(en))return!1;let er=$[en];if(eE(er)){if(et.enumerable=!1,"writable"in et){et.writable=!1;return}et.set||(et.set=()=>{throw Error("Can not rewrite read-only method '"+en+"'")})}})},toObjectSet:($,et)=>{let en={};return($=>{$.forEach($=>{en[$]=!0})})(e_($)?$:String($).split(et)),en},toCamelCase:$=>$.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function($,et,en){return et.toUpperCase()+en}),noop:()=>{},toFiniteNumber:($,et)=>null!=$&&Number.isFinite($=+$)?$:et,findKey,global:eO,isContextDefined,isSpecCompliantForm:function($){return!!($&&eE($.append)&&"FormData"===$[ev]&&$[ey])},toJSONObject:$=>{let et=Array(10),visit=($,en)=>{if(isObject($)){if(et.indexOf($)>=0)return;if(isBuffer($))return $;if(!("toJSON"in $)){et[en]=$;let er=e_($)?[]:{};return forEach($,($,et)=>{let ei=visit($,en+1);ew(ei)||(er[et]=ei)}),et[en]=void 0,er}}return $};return visit($,0)},isAsyncFn:eB,isThenable:$=>$&&(isObject($)||eE($))&&eE($.then)&&eE($.catch),setImmediate:eU,asap:ez,isIterable:$=>null!=$&&eE($[ey])};let AxiosError=class AxiosError extends Error{static from($,et,en,er,ei,eo){let es=new AxiosError($.message,et||$.code,en,er,ei);return es.cause=$,es.name=$.name,eo&&Object.assign(es,eo),es}constructor($,et,en,er,ei){super($),this.name="AxiosError",this.isAxiosError=!0,et&&(this.code=et),en&&(this.config=en),er&&(this.request=er),ei&&(this.response=ei,this.status=ei.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eq.toJSONObject(this.config),code:this.code,status:this.status}}};AxiosError.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",AxiosError.ERR_BAD_OPTION="ERR_BAD_OPTION",AxiosError.ECONNABORTED="ECONNABORTED",AxiosError.ETIMEDOUT="ETIMEDOUT",AxiosError.ERR_NETWORK="ERR_NETWORK",AxiosError.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",AxiosError.ERR_DEPRECATED="ERR_DEPRECATED",AxiosError.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",AxiosError.ERR_BAD_REQUEST="ERR_BAD_REQUEST",AxiosError.ERR_CANCELED="ERR_CANCELED",AxiosError.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",AxiosError.ERR_INVALID_URL="ERR_INVALID_URL";var eZ=AxiosError,eW=en(48764).Buffer;function isVisitable($){return eq.isPlainObject($)||eq.isArray($)}function removeBrackets($){return eq.endsWith($,"[]")?$.slice(0,-2):$}function renderKey($,et,en){return $?$.concat(et).map(function($,et){return $=removeBrackets($),!en&&et?"["+$+"]":$}).join(en?".":""):et}let eG=eq.toFlatObject(eq,{},null,function($){return/^is[A-Z]/.test($)});
1989var helpers_toFormData=function($,et,en){if(!eq.isObject($))throw TypeError("target must be an object");et=et||new FormData,en=eq.toFlatObject(en,{metaTokens:!0,dots:!1,indexes:!1},!1,function($,et){return!eq.isUndefined(et[$])});let er=en.metaTokens,ei=en.visitor||defaultVisitor,eo=en.dots,es=en.indexes,el=en.Blob||"undefined"!=typeof Blob&&Blob,eu=el&&eq.isSpecCompliantForm(et);if(!eq.isFunction(ei))throw TypeError("visitor must be a function");function convertValue($){if(null===$)return"";if(eq.isDate($))return $.toISOString();if(eq.isBoolean($))return $.toString();if(!eu&&eq.isBlob($))throw new eZ("Blob is not supported. Use a Buffer instead.");return eq.isArrayBuffer($)||eq.isTypedArray($)?eu&&"function"==typeof Blob?new Blob([$]):eW.from($):$}function defaultVisitor($,en,ei){let el=$;if($&&!ei&&"object"==typeof $){if(eq.endsWith(en,"{}"))en=er?en:en.slice(0,-2),$=JSON.stringify($);else{var eu;if(eq.isArray($)&&(eu=$,eq.isArray(eu)&&!eu.some(isVisitable))||(eq.isFileList($)||eq.endsWith(en,"[]"))&&(el=eq.toArray($)))return en=removeBrackets(en),el.forEach(function($,er){eq.isUndefined($)||null===$||et.append(!0===es?renderKey([en],er,eo):null===es?en:en+"[]",convertValue($))}),!1}}return!!isVisitable($)||(et.append(renderKey(ei,en,eo),convertValue($)),!1)}let ed=[],eh=Object.assign(eG,{defaultVisitor,convertValue,isVisitable});if(!eq.isObject($))throw TypeError("data must be an object");return!function build($,en){if(!eq.isUndefined($)){if(-1!==ed.indexOf($))throw Error("Circular reference detected in "+en.join("."));ed.push($),eq.forEach($,function($,er){let eo=!(eq.isUndefined($)||null===$)&&ei.call(et,$,eq.isString(er)?er.trim():er,en,eh);!0===eo&&build($,en?en.concat(er):[er])}),ed.pop()}}($),et};function encode($){let et={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent($).replace(/[!'()~]|%20|%00/g,function($){return et[$]})}function AxiosURLSearchParams($,et){this._pairs=[],$&&helpers_toFormData($,this,et)}let e$=AxiosURLSearchParams.prototype;function buildURL_encode($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL($,et,en){let er;if(!et)return $;let ei=en&&en.encode||buildURL_encode,eo=eq.isFunction(en)?{serialize:en}:en,es=eo&&eo.serialize;if(er=es?es(et,eo):eq.isURLSearchParams(et)?et.toString():new AxiosURLSearchParams(et,eo).toString(ei)){let et=$.indexOf("#");-1!==et&&($=$.slice(0,et)),$+=(-1===$.indexOf("?")?"?":"&")+er}return $}e$.append=function($,et){this._pairs.push([$,et])},e$.toString=function($){let et=$?function(et){return $.call(this,et,encode)}:encode;return this._pairs.map(function($){return et($[0])+"="+et($[1])},"").join("&")};var eJ=class{constructor(){this.handlers=[]}use($,et,en){return this.handlers.push({fulfilled:$,rejected:et,synchronous:!!en&&en.synchronous,runWhen:en?en.runWhen:null}),this.handlers.length-1}eject($){this.handlers[$]&&(this.handlers[$]=null)}clear(){this.handlers&&(this.handlers=[])}forEach($){eq.forEach(this.handlers,function(et){null!==et&&$(et)})}},eK={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},eQ="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,eX="undefined"!=typeof FormData?FormData:null,eY="undefined"!=typeof Blob?Blob:null;let e0="undefined"!=typeof window&&"undefined"!=typeof document,e1="object"==typeof navigator&&navigator||void 0,e2=e0&&(!e1||0>["ReactNative","NativeScript","NS"].indexOf(e1.product)),e5="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,e3=e0&&window.location.href||"http://localhost";var e6={...ep,isBrowser:!0,classes:{URLSearchParams:eQ,FormData:eX,Blob:eY},protocols:["http","https","file","blob","url","data"]},helpers_formDataToJSON=function($){if(eq.isFormData($)&&eq.isFunction($.entries)){let et={};return eq.forEachEntry($,($,en)=>{!function buildPath($,et,en,er){let ei=$[er++];if("__proto__"===ei)return!0;let eo=Number.isFinite(+ei),es=er>=$.length;if(ei=!ei&&eq.isArray(en)?en.length:ei,es)return eq.hasOwnProp(en,ei)?en[ei]=[en[ei],et]:en[ei]=et,!eo;en[ei]&&eq.isObject(en[ei])||(en[ei]=[]);let el=buildPath($,et,en[ei],er);return el&&eq.isArray(en[ei])&&(en[ei]=function($){let et,en;let er={},ei=Object.keys($),eo=ei.length;for(et=0;et<eo;et++)er[en=ei[et]]=$[en];return er}(en[ei])),!eo}(eq.matchAll(/\w+|\[(\w*)]/g,$).map($=>"[]"===$[0]?"":$[1]||$[0]),en,et,0)}),et}return null};let e4={transitional:eK,adapter:["xhr","http","fetch"],transformRequest:[function($,et){let en;let er=et.getContentType()||"",ei=er.indexOf("application/json")>-1,eo=eq.isObject($);
1989eo&&eq.isHTMLForm($)&&($=new FormData($));let es=eq.isFormData($);if(es)return ei?JSON.stringify(helpers_formDataToJSON($)):$;if(eq.isArrayBuffer($)||eq.isBuffer($)||eq.isStream($)||eq.isFile($)||eq.isBlob($)||eq.isReadableStream($))return $;if(eq.isArrayBufferView($))return $.buffer;if(eq.isURLSearchParams($))return et.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();if(eo){if(er.indexOf("application/x-www-form-urlencoded")>-1){var el,eu;return(el=$,eu=this.formSerializer,helpers_toFormData(el,new e6.classes.URLSearchParams,{visitor:function($,et,en,er){return e6.isNode&&eq.isBuffer($)?(this.append(et,$.toString("base64")),!1):er.defaultVisitor.apply(this,arguments)},...eu})).toString()}if((en=eq.isFileList($))||er.indexOf("multipart/form-data")>-1){let et=this.env&&this.env.FormData;return helpers_toFormData(en?{"files[]":$}:$,et&&new et,this.formSerializer)}}return eo||ei?(et.setContentType("application/json",!1),function($,et,en){if(eq.isString($))try{return(0,JSON.parse)($),eq.trim($)}catch($){if("SyntaxError"!==$.name)throw $}return(0,JSON.stringify)($)}($)):$}],transformResponse:[function($){let et=this.transitional||e4.transitional,en=et&&et.forcedJSONParsing,er="json"===this.responseType;if(eq.isResponse($)||eq.isReadableStream($))return $;if($&&eq.isString($)&&(en&&!this.responseType||er)){let en=et&&et.silentJSONParsing;try{return JSON.parse($,this.parseReviver)}catch($){if(!en&&er){if("SyntaxError"===$.name)throw eZ.from($,eZ.ERR_BAD_RESPONSE,this,null,this.response);throw $}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:e6.classes.FormData,Blob:e6.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eq.forEach(["delete","get","head","post","put","patch"],$=>{e4.headers[$]={}});let e9=eq.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=$=>{let et,en,er;let ei={};return $&&$.split("\n").forEach(function($){er=$.indexOf(":"),et=$.substring(0,er).trim().toLowerCase(),en=$.substring(er+1).trim(),!et||ei[et]&&e9[et]||("set-cookie"===et?ei[et]?ei[et].push(en):ei[et]=[en]:ei[et]=ei[et]?ei[et]+", "+en:en)}),ei};let e8=Symbol("internals");function normalizeHeader($){return $&&String($).trim().toLowerCase()}function normalizeValue($){return!1===$||null==$?$:eq.isArray($)?$.map(normalizeValue):String($)}let isValidHeaderName=$=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim());function matchHeaderValue($,et,en,er,ei){if(eq.isFunction(er))return er.call(this,et,en);if(ei&&(et=en),eq.isString(et)){if(eq.isString(er))return -1!==et.indexOf(er);if(eq.isRegExp(er))return er.test(et)}}let AxiosHeaders=class AxiosHeaders{constructor($){$&&this.set($)}set($,et,en){let er=this;function setHeader($,et,en){let ei=normalizeHeader(et);if(!ei)throw Error("header name must be a non-empty string");let eo=eq.findKey(er,ei);eo&&void 0!==er[eo]&&!0!==en&&(void 0!==en||!1===er[eo])||(er[eo||et]=normalizeValue($))}let setHeaders=($,et)=>eq.forEach($,($,en)=>setHeader($,en,et));if(eq.isPlainObject($)||$ instanceof this.constructor)setHeaders($,et);else if(eq.isString($)&&($=$.trim())&&!isValidHeaderName($))setHeaders(parseHeaders($),et);else if(eq.isObject($)&&eq.isIterable($)){let en={},er,ei;for(let et of $){if(!eq.isArray(et))throw TypeError("Object iterator must return a key-value pair");en[ei=et[0]]=(er=en[ei])?eq.isArray(er)?[...er,et[1]]:[er,et[1]]:et[1]}setHeaders(en,et)}else null!=$&&setHeader(et,$,en);return this}get($,et){if($=normalizeHeader($)){let en=eq.findKey(this,$);if(en){let $=this[en];if(!et)return $;if(!0===et)return function($){let et;let en=Object.create(null),er=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1989for(;et=er.exec($);)en[et[1]]=et[2];return en}($);if(eq.isFunction(et))return et.call(this,$,en);if(eq.isRegExp(et))return et.exec($);throw TypeError("parser must be boolean|regexp|function")}}}has($,et){if($=normalizeHeader($)){let en=eq.findKey(this,$);return!!(en&&void 0!==this[en]&&(!et||matchHeaderValue(this,this[en],en,et)))}return!1}delete($,et){let en=this,er=!1;function deleteHeader($){if($=normalizeHeader($)){let ei=eq.findKey(en,$);ei&&(!et||matchHeaderValue(en,en[ei],ei,et))&&(delete en[ei],er=!0)}}return eq.isArray($)?$.forEach(deleteHeader):deleteHeader($),er}clear($){let et=Object.keys(this),en=et.length,er=!1;for(;en--;){let ei=et[en];(!$||matchHeaderValue(this,this[ei],ei,$,!0))&&(delete this[ei],er=!0)}return er}normalize($){let et=this,en={};return eq.forEach(this,(er,ei)=>{let eo=eq.findKey(en,ei);if(eo){et[eo]=normalizeValue(er),delete et[ei];return}let es=$?ei.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,($,et,en)=>et.toUpperCase()+en):String(ei).trim();es!==ei&&delete et[ei],et[es]=normalizeValue(er),en[es]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let et=Object.create(null);return eq.forEach(this,(en,er)=>{null!=en&&!1!==en&&(et[er]=$&&eq.isArray(en)?en.join(", "):en)}),et}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,et])=>$+": "+et).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...et){let en=new this($);return et.forEach($=>en.set($)),en}static accessor($){let et=this[e8]=this[e8]={accessors:{}},en=et.accessors,er=this.prototype;function defineAccessor($){let et=normalizeHeader($);en[et]||(!function($,et){let en=eq.toCamelCase(" "+et);["get","set","has"].forEach(er=>{Object.defineProperty($,er+en,{value:function($,en,ei){return this[er].call(this,et,$,en,ei)},configurable:!0})})}(er,$),en[et]=!0)}return eq.isArray($)?$.forEach(defineAccessor):defineAccessor($),this}};function transformData($,et){let en=this||e4,er=et||en,ei=AxiosHeaders.from(er.headers),eo=er.data;return eq.forEach($,function($){eo=$.call(en,eo,ei.normalize(),et?et.status:void 0)}),ei.normalize(),eo}function isCancel($){return!!($&&$.__CANCEL__)}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eq.reduceDescriptors(AxiosHeaders.prototype,({value:$},et)=>{let en=et[0].toUpperCase()+et.slice(1);return{get:()=>$,set($){this[en]=$}}}),eq.freezeMethods(AxiosHeaders);var e7=class extends eZ{constructor($,et,en){super(null==$?"canceled":$,eZ.ERR_CANCELED,et,en),this.name="CanceledError",this.__CANCEL__=!0}};function settle($,et,en){let er=en.config.validateStatus;!en.status||!er||er(en.status)?$(en):et(new eZ("Request failed with status code "+en.status,[eZ.ERR_BAD_REQUEST,eZ.ERR_BAD_RESPONSE][Math.floor(en.status/100)-4],en.config,en.request,en))}var helpers_speedometer=function($,et){let en;$=$||10;let er=Array($),ei=Array($),eo=0,es=0;return et=void 0!==et?et:1e3,function(el){let eu=Date.now(),ed=ei[es];en||(en=eu),er[eo]=el,ei[eo]=eu;let eh=es,ep=0;for(;eh!==eo;)ep+=er[eh++],eh%=$;if((eo=(eo+1)%$)===es&&(es=(es+1)%$),eu-en<et)return;let em=ed&&eu-ed;return em?Math.round(1e3*ep/em):void 0}},helpers_throttle=function($,et){let en,er,ei=0,eo=1e3/et,invoke=(et,eo=Date.now())=>{ei=eo,en=null,er&&(clearTimeout(er),er=null),$(...et)};return[(...$)=>{let et=Date.now(),es=et-ei;es>=eo?invoke($,et):(en=$,er||(er=setTimeout(()=>{er=null,invoke(en)},eo-es)))},()=>en&&invoke(en)]};let progressEventReducer=($,et,en=3)=>{let er=0,ei=helpers_speedometer(50,250);return helpers_throttle(en=>{let eo=en.loaded,es=en.lengthComputable?en.total:void 0,el=eo-er,eu=ei(el),ed=eo<=es;er=eo,$({loaded:eo,total:es,progress:es?eo/es:void 0,bytes:el,rate:eu||void 0,estimated:eu&&es&&ed?(es-eo)/eu:void 0,event:en,lengthComputable:null!=es,[et?"download":"upload"]:!0})},en)},progressEventDecorator=($,et)=>{let en=null!=$;return[er=>et[0]({lengthComputable:en,total:$,loaded:er}),et[1]]},asyncDecorator=$=>(...et)=>eq.asap(()=>$(...et));var tt=e6.hasStandardBrowserEnv?(ed=new URL(e6.origin),eh=e6.navigator&&/(msie|trident)/i.test(e6.navigator.userAgent),$=>($=new URL($,e6.origin),ed.protocol===$.protocol&&ed.host===$.host&&(eh||ed.port===$.port))):()=>!0,tn=e6.hasStandardBrowserEnv?{write($,et,en,er,ei,eo,es){if("undefined"==typeof document)return;let el=[`${$}=${encodeURIComponent(et)}`];eq.isNumber(en)&&el.push(`expires=${new Date(en).toUTCString()}`),eq.isString(er)&&el.push(`path=${er}`),eq.isString(ei)&&el.push(`domain=${ei}`),!0===eo&&el.push("secure"),eq.isString(es)&&el.push(`SameSite=${es}`),document.cookie=el.join("; ")},read($){if("undefined"==typeof document)return null;let et=document.cookie.match(RegExp("(?:^|; )"+$+"=([^;]*)"));return et?decodeURIComponent(et[1]):null},remove($){this.write($,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function buildFullPath($,et,en){let er=!("string"==typeof et&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(et));return $&&(er||!1==en)?et?$.replace(/\/?\/$/,"")+"/"+et.replace(/^\/+/,""):$:et}let headersToObject=$=>$ instanceof AxiosHeaders?{...$}:$;function mergeConfig($,et){et=et||{};let en={};function getMergedValue($,et,en,er){return eq.isPlainObject($)&&eq.isPlainObject(et)?eq.merge.call({caseless:er},$,et):eq.isPlainObject(et)?eq.merge({},et):eq.isArray(et)?et.slice():et}function mergeDeepProperties($,et,en,er){return eq.isUndefined(et)?eq.isUndefined($)?void 0:getMergedValue(void 0,$,en,er):getMergedValue($,et,en,er)}function valueFromConfig2($,et){if(!eq.isUndefined(et))return getMergedValue(void 0,et)}function defaultToConfig2($,et){return eq.isUndefined(et)?eq.isUndefined($)?void 0:getMergedValue(void 0,$):getMergedValue(void 0,et)}function mergeDirectKeys(en,er,ei){return ei in et?getMergedValue(en,er):ei in $?getMergedValue(void 0,en):void 0}let er={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:($,et,en)=>mergeDeepProperties(headersToObject($),headersToObject(et),en,!0)};return eq.forEach(Object.keys({...$,...et}),function(ei){if("__proto__"===ei||"constructor"===ei||"prototype"===ei)return;let eo=eq.hasOwnProp(er,ei)?er[ei]:mergeDeepProperties,es=eo($[ei],et[ei],ei);eq.isUndefined(es)&&eo!==mergeDirectKeys||(en[ei]=es)}),en}var resolveConfig=$=>{let et=mergeConfig({},$),{data:en,withXSRFToken:er,xsrfHeaderName:ei,xsrfCookieName:eo,headers:es,auth:el}=et;if(et.headers=es=AxiosHeaders.from(es),et.url=buildURL(buildFullPath(et.baseURL,et.url,et.allowAbsoluteUrls),$.params,$.paramsSerializer),el&&es.set("Authorization","Basic "+btoa((el.username||"")+":"+(el.password?unescape(encodeURIComponent(el.password)):""))),eq.isFormData(en)){if(e6.hasStandardBrowserEnv||e6.hasStandardBrowserWebWorkerEnv)es.setContentType(void 0);else if(eq.isFunction(en.getHeaders)){let $=en.getHeaders(),et=["content-type","content-length"];Object.entries($).forEach(([$,en])=>{et.includes($.toLowerCase())&&es.set($,en)})}}if(e6.hasStandardBrowserEnv&&(er&&eq.isFunction(er)&&(er=er(et)),er||!1!==er&&tt(et.url))){let $=ei&&eo&&tn.read(eo);$&&es.set(ei,$)}return et};let tr="undefined"!=typeof XMLHttpRequest;var ti=tr&&function($){return new Promise(function(et,en){let er,ei,eo,es,el;let eu=resolveConfig($),ed=eu.data,eh=AxiosHeaders.from(eu.headers).normalize(),{responseType:ep,onUploadProgress:em,onDownloadProgress:ef}=eu;function done(){es&&es(),el&&el(),eu.cancelToken&&eu.cancelToken.unsubscribe(er),eu.signal&&eu.signal.removeEventListener("abort",er)}let eg=new XMLHttpRequest;function onloadend(){if(!eg)return;let er=AxiosHeaders.from("getAllResponseHeaders"in eg&&eg.getAllResponseHeaders()),ei=ep&&"text"!==ep&&"json"!==ep?eg.response:eg.responseText,eo={data:ei,status:eg.status,statusText:eg.statusText,headers:er,config:$,request:eg};settle(function($){et($),done()},function($){en($),done()},eo),eg=null}eg.open(eu.method.toUpperCase(),eu.url,!0),eg.timeout=eu.timeout,"onloadend"in eg?eg.onloadend=onloadend:eg.onreadystatechange=function(){eg&&4===eg.readyState&&(0!==eg.status||eg.responseURL&&0===eg.responseURL.indexOf("file:"))&&setTimeout(onloadend)},eg.onabort=function(){eg&&(en(new eZ("Request aborted",eZ.ECONNABORTED,$,eg)),eg=null)},eg.onerror=function(et){let er=et&&et.message?et.message:"Network Error",ei=new eZ(er,eZ.ERR_NETWORK,$,eg);ei.event=et||null,en(ei),eg=null},eg.ontimeout=function(){let et=eu.timeout?"timeout of "+eu.timeout+"ms exceeded":"timeout exceeded",er=eu.transitional||eK;eu.timeoutErrorMessage&&(et=eu.timeoutErrorMessage),en(new eZ(et,er.clarifyTimeoutError?eZ.ETIMEDOUT:eZ.ECONNABORTED,$,eg)),eg=null},void 0===ed&&eh.setContentType(null),"setRequestHeader"in eg&&eq.forEach(eh.toJSON(),function($,et){eg.setRequestHeader(et,$)}),eq.isUndefined(eu.withCredentials)||(eg.withCredentials=!!eu.withCredentials),ep&&"json"!==ep&&(eg.responseType=eu.responseType),ef&&([eo,el]=progressEventReducer(ef,!0),eg.addEventListener("progress",eo)),em&&eg.upload&&([ei,es]=progressEventReducer(em),eg.upload.addEventListener("progress",ei),eg.upload.addEventListener("loadend",es)),(eu.cancelToken||eu.signal)&&(er=et=>{eg&&(en(!et||et.type?new e7(null,$,eg):et),eg.abort(),eg=null)},eu.cancelToken&&eu.cancelToken.subscribe(er),eu.signal&&(eu.signal.aborted?er():eu.signal.addEventListener("abort",er)));let ey=function($){let et=/^([-+\w]{1,25})(:?\/\/|:)/.exec($);return et&&et[1]||""}(eu.url);if(ey&&-1===e6.protocols.indexOf(ey)){en(new eZ("Unsupported protocol "+ey+":",eZ.ERR_BAD_REQUEST,$));return}eg.send(ed||null)})},helpers_composeSignals=($,et)=>{let{length:en}=$=$?$.filter(Boolean):[];if(et||en){let en,er=new AbortController,onabort=function($){if(!en){en=!0,unsubscribe();let et=$ instanceof Error?$:this.reason;er.abort(et instanceof eZ?et:new e7(et instanceof Error?et.message:et))}},ei=et&&setTimeout(()=>{ei=null,onabort(new eZ(`timeout of ${et}ms exceeded`,eZ.ETIMEDOUT))},et),unsubscribe=()=>{$&&(ei&&clearTimeout(ei),ei=null,$.forEach($=>{$.unsubscribe?$.unsubscribe(onabort):$.removeEventListener("abort",onabort)}),$=null)};$.forEach($=>$.addEventListener("abort",onabort));let{signal:eo}=er;return eo.unsubscribe=()=>
1989eq.asap(unsubscribe),eo}};let streamChunk=function*($,et){let en,er=$.byteLength;if(!et||er<et){yield $;return}let ei=0;for(;ei<er;)en=ei+et,yield $.slice(ei,en),ei=en},readBytes=async function*($,et){for await(let en of readStream($))yield*streamChunk(en,et)},readStream=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let et=$.getReader();try{for(;;){let{done:$,value:en}=await et.read();if($)break;yield en}}finally{await et.cancel()}},trackStream=($,et,en,er)=>{let ei;let eo=readBytes($,et),es=0,_onFinish=$=>{!ei&&(ei=!0,er&&er($))};return new ReadableStream({async pull($){try{let{done:et,value:er}=await eo.next();if(et){_onFinish(),$.close();return}let ei=er.byteLength;if(en){let $=es+=ei;en($)}$.enqueue(new Uint8Array(er))}catch($){throw _onFinish($),$}},cancel:$=>(_onFinish($),eo.return())},{highWaterMark:2})},{isFunction:to}=eq,ts=(({Request:$,Response:et})=>({Request:$,Response:et}))(eq.global),{ReadableStream:tl,TextEncoder:tc}=eq.global,test=($,...et)=>{try{return!!$(...et)}catch($){return!1}},factory=$=>{var et;$=eq.merge.call({skipUndefined:!0},ts,$);let{fetch:en,Request:er,Response:ei}=$,eo=en?to(en):"function"==typeof fetch,es=to(er),el=to(ei);if(!eo)return!1;let eu=eo&&to(tl),ed=eo&&("function"==typeof tc?(et=new tc,$=>et.encode($)):async $=>new Uint8Array(await new er($).arrayBuffer())),eh=es&&eu&&test(()=>{let $=!1,et=new er(e6.origin,{body:new tl,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type");return $&&!et}),ep=el&&eu&&test(()=>eq.isReadableStream(new ei("").body)),em={stream:ep&&($=>$.body)};eo&&["text","arrayBuffer","blob","formData","stream"].forEach($=>{em[$]||(em[$]=(et,en)=>{let er=et&&et[$];if(er)return er.call(et);throw new eZ(`Response type '${$}' is not supported`,eZ.ERR_NOT_SUPPORT,en)})});let getBodyLength=async $=>{if(null==$)return 0;if(eq.isBlob($))return $.size;if(eq.isSpecCompliantForm($)){let et=new er(e6.origin,{method:"POST",body:$});return(await et.arrayBuffer()).byteLength}return eq.isArrayBufferView($)||eq.isArrayBuffer($)?$.byteLength:(eq.isURLSearchParams($)&&($+=""),eq.isString($))?(await ed($)).byteLength:void 0},resolveBodyLength=async($,et)=>{let en=eq.toFiniteNumber($.getContentLength());return null==en?getBodyLength(et):en};return async $=>{let et,{url:eo,method:el,data:eu,signal:ed,cancelToken:ef,timeout:eg,onDownloadProgress:ey,onUploadProgress:ev,responseType:ex,headers:e_,withCredentials:ew="same-origin",fetchOptions:ek}=resolveConfig($),eC=en||fetch;ex=ex?(ex+"").toLowerCase():"text";let eE=helpers_composeSignals([ed,ef&&ef.toAbortSignal()],eg),eI=null,eS=eE&&eE.unsubscribe&&(()=>{eE.unsubscribe()});try{if(ev&&eh&&"get"!==el&&"head"!==el&&0!==(et=await resolveBodyLength(e_,eu))){let $,en=new er(eo,{method:"POST",body:eu,duplex:"half"});if(eq.isFormData(eu)&&($=en.headers.get("content-type"))&&e_.setContentType($),en.body){let[$,er]=progressEventDecorator(et,progressEventReducer(asyncDecorator(ev)));eu=trackStream(en.body,65536,$,er)}}eq.isString(ew)||(ew=ew?"include":"omit");let en=es&&"credentials"in er.prototype,ed={...ek,signal:eE,method:el.toUpperCase(),headers:e_.normalize().toJSON(),body:eu,duplex:"half",credentials:en?ew:void 0};eI=es&&new er(eo,ed);let ef=await (es?eC(eI,ek):eC(eo,ed)),eg=ep&&("stream"===ex||"response"===ex);if(ep&&(ey||eg&&eS)){let $={};["status","statusText","headers"].forEach(et=>{$[et]=ef[et]});let et=eq.toFiniteNumber(ef.headers.get("content-length")),[en,er]=ey&&progressEventDecorator(et,progressEventReducer(asyncDecorator(ey),!0))||[];ef=new ei(trackStream(ef.body,65536,en,()=>{er&&er(),eS&&eS()}),$)}ex=ex||"text";let eT=await em[eq.findKey(em,ex)||"text"](ef,$);return!eg&&eS&&eS(),await new Promise((et,en)=>{settle(et,en,{data:eT,headers:AxiosHeaders.from(ef.headers),status:ef.status,statusText:ef.statusText,config:$,request:eI})})}catch(et){if(eS&&eS(),et&&"TypeError"===et.name&&/Load failed|fetch/i.test(et.message))throw Object.assign(new eZ("Network Error",eZ.ERR_NETWORK,$,eI,et&&et.response),{cause:et.cause||et});throw eZ.from(et,et&&et.code,$,eI,et&&et.response)}}},tu=new Map,getFetch=$=>{let et=$&&$.env||{},{fetch:en,Request:er,Response:ei}=et,eo=[er,ei,en],es=eo.length,el,eu,ed=tu;for(;es--;)el=eo[es],void 0===(eu=ed.get(el))&&ed.set(el,eu=es?new Map:factory(et)),ed=eu;return eu};getFetch();let td={http:null,xhr:ti,fetch:{get:getFetch}};eq.forEach(td,($,et)=>{if($){try{Object.defineProperty($,"name",{value:et})}catch($){}Object.defineProperty($,"adapterName",{value:et})}});let renderReason=$=>`- ${$}`,isResolvedHandle=$=>eq.isFunction($)||null===$||!1===$;
1989var th={getAdapter:function($,et){let en,er;$=eq.isArray($)?$:[$];let{length:ei}=$,eo={};for(let es=0;es<ei;es++){let ei;if(er=en=$[es],!isResolvedHandle(en)&&void 0===(er=td[(ei=String(en)).toLowerCase()]))throw new eZ(`Unknown adapter '${ei}'`);if(er&&(eq.isFunction(er)||(er=er.get(et))))break;eo[ei||"#"+es]=er}if(!er){let $=Object.entries(eo).map(([$,et])=>`adapter ${$} `+(!1===et?"is not supported by the environment":"is not available in the build")),et=ei?$.length>1?"since :\n"+$.map(renderReason).join("\n"):" "+renderReason($[0]):"as no adapter specified";throw new eZ("There is no suitable adapter to dispatch the request "+et,"ERR_NOT_SUPPORT")}return er},adapters:td};function throwIfCancellationRequested($){if($.cancelToken&&$.cancelToken.throwIfRequested(),$.signal&&$.signal.aborted)throw new e7(null,$)}function dispatchRequest($){throwIfCancellationRequested($),$.headers=AxiosHeaders.from($.headers),$.data=transformData.call($,$.transformRequest),-1!==["post","put","patch"].indexOf($.method)&&$.headers.setContentType("application/x-www-form-urlencoded",!1);let et=th.getAdapter($.adapter||e4.adapter,$);return et($).then(function(et){return throwIfCancellationRequested($),et.data=transformData.call($,$.transformResponse,et),et.headers=AxiosHeaders.from(et.headers),et},function(et){return!isCancel(et)&&(throwIfCancellationRequested($),et&&et.response&&(et.response.data=transformData.call($,$.transformResponse,et.response),et.response.headers=AxiosHeaders.from(et.response.headers))),Promise.reject(et)})}let tp="1.13.5",tm={};["object","boolean","number","function","string","symbol"].forEach(($,et)=>{tm[$]=function(en){return typeof en===$||"a"+(et<1?"n ":" ")+$}});let tf={};tm.transitional=function($,et,en){function formatMessage($,et){return"[Axios v"+tp+"] Transitional option '"+$+"'"+et+(en?". "+en:"")}return(en,er,ei)=>{if(!1===$)throw new eZ(formatMessage(er," has been removed"+(et?" in "+et:"")),eZ.ERR_DEPRECATED);return et&&!tf[er]&&(tf[er]=!0,console.warn(formatMessage(er," has been deprecated since v"+et+" and will be removed in the near future"))),!$||$(en,er,ei)}},tm.spelling=function($){return(et,en)=>(console.warn(`${en} is likely a misspelling of ${$}`),!0)};var tg={assertOptions:function($,et,en){if("object"!=typeof $)throw new eZ("options must be an object",eZ.ERR_BAD_OPTION_VALUE);let er=Object.keys($),ei=er.length;for(;ei-- >0;){let eo=er[ei],es=et[eo];if(es){let et=$[eo],en=void 0===et||es(et,eo,$);if(!0!==en)throw new eZ("option "+eo+" must be "+en,eZ.ERR_BAD_OPTION_VALUE);continue}if(!0!==en)throw new eZ("Unknown option "+eo,eZ.ERR_BAD_OPTION)}},validators:tm};let ty=tg.validators;let Axios=class Axios{constructor($){this.defaults=$||{},this.interceptors={request:new eJ,response:new eJ}}async request($,et){try{return await this._request($,et)}catch($){if($ instanceof Error){let et={};Error.captureStackTrace?Error.captureStackTrace(et):et=Error();let en=et.stack?et.stack.replace(/^.+\n/,""):"";try{$.stack?en&&!String($.stack).endsWith(en.replace(/^.+\n.+\n/,""))&&($.stack+="\n"+en):$.stack=en}catch($){}}throw $}}_request($,et){let en,er;"string"==typeof $?(et=et||{}).url=$:et=$||{},et=mergeConfig(this.defaults,et);let{transitional:ei,paramsSerializer:eo,headers:es}=et;void 0!==ei&&tg.assertOptions(ei,{silentJSONParsing:ty.transitional(ty.boolean),forcedJSONParsing:ty.transitional(ty.boolean),clarifyTimeoutError:ty.transitional(ty.boolean),legacyInterceptorReqResOrdering:ty.transitional(ty.boolean)},!1),null!=eo&&(eq.isFunction(eo)?et.paramsSerializer={serialize:eo}:tg.assertOptions(eo,{encode:ty.function,serialize:ty.function},!0)),void 0!==et.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?et.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:et.allowAbsoluteUrls=!0),tg.assertOptions(et,{baseUrl:ty.spelling("baseURL"),withXsrfToken:ty.spelling("withXSRFToken")},!0),et.method=(et.method||this.defaults.method||"get").toLowerCase();let el=es&&eq.merge(es.common,es[et.method]);es&&eq.forEach(["delete","get","head","post","put","patch","common"],$=>{delete es[$]}),et.headers=AxiosHeaders.concat(el,es);let eu=[],ed=!0;this.interceptors.request.forEach(function($){if("function"==typeof $.runWhen&&!1===$.runWhen(et))return;ed=ed&&$.synchronous;let en=et.transitional||eK,er=en&&en.legacyInterceptorReqResOrdering;er?eu.unshift($.fulfilled,$.rejected):eu.push($.fulfilled,$.rejected)});let eh=[];this.interceptors.response.forEach(function($){eh.push($.fulfilled,$.rejected)});let ep=0;if(!ed){let $=[dispatchRequest.bind(this),void 0];for($.unshift(...eu),$.push(...eh),er=$.length,en=Promise.resolve(et);ep<er;)en=en.then($[ep++],$[ep++]);return en}er=eu.length;let em=et;for(;ep<er;){let $=eu[ep++],et=eu[ep++];try{em=$(em)}catch($){et.call(this,$);break}}try{en=dispatchRequest.call(this,em)}catch($){return Promise.reject($)}for(ep=0,er=eh.length;ep<er;)en=en.then(eh[ep++],eh[ep++]);return en}getUri($){$=mergeConfig(this.defaults,$);let et=buildFullPath($.baseURL,$.url,$.allowAbsoluteUrls);return buildURL(et,$.params,$.paramsSerializer)}};eq.forEach(["delete","get","head","options"],function($){Axios.prototype[$]=function(et,en){return this.request(mergeConfig(en||{},{method:$,url:et,data:(en||{}).data}))}}),eq.forEach(["post","put","patch"],function($){function generateHTTPMethod(et){return function(en,er,ei){return this.request(mergeConfig(ei||{},{method:$,headers:et?{"Content-Type":"multipart/form-data"}:{},url:en,data:er}))}}Axios.prototype[$]=generateHTTPMethod(),Axios.prototype[$+"Form"]=generateHTTPMethod(!0)});let CancelToken=class CancelToken{constructor($){let et;if("function"!=typeof $)throw TypeError("executor must be a function.");this.promise=new Promise(function($){et=$});let en=this;this.promise.then($=>{if(!en._listeners)return;let et=en._listeners.length;for(;et-- >0;)en._listeners[et]($);en._listeners=null}),this.promise.then=$=>{let et;let er=new Promise($=>{en.subscribe($),et=$}).then($);return er.cancel=function(){en.unsubscribe(et)},er},$(function($,er,ei){en.reason||(en.reason=new e7($,er,ei),et(en.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
1989subscribe($){if(this.reason){$(this.reason);return}this._listeners?this._listeners.push($):this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let et=this._listeners.indexOf($);-1!==et&&this._listeners.splice(et,1)}toAbortSignal(){let $=new AbortController,abort=et=>{$.abort(et)};return this.subscribe(abort),$.signal.unsubscribe=()=>this.unsubscribe(abort),$.signal}static source(){let $;let et=new CancelToken(function(et){$=et});return{token:et,cancel:$}}};let tb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tb).forEach(([$,et])=>{tb[et]=$});let tv=function createInstance($){let et=new Axios($),en=bind(Axios.prototype.request,et);return eq.extend(en,Axios.prototype,et,{allOwnKeys:!0}),eq.extend(en,et,null,{allOwnKeys:!0}),en.create=function(et){return createInstance(mergeConfig($,et))},en}(e4);tv.Axios=Axios,tv.CanceledError=e7,tv.CancelToken=CancelToken,tv.isCancel=isCancel,tv.VERSION=tp,tv.toFormData=helpers_toFormData,tv.AxiosError=eZ,tv.Cancel=tv.CanceledError,tv.all=function($){return Promise.all($)},tv.spread=function($){return function(et){return $.apply(null,et)}},tv.isAxiosError=function($){return eq.isObject($)&&!0===$.isAxiosError},tv.mergeConfig=mergeConfig,tv.AxiosHeaders=AxiosHeaders,tv.formToJSON=$=>helpers_formDataToJSON(eq.isHTMLForm($)?new FormData($):$),tv.getAdapter=th.getAdapter,tv.HttpStatusCode=tb,tv.default=tv;var tx=tv},39883:function($,et,en){"use strict";en.r(et),en.d(et,{create:function(){return ei}});var er={};!function main($,et,en,er){var ei,eo,es,el,eu,ed,eh,ep,em,ef=!!($.Worker&&$.Blob&&$.Promise&&$.OffscreenCanvas&&$.OffscreenCanvasRenderingContext2D&&$.HTMLCanvasElement&&$.HTMLCanvasElement.prototype.transferControlToOffscreen&&$.URL&&$.URL.createObjectURL);function noop(){}function promise(en){var er=et.exports.Promise,ei=void 0!==er?er:$.Promise;return"function"==typeof ei?new ei(en):(en(noop,noop),null)}var eg=(es=Math.floor(1e3/60),el={},eu=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(ei=function($){var et=Math.random();return el[et]=requestAnimationFrame(function onFrame(en){eu===en||eu+es-1<en?(eu=en,delete el[et],$()):el[et]=requestAnimationFrame(onFrame)}),et},eo=function($){el[$]&&cancelAnimationFrame(el[$])}):(ei=function($){return setTimeout($,es)},eo=function($){return clearTimeout($)}),{frame:ei,cancel:eo}),ey=(ep={},function(){if(ed)return ed;if(!en&&ef){var $=["var CONFETTI, SIZE = {}, module = {};","("+main.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{ed=new Worker(URL.createObjectURL(new Blob([$])))}catch($){return"function"==typeof console.warn&&console.warn("\uD83C\uDF8A Could not load worker",$),null}!function($){function execute(et,en){$.postMessage({options:et||{},callback:en})}$.init=function(et){var en=et.transferControlToOffscreen();$.postMessage({canvas:en},[en])},$.fire=function(et,en,er){if(eh)return execute(et,null),eh;var ei=Math.random().toString(36).slice(2);return eh=promise(function(en){function workerDone(et){et.data.callback===ei&&(delete ep[ei],$.removeEventListener("message",workerDone),eh=null,er(),en())}$.addEventListener("message",workerDone),execute(et,ei),ep[ei]=workerDone.bind(null,{data:{callback:ei}})})},$.reset=function(){for(var et in $.postMessage({reset:!0}),ep)ep[et](),delete ep[et]}}(ed)}return ed}),ev={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function prop($,et,en){var er;return er=$&&null!=$[et]?$[et]:ev[et],en?en(er):er}function onlyPositiveInt($){return $<0?0:Math.floor($)}function toDecimal($){return parseInt($,16)}function colorsToRgb($){return $.map(hexToRgb)}function hexToRgb($){var et=String($).replace(/[^0-9a-f]/gi,"");return et.length<6&&(et=et[0]+et[0]+et[1]+et[1]+et[2]+et[2]),{r:toDecimal(et.substring(0,2)),g:toDecimal(et.substring(2,4)),b:toDecimal(et.substring(4,6))}}function setCanvasWindowSize($){$.width=document.documentElement.clientWidth,$.height=document.documentElement.clientHeight}function setCanvasRectSize($){var et=$.getBoundingClientRect();$.width=et.width,$.height=et.height}function confettiCannon(et,ei){var eo,es=!et,el=!!prop(ei||{},"resize"),eu=prop(ei,"disableForReducedMotion",Boolean),ed=ef&&prop(ei||{},"useWorker")?ey():null,eh=es?setCanvasWindowSize:setCanvasRectSize,ep=!!et&&!!ed&&!!et.__confetti_initialized,em="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function fire(ei){var ef,ey=eu||prop(ei,"disableForReducedMotion",Boolean),ev=prop(ei,"zIndex",Number);if(ey&&em)return promise(function($){$()});es&&eo?et=eo.canvas:es&&!et&&((ef=document.createElement("canvas")).style.position="fixed",ef.style.top="0px",ef.style.left="0px",ef.style.pointerEvents="none",ef.style.zIndex=ev,et=ef,document.body.appendChild(et)),el&&!ep&&eh(et);var ex={width:et.width,height:et.height};function onResize(){if(ed){var $={getBoundingClientRect:function(){if(!es)return et.getBoundingClientRect()}};eh($),ed.postMessage({resize:{width:$.width,height:$.height}});return}ex.width=ex.height=null}function done(){eo=null,el&&$.removeEventListener("resize",onResize),es&&et&&(document.body.removeChild(et),et=null,ep=!1)}return(ed&&!ep&&ed.init(et),ep=!0,ed&&(et.__confetti_initialized=!0),el&&$.addEventListener("resize",onResize,!1),ed)?ed.fire(ei,ex,done):function($,ei,es){for(var el,eu,ed,ep,em,ef,ey,ev=prop($,"particleCount",onlyPositiveInt),ex=prop($,"angle",Number),e_=prop($,"spread",Number),ew=prop($,"startVelocity",Number),ek=prop($,"decay",Number),eC=prop($,"gravity",Number),eE=prop($,"drift",Number),eI=prop($,"colors",colorsToRgb),eS=prop($,"ticks",Number),eT=prop($,"shapes"),eA=prop($,"scalar"),eP=((el=prop($,"origin",Object)).x=prop(el,"x",Number),el.y=prop(el,"y",Number),el),eN=ev,ej=[],eR=et.width*eP.x,eV=et.he
1989ight*eP.y;eN--;)ej.push(function($){var et=$.angle*(Math.PI/180),en=$.spread*(Math.PI/180);return{x:$.x,y:$.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*$.startVelocity+Math.random()*$.startVelocity,angle2D:-et+(.5*en-Math.random()*en),tiltAngle:(.5*Math.random()+.25)*Math.PI,color:$.color,shape:$.shape,tick:0,totalTicks:$.ticks,decay:$.decay,drift:$.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*$.gravity,ovalScalar:.6,scalar:$.scalar}}({x:eR,y:eV,angle:ex,spread:e_,startVelocity:ew,color:eI[eN%eI.length],shape:eT[Math.floor(Math.random()*(eT.length-0))+0],ticks:eS,decay:ek,gravity:eC,drift:eE,scalar:eA}));return eo?eo.addFettis(ej):(eu=et,em=ej.slice(),ef=eu.getContext("2d"),ey=promise(function($){function onDone(){ed=ep=null,ef.clearRect(0,0,ei.width,ei.height),es(),$()}ed=eg.frame(function update(){en&&!(ei.width===er.width&&ei.height===er.height)&&(ei.width=eu.width=er.width,ei.height=eu.height=er.height),ei.width||ei.height||(eh(eu),ei.width=eu.width,ei.height=eu.height),ef.clearRect(0,0,ei.width,ei.height),(em=em.filter(function($){var et,en,er,ei,eo,es,el,eu,ed,eh,ep,em,eg;return et=ef,en=$,en.x+=Math.cos(en.angle2D)*en.velocity+en.drift,en.y+=Math.sin(en.angle2D)*en.velocity+en.gravity,en.wobble+=en.wobbleSpeed,en.velocity*=en.decay,en.tiltAngle+=.1,en.tiltSin=Math.sin(en.tiltAngle),en.tiltCos=Math.cos(en.tiltAngle),en.random=Math.random()+2,en.wobbleX=en.x+10*en.scalar*Math.cos(en.wobble),en.wobbleY=en.y+10*en.scalar*Math.sin(en.wobble),ed=en.tick++/en.totalTicks,eh=en.x+en.random*e
1989n.tiltCos,ep=en.y+en.random*en.tiltSin,em=en.wobbleX+en.random*en.tiltCos,eg=en.wobbleY+en.random*en.tiltSin,(et.fillStyle="rgba("+en.color.r+", "+en.color.g+", "+en.color.b+", "+(1-ed)+")",et.beginPath(),"circle"===en.shape)?et.ellipse?et.ellipse(en.x,en.y,Math.abs(em-eh)*en.ovalScalar,Math.abs(eg-ep)*en.ovalScalar,Math.PI/10*en.wobble,0,2*Math.PI):(er=en.x,ei=en.y,eo=Math.abs(em-eh)*en.ovalScalar,es=Math.abs(eg-ep)*en.ovalScalar,el=Math.PI/10*en.wobble,eu=2*Math.PI,et.save(),et.translate(er,ei),et.rotate(el),et.scale(eo,es),et.arc(0,0,1,0,eu,void 0),et.restore()):(et.moveTo(Math.floor(en.x),Math.floor(en.y)),et.lineTo(Math.floor(en.wobbleX),Math.floor(ep)),et.lineTo(Math.floor(em),Math.floor(eg)),et.lineTo(Math.floor(eh),Math.floor(en.wobbleY))),et.closePath(),et.fill(),en.tick<en.totalTicks})).length?ed=eg.frame(update):onDone()}),ep=onDone}),(eo={addFettis:function($){return em=em.concat($),ey},canvas:eu,promise:ey,reset:function(){ed&&eg.cancel(ed),ep&&ep()}}).promise)}(ei,ex,done)}return fire.reset=function(){ed&&ed.reset(),eo&&eo.reset()},fire}function getDefaultFire(){return em||(em=confettiCannon(null,{useWorker:!0,resize:!0})),em}et.exports=function(){return getDefaultFire().apply(this,arguments)},et.exports.reset=function(){getDefaultFire().reset()},et.exports.create=confettiCannon}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),er,!1),et.default=er.exports;var ei=er.exports.create},51912:function($,et,en){"use strict";let er,ei,eo,es;en.r(et),en.d(et,{getAnalytics:function(){return getAnalytics},getGoogleAnalyticsClientId:function(){return getGoogleAnalyticsClientId},initializeAnalytics:function(){return initializeAnalytics},isSupported:function(){return isSupported},logEvent:function(){return logEvent},setAnalyticsCollectionEnabled:function(){return setAnalyticsCollectionEnabled},setConsent:function(){return setConsent},setCurrentScreen:function(){return setCurrentScreen},setDefaultEventParameters:function(){return setDefaultEventParameters},setUserId:function(){return setUserId},setUserProperties:function(){return setUserProperties},settings:function(){return settings}});var el=en(33310),eu=en(44645),ed=en(99711),eh=en(75),ep=en(26531);let em="@firebase/installations",ef="0.6.19",eg=`w:${ef}`,ey="FIS_v2",ev=new ed.LL("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 isServerError($){return $ instanceof ed.ZR&&$.code.includes("request-failed")}/** 1990 * @license 1991 * Copyright 2019 Google LLC 1992 * 1993 * Licensed under the Apache License, Version 2.0 (the "License"); 1994 * you may not use this file except in compliance with the License. 1995 * You may obtain a copy of the License at 1996 * 1997 * http://www.apache.org/licenses/LICENSE-2.0 1998 * 1999 * Unless required by applicable law or agreed to in writing, software 2000 * distributed under the License is distributed on an "AS IS" BASIS, 2001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2002 * See the License for the specific language governing permissions and 2003 * limitations under the License. 2004 */function getInstallationsEndpoint({projectId:$}){return`https://firebaseinstallations.googleapis.com/v1/projects/${$}/installations`}
2004function extractAuthTokenInfoFromResponse($){return{token:$.token,requestStatus:2,expiresIn:Number($.expiresIn.replace("s","000")),creationTime:Date.now()}}async function getErrorFromResponse($,et){let en=await et.json(),er=en.error;return ev.create("request-failed",{requestName:$,serverCode:er.code,serverMessage:er.message,serverStatus:er.status})}function getHeaders({apiKey:$}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":$})}async function retryIfServerError($){let et=await $();return et.status>=500&&et.status<600?$():et}/** 2005 * @license 2006 * Copyright 2019 Google LLC 2007 * 2008 * Licensed under the Apache License, Version 2.0 (the "License"); 2009 * you may not use this file except in compliance with the License. 2010 * You may obtain a copy of the License at 2011 * 2012 * http://www.apache.org/licenses/LICENSE-2.0 2013 * 2014 * Unless required by applicable law or agreed to in writing, software 2015 * distributed under the License is distributed on an "AS IS" BASIS, 2016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2017 * See the License for the specific language governing permissions and 2018 * limitations under the License. 2019 */async function createInstallationRequest({appConfig:$,heartbeatServiceProvider:et},{fid:en}){let er=getInstallationsEndpoint($),ei=getHeaders($),eo=et.getImmediate({optional:!0});if(eo){let $=await eo.getHeartbeatsHeader();$&&ei.append("x-firebase-client",$)}let es={fid:en,authVersion:ey,appId:$.appId,sdkVersion:eg},el={method:"POST",headers:ei,body:JSON.stringify(es)},eu=await retryIfServerError(()=>fetch(er,el));if(eu.ok){let $=await eu.json(),et={fid:$.fid||en,registrationStatus:2,refreshToken:$.refreshToken,authToken:extractAuthTokenInfoFromRe
2019sponse($.authToken)};return et}throw await getErrorFromResponse("Create Installation",eu)}/** 2020 * @license 2021 * Copyright 2019 Google LLC 2022 * 2023 * Licensed under the Apache License, Version 2.0 (the "License"); 2024 * you may not use this file except in compliance with the License. 2025 * You may obtain a copy of the License at 2026 * 2027 * http://www.apache.org/licenses/LICENSE-2.0 2028 * 2029 * Unless required by applicable law or agreed to in writing, software 2030 * distributed under the License is distributed on an "AS IS" BASIS, 2031 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2032 * See the License for the specific language governing permissions and 2033 * limitations under the License. 2034 */function sleep($){return new Promise(et=>{setTimeout(et,$)})}/** 2035 * @license 2036 * Copyright 2019 Google LLC 2037 * 2038 * Licensed under the Apache License, Version 2.0 (the "License"); 2039 * you may not use this file except in compliance with the License. 2040 * You may obtain a copy of the License at 2041 * 2042 * http://www.apache.org/licenses/LICENSE-2.0 2043 * 2044 * Unless required by applicable law or agreed to in writing, software 2045 * distributed under the License is distributed on an "AS IS" BASIS, 2046 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2047 * See the License for the specific language governing permissions and 2048 * limitations under the License. 2049 */let ex=/^[cdef][\w-]{21}$/;/** 2050 * @license 2051 * Copyright 2019 Google LLC 2052 * 2053 * Licensed under the Apache License, Version 2.0 (the "License"); 2054 * you may not use this file except in compliance with the License. 2055 * You may obtain a copy of the License at 2056 * 2057 * http://www.apache.org/licenses/LICENSE-2.0 2058 * 2059 * Unless required by applicable law or agreed to in writing, software 2060 * distributed under the License is distributed on an "AS IS" BASIS, 2061 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2062 * See the License for the specific language governing permissions and 2063 * limitations under the License. 2064 */function getKey($){return`${$.appName}!${$.appId}`}/** 2065 * @license 2066 * Copyright 2019 Google LLC 2067 * 2068 * Licensed under the Apache License, Version 2.0 (the "License"); 2069 * you may not use this file except in compliance with the License. 2070 * You may obtain a copy of the License at 2071 * 2072 * http://www.apache.org/licenses/LICENSE-2.0 2073 * 2074 * Unless required by applicable law or agreed to in writing, software 2075 * distributed under the License is distributed on an "AS IS" BASIS, 2076 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2077 * See the License for the specific language governing permissions and 2078 * limitations under the License. 2079 */let e_=new Map;function fidChanged($,et){let en=getKey($);callFidChangeCallbacks(en,et),function($,et){let en=(!ew&&"BroadcastChannel"in self&&((ew=new BroadcastChannel("[Firebase] FID Change")).onmessage=$=>{callFidChangeCallbacks($.data.key,$.data.fid)}),ew);en&&en.postMessage({key:$,fid:et}),0===e_.size&&ew&&(ew.close(),ew=null)}(en,et)}function callFidChangeCallbacks($,et){let en=e_.get($);if(en)for(let $ of en)$(et)}let ew=null,ek="firebase-installations-store",eC=null;function getDbPromise(){return eC||(eC=(0,ep.X3)("firebase-installations-database",1,{upgrade:($,et)=>{0===et&&$.createObjectStore(ek)}})),eC}async function set($,et){let en=getKey($),er=await getDbPromise(),ei=er.transaction(ek,"readwrite"),eo=ei.objectStore(ek),es=await eo.get(en);return await eo.put(et,en),await ei.done,es&&es.fid===et.fid||fidChanged($,et.fid),et}async function remove($){let et=getKey($),en=await getDbPromise(),er=en.transaction(ek,"readwrite");await er.objectStore(ek).delete(et),await er.done}async function update($,et){let en=getKey($),er=await getDbPromise(),ei=er.transaction(ek,"readwrite"),eo=ei.objectStore(ek),es=await eo.get(en),el=et(es);return void 0===el?await eo.delete(en):await eo.put(el,en),await ei.done,el&&(!es||es.fid!==el.fid)&&fidChanged($,el.fid),el}/** 2080 * @license 2081 * Copyright 2019 Google LLC 2082 * 2083 * Licensed under the Apache License, Version 2.0 (the "License"); 2084 * you may not use this file except in compliance with the License. 2085 * You may obtain a copy of the License at 2086 * 2087 * http://www.apache.org/licenses/LICENSE-2.0 2088 * 2089 * Unless required by applicable law or agreed to in writing, softw
2089are 2090 * distributed under the License is distributed on an "AS IS" BASIS, 2091 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2092 * See the License for the specific language governing permissions and 2093 * limitations under the License. 2094 */async function getInstallationEntry($){let et;let en=await update($.appConfig,en=>{let er=function($){let et=$||{fid:function(){try{let $=new Uint8Array(17),et=self.crypto||self.msCrypto;et.getRandomValues($),$[0]=112+$[0]%16;let en=function($){let et=/** 2095 * @license 2096 * Copyright 2019 Google LLC 2097 * 2098 * Licensed under the Apache License, Version 2.0 (the "License"); 2099 * you may not use this file except in compliance with the License. 2100 * You may obtain a copy of the License at 2101 * 2102 * http://www.apache.org/licenses/LICENSE-2.0 2103 * 2104 * Unless required by applicable law or agreed to in writing, software 2105 * distributed under the License is distributed on an "AS IS" BASIS, 2106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2107 * See the License for the specific language governing permissions and 2108 * limitations under the License. 2109 */function($){let et=btoa(String.fromCharCode(...$));return et.replace(/\+/g,"-").replace(/\//g,"_")}($);return et.substr(0,22)}($);return ex.test(en)?en:""}catch{return""}}(),registrationStatus:0};return clearTimedOutRequest(et)}(en),ei=function($,et){if(0===et.registrationStatus){if(!navigator.onLine){let $=Promise.reject(ev.create("app-offline"));return{installationEntry:et,registrationPromise:$}}let en={fid:et.fid,registrationStatus:1,registrationTime:Date.now()},er=registerInstallation($,en);return{installationEntry:en,registrationPromise:er}}return 1===et.registrationStatus?{installationEntry:et,registrationPromise:waitUntilFidRegistration($)}:{installationEntry:et}}($,er);return et=ei.registrationPromise,ei.installationEntry});return""===en.fid?{installationEntry:await et}:{installationEntry:en,registrationPromise:et}}async function registerInstallation($,et){try{let en=await createInstallationRequest($,et);return set($.appConfig,en)}catch(en){throw isServerError(en)&&409===en.customData.serverCode?await remove($.appConfig):await set($.appConfig,{fid:et.fid,registrationStatus:0}),en}}async function waitUntilFidRegistration($){let et=await updateInstallationRequest($.appConfig);for(;1===et.registrationStatus;)await sleep(100),et=await updateInstallationRequest($.appConfig);if(0===et.registrationStatus){let{installationEntry:et,registrationPromise:en}=await getInstallationEntry($);return en||et}return et}function updateInstallationRequest($){return update($,$=>{if(!$)throw ev.create("installation-not-found");return clearTimedOutRequest($)})}function clearTimedOutRequest($){return 1===$.registrationStatus&&$.registrationTime+1e4<Date.now()?{fid:$.fid,registrationStatus:0}:$}/** 2110 * @license 2111 * Copyright 2019 Google LLC 2112 * 2113 * Licensed under the Apache License, Version 2.0 (the "License"); 2114 * you may not use this file except in compliance with the License. 2115 * You may obtain a copy of the License at 2116 * 2117 * http://www.apache.org/licenses/LICENSE-2.0 2118 * 2119 * Unless required by applicable law or agreed to in writing, software 2120 * distributed under the License is distributed on an "AS IS" BASIS, 2121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2122 * See the License for the specific language governing permissions and 2123 * limitations under the License. 2124 */async function generateAuthTokenRequest({appConfig:$,heartbeatServiceProvider:et},en){let er=function($,{fid:et}){return`${getInstallationsEndpoint($)}/${et}/authTokens:generate`}($,en),ei=function($,{refreshToken:et}){let en=getHeaders($);return en.append("Authorization",`${ey} ${et}`),en}($,en),eo=et.getImmediate({optional:!0});if(eo){let $=await eo.getHeartbeatsHeader();$&&ei.append("x-firebase-client",$)}let es={installation:{sdkVersion:eg,appId:$.appId}},el={method:"POST",headers:ei,body:JSON.stringify(es)},eu=await retryIfServerError(()=>fetch(er,el));
2124if(eu.ok){let $=await eu.json(),et=extractAuthTokenInfoFromResponse($);return et}throw await getErrorFromResponse("Generate Auth Token",eu)}/** 2125 * @license 2126 * Copyright 2019 Google LLC 2127 * 2128 * Licensed under the Apache License, Version 2.0 (the "License"); 2129 * you may not use this file except in compliance with the License. 2130 * You may obtain a copy of the License at 2131 * 2132 * http://www.apache.org/licenses/LICENSE-2.0 2133 * 2134 * Unless required by applicable law or agreed to in writing, software 2135 * distributed under the License is distributed on an "AS IS" BASIS, 2136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2137 * See the License for the specific language governing permissions and 2138 * limitations under the License. 2139 */async function refreshAuthToken($,et=!1){let en;let er=await update($.appConfig,er=>{var ei;if(!isEntryRegistered(er))throw ev.create("not-registered");let eo=er.authToken;if(!et&&2===(ei=eo).requestStatus&&!function($){let et=Date.now();return et<$.creationTime||$.creationTime+$.expiresIn<et+36e5}(ei))return er;if(1===eo.requestStatus)return en=waitUntilAuthTokenRequest($,et),er;{if(!navigator.onLine)throw ev.create("app-offline");let et=function($){let et={requestStatus:1,requestTime:Date.now()};return{...$,authToken:et}}(er);return en=fetchAuthTokenFromServer($,et),et}}),ei=en?await en:er.authToken;return ei}async function waitUntilAuthTokenRequest($,et){let en=await updateAuthTokenRequest($.appConfig);for(;1===en.authToken.requestStatus;)await sleep(100),en=await updateAuthTokenRequest($.appConfig);let er=en.authToken;return 0===er.requestStatus?refreshAuthToken($,et):er}function updateAuthTokenRequest($){return update($,$=>{if(!isEntryRegistered($))throw ev.create("not-registered");let et=$.authToken;return 1===et.requestStatus&&et.requestTime+1e4<Date.now()?{...$,authToken:{requestStatus:0}}:$})}async function fetchAuthTokenFromServer($,et){try{let en=await generateAuthTokenRequest($,et),er={...et,authToken:en};return await set($.appConfig,er),en}catch(en){if(isServerError(en)&&(401===en.customData.serverCode||404===en.customData.serverCode))await remove($.appConfig);else{let en={...et,authToken:{requestStatus:0}};await set($.appConfig,en)}throw en}}function isEntryRegistered($){return void 0!==$&&2===$.registrationStatus}/** 2140 * @license 2141 * Copyright 2019 Google LLC 2142 * 2143 * Licensed under the Apache License, Version 2.0 (the "License"); 2144 * you may not use this file except in compliance with the License. 2145 * You may obtain a copy of the License at 2146 * 2147 * http://www.apache.org/licenses/LICENSE-2.0 2148 * 2149 * Unless required by applicable law or agreed to in writing, software 2150 * distributed under the License is distributed on an "AS IS" BASIS, 2151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2152 * See the License for the specific language governing permissions and 2153 * limitations under the License. 2154 */async function getId($){let{installationEntry:et,registrationPromise:en}=await getInstallationEntry($);return en?en.catch(console.error):refreshAuthToken($).catch(console.error),et.fid}/** 2155 * @license 2156 * Copyright 2019 Google LLC 2157 * 2158 * Licensed under the Apache License, Version 2.0 (the "License"); 2159 * you may not use this file except in compliance with the License. 2160 * You may obtain a copy of the License at 2161 * 2162 * http://www.apache.org/licenses/LICENSE-2.0 2163 * 2164 * Unless required by applicable law or agreed to in writing, software 2165 * distributed under the License is distributed on an "AS IS" BASIS, 2166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2167 * See the License for the specific language governing permissions and 2168 * limitations under the License. 2169 */async function getToken($,et=!1){await completeInstallationRegistration($);let en=await refreshAuthToken($,et);return en.token}async function completeInstallationRegistration($){let{registrationPromise:et}=await getInstallationEntry($);et&&await et}function getMissingValueError($){return ev.create("missing-app-config-values",{valueName:$})}/** 2170 * @license 2171 * Copyright 2020 Google LLC 2172 * 2173 * Licensed under the Apache License, Version 2.0 (the "License");
2174 * you may not use this file except in compliance with the License. 2175 * You may obtain a copy of the License at 2176 * 2177 * http://www.apache.org/licenses/LICENSE-2.0 2178 * 2179 * Unless required by applicable law or agreed to in writing, software 2180 * distributed under the License is distributed on an "AS IS" BASIS, 2181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2182 * See the License for the specific language governing permissions and 2183 * limitations under the License. 2184 */let eE="installations";(0,el.Xd)(new eh.wA(eE,$=>{let et=$.getProvider("app").getImmediate(),en=/** 2185 * @license 2186 * Copyright 2019 Google LLC 2187 * 2188 * Licensed under the Apache License, Version 2.0 (the "License"); 2189 * you may not use this file except in compliance with the License. 2190 * You may obtain a copy of the License at 2191 * 2192 * http://www.apache.org/licenses/LICENSE-2.0 2193 * 2194 * Unless required by applicable law or agreed to in writing, software 2195 * distributed under the License is distributed on an "AS IS" BASIS, 2196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2197 * See the License for the specific language governing permissions and 2198 * limitations under the License. 2199 */function($){if(!$||!$.options)throw getMissingValueError("App Configuration");if(!$.name)throw getMissingValueError("App Name");for(let et of["projectId","apiKey","appId"])if(!$.options[et])throw getMissingValueError(et);return{appName:$.name,projectId:$.options.projectId,apiKey:$.options.apiKey,appId:$.options.appId}}(et),er=(0,el.qX)(et,"heartbeat");return{app:et,appConfig:en,heartbeatServiceProvider:er,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,el.Xd)(new eh.wA("installations-internal",$=>{let et=$.getProvider("app").getImmediate(),en=(0,el.qX)(et,eE).getImmediate();return{getId:()=>getId(en),getToken:$=>getToken(en,$)}},"PRIVATE")),(0,el.KN)(em,ef),(0,el.KN)(em,ef,"esm2020");/** 2200 * @license 2201 * Copyright 2019 Google LLC 2202 * 2203 * Licensed under the Apache License, Version 2.0 (the "License"); 2204 * you may not use this file except in compliance with the License. 2205 * You may obtain a copy of the License at 2206 * 2207 * http://www.apache.org/licenses/LICENSE-2.0 2208 * 2209 * Unless required by applicable law or agreed to in writing, software 2210 * distributed under the License is distributed on an "AS IS" BASIS, 2211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2212 * See the License for the specific language governing permissions and 2213 * limitations under the License. 2214 */let eI="analytics",eS="https://www.googletagmanager.com/gtag/js",eT=new eu.Yd("@firebase/analytics"),eA=new ed.LL("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.',"invali
2214d-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});/** 2215 * @license 2216 * Copyright 2019 Google LLC 2217 * 2218 * Licensed under the Apache License, Version 2.0 (the "License"); 2219 * you may not use this file except in compliance with the License. 2220 * You may obtain a copy of the License at 2221 * 2222 * http://www.apache.org/licenses/LICENSE-2.0 2223 * 2224 * Unless required by applicable law or agreed to in writing, software 2225 * distributed under the License is distributed on an "AS IS" BASIS, 2226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2227 * See the License for the specific language governing permissions and 2228 * limitations under the License. 2229 */function createGtagTrustedTypesScriptURL($){if(!$.startsWith(eS)){let et=eA.create("invalid-gtag-resource",{gtagURL:$});return eT.warn(et.message),""}return $}function promiseAllSettled($){return Promise.all($.map($=>$.catch($=>$)))}async function gtagOnConfig($,et,en,er,ei,eo){let es=er[ei];try{if(es)await et[es];else{let $=await promiseAllSettled(en),er=$.find($=>$.measurementId===ei);er&&await et[er.appId]}}catch($){eT.error($)}$("config",ei,eo)}async function gtagOnEvent($,et,en,er,ei){try{let eo=[];if(ei&&ei.send_to){let $=ei.send_to;Array.isArray($)||($=[$]);let er=await promiseAllSettled(en);for(let en of $){let $=er.find($=>$.measurementId===en),ei=$&&et[$.appId];if(ei)eo.push(ei);else{eo=[];break}}}0===eo.length&&(eo=Object.values(et)),await Promise.all(eo),$("event",er,ei||{})}catch($){eT.error($)}}let eP=new class{constructor($={},et=1e3){this.throttleMetadata=$,this.intervalMillis=et}getThrottleMetadata($){return this.throttleMetadata[$]}setThrottleMetadata($,et){this.throttleMetadata[$]=et}deleteThrottleMetadata($){delete this.throttleMetadata[$]}};async function fetchDynamicConfig($){let{appId:et,apiKey:en}=$,er={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":en})},ei="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",et),eo=await fetch(ei,er);if(200!==eo.status&&304!==eo.status){let $="";try{let et=await eo.json();et.error?.message&&($=et.error.message)}catch($){}throw eA.create("config-fetch-failed",{httpStatus:eo.status,responseMessage:$})}return eo.json()}async function fetchDynamicConfigWithRetry($,et=eP,en){let{appId:er,apiKey:ei,measurementId:eo}=$.options;if(!er)throw eA.create("no-app-id");if(!ei){if(eo)return{measurementId:eo,appId:er};throw eA.create("no-api-key")}let es=et.getThrottleMetadata(er)||{backoffCount:0,throttleEndTimeMillis:Date.now()},el=new AnalyticsAbortSignal;return setTimeout(async()=>{el.abort()},void 0!==en?en:6e4),attemptFetchDynamicConfigWithRetry({appId:er,apiKey:ei,measurementId:eo},es,el,et)}async function attemptFetchDynamicConfigWithRetry($,{throttleEndTimeMillis:et,backoffCount:en},er,ei=eP){let{appId:eo,measurementId:es}=$;try{await new Promise(($,en)=>{let ei=Math.max(et-Date.now(),0),eo=setTimeout($,ei);er.addEventListener(()=>{clearTimeout(eo),en(eA.create("fetch-throttle",{throttleEndTimeMillis:et}))})})}catch($){if(es)return eT.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${es} provided in the "measurementId" field in the local Firebase config. [${$?.message}]`),{appId:eo,measurementId:es};throw $}try{let et=await fetchDynamicConfig($);return ei.deleteThrottleMetadata(eo),et}catch(eu){if(!function($){if(!($ instanceof ed.ZR)||!$.customData)return!1;let et=Number($.customData.httpStatus);return 429===et||500===et||503===et||504===et}(eu)){if(ei.deleteThrottleMetadata(eo),es)return eT.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${es} provided in the "measurementId" field in the local Firebase config. [${eu?.message}]`),{appId:eo,measurementId:es};throw eu}let et=503===Number(eu?.customData?.httpStatus)?(0,ed.$s)(en,ei.intervalMillis,30):(0,ed.$s)(en,ei.intervalMillis),el={throttleEndTimeMillis:Date.now()+et,backoffCount:en+1};return ei.setThrottleMetadata(eo,el),eT.debug(`Calling attemptFetch again in ${et} millis`),attemptFetchDynamicConfigWithRetry($,el,er,ei)}}let AnalyticsAbortSignal=class AnalyticsAbortSignal{constructor(){this.listeners=[]}addEventListener($){this.listeners.push($)}
2229abort(){this.listeners.forEach($=>$())}};async function logEvent$1($,et,en,er,ei){if(ei&&ei.global){$("event",en,er);return}{let ei=await et,eo={...er,send_to:ei};$("event",en,eo)}}async function setCurrentScreen$1($,et,en,er){if(er&&er.global)return $("set",{screen_name:en}),Promise.resolve();{let er=await et;$("config",er,{update:!0,screen_name:en})}}async function setUserId$1($,et,en,er){if(er&&er.global)return $("set",{user_id:en}),Promise.resolve();{let er=await et;$("config",er,{update:!0,user_id:en})}}async function setUserProperties$1($,et,en,er){if(er&&er.global){let et={};for(let $ of Object.keys(en))et[`user_properties.${$}`]=en[$];return $("set",et),Promise.resolve()}{let er=await et;$("config",er,{update:!0,user_properties:en})}}async function internalGetGoogleAnalyticsClientId($,et){let en=await et;return new Promise((et,er)=>{$("get",en,"client_id",$=>{$||er(eA.create("no-client-id")),et($)})})}async function setAnalyticsCollectionEnabled$1($,et){let en=await $;window[`ga-disable-${en}`]=!et}/** 2230 * @license 2231 * Copyright 2020 Google LLC 2232 * 2233 * Licensed under the Apache License, Version 2.0 (the "License"); 2234 * you may not use this file except in compliance with the License. 2235 * You may obtain a copy of the License at 2236 * 2237 * http://www.apache.org/licenses/LICENSE-2.0 2238 * 2239 * Unless required by applicable law or agreed to in writing, software 2240 * distributed under the License is distributed on an "AS IS" BASIS, 2241 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2242 * See the License for the specific language governing permissions and 2243 * limitations under the License. 2244 */async function validateIndexedDB(){if(!(0,ed.hl)())return eT.warn(eA.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await (0,ed.eu)()}catch($){return eT.warn(eA.create("indexeddb-unavailable",{errorInfo:$?.toString()}).message),!1}return!0}async function _initializeAnalytics($,et,en,eo,es,el,eu){let ed=fetchDynamicConfigWithRetry($);ed.then(et=>{en[et.measurementId]=et.appId,$.options.measurementId&&et.measurementId!==$.options.measurementId&&eT.warn(`The measurement ID in the local Firebase config (${$.options.measurementId}) does not match the measurement ID fetched from the server (${et.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($=>eT.error($)),et.push(ed);let eh=validateIndexedDB().then($=>$?eo.getId():void 0),[ep,em]=await Promise.all([ed,eh]);!function($){let et=window.document.getElementsByTagName("script");for(let en of Object.values(et))if(en.src&&en.src.includes(eS)&&en.src.includes($))return en;return null}(el)&&function($,et){let en;let er=(window.trustedTypes&&(en=window.trustedTypes.createPolicy("firebase-js-sdk-policy",{createScriptURL:createGtagTrustedTypesScriptURL})),en),ei=document.createElement("script"),eo=`${eS}?l=${$}&id=${et}`;ei.src=er?er?.createScriptURL(eo):eo,ei.async=!0,document.head.appendChild(ei)}(el,ep.measurementId),ei&&(es("consent","default",ei),ei=void 0),es("js",new Date);let ef=eu?.config??{};return ef.origin="firebase",ef.update=!0,null!=em&&(ef.firebase_id=em),es("config",ep.measurementId,ef),er&&(es("set",er),er=void 0),ep.measurementId}/** 2245 * @license 2246 * Copyright 2019 Google LLC 2247 * 2248 * Licensed under the Apache License, Version 2.0 (the "License"); 2249 * you may not use this file except in compliance with the License. 2250 * You may obtain a copy of the License at 2251 * 2252 * http://www.apache.org/licenses/LICENSE-2.0 2253 * 2254 * Unless required by applicable law or agreed to in writing, software 2255 * distributed under the License is distributed on an "AS IS" BASIS, 2256 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2257 * See the License for the specific language governing permissions and 2258 * limitations under the License. 2259 */let AnalyticsService=class AnalyticsService{constructor($){this.app=$}_delete(){return delete eN[this.app.options.appId],Promise.resolve()}};let eN={},ej=[],eR={},eV="dataLayer",eD="gtag",eO=!1;function settings($){if(eO)throw eA.create("already-initialized");$.dataLayerName&&(eV=$.dataLayerName),$.gtagName&&(eD=$.gtagName)}function getAnalytics($=(0,el.Mq)()){$=(0,ed.m9)($);let et=(0,el.qX)($,eI);return et.isInitialized()?et.getImmediate():initializeAnalytics($)}function initializeAnalytics($,et={}){let en=(0,el.qX)($,eI);if(en.isInitialized()){let $=en.getImmediate();if((0,ed.vZ)(et,en.getOptions()))return $;throw eA.create("already-initialized")}let er=en.initialize({options:et});return er}
2259async function isSupported(){if((0,ed.ru)()||!(0,ed.zI)()||!(0,ed.hl)())return!1;try{let $=await (0,ed.eu)();return $}catch($){return!1}}function setCurrentScreen($,et,en){$=(0,ed.m9)($),setCurrentScreen$1(es,eN[$.app.options.appId],et,en).catch($=>eT.error($))}async function getGoogleAnalyticsClientId($){return $=(0,ed.m9)($),internalGetGoogleAnalyticsClientId(es,eN[$.app.options.appId])}function setUserId($,et,en){$=(0,ed.m9)($),setUserId$1(es,eN[$.app.options.appId],et,en).catch($=>eT.error($))}function setUserProperties($,et,en){$=(0,ed.m9)($),setUserProperties$1(es,eN[$.app.options.appId],et,en).catch($=>eT.error($))}function setAnalyticsCollectionEnabled($,et){setAnalyticsCollectionEnabled$1(eN[($=(0,ed.m9)($)).app.options.appId],et).catch($=>eT.error($))}function setDefaultEventParameters($){es?es("set",$):er=$}function logEvent($,et,en,er){$=(0,ed.m9)($),logEvent$1(es,eN[$.app.options.appId],et,en,er).catch($=>eT.error($))}function setConsent($){es?es("consent","update",$):ei=$}let eM="@firebase/analytics",eF="0.10.19";(0,el.Xd)(new eh.wA(eI,($,{options:et})=>{let en=$.getProvider("app").getImmediate(),er=$.getProvider("installations-internal").getImmediate();return function($,et,en){!function(){let $=[];if((0,ed.ru)()&&$.push("This is a browser extension environment."),(0,ed.zI)()||$.push("Cookies are not available."),$.length>0){let et=$.map(($,et)=>`(${et+1}) ${$}`).join(" "),en=eA.create("invalid-analytics-context",{errorInfo:et});eT.warn(en.message)}}();let er=$.options.appId;if(!er)throw eA.create("no-app-id");if(!$.options.apiKey){if($.options.measurementId)eT.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 ${$.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw eA.create("no-api-key")}if(null!=eN[er])throw eA.create("already-exists",{id:er});if(!eO){var ei,el,eu,eh;let $,et;ei=eV,$=[],Array.isArray(window[ei])?$=window[ei]:window[ei]=$;let{wrappedGtag:en,gtagCore:er}=(el=eV,eu=eD,et=function(...$){window[el].push(arguments)},window[eu]&&"function"==typeof window[eu]&&(et=window[eu]),window[eu]=(eh=et,async function($,...et){try{if("event"===$){let[$,en]=et;await gtagOnEvent(eh,eN,ej,$,en)}else if("config"===$){let[$,en]=et;await gtagOnConfig(eh,eN,ej,eR,$,en)}else if("consent"===$){let[$,en]=et;eh("consent",$,en)}else if("get"===$){let[$,en,er]=et;eh("get",$,en,er)}else if("set"===$){let[$]=et;eh("set",$)}else eh($,...et)}catch($){eT.error($)}}),{gtagCore:et,wrappedGtag:window[eu]});es=en,eo=er,eO=!0}eN[er]=_initializeAnalytics($,ej,eR,et,eo,eV,en);let ep=new AnalyticsService($);return ep}(en,er,et)},"PUBLIC")),(0,el.Xd)(new eh.wA("analytics-internal",function($){try{let et=$.getProvider(eI).getImmediate();return{logEvent:($,en,er)=>
2259logEvent(et,$,en,er),setUserProperties:($,en)=>setUserProperties(et,$,en)}}catch($){throw eA.create("interop-component-reg-failed",{reason:$})}},"PRIVATE")),(0,el.KN)(eM,eF),(0,el.KN)(eM,eF,"esm2020")},43910:function($,et,en){"use strict";en.d(et,{kq:function(){return ed},w9:function(){return EmailAuthProvider},GH:function(){return GithubAuthProvider},hJ:function(){return GoogleAuthProvider},c4:function(){return TwitterAuthProvider},Xb:function(){return createUserWithEmailAndPassword},Nr:function(){return fetchSignInMethodsForEmail},gK:function(){return getAdditionalUserInfo},v0:function(){return getAuth},wU:function(){return getIdToken},ag:function(){return getIdTokenResult},Aj:function(){return onAuthStateChanged},MX:function(){return onIdTokenChanged},aF:function(){return reauthenticateWithCredential},w$:function(){return sendEmailVerification},LS:function(){return sendPasswordResetEmail},e5:function(){return signInWithEmailAndPassword},rh:function(){return signInWithPopup},w7:function(){return signOut}});var er,ei=en(33310),eo=en(99711),es=en(44645),el=en(75);function _prodErrorMap(){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 eu=new eo.LL("auth","Firebase",_prodErrorMap()),ed={ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_LOGIN_CREDENTIALS:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_
2259NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_PASSWORD:"auth/missing-password",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type",INVALID_HOSTING_LINK_DOMAIN:"auth/invalid-hosting-link-domain"},eh=new es.Yd("@firebase/auth");function _logError($,...et){eh.logLevel<=es.in.ERROR&&eh.error(`Auth (${ei.Jn}): ${$}`,...et)}/** 2260 * @license 2261 * Copyright 2020 Google LLC 2262 * 2263 * Licensed under the Apache License, Version 2.0 (the "License"); 2264 * you may not use this file except in compliance with the License. 2265 * You may obtain a copy of the License at 2266 * 2267 * http://www.apache.org/licenses/LICENSE-2.0 2268 * 2269 * Unless required by applicable law or agreed to in writing, software 2270 * distributed under the License is distributed on an "AS IS" BASIS, 2271 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2272 * See the License for the specific language governing permissions and 2273 * limitations under the License. 2274 */function _fail($,...et){throw createErrorInternal($,...et)}function _createError($,...et){return createErrorInternal($,...et)}function _errorWithCustomMessage($,et,en){let er={..._prodErrorMap(),[et]:en},ei=new eo.LL("auth","Firebase",er);return ei.create(et,{appName:$.name})}function _serverAppCurrentUserOperationNotSupportedError($){return _errorWithCustomMessage($,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function createErrorInternal($,...et){if("string"!=typeof $){let en=et[0],er=[...et.slice(1)];return er[0]&&(er[0].appName=$.name),$._errorFactory.create(en,...er)}return eu.create($,...et)}function _assert($,et,...en){if(!$)throw createErrorInternal(et,...en)}function debugFail($){let et="INTERNAL ASSERTION FAILED: "+$;throw _logError(et),Error(et)}/** 2275 * @license 2276 * Copyright 2020 Google LLC 2277 * 2278 * Licensed under the Apache License, Version 2.0 (the "License");
2279 * you may not use this file except in compliance with the License. 2280 * You may obtain a copy of the License at 2281 * 2282 * http://www.apache.org/licenses/LICENSE-2.0 2283 * 2284 * Unless required by applicable law or agreed to in writing, software 2285 * distributed under the License is distributed on an "AS IS" BASIS, 2286 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2287 * See the License for the specific language governing permissions and 2288 * limitations under the License. 2289 */function _getCurrentUrl(){return"undefined"!=typeof self&&self.location?.href||""}function _isHttpOrHttps(){return"http:"===_getCurrentScheme()||"https:"===_getCurrentScheme()}function _getCurrentScheme(){return"undefined"!=typeof self&&self.location?.protocol||null}/** 2290 * @license 2291 * Copyright 2020 Google LLC 2292 * 2293 * Licensed under the Apache License, Version 2.0 (the "License"); 2294 * you may not use this file except in compliance with the License. 2295 * You may obtain a copy of the License at 2296 * 2297 * http://www.apache.org/licenses/LICENSE-2.0 2298 * 2299 * Unless required by applicable law or agreed to in writing, software 2300 * distributed under the License is distributed on an "AS IS" BASIS, 2301 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2302 * See the License for the specific language governing permissions and 2303 * limitations under the License. 2304 */let Delay=class Delay{constructor($,et){this.shortDelay=$,this.longDelay=et,et>$||debugFail("Short delay should be less than long delay!"),this.isMobile=(0,eo.uI)()||(0,eo.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(_isHttpOrHttps()||(0,eo.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};/** 2305 * @license 2306 * Copyright 2020 Google LLC 2307 * 2308 * Licensed under the Apache License, Version 2.0 (the "License"); 2309 * you may not use this file except in compliance with the License. 2310 * You may obtain a copy of the License at 2311 * 2312 * http://www.apache.org/licenses/LICENSE-2.0 2313 * 2314 * Unless required by applicable law or agreed to in writing, software 2315 * distributed under the License is distributed on an "AS IS" BASIS, 2316 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2317 * See the License for the specific language governing permissions and 2318 * limitations under the License. 2319 */function _emulatorUrl($,et){$.emulator||debugFail("Emulator should always be set here");let{url:en}=$.emulator;return et?`${en}${et.startsWith("/")?et.slice(1):et}`:en}/** 2320 * @license 2321 * Copyright 2020 Google LLC 2322 * 2323 * Licensed under the Apache License, Version 2.0 (the "License"); 2324 * you may not use this file except in compliance with the License. 2325 * You may obtain a copy of the License at 2326 * 2327 * http://www.apache.org/licenses/LICENSE-2.0 2328 * 2329 * Unless required by applicable law or agreed to in writing, software 2330 * distributed under the License is distributed on an "AS IS" BASIS, 2331 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2332 * See the License for the specific language governing permissions and 2333 * limitations under the License. 2334 */let FetchProvider=class FetchProvider{static initialize($,et,en){this.fetchImpl=$,et&&(this.headersImpl=et),en&&(this.responseImpl=en)}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 debugFail("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 debugFail("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 debugFail("Could not find Response implementation, make sure you call FetchProvi
2334der.initialize() with an appropriate polyfill")}};/** 2335 * @license 2336 * Copyright 2020 Google LLC 2337 * 2338 * Licensed under the Apache License, Version 2.0 (the "License"); 2339 * you may not use this file except in compliance with the License. 2340 * You may obtain a copy of the License at 2341 * 2342 * http://www.apache.org/licenses/LICENSE-2.0 2343 * 2344 * Unless required by applicable law or agreed to in writing, software 2345 * distributed under the License is distributed on an "AS IS" BASIS, 2346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2347 * See the License for the specific language governing permissions and 2348 * limitations under the License. 2349 */let ep={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"},em=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],ef=new Delay(3e4,6e4);function _addTidIfNecessary($,et){return $.tenantId&&!et.tenantId?{...et,tenantId:$.tenantId}:et}async function _performApiRequest($,et,en,er,ei={}){return _performFetchWithErrorHandling($,ei,async()=>{let ei={},es={};er&&("GET"===et?es=er:ei={body:JSON.stringify(er)});let el=(0,eo.xO)({key:$.config.apiKey,...es}).slice(1),eu=await $._getAdditionalHeaders();eu["Content-Type"]="application/json",$.languageCode&&(eu["X-Firebase-Locale"]=$.languageCode);let ed={method:et,headers:eu,...ei};return(0,eo.L_)()||(ed.referrerPolicy="no-referrer"),$.emulatorConfig&&(0,eo.Xx)($.emulatorConfig.host)&&(ed.credentials="include"),FetchProvider.fetch()(await _getFinalTarget($,$.config.apiHost,en,el),ed)})}async function _performFetchWithErrorHandling($,et,en){$._canInitEmulator=!1;let er={...ep,...et};try{let et=new NetworkTimeout($),ei=await Promise.race([en(),et.promise]);et.clearNetworkTimeout();let eo=await ei.json();if("needConfirmation"in eo)throw _makeTaggedError($,"account-exists-with-different-credential",eo);if(ei.ok&&!("errorMessage"in eo))return eo;{let et=ei.ok?eo.errorMessage:eo.error.message,[en,es]=et.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===en)throw _makeTaggedError($,"credential-already-in-use",eo);if("EMAIL_EXISTS"===en)throw _makeTaggedError($,"email-already-in-use",eo);if("USER_DISABLED"===en)throw _makeTaggedError($,"user-disabled",eo);let el=er[en]||en.toLowerCase().replace(/[_\s]+/g,"-");if(es)throw _errorWithCustomMessage($,el,es);_fail($,el)}}catch(et){if(et instanceof eo.ZR)throw et;_fail($,"network-request-failed",{message:String(et)})}}async function _performSignInRequest($,et,en,er,ei={}){let eo=await _performApiRequest($,et,en,er,ei);return"mfaPendingCredential"in eo&&_fail($,"multi-factor-auth-required",{_serverResponse:eo}),eo}async function _getFinalTarget($,et,en,er){let ei=`${et}${en}?${er}`,eo=$.config.emulator?_emulatorUrl($.config,ei):`${$.config.apiScheme}://${ei}`;
2349if(em.includes(en)&&(await $._persistenceManagerAvailable,"COOKIE"===$._getPersistenceType())){let et=$._getPersistence();return et._getFinalTarget(eo).toString()}return eo}let NetworkTimeout=class NetworkTimeout{clearNetworkTimeout(){clearTimeout(this.timer)}constructor($){this.auth=$,this.timer=null,this.promise=new Promise(($,et)=>{this.timer=setTimeout(()=>et(_createError(this.auth,"network-request-failed")),ef.get())})}};function _makeTaggedError($,et,en){let er={appName:$.name};en.email&&(er.email=en.email),en.phoneNumber&&(er.phoneNumber=en.phoneNumber);let ei=_createError($,et,er);return ei.customData._tokenResponse=en,ei}function isEnterprise($){return void 0!==$&&void 0!==$.enterprise}let RecaptchaConfig=class RecaptchaConfig{constructor($){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===$.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=$.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=$.recaptchaEnforcementState}getProviderEnforcementState($){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let et of this.recaptchaEnforcementState)if(et.provider&&et.provider===$)return function($){switch($){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(et.enforcementState);return null}isProviderEnabled($){return"ENFORCE"===this.getProviderEnforcementState($)||"AUDIT"===this.getProviderEnforcementState($)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}};async function getRecaptchaConfig($,et){return _performApiRequest($,"GET","/v2/recaptchaConfig",_addTidIfNecessary($,et))}/** 2350 * @license 2351 * Copyright 2020 Google LLC 2352 * 2353 * Licensed under the Apache License, Version 2.0 (the "License"); 2354 * you may not use this file except in compliance with the License. 2355 * You may obtain a copy of the License at 2356 * 2357 * http://www.apache.org/licenses/LICENSE-2.0 2358 * 2359 * Unless required by applicable law or agreed to in writing, software 2360 * distributed under the License is distributed on an "AS IS" BASIS, 2361 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2362 * See the License for the specific language governing permissions and 2363 * limitations under the License. 2364 */async function deleteAccount($,et){return _performApiRequest($,"POST","/v1/accounts:delete",et)}async function getAccountInfo($,et){return _performApiRequest($,"POST","/v1/accounts:lookup",et)}/** 2365 * @license 2366 * Copyright 2020 Google LLC 2367 * 2368 * Licensed under the Apache License, Version 2.0 (the "License"); 2369 * you may not use this file except in compliance with the License. 2370 * You may obtain a copy of the License at 2371 * 2372 * http://www.apache.org/licenses/LICENSE-2.0 2373 * 2374 * Unless required by applicable law or agreed to in writing, software 2375 * distributed under the License is distributed on an "AS IS" BASIS, 2376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2377 * See the License for the specific language governing permissions and 2378 * limitations under the License. 2379 */function utcTimestampToDateString($){if($)try{let et=new Date(Number($));if(!isNaN(et.getTime()))return et.toUTCString()}catch($){}}/** 2380 * @license 2381 * Copyright 2020 Google LLC 2382 * 2383 * Licensed under the Apache License, Version 2.0 (the "License"); 2384 * you may not use this file except in compliance with the License. 2385 * You may obtain a copy of the License at 2386 * 2387 * http://www.apache.org/licenses/LICENSE-2.0 2388 * 2389 * Unless required by applicable law or agreed to in writing, software 2390 * distributed under the License is distributed on an "AS IS" BASIS, 2391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2392 * See the License for the specific language governing permissions and 2393 * limitations under the License. 2394 */function getIdToken($,et=!1){return(0,eo.m9)($).getIdToken(et)}async function getIdTokenResult($,et=!1){let en=(0,eo.m9)($),er=await en.getIdToken(et),ei=_parseToken(er);_assert(ei&&ei.exp&&ei.auth_time&&ei.iat,en.auth,"internal-error");let es="object"==typeof ei.firebase?ei.firebase:void 0,el=es?.sign_in_provider;return{claims:ei,token:er,authTime:utcTimestampToDateString(secondsStringToMilliseconds(ei.auth_time)),issuedAtTime:utcTimestampToDateString(secondsStringToMilliseconds(ei.iat)),expirationTime:utcTimestampToDateString(secondsStringToMilliseconds(ei.exp)),signInProvider:el||null,signInSecondFactor:es?.sign_in_second_factor||null}}function secondsStringToMilliseconds($){return 1e3*Number($)}function _parseToken($){let[et,en,er]=$.split(".");if(void 0===et||void 0===en||void 0===er)return _logError("JWT malformed, contained fewer than 3 sections"),null;try{let $=(0,eo.tV)(en);if(!$)return _logError("Failed to decode base64 JWT payload"),null;return JSON.parse($)}catch($){return _logError("Caught error parsing JWT payload as JSON",$?.toString()),null}}function _tokenExpiresIn($){let et=_parseToken($);return _assert(et,"internal-error"),_assert(void 0!==et.exp,"internal-error"),_assert(void 0!==et.iat,"internal-error"),Number(et.exp)-Number(et.iat)}/** 2395 * @license 2396 * Copyright 2020 Google LLC 2397 * 2398 * Licensed under the Apache License, Version 2.0 (the "License");
2399 * you may not use this file except in compliance with the License. 2400 * You may obtain a copy of the License at 2401 * 2402 * http://www.apache.org/licenses/LICENSE-2.0 2403 * 2404 * Unless required by applicable law or agreed to in writing, software 2405 * distributed under the License is distributed on an "AS IS" BASIS, 2406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2407 * See the License for the specific language governing permissions and 2408 * limitations under the License. 2409 */async function _logoutIfInvalidated($,et,en=!1){if(en)return et;try{return await et}catch(et){throw et instanceof eo.ZR&&function({code:$}){return"auth/user-disabled"===$||"auth/user-token-expired"===$}(et)&&$.auth.currentUser===$&&await $.auth.signOut(),et}}/** 2410 * @license 2411 * Copyright 2020 Google LLC 2412 * 2413 * Licensed under the Apache License, Version 2.0 (the "License"); 2414 * you may not use this file except in compliance with the License. 2415 * You may obtain a copy of the License at 2416 * 2417 * http://www.apache.org/licenses/LICENSE-2.0 2418 * 2419 * Unless required by applicable law or agreed to in writing, software 2420 * distributed under the License is distributed on an "AS IS" BASIS, 2421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2422 * See the License for the specific language governing permissions and 2423 * limitations under the License. 2424 */let ProactiveRefresh=class ProactiveRefresh{constructor($){this.user=$,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($){if($){let $=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),$}{this.errorBackoff=3e4;let $=this.user.stsTokenManager.expirationTime??0,et=$-Date.now()-3e5;return Math.max(0,et)}}schedule($=!1){if(!this.isRunning)return;let et=this.getInterval($);this.timerId=setTimeout(async()=>{await this.iteration()},et)}async iteration(){try{await this.user.getIdToken(!0)}catch($){$?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}};/** 2425 * @license 2426 * Copyright 2020 Google LLC 2427 * 2428 * Licensed under the Apache License, Version 2.0 (the "License"); 2429 * you may not use this file except in compliance with the License. 2430 * You may obtain a copy of the License at 2431 * 2432 * http://www.apache.org/licenses/LICENSE-2.0 2433 * 2434 * Unless required by applicable law or agreed to in writing, software 2435 * distributed under the License is distributed on an "AS IS" BASIS, 2436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2437 * See the License for the specific language governing permissions and 2438 * limitations under the License. 2439 */let UserMetadata=class UserMetadata{constructor($,et){this.createdAt=$,this.lastLoginAt=et,this._initializeTime()}_initializeTime(){this.lastSignInTime=utcTimestampToDateString(this.lastLoginAt),this.creationTime=utcTimestampToDateString(this.createdAt)}_copy($){this.createdAt=$.createdAt,this.lastLoginAt=$.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};/** 2440 * @license 2441 * Copyright 2019 Google LLC 2442 * 2443 * Licensed under the Apache License, Version 2.0 (the "License"); 2444 * you may not use this file except in compliance with the License. 2445 * You may obtain a copy of the License at 2446 * 2447 * http://www.apache.org/licenses/LICENSE-2.0 2448 * 2449 * Unless required by applicable law or agreed to in writing, software 2450 * distributed under the License is distributed on an "AS IS" BASIS, 2451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2452 * See the License for the specific language governing permissions and 2453 * limitations under the License. 2454 */async function _reloadWithoutSaving($){let et=$.auth,en=await $.getIdToken(),er=await _logoutIfInvalidated($,getAccountInfo(et,{idToken:en}));_assert(er?.users.length,et,"internal-error");let ei=er.users[0];$._notifyReloadListener(ei);let eo=ei.providerUserInfo?.length?extractProviderData(ei.providerUserInfo):[],es=function($,et){let en=$.filter($=>!et.some(et=>et.providerId===$.providerId));return[...en,...et]}($.providerData,eo),el=$.isAnonymous,eu=!($.email&&ei.passwordHash)&&!es?.length,ed={uid:ei.localId,displayName:ei.displayName||null,photoURL:ei.photoUrl||null,email:ei.email||null,emailVerified:ei.emailVerified||!1,phoneNumber:ei.phoneNumber||null,tenantId:ei.tenantId||null,providerData:es,metadata:new UserMetadata(ei.createdAt,ei.lastLoginAt),isAnonymous:!!el&&eu};Object.assign($,ed)}async function reload($){let et=(0,eo.m9)($);await _reloadWithoutSaving(et),await et.auth._persistUserIfCurrent(et),et.auth._notifyListenersIfCurrent(et)}function extractProviderData($){return $.map(({providerId:$,...et})=>
2454({providerId:$,uid:et.rawId||"",displayName:et.displayName||null,email:et.email||null,phoneNumber:et.phoneNumber||null,photoURL:et.photoUrl||null}))}/** 2455 * @license 2456 * Copyright 2020 Google LLC 2457 * 2458 * Licensed under the Apache License, Version 2.0 (the "License"); 2459 * you may not use this file except in compliance with the License. 2460 * You may obtain a copy of the License at 2461 * 2462 * http://www.apache.org/licenses/LICENSE-2.0 2463 * 2464 * Unless required by applicable law or agreed to in writing, software 2465 * distributed under the License is distributed on an "AS IS" BASIS, 2466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2467 * See the License for the specific language governing permissions and 2468 * limitations under the License. 2469 */async function requestStsToken($,et){let en=await _performFetchWithErrorHandling($,{},async()=>{let en=(0,eo.xO)({grant_type:"refresh_token",refresh_token:et}).slice(1),{tokenApiHost:er,apiKey:ei}=$.config,es=await _getFinalTarget($,er,"/v1/token",`key=${ei}`),el=await $._getAdditionalHeaders();el["Content-Type"]="application/x-www-form-urlencoded";let eu={method:"POST",headers:el,body:en};return $.emulatorConfig&&(0,eo.Xx)($.emulatorConfig.host)&&(eu.credentials="include"),FetchProvider.fetch()(es,eu)});return{accessToken:en.access_token,expiresIn:en.expires_in,refreshToken:en.refresh_token}}async function revokeToken($,et){return _performApiRequest($,"POST","/v2/accounts:revokeToken",_addTidIfNecessary($,et))}/** 2470 * @license 2471 * Copyright 2020 Google LLC 2472 * 2473 * Licensed under the Apache License, Version 2.0 (the "License"); 2474 * you may not use this file except in compliance with the License. 2475 * You may obtain a copy of the License at 2476 * 2477 * http://www.apache.org/licenses/LICENSE-2.0 2478 * 2479 * Unless required by applicable law or agreed to in writing, software 2480 * distributed under the License is distributed on an "AS IS" BASIS, 2481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2482 * See the License for the specific language governing permissions and 2483 * limitations under the License. 2484 */let StsTokenManager=class StsTokenManager{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse($){_assert($.idToken,"internal-error"),_assert(void 0!==$.idToken,"internal-error"),_assert(void 0!==$.refreshToken,"internal-error");let et="expiresIn"in $&&void 0!==$.expiresIn?Number($.expiresIn):_tokenExpiresIn($.idToken);this.updateTokensAndExpiration($.idToken,$.refreshToken,et)}updateFromIdToken($){_assert(0!==$.length,"internal-error");let et=_tokenExpiresIn($);this.updateTokensAndExpiration($,null,et)}async getToken($,et=!1){return et||!this.accessToken||this.isExpired?(_assert(this.refreshToken,$,"user-token-expired"),this.refreshToken)?(await this.refresh($,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh($,et){let{accessToken:en,refreshToken:er,expiresIn:ei}=await requestStsToken($,et);this.updateTokensAndExpiration(en,er,Number(ei))}updateTokensAndExpiration($,et,en){this.refreshToken=et||null,this.accessToken=$||null,this.expirationTime=Date.now()+1e3*en}static fromJSON($,et){let{refreshToken:en,accessToken:er,expirationTime:ei}=et,eo=new StsTokenManager;return en&&(_assert("string"==typeof en,"internal-error",{appName:$}),eo.refreshToken=en),er&&(_assert("string"==typeof er,"internal-error",{appName:$}),eo.accessToken=er),ei&&(_assert("number"==typeof ei,"internal-error",{appName:$}),eo.expirationTime=ei),eo}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign($){this.accessToken=$.accessToken,this.refreshToken=$.refreshToken,this.expirationTime=$.expirationTime}_clone(){return Object.assign(new StsTokenManager,this.toJSON())}_performRefresh(){return debugFail("not implemented")}};/** 2485 * @license 2486 * Copyright 2020 Google LLC 2487 * 2488 * Licensed under the Apache License, Version 2.0 (the "License"); 2489 * you may not use this file except in compliance with the License. 2490 * You may obtain a copy of the License at 2491 * 2492 * http://www.apache.org/licenses/LICENSE-2.0 2493 * 2494 * Unless required by applicable law or agreed to in writing, softw
2494are 2495 * distributed under the License is distributed on an "AS IS" BASIS, 2496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2497 * See the License for the specific language governing permissions and 2498 * limitations under the License. 2499 */function assertStringOrUndefined($,et){_assert("string"==typeof $||void 0===$,"internal-error",{appName:et})}let UserImpl=class UserImpl{constructor({uid:$,auth:et,stsTokenManager:en,...er}){this.providerId="firebase",this.proactiveRefresh=new ProactiveRefresh(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=$,this.auth=et,this.stsTokenManager=en,this.accessToken=en.accessToken,this.displayName=er.displayName||null,this.email=er.email||null,this.emailVerified=er.emailVerified||!1,this.phoneNumber=er.phoneNumber||null,this.photoURL=er.photoURL||null,this.isAnonymous=er.isAnonymous||!1,this.tenantId=er.tenantId||null,this.providerData=er.providerData?[...er.providerData]:[],this.metadata=new UserMetadata(er.createdAt||void 0,er.lastLoginAt||void 0)}async getIdToken($){let et=await _logoutIfInvalidated(this,this.stsTokenManager.getToken(this.auth,$));return _assert(et,this.auth,"internal-error"),this.accessToken!==et&&(this.accessToken=et,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),et}getIdTokenResult($){return getIdTokenResult(this,$)}reload(){return reload(this)}_assign($){this!==$&&(_assert(this.uid===$.uid,this.auth,"internal-error"),this.displayName=$.displayName,this.photoURL=$.photoURL,this.email=$.email,this.emailVerified=$.emailVerified,this.phoneNumber=$.phoneNumber,this.isAnonymous=$.isAnonymous,this.tenantId=$.tenantId,this.providerData=$.providerData.map($=>({...$})),this.metadata._copy($.metadata),this.stsTokenManager._assign($.stsTokenManager))}_clone($){let et=new UserImpl({...this,auth:$,stsTokenManager:this.stsTokenManager._clone()});return et.metadata._copy(this.metadata),et}_onReload($){_assert(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=$,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener($){this.reloadListener?this.reloadListener($):this.reloadUserInfo=$}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary($,et=!1){let en=!1;$.idToken&&$.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse($),en=!0),et&&await _reloadWithoutSaving(this),await this.auth._persistUserIfCurrent(this),en&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,ei.rh)(this.auth.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this.auth));let $=await this.getIdToken();return await _logoutIfInvalidated(this,deleteAccount(this.auth,{idToken:$})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{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($=>({...$})),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($,et){let en=et.displayName??void 0,er=et.email??void 0,ei=et.phoneNumber??void 0,eo=et.photoURL??void 0,es=et.tenantId??void 0,el=et._redirectEventId??void 0,eu=et.createdAt??void 0,ed=et.lastLoginAt??void 0,{uid:eh,emailVerified:ep,isAnonymous:em,providerData:ef,stsTokenManager:eg}=et;_assert(eh&&eg,$,"internal-error");let ey=StsTokenManager.fromJSON(this.name,eg);_assert("string"==typeof eh,$,"internal-error"),assertStringOrUndefined(en,$.name),assertStringOrUndefined(er,$.name),_assert("boolean"==typeof ep,$,"internal-error"),_assert("boolean"==typeof em,$,"internal-error"),assertStringOrUndefined(ei,$.name),assertStringOrUndefined(eo,$.name),assertStringOrUndefined(es,$.name),assertStringOrUndefined(el,$.name),assertStringOrUndefined(eu,$.name),assertStringOrUndefined(ed,$.n
2499ame);let ev=new UserImpl({uid:eh,auth:$,email:er,emailVerified:ep,displayName:en,isAnonymous:em,photoURL:eo,phoneNumber:ei,tenantId:es,stsTokenManager:ey,createdAt:eu,lastLoginAt:ed});return ef&&Array.isArray(ef)&&(ev.providerData=ef.map($=>({...$}))),el&&(ev._redirectEventId=el),ev}static async _fromIdTokenResponse($,et,en=!1){let er=new StsTokenManager;er.updateFromServerResponse(et);let ei=new UserImpl({uid:et.localId,auth:$,stsTokenManager:er,isAnonymous:en});return await _reloadWithoutSaving(ei),ei}static async _fromGetAccountInfoResponse($,et,en){let er=et.users[0];_assert(void 0!==er.localId,"internal-error");let ei=void 0!==er.providerUserInfo?extractProviderData(er.providerUserInfo):[],eo=!(er.email&&er.passwordHash)&&!ei?.length,es=new StsTokenManager;es.updateFromIdToken(en);let el=new UserImpl({uid:er.localId,auth:$,stsTokenManager:es,isAnonymous:eo}),eu={uid:er.localId,displayName:er.displayName||null,photoURL:er.photoUrl||null,email:er.email||null,emailVerified:er.emailVerified||!1,phoneNumber:er.phoneNumber||null,tenantId:er.tenantId||null,providerData:ei,metadata:new UserMetadata(er.createdAt,er.lastLoginAt),isAnonymous:!(er.email&&er.passwordHash)&&!ei?.length};return Object.assign(el,eu),el}};/** 2500 * @license 2501 * Copyright 2020 Google LLC 2502 * 2503 * Licensed under the Apache License, Version 2.0 (the "License"); 2504 * you may not use this file except in compliance with the License. 2505 * You may obtain a copy of the License at 2506 * 2507 * http://www.apache.org/licenses/LICENSE-2.0 2508 * 2509 * Unless required by applicable law or agreed to in writing, software 2510 * distributed under the License is distributed on an "AS IS" BASIS, 2511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2512 * See the License for the specific language governing permissions and 2513 * limitations under the License. 2514 */let eg=new Map;function _getInstance($){$ instanceof Function||debugFail("Expected a class definition");let et=eg.get($);return et?et instanceof $||debugFail("Instance stored in cache mismatched with class"):(et=new $,eg.set($,et)),et}/** 2515 * @license 2516 * Copyright 2019 Google LLC 2517 * 2518 * Licensed under the Apache License, Version 2.0 (the "License"); 2519 * you may not use this file except in compliance with the License. 2520 * You may obtain a copy of the License at 2521 * 2522 * http://www.apache.org/licenses/LICENSE-2.0 2523 * 2524 * Unless required by applicable law or agreed to in writing, software 2525 * distributed under the License is distributed on an "AS IS" BASIS, 2526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2527 * See the License for the specific language governing permissions and 2528 * limitations under the License. 2529 */let InMemoryPersistence=class InMemoryPersistence{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set($,et){this.storage[$]=et}async _get($){let et=this.storage[$];return void 0===et?null:et}async _remove($){delete this.storage[$]}_addListener($,et){}_removeListener($,et){}};/** 2530 * @license 2531 * Copyright 2019 Google LLC 2532 * 2533 * Licensed under the Apache License, Version 2.0 (the "License"); 2534 * you may not use this file except in compliance with the License. 2535 * You may obtain a copy of the License at 2536 * 2537 * http://www.apache.org/licenses/LICENSE-2.0 2538 * 2539 * Unless required by applicable law or agreed to in writing, software 2540 * distributed under the License is distributed on an "AS IS" BASIS, 2541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2542 * See the License for the specific language governing permissions and 2543 * limitations under the License. 2544 */function _persistenceKeyName($,et,en){return`firebase:${$}:${et}:${en}`}InMemoryPersistence.type="NONE";let PersistenceUserManager=class PersistenceUserManager{constructor($,et,en){this.persistence=$,this.auth=et,this.userKey=en;let{config:er,name:ei}=this.auth;this.fullUserKey=_persistenceKeyName(this.userKey,er.apiKey,ei),this.fullPersistenceKey=_persistenceKeyName("persistence",er.apiKey,ei),this.boundEventHandler=et._onStorageEvent.bind(et),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser($){return this.persistence._set(this.fullUserKey,$.toJSON())}async getCurrentUser(){let $=await this.persistence._get(this.fullUserKey);if(!$)return null;if("string"==typeof $){let et=await getAccountInfo(this.auth,{idToken:$}).catch(()=>void 0);return et?UserImpl._fromGetAccountInfoResponse(this.auth,et,$):null}return UserImpl._fromJSON(this.auth,$)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence($){if(this.persistence===$)return;let et=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=$,et)return this.setCurrentUser(et)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create($,et,en="authUser"){if(!et.length)return new PersistenceUserManager(_getInstance(InMemoryPersistence),$,en);let er=(await Promise.all(et.map(async $=>{if(await $._isAvailable())return $}))).filter($=>$),ei=er[0]||_getInstance(InMemoryPersistence),eo=_persistenceKeyName(en,$.config.apiKey,$.name),es=null;for(let en of et)try{let et=await en._get(eo);if(et){let er;if("string"==typeof et){let en=await getAccountInfo($,{idToken:et}).catch(()=>void 0);if(!en)break;er=await UserImpl._fromGetAccountInfoResponse($,en,et)}else er=UserImpl._fromJSON($,et);en!==ei&&(es=er),ei=en;break}}catch{}let el=er.filter($=>$._shouldAllowMigration);return ei._shouldAllowMigration&&el.length&&(ei=el[0],es&&await ei._set(eo,es.toJSON()),await Promise.all(et.map(async $=>{if($!==ei)try{await $._remove(eo)}catch{}}))),new PersistenceUserManager(ei,$,en)}};/** 2545 * @license 2546 * Copyright 2020 Google LLC 2547 * 2548 * Licensed under the Apache License, Version 2.0 (the "License");
2549 * you may not use this file except in compliance with the License. 2550 * You may obtain a copy of the License at 2551 * 2552 * http://www.apache.org/licenses/LICENSE-2.0 2553 * 2554 * Unless required by applicable law or agreed to in writing, software 2555 * distributed under the License is distributed on an "AS IS" BASIS, 2556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2557 * See the License for the specific language governing permissions and 2558 * limitations under the License. 2559 */function _getBrowserName($){let et=$.toLowerCase();if(et.includes("opera/")||et.includes("opr/")||et.includes("opios/"))return"Opera";if(_isIEMobile(et))return"IEMobile";if(et.includes("msie")||et.includes("trident/"))return"IE";{if(et.includes("edge/"))return"Edge";if(_isFirefox(et))return"Firefox";if(et.includes("silk/"))return"Silk";if(_isBlackBerry(et))return"Blackberry";if(_isWebOS(et))return"Webos";if(_isSafari(et))return"Safari";if((et.includes("chrome/")||_isChromeIOS(et))&&!et.includes("edge/"))return"Chrome";if(_isAndroid(et))return"Android";let en=$.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(en?.length===2)return en[1]}return"Other"}function _isFirefox($=(0,eo.z$)()){return/firefox\//i.test($)}function _isSafari($=(0,eo.z$)()){let et=$.toLowerCase();return et.includes("safari/")&&!et.includes("chrome/")&&!et.includes("crios/")&&!et.includes("android")}function _isChromeIOS($=(0,eo.z$)()){return/crios\//i.test($)}function _isIEMobile($=(0,eo.z$)()){return/iemobile/i.test($)}function _isAndroid($=(0,eo.z$)()){return/android/i.test($)}function _isBlackBerry($=(0,eo.z$)()){return/blackberry/i.test($)}function _isWebOS($=(0,eo.z$)()){return/webos/i.test($)}function _isIOS($=(0,eo.z$)()){return/iphone|ipad|ipod/i.test($)||/macintosh/i.test($)&&/mobile/i.test($)}function _isMobileBrowser($=(0,eo.z$)()){return _isIOS($)||_isAndroid($)||_isWebOS($)||_isBlackBerry($)||/windows phone/i.test($)||_isIEMobile($)}/** 2560 * @license 2561 * Copyright 2020 Google LLC 2562 * 2563 * Licensed under the Apache License, Version 2.0 (the "License"); 2564 * you may not use this file except in compliance with the License. 2565 * You may obtain a copy of the License at 2566 * 2567 * http://www.apache.org/licenses/LICENSE-2.0 2568 * 2569 * Unless required by applicable law or agreed to in writing, software 2570 * distributed under the License is distributed on an "AS IS" BASIS, 2571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2572 * See the License for the specific language governing permissions and 2573 * limitations under the License. 2574 */function _getClientVersion($,et=[]){let en;switch($){case"Browser":en=_getBrowserName((0,eo.z$)());break;case"Worker":en=`${_getBrowserName((0,eo.z$)())}-${$}`;break;default:en=$}let er=et.length?et.join(","):"FirebaseCore-web";return`${en}/JsCore/${ei.Jn}/${er}`}/** 2575 * @license 2576 * Copyright 2022 Google LLC 2577 * 2578 * Licensed under the Apache License, Version 2.0 (the "License"); 2579 * you may not use this file except in compliance with the License. 2580 * You may obtain a copy of the License at 2581 * 2582 * http://www.apache.org/licenses/LICENSE-2.0 2583 * 2584 * Unless required by applicable law or agreed to in writing, software 2585 * distributed under the License is distributed on an "AS IS" BASIS, 2586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2587 * See the License for the specific language governing permissions and 2588 * limitations under the License. 2589 */let AuthMiddlewareQueue=class AuthMiddlewareQueue{constructor($){this.auth=$,this.queue=[]}pushCallback($,et){let wrappedCallback=et=>new Promise((en,er)=>{try{let er=$(et);en(er)}catch($){er($)}});wrappedCallback.onAbort=et,this.queue.push(wrappedCallback);let en=this.queue.length-1;return()=>{this.queue[en]=()=>Promise.resolve()}}async runMiddleware($){if(this.auth.currentUser===$)return;let et=[];try{for(let en of this.queue)await en($),en.onAbort&&et.push(en.onAbort)}catch($){for(let $ of(et.reverse(),et))try{$()}catch($){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:$?.message})}}};/** 2590 * @license 2591 * Copyright 2023 Google LLC 2592 * 2593 * Licensed under the Apache License, Version 2.0 (the "License");
2594 * you may not use this file except in compliance with the License. 2595 * You may obtain a copy of the License at 2596 * 2597 * http://www.apache.org/licenses/LICENSE-2.0 2598 * 2599 * Unless required by applicable law or agreed to in writing, software 2600 * distributed under the License is distributed on an "AS IS" BASIS, 2601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2602 * See the License for the specific language governing permissions and 2603 * limitations under the License. 2604 */async function _getPasswordPolicy($,et={}){return _performApiRequest($,"GET","/v2/passwordPolicy",_addTidIfNecessary($,et))}let PasswordPolicyImpl=class PasswordPolicyImpl{constructor($){let et=$.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=et.minPasswordLength??6,et.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=et.maxPasswordLength),void 0!==et.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=et.containsLowercaseCharacter),void 0!==et.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=et.containsUppercaseCharacter),void 0!==et.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=et.containsNumericCharacter),void 0!==et.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=et.containsNonAlphanumericCharacter),this.enforcementState=$.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=$.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=$.forceUpgradeOnSignin??!1,this.schemaVersion=$.schemaVersion}validatePassword($){let et={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions($,et),this.validatePasswordCharacterOptions($,et),et.isValid&&(et.isValid=et.meetsMinPasswordLength??!0),et.isValid&&(et.isValid=et.meetsMaxPasswordLength??!0),et.isValid&&(et.isValid=et.containsLowercaseLetter??!0),et.isValid&&(et.isValid=et.containsUppercaseLetter??!0),et.isValid&&(et.isValid=et.containsNumericCharacter??!0),et.isValid&&(et.isValid=et.containsNonAlphanumericCharacter??!0),et}validatePasswordLengthOptions($,et){let en=this.customStrengthOptions.minPasswordLength,er=this.customStrengthOptions.maxPasswordLength;en&&(et.meetsMinPasswordLength=$.length>=en),er&&(et.meetsMaxPasswordLength=$.length<=er)}validatePasswordCharacterOptions($,et){let en;this.updatePasswordCharacterOptionsStatuses(et,!1,!1,!1,!1);for(let er=0;er<$.length;er++)en=$.charAt(er),this.updatePasswordCharacterOptionsStatuses(et,en>="a"&&en<="z",en>="A"&&en<="Z",en>="0"&&en<="9",this.allowedNonAlphanumericCharacters.includes(en))}updatePasswordCharacterOptionsStatuses($,et,en,er,ei){this.customStrengthOptions.containsLowercaseLetter&&($.containsLowercaseLetter||($.containsLowercaseLetter=et)),this.customStrengthOptions.containsUppercaseLetter&&($.containsUppercaseLetter||($.containsUppercaseLetter=en)),this.customStrengthOptions.containsNumericCharacter&&($.containsNumericCharacter||($.containsNumericCharacter=er)),this.customStrengthOptions.containsNonAlphanumericCharacter&&($.containsNonAlphanumericCharacter||($.containsNonAlphanumericCharacter=ei))}};/** 2605 * @license 2606 * Copyright 2020 Google LLC 2607 * 2608 * Licensed under the Apache License, Version 2.0 (the "License"); 2609 * you may not use this file except in compliance with the License. 2610 * You may obtain a copy of the License at 2611 * 2612 * http://www.apache.org/licenses/LICENSE-2.0 2613 * 2614 * Unless required by applicable law or agreed to in writing, software 2615 * distributed under the License is distributed on an "AS IS" BASIS, 2616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2617 * See the License for the specific language governing permissions and 2618 * limitations under the License. 2619 */let AuthImpl=class AuthImpl{constructor($,et,en,er){this.app=$,this.heartbeatServiceProvider=et,this.appCheckServiceProvider=en,this.config=er,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Subscription(this),this.idTokenSubscription=new Subscription(this),this.beforeStateQueue=new AuthMiddlewareQueue(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=eu,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=$.name,this.clientVersion=er.sdkClientVersion,this._persistenceManagerAvailable=new Promise($=>this._resolvePersistenceManagerAvailable=$)}_initializeWithPersistence($,et){return et&&(this._popupRedirectResolver=_getInstance(et)),this._initializationPromise=this.queue(async()=>
2619{if(!this._deleted&&(this.persistenceManager=await PersistenceUserManager.create(this,$),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch($){}await this.initializeCurrentUser(et),this.lastNotifiedUid=this.currentUser?.uid||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let $=await this.assertedPersistence.getCurrentUser();if(this.currentUser||$){if(this.currentUser&&$&&this.currentUser.uid===$.uid){this._currentUser._assign($),await this.currentUser.getIdToken();return}await this._updateCurrentUser($,!0)}}async initializeCurrentUserFromIdToken($){try{let et=await getAccountInfo(this,{idToken:$}),en=await UserImpl._fromGetAccountInfoResponse(this,et,$);await this.directlySetCurrentUser(en)}catch($){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",$),await this.directlySetCurrentUser(null)}}async initializeCurrentUser($){if((0,ei.rh)(this.app)){let $=this.app.settings.authIdToken;return $?new Promise(et=>{setTimeout(()=>this.initializeCurrentUserFromIdToken($).then(et,et))}):this.directlySetCurrentUser(null)}let et=await this.assertedPersistence.getCurrentUser(),en=et,er=!1;if($&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let et=this.redirectUser?._redirectEventId,ei=en?._redirectEventId,eo=await this.tryRedirectSignIn($);(!et||et===ei)&&eo?.user&&(en=eo.user,er=!0)}if(!en)return this.directlySetCurrentUser(null);if(!en._redirectEventId){if(er)try{await this.beforeStateQueue.runMiddleware(en)}catch($){en=et,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject($))}return en?this.reloadAndSetCurrentUserOrClear(en):this.directlySetCurrentUser(null)}return(_assert(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===en._redirectEventId)?this.directlySetCurrentUser(en):this.reloadAndSetCurrentUserOrClear(en)}async tryRedirectSignIn($){let et=null;try{et=await this._popupRedirectResolver._completeRedirectFn(this,$,!0)}catch($){await this._setRedirectUser(null)}return et}async reloadAndSetCurrentUserOrClear($){try{await _reloadWithoutSaving($)}catch($){if($?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser($)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let $=navigator;return $.languages&&$.languages[0]||$.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser($){if((0,ei.rh)(this.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this));let et=$?(0,eo.m9)($):null;return et&&_assert(et.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(et&&et._clone(this))}async _updateCurrentUser($,et=!1){if(!this._deleted)return $&&_assert(this.tenantId===$.tenantId,this,"tenant-id-mismatch"),et||await this.beforeStateQueue.runMiddleware($),this.queue(async()=>{await this.directlySetCurrentUser($),this.notifyAuthListeners()})}async signOut(){return(0,ei.rh)(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence($){return(0,ei.rh)(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(_getInstance($))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword($){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let et=this._getPasswordPolicyInternal();return et.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):et.validatePassword($)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let $=await _getPasswordPolicy(this),et=new PasswordPolicyImpl($);null===this.tenantId?this._projectPasswordPolicy=et:this._tenantPasswordPolicies[this.tenantId]=et}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap($){this._errorFactory=new eo.LL("auth","Firebase",$())}onAuthStateChanged($,et,en){return this.registerStateListener(this.authStateSubscription,$,et,en)}beforeAuthStateChanged($,et){return this.beforeStateQueue.pushCallback($,et)}onIdTokenChanged($,et,en){return this.registerStateListener(this.idTokenSubscription,$,et,en)}authStateReady(){return new Promise(($,et)=>{if(this.currentUser)$();else{let en=this.onAuthStateChanged(()=>{en(),$()},et)}})}async revokeAccessToken($){if(this.currentUser){let et=await this.currentUser.getIdToken(),en={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:$,idToken:et};null!=this.tenantId&&(en.tenantId=this.tenantId),await revokeToken(this,en)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser($,et){let en=await this.getOrInitRedirectPersistenceManager(et);return null===$?en.removeCurrentUser():en.setCurrentUser($)}async getOrInitRedirectPersistenceManager($){if(!this.redirectPersistenceManager){let et=$&&_getInstance($)||this._popupRedirectResolver;_assert(et,this,"argument-error"),this.redirectPersistenceManager=await PersistenceUserManager.create(this,[_getInstance(et._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId($){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===$)?this._currentUser:this.redirectUser?._redirectEventId===$?this.redirectUser:null}async _persistUserIfCurrent($){if($===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser($))}_notifyListenersIfCurrent($){$===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(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let $=this.currentUser?.uid??null;this.lastNotifiedUid!==$&&(this.lastNotifiedUid=$,this.authStateSubscription.next(this.currentUser))}registerStateListener($,et,en,er){if(this._deleted)return()=>{};let ei="function"==typeof et?et:et.next.bind(et),eo=!1,es=this._isInitialized?Promise.resolve():this._initializationPromise;if(_assert(es,this,"internal-error"),es.then(()=>{eo||ei(this.currentUser)}),"function"==typeof et){let ei=$.addObserver(et,en,er);return()=>{eo=!0,ei()}}{let en=$.addObserver(et);return()=>{eo=!0,en()}}}async directlySetCurrentUser($){this.currentUser&&this.currentUser!==$&&this._currentUser._stopProactiveRefresh(),$&&this.isProactiveRefreshEnabled&&$._startProactiveRefresh(),this.currentUser=$,$?await this.assertedPersistence.setCurrentUser($):await this.assertedPersistence.removeCurrentUser()}queue($){return this.operations=this.operations.then($,$),this.operations}get assertedPersistence(){return _assert(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework($){!$||this.frameworks.includes($)||(this.frameworks.push($),this.frameworks.sort(),this.clientVersion=_getClientVersion(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let $={"X-Client-Version":this.clientVersion};this.app.options.appId&&($["X-Firebase-gmpid"]=this.app.options.appId);let et=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();et&&($["X-Firebase-Client"]=et);let en=await this._getAppCheckToken();return en&&($["X-Firebase-AppCheck"]=en),$}async _getAppCheckToken(){if((0,ei.rh)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let $=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return $?.error&&function($,...et){eh.logLevel<=es.in.WARN&&eh.warn(`Auth (${ei.Jn}): ${$}`,...et)}(`Error while retrieving App Check token: ${$.error}`),$?.token}};function _castAuth($){return(0,eo.m9)($)}let Subscription=class Subscription{constructor($){this.auth=$,this.observer=null,this.addObserver=(0,eo.ne)($=>this.observer=$)}get next(){return _assert(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};/** 2620 * @license 2621 * Copyright 2020 Google LLC 2622 * 2623 * Licensed under the Apache License, Version 2.0 (the "License");
2624 * you may not use this file except in compliance with the License. 2625 * You may obtain a copy of the License at 2626 * 2627 * http://www.apache.org/licenses/LICENSE-2.0 2628 * 2629 * Unless required by applicable law or agreed to in writing, software 2630 * distributed under the License is distributed on an "AS IS" BASIS, 2631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2632 * See the License for the specific language governing permissions and 2633 * limitations under the License. 2634 */let ey={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function _generateCallbackName($){return`__${$}${Math.floor(1e6*Math.random())}`}let MockGreCAPTCHATopLevel=class MockGreCAPTCHATopLevel{constructor(){this.enterprise=new MockGreCAPTCHA}ready($){$()}execute($,et){return Promise.resolve("token")}render($,et){return""}};let MockGreCAPTCHA=class MockGreCAPTCHA{ready($){$()}execute($,et){return Promise.resolve("token")}render($,et){return""}};let ev="NO_RECAPTCHA";let RecaptchaEnterpriseVerifier=class RecaptchaEnterpriseVerifier{constructor($){this.type="recaptcha-enterprise",this.auth=_castAuth($)}async verify($="verify",et=!1){async function retrieveSiteKey($){if(!et){if(null==$.tenantId&&null!=$._agentRecaptchaConfig)return $._agentRecaptchaConfig.siteKey;if(null!=$.tenantId&&void 0!==$._tenantRecaptchaConfigs[$.tenantId])return $._tenantRecaptchaConfigs[$.tenantId].siteKey}return new Promise(async(et,en)=>{getRecaptchaConfig($,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(er=>{if(void 0===er.recaptchaKey)en(Error("recaptcha Enterprise site key undefined"));else{let en=new RecaptchaConfig(er);return null==$.tenantId?$._agentRecaptchaConfig=en:$._tenantRecaptchaConfigs[$.tenantId]=en,et(en.siteKey)}}).catch($=>{en($)})})}function retrieveRecaptchaToken(et,en,er){let ei=window.grecaptcha;isEnterprise(ei)?ei.enterprise.ready(()=>{ei.enterprise.execute(et,{action:$}).then($=>{en($)}).catch(()=>{en(ev)})}):er(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){let $=new MockGreCAPTCHATopLevel;return $.execute("siteKey",{action:"verify"})}return new Promise(($,en)=>{retrieveSiteKey(this.auth).then(er=>{if(!et&&isEnterprise(window.grecaptcha))retrieveRecaptchaToken(er,$,en);else{var ei;if("undefined"==typeof window){en(Error("RecaptchaVerifier is only supported in browser"));return}let et=ey.recaptchaEnterpriseScript;0!==et.length&&(et+=er),(ei=et,ey.loadJS(ei)).then(()=>{retrieveRecaptchaToken(er,$,en)}).catch($=>{en($)})}}).catch($=>{en($)})})}};async function injectRecaptchaFields($,et,en,er=!1,ei=!1){let eo;let es=new RecaptchaEnterpriseVerifier($);if(ei)eo=ev;else try{eo=await es.verify(en)}catch($){eo=await es.verify(en,!0)}let el={...et};if("mfaSmsEnrollment"===en||"mfaSmsSignIn"===en){if("phoneEnrollmentInfo"in el){let $=el.phoneEnrollmentInfo.phoneNumber,et=el.phoneEnrollmentInfo.recaptchaToken;Object.assign(el,{phoneEnrollmentInfo:{phoneNumber:$,recaptchaToken:et,captchaResponse:eo,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in el){let $=el.phoneSignInInfo.recaptchaToken;Object.assign(el,{phoneSignInInfo:{recaptchaToken:$,captchaResponse:eo,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return el}return er?Object.assign(el,{captchaResp:eo}):Object.assign(el,{captchaResponse:eo}),Object.assign(el,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(el,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),el}async function handleRecaptchaFlow($,et,en,er,ei){if("EMAIL_PASSWORD_PROVIDER"===ei){if(!$._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return er($,et).catch(async ei=>{if("auth/missing-recaptcha-token"!==ei.code)return Promise.reject(ei);{console.log(`${en} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let ei=await injectRecaptchaFields($,et,en,"getOobCode"===en);return er($,ei)}});{let ei=await injectRecaptchaFields($,et,en,"getOobCode"===en);return er($,ei)}}
2634if("PHONE_PROVIDER"!==ei)return Promise.reject(ei+" provider is not supported.");if($._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let ei=await injectRecaptchaFields($,et,en);return er($,ei).catch(async ei=>{if($._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===ei.code||"auth/invalid-app-credential"===ei.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${en} flow.`);let ei=await injectRecaptchaFields($,et,en,!1,!0);return er($,ei)}return Promise.reject(ei)})}{let ei=await injectRecaptchaFields($,et,en,!1,!0);return er($,ei)}}async function _initializeRecaptchaConfig($){let et=_castAuth($),en=await getRecaptchaConfig(et,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),er=new RecaptchaConfig(en);if(null==et.tenantId?et._agentRecaptchaConfig=er:et._tenantRecaptchaConfigs[et.tenantId]=er,er.isAnyProviderEnabled()){let $=new RecaptchaEnterpriseVerifier(et);$.verify()}}function extractProtocol($){let et=$.indexOf(":");return et<0?"":$.substr(0,et+1)}function parsePort($){if(!$)return null;let et=Number($);return isNaN(et)?null:et}/** 2635 * @license 2636 * Copyright 2020 Google LLC 2637 * 2638 * Licensed under the Apache License, Version 2.0 (the "License"); 2639 * you may not use this file except in compliance with the License. 2640 * You may obtain a copy of the License at 2641 * 2642 * http://www.apache.org/licenses/LICENSE-2.0 2643 * 2644 * Unless required by applicable law or agreed to in writing, software 2645 * distributed under the License is distributed on an "AS IS" BASIS, 2646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2647 * See the License for the specific language governing permissions and 2648 * limitations under the License. 2649 */let AuthCredential=class AuthCredential{constructor($,et){this.providerId=$,this.signInMethod=et}toJSON(){return debugFail("not implemented")}_getIdTokenResponse($){return debugFail("not implemented")}_linkToIdToken($,et){return debugFail("not implemented")}_getReauthenticationResolver($){return debugFail("not implemented")}};async function linkEmailPassword($,et){return _performApiRequest($,"POST","/v1/accounts:signUp",et)}/** 2650 * @license 2651 * Copyright 2020 Google LLC 2652 * 2653 * Licensed under the Apache License, Version 2.0 (the "License"); 2654 * you may not use this file except in compliance with the License. 2655 * You may obtain a copy of the License at 2656 * 2657 * http://www.apache.org/licenses/LICENSE-2.0 2658 * 2659 * Unless required by applicable law or agreed to in writing, software 2660 * distributed under the License is distributed on an "AS IS" BASIS, 2661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2662 * See the License for the specific language governing permissions and 2663 * limitations under the License. 2664 */async function signInWithPassword($,et){return _performSignInRequest($,"POST","/v1/accounts:signInWithPassword",_addTidIfNecessary($,et))}async function sendOobCode($,et){return _performApiRequest($,"POST","/v1/accounts:sendOobCode",_addTidIfNecessary($,et))}async function sendEmailVerification$1($,et){return sendOobCode($,et)}async function sendPasswordResetEmail$1($,et){return sendOobCode($,et)}/** 2665 * @license 2666 * Copyright 2020 Google LLC 2667 * 2668 * Licensed under the Apache License, Version 2.0 (the "License"); 2669 * you may not use this file except in compliance with the License. 2670 * You may obtain a copy of the License at 2671 * 2672 * http://www.apache.org/licenses/LICENSE-2.0 2673 * 2674 * Unless required by applicable law or agreed to in writing, software 2675 * distributed under the License is distributed on an "AS IS" BASIS, 2676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2677 * See the License for the specific language governing permissions and 2678 * limitations under the License. 2679 */async function signInWithEmailLink$1($,et){return _performSignInRequest($,"POST","/v1/accounts:signInWithEmailLink",_addTidIfNecessary($,et))}async function signInWithEmailLinkForLinking($,et){return _performSignInRequest($,"POST","/v1/accounts:signInWithEmailLink",_addTidIfNecessary($,et))}/** 2680 * @license 2681 * Copyright 2020 Google LLC 2682 * 2683 * Licensed under the Apache License, Version 2.0 (the "License");
2684 * you may not use this file except in compliance with the License. 2685 * You may obtain a copy of the License at 2686 * 2687 * http://www.apache.org/licenses/LICENSE-2.0 2688 * 2689 * Unless required by applicable law or agreed to in writing, software 2690 * distributed under the License is distributed on an "AS IS" BASIS, 2691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2692 * See the License for the specific language governing permissions and 2693 * limitations under the License. 2694 */let EmailAuthCredential=class EmailAuthCredential extends AuthCredential{constructor($,et,en,er=null){super("password",en),this._email=$,this._password=et,this._tenantId=er}static _fromEmailAndPassword($,et){return new EmailAuthCredential($,et,"password")}static _fromEmailAndCode($,et,en=null){return new EmailAuthCredential($,et,"emailLink",en)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON($){let et="string"==typeof $?JSON.parse($):$;if(et?.email&&et?.password){if("password"===et.signInMethod)return this._fromEmailAndPassword(et.email,et.password);if("emailLink"===et.signInMethod)return this._fromEmailAndCode(et.email,et.password,et.tenantId)}return null}async _getIdTokenResponse($){switch(this.signInMethod){case"password":let et={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return handleRecaptchaFlow($,et,"signInWithPassword",signInWithPassword,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return signInWithEmailLink$1($,{email:this._email,oobCode:this._password});default:_fail($,"internal-error")}}async _linkToIdToken($,et){switch(this.signInMethod){case"password":let en={idToken:et,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return handleRecaptchaFlow($,en,"signUpPassword",linkEmailPassword,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return signInWithEmailLinkForLinking($,{idToken:et,email:this._email,oobCode:this._password});default:_fail($,"internal-error")}}_getReauthenticationResolver($){return this._getIdTokenResponse($)}};/** 2695 * @license 2696 * Copyright 2020 Google LLC 2697 * 2698 * Licensed under the Apache License, Version 2.0 (the "License"); 2699 * you may not use this file except in compliance with the License. 2700 * You may obtain a copy of the License at 2701 * 2702 * http://www.apache.org/licenses/LICENSE-2.0 2703 * 2704 * Unless required by applicable law or agreed to in writing, software 2705 * distributed under the License is distributed on an "AS IS" BASIS, 2706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2707 * See the License for the specific language governing permissions and 2708 * limitations under the License. 2709 */async function signInWithIdp($,et){return _performSignInRequest($,"POST","/v1/accounts:signInWithIdp",_addTidIfNecessary($,et))}let OAuthCredential=class OAuthCredential extends AuthCredential{constructor(){super(...arguments),this.pendingToken=null}static _fromParams($){let et=new OAuthCredential($.providerId,$.signInMethod);return $.idToken||$.accessToken?($.idToken&&(et.idToken=$.idToken),$.accessToken&&(et.accessToken=$.accessToken),$.nonce&&!$.pendingToken&&(et.nonce=$.nonce),$.pendingToken&&(et.pendingToken=$.pendingToken)):$.oauthToken&&$.oauthTokenSecret?(et.accessToken=$.oauthToken,et.secret=$.oauthTokenSecret):_fail("argument-error"),et}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2709once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON($){let et="string"==typeof $?JSON.parse($):$,{providerId:en,signInMethod:er,...ei}=et;if(!en||!er)return null;let eo=new OAuthCredential(en,er);return eo.idToken=ei.idToken||void 0,eo.accessToken=ei.accessToken||void 0,eo.secret=ei.secret,eo.nonce=ei.nonce,eo.pendingToken=ei.pendingToken||null,eo}_getIdTokenResponse($){let et=this.buildRequest();return signInWithIdp($,et)}_linkToIdToken($,et){let en=this.buildRequest();return en.idToken=et,signInWithIdp($,en)}_getReauthenticationResolver($){let et=this.buildRequest();return et.autoCreate=!1,signInWithIdp($,et)}buildRequest(){let $={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)$.pendingToken=this.pendingToken;else{let et={};this.idToken&&(et.id_token=this.idToken),this.accessToken&&(et.access_token=this.accessToken),this.secret&&(et.oauth_token_secret=this.secret),et.providerId=this.providerId,this.nonce&&!this.pendingToken&&(et.nonce=this.nonce),$.postBody=(0,eo.xO)(et)}return $}};/** 2710 * @license 2711 * Copyright 2020 Google LLC 2712 * 2713 * Licensed under the Apache License, Version 2.0 (the "License"); 2714 * you may not use this file except in compliance with the License. 2715 * You may obtain a copy of the License at 2716 * 2717 * http://www.apache.org/licenses/LICENSE-2.0 2718 * 2719 * Unless required by applicable law or agreed to in writing, software 2720 * distributed under the License is distributed on an "AS IS" BASIS, 2721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2722 * See the License for the specific language governing permissions and 2723 * limitations under the License. 2724 */async function sendPhoneVerificationCode($,et){return _performApiRequest($,"POST","/v1/accounts:sendVerificationCode",_addTidIfNecessary($,et))}async function signInWithPhoneNumber$1($,et){return _performSignInRequest($,"POST","/v1/accounts:signInWithPhoneNumber",_addTidIfNecessary($,et))}async function linkWithPhoneNumber$1($,et){let en=await _performSignInRequest($,"POST","/v1/accounts:signInWithPhoneNumber",_addTidIfNecessary($,et));if(en.temporaryProof)throw _makeTaggedError($,"account-exists-with-different-credential",en);return en}let ex={USER_NOT_FOUND:"user-not-found"};async function verifyPhoneNumberForExisting($,et){let en={...et,operation:"REAUTH"};return _performSignInRequest($,"POST","/v1/accounts:signInWithPhoneNumber",_addTidIfNecessary($,en),ex)}/** 2725 * @license 2726 * Copyright 2020 Google LLC 2727 * 2728 * Licensed under the Apache License, Version 2.0 (the "License"); 2729 * you may not use this file except in compliance with the License. 2730 * You may obtain a copy of the License at 2731 * 2732 * http://www.apache.org/licenses/LICENSE-2.0 2733 * 2734 * Unless required by applicable law or agreed to in writing, software 2735 * distributed under the License is distributed on an "AS IS" BASIS, 2736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2737 * See the License for the specific language governing permissions and 2738 * limitations under the License. 2739 */let PhoneAuthCredential=class PhoneAuthCredential extends AuthCredential{constructor($){super("phone","phone"),this.params=$}static _fromVerification($,et){return new PhoneAuthCredential({verificationId:$,verificationCode:et})}static _fromTokenResponse($,et){return new PhoneAuthCredential({phoneNumber:$,temporaryProof:et})}_getIdTokenResponse($){return signInWithPhoneNumber$1($,this._makeVerificationRequest())}_linkToIdToken($,et){return linkWithPhoneNumber$1($,{idToken:et,...this._makeVerificationRequest()})}_getReauthenticationResolver($){return verifyPhoneNumberForExisting($,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:$,phoneNumber:et,verificationId:en,verificationCode:er}=this.params;return $&&et?{temporaryProof:$,phoneNumber:et}:{sessionInfo:en,code:er}}toJSON(){let $={providerId:this.providerId};return this.params.phoneNumber&&($.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&($.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&($.verificationCode=this.params.verificationCode),this.params.verificationId&&($.verificationId=this.params.verificationId),$}static fromJSON($){"string"==typeof $&&($=JSON.parse($));let{verificationId:et,verificationCode:en,phoneNumber:er,temporaryProof:ei}=$;return en||et||er||ei?new PhoneAuthCredential({verificationId:et,verificationCode:en,phoneNumber:er,temporaryProof:ei}):null}};let ActionCodeURL=class ActionCodeURL{constructor($){let et=(0,eo.zd)((0,eo.pd)($)),en=et.apiKey??null,er=et.oobCode??null,ei=/** 2740 * @license 2741 * Copyright 2020 Google LLC 2742 * 2743 * Licensed under the Apache License, Version 2.0 (the "License");
2744 * you may not use this file except in compliance with the License. 2745 * You may obtain a copy of the License at 2746 * 2747 * http://www.apache.org/licenses/LICENSE-2.0 2748 * 2749 * Unless required by applicable law or agreed to in writing, software 2750 * distributed under the License is distributed on an "AS IS" BASIS, 2751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2752 * See the License for the specific language governing permissions and 2753 * limitations under the License. 2754 */function($){switch($){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}}(et.mode??null);_assert(en&&er&&ei,"argument-error"),this.apiKey=en,this.operation=ei,this.code=er,this.continueUrl=et.continueUrl??null,this.languageCode=et.lang??null,this.tenantId=et.tenantId??null}static parseLink($){let et=function($){let et=(0,eo.zd)((0,eo.pd)($)).link,en=et?(0,eo.zd)((0,eo.pd)(et)).deep_link_id:null,er=(0,eo.zd)((0,eo.pd)($)).deep_link_id,ei=er?(0,eo.zd)((0,eo.pd)(er)).link:null;return ei||er||en||et||$}($);try{return new ActionCodeURL(et)}catch{return null}}};/** 2755 * @license 2756 * Copyright 2020 Google LLC 2757 * 2758 * Licensed under the Apache License, Version 2.0 (the "License"); 2759 * you may not use this file except in compliance with the License. 2760 * You may obtain a copy of the License at 2761 * 2762 * http://www.apache.org/licenses/LICENSE-2.0 2763 * 2764 * Unless required by applicable law or agreed to in writing, software 2765 * distributed under the License is distributed on an "AS IS" BASIS, 2766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2767 * See the License for the specific language governing permissions and 2768 * limitations under the License. 2769 */let EmailAuthProvider=class EmailAuthProvider{constructor(){this.providerId=EmailAuthProvider.PROVIDER_ID}static credential($,et){return EmailAuthCredential._fromEmailAndPassword($,et)}static credentialWithLink($,et){let en=ActionCodeURL.parseLink(et);return _assert(en,"argument-error"),EmailAuthCredential._fromEmailAndCode($,en.code,en.tenantId)}};EmailAuthProvider.PROVIDER_ID="password",EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD="password",EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** 2770 * @license 2771 * Copyright 2020 Google LLC 2772 * 2773 * Licensed under the Apache License, Version 2.0 (the "License"); 2774 * you may not use this file except in compliance with the License. 2775 * You may obtain a copy of the License at 2776 * 2777 * http://www.apache.org/licenses/LICENSE-2.0 2778 * 2779 * Unless required by applicable law or agreed to in writing, software 2780 * distributed under the License is distributed on an "AS IS" BASIS, 2781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2782 * See the License for the specific language governing permissions and 2783 * limitations under the License. 2784 */let FederatedAuthProvider=class FederatedAuthProvider{constructor($){this.providerId=$,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage($){this.defaultLanguageCode=$}setCustomParameters($){return this.customParameters=$,this}getCustomParameters(){return this.customParameters}};/** 2785 * @license 2786 * Copyright 2019 Google LLC 2787 * 2788 * Licensed under the Apache License, Version 2.0 (the "License"); 2789 * you may not use this file except in compliance with the License. 2790 * You may obtain a copy of the License at 2791 * 2792 * http://www.apache.org/licenses/LICENSE-2.0 2793 * 2794 * Unless required by applicable law or agreed to in writing, software 2795 * distributed under the License is distributed on an "AS IS" BASIS, 2796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2797 * See the License for the specific language governing permissions and 2798 * limitations under the License. 2799 */let BaseOAuthProvider=class BaseOAuthProvider extends FederatedAuthProvider{constructor(){super(...arguments),this.scopes=[]}addScope($){return this.scopes.includes($)||this.scopes.push($),this}getScopes(){return[...this.scopes]}};/** 2800 * @license 2801 * Copyright 2020 Google LLC 2802 * 2803 * Licensed under the Apache License, Version 2.0 (the "License");
2804 * you may not use this file except in compliance with the License. 2805 * You may obtain a copy of the License at 2806 * 2807 * http://www.apache.org/licenses/LICENSE-2.0 2808 * 2809 * Unless required by applicable law or agreed to in writing, software 2810 * distributed under the License is distributed on an "AS IS" BASIS, 2811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2812 * See the License for the specific language governing permissions and 2813 * limitations under the License. 2814 */let FacebookAuthProvider=class FacebookAuthProvider extends BaseOAuthProvider{constructor(){super("facebook.com")}static credential($){return OAuthCredential._fromParams({providerId:FacebookAuthProvider.PROVIDER_ID,signInMethod:FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,accessToken:$})}static credentialFromResult($){return FacebookAuthProvider.credentialFromTaggedObject($)}static credentialFromError($){return FacebookAuthProvider.credentialFromTaggedObject($.customData||{})}static credentialFromTaggedObject({_tokenResponse:$}){if(!$||!("oauthAccessToken"in $)||!$.oauthAccessToken)return null;try{return FacebookAuthProvider.credential($.oauthAccessToken)}catch{return null}}};FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD="facebook.com",FacebookAuthProvider.PROVIDER_ID="facebook.com";/** 2815 * @license 2816 * Copyright 2020 Google LLC 2817 * 2818 * Licensed under the Apache License, Version 2.0 (the "License"); 2819 * you may not use this file except in compliance with the License. 2820 * You may obtain a copy of the License at 2821 * 2822 * http://www.apache.org/licenses/LICENSE-2.0 2823 * 2824 * Unless required by applicable law or agreed to in writing, software 2825 * distributed under the License is distributed on an "AS IS" BASIS, 2826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2827 * See the License for the specific language governing permissions and 2828 * limitations under the License. 2829 */let GoogleAuthProvider=class GoogleAuthProvider extends BaseOAuthProvider{constructor(){super("google.com"),this.addScope("profile")}static credential($,et){return OAuthCredential._fromParams({providerId:GoogleAuthProvider.PROVIDER_ID,signInMethod:GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,idToken:$,accessToken:et})}static credentialFromResult($){return GoogleAuthProvider.credentialFromTaggedObject($)}static credentialFromError($){return GoogleAuthProvider.credentialFromTaggedObject($.customData||{})}static credentialFromTaggedObject({_tokenResponse:$}){if(!$)return null;let{oauthIdToken:et,oauthAccessToken:en}=$;if(!et&&!en)return null;try{return GoogleAuthProvider.credential(et,en)}catch{return null}}};GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD="google.com",GoogleAuthProvider.PROVIDER_ID="google.com";/** 2830 * @license 2831 * Copyright 2020 Google LLC 2832 * 2833 * Licensed under the Apache License, Version 2.0 (the "License"); 2834 * you may not use this file except in compliance with the License. 2835 * You may obtain a copy of the License at 2836 * 2837 * http://www.apache.org/licenses/LICENSE-2.0 2838 * 2839 * Unless required by applicable law or agreed to in writing, software 2840 * distributed under the License is distributed on an "AS IS" BASIS, 2841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2842 * See the License for the specific language governing permissions and 2843 * limitations under the License. 2844 */let GithubAuthProvider=class GithubAuthProvider extends BaseOAuthProvider{constructor(){super("github.com")}static credential($){return OAuthCredential._fromParams({providerId:GithubAuthProvider.PROVIDER_ID,signInMethod:GithubAuthProvider.GITHUB_SIGN_IN_METHOD,accessToken:$})}static credentialFromResult($){return GithubAuthProvider.credentialFromTaggedObject($)}static credentialFromError($){return GithubAuthProvider.credentialFromTaggedObject($.customData||{})}static credentialFromTaggedObject({_tokenResponse:$}){if(!$||!("oauthAccessToken"in $)||!$.oauthAccessToken)return null;try{return GithubAuthProvider.credential($.oauthAccessToken)}catch{return null}}};GithubAuthProvider.GITHUB_SIGN_IN_METHOD="github.com",GithubAuthProvider.PROVIDER_ID="github.com";/** 2845 * @license 2846 * Copyright 2020 Google LLC 2847 * 2848 * Licensed under the Apache License, Version 2.0 (the "License");
2849 * you may not use this file except in compliance with the License. 2850 * You may obtain a copy of the License at 2851 * 2852 * http://www.apache.org/licenses/LICENSE-2.0 2853 * 2854 * Unless required by applicable law or agreed to in writing, software 2855 * distributed under the License is distributed on an "AS IS" BASIS, 2856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2857 * See the License for the specific language governing permissions and 2858 * limitations under the License. 2859 */let TwitterAuthProvider=class TwitterAuthProvider extends BaseOAuthProvider{constructor(){super("twitter.com")}static credential($,et){return OAuthCredential._fromParams({providerId:TwitterAuthProvider.PROVIDER_ID,signInMethod:TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,oauthToken:$,oauthTokenSecret:et})}static credentialFromResult($){return TwitterAuthProvider.credentialFromTaggedObject($)}static credentialFromError($){return TwitterAuthProvider.credentialFromTaggedObject($.customData||{})}static credentialFromTaggedObject({_tokenResponse:$}){if(!$)return null;let{oauthAccessToken:et,oauthTokenSecret:en}=$;if(!et||!en)return null;try{return TwitterAuthProvider.credential(et,en)}catch{return null}}};/** 2860 * @license 2861 * Copyright 2020 Google LLC 2862 * 2863 * Licensed under the Apache License, Version 2.0 (the "License"); 2864 * you may not use this file except in compliance with the License. 2865 * You may obtain a copy of the License at 2866 * 2867 * http://www.apache.org/licenses/LICENSE-2.0 2868 * 2869 * Unless required by applicable law or agreed to in writing, software 2870 * distributed under the License is distributed on an "AS IS" BASIS, 2871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2872 * See the License for the specific language governing permissions and 2873 * limitations under the License. 2874 */async function signUp($,et){return _performSignInRequest($,"POST","/v1/accounts:signUp",_addTidIfNecessary($,et))}TwitterAuthProvider.TWITTER_SIGN_IN_METHOD="twitter.com",TwitterAuthProvider.PROVIDER_ID="twitter.com";/** 2875 * @license 2876 * Copyright 2020 Google LLC 2877 * 2878 * Licensed under the Apache License, Version 2.0 (the "License"); 2879 * you may not use this file except in compliance with the License. 2880 * You may obtain a copy of the License at 2881 * 2882 * http://www.apache.org/licenses/LICENSE-2.0 2883 * 2884 * Unless required by applicable law or agreed to in writing, software 2885 * distributed under the License is distributed on an "AS IS" BASIS, 2886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2887 * See the License for the specific language governing permissions and 2888 * limitations under the License. 2889 */let UserCredentialImpl=class UserCredentialImpl{constructor($){this.user=$.user,this.providerId=$.providerId,this._tokenResponse=$._tokenResponse,this.operationType=$.operationType}static async _fromIdTokenResponse($,et,en,er=!1){let ei=await UserImpl._fromIdTokenResponse($,en,er),eo=providerIdForResponse(en),es=new UserCredentialImpl({user:ei,providerId:eo,_tokenResponse:en,operationType:et});return es}static async _forOperation($,et,en){await $._updateTokensIfNecessary(en,!0);let er=providerIdForResponse(en);return new UserCredentialImpl({user:$,providerId:er,_tokenResponse:en,operationType:et})}};function providerIdForResponse($){return $.providerId?$.providerId:"phoneNumber"in $?"phone":null}/** 2890 * @license 2891 * Copyright 2020 Google LLC 2892 * 2893 * Licensed under the Apache License, Version 2.0 (the "License"); 2894 * you may not use this file except in compliance with the License. 2895 * You may obtain a copy of the License at 2896 * 2897 * http://www.apache.org/licenses/LICENSE-2.0 2898 * 2899 * Unless required by applicable law or agreed to in writing, software 2900 * distributed under the License is distributed on an "AS IS" BASIS, 2901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2902 * See the License for the specific language governing permissions and 2903 * limitations under the License. 2904 */let MultiFactorError=class MultiFactorError extends eo.ZR{constructor($,et,en,er){super(et.code,et.message),this.operationType=en,this.user=er,Object.setPrototypeOf(this,MultiFactorError.prototype),this.customData={appName:$.name,tenantId:$.tenantId??void 0,_serverResponse:et.customData._serverResponse,operationType:en}}static _fromErrorAndOperation($,et,en,er){return new MultiFactorError($,et,en,er)}};function _processCredentialSavingMfaContextIfNecessary($,et,en,er){let ei="reauthenticate"===et?en._getReauthenticationResolver($):en._getIdTokenResponse($);return ei.catch(en=>{if("auth/multi-factor-auth-required"===en.code)throw MultiFactorError._fromErrorAndOperation($,en,et,er);throw en})}async function _link$1($,et,en=!1){let er=await _logoutIfInvalidated($,et._linkToIdToken($.auth,await $.getIdToken()),en);return UserCredentialImpl._forOperation($,"link",er)}/** 2905 * @license 2906 * Copyright 2019 Google LLC 2907 * 2908 * Licensed under the Apache License, Version 2.0 (the "License");
2909 * you may not use this file except in compliance with the License. 2910 * You may obtain a copy of the License at 2911 * 2912 * http://www.apache.org/licenses/LICENSE-2.0 2913 * 2914 * Unless required by applicable law or agreed to in writing, software 2915 * distributed under the License is distributed on an "AS IS" BASIS, 2916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2917 * See the License for the specific language governing permissions and 2918 * limitations under the License. 2919 */async function _reauthenticate($,et,en=!1){let{auth:er}=$;if((0,ei.rh)(er.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(er));let eo="reauthenticate";try{let ei=await _logoutIfInvalidated($,_processCredentialSavingMfaContextIfNecessary(er,eo,et,$),en);_assert(ei.idToken,er,"internal-error");let es=_parseToken(ei.idToken);_assert(es,er,"internal-error");let{sub:el}=es;return _assert($.uid===el,er,"user-mismatch"),UserCredentialImpl._forOperation($,eo,ei)}catch($){throw $?.code==="auth/user-not-found"&&_fail(er,"user-mismatch"),$}}/** 2920 * @license 2921 * Copyright 2020 Google LLC 2922 * 2923 * Licensed under the Apache License, Version 2.0 (the "License"); 2924 * you may not use this file except in compliance with the License. 2925 * You may obtain a copy of the License at 2926 * 2927 * http://www.apache.org/licenses/LICENSE-2.0 2928 * 2929 * Unless required by applicable law or agreed to in writing, software 2930 * distributed under the License is distributed on an "AS IS" BASIS, 2931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2932 * See the License for the specific language governing permissions and 2933 * limitations under the License. 2934 */async function _signInWithCredential($,et,en=!1){if((0,ei.rh)($.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError($));let er="signIn",eo=await _processCredentialSavingMfaContextIfNecessary($,er,et),es=await UserCredentialImpl._fromIdTokenResponse($,er,eo);return en||await $._updateCurrentUser(es.user),es}async function signInWithCredential($,et){return _signInWithCredential(_castAuth($),et)}async function reauthenticateWithCredential($,et){return _reauthenticate((0,eo.m9)($),et)}/** 2935 * @license 2936 * Copyright 2020 Google LLC 2937 * 2938 * Licensed under the Apache License, Version 2.0 (the "License"); 2939 * you may not use this file except in compliance with the License. 2940 * You may obtain a copy of the License at 2941 * 2942 * http://www.apache.org/licenses/LICENSE-2.0 2943 * 2944 * Unless required by applicable law or agreed to in writing, software 2945 * distributed under the License is distributed on an "AS IS" BASIS, 2946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2947 * See the License for the specific language governing permissions and 2948 * limitations under the License. 2949 */function _setActionCodeSettingsOnRequest($,et,en){_assert(en.url?.length>0,$,"invalid-continue-uri"),_assert(void 0===en.dynamicLinkDomain||en.dynamicLinkDomain.length>0,$,"invalid-dynamic-link-domain"),_assert(void 0===en.linkDomain||en.linkDomain.length>0,$,"invalid-hosting-link-domain"),et.continueUrl=en.url,et.dynamicLinkDomain=en.dynamicLinkDomain,et.linkDomain=en.linkDomain,et.canHandleCodeInApp=en.handleCodeInApp,en.iOS&&(_assert(en.iOS.bundleId.length>0,$,"missing-ios-bundle-id"),et.iOSBundleId=en.iOS.bundleId),en.android&&(_assert(en.android.packageName.length>0,$,"missing-android-pkg-name"),et.androidInstallApp=en.android.installApp,et.androidMinimumVersionCode=en.android.minimumVersion,et.androidPackageName=en.android.packageName)}/** 2950 * @license 2951 * Copyright 2020 Google LLC 2952 * 2953 * Licensed under the Apache License, Version 2.0 (the "License"); 2954 * you may not use this file except in compliance with the License. 2955 * You may obtain a copy of the License at 2956 * 2957 * http://www.apache.org/licenses/LICENSE-2.0 2958 * 2959 * Unless required by applicable law or agreed to in writing, software 2960 * distributed under the License is distributed on an "AS IS" BASIS, 2961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2962 * See the License for the specific language governing permissions and 2963 * limitations under the License. 2964 */async function recachePasswordPolicy($){let et=_castAuth($);et._getPasswordPolicyInternal()&&await et._updatePasswordPolicy()}async function sendPasswordResetEmail($,et,en){let er=_castAuth($),ei={requestType:"PASSWORD_RESET",email:et,clientType:"CLIENT_TYPE_WEB"};en&&_setActionCodeSettingsOnRequest(er,ei,en),await handleRecaptchaFlow(er,ei,"getOobCode",sendPasswordResetEmail$1,"EMAIL_PASSWORD_PROVIDER")}
2964async function createUserWithEmailAndPassword($,et,en){if((0,ei.rh)($.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError($));let er=_castAuth($),eo=handleRecaptchaFlow(er,{returnSecureToken:!0,email:et,password:en,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",signUp,"EMAIL_PASSWORD_PROVIDER"),es=await eo.catch(et=>{throw"auth/password-does-not-meet-requirements"===et.code&&recachePasswordPolicy($),et}),el=await UserCredentialImpl._fromIdTokenResponse(er,"signIn",es);return await er._updateCurrentUser(el.user),el}function signInWithEmailAndPassword($,et,en){return(0,ei.rh)($.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError($)):signInWithCredential((0,eo.m9)($),EmailAuthProvider.credential(et,en)).catch(async et=>{throw"auth/password-does-not-meet-requirements"===et.code&&recachePasswordPolicy($),et})}/** 2965 * @license 2966 * Copyright 2020 Google LLC 2967 * 2968 * Licensed under the Apache License, Version 2.0 (the "License"); 2969 * you may not use this file except in compliance with the License. 2970 * You may obtain a copy of the License at 2971 * 2972 * http://www.apache.org/licenses/LICENSE-2.0 2973 * 2974 * Unless required by applicable law or agreed to in writing, software 2975 * distributed under the License is distributed on an "AS IS" BASIS, 2976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2977 * See the License for the specific language governing permissions and 2978 * limitations under the License. 2979 */async function createAuthUri($,et){return _performApiRequest($,"POST","/v1/accounts:createAuthUri",_addTidIfNecessary($,et))}/** 2980 * @license 2981 * Copyright 2020 Google LLC 2982 * 2983 * Licensed under the Apache License, Version 2.0 (the "License"); 2984 * you may not use this file except in compliance with the License. 2985 * You may obtain a copy of the License at 2986 * 2987 * http://www.apache.org/licenses/LICENSE-2.0 2988 * 2989 * Unless required by applicable law or agreed to in writing, software 2990 * distributed under the License is distributed on an "AS IS" BASIS, 2991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2992 * See the License for the specific language governing permissions and 2993 * limitations under the License. 2994 */async function fetchSignInMethodsForEmail($,et){let en=_isHttpOrHttps()?_getCurrentUrl():"http://localhost",{signinMethods:er}=await createAuthUri((0,eo.m9)($),{identifier:et,continueUri:en});return er||[]}async function sendEmailVerification($,et){let en=(0,eo.m9)($),er=await $.getIdToken(),ei={requestType:"VERIFY_EMAIL",idToken:er};et&&_setActionCodeSettingsOnRequest(en.auth,ei,et);let{email:es}=await sendEmailVerification$1(en.auth,ei);es!==$.email&&await $.reload()}let GenericAdditionalUserInfo=class GenericAdditionalUserInfo{constructor($,et,en={}){this.isNewUser=$,this.providerId=et,this.profile=en}};let FederatedAdditionalUserInfoWithUsername=class FederatedAdditionalUserInfoWithUsername extends GenericAdditionalUserInfo{constructor($,et,en,er){super($,et,en),this.username=er}};let FacebookAdditionalUserInfo=class FacebookAdditionalUserInfo extends GenericAdditionalUserInfo{constructor($,et){super($,"facebook.com",et)}};let GithubAdditionalUserInfo=class GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername{constructor($,et){super($,"github.com",et,"string"==typeof et?.login?et?.login:null)}};let GoogleAdditionalUserInfo=class GoogleAdditionalUserInfo extends GenericAdditionalUserInfo{constructor($,et){super($,"google.com",et)}};let TwitterAdditionalUserInfo=class TwitterAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername{constructor($,et,en){super($,"twitter.com",et,en)}};function getAdditionalUserInfo($){let{user:et,_tokenResponse:en}=$;return et.isAnonymous&&!en?{providerId:null,isNewUser:!1,profile:null}:/** 2995 * @license 2996 * Copyright 2019 Google LLC 2997 * 2998 * Licensed under the Apache License, Version 2.0 (the "License"); 2999 * you may not use this file except in compliance with the License. 3000 * You may obtain a copy of the License at 3001 * 3002 * http://www.apache.org/licenses/LICENSE-2.0 3003 * 3004 * Unless required by applicable law or agreed to in writing, softw
3004are 3005 * distributed under the License is distributed on an "AS IS" BASIS, 3006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3007 * See the License for the specific language governing permissions and 3008 * limitations under the License. 3009 */function($){if(!$)return null;let{providerId:et}=$,en=$.rawUserInfo?JSON.parse($.rawUserInfo):{},er=$.isNewUser||"identitytoolkit#SignupNewUserResponse"===$.kind;if(!et&&$?.idToken){let et=_parseToken($.idToken)?.firebase?.sign_in_provider;if(et){let $="anonymous"!==et&&"custom"!==et?et:null;return new GenericAdditionalUserInfo(er,$)}}if(!et)return null;switch(et){case"facebook.com":return new FacebookAdditionalUserInfo(er,en);case"github.com":return new GithubAdditionalUserInfo(er,en);case"google.com":return new GoogleAdditionalUserInfo(er,en);case"twitter.com":return new TwitterAdditionalUserInfo(er,en,$.screenName||null);case"custom":case"anonymous":return new GenericAdditionalUserInfo(er,null);default:return new GenericAdditionalUserInfo(er,et,en)}}(en)}function onIdTokenChanged($,et,en,er){return(0,eo.m9)($).onIdTokenChanged(et,en,er)}function onAuthStateChanged($,et,en,er){return(0,eo.m9)($).onAuthStateChanged(et,en,er)}function signOut($){return(0,eo.m9)($).signOut()}/** 3010 * @license 3011 * Copyright 2020 Google LLC 3012 * 3013 * Licensed under the Apache License, Version 2.0 (the "License"); 3014 * you may not use this file except in compliance with the License. 3015 * You may obtain a copy of the License at 3016 * 3017 * http://www.apache.org/licenses/LICENSE-2.0 3018 * 3019 * Unless required by applicable law or agreed to in writing, software 3020 * distributed under the License is distributed on an "AS IS" BASIS, 3021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3022 * See the License for the specific language governing permissions and 3023 * limitations under the License. 3024 */function startEnrollPhoneMfa($,et){return _performApiRequest($,"POST","/v2/accounts/mfaEnrollment:start",_addTidIfNecessary($,et))}new WeakMap;let e_="__sak";/** 3025 * @license 3026 * Copyright 2019 Google LLC 3027 * 3028 * Licensed under the Apache License, Version 2.0 (the "License"); 3029 * you may not use this file except in compliance with the License. 3030 * You may obtain a copy of the License at 3031 * 3032 * http://www.apache.org/licenses/LICENSE-2.0 3033 * 3034 * Unless required by applicable law or agreed to in writing, software 3035 * distributed under the License is distributed on an "AS IS" BASIS, 3036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3037 * See the License for the specific language governing permissions and 3038 * limitations under the License. 3039 */let BrowserPersistenceClass=class BrowserPersistenceClass{constructor($,et){this.storageRetriever=$,this.type=et}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e_,"1"),this.storage.removeItem(e_),Promise.resolve(!0)}catch{return Promise.resolve(!1)}}_set($,et){return this.storage.setItem($,JSON.stringify(et)),Promise.resolve()}_get($){let et=this.storage.getItem($);return Promise.resolve(et?JSON.parse(et):null)}_remove($){return this.storage.removeItem($),Promise.resolve()}get storage(){return this.storageRetriever()}};let BrowserLocalPersistence=class BrowserLocalPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=($,et)=>this.onStorageEvent($,et),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=_isMobileBrowser(),this._shouldAllowMigration=!0}forAllChangedKeys($){for(let et of Object.keys(this.listeners)){let en=this.storage.getItem(et),er=this.localCache[et];en!==er&&$(et,er,en)}}onStorageEvent($,et=!1){if(!$.key){this.forAllChangedKeys(($,et,en)=>{this.notifyListeners($,en)});return}let en=$.key;et?this.detachListener():this.stopPolling();let triggerListeners=()=>{let $=this.storage.getItem(en);(et||this.localCache[en]!==$)&&this.notifyListeners(en,$)},er=this.storage.getItem(en);(0,eo.w1)()&&10===document.documentMode&&er!==$.newValue&&$.newValue!==$.oldValue?setTimeout(triggerListeners,10):triggerListeners()}notifyListeners($,et){this.localCache[$]=et;let en=this.listeners[$];if(en)for(let $ of Array.from(en))$(et?JSON.parse(et):et)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys(($,et,en)=>{this.onStorageEvent(new StorageEvent("storage",{key:$,oldValue:et,newValue:en}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener($,et){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[$]||(this.listeners[$]=new Set,this.localCache[$]=this.storage.getItem($)),this.listeners[$].add(et)}_removeListener($,et){this.listeners[$]&&(this.listeners[$].delete(et),0===this.listeners[$].size&&delete this.listeners[$]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set($,et){await super._set($,et),this.localCache[$]=JSON.stringify(et)}async _get($){let et=await super._get($);return this.localCache[$]=JSON.stringify(et),et}async _remove($){await super._remove($),delete this.localCache[$]}
3039};BrowserLocalPersistence.type="LOCAL";/** 3040 * @license 3041 * Copyright 2020 Google LLC 3042 * 3043 * Licensed under the Apache License, Version 2.0 (the "License"); 3044 * you may not use this file except in compliance with the License. 3045 * You may obtain a copy of the License at 3046 * 3047 * http://www.apache.org/licenses/LICENSE-2.0 3048 * 3049 * Unless required by applicable law or agreed to in writing, software 3050 * distributed under the License is distributed on an "AS IS" BASIS, 3051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3052 * See the License for the specific language governing permissions and 3053 * limitations under the License. 3054 */let BrowserSessionPersistence=class BrowserSessionPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener($,et){}_removeListener($,et){}};BrowserSessionPersistence.type="SESSION";/** 3055 * @license 3056 * Copyright 2019 Google LLC 3057 * 3058 * Licensed under the Apache License, Version 2.0 (the "License"); 3059 * you may not use this file except in compliance with the License. 3060 * You may obtain a copy of the License at 3061 * 3062 * http://www.apache.org/licenses/LICENSE-2.0 3063 * 3064 * Unless required by applicable law or agreed to in writing, software 3065 * distributed under the License is distributed on an "AS IS" BASIS, 3066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3067 * See the License for the specific language governing permissions and 3068 * limitations under the License. 3069 */let Receiver=class Receiver{constructor($){this.eventTarget=$,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance($){let et=this.receivers.find(et=>et.isListeningto($));if(et)return et;let en=new Receiver($);return this.receivers.push(en),en}isListeningto($){return this.eventTarget===$}async handleEvent($){let{eventId:et,eventType:en,data:er}=$.data,ei=this.handlersMap[en];if(!ei?.size)return;$.ports[0].postMessage({status:"ack",eventId:et,eventType:en});let eo=Array.from(ei).map(async et=>et($.origin,er)),es=await Promise.all(eo.map(async $=>{try{let et=await $;return{fulfilled:!0,value:et}}catch($){return{fulfilled:!1,reason:$}}}));$.ports[0].postMessage({status:"done",eventId:et,eventType:en,response:es})}_subscribe($,et){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[$]||(this.handlersMap[$]=new Set),this.handlersMap[$].add(et)}_unsubscribe($,et){this.handlersMap[$]&&et&&this.handlersMap[$].delete(et),et&&0!==this.handlersMap[$].size||delete this.handlersMap[$],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}};/** 3070 * @license 3071 * Copyright 2020 Google LLC 3072 * 3073 * Licensed under the Apache License, Version 2.0 (the "License"); 3074 * you may not use this file except in compliance with the License. 3075 * You may obtain a copy of the License at 3076 * 3077 * http://www.apache.org/licenses/LICENSE-2.0 3078 * 3079 * Unless required by applicable law or agreed to in writing, software 3080 * distributed under the License is distributed on an "AS IS" BASIS, 3081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3082 * See the License for the specific language governing permissions and 3083 * limitations under the License. 3084 */function _generateEventId($="",et=10){let en="";for(let $=0;$<et;$++)en+=Math.floor(10*Math.random());return $+en}Receiver.receivers=[];/** 3085 * @license 3086 * Copyright 2019 Google LLC 3087 * 3088 * Licensed under the Apache License, Version 2.0 (the "License"); 3089 * you may not use this file except in compliance with the License. 3090 * You may obtain a copy of the License at 3091 * 3092 * http://www.apache.org/licenses/LICENSE-2.0 3093 * 3094 * Unless required by applicable law or agreed to in writing, software 3095 * distributed under the License is distributed on an "AS IS" BASIS, 3096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3097 * See the License for the specific language governing permissions and 3098 * limitations under the License. 3099 */let Sender=class Sender{constructor($){this.target=$,this.handlers=new Set}removeMessageHandler($){$.messageChannel&&($.messageChannel.port1.removeEventListener("message",$.onMessage),$.messageChannel.port1.close()),this.handlers.delete($)}async _send($,et,en=50){let er,ei;let eo="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!eo)throw Error("connection_unavailable");return new Promise((es,el)=>{let eu=_generateEventId("",20);eo.port1.start();let ed=setTimeout(()=>{el(Error("unsupported_event"))},en);ei={messageChannel:eo,onMessage($){if($.data.eventId===eu)switch($.data.status){case"ack":clearTimeout(ed),er=setTimeout(()=>{el(Error("timeout"))},3e3);break;case"done":clearTimeout(er),es($.data.response);break;default:clearTimeout(ed),clearTimeout(er),el(Error("invalid_response"))}}},this.handlers.add(ei),eo.port1.addEventListener("message",ei.onMessage),this.target.postMessage({eventType:$,eventId:eu,data:et},[eo.port2])}).finally(()=>{ei&&this.removeMessageHandler(ei)})}};/** 3100 * @license 3101 * Copyright 2020 Google LLC 3102 * 3103 * Licensed under the Apache License, Version 2.0 (the "License");
3104 * you may not use this file except in compliance with the License. 3105 * You may obtain a copy of the License at 3106 * 3107 * http://www.apache.org/licenses/LICENSE-2.0 3108 * 3109 * Unless required by applicable law or agreed to in writing, software 3110 * distributed under the License is distributed on an "AS IS" BASIS, 3111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3112 * See the License for the specific language governing permissions and 3113 * limitations under the License. 3114 */function _window(){return window}/** 3115 * @license 3116 * Copyright 2020 Google LLC. 3117 * 3118 * Licensed under the Apache License, Version 2.0 (the "License"); 3119 * you may not use this file except in compliance with the License. 3120 * You may obtain a copy of the License at 3121 * 3122 * http://www.apache.org/licenses/LICENSE-2.0 3123 * 3124 * Unless required by applicable law or agreed to in writing, software 3125 * distributed under the License is distributed on an "AS IS" BASIS, 3126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3127 * See the License for the specific language governing permissions and 3128 * limitations under the License. 3129 */function _isWorker(){return void 0!==_window().WorkerGlobalScope&&"function"==typeof _window().importScripts}async function _getActiveServiceWorker(){if(!navigator?.serviceWorker)return null;try{let $=await navigator.serviceWorker.ready;return $.active}catch{return null}}/** 3130 * @license 3131 * Copyright 2019 Google LLC 3132 * 3133 * Licensed under the Apache License, Version 2.0 (the "License"); 3134 * you may not use this file except in compliance with the License. 3135 * You may obtain a copy of the License at 3136 * 3137 * http://www.apache.org/licenses/LICENSE-2.0 3138 * 3139 * Unless required by applicable law or agreed to in writing, software 3140 * distributed under the License is distributed on an "AS IS" BASIS, 3141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3142 * See the License for the specific language governing permissions and 3143 * limitations under the License. 3144 */let ew="firebaseLocalStorageDb",ek="firebaseLocalStorage",eC="fbase_key";let DBPromise=class DBPromise{constructor($){this.request=$}toPromise(){return new Promise(($,et)=>{this.request.addEventListener("success",()=>{$(this.request.result)}),this.request.addEventListener("error",()=>{et(this.request.error)})})}};function getObjectStore($,et){return $.transaction([ek],et?"readwrite":"readonly").objectStore(ek)}function _openDatabase(){let $=indexedDB.open(ew,1);return new Promise((et,en)=>{$.addEventListener("error",()=>{en($.error)}),$.addEventListener("upgradeneeded",()=>{let et=$.result;try{et.createObjectStore(ek,{keyPath:eC})}catch($){en($)}}),$.addEventListener("success",async()=>{let en=$.result;en.objectStoreNames.contains(ek)?et(en):(en.close(),await function(){let $=indexedDB.deleteDatabase(ew);return new DBPromise($).toPromise()}(),et(await _openDatabase()))})})}async function _putObject($,et,en){let er=getObjectStore($,!0).put({[eC]:et,value:en});return new DBPromise(er).toPromise()}async function getObject($,et){let en=getObjectStore($,!1).get(et),er=await new DBPromise(en).toPromise();return void 0===er?null:er.value}function _deleteObject($,et){let en=getObjectStore($,!0).delete(et);return new DBPromise(en).toPromise()}let IndexedDBLocalPersistence=class IndexedDBLocalPersistence{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 _openDatabase()),this.db}async _withRetries($){let et=0;for(;;)try{let et=await this._openDb();return await $(et)}catch($){if(et++>3)throw $;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return _isWorker()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Receiver._getInstance(_isWorker()?self:null),this.receiver._subscribe("keyChanged",async($,et)=>{let en=await this._poll();return{keyProcessed:en.includes(et.key)}}),this.receiver._subscribe("ping",async($,et)=>["keyChanged"])}
3144async initializeSender(){if(this.activeServiceWorker=await _getActiveServiceWorker(),!this.activeServiceWorker)return;this.sender=new Sender(this.activeServiceWorker);let $=await this.sender._send("ping",{},800);$&&$[0]?.fulfilled&&$[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker($){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:$},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;let $=await _openDatabase();return await _putObject($,e_,"1"),await _deleteObject($,e_),!0}catch{}return!1}async _withPendingWrite($){this.pendingWrites++;try{await $()}finally{this.pendingWrites--}}async _set($,et){return this._withPendingWrite(async()=>(await this._withRetries(en=>_putObject(en,$,et)),this.localCache[$]=et,this.notifyServiceWorker($)))}async _get($){let et=await this._withRetries(et=>getObject(et,$));return this.localCache[$]=et,et}async _remove($){return this._withPendingWrite(async()=>(await this._withRetries(et=>_deleteObject(et,$)),delete this.localCache[$],this.notifyServiceWorker($)))}async _poll(){let $=await this._withRetries($=>{let et=getObjectStore($,!1).getAll();
3144return new DBPromise(et).toPromise()});if(!$||0!==this.pendingWrites)return[];let et=[],en=new Set;if(0!==$.length)for(let{fbase_key:er,value:ei}of $)en.add(er),JSON.stringify(this.localCache[er])!==JSON.stringify(ei)&&(this.notifyListeners(er,ei),et.push(er));for(let $ of Object.keys(this.localCache))this.localCache[$]&&!en.has($)&&(this.notifyListeners($,null),et.push($));return et}notifyListeners($,et){this.localCache[$]=et;let en=this.listeners[$];if(en)for(let $ of Array.from(en))$(et)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener($,et){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[$]||(this.listeners[$]=new Set,this._get($)),this.listeners[$].add(et)}_removeListener($,et){this.listeners[$]&&(this.listeners[$].delete(et),0===this.listeners[$].size&&delete this.listeners[$]),0===Object.keys(this.listeners).length&&this.stopPolling()}};/** 3145 * @license 3146 * Copyright 2020 Google LLC 3147 * 3148 * Licensed under the Apache License, Version 2.0 (the "License"); 3149 * you may not use this file except in compliance with the License. 3150 * You may obtain a copy of the License at 3151 * 3152 * http://www.apache.org/licenses/LICENSE-2.0 3153 * 3154 * Unless required by applicable law or agreed to in writing, software 3155 * distributed under the License is distributed on an "AS IS" BASIS, 3156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3157 * See the License for the specific language governing permissions and 3158 * limitations under the License. 3159 */function startSignInPhoneMfa($,et){return _performApiRequest($,"POST","/v2/accounts/mfaSignIn:start",_addTidIfNecessary($,et))}IndexedDBLocalPersistence.type="LOCAL",_generateCallbackName("rcb"),new Delay(3e4,6e4);/** 3160 * @license 3161 * Copyright 2020 Google LLC 3162 * 3163 * Licensed under the Apache License, Version 2.0 (the "License"); 3164 * you may not use this file except in compliance with the License. 3165 * You may obtain a copy of the License at 3166 * 3167 * http://www.apache.org/licenses/LICENSE-2.0 3168 * 3169 * Unless required by applicable law or agreed to in writing, software 3170 * distributed under the License is distributed on an "AS IS" BASIS, 3171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3172 * See the License for the specific language governing permissions and 3173 * limitations under the License. 3174 */let eE="recaptcha";async function _verifyPhoneNumber($,et,en){if(!$._getRecaptchaConfig())try{await _initializeRecaptchaConfig($)}catch($){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let er;if(er="string"==typeof et?{phoneNumber:et}:et,"session"in er){let et=er.session;if("phoneNumber"in er){_assert("enroll"===et.type,$,"internal-error");let ei={idToken:et.credential,phoneEnrollmentInfo:{phoneNumber:er.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},startEnrollPhoneMfaActionCallback=async($,et)=>{if(et.phoneEnrollmentInfo.captchaResponse===ev){_assert(en?.type===eE,$,"argument-error");let er=await injectRecaptchaV2Token($,et,en);return startEnrollPhoneMfa($,er)}return startEnrollPhoneMfa($,et)},eo=handleRecaptchaFlow($,ei,"mfaSmsEnrollment",startEnrollPhoneMfaActionCallback,"PHONE_PROVIDER"),es=await eo.catch($=>Promise.reject($));return es.phoneSessionInfo.sessionInfo}{_assert("signin"===et.type,$,"internal-error");let ei=er.multiFactorHint?.uid||er.multiFactorUid;_assert(ei,$,"missing-multi-factor-info");let eo={mfaPendingCredential:et.credential,mfaEnrollmentId:ei,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},startSignInPhoneMfaActionCallback=async($,et)=>{if(et.phoneSignInInfo.captchaResponse===ev){_assert(en?.type===eE,$,"argument-error");let er=await injectRecaptchaV2Token($,et,en);return startSignInPhoneMfa($,er)}return startSignInPhoneMfa($,et)},es=handleRecaptchaFlow($,eo,"mfaSmsSignIn",startSignInPhoneMfaActionCallback,"PHONE_PROVIDER"),el=await es.catch($=>Promise.reject($));return el.phoneResponseInfo.sessionInfo}}{let et={phoneNumber:er.phoneNumber,clientType:"CLIENT_TYPE_WEB"},sendPhoneVerificationCodeActionCallback=async($,et)=>{if(et.captchaResponse===ev){_assert(en?.type===eE,$,"argument-error");let er=await injectRecaptchaV2Token($,et,en);return sendPhoneVerificationCode($,er)}return sendPhoneVerificationCode($,et)},ei=handleRecaptchaFlow($,et,"sendVerificationCode",sendPhoneVerificationCodeActionCallback,"PHONE_PRO
3174VIDER"),eo=await ei.catch($=>Promise.reject($));return eo.sessionInfo}}finally{en?._reset()}}async function injectRecaptchaV2Token($,et,en){_assert(en.type===eE,$,"argument-error");let er=await en.verify();_assert("string"==typeof er,$,"argument-error");let ei={...et};if("phoneEnrollmentInfo"in ei){let $=ei.phoneEnrollmentInfo.phoneNumber,et=ei.phoneEnrollmentInfo.captchaResponse,en=ei.phoneEnrollmentInfo.clientType,eo=ei.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(ei,{phoneEnrollmentInfo:{phoneNumber:$,recaptchaToken:er,captchaResponse:et,clientType:en,recaptchaVersion:eo}}),ei}if(!("phoneSignInInfo"in ei))return Object.assign(ei,{recaptchaToken:er}),ei;{let $=ei.phoneSignInInfo.captchaResponse,et=ei.phoneSignInInfo.clientType,en=ei.phoneSignInInfo.recaptchaVersion;return Object.assign(ei,{phoneSignInInfo:{recaptchaToken:er,captchaResponse:$,clientType:et,recaptchaVersion:en}}),ei}}/** 3175 * @license 3176 * Copyright 2020 Google LLC 3177 * 3178 * Licensed under the Apache License, Version 2.0 (the "License"); 3179 * you may not use this file except in compliance with the License. 3180 * You may obtain a copy of the License at 3181 * 3182 * http://www.apache.org/licenses/LICENSE-2.0 3183 * 3184 * Unless required by applicable law or agreed to in writing, software 3185 * distributed under the License is distributed on an "AS IS" BASIS, 3186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3187 * See the License for the specific language governing permissions and 3188 * limitations under the License. 3189 */let PhoneAuthProvider=class PhoneAuthProvider{constructor($){this.providerId=PhoneAuthProvider.PROVIDER_ID,this.auth=_castAuth($)}verifyPhoneNumber($,et){return _verifyPhoneNumber(this.auth,$,(0,eo.m9)(et))}static credential($,et){return PhoneAuthCredential._fromVerification($,et)}static credentialFromResult($){return PhoneAuthProvider.credentialFromTaggedObject($)}static credentialFromError($){return PhoneAuthProvider.credentialFromTaggedObject($.customData||{})}static credentialFromTaggedObject({_tokenResponse:$}){if(!$)return null;let{phoneNumber:et,temporaryProof:en}=$;return et&&en?PhoneAuthCredential._fromTokenResponse(et,en):null}};/** 3190 * @license 3191 * Copyright 2021 Google LLC 3192 * 3193 * Licensed under the Apache License, Version 2.0 (the "License"); 3194 * you may not use this file except in compliance with the License. 3195 * You may obtain a copy of the License at 3196 * 3197 * http://www.apache.org/licenses/LICENSE-2.0 3198 * 3199 * Unless required by applicable law or agreed to in writing, software 3200 * distributed under the License is distributed on an "AS IS" BASIS, 3201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3202 * See the License for the specific language governing permissions and 3203 * limitations under the License. 3204 */function _withDefaultResolver($,et){return et?_getInstance(et):(_assert($._popupRedirectResolver,$,"argument-error"),$._popupRedirectResolver)}PhoneAuthProvider.PROVIDER_ID="phone",PhoneAuthProvider.PHONE_SIGN_IN_METHOD="phone";/** 3205 * @license 3206 * Copyright 2019 Google LLC 3207 * 3208 * Licensed under the Apache License, Version 2.0 (the "License"); 3209 * you may not use this file except in compliance with the License. 3210 * You may obtain a copy of the License at 3211 * 3212 * http://www.apache.org/licenses/LICENSE-2.0 3213 * 3214 * Unless required by applicable law or agreed to in writing, software 3215 * distributed under the License is distributed on an "AS IS" BASIS, 3216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3217 * See the License for the specific language governing permissions and 3218 * limitations under the License. 3219 */let IdpCredential=class IdpCredential extends AuthCredential{constructor($){super("custom","custom"),this.params=$}_getIdTokenResponse($){return signInWithIdp($,this._buildIdpRequest())}_linkToIdToken($,et){return signInWithIdp($,this._buildIdpRequest(et))}_getReauthenticationResolver($){return signInWithIdp($,this._buildIdpRequest())}_buildIdpRequest($){let et={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 $&&(et.idToken=$),et}};function _signIn($){return _signInWithCredential($.auth,new IdpCredential($),$.bypassAuthState)}function _reauth($){let{auth:et,user:en}=$;return _assert(en,et,"internal-error"),_reauthenticate(en,new IdpCredential($),$.bypassAuthState)}async function _link($){let{auth:et,user:en}=$;return _assert(en,et,"internal-error"),_link$1(en,new IdpCredential($),$.bypassAuthState)}/** 3220 * @license 3221 * Copyright 2020 Google LLC 3222 * 3223 * Licensed under the Apache License, Version 2.0 (the "License");
3224 * you may not use this file except in compliance with the License. 3225 * You may obtain a copy of the License at 3226 * 3227 * http://www.apache.org/licenses/LICENSE-2.0 3228 * 3229 * Unless required by applicable law or agreed to in writing, software 3230 * distributed under the License is distributed on an "AS IS" BASIS, 3231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3232 * See the License for the specific language governing permissions and 3233 * limitations under the License. 3234 */let AbstractPopupRedirectOperation=class AbstractPopupRedirectOperation{constructor($,et,en,er,ei=!1){this.auth=$,this.resolver=en,this.user=er,this.bypassAuthState=ei,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(et)?et:[et]}execute(){return new Promise(async($,et)=>{this.pendingPromise={resolve:$,reject:et};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch($){this.reject($)}})}async onAuthEvent($){let{urlResponse:et,sessionId:en,postBody:er,tenantId:ei,error:eo,type:es}=$;if(eo){this.reject(eo);return}let el={auth:this.auth,requestUri:et,sessionId:en,tenantId:ei||void 0,postBody:er||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(es)(el))}catch($){this.reject($)}}onError($){this.reject($)}getIdpTask($){switch($){case"signInViaPopup":case"signInViaRedirect":return _signIn;case"linkViaPopup":case"linkViaRedirect":return _link;case"reauthViaPopup":case"reauthViaRedirect":return _reauth;default:_fail(this.auth,"internal-error")}}resolve($){this.pendingPromise||debugFail("Pending promise was never set"),this.pendingPromise.resolve($),this.unregisterAndCleanUp()}reject($){this.pendingPromise||debugFail("Pending promise was never set"),this.pendingPromise.reject($),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};/** 3235 * @license 3236 * Copyright 2020 Google LLC 3237 * 3238 * Licensed under the Apache License, Version 2.0 (the "License"); 3239 * you may not use this file except in compliance with the License. 3240 * You may obtain a copy of the License at 3241 * 3242 * http://www.apache.org/licenses/LICENSE-2.0 3243 * 3244 * Unless required by applicable law or agreed to in writing, software 3245 * distributed under the License is distributed on an "AS IS" BASIS, 3246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3247 * See the License for the specific language governing permissions and 3248 * limitations under the License. 3249 */let eI=new Delay(2e3,1e4);async function signInWithPopup($,et,en){if((0,ei.rh)($.app))return Promise.reject(_createError($,"operation-not-supported-in-this-environment"));let er=_castAuth($);!function($,et,en){if(!(et instanceof en))throw en.name!==et.constructor.name&&_fail($,"argument-error"),_errorWithCustomMessage($,"argument-error",`Type of ${et.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}($,et,FederatedAuthProvider);let eo=_withDefaultResolver(er,en),es=new PopupOperation(er,"signInViaPopup",et,eo);return es.executeNotNull()}let PopupOperation=class PopupOperation extends AbstractPopupRedirectOperation{constructor($,et,en,er,ei){super($,et,er,ei),this.provider=en,this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction&&PopupOperation.currentPopupAction.cancel(),PopupOperation.currentPopupAction=this}async executeNotNull(){let $=await this.execute();return _assert($,this.auth,"internal-error"),$}async onExecution(){1===this.filter.length||debugFail("Popup operations only handle one event");let $=_generateEventId();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],$),this.authWindow.associatedEvent=$,this.resolver._originValidation(this.auth).catch($=>{this.reject($)}),this.resolver._isIframeWebStorageSupported(this.auth,$=>{$||this.reject(_createError(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(_createError(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction=null}pollUserCancellation(){let poll=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(_createError(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(poll,eI.get())};poll()}};PopupOperation.currentPopupAction=null;let eS=new Map;let RedirectAction=class RedirectAction extends AbstractPopupRedirectOperation{constructor($,et,en=!1){super($,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],et,void 0,en),this.eventId=null}async execute(){let $=eS.get(this.auth._key());if(!$){try{let et=await _getAndClearPendingRedirectStatus(this.resolver,this.auth),en=et?await super.execute():null;$=()=>Promise.resolve(en)}catch(et){$=()=>Promise.reject(et)}eS.set(this.auth._key(),$)}return this.bypassAuthState||eS.set(this.auth._key(),()=>Promise.resolve(null)),$()}async onAuthEvent($){if("signInViaRedirect"===$.type)return super.onAuthEvent($);if("unknown"===$.type){this.resolve(null);return}if($.eventId){let et=await this.auth._redirectUserForId($.eventId);if(et)return this.user=et,super.onAuthEvent($);this.resolve(null)}}async onExecution(){}cleanUp(){}};async function _getAndClearPendingRedirectStatus($,et){let en=_persistenceKeyName("pendingRedirect",et.config.apiKey,et.name),er=_getInstance($._redirectPersistence);if(!await er._isAvailable())return!1;let ei=await er._get(en)==="true";return await er._remove(en),ei}function _overrideRedirectResult($,et){eS.set($._key(),et)}
3249async function _getRedirectResult($,et,en=!1){if((0,ei.rh)($.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError($));let er=_castAuth($),eo=_withDefaultResolver(er,et),es=new RedirectAction(er,eo,en),el=await es.execute();return el&&!en&&(delete el.user._redirectEventId,await er._persistUserIfCurrent(el.user),await er._setRedirectUser(null,et)),el}let AuthEventManager=class AuthEventManager{constructor($){this.auth=$,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer($){this.consumers.add($),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,$)&&(this.sendToConsumer(this.queuedRedirectEvent,$),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer($){this.consumers.delete($)}onEvent($){if(this.hasEventBeenHandled($))return!1;let et=!1;return this.consumers.forEach(en=>{this.isEventForConsumer($,en)&&(et=!0,this.sendToConsumer($,en),this.saveEventToCache($))}),this.hasHandledPotentialRedirect||!function($){switch($.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return isNullRedirectEvent($);default:return!1}}($)||(this.hasHandledPotentialRedirect=!0,et||(this.queuedRedirectEvent=$,et=!0)),et}sendToConsumer($,et){if($.error&&!isNullRedirectEvent($)){let en=$.error.code?.split("auth/")[1]||"internal-error";et.onError(_createError(this.auth,en))}else et.onAuthEvent($)}isEventForConsumer($,et){let en=null===et.eventId||!!$.eventId&&$.eventId===et.eventId;return et.filter.includes($.type)&&en}hasEventBeenHandled($){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(eventUid($))}saveEventToCache($){this.cachedEventUids.add(eventUid($)),this.lastProcessedEventTime=Date.now()}};function eventUid($){return[$.type,$.eventId,$.sessionId,$.tenantId].filter($=>$).join("-")}function isNullRedirectEvent({type:$,error:et}){return"unknown"===$&&et?.code==="auth/no-auth-event"}/** 3250 * @license 3251 * Copyright 2020 Google LLC 3252 * 3253 * Licensed under the Apache License, Version 2.0 (the "License"); 3254 * you may not use this file except in compliance with the License. 3255 * You may obtain a copy of the License at 3256 * 3257 * http://www.apache.org/licenses/LICENSE-2.0 3258 * 3259 * Unless required by applicable law or agreed to in writing, software 3260 * distributed under the License is distributed on an "AS IS" BASIS, 3261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3262 * See the License for the specific language governing permissions and 3263 * limitations under the License. 3264 */async function _getProjectConfig($,et={}){return _performApiRequest($,"GET","/v1/projects",et)}/** 3265 * @license 3266 * Copyright 2020 Google LLC 3267 * 3268 * Licensed under the Apache License, Version 2.0 (the "License"); 3269 * you may not use this file except in compliance with the License. 3270 * You may obtain a copy of the License at 3271 * 3272 * http://www.apache.org/licenses/LICENSE-2.0 3273 * 3274 * Unless required by applicable law or agreed to in writing, software 3275 * distributed under the License is distributed on an "AS IS" BASIS, 3276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3277 * See the License for the specific language governing permissions and 3278 * limitations under the License. 3279 */let eT=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,eA=/^https?/;async function _validateOrigin($){if($.config.emulator)return;let{authorizedDomains:et}=await _getProjectConfig($);for(let $ of et)try{if(function($){let et=_getCurrentUrl(),{protocol:en,hostname:er}=new URL(et);if($.startsWith("chrome-extension://")){let ei=new URL($);return""===ei.hostname&&""===er?"chrome-extension:"===en&&$.replace("chrome-extension://","")===et.replace("chrome-extension://",""):"chrome-extension:"===en&&ei.hostname===er}if(!eA.test(en))return!1;if(eT.test($))return er===$;let ei=$.replace(/\./g,"\\."),eo=RegExp("^(.+\\."+ei+"|"+ei+")$","i");return eo.test(er)}($))return}catch{}_fail($,"unauthorized-domain")}/** 3280 * @license 3281 * Copyright 2020 Google LLC. 3282 * 3283 * Licensed under the Apache License, Version 2.0 (the "License");
3284 * you may not use this file except in compliance with the License. 3285 * You may obtain a copy of the License at 3286 * 3287 * http://www.apache.org/licenses/LICENSE-2.0 3288 * 3289 * Unless required by applicable law or agreed to in writing, software 3290 * distributed under the License is distributed on an "AS IS" BASIS, 3291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3292 * See the License for the specific language governing permissions and 3293 * limitations under the License. 3294 */let eP=new Delay(3e4,6e4);function resetUnloadedGapiModules(){let $=_window().___jsl;if($?.H){for(let et of Object.keys($.H))if($.H[et].r=$.H[et].r||[],$.H[et].L=$.H[et].L||[],$.H[et].r=[...$.H[et].L],$.CP)for(let et=0;et<$.CP.length;et++)$.CP[et]=null}}let eN=null,ej=new Delay(5e3,15e3),eR={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},eV=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function _openIframe($){let et=await (eN=eN||new Promise((et,en)=>{function loadGapiIframe(){resetUnloadedGapiModules(),gapi.load("gapi.iframes",{callback:()=>{et(gapi.iframes.getContext())},ontimeout:()=>{resetUnloadedGapiModules(),en(_createError($,"network-request-failed"))},timeout:eP.get()})}if(_window().gapi?.iframes?.Iframe)et(gapi.iframes.getContext());else if(_window().gapi?.load)loadGapiIframe();else{var er;let et=_generateCallbackName("iframefcb");return _window()[et]=()=>{gapi.load?loadGapiIframe():en(_createError($,"network-request-failed"))},(er=`${ey.gapiScript}?onload=${et}`,ey.loadJS(er)).catch($=>en($))}}).catch($=>{throw eN=null,$})),en=_window().gapi;return _assert(en,$,"internal-error"),et.open({where:document.body,url:function($){let et=$.config;_assert(et.authDomain,$,"auth-domain-config-required");let en=et.emulator?_emulatorUrl(et,"emulator/auth/iframe"):`https://${$.config.authDomain}/__/auth/iframe`,er={apiKey:et.apiKey,appName:$.name,v:ei.Jn},es=eV.get($.config.apiHost);es&&(er.eid=es);let el=$._getFrameworks();return el.length&&(er.fw=el.join(",")),`${en}?${(0,eo.xO)(er).slice(1)}`}($),messageHandlersFilter:en.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:eR,dontclear:!0},et=>new Promise(async(en,er)=>{await et.restyle({setHideOnLeave:!1});let ei=_createError($,"network-request-failed"),eo=_window().setTimeout(()=>{er(ei)},ej.get());function clearTimerAndResolve(){_window().clearTimeout(eo),en(et)}et.ping(clearTimerAndResolve).then(clearTimerAndResolve,()=>{er(ei)})}))}/** 3295 * @license 3296 * Copyright 2020 Google LLC. 3297 * 3298 * Licensed under the Apache License, Version 2.0 (the "License"); 3299 * you may not use this file except in compliance with the License. 3300 * You may obtain a copy of the License at 3301 * 3302 * http://www.apache.org/licenses/LICENSE-2.0 3303 * 3304 * Unless required by applicable law or agreed to in writing, software 3305 * distributed under the License is distributed on an "AS IS" BASIS, 3306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3307 * See the License for the specific language governing permissions and 3308 * limitations under the License. 3309 */let eD={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};let AuthPopup=class AuthPopup{constructor($){this.window=$,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch($){}}};let eO=encodeURIComponent("fac");async function _getRedirectUrl($,et,en,er,es,el){_assert($.config.authDomain,$,"auth-domain-config-required"),_assert($.config.apiKey,$,"invalid-api-key");let eu={apiKey:$.config.apiKey,appName:$.name,authType:en,redirectUrl:er,v:ei.Jn,eventId:es};if(et instanceof FederatedAuthProvider)for(let[en,er]of(et.setDefaultLanguage($.languageCode),eu.providerId=et.providerId||"",(0,eo.xb)(et.getCustomParameters())||(eu.customParameters=JSON.stringify(et.getCustomParameters())),Object.entries(el||{})))eu[en]=er;if(et instanceof BaseOAuthProvider){let $=et.getScopes().filter($=>""!==$);$.length>0&&(eu.scopes=$.join(","))}for(let et of($.tenantId&&(eu.tid=$.tenantId),Object.keys(eu)))void 0===eu[et]&&delete eu[et];let ed=await $._getAppCheckToken(),eh=ed?`#${eO}=${encodeURIComponent(ed)}`:"";return`${function({config:$}){return $.emulator?_emulatorUrl($,"emulator/auth/handler"):`https://${$.authDomain}/__/auth/handler`}($)}?${(0,eo.xO)(eu).slice(1)}${eh}`}/** 3310 * @license 3311 * Copyright 2020 Google LLC 3312 * 3313 * Licensed under the Apache License, Version 2.0 (the "License");
3314 * you may not use this file except in compliance with the License. 3315 * You may obtain a copy of the License at 3316 * 3317 * http://www.apache.org/licenses/LICENSE-2.0 3318 * 3319 * Unless required by applicable law or agreed to in writing, software 3320 * distributed under the License is distributed on an "AS IS" BASIS, 3321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3322 * See the License for the specific language governing permissions and 3323 * limitations under the License. 3324 */let eM="webStorageSupport",eF=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=BrowserSessionPersistence,this._completeRedirectFn=_getRedirectResult,this._overrideRedirectResult=_overrideRedirectResult}async _openPopup($,et,en,er){this.eventManagers[$._key()]?.manager||debugFail("_initialize() not called before _openPopup()");let ei=await _getRedirectUrl($,et,en,_getCurrentUrl(),er);return function($,et,en,er=500,ei=600){let es=Math.max((window.screen.availHeight-ei)/2,0).toString(),el=Math.max((window.screen.availWidth-er)/2,0).toString(),eu="",ed={...eD,width:er.toString(),height:ei.toString(),top:es,left
3324:el},eh=(0,eo.z$)().toLowerCase();en&&(eu=_isChromeIOS(eh)?"_blank":en),_isFirefox(eh)&&(et=et||"http://localhost",ed.scrollbars="yes");let ep=Object.entries(ed).reduce(($,[et,en])=>`${$}${et}=${en},`,"");if(function($=(0,eo.z$)()){return _isIOS($)&&!!window.navigator?.standalone}(eh)&&"_self"!==eu)return function($,et){let en=document.createElement("a");en.href=$,en.target=et;let er=document.createEvent("MouseEvent");er.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),en.dispatchEvent(er)}(et||"",eu),new AuthPopup(null);let em=window.open(et||"",eu,ep);_assert(em,$,"popup-blocked");try{em.focus()}catch($){}return new AuthPopup(em)}($,ei,_generateEventId())}async _openRedirect($,et,en,er){await this._originValidation($);let ei=await _getRedirectUrl($,et,en,_getCurrentUrl(),er);return _window().location.href=ei,new Promise(()=>{})}_initialize($){let et=$._key();if(this.eventManagers[et]){let{manager:$,promise:en}=this.eventManagers[et];return $?Promise.resolve($):(en||debugFail("If manager is not set, promise should be"),en)}let en=this.initAndGetManager($);return this.eventManagers[et]={promise:en},en.catch(()=>{delete this.eventManagers[et]}),en}async initAndGetManager($){let et=await _openIframe($),en=new AuthEventManager($);return et.register("authEvent",et=>
3324{_assert(et?.authEvent,$,"invalid-auth-event");let er=en.onEvent(et.authEvent);return{status:er?"ACK":"ERROR"}},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[$._key()]={manager:en},this.iframes[$._key()]=et,en}_isIframeWebStorageSupported($,et){let en=this.iframes[$._key()];en.send(eM,{type:eM},en=>{let er=en?.[0]?.[eM];void 0!==er&&et(!!er),_fail($,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation($){let et=$._key();return this.originValidationPromises[et]||(this.originValidationPromises[et]=_validateOrigin($)),this.originValidationPromises[et]}get _shouldInitProactively(){return _isMobileBrowser()||_isSafari()||_isIOS()}};let MultiFactorAssertionImpl=class MultiFactorAssertionImpl{constructor($){this.factorId=$}_process($,et,en){switch(et.type){case"enroll":return this._finalizeEnroll($,et.credential,en);case"signin":return this._finalizeSignIn($,et.credential);default:return debugFail("unexpected MultiFactorSessionType")}}};let PhoneMultiFactorAssertionImpl=class PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl{constructor($){super("phone"),this.credential=$}static _fromCredential($){return new PhoneMultiFactorAssertionImpl($)}_finalizeEnroll($,et,en){return _performApiRequest($,"POST","/v2/accounts/mfaEnrollment:finalize",_addTidIfNecessary($,{idToken:et,displayName:en,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn($,et){return _performApiRequest($,"POST","/v2/accounts/mfaSignIn:finalize",_addTidIfNecessary($,{mfaPendingCredential:et,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}};let TotpMultiFactorAssertionImpl=class TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl{constructor($,et,en){super("totp"),this.otp=$,this.enrollmentId=et,this.secret=en}static _fromSecret($,et){return new TotpMultiFactorAssertionImpl(et,void 0,$)}static _fromEnrollmentId($,et){return new TotpMultiFactorAssertionImpl(et,$)}async _finalizeEnroll($,et,en){return _assert(void 0!==this.secret,$,"argument-error"),_performApiRequest($,"POST","/v2/accounts/mfaEnrollment:finalize",_addTidIfNecessary($,{idToken:et,displayName:en,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn($,et){_assert(void 0!==this.enrollmentId&&void 0!==this.otp,$,"argument-error");let en={verificationCode:this.otp};return _performApiRequest($,"POST","/v2/accounts/mfaSignIn:finalize",_addTidIfNecessary($,{mfaPendingCredential:et,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:en}))}};let TotpSecret=class TotpSecret{constructor($,et,en,er,ei,eo,es){this.sessionInfo=eo,this.auth=es,this.secretKey=$,this.hashingAlgorithm=et,this.codeLength=en,this.codeIntervalSeconds=er,this.enrollmentCompletionDeadline=ei}static _fromStartTotpMfaEnrollmentResponse($,et){return new TotpSecret($.totpSessionInfo.sharedSecretKey,$.totpSessionInfo.hashingAlgorithm,$.totpSessionInfo.verificationCodeLength,$.totpSessionInfo.periodSec,new Date($.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),$.totpSessionInfo.sessionInfo,et)}_makeTotpVerificationInfo($){return{sessionInfo:this.sessionInfo,verificationCode:$}}generateQrCodeUrl($,et){let en=!1;return(_isEmptyString($)||_isEmptyString(et))&&(en=!0),en&&(_isEmptyString($)&&($=this.auth.currentUser?.email||"unknownuser"),_isEmptyString(et)&&(et=this.auth.name)),`otpauth://totp/${et}:${$}?secret=${this.secretKey}&issuer=${et}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}};function _isEmptyString($){return void 0===$||$?.length===0}var eL="@firebase/auth",eH="1.11.1";/** 3325 * @license 3326 * Copyright 2020 Google LLC 3327 * 3328 * Licensed under the Apache License, Version 2.0 (the "License"); 3329 * you may not use this file except in compliance with the License. 3330 * You may obtain a copy of the License at 3331 * 3332 * http://www.apache.org/licenses/LICENSE-2.0 3333 * 3334 * Unless required by applicable law or agreed to in writing, software 3335 * distributed under the License is distributed on an "AS IS" BASIS, 3336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3337 * See the License for the specific language governing permissions and 3338 * limitations under the License. 3339 */let AuthInterop=class AuthInterop{constructor($){this.auth=$,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken($){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;let et=await this.auth.currentUser.getIdToken($);return{accessToken:et}}
3339addAuthTokenListener($){if(this.assertAuthConfigured(),this.internalListeners.has($))return;let et=this.auth.onIdTokenChanged(et=>{$(et?.stsTokenManager.accessToken||null)});this.internalListeners.set($,et),this.updateProactiveRefresh()}removeAuthTokenListener($){this.assertAuthConfigured();let et=this.internalListeners.get($);et&&(this.internalListeners.delete($),et(),this.updateProactiveRefresh())}assertAuthConfigured(){_assert(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};let eB=(0,eo.Pz)("authIdTokenMaxAge")||300,eU=null,mintCookieFactory=$=>async et=>{let en=et&&await et.getIdTokenResult(),er=en&&(new Date().getTime()-Date.parse(en.issuedAtTime))/1e3;if(er&&er>eB)return;let ei=en?.token;eU!==ei&&(eU=ei,await fetch($,{method:ei?"POST":"DELETE",headers:ei?{Authorization:`Bearer ${ei}`}:{}}))};function getAuth($=(0,ei.Mq)()){let et=(0,ei.qX)($,"auth");if(et.isInitialized())return et.getImmediate();let en=/** 3340 * @license 3341 * Copyright 2020 Google LLC 3342 * 3343 * Licensed under the Apache License, Version 2.0 (the "License"); 3344 * you may not use this file except in compliance with the License. 3345 * You may obtain a copy of the License at 3346 * 3347 * http://www.apache.org/licenses/LICENSE-2.0 3348 * 3349 * Unless required by applicable law or agreed to in writing, software 3350 * distributed under the License is distributed on an "AS IS" BASIS, 3351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3352 * See the License for the specific language governing permissions and 3353 * limitations under the License. 3354 */function($,et){let en=(0,ei.qX)($,"auth");if(en.isInitialized()){let $=en.getImmediate(),er=en.getOptions();if((0,eo.vZ)(er,et??{}))return $;_fail($,"already-initialized")}let er=en.initialize({options:et});return er}($,{popupRedirectResolver:eF,persistence:[IndexedDBLocalPersistence,BrowserLocalPersistence,BrowserSessionPersistence]}),er=(0,eo.Pz)("authTokenSyncURL");if(er&&"boolean"==typeof isSecureContext&&isSecureContext){let $=new URL(er,location.origin);if(location.origin===$.origin){let et=mintCookieFactory($.toString());(0,eo.m9)(en).beforeAuthStateChanged(et,()=>et(en.currentUser)),onIdTokenChanged(en,$=>et($))}}let es=(0,eo.q4)("auth");return es&&function($,et,en){let er=_castAuth($);_assert(/^https?:\/\//.test(et),er,"invalid-emulator-scheme");let ei=extractProtocol(et),{host:es,port:el}=function($){let et=extractProtocol($),en=/(\/\/)?([^?#/]+)/.exec($.substr(et.length));if(!en)return{host:"",port:null};let er=en[2].split("@").pop()||"",ei=/^(\[[^\]]+\])(:|$)/.exec(er);if(ei){let $=ei[1];return{host:$,port:parsePort(er.substr($.length+1))}}{let[$,et]=er.split(":");return{host:$,port:parsePort(et)}}}(et),eu=null===el?"":`:${el}`,ed={url:`${ei}//${es}${eu}/`},eh=Object.freeze({host:es,port:el,protocol:ei.replace(":",""),options:Object.freeze({disableWarnings:!1})});if(!er._canInitEmulator){_assert(er.config.emulator&&er.emulatorConfig,er,"emulator-config-failed"),_assert((0,eo.vZ)(ed,er.config.emulator)&&(0,eo.vZ)(eh,er.emulatorConfig),er,"emulator-config-failed");return}er.config.emulator=ed,er.emulatorConfig=eh,er.settings.appVerificationDisabledForTesting=!0,(0,eo.Xx)(es)?((0,eo.Uo)(`${ei}//${es}${eu}`),(0,eo.dp)("Auth",!0)):function(){function attachBanner(){let $=document.createElement("p"),et=$.style;$.innerText="Running in emulator mode. Do not use with production credentials.",et.position="fixed",et.width="100%",et.backgroundColor="#ffffff",et.border=".1em solid #000000",et.color="#b50000",et.bottom="0px",et.left="0px",et.margin="0px",et.zIndex="10000",et.textAlign="center",$.classList.add("firebase-emulator-warning"),document.body.appendChild($)}"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",attachBanner):attachBanner())}()}(en,`http://${es}`),en}ey={loadJS:$=>new Promise((et,en)=>{let er=document.createElement("script");er.setAttribute("src",$),er.onload=et,er.onerror=$=>{let et=_createError("internal-error");et.customData=$,en(et)},er.type="text/javascript",er.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(er)}),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="},er="Browser",(0,ei.Xd)(new el.wA("auth",($,{options:et})=>{let en=$.getProvider("app").getImmediate(),ei=$.getProvider("heartbeat"),eo=$.getProvider("app-check-internal"),{apiKey:es,authDomain:el}=en.options;_assert(es&&!es.includes(":"),"invalid-api-key",{appName:en.name});let eu={apiKey:es,authDomain:el,clientPlatform:er,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:_getClientVersion(er)},ed=new AuthImpl(en,ei,eo,eu);return function($,et){let en=et?.persistence||[],er=(Array.isArray(en)?en:[en]).map(_getInstance);et?.errorMap&&$._updateErrorMap(et.errorMap),$._initializeWithPersistence(er,et?.popupRedirectResolver)}(ed,et),ed},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(($,et,en)=>{let er=$.getProvider("auth-internal");er.initialize()})),(0,ei.Xd)(new el.wA("auth-internal",$=>{let et=_castAuth($.getProvider("auth").getImmediate());return new AuthInterop(et)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,ei.KN)(eL,eH,/** 3355 * @license 3356 * Copyright 2020 Google LLC 3357 * 3358 * Licensed under the Apache License, Version 2.0 (the "License");
3359 * you may not use this file except in compliance with the License. 3360 * You may obtain a copy of the License at 3361 * 3362 * http://www.apache.org/licenses/LICENSE-2.0 3363 * 3364 * Unless required by applicable law or agreed to in writing, software 3365 * distributed under the License is distributed on an "AS IS" BASIS, 3366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3367 * See the License for the specific language governing permissions and 3368 * limitations under the License. 3369 */function($){switch($){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(er)),(0,ei.KN)(eL,eH,"esm2020")},39828:function($,et,en){"use strict";en.d(et,{AK:function(){return er.AK},Ab:function(){return er.Ab},Bt:function(){return er.Bt},EK:function(){return er.EK},ET:function(){return er.ET},IO:function(){return er.IO},JU:function(){return er.JU},LV:function(){return er.LV},Lz:function(){return er.Lz},PL:function(){return er.PL},QT:function(){return er.QT},TQ:function(){return er.TQ},Xo:function(){return er.Xo},Yp:function(){return er.Yp},ad:function(){return er.ad},ar:function(){return er.ar},b9:function(){return er.b9},cf:function(){return er.cf},hJ:function(){return er.hJ},i3:function(){return er.i3},nP:function(){return er.nP},oe:function(){return er.oe},pl:function(){return er.pl},qs:function(){return er.qs},r7:function(){return er.r7},vr:function(){return er.vr},zN:function(){return er.zN}});var er=en(84514)},23914:function($,et,en){"use strict";en.d(et,{$C:function(){return getFunctions},V1:function(){return httpsCallable}});var er=en(33310),ei=en(99711),eo=en(75);function mapValues($,et){let en={};for(let er in $)$.hasOwnProperty(er)&&(en[er]=et($[er]));return en}function encode($){if(null==$)return null;if($ instanceof Number&&($=$.valueOf()),"number"==typeof $&&isFinite($)||!0===$||!1===$||"[object String]"===Object.prototype.toString.call($))return $;if($ instanceof Date)return $.toISOString();if(Array.isArray($))return $.map($=>encode($));if("function"==typeof $||"object"==typeof $)return mapValues($,$=>encode($));throw Error("Data cannot be encoded in JSON: "+$)}function decode($){if(null==$)return $;if($["@type"])switch($["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":{let et=Number($.value);if(isNaN(et))throw Error("Data cannot be decoded from JSON: "+$);return et}default:throw Error("Data cannot be decoded from JSON: "+$)}return Array.isArray($)?$.map($=>decode($)):"function"==typeof $||"object"==typeof $?mapValues($,$=>decode($)):$}/** 3370 * @license 3371 * Copyright 2020 Google LLC 3372 * 3373 * Licensed under the Apache License, Version 2.0 (the "License"); 3374 * you may not use this file except in compliance with the License. 3375 * You may obtain a copy of the License at 3376 * 3377 * http://www.apache.org/licenses/LICENSE-2.0 3378 * 3379 * Unless required by applicable law or agreed to in writing, software 3380 * distributed under the License is distributed on an "AS IS" BASIS, 3381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3382 * See the License for the specific language governing permissions and 3383 * limitations under the License. 3384 */let es="functions",el={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"};let FunctionsError=class FunctionsError extends ei.ZR{constructor($,et,en){super(`${es}/${$}`,et||""),this.details=en,Object.setPrototypeOf(this,FunctionsError.prototype)}};function _errorForResponse($,et){let en,er=function($){if($>=200&&$<300)return"ok";switch($){case 0:case 500:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}($),ei=er;try{let $=et&&et.error;if($){let et=$.status;if("string"==typeof et){if(!el[et])return new FunctionsError("internal","internal");er=el[et],ei=et}let eo=$.message;"string"==typeof eo&&(ei=eo),en=$.details,void 0!==en&&(en=decode(en))}}catch($){}return"ok"===er?null:new FunctionsError(er,ei,en)}/** 3385 * @license 3386 * Copyright 2017 Google LLC 3387 * 3388 * Licensed under the Apache License, Version 2.0 (the "License");
3389 * you may not use this file except in compliance with the License. 3390 * You may obtain a copy of the License at 3391 * 3392 * http://www.apache.org/licenses/LICENSE-2.0 3393 * 3394 * Unless required by applicable law or agreed to in writing, software 3395 * distributed under the License is distributed on an "AS IS" BASIS, 3396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3397 * See the License for the specific language governing permissions and 3398 * limitations under the License. 3399 */let ContextProvider=class ContextProvider{constructor($,et,en,ei){this.app=$,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,(0,er.rh)($)&&$.settings.appCheckToken&&(this.serverAppAppCheckToken=$.settings.appCheckToken),this.auth=et.getImmediate({optional:!0}),this.messaging=en.getImmediate({optional:!0}),this.auth||et.get().then($=>this.auth=$,()=>{}),this.messaging||en.get().then($=>this.messaging=$,()=>{}),this.appCheck||ei?.get().then($=>this.appCheck=$,()=>{})}async getAuthToken(){if(this.auth)try{let $=await this.auth.getToken();return $?.accessToken}catch($){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch($){return}}async getAppCheckToken($){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){let et=$?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return et.error?null:et.token}return null}async getContext($){let et=await this.getAuthToken(),en=await this.getMessagingToken(),er=await this.getAppCheckToken($);return{authToken:et,messagingToken:en,appCheckToken:er}}};/** 3400 * @license 3401 * Copyright 2017 Google LLC 3402 * 3403 * Licensed under the Apache License, Version 2.0 (the "License"); 3404 * you may not use this file except in compliance with the License. 3405 * You may obtain a copy of the License at 3406 * 3407 * http://www.apache.org/licenses/LICENSE-2.0 3408 * 3409 * Unless required by applicable law or agreed to in writing, software 3410 * distributed under the License is distributed on an "AS IS" BASIS, 3411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3412 * See the License for the specific language governing permissions and 3413 * limitations under the License. 3414 */let eu="us-central1",ed=/^data: (.*?)(?:\n|$)/;let FunctionsService=class FunctionsService{constructor($,et,en,er,ei=eu,eo=(...$)=>fetch(...$)){this.app=$,this.fetchImpl=eo,this.emulatorOrigin=null,this.contextProvider=new ContextProvider($,et,en,er),this.cancelAllRequests=new Promise($=>{this.deleteService=()=>Promise.resolve($())});try{let $=new URL(ei);this.customDomain=$.origin+("/"===$.pathname?"":$.pathname),this.region=eu}catch($){this.customDomain=null,this.region=ei}}_delete(){return this.deleteService()}_url($){let et=this.app.options.projectId;if(null!==this.emulatorOrigin){let en=this.emulatorOrigin;return`${en}/${et}/${this.region}/${$}`}return null!==this.customDomain?`${this.customDomain}/${$}`:`https://${this.region}-${et}.cloudfunctions.net/${$}`}};function getCredentials($){return $.emulatorOrigin&&(0,ei.Xx)($.emulatorOrigin)?"include":void 0}async function postJSON($,et,en,er,ei){let eo;en["Content-Type"]="application/json";try{eo=await er($,{method:"POST",body:JSON.stringify(et),headers:en,credentials:getCredentials(ei)})}catch($){return{status:0,json:null}}let es=null;try{es=await eo.json()}catch($){}return{status:eo.status,json:es}}async function makeAuthHeaders($,et){let en={},er=await $.contextProvider.getContext(et.limitedUseAppCheckTokens);return er.authToken&&(en.Authorization="Bearer "+er.authToken),er.messagingToken&&(en["Firebase-Instance-ID-Token"]=er.messagingToken),null!==er.appCheckToken&&(en["X-Firebase-AppCheck"]=er.appCheckToken),en}async function callAtURL($,et,en,er){let ei;en=encode(en);let eo={data:en},es=await makeAuthHeaders($,er),el=er.timeout||7e4,eu=(ei=null,{promise:new Promise(($,et)=>{ei=setTimeout(()=>{et(new FunctionsError("deadline-exceeded","deadline-exceeded"))},el)}),cancel:()=>{ei&&clearTimeout(ei)}}),ed=await Promise.race([postJSON(et,eo,es,$.fetchImpl,$),eu.promise,$.cancelAllRequests]);if(eu.cancel(),!ed)throw new FunctionsError("cancelled","Firebase Functions instance was deleted.");let eh=_errorForResponse(ed.status,ed.json);if(eh)throw eh;if(!ed.json)throw new FunctionsError("internal","Response is not val
3414id JSON object.");let ep=ed.json.data;if(void 0===ep&&(ep=ed.json.result),void 0===ep)throw new FunctionsError("internal","Response is missing data field.");let em=decode(ep);return{data:em}}async function streamAtURL($,et,en,er){let ei,eo,es;en=encode(en);let el={data:en},eu=await makeAuthHeaders($,er);eu["Content-Type"]="application/json",eu.Accept="text/event-stream";try{ei=await $.fetchImpl(et,{method:"POST",body:JSON.stringify(el),headers:eu,signal:er?.signal,credentials:getCredentials($)})}catch(et){if(et instanceof Error&&"AbortError"===et.name){let $=new FunctionsError("cancelled","Request was cancelled.");return{data:Promise.reject($),stream:{[Symbol.asyncIterator]:()=>({next:()=>Promise.reject($)})}}}let $=_errorForResponse(0,null);return{data:Promise.reject($),stream:{[Symbol.asyncIterator]:()=>({next:()=>Promise.reject($)})}}}let eh=new Promise(($,et)=>{eo=$,es=et});er?.signal?.addEventListener("abort",()=>{let $=new FunctionsError("cancelled","Request was cancelled.");es($)});let ep=ei.body.getReader(),em=function($,et,en,er){let processLine=($,er)=>{let ei=$.match(ed);if(!ei)return;let eo=ei[1];try{let $=JSON.parse(eo);if("result"in $){et(decode($.result));return}if("message"in $){er.enqueue(decode($.message));return}if("error"in $){let et=_errorForResponse(0,$);er.error(et),en(et);return}}catch($){if($ instanceof FunctionsError){er.error($),en($);return}}},ei=new TextDecoder;return new ReadableStream({start(et){let eo="";return pump();async function pump(){if(er?.aborted){let $=new FunctionsError("cancelled","Request was cancelled");return et.error($),en($),Promise.resolve()}try{let{value:es,done:el}=await $.read();if(el){eo.trim()&&processLine(eo.trim(),et),et.close();return}if(er?.aborted){let er=new FunctionsError("cancelled","Request was cancelled");et.error(er),en(er),await $.cancel();return}eo+=ei.decode(es,{stream:!0});let eu=eo.split("\n");for(let $ of(eo=eu.pop()||"",eu))$.trim()&&processLine($.trim(),et);return pump()}catch(er){let $=er instanceof FunctionsError?er:_errorForResponse(0,null);et.error($),en($)}}},cancel:()=>$.cancel()})}(ep,eo,es,er?.signal);return{stream:{[Symbol.asyncIterator](){let $=em.getReader();return{async next(){let{value:et,done:en}=await $.read();return{value:et,done:en}},return:async()=>(await $.cancel(),{done:!0,value:void 0})}}},data:eh}}let eh="@firebase/functions",ep="0.13.1";/** 3415 * @license 3416 * Copyright 2020 Google LLC 3417 * 3418 * Licensed under the Apache License, Version 2.0 (the "License"); 3419 * you may not use this file except in compliance with the License. 3420 * You may obtain a copy of the License at 3421 * 3422 * http://www.apache.org/licenses/LICENSE-2.0 3423 * 3424 * Unless required by applicable law or agreed to in writing, software 3425 * distributed under the License is distributed on an "AS IS" BASIS, 3426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3427 * See the License for the specific language governing permissions and 3428 * limitations under the License. 3429 */function getFunctions($=(0,er.Mq)(),et=eu){let en=(0,er.qX)((0,ei.m9)($),es),eo=en.getImmediate({identifier:et}),el=(0,ei.P0)("functions");return el&&function($,et,en){!function($,et,en){let er=(0,ei.Xx)(et);$.emulatorOrigin=`http${er?"s":""}://${et}:${en}`,er&&((0,ei.Uo)($.emulatorOrigin+"/backends"),(0,ei.dp)("Functions",!0))}((0,ei.m9)($),et,en)}(eo,...el),eo}function httpsCallable($,et,en){return function($,et,en){let callable=er=>(function($,et,en,er){let ei=$._url(et);return callAtURL($,ei,en,er)})($,et,er,en||{});return callable.stream=(en,er)=>(function($,et,en,er){let ei=$._url(et);return streamAtURL($,ei,en,er||{})})($,et,en,er),callable}((0,ei.m9)($),et,en)}(0,er.Xd)(new eo.wA(es,($,{instanceIdentifier:et})=>{let en=$.getProvider("app").getImmediate(),er=$.getProvider("auth-internal"),ei=$.getProvider("messaging-internal"),eo=$.getProvider("app-check-internal");return new FunctionsService(en,er,ei,eo,et)},"PUBLIC").setMultipleInstances(!0)),(0,er.KN)(eh,ep,void 0),(0,er.KN)(eh,ep,"esm2020")},16689:function($,et,en){"use strict";en.d(et,{oq:function(){return deleteObject},Jt:function(){return getDownloadURL},cF:function(){return getStorage},aF:function(){return listAll},iH:function(){return ref},KV:function(){return uploadBytes},B0:function(){return uploadBytesResumable}});
3429var er,ei,eo,es,el=en(33310),eu=en(99711),ed=en(75);/** 3430 * @license 3431 * Copyright 2017 Google LLC 3432 * 3433 * Licensed under the Apache License, Version 2.0 (the "License"); 3434 * you may not use this file except in compliance with the License. 3435 * You may obtain a copy of the License at 3436 * 3437 * http://www.apache.org/licenses/LICENSE-2.0 3438 * 3439 * Unless required by applicable law or agreed to in writing, software 3440 * distributed under the License is distributed on an "AS IS" BASIS, 3441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3442 * See the License for the specific language governing permissions and 3443 * limitations under the License. 3444 */let eh="firebasestorage.googleapis.com",ep="storageBucket";/** 3445 * @license 3446 * Copyright 2017 Google LLC 3447 * 3448 * Licensed under the Apache License, Version 2.0 (the "License"); 3449 * you may not use this file except in compliance with the License. 3450 * You may obtain a copy of the License at 3451 * 3452 * http://www.apache.org/licenses/LICENSE-2.0 3453 * 3454 * Unless required by applicable law or agreed to in writing, software 3455 * distributed under the License is distributed on an "AS IS" BASIS, 3456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3457 * See the License for the specific language governing permissions and 3458 * limitations under the License. 3459 */let StorageError=class StorageError extends eu.ZR{constructor($,et,en=0){super(prependCode($),`Firebase Storage: ${et} (${prependCode($)})`),this.status_=en,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,StorageError.prototype)}get status(){return this.status_}set status($){this.status_=$}_codeEquals($){return prependCode($)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse($){this.customData.serverResponse=$,this.customData.serverResponse?this.message=`${this._baseMessage} 3460${this.customData.serverResponse}`:this.message=this._baseMessage}};function prependCode($){return"storage/"+$}function unknown(){return new StorageError(eo.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function retryLimitExceeded(){return new StorageError(eo.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function canceled(){return new StorageError(eo.CANCELED,"User canceled the upload/download.")}function cannotSliceBlob(){return new StorageError(eo.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}
3460function invalidArgument($){return new StorageError(eo.INVALID_ARGUMENT,$)}function appDeleted(){return new StorageError(eo.APP_DELETED,"The Firebase app was deleted.")}function invalidFormat($,et){return new StorageError(eo.INVALID_FORMAT,"String does not match format '"+$+"': "+et)}function internalError($){throw new StorageError(eo.INTERNAL_ERROR,"Internal error: "+$)}(er=eo||(eo={})).UNKNOWN="unknown",er.OBJECT_NOT_FOUND="object-not-found",er.BUCKET_NOT_FOUND="bucket-not-found",er.PROJECT_NOT_FOUND="project-not-found",er.QUOTA_EXCEEDED="quota-exceeded",er.UNAUTHENTICATED="unauthenticated",er.UNAUTHORIZED="unauthorized",er.UNAUTHORIZED_APP="unauthorized-app",er.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",er.INVALID_CHECKSUM="invalid-checksum",er.CANCELED="canceled",er.INVALID_EVENT_NAME="invalid-event-name",er.INVALID_URL="invalid-url",er.INVALID_DEFAULT_BUCKET="invalid-default-bucket",er.NO_DEFAULT_BUCKET="no-default-bucket",er.CANNOT_SLICE_BLOB="cannot-slice-blob",er.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",er.NO_DOWNLOAD_URL="no-download-url",er.INVALID_ARGUMENT="invalid-argument",er.INVALID_ARGUMENT_COUNT="invalid-argument-count",er.APP_DELETED="app-deleted",er.INVALID_ROOT_OPERATION="invalid-root-operation",er.INVALID_FORMAT="invalid-format",er.INTERNAL_ERROR="internal-error",er.UNSUPPORTED_ENVIRONMENT="unsupported-environment";/** 3461 * @license 3462 * Copyright 2017 Google LLC 3463 * 3464 * Licensed under the Apache License, Version 2.0 (the "License"); 3465 * you may not use this file except in compliance with the License. 3466 * You may obtain a copy of the License at 3467 * 3468 * http://www.apache.org/licenses/LICENSE-2.0 3469 * 3470 * Unless required by applicable law or agreed to in writing, software 3471 * distributed under the License is distributed on an "AS IS" BASIS, 3472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3473 * See the License for the specific language governing permissions and 3474 * limitations under the License. 3475 */let Location=class Location{constructor($,et){this.bucket=$,this.path_=et}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let $=encodeURIComponent;return"/b/"+$(this.bucket)+"/o/"+$(this.path)}bucketOnlyServerUrl(){let $=encodeURIComponent;return"/b/"+$(this.bucket)+"/o"}static makeFromBucketSpec($,et){let en;try{en=Location.makeFromUrl($,et)}catch(et){return new Location($,"")}if(""===en.path)return en;throw new StorageError(eo.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+$+"'.")}static makeFromUrl($,et){let en=null,er="([A-Za-z0-9.\\-_]+)",ei=RegExp("^gs://"+er+"(/(.*))?$","i");function httpModify($){$.path_=decodeURIComponent($.path)}let es=et.replace(/[.]/g,"\\."),el=RegExp(`^https?://${es}/v[A-Za-z0-9_]+/b/${er}/o(/([^?#]*).*)?$`,"i"),eu=RegExp(`^https?://${et===eh?"(?:storage.googleapis.com|storage.cloud.google.com)":et}/${er}/([^?#]*)`,"i"),ed=[{regex:ei,indices:{bucket:1,path:3},postModify:function($){"/"===$.path.charAt($.path.length-1)&&($.path_=$.path_.slice(0,-1))}},{regex:el,indices:{bucket:1,path:3},postModify:httpModify},{regex:eu,indices:{bucket:1,path:2},postModify:httpModify}];for(let et=0;et<ed.length;et++){let er=ed[et],ei=er.regex.exec($);if(ei){let $=ei[er.indices.bucket],et=ei[er.indices.path];et||(et=""),en=new Location($,et),er.postModify(en);break}}if(null==en)throw new StorageError(eo.INVALID_URL,"Invalid URL '"+$+"'.");return en}};let FailRequest=class FailRequest{constructor($){this.promise_=Promise.reject($)}getPromise(){return this.promise_}cancel($=!1){}};function isString($){return"string"==typeof $||$ instanceof String}function isNativeBlob($){return isNativeBlobDefined()&&$ instanceof Blob}function isNativeBlobDefined(){return"undefined"!=typeof Blob}function validateNumber($,et,en,er){if(er<et)throw invalidArgument(`Invalid value for '${$}'. Expected ${et} or greater.`);if(er>en)throw invalidArgument(`Invalid value for '${$}'. Expected ${en} or less.`)}/** 3476 * @license 3477 * Copyright 2017 Google LLC 3478 * 3479 * Licensed under the Apache License, Version 2.0 (the "License"); 3480 * you may not use this file except in compliance with the License. 3481 * You may obtain a copy of the License at 3482 * 3483 * http://www.apache.org/licenses/LICENSE-2.0 3484 * 3485 * Unless required by applicable law or agreed to in writing, softw
3485are 3486 * distributed under the License is distributed on an "AS IS" BASIS, 3487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3488 * See the License for the specific language governing permissions and 3489 * limitations under the License. 3490 */function makeUrl($,et,en){let er=et;return null==en&&(er=`https://${et}`),`${en}://${er}/v0${$}`}function makeQueryString($){let et=encodeURIComponent,en="?";for(let er in $)if($.hasOwnProperty(er)){let ei=et(er)+"="+et($[er]);en=en+ei+"&"}return en.slice(0,-1)}/** 3491 * @license 3492 * Copyright 2022 Google LLC 3493 * 3494 * Licensed under the Apache License, Version 2.0 (the "License"); 3495 * you may not use this file except in compliance with the License. 3496 * You may obtain a copy of the License at 3497 * 3498 * http://www.apache.org/licenses/LICENSE-2.0 3499 * 3500 * Unless required by applicable law or agreed to in writing, software 3501 * distributed under the License is distributed on an "AS IS" BASIS, 3502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3503 * See the License for the specific language governing permissions and 3504 * limitations under the License. 3505 */function isRetryStatusCode($,et){let en=$>=500&&$<600,er=-1!==[408,429].indexOf($),ei=-1!==et.indexOf($);return en||er||ei}(ei=es||(es={}))[ei.NO_ERROR=0]="NO_ERROR",ei[ei.NETWORK_ERROR=1]="NETWORK_ERROR",ei[ei.ABORT=2]="ABORT";/** 3506 * @license 3507 * Copyright 2017 Google LLC 3508 * 3509 * Licensed under the Apache License, Version 2.0 (the "License"); 3510 * you may not use this file except in compliance with the License. 3511 * You may obtain a copy of the License at 3512 * 3513 * http://www.apache.org/licenses/LICENSE-2.0 3514 * 3515 * Unless required by applicable law or agreed to in writing, software 3516 * distributed under the License is distributed on an "AS IS" BASIS, 3517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3518 * See the License for the specific language governing permissions and 3519 * limitations under the License. 3520 */let NetworkRequest=class NetworkRequest{constructor($,et,en,er,ei,eo,es,el,eu,ed,eh,ep=!0,em=!1){this.url_=$,this.method_=et,this.headers_=en,this.body_=er,this.successCodes_=ei,this.additionalRetryCodes_=eo,this.callback_=es,this.errorCallback_=el,this.timeout_=eu,this.progressCallback_=ed,this.connectionFactory_=eh,this.retry=ep,this.isUsingEmulator=em,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(($,et)=>{this.resolve_=$,this.reject_=et,this.start_()})}start_(){let backoffDone=($,et)=>{let en=this.resolve_,er=this.reject_,ei=et.connection;if(et.wasSuccessCode)try{let $=this.callback_(ei,ei.getResponse());void 0!==$?en($):en()}catch($){er($)}else if(null!==ei){let $=unknown();$.serverResponse=ei.getErrorText(),er(this.errorCallback_?this.errorCallback_(ei,$):$)}else if(et.canceled){let $=this.appDelete_?appDeleted():canceled();er($)}else{let $=retryLimitExceeded();er($)}};this.canceled_?backoffDone(!1,new RequestEndStatus(!1,null,!0)):this.backoffId_=/** 3521 * @license 3522 * Copyright 2017 Google LLC 3523 * 3524 * Licensed under the Apache License, Version 2.0 (the "License"); 3525 * you may not use this file except in compliance with the License. 3526 * You may obtain a copy of the License at 3527 * 3528 * http://www.apache.org/licenses/LICENSE-2.0 3529 * 3530 * Unless required by applicable law or agreed to in writing, software 3531 * distributed under the License is distributed on an "AS IS" BASIS, 3532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3533 * See the License for the specific language governing permissions and 3534 * limitations under the License. 3535 */function($,et,en){let er=1,ei=null,eo=null,es=!1,el=0,eu=!1;function triggerCallback(...$){eu||(eu=!0,et.apply(null,$))}function callWithDelay(et){ei=setTimeout(()=>{ei=null,$(responseHandler,2===el)},et)}function clearGlobalTimeout(){eo&&clearTimeout(eo)}function responseHandler($,...et){let en;if(eu){clearGlobalTimeout();return}if($){clearGlobalTimeout(),triggerCallback.call(null,$,...et);return}let ei=2===el||es;if(ei){clearGlobalTimeout(),triggerCallback.call(null,$,...et);return}er<64&&(er*=2),1===el?(el=2,en=0):en=(er+Math.random())*1e3,callWithDelay(en)}let ed=!1;function stop($){!ed&&(ed=!0,clearGlobalTimeout(),!eu&&(null!==ei?($||(el=2),clearTimeout(ei),callWithDelay(0)):$||(el=1)))}return callWithDelay(0),eo=setTimeout(()=>{es=!0,stop(!0)},en),stop}(($,et)=>{if(et){$(!1,new RequestEndStatus(!1,null,!0));return}let en=this.connectionFactory_();this.pendingConnection_=en;let progressListener=$=>{let et=$.loaded,en=$.lengthComputable?$.total:-1;null!==this.progressCallback_&&this.progressCallback_(et,en)};null!==this.progressCallback_&&en.addUploadProgressListener(progressListener),en.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&en.removeUploadProgressListener(progressListener),this.pendingConnection_=null;let et=en.getErrorCode()===es.NO_ERROR,er=en.getStatus();if(!et||isRetryStatusCode(er,this.additionalRetryCodes_)&&this.retry){let et=en.getErrorCode()===es.ABORT;$(!1,new RequestEndStatus(!1,null,et));return}let ei=-1!==this.successCodes_.indexOf(er);$(!0,new RequestEndStatus(ei,en))})},backoffDone,this.timeout_)}getPromise(){return this.promise_}cancel($){this.canceled_=!0,this.appDelete_=$||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}};let RequestEndStatus=class RequestEndStatus{constructor($,et,en){this.wasSuccessCode=$,this.connection=et,this.canceled=!!en}};function getBlob$1(...$){let et="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?Web
3535KitBlobBuilder:void 0;if(void 0!==et){let en=new et;for(let et=0;et<$.length;et++)en.append($[et]);return en.getBlob()}if(isNativeBlobDefined())return new Blob($);throw new StorageError(eo.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}/** 3536 * @license 3537 * Copyright 2017 Google LLC 3538 * 3539 * Licensed under the Apache License, Version 2.0 (the "License"); 3540 * you may not use this file except in compliance with the License. 3541 * You may obtain a copy of the License at 3542 * 3543 * http://www.apache.org/licenses/LICENSE-2.0 3544 * 3545 * Unless required by applicable law or agreed to in writing, software 3546 * distributed under the License is distributed on an "AS IS" BASIS, 3547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3548 * See the License for the specific language governing permissions and 3549 * limitations under the License. 3550 */let em={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};let StringData=class StringData{constructor($,et){this.data=$,this.contentType=et||null}};function utf8Bytes_($){let et=[];for(let en=0;en<$.length;en++){let er=$.charCodeAt(en);if(er<=127)et.push(er);else if(er<=2047)et.push(192|er>>6,128|63&er);else if((64512&er)==55296){let ei=en<$.length-1&&(64512&$.charCodeAt(en+1))==56320;if(ei){let ei=er,eo=$.charCodeAt(++en);er=65536|(1023&ei)<<10|1023&eo,et.push(240|er>>18,128|er>>12&63,128|er>>6&63,128|63&er)}else et.push(239,191,189)}else(64512&er)==56320?et.push(239,191,189):et.push(224|er>>12,128|er>>6&63,128|63&er)}return new Uint8Array(et)}function base64Bytes_($,et){let en;switch($){case em.BASE64:{let en=-1!==et.indexOf("-"),er=-1!==et.indexOf("_");if(en||er)throw invalidFormat($,"Invalid character '"+(en?"-":"_")+"' found: is it base64url encoded?");break}case em.BASE64URL:{let en=-1!==et.indexOf("+"),er=-1!==et.indexOf("/");if(en||er)throw invalidFormat($,"Invalid character '"+(en?"+":"/")+"' found: is it base64 encoded?");et=et.replace(/-/g,"+").replace(/_/g,"/")}}try{en=/** 3551 * @license 3552 * Copyright 2021 Google LLC 3553 * 3554 * Licensed under the Apache License, Version 2.0 (the "License"); 3555 * you may not use this file except in compliance with the License. 3556 * You may obtain a copy of the License at 3557 * 3558 * http://www.apache.org/licenses/LICENSE-2.0 3559 * 3560 * Unless required by applicable law or agreed to in writing, software 3561 * distributed under the License is distributed on an "AS IS" BASIS, 3562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3563 * See the License for the specific language governing permissions and 3564 * limitations under the License. 3565 */function($){if("undefined"==typeof atob)throw new StorageError(eo.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob($)}(et)}catch(et){if(et.message.includes("polyfill"))throw et;throw invalidFormat($,"Invalid character found")}let er=new Uint8Array(en.length);for(let $=0;$<en.length;$++)er[$]=en.charCodeAt($);return er}let DataURLParts=class DataURLParts{constructor($){this.base64=!1,this.contentType=null;let et=$.match(/^data:([^,]+)?,/);if(null===et)throw invalidFormat(em.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let en=et[1]||null;null!=en&&(this.base64=function($,et){let en=$.length>=et.length;return!!en&&$.substring($.length-et.length)===et}(en,";base64"),this.contentType=this.base64?en.substring(0,en.length-7):en),this.rest=$.substring($.indexOf(",")+1)}};/** 3566 * @license 3567 * Copyright 2017 Google LLC 3568 * 3569 * Licensed under the Apache License, Version 2.0 (the "License"); 3570 * you may not use this file except in compliance with the License. 3571 * You may obtain a copy of the License at 3572 * 3573 * http://www.apache.org/licenses/LICENSE-2.0 3574 * 3575 * Unless required by applicable law or agreed to in writing, software 3576 * distributed under the License is distributed on an "AS IS" BASIS, 3577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3578 * See the License for the specific language governing permissions and 3579 * limitations under the License. 3580 */let FbsBlob=class FbsBlob{constructor($,et){let en=0,er="";isNativeBlob($)?(this.data_=$,en=$.size,er=$.type):$ instanceof ArrayBuffer?(et?this.data_=new Uint8Array($):(this.data_=new Uint8Array($.byteLength),this.data_.set(new Uint8Array($))),en=this.data_.length):$ instanceof Uint8Array&&(et?this.data_=$:(this.data_=new Uint8Array($.length),this.data_.set($)),en=$.length),this.size_=en,this.type_=er}size(){return this.size_}type(){return this.type_}slice($,et){if(isNativeBlob(this.data_)){let en=this.data_,er=en.webkitSlice?en.webkitSlice($,et):en.mozSlice?en.mozSlice($,et):en.slice?en.slice($,et):null;return null===er?null:new FbsBlob(er)}{let en=new Uint8Array(this.data_.buffer,$,et-$);return new FbsBlob(en,!0)}}static getBlob(...$){if(isNativeBlobDefined()){let et=$.map($=>$ instanceof FbsBlob?$.data_:$);return new FbsBlob(getBlob$1.apply(null,et))}{let et=$.map($=>isString($)?function($,et){switch($){case em.RAW:return new StringData(utf8Bytes_(et));case em.BASE64:case em.BASE64URL:return new StringData(base64Bytes_($,et));case em.DATA_URL:return new StringData(function($){let et=new DataURLParts($);return et.base64?base64Bytes_(em.BASE64,et.rest):function($){let et;try{et=decodeURIComponent($)}
3580catch($){throw invalidFormat(em.DATA_URL,"Malformed data URL.")}return utf8Bytes_(et)}(et.rest)}(et),function($){let et=new DataURLParts($);return et.contentType}(et))}throw unknown()}(em.RAW,$).data:$.data_),en=0;et.forEach($=>{en+=$.byteLength});let er=new Uint8Array(en),ei=0;return et.forEach($=>{for(let et=0;et<$.length;et++)er[ei++]=$[et]}),new FbsBlob(er,!0)}}uploadData(){return this.data_}};/** 3581 * @license 3582 * Copyright 2017 Google LLC 3583 * 3584 * Licensed under the Apache License, Version 2.0 (the "License"); 3585 * you may not use this file except in compliance with the License. 3586 * You may obtain a copy of the License at 3587 * 3588 * http://www.apache.org/licenses/LICENSE-2.0 3589 * 3590 * Unless required by applicable law or agreed to in writing, software 3591 * distributed under the License is distributed on an "AS IS" BASIS, 3592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3593 * See the License for the specific language governing permissions and 3594 * limitations under the License. 3595 */function jsonObjectOrNull($){var et;let en;try{en=JSON.parse($)}catch($){return null}return"object"!=typeof(et=en)||Array.isArray(et)?null:en}function lastComponent($){let et=$.lastIndexOf("/",$.length-2);return -1===et?$:$.slice(et+1)}/** 3596 * @license 3597 * Copyright 2017 Google LLC 3598 * 3599 * Licensed under the Apache License, Version 2.0 (the "License"); 3600 * you may not use this file except in compliance with the License. 3601 * You may obtain a copy of the License at 3602 * 3603 * http://www.apache.org/licenses/LICENSE-2.0 3604 * 3605 * Unless required by applicable law or agreed to in writing, software 3606 * distributed under the License is distributed on an "AS IS" BASIS, 3607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3608 * See the License for the specific language governing permissions and 3609 * limitations under the License. 3610 */function noXform_($,et){return et}let Mapping=class Mapping{constructor($,et,en,er){this.server=$,this.local=et||$,this.writable=!!en,this.xform=er||noXform_}};let ef=null;function getMappings(){if(ef)return ef;let $=[];$.push(new Mapping("bucket")),$.push(new Mapping("generation")),$.push(new Mapping("metageneration")),$.push(new Mapping("name","fullPath",!0));let et=new Mapping("name");et.xform=function($,et){return!isString(et)||et.length<2?et:lastComponent(et)},$.push(et);let en=new Mapping("size");return en.xform=function($,et){return void 0!==et?Number(et):et},$.push(en),$.push(new Mapping("timeCreated")),$.push(new Mapping("updated")),$.push(new Mapping("md5Hash",null,!0)),$.push(new Mapping("cacheControl",null,!0)),$.push(new Mapping("contentDisposition",null,!0)),$.push(new Mapping("contentEncoding",null,!0)),$.push(new Mapping("contentLanguage",null,!0)),$.push(new Mapping("contentType",null,!0)),$.push(new Mapping("metadata","customMetadata",!0)),ef=$}function fromResourceString($,et,en){let er=jsonObjectOrNull(et);return null===er?null:function($,et,en){let er={};er.type="file";let ei=en.length;for(let $=0;$<ei;$++){let ei=en[$];er[ei.local]=ei.xform(er,et[ei.server])}return Object.defineProperty(er,"ref",{get:function(){let et=er.bucket,en=er.fullPath,ei=new Location(et,en);return $._makeStorageReference(ei)}}),er}($,er,en)}function toResourceString($,et){let en={},er=et.length;for(let ei=0;ei<er;ei++){let er=et[ei];er.writable&&(en[er.server]=$[er.local])}return JSON.stringify(en)}/** 3611 * @license 3612 * Copyright 2019 Google LLC 3613 * 3614 * Licensed under the Apache License, Version 2.0 (the "License"); 3615 * you may not use this file except in compliance with the License. 3616 * You may obtain a copy of the License at 3617 * 3618 * http://www.apache.org/licenses/LICENSE-2.0 3619 * 3620 * Unless required by applicable law or agreed to in writing, software 3621 * distributed under the License is distributed on an "AS IS" BASIS, 3622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3623 * See the License for the specific language governing permissions and 3624 * limitations under the License. 3625 */let eg="prefixes",ey="items";let RequestInfo=class RequestInfo{constructor($,et,en,er){this.url=$,this.method=et,this.handler=en,this.timeout=er,this.urlParam
3625s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}};/** 3626 * @license 3627 * Copyright 2017 Google LLC 3628 * 3629 * Licensed under the Apache License, Version 2.0 (the "License"); 3630 * you may not use this file except in compliance with the License. 3631 * You may obtain a copy of the License at 3632 * 3633 * http://www.apache.org/licenses/LICENSE-2.0 3634 * 3635 * Unless required by applicable law or agreed to in writing, software 3636 * distributed under the License is distributed on an "AS IS" BASIS, 3637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3638 * See the License for the specific language governing permissions and 3639 * limitations under the License. 3640 */function handlerCheck($){if(!$)throw unknown()}function metadataHandler($,et){return function(en,er){let ei=fromResourceString($,er,et);return handlerCheck(null!==ei),ei}}function sharedErrorHandler($){return function(et,en){var er,ei;let es;return 401===et.getStatus()?es=et.getErrorText().includes("Firebase App Check token is invalid")?new StorageError(eo.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new StorageError(eo.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===et.getStatus()?(er=$.bucket,es=new StorageError(eo.QUOTA_EXCEEDED,"Quota for bucket '"+er+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===et.getStatus()?(ei=$.path,es=new StorageError(eo.UNAUTHORIZED,"User does not have permission to access '"+ei+"'.")):es=en,es.status=et.getStatus(),es.serverResponse=en.serverResponse,es}}function objectErrorHandler($){let et=sharedErrorHandler($);return function(en,er){let ei=et(en,er);if(404===en.getStatus()){var es;es=$.path,ei=new StorageError(eo.OBJECT_NOT_FOUND,"Object '"+es+"' does not exist.")}return ei.serverResponse=er.serverResponse,ei}}function metadataForUpload_($,et,en){let er=Object.assign({},en);return er.fullPath=$.path,er.size=et.size(),!er.contentType&&(er.contentType=et&&et.type()||"application/octet-stream"),er}function multipartUpload($,et,en,er,ei){let eo=et.bucketOnlyServerUrl(),es={"X-Goog-Upload-Protocol":"multipart"},el=function(){let $="";for(let et=0;et<2;et++)$+=Math.random().toString().slice(2);return $}();es["Content-Type"]="multipart/related; boundary="+el;let eu=metadataForUpload_(et,er,ei),ed=toResourceString(eu,en),eh="--"+el+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ed+"\r\n--"+el+"\r\nContent-Type: "+eu.contentType+"\r\n\r\n",ep=FbsBlob.getBlob(eh,er,"\r\n--"
3640+el+"--");if(null===ep)throw cannotSliceBlob();let em={name:eu.fullPath},ef=makeUrl(eo,$.host,$._protocol),eg=$.maxUploadRetryTime,ey=new RequestInfo(ef,"POST",metadataHandler($,en),eg);return ey.urlParams=em,ey.headers=es,ey.body=ep.uploadData(),ey.errorHandler=sharedErrorHandler(et),ey}let ResumableUploadStatus=class ResumableUploadStatus{constructor($,et,en,er){this.current=$,this.total=et,this.finalized=!!en,this.metadata=er||null}};function checkResumeHeader_($,et){let en=null;try{en=$.getResponseHeader("X-Goog-Upload-Status")}catch($){handlerCheck(!1)}return handlerCheck(!!en&&-1!==(et||["active"]).indexOf(en)),en}let ev={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function taskStateFromInternalTaskState($){switch($){case"running":case"pausing":case"canceling":return ev.RUNNING;case"paused":return ev.PAUSED;case"success":return ev.SUCCESS;case"canceled":return ev.CANCELED;default:return ev.ERROR}}/** 3641 * @license 3642 * Copyright 2017 Google LLC 3643 * 3644 * Licensed under the Apache License, Version 2.0 (the "License"); 3645 * you may not use this file except in compliance with the License. 3646 * You may obtain a copy of the License at 3647 * 3648 * http://www.apache.org/licenses/LICENSE-2.0 3649 * 3650 * Unless required by applicable law or agreed to in writing, software 3651 * distributed under the License is distributed on an "AS IS" BASIS, 3652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3653 * See the License for the specific language governing permissions and 3654 * limitations under the License. 3655 */let Observer=class Observer{constructor($,et,en){"function"==typeof $||null!=et||null!=en?(this.next=$,this.error=et??void 0,this.complete=en??void 0):(this.next=$.next,this.error=$.error,this.complete=$.complete)}};/** 3656 * @license 3657 * Copyright 2017 Google LLC 3658 * 3659 * Licensed under the Apache License, Version 2.0 (the "License"); 3660 * you may not use this file except in compliance with the License. 3661 * You may obtain a copy of the License at 3662 * 3663 * http://www.apache.org/licenses/LICENSE-2.0 3664 * 3665 * Unless required by applicable law or agreed to in writing, software 3666 * distributed under the License is distributed on an "AS IS" BASIS, 3667 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3668 * See the License for the specific language governing permissions and 3669 * limitations under the License. 3670 */function index_esm_async($){return(...et)=>{Promise.resolve().then(()=>$(...et))}}let XhrConnection=class XhrConnection{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=es.NO_ERROR,this.sendPromise_=new Promise($=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=es.ABORT,$()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=es.NETWORK_ERROR,$()}),this.xhr_.addEventListener("load",()=>{$()})})}send($,et,en,er,ei){if(this.sent_)throw internalError("cannot .send() more than once");if((0,eu.Xx)($)&&en&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(et,$,!0),void 0!==ei)for(let $ in ei)ei.hasOwnProperty($)&&this.xhr_.setRequestHeader($,ei[$].toString());return void 0!==er?this.xhr_.send(er):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw internalError("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw internalError("cannot .getStatus() before sending");try{return this.xhr_.status}catch($){return -1}}getResponse(){if(!this.sent_)throw internalError("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw internalError("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader($){return this.xhr_.getResponseHeader($)}addUploadProgressListener($){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",$)}removeUploadProgressListener($){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",$)}};let XhrTextConnection=class XhrTextConnection extends XhrConnection{initXhr(){this.xhr_.responseType="text"}};function newTextConnection(){return new XhrTextConnection}/** 3671 * @license 3672 * Copyright 2017 Google LLC 3673 * 3674 * Licensed under the Apache License, Version 2.0 (the "License");
3675 * you may not use this file except in compliance with the License. 3676 * You may obtain a copy of the License at 3677 * 3678 * http://www.apache.org/licenses/LICENSE-2.0 3679 * 3680 * Unless required by applicable law or agreed to in writing, software 3681 * distributed under the License is distributed on an "AS IS" BASIS, 3682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3683 * See the License for the specific language governing permissions and 3684 * limitations under the License. 3685 */let UploadTask=class UploadTask{isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}constructor($,et,en=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=$,this._blob=et,this._metadata=en,this._mappings=getMappings(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=$=>{if(this._request=void 0,this._chunkMultiplier=1,$._codeEquals(eo.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let et=this.isExponentialBackoffExpired();if(isRetryStatusCode($.status,[])){if(et)$=retryLimitExceeded();else{this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,this.completeTransitions_();return}}this._error=$,this._transition("error")}},this._metadataErrorHandler=$=>{this._request=void 0,$._codeEquals(eo.CANCELED)?this.completeTransitions_():(this._error=$,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise(($,et)=>{this._resolve=$,this._reject=et,this._start()}),this._promise.then(null,()=>{})}_makeProgressCallback(){let $=this._transferred;return et=>this._updateProgress($+et)}_shouldDoResumable($){return $.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken($){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([et,en])=>{switch(this._state){case"running":$(et,en);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken(($,et)=>{let en=function($,et,en,er,ei){let eo=et.bucketOnlyServerUrl(),es=metadataForUpload_(et,er,ei),el={name:es.fullPath},eu=makeUrl(eo,$.host,$._protocol),ed={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${er.size()}`,"X-Goog-Upload-Header-Content-Type":es.contentType,"Content-Type":"application/json; charset=utf-8"},eh=toResourceString(es,en),ep=$.maxUploadRetryTime,em=new RequestInfo(eu,"POST",function($){let et;checkResumeHeader_($);try{et=$.getResponseHeader("X-Goog-Upload-URL")}catch($){handlerCheck(!1)}return handlerCheck(isString(et)),et},ep);return em.urlParams=el,em.headers=ed,em.body=eh,em.errorHandler=sharedErrorHandler(et),em}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),er=this._ref.storage._makeRequest(en,newTextConnection,$,et);this._request=er,er.getPromise().then($=>{this._request=void 0,this._uploadUrl=$,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let $=this._uploadUrl;this._resolveToken((et,en)=>{let er=function($,et,en,er){let ei=$.maxUploadRetryTime,eo=new RequestInfo(en,"POST",function($){let et=checkResumeHeader_($,["active","final"]),en=null;try{en=$.getResponseHeader("X-Goog-Upload-Size-Received")}catch($){handlerCheck(!1)}en||handlerCheck(!1);let ei=Number(en);return handlerCheck(!isNaN(ei)),new ResumableUploadStatus(ei,er.size(),"final"===et)},ei);return eo.headers={"X-Goog-Upload-Command":"query"},eo.errorHandler=sharedErrorHandler(et),eo}(this._ref.storage,this._ref._location,$,this._blob),ei=this._ref.storage._makeRequest
3685(er,newTextConnection,et,en);this._request=ei,ei.getPromise().then($=>{this._request=void 0,this._updateProgress($.current),this._needToFetchStatus=!1,$.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let $=262144*this._chunkMultiplier,et=new ResumableUploadStatus(this._transferred,this._blob.size()),en=this._uploadUrl;this._resolveToken((er,ei)=>{let es;try{es=function($,et,en,er,ei,es,el,eu){let ed=new ResumableUploadStatus(0,0);if(el?(ed.current=el.current,ed.total=el.total):(ed.current=0,ed.total=er.size()),er.size()!==ed.total)throw new StorageError(eo.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");let eh=ed.total-ed.current,ep=eh;ei>0&&(ep=Math.min(ep,ei));let em=ed.current,ef=em+ep,eg="";eg=0===ep?"finalize":eh===ep?"upload, finalize":"upload";let ey={"X-Goog-Upload-Command":eg,"X-Goog-Upload-Offset":`${ed.current}`},ev=er.slice(em,ef);if(null===ev)throw cannotSliceBlob();let ex=et.maxUploadRetryTime,e_=new RequestInfo(en,"POST",function($,en){let ei;let eo=checkResumeHeader_($,["active","final"]),el=ed.current+ep,eu=er.size();return ei="final"===eo?metadataHandler(et,es)($,en):null,new ResumableUploadStatus(el,eu,"final"===eo,ei)},ex);return e_.headers=ey,e_.body=ev.uploadData(),e_.progressCallback=eu||null,e_.errorHandler=sharedErrorHandler($),e_}(this._ref._location,this._ref.storage,en,this._blob,$,this._mappings,et,this._makeProgressCallback())}catch($){this._error=$,this._transition("error");return}let el=this._ref.storage._makeRequest(es,newTextConnection,er,ei,!1);this._request=el,el.getPromise().then($=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress($.current),$.finalized?(this._metadata=$.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){let $=262144*this._chunkMultiplier;2*$<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken(($,et)=>{let en=function($,et,en){let er=et.fullServerUrl(),ei=makeUrl(er,$.host,$._protocol),eo=$.maxOperationRetryTime,es=new RequestInfo(ei,"GET",metadataHandler($,en),eo);return es.errorHandler=objectErrorHandler(et),es}(this._ref.storage,this._ref._location,this._mappings),er=this._ref.storage._makeRequest(en,newTextConnection,$,et);this._request=er,er.getPromise().then($=>{this._request=void 0,this._metadata=$,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken(($,et)=>{let en=multipartUpload(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),er=this._ref.storage._makeRequest(en,newTextConnection,$,et);this._request=er,er.getPromise().then($=>{this._request=void 0,this._metadata=$,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress($){let et=this._transferred;this._transferred=$,this._transferred!==et&&this._notifyObservers()}_transition($){if(this._state!==$)switch($){case"canceling":case"pausing":this._state=$,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let et="paused"===this._state;this._state=$,et&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=$,this._notifyObservers();break;case"canceled":this._error=canceled(),this._state=$,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){let $=taskStateFromInternalTaskState(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:$,metadata:this._metadata,task:this,ref:this._ref}}on($,et,en,er){let ei=new Observer(et||void 0,en||void 0,er||void 0);return this._addObserver(ei),()=>{this._removeObserver(ei)}}then($,et){return this._promise.then($,et)}catch($){return this.then(null,$)}_addObserver($){this._observers.push($),this._notifyObserver($)}_removeObserver($){let et=this._observers.indexOf($);-1!==et&&this._observers.splice(et,1)}_notifyObservers(){this._finishPromise();let $=this._observers.slice();$.forEach($=>{this._notifyObserver($)})}_finishPromise(){if(void 0!==this._resolve){let $=!0;switch(taskStateFromInternalTaskState(this._state)){case ev.SUCCESS:index_esm_async(this._resolve.bind(null,this.snapshot))();break;case ev.CANCELED:case ev.ERROR:let et=this._reject;index_esm_async(et.bind(null,this._error))();break;default:$=!1}$&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver($){let et=taskStateFromInternalTaskState(this._state);switch(et){case ev.RUNNING:case ev.PAUSED:$.next&&index_esm_async($.next.bind($,this.snapshot))();break;case ev.SUCCESS:$.complete&&index_esm_async($.complete.bind($))();break;case ev.CANCELED:case ev.ERROR:default:$.error&&index_esm_async($.error.bind($,this._error))()}}resume(){let $="paused"===this._state||"pausing"===this._state;return $&&this._transition("running"),$}
3685pause(){let $="running"===this._state;return $&&this._transition("pausing"),$}cancel(){let $="running"===this._state||"pausing"===this._state;return $&&this._transition("canceling"),$}};/** 3686 * @license 3687 * Copyright 2019 Google LLC 3688 * 3689 * Licensed under the Apache License, Version 2.0 (the "License"); 3690 * you may not use this file except in compliance with the License. 3691 * You may obtain a copy of the License at 3692 * 3693 * http://www.apache.org/licenses/LICENSE-2.0 3694 * 3695 * Unless required by applicable law or agreed to in writing, software 3696 * distributed under the License is distributed on an "AS IS" BASIS, 3697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3698 * See the License for the specific language governing permissions and 3699 * limitations under the License. 3700 */let Reference=class Reference{constructor($,et){this._service=$,et instanceof Location?this._location=et:this._location=Location.makeFromUrl(et,$.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef($,et){return new Reference($,et)}get root(){let $=new Location(this._location.bucket,"");return this._newRef(this._service,$)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return lastComponent(this._location.path)}get storage(){return this._service}get parent(){let $=/** 3701 * @license 3702 * Copyright 2017 Google LLC 3703 * 3704 * Licensed under the Apache License, Version 2.0 (the "License"); 3705 * you may not use this file except in compliance with the License. 3706 * You may obtain a copy of the License at 3707 * 3708 * http://www.apache.org/licenses/LICENSE-2.0 3709 * 3710 * Unless required by applicable law or agreed to in writing, software 3711 * distributed under the License is distributed on an "AS IS" BASIS, 3712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3713 * See the License for the specific language governing permissions and 3714 * limitations under the License. 3715 */function($){if(0===$.length)return null;let et=$.lastIndexOf("/");if(-1===et)return"";let en=$.slice(0,et);return en}(this._location.path);if(null===$)return null;let et=new Location(this._location.bucket,$);return new Reference(this._service,et)}_throwIfRoot($){if(""===this._location.path)throw new StorageError(eo.INVALID_ROOT_OPERATION,"The operation '"+$+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}};async function listAllHelper($,et,en){let er=await function($,et){null!=et&&"number"==typeof et.maxResults&&validateNumber("options.maxResults",1,1e3,et.maxResults);let en=et||{},er=function($,et,en,er,ei){var eo;let es={};et.isRoot?es.prefix="":es.prefix=et.path+"/",en&&en.length>0&&(es.delimiter=en),er&&(es.pageToken=er),ei&&(es.maxResults=ei);let el=et.bucketOnlyServerUrl(),eu=makeUrl(el,$.host,$._protocol),ed=$.maxOperationRetryTime,eh=new RequestInfo(eu,"GET",(eo=et.bucket,function(et,en){let er=function($,et,en){let er=jsonObjectOrNull(en);return null===er?null:function($,et,en){let er={prefixes:[],items:[],nextPageToken:en.nextPageToken};if(en[eg])for(let ei of en[eg]){let en=ei.replace(/\/$/,""),eo=$._makeStorageReference(new Location(et,en));er.prefixes.push(eo)}if(en[ey])for(let ei of en[ey]){let en=$._makeStorageReference(new Location(et,ei.name));er.items.push(en)}return er}($,et,er)}($,eo,en);return handlerCheck(null!==er),er}),ed);return eh.urlParams=es,eh.errorHandler=sharedErrorHandler(et),eh}($.storage,$._location,"/",en.pageToken,en.maxResults);return $.storage.makeRequestWithTokens(er,newTextConnection)}($,{pageToken:en});et.prefixes.push(...er.prefixes),et.items.push(...er.items),null!=er.nextPageToken&&await listAllHelper($,et,er.nextPageToken)}function extractBucket($,et){let en=et?.[ep];return null==en?null:Location.makeFromBucketSpec(en,$)}let FirebaseStorageImpl=class FirebaseStorageImpl{constructor($,et,en,er,ei,eo=!1){this.app=$,this._authProvider=et,this._appCheckProvider=en,this._url=er,this._firebaseVersion=ei,this._isUsingEmulator=eo,this._bucket=null,this._host=eh,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=er?this._bucket=Location.makeFromBucketSpec(er,this._host):this._bucket=extractBucket(this._host,this.app.options)}get host(){return this._host}set host($){this._host=$,null!=this._url?this._bucket=Location.makeFromBucketSpec(this._url,$):this._bucket=extractBucket($,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime($){validateNumber("time",0,Number.POSITIVE_INFINITY,$),this._maxUploadRetryTime=$}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime($){validateNumber("time",0,Number.POSITIVE_INFINITY,$),this._maxOperationRetryTime=$}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let $=this._authProvider.getImmediate({optional:!0});if($){let et=await $.getToken();if(null!==et)return et.accessToken}return null}async _getAppCheckToken(){if((0,el.rh)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let $=this._appCheckProvider.getImmediate({optional:!0});if($){let et=await $.getToken();return et.token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
3715h($=>$.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference($){return new Reference(this,$)}_makeRequest($,et,en,er,ei=!0){if(this._deleted)return new FailRequest(appDeleted());{let eo=function($,et,en,er,ei,eo,es=!0,el=!1){let eu=makeQueryString($.urlParams),ed=$.url+eu,eh=Object.assign({},$.headers);return et&&(eh["X-Firebase-GMPID"]=et),null!==en&&en.length>0&&(eh.Authorization="Firebase "+en),eh["X-Firebase-Storage-Version"]="webjs/"+(eo??"AppManager"),null!==er&&(eh["X-Firebase-AppCheck"]=er),new NetworkRequest(ed,$.method,eh,$.body,$.successCodes,$.additionalRetryCodes,$.handler,$.errorHandler,$.timeout,$.progressCallback,ei,es,el)}($,this._appId,en,er,et,this._firebaseVersion,ei,this._isUsingEmulator);return this._requests.add(eo),eo.getPromise().then(()=>this._requests.delete(eo),()=>this._requests.delete(eo)),eo}}async makeRequestWithTokens($,et){let[en,er]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest($,et,en,er).getPromise()}};let ex="@firebase/storage",e_="0.14.0",ew="storage";function uploadBytes($,et,en){return function($,et,en){$._throwIfRoot("uploadBytes");let er=multipartUpload($.storage,$._location,getMappings(),new FbsBlob(et,!0),en);return $.storage.makeRequestWithTokens(er,newTextConnection).then(et=>({metadata:et,ref:$}))}($=(0,eu.m9)($),et,en)}function uploadBytesResumable($,et,en){var er;return(er=$=(0,eu.m9)($))._throwIfRoot("uploadBytesResumable"),new UploadTask(er,new FbsBlob(et),en)}function listAll($){return function($){let et={prefixes:[],items:[]};return listAllHelper($,et).then(()=>et)}($=(0,eu.m9)($))}function getDownloadURL($){return function($){$._throwIfRoot("getDownloadURL");let et=function($,et,en){let er=et.fullServerUrl(),ei=makeUrl(er,$.host,$._protocol),eo=$.maxOperationRetryTime,es=new RequestInfo(ei,"GET",function(et,er){let ei=fromResourceString($,er,en);return handlerCheck(null!==ei),function($,et,en,er){let ei=jsonObjectOrNull(et);if(null===ei||!isString(ei.downloadTokens))return null;let eo=ei.downloadTokens;if(0===eo.length)return null;let es=encodeURIComponent,el=eo.split(","),eu=el.map(et=>{let ei=$.bucket,eo=$.fullPath,el="/b/"+es(ei)+"/o/"+es(eo),eu=makeUrl(el,en,er),ed=makeQueryString({alt:"media",token:et});return eu+ed});return eu[0]}(ei,er,$.host,$._protocol)},eo);return es.errorHandler=objectErrorHandler(et),es}($.storage,$._location,getMappings());return $.storage.makeRequestWithTokens(et,newTextConnection).then($=>{if(null===$)throw new StorageError(eo.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return $})}($=(0,eu.m9)($))}function deleteObject($){return function($){$._throwIfRoot("deleteObject");let et=function($,et){let en=et.fullServerUrl(),er=makeUrl(en,$.host,$._protocol),ei=$.maxOperationRetryTime,eo=new RequestInfo(er,"DELETE",function($,et){},ei);return eo.successCodes=[200,204],eo.errorHandler=objectErrorHandler(et),eo}($.storage,$._location);return $.storage.makeRequestWithTokens(et,newTextConnection)}($=(0,eu.m9)($))}function ref($,et){return function($,et){if(!(et&&/^[A-Za-z]+:\/\//.test(et)))return function refFromPath($,et){if($ instanceof FirebaseStorageImpl){if(null==$._bucket)throw new StorageError(eo.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+ep+"' property when initializing the app?");let en=new Reference($,$._bucket);return null!=et?refFromPath(en,et):en}return void 0!==et?function($,et){let en=function($,et){let en=et.split("/").filter($=>$.length>0).join("/");return 0===$.length?en:$+"/"+en}($._location.path,et),er=new Location($._location.bucket,en);return new Reference($.storage,er)}($,et):$}($,et);if($ instanceof FirebaseStorageImpl)return new Reference($,et);throw invalidArgument("To use ref(service, url), the first argument must be a Storage instance.")}($=(0,eu.m9)($),et)}function getStorage($=(0,el.Mq)(),et){$=(0,eu.m9)($);let en=(0,el.qX)($,ew),er=en.getImmediate({identifier:et}),ei=(0,eu.P0)("storage");return ei&&function($,et,en,er={}){!function($,et,en,er={}){$.host=`${et}:${en}`;let ei=(0,eu.Xx)(et);ei&&((0,eu.Uo)(`https://${$.host}/b`),(0,eu.dp)("Storage",!0)),$._isUsingEmulator=!0,$._protocol=ei?"https":"http";let{mockUserToken:eo}=er;eo&&($._overrideAuthToken="string"==typeof eo?eo:(0,eu.Sg)(eo,$.app.options.projectId))}($,et,en,er)}(er,...ei),er}(0,el.Xd)(new ed.wA(ew,function($,{instanceIdentifier:et}){let en=$.getProvider("app").getImmediate(),er=$.getProvider("auth-internal"),ei=$.getProvider("app-check-internal");return new FirebaseStorageImpl(en,er,ei,et,el.Jn)},"PUBLIC").setMultipleInstances(!0)),(0,el.KN)(ex,e_,""),(0,el.KN)(ex,e_,"esm2020")},25935:function($,et,en){"use strict";var er=en(30488);er.domToReact,er.htmlToDOM,er.attributesToProps,er.Comment,er.Element,er.ProcessingInstruction,er.Text,et.ZP=er},26531:function($,et,en){"use strict";var er;let ei,eo;en.d(et,{X3:function(){return openDB}});let instanceOfAny=($,et)=>et.some(et=>$ instanceof et),es=new WeakMap,el=new WeakMap,eu=new WeakMap,ed=new WeakMap,eh=new WeakMap,ep={get($,et,en){if
3715($ instanceof IDBTransaction){if("done"===et)return el.get($);if("objectStoreNames"===et)return $.objectStoreNames||eu.get($);if("store"===et)return en.objectStoreNames[1]?void 0:en.objectStore(en.objectStoreNames[0])}return wrap_idb_value_wrap($[et])},set:($,et,en)=>($[et]=en,!0),has:($,et)=>$ instanceof IDBTransaction&&("done"===et||"store"===et)||et in $};function wrap_idb_value_wrap($){var et;if($ instanceof IDBRequest)return function($){let et=new Promise((et,en)=>{let unlisten=()=>{$.removeEventListener("success",success),$.removeEventListener("error",error)},success=()=>{et(wrap_idb_value_wrap($.result)),unlisten()},error=()=>{en($.error),unlisten()};$.addEventListener("success",success),$.addEventListener("error",error)});return et.then(et=>{et instanceof IDBCursor&&es.set(et,$)}).catch(()=>{}),eh.set(et,$),et}($);if(ed.has($))return ed.get($);let en="function"==typeof(et=$)?et!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(eo||(eo=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(et)?function(...$){return et.apply(unwrap(this),$),wrap_idb_value_wrap(es.get(this))}:function(...$){return wrap_idb_value_wrap(et.apply(unwrap(this),$))}:function($,...en){let er=et.call(unwrap(this),$,...en);return eu.set(er,$.sort?$.sort():[$]),wrap_idb_value_wrap(er)}:(et instanceof IDBTransaction&&function($){if(el.has($))return;let et=new Promise((et,en)=>{let unlisten=()=>{$.removeEventListener("complete",complete),$.removeEventListener("error",error),$.removeEventListener("abort",error)},complete=()=>{et(),unlisten()},error=()=>{en($.error||new DOMException("AbortError","AbortError")),unlisten()};$.addEventListener("complete",complete),$.addEventListener("error",error),$.addEventListener("abort",error)});el.set($,et)}(et),instanceOfAny(et,ei||(ei=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(et,ep):et;return en!==$&&(ed.set($,en),eh.set(en,$)),en}let unwrap=$=>eh.get($);function openDB($,et,{blocked:en,upgrade:er,blocking:ei,terminated:eo}={}){let es=indexedDB.open($,et),el=wrap_idb_value_wrap(es);return er&&es.addEventListener("upgradeneeded",$=>{er(wrap_idb_value_wrap(es.result),$.oldVersion,$.newVersion,wrap_idb_value_wrap(es.transaction),$)}),en&&es.addEventListener("blocked",$=>en($.oldVersion,$.newVersion,$)),el.then($=>{eo&&$.addEventListener("close",()=>eo()),ei&&$.addEventListener("versionchange",$=>ei($.oldVersion,$.newVersion,$))}).catch(()=>{}),el}let em=["get","getKey","getAll","getAllKeys","count"],ef=["put","add","delete","clear"],eg=new Map;function getMethod($,et){if(!($ instanceof IDBDatabase&&!(et in $)&&"string"==typeof et))return;if(eg.get(et))return eg.get(et);let en=et.replace(/FromIndex$/,""),er=et!==en,ei=ef.includes(en);if(!(en in(er?IDBIndex:IDBObjectStore).prototype)||!(ei||em.includes(en)))return;let method=async function($,...et){let eo=this.transaction($,ei?"readwrite":"readonly"),es=eo.store;return er&&(es=es.index(et.shift())),(await Promise.all([es[en](...et),ei&&eo.done]))[0]};return eg.set(et,method),method}ep={...er=ep,get:($,et,en)=>getMethod($,et)||er.get($,et,en),has:($,et)=>!!getMethod($,et)||er.has($,et)}},14349:function($,et,en){"use strict";en.d(et,{R:function(){return MDXRemote}});var er={};en.r(er),en.d(er,{MDXProvider:function(){return MDXProvider},useMDXComponents:function(){return useMDXComponents}}),"undefined"!=typeof window&&(window.requestIdleCallback=window.requestIdleCallback||function($){var et=Date.now();return setTimeout(function(){$({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-et))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function($){clearTimeout($)});var ei=en(67294),eo=en(32746);let es={},el=ei.createContext(es);function useMDXComponents($){let et=ei.useContext(el);return ei.useMemo(function(){return"function"==typeof $?$(et):{...et,...$}},[et,$])}function MDXProvider($){let et;return et=$.disableParentContext?"function"==typeof $.components?$.components(es):$.components||es:useMDXComponents($.components),ei.createElement(el.Provider,{value:et},$.children)}function MDXRemote({compiledSource:$,frontmatter:et,scope:en,components:es={},lazy:el}){let[eu,ed]=(0,ei.useState)(!el||"undefined"==typeof window);(0,ei.useEffect)(()=>
3715{if(el){let $=window.requestIdleCallback(()=>{ed(!0)});return()=>window.cancelIdleCallback($)}},[]);let eh=(0,ei.useMemo)(()=>{let ei=Object.assign({opts:{...er,...eo.jsxRuntime}},{frontmatter:et},en),es=Object.keys(ei),el=Object.values(ei),eu=Reflect.construct(Function,es.concat(`${$}`));return eu.apply(eu,el).default},[en,$]);if(!eu)return ei.createElement("div",{dangerouslySetInnerHTML:{__html:""},suppressHydrationWarning:!0});let ep=ei.createElement(MDXProvider,{components:es},ei.createElement(eh,null));return el?ei.createElement("div",null,ep):ep}},42708:function($,et,en){"use strict";en.d(et,{YD:function(){return useInView},df:function(){return ed}});var er=en(67294),ei=Object.defineProperty,__defNormalProp=($,et,en)=>et in $?ei($,et,{enumerable:!0,configurable:!0,writable:!0,value:en}):$[et]=en,__publicField=($,et,en)=>(__defNormalProp($,"symbol"!=typeof et?et+"":et,en),en),eo=new Map,es=new WeakMap,el=0,eu=void 0;function observe($,et,en={},er=eu){if(void 0===window.IntersectionObserver&&void 0!==er){let ei=$.getBoundingClientRect();return et(er,{isIntersecting:er,target:$,intersectionRatio:"number"==typeof en.threshold?en.threshold:0,time:0,boundingClientRect:ei,intersectionRect:ei,rootBounds:ei}),()=>{}}let{id:ei,observer:ed,elements:eh}=function($){let et=Object.keys($).sort().filter(et=>void 0!==$[et]).map(et=>{var en;return`${et}_${"root"===et?(en=$.root)?(es.has(en)||(el+=1,es.set(en,el.toString())),es.get(en)):"0":$[et]}`}).toString(),en=eo.get(et);if(!en){let er;let ei=new Map,es=new IntersectionObserver(et=>{et.forEach(et=>{var en;let eo=et.isIntersecting&&er.some($=>et.intersectionRatio>=$);$.trackVisibility&&void 0===et.isVisible&&(et.isVisible=eo),null==(en=ei.get(et.target))||en.forEach($=>{$(eo,et)})})},$);er=es.thresholds||(Array.isArray($.threshold)?$.threshold:[$.threshold||0]),en={id:et,observer:es,elements:ei},eo.set(et,en)}return en}(en),ep=eh.get($)||[];return eh.has($)||eh.set($,ep),ep.push(et),ed.observe($),function(){ep.splice(ep.indexOf(et),1),0===ep.length&&(eh.delete($),ed.unobserve($)),0===eh.size&&(ed.disconnect(),eo.delete(ei))}}var ed=class extends er.Component{constructor($){super($),__publicField(this,"node",null),__publicField(this,"_unobserveCb",null),__publicField(this,"handleNode",$=>{!this.node||(this.unobserve(),$||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=$||null,this.observeNode()}),__publicField(this,"handleChange",($,et)=>{$&&this.props.triggerOnce&&this.unobserve(),"function"!=typeof this.props.children||this.setState({inView:$,entry:et}),this.props.onChange&&this.props.onChange($,et)}),this.state={inView:!!$.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate($){($.rootMargin!==this.props.rootMargin||$.root!==this.props.root||$.threshold!==this.props.threshold||$.skip!==this.props.skip||$.trackVisibility!==this.props.trackVisibility||$.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;let{threshold:$,root:et,rootMargin:en,trackVisibility:er,delay:ei,fallbackInView:eo}=this.props;this._unobserveCb=observe(this.node,this.handleChange,{threshold:$,root:et,rootMargin:en,trackVisibility:er,delay:ei},eo)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){let{children:$}=this.props;if("function"==typeof $){let{inView:et,entry:en}=this.state;return $({inView:et,entry:en,ref:this.handleNode})}let{as:et,triggerOnce:en,threshold:ei,root:eo,rootMargin:es,onChange:el,skip:eu,trackVisibility:ed,delay:eh,initialInView:ep,fallbackInView:em,...ef}=this.props;return er.createElement(et||"div",{ref:this.handleNode,...ef},$)}};function useInView({threshold:$,delay:et,trackVisibility:en,rootMargin:ei,root:eo,triggerOnce:es,skip:el,initialInView:eu,fallbackInView:ed,onChange:eh}={}){var ep;let[em,ef]=er.useState(null),eg=er.useRef(),[ey,ev]=er.useState({inView:!!eu,entry:void 0});eg.current=eh,er.useEffect(()=>{let er;if(!el&&em)return er=observe(em,($,et)=>{ev({inView:$,entry:et}),eg.current&&eg.current($,et),et.isIntersecting&&es&&er&&(er(),er=void 0)},{root:eo,rootMargin:ei,threshold:$,trackVisibility:en,delay:et},ed),()=>{er&&er()}},[Array.isArray($)?$.toString():$,em,eo,ei,es,el,en,ed,et]);let ex=null==(ep=ey.entry)?void 0:ep.target,e_=er.useRef();em||!ex||es||el||e_.current===ex||(e_.current=ex,ev({inView:!!eu,entry:void 0}));let ew=[ef,ey.inView,ey.entry];return ew.ref=ew[0],ew.inView=ew[1],ew.entry=ew[2],ew}},84849:function($,et,en){"use strict";en.d(et,{Z:function(){return Skeleton}});var er=en(67294);let ei=er.createContext({});function Skeleton({count:$=1,wrapper:et,className:en,containerClassName:eo,containerTestId:es,circle:el=!1,style:eu,...ed}){var eh,ep,em;let ef=er.useContext(ei),eg={...ed};for(let[$,et]of Object.entries(ed))void 0===et&&delete eg[$];let ey={...ef,...eg,circle:el},ev={...eu,...function({baseColor:$,highlightColor:et,width:en,height:er,borderRadius:ei,circle:eo,direction:es,duration:el,enableAnimation:eu=!0}){let ed={};return"rtl"===es&&(ed["--animation-direction"]="reverse"),"number"==typeof el&&(ed["--animation-duration"]=`${el}s`),eu||(ed["--pseudo-element-display"]="none"),("string"==typeof en||"number"==typeof en)&&(ed.width=en),("string"==typeof er||"number"==typeof er)&&(ed.height=er),("string"==typeof ei||"number"==typeof ei)&&(ed.borderRadius=ei),eo&&(ed.borderRadius="50%"),void 0!==$&&(ed["--base-color"]=$),void 0!==et&&(ed["--highlight-color"]=et),ed}(ey)},ex="react-loading-skeleton";en&&(ex+=` ${en}`);let e_=null!==(eh=ey.inline)&&void 0!==eh&&eh,ew=[],ek=Math.ceil($);for(let et=0;et<ek;et++){let en=ev;if(ek>$&&et===ek-1){let et=null!==(ep=en.width)&&void 0!==ep?ep:"100%",er=$%1,ei="number"==typeof et?et*er:`calc(${et} * ${er})`;en={...en,width:ei}}let ei=er.createElement("span",{className:ex,style:en,key:et},"â");e_?ew.push(ei):ew.push(er.createElement(er.Fragment,{key:et},ei,er.createElement("br",null)))}return er.createElement("span",{className:eo,"data-testid":es,"aria-live":"polite","aria-busy":null===(em=ey.enableAnimation)||void 0===em||em},et?ew.map(($,en)=>er.createElement(et,{key:en},$)):ew)}},59602:function($){"use strict";
3715$.exports=JSON.parse('{"z":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},function($){var __webpack_exec__=function(et){return $($.s=et)};$.O(0,[9774,179],function(){return __webpack_exec__(6840),__webpack_exec__(59974)}),_N_E=$.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.