@rainte/js 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1064 -1008
- package/dist/index.umd.cjs +7 -7
- package/package.json +17 -14
- package/.prettierrc.json +0 -8
- package/dist/types/lib/index.d.ts +0 -8
- package/dist/types/src/date/index.d.ts +0 -11
- package/dist/types/src/db/index.d.ts +0 -13
- package/dist/types/src/fast/index.d.ts +0 -8
- package/dist/types/src/file/index.d.ts +0 -3
- package/dist/types/src/hash/index.d.ts +0 -1
- package/dist/types/src/http/axios.d.ts +0 -6
- package/dist/types/src/http/index.d.ts +0 -6
- package/dist/types/src/json/index.d.ts +0 -3
- package/dist/types/src/main.d.ts +0 -1
- package/dist/types/src/storage/index.d.ts +0 -16
- package/dist/types/vite.config.d.ts +0 -2
- package/index.html +0 -13
- package/lib/index.ts +0 -8
- package/public/vite.svg +0 -1
- package/src/date/index.ts +0 -19
- package/src/db/index.ts +0 -36
- package/src/fast/index.ts +0 -27
- package/src/file/index.ts +0 -25
- package/src/hash/index.ts +0 -24
- package/src/http/axios.ts +0 -66
- package/src/http/index.ts +0 -21
- package/src/json/index.ts +0 -14
- package/src/main.ts +0 -21
- package/src/storage/index.ts +0 -28
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -26
- package/vite.config.ts +0 -12
package/dist/index.umd.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(Ce,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(Ce=typeof globalThis<"u"?globalThis:Ce||self,ze(Ce["@rainte/js"]={}))})(this,function(Ce){"use strict";var bu=Object.defineProperty;var wu=(Ce,ze,Ze)=>ze in Ce?bu(Ce,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ce[ze]=Ze;var Ko=(Ce,ze,Ze)=>wu(Ce,typeof ze!="symbol"?ze+"":ze,Ze);var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var un={exports:{}},Lo=un.exports,ri;function Uo(){return ri||(ri=1,function(r,o){(function(u,a){r.exports=a()})(Lo,function(){var u=1e3,a=6e4,l=36e5,d="millisecond",h="second",x="minute",P="hour",C="day",$="week",M="month",ae="quarter",ue="year",N="date",j="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,re={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var H=["th","st","nd","rd"],I=Q%100;return"["+Q+(H[(I-20)%10]||H[I]||H[0])+"]"}},G=function(Q,H,I){var ee=String(Q);return!ee||ee.length>=H?Q:""+Array(H+1-ee.length).join(I)+Q},_e={s:G,z:function(Q){var H=-Q.utcOffset(),I=Math.abs(H),ee=Math.floor(I/60),L=I%60;return(H<=0?"+":"-")+G(ee,2,"0")+":"+G(L,2,"0")},m:function Q(H,I){if(H.date()<I.date())return-Q(I,H);var ee=12*(I.year()-H.year())+(I.month()-H.month()),L=H.clone().add(ee,M),oe=I-L<0,se=H.clone().add(ee+(oe?-1:1),M);return+(-(ee+(I-L)/(oe?L-se:se-L))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M,y:ue,w:$,d:C,D:N,h:P,m:x,s:h,ms:d,Q:ae}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},fe="en",te={};te[fe]=re;var U="$isDayjsObject",K=function(Q){return Q instanceof be||!(!Q||!Q[U])},ce=function Q(H,I,ee){var L;if(!H)return fe;if(typeof H=="string"){var oe=H.toLowerCase();te[oe]&&(L=oe),I&&(te[oe]=I,L=oe);var se=H.split("-");if(!L&&se.length>1)return Q(se[0])}else{var de=H.name;te[de]=H,L=de}return!ee&&L&&(fe=L),L||!ee&&fe},le=function(Q,H){if(K(Q))return Q.clone();var I=typeof H=="object"?H:{};return I.date=Q,I.args=arguments,new be(I)},ne=_e;ne.l=ce,ne.i=K,ne.w=function(Q,H){return le(Q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var be=function(){function Q(I){this.$L=ce(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[U]=!0}var H=Q.prototype;return H.parse=function(I){this.$d=function(ee){var L=ee.date,oe=ee.utc;if(L===null)return new Date(NaN);if(ne.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var se=L.match(E);if(se){var de=se[2]-1||0,Ee=(se[7]||"0").substring(0,3);return oe?new Date(Date.UTC(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)):new Date(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)}}return new Date(L)}(I),this.init()},H.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},H.$utils=function(){return ne},H.isValid=function(){return this.$d.toString()!==j},H.isSame=function(I,ee){var L=le(I);return this.startOf(ee)<=L&&L<=this.endOf(ee)},H.isAfter=function(I,ee){return le(I)<this.startOf(ee)},H.isBefore=function(I,ee){return this.endOf(ee)<le(I)},H.$g=function(I,ee,L){return ne.u(I)?this[ee]:this.set(L,I)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(I,ee){var L=this,oe=!!ne.u(ee)||ee,se=ne.p(I),de=function(Z,$e){var Fe=ne.w(L.$u?Date.UTC(L.$y,$e,Z):new Date(L.$y,$e,Z),L);return oe?Fe:Fe.endOf(C)},Ee=function(Z,$e){return ne.w(L.toDate()[Z].apply(L.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice($e)),L)},Oe=this.$W,Ae=this.$M,je=this.$D,Le="set"+(this.$u?"UTC":"");switch(se){case ue:return oe?de(1,0):de(31,11);case M:return oe?de(1,Ae):de(0,Ae+1);case $:var We=this.$locale().weekStart||0,ot=(Oe<We?Oe+7:Oe)-We;return de(oe?je-ot:je+(6-ot),Ae);case C:case N:return Ee(Le+"Hours",0);case P:return Ee(Le+"Minutes",1);case x:return Ee(Le+"Seconds",2);case h:return Ee(Le+"Milliseconds",3);default:return this.clone()}},H.endOf=function(I){return this.startOf(I,!1)},H.$set=function(I,ee){var L,oe=ne.p(I),se="set"+(this.$u?"UTC":""),de=(L={},L[C]=se+"Date",L[N]=se+"Date",L[M]=se+"Month",L[ue]=se+"FullYear",L[P]=se+"Hours",L[x]=se+"Minutes",L[h]=se+"Seconds",L[d]=se+"Milliseconds",L)[oe],Ee=oe===C?this.$D+(ee-this.$W):ee;if(oe===M||oe===ue){var Oe=this.clone().set(N,1);Oe.$d[de](Ee),Oe.init(),this.$d=Oe.set(N,Math.min(this.$D,Oe.daysInMonth())).$d}else de&&this.$d[de](Ee);return this.init(),this},H.set=function(I,ee){return this.clone().$set(I,ee)},H.get=function(I){return this[ne.p(I)]()},H.add=function(I,ee){var L,oe=this;I=Number(I);var se=ne.p(ee),de=function(Ae){var je=le(oe);return ne.w(je.date(je.date()+Math.round(Ae*I)),oe)};if(se===M)return this.set(M,this.$M+I);if(se===ue)return this.set(ue,this.$y+I);if(se===C)return de(1);if(se===$)return de(7);var Ee=(L={},L[x]=a,L[P]=l,L[h]=u,L)[se]||1,Oe=this.$d.getTime()+I*Ee;return ne.w(Oe,this)},H.subtract=function(I,ee){return this.add(-1*I,ee)},H.format=function(I){var ee=this,L=this.$locale();if(!this.isValid())return L.invalidDate||j;var oe=I||"YYYY-MM-DDTHH:mm:ssZ",se=ne.z(this),de=this.$H,Ee=this.$m,Oe=this.$M,Ae=L.weekdays,je=L.months,Le=L.meridiem,We=function($e,Fe,ye,He){return $e&&($e[Fe]||$e(ee,oe))||ye[Fe].slice(0,He)},ot=function($e){return ne.s(de%12||12,$e,"0")},Z=Le||function($e,Fe,ye){var He=$e<12?"AM":"PM";return ye?He.toLowerCase():He};return oe.replace(J,function($e,Fe){return Fe||function(ye){switch(ye){case"YY":return String(ee.$y).slice(-2);case"YYYY":return ne.s(ee.$y,4,"0");case"M":return Oe+1;case"MM":return ne.s(Oe+1,2,"0");case"MMM":return We(L.monthsShort,Oe,je,3);case"MMMM":return We(je,Oe);case"D":return ee.$D;case"DD":return ne.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return We(L.weekdaysMin,ee.$W,Ae,2);case"ddd":return We(L.weekdaysShort,ee.$W,Ae,3);case"dddd":return Ae[ee.$W];case"H":return String(de);case"HH":return ne.s(de,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return Z(de,Ee,!0);case"A":return Z(de,Ee,!1);case"m":return String(Ee);case"mm":return ne.s(Ee,2,"0");case"s":return String(ee.$s);case"ss":return ne.s(ee.$s,2,"0");case"SSS":return ne.s(ee.$ms,3,"0");case"Z":return se}return null}($e)||se.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(I,ee,L){var oe,se=this,de=ne.p(ee),Ee=le(I),Oe=(Ee.utcOffset()-this.utcOffset())*a,Ae=this-Ee,je=function(){return ne.m(se,Ee)};switch(de){case ue:oe=je()/12;break;case M:oe=je();break;case ae:oe=je()/3;break;case $:oe=(Ae-Oe)/6048e5;break;case C:oe=(Ae-Oe)/864e5;break;case P:oe=Ae/l;break;case x:oe=Ae/a;break;case h:oe=Ae/u;break;default:oe=Ae}return L?oe:ne.a(oe)},H.daysInMonth=function(){return this.endOf(M).$D},H.$locale=function(){return te[this.$L]},H.locale=function(I,ee){if(!I)return this.$L;var L=this.clone(),oe=ce(I,ee,!0);return oe&&(L.$L=oe),L},H.clone=function(){return ne.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},Q}(),we=be.prototype;return le.prototype=we,[["$ms",d],["$s",h],["$m",x],["$H",P],["$W",C],["$M",M],["$y",ue],["$D",N]].forEach(function(Q){we[Q[1]]=function(H){return this.$g(H,Q[0],Q[1])}}),le.extend=function(Q,H){return Q.$i||(Q(H,be,le),Q.$i=!0),le},le.locale=ce,le.isDayjs=K,le.unix=function(Q){return le(1e3*Q)},le.en=te[fe],le.Ls=te,le.p={},le})}(un)),un.exports}var Yo=Uo();const cn=Ze(Yo);var ln={exports:{}},Ho=ln.exports,ii;function zo(){return ii||(ii=1,function(r,o){(function(u,a){r.exports=a()})(Ho,function(){var u={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d/,d=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,P={},C=function(E){return(E=+E)+(E>68?1900:2e3)},$=function(E){return function(J){this[E]=+J}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(E){(this.zone||(this.zone={})).offset=function(J){if(!J||J==="Z")return 0;var re=J.match(/([+-]|\d\d)/g),G=60*re[1]+(+re[2]||0);return G===0?0:re[0]==="+"?-G:G}(E)}],ae=function(E){var J=P[E];return J&&(J.indexOf?J:J.s.concat(J.f))},ue=function(E,J){var re,G=P.meridiem;if(G){for(var _e=1;_e<=24;_e+=1)if(E.indexOf(G(_e,0,J))>-1){re=_e>12;break}}else re=E===(J?"pm":"PM");return re},N={A:[x,function(E){this.afternoon=ue(E,!1)}],a:[x,function(E){this.afternoon=ue(E,!0)}],Q:[l,function(E){this.month=3*(E-1)+1}],S:[l,function(E){this.milliseconds=100*+E}],SS:[d,function(E){this.milliseconds=10*+E}],SSS:[/\d{3}/,function(E){this.milliseconds=+E}],s:[h,$("seconds")],ss:[h,$("seconds")],m:[h,$("minutes")],mm:[h,$("minutes")],H:[h,$("hours")],h:[h,$("hours")],HH:[h,$("hours")],hh:[h,$("hours")],D:[h,$("day")],DD:[d,$("day")],Do:[x,function(E){var J=P.ordinal,re=E.match(/\d+/);if(this.day=re[0],J)for(var G=1;G<=31;G+=1)J(G).replace(/\[|\]/g,"")===E&&(this.day=G)}],w:[h,$("week")],ww:[d,$("week")],M:[h,$("month")],MM:[d,$("month")],MMM:[x,function(E){var J=ae("months"),re=(ae("monthsShort")||J.map(function(G){return G.slice(0,3)})).indexOf(E)+1;if(re<1)throw new Error;this.month=re%12||re}],MMMM:[x,function(E){var J=ae("months").indexOf(E)+1;if(J<1)throw new Error;this.month=J%12||J}],Y:[/[+-]?\d+/,$("year")],YY:[d,function(E){this.year=C(E)}],YYYY:[/\d{4}/,$("year")],Z:M,ZZ:M};function j(E){var J,re;J=E,re=P&&P.formats;for(var G=(E=J.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(le,ne,be){var we=be&&be.toUpperCase();return ne||re[be]||u[be]||re[we].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Q,H,I){return H||I.slice(1)})})).match(a),_e=G.length,fe=0;fe<_e;fe+=1){var te=G[fe],U=N[te],K=U&&U[0],ce=U&&U[1];G[fe]=ce?{regex:K,parser:ce}:te.replace(/^\[|\]$/g,"")}return function(le){for(var ne={},be=0,we=0;be<_e;be+=1){var Q=G[be];if(typeof Q=="string")we+=Q.length;else{var H=Q.regex,I=Q.parser,ee=le.slice(we),L=H.exec(ee)[0];I.call(ne,L),le=le.replace(L,"")}}return function(oe){var se=oe.afternoon;if(se!==void 0){var de=oe.hours;se?de<12&&(oe.hours+=12):de===12&&(oe.hours=0),delete oe.afternoon}}(ne),ne}}return function(E,J,re){re.p.customParseFormat=!0,E&&E.parseTwoDigitYear&&(C=E.parseTwoDigitYear);var G=J.prototype,_e=G.parse;G.parse=function(fe){var te=fe.date,U=fe.utc,K=fe.args;this.$u=U;var ce=K[1];if(typeof ce=="string"){var le=K[2]===!0,ne=K[3]===!0,be=le||ne,we=K[2];ne&&(we=K[2]),P=this.$locale(),!le&&we&&(P=re.Ls[we]),this.$d=function(ee,L,oe,se){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*ee);var de=j(L)(ee),Ee=de.year,Oe=de.month,Ae=de.day,je=de.hours,Le=de.minutes,We=de.seconds,ot=de.milliseconds,Z=de.zone,$e=de.week,Fe=new Date,ye=Ae||(Ee||Oe?1:Fe.getDate()),He=Ee||Fe.getFullYear(),Pt=0;Ee&&!Oe||(Pt=Oe>0?Oe-1:Fe.getMonth());var Xe,Yt=je||0,Ht=Le||0,zt=We||0,Vt=ot||0;return Z?new Date(Date.UTC(He,Pt,ye,Yt,Ht,zt,Vt+60*Z.offset*1e3)):oe?new Date(Date.UTC(He,Pt,ye,Yt,Ht,zt,Vt)):(Xe=new Date(He,Pt,ye,Yt,Ht,zt,Vt),$e&&(Xe=se(Xe).week($e).toDate()),Xe)}catch{return new Date("")}}(te,ce,U,re),this.init(),we&&we!==!0&&(this.$L=this.locale(we).$L),be&&te!=this.format(ce)&&(this.$d=new Date("")),P={}}else if(ce instanceof Array)for(var Q=ce.length,H=1;H<=Q;H+=1){K[1]=ce[H-1];var I=re.apply(this,K);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}H===Q&&(this.$d=new Date(""))}else _e.call(this,fe)}}})}(ln)),ln.exports}var Vo=zo();const Wo=Ze(Vo);var fn={exports:{}},Jo=fn.exports,oi;function Go(){return oi||(oi=1,function(r,o){(function(u,a){r.exports=a()})(Jo,function(){var u,a,l=1e3,d=6e4,h=36e5,x=864e5,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,$=2628e6,M=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ae={years:C,months:$,days:x,hours:h,minutes:d,seconds:l,milliseconds:1,weeks:6048e5},ue=function(te){return te instanceof _e},N=function(te,U,K){return new _e(te,K,U.$l)},j=function(te){return a.p(te)+"s"},E=function(te){return te<0},J=function(te){return E(te)?Math.ceil(te):Math.floor(te)},re=function(te){return Math.abs(te)},G=function(te,U){return te?E(te)?{negative:!0,format:""+re(te)+U}:{negative:!1,format:""+te+U}:{negative:!1,format:""}},_e=function(){function te(K,ce,le){var ne=this;if(this.$d={},this.$l=le,K===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ce)return N(K*ae[j(ce)],this);if(typeof K=="number")return this.$ms=K,this.parseFromMilliseconds(),this;if(typeof K=="object")return Object.keys(K).forEach(function(Q){ne.$d[j(Q)]=K[Q]}),this.calMilliseconds(),this;if(typeof K=="string"){var be=K.match(M);if(be){var we=be.slice(2).map(function(Q){return Q!=null?Number(Q):0});return this.$d.years=we[0],this.$d.months=we[1],this.$d.weeks=we[2],this.$d.days=we[3],this.$d.hours=we[4],this.$d.minutes=we[5],this.$d.seconds=we[6],this.calMilliseconds(),this}}return this}var U=te.prototype;return U.calMilliseconds=function(){var K=this;this.$ms=Object.keys(this.$d).reduce(function(ce,le){return ce+(K.$d[le]||0)*ae[le]},0)},U.parseFromMilliseconds=function(){var K=this.$ms;this.$d.years=J(K/C),K%=C,this.$d.months=J(K/$),K%=$,this.$d.days=J(K/x),K%=x,this.$d.hours=J(K/h),K%=h,this.$d.minutes=J(K/d),K%=d,this.$d.seconds=J(K/l),K%=l,this.$d.milliseconds=K},U.toISOString=function(){var K=G(this.$d.years,"Y"),ce=G(this.$d.months,"M"),le=+this.$d.days||0;this.$d.weeks&&(le+=7*this.$d.weeks);var ne=G(le,"D"),be=G(this.$d.hours,"H"),we=G(this.$d.minutes,"M"),Q=this.$d.seconds||0;this.$d.milliseconds&&(Q+=this.$d.milliseconds/1e3,Q=Math.round(1e3*Q)/1e3);var H=G(Q,"S"),I=K.negative||ce.negative||ne.negative||be.negative||we.negative||H.negative,ee=be.format||we.format||H.format?"T":"",L=(I?"-":"")+"P"+K.format+ce.format+ne.format+ee+be.format+we.format+H.format;return L==="P"||L==="-P"?"P0D":L},U.toJSON=function(){return this.toISOString()},U.format=function(K){var ce=K||"YYYY-MM-DDTHH:mm:ss",le={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return ce.replace(P,function(ne,be){return be||String(le[ne])})},U.as=function(K){return this.$ms/ae[j(K)]},U.get=function(K){var ce=this.$ms,le=j(K);return le==="milliseconds"?ce%=1e3:ce=le==="weeks"?J(ce/ae[le]):this.$d[le],ce||0},U.add=function(K,ce,le){var ne;return ne=ce?K*ae[j(ce)]:ue(K)?K.$ms:N(K,this).$ms,N(this.$ms+ne*(le?-1:1),this)},U.subtract=function(K,ce){return this.add(K,ce,!0)},U.locale=function(K){var ce=this.clone();return ce.$l=K,ce},U.clone=function(){return N(this.$ms,this)},U.humanize=function(K){return u().add(this.$ms,"ms").locale(this.$l).fromNow(!K)},U.valueOf=function(){return this.asMilliseconds()},U.milliseconds=function(){return this.get("milliseconds")},U.asMilliseconds=function(){return this.as("milliseconds")},U.seconds=function(){return this.get("seconds")},U.asSeconds=function(){return this.as("seconds")},U.minutes=function(){return this.get("minutes")},U.asMinutes=function(){return this.as("minutes")},U.hours=function(){return this.get("hours")},U.asHours=function(){return this.as("hours")},U.days=function(){return this.get("days")},U.asDays=function(){return this.as("days")},U.weeks=function(){return this.get("weeks")},U.asWeeks=function(){return this.as("weeks")},U.months=function(){return this.get("months")},U.asMonths=function(){return this.as("months")},U.years=function(){return this.get("years")},U.asYears=function(){return this.as("years")},te}(),fe=function(te,U,K){return te.add(U.years()*K,"y").add(U.months()*K,"M").add(U.days()*K,"d").add(U.hours()*K,"h").add(U.minutes()*K,"m").add(U.seconds()*K,"s").add(U.milliseconds()*K,"ms")};return function(te,U,K){u=K,a=K().$utils(),K.duration=function(ne,be){var we=K.locale();return N(ne,{$l:we},be)},K.isDuration=ue;var ce=U.prototype.add,le=U.prototype.subtract;U.prototype.add=function(ne,be){return ue(ne)?fe(this,ne,1):ce.bind(this)(ne,be)},U.prototype.subtract=function(ne,be){return ue(ne)?fe(this,ne,-1):le.bind(this)(ne,be)}}})}(fn)),fn.exports}var Xo=Go();const Qo=Ze(Xo);var dn={exports:{}},Zo=dn.exports,si;function es(){return si||(si=1,function(r,o){(function(u,a){r.exports=a()})(Zo,function(){var u="minute",a=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(d,h,x){var P=h.prototype;x.utc=function(j){var E={date:j,utc:!0,args:arguments};return new h(E)},P.utc=function(j){var E=x(this.toDate(),{locale:this.$L,utc:!0});return j?E.add(this.utcOffset(),u):E},P.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var C=P.parse;P.parse=function(j){j.utc&&(this.$u=!0),this.$utils().u(j.$offset)||(this.$offset=j.$offset),C.call(this,j)};var $=P.init;P.init=function(){if(this.$u){var j=this.$d;this.$y=j.getUTCFullYear(),this.$M=j.getUTCMonth(),this.$D=j.getUTCDate(),this.$W=j.getUTCDay(),this.$H=j.getUTCHours(),this.$m=j.getUTCMinutes(),this.$s=j.getUTCSeconds(),this.$ms=j.getUTCMilliseconds()}else $.call(this)};var M=P.utcOffset;P.utcOffset=function(j,E){var J=this.$utils().u;if(J(j))return this.$u?0:J(this.$offset)?M.call(this):this.$offset;if(typeof j=="string"&&(j=function(fe){fe===void 0&&(fe="");var te=fe.match(a);if(!te)return null;var U=(""+te[0]).match(l)||["-",0,0],K=U[0],ce=60*+U[1]+ +U[2];return ce===0?0:K==="+"?ce:-ce}(j),j===null))return this;var re=Math.abs(j)<=16?60*j:j,G=this;if(E)return G.$offset=re,G.$u=j===0,G;if(j!==0){var _e=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(G=this.local().add(re+_e,u)).$offset=re,G.$x.$localOffset=_e}else G=this.utc();return G};var ae=P.format;P.format=function(j){var E=j||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return ae.call(this,E)},P.valueOf=function(){var j=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*j},P.isUTC=function(){return!!this.$u},P.toISOString=function(){return this.toDate().toISOString()},P.toString=function(){return this.toDate().toUTCString()};var ue=P.toDate;P.toDate=function(j){return j==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():ue.call(this)};var N=P.diff;P.diff=function(j,E,J){if(j&&this.$u===j.$u)return N.call(this,j,E,J);var re=this.local(),G=x(j).local();return N.call(re,G,E,J)}}})}(dn)),dn.exports}var ts=es();const ns=Ze(ts);cn.extend(Wo),cn.extend(Qo),cn.extend(ns);const rs=Object.freeze(Object.defineProperty({__proto__:null,FORMAT:{DATETIME:"YYYY-MM-DD HH:mm:ss",DATE:"YYYY-MM-DD",TIME:"HH:mm:ss",YEAR:"YYYY",MONTH:"YYYY-MM",HOUR:"YYYY-MM-DD HH",MINUTE:"YYYY-MM-DD HH:mm"},dayjs:cn},Symbol.toStringTag,{value:"Module"}));var hn={exports:{}},is=hn.exports,ai;function os(){return ai||(ai=1,function(r,o){(function(u,a){r.exports=a()})(is,function(){var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])})(e,t)},a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function l(e,t,n){for(var i,s=0,c=t.length;s<c;s++)!i&&s in t||((i=i||Array.prototype.slice.call(t,0,s))[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ze,h=Object.keys,x=Array.isArray;function P(e,t){return typeof t!="object"||h(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||d.Promise||(d.Promise=Promise);var C=Object.getPrototypeOf,$={}.hasOwnProperty;function M(e,t){return $.call(e,t)}function ae(e,t){typeof t=="function"&&(t=t(C(e))),(typeof Reflect>"u"?h:Reflect.ownKeys)(t).forEach(function(n){N(e,n,t[n])})}var ue=Object.defineProperty;function N(e,t,n,i){ue(e,t,P(n&&M(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function j(e){return{from:function(t){return e.prototype=Object.create(t.prototype),N(e.prototype,"constructor",e),{extend:ae.bind(null,e.prototype)}}}}var E=Object.getOwnPropertyDescriptor,J=[].slice;function re(e,t,n){return J.call(e,t,n)}function G(e,t){return t(e)}function _e(e){if(!e)throw new Error("Assertion Failed")}function fe(e){d.setImmediate?setImmediate(e):setTimeout(e,0)}function te(e,t){if(typeof t=="string"&&M(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],i=0,s=t.length;i<s;++i){var c=te(e,t[i]);n.push(c)}return n}var f=t.indexOf(".");if(f!==-1){var p=e[t.substr(0,f)];return p==null?void 0:te(p,t.substr(f+1))}}function U(e,t,n){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){_e(typeof n!="string"&&"length"in n);for(var i=0,s=t.length;i<s;++i)U(e,t[i],n[i])}else{var c,f,p=t.indexOf(".");p!==-1?(c=t.substr(0,p),(f=t.substr(p+1))===""?n===void 0?x(e)&&!isNaN(parseInt(c))?e.splice(c,1):delete e[c]:e[c]=n:U(p=!(p=e[c])||!M(e,c)?e[c]={}:p,f,n)):n===void 0?x(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function K(e){var t,n={};for(t in e)M(e,t)&&(n[t]=e[t]);return n}var ce=[].concat;function le(e){return ce.apply([],e)}var gt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(le([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return d[e]}),ne=new Set(gt.map(function(e){return d[e]})),be=null;function we(e){return be=new WeakMap,e=function t(n){if(!n||typeof n!="object")return n;var i=be.get(n);if(i)return i;if(x(n)){i=[],be.set(n,i);for(var s=0,c=n.length;s<c;++s)i.push(t(n[s]))}else if(ne.has(n.constructor))i=n;else{var f,p=C(n);for(f in i=p===Object.prototype?{}:Object.create(p),be.set(n,i),n)M(n,f)&&(i[f]=t(n[f]))}return i}(e),be=null,e}var Q={}.toString;function H(e){return Q.call(e).slice(8,-1)}var I=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ee=typeof I=="symbol"?function(e){var t;return e!=null&&(t=e[I])&&t.apply(e)}:function(){return null};function L(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var oe={};function se(e){var t,n,i,s;if(arguments.length===1){if(x(e))return e.slice();if(this===oe&&typeof e=="string")return[e];if(s=ee(e)){for(n=[];!(i=s.next()).done;)n.push(i.value);return n}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(n=new Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var de=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Jt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Qe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Jt),Ee={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Oe(e,t){this.name=e,this.message=t}function Ae(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,i,s){return s.indexOf(n)===i}).join(`
|
|
1
|
+
(function(De,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(De=typeof globalThis<"u"?globalThis:De||self,ze(De["@rainte/js"]={}))})(this,function(De){"use strict";var ju=Object.defineProperty;var Mu=(De,ze,Ze)=>ze in De?ju(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):De[ze]=Ze;var si=(De,ze,Ze)=>Mu(De,typeof ze!="symbol"?ze+"":ze,Ze);var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ln={exports:{}},ss=ln.exports,ai;function as(){return ai||(ai=1,function(r,o){(function(u,a){r.exports=a()})(ss,function(){var u=1e3,a=6e4,l=36e5,d="millisecond",h="second",S="minute",$="hour",C="day",D="week",M="month",ae="quarter",ue="year",N="date",j="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,re={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var H=["th","st","nd","rd"],I=Q%100;return"["+Q+(H[(I-20)%10]||H[I]||H[0])+"]"}},G=function(Q,H,I){var ee=String(Q);return!ee||ee.length>=H?Q:""+Array(H+1-ee.length).join(I)+Q},_e={s:G,z:function(Q){var H=-Q.utcOffset(),I=Math.abs(H),ee=Math.floor(I/60),L=I%60;return(H<=0?"+":"-")+G(ee,2,"0")+":"+G(L,2,"0")},m:function Q(H,I){if(H.date()<I.date())return-Q(I,H);var ee=12*(I.year()-H.year())+(I.month()-H.month()),L=H.clone().add(ee,M),oe=I-L<0,se=H.clone().add(ee+(oe?-1:1),M);return+(-(ee+(I-L)/(oe?L-se:se-L))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M,y:ue,w:D,d:C,D:N,h:$,m:S,s:h,ms:d,Q:ae}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},fe="en",te={};te[fe]=re;var U="$isDayjsObject",K=function(Q){return Q instanceof be||!(!Q||!Q[U])},ce=function Q(H,I,ee){var L;if(!H)return fe;if(typeof H=="string"){var oe=H.toLowerCase();te[oe]&&(L=oe),I&&(te[oe]=I,L=oe);var se=H.split("-");if(!L&&se.length>1)return Q(se[0])}else{var de=H.name;te[de]=H,L=de}return!ee&&L&&(fe=L),L||!ee&&fe},le=function(Q,H){if(K(Q))return Q.clone();var I=typeof H=="object"?H:{};return I.date=Q,I.args=arguments,new be(I)},ne=_e;ne.l=ce,ne.i=K,ne.w=function(Q,H){return le(Q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var be=function(){function Q(I){this.$L=ce(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[U]=!0}var H=Q.prototype;return H.parse=function(I){this.$d=function(ee){var L=ee.date,oe=ee.utc;if(L===null)return new Date(NaN);if(ne.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var se=L.match(E);if(se){var de=se[2]-1||0,Ee=(se[7]||"0").substring(0,3);return oe?new Date(Date.UTC(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)):new Date(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)}}return new Date(L)}(I),this.init()},H.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},H.$utils=function(){return ne},H.isValid=function(){return this.$d.toString()!==j},H.isSame=function(I,ee){var L=le(I);return this.startOf(ee)<=L&&L<=this.endOf(ee)},H.isAfter=function(I,ee){return le(I)<this.startOf(ee)},H.isBefore=function(I,ee){return this.endOf(ee)<le(I)},H.$g=function(I,ee,L){return ne.u(I)?this[ee]:this.set(L,I)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(I,ee){var L=this,oe=!!ne.u(ee)||ee,se=ne.p(I),de=function(Z,Ce){var qe=ne.w(L.$u?Date.UTC(L.$y,Ce,Z):new Date(L.$y,Ce,Z),L);return oe?qe:qe.endOf(C)},Ee=function(Z,Ce){return ne.w(L.toDate()[Z].apply(L.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(Ce)),L)},Oe=this.$W,Ae=this.$M,je=this.$D,Le="set"+(this.$u?"UTC":"");switch(se){case ue:return oe?de(1,0):de(31,11);case M:return oe?de(1,Ae):de(0,Ae+1);case D:var We=this.$locale().weekStart||0,ot=(Oe<We?Oe+7:Oe)-We;return de(oe?je-ot:je+(6-ot),Ae);case C:case N:return Ee(Le+"Hours",0);case $:return Ee(Le+"Minutes",1);case S:return Ee(Le+"Seconds",2);case h:return Ee(Le+"Milliseconds",3);default:return this.clone()}},H.endOf=function(I){return this.startOf(I,!1)},H.$set=function(I,ee){var L,oe=ne.p(I),se="set"+(this.$u?"UTC":""),de=(L={},L[C]=se+"Date",L[N]=se+"Date",L[M]=se+"Month",L[ue]=se+"FullYear",L[$]=se+"Hours",L[S]=se+"Minutes",L[h]=se+"Seconds",L[d]=se+"Milliseconds",L)[oe],Ee=oe===C?this.$D+(ee-this.$W):ee;if(oe===M||oe===ue){var Oe=this.clone().set(N,1);Oe.$d[de](Ee),Oe.init(),this.$d=Oe.set(N,Math.min(this.$D,Oe.daysInMonth())).$d}else de&&this.$d[de](Ee);return this.init(),this},H.set=function(I,ee){return this.clone().$set(I,ee)},H.get=function(I){return this[ne.p(I)]()},H.add=function(I,ee){var L,oe=this;I=Number(I);var se=ne.p(ee),de=function(Ae){var je=le(oe);return ne.w(je.date(je.date()+Math.round(Ae*I)),oe)};if(se===M)return this.set(M,this.$M+I);if(se===ue)return this.set(ue,this.$y+I);if(se===C)return de(1);if(se===D)return de(7);var Ee=(L={},L[S]=a,L[$]=l,L[h]=u,L)[se]||1,Oe=this.$d.getTime()+I*Ee;return ne.w(Oe,this)},H.subtract=function(I,ee){return this.add(-1*I,ee)},H.format=function(I){var ee=this,L=this.$locale();if(!this.isValid())return L.invalidDate||j;var oe=I||"YYYY-MM-DDTHH:mm:ssZ",se=ne.z(this),de=this.$H,Ee=this.$m,Oe=this.$M,Ae=L.weekdays,je=L.months,Le=L.meridiem,We=function(Ce,qe,ye,He){return Ce&&(Ce[qe]||Ce(ee,oe))||ye[qe].slice(0,He)},ot=function(Ce){return ne.s(de%12||12,Ce,"0")},Z=Le||function(Ce,qe,ye){var He=Ce<12?"AM":"PM";return ye?He.toLowerCase():He};return oe.replace(J,function(Ce,qe){return qe||function(ye){switch(ye){case"YY":return String(ee.$y).slice(-2);case"YYYY":return ne.s(ee.$y,4,"0");case"M":return Oe+1;case"MM":return ne.s(Oe+1,2,"0");case"MMM":return We(L.monthsShort,Oe,je,3);case"MMMM":return We(je,Oe);case"D":return ee.$D;case"DD":return ne.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return We(L.weekdaysMin,ee.$W,Ae,2);case"ddd":return We(L.weekdaysShort,ee.$W,Ae,3);case"dddd":return Ae[ee.$W];case"H":return String(de);case"HH":return ne.s(de,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return Z(de,Ee,!0);case"A":return Z(de,Ee,!1);case"m":return String(Ee);case"mm":return ne.s(Ee,2,"0");case"s":return String(ee.$s);case"ss":return ne.s(ee.$s,2,"0");case"SSS":return ne.s(ee.$ms,3,"0");case"Z":return se}return null}(Ce)||se.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(I,ee,L){var oe,se=this,de=ne.p(ee),Ee=le(I),Oe=(Ee.utcOffset()-this.utcOffset())*a,Ae=this-Ee,je=function(){return ne.m(se,Ee)};switch(de){case ue:oe=je()/12;break;case M:oe=je();break;case ae:oe=je()/3;break;case D:oe=(Ae-Oe)/6048e5;break;case C:oe=(Ae-Oe)/864e5;break;case $:oe=Ae/l;break;case S:oe=Ae/a;break;case h:oe=Ae/u;break;default:oe=Ae}return L?oe:ne.a(oe)},H.daysInMonth=function(){return this.endOf(M).$D},H.$locale=function(){return te[this.$L]},H.locale=function(I,ee){if(!I)return this.$L;var L=this.clone(),oe=ce(I,ee,!0);return oe&&(L.$L=oe),L},H.clone=function(){return ne.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},Q}(),we=be.prototype;return le.prototype=we,[["$ms",d],["$s",h],["$m",S],["$H",$],["$W",C],["$M",M],["$y",ue],["$D",N]].forEach(function(Q){we[Q[1]]=function(H){return this.$g(H,Q[0],Q[1])}}),le.extend=function(Q,H){return Q.$i||(Q(H,be,le),Q.$i=!0),le},le.locale=ce,le.isDayjs=K,le.unix=function(Q){return le(1e3*Q)},le.en=te[fe],le.Ls=te,le.p={},le})}(ln)),ln.exports}var us=as();const Ft=Ze(us);var fn={exports:{}},cs=fn.exports,ui;function ls(){return ui||(ui=1,function(r,o){(function(u,a){r.exports=a()})(cs,function(){var u={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d/,d=/\d\d/,h=/\d\d?/,S=/\d*[^-_:/,()\s\d]+/,$={},C=function(E){return(E=+E)+(E>68?1900:2e3)},D=function(E){return function(J){this[E]=+J}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(E){(this.zone||(this.zone={})).offset=function(J){if(!J||J==="Z")return 0;var re=J.match(/([+-]|\d\d)/g),G=60*re[1]+(+re[2]||0);return G===0?0:re[0]==="+"?-G:G}(E)}],ae=function(E){var J=$[E];return J&&(J.indexOf?J:J.s.concat(J.f))},ue=function(E,J){var re,G=$.meridiem;if(G){for(var _e=1;_e<=24;_e+=1)if(E.indexOf(G(_e,0,J))>-1){re=_e>12;break}}else re=E===(J?"pm":"PM");return re},N={A:[S,function(E){this.afternoon=ue(E,!1)}],a:[S,function(E){this.afternoon=ue(E,!0)}],Q:[l,function(E){this.month=3*(E-1)+1}],S:[l,function(E){this.milliseconds=100*+E}],SS:[d,function(E){this.milliseconds=10*+E}],SSS:[/\d{3}/,function(E){this.milliseconds=+E}],s:[h,D("seconds")],ss:[h,D("seconds")],m:[h,D("minutes")],mm:[h,D("minutes")],H:[h,D("hours")],h:[h,D("hours")],HH:[h,D("hours")],hh:[h,D("hours")],D:[h,D("day")],DD:[d,D("day")],Do:[S,function(E){var J=$.ordinal,re=E.match(/\d+/);if(this.day=re[0],J)for(var G=1;G<=31;G+=1)J(G).replace(/\[|\]/g,"")===E&&(this.day=G)}],w:[h,D("week")],ww:[d,D("week")],M:[h,D("month")],MM:[d,D("month")],MMM:[S,function(E){var J=ae("months"),re=(ae("monthsShort")||J.map(function(G){return G.slice(0,3)})).indexOf(E)+1;if(re<1)throw new Error;this.month=re%12||re}],MMMM:[S,function(E){var J=ae("months").indexOf(E)+1;if(J<1)throw new Error;this.month=J%12||J}],Y:[/[+-]?\d+/,D("year")],YY:[d,function(E){this.year=C(E)}],YYYY:[/\d{4}/,D("year")],Z:M,ZZ:M};function j(E){var J,re;J=E,re=$&&$.formats;for(var G=(E=J.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(le,ne,be){var we=be&&be.toUpperCase();return ne||re[be]||u[be]||re[we].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Q,H,I){return H||I.slice(1)})})).match(a),_e=G.length,fe=0;fe<_e;fe+=1){var te=G[fe],U=N[te],K=U&&U[0],ce=U&&U[1];G[fe]=ce?{regex:K,parser:ce}:te.replace(/^\[|\]$/g,"")}return function(le){for(var ne={},be=0,we=0;be<_e;be+=1){var Q=G[be];if(typeof Q=="string")we+=Q.length;else{var H=Q.regex,I=Q.parser,ee=le.slice(we),L=H.exec(ee)[0];I.call(ne,L),le=le.replace(L,"")}}return function(oe){var se=oe.afternoon;if(se!==void 0){var de=oe.hours;se?de<12&&(oe.hours+=12):de===12&&(oe.hours=0),delete oe.afternoon}}(ne),ne}}return function(E,J,re){re.p.customParseFormat=!0,E&&E.parseTwoDigitYear&&(C=E.parseTwoDigitYear);var G=J.prototype,_e=G.parse;G.parse=function(fe){var te=fe.date,U=fe.utc,K=fe.args;this.$u=U;var ce=K[1];if(typeof ce=="string"){var le=K[2]===!0,ne=K[3]===!0,be=le||ne,we=K[2];ne&&(we=K[2]),$=this.$locale(),!le&&we&&($=re.Ls[we]),this.$d=function(ee,L,oe,se){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*ee);var de=j(L)(ee),Ee=de.year,Oe=de.month,Ae=de.day,je=de.hours,Le=de.minutes,We=de.seconds,ot=de.milliseconds,Z=de.zone,Ce=de.week,qe=new Date,ye=Ae||(Ee||Oe?1:qe.getDate()),He=Ee||qe.getFullYear(),$t=0;Ee&&!Oe||($t=Oe>0?Oe-1:qe.getMonth());var Xe,zt=je||0,Vt=Le||0,Wt=We||0,Jt=ot||0;return Z?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt+60*Z.offset*1e3)):oe?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt)):(Xe=new Date(He,$t,ye,zt,Vt,Wt,Jt),Ce&&(Xe=se(Xe).week(Ce).toDate()),Xe)}catch{return new Date("")}}(te,ce,U,re),this.init(),we&&we!==!0&&(this.$L=this.locale(we).$L),be&&te!=this.format(ce)&&(this.$d=new Date("")),$={}}else if(ce instanceof Array)for(var Q=ce.length,H=1;H<=Q;H+=1){K[1]=ce[H-1];var I=re.apply(this,K);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}H===Q&&(this.$d=new Date(""))}else _e.call(this,fe)}}})}(fn)),fn.exports}var fs=ls();const ds=Ze(fs);var dn={exports:{}},hs=dn.exports,ci;function ps(){return ci||(ci=1,function(r,o){(function(u,a){r.exports=a()})(hs,function(){var u,a,l=1e3,d=6e4,h=36e5,S=864e5,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,D=2628e6,M=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ae={years:C,months:D,days:S,hours:h,minutes:d,seconds:l,milliseconds:1,weeks:6048e5},ue=function(te){return te instanceof _e},N=function(te,U,K){return new _e(te,K,U.$l)},j=function(te){return a.p(te)+"s"},E=function(te){return te<0},J=function(te){return E(te)?Math.ceil(te):Math.floor(te)},re=function(te){return Math.abs(te)},G=function(te,U){return te?E(te)?{negative:!0,format:""+re(te)+U}:{negative:!1,format:""+te+U}:{negative:!1,format:""}},_e=function(){function te(K,ce,le){var ne=this;if(this.$d={},this.$l=le,K===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ce)return N(K*ae[j(ce)],this);if(typeof K=="number")return this.$ms=K,this.parseFromMilliseconds(),this;if(typeof K=="object")return Object.keys(K).forEach(function(Q){ne.$d[j(Q)]=K[Q]}),this.calMilliseconds(),this;if(typeof K=="string"){var be=K.match(M);if(be){var we=be.slice(2).map(function(Q){return Q!=null?Number(Q):0});return this.$d.years=we[0],this.$d.months=we[1],this.$d.weeks=we[2],this.$d.days=we[3],this.$d.hours=we[4],this.$d.minutes=we[5],this.$d.seconds=we[6],this.calMilliseconds(),this}}return this}var U=te.prototype;return U.calMilliseconds=function(){var K=this;this.$ms=Object.keys(this.$d).reduce(function(ce,le){return ce+(K.$d[le]||0)*ae[le]},0)},U.parseFromMilliseconds=function(){var K=this.$ms;this.$d.years=J(K/C),K%=C,this.$d.months=J(K/D),K%=D,this.$d.days=J(K/S),K%=S,this.$d.hours=J(K/h),K%=h,this.$d.minutes=J(K/d),K%=d,this.$d.seconds=J(K/l),K%=l,this.$d.milliseconds=K},U.toISOString=function(){var K=G(this.$d.years,"Y"),ce=G(this.$d.months,"M"),le=+this.$d.days||0;this.$d.weeks&&(le+=7*this.$d.weeks);var ne=G(le,"D"),be=G(this.$d.hours,"H"),we=G(this.$d.minutes,"M"),Q=this.$d.seconds||0;this.$d.milliseconds&&(Q+=this.$d.milliseconds/1e3,Q=Math.round(1e3*Q)/1e3);var H=G(Q,"S"),I=K.negative||ce.negative||ne.negative||be.negative||we.negative||H.negative,ee=be.format||we.format||H.format?"T":"",L=(I?"-":"")+"P"+K.format+ce.format+ne.format+ee+be.format+we.format+H.format;return L==="P"||L==="-P"?"P0D":L},U.toJSON=function(){return this.toISOString()},U.format=function(K){var ce=K||"YYYY-MM-DDTHH:mm:ss",le={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return ce.replace($,function(ne,be){return be||String(le[ne])})},U.as=function(K){return this.$ms/ae[j(K)]},U.get=function(K){var ce=this.$ms,le=j(K);return le==="milliseconds"?ce%=1e3:ce=le==="weeks"?J(ce/ae[le]):this.$d[le],ce||0},U.add=function(K,ce,le){var ne;return ne=ce?K*ae[j(ce)]:ue(K)?K.$ms:N(K,this).$ms,N(this.$ms+ne*(le?-1:1),this)},U.subtract=function(K,ce){return this.add(K,ce,!0)},U.locale=function(K){var ce=this.clone();return ce.$l=K,ce},U.clone=function(){return N(this.$ms,this)},U.humanize=function(K){return u().add(this.$ms,"ms").locale(this.$l).fromNow(!K)},U.valueOf=function(){return this.asMilliseconds()},U.milliseconds=function(){return this.get("milliseconds")},U.asMilliseconds=function(){return this.as("milliseconds")},U.seconds=function(){return this.get("seconds")},U.asSeconds=function(){return this.as("seconds")},U.minutes=function(){return this.get("minutes")},U.asMinutes=function(){return this.as("minutes")},U.hours=function(){return this.get("hours")},U.asHours=function(){return this.as("hours")},U.days=function(){return this.get("days")},U.asDays=function(){return this.as("days")},U.weeks=function(){return this.get("weeks")},U.asWeeks=function(){return this.as("weeks")},U.months=function(){return this.get("months")},U.asMonths=function(){return this.as("months")},U.years=function(){return this.get("years")},U.asYears=function(){return this.as("years")},te}(),fe=function(te,U,K){return te.add(U.years()*K,"y").add(U.months()*K,"M").add(U.days()*K,"d").add(U.hours()*K,"h").add(U.minutes()*K,"m").add(U.seconds()*K,"s").add(U.milliseconds()*K,"ms")};return function(te,U,K){u=K,a=K().$utils(),K.duration=function(ne,be){var we=K.locale();return N(ne,{$l:we},be)},K.isDuration=ue;var ce=U.prototype.add,le=U.prototype.subtract;U.prototype.add=function(ne,be){return ue(ne)?fe(this,ne,1):ce.bind(this)(ne,be)},U.prototype.subtract=function(ne,be){return ue(ne)?fe(this,ne,-1):le.bind(this)(ne,be)}}})}(dn)),dn.exports}var ms=ps();const ys=Ze(ms);var hn={exports:{}},vs=hn.exports,li;function gs(){return li||(li=1,function(r,o){(function(u,a){r.exports=a()})(vs,function(){var u="minute",a=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(d,h,S){var $=h.prototype;S.utc=function(j){var E={date:j,utc:!0,args:arguments};return new h(E)},$.utc=function(j){var E=S(this.toDate(),{locale:this.$L,utc:!0});return j?E.add(this.utcOffset(),u):E},$.local=function(){return S(this.toDate(),{locale:this.$L,utc:!1})};var C=$.parse;$.parse=function(j){j.utc&&(this.$u=!0),this.$utils().u(j.$offset)||(this.$offset=j.$offset),C.call(this,j)};var D=$.init;$.init=function(){if(this.$u){var j=this.$d;this.$y=j.getUTCFullYear(),this.$M=j.getUTCMonth(),this.$D=j.getUTCDate(),this.$W=j.getUTCDay(),this.$H=j.getUTCHours(),this.$m=j.getUTCMinutes(),this.$s=j.getUTCSeconds(),this.$ms=j.getUTCMilliseconds()}else D.call(this)};var M=$.utcOffset;$.utcOffset=function(j,E){var J=this.$utils().u;if(J(j))return this.$u?0:J(this.$offset)?M.call(this):this.$offset;if(typeof j=="string"&&(j=function(fe){fe===void 0&&(fe="");var te=fe.match(a);if(!te)return null;var U=(""+te[0]).match(l)||["-",0,0],K=U[0],ce=60*+U[1]+ +U[2];return ce===0?0:K==="+"?ce:-ce}(j),j===null))return this;var re=Math.abs(j)<=16?60*j:j,G=this;if(E)return G.$offset=re,G.$u=j===0,G;if(j!==0){var _e=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(G=this.local().add(re+_e,u)).$offset=re,G.$x.$localOffset=_e}else G=this.utc();return G};var ae=$.format;$.format=function(j){var E=j||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return ae.call(this,E)},$.valueOf=function(){var j=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*j},$.isUTC=function(){return!!this.$u},$.toISOString=function(){return this.toDate().toISOString()},$.toString=function(){return this.toDate().toUTCString()};var ue=$.toDate;$.toDate=function(j){return j==="s"&&this.$offset?S(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():ue.call(this)};var N=$.diff;$.diff=function(j,E,J){if(j&&this.$u===j.$u)return N.call(this,j,E,J);var re=this.local(),G=S(j).local();return N.call(re,G,E,J)}}})}(hn)),hn.exports}var bs=gs();const ws=Ze(bs);Ft.extend(ds),Ft.extend(ys),Ft.extend(ws);const fi={DATETIME:"YYYY-MM-DD HH:mm:ss",DATE:"YYYY-MM-DD",TIME:"HH:mm:ss",YEAR:"YYYY",MONTH:"YYYY-MM",HOUR:"YYYY-MM-DD HH",MINUTE:"YYYY-MM-DD HH:mm"},_s=Object.freeze(Object.defineProperty({__proto__:null,FORMAT:fi,dayjs:Ft,default:{dayjs:Ft,FORMAT:fi}},Symbol.toStringTag,{value:"Module"}));var pn={exports:{}},xs=pn.exports,di;function Ss(){return di||(di=1,function(r,o){(function(u,a){r.exports=a()})(xs,function(){var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])})(e,t)},a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function l(e,t,n){for(var i,s=0,c=t.length;s<c;s++)!i&&s in t||((i=i||Array.prototype.slice.call(t,0,s))[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ze,h=Object.keys,S=Array.isArray;function $(e,t){return typeof t!="object"||h(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||d.Promise||(d.Promise=Promise);var C=Object.getPrototypeOf,D={}.hasOwnProperty;function M(e,t){return D.call(e,t)}function ae(e,t){typeof t=="function"&&(t=t(C(e))),(typeof Reflect>"u"?h:Reflect.ownKeys)(t).forEach(function(n){N(e,n,t[n])})}var ue=Object.defineProperty;function N(e,t,n,i){ue(e,t,$(n&&M(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function j(e){return{from:function(t){return e.prototype=Object.create(t.prototype),N(e.prototype,"constructor",e),{extend:ae.bind(null,e.prototype)}}}}var E=Object.getOwnPropertyDescriptor,J=[].slice;function re(e,t,n){return J.call(e,t,n)}function G(e,t){return t(e)}function _e(e){if(!e)throw new Error("Assertion Failed")}function fe(e){d.setImmediate?setImmediate(e):setTimeout(e,0)}function te(e,t){if(typeof t=="string"&&M(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],i=0,s=t.length;i<s;++i){var c=te(e,t[i]);n.push(c)}return n}var f=t.indexOf(".");if(f!==-1){var p=e[t.substr(0,f)];return p==null?void 0:te(p,t.substr(f+1))}}function U(e,t,n){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){_e(typeof n!="string"&&"length"in n);for(var i=0,s=t.length;i<s;++i)U(e,t[i],n[i])}else{var c,f,p=t.indexOf(".");p!==-1?(c=t.substr(0,p),(f=t.substr(p+1))===""?n===void 0?S(e)&&!isNaN(parseInt(c))?e.splice(c,1):delete e[c]:e[c]=n:U(p=!(p=e[c])||!M(e,c)?e[c]={}:p,f,n)):n===void 0?S(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function K(e){var t,n={};for(t in e)M(e,t)&&(n[t]=e[t]);return n}var ce=[].concat;function le(e){return ce.apply([],e)}var gt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(le([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return d[e]}),ne=new Set(gt.map(function(e){return d[e]})),be=null;function we(e){return be=new WeakMap,e=function t(n){if(!n||typeof n!="object")return n;var i=be.get(n);if(i)return i;if(S(n)){i=[],be.set(n,i);for(var s=0,c=n.length;s<c;++s)i.push(t(n[s]))}else if(ne.has(n.constructor))i=n;else{var f,p=C(n);for(f in i=p===Object.prototype?{}:Object.create(p),be.set(n,i),n)M(n,f)&&(i[f]=t(n[f]))}return i}(e),be=null,e}var Q={}.toString;function H(e){return Q.call(e).slice(8,-1)}var I=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ee=typeof I=="symbol"?function(e){var t;return e!=null&&(t=e[I])&&t.apply(e)}:function(){return null};function L(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var oe={};function se(e){var t,n,i,s;if(arguments.length===1){if(S(e))return e.slice();if(this===oe&&typeof e=="string")return[e];if(s=ee(e)){for(n=[];!(i=s.next()).done;)n.push(i.value);return n}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(n=new Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var de=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Xt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Qe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Xt),Ee={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Oe(e,t){this.name=e,this.message=t}function Ae(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,i,s){return s.indexOf(n)===i}).join(`
|
|
2
2
|
`)}function je(e,t,n,i){this.failures=t,this.failedKeys=i,this.successCount=n,this.message=Ae(e,t)}function Le(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=Ae(e,this.failures)}j(Oe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),j(je).from(Oe),j(Le).from(Oe);var We=Qe.reduce(function(e,t){return e[t]=t+"Error",e},{}),ot=Oe,Z=Qe.reduce(function(e,t){var n=t+"Error";function i(s,c){this.name=n,s?typeof s=="string"?(this.message="".concat(s).concat(c?`
|
|
3
|
-
`+c:""),this.inner=c||null):typeof s=="object"&&(this.message="".concat(s.name," ").concat(s.message),this.inner=s):(this.message=Ee[t]||n,this.inner=null)}return j(i).from(ot),e[t]=i,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var $e=Jt.reduce(function(e,t){return e[t+"Error"]=Z[t],e},{}),Fe=Qe.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=Z[t]),e},{});function ye(){}function He(e){return e}function Pt(e,t){return e==null||e===He?t:function(n){return t(e(n))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Yt(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var c=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Xe(s,this.onerror):s),c!==void 0?c:n}}function Ht(e,t){return e===ye?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i)}}function zt(e,t){return e===ye?t:function(n){var i=e.apply(this,arguments);P(n,i);var s=this.onsuccess,c=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),s&&(this.onsuccess=this.onsuccess?Xe(s,this.onsuccess):s),c&&(this.onerror=this.onerror?Xe(c,this.onerror):c),i===void 0?n===void 0?void 0:n:P(i,n)}}function Vt(e,t){return e===ye?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function $n(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var i=this,s=arguments.length,c=new Array(s);s--;)c[s]=arguments[s];return n.then(function(){return t.apply(i,c)})}return t.apply(this,arguments)}}Fe.ModifyError=je,Fe.DexieError=Oe,Fe.BulkError=Le;var nt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function so(e){nt=e}var Wt={},ao=100,gt=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,C(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,C(t),e]}(),Jt=gt[0],Qe=gt[1],gt=gt[2],Qe=Qe&&Qe.then,bt=Jt&&Jt.constructor,Sr=!!gt,Gt=function(e,t){Xt.push([e,t]),Cn&&(queueMicrotask(Ja),Cn=!1)},xr=!0,Cn=!0,wt=[],jn=[],Or=He,ut={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ye,pgp:!1,env:{},finalize:ye},ie=ut,Xt=[],_t=0,Mn=[];function W(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=ie;if(typeof e!="function"){if(e!==Wt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&kr(this,this._value))}this._state=null,this._value=null,++t.ref,function n(i,s){try{s(function(c){if(i._state===null){if(c===i)throw new TypeError("A promise cannot be resolved with itself.");var f=i._lib&&Dt();c&&typeof c.then=="function"?n(i,function(p,y){c instanceof W?c._then(p,y):c.then(p,y)}):(i._state=!0,i._value=c,co(i)),f&&$t()}},kr.bind(null,i))}catch(c){kr(i,c)}}(this,e)}var Er={get:function(){var e=ie,t=Bn;function n(i,s){var c=this,f=!e.global&&(e!==ie||t!==Bn),p=f&&!lt(),y=new W(function(g,_){Tr(c,new uo(fo(i,e,f,p),fo(s,e,f,p),g,_,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return n.prototype=Wt,n},set:function(e){N(this,"then",e&&e.prototype===Wt?Er:{get:function(){return e},set:Er.set})}};function uo(e,t,n,i,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=i,this.psd=s}function kr(e,t){var n,i;jn.push(t),e._state===null&&(n=e._lib&&Dt(),t=Or(t),e._state=!1,e._value=t,i=e,wt.some(function(s){return s._value===i._value})||wt.push(i),co(e),n&&$t())}function co(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)Tr(e,t[n]);var s=e._PSD;--s.ref||s.finalize(),_t===0&&(++_t,Gt(function(){--_t==0&&Rr()},[]))}function Tr(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++_t,Gt(Wa,[n,e,t])}else e._listeners.push(t)}function Wa(e,t,n){try{var i,s=t._value;!t._state&&jn.length&&(jn=[]),i=nt&&t._consoleTask?t._consoleTask.run(function(){return e(s)}):e(s),t._state||jn.indexOf(s)!==-1||function(c){for(var f=wt.length;f;)if(wt[--f]._value===c._value)return wt.splice(f,1)}(t),n.resolve(i)}catch(c){n.reject(c)}finally{--_t==0&&Rr(),--n.psd.ref||n.psd.finalize()}}function Ja(){St(ut,function(){Dt()&&$t()})}function Dt(){var e=xr;return Cn=xr=!1,e}function $t(){var e,t,n;do for(;0<Xt.length;)for(e=Xt,Xt=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(0<Xt.length);Cn=xr=!0}function Rr(){var e=wt;wt=[],e.forEach(function(i){i._PSD.onunhandled.call(null,i._value,i)});for(var t=Mn.slice(0),n=t.length;n;)t[--n]()}function Nn(e){return new W(Wt,!1,e)}function Te(e,t){var n=ie;return function(){var i=Dt(),s=ie;try{return ft(n,!0),e.apply(this,arguments)}catch(c){t&&t(c)}finally{ft(s,!1),i&&$t()}}}ae(W.prototype,{then:Er,_then:function(e,t){Tr(this,new uo(null,null,e,t,ie))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=e,n=arguments[1];return typeof t=="function"?this.then(null,function(i){return(i instanceof t?n:Nn)(i)}):this.then(null,function(i){return(i&&i.name===t?n:Nn)(i)})},finally:function(e){return this.then(function(t){return W.resolve(e()).then(function(){return t})},function(t){return W.resolve(e()).then(function(){return Nn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new W(function(i,s){var c=setTimeout(function(){return s(new Z.Timeout(t))},e);n.then(i,s).finally(clearTimeout.bind(null,c))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&N(W.prototype,Symbol.toStringTag,"Dexie.Promise"),ut.env=lo(),ae(W,{all:function(){var e=se.apply(null,arguments).map(Kn);return new W(function(t,n){e.length===0&&t([]);var i=e.length;e.forEach(function(s,c){return W.resolve(s).then(function(f){e[c]=f,--i||t(e)},n)})})},resolve:function(e){return e instanceof W?e:e&&typeof e.then=="function"?new W(function(t,n){e.then(t,n)}):new W(Wt,!0,e)},reject:Nn,race:function(){var e=se.apply(null,arguments).map(Kn);return new W(function(t,n){e.map(function(i){return W.resolve(i).then(t,n)})})},PSD:{get:function(){return ie},set:function(e){return ie=e}},totalEchoes:{get:function(){return Bn}},newPSD:ct,usePSD:St,scheduler:{get:function(){return Gt},set:function(e){Gt=e}},rejectionMapper:{get:function(){return Or},set:function(e){Or=e}},follow:function(e,t){return new W(function(n,i){return ct(function(s,c){var f=ie;f.unhandleds=[],f.onunhandled=c,f.finalize=Xe(function(){var p,y=this;p=function(){y.unhandleds.length===0?s():c(y.unhandleds[0])},Mn.push(function g(){p(),Mn.splice(Mn.indexOf(g),1)}),++_t,Gt(function(){--_t==0&&Rr()},[])},f.finalize),e()},t,n,i)})}}),bt&&(bt.allSettled&&N(W,"allSettled",function(){var e=se.apply(null,arguments).map(Kn);return new W(function(t){e.length===0&&t([]);var n=e.length,i=new Array(n);e.forEach(function(s,c){return W.resolve(s).then(function(f){return i[c]={status:"fulfilled",value:f}},function(f){return i[c]={status:"rejected",reason:f}}).then(function(){return--n||t(i)})})})}),bt.any&&typeof AggregateError<"u"&&N(W,"any",function(){var e=se.apply(null,arguments).map(Kn);return new W(function(t,n){e.length===0&&n(new AggregateError([]));var i=e.length,s=new Array(i);e.forEach(function(c,f){return W.resolve(c).then(function(p){return t(p)},function(p){s[f]=p,--i||n(new AggregateError(s))})})})}),bt.withResolvers&&(W.withResolvers=bt.withResolvers));var Me={awaits:0,echoes:0,id:0},Ga=0,Fn=[],qn=0,Bn=0,Xa=0;function ct(e,t,n,i){var s=ie,c=Object.create(s);return c.parent=s,c.ref=0,c.global=!1,c.id=++Xa,ut.env,c.env=Sr?{Promise:W,PromiseProp:{value:W,configurable:!0,writable:!0},all:W.all,race:W.race,allSettled:W.allSettled,any:W.any,resolve:W.resolve,reject:W.reject}:{},t&&P(c,t),++s.ref,c.finalize=function(){--this.parent.ref||this.parent.finalize()},i=St(c,e,n,i),c.ref===0&&c.finalize(),i}function Ct(){return Me.id||(Me.id=++Ga),++Me.awaits,Me.echoes+=ao,Me.id}function lt(){return!!Me.awaits&&(--Me.awaits==0&&(Me.id=0),Me.echoes=Me.awaits*ao,!0)}function Kn(e){return Me.echoes&&e&&e.constructor===bt?(Ct(),e.then(function(t){return lt(),t},function(t){return lt(),Pe(t)})):e}function Qa(){var e=Fn[Fn.length-1];Fn.pop(),ft(e,!1)}function ft(e,t){var n,i=ie;(t?!Me.echoes||qn++&&e===ie:!qn||--qn&&e===ie)||queueMicrotask(t?(function(s){++Bn,Me.echoes&&--Me.echoes!=0||(Me.echoes=Me.awaits=Me.id=0),Fn.push(ie),ft(s,!0)}).bind(null,e):Qa),e!==ie&&(ie=e,i===ut&&(ut.env=lo()),Sr&&(n=ut.env.Promise,t=e.env,(i.global||e.global)&&(Object.defineProperty(d,"Promise",t.PromiseProp),n.all=t.all,n.race=t.race,n.resolve=t.resolve,n.reject=t.reject,t.allSettled&&(n.allSettled=t.allSettled),t.any&&(n.any=t.any))))}function lo(){var e=d.Promise;return Sr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function St(e,t,n,i,s){var c=ie;try{return ft(e,!0),t(n,i,s)}finally{ft(c,!1)}}function fo(e,t,n,i){return typeof e!="function"?e:function(){var s=ie;n&&Ct(),ft(t,!0);try{return e.apply(this,arguments)}finally{ft(s,!1),i&&queueMicrotask(lt)}}}function Ar(e){Promise===bt&&Me.echoes===0?qn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Qe).indexOf("[native code]")===-1&&(Ct=lt=ye);var Pe=W.reject,xt="",st="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ho="String expected.",jt=[],In="__dbnames",Pr="readonly",Dr="readwrite";function Ot(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var po={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ln(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=we(t))[e],t}}function mo(){throw Z.Type()}function Se(e,t){try{var n=yo(e),i=yo(t);if(n!==i)return n==="Array"?1:i==="Array"?-1:n==="binary"?1:i==="binary"?-1:n==="string"?1:i==="string"?-1:n==="Date"?1:i!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g)if(s[g]!==c[g])return s[g]<c[g]?-1:1;return f===p?0:f<p?-1:1}(vo(e),vo(t));case"Array":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g){var _=Se(s[g],c[g]);if(_!==0)return _}return f===p?0:f<p?-1:1}(e,t)}}catch{}return NaN}function yo(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=H(e),e==="ArrayBuffer"?"binary":e)}function vo(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var go=(ke.prototype._trans=function(e,t,n){var i=this._tx||ie.trans,s=this.name,c=nt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function f(g,_,m){if(!m.schema[s])throw new Z.NotFound("Table "+s+" not part of transaction");return t(m.idbtrans,m)}var p=Dt();try{var y=i&&i.db._novip===this.db._novip?i===ie.trans?i._promise(e,f,n):ct(function(){return i._promise(e,f,n)},{trans:i,transless:ie.transless||ie}):function g(_,m,O,v){if(_.idbdb&&(_._state.openComplete||ie.letThrough||_._vip)){var w=_._createTransaction(m,O,_._dbSchema);try{w.create(),_._state.PR1398_maxLoop=3}catch(S){return S.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,v)})):Pe(S)}return w._promise(m,function(S,b){return ct(function(){return ie.trans=w,v(S,b,w)})}).then(function(S){if(m==="readwrite")try{w.idbtrans.commit()}catch{}return m==="readonly"?S:w._completion.then(function(){return S})})}if(_._state.openComplete)return Pe(new Z.DatabaseClosed(_._state.dbOpenError));if(!_._state.isBeingOpened){if(!_._state.autoOpen)return Pe(new Z.DatabaseClosed);_.open().catch(ye)}return _._state.dbReadyPromise.then(function(){return g(_,m,O,v)})}(this.db,e,[this.name],f);return c&&(y._consoleTask=c,y=y.catch(function(g){return console.trace(g),Pe(g)})),y}finally{p&&$t()}},ke.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?Pe(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(i){return n.core.get({trans:i,key:e}).then(function(s){return n.hook.reading.fire(s)})}).then(t)},ke.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(x(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=h(e);if(t.length===1)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter(function(p){if(p.compound&&t.every(function(g){return 0<=p.keyPath.indexOf(g)})){for(var y=0;y<t.length;++y)if(t.indexOf(p.keyPath[y])===-1)return!1;return!0}return!1}).sort(function(p,y){return p.keyPath.length-y.keyPath.length})[0];if(n&&this.db._maxKey!==xt){var c=n.keyPath.slice(0,t.length);return this.where(c).equals(c.map(function(y){return e[y]}))}!n&&nt&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName;function s(p,y){return Se(p,y)===0}var f=t.reduce(function(m,y){var g=m[0],_=m[1],m=i[y],O=e[y];return[g||m,g||!m?Ot(_,m&&m.multi?function(v){return v=te(v,y),x(v)&&v.some(function(w){return s(O,w)})}:function(v){return s(O,te(v,y))}):_]},[null,null]),c=f[0],f=f[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(f):n?this.filter(f):this.where(t).equals("")},ke.prototype.filter=function(e){return this.toCollection().and(e)},ke.prototype.count=function(e){return this.toCollection().count(e)},ke.prototype.offset=function(e){return this.toCollection().offset(e)},ke.prototype.limit=function(e){return this.toCollection().limit(e)},ke.prototype.each=function(e){return this.toCollection().each(e)},ke.prototype.toArray=function(e){return this.toCollection().toArray(e)},ke.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ke.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,x(e)?"[".concat(e.join("+"),"]"):e))},ke.prototype.reverse=function(){return this.toCollection().reverse()},ke.prototype.mapToClass=function(e){var t,n=this.db,i=this.name;function s(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof mo&&(function(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function _(){this.constructor=y}u(y,g),y.prototype=g===null?Object.create(g):(_.prototype=g.prototype,new _)}(s,t=e),Object.defineProperty(s.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),s.prototype.table=function(){return i},e=s);for(var c=new Set,f=e.prototype;f;f=C(f))Object.getOwnPropertyNames(f).forEach(function(y){return c.add(y)});function p(y){if(!y)return y;var g,_=Object.create(e.prototype);for(g in y)if(!c.has(g))try{_[g]=y[g]}catch{}return _}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=p,this.hook("reading",p),e},ke.prototype.defineClass=function(){return this.mapToClass(function(e){P(this,e)})},ke.prototype.add=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Ln(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"add",keys:t!=null?[t]:null,values:[f]})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.update=function(e,t){return typeof e!="object"||x(e)?this.where(":id").equals(e).modify(t):(e=te(e,this.schema.primKey.keyPath),e===void 0?Pe(new Z.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},ke.prototype.put=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Ln(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"put",values:[f],keys:t!=null?[t]:null})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})}).then(function(n){return n.numFailures?W.reject(n.failures[0]):void 0})},ke.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:po})}).then(function(t){return t.numFailures?W.reject(t.failures[0]):void 0})},ke.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(n){return t.core.getMany({keys:e,trans:n}).then(function(i){return i.map(function(s){return t.hook.reading.fire(s)})})})},ke.prototype.bulkAdd=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Ln(g)):e;return i.core.mutate({trans:f,type:"add",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkAdd(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkPut=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Ln(g)):e;return i.core.mutate({trans:f,type:"put",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkPut(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkUpdate=function(e){var t=this,n=this.core,i=e.map(function(f){return f.key}),s=e.map(function(f){return f.changes}),c=[];return this._trans("readwrite",function(f){return n.getMany({trans:f,keys:i,cache:"clone"}).then(function(p){var y=[],g=[];e.forEach(function(m,O){var v=m.key,w=m.changes,S=p[O];if(S){for(var b=0,k=Object.keys(w);b<k.length;b++){var T=k[b],R=w[T];if(T===t.schema.primKey.keyPath){if(Se(R,v)!==0)throw new Z.Constraint("Cannot update primary key in bulkUpdate()")}else U(S,T,R)}c.push(O),y.push(v),g.push(S)}});var _=y.length;return n.mutate({trans:f,type:"put",keys:y,values:g,updates:{keys:i,changeSpecs:s}}).then(function(m){var O=m.numFailures,v=m.failures;if(O===0)return _;for(var w=0,S=Object.keys(v);w<S.length;w++){var b,k=S[w],T=c[Number(k)];T!=null&&(b=v[k],delete v[k],v[T]=b)}throw new Le("".concat(t.name,".bulkUpdate(): ").concat(O," of ").concat(_," operations failed"),v)})})})},ke.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",function(i){return t.core.mutate({trans:i,type:"delete",keys:e})}).then(function(f){var s=f.numFailures,c=f.lastResult,f=f.failures;if(s===0)return c;throw new Le("".concat(t.name,".bulkDelete(): ").concat(s," of ").concat(n," operations failed"),f)})},ke);function ke(){}function Qt(e){function t(f,p){if(p){for(var y=arguments.length,g=new Array(y-1);--y;)g[y-1]=arguments[y];return n[f].subscribe.apply(null,g),e}if(typeof f=="string")return n[f]}var n={};t.addEventType=c;for(var i=1,s=arguments.length;i<s;++i)c(arguments[i]);return t;function c(f,p,y){if(typeof f!="object"){var g;p=p||Vt;var _={subscribers:[],fire:y=y||ye,subscribe:function(m){_.subscribers.indexOf(m)===-1&&(_.subscribers.push(m),_.fire=p(_.fire,m))},unsubscribe:function(m){_.subscribers=_.subscribers.filter(function(O){return O!==m}),_.fire=_.subscribers.reduce(p,y)}};return n[f]=t[f]=_}h(g=f).forEach(function(m){var O=g[m];if(x(O))c(m,g[m][0],g[m][1]);else{if(O!=="asap")throw new Z.InvalidArgument("Invalid event config");var v=c(m,He,function(){for(var w=arguments.length,S=new Array(w);w--;)S[w]=arguments[w];v.subscribers.forEach(function(b){fe(function(){b.apply(null,S)})})})}})}}function Zt(e,t){return j(t).from({prototype:e}),t}function Mt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function $r(e,t){e.filter=Ot(e.filter,t)}function Cr(e,t,n){var i=e.replayFilter;e.replayFilter=i?function(){return Ot(i(),t())}:t,e.justLimit=n&&!i}function Un(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Z.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function bo(e,t,n){var i=Un(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:i,range:e.range}})}function Yn(e,t,n,i){var s=e.replayFilter?Ot(e.filter,e.replayFilter()):e.filter;if(e.or){var c={},f=function(p,y,g){var _,m;s&&!s(y,g,function(O){return y.stop(O)},function(O){return y.fail(O)})||((m=""+(_=y.primaryKey))=="[object ArrayBuffer]"&&(m=""+new Uint8Array(_)),M(c,m)||(c[m]=!0,t(p,y,g)))};return Promise.all([e.or._iterate(f,n),wo(bo(e,i,n),e.algorithm,f,!e.keysOnly&&e.valueMapper)])}return wo(bo(e,i,n),Ot(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function wo(e,t,n,i){var s=Te(i?function(c,f,p){return n(i(c),f,p)}:n);return e.then(function(c){if(c)return c.start(function(){var f=function(){return c.continue()};t&&!t(c,function(p){return f=p},function(p){c.stop(p),f=ye},function(p){c.fail(p),f=ye})||s(c.value,c,function(p){return f=p}),f()})})}var en=(_o.prototype.execute=function(e){var t=this["@@propmod"];if(t.add!==void 0){var n=t.add;if(x(n))return l(l([],x(e)?e:[],!0),n).sort();if(typeof n=="number")return(Number(e)||0)+n;if(typeof n=="bigint")try{return BigInt(e)+n}catch{return BigInt(0)+n}throw new TypeError("Invalid term ".concat(n))}if(t.remove!==void 0){var i=t.remove;if(x(i))return x(e)?e.filter(function(s){return!i.includes(s)}).sort():[];if(typeof i=="number")return Number(e)-i;if(typeof i=="bigint")try{return BigInt(e)-i}catch{return BigInt(0)-i}throw new TypeError("Invalid subtrahend ".concat(i))}return n=(n=t.replacePrefix)===null||n===void 0?void 0:n[0],n&&typeof e=="string"&&e.startsWith(n)?t.replacePrefix[1]+e.substring(n.length):e},_o);function _o(e){this["@@propmod"]=e}var Za=(xe.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,Pe.bind(null,n.error)):n.table._trans("readonly",e).then(t)},xe.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,Pe.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},xe.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=Ot(t.algorithm,e)},xe.prototype._iterate=function(e,t){return Yn(this._ctx,e,t,this._ctx.table.core)},xe.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&P(n,e),t._ctx=n,t},xe.prototype.raw=function(){return this._ctx.valueMapper=null,this},xe.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return Yn(t,e,n,t.table.core)})},xe.prototype.count=function(e){var t=this;return this._read(function(n){var i=t._ctx,s=i.table.core;if(Mt(i,!0))return s.count({trans:n,query:{index:Un(i,s.schema),range:i.range}}).then(function(f){return Math.min(f,i.limit)});var c=0;return Yn(i,function(){return++c,!1},n,s).then(function(){return c})}).then(e)},xe.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),i=n[0],s=n.length-1;function c(y,g){return g?c(y[n[g]],g-1):y[i]}var f=this._ctx.dir==="next"?1:-1;function p(y,g){return Se(c(y,s),c(g,s))*f}return this.toArray(function(y){return y.sort(p)}).then(t)},xe.prototype.toArray=function(e){var t=this;return this._read(function(n){var i=t._ctx;if(i.dir==="next"&&Mt(i,!0)&&0<i.limit){var s=i.valueMapper,c=Un(i,i.table.core.schema);return i.table.core.query({trans:n,limit:i.limit,values:!0,query:{index:c,range:i.range}}).then(function(p){return p=p.result,s?p.map(s):p})}var f=[];return Yn(i,function(p){return f.push(p)},n,i.table.core).then(function(){return f})},e)},xe.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Mt(t)?Cr(t,function(){var n=e;return function(i,s){return n===0||(n===1?--n:s(function(){i.advance(n),n=0}),!1)}}):Cr(t,function(){var n=e;return function(){return--n<0}})),this},xe.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Cr(this._ctx,function(){var t=e;return function(n,i,s){return--t<=0&&i(s),0<=t}},!0),this},xe.prototype.until=function(e,t){return $r(this._ctx,function(n,i,s){return!e(n.value)||(i(s),t)}),this},xe.prototype.first=function(e){return this.limit(1).toArray(function(t){return t[0]}).then(e)},xe.prototype.last=function(e){return this.reverse().first(e)},xe.prototype.filter=function(e){var t;return $r(this._ctx,function(n){return e(n.value)}),(t=this._ctx).isMatch=Ot(t.isMatch,e),this},xe.prototype.and=function(e){return this.filter(e)},xe.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},xe.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},xe.prototype.desc=function(){return this.reverse()},xe.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.key,i)})},xe.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},xe.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.primaryKey,i)})},xe.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.key)}).then(function(){return n}).then(e)},xe.prototype.primaryKeys=function(e){var t=this._ctx;if(t.dir==="next"&&Mt(t,!0)&&0<t.limit)return this._read(function(i){var s=Un(t,t.table.core.schema);return t.table.core.query({trans:i,values:!1,limit:t.limit,query:{index:s,range:t.range}})}).then(function(i){return i.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.primaryKey)}).then(function(){return n}).then(e)},xe.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},xe.prototype.firstKey=function(e){return this.limit(1).keys(function(t){return t[0]}).then(e)},xe.prototype.lastKey=function(e){return this.reverse().firstKey(e)},xe.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var t={};return $r(this._ctx,function(s){var i=s.primaryKey.toString(),s=M(t,i);return t[i]=!0,!s}),this},xe.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(i){var s,c,f;f=typeof e=="function"?e:(s=h(e),c=s.length,function(b){for(var k=!1,T=0;T<c;++T){var R=s[T],D=e[R],F=te(b,R);D instanceof en?(U(b,R,D.execute(F)),k=!0):F!==D&&(U(b,R,D),k=!0)}return k});var p=n.table.core,m=p.schema.primaryKey,y=m.outbound,g=m.extractKey,_=200,m=t.db._options.modifyChunkSize;m&&(_=typeof m=="object"?m[p.name]||m["*"]||200:m);function O(b,R){var T=R.failures,R=R.numFailures;w+=b-R;for(var D=0,F=h(T);D<F.length;D++){var z=F[D];v.push(T[z])}}var v=[],w=0,S=[];return t.clone().primaryKeys().then(function(b){function k(R){var D=Math.min(_,b.length-R);return p.getMany({trans:i,keys:b.slice(R,R+D),cache:"immutable"}).then(function(F){for(var z=[],q=[],B=y?[]:null,V=[],Y=0;Y<D;++Y){var X=F[Y],me={value:we(X),primKey:b[R+Y]};f.call(me,me.value,me)!==!1&&(me.value==null?V.push(b[R+Y]):y||Se(g(X),g(me.value))===0?(q.push(me.value),y&&B.push(b[R+Y])):(V.push(b[R+Y]),z.push(me.value)))}return Promise.resolve(0<z.length&&p.mutate({trans:i,type:"add",values:z}).then(function(ve){for(var ge in ve.failures)V.splice(parseInt(ge),1);O(z.length,ve)})).then(function(){return(0<q.length||T&&typeof e=="object")&&p.mutate({trans:i,type:"put",keys:B,values:q,criteria:T,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<R}).then(function(ve){return O(q.length,ve)})}).then(function(){return(0<V.length||T&&e===jr)&&p.mutate({trans:i,type:"delete",keys:V,criteria:T,isAdditionalChunk:0<R}).then(function(ve){return O(V.length,ve)})}).then(function(){return b.length>R+D&&k(R+_)})})}var T=Mt(n)&&n.limit===1/0&&(typeof e!="function"||e===jr)&&{index:n.index,range:n.range};return k(0).then(function(){if(0<v.length)throw new je("Error modifying one or more objects",v,w,S);return b.length})})})},xe.prototype.delete=function(){var e=this._ctx,t=e.range;return Mt(e)&&(e.isPrimKey||t.type===3)?this._write(function(n){var i=e.table.core.schema.primaryKey,s=t;return e.table.core.count({trans:n,query:{index:i,range:s}}).then(function(c){return e.table.core.mutate({trans:n,type:"deleteRange",range:s}).then(function(f){var p=f.failures;if(f.lastResult,f.results,f=f.numFailures,f)throw new je("Could not delete some values",Object.keys(p).map(function(y){return p[y]}),c-f);return c-f})})}):this.modify(jr)},xe);function xe(){}var jr=function(e,t){return t.value=null};function eu(e,t){return e<t?-1:e===t?0:1}function tu(e,t){return t<e?-1:e===t?0:1}function Je(e,t,n){return e=e instanceof xo?new e.Collection(e):e,e._ctx.error=new(n||TypeError)(t),e}function Nt(e){return new e.Collection(e,function(){return So("")}).limit(0)}function Hn(e,t,n,i){var s,c,f,p,y,g,_,m=n.length;if(!n.every(function(w){return typeof w=="string"}))return Je(e,ho);function O(w){s=w==="next"?function(b){return b.toUpperCase()}:function(b){return b.toLowerCase()},c=w==="next"?function(b){return b.toLowerCase()}:function(b){return b.toUpperCase()},f=w==="next"?eu:tu;var S=n.map(function(b){return{lower:c(b),upper:s(b)}}).sort(function(b,k){return f(b.lower,k.lower)});p=S.map(function(b){return b.upper}),y=S.map(function(b){return b.lower}),_=(g=w)==="next"?"":i}O("next"),e=new e.Collection(e,function(){return dt(p[0],y[m-1]+i)}),e._ondirectionchange=function(w){O(w)};var v=0;return e._addAlgorithm(function(w,S,b){var k=w.key;if(typeof k!="string")return!1;var T=c(k);if(t(T,y,v))return!0;for(var R=null,D=v;D<m;++D){var F=function(z,q,B,V,Y,X){for(var me=Math.min(z.length,V.length),ve=-1,ge=0;ge<me;++ge){var Ge=q[ge];if(Ge!==V[ge])return Y(z[ge],B[ge])<0?z.substr(0,ge)+B[ge]+B.substr(ge+1):Y(z[ge],V[ge])<0?z.substr(0,ge)+V[ge]+B.substr(ge+1):0<=ve?z.substr(0,ve)+q[ve]+B.substr(ve+1):null;Y(z[ge],Ge)<0&&(ve=ge)}return me<V.length&&X==="next"?z+B.substr(z.length):me<z.length&&X==="prev"?z.substr(0,B.length):ve<0?null:z.substr(0,ve)+V[ve]+B.substr(ve+1)}(k,T,p[D],y[D],f,g);F===null&&R===null?v=D+1:(R===null||0<f(R,F))&&(R=F)}return S(R!==null?function(){w.continue(R+_)}:b),!1}),e}function dt(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function So(e){return{type:1,lower:e,upper:e}}var xo=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,t,n,i){n=n!==!1,i=i===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(n||i)&&(!n||!i)?Nt(this):new this.Collection(this,function(){return dt(e,t,!n,!i)})}catch{return Je(this,st)}},Ne.prototype.equals=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return So(e)})},Ne.prototype.above=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?Je(this,ho):this.between(e,e+xt,!0,!0)},Ne.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):Hn(this,function(t,n){return t.indexOf(n[0])===0},[e],xt)},Ne.prototype.equalsIgnoreCase=function(e){return Hn(this,function(t,n){return t===n[0]},[e],"")},Ne.prototype.anyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):Hn(this,function(t,n){return n.indexOf(t)!==-1},e,"")},Ne.prototype.startsWithAnyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):Hn(this,function(t,n){return n.some(function(i){return t.indexOf(i)===0})},e,xt)},Ne.prototype.anyOf=function(){var e=this,t=se.apply(oe,arguments),n=this._cmp;try{t.sort(n)}catch{return Je(this,st)}if(t.length===0)return Nt(this);var i=new this.Collection(this,function(){return dt(t[0],t[t.length-1])});i._ondirectionchange=function(c){n=c==="next"?e._ascending:e._descending,t.sort(n)};var s=0;return i._addAlgorithm(function(c,f,p){for(var y=c.key;0<n(y,t[s]);)if(++s===t.length)return f(p),!1;return n(y,t[s])===0||(f(function(){c.continue(t[s])}),!1)}),i},Ne.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ne.prototype.noneOf=function(){var e=se.apply(oe,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Je(this,st)}var t=e.reduce(function(n,i){return n?n.concat([[n[n.length-1][1],i]]):[[-1/0,i]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},Ne.prototype.inAnyRange=function(k,t){var n=this,i=this._cmp,s=this._ascending,c=this._descending,f=this._min,p=this._max;if(k.length===0)return Nt(this);if(!k.every(function(T){return T[0]!==void 0&&T[1]!==void 0&&s(T[0],T[1])<=0}))return Je(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Z.InvalidArgument);var y=!t||t.includeLowers!==!1,g=t&&t.includeUppers===!0,_,m=s;function O(T,R){return m(T[0],R[0])}try{(_=k.reduce(function(T,R){for(var D=0,F=T.length;D<F;++D){var z=T[D];if(i(R[0],z[1])<0&&0<i(R[1],z[0])){z[0]=f(z[0],R[0]),z[1]=p(z[1],R[1]);break}}return D===F&&T.push(R),T},[])).sort(O)}catch{return Je(this,st)}var v=0,w=g?function(T){return 0<s(T,_[v][1])}:function(T){return 0<=s(T,_[v][1])},S=y?function(T){return 0<c(T,_[v][0])}:function(T){return 0<=c(T,_[v][0])},b=w,k=new this.Collection(this,function(){return dt(_[0][0],_[_.length-1][1],!y,!g)});return k._ondirectionchange=function(T){m=T==="next"?(b=w,s):(b=S,c),_.sort(O)},k._addAlgorithm(function(T,R,D){for(var F,z=T.key;b(z);)if(++v===_.length)return R(D),!1;return!w(F=z)&&!S(F)||(n._cmp(z,_[v][1])===0||n._cmp(z,_[v][0])===0||R(function(){m===s?T.continue(_[v][0]):T.continue(_[v][1])}),!1)}),k},Ne.prototype.startsWithAnyOf=function(){var e=se.apply(oe,arguments);return e.every(function(t){return typeof t=="string"})?e.length===0?Nt(this):this.inAnyRange(e.map(function(t){return[t,t+xt]})):Je(this,"startsWithAnyOf() only works with strings")},Ne);function Ne(){}function rt(e){return Te(function(t){return tn(t),e(t.target.error),!1})}function tn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var nn="storagemutated",Mr="x-storagemutated-1",ht=Qt(null,nn),nu=(it.prototype._lock=function(){return _e(!ie.global),++this._reculock,this._reculock!==1||ie.global||(ie.lockOwnerFor=this),this},it.prototype._unlock=function(){if(_e(!ie.global),--this._reculock==0)for(ie.global||(ie.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{St(e[1],e[0])}catch{}}return this},it.prototype._locked=function(){return this._reculock&&ie.lockOwnerFor!==this},it.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,i=this.db._state.dbOpenError;if(_e(!this.idbtrans),!e&&!n)switch(i&&i.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(i);case"MissingAPIError":throw new Z.MissingAPI(i.message,i);default:throw new Z.OpenFailed(i)}if(!this.active)throw new Z.TransactionInactive;return _e(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||n).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Te(function(s){tn(s),t._reject(e.error)}),e.onabort=Te(function(s){tn(s),t.active&&t._reject(new Z.Abort(e.error)),t.active=!1,t.on("abort").fire(s)}),e.oncomplete=Te(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&ht.storagemutated.fire(e.mutatedParts)}),this},it.prototype._promise=function(e,t,n){var i=this;if(e==="readwrite"&&this.mode!=="readwrite")return Pe(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return Pe(new Z.TransactionInactive);if(this._locked())return new W(function(c,f){i._blockedFuncs.push([function(){i._promise(e,t,n).then(c,f)},ie])});if(n)return ct(function(){var c=new W(function(f,p){i._lock();var y=t(f,p,i);y&&y.then&&y.then(f,p)});return c.finally(function(){return i._unlock()}),c._lib=!0,c});var s=new W(function(c,f){var p=t(c,f,i);p&&p.then&&p.then(c,f)});return s._lib=!0,s},it.prototype._root=function(){return this.parent?this.parent._root():this},it.prototype.waitFor=function(e){var t,n=this._root(),i=W.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return i}):(n._waitingFor=i,n._waitingQueue=[],t=n.idbtrans.objectStore(n.storeNames[0]),function c(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(t.get(-1/0).onsuccess=c)}());var s=n._waitingFor;return new W(function(c,f){i.then(function(p){return n._waitingQueue.push(Te(c.bind(null,p)))},function(p){return n._waitingQueue.push(Te(f.bind(null,p)))}).finally(function(){n._waitingFor===s&&(n._waitingFor=null)})})},it.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},it.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];var n=this.schema[e];if(!n)throw new Z.NotFound("Table "+e+" not part of transaction");return n=new this.db.Table(e,n,this),n.core=this.db.core.table(e),t[e]=n},it);function it(){}function Nr(e,t,n,i,s,c,f){return{name:e,keyPath:t,unique:n,multi:i,auto:s,compound:c,src:(n&&!f?"&":"")+(i?"*":"")+(s?"++":"")+Oo(t)}}function Oo(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Fr(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:(i=function(s){return[s.name,s]},n.reduce(function(s,c,f){return f=i(c,f),f&&(s[f[0]]=f[1]),s},{}))};var i}var rn=function(e){try{return e.only([[]]),rn=function(){return[[]]},[[]]}catch{return rn=function(){return xt},xt}};function qr(e){return e==null?function(){}:typeof e=="string"?(t=e).split(".").length===1?function(n){return n[t]}:function(n){return te(n,t)}:function(n){return te(n,e)};var t}function Eo(e){return[].slice.call(e)}var ru=0;function on(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function iu(e,t,y){function i(b){if(b.type===3)return null;if(b.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var v=b.lower,w=b.upper,S=b.lowerOpen,b=b.upperOpen;return v===void 0?w===void 0?null:t.upperBound(w,!!b):w===void 0?t.lowerBound(v,!!S):t.bound(v,w,!!S,!!b)}function s(O){var v,w=O.name;return{name:w,schema:O,mutate:function(S){var b=S.trans,k=S.type,T=S.keys,R=S.values,D=S.range;return new Promise(function(F,z){F=Te(F);var q=b.objectStore(w),B=q.keyPath==null,V=k==="put"||k==="add";if(!V&&k!=="delete"&&k!=="deleteRange")throw new Error("Invalid operation type: "+k);var Y,X=(T||R||{length:1}).length;if(T&&R&&T.length!==R.length)throw new Error("Given keys array must have same length as given values array.");if(X===0)return F({numFailures:0,failures:{},results:[],lastResult:void 0});function me(Ue){++Ge,tn(Ue)}var ve=[],ge=[],Ge=0;if(k==="deleteRange"){if(D.type===4)return F({numFailures:Ge,failures:ge,results:[],lastResult:void 0});D.type===3?ve.push(Y=q.clear()):ve.push(Y=q.delete(i(D)))}else{var B=V?B?[R,T]:[R,null]:[T,null],he=B[0],Ke=B[1];if(V)for(var Ie=0;Ie<X;++Ie)ve.push(Y=Ke&&Ke[Ie]!==void 0?q[k](he[Ie],Ke[Ie]):q[k](he[Ie])),Y.onerror=me;else for(Ie=0;Ie<X;++Ie)ve.push(Y=q[k](he[Ie])),Y.onerror=me}function ir(Ue){Ue=Ue.target.result,ve.forEach(function(Tt,ni){return Tt.error!=null&&(ge[ni]=Tt.error)}),F({numFailures:Ge,failures:ge,results:k==="delete"?T:ve.map(function(Tt){return Tt.result}),lastResult:Ue})}Y.onerror=function(Ue){me(Ue),ir(Ue)},Y.onsuccess=ir})},getMany:function(S){var b=S.trans,k=S.keys;return new Promise(function(T,R){T=Te(T);for(var D,F=b.objectStore(w),z=k.length,q=new Array(z),B=0,V=0,Y=function(ve){ve=ve.target,q[ve._pos]=ve.result,++V===B&&T(q)},X=rt(R),me=0;me<z;++me)k[me]!=null&&((D=F.get(k[me]))._pos=me,D.onsuccess=Y,D.onerror=X,++B);B===0&&T(q)})},get:function(S){var b=S.trans,k=S.key;return new Promise(function(T,R){T=Te(T);var D=b.objectStore(w).get(k);D.onsuccess=function(F){return T(F.target.result)},D.onerror=rt(R)})},query:(v=g,function(S){return new Promise(function(b,k){b=Te(b);var T,R,D,B=S.trans,F=S.values,z=S.limit,Y=S.query,q=z===1/0?void 0:z,V=Y.index,Y=Y.range,B=B.objectStore(w),V=V.isPrimaryKey?B:B.index(V.name),Y=i(Y);if(z===0)return b({result:[]});v?((q=F?V.getAll(Y,q):V.getAllKeys(Y,q)).onsuccess=function(X){return b({result:X.target.result})},q.onerror=rt(k)):(T=0,R=!F&&"openKeyCursor"in V?V.openKeyCursor(Y):V.openCursor(Y),D=[],R.onsuccess=function(X){var me=R.result;return me?(D.push(F?me.value:me.primaryKey),++T===z?b({result:D}):void me.continue()):b({result:D})},R.onerror=rt(k))})}),openCursor:function(S){var b=S.trans,k=S.values,T=S.query,R=S.reverse,D=S.unique;return new Promise(function(F,z){F=Te(F);var V=T.index,q=T.range,B=b.objectStore(w),B=V.isPrimaryKey?B:B.index(V.name),V=R?D?"prevunique":"prev":D?"nextunique":"next",Y=!k&&"openKeyCursor"in B?B.openKeyCursor(i(q),V):B.openCursor(i(q),V);Y.onerror=rt(z),Y.onsuccess=Te(function(X){var me,ve,ge,Ge,he=Y.result;he?(he.___id=++ru,he.done=!1,me=he.continue.bind(he),ve=(ve=he.continuePrimaryKey)&&ve.bind(he),ge=he.advance.bind(he),Ge=function(){throw new Error("Cursor not stopped")},he.trans=b,he.stop=he.continue=he.continuePrimaryKey=he.advance=function(){throw new Error("Cursor not started")},he.fail=Te(z),he.next=function(){var Ke=this,Ie=1;return this.start(function(){return Ie--?Ke.continue():Ke.stop()}).then(function(){return Ke})},he.start=function(Ke){function Ie(){if(Y.result)try{Ke()}catch(Ue){he.fail(Ue)}else he.done=!0,he.start=function(){throw new Error("Cursor behind last entry")},he.stop()}var ir=new Promise(function(Ue,Tt){Ue=Te(Ue),Y.onerror=rt(Tt),he.fail=Tt,he.stop=function(ni){he.stop=he.continue=he.continuePrimaryKey=he.advance=Ge,Ue(ni)}});return Y.onsuccess=Te(function(Ue){Y.onsuccess=Ie,Ie()}),he.continue=me,he.continuePrimaryKey=ve,he.advance=ge,Ie(),ir},F(he)):F(null)},z)})},count:function(S){var b=S.query,k=S.trans,T=b.index,R=b.range;return new Promise(function(D,F){var z=k.objectStore(w),q=T.isPrimaryKey?z:z.index(T.name),z=i(R),q=z?q.count(z):q.count();q.onsuccess=Te(function(B){return D(B.target.result)}),q.onerror=rt(F)})}}}var c,f,p,_=(f=y,p=Eo((c=e).objectStoreNames),{schema:{name:c.name,tables:p.map(function(O){return f.objectStore(O)}).map(function(O){var v=O.keyPath,b=O.autoIncrement,w=x(v),S={},b={name:O.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:v==null,compound:w,keyPath:v,autoIncrement:b,unique:!0,extractKey:qr(v)},indexes:Eo(O.indexNames).map(function(k){return O.index(k)}).map(function(D){var T=D.name,R=D.unique,F=D.multiEntry,D=D.keyPath,F={name:T,compound:x(D),keyPath:D,unique:R,multiEntry:F,extractKey:qr(D)};return S[on(D)]=F}),getIndexByKeyPath:function(k){return S[on(k)]}};return S[":id"]=b.primaryKey,v!=null&&(S[on(v)]=b.primaryKey),b})},hasGetAll:0<p.length&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),y=_.schema,g=_.hasGetAll,_=y.tables.map(s),m={};return _.forEach(function(O){return m[O.name]=O}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(O){if(!m[O])throw new Error("Table '".concat(O,"' not found"));return m[O]},MIN_KEY:-1/0,MAX_KEY:rn(t),schema:y}}function ou(e,t,n,i){var s=n.IDBKeyRange;return n.indexedDB,{dbcore:(i=iu(t,s,i),e.dbcore.reduce(function(c,f){return f=f.create,a(a({},c),f(c))},i))}}function zn(e,i){var n=i.db,i=ou(e._middlewares,n,e._deps,i);e.core=i.dbcore,e.tables.forEach(function(s){var c=s.name;e.core.schema.tables.some(function(f){return f.name===c})&&(s.core=e.core.table(c),e[c]instanceof e.Table&&(e[c].core=s.core))})}function Vn(e,t,n,i){n.forEach(function(s){var c=i[s];t.forEach(function(f){var p=function y(g,_){return E(g,_)||(g=C(g))&&y(g,_)}(f,s);(!p||"value"in p&&p.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?N(f,s,{get:function(){return this.table(s)},set:function(y){ue(this,s,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):f[s]=new e.Table(s,c))})})}function Br(e,t){t.forEach(function(n){for(var i in n)n[i]instanceof e.Table&&delete n[i]})}function su(e,t){return e._cfg.version-t._cfg.version}function au(e,t,n,i){var s=e._dbSchema;n.objectStoreNames.contains("$meta")&&!s.$meta&&(s.$meta=Fr("$meta",To("")[0],[]),e._storeNames.push("$meta"));var c=e._createTransaction("readwrite",e._storeNames,s);c.create(n),c._completion.catch(i);var f=c._reject.bind(c),p=ie.transless||ie;ct(function(){return ie.trans=c,ie.transless=p,t!==0?(zn(e,n),g=t,((y=c).storeNames.includes("$meta")?y.table("$meta").get("version").then(function(_){return _??g}):W.resolve(g)).then(function(_){return O=_,v=c,w=n,S=[],_=(m=e)._versions,b=m._dbSchema=Jn(0,m.idbdb,w),(_=_.filter(function(k){return k._cfg.version>=O})).length!==0?(_.forEach(function(k){S.push(function(){var T=b,R=k._cfg.dbschema;Gn(m,T,w),Gn(m,R,w),b=m._dbSchema=R;var D=Kr(T,R);D.add.forEach(function(V){Ir(w,V[0],V[1].primKey,V[1].indexes)}),D.change.forEach(function(V){if(V.recreate)throw new Z.Upgrade("Not yet support for changing primary key");var Y=w.objectStore(V.name);V.add.forEach(function(X){return Wn(Y,X)}),V.change.forEach(function(X){Y.deleteIndex(X.name),Wn(Y,X)}),V.del.forEach(function(X){return Y.deleteIndex(X)})});var F=k._cfg.contentUpgrade;if(F&&k._cfg.version>O){zn(m,w),v._memoizedTables={};var z=K(R);D.del.forEach(function(V){z[V]=T[V]}),Br(m,[m.Transaction.prototype]),Vn(m,[m.Transaction.prototype],h(z),z),v.schema=z;var q,B=de(F);return B&&Ct(),D=W.follow(function(){var V;(q=F(v))&&B&&(V=lt.bind(null,null),q.then(V,V))}),q&&typeof q.then=="function"?W.resolve(q):D.then(function(){return q})}}),S.push(function(T){var R,D,F=k._cfg.dbschema;R=F,D=T,[].slice.call(D.db.objectStoreNames).forEach(function(z){return R[z]==null&&D.db.deleteObjectStore(z)}),Br(m,[m.Transaction.prototype]),Vn(m,[m.Transaction.prototype],m._storeNames,m._dbSchema),v.schema=m._dbSchema}),S.push(function(T){m.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(m.idbdb.version/10)===k._cfg.version?(m.idbdb.deleteObjectStore("$meta"),delete m._dbSchema.$meta,m._storeNames=m._storeNames.filter(function(R){return R!=="$meta"})):T.objectStore("$meta").put(k._cfg.version,"version"))})}),function k(){return S.length?W.resolve(S.shift()(v.idbtrans)).then(k):W.resolve()}().then(function(){ko(b,w)})):W.resolve();var m,O,v,w,S,b}).catch(f)):(h(s).forEach(function(_){Ir(n,_,s[_].primKey,s[_].indexes)}),zn(e,n),void W.follow(function(){return e.on.populate.fire(c)}).catch(f));var y,g})}function uu(e,t){ko(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=Jn(0,e.idbdb,t);Gn(e,e._dbSchema,t);for(var i=0,s=Kr(n,e._dbSchema).change;i<s.length;i++){var c=function(f){if(f.change.length||f.recreate)return console.warn("Unable to patch indexes of table ".concat(f.name," because it has changes on the type of index or primary key.")),{value:void 0};var p=t.objectStore(f.name);f.add.forEach(function(y){nt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(f.name,".").concat(y.src)),Wn(p,y)})}(s[i]);if(typeof c=="object")return c.value}}function Kr(e,t){var n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){var s=e[n],c=t[n];if(s){var f={name:n,def:c,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(c.primKey.keyPath||"")||s.primKey.auto!==c.primKey.auto)f.recreate=!0,i.change.push(f);else{var p=s.idxByName,y=c.idxByName,g=void 0;for(g in p)y[g]||f.del.push(g);for(g in y){var _=p[g],m=y[g];_?_.src!==m.src&&f.change.push(m):f.add.push(m)}(0<f.del.length||0<f.add.length||0<f.change.length)&&i.change.push(f)}}else i.add.push([n,c])}return i}function Ir(e,t,n,i){var s=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(function(c){return Wn(s,c)}),s}function ko(e,t){h(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(nt&&console.debug("Dexie: Creating missing table",n),Ir(t,n,e[n].primKey,e[n].indexes))})}function Wn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Jn(e,t,n){var i={};return re(t.objectStoreNames,0).forEach(function(s){for(var c=n.objectStore(s),f=Nr(Oo(g=c.keyPath),g||"",!0,!1,!!c.autoIncrement,g&&typeof g!="string",!0),p=[],y=0;y<c.indexNames.length;++y){var _=c.index(c.indexNames[y]),g=_.keyPath,_=Nr(_.name,g,!!_.unique,!!_.multiEntry,!1,g&&typeof g!="string",!1);p.push(_)}i[s]=Fr(s,f,p)}),i}function Gn(e,t,n){for(var i=n.db.objectStoreNames,s=0;s<i.length;++s){var c=i[s],f=n.objectStore(c);e._hasGetAll="getAll"in f;for(var p=0;p<f.indexNames.length;++p){var y=f.indexNames[p],g=f.index(y).keyPath,_=typeof g=="string"?g:"["+re(g).join("+")+"]";!t[c]||(g=t[c].idxByName[_])&&(g.name=y,delete t[c].idxByName[_],t[c].idxByName[y]=g)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function To(e){return e.split(",").map(function(t,n){var i=(t=t.trim()).replace(/([&*]|\+\+)/g,""),s=/^\[/.test(i)?i.match(/^\[(.*)\]$/)[1].split("+"):i;return Nr(i,s||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),x(s),n===0)})}var cu=(Xn.prototype._parseStoresSpec=function(e,t){h(e).forEach(function(n){if(e[n]!==null){var i=To(e[n]),s=i.shift();if(s.unique=!0,s.multi)throw new Z.Schema("Primary key cannot be multi-valued");i.forEach(function(c){if(c.auto)throw new Z.Schema("Only primary key can be marked as autoIncrement (++)");if(!c.keyPath)throw new Z.Schema("Index must have a name and cannot be an empty string")}),t[n]=Fr(n,s,i)}})},Xn.prototype.stores=function(n){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,n):n;var n=t._versions,i={},s={};return n.forEach(function(c){P(i,c._cfg.storesSource),s=c._cfg.dbschema={},c._parseStoresSpec(i,s)}),t._dbSchema=s,Br(t,[t._allTables,t,t.Transaction.prototype]),Vn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],h(s),s),t._storeNames=h(s),this},Xn.prototype.upgrade=function(e){return this._cfg.contentUpgrade=$n(this._cfg.contentUpgrade||ye,e),this},Xn);function Xn(){}function Lr(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new at(In,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function Ur(e){return e&&typeof e.databases=="function"}function Yr(e){return ct(function(){return ie.letThrough=!0,e()})}function Hr(e){return!("from"in e)}var Be=function(e,t){if(!this){var n=new Be;return e&&"d"in e&&P(n,e),n}P(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function sn(e,t,n){var i=Se(t,n);if(!isNaN(i)){if(0<i)throw RangeError();if(Hr(e))return P(e,{from:t,to:n,d:1});var s=e.l,i=e.r;if(Se(n,e.from)<0)return s?sn(s,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ao(e);if(0<Se(t,e.to))return i?sn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ao(e);Se(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),0<Se(n,e.to)&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,s&&!e.l&&an(e,s),i&&n&&an(e,i)}}function an(e,t){Hr(t)||function n(i,y){var c=y.from,f=y.to,p=y.l,y=y.r;sn(i,c,f),p&&n(i,p),y&&n(i,y)}(e,t)}function Ro(e,t){var n=Qn(t),i=n.next();if(i.done)return!1;for(var s=i.value,c=Qn(e),f=c.next(s.from),p=f.value;!i.done&&!f.done;){if(Se(p.from,s.to)<=0&&0<=Se(p.to,s.from))return!0;Se(s.from,p.from)<0?s=(i=n.next(p.from)).value:p=(f=c.next(s.from)).value}return!1}function Qn(e){var t=Hr(e)?null:{s:0,n:e};return{next:function(n){for(var i=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,i)for(;t.n.l&&Se(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!i||Se(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Ao(e){var t,n,i=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),s=1<i?"r":i<-1?"l":"";s&&(t=s=="r"?"l":"r",n=a({},e),i=e[s],e.from=i.from,e.to=i.to,e[s]=i[s],n[s]=i[t],(e[t]=n).d=Po(n)),e.d=Po(e)}function Po(n){var t=n.r,n=n.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}function Zn(e,t){return h(t).forEach(function(n){e[n]?an(e[n],t[n]):e[n]=function i(s){var c,f,p={};for(c in s)M(s,c)&&(f=s[c],p[c]=!f||typeof f!="object"||ne.has(f.constructor)?f:i(f));return p}(t[n])}),e}function zr(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&Ro(t[n],e[n])})}ae(Be.prototype,((Qe={add:function(e){return an(this,e),this},addKey:function(e){return sn(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return sn(t,n,n)}),this},hasKey:function(e){var t=Qn(this).next(e).value;return t&&Se(t.from,e)<=0&&0<=Se(t.to,e)}})[I]=function(){return Qn(this)},Qe));var Et={},Vr={},Wr=!1;function er(e){Zn(Vr,e),Wr||(Wr=!0,setTimeout(function(){Wr=!1,Jr(Vr,!(Vr={}))},0))}function Jr(e,t){t===void 0&&(t=!1);var n=new Set;if(e.all)for(var i=0,s=Object.values(Et);i<s.length;i++)Do(f=s[i],e,n,t);else for(var c in e){var f,p=/^idb\:\/\/(.*)\/(.*)\//.exec(c);p&&(c=p[1],p=p[2],(f=Et["idb://".concat(c,"/").concat(p)])&&Do(f,e,n,t))}n.forEach(function(y){return y()})}function Do(e,t,n,i){for(var s=[],c=0,f=Object.entries(e.queries.query);c<f.length;c++){for(var p=f[c],y=p[0],g=[],_=0,m=p[1];_<m.length;_++){var O=m[_];zr(t,O.obsSet)?O.subscribers.forEach(function(b){return n.add(b)}):i&&g.push(O)}i&&s.push([y,g])}if(i)for(var v=0,w=s;v<w.length;v++){var S=w[v],y=S[0],g=S[1];e.queries.query[y]=g}}function lu(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?Pe(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var i=t.openCanceller,s=Math.round(10*e.verno),c=!1;function f(){if(t.openCanceller!==i)throw new Z.DatabaseClosed("db.open() was cancelled")}function p(){return new W(function(O,v){if(f(),!n)throw new Z.MissingAPI;var w=e.name,S=t.autoSchema||!s?n.open(w):n.open(w,s);if(!S)throw new Z.MissingAPI;S.onerror=rt(v),S.onblocked=Te(e._fireOnBlocked),S.onupgradeneeded=Te(function(b){var k;_=S.transaction,t.autoSchema&&!e._options.allowEmptyDB?(S.onerror=tn,_.abort(),S.result.close(),(k=n.deleteDatabase(w)).onsuccess=k.onerror=Te(function(){v(new Z.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(_.onerror=rt(v),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,m=b<1,e.idbdb=S.result,c&&uu(e,_),au(e,b/10,_,v))},v),S.onsuccess=Te(function(){_=null;var b,k,T,R,D,F=e.idbdb=S.result,z=re(F.objectStoreNames);if(0<z.length)try{var q=F.transaction((R=z).length===1?R[0]:R,"readonly");if(t.autoSchema)k=F,T=q,(b=e).verno=k.version/10,T=b._dbSchema=Jn(0,k,T),b._storeNames=re(k.objectStoreNames,0),Vn(b,[b._allTables],h(T),T);else if(Gn(e,e._dbSchema,q),((D=Kr(Jn(0,(D=e).idbdb,q),D._dbSchema)).add.length||D.change.some(function(B){return B.add.length||B.change.length}))&&!c)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),F.close(),s=F.version+1,c=!0,O(p());zn(e,q)}catch{}jt.push(e),F.onversionchange=Te(function(B){t.vcFired=!0,e.on("versionchange").fire(B)}),F.onclose=Te(function(B){e.on("close").fire(B)}),m&&(D=e._deps,q=w,F=D.indexedDB,D=D.IDBKeyRange,Ur(F)||q===In||Lr(F,D).put({name:q}).catch(ye)),O()},v)}).catch(function(O){switch(O==null?void 0:O.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),p();break;case"VersionError":if(0<s)return s=0,p()}return W.reject(O)})}var y,g=t.dbReadyResolve,_=null,m=!1;return W.race([i,(typeof navigator>"u"?W.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(O){function v(){return indexedDB.databases().finally(O)}y=setInterval(v,100),v()}).finally(function(){return clearInterval(y)}):Promise.resolve()).then(p)]).then(function(){return f(),t.onReadyBeingFired=[],W.resolve(Yr(function(){return e.on.ready.fire(e.vip)})).then(function O(){if(0<t.onReadyBeingFired.length){var v=t.onReadyBeingFired.reduce($n,ye);return t.onReadyBeingFired=[],W.resolve(Yr(function(){return v(e.vip)})).then(O)}})}).finally(function(){t.openCanceller===i&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(O){t.dbOpenError=O;try{_&&_.abort()}catch{}return i===t.openCanceller&&e._close(),Pe(O)}).finally(function(){t.openComplete=!0,g()}).then(function(){var O;return m&&(O={},e.tables.forEach(function(v){v.schema.indexes.forEach(function(w){w.name&&(O["idb://".concat(e.name,"/").concat(v.name,"/").concat(w.name)]=new Be(-1/0,[[[]]]))}),O["idb://".concat(e.name,"/").concat(v.name,"/")]=O["idb://".concat(e.name,"/").concat(v.name,"/:dels")]=new Be(-1/0,[[[]]])}),ht(nn).fire(O),Jr(O,!0)),e})}function Gr(e){function t(c){return e.next(c)}var n=s(t),i=s(function(c){return e.throw(c)});function s(c){return function(y){var p=c(y),y=p.value;return p.done?y:y&&typeof y.then=="function"?y.then(n,i):x(y)?Promise.all(y).then(n,i):n(y)}}return s(t)()}function tr(e,t,n){for(var i=x(e)?e.slice():[e],s=0;s<n;++s)i.push(t);return i}var fu={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema,s={},c=[];function f(m,O,v){var w=on(m),S=s[w]=s[w]||[],b=m==null?0:typeof m=="string"?1:m.length,k=0<O,k=a(a({},v),{name:k?"".concat(w,"(virtual-from:").concat(v.name,")"):v.name,lowLevelIndex:v,isVirtual:k,keyTail:O,keyLength:b,extractKey:qr(m),unique:!k&&v.unique});return S.push(k),k.isPrimaryKey||c.push(k),1<b&&f(b===2?m[0]:m.slice(0,b-1),O+1,v),S.sort(function(T,R){return T.keyTail-R.keyTail}),k}t=f(i.primaryKey.keyPath,0,i.primaryKey),s[":id"]=[t];for(var p=0,y=i.indexes;p<y.length;p++){var g=y[p];f(g.keyPath,0,g)}function _(m){var O,v=m.query.index;return v.isVirtual?a(a({},m),{query:{index:v.lowLevelIndex,range:(O=m.query.range,v=v.keyTail,{type:O.type===1?2:O.type,lower:tr(O.lower,O.lowerOpen?e.MAX_KEY:e.MIN_KEY,v),lowerOpen:!0,upper:tr(O.upper,O.upperOpen?e.MIN_KEY:e.MAX_KEY,v),upperOpen:!0})}}):m}return a(a({},n),{schema:a(a({},i),{primaryKey:t,indexes:c,getIndexByKeyPath:function(m){return(m=s[on(m)])&&m[0]}}),count:function(m){return n.count(_(m))},query:function(m){return n.query(_(m))},openCursor:function(m){var O=m.query.index,v=O.keyTail,w=O.isVirtual,S=O.keyLength;return w?n.openCursor(_(m)).then(function(k){return k&&b(k)}):n.openCursor(m);function b(k){return Object.create(k,{continue:{value:function(T){T!=null?k.continue(tr(T,m.reverse?e.MAX_KEY:e.MIN_KEY,v)):m.unique?k.continue(k.key.slice(0,S).concat(m.reverse?e.MIN_KEY:e.MAX_KEY,v)):k.continue()}},continuePrimaryKey:{value:function(T,R){k.continuePrimaryKey(tr(T,e.MAX_KEY,v),R)}},primaryKey:{get:function(){return k.primaryKey}},key:{get:function(){var T=k.key;return S===1?T[0]:T.slice(0,S)}},value:{get:function(){return k.value}}})}}})}})}};function Xr(e,t,n,i){return n=n||{},i=i||"",h(e).forEach(function(s){var c,f,p;M(t,s)?(c=e[s],f=t[s],typeof c=="object"&&typeof f=="object"&&c&&f?(p=H(c))!==H(f)?n[i+s]=t[s]:p==="Object"?Xr(c,f,n,i+s+"."):c!==f&&(n[i+s]=t[s]):c!==f&&(n[i+s]=t[s])):n[i+s]=void 0}),h(t).forEach(function(s){M(e,s)||(n[i+s]=t[s])}),n}function Qr(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var du={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema.primaryKey;return a(a({},n),{mutate:function(s){var c=ie.trans,f=c.table(t).hook,p=f.deleting,y=f.creating,g=f.updating;switch(s.type){case"add":if(y.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"put":if(y.fire===ye&&g.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"delete":if(p.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"deleteRange":if(p.fire===ye)break;return c._promise("readwrite",function(){return function m(O,v,w){return n.query({trans:O,values:!1,query:{index:i,range:v},limit:w}).then(function(S){var b=S.result;return _({type:"delete",keys:b,trans:O}).then(function(k){return 0<k.numFailures?Promise.reject(k.failures[0]):b.length<w?{failures:[],numFailures:0,lastResult:void 0}:m(O,a(a({},v),{lower:b[b.length-1],lowerOpen:!0}),w)})})}(s.trans,s.range,1e4)},!0)}return n.mutate(s);function _(m){var O,v,w,S=ie.trans,b=m.keys||Qr(i,m);if(!b)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?a(a({},m),{keys:b}):a({},m)).type!=="delete"&&(m.values=l([],m.values)),m.keys&&(m.keys=l([],m.keys)),O=n,w=b,((v=m).type==="add"?Promise.resolve([]):O.getMany({trans:v.trans,keys:w,cache:"immutable"})).then(function(k){var T=b.map(function(R,D){var F,z,q,B=k[D],V={onerror:null,onsuccess:null};return m.type==="delete"?p.fire.call(V,R,B,S):m.type==="add"||B===void 0?(F=y.fire.call(V,R,m.values[D],S),R==null&&F!=null&&(m.keys[D]=R=F,i.outbound||U(m.values[D],i.keyPath,R))):(F=Xr(B,m.values[D]),(z=g.fire.call(V,F,R,B,S))&&(q=m.values[D],Object.keys(z).forEach(function(Y){M(q,Y)?q[Y]=z[Y]:U(q,Y,z[Y])}))),V});return n.mutate(m).then(function(R){for(var D=R.failures,F=R.results,z=R.numFailures,R=R.lastResult,q=0;q<b.length;++q){var B=(F||b)[q],V=T[q];B==null?V.onerror&&V.onerror(D[q]):V.onsuccess&&V.onsuccess(m.type==="put"&&k[q]?m.values[q]:B)}return{failures:D,results:F,numFailures:z,lastResult:R}}).catch(function(R){return T.forEach(function(D){return D.onerror&&D.onerror(R)}),Promise.reject(R)})})}}})}})}};function $o(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var i=[],s=0,c=0;s<t.keys.length&&c<e.length;++s)Se(t.keys[s],e[c])===0&&(i.push(n?we(t.values[s]):t.values[s]),++c);return i.length===e.length?i:null}catch{return null}}var hu={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return a(a({},n),{getMany:function(i){if(!i.cache)return n.getMany(i);var s=$o(i.keys,i.trans._cache,i.cache==="clone");return s?W.resolve(s):n.getMany(i).then(function(c){return i.trans._cache={keys:i.keys,values:i.cache==="clone"?we(c):c},c})},mutate:function(i){return i.type!=="add"&&(i.trans._cache=null),n.mutate(i)}})}}}};function Co(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function jo(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var pu={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,n=new Be(e.MIN_KEY,e.MAX_KEY);return a(a({},e),{transaction:function(i,s,c){if(ie.subscr&&s!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ie.querier));return e.transaction(i,s,c)},table:function(i){var s=e.table(i),c=s.schema,f=c.primaryKey,m=c.indexes,p=f.extractKey,y=f.outbound,g=f.autoIncrement&&m.filter(function(v){return v.compound&&v.keyPath.includes(f.keyPath)}),_=a(a({},s),{mutate:function(v){function w(Y){return Y="idb://".concat(t,"/").concat(i,"/").concat(Y),R[Y]||(R[Y]=new Be)}var S,b,k,T=v.trans,R=v.mutatedParts||(v.mutatedParts={}),D=w(""),F=w(":dels"),z=v.type,V=v.type==="deleteRange"?[v.range]:v.type==="delete"?[v.keys]:v.values.length<50?[Qr(f,v).filter(function(Y){return Y}),v.values]:[],q=V[0],B=V[1],V=v.trans._cache;return x(q)?(D.addKeys(q),(V=z==="delete"||q.length===B.length?$o(q,V):null)||F.addKeys(q),(V||B)&&(S=w,b=V,k=B,c.indexes.forEach(function(Y){var X=S(Y.name||"");function me(ge){return ge!=null?Y.extractKey(ge):null}function ve(ge){return Y.multiEntry&&x(ge)?ge.forEach(function(Ge){return X.addKey(Ge)}):X.addKey(ge)}(b||k).forEach(function(ge,Ke){var he=b&&me(b[Ke]),Ke=k&&me(k[Ke]);Se(he,Ke)!==0&&(he!=null&&ve(he),Ke!=null&&ve(Ke))})}))):q?(B={from:(B=q.lower)!==null&&B!==void 0?B:e.MIN_KEY,to:(B=q.upper)!==null&&B!==void 0?B:e.MAX_KEY},F.add(B),D.add(B)):(D.add(n),F.add(n),c.indexes.forEach(function(Y){return w(Y.name).add(n)})),s.mutate(v).then(function(Y){return!q||v.type!=="add"&&v.type!=="put"||(D.addKeys(Y.results),g&&g.forEach(function(X){for(var me=v.values.map(function(he){return X.extractKey(he)}),ve=X.keyPath.findIndex(function(he){return he===f.keyPath}),ge=0,Ge=Y.results.length;ge<Ge;++ge)me[ge][ve]=Y.results[ge];w(X.name).addKeys(me)})),T.mutatedParts=Zn(T.mutatedParts||{},R),Y})}}),m=function(w){var S=w.query,w=S.index,S=S.range;return[w,new Be((w=S.lower)!==null&&w!==void 0?w:e.MIN_KEY,(S=S.upper)!==null&&S!==void 0?S:e.MAX_KEY)]},O={get:function(v){return[f,new Be(v.key)]},getMany:function(v){return[f,new Be().addKeys(v.keys)]},count:m,query:m,openCursor:m};return h(O).forEach(function(v){_[v]=function(w){var S=ie.subscr,b=!!S,k=Co(ie,s)&&jo(v,w)?w.obsSet={}:S;if(b){var T=function(B){return B="idb://".concat(t,"/").concat(i,"/").concat(B),k[B]||(k[B]=new Be)},R=T(""),D=T(":dels"),S=O[v](w),b=S[0],S=S[1];if((v==="query"&&b.isPrimaryKey&&!w.values?D:T(b.name||"")).add(S),!b.isPrimaryKey){if(v!=="count"){var F=v==="query"&&y&&w.values&&s.query(a(a({},w),{values:!1}));return s[v].apply(this,arguments).then(function(B){if(v==="query"){if(y&&w.values)return F.then(function(me){return me=me.result,R.addKeys(me),B});var V=w.values?B.result.map(p):B.result;(w.values?R:D).addKeys(V)}else if(v==="openCursor"){var Y=B,X=w.values;return Y&&Object.create(Y,{key:{get:function(){return D.addKey(Y.primaryKey),Y.key}},primaryKey:{get:function(){var me=Y.primaryKey;return D.addKey(me),me}},value:{get:function(){return X&&R.addKey(Y.primaryKey),Y.value}}})}return B})}D.add(n)}}return s[v].apply(this,arguments)}}),_}})}};function Mo(e,t,n){if(n.numFailures===0)return t;if(t.type==="deleteRange")return null;var i=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return n.numFailures===i?null:(t=a({},t),x(t.keys)&&(t.keys=t.keys.filter(function(s,c){return!(c in n.failures)})),"values"in t&&x(t.values)&&(t.values=t.values.filter(function(s,c){return!(c in n.failures)})),t)}function Zr(e,t){return n=e,((i=t).lower===void 0||(i.lowerOpen?0<Se(n,i.lower):0<=Se(n,i.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?Se(e,t.upper)<0:Se(e,t.upper)<=0));var n,i}function No(e,t,O,i,s,c){if(!O||O.length===0)return e;var f=t.query.index,p=f.multiEntry,y=t.query.range,g=i.schema.primaryKey.extractKey,_=f.extractKey,m=(f.lowLevelIndex||f).extractKey,O=O.reduce(function(v,w){var S=v,b=[];if(w.type==="add"||w.type==="put")for(var k=new Be,T=w.values.length-1;0<=T;--T){var R,D=w.values[T],F=g(D);k.hasKey(F)||(R=_(D),(p&&x(R)?R.some(function(Y){return Zr(Y,y)}):Zr(R,y))&&(k.addKey(F),b.push(D)))}switch(w.type){case"add":var z=new Be().addKeys(t.values?v.map(function(X){return g(X)}):v),S=v.concat(t.values?b.filter(function(X){return X=g(X),!z.hasKey(X)&&(z.addKey(X),!0)}):b.map(function(X){return g(X)}).filter(function(X){return!z.hasKey(X)&&(z.addKey(X),!0)}));break;case"put":var q=new Be().addKeys(w.values.map(function(X){return g(X)}));S=v.filter(function(X){return!q.hasKey(t.values?g(X):X)}).concat(t.values?b:b.map(function(X){return g(X)}));break;case"delete":var B=new Be().addKeys(w.keys);S=v.filter(function(X){return!B.hasKey(t.values?g(X):X)});break;case"deleteRange":var V=w.range;S=v.filter(function(X){return!Zr(g(X),V)})}return S},e);return O===e?e:(O.sort(function(v,w){return Se(m(v),m(w))||Se(g(v),g(w))}),t.limit&&t.limit<1/0&&(O.length>t.limit?O.length=t.limit:e.length===t.limit&&O.length<t.limit&&(s.dirty=!0)),c?Object.freeze(O):O)}function Fo(e,t){return Se(e.lower,t.lower)===0&&Se(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function mu(e,t){return function(n,i,s,c){if(n===void 0)return i!==void 0?-1:0;if(i===void 0)return 1;if((i=Se(n,i))===0){if(s&&c)return 0;if(s)return 1;if(c)return-1}return i}(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=function(n,i,s,c){if(n===void 0)return i!==void 0?1:0;if(i===void 0)return-1;if((i=Se(n,i))===0){if(s&&c)return 0;if(s)return-1;if(c)return 1}return i}(e.upper,t.upper,e.upperOpen,t.upperOpen)}function yu(e,t,n,i){e.subscribers.add(n),i.addEventListener("abort",function(){var s,c;e.subscribers.delete(n),e.subscribers.size===0&&(s=e,c=t,setTimeout(function(){s.subscribers.size===0&&L(c,s)},3e3))})}var vu={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return a(a({},e),{transaction:function(n,i,s){var c,f,p=e.transaction(n,i,s);return i==="readwrite"&&(f=(c=new AbortController).signal,s=function(y){return function(){if(c.abort(),i==="readwrite"){for(var g=new Set,_=0,m=n;_<m.length;_++){var O=m[_],v=Et["idb://".concat(t,"/").concat(O)];if(v){var w=e.table(O),S=v.optimisticOps.filter(function(X){return X.trans===p});if(p._explicit&&y&&p.mutatedParts)for(var b=0,k=Object.values(v.queries.query);b<k.length;b++)for(var T=0,R=(z=k[b]).slice();T<R.length;T++)zr((q=R[T]).obsSet,p.mutatedParts)&&(L(z,q),q.subscribers.forEach(function(X){return g.add(X)}));else if(0<S.length){v.optimisticOps=v.optimisticOps.filter(function(X){return X.trans!==p});for(var D=0,F=Object.values(v.queries.query);D<F.length;D++)for(var z,q,B,V=0,Y=(z=F[D]).slice();V<Y.length;V++)(q=Y[V]).res!=null&&p.mutatedParts&&(y&&!q.dirty?(B=Object.isFrozen(q.res),B=No(q.res,q.req,S,w,q,B),q.dirty?(L(z,q),q.subscribers.forEach(function(X){return g.add(X)})):B!==q.res&&(q.res=B,q.promise=W.resolve({result:B}))):(q.dirty&&L(z,q),q.subscribers.forEach(function(X){return g.add(X)})))}}}g.forEach(function(X){return X()})}}},p.addEventListener("abort",s(!1),{signal:f}),p.addEventListener("error",s(!1),{signal:f}),p.addEventListener("complete",s(!0),{signal:f})),p},table:function(n){var i=e.table(n),s=i.schema.primaryKey;return a(a({},i),{mutate:function(c){var f=ie.trans;if(s.outbound||f.db._options.cache==="disabled"||f.explicit||f.idbtrans.mode!=="readwrite")return i.mutate(c);var p=Et["idb://".concat(t,"/").concat(n)];return p?(f=i.mutate(c),c.type!=="add"&&c.type!=="put"||!(50<=c.values.length||Qr(s,c).some(function(y){return y==null}))?(p.optimisticOps.push(c),c.mutatedParts&&er(c.mutatedParts),f.then(function(y){0<y.numFailures&&(L(p.optimisticOps,c),(y=Mo(0,c,y))&&p.optimisticOps.push(y),c.mutatedParts&&er(c.mutatedParts))}),f.catch(function(){L(p.optimisticOps,c),c.mutatedParts&&er(c.mutatedParts)})):f.then(function(y){var g=Mo(0,a(a({},c),{values:c.values.map(function(_,m){var O;return y.failures[m]?_:(_=(O=s.keyPath)!==null&&O!==void 0&&O.includes(".")?we(_):a({},_),U(_,s.keyPath,y.results[m]),_)})}),y);p.optimisticOps.push(g),queueMicrotask(function(){return c.mutatedParts&&er(c.mutatedParts)})}),f):i.mutate(c)},query:function(c){if(!Co(ie,i)||!jo("query",c))return i.query(c);var f=((g=ie.trans)===null||g===void 0?void 0:g.db._options.cache)==="immutable",m=ie,p=m.requery,y=m.signal,g=function(w,S,b,k){var T=Et["idb://".concat(w,"/").concat(S)];if(!T)return[];if(!(S=T.queries[b]))return[null,!1,T,null];var R=S[(k.query?k.query.index.name:null)||""];if(!R)return[null,!1,T,null];switch(b){case"query":var D=R.find(function(F){return F.req.limit===k.limit&&F.req.values===k.values&&Fo(F.req.query.range,k.query.range)});return D?[D,!0,T,R]:[R.find(function(F){return("limit"in F.req?F.req.limit:1/0)>=k.limit&&(!k.values||F.req.values)&&mu(F.req.query.range,k.query.range)}),!1,T,R];case"count":return D=R.find(function(F){return Fo(F.req.query.range,k.query.range)}),[D,!!D,T,R]}}(t,n,"query",c),_=g[0],m=g[1],O=g[2],v=g[3];return _&&m?_.obsSet=c.obsSet:(m=i.query(c).then(function(w){var S=w.result;if(_&&(_.res=S),f){for(var b=0,k=S.length;b<k;++b)Object.freeze(S[b]);Object.freeze(S)}else w.result=we(S);return w}).catch(function(w){return v&&_&&L(v,_),Promise.reject(w)}),_={obsSet:c.obsSet,promise:m,subscribers:new Set,type:"query",req:c,dirty:!1},v?v.push(_):(v=[_],(O=O||(Et["idb://".concat(t,"/").concat(n)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[c.query.index.name||""]=v)),yu(_,v,p,y),_.promise.then(function(w){return{result:No(w.result,c,O==null?void 0:O.optimisticOps,i,_,f)}})}})}})}};function nr(e,t){return new Proxy(e,{get:function(n,i,s){return i==="db"?t:Reflect.get(n,i,s)}})}var at=(De.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Z.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Z.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(i){return i._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(su),n.stores({}),this._state.autoSchema=!1,n)},De.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||ie.letThrough||this._vip)?e():new W(function(n,i){if(t._state.openComplete)return i(new Z.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void i(new Z.DatabaseClosed);t.open().catch(ye)}t._state.dbReadyPromise.then(n,i)}).then(e)},De.prototype.use=function(e){var t=e.stack,n=e.create,i=e.level,s=e.name;return s&&this.unuse({stack:t,name:s}),e=this._middlewares[t]||(this._middlewares[t]=[]),e.push({stack:t,create:n,level:i??10,name:s}),e.sort(function(c,f){return c.level-f.level}),this},De.prototype.unuse=function(e){var t=e.stack,n=e.name,i=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(s){return i?s.create!==i:!!n&&s.name!==n})),this},De.prototype.open=function(){var e=this;return St(ut,function(){return lu(e)})},De.prototype._close=function(){var e=this._state,t=jt.indexOf(this);if(0<=t&&jt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new W(function(n){e.dbReadyResolve=n}),e.openCanceller=new W(function(n,i){e.cancelOpen=i}))},De.prototype.close=function(n){var t=(n===void 0?{disableAutoOpen:!0}:n).disableAutoOpen,n=this._state;t?(n.isBeingOpened&&n.cancelOpen(new Z.DatabaseClosed),this._close(),n.autoOpen=!1,n.dbOpenError=new Z.DatabaseClosed):(this._close(),n.autoOpen=this._options.autoOpen||n.isBeingOpened,n.openComplete=!1,n.dbOpenError=null)},De.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=0<arguments.length&&typeof arguments[0]!="object",i=this._state;return new W(function(s,c){function f(){t.close(e);var p=t._deps.indexedDB.deleteDatabase(t.name);p.onsuccess=Te(function(){var y,g,_;y=t._deps,g=t.name,_=y.indexedDB,y=y.IDBKeyRange,Ur(_)||g===In||Lr(_,y).delete(g).catch(ye),s()}),p.onerror=rt(c),p.onblocked=t._fireOnBlocked}if(n)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");i.isBeingOpened?i.dbReadyPromise.then(f):f()})},De.prototype.backendDB=function(){return this.idbdb},De.prototype.isOpen=function(){return this.idbdb!==null},De.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},De.prototype.hasFailed=function(){return this._state.dbOpenError!==null},De.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(De.prototype,"tables",{get:function(){var e=this;return h(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),De.prototype.transaction=function(){var e=(function(t,n,i){var s=arguments.length;if(s<2)throw new Z.InvalidArgument("Too few arguments");for(var c=new Array(s-1);--s;)c[s-1]=arguments[s];return i=c.pop(),[t,le(c),i]}).apply(this,arguments);return this._transaction.apply(this,e)},De.prototype._transaction=function(e,t,n){var i=this,s=ie.trans;s&&s.db===this&&e.indexOf("!")===-1||(s=null);var c,f,p=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(f=t.map(function(g){if(g=g instanceof i.Table?g.name:g,typeof g!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return g}),e=="r"||e===Pr)c=Pr;else{if(e!="rw"&&e!=Dr)throw new Z.InvalidArgument("Invalid transaction mode: "+e);c=Dr}if(s){if(s.mode===Pr&&c===Dr){if(!p)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&f.forEach(function(g){if(s&&s.storeNames.indexOf(g)===-1){if(!p)throw new Z.SubTransaction("Table "+g+" not included in parent transaction.");s=null}}),p&&s&&!s.active&&(s=null)}}catch(g){return s?s._promise(null,function(_,m){m(g)}):Pe(g)}var y=(function g(_,m,O,v,w){return W.resolve().then(function(){var S=ie.transless||ie,b=_._createTransaction(m,O,_._dbSchema,v);if(b.explicit=!0,S={trans:b,transless:S},v)b.idbtrans=v.idbtrans;else try{b.create(),b.idbtrans._explicit=!0,_._state.PR1398_maxLoop=3}catch(R){return R.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,null,w)})):Pe(R)}var k,T=de(w);return T&&Ct(),S=W.follow(function(){var R;(k=w.call(b,b))&&(T?(R=lt.bind(null,null),k.then(R,R)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Gr(k)))},S),(k&&typeof k.then=="function"?W.resolve(k).then(function(R){return b.active?R:Pe(new Z.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):S.then(function(){return k})).then(function(R){return v&&b._resolve(),b._completion.then(function(){return R})}).catch(function(R){return b._reject(R),Pe(R)})})}).bind(null,this,c,f,s,n);return s?s._promise(c,y,"lock"):ie.trans?St(ie.transless,function(){return i._whenReady(y)}):this._whenReady(y)},De.prototype.table=function(e){if(!M(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},De);function De(e,t){var n=this;this._middlewares={},this.verno=0;var i=De.dependencies;this._options=t=a({addons:De.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},i=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s,c,f,p,y,g={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ye,dbReadyPromise:null,cancelOpen:ye,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t.autoOpen};g.dbReadyPromise=new W(function(m){g.dbReadyResolve=m}),g.openCanceller=new W(function(m,O){g.cancelOpen=O}),this._state=g,this.name=e,this.on=Qt(this,"populate","blocked","versionchange","close",{ready:[$n,ye]}),this.on.ready.subscribe=G(this.on.ready.subscribe,function(m){return function(O,v){De.vip(function(){var w,S=n._state;S.openComplete?(S.dbOpenError||W.resolve().then(O),v&&m(O)):S.onReadyBeingFired?(S.onReadyBeingFired.push(O),v&&m(O)):(m(O),w=n,v||m(function b(){w.on.ready.unsubscribe(O),w.on.ready.unsubscribe(b)}))})}}),this.Collection=(s=this,Zt(Za.prototype,function(k,b){this.db=s;var v=po,w=null;if(b)try{v=b()}catch(T){w=T}var S=k._ctx,b=S.table,k=b.hook.reading.fire;this._ctx={table:b,index:S.index,isPrimKey:!S.index||b.schema.primKey.keyPath&&S.index===b.schema.primKey.name,range:v,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:w,or:S.or,valueMapper:k!==He?k:null}})),this.Table=(c=this,Zt(go.prototype,function(m,O,v){this.db=c,this._tx=v,this.name=m,this.schema=O,this.hook=c._allTables[m]?c._allTables[m].hook:Qt(null,{creating:[Yt,ye],reading:[Pt,He],updating:[zt,ye],deleting:[Ht,ye]})})),this.Transaction=(f=this,Zt(nu.prototype,function(m,O,v,w,S){var b=this;this.db=f,this.mode=m,this.storeNames=O,this.schema=v,this.chromeTransactionDurability=w,this.idbtrans=null,this.on=Qt(this,"complete","error","abort"),this.parent=S||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new W(function(k,T){b._resolve=k,b._reject=T}),this._completion.then(function(){b.active=!1,b.on.complete.fire()},function(k){var T=b.active;return b.active=!1,b.on.error.fire(k),b.parent?b.parent._reject(k):T&&b.idbtrans&&b.idbtrans.abort(),Pe(k)})})),this.Version=(p=this,Zt(cu.prototype,function(m){this.db=p,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,Zt(xo.prototype,function(m,O,v){if(this.db=y,this._ctx={table:m,index:O===":id"?null:O,or:v},this._cmp=this._ascending=Se,this._descending=function(w,S){return Se(S,w)},this._max=function(w,S){return 0<Se(w,S)?w:S},this._min=function(w,S){return Se(w,S)<0?w:S},this._IDBKeyRange=y._deps.IDBKeyRange,!this._IDBKeyRange)throw new Z.MissingAPI})),this.on("versionchange",function(m){0<m.newVersion?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})}),this.on("blocked",function(m){!m.newVersion||m.newVersion<m.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(m.oldVersion/10))}),this._maxKey=rn(t.IDBKeyRange),this._createTransaction=function(m,O,v,w){return new n.Transaction(m,O,v,n._options.chromeTransactionDurability,w)},this._fireOnBlocked=function(m){n.on("blocked").fire(m),jt.filter(function(O){return O.name===n.name&&O!==n&&!O._state.vcFired}).map(function(O){return O.on("versionchange").fire(m)})},this.use(hu),this.use(vu),this.use(pu),this.use(fu),this.use(du);var _=new Proxy(this,{get:function(m,O,v){if(O==="_vip")return!0;if(O==="table")return function(S){return nr(n.table(S),_)};var w=Reflect.get(m,O,v);return w instanceof go?nr(w,_):O==="tables"?w.map(function(S){return nr(S,_)}):O==="_createTransaction"?function(){return nr(w.apply(this,arguments),_)}:w}});this.vip=_,i.forEach(function(m){return m(n)})}var rr,Qe=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",gu=(ei.prototype.subscribe=function(e,t,n){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:n})},ei.prototype[Qe]=function(){return this},ei);function ei(e){this._subscribe=e}try{rr={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{rr={indexedDB:null,IDBKeyRange:null}}function qo(e){var t,n=!1,i=new gu(function(s){var c=de(e),f,p=!1,y={},g={},_={get closed(){return p},unsubscribe:function(){p||(p=!0,f&&f.abort(),m&&ht.storagemutated.unsubscribe(v))}};s.start&&s.start(_);var m=!1,O=function(){return Ar(w)},v=function(S){Zn(y,S),zr(g,y)&&O()},w=function(){var S,b,k;!p&&rr.indexedDB&&(y={},S={},f&&f.abort(),f=new AbortController,k=function(T){var R=Dt();try{c&&Ct();var D=ct(e,T);return D=c?D.finally(lt):D}finally{R&&$t()}}(b={subscr:S,signal:f.signal,requery:O,querier:e,trans:null}),Promise.resolve(k).then(function(T){n=!0,t=T,p||b.signal.aborted||(y={},function(R){for(var D in R)if(M(R,D))return;return 1}(g=S)||m||(ht(nn,v),m=!0),Ar(function(){return!p&&s.next&&s.next(T)}))},function(T){n=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||p||Ar(function(){p||s.error&&s.error(T)})}))};return setTimeout(O,0),_});return i.hasValue=function(){return n},i.getValue=function(){return t},i}var kt=at;function ti(e){var t=pt;try{pt=!0,ht.storagemutated.fire(e),Jr(e,!0)}finally{pt=t}}ae(kt,a(a({},Fe),{delete:function(e){return new kt(e,{addons:[]}).delete()},exists:function(e){return new kt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=kt.dependencies,n=t.indexedDB,t=t.IDBKeyRange,(Ur(n)?Promise.resolve(n.databases()).then(function(i){return i.map(function(s){return s.name}).filter(function(s){return s!==In})}):Lr(n,t).toCollection().primaryKeys()).then(e)}catch{return Pe(new Z.MissingAPI)}var t,n},defineClass:function(){return function(e){P(this,e)}},ignoreTransaction:function(e){return ie.trans?St(ie.transless,e):e()},vip:Yr,async:function(e){return function(){try{var t=Gr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:W.resolve(t)}catch(n){return Pe(n)}}},spawn:function(e,t,n){try{var i=Gr(e.apply(n,t||[]));return i&&typeof i.then=="function"?i:W.resolve(i)}catch(s){return Pe(s)}},currentTransaction:{get:function(){return ie.trans||null}},waitFor:function(e,t){return t=W.resolve(typeof e=="function"?kt.ignoreTransaction(e):e).timeout(t||6e4),ie.trans?ie.trans.waitFor(t):t},Promise:W,debug:{get:function(){return nt},set:function(e){so(e)}},derive:j,extend:P,props:ae,override:G,Events:Qt,on:ht,liveQuery:qo,extendObservabilitySet:Zn,getByKeyPath:te,setByKeyPath:U,delByKeyPath:function(e,t){typeof t=="string"?U(e,t,void 0):"length"in t&&[].map.call(t,function(n){U(e,n,void 0)})},shallowClone:K,deepClone:we,getObjectDiff:Xr,cmp:Se,asap:fe,minKey:-1/0,addons:[],connections:jt,errnames:We,dependencies:rr,cache:Et,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,2*n)})})),kt.maxKey=rn(kt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ht(nn,function(e){pt||(e=new CustomEvent(Mr,{detail:e}),pt=!0,dispatchEvent(e),pt=!1)}),addEventListener(Mr,function(e){e=e.detail,pt||ti(e)}));var Ft,pt=!1,Bo=function(){};return typeof BroadcastChannel<"u"&&((Bo=function(){(Ft=new BroadcastChannel(Mr)).onmessage=function(e){return e.data&&ti(e.data)}})(),typeof Ft.unref=="function"&&Ft.unref(),ht(nn,function(e){pt||Ft.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!at.disableBfCache&&e.persisted){nt&&console.debug("Dexie: handling persisted pagehide"),Ft!=null&&Ft.close();for(var t=0,n=jt;t<n.length;t++)n[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!at.disableBfCache&&e.persisted&&(nt&&console.debug("Dexie: handling persisted pageshow"),Bo(),ti({all:new Be(-1/0,[[]])}))})),W.rejectionMapper=function(e,t){return!e||e instanceof Oe||e instanceof TypeError||e instanceof SyntaxError||!e.name||!$e[e.name]?e:(t=new $e[e.name](t||e.message,e),"stack"in e&&N(t,"stack",{get:function(){return this.inner.stack}}),t)},so(nt),a(at,Object.freeze({__proto__:null,Dexie:at,liveQuery:qo,Entity:mo,cmp:Se,PropModification:en,replacePrefix:function(e,t){return new en({replacePrefix:[e,t]})},add:function(e){return new en({add:e})},remove:function(e){return new en({remove:e})},default:at,RangeSet:Be,mergeRanges:an,rangesOverlap:Ro}),{default:at}),at})}(hn)),hn.exports}var ss=os();const or=Ze(ss),ui=Symbol.for("Dexie"),pn=globalThis[ui]||(globalThis[ui]=or);if(or.semVer!==pn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${or.semVer} and ${pn.semVer}`);const{liveQuery:Su,mergeRanges:xu,rangesOverlap:Ou,RangeSet:Eu,cmp:ku,Entity:Tu,PropModification:Ru,replacePrefix:Au,add:Pu,remove:Du}=pn;class ci extends pn{constructor(){super("db");Ko(this,"rows");this.version(1).stores({rows:"++id, key"})}}const mn=new ci,li=(r,o=!0)=>mn.rows.where({key:r}).first().then(u=>o?u==null?void 0:u.value:u),as=Object.freeze(Object.defineProperty({__proto__:null,SubDexie:ci,db:mn,get:li,set:async(r,o)=>{await li(r,!1)?await mn.rows.where({key:r}).modify({value:o}):await mn.rows.add({key:r,value:o})}},Symbol.toStringTag,{value:"Module"})),us=Object.freeze(Object.defineProperty({__proto__:null,fail:r=>{throw new Error(r)},find:(r,o,u="")=>{var a;return((a=r.find(l=>l.value==(Array.isArray(o)?o[0]:o)))==null?void 0:a.label)??u},log:(r,o)=>{o?console.log(o,r):console.log(r)},sleep:r=>new Promise(o=>setTimeout(o,r)),url:{search:()=>new URLSearchParams(location.search),open:(r,o,u)=>{o=o||"_blank",window.open(r,o,u)}}},Symbol.toStringTag,{value:"Module"})),cs=Object.freeze(Object.defineProperty({__proto__:null,download:(r,o)=>{const u=document.createElement("a");u.href=URL.createObjectURL(o),u.download=r,u.click(),URL.revokeObjectURL(u.href)},toBase64:r=>new Promise((o,u)=>{const a=new FileReader;a.onload=l=>{var d;return o((d=l.target)==null?void 0:d.result)},a.onerror=l=>{var d;return u((d=l.target)==null?void 0:d.error)},a.readAsDataURL(r)}).then(o=>o),toBlob:r=>{const o=atob(r.split(",")[1]||r),u=new Uint8Array(o.length);for(let a=0;a<o.length;a++)u[a]=o.charCodeAt(a);return new Blob([u])}},Symbol.toStringTag,{value:"Module"}));var yn={},vn={},sr,fi;function di(){if(fi)return sr;fi=1,sr=r;function r(u,a){if(a!=="$")for(var l=o(a),d=0;d<l.length;d++)a=l[d].toString().replace(/\\"/g,'"'),!(typeof u[a]>"u"&&d!==l.length-1)&&(u=u[a]);return u}function o(u){for(var a=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,l=[],d;d=a.exec(u);)l.push(d[1]||d[2]||d[3]);return l}return sr}var qt={},hi;function ls(){if(hi)return qt;hi=1;var r=di(),o=yi();return qt.getRegexFlags=function(a){var l="";return a.ignoreCase&&(l+="i"),a.global&&(l+="g"),a.multiline&&(l+="m"),l},qt.stringifyFunction=function(a,l){if(typeof l=="function")return l(a);var d=a.toString(),h=d.match(/^[^{]*{|^[^=]*=>/),x=h?h[0]:"<function> ",P=d[d.length-1]==="}"?"}":"";return x.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+P},qt.restore=function(a,l){var d=a[0],h=a.slice(1);switch(d){case"$":return r(l,a);case"r":var x=h.indexOf(","),P=h.slice(0,x),C=h.slice(x+1);return RegExp(C,P);case"d":return new Date(+h);case"f":var $=function(){throw new Error("can't run jsan parsed function")};return $.toString=function(){return h},$;case"u":return;case"e":var M=new Error(h);return M.stack="Stack is unavailable for jsan parsed errors",M;case"s":return Symbol(h);case"g":return Symbol.for(h);case"m":return new Map(o.parse(h));case"l":return new Set(o.parse(h));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",a),a}},qt}var pi;function fs(){if(pi)return vn;pi=1,di();var r=ls(),o=typeof WeakMap<"u"?WeakMap:function(){var u=[],a=[];return{set:function(l,d){u.push(l),a.push(d)},get:function(l){for(var d=0;d<u.length;d++)if(u[d]===l)return a[d]}}};return vn.decycle=function u(a,l,d,h){h=h||new o;var x=!Object.prototype.hasOwnProperty.call(l,"circular"),P=l.refs!==!1;return function C($,M,ae){var ue,N,j,E=typeof d=="function"?d(ae||"",$):$;if(l.date&&E instanceof Date)return{$jsan:"d"+E.getTime()};if(l.regex&&E instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(E)+","+E.source};if(l.function&&typeof E=="function")return{$jsan:"f"+r.stringifyFunction(E,l.function)};if(l.nan&&typeof E=="number"&&isNaN(E))return{$jsan:"n"};if(l.infinity){if(Number.POSITIVE_INFINITY===E)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===E)return{$jsan:"y"}}if(l.undefined&&E===void 0)return{$jsan:"u"};if(l.error&&E instanceof Error)return{$jsan:"e"+E.message};if(l.symbol&&typeof E=="symbol"){var J=Symbol.keyFor(E);return J!==void 0?{$jsan:"g"+J}:{$jsan:"s"+E.toString().slice(7,-1)}}if(l.map&&typeof Map=="function"&&E instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(u(Array.from(E),l,d,h))};if(l.set&&typeof Set=="function"&&E instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(u(Array.from(E),l,d,h))};if(E&&typeof E.toJSON=="function")try{E=E.toJSON(ae)}catch{var re=ae||"$";return"toJSON failed for '"+(h.get(E)||re)+"'"}if(typeof E=="object"&&E!==null&&!(E instanceof Boolean)&&!(E instanceof Date)&&!(E instanceof Number)&&!(E instanceof RegExp)&&!(E instanceof String)&&typeof E!="symbol"&&!(E instanceof Error)){if(typeof E=="object"){var G=h.get(E);if(G){if(x&&P)return{$jsan:G};var _e=M.split(".").slice(0,-1).join(".");if(_e.indexOf(G)===0)return x?{$jsan:G}:typeof l.circular=="function"?l.circular(E,M,G):l.circular;if(P)return{$jsan:G}}h.set(E,M)}if(Object.prototype.toString.apply(E)==="[object Array]")for(j=[],ue=0;ue<E.length;ue+=1)j[ue]=C(E[ue],M+"["+ue+"]",ue);else{j={};for(N in E)if(Object.prototype.hasOwnProperty.call(E,N)){var fe=/^\w+$/.test(N)?"."+N:"["+JSON.stringify(N)+"]";j[N]=N==="$jsan"?[C(E[N],M+fe)]:C(E[N],M+fe,N)}}return j}return E}(a,"$")},vn.retrocycle=function(a){return function l(d){var h,x,P;if(d&&typeof d=="object")if(Object.prototype.toString.apply(d)==="[object Array]")for(h=0;h<d.length;h+=1)x=d[h],x&&typeof x=="object"&&(x.$jsan?d[h]=r.restore(x.$jsan,a):l(x));else for(P in d){if(typeof d[P]=="string"&&P==="$jsan")return r.restore(d.$jsan,a);P==="$jsan"&&(d[P]=d[P][0]),typeof d[P]=="object"&&(x=d[P],x&&typeof x=="object"&&(x.$jsan?d[P]=r.restore(x.$jsan,a):l(x)))}return d}(a)},vn}var mi;function yi(){if(mi)return yn;mi=1;var r=fs();return yn.stringify=function(u,a,l,d){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(u):JSON.stringify.apply(JSON,arguments)}catch{}var h=d||!1;typeof h=="boolean"&&(h={date:h,function:h,regex:h,undefined:h,error:h,symbol:h,map:h,set:h,nan:h,infinity:h});var x=r.decycle(u,h,a);return arguments.length===1?JSON.stringify(x):JSON.stringify(x,Array.isArray(a)?a:null,l)},yn.parse=function(u,a){var l=/"\$jsan"/.test(u),d;return arguments.length===1?d=JSON.parse(u):d=JSON.parse(u,a),l&&(d=r.retrocycle(d)),d},yn}var ar,vi;function ds(){return vi||(vi=1,ar=yi()),ar}var hs=ds();const gi=Ze(hs),ur=(r=null,o,u,a=!0)=>gi.stringify(r,o,u,a),bi=(r,o)=>gi.parse(r,o),ps=Object.freeze(Object.defineProperty({__proto__:null,parse:bi,stringify:ur},Symbol.toStringTag,{value:"Module"}));let cr;typeof window>"u"&&(cr=require("crypto"));const ms=Object.freeze(Object.defineProperty({__proto__:null,SHA256:async(r,o=!0)=>{const u=o?ur(r):r;if(typeof window<"u"){const l=new TextEncoder().encode(u),d=await cr.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(d)).map(P=>P.toString(16).padStart(2,"0")).join("")}else{const a=cr.createHash("sha256");return a.update(u),a.digest("hex")}}},Symbol.toStringTag,{value:"Module"}));function wi(r,o){return function(){return r.apply(o,arguments)}}const{toString:ys}=Object.prototype,{getPrototypeOf:lr}=Object,gn=(r=>o=>{const u=ys.call(o);return r[u]||(r[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),et=r=>(r=r.toLowerCase(),o=>gn(o)===r),bn=r=>o=>typeof o===r,{isArray:Rt}=Array,Bt=bn("undefined");function vs(r){return r!==null&&!Bt(r)&&r.constructor!==null&&!Bt(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const _i=et("ArrayBuffer");function gs(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&_i(r.buffer),o}const bs=bn("string"),Ve=bn("function"),Si=bn("number"),wn=r=>r!==null&&typeof r=="object",ws=r=>r===!0||r===!1,_n=r=>{if(gn(r)!=="object")return!1;const o=lr(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},_s=et("Date"),Ss=et("File"),xs=et("Blob"),Os=et("FileList"),Es=r=>wn(r)&&Ve(r.pipe),ks=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((o=gn(r))==="formdata"||o==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},Ts=et("URLSearchParams"),[Rs,As,Ps,Ds]=["ReadableStream","Request","Response","Headers"].map(et),$s=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kt(r,o,{allOwnKeys:u=!1}={}){if(r===null||typeof r>"u")return;let a,l;if(typeof r!="object"&&(r=[r]),Rt(r))for(a=0,l=r.length;a<l;a++)o.call(null,r[a],a,r);else{const d=u?Object.getOwnPropertyNames(r):Object.keys(r),h=d.length;let x;for(a=0;a<h;a++)x=d[a],o.call(null,r[x],x,r)}}function xi(r,o){o=o.toLowerCase();const u=Object.keys(r);let a=u.length,l;for(;a-- >0;)if(l=u[a],o===l.toLowerCase())return l;return null}const mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oi=r=>!Bt(r)&&r!==mt;function fr(){const{caseless:r}=Oi(this)&&this||{},o={},u=(a,l)=>{const d=r&&xi(o,l)||l;_n(o[d])&&_n(a)?o[d]=fr(o[d],a):_n(a)?o[d]=fr({},a):Rt(a)?o[d]=a.slice():o[d]=a};for(let a=0,l=arguments.length;a<l;a++)arguments[a]&&Kt(arguments[a],u);return o}const Cs=(r,o,u,{allOwnKeys:a}={})=>(Kt(o,(l,d)=>{u&&Ve(l)?r[d]=wi(l,u):r[d]=l},{allOwnKeys:a}),r),js=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Ms=(r,o,u,a)=>{r.prototype=Object.create(o.prototype,a),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),u&&Object.assign(r.prototype,u)},Ns=(r,o,u,a)=>{let l,d,h;const x={};if(o=o||{},r==null)return o;do{for(l=Object.getOwnPropertyNames(r),d=l.length;d-- >0;)h=l[d],(!a||a(h,r,o))&&!x[h]&&(o[h]=r[h],x[h]=!0);r=u!==!1&&lr(r)}while(r&&(!u||u(r,o))&&r!==Object.prototype);return o},Fs=(r,o,u)=>{r=String(r),(u===void 0||u>r.length)&&(u=r.length),u-=o.length;const a=r.indexOf(o,u);return a!==-1&&a===u},qs=r=>{if(!r)return null;if(Rt(r))return r;let o=r.length;if(!Si(o))return null;const u=new Array(o);for(;o-- >0;)u[o]=r[o];return u},Bs=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&lr(Uint8Array)),Ks=(r,o)=>{const a=(r&&r[Symbol.iterator]).call(r);let l;for(;(l=a.next())&&!l.done;){const d=l.value;o.call(r,d[0],d[1])}},Is=(r,o)=>{let u;const a=[];for(;(u=r.exec(o))!==null;)a.push(u);return a},Ls=et("HTMLFormElement"),Us=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,a,l){return a.toUpperCase()+l}),Ei=(({hasOwnProperty:r})=>(o,u)=>r.call(o,u))(Object.prototype),Ys=et("RegExp"),ki=(r,o)=>{const u=Object.getOwnPropertyDescriptors(r),a={};Kt(u,(l,d)=>{let h;(h=o(l,d,r))!==!1&&(a[d]=h||l)}),Object.defineProperties(r,a)},Hs=r=>{ki(r,(o,u)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const a=r[u];if(Ve(a)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},zs=(r,o)=>{const u={},a=l=>{l.forEach(d=>{u[d]=!0})};return Rt(r)?a(r):a(String(r).split(o)),u},Vs=()=>{},Ws=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function Js(r){return!!(r&&Ve(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Gs=r=>{const o=new Array(10),u=(a,l)=>{if(wn(a)){if(o.indexOf(a)>=0)return;if(!("toJSON"in a)){o[l]=a;const d=Rt(a)?[]:{};return Kt(a,(h,x)=>{const P=u(h,l+1);!Bt(P)&&(d[x]=P)}),o[l]=void 0,d}}return a};return u(r,0)},Xs=et("AsyncFunction"),Qs=r=>r&&(wn(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Ti=((r,o)=>r?setImmediate:o?((u,a)=>(mt.addEventListener("message",({source:l,data:d})=>{l===mt&&d===u&&a.length&&a.shift()()},!1),l=>{a.push(l),mt.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ve(mt.postMessage)),Zs=typeof queueMicrotask<"u"?queueMicrotask.bind(mt):typeof process<"u"&&process.nextTick||Ti,A={isArray:Rt,isArrayBuffer:_i,isBuffer:vs,isFormData:ks,isArrayBufferView:gs,isString:bs,isNumber:Si,isBoolean:ws,isObject:wn,isPlainObject:_n,isReadableStream:Rs,isRequest:As,isResponse:Ps,isHeaders:Ds,isUndefined:Bt,isDate:_s,isFile:Ss,isBlob:xs,isRegExp:Ys,isFunction:Ve,isStream:Es,isURLSearchParams:Ts,isTypedArray:Bs,isFileList:Os,forEach:Kt,merge:fr,extend:Cs,trim:$s,stripBOM:js,inherits:Ms,toFlatObject:Ns,kindOf:gn,kindOfTest:et,endsWith:Fs,toArray:qs,forEachEntry:Ks,matchAll:Is,isHTMLForm:Ls,hasOwnProperty:Ei,hasOwnProp:Ei,reduceDescriptors:ki,freezeMethods:Hs,toObjectSet:zs,toCamelCase:Us,noop:Vs,toFiniteNumber:Ws,findKey:xi,global:mt,isContextDefined:Oi,isSpecCompliantForm:Js,toJSONObject:Gs,isAsyncFn:Xs,isThenable:Qs,setImmediate:Ti,asap:Zs};function pe(r,o,u,a,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),u&&(this.config=u),a&&(this.request=a),l&&(this.response=l,this.status=l.status?l.status:null)}A.inherits(pe,Error,{toJSON:function(){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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Ri=pe.prototype,Ai={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Ai[r]={value:r}}),Object.defineProperties(pe,Ai),Object.defineProperty(Ri,"isAxiosError",{value:!0}),pe.from=(r,o,u,a,l,d)=>{const h=Object.create(Ri);return A.toFlatObject(r,h,function(P){return P!==Error.prototype},x=>x!=="isAxiosError"),pe.call(h,r.message,o,u,a,l),h.cause=r,h.name=r.name,d&&Object.assign(h,d),h};const ea=null;function dr(r){return A.isPlainObject(r)||A.isArray(r)}function Pi(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function Di(r,o,u){return r?r.concat(o).map(function(l,d){return l=Pi(l),!u&&d?"["+l+"]":l}).join(u?".":""):o}function ta(r){return A.isArray(r)&&!r.some(dr)}const na=A.toFlatObject(A,{},null,function(o){return/^is[A-Z]/.test(o)});function Sn(r,o,u){if(!A.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,u=A.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,E){return!A.isUndefined(E[j])});const a=u.metaTokens,l=u.visitor||$,d=u.dots,h=u.indexes,P=(u.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(o);if(!A.isFunction(l))throw new TypeError("visitor must be a function");function C(N){if(N===null)return"";if(A.isDate(N))return N.toISOString();if(!P&&A.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(N)||A.isTypedArray(N)?P&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function $(N,j,E){let J=N;if(N&&!E&&typeof N=="object"){if(A.endsWith(j,"{}"))j=a?j:j.slice(0,-2),N=JSON.stringify(N);else if(A.isArray(N)&&ta(N)||(A.isFileList(N)||A.endsWith(j,"[]"))&&(J=A.toArray(N)))return j=Pi(j),J.forEach(function(G,_e){!(A.isUndefined(G)||G===null)&&o.append(h===!0?Di([j],_e,d):h===null?j:j+"[]",C(G))}),!1}return dr(N)?!0:(o.append(Di(E,j,d),C(N)),!1)}const M=[],ae=Object.assign(na,{defaultVisitor:$,convertValue:C,isVisitable:dr});function ue(N,j){if(!A.isUndefined(N)){if(M.indexOf(N)!==-1)throw Error("Circular reference detected in "+j.join("."));M.push(N),A.forEach(N,function(J,re){(!(A.isUndefined(J)||J===null)&&l.call(o,J,A.isString(re)?re.trim():re,j,ae))===!0&&ue(J,j?j.concat(re):[re])}),M.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return ue(r),o}function $i(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function hr(r,o){this._pairs=[],r&&Sn(r,this,o)}const Ci=hr.prototype;Ci.append=function(o,u){this._pairs.push([o,u])},Ci.toString=function(o){const u=o?function(a){return o.call(this,a,$i)}:$i;return this._pairs.map(function(l){return u(l[0])+"="+u(l[1])},"").join("&")};function ra(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ji(r,o,u){if(!o)return r;const a=u&&u.encode||ra;A.isFunction(u)&&(u={serialize:u});const l=u&&u.serialize;let d;if(l?d=l(o,u):d=A.isURLSearchParams(o)?o.toString():new hr(o,u).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Mi{constructor(){this.handlers=[]}use(o,u,a){return this.handlers.push({fulfilled:o,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){A.forEach(this.handlers,function(a){a!==null&&o(a)})}}const Ni={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ia={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},pr=typeof window<"u"&&typeof document<"u",mr=typeof navigator=="object"&&navigator||void 0,oa=pr&&(!mr||["ReactNative","NativeScript","NS"].indexOf(mr.product)<0),sa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aa=pr&&window.location.href||"http://localhost",qe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pr,hasStandardBrowserEnv:oa,hasStandardBrowserWebWorkerEnv:sa,navigator:mr,origin:aa},Symbol.toStringTag,{value:"Module"})),...ia};function ua(r,o){return Sn(r,new qe.classes.URLSearchParams,Object.assign({visitor:function(u,a,l,d){return qe.isNode&&A.isBuffer(u)?(this.append(a,u.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},o))}function ca(r){return A.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function la(r){const o={},u=Object.keys(r);let a;const l=u.length;let d;for(a=0;a<l;a++)d=u[a],o[d]=r[d];return o}function Fi(r){function o(u,a,l,d){let h=u[d++];if(h==="__proto__")return!0;const x=Number.isFinite(+h),P=d>=u.length;return h=!h&&A.isArray(l)?l.length:h,P?(A.hasOwnProp(l,h)?l[h]=[l[h],a]:l[h]=a,!x):((!l[h]||!A.isObject(l[h]))&&(l[h]=[]),o(u,a,l[h],d)&&A.isArray(l[h])&&(l[h]=la(l[h])),!x)}if(A.isFormData(r)&&A.isFunction(r.entries)){const u={};return A.forEachEntry(r,(a,l)=>{o(ca(a),l,u,0)}),u}return null}function fa(r,o,u){if(A.isString(r))try{return(o||JSON.parse)(r),A.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(u||JSON.stringify)(r)}const It={transitional:Ni,adapter:["xhr","http","fetch"],transformRequest:[function(o,u){const a=u.getContentType()||"",l=a.indexOf("application/json")>-1,d=A.isObject(o);if(d&&A.isHTMLForm(o)&&(o=new FormData(o)),A.isFormData(o))return l?JSON.stringify(Fi(o)):o;if(A.isArrayBuffer(o)||A.isBuffer(o)||A.isStream(o)||A.isFile(o)||A.isBlob(o)||A.isReadableStream(o))return o;if(A.isArrayBufferView(o))return o.buffer;if(A.isURLSearchParams(o))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let x;if(d){if(a.indexOf("application/x-www-form-urlencoded")>-1)return ua(o,this.formSerializer).toString();if((x=A.isFileList(o))||a.indexOf("multipart/form-data")>-1){const P=this.env&&this.env.FormData;return Sn(x?{"files[]":o}:o,P&&new P,this.formSerializer)}}return d||l?(u.setContentType("application/json",!1),fa(o)):o}],transformResponse:[function(o){const u=this.transitional||It.transitional,a=u&&u.forcedJSONParsing,l=this.responseType==="json";if(A.isResponse(o)||A.isReadableStream(o))return o;if(o&&A.isString(o)&&(a&&!this.responseType||l)){const h=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(o)}catch(x){if(h)throw x.name==="SyntaxError"?pe.from(x,pe.ERR_BAD_RESPONSE,this,null,this.response):x}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],r=>{It.headers[r]={}});const da=A.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"]),ha=r=>{const o={};let u,a,l;return r&&r.split(`
|
|
4
|
-
`).forEach(function(h){l=h.indexOf(":"),u=h.substring(0,l).trim().toLowerCase(),a=h.substring(l+1).trim(),!(!u||o[u]
|
|
5
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...u){const a=new this(o);return u.forEach(l=>a.set(l)),a}static accessor(o){const a=(this[qi]=this[qi]={accessors:{}}).accessors,l=this.prototype;function d(h){const x=Lt(h);a[x]||(va(l,h),a[x]=!0)}return A.isArray(o)?o.forEach(d):d(o),this}};Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Ye.prototype,({value:r},o)=>{let u=o[0].toUpperCase()+o.slice(1);return{get:()=>r,set(a){this[u]=a}}}),A.freezeMethods(Ye);function vr(r,o){const u=this||It,a=o||u,l=Ye.from(a.headers);let d=a.data;return A.forEach(r,function(x){d=x.call(u,d,l.normalize(),o?o.status:void 0)}),l.normalize(),d}function Bi(r){return!!(r&&r.__CANCEL__)}function At(r,o,u){pe.call(this,r??"canceled",pe.ERR_CANCELED,o,u),this.name="CanceledError"}A.inherits(At,pe,{__CANCEL__:!0});function Ki(r,o,u){const a=u.config.validateStatus;!u.status||!a||a(u.status)?r(u):o(new pe("Request failed with status code "+u.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}function ga(r){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return o&&o[1]||""}function ba(r,o){r=r||10;const u=new Array(r),a=new Array(r);let l=0,d=0,h;return o=o!==void 0?o:1e3,function(P){const C=Date.now(),$=a[d];h||(h=C),u[l]=P,a[l]=C;let M=d,ae=0;for(;M!==l;)ae+=u[M++],M=M%r;if(l=(l+1)%r,l===d&&(d=(d+1)%r),C-h<o)return;const ue=$&&C-$;return ue?Math.round(ae*1e3/ue):void 0}}function wa(r,o){let u=0,a=1e3/o,l,d;const h=(C,$=Date.now())=>{u=$,l=null,d&&(clearTimeout(d),d=null),r.apply(null,C)};return[(...C)=>{const $=Date.now(),M=$-u;M>=a?h(C,$):(l=C,d||(d=setTimeout(()=>{d=null,h(l)},a-M)))},()=>l&&h(l)]}const On=(r,o,u=3)=>{let a=0;const l=ba(50,250);return wa(d=>{const h=d.loaded,x=d.lengthComputable?d.total:void 0,P=h-a,C=l(P),$=h<=x;a=h;const M={loaded:h,total:x,progress:x?h/x:void 0,bytes:P,rate:C||void 0,estimated:C&&x&&$?(x-h)/C:void 0,event:d,lengthComputable:x!=null,[o?"download":"upload"]:!0};r(M)},u)},Ii=(r,o)=>{const u=r!=null;return[a=>o[0]({lengthComputable:u,total:r,loaded:a}),o[1]]},Li=r=>(...o)=>A.asap(()=>r(...o)),_a=qe.hasStandardBrowserEnv?((r,o)=>u=>(u=new URL(u,qe.origin),r.protocol===u.protocol&&r.host===u.host&&(o||r.port===u.port)))(new URL(qe.origin),qe.navigator&&/(msie|trident)/i.test(qe.navigator.userAgent)):()=>!0,Sa=qe.hasStandardBrowserEnv?{write(r,o,u,a,l,d){const h=[r+"="+encodeURIComponent(o)];A.isNumber(u)&&h.push("expires="+new Date(u).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(l)&&h.push("domain="+l),d===!0&&h.push("secure"),document.cookie=h.join("; ")},read(r){const o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xa(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Oa(r,o){return o?r.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):r}function Ui(r,o,u){let a=!xa(o);return r&&a||u==!1?Oa(r,o):o}const Yi=r=>r instanceof Ye?{...r}:r;function yt(r,o){o=o||{};const u={};function a(C,$,M,ae){return A.isPlainObject(C)&&A.isPlainObject($)?A.merge.call({caseless:ae},C,$):A.isPlainObject($)?A.merge({},$):A.isArray($)?$.slice():$}function l(C,$,M,ae){if(A.isUndefined($)){if(!A.isUndefined(C))return a(void 0,C,M,ae)}else return a(C,$,M,ae)}function d(C,$){if(!A.isUndefined($))return a(void 0,$)}function h(C,$){if(A.isUndefined($)){if(!A.isUndefined(C))return a(void 0,C)}else return a(void 0,$)}function x(C,$,M){if(M in o)return a(C,$);if(M in r)return a(void 0,C)}const P={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:x,headers:(C,$,M)=>l(Yi(C),Yi($),M,!0)};return A.forEach(Object.keys(Object.assign({},r,o)),function($){const M=P[$]||l,ae=M(r[$],o[$],$);A.isUndefined(ae)&&M!==x||(u[$]=ae)}),u}const Hi=r=>{const o=yt({},r);let{data:u,withXSRFToken:a,xsrfHeaderName:l,xsrfCookieName:d,headers:h,auth:x}=o;o.headers=h=Ye.from(h),o.url=ji(Ui(o.baseURL,o.url),r.params,r.paramsSerializer),x&&h.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let P;if(A.isFormData(u)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if((P=h.getContentType())!==!1){const[C,...$]=P?P.split(";").map(M=>M.trim()).filter(Boolean):[];h.setContentType([C||"multipart/form-data",...$].join("; "))}}if(qe.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(o)),a||a!==!1&&_a(o.url))){const C=l&&d&&Sa.read(d);C&&h.set(l,C)}return o},Ea=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(u,a){const l=Hi(r);let d=l.data;const h=Ye.from(l.headers).normalize();let{responseType:x,onUploadProgress:P,onDownloadProgress:C}=l,$,M,ae,ue,N;function j(){ue&&ue(),N&&N(),l.cancelToken&&l.cancelToken.unsubscribe($),l.signal&&l.signal.removeEventListener("abort",$)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function J(){if(!E)return;const G=Ye.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),fe={data:!x||x==="text"||x==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:G,config:r,request:E};Ki(function(U){u(U),j()},function(U){a(U),j()},fe),E=null}"onloadend"in E?E.onloadend=J:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(J)},E.onabort=function(){E&&(a(new pe("Request aborted",pe.ECONNABORTED,r,E)),E=null)},E.onerror=function(){a(new pe("Network Error",pe.ERR_NETWORK,r,E)),E=null},E.ontimeout=function(){let _e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const fe=l.transitional||Ni;l.timeoutErrorMessage&&(_e=l.timeoutErrorMessage),a(new pe(_e,fe.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,r,E)),E=null},d===void 0&&h.setContentType(null),"setRequestHeader"in E&&A.forEach(h.toJSON(),function(_e,fe){E.setRequestHeader(fe,_e)}),A.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),x&&x!=="json"&&(E.responseType=l.responseType),C&&([ae,N]=On(C,!0),E.addEventListener("progress",ae)),P&&E.upload&&([M,ue]=On(P),E.upload.addEventListener("progress",M),E.upload.addEventListener("loadend",ue)),(l.cancelToken||l.signal)&&($=G=>{E&&(a(!G||G.type?new At(null,r,E):G),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe($),l.signal&&(l.signal.aborted?$():l.signal.addEventListener("abort",$)));const re=ga(l.url);if(re&&qe.protocols.indexOf(re)===-1){a(new pe("Unsupported protocol "+re+":",pe.ERR_BAD_REQUEST,r));return}E.send(d||null)})},ka=(r,o)=>{const{length:u}=r=r?r.filter(Boolean):[];if(o||u){let a=new AbortController,l;const d=function(C){if(!l){l=!0,x();const $=C instanceof Error?C:this.reason;a.abort($ instanceof pe?$:new At($ instanceof Error?$.message:$))}};let h=o&&setTimeout(()=>{h=null,d(new pe(`timeout ${o} of ms exceeded`,pe.ETIMEDOUT))},o);const x=()=>{r&&(h&&clearTimeout(h),h=null,r.forEach(C=>{C.unsubscribe?C.unsubscribe(d):C.removeEventListener("abort",d)}),r=null)};r.forEach(C=>C.addEventListener("abort",d));const{signal:P}=a;return P.unsubscribe=()=>A.asap(x),P}},Ta=function*(r,o){let u=r.byteLength;if(u<o){yield r;return}let a=0,l;for(;a<u;)l=a+o,yield r.slice(a,l),a=l},Ra=async function*(r,o){for await(const u of Aa(r))yield*Ta(u,o)},Aa=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const o=r.getReader();try{for(;;){const{done:u,value:a}=await o.read();if(u)break;yield a}}finally{await o.cancel()}},zi=(r,o,u,a)=>{const l=Ra(r,o);let d=0,h,x=P=>{h||(h=!0,a&&a(P))};return new ReadableStream({async pull(P){try{const{done:C,value:$}=await l.next();if(C){x(),P.close();return}let M=$.byteLength;if(u){let ae=d+=M;u(ae)}P.enqueue(new Uint8Array($))}catch(C){throw x(C),C}},cancel(P){return x(P),l.return()}},{highWaterMark:2})},En=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vi=En&&typeof ReadableStream=="function",Pa=En&&(typeof TextEncoder=="function"?(r=>o=>r.encode(o))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Wi=(r,...o)=>{try{return!!r(...o)}catch{return!1}},Da=Vi&&Wi(()=>{let r=!1;const o=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!o}),Ji=64*1024,gr=Vi&&Wi(()=>A.isReadableStream(new Response("").body)),kn={stream:gr&&(r=>r.body)};En&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!kn[o]&&(kn[o]=A.isFunction(r[o])?u=>u[o]():(u,a)=>{throw new pe(`Response type '${o}' is not supported`,pe.ERR_NOT_SUPPORT,a)})})})(new Response);const $a=async r=>{if(r==null)return 0;if(A.isBlob(r))return r.size;if(A.isSpecCompliantForm(r))return(await new Request(qe.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(A.isArrayBufferView(r)||A.isArrayBuffer(r))return r.byteLength;if(A.isURLSearchParams(r)&&(r=r+""),A.isString(r))return(await Pa(r)).byteLength},Ca=async(r,o)=>{const u=A.toFiniteNumber(r.getContentLength());return u??$a(o)},br={http:ea,xhr:Ea,fetch:En&&(async r=>{let{url:o,method:u,data:a,signal:l,cancelToken:d,timeout:h,onDownloadProgress:x,onUploadProgress:P,responseType:C,headers:$,withCredentials:M="same-origin",fetchOptions:ae}=Hi(r);C=C?(C+"").toLowerCase():"text";let ue=ka([l,d&&d.toAbortSignal()],h),N;const j=ue&&ue.unsubscribe&&(()=>{ue.unsubscribe()});let E;try{if(P&&Da&&u!=="get"&&u!=="head"&&(E=await Ca($,a))!==0){let fe=new Request(o,{method:"POST",body:a,duplex:"half"}),te;if(A.isFormData(a)&&(te=fe.headers.get("content-type"))&&$.setContentType(te),fe.body){const[U,K]=Ii(E,On(Li(P)));a=zi(fe.body,Ji,U,K)}}A.isString(M)||(M=M?"include":"omit");const J="credentials"in Request.prototype;N=new Request(o,{...ae,signal:ue,method:u.toUpperCase(),headers:$.normalize().toJSON(),body:a,duplex:"half",credentials:J?M:void 0});let re=await fetch(N);const G=gr&&(C==="stream"||C==="response");if(gr&&(x||G&&j)){const fe={};["status","statusText","headers"].forEach(ce=>{fe[ce]=re[ce]});const te=A.toFiniteNumber(re.headers.get("content-length")),[U,K]=x&&Ii(te,On(Li(x),!0))||[];re=new Response(zi(re.body,Ji,U,()=>{K&&K(),j&&j()}),fe)}C=C||"text";let _e=await kn[A.findKey(kn,C)||"text"](re,r);return!G&&j&&j(),await new Promise((fe,te)=>{Ki(fe,te,{data:_e,headers:Ye.from(re.headers),status:re.status,statusText:re.statusText,config:r,request:N})})}catch(J){throw j&&j(),J&&J.name==="TypeError"&&/fetch/i.test(J.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,r,N),{cause:J.cause||J}):pe.from(J,J&&J.code,r,N)}})};A.forEach(br,(r,o)=>{if(r){try{Object.defineProperty(r,"name",{value:o})}catch{}Object.defineProperty(r,"adapterName",{value:o})}});const Gi=r=>`- ${r}`,ja=r=>A.isFunction(r)||r===null||r===!1,Xi={getAdapter:r=>{r=A.isArray(r)?r:[r];const{length:o}=r;let u,a;const l={};for(let d=0;d<o;d++){u=r[d];let h;if(a=u,!ja(u)&&(a=br[(h=String(u)).toLowerCase()],a===void 0))throw new pe(`Unknown adapter '${h}'`);if(a)break;l[h||"#"+d]=a}if(!a){const d=Object.entries(l).map(([x,P])=>`adapter ${x} `+(P===!1?"is not supported by the environment":"is not available in the build"));let h=o?d.length>1?`since :
|
|
6
|
-
`+d.map(
|
|
7
|
-
`):" "+
|
|
8
|
-
`+d):a.stack=d}catch{}}throw a}}_request(o,u){typeof o=="string"?(u=u||{},u.url=o):u=o||{},u=yt(this.defaults,u);const{transitional:a,paramsSerializer:l,headers:d}=u;a!==void 0
|
|
3
|
+
`+c:""),this.inner=c||null):typeof s=="object"&&(this.message="".concat(s.name," ").concat(s.message),this.inner=s):(this.message=Ee[t]||n,this.inner=null)}return j(i).from(ot),e[t]=i,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var Ce=Xt.reduce(function(e,t){return e[t+"Error"]=Z[t],e},{}),qe=Qe.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=Z[t]),e},{});function ye(){}function He(e){return e}function $t(e,t){return e==null||e===He?t:function(n){return t(e(n))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function zt(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var c=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Xe(s,this.onerror):s),c!==void 0?c:n}}function Vt(e,t){return e===ye?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i)}}function Wt(e,t){return e===ye?t:function(n){var i=e.apply(this,arguments);$(n,i);var s=this.onsuccess,c=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),s&&(this.onsuccess=this.onsuccess?Xe(s,this.onsuccess):s),c&&(this.onerror=this.onerror?Xe(c,this.onerror):c),i===void 0?n===void 0?void 0:n:$(i,n)}}function Jt(e,t){return e===ye?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Cn(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var i=this,s=arguments.length,c=new Array(s);s--;)c[s]=arguments[s];return n.then(function(){return t.apply(i,c)})}return t.apply(this,arguments)}}qe.ModifyError=je,qe.DexieError=Oe,qe.BulkError=Le;var nt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ko(e){nt=e}var Gt={},To=100,gt=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,C(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,C(t),e]}(),Xt=gt[0],Qe=gt[1],gt=gt[2],Qe=Qe&&Qe.then,bt=Xt&&Xt.constructor,Er=!!gt,Qt=function(e,t){Zt.push([e,t]),jn&&(queueMicrotask(lu),jn=!1)},kr=!0,jn=!0,wt=[],Mn=[],Tr=He,ut={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ye,pgp:!1,env:{},finalize:ye},ie=ut,Zt=[],_t=0,Nn=[];function W(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=ie;if(typeof e!="function"){if(e!==Gt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Ar(this,this._value))}this._state=null,this._value=null,++t.ref,function n(i,s){try{s(function(c){if(i._state===null){if(c===i)throw new TypeError("A promise cannot be resolved with itself.");var f=i._lib&&Pt();c&&typeof c.then=="function"?n(i,function(p,y){c instanceof W?c._then(p,y):c.then(p,y)}):(i._state=!0,i._value=c,Ao(i)),f&&Dt()}},Ar.bind(null,i))}catch(c){Ar(i,c)}}(this,e)}var Rr={get:function(){var e=ie,t=Kn;function n(i,s){var c=this,f=!e.global&&(e!==ie||t!==Kn),p=f&&!lt(),y=new W(function(g,_){$r(c,new Ro(Po(i,e,f,p),Po(s,e,f,p),g,_,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return n.prototype=Gt,n},set:function(e){N(this,"then",e&&e.prototype===Gt?Rr:{get:function(){return e},set:Rr.set})}};function Ro(e,t,n,i,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=i,this.psd=s}function Ar(e,t){var n,i;Mn.push(t),e._state===null&&(n=e._lib&&Pt(),t=Tr(t),e._state=!1,e._value=t,i=e,wt.some(function(s){return s._value===i._value})||wt.push(i),Ao(e),n&&Dt())}function Ao(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)$r(e,t[n]);var s=e._PSD;--s.ref||s.finalize(),_t===0&&(++_t,Qt(function(){--_t==0&&Pr()},[]))}function $r(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++_t,Qt(cu,[n,e,t])}else e._listeners.push(t)}function cu(e,t,n){try{var i,s=t._value;!t._state&&Mn.length&&(Mn=[]),i=nt&&t._consoleTask?t._consoleTask.run(function(){return e(s)}):e(s),t._state||Mn.indexOf(s)!==-1||function(c){for(var f=wt.length;f;)if(wt[--f]._value===c._value)return wt.splice(f,1)}(t),n.resolve(i)}catch(c){n.reject(c)}finally{--_t==0&&Pr(),--n.psd.ref||n.psd.finalize()}}function lu(){xt(ut,function(){Pt()&&Dt()})}function Pt(){var e=kr;return jn=kr=!1,e}function Dt(){var e,t,n;do for(;0<Zt.length;)for(e=Zt,Zt=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(0<Zt.length);jn=kr=!0}function Pr(){var e=wt;wt=[],e.forEach(function(i){i._PSD.onunhandled.call(null,i._value,i)});for(var t=Nn.slice(0),n=t.length;n;)t[--n]()}function qn(e){return new W(Gt,!1,e)}function Te(e,t){var n=ie;return function(){var i=Pt(),s=ie;try{return ft(n,!0),e.apply(this,arguments)}catch(c){t&&t(c)}finally{ft(s,!1),i&&Dt()}}}ae(W.prototype,{then:Rr,_then:function(e,t){$r(this,new Ro(null,null,e,t,ie))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=e,n=arguments[1];return typeof t=="function"?this.then(null,function(i){return(i instanceof t?n:qn)(i)}):this.then(null,function(i){return(i&&i.name===t?n:qn)(i)})},finally:function(e){return this.then(function(t){return W.resolve(e()).then(function(){return t})},function(t){return W.resolve(e()).then(function(){return qn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new W(function(i,s){var c=setTimeout(function(){return s(new Z.Timeout(t))},e);n.then(i,s).finally(clearTimeout.bind(null,c))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&N(W.prototype,Symbol.toStringTag,"Dexie.Promise"),ut.env=$o(),ae(W,{all:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&t([]);var i=e.length;e.forEach(function(s,c){return W.resolve(s).then(function(f){e[c]=f,--i||t(e)},n)})})},resolve:function(e){return e instanceof W?e:e&&typeof e.then=="function"?new W(function(t,n){e.then(t,n)}):new W(Gt,!0,e)},reject:qn,race:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.map(function(i){return W.resolve(i).then(t,n)})})},PSD:{get:function(){return ie},set:function(e){return ie=e}},totalEchoes:{get:function(){return Kn}},newPSD:ct,usePSD:xt,scheduler:{get:function(){return Qt},set:function(e){Qt=e}},rejectionMapper:{get:function(){return Tr},set:function(e){Tr=e}},follow:function(e,t){return new W(function(n,i){return ct(function(s,c){var f=ie;f.unhandleds=[],f.onunhandled=c,f.finalize=Xe(function(){var p,y=this;p=function(){y.unhandleds.length===0?s():c(y.unhandleds[0])},Nn.push(function g(){p(),Nn.splice(Nn.indexOf(g),1)}),++_t,Qt(function(){--_t==0&&Pr()},[])},f.finalize),e()},t,n,i)})}}),bt&&(bt.allSettled&&N(W,"allSettled",function(){var e=se.apply(null,arguments).map(In);return new W(function(t){e.length===0&&t([]);var n=e.length,i=new Array(n);e.forEach(function(s,c){return W.resolve(s).then(function(f){return i[c]={status:"fulfilled",value:f}},function(f){return i[c]={status:"rejected",reason:f}}).then(function(){return--n||t(i)})})})}),bt.any&&typeof AggregateError<"u"&&N(W,"any",function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&n(new AggregateError([]));var i=e.length,s=new Array(i);e.forEach(function(c,f){return W.resolve(c).then(function(p){return t(p)},function(p){s[f]=p,--i||n(new AggregateError(s))})})})}),bt.withResolvers&&(W.withResolvers=bt.withResolvers));var Me={awaits:0,echoes:0,id:0},fu=0,Fn=[],Bn=0,Kn=0,du=0;function ct(e,t,n,i){var s=ie,c=Object.create(s);return c.parent=s,c.ref=0,c.global=!1,c.id=++du,ut.env,c.env=Er?{Promise:W,PromiseProp:{value:W,configurable:!0,writable:!0},all:W.all,race:W.race,allSettled:W.allSettled,any:W.any,resolve:W.resolve,reject:W.reject}:{},t&&$(c,t),++s.ref,c.finalize=function(){--this.parent.ref||this.parent.finalize()},i=xt(c,e,n,i),c.ref===0&&c.finalize(),i}function Ct(){return Me.id||(Me.id=++fu),++Me.awaits,Me.echoes+=To,Me.id}function lt(){return!!Me.awaits&&(--Me.awaits==0&&(Me.id=0),Me.echoes=Me.awaits*To,!0)}function In(e){return Me.echoes&&e&&e.constructor===bt?(Ct(),e.then(function(t){return lt(),t},function(t){return lt(),$e(t)})):e}function hu(){var e=Fn[Fn.length-1];Fn.pop(),ft(e,!1)}function ft(e,t){var n,i=ie;(t?!Me.echoes||Bn++&&e===ie:!Bn||--Bn&&e===ie)||queueMicrotask(t?(function(s){++Kn,Me.echoes&&--Me.echoes!=0||(Me.echoes=Me.awaits=Me.id=0),Fn.push(ie),ft(s,!0)}).bind(null,e):hu),e!==ie&&(ie=e,i===ut&&(ut.env=$o()),Er&&(n=ut.env.Promise,t=e.env,(i.global||e.global)&&(Object.defineProperty(d,"Promise",t.PromiseProp),n.all=t.all,n.race=t.race,n.resolve=t.resolve,n.reject=t.reject,t.allSettled&&(n.allSettled=t.allSettled),t.any&&(n.any=t.any))))}function $o(){var e=d.Promise;return Er?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function xt(e,t,n,i,s){var c=ie;try{return ft(e,!0),t(n,i,s)}finally{ft(c,!1)}}function Po(e,t,n,i){return typeof e!="function"?e:function(){var s=ie;n&&Ct(),ft(t,!0);try{return e.apply(this,arguments)}finally{ft(s,!1),i&&queueMicrotask(lt)}}}function Dr(e){Promise===bt&&Me.echoes===0?Bn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Qe).indexOf("[native code]")===-1&&(Ct=lt=ye);var $e=W.reject,St="",st="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Do="String expected.",jt=[],Ln="__dbnames",Cr="readonly",jr="readwrite";function Ot(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Co={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Un(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=we(t))[e],t}}function jo(){throw Z.Type()}function xe(e,t){try{var n=Mo(e),i=Mo(t);if(n!==i)return n==="Array"?1:i==="Array"?-1:n==="binary"?1:i==="binary"?-1:n==="string"?1:i==="string"?-1:n==="Date"?1:i!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g)if(s[g]!==c[g])return s[g]<c[g]?-1:1;return f===p?0:f<p?-1:1}(No(e),No(t));case"Array":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g){var _=xe(s[g],c[g]);if(_!==0)return _}return f===p?0:f<p?-1:1}(e,t)}}catch{}return NaN}function Mo(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=H(e),e==="ArrayBuffer"?"binary":e)}function No(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var qo=(ke.prototype._trans=function(e,t,n){var i=this._tx||ie.trans,s=this.name,c=nt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function f(g,_,m){if(!m.schema[s])throw new Z.NotFound("Table "+s+" not part of transaction");return t(m.idbtrans,m)}var p=Pt();try{var y=i&&i.db._novip===this.db._novip?i===ie.trans?i._promise(e,f,n):ct(function(){return i._promise(e,f,n)},{trans:i,transless:ie.transless||ie}):function g(_,m,O,v){if(_.idbdb&&(_._state.openComplete||ie.letThrough||_._vip)){var w=_._createTransaction(m,O,_._dbSchema);try{w.create(),_._state.PR1398_maxLoop=3}catch(x){return x.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,v)})):$e(x)}return w._promise(m,function(x,b){return ct(function(){return ie.trans=w,v(x,b,w)})}).then(function(x){if(m==="readwrite")try{w.idbtrans.commit()}catch{}return m==="readonly"?x:w._completion.then(function(){return x})})}if(_._state.openComplete)return $e(new Z.DatabaseClosed(_._state.dbOpenError));if(!_._state.isBeingOpened){if(!_._state.autoOpen)return $e(new Z.DatabaseClosed);_.open().catch(ye)}return _._state.dbReadyPromise.then(function(){return g(_,m,O,v)})}(this.db,e,[this.name],f);return c&&(y._consoleTask=c,y=y.catch(function(g){return console.trace(g),$e(g)})),y}finally{p&&Dt()}},ke.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?$e(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(i){return n.core.get({trans:i,key:e}).then(function(s){return n.hook.reading.fire(s)})}).then(t)},ke.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(S(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=h(e);if(t.length===1)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter(function(p){if(p.compound&&t.every(function(g){return 0<=p.keyPath.indexOf(g)})){for(var y=0;y<t.length;++y)if(t.indexOf(p.keyPath[y])===-1)return!1;return!0}return!1}).sort(function(p,y){return p.keyPath.length-y.keyPath.length})[0];if(n&&this.db._maxKey!==St){var c=n.keyPath.slice(0,t.length);return this.where(c).equals(c.map(function(y){return e[y]}))}!n&&nt&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName;function s(p,y){return xe(p,y)===0}var f=t.reduce(function(m,y){var g=m[0],_=m[1],m=i[y],O=e[y];return[g||m,g||!m?Ot(_,m&&m.multi?function(v){return v=te(v,y),S(v)&&v.some(function(w){return s(O,w)})}:function(v){return s(O,te(v,y))}):_]},[null,null]),c=f[0],f=f[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(f):n?this.filter(f):this.where(t).equals("")},ke.prototype.filter=function(e){return this.toCollection().and(e)},ke.prototype.count=function(e){return this.toCollection().count(e)},ke.prototype.offset=function(e){return this.toCollection().offset(e)},ke.prototype.limit=function(e){return this.toCollection().limit(e)},ke.prototype.each=function(e){return this.toCollection().each(e)},ke.prototype.toArray=function(e){return this.toCollection().toArray(e)},ke.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ke.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,S(e)?"[".concat(e.join("+"),"]"):e))},ke.prototype.reverse=function(){return this.toCollection().reverse()},ke.prototype.mapToClass=function(e){var t,n=this.db,i=this.name;function s(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof jo&&(function(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function _(){this.constructor=y}u(y,g),y.prototype=g===null?Object.create(g):(_.prototype=g.prototype,new _)}(s,t=e),Object.defineProperty(s.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),s.prototype.table=function(){return i},e=s);for(var c=new Set,f=e.prototype;f;f=C(f))Object.getOwnPropertyNames(f).forEach(function(y){return c.add(y)});function p(y){if(!y)return y;var g,_=Object.create(e.prototype);for(g in y)if(!c.has(g))try{_[g]=y[g]}catch{}return _}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=p,this.hook("reading",p),e},ke.prototype.defineClass=function(){return this.mapToClass(function(e){$(this,e)})},ke.prototype.add=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"add",keys:t!=null?[t]:null,values:[f]})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.update=function(e,t){return typeof e!="object"||S(e)?this.where(":id").equals(e).modify(t):(e=te(e,this.schema.primKey.keyPath),e===void 0?$e(new Z.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},ke.prototype.put=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"put",values:[f],keys:t!=null?[t]:null})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})}).then(function(n){return n.numFailures?W.reject(n.failures[0]):void 0})},ke.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Co})}).then(function(t){return t.numFailures?W.reject(t.failures[0]):void 0})},ke.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(n){return t.core.getMany({keys:e,trans:n}).then(function(i){return i.map(function(s){return t.hook.reading.fire(s)})})})},ke.prototype.bulkAdd=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"add",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkAdd(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkPut=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"put",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkPut(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkUpdate=function(e){var t=this,n=this.core,i=e.map(function(f){return f.key}),s=e.map(function(f){return f.changes}),c=[];return this._trans("readwrite",function(f){return n.getMany({trans:f,keys:i,cache:"clone"}).then(function(p){var y=[],g=[];e.forEach(function(m,O){var v=m.key,w=m.changes,x=p[O];if(x){for(var b=0,k=Object.keys(w);b<k.length;b++){var T=k[b],R=w[T];if(T===t.schema.primKey.keyPath){if(xe(R,v)!==0)throw new Z.Constraint("Cannot update primary key in bulkUpdate()")}else U(x,T,R)}c.push(O),y.push(v),g.push(x)}});var _=y.length;return n.mutate({trans:f,type:"put",keys:y,values:g,updates:{keys:i,changeSpecs:s}}).then(function(m){var O=m.numFailures,v=m.failures;if(O===0)return _;for(var w=0,x=Object.keys(v);w<x.length;w++){var b,k=x[w],T=c[Number(k)];T!=null&&(b=v[k],delete v[k],v[T]=b)}throw new Le("".concat(t.name,".bulkUpdate(): ").concat(O," of ").concat(_," operations failed"),v)})})})},ke.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",function(i){return t.core.mutate({trans:i,type:"delete",keys:e})}).then(function(f){var s=f.numFailures,c=f.lastResult,f=f.failures;if(s===0)return c;throw new Le("".concat(t.name,".bulkDelete(): ").concat(s," of ").concat(n," operations failed"),f)})},ke);function ke(){}function en(e){function t(f,p){if(p){for(var y=arguments.length,g=new Array(y-1);--y;)g[y-1]=arguments[y];return n[f].subscribe.apply(null,g),e}if(typeof f=="string")return n[f]}var n={};t.addEventType=c;for(var i=1,s=arguments.length;i<s;++i)c(arguments[i]);return t;function c(f,p,y){if(typeof f!="object"){var g;p=p||Jt;var _={subscribers:[],fire:y=y||ye,subscribe:function(m){_.subscribers.indexOf(m)===-1&&(_.subscribers.push(m),_.fire=p(_.fire,m))},unsubscribe:function(m){_.subscribers=_.subscribers.filter(function(O){return O!==m}),_.fire=_.subscribers.reduce(p,y)}};return n[f]=t[f]=_}h(g=f).forEach(function(m){var O=g[m];if(S(O))c(m,g[m][0],g[m][1]);else{if(O!=="asap")throw new Z.InvalidArgument("Invalid event config");var v=c(m,He,function(){for(var w=arguments.length,x=new Array(w);w--;)x[w]=arguments[w];v.subscribers.forEach(function(b){fe(function(){b.apply(null,x)})})})}})}}function tn(e,t){return j(t).from({prototype:e}),t}function Mt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Mr(e,t){e.filter=Ot(e.filter,t)}function Nr(e,t,n){var i=e.replayFilter;e.replayFilter=i?function(){return Ot(i(),t())}:t,e.justLimit=n&&!i}function Yn(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Z.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Fo(e,t,n){var i=Yn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:i,range:e.range}})}function Hn(e,t,n,i){var s=e.replayFilter?Ot(e.filter,e.replayFilter()):e.filter;if(e.or){var c={},f=function(p,y,g){var _,m;s&&!s(y,g,function(O){return y.stop(O)},function(O){return y.fail(O)})||((m=""+(_=y.primaryKey))=="[object ArrayBuffer]"&&(m=""+new Uint8Array(_)),M(c,m)||(c[m]=!0,t(p,y,g)))};return Promise.all([e.or._iterate(f,n),Bo(Fo(e,i,n),e.algorithm,f,!e.keysOnly&&e.valueMapper)])}return Bo(Fo(e,i,n),Ot(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function Bo(e,t,n,i){var s=Te(i?function(c,f,p){return n(i(c),f,p)}:n);return e.then(function(c){if(c)return c.start(function(){var f=function(){return c.continue()};t&&!t(c,function(p){return f=p},function(p){c.stop(p),f=ye},function(p){c.fail(p),f=ye})||s(c.value,c,function(p){return f=p}),f()})})}var nn=(Ko.prototype.execute=function(e){var t=this["@@propmod"];if(t.add!==void 0){var n=t.add;if(S(n))return l(l([],S(e)?e:[],!0),n).sort();if(typeof n=="number")return(Number(e)||0)+n;if(typeof n=="bigint")try{return BigInt(e)+n}catch{return BigInt(0)+n}throw new TypeError("Invalid term ".concat(n))}if(t.remove!==void 0){var i=t.remove;if(S(i))return S(e)?e.filter(function(s){return!i.includes(s)}).sort():[];if(typeof i=="number")return Number(e)-i;if(typeof i=="bigint")try{return BigInt(e)-i}catch{return BigInt(0)-i}throw new TypeError("Invalid subtrahend ".concat(i))}return n=(n=t.replacePrefix)===null||n===void 0?void 0:n[0],n&&typeof e=="string"&&e.startsWith(n)?t.replacePrefix[1]+e.substring(n.length):e},Ko);function Ko(e){this["@@propmod"]=e}var pu=(Se.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,$e.bind(null,n.error)):n.table._trans("readonly",e).then(t)},Se.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,$e.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},Se.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=Ot(t.algorithm,e)},Se.prototype._iterate=function(e,t){return Hn(this._ctx,e,t,this._ctx.table.core)},Se.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&$(n,e),t._ctx=n,t},Se.prototype.raw=function(){return this._ctx.valueMapper=null,this},Se.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return Hn(t,e,n,t.table.core)})},Se.prototype.count=function(e){var t=this;return this._read(function(n){var i=t._ctx,s=i.table.core;if(Mt(i,!0))return s.count({trans:n,query:{index:Yn(i,s.schema),range:i.range}}).then(function(f){return Math.min(f,i.limit)});var c=0;return Hn(i,function(){return++c,!1},n,s).then(function(){return c})}).then(e)},Se.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),i=n[0],s=n.length-1;function c(y,g){return g?c(y[n[g]],g-1):y[i]}var f=this._ctx.dir==="next"?1:-1;function p(y,g){return xe(c(y,s),c(g,s))*f}return this.toArray(function(y){return y.sort(p)}).then(t)},Se.prototype.toArray=function(e){var t=this;return this._read(function(n){var i=t._ctx;if(i.dir==="next"&&Mt(i,!0)&&0<i.limit){var s=i.valueMapper,c=Yn(i,i.table.core.schema);return i.table.core.query({trans:n,limit:i.limit,values:!0,query:{index:c,range:i.range}}).then(function(p){return p=p.result,s?p.map(s):p})}var f=[];return Hn(i,function(p){return f.push(p)},n,i.table.core).then(function(){return f})},e)},Se.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Mt(t)?Nr(t,function(){var n=e;return function(i,s){return n===0||(n===1?--n:s(function(){i.advance(n),n=0}),!1)}}):Nr(t,function(){var n=e;return function(){return--n<0}})),this},Se.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Nr(this._ctx,function(){var t=e;return function(n,i,s){return--t<=0&&i(s),0<=t}},!0),this},Se.prototype.until=function(e,t){return Mr(this._ctx,function(n,i,s){return!e(n.value)||(i(s),t)}),this},Se.prototype.first=function(e){return this.limit(1).toArray(function(t){return t[0]}).then(e)},Se.prototype.last=function(e){return this.reverse().first(e)},Se.prototype.filter=function(e){var t;return Mr(this._ctx,function(n){return e(n.value)}),(t=this._ctx).isMatch=Ot(t.isMatch,e),this},Se.prototype.and=function(e){return this.filter(e)},Se.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},Se.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Se.prototype.desc=function(){return this.reverse()},Se.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.key,i)})},Se.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},Se.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.primaryKey,i)})},Se.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.key)}).then(function(){return n}).then(e)},Se.prototype.primaryKeys=function(e){var t=this._ctx;if(t.dir==="next"&&Mt(t,!0)&&0<t.limit)return this._read(function(i){var s=Yn(t,t.table.core.schema);return t.table.core.query({trans:i,values:!1,limit:t.limit,query:{index:s,range:t.range}})}).then(function(i){return i.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.primaryKey)}).then(function(){return n}).then(e)},Se.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},Se.prototype.firstKey=function(e){return this.limit(1).keys(function(t){return t[0]}).then(e)},Se.prototype.lastKey=function(e){return this.reverse().firstKey(e)},Se.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var t={};return Mr(this._ctx,function(s){var i=s.primaryKey.toString(),s=M(t,i);return t[i]=!0,!s}),this},Se.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(i){var s,c,f;f=typeof e=="function"?e:(s=h(e),c=s.length,function(b){for(var k=!1,T=0;T<c;++T){var R=s[T],P=e[R],q=te(b,R);P instanceof nn?(U(b,R,P.execute(q)),k=!0):q!==P&&(U(b,R,P),k=!0)}return k});var p=n.table.core,m=p.schema.primaryKey,y=m.outbound,g=m.extractKey,_=200,m=t.db._options.modifyChunkSize;m&&(_=typeof m=="object"?m[p.name]||m["*"]||200:m);function O(b,R){var T=R.failures,R=R.numFailures;w+=b-R;for(var P=0,q=h(T);P<q.length;P++){var z=q[P];v.push(T[z])}}var v=[],w=0,x=[];return t.clone().primaryKeys().then(function(b){function k(R){var P=Math.min(_,b.length-R);return p.getMany({trans:i,keys:b.slice(R,R+P),cache:"immutable"}).then(function(q){for(var z=[],F=[],B=y?[]:null,V=[],Y=0;Y<P;++Y){var X=q[Y],me={value:we(X),primKey:b[R+Y]};f.call(me,me.value,me)!==!1&&(me.value==null?V.push(b[R+Y]):y||xe(g(X),g(me.value))===0?(F.push(me.value),y&&B.push(b[R+Y])):(V.push(b[R+Y]),z.push(me.value)))}return Promise.resolve(0<z.length&&p.mutate({trans:i,type:"add",values:z}).then(function(ve){for(var ge in ve.failures)V.splice(parseInt(ge),1);O(z.length,ve)})).then(function(){return(0<F.length||T&&typeof e=="object")&&p.mutate({trans:i,type:"put",keys:B,values:F,criteria:T,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<R}).then(function(ve){return O(F.length,ve)})}).then(function(){return(0<V.length||T&&e===qr)&&p.mutate({trans:i,type:"delete",keys:V,criteria:T,isAdditionalChunk:0<R}).then(function(ve){return O(V.length,ve)})}).then(function(){return b.length>R+P&&k(R+_)})})}var T=Mt(n)&&n.limit===1/0&&(typeof e!="function"||e===qr)&&{index:n.index,range:n.range};return k(0).then(function(){if(0<v.length)throw new je("Error modifying one or more objects",v,w,x);return b.length})})})},Se.prototype.delete=function(){var e=this._ctx,t=e.range;return Mt(e)&&(e.isPrimKey||t.type===3)?this._write(function(n){var i=e.table.core.schema.primaryKey,s=t;return e.table.core.count({trans:n,query:{index:i,range:s}}).then(function(c){return e.table.core.mutate({trans:n,type:"deleteRange",range:s}).then(function(f){var p=f.failures;if(f.lastResult,f.results,f=f.numFailures,f)throw new je("Could not delete some values",Object.keys(p).map(function(y){return p[y]}),c-f);return c-f})})}):this.modify(qr)},Se);function Se(){}var qr=function(e,t){return t.value=null};function mu(e,t){return e<t?-1:e===t?0:1}function yu(e,t){return t<e?-1:e===t?0:1}function Je(e,t,n){return e=e instanceof Lo?new e.Collection(e):e,e._ctx.error=new(n||TypeError)(t),e}function Nt(e){return new e.Collection(e,function(){return Io("")}).limit(0)}function zn(e,t,n,i){var s,c,f,p,y,g,_,m=n.length;if(!n.every(function(w){return typeof w=="string"}))return Je(e,Do);function O(w){s=w==="next"?function(b){return b.toUpperCase()}:function(b){return b.toLowerCase()},c=w==="next"?function(b){return b.toLowerCase()}:function(b){return b.toUpperCase()},f=w==="next"?mu:yu;var x=n.map(function(b){return{lower:c(b),upper:s(b)}}).sort(function(b,k){return f(b.lower,k.lower)});p=x.map(function(b){return b.upper}),y=x.map(function(b){return b.lower}),_=(g=w)==="next"?"":i}O("next"),e=new e.Collection(e,function(){return dt(p[0],y[m-1]+i)}),e._ondirectionchange=function(w){O(w)};var v=0;return e._addAlgorithm(function(w,x,b){var k=w.key;if(typeof k!="string")return!1;var T=c(k);if(t(T,y,v))return!0;for(var R=null,P=v;P<m;++P){var q=function(z,F,B,V,Y,X){for(var me=Math.min(z.length,V.length),ve=-1,ge=0;ge<me;++ge){var Ge=F[ge];if(Ge!==V[ge])return Y(z[ge],B[ge])<0?z.substr(0,ge)+B[ge]+B.substr(ge+1):Y(z[ge],V[ge])<0?z.substr(0,ge)+V[ge]+B.substr(ge+1):0<=ve?z.substr(0,ve)+F[ve]+B.substr(ve+1):null;Y(z[ge],Ge)<0&&(ve=ge)}return me<V.length&&X==="next"?z+B.substr(z.length):me<z.length&&X==="prev"?z.substr(0,B.length):ve<0?null:z.substr(0,ve)+V[ve]+B.substr(ve+1)}(k,T,p[P],y[P],f,g);q===null&&R===null?v=P+1:(R===null||0<f(R,q))&&(R=q)}return x(R!==null?function(){w.continue(R+_)}:b),!1}),e}function dt(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function Io(e){return{type:1,lower:e,upper:e}}var Lo=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,t,n,i){n=n!==!1,i=i===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(n||i)&&(!n||!i)?Nt(this):new this.Collection(this,function(){return dt(e,t,!n,!i)})}catch{return Je(this,st)}},Ne.prototype.equals=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return Io(e)})},Ne.prototype.above=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?Je(this,Do):this.between(e,e+St,!0,!0)},Ne.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):zn(this,function(t,n){return t.indexOf(n[0])===0},[e],St)},Ne.prototype.equalsIgnoreCase=function(e){return zn(this,function(t,n){return t===n[0]},[e],"")},Ne.prototype.anyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.indexOf(t)!==-1},e,"")},Ne.prototype.startsWithAnyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.some(function(i){return t.indexOf(i)===0})},e,St)},Ne.prototype.anyOf=function(){var e=this,t=se.apply(oe,arguments),n=this._cmp;try{t.sort(n)}catch{return Je(this,st)}if(t.length===0)return Nt(this);var i=new this.Collection(this,function(){return dt(t[0],t[t.length-1])});i._ondirectionchange=function(c){n=c==="next"?e._ascending:e._descending,t.sort(n)};var s=0;return i._addAlgorithm(function(c,f,p){for(var y=c.key;0<n(y,t[s]);)if(++s===t.length)return f(p),!1;return n(y,t[s])===0||(f(function(){c.continue(t[s])}),!1)}),i},Ne.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ne.prototype.noneOf=function(){var e=se.apply(oe,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Je(this,st)}var t=e.reduce(function(n,i){return n?n.concat([[n[n.length-1][1],i]]):[[-1/0,i]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},Ne.prototype.inAnyRange=function(k,t){var n=this,i=this._cmp,s=this._ascending,c=this._descending,f=this._min,p=this._max;if(k.length===0)return Nt(this);if(!k.every(function(T){return T[0]!==void 0&&T[1]!==void 0&&s(T[0],T[1])<=0}))return Je(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Z.InvalidArgument);var y=!t||t.includeLowers!==!1,g=t&&t.includeUppers===!0,_,m=s;function O(T,R){return m(T[0],R[0])}try{(_=k.reduce(function(T,R){for(var P=0,q=T.length;P<q;++P){var z=T[P];if(i(R[0],z[1])<0&&0<i(R[1],z[0])){z[0]=f(z[0],R[0]),z[1]=p(z[1],R[1]);break}}return P===q&&T.push(R),T},[])).sort(O)}catch{return Je(this,st)}var v=0,w=g?function(T){return 0<s(T,_[v][1])}:function(T){return 0<=s(T,_[v][1])},x=y?function(T){return 0<c(T,_[v][0])}:function(T){return 0<=c(T,_[v][0])},b=w,k=new this.Collection(this,function(){return dt(_[0][0],_[_.length-1][1],!y,!g)});return k._ondirectionchange=function(T){m=T==="next"?(b=w,s):(b=x,c),_.sort(O)},k._addAlgorithm(function(T,R,P){for(var q,z=T.key;b(z);)if(++v===_.length)return R(P),!1;return!w(q=z)&&!x(q)||(n._cmp(z,_[v][1])===0||n._cmp(z,_[v][0])===0||R(function(){m===s?T.continue(_[v][0]):T.continue(_[v][1])}),!1)}),k},Ne.prototype.startsWithAnyOf=function(){var e=se.apply(oe,arguments);return e.every(function(t){return typeof t=="string"})?e.length===0?Nt(this):this.inAnyRange(e.map(function(t){return[t,t+St]})):Je(this,"startsWithAnyOf() only works with strings")},Ne);function Ne(){}function rt(e){return Te(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var on="storagemutated",Fr="x-storagemutated-1",ht=en(null,on),vu=(it.prototype._lock=function(){return _e(!ie.global),++this._reculock,this._reculock!==1||ie.global||(ie.lockOwnerFor=this),this},it.prototype._unlock=function(){if(_e(!ie.global),--this._reculock==0)for(ie.global||(ie.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{xt(e[1],e[0])}catch{}}return this},it.prototype._locked=function(){return this._reculock&&ie.lockOwnerFor!==this},it.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,i=this.db._state.dbOpenError;if(_e(!this.idbtrans),!e&&!n)switch(i&&i.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(i);case"MissingAPIError":throw new Z.MissingAPI(i.message,i);default:throw new Z.OpenFailed(i)}if(!this.active)throw new Z.TransactionInactive;return _e(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||n).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Te(function(s){rn(s),t._reject(e.error)}),e.onabort=Te(function(s){rn(s),t.active&&t._reject(new Z.Abort(e.error)),t.active=!1,t.on("abort").fire(s)}),e.oncomplete=Te(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&ht.storagemutated.fire(e.mutatedParts)}),this},it.prototype._promise=function(e,t,n){var i=this;if(e==="readwrite"&&this.mode!=="readwrite")return $e(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return $e(new Z.TransactionInactive);if(this._locked())return new W(function(c,f){i._blockedFuncs.push([function(){i._promise(e,t,n).then(c,f)},ie])});if(n)return ct(function(){var c=new W(function(f,p){i._lock();var y=t(f,p,i);y&&y.then&&y.then(f,p)});return c.finally(function(){return i._unlock()}),c._lib=!0,c});var s=new W(function(c,f){var p=t(c,f,i);p&&p.then&&p.then(c,f)});return s._lib=!0,s},it.prototype._root=function(){return this.parent?this.parent._root():this},it.prototype.waitFor=function(e){var t,n=this._root(),i=W.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return i}):(n._waitingFor=i,n._waitingQueue=[],t=n.idbtrans.objectStore(n.storeNames[0]),function c(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(t.get(-1/0).onsuccess=c)}());var s=n._waitingFor;return new W(function(c,f){i.then(function(p){return n._waitingQueue.push(Te(c.bind(null,p)))},function(p){return n._waitingQueue.push(Te(f.bind(null,p)))}).finally(function(){n._waitingFor===s&&(n._waitingFor=null)})})},it.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},it.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];var n=this.schema[e];if(!n)throw new Z.NotFound("Table "+e+" not part of transaction");return n=new this.db.Table(e,n,this),n.core=this.db.core.table(e),t[e]=n},it);function it(){}function Br(e,t,n,i,s,c,f){return{name:e,keyPath:t,unique:n,multi:i,auto:s,compound:c,src:(n&&!f?"&":"")+(i?"*":"")+(s?"++":"")+Uo(t)}}function Uo(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Kr(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:(i=function(s){return[s.name,s]},n.reduce(function(s,c,f){return f=i(c,f),f&&(s[f[0]]=f[1]),s},{}))};var i}var sn=function(e){try{return e.only([[]]),sn=function(){return[[]]},[[]]}catch{return sn=function(){return St},St}};function Ir(e){return e==null?function(){}:typeof e=="string"?(t=e).split(".").length===1?function(n){return n[t]}:function(n){return te(n,t)}:function(n){return te(n,e)};var t}function Yo(e){return[].slice.call(e)}var gu=0;function an(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function bu(e,t,y){function i(b){if(b.type===3)return null;if(b.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var v=b.lower,w=b.upper,x=b.lowerOpen,b=b.upperOpen;return v===void 0?w===void 0?null:t.upperBound(w,!!b):w===void 0?t.lowerBound(v,!!x):t.bound(v,w,!!x,!!b)}function s(O){var v,w=O.name;return{name:w,schema:O,mutate:function(x){var b=x.trans,k=x.type,T=x.keys,R=x.values,P=x.range;return new Promise(function(q,z){q=Te(q);var F=b.objectStore(w),B=F.keyPath==null,V=k==="put"||k==="add";if(!V&&k!=="delete"&&k!=="deleteRange")throw new Error("Invalid operation type: "+k);var Y,X=(T||R||{length:1}).length;if(T&&R&&T.length!==R.length)throw new Error("Given keys array must have same length as given values array.");if(X===0)return q({numFailures:0,failures:{},results:[],lastResult:void 0});function me(Ue){++Ge,rn(Ue)}var ve=[],ge=[],Ge=0;if(k==="deleteRange"){if(P.type===4)return q({numFailures:Ge,failures:ge,results:[],lastResult:void 0});P.type===3?ve.push(Y=F.clear()):ve.push(Y=F.delete(i(P)))}else{var B=V?B?[R,T]:[R,null]:[T,null],he=B[0],Ke=B[1];if(V)for(var Ie=0;Ie<X;++Ie)ve.push(Y=Ke&&Ke[Ie]!==void 0?F[k](he[Ie],Ke[Ie]):F[k](he[Ie])),Y.onerror=me;else for(Ie=0;Ie<X;++Ie)ve.push(Y=F[k](he[Ie])),Y.onerror=me}function or(Ue){Ue=Ue.target.result,ve.forEach(function(Tt,oi){return Tt.error!=null&&(ge[oi]=Tt.error)}),q({numFailures:Ge,failures:ge,results:k==="delete"?T:ve.map(function(Tt){return Tt.result}),lastResult:Ue})}Y.onerror=function(Ue){me(Ue),or(Ue)},Y.onsuccess=or})},getMany:function(x){var b=x.trans,k=x.keys;return new Promise(function(T,R){T=Te(T);for(var P,q=b.objectStore(w),z=k.length,F=new Array(z),B=0,V=0,Y=function(ve){ve=ve.target,F[ve._pos]=ve.result,++V===B&&T(F)},X=rt(R),me=0;me<z;++me)k[me]!=null&&((P=q.get(k[me]))._pos=me,P.onsuccess=Y,P.onerror=X,++B);B===0&&T(F)})},get:function(x){var b=x.trans,k=x.key;return new Promise(function(T,R){T=Te(T);var P=b.objectStore(w).get(k);P.onsuccess=function(q){return T(q.target.result)},P.onerror=rt(R)})},query:(v=g,function(x){return new Promise(function(b,k){b=Te(b);var T,R,P,B=x.trans,q=x.values,z=x.limit,Y=x.query,F=z===1/0?void 0:z,V=Y.index,Y=Y.range,B=B.objectStore(w),V=V.isPrimaryKey?B:B.index(V.name),Y=i(Y);if(z===0)return b({result:[]});v?((F=q?V.getAll(Y,F):V.getAllKeys(Y,F)).onsuccess=function(X){return b({result:X.target.result})},F.onerror=rt(k)):(T=0,R=!q&&"openKeyCursor"in V?V.openKeyCursor(Y):V.openCursor(Y),P=[],R.onsuccess=function(X){var me=R.result;return me?(P.push(q?me.value:me.primaryKey),++T===z?b({result:P}):void me.continue()):b({result:P})},R.onerror=rt(k))})}),openCursor:function(x){var b=x.trans,k=x.values,T=x.query,R=x.reverse,P=x.unique;return new Promise(function(q,z){q=Te(q);var V=T.index,F=T.range,B=b.objectStore(w),B=V.isPrimaryKey?B:B.index(V.name),V=R?P?"prevunique":"prev":P?"nextunique":"next",Y=!k&&"openKeyCursor"in B?B.openKeyCursor(i(F),V):B.openCursor(i(F),V);Y.onerror=rt(z),Y.onsuccess=Te(function(X){var me,ve,ge,Ge,he=Y.result;he?(he.___id=++gu,he.done=!1,me=he.continue.bind(he),ve=(ve=he.continuePrimaryKey)&&ve.bind(he),ge=he.advance.bind(he),Ge=function(){throw new Error("Cursor not stopped")},he.trans=b,he.stop=he.continue=he.continuePrimaryKey=he.advance=function(){throw new Error("Cursor not started")},he.fail=Te(z),he.next=function(){var Ke=this,Ie=1;return this.start(function(){return Ie--?Ke.continue():Ke.stop()}).then(function(){return Ke})},he.start=function(Ke){function Ie(){if(Y.result)try{Ke()}catch(Ue){he.fail(Ue)}else he.done=!0,he.start=function(){throw new Error("Cursor behind last entry")},he.stop()}var or=new Promise(function(Ue,Tt){Ue=Te(Ue),Y.onerror=rt(Tt),he.fail=Tt,he.stop=function(oi){he.stop=he.continue=he.continuePrimaryKey=he.advance=Ge,Ue(oi)}});return Y.onsuccess=Te(function(Ue){Y.onsuccess=Ie,Ie()}),he.continue=me,he.continuePrimaryKey=ve,he.advance=ge,Ie(),or},q(he)):q(null)},z)})},count:function(x){var b=x.query,k=x.trans,T=b.index,R=b.range;return new Promise(function(P,q){var z=k.objectStore(w),F=T.isPrimaryKey?z:z.index(T.name),z=i(R),F=z?F.count(z):F.count();F.onsuccess=Te(function(B){return P(B.target.result)}),F.onerror=rt(q)})}}}var c,f,p,_=(f=y,p=Yo((c=e).objectStoreNames),{schema:{name:c.name,tables:p.map(function(O){return f.objectStore(O)}).map(function(O){var v=O.keyPath,b=O.autoIncrement,w=S(v),x={},b={name:O.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:v==null,compound:w,keyPath:v,autoIncrement:b,unique:!0,extractKey:Ir(v)},indexes:Yo(O.indexNames).map(function(k){return O.index(k)}).map(function(P){var T=P.name,R=P.unique,q=P.multiEntry,P=P.keyPath,q={name:T,compound:S(P),keyPath:P,unique:R,multiEntry:q,extractKey:Ir(P)};return x[an(P)]=q}),getIndexByKeyPath:function(k){return x[an(k)]}};return x[":id"]=b.primaryKey,v!=null&&(x[an(v)]=b.primaryKey),b})},hasGetAll:0<p.length&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),y=_.schema,g=_.hasGetAll,_=y.tables.map(s),m={};return _.forEach(function(O){return m[O.name]=O}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(O){if(!m[O])throw new Error("Table '".concat(O,"' not found"));return m[O]},MIN_KEY:-1/0,MAX_KEY:sn(t),schema:y}}function wu(e,t,n,i){var s=n.IDBKeyRange;return n.indexedDB,{dbcore:(i=bu(t,s,i),e.dbcore.reduce(function(c,f){return f=f.create,a(a({},c),f(c))},i))}}function Vn(e,i){var n=i.db,i=wu(e._middlewares,n,e._deps,i);e.core=i.dbcore,e.tables.forEach(function(s){var c=s.name;e.core.schema.tables.some(function(f){return f.name===c})&&(s.core=e.core.table(c),e[c]instanceof e.Table&&(e[c].core=s.core))})}function Wn(e,t,n,i){n.forEach(function(s){var c=i[s];t.forEach(function(f){var p=function y(g,_){return E(g,_)||(g=C(g))&&y(g,_)}(f,s);(!p||"value"in p&&p.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?N(f,s,{get:function(){return this.table(s)},set:function(y){ue(this,s,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):f[s]=new e.Table(s,c))})})}function Lr(e,t){t.forEach(function(n){for(var i in n)n[i]instanceof e.Table&&delete n[i]})}function _u(e,t){return e._cfg.version-t._cfg.version}function xu(e,t,n,i){var s=e._dbSchema;n.objectStoreNames.contains("$meta")&&!s.$meta&&(s.$meta=Kr("$meta",zo("")[0],[]),e._storeNames.push("$meta"));var c=e._createTransaction("readwrite",e._storeNames,s);c.create(n),c._completion.catch(i);var f=c._reject.bind(c),p=ie.transless||ie;ct(function(){return ie.trans=c,ie.transless=p,t!==0?(Vn(e,n),g=t,((y=c).storeNames.includes("$meta")?y.table("$meta").get("version").then(function(_){return _??g}):W.resolve(g)).then(function(_){return O=_,v=c,w=n,x=[],_=(m=e)._versions,b=m._dbSchema=Gn(0,m.idbdb,w),(_=_.filter(function(k){return k._cfg.version>=O})).length!==0?(_.forEach(function(k){x.push(function(){var T=b,R=k._cfg.dbschema;Xn(m,T,w),Xn(m,R,w),b=m._dbSchema=R;var P=Ur(T,R);P.add.forEach(function(V){Yr(w,V[0],V[1].primKey,V[1].indexes)}),P.change.forEach(function(V){if(V.recreate)throw new Z.Upgrade("Not yet support for changing primary key");var Y=w.objectStore(V.name);V.add.forEach(function(X){return Jn(Y,X)}),V.change.forEach(function(X){Y.deleteIndex(X.name),Jn(Y,X)}),V.del.forEach(function(X){return Y.deleteIndex(X)})});var q=k._cfg.contentUpgrade;if(q&&k._cfg.version>O){Vn(m,w),v._memoizedTables={};var z=K(R);P.del.forEach(function(V){z[V]=T[V]}),Lr(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],h(z),z),v.schema=z;var F,B=de(q);return B&&Ct(),P=W.follow(function(){var V;(F=q(v))&&B&&(V=lt.bind(null,null),F.then(V,V))}),F&&typeof F.then=="function"?W.resolve(F):P.then(function(){return F})}}),x.push(function(T){var R,P,q=k._cfg.dbschema;R=q,P=T,[].slice.call(P.db.objectStoreNames).forEach(function(z){return R[z]==null&&P.db.deleteObjectStore(z)}),Lr(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],m._storeNames,m._dbSchema),v.schema=m._dbSchema}),x.push(function(T){m.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(m.idbdb.version/10)===k._cfg.version?(m.idbdb.deleteObjectStore("$meta"),delete m._dbSchema.$meta,m._storeNames=m._storeNames.filter(function(R){return R!=="$meta"})):T.objectStore("$meta").put(k._cfg.version,"version"))})}),function k(){return x.length?W.resolve(x.shift()(v.idbtrans)).then(k):W.resolve()}().then(function(){Ho(b,w)})):W.resolve();var m,O,v,w,x,b}).catch(f)):(h(s).forEach(function(_){Yr(n,_,s[_].primKey,s[_].indexes)}),Vn(e,n),void W.follow(function(){return e.on.populate.fire(c)}).catch(f));var y,g})}function Su(e,t){Ho(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=Gn(0,e.idbdb,t);Xn(e,e._dbSchema,t);for(var i=0,s=Ur(n,e._dbSchema).change;i<s.length;i++){var c=function(f){if(f.change.length||f.recreate)return console.warn("Unable to patch indexes of table ".concat(f.name," because it has changes on the type of index or primary key.")),{value:void 0};var p=t.objectStore(f.name);f.add.forEach(function(y){nt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(f.name,".").concat(y.src)),Jn(p,y)})}(s[i]);if(typeof c=="object")return c.value}}function Ur(e,t){var n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){var s=e[n],c=t[n];if(s){var f={name:n,def:c,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(c.primKey.keyPath||"")||s.primKey.auto!==c.primKey.auto)f.recreate=!0,i.change.push(f);else{var p=s.idxByName,y=c.idxByName,g=void 0;for(g in p)y[g]||f.del.push(g);for(g in y){var _=p[g],m=y[g];_?_.src!==m.src&&f.change.push(m):f.add.push(m)}(0<f.del.length||0<f.add.length||0<f.change.length)&&i.change.push(f)}}else i.add.push([n,c])}return i}function Yr(e,t,n,i){var s=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(function(c){return Jn(s,c)}),s}function Ho(e,t){h(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(nt&&console.debug("Dexie: Creating missing table",n),Yr(t,n,e[n].primKey,e[n].indexes))})}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Gn(e,t,n){var i={};return re(t.objectStoreNames,0).forEach(function(s){for(var c=n.objectStore(s),f=Br(Uo(g=c.keyPath),g||"",!0,!1,!!c.autoIncrement,g&&typeof g!="string",!0),p=[],y=0;y<c.indexNames.length;++y){var _=c.index(c.indexNames[y]),g=_.keyPath,_=Br(_.name,g,!!_.unique,!!_.multiEntry,!1,g&&typeof g!="string",!1);p.push(_)}i[s]=Kr(s,f,p)}),i}function Xn(e,t,n){for(var i=n.db.objectStoreNames,s=0;s<i.length;++s){var c=i[s],f=n.objectStore(c);e._hasGetAll="getAll"in f;for(var p=0;p<f.indexNames.length;++p){var y=f.indexNames[p],g=f.index(y).keyPath,_=typeof g=="string"?g:"["+re(g).join("+")+"]";!t[c]||(g=t[c].idxByName[_])&&(g.name=y,delete t[c].idxByName[_],t[c].idxByName[y]=g)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function zo(e){return e.split(",").map(function(t,n){var i=(t=t.trim()).replace(/([&*]|\+\+)/g,""),s=/^\[/.test(i)?i.match(/^\[(.*)\]$/)[1].split("+"):i;return Br(i,s||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),S(s),n===0)})}var Ou=(Qn.prototype._parseStoresSpec=function(e,t){h(e).forEach(function(n){if(e[n]!==null){var i=zo(e[n]),s=i.shift();if(s.unique=!0,s.multi)throw new Z.Schema("Primary key cannot be multi-valued");i.forEach(function(c){if(c.auto)throw new Z.Schema("Only primary key can be marked as autoIncrement (++)");if(!c.keyPath)throw new Z.Schema("Index must have a name and cannot be an empty string")}),t[n]=Kr(n,s,i)}})},Qn.prototype.stores=function(n){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?$(this._cfg.storesSource,n):n;var n=t._versions,i={},s={};return n.forEach(function(c){$(i,c._cfg.storesSource),s=c._cfg.dbschema={},c._parseStoresSpec(i,s)}),t._dbSchema=s,Lr(t,[t._allTables,t,t.Transaction.prototype]),Wn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],h(s),s),t._storeNames=h(s),this},Qn.prototype.upgrade=function(e){return this._cfg.contentUpgrade=Cn(this._cfg.contentUpgrade||ye,e),this},Qn);function Qn(){}function Hr(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new at(Ln,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function zr(e){return e&&typeof e.databases=="function"}function Vr(e){return ct(function(){return ie.letThrough=!0,e()})}function Wr(e){return!("from"in e)}var Be=function(e,t){if(!this){var n=new Be;return e&&"d"in e&&$(n,e),n}$(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function un(e,t,n){var i=xe(t,n);if(!isNaN(i)){if(0<i)throw RangeError();if(Wr(e))return $(e,{from:t,to:n,d:1});var s=e.l,i=e.r;if(xe(n,e.from)<0)return s?un(s,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Wo(e);if(0<xe(t,e.to))return i?un(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Wo(e);xe(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),0<xe(n,e.to)&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,s&&!e.l&&cn(e,s),i&&n&&cn(e,i)}}function cn(e,t){Wr(t)||function n(i,y){var c=y.from,f=y.to,p=y.l,y=y.r;un(i,c,f),p&&n(i,p),y&&n(i,y)}(e,t)}function Vo(e,t){var n=Zn(t),i=n.next();if(i.done)return!1;for(var s=i.value,c=Zn(e),f=c.next(s.from),p=f.value;!i.done&&!f.done;){if(xe(p.from,s.to)<=0&&0<=xe(p.to,s.from))return!0;xe(s.from,p.from)<0?s=(i=n.next(p.from)).value:p=(f=c.next(s.from)).value}return!1}function Zn(e){var t=Wr(e)?null:{s:0,n:e};return{next:function(n){for(var i=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,i)for(;t.n.l&&xe(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!i||xe(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Wo(e){var t,n,i=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),s=1<i?"r":i<-1?"l":"";s&&(t=s=="r"?"l":"r",n=a({},e),i=e[s],e.from=i.from,e.to=i.to,e[s]=i[s],n[s]=i[t],(e[t]=n).d=Jo(n)),e.d=Jo(e)}function Jo(n){var t=n.r,n=n.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}function er(e,t){return h(t).forEach(function(n){e[n]?cn(e[n],t[n]):e[n]=function i(s){var c,f,p={};for(c in s)M(s,c)&&(f=s[c],p[c]=!f||typeof f!="object"||ne.has(f.constructor)?f:i(f));return p}(t[n])}),e}function Jr(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&Vo(t[n],e[n])})}ae(Be.prototype,((Qe={add:function(e){return cn(this,e),this},addKey:function(e){return un(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return un(t,n,n)}),this},hasKey:function(e){var t=Zn(this).next(e).value;return t&&xe(t.from,e)<=0&&0<=xe(t.to,e)}})[I]=function(){return Zn(this)},Qe));var Et={},Gr={},Xr=!1;function tr(e){er(Gr,e),Xr||(Xr=!0,setTimeout(function(){Xr=!1,Qr(Gr,!(Gr={}))},0))}function Qr(e,t){t===void 0&&(t=!1);var n=new Set;if(e.all)for(var i=0,s=Object.values(Et);i<s.length;i++)Go(f=s[i],e,n,t);else for(var c in e){var f,p=/^idb\:\/\/(.*)\/(.*)\//.exec(c);p&&(c=p[1],p=p[2],(f=Et["idb://".concat(c,"/").concat(p)])&&Go(f,e,n,t))}n.forEach(function(y){return y()})}function Go(e,t,n,i){for(var s=[],c=0,f=Object.entries(e.queries.query);c<f.length;c++){for(var p=f[c],y=p[0],g=[],_=0,m=p[1];_<m.length;_++){var O=m[_];Jr(t,O.obsSet)?O.subscribers.forEach(function(b){return n.add(b)}):i&&g.push(O)}i&&s.push([y,g])}if(i)for(var v=0,w=s;v<w.length;v++){var x=w[v],y=x[0],g=x[1];e.queries.query[y]=g}}function Eu(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?$e(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var i=t.openCanceller,s=Math.round(10*e.verno),c=!1;function f(){if(t.openCanceller!==i)throw new Z.DatabaseClosed("db.open() was cancelled")}function p(){return new W(function(O,v){if(f(),!n)throw new Z.MissingAPI;var w=e.name,x=t.autoSchema||!s?n.open(w):n.open(w,s);if(!x)throw new Z.MissingAPI;x.onerror=rt(v),x.onblocked=Te(e._fireOnBlocked),x.onupgradeneeded=Te(function(b){var k;_=x.transaction,t.autoSchema&&!e._options.allowEmptyDB?(x.onerror=rn,_.abort(),x.result.close(),(k=n.deleteDatabase(w)).onsuccess=k.onerror=Te(function(){v(new Z.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(_.onerror=rt(v),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,m=b<1,e.idbdb=x.result,c&&Su(e,_),xu(e,b/10,_,v))},v),x.onsuccess=Te(function(){_=null;var b,k,T,R,P,q=e.idbdb=x.result,z=re(q.objectStoreNames);if(0<z.length)try{var F=q.transaction((R=z).length===1?R[0]:R,"readonly");if(t.autoSchema)k=q,T=F,(b=e).verno=k.version/10,T=b._dbSchema=Gn(0,k,T),b._storeNames=re(k.objectStoreNames,0),Wn(b,[b._allTables],h(T),T);else if(Xn(e,e._dbSchema,F),((P=Ur(Gn(0,(P=e).idbdb,F),P._dbSchema)).add.length||P.change.some(function(B){return B.add.length||B.change.length}))&&!c)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),q.close(),s=q.version+1,c=!0,O(p());Vn(e,F)}catch{}jt.push(e),q.onversionchange=Te(function(B){t.vcFired=!0,e.on("versionchange").fire(B)}),q.onclose=Te(function(B){e.on("close").fire(B)}),m&&(P=e._deps,F=w,q=P.indexedDB,P=P.IDBKeyRange,zr(q)||F===Ln||Hr(q,P).put({name:F}).catch(ye)),O()},v)}).catch(function(O){switch(O==null?void 0:O.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),p();break;case"VersionError":if(0<s)return s=0,p()}return W.reject(O)})}var y,g=t.dbReadyResolve,_=null,m=!1;return W.race([i,(typeof navigator>"u"?W.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(O){function v(){return indexedDB.databases().finally(O)}y=setInterval(v,100),v()}).finally(function(){return clearInterval(y)}):Promise.resolve()).then(p)]).then(function(){return f(),t.onReadyBeingFired=[],W.resolve(Vr(function(){return e.on.ready.fire(e.vip)})).then(function O(){if(0<t.onReadyBeingFired.length){var v=t.onReadyBeingFired.reduce(Cn,ye);return t.onReadyBeingFired=[],W.resolve(Vr(function(){return v(e.vip)})).then(O)}})}).finally(function(){t.openCanceller===i&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(O){t.dbOpenError=O;try{_&&_.abort()}catch{}return i===t.openCanceller&&e._close(),$e(O)}).finally(function(){t.openComplete=!0,g()}).then(function(){var O;return m&&(O={},e.tables.forEach(function(v){v.schema.indexes.forEach(function(w){w.name&&(O["idb://".concat(e.name,"/").concat(v.name,"/").concat(w.name)]=new Be(-1/0,[[[]]]))}),O["idb://".concat(e.name,"/").concat(v.name,"/")]=O["idb://".concat(e.name,"/").concat(v.name,"/:dels")]=new Be(-1/0,[[[]]])}),ht(on).fire(O),Qr(O,!0)),e})}function Zr(e){function t(c){return e.next(c)}var n=s(t),i=s(function(c){return e.throw(c)});function s(c){return function(y){var p=c(y),y=p.value;return p.done?y:y&&typeof y.then=="function"?y.then(n,i):S(y)?Promise.all(y).then(n,i):n(y)}}return s(t)()}function nr(e,t,n){for(var i=S(e)?e.slice():[e],s=0;s<n;++s)i.push(t);return i}var ku={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema,s={},c=[];function f(m,O,v){var w=an(m),x=s[w]=s[w]||[],b=m==null?0:typeof m=="string"?1:m.length,k=0<O,k=a(a({},v),{name:k?"".concat(w,"(virtual-from:").concat(v.name,")"):v.name,lowLevelIndex:v,isVirtual:k,keyTail:O,keyLength:b,extractKey:Ir(m),unique:!k&&v.unique});return x.push(k),k.isPrimaryKey||c.push(k),1<b&&f(b===2?m[0]:m.slice(0,b-1),O+1,v),x.sort(function(T,R){return T.keyTail-R.keyTail}),k}t=f(i.primaryKey.keyPath,0,i.primaryKey),s[":id"]=[t];for(var p=0,y=i.indexes;p<y.length;p++){var g=y[p];f(g.keyPath,0,g)}function _(m){var O,v=m.query.index;return v.isVirtual?a(a({},m),{query:{index:v.lowLevelIndex,range:(O=m.query.range,v=v.keyTail,{type:O.type===1?2:O.type,lower:nr(O.lower,O.lowerOpen?e.MAX_KEY:e.MIN_KEY,v),lowerOpen:!0,upper:nr(O.upper,O.upperOpen?e.MIN_KEY:e.MAX_KEY,v),upperOpen:!0})}}):m}return a(a({},n),{schema:a(a({},i),{primaryKey:t,indexes:c,getIndexByKeyPath:function(m){return(m=s[an(m)])&&m[0]}}),count:function(m){return n.count(_(m))},query:function(m){return n.query(_(m))},openCursor:function(m){var O=m.query.index,v=O.keyTail,w=O.isVirtual,x=O.keyLength;return w?n.openCursor(_(m)).then(function(k){return k&&b(k)}):n.openCursor(m);function b(k){return Object.create(k,{continue:{value:function(T){T!=null?k.continue(nr(T,m.reverse?e.MAX_KEY:e.MIN_KEY,v)):m.unique?k.continue(k.key.slice(0,x).concat(m.reverse?e.MIN_KEY:e.MAX_KEY,v)):k.continue()}},continuePrimaryKey:{value:function(T,R){k.continuePrimaryKey(nr(T,e.MAX_KEY,v),R)}},primaryKey:{get:function(){return k.primaryKey}},key:{get:function(){var T=k.key;return x===1?T[0]:T.slice(0,x)}},value:{get:function(){return k.value}}})}}})}})}};function ei(e,t,n,i){return n=n||{},i=i||"",h(e).forEach(function(s){var c,f,p;M(t,s)?(c=e[s],f=t[s],typeof c=="object"&&typeof f=="object"&&c&&f?(p=H(c))!==H(f)?n[i+s]=t[s]:p==="Object"?ei(c,f,n,i+s+"."):c!==f&&(n[i+s]=t[s]):c!==f&&(n[i+s]=t[s])):n[i+s]=void 0}),h(t).forEach(function(s){M(e,s)||(n[i+s]=t[s])}),n}function ti(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var Tu={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema.primaryKey;return a(a({},n),{mutate:function(s){var c=ie.trans,f=c.table(t).hook,p=f.deleting,y=f.creating,g=f.updating;switch(s.type){case"add":if(y.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"put":if(y.fire===ye&&g.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"delete":if(p.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"deleteRange":if(p.fire===ye)break;return c._promise("readwrite",function(){return function m(O,v,w){return n.query({trans:O,values:!1,query:{index:i,range:v},limit:w}).then(function(x){var b=x.result;return _({type:"delete",keys:b,trans:O}).then(function(k){return 0<k.numFailures?Promise.reject(k.failures[0]):b.length<w?{failures:[],numFailures:0,lastResult:void 0}:m(O,a(a({},v),{lower:b[b.length-1],lowerOpen:!0}),w)})})}(s.trans,s.range,1e4)},!0)}return n.mutate(s);function _(m){var O,v,w,x=ie.trans,b=m.keys||ti(i,m);if(!b)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?a(a({},m),{keys:b}):a({},m)).type!=="delete"&&(m.values=l([],m.values)),m.keys&&(m.keys=l([],m.keys)),O=n,w=b,((v=m).type==="add"?Promise.resolve([]):O.getMany({trans:v.trans,keys:w,cache:"immutable"})).then(function(k){var T=b.map(function(R,P){var q,z,F,B=k[P],V={onerror:null,onsuccess:null};return m.type==="delete"?p.fire.call(V,R,B,x):m.type==="add"||B===void 0?(q=y.fire.call(V,R,m.values[P],x),R==null&&q!=null&&(m.keys[P]=R=q,i.outbound||U(m.values[P],i.keyPath,R))):(q=ei(B,m.values[P]),(z=g.fire.call(V,q,R,B,x))&&(F=m.values[P],Object.keys(z).forEach(function(Y){M(F,Y)?F[Y]=z[Y]:U(F,Y,z[Y])}))),V});return n.mutate(m).then(function(R){for(var P=R.failures,q=R.results,z=R.numFailures,R=R.lastResult,F=0;F<b.length;++F){var B=(q||b)[F],V=T[F];B==null?V.onerror&&V.onerror(P[F]):V.onsuccess&&V.onsuccess(m.type==="put"&&k[F]?m.values[F]:B)}return{failures:P,results:q,numFailures:z,lastResult:R}}).catch(function(R){return T.forEach(function(P){return P.onerror&&P.onerror(R)}),Promise.reject(R)})})}}})}})}};function Xo(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var i=[],s=0,c=0;s<t.keys.length&&c<e.length;++s)xe(t.keys[s],e[c])===0&&(i.push(n?we(t.values[s]):t.values[s]),++c);return i.length===e.length?i:null}catch{return null}}var Ru={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return a(a({},n),{getMany:function(i){if(!i.cache)return n.getMany(i);var s=Xo(i.keys,i.trans._cache,i.cache==="clone");return s?W.resolve(s):n.getMany(i).then(function(c){return i.trans._cache={keys:i.keys,values:i.cache==="clone"?we(c):c},c})},mutate:function(i){return i.type!=="add"&&(i.trans._cache=null),n.mutate(i)}})}}}};function Qo(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function Zo(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Au={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,n=new Be(e.MIN_KEY,e.MAX_KEY);return a(a({},e),{transaction:function(i,s,c){if(ie.subscr&&s!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ie.querier));return e.transaction(i,s,c)},table:function(i){var s=e.table(i),c=s.schema,f=c.primaryKey,m=c.indexes,p=f.extractKey,y=f.outbound,g=f.autoIncrement&&m.filter(function(v){return v.compound&&v.keyPath.includes(f.keyPath)}),_=a(a({},s),{mutate:function(v){function w(Y){return Y="idb://".concat(t,"/").concat(i,"/").concat(Y),R[Y]||(R[Y]=new Be)}var x,b,k,T=v.trans,R=v.mutatedParts||(v.mutatedParts={}),P=w(""),q=w(":dels"),z=v.type,V=v.type==="deleteRange"?[v.range]:v.type==="delete"?[v.keys]:v.values.length<50?[ti(f,v).filter(function(Y){return Y}),v.values]:[],F=V[0],B=V[1],V=v.trans._cache;return S(F)?(P.addKeys(F),(V=z==="delete"||F.length===B.length?Xo(F,V):null)||q.addKeys(F),(V||B)&&(x=w,b=V,k=B,c.indexes.forEach(function(Y){var X=x(Y.name||"");function me(ge){return ge!=null?Y.extractKey(ge):null}function ve(ge){return Y.multiEntry&&S(ge)?ge.forEach(function(Ge){return X.addKey(Ge)}):X.addKey(ge)}(b||k).forEach(function(ge,Ke){var he=b&&me(b[Ke]),Ke=k&&me(k[Ke]);xe(he,Ke)!==0&&(he!=null&&ve(he),Ke!=null&&ve(Ke))})}))):F?(B={from:(B=F.lower)!==null&&B!==void 0?B:e.MIN_KEY,to:(B=F.upper)!==null&&B!==void 0?B:e.MAX_KEY},q.add(B),P.add(B)):(P.add(n),q.add(n),c.indexes.forEach(function(Y){return w(Y.name).add(n)})),s.mutate(v).then(function(Y){return!F||v.type!=="add"&&v.type!=="put"||(P.addKeys(Y.results),g&&g.forEach(function(X){for(var me=v.values.map(function(he){return X.extractKey(he)}),ve=X.keyPath.findIndex(function(he){return he===f.keyPath}),ge=0,Ge=Y.results.length;ge<Ge;++ge)me[ge][ve]=Y.results[ge];w(X.name).addKeys(me)})),T.mutatedParts=er(T.mutatedParts||{},R),Y})}}),m=function(w){var x=w.query,w=x.index,x=x.range;return[w,new Be((w=x.lower)!==null&&w!==void 0?w:e.MIN_KEY,(x=x.upper)!==null&&x!==void 0?x:e.MAX_KEY)]},O={get:function(v){return[f,new Be(v.key)]},getMany:function(v){return[f,new Be().addKeys(v.keys)]},count:m,query:m,openCursor:m};return h(O).forEach(function(v){_[v]=function(w){var x=ie.subscr,b=!!x,k=Qo(ie,s)&&Zo(v,w)?w.obsSet={}:x;if(b){var T=function(B){return B="idb://".concat(t,"/").concat(i,"/").concat(B),k[B]||(k[B]=new Be)},R=T(""),P=T(":dels"),x=O[v](w),b=x[0],x=x[1];if((v==="query"&&b.isPrimaryKey&&!w.values?P:T(b.name||"")).add(x),!b.isPrimaryKey){if(v!=="count"){var q=v==="query"&&y&&w.values&&s.query(a(a({},w),{values:!1}));return s[v].apply(this,arguments).then(function(B){if(v==="query"){if(y&&w.values)return q.then(function(me){return me=me.result,R.addKeys(me),B});var V=w.values?B.result.map(p):B.result;(w.values?R:P).addKeys(V)}else if(v==="openCursor"){var Y=B,X=w.values;return Y&&Object.create(Y,{key:{get:function(){return P.addKey(Y.primaryKey),Y.key}},primaryKey:{get:function(){var me=Y.primaryKey;return P.addKey(me),me}},value:{get:function(){return X&&R.addKey(Y.primaryKey),Y.value}}})}return B})}P.add(n)}}return s[v].apply(this,arguments)}}),_}})}};function es(e,t,n){if(n.numFailures===0)return t;if(t.type==="deleteRange")return null;var i=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return n.numFailures===i?null:(t=a({},t),S(t.keys)&&(t.keys=t.keys.filter(function(s,c){return!(c in n.failures)})),"values"in t&&S(t.values)&&(t.values=t.values.filter(function(s,c){return!(c in n.failures)})),t)}function ni(e,t){return n=e,((i=t).lower===void 0||(i.lowerOpen?0<xe(n,i.lower):0<=xe(n,i.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?xe(e,t.upper)<0:xe(e,t.upper)<=0));var n,i}function ts(e,t,O,i,s,c){if(!O||O.length===0)return e;var f=t.query.index,p=f.multiEntry,y=t.query.range,g=i.schema.primaryKey.extractKey,_=f.extractKey,m=(f.lowLevelIndex||f).extractKey,O=O.reduce(function(v,w){var x=v,b=[];if(w.type==="add"||w.type==="put")for(var k=new Be,T=w.values.length-1;0<=T;--T){var R,P=w.values[T],q=g(P);k.hasKey(q)||(R=_(P),(p&&S(R)?R.some(function(Y){return ni(Y,y)}):ni(R,y))&&(k.addKey(q),b.push(P)))}switch(w.type){case"add":var z=new Be().addKeys(t.values?v.map(function(X){return g(X)}):v),x=v.concat(t.values?b.filter(function(X){return X=g(X),!z.hasKey(X)&&(z.addKey(X),!0)}):b.map(function(X){return g(X)}).filter(function(X){return!z.hasKey(X)&&(z.addKey(X),!0)}));break;case"put":var F=new Be().addKeys(w.values.map(function(X){return g(X)}));x=v.filter(function(X){return!F.hasKey(t.values?g(X):X)}).concat(t.values?b:b.map(function(X){return g(X)}));break;case"delete":var B=new Be().addKeys(w.keys);x=v.filter(function(X){return!B.hasKey(t.values?g(X):X)});break;case"deleteRange":var V=w.range;x=v.filter(function(X){return!ni(g(X),V)})}return x},e);return O===e?e:(O.sort(function(v,w){return xe(m(v),m(w))||xe(g(v),g(w))}),t.limit&&t.limit<1/0&&(O.length>t.limit?O.length=t.limit:e.length===t.limit&&O.length<t.limit&&(s.dirty=!0)),c?Object.freeze(O):O)}function ns(e,t){return xe(e.lower,t.lower)===0&&xe(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function $u(e,t){return function(n,i,s,c){if(n===void 0)return i!==void 0?-1:0;if(i===void 0)return 1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return 1;if(c)return-1}return i}(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=function(n,i,s,c){if(n===void 0)return i!==void 0?1:0;if(i===void 0)return-1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return-1;if(c)return 1}return i}(e.upper,t.upper,e.upperOpen,t.upperOpen)}function Pu(e,t,n,i){e.subscribers.add(n),i.addEventListener("abort",function(){var s,c;e.subscribers.delete(n),e.subscribers.size===0&&(s=e,c=t,setTimeout(function(){s.subscribers.size===0&&L(c,s)},3e3))})}var Du={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return a(a({},e),{transaction:function(n,i,s){var c,f,p=e.transaction(n,i,s);return i==="readwrite"&&(f=(c=new AbortController).signal,s=function(y){return function(){if(c.abort(),i==="readwrite"){for(var g=new Set,_=0,m=n;_<m.length;_++){var O=m[_],v=Et["idb://".concat(t,"/").concat(O)];if(v){var w=e.table(O),x=v.optimisticOps.filter(function(X){return X.trans===p});if(p._explicit&&y&&p.mutatedParts)for(var b=0,k=Object.values(v.queries.query);b<k.length;b++)for(var T=0,R=(z=k[b]).slice();T<R.length;T++)Jr((F=R[T]).obsSet,p.mutatedParts)&&(L(z,F),F.subscribers.forEach(function(X){return g.add(X)}));else if(0<x.length){v.optimisticOps=v.optimisticOps.filter(function(X){return X.trans!==p});for(var P=0,q=Object.values(v.queries.query);P<q.length;P++)for(var z,F,B,V=0,Y=(z=q[P]).slice();V<Y.length;V++)(F=Y[V]).res!=null&&p.mutatedParts&&(y&&!F.dirty?(B=Object.isFrozen(F.res),B=ts(F.res,F.req,x,w,F,B),F.dirty?(L(z,F),F.subscribers.forEach(function(X){return g.add(X)})):B!==F.res&&(F.res=B,F.promise=W.resolve({result:B}))):(F.dirty&&L(z,F),F.subscribers.forEach(function(X){return g.add(X)})))}}}g.forEach(function(X){return X()})}}},p.addEventListener("abort",s(!1),{signal:f}),p.addEventListener("error",s(!1),{signal:f}),p.addEventListener("complete",s(!0),{signal:f})),p},table:function(n){var i=e.table(n),s=i.schema.primaryKey;return a(a({},i),{mutate:function(c){var f=ie.trans;if(s.outbound||f.db._options.cache==="disabled"||f.explicit||f.idbtrans.mode!=="readwrite")return i.mutate(c);var p=Et["idb://".concat(t,"/").concat(n)];return p?(f=i.mutate(c),c.type!=="add"&&c.type!=="put"||!(50<=c.values.length||ti(s,c).some(function(y){return y==null}))?(p.optimisticOps.push(c),c.mutatedParts&&tr(c.mutatedParts),f.then(function(y){0<y.numFailures&&(L(p.optimisticOps,c),(y=es(0,c,y))&&p.optimisticOps.push(y),c.mutatedParts&&tr(c.mutatedParts))}),f.catch(function(){L(p.optimisticOps,c),c.mutatedParts&&tr(c.mutatedParts)})):f.then(function(y){var g=es(0,a(a({},c),{values:c.values.map(function(_,m){var O;return y.failures[m]?_:(_=(O=s.keyPath)!==null&&O!==void 0&&O.includes(".")?we(_):a({},_),U(_,s.keyPath,y.results[m]),_)})}),y);p.optimisticOps.push(g),queueMicrotask(function(){return c.mutatedParts&&tr(c.mutatedParts)})}),f):i.mutate(c)},query:function(c){if(!Qo(ie,i)||!Zo("query",c))return i.query(c);var f=((g=ie.trans)===null||g===void 0?void 0:g.db._options.cache)==="immutable",m=ie,p=m.requery,y=m.signal,g=function(w,x,b,k){var T=Et["idb://".concat(w,"/").concat(x)];if(!T)return[];if(!(x=T.queries[b]))return[null,!1,T,null];var R=x[(k.query?k.query.index.name:null)||""];if(!R)return[null,!1,T,null];switch(b){case"query":var P=R.find(function(q){return q.req.limit===k.limit&&q.req.values===k.values&&ns(q.req.query.range,k.query.range)});return P?[P,!0,T,R]:[R.find(function(q){return("limit"in q.req?q.req.limit:1/0)>=k.limit&&(!k.values||q.req.values)&&$u(q.req.query.range,k.query.range)}),!1,T,R];case"count":return P=R.find(function(q){return ns(q.req.query.range,k.query.range)}),[P,!!P,T,R]}}(t,n,"query",c),_=g[0],m=g[1],O=g[2],v=g[3];return _&&m?_.obsSet=c.obsSet:(m=i.query(c).then(function(w){var x=w.result;if(_&&(_.res=x),f){for(var b=0,k=x.length;b<k;++b)Object.freeze(x[b]);Object.freeze(x)}else w.result=we(x);return w}).catch(function(w){return v&&_&&L(v,_),Promise.reject(w)}),_={obsSet:c.obsSet,promise:m,subscribers:new Set,type:"query",req:c,dirty:!1},v?v.push(_):(v=[_],(O=O||(Et["idb://".concat(t,"/").concat(n)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[c.query.index.name||""]=v)),Pu(_,v,p,y),_.promise.then(function(w){return{result:ts(w.result,c,O==null?void 0:O.optimisticOps,i,_,f)}})}})}})}};function rr(e,t){return new Proxy(e,{get:function(n,i,s){return i==="db"?t:Reflect.get(n,i,s)}})}var at=(Pe.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Z.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Z.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(i){return i._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(_u),n.stores({}),this._state.autoSchema=!1,n)},Pe.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||ie.letThrough||this._vip)?e():new W(function(n,i){if(t._state.openComplete)return i(new Z.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void i(new Z.DatabaseClosed);t.open().catch(ye)}t._state.dbReadyPromise.then(n,i)}).then(e)},Pe.prototype.use=function(e){var t=e.stack,n=e.create,i=e.level,s=e.name;return s&&this.unuse({stack:t,name:s}),e=this._middlewares[t]||(this._middlewares[t]=[]),e.push({stack:t,create:n,level:i??10,name:s}),e.sort(function(c,f){return c.level-f.level}),this},Pe.prototype.unuse=function(e){var t=e.stack,n=e.name,i=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(s){return i?s.create!==i:!!n&&s.name!==n})),this},Pe.prototype.open=function(){var e=this;return xt(ut,function(){return Eu(e)})},Pe.prototype._close=function(){var e=this._state,t=jt.indexOf(this);if(0<=t&&jt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new W(function(n){e.dbReadyResolve=n}),e.openCanceller=new W(function(n,i){e.cancelOpen=i}))},Pe.prototype.close=function(n){var t=(n===void 0?{disableAutoOpen:!0}:n).disableAutoOpen,n=this._state;t?(n.isBeingOpened&&n.cancelOpen(new Z.DatabaseClosed),this._close(),n.autoOpen=!1,n.dbOpenError=new Z.DatabaseClosed):(this._close(),n.autoOpen=this._options.autoOpen||n.isBeingOpened,n.openComplete=!1,n.dbOpenError=null)},Pe.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=0<arguments.length&&typeof arguments[0]!="object",i=this._state;return new W(function(s,c){function f(){t.close(e);var p=t._deps.indexedDB.deleteDatabase(t.name);p.onsuccess=Te(function(){var y,g,_;y=t._deps,g=t.name,_=y.indexedDB,y=y.IDBKeyRange,zr(_)||g===Ln||Hr(_,y).delete(g).catch(ye),s()}),p.onerror=rt(c),p.onblocked=t._fireOnBlocked}if(n)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");i.isBeingOpened?i.dbReadyPromise.then(f):f()})},Pe.prototype.backendDB=function(){return this.idbdb},Pe.prototype.isOpen=function(){return this.idbdb!==null},Pe.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},Pe.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Pe.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Pe.prototype,"tables",{get:function(){var e=this;return h(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),Pe.prototype.transaction=function(){var e=(function(t,n,i){var s=arguments.length;if(s<2)throw new Z.InvalidArgument("Too few arguments");for(var c=new Array(s-1);--s;)c[s-1]=arguments[s];return i=c.pop(),[t,le(c),i]}).apply(this,arguments);return this._transaction.apply(this,e)},Pe.prototype._transaction=function(e,t,n){var i=this,s=ie.trans;s&&s.db===this&&e.indexOf("!")===-1||(s=null);var c,f,p=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(f=t.map(function(g){if(g=g instanceof i.Table?g.name:g,typeof g!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return g}),e=="r"||e===Cr)c=Cr;else{if(e!="rw"&&e!=jr)throw new Z.InvalidArgument("Invalid transaction mode: "+e);c=jr}if(s){if(s.mode===Cr&&c===jr){if(!p)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&f.forEach(function(g){if(s&&s.storeNames.indexOf(g)===-1){if(!p)throw new Z.SubTransaction("Table "+g+" not included in parent transaction.");s=null}}),p&&s&&!s.active&&(s=null)}}catch(g){return s?s._promise(null,function(_,m){m(g)}):$e(g)}var y=(function g(_,m,O,v,w){return W.resolve().then(function(){var x=ie.transless||ie,b=_._createTransaction(m,O,_._dbSchema,v);if(b.explicit=!0,x={trans:b,transless:x},v)b.idbtrans=v.idbtrans;else try{b.create(),b.idbtrans._explicit=!0,_._state.PR1398_maxLoop=3}catch(R){return R.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,null,w)})):$e(R)}var k,T=de(w);return T&&Ct(),x=W.follow(function(){var R;(k=w.call(b,b))&&(T?(R=lt.bind(null,null),k.then(R,R)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Zr(k)))},x),(k&&typeof k.then=="function"?W.resolve(k).then(function(R){return b.active?R:$e(new Z.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):x.then(function(){return k})).then(function(R){return v&&b._resolve(),b._completion.then(function(){return R})}).catch(function(R){return b._reject(R),$e(R)})})}).bind(null,this,c,f,s,n);return s?s._promise(c,y,"lock"):ie.trans?xt(ie.transless,function(){return i._whenReady(y)}):this._whenReady(y)},Pe.prototype.table=function(e){if(!M(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},Pe);function Pe(e,t){var n=this;this._middlewares={},this.verno=0;var i=Pe.dependencies;this._options=t=a({addons:Pe.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},i=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s,c,f,p,y,g={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ye,dbReadyPromise:null,cancelOpen:ye,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t.autoOpen};g.dbReadyPromise=new W(function(m){g.dbReadyResolve=m}),g.openCanceller=new W(function(m,O){g.cancelOpen=O}),this._state=g,this.name=e,this.on=en(this,"populate","blocked","versionchange","close",{ready:[Cn,ye]}),this.on.ready.subscribe=G(this.on.ready.subscribe,function(m){return function(O,v){Pe.vip(function(){var w,x=n._state;x.openComplete?(x.dbOpenError||W.resolve().then(O),v&&m(O)):x.onReadyBeingFired?(x.onReadyBeingFired.push(O),v&&m(O)):(m(O),w=n,v||m(function b(){w.on.ready.unsubscribe(O),w.on.ready.unsubscribe(b)}))})}}),this.Collection=(s=this,tn(pu.prototype,function(k,b){this.db=s;var v=Co,w=null;if(b)try{v=b()}catch(T){w=T}var x=k._ctx,b=x.table,k=b.hook.reading.fire;this._ctx={table:b,index:x.index,isPrimKey:!x.index||b.schema.primKey.keyPath&&x.index===b.schema.primKey.name,range:v,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:w,or:x.or,valueMapper:k!==He?k:null}})),this.Table=(c=this,tn(qo.prototype,function(m,O,v){this.db=c,this._tx=v,this.name=m,this.schema=O,this.hook=c._allTables[m]?c._allTables[m].hook:en(null,{creating:[zt,ye],reading:[$t,He],updating:[Wt,ye],deleting:[Vt,ye]})})),this.Transaction=(f=this,tn(vu.prototype,function(m,O,v,w,x){var b=this;this.db=f,this.mode=m,this.storeNames=O,this.schema=v,this.chromeTransactionDurability=w,this.idbtrans=null,this.on=en(this,"complete","error","abort"),this.parent=x||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new W(function(k,T){b._resolve=k,b._reject=T}),this._completion.then(function(){b.active=!1,b.on.complete.fire()},function(k){var T=b.active;return b.active=!1,b.on.error.fire(k),b.parent?b.parent._reject(k):T&&b.idbtrans&&b.idbtrans.abort(),$e(k)})})),this.Version=(p=this,tn(Ou.prototype,function(m){this.db=p,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,tn(Lo.prototype,function(m,O,v){if(this.db=y,this._ctx={table:m,index:O===":id"?null:O,or:v},this._cmp=this._ascending=xe,this._descending=function(w,x){return xe(x,w)},this._max=function(w,x){return 0<xe(w,x)?w:x},this._min=function(w,x){return xe(w,x)<0?w:x},this._IDBKeyRange=y._deps.IDBKeyRange,!this._IDBKeyRange)throw new Z.MissingAPI})),this.on("versionchange",function(m){0<m.newVersion?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})}),this.on("blocked",function(m){!m.newVersion||m.newVersion<m.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(m.oldVersion/10))}),this._maxKey=sn(t.IDBKeyRange),this._createTransaction=function(m,O,v,w){return new n.Transaction(m,O,v,n._options.chromeTransactionDurability,w)},this._fireOnBlocked=function(m){n.on("blocked").fire(m),jt.filter(function(O){return O.name===n.name&&O!==n&&!O._state.vcFired}).map(function(O){return O.on("versionchange").fire(m)})},this.use(Ru),this.use(Du),this.use(Au),this.use(ku),this.use(Tu);var _=new Proxy(this,{get:function(m,O,v){if(O==="_vip")return!0;if(O==="table")return function(x){return rr(n.table(x),_)};var w=Reflect.get(m,O,v);return w instanceof qo?rr(w,_):O==="tables"?w.map(function(x){return rr(x,_)}):O==="_createTransaction"?function(){return rr(w.apply(this,arguments),_)}:w}});this.vip=_,i.forEach(function(m){return m(n)})}var ir,Qe=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Cu=(ri.prototype.subscribe=function(e,t,n){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:n})},ri.prototype[Qe]=function(){return this},ri);function ri(e){this._subscribe=e}try{ir={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{ir={indexedDB:null,IDBKeyRange:null}}function rs(e){var t,n=!1,i=new Cu(function(s){var c=de(e),f,p=!1,y={},g={},_={get closed(){return p},unsubscribe:function(){p||(p=!0,f&&f.abort(),m&&ht.storagemutated.unsubscribe(v))}};s.start&&s.start(_);var m=!1,O=function(){return Dr(w)},v=function(x){er(y,x),Jr(g,y)&&O()},w=function(){var x,b,k;!p&&ir.indexedDB&&(y={},x={},f&&f.abort(),f=new AbortController,k=function(T){var R=Pt();try{c&&Ct();var P=ct(e,T);return P=c?P.finally(lt):P}finally{R&&Dt()}}(b={subscr:x,signal:f.signal,requery:O,querier:e,trans:null}),Promise.resolve(k).then(function(T){n=!0,t=T,p||b.signal.aborted||(y={},function(R){for(var P in R)if(M(R,P))return;return 1}(g=x)||m||(ht(on,v),m=!0),Dr(function(){return!p&&s.next&&s.next(T)}))},function(T){n=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||p||Dr(function(){p||s.error&&s.error(T)})}))};return setTimeout(O,0),_});return i.hasValue=function(){return n},i.getValue=function(){return t},i}var kt=at;function ii(e){var t=pt;try{pt=!0,ht.storagemutated.fire(e),Qr(e,!0)}finally{pt=t}}ae(kt,a(a({},qe),{delete:function(e){return new kt(e,{addons:[]}).delete()},exists:function(e){return new kt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=kt.dependencies,n=t.indexedDB,t=t.IDBKeyRange,(zr(n)?Promise.resolve(n.databases()).then(function(i){return i.map(function(s){return s.name}).filter(function(s){return s!==Ln})}):Hr(n,t).toCollection().primaryKeys()).then(e)}catch{return $e(new Z.MissingAPI)}var t,n},defineClass:function(){return function(e){$(this,e)}},ignoreTransaction:function(e){return ie.trans?xt(ie.transless,e):e()},vip:Vr,async:function(e){return function(){try{var t=Zr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:W.resolve(t)}catch(n){return $e(n)}}},spawn:function(e,t,n){try{var i=Zr(e.apply(n,t||[]));return i&&typeof i.then=="function"?i:W.resolve(i)}catch(s){return $e(s)}},currentTransaction:{get:function(){return ie.trans||null}},waitFor:function(e,t){return t=W.resolve(typeof e=="function"?kt.ignoreTransaction(e):e).timeout(t||6e4),ie.trans?ie.trans.waitFor(t):t},Promise:W,debug:{get:function(){return nt},set:function(e){ko(e)}},derive:j,extend:$,props:ae,override:G,Events:en,on:ht,liveQuery:rs,extendObservabilitySet:er,getByKeyPath:te,setByKeyPath:U,delByKeyPath:function(e,t){typeof t=="string"?U(e,t,void 0):"length"in t&&[].map.call(t,function(n){U(e,n,void 0)})},shallowClone:K,deepClone:we,getObjectDiff:ei,cmp:xe,asap:fe,minKey:-1/0,addons:[],connections:jt,errnames:We,dependencies:ir,cache:Et,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,2*n)})})),kt.maxKey=sn(kt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ht(on,function(e){pt||(e=new CustomEvent(Fr,{detail:e}),pt=!0,dispatchEvent(e),pt=!1)}),addEventListener(Fr,function(e){e=e.detail,pt||ii(e)}));var qt,pt=!1,is=function(){};return typeof BroadcastChannel<"u"&&((is=function(){(qt=new BroadcastChannel(Fr)).onmessage=function(e){return e.data&&ii(e.data)}})(),typeof qt.unref=="function"&&qt.unref(),ht(on,function(e){pt||qt.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!at.disableBfCache&&e.persisted){nt&&console.debug("Dexie: handling persisted pagehide"),qt!=null&&qt.close();for(var t=0,n=jt;t<n.length;t++)n[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!at.disableBfCache&&e.persisted&&(nt&&console.debug("Dexie: handling persisted pageshow"),is(),ii({all:new Be(-1/0,[[]])}))})),W.rejectionMapper=function(e,t){return!e||e instanceof Oe||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Ce[e.name]?e:(t=new Ce[e.name](t||e.message,e),"stack"in e&&N(t,"stack",{get:function(){return this.inner.stack}}),t)},ko(nt),a(at,Object.freeze({__proto__:null,Dexie:at,liveQuery:rs,Entity:jo,cmp:xe,PropModification:nn,replacePrefix:function(e,t){return new nn({replacePrefix:[e,t]})},add:function(e){return new nn({add:e})},remove:function(e){return new nn({remove:e})},default:at,RangeSet:Be,mergeRanges:cn,rangesOverlap:Vo}),{default:at}),at})}(pn)),pn.exports}var Os=Ss();const sr=Ze(Os),hi=Symbol.for("Dexie"),mn=globalThis[hi]||(globalThis[hi]=sr);if(sr.semVer!==mn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${sr.semVer} and ${mn.semVer}`);const{liveQuery:qu,mergeRanges:Fu,rangesOverlap:Bu,RangeSet:Ku,cmp:Iu,Entity:Lu,PropModification:Uu,replacePrefix:Yu,add:Hu,remove:zu}=mn;class pi extends mn{constructor(){super("db");si(this,"rows");this.version(1).stores({rows:"++id, key"})}}const yn=new pi,ar=(r,o=!0)=>yn.rows.where({key:r}).first().then(u=>o?u==null?void 0:u.value:u),mi=async(r,o)=>{await ar(r,!1)?await yn.rows.where({key:r}).modify({value:o}):await yn.rows.add({key:r,value:o})},Es=Object.freeze(Object.defineProperty({__proto__:null,SubDexie:pi,db:yn,default:{get:ar,set:mi},get:ar,set:mi},Symbol.toStringTag,{value:"Module"})),yi=(r,o)=>r.find(u=>u.value==(Array.isArray(o)?o[0]:o)),vi=r=>new Promise(o=>setTimeout(o,r)),gi=(r,o)=>{o?console.log(o,r):console.log(r)},bi=r=>{throw new Error(r)},ks=Object.freeze(Object.defineProperty({__proto__:null,default:{findByValue:yi,sleep:vi,log:gi,fail:bi},fail:bi,findByValue:yi,log:gi,sleep:vi},Symbol.toStringTag,{value:"Module"})),wi=r=>new Promise((o,u)=>{const a=new FileReader;a.onload=l=>{var d;return o((d=l.target)==null?void 0:d.result)},a.onerror=l=>{var d;return u((d=l.target)==null?void 0:d.error)},a.readAsDataURL(r)}).then(o=>o),_i=r=>{const o=atob(r.split(",")[1]||r),u=new Uint8Array(o.length);for(let a=0;a<o.length;a++)u[a]=o.charCodeAt(a);return new Blob([u])},xi=(r,o)=>{const u=document.createElement("a");u.href=URL.createObjectURL(o),u.download=r,u.click(),URL.revokeObjectURL(u.href)},Ts=Object.freeze(Object.defineProperty({__proto__:null,default:{toBase64:wi,toBlob:_i,download:xi},download:xi,toBase64:wi,toBlob:_i},Symbol.toStringTag,{value:"Module"}));var vn={},gn={},ur,Si;function Oi(){if(Si)return ur;Si=1,ur=r;function r(u,a){if(a!=="$")for(var l=o(a),d=0;d<l.length;d++)a=l[d].toString().replace(/\\"/g,'"'),!(typeof u[a]>"u"&&d!==l.length-1)&&(u=u[a]);return u}function o(u){for(var a=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,l=[],d;d=a.exec(u);)l.push(d[1]||d[2]||d[3]);return l}return ur}var Bt={},Ei;function Rs(){if(Ei)return Bt;Ei=1;var r=Oi(),o=Ri();return Bt.getRegexFlags=function(a){var l="";return a.ignoreCase&&(l+="i"),a.global&&(l+="g"),a.multiline&&(l+="m"),l},Bt.stringifyFunction=function(a,l){if(typeof l=="function")return l(a);var d=a.toString(),h=d.match(/^[^{]*{|^[^=]*=>/),S=h?h[0]:"<function> ",$=d[d.length-1]==="}"?"}":"";return S.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+$},Bt.restore=function(a,l){var d=a[0],h=a.slice(1);switch(d){case"$":return r(l,a);case"r":var S=h.indexOf(","),$=h.slice(0,S),C=h.slice(S+1);return RegExp(C,$);case"d":return new Date(+h);case"f":var D=function(){throw new Error("can't run jsan parsed function")};return D.toString=function(){return h},D;case"u":return;case"e":var M=new Error(h);return M.stack="Stack is unavailable for jsan parsed errors",M;case"s":return Symbol(h);case"g":return Symbol.for(h);case"m":return new Map(o.parse(h));case"l":return new Set(o.parse(h));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",a),a}},Bt}var ki;function As(){if(ki)return gn;ki=1,Oi();var r=Rs(),o=typeof WeakMap<"u"?WeakMap:function(){var u=[],a=[];return{set:function(l,d){u.push(l),a.push(d)},get:function(l){for(var d=0;d<u.length;d++)if(u[d]===l)return a[d]}}};return gn.decycle=function u(a,l,d,h){h=h||new o;var S=!Object.prototype.hasOwnProperty.call(l,"circular"),$=l.refs!==!1;return function C(D,M,ae){var ue,N,j,E=typeof d=="function"?d(ae||"",D):D;if(l.date&&E instanceof Date)return{$jsan:"d"+E.getTime()};if(l.regex&&E instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(E)+","+E.source};if(l.function&&typeof E=="function")return{$jsan:"f"+r.stringifyFunction(E,l.function)};if(l.nan&&typeof E=="number"&&isNaN(E))return{$jsan:"n"};if(l.infinity){if(Number.POSITIVE_INFINITY===E)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===E)return{$jsan:"y"}}if(l.undefined&&E===void 0)return{$jsan:"u"};if(l.error&&E instanceof Error)return{$jsan:"e"+E.message};if(l.symbol&&typeof E=="symbol"){var J=Symbol.keyFor(E);return J!==void 0?{$jsan:"g"+J}:{$jsan:"s"+E.toString().slice(7,-1)}}if(l.map&&typeof Map=="function"&&E instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(u(Array.from(E),l,d,h))};if(l.set&&typeof Set=="function"&&E instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(u(Array.from(E),l,d,h))};if(E&&typeof E.toJSON=="function")try{E=E.toJSON(ae)}catch{var re=ae||"$";return"toJSON failed for '"+(h.get(E)||re)+"'"}if(typeof E=="object"&&E!==null&&!(E instanceof Boolean)&&!(E instanceof Date)&&!(E instanceof Number)&&!(E instanceof RegExp)&&!(E instanceof String)&&typeof E!="symbol"&&!(E instanceof Error)){if(typeof E=="object"){var G=h.get(E);if(G){if(S&&$)return{$jsan:G};var _e=M.split(".").slice(0,-1).join(".");if(_e.indexOf(G)===0)return S?{$jsan:G}:typeof l.circular=="function"?l.circular(E,M,G):l.circular;if($)return{$jsan:G}}h.set(E,M)}if(Object.prototype.toString.apply(E)==="[object Array]")for(j=[],ue=0;ue<E.length;ue+=1)j[ue]=C(E[ue],M+"["+ue+"]",ue);else{j={};for(N in E)if(Object.prototype.hasOwnProperty.call(E,N)){var fe=/^\w+$/.test(N)?"."+N:"["+JSON.stringify(N)+"]";j[N]=N==="$jsan"?[C(E[N],M+fe)]:C(E[N],M+fe,N)}}return j}return E}(a,"$")},gn.retrocycle=function(a){return function l(d){var h,S,$;if(d&&typeof d=="object")if(Object.prototype.toString.apply(d)==="[object Array]")for(h=0;h<d.length;h+=1)S=d[h],S&&typeof S=="object"&&(S.$jsan?d[h]=r.restore(S.$jsan,a):l(S));else for($ in d){if(typeof d[$]=="string"&&$==="$jsan")return r.restore(d.$jsan,a);$==="$jsan"&&(d[$]=d[$][0]),typeof d[$]=="object"&&(S=d[$],S&&typeof S=="object"&&(S.$jsan?d[$]=r.restore(S.$jsan,a):l(S)))}return d}(a)},gn}var Ti;function Ri(){if(Ti)return vn;Ti=1;var r=As();return vn.stringify=function(u,a,l,d){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(u):JSON.stringify.apply(JSON,arguments)}catch{}var h=d||!1;typeof h=="boolean"&&(h={date:h,function:h,regex:h,undefined:h,error:h,symbol:h,map:h,set:h,nan:h,infinity:h});var S=r.decycle(u,h,a);return arguments.length===1?JSON.stringify(S):JSON.stringify(S,Array.isArray(a)?a:null,l)},vn.parse=function(u,a){var l=/"\$jsan"/.test(u),d;return arguments.length===1?d=JSON.parse(u):d=JSON.parse(u,a),l&&(d=r.retrocycle(d)),d},vn}var cr,Ai;function $s(){return Ai||(Ai=1,cr=Ri()),cr}var Ps=$s();const $i=Ze(Ps),Pi=(r=null,o,u,a=!0)=>$i.stringify(r,o,u,a),Di=(r,o)=>$i.parse(r,o),bn={stringify:Pi,parse:Di},Ds=Object.freeze(Object.defineProperty({__proto__:null,default:bn,parse:Di,stringify:Pi},Symbol.toStringTag,{value:"Module"}));let lr;typeof window>"u"&&(lr=require("crypto"));const Ci=async(r,o=!0)=>{const u=o?bn.stringify(r):r;if(typeof window<"u"){const l=new TextEncoder().encode(u),d=await lr.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(d)).map($=>$.toString(16).padStart(2,"0")).join("")}else{const a=lr.createHash("sha256");return a.update(u),a.digest("hex")}},Cs=Object.freeze(Object.defineProperty({__proto__:null,SHA256:Ci,default:{SHA256:Ci}},Symbol.toStringTag,{value:"Module"}));function ji(r,o){return function(){return r.apply(o,arguments)}}const{toString:js}=Object.prototype,{getPrototypeOf:fr}=Object,wn=(r=>o=>{const u=js.call(o);return r[u]||(r[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),et=r=>(r=r.toLowerCase(),o=>wn(o)===r),_n=r=>o=>typeof o===r,{isArray:Rt}=Array,Kt=_n("undefined");function Ms(r){return r!==null&&!Kt(r)&&r.constructor!==null&&!Kt(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Mi=et("ArrayBuffer");function Ns(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&Mi(r.buffer),o}const qs=_n("string"),Ve=_n("function"),Ni=_n("number"),xn=r=>r!==null&&typeof r=="object",Fs=r=>r===!0||r===!1,Sn=r=>{if(wn(r)!=="object")return!1;const o=fr(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Bs=et("Date"),Ks=et("File"),Is=et("Blob"),Ls=et("FileList"),Us=r=>xn(r)&&Ve(r.pipe),Ys=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((o=wn(r))==="formdata"||o==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},Hs=et("URLSearchParams"),[zs,Vs,Ws,Js]=["ReadableStream","Request","Response","Headers"].map(et),Gs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(r,o,{allOwnKeys:u=!1}={}){if(r===null||typeof r>"u")return;let a,l;if(typeof r!="object"&&(r=[r]),Rt(r))for(a=0,l=r.length;a<l;a++)o.call(null,r[a],a,r);else{const d=u?Object.getOwnPropertyNames(r):Object.keys(r),h=d.length;let S;for(a=0;a<h;a++)S=d[a],o.call(null,r[S],S,r)}}function qi(r,o){o=o.toLowerCase();const u=Object.keys(r);let a=u.length,l;for(;a-- >0;)if(l=u[a],o===l.toLowerCase())return l;return null}const mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fi=r=>!Kt(r)&&r!==mt;function dr(){const{caseless:r}=Fi(this)&&this||{},o={},u=(a,l)=>{const d=r&&qi(o,l)||l;Sn(o[d])&&Sn(a)?o[d]=dr(o[d],a):Sn(a)?o[d]=dr({},a):Rt(a)?o[d]=a.slice():o[d]=a};for(let a=0,l=arguments.length;a<l;a++)arguments[a]&&It(arguments[a],u);return o}const Xs=(r,o,u,{allOwnKeys:a}={})=>(It(o,(l,d)=>{u&&Ve(l)?r[d]=ji(l,u):r[d]=l},{allOwnKeys:a}),r),Qs=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Zs=(r,o,u,a)=>{r.prototype=Object.create(o.prototype,a),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),u&&Object.assign(r.prototype,u)},ea=(r,o,u,a)=>{let l,d,h;const S={};if(o=o||{},r==null)return o;do{for(l=Object.getOwnPropertyNames(r),d=l.length;d-- >0;)h=l[d],(!a||a(h,r,o))&&!S[h]&&(o[h]=r[h],S[h]=!0);r=u!==!1&&fr(r)}while(r&&(!u||u(r,o))&&r!==Object.prototype);return o},ta=(r,o,u)=>{r=String(r),(u===void 0||u>r.length)&&(u=r.length),u-=o.length;const a=r.indexOf(o,u);return a!==-1&&a===u},na=r=>{if(!r)return null;if(Rt(r))return r;let o=r.length;if(!Ni(o))return null;const u=new Array(o);for(;o-- >0;)u[o]=r[o];return u},ra=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&fr(Uint8Array)),ia=(r,o)=>{const a=(r&&r[Symbol.iterator]).call(r);let l;for(;(l=a.next())&&!l.done;){const d=l.value;o.call(r,d[0],d[1])}},oa=(r,o)=>{let u;const a=[];for(;(u=r.exec(o))!==null;)a.push(u);return a},sa=et("HTMLFormElement"),aa=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,a,l){return a.toUpperCase()+l}),Bi=(({hasOwnProperty:r})=>(o,u)=>r.call(o,u))(Object.prototype),ua=et("RegExp"),Ki=(r,o)=>{const u=Object.getOwnPropertyDescriptors(r),a={};It(u,(l,d)=>{let h;(h=o(l,d,r))!==!1&&(a[d]=h||l)}),Object.defineProperties(r,a)},ca=r=>{Ki(r,(o,u)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const a=r[u];if(Ve(a)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},la=(r,o)=>{const u={},a=l=>{l.forEach(d=>{u[d]=!0})};return Rt(r)?a(r):a(String(r).split(o)),u},fa=()=>{},da=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function ha(r){return!!(r&&Ve(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const pa=r=>{const o=new Array(10),u=(a,l)=>{if(xn(a)){if(o.indexOf(a)>=0)return;if(!("toJSON"in a)){o[l]=a;const d=Rt(a)?[]:{};return It(a,(h,S)=>{const $=u(h,l+1);!Kt($)&&(d[S]=$)}),o[l]=void 0,d}}return a};return u(r,0)},ma=et("AsyncFunction"),ya=r=>r&&(xn(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Ii=((r,o)=>r?setImmediate:o?((u,a)=>(mt.addEventListener("message",({source:l,data:d})=>{l===mt&&d===u&&a.length&&a.shift()()},!1),l=>{a.push(l),mt.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ve(mt.postMessage)),va=typeof queueMicrotask<"u"?queueMicrotask.bind(mt):typeof process<"u"&&process.nextTick||Ii,A={isArray:Rt,isArrayBuffer:Mi,isBuffer:Ms,isFormData:Ys,isArrayBufferView:Ns,isString:qs,isNumber:Ni,isBoolean:Fs,isObject:xn,isPlainObject:Sn,isReadableStream:zs,isRequest:Vs,isResponse:Ws,isHeaders:Js,isUndefined:Kt,isDate:Bs,isFile:Ks,isBlob:Is,isRegExp:ua,isFunction:Ve,isStream:Us,isURLSearchParams:Hs,isTypedArray:ra,isFileList:Ls,forEach:It,merge:dr,extend:Xs,trim:Gs,stripBOM:Qs,inherits:Zs,toFlatObject:ea,kindOf:wn,kindOfTest:et,endsWith:ta,toArray:na,forEachEntry:ia,matchAll:oa,isHTMLForm:sa,hasOwnProperty:Bi,hasOwnProp:Bi,reduceDescriptors:Ki,freezeMethods:ca,toObjectSet:la,toCamelCase:aa,noop:fa,toFiniteNumber:da,findKey:qi,global:mt,isContextDefined:Fi,isSpecCompliantForm:ha,toJSONObject:pa,isAsyncFn:ma,isThenable:ya,setImmediate:Ii,asap:va};function pe(r,o,u,a,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),u&&(this.config=u),a&&(this.request=a),l&&(this.response=l,this.status=l.status?l.status:null)}A.inherits(pe,Error,{toJSON:function(){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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Li=pe.prototype,Ui={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Ui[r]={value:r}}),Object.defineProperties(pe,Ui),Object.defineProperty(Li,"isAxiosError",{value:!0}),pe.from=(r,o,u,a,l,d)=>{const h=Object.create(Li);return A.toFlatObject(r,h,function($){return $!==Error.prototype},S=>S!=="isAxiosError"),pe.call(h,r.message,o,u,a,l),h.cause=r,h.name=r.name,d&&Object.assign(h,d),h};const ga=null;function hr(r){return A.isPlainObject(r)||A.isArray(r)}function Yi(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function Hi(r,o,u){return r?r.concat(o).map(function(l,d){return l=Yi(l),!u&&d?"["+l+"]":l}).join(u?".":""):o}function ba(r){return A.isArray(r)&&!r.some(hr)}const wa=A.toFlatObject(A,{},null,function(o){return/^is[A-Z]/.test(o)});function On(r,o,u){if(!A.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,u=A.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,E){return!A.isUndefined(E[j])});const a=u.metaTokens,l=u.visitor||D,d=u.dots,h=u.indexes,$=(u.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(o);if(!A.isFunction(l))throw new TypeError("visitor must be a function");function C(N){if(N===null)return"";if(A.isDate(N))return N.toISOString();if(!$&&A.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(N)||A.isTypedArray(N)?$&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function D(N,j,E){let J=N;if(N&&!E&&typeof N=="object"){if(A.endsWith(j,"{}"))j=a?j:j.slice(0,-2),N=JSON.stringify(N);else if(A.isArray(N)&&ba(N)||(A.isFileList(N)||A.endsWith(j,"[]"))&&(J=A.toArray(N)))return j=Yi(j),J.forEach(function(G,_e){!(A.isUndefined(G)||G===null)&&o.append(h===!0?Hi([j],_e,d):h===null?j:j+"[]",C(G))}),!1}return hr(N)?!0:(o.append(Hi(E,j,d),C(N)),!1)}const M=[],ae=Object.assign(wa,{defaultVisitor:D,convertValue:C,isVisitable:hr});function ue(N,j){if(!A.isUndefined(N)){if(M.indexOf(N)!==-1)throw Error("Circular reference detected in "+j.join("."));M.push(N),A.forEach(N,function(J,re){(!(A.isUndefined(J)||J===null)&&l.call(o,J,A.isString(re)?re.trim():re,j,ae))===!0&&ue(J,j?j.concat(re):[re])}),M.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return ue(r),o}function zi(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function pr(r,o){this._pairs=[],r&&On(r,this,o)}const Vi=pr.prototype;Vi.append=function(o,u){this._pairs.push([o,u])},Vi.toString=function(o){const u=o?function(a){return o.call(this,a,zi)}:zi;return this._pairs.map(function(l){return u(l[0])+"="+u(l[1])},"").join("&")};function _a(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wi(r,o,u){if(!o)return r;const a=u&&u.encode||_a;A.isFunction(u)&&(u={serialize:u});const l=u&&u.serialize;let d;if(l?d=l(o,u):d=A.isURLSearchParams(o)?o.toString():new pr(o,u).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Ji{constructor(){this.handlers=[]}use(o,u,a){return this.handlers.push({fulfilled:o,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){A.forEach(this.handlers,function(a){a!==null&&o(a)})}}const Gi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xa={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mr=typeof window<"u"&&typeof document<"u",yr=typeof navigator=="object"&&navigator||void 0,Sa=mr&&(!yr||["ReactNative","NativeScript","NS"].indexOf(yr.product)<0),Oa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ea=mr&&window.location.href||"http://localhost",Fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mr,hasStandardBrowserEnv:Sa,hasStandardBrowserWebWorkerEnv:Oa,navigator:yr,origin:Ea},Symbol.toStringTag,{value:"Module"})),...xa};function ka(r,o){return On(r,new Fe.classes.URLSearchParams,Object.assign({visitor:function(u,a,l,d){return Fe.isNode&&A.isBuffer(u)?(this.append(a,u.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},o))}function Ta(r){return A.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Ra(r){const o={},u=Object.keys(r);let a;const l=u.length;let d;for(a=0;a<l;a++)d=u[a],o[d]=r[d];return o}function Xi(r){function o(u,a,l,d){let h=u[d++];if(h==="__proto__")return!0;const S=Number.isFinite(+h),$=d>=u.length;return h=!h&&A.isArray(l)?l.length:h,$?(A.hasOwnProp(l,h)?l[h]=[l[h],a]:l[h]=a,!S):((!l[h]||!A.isObject(l[h]))&&(l[h]=[]),o(u,a,l[h],d)&&A.isArray(l[h])&&(l[h]=Ra(l[h])),!S)}if(A.isFormData(r)&&A.isFunction(r.entries)){const u={};return A.forEachEntry(r,(a,l)=>{o(Ta(a),l,u,0)}),u}return null}function Aa(r,o,u){if(A.isString(r))try{return(o||JSON.parse)(r),A.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(u||JSON.stringify)(r)}const Lt={transitional:Gi,adapter:["xhr","http","fetch"],transformRequest:[function(o,u){const a=u.getContentType()||"",l=a.indexOf("application/json")>-1,d=A.isObject(o);if(d&&A.isHTMLForm(o)&&(o=new FormData(o)),A.isFormData(o))return l?JSON.stringify(Xi(o)):o;if(A.isArrayBuffer(o)||A.isBuffer(o)||A.isStream(o)||A.isFile(o)||A.isBlob(o)||A.isReadableStream(o))return o;if(A.isArrayBufferView(o))return o.buffer;if(A.isURLSearchParams(o))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let S;if(d){if(a.indexOf("application/x-www-form-urlencoded")>-1)return ka(o,this.formSerializer).toString();if((S=A.isFileList(o))||a.indexOf("multipart/form-data")>-1){const $=this.env&&this.env.FormData;return On(S?{"files[]":o}:o,$&&new $,this.formSerializer)}}return d||l?(u.setContentType("application/json",!1),Aa(o)):o}],transformResponse:[function(o){const u=this.transitional||Lt.transitional,a=u&&u.forcedJSONParsing,l=this.responseType==="json";if(A.isResponse(o)||A.isReadableStream(o))return o;if(o&&A.isString(o)&&(a&&!this.responseType||l)){const h=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(o)}catch(S){if(h)throw S.name==="SyntaxError"?pe.from(S,pe.ERR_BAD_RESPONSE,this,null,this.response):S}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],r=>{Lt.headers[r]={}});const $a=A.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"]),Pa=r=>{const o={};let u,a,l;return r&&r.split(`
|
|
4
|
+
`).forEach(function(h){l=h.indexOf(":"),u=h.substring(0,l).trim().toLowerCase(),a=h.substring(l+1).trim(),!(!u||o[u]&&$a[u])&&(u==="set-cookie"?o[u]?o[u].push(a):o[u]=[a]:o[u]=o[u]?o[u]+", "+a:a)}),o},Qi=Symbol("internals");function Ut(r){return r&&String(r).trim().toLowerCase()}function En(r){return r===!1||r==null?r:A.isArray(r)?r.map(En):String(r)}function Da(r){const o=Object.create(null),u=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=u.exec(r);)o[a[1]]=a[2];return o}const Ca=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function vr(r,o,u,a,l){if(A.isFunction(a))return a.call(this,o,u);if(l&&(o=u),!!A.isString(o)){if(A.isString(a))return o.indexOf(a)!==-1;if(A.isRegExp(a))return a.test(o)}}function ja(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,u,a)=>u.toUpperCase()+a)}function Ma(r,o){const u=A.toCamelCase(" "+o);["get","set","has"].forEach(a=>{Object.defineProperty(r,a+u,{value:function(l,d,h){return this[a].call(this,o,l,d,h)},configurable:!0})})}let Ye=class{constructor(o){o&&this.set(o)}set(o,u,a){const l=this;function d(S,$,C){const D=Ut($);if(!D)throw new Error("header name must be a non-empty string");const M=A.findKey(l,D);(!M||l[M]===void 0||C===!0||C===void 0&&l[M]!==!1)&&(l[M||$]=En(S))}const h=(S,$)=>A.forEach(S,(C,D)=>d(C,D,$));if(A.isPlainObject(o)||o instanceof this.constructor)h(o,u);else if(A.isString(o)&&(o=o.trim())&&!Ca(o))h(Pa(o),u);else if(A.isHeaders(o))for(const[S,$]of o.entries())d($,S,a);else o!=null&&d(u,o,a);return this}get(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);if(a){const l=this[a];if(!u)return l;if(u===!0)return Da(l);if(A.isFunction(u))return u.call(this,l,a);if(A.isRegExp(u))return u.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);return!!(a&&this[a]!==void 0&&(!u||vr(this,this[a],a,u)))}return!1}delete(o,u){const a=this;let l=!1;function d(h){if(h=Ut(h),h){const S=A.findKey(a,h);S&&(!u||vr(a,a[S],S,u))&&(delete a[S],l=!0)}}return A.isArray(o)?o.forEach(d):d(o),l}clear(o){const u=Object.keys(this);let a=u.length,l=!1;for(;a--;){const d=u[a];(!o||vr(this,this[d],d,o,!0))&&(delete this[d],l=!0)}return l}normalize(o){const u=this,a={};return A.forEach(this,(l,d)=>{const h=A.findKey(a,d);if(h){u[h]=En(l),delete u[d];return}const S=o?ja(d):String(d).trim();S!==d&&delete u[d],u[S]=En(l),a[S]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const u=Object.create(null);return A.forEach(this,(a,l)=>{a!=null&&a!==!1&&(u[l]=o&&A.isArray(a)?a.join(", "):a)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,u])=>o+": "+u).join(`
|
|
5
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...u){const a=new this(o);return u.forEach(l=>a.set(l)),a}static accessor(o){const a=(this[Qi]=this[Qi]={accessors:{}}).accessors,l=this.prototype;function d(h){const S=Ut(h);a[S]||(Ma(l,h),a[S]=!0)}return A.isArray(o)?o.forEach(d):d(o),this}};Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Ye.prototype,({value:r},o)=>{let u=o[0].toUpperCase()+o.slice(1);return{get:()=>r,set(a){this[u]=a}}}),A.freezeMethods(Ye);function gr(r,o){const u=this||Lt,a=o||u,l=Ye.from(a.headers);let d=a.data;return A.forEach(r,function(S){d=S.call(u,d,l.normalize(),o?o.status:void 0)}),l.normalize(),d}function Zi(r){return!!(r&&r.__CANCEL__)}function At(r,o,u){pe.call(this,r??"canceled",pe.ERR_CANCELED,o,u),this.name="CanceledError"}A.inherits(At,pe,{__CANCEL__:!0});function eo(r,o,u){const a=u.config.validateStatus;!u.status||!a||a(u.status)?r(u):o(new pe("Request failed with status code "+u.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}function Na(r){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return o&&o[1]||""}function qa(r,o){r=r||10;const u=new Array(r),a=new Array(r);let l=0,d=0,h;return o=o!==void 0?o:1e3,function($){const C=Date.now(),D=a[d];h||(h=C),u[l]=$,a[l]=C;let M=d,ae=0;for(;M!==l;)ae+=u[M++],M=M%r;if(l=(l+1)%r,l===d&&(d=(d+1)%r),C-h<o)return;const ue=D&&C-D;return ue?Math.round(ae*1e3/ue):void 0}}function Fa(r,o){let u=0,a=1e3/o,l,d;const h=(C,D=Date.now())=>{u=D,l=null,d&&(clearTimeout(d),d=null),r.apply(null,C)};return[(...C)=>{const D=Date.now(),M=D-u;M>=a?h(C,D):(l=C,d||(d=setTimeout(()=>{d=null,h(l)},a-M)))},()=>l&&h(l)]}const kn=(r,o,u=3)=>{let a=0;const l=qa(50,250);return Fa(d=>{const h=d.loaded,S=d.lengthComputable?d.total:void 0,$=h-a,C=l($),D=h<=S;a=h;const M={loaded:h,total:S,progress:S?h/S:void 0,bytes:$,rate:C||void 0,estimated:C&&S&&D?(S-h)/C:void 0,event:d,lengthComputable:S!=null,[o?"download":"upload"]:!0};r(M)},u)},to=(r,o)=>{const u=r!=null;return[a=>o[0]({lengthComputable:u,total:r,loaded:a}),o[1]]},no=r=>(...o)=>A.asap(()=>r(...o)),Ba=Fe.hasStandardBrowserEnv?((r,o)=>u=>(u=new URL(u,Fe.origin),r.protocol===u.protocol&&r.host===u.host&&(o||r.port===u.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,Ka=Fe.hasStandardBrowserEnv?{write(r,o,u,a,l,d){const h=[r+"="+encodeURIComponent(o)];A.isNumber(u)&&h.push("expires="+new Date(u).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(l)&&h.push("domain="+l),d===!0&&h.push("secure"),document.cookie=h.join("; ")},read(r){const o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ia(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function La(r,o){return o?r.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):r}function ro(r,o,u){let a=!Ia(o);return r&&a||u==!1?La(r,o):o}const io=r=>r instanceof Ye?{...r}:r;function yt(r,o){o=o||{};const u={};function a(C,D,M,ae){return A.isPlainObject(C)&&A.isPlainObject(D)?A.merge.call({caseless:ae},C,D):A.isPlainObject(D)?A.merge({},D):A.isArray(D)?D.slice():D}function l(C,D,M,ae){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C,M,ae)}else return a(C,D,M,ae)}function d(C,D){if(!A.isUndefined(D))return a(void 0,D)}function h(C,D){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C)}else return a(void 0,D)}function S(C,D,M){if(M in o)return a(C,D);if(M in r)return a(void 0,C)}const $={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:S,headers:(C,D,M)=>l(io(C),io(D),M,!0)};return A.forEach(Object.keys(Object.assign({},r,o)),function(D){const M=$[D]||l,ae=M(r[D],o[D],D);A.isUndefined(ae)&&M!==S||(u[D]=ae)}),u}const oo=r=>{const o=yt({},r);let{data:u,withXSRFToken:a,xsrfHeaderName:l,xsrfCookieName:d,headers:h,auth:S}=o;o.headers=h=Ye.from(h),o.url=Wi(ro(o.baseURL,o.url,o.allowAbsoluteUrls),r.params,r.paramsSerializer),S&&h.set("Authorization","Basic "+btoa((S.username||"")+":"+(S.password?unescape(encodeURIComponent(S.password)):"")));let $;if(A.isFormData(u)){if(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if(($=h.getContentType())!==!1){const[C,...D]=$?$.split(";").map(M=>M.trim()).filter(Boolean):[];h.setContentType([C||"multipart/form-data",...D].join("; "))}}if(Fe.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(o)),a||a!==!1&&Ba(o.url))){const C=l&&d&&Ka.read(d);C&&h.set(l,C)}return o},Ua=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(u,a){const l=oo(r);let d=l.data;const h=Ye.from(l.headers).normalize();let{responseType:S,onUploadProgress:$,onDownloadProgress:C}=l,D,M,ae,ue,N;function j(){ue&&ue(),N&&N(),l.cancelToken&&l.cancelToken.unsubscribe(D),l.signal&&l.signal.removeEventListener("abort",D)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function J(){if(!E)return;const G=Ye.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),fe={data:!S||S==="text"||S==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:G,config:r,request:E};eo(function(U){u(U),j()},function(U){a(U),j()},fe),E=null}"onloadend"in E?E.onloadend=J:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(J)},E.onabort=function(){E&&(a(new pe("Request aborted",pe.ECONNABORTED,r,E)),E=null)},E.onerror=function(){a(new pe("Network Error",pe.ERR_NETWORK,r,E)),E=null},E.ontimeout=function(){let _e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const fe=l.transitional||Gi;l.timeoutErrorMessage&&(_e=l.timeoutErrorMessage),a(new pe(_e,fe.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,r,E)),E=null},d===void 0&&h.setContentType(null),"setRequestHeader"in E&&A.forEach(h.toJSON(),function(_e,fe){E.setRequestHeader(fe,_e)}),A.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),S&&S!=="json"&&(E.responseType=l.responseType),C&&([ae,N]=kn(C,!0),E.addEventListener("progress",ae)),$&&E.upload&&([M,ue]=kn($),E.upload.addEventListener("progress",M),E.upload.addEventListener("loadend",ue)),(l.cancelToken||l.signal)&&(D=G=>{E&&(a(!G||G.type?new At(null,r,E):G),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe(D),l.signal&&(l.signal.aborted?D():l.signal.addEventListener("abort",D)));const re=Na(l.url);if(re&&Fe.protocols.indexOf(re)===-1){a(new pe("Unsupported protocol "+re+":",pe.ERR_BAD_REQUEST,r));return}E.send(d||null)})},Ya=(r,o)=>{const{length:u}=r=r?r.filter(Boolean):[];if(o||u){let a=new AbortController,l;const d=function(C){if(!l){l=!0,S();const D=C instanceof Error?C:this.reason;a.abort(D instanceof pe?D:new At(D instanceof Error?D.message:D))}};let h=o&&setTimeout(()=>{h=null,d(new pe(`timeout ${o} of ms exceeded`,pe.ETIMEDOUT))},o);const S=()=>{r&&(h&&clearTimeout(h),h=null,r.forEach(C=>{C.unsubscribe?C.unsubscribe(d):C.removeEventListener("abort",d)}),r=null)};r.forEach(C=>C.addEventListener("abort",d));const{signal:$}=a;return $.unsubscribe=()=>A.asap(S),$}},Ha=function*(r,o){let u=r.byteLength;if(u<o){yield r;return}let a=0,l;for(;a<u;)l=a+o,yield r.slice(a,l),a=l},za=async function*(r,o){for await(const u of Va(r))yield*Ha(u,o)},Va=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const o=r.getReader();try{for(;;){const{done:u,value:a}=await o.read();if(u)break;yield a}}finally{await o.cancel()}},so=(r,o,u,a)=>{const l=za(r,o);let d=0,h,S=$=>{h||(h=!0,a&&a($))};return new ReadableStream({async pull($){try{const{done:C,value:D}=await l.next();if(C){S(),$.close();return}let M=D.byteLength;if(u){let ae=d+=M;u(ae)}$.enqueue(new Uint8Array(D))}catch(C){throw S(C),C}},cancel($){return S($),l.return()}},{highWaterMark:2})},Tn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ao=Tn&&typeof ReadableStream=="function",Wa=Tn&&(typeof TextEncoder=="function"?(r=>o=>r.encode(o))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),uo=(r,...o)=>{try{return!!r(...o)}catch{return!1}},Ja=ao&&uo(()=>{let r=!1;const o=new Request(Fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!o}),co=64*1024,br=ao&&uo(()=>A.isReadableStream(new Response("").body)),Rn={stream:br&&(r=>r.body)};Tn&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!Rn[o]&&(Rn[o]=A.isFunction(r[o])?u=>u[o]():(u,a)=>{throw new pe(`Response type '${o}' is not supported`,pe.ERR_NOT_SUPPORT,a)})})})(new Response);const Ga=async r=>{if(r==null)return 0;if(A.isBlob(r))return r.size;if(A.isSpecCompliantForm(r))return(await new Request(Fe.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(A.isArrayBufferView(r)||A.isArrayBuffer(r))return r.byteLength;if(A.isURLSearchParams(r)&&(r=r+""),A.isString(r))return(await Wa(r)).byteLength},Xa=async(r,o)=>{const u=A.toFiniteNumber(r.getContentLength());return u??Ga(o)},wr={http:ga,xhr:Ua,fetch:Tn&&(async r=>{let{url:o,method:u,data:a,signal:l,cancelToken:d,timeout:h,onDownloadProgress:S,onUploadProgress:$,responseType:C,headers:D,withCredentials:M="same-origin",fetchOptions:ae}=oo(r);C=C?(C+"").toLowerCase():"text";let ue=Ya([l,d&&d.toAbortSignal()],h),N;const j=ue&&ue.unsubscribe&&(()=>{ue.unsubscribe()});let E;try{if($&&Ja&&u!=="get"&&u!=="head"&&(E=await Xa(D,a))!==0){let fe=new Request(o,{method:"POST",body:a,duplex:"half"}),te;if(A.isFormData(a)&&(te=fe.headers.get("content-type"))&&D.setContentType(te),fe.body){const[U,K]=to(E,kn(no($)));a=so(fe.body,co,U,K)}}A.isString(M)||(M=M?"include":"omit");const J="credentials"in Request.prototype;N=new Request(o,{...ae,signal:ue,method:u.toUpperCase(),headers:D.normalize().toJSON(),body:a,duplex:"half",credentials:J?M:void 0});let re=await fetch(N);const G=br&&(C==="stream"||C==="response");if(br&&(S||G&&j)){const fe={};["status","statusText","headers"].forEach(ce=>{fe[ce]=re[ce]});const te=A.toFiniteNumber(re.headers.get("content-length")),[U,K]=S&&to(te,kn(no(S),!0))||[];re=new Response(so(re.body,co,U,()=>{K&&K(),j&&j()}),fe)}C=C||"text";let _e=await Rn[A.findKey(Rn,C)||"text"](re,r);return!G&&j&&j(),await new Promise((fe,te)=>{eo(fe,te,{data:_e,headers:Ye.from(re.headers),status:re.status,statusText:re.statusText,config:r,request:N})})}catch(J){throw j&&j(),J&&J.name==="TypeError"&&/fetch/i.test(J.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,r,N),{cause:J.cause||J}):pe.from(J,J&&J.code,r,N)}})};A.forEach(wr,(r,o)=>{if(r){try{Object.defineProperty(r,"name",{value:o})}catch{}Object.defineProperty(r,"adapterName",{value:o})}});const lo=r=>`- ${r}`,Qa=r=>A.isFunction(r)||r===null||r===!1,fo={getAdapter:r=>{r=A.isArray(r)?r:[r];const{length:o}=r;let u,a;const l={};for(let d=0;d<o;d++){u=r[d];let h;if(a=u,!Qa(u)&&(a=wr[(h=String(u)).toLowerCase()],a===void 0))throw new pe(`Unknown adapter '${h}'`);if(a)break;l[h||"#"+d]=a}if(!a){const d=Object.entries(l).map(([S,$])=>`adapter ${S} `+($===!1?"is not supported by the environment":"is not available in the build"));let h=o?d.length>1?`since :
|
|
6
|
+
`+d.map(lo).join(`
|
|
7
|
+
`):" "+lo(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return a},adapters:wr};function _r(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new At(null,r)}function ho(r){return _r(r),r.headers=Ye.from(r.headers),r.data=gr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),fo.getAdapter(r.adapter||Lt.adapter)(r).then(function(a){return _r(r),a.data=gr.call(r,r.transformResponse,a),a.headers=Ye.from(a.headers),a},function(a){return Zi(a)||(_r(r),a&&a.response&&(a.response.data=gr.call(r,r.transformResponse,a.response),a.response.headers=Ye.from(a.response.headers))),Promise.reject(a)})}const po="1.8.3",An={};["object","boolean","number","function","string","symbol"].forEach((r,o)=>{An[r]=function(a){return typeof a===r||"a"+(o<1?"n ":" ")+r}});const mo={};An.transitional=function(o,u,a){function l(d,h){return"[Axios v"+po+"] Transitional option '"+d+"'"+h+(a?". "+a:"")}return(d,h,S)=>{if(o===!1)throw new pe(l(h," has been removed"+(u?" in "+u:"")),pe.ERR_DEPRECATED);return u&&!mo[h]&&(mo[h]=!0,console.warn(l(h," has been deprecated since v"+u+" and will be removed in the near future"))),o?o(d,h,S):!0}},An.spelling=function(o){return(u,a)=>(console.warn(`${a} is likely a misspelling of ${o}`),!0)};function Za(r,o,u){if(typeof r!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const a=Object.keys(r);let l=a.length;for(;l-- >0;){const d=a[l],h=o[d];if(h){const S=r[d],$=S===void 0||h(S,d,r);if($!==!0)throw new pe("option "+d+" must be "+$,pe.ERR_BAD_OPTION_VALUE);continue}if(u!==!0)throw new pe("Unknown option "+d,pe.ERR_BAD_OPTION)}}const $n={assertOptions:Za,validators:An},tt=$n.validators;let vt=class{constructor(o){this.defaults=o,this.interceptors={request:new Ji,response:new Ji}}async request(o,u){try{return await this._request(o,u)}catch(a){if(a instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const d=l.stack?l.stack.replace(/^.+\n/,""):"";try{a.stack?d&&!String(a.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(a.stack+=`
|
|
8
|
+
`+d):a.stack=d}catch{}}throw a}}_request(o,u){typeof o=="string"?(u=u||{},u.url=o):u=o||{},u=yt(this.defaults,u);const{transitional:a,paramsSerializer:l,headers:d}=u;a!==void 0&&$n.assertOptions(a,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),l!=null&&(A.isFunction(l)?u.paramsSerializer={serialize:l}:$n.assertOptions(l,{encode:tt.function,serialize:tt.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),$n.assertOptions(u,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let h=d&&A.merge(d.common,d[u.method]);d&&A.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),u.headers=Ye.concat(h,d);const S=[];let $=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(u)===!1||($=$&&j.synchronous,S.unshift(j.fulfilled,j.rejected))});const C=[];this.interceptors.response.forEach(function(j){C.push(j.fulfilled,j.rejected)});let D,M=0,ae;if(!$){const N=[ho.bind(this),void 0];for(N.unshift.apply(N,S),N.push.apply(N,C),ae=N.length,D=Promise.resolve(u);M<ae;)D=D.then(N[M++],N[M++]);return D}ae=S.length;let ue=u;for(M=0;M<ae;){const N=S[M++],j=S[M++];try{ue=N(ue)}catch(E){j.call(this,E);break}}try{D=ho.call(this,ue)}catch(N){return Promise.reject(N)}for(M=0,ae=C.length;M<ae;)D=D.then(C[M++],C[M++]);return D}getUri(o){o=yt(this.defaults,o);const u=ro(o.baseURL,o.url,o.allowAbsoluteUrls);return Wi(u,o.params,o.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(o){vt.prototype[o]=function(u,a){return this.request(yt(a||{},{method:o,url:u,data:(a||{}).data}))}}),A.forEach(["post","put","patch"],function(o){function u(a){return function(d,h,S){return this.request(yt(S||{},{method:o,headers:a?{"Content-Type":"multipart/form-data"}:{},url:d,data:h}))}}vt.prototype[o]=u(),vt.prototype[o+"Form"]=u(!0)});let eu=class os{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let u;this.promise=new Promise(function(d){u=d});const a=this;this.promise.then(l=>{if(!a._listeners)return;let d=a._listeners.length;for(;d-- >0;)a._listeners[d](l);a._listeners=null}),this.promise.then=l=>{let d;const h=new Promise(S=>{a.subscribe(S),d=S}).then(l);return h.cancel=function(){a.unsubscribe(d)},h},o(function(d,h,S){a.reason||(a.reason=new At(d,h,S),u(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const u=this._listeners.indexOf(o);u!==-1&&this._listeners.splice(u,1)}toAbortSignal(){const o=new AbortController,u=a=>{o.abort(a)};return this.subscribe(u),o.signal.unsubscribe=()=>this.unsubscribe(u),o.signal}static source(){let o;return{token:new os(function(l){o=l}),cancel:o}}};function tu(r){return function(u){return r.apply(null,u)}}function nu(r){return A.isObject(r)&&r.isAxiosError===!0}const xr={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};Object.entries(xr).forEach(([r,o])=>{xr[o]=r});function yo(r){const o=new vt(r),u=ji(vt.prototype.request,o);return A.extend(u,vt.prototype,o,{allOwnKeys:!0}),A.extend(u,o,null,{allOwnKeys:!0}),u.create=function(l){return yo(yt(r,l))},u}const Re=yo(Lt);Re.Axios=vt,Re.CanceledError=At,Re.CancelToken=eu,Re.isCancel=Zi,Re.VERSION=po,Re.toFormData=On,Re.AxiosError=pe,Re.Cancel=Re.CanceledError,Re.all=function(o){return Promise.all(o)},Re.spread=tu,Re.isAxiosError=nu,Re.mergeConfig=yt,Re.AxiosHeaders=Ye,Re.formToJSON=r=>Xi(A.isHTMLForm(r)?new FormData(r):r),Re.getAdapter=fo.getAdapter,Re.HttpStatusCode=xr,Re.default=Re;const{Axios:rc,AxiosError:ic,CanceledError:oc,isCancel:sc,CancelToken:ac,VERSION:uc,all:cc,Cancel:lc,isAxiosError:fc,spread:dc,toFormData:hc,AxiosHeaders:pc,HttpStatusCode:mc,formToJSON:yc,getAdapter:vc,mergeConfig:gc}=Re;class vo{constructor(o){si(this,"storage");this.storage=o}getRaw(o,u=null){return this.storage.getItem(o)||u}setRaw(o,u){this.storage.setItem(o,u)}get(o,u=null){const a=this.getRaw(o);return a?bn.parse(a):u}set(o,u){this.setRaw(o,bn.stringify(u))}del(o){this.storage.removeItem(o)}clear(){this.storage.clear()}}const Sr=new vo(localStorage),go=new vo(sessionStorage),ru=Object.freeze(Object.defineProperty({__proto__:null,default:{local:Sr,session:go},local:Sr,session:go},Symbol.toStringTag,{value:"Module"})),bo="access_token",wo=(r,o="请求异常.")=>r.message||r.msg||o,Yt=Re.create({baseURL:"",timeout:3e3,headers:{"Content-Type":"application/json"}}),iu=()=>Yt.interceptors.request.use(r=>{const o=Sr.get(bo);return o&&(r.headers.Authorization=`Bearer ${o}`),r}),ou=r=>Yt.interceptors.response.use(o=>{const u=o.data;if(o.status===200)return u.data;const a=new Error(wo(u));return r?r(a):Promise.reject(a)},o=>r?r(o):Promise.reject(o));let Pn=!1,Dn=[];const su=(r,o,u)=>{const{response:a}=r;return a.config.url==o?(Pn=!1,Dn=[],Promise.reject(r)):(Pn||(Pn=!0,u().then(()=>Dn.forEach(l=>l())).finally(()=>{Pn=!1,Dn=[]})),new Promise(l=>{Dn.push(()=>l(Yt(a.config)))}))},_o=(r,o)=>Ht({url:r,method:"GET",params:o}),xo=(r,o)=>Ht({url:r,method:"POST",data:o}),So=r=>(r.responseType=r.responseType||"blob",Ht(r)),Ht=r=>Yt.request(r),au=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_TOKEN:bo,axios:Yt,default:{get:_o,post:xo,download:So,request:Ht},download:So,get:_o,message:wo,post:xo,request:Ht,responseInterceptor:ou,retry:su,tokenRequestInterceptor:iu},Symbol.toStringTag,{value:"Module"})),Or=()=>{const r=decodeURIComponent(location.search);return new URLSearchParams(r)},Oo=()=>{let r={};for(let[o,u]of Or().entries())r[o]=u;return r},Eo=(r,o,u)=>{o=o||"_blank",window.open(r,o,u)},uu=Object.freeze(Object.defineProperty({__proto__:null,all:Oo,default:{search:Or,all:Oo,open:Eo},open:Eo,search:Or},Symbol.toStringTag,{value:"Module"}));De.date=_s,De.db=Es,De.fast=ks,De.file=Ts,De.hash=Cs,De.http=au,De.json=Ds,De.storage=ru,De.url=uu,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})});
|