@rainte/js 0.0.51 → 0.0.54
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 +7514 -5669
- package/dist/index.umd.cjs +19 -8
- package/dist/types/array/index.d.ts +2 -0
- package/dist/types/database/index.d.ts +14 -0
- package/dist/types/{src/hash → hash}/index.d.ts +1 -1
- package/dist/types/{src/http → http}/axios.d.ts +1 -1
- package/dist/types/http/index.d.ts +6 -0
- package/dist/types/{src/json → json}/index.d.ts +1 -1
- package/dist/types/lib.d.ts +10 -0
- package/dist/types/{src/url → url}/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/package.json +53 -50
- package/dist/types/lib/index.d.ts +0 -10
- package/dist/types/src/array/index.d.ts +0 -2
- package/dist/types/src/database/index.d.ts +0 -13
- package/dist/types/src/http/index.d.ts +0 -6
- package/dist/types/vite.config.d.ts +0 -2
- /package/dist/types/{src/blob → blob}/index.d.ts +0 -0
- /package/dist/types/{src/date → date}/index.d.ts +0 -0
- /package/dist/types/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/types/{src/storage → storage}/index.d.ts +0 -0
- /package/dist/types/{src/system → system}/index.d.ts +0 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`)}function
|
|
3
|
-
`+c:""),this.inner=c||null):typeof a=="object"&&(this.message="".concat(a.name," ").concat(a.message),this.inner=a):(this.message=Ee[t]||n,this.inner=null)}return j(o).from(ot),e[t]=o,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var Ce=Gt.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 ze(e){return e}function Pt(e,t){return e==null||e===ze?t:function(n){return t(e(n))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ht(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var o=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var c=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Xe(o,this.onsuccess):o),a&&(this.onerror=this.onerror?Xe(a,this.onerror):a),c!==void 0?c:n}}function zt(e,t){return e===ye?t:function(){e.apply(this,arguments);var n=this.onsuccess,o=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),o&&(this.onerror=this.onerror?Xe(o,this.onerror):o)}}function Vt(e,t){return e===ye?t:function(n){var o=e.apply(this,arguments);P(n,o);var a=this.onsuccess,c=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),a&&(this.onsuccess=this.onsuccess?Xe(a,this.onsuccess):a),c&&(this.onerror=this.onerror?Xe(c,this.onerror):c),o===void 0?n===void 0?void 0:n:P(o,n)}}function Wt(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 o=this,a=arguments.length,c=new Array(a);a--;)c[a]=arguments[a];return n.then(function(){return t.apply(o,c)})}return t.apply(this,arguments)}}Fe.ModifyError=je,Fe.DexieError=Oe,Fe.BulkError=Le;var tt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ci(e){tt=e}var Jt={},li=100,vt=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]}(),Gt=vt[0],Qe=vt[1],vt=vt[2],Qe=Qe&&Qe.then,gt=Gt&&Gt.constructor,Sr=!!vt,Xt=function(e,t){Qt.push([e,t]),jn&&(queueMicrotask(tu),jn=!1)},xr=!0,jn=!0,bt=[],Mn=[],Or=ze,at={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ye,pgp:!1,env:{},finalize:ye},oe=at,Qt=[],wt=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=oe;if(typeof e!="function"){if(e!==Jt)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(o,a){try{a(function(c){if(o._state===null){if(c===o)throw new TypeError("A promise cannot be resolved with itself.");var f=o._lib&&Dt();c&&typeof c.then=="function"?n(o,function(p,y){c instanceof W?c._then(p,y):c.then(p,y)}):(o._state=!0,o._value=c,di(o)),f&&$t()}},kr.bind(null,o))}catch(c){kr(o,c)}}(this,e)}var Er={get:function(){var e=oe,t=Kn;function n(o,a){var c=this,f=!e.global&&(e!==oe||t!==Kn),p=f&&!ct(),y=new W(function(g,_){Tr(c,new fi(pi(o,e,f,p),pi(a,e,f,p),g,_,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return n.prototype=Jt,n},set:function(e){N(this,"then",e&&e.prototype===Jt?Er:{get:function(){return e},set:Er.set})}};function fi(e,t,n,o,a){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=o,this.psd=a}function kr(e,t){var n,o;Mn.push(t),e._state===null&&(n=e._lib&&Dt(),t=Or(t),e._state=!1,e._value=t,o=e,bt.some(function(a){return a._value===o._value})||bt.push(o),di(e),n&&$t())}function di(e){var t=e._listeners;e._listeners=[];for(var n=0,o=t.length;n<o;++n)Tr(e,t[n]);var a=e._PSD;--a.ref||a.finalize(),wt===0&&(++wt,Xt(function(){--wt==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,++wt,Xt(eu,[n,e,t])}else e._listeners.push(t)}function eu(e,t,n){try{var o,a=t._value;!t._state&&Mn.length&&(Mn=[]),o=tt&&t._consoleTask?t._consoleTask.run(function(){return e(a)}):e(a),t._state||Mn.indexOf(a)!==-1||function(c){for(var f=bt.length;f;)if(bt[--f]._value===c._value)return bt.splice(f,1)}(t),n.resolve(o)}catch(c){n.reject(c)}finally{--wt==0&&Rr(),--n.psd.ref||n.psd.finalize()}}function tu(){_t(at,function(){Dt()&&$t()})}function Dt(){var e=xr;return jn=xr=!1,e}function $t(){var e,t,n;do for(;0<Qt.length;)for(e=Qt,Qt=[],n=e.length,t=0;t<n;++t){var o=e[t];o[0].apply(null,o[1])}while(0<Qt.length);jn=xr=!0}function Rr(){var e=bt;bt=[],e.forEach(function(o){o._PSD.onunhandled.call(null,o._value,o)});for(var t=Nn.slice(0),n=t.length;n;)t[--n]()}function Fn(e){return new W(Jt,!1,e)}function Te(e,t){var n=oe;return function(){var o=Dt(),a=oe;try{return lt(n,!0),e.apply(this,arguments)}catch(c){t&&t(c)}finally{lt(a,!1),o&&$t()}}}ae(W.prototype,{then:Er,_then:function(e,t){Tr(this,new fi(null,null,e,t,oe))},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(o){return(o instanceof t?n:Fn)(o)}):this.then(null,function(o){return(o&&o.name===t?n:Fn)(o)})},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 Fn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new W(function(o,a){var c=setTimeout(function(){return a(new Z.Timeout(t))},e);n.then(o,a).finally(clearTimeout.bind(null,c))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&N(W.prototype,Symbol.toStringTag,"Dexie.Promise"),at.env=hi(),ae(W,{all:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&t([]);var o=e.length;e.forEach(function(a,c){return W.resolve(a).then(function(f){e[c]=f,--o||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(Jt,!0,e)},reject:Fn,race:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.map(function(o){return W.resolve(o).then(t,n)})})},PSD:{get:function(){return oe},set:function(e){return oe=e}},totalEchoes:{get:function(){return Kn}},newPSD:ut,usePSD:_t,scheduler:{get:function(){return Xt},set:function(e){Xt=e}},rejectionMapper:{get:function(){return Or},set:function(e){Or=e}},follow:function(e,t){return new W(function(n,o){return ut(function(a,c){var f=oe;f.unhandleds=[],f.onunhandled=c,f.finalize=Xe(function(){var p,y=this;p=function(){y.unhandleds.length===0?a():c(y.unhandleds[0])},Nn.push(function g(){p(),Nn.splice(Nn.indexOf(g),1)}),++wt,Xt(function(){--wt==0&&Rr()},[])},f.finalize),e()},t,n,o)})}}),gt&&(gt.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,o=new Array(n);e.forEach(function(a,c){return W.resolve(a).then(function(f){return o[c]={status:"fulfilled",value:f}},function(f){return o[c]={status:"rejected",reason:f}}).then(function(){return--n||t(o)})})})}),gt.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 o=e.length,a=new Array(o);e.forEach(function(c,f){return W.resolve(c).then(function(p){return t(p)},function(p){a[f]=p,--o||n(new AggregateError(a))})})})}),gt.withResolvers&&(W.withResolvers=gt.withResolvers));var Me={awaits:0,echoes:0,id:0},nu=0,qn=[],Bn=0,Kn=0,ru=0;function ut(e,t,n,o){var a=oe,c=Object.create(a);return c.parent=a,c.ref=0,c.global=!1,c.id=++ru,at.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),++a.ref,c.finalize=function(){--this.parent.ref||this.parent.finalize()},o=_t(c,e,n,o),c.ref===0&&c.finalize(),o}function Ct(){return Me.id||(Me.id=++nu),++Me.awaits,Me.echoes+=li,Me.id}function ct(){return!!Me.awaits&&(--Me.awaits==0&&(Me.id=0),Me.echoes=Me.awaits*li,!0)}function In(e){return Me.echoes&&e&&e.constructor===gt?(Ct(),e.then(function(t){return ct(),t},function(t){return ct(),De(t)})):e}function ou(){var e=qn[qn.length-1];qn.pop(),lt(e,!1)}function lt(e,t){var n,o=oe;(t?!Me.echoes||Bn++&&e===oe:!Bn||--Bn&&e===oe)||queueMicrotask(t?(function(a){++Kn,Me.echoes&&--Me.echoes!=0||(Me.echoes=Me.awaits=Me.id=0),qn.push(oe),lt(a,!0)}).bind(null,e):ou),e!==oe&&(oe=e,o===at&&(at.env=hi()),Sr&&(n=at.env.Promise,t=e.env,(o.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 hi(){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 _t(e,t,n,o,a){var c=oe;try{return lt(e,!0),t(n,o,a)}finally{lt(c,!1)}}function pi(e,t,n,o){return typeof e!="function"?e:function(){var a=oe;n&&Ct(),lt(t,!0);try{return e.apply(this,arguments)}finally{lt(a,!1),o&&queueMicrotask(ct)}}}function Ar(e){Promise===gt&&Me.echoes===0?Bn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Qe).indexOf("[native code]")===-1&&(Ct=ct=ye);var De=W.reject,St="",it="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",mi="String expected.",jt=[],Ln="__dbnames",Pr="readonly",Dr="readwrite";function xt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var yi={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 vi(){throw Z.Type()}function Se(e,t){try{var n=gi(e),o=gi(t);if(n!==o)return n==="Array"?1:o==="Array"?-1:n==="binary"?1:o==="binary"?-1:n==="string"?1:o==="string"?-1:n==="Date"?1:o!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(a,c){for(var f=a.length,p=c.length,y=f<p?f:p,g=0;g<y;++g)if(a[g]!==c[g])return a[g]<c[g]?-1:1;return f===p?0:f<p?-1:1}(bi(e),bi(t));case"Array":return function(a,c){for(var f=a.length,p=c.length,y=f<p?f:p,g=0;g<y;++g){var _=Se(a[g],c[g]);if(_!==0)return _}return f===p?0:f<p?-1:1}(e,t)}}catch{}return NaN}function gi(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=H(e),e==="ArrayBuffer"?"binary":e)}function bi(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var wi=(ke.prototype._trans=function(e,t,n){var o=this._tx||oe.trans,a=this.name,c=tt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function f(g,_,m){if(!m.schema[a])throw new Z.NotFound("Table "+a+" not part of transaction");return t(m.idbtrans,m)}var p=Dt();try{var y=o&&o.db._novip===this.db._novip?o===oe.trans?o._promise(e,f,n):ut(function(){return o._promise(e,f,n)},{trans:o,transless:oe.transless||oe}):function g(_,m,O,v){if(_.idbdb&&(_._state.openComplete||oe.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)})):De(x)}return w._promise(m,function(x,b){return ut(function(){return oe.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 De(new Z.DatabaseClosed(_._state.dbOpenError));if(!_._state.isBeingOpened){if(!_._state.autoOpen)return De(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),De(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?De(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(o){return n.core.get({trans:o,key:e}).then(function(a){return n.hook.reading.fire(a)})}).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&&tt&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var o=this.schema.idxByName;function a(p,y){return Se(p,y)===0}var f=t.reduce(function(m,y){var g=m[0],_=m[1],m=o[y],O=e[y];return[g||m,g||!m?xt(_,m&&m.multi?function(v){return v=te(v,y),S(v)&&v.some(function(w){return a(O,w)})}:function(v){return a(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,o=this.name;function a(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof vi&&(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 _)}(a,t=e),Object.defineProperty(a.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),a.prototype.table=function(){return o},e=a);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,o=this.schema.primKey,a=o.auto,c=o.keyPath,f=e;return c&&a&&(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?De(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,o=this.schema.primKey,a=o.auto,c=o.keyPath,f=e;return c&&a&&(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:yi})}).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(o){return o.map(function(a){return t.hook.reading.fire(a)})})})},ke.prototype.bulkAdd=function(e,t,n){var o=this,a=Array.isArray(t)?t:void 0,c=(n=n||(a?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=o.schema.primKey,p=g.auto,g=g.keyPath;if(g&&a)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(a&&a.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 o.core.mutate({trans:f,type:"add",keys:a,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(o.name,".bulkAdd(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkPut=function(e,t,n){var o=this,a=Array.isArray(t)?t:void 0,c=(n=n||(a?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=o.schema.primKey,p=g.auto,g=g.keyPath;if(g&&a)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(a&&a.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 o.core.mutate({trans:f,type:"put",keys:a,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(o.name,".bulkPut(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkUpdate=function(e){var t=this,n=this.core,o=e.map(function(f){return f.key}),a=e.map(function(f){return f.changes}),c=[];return this._trans("readwrite",function(f){return n.getMany({trans:f,keys:o,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(Se(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:o,changeSpecs:a}}).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(o){return t.core.mutate({trans:o,type:"delete",keys:e})}).then(function(f){var a=f.numFailures,c=f.lastResult,f=f.failures;if(a===0)return c;throw new Le("".concat(t.name,".bulkDelete(): ").concat(a," of ").concat(n," operations failed"),f)})},ke);function ke(){}function Zt(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 o=1,a=arguments.length;o<a;++o)c(arguments[o]);return t;function c(f,p,y){if(typeof f!="object"){var g;p=p||Wt;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,ze,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 en(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=xt(e.filter,t)}function Cr(e,t,n){var o=e.replayFilter;e.replayFilter=o?function(){return xt(o(),t())}:t,e.justLimit=n&&!o}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 _i(e,t,n){var o=Yn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:o,range:e.range}})}function Hn(e,t,n,o){var a=e.replayFilter?xt(e.filter,e.replayFilter()):e.filter;if(e.or){var c={},f=function(p,y,g){var _,m;a&&!a(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),Si(_i(e,o,n),e.algorithm,f,!e.keysOnly&&e.valueMapper)])}return Si(_i(e,o,n),xt(e.algorithm,a),t,!e.keysOnly&&e.valueMapper)}function Si(e,t,n,o){var a=Te(o?function(c,f,p){return n(o(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})||a(c.value,c,function(p){return f=p}),f()})})}var tn=(xi.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 o=t.remove;if(S(o))return S(e)?e.filter(function(a){return!o.includes(a)}).sort():[];if(typeof o=="number")return Number(e)-o;if(typeof o=="bigint")try{return BigInt(e)-o}catch{return BigInt(0)-o}throw new TypeError("Invalid subtrahend ".concat(o))}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},xi);function xi(e){this["@@propmod"]=e}var iu=(xe.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,De.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,De.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},xe.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=xt(t.algorithm,e)},xe.prototype._iterate=function(e,t){return Hn(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 Hn(t,e,n,t.table.core)})},xe.prototype.count=function(e){var t=this;return this._read(function(n){var o=t._ctx,a=o.table.core;if(Mt(o,!0))return a.count({trans:n,query:{index:Yn(o,a.schema),range:o.range}}).then(function(f){return Math.min(f,o.limit)});var c=0;return Hn(o,function(){return++c,!1},n,a).then(function(){return c})}).then(e)},xe.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),o=n[0],a=n.length-1;function c(y,g){return g?c(y[n[g]],g-1):y[o]}var f=this._ctx.dir==="next"?1:-1;function p(y,g){return Se(c(y,a),c(g,a))*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 o=t._ctx;if(o.dir==="next"&&Mt(o,!0)&&0<o.limit){var a=o.valueMapper,c=Yn(o,o.table.core.schema);return o.table.core.query({trans:n,limit:o.limit,values:!0,query:{index:c,range:o.range}}).then(function(p){return p=p.result,a?p.map(a):p})}var f=[];return Hn(o,function(p){return f.push(p)},n,o.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(o,a){return n===0||(n===1?--n:a(function(){o.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,o,a){return--t<=0&&o(a),0<=t}},!0),this},xe.prototype.until=function(e,t){return $r(this._ctx,function(n,o,a){return!e(n.value)||(o(a),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=xt(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,o){e(o.key,o)})},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,o){e(o.primaryKey,o)})},xe.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(o,a){n.push(a.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(o){var a=Yn(t,t.table.core.schema);return t.table.core.query({trans:o,values:!1,limit:t.limit,query:{index:a,range:t.range}})}).then(function(o){return o.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(o,a){n.push(a.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(a){var o=a.primaryKey.toString(),a=M(t,o);return t[o]=!0,!a}),this},xe.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(o){var a,c,f;f=typeof e=="function"?e:(a=h(e),c=a.length,function(b){for(var k=!1,T=0;T<c;++T){var R=a[T],D=e[R],F=te(b,R);D instanceof tn?(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,x=[];return t.clone().primaryKeys().then(function(b){function k(R){var D=Math.min(_,b.length-R);return p.getMany({trans:o,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:o,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:o,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:o,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,x);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 o=e.table.core.schema.primaryKey,a=t;return e.table.core.count({trans:n,query:{index:o,range:a}}).then(function(c){return e.table.core.mutate({trans:n,type:"deleteRange",range:a}).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 su(e,t){return e<t?-1:e===t?0:1}function au(e,t){return t<e?-1:e===t?0:1}function Je(e,t,n){return e=e instanceof Ei?new e.Collection(e):e,e._ctx.error=new(n||TypeError)(t),e}function Nt(e){return new e.Collection(e,function(){return Oi("")}).limit(0)}function zn(e,t,n,o){var a,c,f,p,y,g,_,m=n.length;if(!n.every(function(w){return typeof w=="string"}))return Je(e,mi);function O(w){a=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"?su:au;var x=n.map(function(b){return{lower:c(b),upper:a(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"?"":o}O("next"),e=new e.Collection(e,function(){return ft(p[0],y[m-1]+o)}),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,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 x(R!==null?function(){w.continue(R+_)}:b),!1}),e}function ft(e,t,n,o){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:o}}function Oi(e){return{type:1,lower:e,upper:e}}var Ei=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,t,n,o){n=n!==!1,o=o===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(n||o)&&(!n||!o)?Nt(this):new this.Collection(this,function(){return ft(e,t,!n,!o)})}catch{return Je(this,it)}},Ne.prototype.equals=function(e){return e==null?Je(this,it):new this.Collection(this,function(){return Oi(e)})},Ne.prototype.above=function(e){return e==null?Je(this,it):new this.Collection(this,function(){return ft(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?Je(this,it):new this.Collection(this,function(){return ft(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?Je(this,it):new this.Collection(this,function(){return ft(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?Je(this,it):new this.Collection(this,function(){return ft(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?Je(this,mi):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(ie,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(ie,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.some(function(o){return t.indexOf(o)===0})},e,St)},Ne.prototype.anyOf=function(){var e=this,t=se.apply(ie,arguments),n=this._cmp;try{t.sort(n)}catch{return Je(this,it)}if(t.length===0)return Nt(this);var o=new this.Collection(this,function(){return ft(t[0],t[t.length-1])});o._ondirectionchange=function(c){n=c==="next"?e._ascending:e._descending,t.sort(n)};var a=0;return o._addAlgorithm(function(c,f,p){for(var y=c.key;0<n(y,t[a]);)if(++a===t.length)return f(p),!1;return n(y,t[a])===0||(f(function(){c.continue(t[a])}),!1)}),o},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(ie,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Je(this,it)}var t=e.reduce(function(n,o){return n?n.concat([[n[n.length-1][1],o]]):[[-1/0,o]]},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,o=this._cmp,a=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&&a(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=a;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(o(R[0],z[1])<0&&0<o(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,it)}var v=0,w=g?function(T){return 0<a(T,_[v][1])}:function(T){return 0<=a(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 ft(_[0][0],_[_.length-1][1],!y,!g)});return k._ondirectionchange=function(T){m=T==="next"?(b=w,a):(b=x,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)&&!x(F)||(n._cmp(z,_[v][1])===0||n._cmp(z,_[v][0])===0||R(function(){m===a?T.continue(_[v][0]):T.continue(_[v][1])}),!1)}),k},Ne.prototype.startsWithAnyOf=function(){var e=se.apply(ie,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 nt(e){return Te(function(t){return nn(t),e(t.target.error),!1})}function nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var rn="storagemutated",Mr="x-storagemutated-1",dt=Zt(null,rn),uu=(rt.prototype._lock=function(){return _e(!oe.global),++this._reculock,this._reculock!==1||oe.global||(oe.lockOwnerFor=this),this},rt.prototype._unlock=function(){if(_e(!oe.global),--this._reculock==0)for(oe.global||(oe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{_t(e[1],e[0])}catch{}}return this},rt.prototype._locked=function(){return this._reculock&&oe.lockOwnerFor!==this},rt.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,o=this.db._state.dbOpenError;if(_e(!this.idbtrans),!e&&!n)switch(o&&o.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(o);case"MissingAPIError":throw new Z.MissingAPI(o.message,o);default:throw new Z.OpenFailed(o)}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(a){nn(a),t._reject(e.error)}),e.onabort=Te(function(a){nn(a),t.active&&t._reject(new Z.Abort(e.error)),t.active=!1,t.on("abort").fire(a)}),e.oncomplete=Te(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&dt.storagemutated.fire(e.mutatedParts)}),this},rt.prototype._promise=function(e,t,n){var o=this;if(e==="readwrite"&&this.mode!=="readwrite")return De(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return De(new Z.TransactionInactive);if(this._locked())return new W(function(c,f){o._blockedFuncs.push([function(){o._promise(e,t,n).then(c,f)},oe])});if(n)return ut(function(){var c=new W(function(f,p){o._lock();var y=t(f,p,o);y&&y.then&&y.then(f,p)});return c.finally(function(){return o._unlock()}),c._lib=!0,c});var a=new W(function(c,f){var p=t(c,f,o);p&&p.then&&p.then(c,f)});return a._lib=!0,a},rt.prototype._root=function(){return this.parent?this.parent._root():this},rt.prototype.waitFor=function(e){var t,n=this._root(),o=W.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return o}):(n._waitingFor=o,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 a=n._waitingFor;return new W(function(c,f){o.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===a&&(n._waitingFor=null)})})},rt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},rt.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},rt);function rt(){}function Nr(e,t,n,o,a,c,f){return{name:e,keyPath:t,unique:n,multi:o,auto:a,compound:c,src:(n&&!f?"&":"")+(o?"*":"")+(a?"++":"")+ki(t)}}function ki(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:(o=function(a){return[a.name,a]},n.reduce(function(a,c,f){return f=o(c,f),f&&(a[f[0]]=f[1]),a},{}))};var o}var on=function(e){try{return e.only([[]]),on=function(){return[[]]},[[]]}catch{return on=function(){return St},St}};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 Ti(e){return[].slice.call(e)}var cu=0;function sn(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function lu(e,t,y){function o(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 a(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,D=x.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,nn(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(o(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(kt,no){return kt.error!=null&&(ge[no]=kt.error)}),F({numFailures:Ge,failures:ge,results:k==="delete"?T:ve.map(function(kt){return kt.result}),lastResult:Ue})}Y.onerror=function(Ue){me(Ue),ir(Ue)},Y.onsuccess=ir})},getMany:function(x){var b=x.trans,k=x.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=nt(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(x){var b=x.trans,k=x.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=nt(R)})},query:(v=g,function(x){return new Promise(function(b,k){b=Te(b);var T,R,D,B=x.trans,F=x.values,z=x.limit,Y=x.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=o(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=nt(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=nt(k))})}),openCursor:function(x){var b=x.trans,k=x.values,T=x.query,R=x.reverse,D=x.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(o(q),V):B.openCursor(o(q),V);Y.onerror=nt(z),Y.onsuccess=Te(function(X){var me,ve,ge,Ge,he=Y.result;he?(he.___id=++cu,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,kt){Ue=Te(Ue),Y.onerror=nt(kt),he.fail=kt,he.stop=function(no){he.stop=he.continue=he.continuePrimaryKey=he.advance=Ge,Ue(no)}});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(x){var b=x.query,k=x.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=o(R),q=z?q.count(z):q.count();q.onsuccess=Te(function(B){return D(B.target.result)}),q.onerror=nt(F)})}}}var c,f,p,_=(f=y,p=Ti((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:qr(v)},indexes:Ti(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:S(D),keyPath:D,unique:R,multiEntry:F,extractKey:qr(D)};return x[sn(D)]=F}),getIndexByKeyPath:function(k){return x[sn(k)]}};return x[":id"]=b.primaryKey,v!=null&&(x[sn(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(a),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:on(t),schema:y}}function fu(e,t,n,o){var a=n.IDBKeyRange;return n.indexedDB,{dbcore:(o=lu(t,a,o),e.dbcore.reduce(function(c,f){return f=f.create,s(s({},c),f(c))},o))}}function Vn(e,o){var n=o.db,o=fu(e._middlewares,n,e._deps,o);e.core=o.dbcore,e.tables.forEach(function(a){var c=a.name;e.core.schema.tables.some(function(f){return f.name===c})&&(a.core=e.core.table(c),e[c]instanceof e.Table&&(e[c].core=a.core))})}function Wn(e,t,n,o){n.forEach(function(a){var c=o[a];t.forEach(function(f){var p=function y(g,_){return E(g,_)||(g=C(g))&&y(g,_)}(f,a);(!p||"value"in p&&p.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?N(f,a,{get:function(){return this.table(a)},set:function(y){ue(this,a,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):f[a]=new e.Table(a,c))})})}function Br(e,t){t.forEach(function(n){for(var o in n)n[o]instanceof e.Table&&delete n[o]})}function du(e,t){return e._cfg.version-t._cfg.version}function hu(e,t,n,o){var a=e._dbSchema;n.objectStoreNames.contains("$meta")&&!a.$meta&&(a.$meta=Fr("$meta",Ai("")[0],[]),e._storeNames.push("$meta"));var c=e._createTransaction("readwrite",e._storeNames,a);c.create(n),c._completion.catch(o);var f=c._reject.bind(c),p=oe.transless||oe;ut(function(){return oe.trans=c,oe.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 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 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 F=k._cfg.contentUpgrade;if(F&&k._cfg.version>O){Vn(m,w),v._memoizedTables={};var z=K(R);D.del.forEach(function(V){z[V]=T[V]}),Br(m,[m.Transaction.prototype]),Wn(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=ct.bind(null,null),q.then(V,V))}),q&&typeof q.then=="function"?W.resolve(q):D.then(function(){return q})}}),x.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]),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(){Ri(b,w)})):W.resolve();var m,O,v,w,x,b}).catch(f)):(h(a).forEach(function(_){Ir(n,_,a[_].primKey,a[_].indexes)}),Vn(e,n),void W.follow(function(){return e.on.populate.fire(c)}).catch(f));var y,g})}function pu(e,t){Ri(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 o=0,a=Kr(n,e._dbSchema).change;o<a.length;o++){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){tt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(f.name,".").concat(y.src)),Jn(p,y)})}(a[o]);if(typeof c=="object")return c.value}}function Kr(e,t){var n,o={del:[],add:[],change:[]};for(n in e)t[n]||o.del.push(n);for(n in t){var a=e[n],c=t[n];if(a){var f={name:n,def:c,recreate:!1,del:[],add:[],change:[]};if(""+(a.primKey.keyPath||"")!=""+(c.primKey.keyPath||"")||a.primKey.auto!==c.primKey.auto)f.recreate=!0,o.change.push(f);else{var p=a.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)&&o.change.push(f)}}else o.add.push([n,c])}return o}function Ir(e,t,n,o){var a=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return o.forEach(function(c){return Jn(a,c)}),a}function Ri(e,t){h(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(tt&&console.debug("Dexie: Creating missing table",n),Ir(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 o={};return re(t.objectStoreNames,0).forEach(function(a){for(var c=n.objectStore(a),f=Nr(ki(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(_)}o[a]=Fr(a,f,p)}),o}function Xn(e,t,n){for(var o=n.db.objectStoreNames,a=0;a<o.length;++a){var c=o[a],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 Ai(e){return e.split(",").map(function(t,n){var o=(t=t.trim()).replace(/([&*]|\+\+)/g,""),a=/^\[/.test(o)?o.match(/^\[(.*)\]$/)[1].split("+"):o;return Nr(o,a||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),S(a),n===0)})}var mu=(Qn.prototype._parseStoresSpec=function(e,t){h(e).forEach(function(n){if(e[n]!==null){var o=Ai(e[n]),a=o.shift();if(a.unique=!0,a.multi)throw new Z.Schema("Primary key cannot be multi-valued");o.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,a,o)}})},Qn.prototype.stores=function(n){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,n):n;var n=t._versions,o={},a={};return n.forEach(function(c){P(o,c._cfg.storesSource),a=c._cfg.dbschema={},c._parseStoresSpec(o,a)}),t._dbSchema=a,Br(t,[t._allTables,t,t.Transaction.prototype]),Wn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],h(a),a),t._storeNames=h(a),this},Qn.prototype.upgrade=function(e){return this._cfg.contentUpgrade=Cn(this._cfg.contentUpgrade||ye,e),this},Qn);function Qn(){}function Lr(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new st(Ln,{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 ut(function(){return oe.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 an(e,t,n){var o=Se(t,n);if(!isNaN(o)){if(0<o)throw RangeError();if(Hr(e))return P(e,{from:t,to:n,d:1});var a=e.l,o=e.r;if(Se(n,e.from)<0)return a?an(a,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Di(e);if(0<Se(t,e.to))return o?an(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Di(e);Se(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.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,a&&!e.l&&un(e,a),o&&n&&un(e,o)}}function un(e,t){Hr(t)||function n(o,y){var c=y.from,f=y.to,p=y.l,y=y.r;an(o,c,f),p&&n(o,p),y&&n(o,y)}(e,t)}function Pi(e,t){var n=Zn(t),o=n.next();if(o.done)return!1;for(var a=o.value,c=Zn(e),f=c.next(a.from),p=f.value;!o.done&&!f.done;){if(Se(p.from,a.to)<=0&&0<=Se(p.to,a.from))return!0;Se(a.from,p.from)<0?a=(o=n.next(p.from)).value:p=(f=c.next(a.from)).value}return!1}function Zn(e){var t=Hr(e)?null:{s:0,n:e};return{next:function(n){for(var o=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,o)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,!o||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 Di(e){var t,n,o=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),a=1<o?"r":o<-1?"l":"";a&&(t=a=="r"?"l":"r",n=s({},e),o=e[a],e.from=o.from,e.to=o.to,e[a]=o[a],n[a]=o[t],(e[t]=n).d=$i(n)),e.d=$i(e)}function $i(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]?un(e[n],t[n]):e[n]=function o(a){var c,f,p={};for(c in a)M(a,c)&&(f=a[c],p[c]=!f||typeof f!="object"||ne.has(f.constructor)?f:o(f));return p}(t[n])}),e}function zr(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&Pi(t[n],e[n])})}ae(Be.prototype,((Qe={add:function(e){return un(this,e),this},addKey:function(e){return an(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return an(t,n,n)}),this},hasKey:function(e){var t=Zn(this).next(e).value;return t&&Se(t.from,e)<=0&&0<=Se(t.to,e)}})[I]=function(){return Zn(this)},Qe));var Ot={},Vr={},Wr=!1;function tr(e){er(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 o=0,a=Object.values(Ot);o<a.length;o++)Ci(f=a[o],e,n,t);else for(var c in e){var f,p=/^idb\:\/\/(.*)\/(.*)\//.exec(c);p&&(c=p[1],p=p[2],(f=Ot["idb://".concat(c,"/").concat(p)])&&Ci(f,e,n,t))}n.forEach(function(y){return y()})}function Ci(e,t,n,o){for(var a=[],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)}):o&&g.push(O)}o&&a.push([y,g])}if(o)for(var v=0,w=a;v<w.length;v++){var x=w[v],y=x[0],g=x[1];e.queries.query[y]=g}}function yu(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?De(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var o=t.openCanceller,a=Math.round(10*e.verno),c=!1;function f(){if(t.openCanceller!==o)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||!a?n.open(w):n.open(w,a);if(!x)throw new Z.MissingAPI;x.onerror=nt(v),x.onblocked=Te(e._fireOnBlocked),x.onupgradeneeded=Te(function(b){var k;_=x.transaction,t.autoSchema&&!e._options.allowEmptyDB?(x.onerror=nn,_.abort(),x.result.close(),(k=n.deleteDatabase(w)).onsuccess=k.onerror=Te(function(){v(new Z.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(_.onerror=nt(v),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,m=b<1,e.idbdb=x.result,c&&pu(e,_),hu(e,b/10,_,v))},v),x.onsuccess=Te(function(){_=null;var b,k,T,R,D,F=e.idbdb=x.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=Gn(0,k,T),b._storeNames=re(k.objectStoreNames,0),Wn(b,[b._allTables],h(T),T);else if(Xn(e,e._dbSchema,q),((D=Kr(Gn(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(),a=F.version+1,c=!0,O(p());Vn(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===Ln||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<a)return a=0,p()}return W.reject(O)})}var y,g=t.dbReadyResolve,_=null,m=!1;return W.race([o,(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(Cn,ye);return t.onReadyBeingFired=[],W.resolve(Yr(function(){return v(e.vip)})).then(O)}})}).finally(function(){t.openCanceller===o&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(O){t.dbOpenError=O;try{_&&_.abort()}catch{}return o===t.openCanceller&&e._close(),De(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,[[[]]])}),dt(rn).fire(O),Jr(O,!0)),e})}function Gr(e){function t(c){return e.next(c)}var n=a(t),o=a(function(c){return e.throw(c)});function a(c){return function(y){var p=c(y),y=p.value;return p.done?y:y&&typeof y.then=="function"?y.then(n,o):S(y)?Promise.all(y).then(n,o):n(y)}}return a(t)()}function nr(e,t,n){for(var o=S(e)?e.slice():[e],a=0;a<n;++a)o.push(t);return o}var vu={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return s(s({},e),{table:function(t){var n=e.table(t),o=n.schema,a={},c=[];function f(m,O,v){var w=sn(m),x=a[w]=a[w]||[],b=m==null?0:typeof m=="string"?1:m.length,k=0<O,k=s(s({},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 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(o.primaryKey.keyPath,0,o.primaryKey),a[":id"]=[t];for(var p=0,y=o.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?s(s({},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 s(s({},n),{schema:s(s({},o),{primaryKey:t,indexes:c,getIndexByKeyPath:function(m){return(m=a[sn(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 Xr(e,t,n,o){return n=n||{},o=o||"",h(e).forEach(function(a){var c,f,p;M(t,a)?(c=e[a],f=t[a],typeof c=="object"&&typeof f=="object"&&c&&f?(p=H(c))!==H(f)?n[o+a]=t[a]:p==="Object"?Xr(c,f,n,o+a+"."):c!==f&&(n[o+a]=t[a]):c!==f&&(n[o+a]=t[a])):n[o+a]=void 0}),h(t).forEach(function(a){M(e,a)||(n[o+a]=t[a])}),n}function Qr(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var gu={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return s(s({},e),{table:function(t){var n=e.table(t),o=n.schema.primaryKey;return s(s({},n),{mutate:function(a){var c=oe.trans,f=c.table(t).hook,p=f.deleting,y=f.creating,g=f.updating;switch(a.type){case"add":if(y.fire===ye)break;return c._promise("readwrite",function(){return _(a)},!0);case"put":if(y.fire===ye&&g.fire===ye)break;return c._promise("readwrite",function(){return _(a)},!0);case"delete":if(p.fire===ye)break;return c._promise("readwrite",function(){return _(a)},!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:o,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,s(s({},v),{lower:b[b.length-1],lowerOpen:!0}),w)})})}(a.trans,a.range,1e4)},!0)}return n.mutate(a);function _(m){var O,v,w,x=oe.trans,b=m.keys||Qr(o,m);if(!b)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?s(s({},m),{keys:b}):s({},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,x):m.type==="add"||B===void 0?(F=y.fire.call(V,R,m.values[D],x),R==null&&F!=null&&(m.keys[D]=R=F,o.outbound||U(m.values[D],o.keyPath,R))):(F=Xr(B,m.values[D]),(z=g.fire.call(V,F,R,B,x))&&(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 ji(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var o=[],a=0,c=0;a<t.keys.length&&c<e.length;++a)Se(t.keys[a],e[c])===0&&(o.push(n?we(t.values[a]):t.values[a]),++c);return o.length===e.length?o:null}catch{return null}}var bu={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return s(s({},n),{getMany:function(o){if(!o.cache)return n.getMany(o);var a=ji(o.keys,o.trans._cache,o.cache==="clone");return a?W.resolve(a):n.getMany(o).then(function(c){return o.trans._cache={keys:o.keys,values:o.cache==="clone"?we(c):c},c})},mutate:function(o){return o.type!=="add"&&(o.trans._cache=null),n.mutate(o)}})}}}};function Mi(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function Ni(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var wu={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,n=new Be(e.MIN_KEY,e.MAX_KEY);return s(s({},e),{transaction:function(o,a,c){if(oe.subscr&&a!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(oe.querier));return e.transaction(o,a,c)},table:function(o){var a=e.table(o),c=a.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)}),_=s(s({},a),{mutate:function(v){function w(Y){return Y="idb://".concat(t,"/").concat(o,"/").concat(Y),R[Y]||(R[Y]=new Be)}var x,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 S(q)?(D.addKeys(q),(V=z==="delete"||q.length===B.length?ji(q,V):null)||F.addKeys(q),(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]);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)})),a.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=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=oe.subscr,b=!!x,k=Mi(oe,a)&&Ni(v,w)?w.obsSet={}:x;if(b){var T=function(B){return B="idb://".concat(t,"/").concat(o,"/").concat(B),k[B]||(k[B]=new Be)},R=T(""),D=T(":dels"),x=O[v](w),b=x[0],x=x[1];if((v==="query"&&b.isPrimaryKey&&!w.values?D:T(b.name||"")).add(x),!b.isPrimaryKey){if(v!=="count"){var F=v==="query"&&y&&w.values&&a.query(s(s({},w),{values:!1}));return a[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 a[v].apply(this,arguments)}}),_}})}};function Fi(e,t,n){if(n.numFailures===0)return t;if(t.type==="deleteRange")return null;var o=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return n.numFailures===o?null:(t=s({},t),S(t.keys)&&(t.keys=t.keys.filter(function(a,c){return!(c in n.failures)})),"values"in t&&S(t.values)&&(t.values=t.values.filter(function(a,c){return!(c in n.failures)})),t)}function Zr(e,t){return n=e,((o=t).lower===void 0||(o.lowerOpen?0<Se(n,o.lower):0<=Se(n,o.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?Se(e,t.upper)<0:Se(e,t.upper)<=0));var n,o}function qi(e,t,O,o,a,c){if(!O||O.length===0)return e;var f=t.query.index,p=f.multiEntry,y=t.query.range,g=o.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,D=w.values[T],F=g(D);k.hasKey(F)||(R=_(D),(p&&S(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),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 q=new Be().addKeys(w.values.map(function(X){return g(X)}));x=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);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!Zr(g(X),V)})}return x},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&&(a.dirty=!0)),c?Object.freeze(O):O)}function Bi(e,t){return Se(e.lower,t.lower)===0&&Se(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function _u(e,t){return function(n,o,a,c){if(n===void 0)return o!==void 0?-1:0;if(o===void 0)return 1;if((o=Se(n,o))===0){if(a&&c)return 0;if(a)return 1;if(c)return-1}return o}(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=function(n,o,a,c){if(n===void 0)return o!==void 0?1:0;if(o===void 0)return-1;if((o=Se(n,o))===0){if(a&&c)return 0;if(a)return-1;if(c)return 1}return o}(e.upper,t.upper,e.upperOpen,t.upperOpen)}function Su(e,t,n,o){e.subscribers.add(n),o.addEventListener("abort",function(){var a,c;e.subscribers.delete(n),e.subscribers.size===0&&(a=e,c=t,setTimeout(function(){a.subscribers.size===0&&L(c,a)},3e3))})}var xu={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return s(s({},e),{transaction:function(n,o,a){var c,f,p=e.transaction(n,o,a);return o==="readwrite"&&(f=(c=new AbortController).signal,a=function(y){return function(){if(c.abort(),o==="readwrite"){for(var g=new Set,_=0,m=n;_<m.length;_++){var O=m[_],v=Ot["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++)zr((q=R[T]).obsSet,p.mutatedParts)&&(L(z,q),q.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 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=qi(q.res,q.req,x,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",a(!1),{signal:f}),p.addEventListener("error",a(!1),{signal:f}),p.addEventListener("complete",a(!0),{signal:f})),p},table:function(n){var o=e.table(n),a=o.schema.primaryKey;return s(s({},o),{mutate:function(c){var f=oe.trans;if(a.outbound||f.db._options.cache==="disabled"||f.explicit||f.idbtrans.mode!=="readwrite")return o.mutate(c);var p=Ot["idb://".concat(t,"/").concat(n)];return p?(f=o.mutate(c),c.type!=="add"&&c.type!=="put"||!(50<=c.values.length||Qr(a,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=Fi(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=Fi(0,s(s({},c),{values:c.values.map(function(_,m){var O;return y.failures[m]?_:(_=(O=a.keyPath)!==null&&O!==void 0&&O.includes(".")?we(_):s({},_),U(_,a.keyPath,y.results[m]),_)})}),y);p.optimisticOps.push(g),queueMicrotask(function(){return c.mutatedParts&&tr(c.mutatedParts)})}),f):o.mutate(c)},query:function(c){if(!Mi(oe,o)||!Ni("query",c))return o.query(c);var f=((g=oe.trans)===null||g===void 0?void 0:g.db._options.cache)==="immutable",m=oe,p=m.requery,y=m.signal,g=function(w,x,b,k){var T=Ot["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 D=R.find(function(F){return F.req.limit===k.limit&&F.req.values===k.values&&Bi(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)&&_u(F.req.query.range,k.query.range)}),!1,T,R];case"count":return D=R.find(function(F){return Bi(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=o.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||(Ot["idb://".concat(t,"/").concat(n)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[c.query.index.name||""]=v)),Su(_,v,p,y),_.promise.then(function(w){return{result:qi(w.result,c,O==null?void 0:O.optimisticOps,o,_,f)}})}})}})}};function rr(e,t){return new Proxy(e,{get:function(n,o,a){return o==="db"?t:Reflect.get(n,o,a)}})}var st=($e.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(o){return o._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(du),n.stores({}),this._state.autoSchema=!1,n)},$e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||oe.letThrough||this._vip)?e():new W(function(n,o){if(t._state.openComplete)return o(new Z.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void o(new Z.DatabaseClosed);t.open().catch(ye)}t._state.dbReadyPromise.then(n,o)}).then(e)},$e.prototype.use=function(e){var t=e.stack,n=e.create,o=e.level,a=e.name;return a&&this.unuse({stack:t,name:a}),e=this._middlewares[t]||(this._middlewares[t]=[]),e.push({stack:t,create:n,level:o??10,name:a}),e.sort(function(c,f){return c.level-f.level}),this},$e.prototype.unuse=function(e){var t=e.stack,n=e.name,o=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(a){return o?a.create!==o:!!n&&a.name!==n})),this},$e.prototype.open=function(){var e=this;return _t(at,function(){return yu(e)})},$e.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,o){e.cancelOpen=o}))},$e.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)},$e.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=0<arguments.length&&typeof arguments[0]!="object",o=this._state;return new W(function(a,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===Ln||Lr(_,y).delete(g).catch(ye),a()}),p.onerror=nt(c),p.onblocked=t._fireOnBlocked}if(n)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");o.isBeingOpened?o.dbReadyPromise.then(f):f()})},$e.prototype.backendDB=function(){return this.idbdb},$e.prototype.isOpen=function(){return this.idbdb!==null},$e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},$e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},$e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty($e.prototype,"tables",{get:function(){var e=this;return h(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),$e.prototype.transaction=function(){var e=(function(t,n,o){var a=arguments.length;if(a<2)throw new Z.InvalidArgument("Too few arguments");for(var c=new Array(a-1);--a;)c[a-1]=arguments[a];return o=c.pop(),[t,le(c),o]}).apply(this,arguments);return this._transaction.apply(this,e)},$e.prototype._transaction=function(e,t,n){var o=this,a=oe.trans;a&&a.db===this&&e.indexOf("!")===-1||(a=null);var c,f,p=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(f=t.map(function(g){if(g=g instanceof o.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(a){if(a.mode===Pr&&c===Dr){if(!p)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&f.forEach(function(g){if(a&&a.storeNames.indexOf(g)===-1){if(!p)throw new Z.SubTransaction("Table "+g+" not included in parent transaction.");a=null}}),p&&a&&!a.active&&(a=null)}}catch(g){return a?a._promise(null,function(_,m){m(g)}):De(g)}var y=(function g(_,m,O,v,w){return W.resolve().then(function(){var x=oe.transless||oe,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)})):De(R)}var k,T=de(w);return T&&Ct(),x=W.follow(function(){var R;(k=w.call(b,b))&&(T?(R=ct.bind(null,null),k.then(R,R)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Gr(k)))},x),(k&&typeof k.then=="function"?W.resolve(k).then(function(R){return b.active?R:De(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),De(R)})})}).bind(null,this,c,f,a,n);return a?a._promise(c,y,"lock"):oe.trans?_t(oe.transless,function(){return o._whenReady(y)}):this._whenReady(y)},$e.prototype.table=function(e){if(!M(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},$e);function $e(e,t){var n=this;this._middlewares={},this.verno=0;var o=$e.dependencies;this._options=t=s({addons:$e.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},o=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,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=Zt(this,"populate","blocked","versionchange","close",{ready:[Cn,ye]}),this.on.ready.subscribe=G(this.on.ready.subscribe,function(m){return function(O,v){$e.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=(a=this,en(iu.prototype,function(k,b){this.db=a;var v=yi,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!==ze?k:null}})),this.Table=(c=this,en(wi.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:Zt(null,{creating:[Ht,ye],reading:[Pt,ze],updating:[Vt,ye],deleting:[zt,ye]})})),this.Transaction=(f=this,en(uu.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=Zt(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(),De(k)})})),this.Version=(p=this,en(mu.prototype,function(m){this.db=p,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,en(Ei.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,x){return Se(x,w)},this._max=function(w,x){return 0<Se(w,x)?w:x},this._min=function(w,x){return Se(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=on(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(bu),this.use(xu),this.use(wu),this.use(vu),this.use(gu);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 wi?rr(w,_):O==="tables"?w.map(function(x){return rr(x,_)}):O==="_createTransaction"?function(){return rr(w.apply(this,arguments),_)}:w}});this.vip=_,o.forEach(function(m){return m(n)})}var or,Qe=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Ou=(eo.prototype.subscribe=function(e,t,n){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:n})},eo.prototype[Qe]=function(){return this},eo);function eo(e){this._subscribe=e}try{or={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{or={indexedDB:null,IDBKeyRange:null}}function Ki(e){var t,n=!1,o=new Ou(function(a){var c=de(e),f,p=!1,y={},g={},_={get closed(){return p},unsubscribe:function(){p||(p=!0,f&&f.abort(),m&&dt.storagemutated.unsubscribe(v))}};a.start&&a.start(_);var m=!1,O=function(){return Ar(w)},v=function(x){er(y,x),zr(g,y)&&O()},w=function(){var x,b,k;!p&&or.indexedDB&&(y={},x={},f&&f.abort(),f=new AbortController,k=function(T){var R=Dt();try{c&&Ct();var D=ut(e,T);return D=c?D.finally(ct):D}finally{R&&$t()}}(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 D in R)if(M(R,D))return;return 1}(g=x)||m||(dt(rn,v),m=!0),Ar(function(){return!p&&a.next&&a.next(T)}))},function(T){n=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||p||Ar(function(){p||a.error&&a.error(T)})}))};return setTimeout(O,0),_});return o.hasValue=function(){return n},o.getValue=function(){return t},o}var Et=st;function to(e){var t=ht;try{ht=!0,dt.storagemutated.fire(e),Jr(e,!0)}finally{ht=t}}ae(Et,s(s({},Fe),{delete:function(e){return new Et(e,{addons:[]}).delete()},exists:function(e){return new Et(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=Et.dependencies,n=t.indexedDB,t=t.IDBKeyRange,(Ur(n)?Promise.resolve(n.databases()).then(function(o){return o.map(function(a){return a.name}).filter(function(a){return a!==Ln})}):Lr(n,t).toCollection().primaryKeys()).then(e)}catch{return De(new Z.MissingAPI)}var t,n},defineClass:function(){return function(e){P(this,e)}},ignoreTransaction:function(e){return oe.trans?_t(oe.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 De(n)}}},spawn:function(e,t,n){try{var o=Gr(e.apply(n,t||[]));return o&&typeof o.then=="function"?o:W.resolve(o)}catch(a){return De(a)}},currentTransaction:{get:function(){return oe.trans||null}},waitFor:function(e,t){return t=W.resolve(typeof e=="function"?Et.ignoreTransaction(e):e).timeout(t||6e4),oe.trans?oe.trans.waitFor(t):t},Promise:W,debug:{get:function(){return tt},set:function(e){ci(e)}},derive:j,extend:P,props:ae,override:G,Events:Zt,on:dt,liveQuery:Ki,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:Xr,cmp:Se,asap:fe,minKey:-1/0,addons:[],connections:jt,errnames:We,dependencies:or,cache:Ot,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)})})),Et.maxKey=on(Et.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(dt(rn,function(e){ht||(e=new CustomEvent(Mr,{detail:e}),ht=!0,dispatchEvent(e),ht=!1)}),addEventListener(Mr,function(e){e=e.detail,ht||to(e)}));var Ft,ht=!1,Ii=function(){};return typeof BroadcastChannel<"u"&&((Ii=function(){(Ft=new BroadcastChannel(Mr)).onmessage=function(e){return e.data&&to(e.data)}})(),typeof Ft.unref=="function"&&Ft.unref(),dt(rn,function(e){ht||Ft.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!st.disableBfCache&&e.persisted){tt&&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){!st.disableBfCache&&e.persisted&&(tt&&console.debug("Dexie: handling persisted pageshow"),Ii(),to({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)},ci(tt),s(st,Object.freeze({__proto__:null,Dexie:st,liveQuery:Ki,Entity:vi,cmp:Se,PropModification:tn,replacePrefix:function(e,t){return new tn({replacePrefix:[e,t]})},add:function(e){return new tn({add:e})},remove:function(e){return new tn({remove:e})},default:st,RangeSet:Be,mergeRanges:un,rangesOverlap:Pi}),{default:st}),st})}(cn)),cn.exports}var Wi=Vi();const sr=Tt(Wi),io=Symbol.for("Dexie"),ln=globalThis[io]||(globalThis[io]=sr);if(sr.semVer!==ln.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${sr.semVer} and ${ln.semVer}`);const{liveQuery:Pu,mergeRanges:Du,rangesOverlap:$u,RangeSet:Cu,cmp:ju,Entity:Mu,PropModification:Nu,replacePrefix:Fu,add:qu,remove:Bu}=ln;class so extends ln{constructor(){super("db");ro(this,"rows");this.version(1).stores({rows:"++id, key"})}}const fn=new so,ao=(r,i=!1)=>fn.rows.where({key:r}).first().then(u=>i?u:u==null?void 0:u.value),Ji=Object.freeze(Object.defineProperty({__proto__:null,SubDexie:so,db:fn,get:ao,set:async(r,i)=>await ao(r,!0)?fn.rows.where({key:r}).modify({value:i}):fn.rows.add({key:r,value:i})},Symbol.toStringTag,{value:"Module"}));var dn={exports:{}},Gi=dn.exports,uo;function Xi(){return uo||(uo=1,function(r,i){(function(u,s){r.exports=s()})(Gi,function(){var u=1e3,s=6e4,l=36e5,d="millisecond",h="second",S="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),ie=I-L<0,se=H.clone().add(ee+(ie?-1:1),M);return+(-(ee+(I-L)/(ie?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: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 ie=H.toLowerCase();te[ie]&&(L=ie),I&&(te[ie]=I,L=ie);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,ie=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 ie?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,ie=!!ne.u(ee)||ee,se=ne.p(I),de=function(Z,Ce){var Fe=ne.w(L.$u?Date.UTC(L.$y,Ce,Z):new Date(L.$y,Ce,Z),L);return ie?Fe:Fe.endOf(C)},Ee=function(Z,Ce){return ne.w(L.toDate()[Z].apply(L.toDate("s"),(ie?[0,0,0,0]:[23,59,59,999]).slice(Ce)),L)},Oe=this.$W,Pe=this.$M,je=this.$D,Le="set"+(this.$u?"UTC":"");switch(se){case ue:return ie?de(1,0):de(31,11);case M:return ie?de(1,Pe):de(0,Pe+1);case $:var We=this.$locale().weekStart||0,ot=(Oe<We?Oe+7:Oe)-We;return de(ie?je-ot:je+(6-ot),Pe);case C:case N:return Ee(Le+"Hours",0);case P: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,ie=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[S]=se+"Minutes",L[h]=se+"Seconds",L[d]=se+"Milliseconds",L)[ie],Ee=ie===C?this.$D+(ee-this.$W):ee;if(ie===M||ie===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,ie=this;I=Number(I);var se=ne.p(ee),de=function(Pe){var je=le(ie);return ne.w(je.date(je.date()+Math.round(Pe*I)),ie)};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[S]=s,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 ie=I||"YYYY-MM-DDTHH:mm:ssZ",se=ne.z(this),de=this.$H,Ee=this.$m,Oe=this.$M,Pe=L.weekdays,je=L.months,Le=L.meridiem,We=function(Ce,Fe,ye,ze){return Ce&&(Ce[Fe]||Ce(ee,ie))||ye[Fe].slice(0,ze)},ot=function(Ce){return ne.s(de%12||12,Ce,"0")},Z=Le||function(Ce,Fe,ye){var ze=Ce<12?"AM":"PM";return ye?ze.toLowerCase():ze};return ie.replace(J,function(Ce,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,Pe,2);case"ddd":return We(L.weekdaysShort,ee.$W,Pe,3);case"dddd":return Pe[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 ie,se=this,de=ne.p(ee),Ee=le(I),Oe=(Ee.utcOffset()-this.utcOffset())*s,Pe=this-Ee,je=function(){return ne.m(se,Ee)};switch(de){case ue:ie=je()/12;break;case M:ie=je();break;case ae:ie=je()/3;break;case $:ie=(Pe-Oe)/6048e5;break;case C:ie=(Pe-Oe)/864e5;break;case P:ie=Pe/l;break;case S:ie=Pe/s;break;case h:ie=Pe/u;break;default:ie=Pe}return L?ie:ne.a(ie)},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(),ie=ce(I,ee,!0);return ie&&(L.$L=ie),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",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})}(dn)),dn.exports}var Qi=Xi();const hn=Tt(Qi);var pn={exports:{}},Zi=pn.exports,co;function es(){return co||(co=1,function(r,i){(function(u,s){r.exports=s()})(Zi,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"},s=/(\[[^[]*\])|([-_:/.,()\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]+/,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:[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,$("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:[S,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:[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+/,$("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(s),_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(ie){var se=ie.afternoon;if(se!==void 0){var de=ie.hours;se?de<12&&(ie.hours+=12):de===12&&(ie.hours=0),delete ie.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,ie,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,Pe=de.day,je=de.hours,Le=de.minutes,We=de.seconds,ot=de.milliseconds,Z=de.zone,Ce=de.week,Fe=new Date,ye=Pe||(Ee||Oe?1:Fe.getDate()),ze=Ee||Fe.getFullYear(),Pt=0;Ee&&!Oe||(Pt=Oe>0?Oe-1:Fe.getMonth());var Xe,Ht=je||0,zt=Le||0,Vt=We||0,Wt=ot||0;return Z?new Date(Date.UTC(ze,Pt,ye,Ht,zt,Vt,Wt+60*Z.offset*1e3)):ie?new Date(Date.UTC(ze,Pt,ye,Ht,zt,Vt,Wt)):(Xe=new Date(ze,Pt,ye,Ht,zt,Vt,Wt),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("")),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)}}})}(pn)),pn.exports}var ts=es();const ns=Tt(ts);var mn={exports:{}},rs=mn.exports,lo;function os(){return lo||(lo=1,function(r,i){(function(u,s){r.exports=s()})(rs,function(){var u,s,l=1e3,d=6e4,h=36e5,S=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: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 s.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/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:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.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,s=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)}}})}(mn)),mn.exports}var is=os();const ss=Tt(is);var yn={exports:{}},as=yn.exports,fo;function us(){return fo||(fo=1,function(r,i){(function(u,s){r.exports=s()})(as,function(){var u="minute",s=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(d,h,S){var P=h.prototype;S.utc=function(j){var E={date:j,utc:!0,args:arguments};return new h(E)},P.utc=function(j){var E=S(this.toDate(),{locale:this.$L,utc:!0});return j?E.add(this.utcOffset(),u):E},P.local=function(){return S(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(s);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?S(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=S(j).local();return N.call(re,G,E,J)}}})}(yn)),yn.exports}var cs=us();const ls=Tt(cs);hn.extend(ns),hn.extend(ss),hn.extend(ls);const fs=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:hn},Symbol.toStringTag,{value:"Module"}));var vn={},gn={},ar,ho;function po(){if(ho)return ar;ho=1,ar=r;function r(u,s){if(s!=="$")for(var l=i(s),d=0;d<l.length;d++)s=l[d].toString().replace(/\\"/g,'"'),!(typeof u[s]>"u"&&d!==l.length-1)&&(u=u[s]);return u}function i(u){for(var s=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,l=[],d;d=s.exec(u);)l.push(d[1]||d[2]||d[3]);return l}return ar}var Bt={},mo;function ds(){if(mo)return Bt;mo=1;var r=po(),i=go();return Bt.getRegexFlags=function(s){var l="";return s.ignoreCase&&(l+="i"),s.global&&(l+="g"),s.multiline&&(l+="m"),l},Bt.stringifyFunction=function(s,l){if(typeof l=="function")return l(s);var d=s.toString(),h=d.match(/^[^{]*{|^[^=]*=>/),S=h?h[0]:"<function> ",P=d[d.length-1]==="}"?"}":"";return S.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+P},Bt.restore=function(s,l){var d=s[0],h=s.slice(1);switch(d){case"$":return r(l,s);case"r":var S=h.indexOf(","),P=h.slice(0,S),C=h.slice(S+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(i.parse(h));case"l":return new Set(i.parse(h));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",s),s}},Bt}var yo;function hs(){if(yo)return gn;yo=1,po();var r=ds(),i=typeof WeakMap<"u"?WeakMap:function(){var u=[],s=[];return{set:function(l,d){u.push(l),s.push(d)},get:function(l){for(var d=0;d<u.length;d++)if(u[d]===l)return s[d]}}};return gn.decycle=function u(s,l,d,h){h=h||new i;var S=!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(S&&P)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(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}(s,"$")},gn.retrocycle=function(s){return function l(d){var h,S,P;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,s):l(S));else for(P in d){if(typeof d[P]=="string"&&P==="$jsan")return r.restore(d.$jsan,s);P==="$jsan"&&(d[P]=d[P][0]),typeof d[P]=="object"&&(S=d[P],S&&typeof S=="object"&&(S.$jsan?d[P]=r.restore(S.$jsan,s):l(S)))}return d}(s)},gn}var vo;function go(){if(vo)return vn;vo=1;var r=hs();return vn.stringify=function(u,s,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,s);return arguments.length===1?JSON.stringify(S):JSON.stringify(S,Array.isArray(s)?s:null,l)},vn.parse=function(u,s){var l=/"\$jsan"/.test(u),d;return arguments.length===1?d=JSON.parse(u):d=JSON.parse(u,s),l&&(d=r.retrocycle(d)),d},vn}var ur,bo;function ps(){return bo||(bo=1,ur=go()),ur}var ms=ps();const wo=Tt(ms),cr=(r=null,i,u,s=!0)=>wo.stringify(r,i,u,s),_o=(r,i)=>wo.parse(r,i),ys=Object.freeze(Object.defineProperty({__proto__:null,parse:_o,stringify:cr},Symbol.toStringTag,{value:"Module"})),vs=Object.freeze(Object.defineProperty({__proto__:null,SHA256:async(r,i=!0)=>{const u=i?cr(r):r,l=new TextEncoder().encode(u),d=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(d)).map(S=>S.toString(16).padStart(2,"0")).join("")},id:()=>{const r=Date.now(),i=Math.floor(Math.random()*1e6),u=`${r}${i}`;return parseInt(u).toString(32)},random:()=>{const r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]}},Symbol.toStringTag,{value:"Module"}));function So(r,i){return function(){return r.apply(i,arguments)}}const{toString:gs}=Object.prototype,{getPrototypeOf:lr}=Object,bn=(r=>i=>{const u=gs.call(i);return r[u]||(r[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=r=>(r=r.toLowerCase(),i=>bn(i)===r),wn=r=>i=>typeof i===r,{isArray:Rt}=Array,Kt=wn("undefined");function bs(r){return r!==null&&!Kt(r)&&r.constructor!==null&&!Kt(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const xo=Ze("ArrayBuffer");function ws(r){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(r):i=r&&r.buffer&&xo(r.buffer),i}const _s=wn("string"),Ve=wn("function"),Oo=wn("number"),_n=r=>r!==null&&typeof r=="object",Ss=r=>r===!0||r===!1,Sn=r=>{if(bn(r)!=="object")return!1;const i=lr(r);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},xs=Ze("Date"),Os=Ze("File"),Es=Ze("Blob"),ks=Ze("FileList"),Ts=r=>_n(r)&&Ve(r.pipe),Rs=r=>{let i;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((i=bn(r))==="formdata"||i==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},As=Ze("URLSearchParams"),[Ps,Ds,$s,Cs]=["ReadableStream","Request","Response","Headers"].map(Ze),js=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(r,i,{allOwnKeys:u=!1}={}){if(r===null||typeof r>"u")return;let s,l;if(typeof r!="object"&&(r=[r]),Rt(r))for(s=0,l=r.length;s<l;s++)i.call(null,r[s],s,r);else{const d=u?Object.getOwnPropertyNames(r):Object.keys(r),h=d.length;let S;for(s=0;s<h;s++)S=d[s],i.call(null,r[S],S,r)}}function Eo(r,i){i=i.toLowerCase();const u=Object.keys(r);let s=u.length,l;for(;s-- >0;)if(l=u[s],i===l.toLowerCase())return l;return null}const pt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ko=r=>!Kt(r)&&r!==pt;function fr(){const{caseless:r}=ko(this)&&this||{},i={},u=(s,l)=>{const d=r&&Eo(i,l)||l;Sn(i[d])&&Sn(s)?i[d]=fr(i[d],s):Sn(s)?i[d]=fr({},s):Rt(s)?i[d]=s.slice():i[d]=s};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&It(arguments[s],u);return i}const Ms=(r,i,u,{allOwnKeys:s}={})=>(It(i,(l,d)=>{u&&Ve(l)?r[d]=So(l,u):r[d]=l},{allOwnKeys:s}),r),Ns=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Fs=(r,i,u,s)=>{r.prototype=Object.create(i.prototype,s),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:i.prototype}),u&&Object.assign(r.prototype,u)},qs=(r,i,u,s)=>{let l,d,h;const S={};if(i=i||{},r==null)return i;do{for(l=Object.getOwnPropertyNames(r),d=l.length;d-- >0;)h=l[d],(!s||s(h,r,i))&&!S[h]&&(i[h]=r[h],S[h]=!0);r=u!==!1&&lr(r)}while(r&&(!u||u(r,i))&&r!==Object.prototype);return i},Bs=(r,i,u)=>{r=String(r),(u===void 0||u>r.length)&&(u=r.length),u-=i.length;const s=r.indexOf(i,u);return s!==-1&&s===u},Ks=r=>{if(!r)return null;if(Rt(r))return r;let i=r.length;if(!Oo(i))return null;const u=new Array(i);for(;i-- >0;)u[i]=r[i];return u},Is=(r=>i=>r&&i instanceof r)(typeof Uint8Array<"u"&&lr(Uint8Array)),Ls=(r,i)=>{const s=(r&&r[Symbol.iterator]).call(r);let l;for(;(l=s.next())&&!l.done;){const d=l.value;i.call(r,d[0],d[1])}},Us=(r,i)=>{let u;const s=[];for(;(u=r.exec(i))!==null;)s.push(u);return s},Ys=Ze("HTMLFormElement"),Hs=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,s,l){return s.toUpperCase()+l}),To=(({hasOwnProperty:r})=>(i,u)=>r.call(i,u))(Object.prototype),zs=Ze("RegExp"),Ro=(r,i)=>{const u=Object.getOwnPropertyDescriptors(r),s={};It(u,(l,d)=>{let h;(h=i(l,d,r))!==!1&&(s[d]=h||l)}),Object.defineProperties(r,s)},Vs=r=>{Ro(r,(i,u)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const s=r[u];if(Ve(s)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},Ws=(r,i)=>{const u={},s=l=>{l.forEach(d=>{u[d]=!0})};return Rt(r)?s(r):s(String(r).split(i)),u},Js=()=>{},Gs=(r,i)=>r!=null&&Number.isFinite(r=+r)?r:i;function Xs(r){return!!(r&&Ve(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Qs=r=>{const i=new Array(10),u=(s,l)=>{if(_n(s)){if(i.indexOf(s)>=0)return;if(!("toJSON"in s)){i[l]=s;const d=Rt(s)?[]:{};return It(s,(h,S)=>{const P=u(h,l+1);!Kt(P)&&(d[S]=P)}),i[l]=void 0,d}}return s};return u(r,0)},Zs=Ze("AsyncFunction"),ea=r=>r&&(_n(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Ao=((r,i)=>r?setImmediate:i?((u,s)=>(pt.addEventListener("message",({source:l,data:d})=>{l===pt&&d===u&&s.length&&s.shift()()},!1),l=>{s.push(l),pt.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ve(pt.postMessage)),ta=typeof queueMicrotask<"u"?queueMicrotask.bind(pt):typeof process<"u"&&process.nextTick||Ao,A={isArray:Rt,isArrayBuffer:xo,isBuffer:bs,isFormData:Rs,isArrayBufferView:ws,isString:_s,isNumber:Oo,isBoolean:Ss,isObject:_n,isPlainObject:Sn,isReadableStream:Ps,isRequest:Ds,isResponse:$s,isHeaders:Cs,isUndefined:Kt,isDate:xs,isFile:Os,isBlob:Es,isRegExp:zs,isFunction:Ve,isStream:Ts,isURLSearchParams:As,isTypedArray:Is,isFileList:ks,forEach:It,merge:fr,extend:Ms,trim:js,stripBOM:Ns,inherits:Fs,toFlatObject:qs,kindOf:bn,kindOfTest:Ze,endsWith:Bs,toArray:Ks,forEachEntry:Ls,matchAll:Us,isHTMLForm:Ys,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:Ro,freezeMethods:Vs,toObjectSet:Ws,toCamelCase:Hs,noop:Js,toFiniteNumber:Gs,findKey:Eo,global:pt,isContextDefined:ko,isSpecCompliantForm:Xs,toJSONObject:Qs,isAsyncFn:Zs,isThenable:ea,setImmediate:Ao,asap:ta};function pe(r,i,u,s,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",i&&(this.code=i),u&&(this.config=u),s&&(this.request=s),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 Po=pe.prototype,Do={};["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=>{Do[r]={value:r}}),Object.defineProperties(pe,Do),Object.defineProperty(Po,"isAxiosError",{value:!0}),pe.from=(r,i,u,s,l,d)=>{const h=Object.create(Po);return A.toFlatObject(r,h,function(P){return P!==Error.prototype},S=>S!=="isAxiosError"),pe.call(h,r.message,i,u,s,l),h.cause=r,h.name=r.name,d&&Object.assign(h,d),h};const na=null;function dr(r){return A.isPlainObject(r)||A.isArray(r)}function $o(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function Co(r,i,u){return r?r.concat(i).map(function(l,d){return l=$o(l),!u&&d?"["+l+"]":l}).join(u?".":""):i}function ra(r){return A.isArray(r)&&!r.some(dr)}const oa=A.toFlatObject(A,{},null,function(i){return/^is[A-Z]/.test(i)});function xn(r,i,u){if(!A.isObject(r))throw new TypeError("target must be an object");i=i||new FormData,u=A.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,E){return!A.isUndefined(E[j])});const s=u.metaTokens,l=u.visitor||$,d=u.dots,h=u.indexes,P=(u.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(i);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=s?j:j.slice(0,-2),N=JSON.stringify(N);else if(A.isArray(N)&&ra(N)||(A.isFileList(N)||A.endsWith(j,"[]"))&&(J=A.toArray(N)))return j=$o(j),J.forEach(function(G,_e){!(A.isUndefined(G)||G===null)&&i.append(h===!0?Co([j],_e,d):h===null?j:j+"[]",C(G))}),!1}return dr(N)?!0:(i.append(Co(E,j,d),C(N)),!1)}const M=[],ae=Object.assign(oa,{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(i,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),i}function jo(r){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(s){return i[s]})}function hr(r,i){this._pairs=[],r&&xn(r,this,i)}const Mo=hr.prototype;Mo.append=function(i,u){this._pairs.push([i,u])},Mo.toString=function(i){const u=i?function(s){return i.call(this,s,jo)}:jo;return this._pairs.map(function(l){return u(l[0])+"="+u(l[1])},"").join("&")};function ia(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function No(r,i,u){if(!i)return r;const s=u&&u.encode||ia;A.isFunction(u)&&(u={serialize:u});const l=u&&u.serialize;let d;if(l?d=l(i,u):d=A.isURLSearchParams(i)?i.toString():new hr(i,u).toString(s),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Fo{constructor(){this.handlers=[]}use(i,u,s){return this.handlers.push({fulfilled:i,rejected:u,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){A.forEach(this.handlers,function(s){s!==null&&i(s)})}}const qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sa={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,aa=pr&&(!mr||["ReactNative","NativeScript","NS"].indexOf(mr.product)<0),ua=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ca=pr&&window.location.href||"http://localhost",qe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pr,hasStandardBrowserEnv:aa,hasStandardBrowserWebWorkerEnv:ua,navigator:mr,origin:ca},Symbol.toStringTag,{value:"Module"})),...sa};function la(r,i){return xn(r,new qe.classes.URLSearchParams,Object.assign({visitor:function(u,s,l,d){return qe.isNode&&A.isBuffer(u)?(this.append(s,u.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},i))}function fa(r){return A.matchAll(/\w+|\[(\w*)]/g,r).map(i=>i[0]==="[]"?"":i[1]||i[0])}function da(r){const i={},u=Object.keys(r);let s;const l=u.length;let d;for(s=0;s<l;s++)d=u[s],i[d]=r[d];return i}function Bo(r){function i(u,s,l,d){let h=u[d++];if(h==="__proto__")return!0;const S=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],s]:l[h]=s,!S):((!l[h]||!A.isObject(l[h]))&&(l[h]=[]),i(u,s,l[h],d)&&A.isArray(l[h])&&(l[h]=da(l[h])),!S)}if(A.isFormData(r)&&A.isFunction(r.entries)){const u={};return A.forEachEntry(r,(s,l)=>{i(fa(s),l,u,0)}),u}return null}function ha(r,i,u){if(A.isString(r))try{return(i||JSON.parse)(r),A.trim(r)}catch(s){if(s.name!=="SyntaxError")throw s}return(u||JSON.stringify)(r)}const Lt={transitional:qo,adapter:["xhr","http","fetch"],transformRequest:[function(i,u){const s=u.getContentType()||"",l=s.indexOf("application/json")>-1,d=A.isObject(i);if(d&&A.isHTMLForm(i)&&(i=new FormData(i)),A.isFormData(i))return l?JSON.stringify(Bo(i)):i;if(A.isArrayBuffer(i)||A.isBuffer(i)||A.isStream(i)||A.isFile(i)||A.isBlob(i)||A.isReadableStream(i))return i;if(A.isArrayBufferView(i))return i.buffer;if(A.isURLSearchParams(i))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let S;if(d){if(s.indexOf("application/x-www-form-urlencoded")>-1)return la(i,this.formSerializer).toString();if((S=A.isFileList(i))||s.indexOf("multipart/form-data")>-1){const P=this.env&&this.env.FormData;return xn(S?{"files[]":i}:i,P&&new P,this.formSerializer)}}return d||l?(u.setContentType("application/json",!1),ha(i)):i}],transformResponse:[function(i){const u=this.transitional||Lt.transitional,s=u&&u.forcedJSONParsing,l=this.responseType==="json";if(A.isResponse(i)||A.isReadableStream(i))return i;if(i&&A.isString(i)&&(s&&!this.responseType||l)){const h=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(i)}catch(S){if(h)throw S.name==="SyntaxError"?pe.from(S,pe.ERR_BAD_RESPONSE,this,null,this.response):S}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(i){return i>=200&&i<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 pa=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"]),ma=r=>{const i={};let u,s,l;return r&&r.split(`
|
|
4
|
-
`).forEach(function(
|
|
5
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...u){const s=new this(i);return u.forEach(l=>s.set(l)),s}static accessor(i){const s=(this[Ko]=this[Ko]={accessors:{}}).accessors,l=this.prototype;function d(h){const S=Ut(h);s[S]||(ba(l,h),s[S]=!0)}return A.isArray(i)?i.forEach(d):d(i),this}};He.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(He.prototype,({value:r},i)=>{let u=i[0].toUpperCase()+i.slice(1);return{get:()=>r,set(s){this[u]=s}}}),A.freezeMethods(He);function vr(r,i){const u=this||Lt,s=i||u,l=He.from(s.headers);let d=s.data;return A.forEach(r,function(S){d=S.call(u,d,l.normalize(),i?i.status:void 0)}),l.normalize(),d}function Io(r){return!!(r&&r.__CANCEL__)}function At(r,i,u){pe.call(this,r??"canceled",pe.ERR_CANCELED,i,u),this.name="CanceledError"}A.inherits(At,pe,{__CANCEL__:!0});function Lo(r,i,u){const s=u.config.validateStatus;!u.status||!s||s(u.status)?r(u):i(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 wa(r){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return i&&i[1]||""}function _a(r,i){r=r||10;const u=new Array(r),s=new Array(r);let l=0,d=0,h;return i=i!==void 0?i:1e3,function(P){const C=Date.now(),$=s[d];h||(h=C),u[l]=P,s[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<i)return;const ue=$&&C-$;return ue?Math.round(ae*1e3/ue):void 0}}function Sa(r,i){let u=0,s=1e3/i,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>=s?h(C,$):(l=C,d||(d=setTimeout(()=>{d=null,h(l)},s-M)))},()=>l&&h(l)]}const En=(r,i,u=3)=>{let s=0;const l=_a(50,250);return Sa(d=>{const h=d.loaded,S=d.lengthComputable?d.total:void 0,P=h-s,C=l(P),$=h<=S;s=h;const M={loaded:h,total:S,progress:S?h/S:void 0,bytes:P,rate:C||void 0,estimated:C&&S&&$?(S-h)/C:void 0,event:d,lengthComputable:S!=null,[i?"download":"upload"]:!0};r(M)},u)},Uo=(r,i)=>{const u=r!=null;return[s=>i[0]({lengthComputable:u,total:r,loaded:s}),i[1]]},Yo=r=>(...i)=>A.asap(()=>r(...i)),xa=qe.hasStandardBrowserEnv?((r,i)=>u=>(u=new URL(u,qe.origin),r.protocol===u.protocol&&r.host===u.host&&(i||r.port===u.port)))(new URL(qe.origin),qe.navigator&&/(msie|trident)/i.test(qe.navigator.userAgent)):()=>!0,Oa=qe.hasStandardBrowserEnv?{write(r,i,u,s,l,d){const h=[r+"="+encodeURIComponent(i)];A.isNumber(u)&&h.push("expires="+new Date(u).toGMTString()),A.isString(s)&&h.push("path="+s),A.isString(l)&&h.push("domain="+l),d===!0&&h.push("secure"),document.cookie=h.join("; ")},read(r){const i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ea(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function ka(r,i){return i?r.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):r}function Ho(r,i,u){let s=!Ea(i);return r&&(s||u==!1)?ka(r,i):i}const zo=r=>r instanceof He?{...r}:r;function mt(r,i){i=i||{};const u={};function s(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 s(void 0,C,M,ae)}else return s(C,$,M,ae)}function d(C,$){if(!A.isUndefined($))return s(void 0,$)}function h(C,$){if(A.isUndefined($)){if(!A.isUndefined(C))return s(void 0,C)}else return s(void 0,$)}function S(C,$,M){if(M in i)return s(C,$);if(M in r)return s(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:S,headers:(C,$,M)=>l(zo(C),zo($),M,!0)};return A.forEach(Object.keys(Object.assign({},r,i)),function($){const M=P[$]||l,ae=M(r[$],i[$],$);A.isUndefined(ae)&&M!==S||(u[$]=ae)}),u}const Vo=r=>{const i=mt({},r);let{data:u,withXSRFToken:s,xsrfHeaderName:l,xsrfCookieName:d,headers:h,auth:S}=i;i.headers=h=He.from(h),i.url=No(Ho(i.baseURL,i.url,i.allowAbsoluteUrls),r.params,r.paramsSerializer),S&&h.set("Authorization","Basic "+btoa((S.username||"")+":"+(S.password?unescape(encodeURIComponent(S.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&&(s&&A.isFunction(s)&&(s=s(i)),s||s!==!1&&xa(i.url))){const C=l&&d&&Oa.read(d);C&&h.set(l,C)}return i},Ta=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(u,s){const l=Vo(r);let d=l.data;const h=He.from(l.headers).normalize();let{responseType:S,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=He.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};Lo(function(U){u(U),j()},function(U){s(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&&(s(new pe("Request aborted",pe.ECONNABORTED,r,E)),E=null)},E.onerror=function(){s(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||qo;l.timeoutErrorMessage&&(_e=l.timeoutErrorMessage),s(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]=En(C,!0),E.addEventListener("progress",ae)),P&&E.upload&&([M,ue]=En(P),E.upload.addEventListener("progress",M),E.upload.addEventListener("loadend",ue)),(l.cancelToken||l.signal)&&($=G=>{E&&(s(!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=wa(l.url);if(re&&qe.protocols.indexOf(re)===-1){s(new pe("Unsupported protocol "+re+":",pe.ERR_BAD_REQUEST,r));return}E.send(d||null)})},Ra=(r,i)=>{const{length:u}=r=r?r.filter(Boolean):[];if(i||u){let s=new AbortController,l;const d=function(C){if(!l){l=!0,S();const $=C instanceof Error?C:this.reason;s.abort($ instanceof pe?$:new At($ instanceof Error?$.message:$))}};let h=i&&setTimeout(()=>{h=null,d(new pe(`timeout ${i} of ms exceeded`,pe.ETIMEDOUT))},i);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:P}=s;return P.unsubscribe=()=>A.asap(S),P}},Aa=function*(r,i){let u=r.byteLength;if(u<i){yield r;return}let s=0,l;for(;s<u;)l=s+i,yield r.slice(s,l),s=l},Pa=async function*(r,i){for await(const u of Da(r))yield*Aa(u,i)},Da=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const i=r.getReader();try{for(;;){const{done:u,value:s}=await i.read();if(u)break;yield s}}finally{await i.cancel()}},Wo=(r,i,u,s)=>{const l=Pa(r,i);let d=0,h,S=P=>{h||(h=!0,s&&s(P))};return new ReadableStream({async pull(P){try{const{done:C,value:$}=await l.next();if(C){S(),P.close();return}let M=$.byteLength;if(u){let ae=d+=M;u(ae)}P.enqueue(new Uint8Array($))}catch(C){throw S(C),C}},cancel(P){return S(P),l.return()}},{highWaterMark:2})},kn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Jo=kn&&typeof ReadableStream=="function",$a=kn&&(typeof TextEncoder=="function"?(r=>i=>r.encode(i))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Go=(r,...i)=>{try{return!!r(...i)}catch{return!1}},Ca=Jo&&Go(()=>{let r=!1;const i=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!i}),Xo=64*1024,gr=Jo&&Go(()=>A.isReadableStream(new Response("").body)),Tn={stream:gr&&(r=>r.body)};kn&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!Tn[i]&&(Tn[i]=A.isFunction(r[i])?u=>u[i]():(u,s)=>{throw new pe(`Response type '${i}' is not supported`,pe.ERR_NOT_SUPPORT,s)})})})(new Response);const ja=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 $a(r)).byteLength},Ma=async(r,i)=>{const u=A.toFiniteNumber(r.getContentLength());return u??ja(i)},br={http:na,xhr:Ta,fetch:kn&&(async r=>{let{url:i,method:u,data:s,signal:l,cancelToken:d,timeout:h,onDownloadProgress:S,onUploadProgress:P,responseType:C,headers:$,withCredentials:M="same-origin",fetchOptions:ae}=Vo(r);C=C?(C+"").toLowerCase():"text";let ue=Ra([l,d&&d.toAbortSignal()],h),N;const j=ue&&ue.unsubscribe&&(()=>{ue.unsubscribe()});let E;try{if(P&&Ca&&u!=="get"&&u!=="head"&&(E=await Ma($,s))!==0){let fe=new Request(i,{method:"POST",body:s,duplex:"half"}),te;if(A.isFormData(s)&&(te=fe.headers.get("content-type"))&&$.setContentType(te),fe.body){const[U,K]=Uo(E,En(Yo(P)));s=Wo(fe.body,Xo,U,K)}}A.isString(M)||(M=M?"include":"omit");const J="credentials"in Request.prototype;N=new Request(i,{...ae,signal:ue,method:u.toUpperCase(),headers:$.normalize().toJSON(),body:s,duplex:"half",credentials:J?M:void 0});let re=await fetch(N);const G=gr&&(C==="stream"||C==="response");if(gr&&(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&&Uo(te,En(Yo(S),!0))||[];re=new Response(Wo(re.body,Xo,U,()=>{K&&K(),j&&j()}),fe)}C=C||"text";let _e=await Tn[A.findKey(Tn,C)||"text"](re,r);return!G&&j&&j(),await new Promise((fe,te)=>{Lo(fe,te,{data:_e,headers:He.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,i)=>{if(r){try{Object.defineProperty(r,"name",{value:i})}catch{}Object.defineProperty(r,"adapterName",{value:i})}});const Qo=r=>`- ${r}`,Na=r=>A.isFunction(r)||r===null||r===!1,Zo={getAdapter:r=>{r=A.isArray(r)?r:[r];const{length:i}=r;let u,s;const l={};for(let d=0;d<i;d++){u=r[d];let h;if(s=u,!Na(u)&&(s=br[(h=String(u)).toLowerCase()],s===void 0))throw new pe(`Unknown adapter '${h}'`);if(s)break;l[h||"#"+d]=s}if(!s){const d=Object.entries(l).map(([S,P])=>`adapter ${S} `+(P===!1?"is not supported by the environment":"is not available in the build"));let h=i?d.length>1?`since :
|
|
6
|
-
`+d.map(Qo).join(`
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@rainte/js`]={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=c({findByValue:()=>p,flattenTree:()=>f}),f=(e,t=`children`)=>e.flatMap(e=>{let{[t]:n,...r}=e,i=r;return n?.length?[i,...f(n,t)]:[i]}),p=(e,t,n=`value`)=>{let r=Array.isArray(t)?t[0]:t;return e.find(e=>e[n]===r)},m=c({download:()=>_,toBase64:()=>h,toBlob:()=>g}),h=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=e=>t(e.target?.result),r.onerror=e=>n(e.target?.error),r.readAsDataURL(e)}).then(e=>e),g=(e,t)=>{let n=/^data:([^,]*),(.*)$/s.exec(e),r=``,i=e,a=!0;if(n){let[e,...t]=n[1].split(`;`);r=e,a=t.includes(`base64`),i=n[2]}else{let t=/^([^;,]+)?;base64,(.*)$/s.exec(e);t&&(r=t[1]??``,i=t[2])}let o=a?atob(i):decodeURIComponent(i),s=new Uint8Array(o.length);for(let e=0;e<o.length;e++)s[e]=o.charCodeAt(e);return new Blob([s],{...t,type:t?.type??r})},_=(e,t)=>{let n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=e,n.click(),URL.revokeObjectURL(n.href)},v=u(s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.Dexie=r())})(n,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var i=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,a=Object.keys,o=Array.isArray;typeof Promise<`u`&&!i.Promise&&(i.Promise=Promise);function s(e,t){return typeof t==`object`&&a(t).forEach(function(n){e[n]=t[n]}),e}var c=Object.getPrototypeOf,l={}.hasOwnProperty;function u(e,t){return l.call(e,t)}function d(e,t){typeof t==`function`&&(t=t(c(e))),(typeof Reflect>`u`?a:Reflect.ownKeys)(t).forEach(function(n){p(e,n,t[n])})}var f=Object.defineProperty;function p(e,t,n,r){f(e,t,s(n&&u(n,`get`)&&typeof n.get==`function`?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function m(e){return{from:function(t){return e.prototype=Object.create(t.prototype),p(e.prototype,`constructor`,e),{extend:d.bind(null,e.prototype)}}}}var h=Object.getOwnPropertyDescriptor;function g(e,t){var n=h(e,t),r;return n||(r=c(e))&&g(r,t)}var _=[].slice;function v(e,t,n){return _.call(e,t,n)}function y(e,t){return t(e)}function b(e){if(!e)throw Error(`Assertion Failed`)}function x(e){i.setImmediate?setImmediate(e):setTimeout(e,0)}function S(e,t){return e.reduce(function(e,n,r){var i=t(n,r);return i&&(e[i[0]]=i[1]),e},{})}function C(e,t){if(typeof t==`string`&&u(e,t))return e[t];if(!t)return e;if(typeof t!=`string`){for(var n=[],r=0,i=t.length;r<i;++r){var a=C(e,t[r]);n.push(a)}return n}var o=t.indexOf(`.`);if(o!==-1){var s=e[t.substr(0,o)];return s==null?void 0:C(s,t.substr(o+1))}}function w(e,t,n){if(e&&t!==void 0&&!(`isFrozen`in Object&&Object.isFrozen(e))){if(typeof t!=`string`&&`length`in t){b(typeof n!=`string`&&`length`in n);for(var r=0,i=t.length;r<i;++r)w(e,t[r],n[r])}else{var a=t.indexOf(`.`);if(a!==-1){var s=t.substr(0,a),c=t.substr(a+1);if(c===``)n===void 0?o(e)&&!isNaN(parseInt(s))?e.splice(s,1):delete e[s]:e[s]=n;else{var l=e[s];if(!l||!u(e,s)){if(n===void 0)return;l=e[s]={}}w(l,c,n)}}else n===void 0?o(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}}function T(e,t){typeof t==`string`?w(e,t,void 0):`length`in t&&[].map.call(t,function(t){w(e,t,void 0)})}function E(e){var t={};for(var n in e)u(e,n)&&(t[n]=e[n]);return t}var ee=[].concat;function te(e){return ee.apply([],e)}var ne=`BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey`.split(`,`).concat(te([8,16,32,64].map(function(e){return[`Int`,`Uint`,`Float`].map(function(t){return t+e+`Array`})}))).filter(function(e){return i[e]}),re=new Set(ne.map(function(e){return i[e]}));function ie(e){var t={};for(var n in e)if(u(e,n)){var r=e[n];t[n]=!r||typeof r!=`object`||re.has(r.constructor)?r:ie(r)}return t}var ae=null;function D(e){ae=new WeakMap;var t=O(e);return ae=null,t}function O(e){if(!e||typeof e!=`object`)return e;var t=ae.get(e);if(t)return t;if(o(e)){t=[],ae.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(O(e[n]))}else if(re.has(e.constructor))t=e;else{var i=c(e);for(var a in t=i===Object.prototype?{}:Object.create(i),ae.set(e,t),e)u(e,a)&&(t[a]=O(e[a]))}return t}var oe={}.toString;function k(e){return oe.call(e).slice(8,-1)}var se=typeof Symbol<`u`?Symbol.iterator:`@@iterator`,ce=typeof se==`symbol`?function(e){var t;return e!=null&&(t=e[se])&&t.apply(e)}:function(){return null};function le(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n>=0}var ue={};function A(e){var t,n,r,i;if(arguments.length===1){if(o(e))return e.slice();if(this===ue&&typeof e==`string`)return[e];if(i=ce(e)){for(n=[];r=i.next(),!r.done;)n.push(r.value);return n}if(e==null)return[e];if(t=e.length,typeof t==`number`){for(n=Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}var de=typeof Symbol<`u`?function(e){return e[Symbol.toStringTag]===`AsyncFunction`}:function(){return!1},fe=[`Modify`,`Bulk`,`OpenFailed`,`VersionChange`,`Schema`,`Upgrade`,`InvalidTable`,`MissingAPI`,`NoSuchDatabase`,`InvalidArgument`,`SubTransaction`,`Unsupported`,`Internal`,`DatabaseClosed`,`PrematureCommit`,`ForeignAwait`],j=[`Unknown`,`Constraint`,`Data`,`TransactionInactive`,`ReadOnly`,`Version`,`NotFound`,`InvalidState`,`InvalidAccess`,`Abort`,`Timeout`,`QuotaExceeded`,`Syntax`,`DataClone`],M=fe.concat(j),pe={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 me(e,t){this.name=e,this.message=t}m(me).from(Error).extend({toString:function(){return this.name+`: `+this.message}});function he(e,t){return e+`. Errors: `+Object.keys(t).map(function(e){return t[e].toString()}).filter(function(e,t,n){return n.indexOf(e)===t}).join(`
|
|
2
|
+
`)}function N(e,t,n,r){this.failures=t,this.failedKeys=r,this.successCount=n,this.message=he(e,t)}m(N).from(me);function ge(e,t){this.name=`BulkError`,this.failures=Object.keys(t).map(function(e){return t[e]}),this.failuresByPos=t,this.message=he(e,this.failures)}m(ge).from(me);var _e=M.reduce(function(e,t){return e[t]=t+`Error`,e},{}),ve=me,P=M.reduce(function(e,t){var n=t+`Error`;function r(e,r){this.name=n,e?typeof e==`string`?(this.message=`${e}${r?`
|
|
3
|
+
`+r:``}`,this.inner=r||null):typeof e==`object`&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=pe[t]||n,this.inner=null)}return m(r).from(ve),e[t]=r,e},{});P.Syntax=SyntaxError,P.Type=TypeError,P.Range=RangeError;var ye=j.reduce(function(e,t){return e[t+`Error`]=P[t],e},{});function be(e,t){if(!e||e instanceof me||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ye[e.name])return e;var n=new ye[e.name](t||e.message,e);return`stack`in e&&p(n,`stack`,{get:function(){return this.inner.stack}}),n}var xe=M.reduce(function(e,t){return[`Syntax`,`Type`,`Range`].indexOf(t)===-1&&(e[t+`Error`]=P[t]),e},{});xe.ModifyError=N,xe.DexieError=me,xe.BulkError=ge;function F(){}function Se(e){return e}function Ce(e,t){return e==null||e===Se?t:function(n){return t(e(n))}}function we(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Te(e,t){return e===F?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?we(r,this.onsuccess):r),i&&(this.onerror=this.onerror?we(i,this.onerror):i),a===void 0?n:a}}function Ee(e,t){return e===F?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?we(n,this.onsuccess):n),r&&(this.onerror=this.onerror?we(r,this.onerror):r)}}function De(e,t){return e===F?t:function(){var n=e.apply(this,arguments),r=arguments[0];s(r,n);var i=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?we(i,this.onsuccess):i),a&&(this.onerror=this.onerror?we(a,this.onerror):a),n===void 0?o===void 0?void 0:o:s(n,o)}}function Oe(e,t){return e===F?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function ke(e,t){return e===F?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then==`function`){for(var r=this,i=arguments.length,a=Array(i);i--;)a[i]=arguments[i];return n.then(function(){return t.apply(r,a)})}return t.apply(this,arguments)}}var Ae=typeof location<`u`&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function je(e,t){Ae=e}var Me={},Ne=100,Pe=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]})(),Fe=Pe[0],Ie=Pe[1],Le=Pe[2],Re=Ie&&Ie.then,I=Fe&&Fe.constructor,ze=!!Le;function Be(){queueMicrotask(rt)}var Ve=function(e,t){qe.push([e,t]),Ue&&=(Be(),!1)},He=!0,Ue=!0,We=[],Ge=[],L=Se,Ke={id:`global`,global:!0,ref:0,unhandleds:[],onunhandled:F,pgp:!1,env:{},finalize:F},R=Ke,qe=[],Je=0,Ye=[];function z(e){if(typeof this!=`object`)throw TypeError(`Promises must be constructed via new`);this._listeners=[],this._lib=!1;var t=this._PSD=R;if(typeof e!=`function`){if(e!==Me)throw TypeError(`Not a function`);this._state=arguments[1],this._value=arguments[2],this._state===!1&&$e(this,this._value)}else this._state=null,this._value=null,++t.ref,Qe(this,e)}var Xe={get:function(){var e=R,t=mt;function n(n,r){var i=this,a=!e.global&&(e!==R||t!==mt),o=a&&!vt(),s=new z(function(t,s){tt(i,new Ze(Tt(n,e,a,o),Tt(r,e,a,o),t,s,e))});return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return n.prototype=Me,n},set:function(e){p(this,`then`,e&&e.prototype===Me?Xe:{get:function(){return e},set:Xe.set})}};d(z.prototype,{then:Xe,_then:function(e,t){tt(this,new Ze(null,null,e,t,R))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t==`function`?this.then(null,function(e){return e instanceof t?n(e):ut(e)}):this.then(null,function(e){return e&&e.name===t?n(e):ut(e)})},finally:function(e){return this.then(function(t){return z.resolve(e()).then(function(){return t})},function(t){return z.resolve(e()).then(function(){return ut(t)})})},timeout:function(e,t){var n=this;return e<1/0?new z(function(r,i){var a=setTimeout(function(){return i(new P.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,a))}):this}}),typeof Symbol<`u`&&Symbol.toStringTag&&p(z.prototype,Symbol.toStringTag,`Dexie.Promise`),Ke.env=Ct();function Ze(e,t,n,r,i){this.onFulfilled=typeof e==`function`?e:null,this.onRejected=typeof t==`function`?t:null,this.resolve=n,this.reject=r,this.psd=i}d(z,{all:function(){var e=A.apply(null,arguments).map(yt);return new z(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,a){return z.resolve(i).then(function(n){e[a]=n,--r||t(e)},n)})})},resolve:function(e){return e instanceof z?e:e&&typeof e.then==`function`?new z(function(t,n){e.then(t,n)}):new z(Me,!0,e)},reject:ut,race:function(){var e=A.apply(null,arguments).map(yt);return new z(function(t,n){e.map(function(e){return z.resolve(e).then(t,n)})})},PSD:{get:function(){return R},set:function(e){return R=e}},totalEchoes:{get:function(){return mt}},newPSD:gt,usePSD:wt,scheduler:{get:function(){return Ve},set:function(e){Ve=e}},rejectionMapper:{get:function(){return L},set:function(e){L=e}},follow:function(e,t){return new z(function(n,r){return gt(function(t,n){var r=R;r.unhandleds=[],r.onunhandled=n,r.finalize=we(function(){var e=this;st(function(){e.unhandleds.length===0?t():n(e.unhandleds[0])})},r.finalize),e()},t,n,r)})}}),I&&(I.allSettled&&p(z,`allSettled`,function(){var e=A.apply(null,arguments).map(yt);return new z(function(t){e.length===0&&t([]);var n=e.length,r=Array(n);e.forEach(function(e,i){return z.resolve(e).then(function(e){return r[i]={status:`fulfilled`,value:e}},function(e){return r[i]={status:`rejected`,reason:e}}).then(function(){return--n||t(r)})})})}),I.any&&typeof AggregateError<`u`&&p(z,`any`,function(){var e=A.apply(null,arguments).map(yt);return new z(function(t,n){e.length===0&&n(AggregateError([]));var r=e.length,i=Array(r);e.forEach(function(e,a){return z.resolve(e).then(function(e){return t(e)},function(e){i[a]=e,--r||n(AggregateError(i))})})})}),I.withResolvers&&(z.withResolvers=I.withResolvers));function Qe(e,t){try{t(function(t){if(e._state===null){if(t===e)throw TypeError(`A promise cannot be resolved with itself.`);var n=e._lib&&it();t&&typeof t.then==`function`?Qe(e,function(e,n){t instanceof z?t._then(e,n):t.then(e,n)}):(e._state=!0,e._value=t,et(e)),n&&at()}},$e.bind(null,e))}catch(t){$e(e,t)}}function $e(e,t){if(Ge.push(t),e._state===null){var n=e._lib&&it();t=L(t),e._state=!1,e._value=t,ct(e),et(e),n&&at()}}function et(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)tt(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),Je===0&&(++Je,Ve(function(){--Je===0&&ot()},[]))}function tt(e,t){if(e._state===null)e._listeners.push(t);else{var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Je,Ve(nt,[n,e,t])}}function nt(e,t,n){try{var r,i=t._value;!t._state&&Ge.length&&(Ge=[]),r=Ae&&t._consoleTask?t._consoleTask.run(function(){return e(i)}):e(i),!t._state&&Ge.indexOf(i)===-1&<(t),n.resolve(r)}catch(e){n.reject(e)}finally{--Je===0&&ot(),--n.psd.ref||n.psd.finalize()}}function rt(){wt(Ke,function(){it()&&at()})}function it(){var e=He;return He=!1,Ue=!1,e}function at(){var e,t,n;do for(;qe.length>0;)for(e=qe,qe=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(qe.length>0);He=!0,Ue=!0}function ot(){var e=We;We=[],e.forEach(function(e){e._PSD.onunhandled.call(null,e._value,e)});for(var t=Ye.slice(0),n=t.length;n;)t[--n]()}function st(e){function t(){e(),Ye.splice(Ye.indexOf(t),1)}Ye.push(t),++Je,Ve(function(){--Je===0&&ot()},[])}function ct(e){We.some(function(t){return t._value===e._value})||We.push(e)}function lt(e){for(var t=We.length;t;)if(We[--t]._value===e._value){We.splice(t,1);return}}function ut(e){return new z(Me,!1,e)}function B(e,t){var n=R;return function(){var r=it(),i=R;try{return St(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{St(i,!1),r&&at()}}}var V={awaits:0,echoes:0,id:0},dt=0,ft=[],pt=0,mt=0,ht=0;function gt(e,t,n,r){var i=R,a=Object.create(i);a.parent=i,a.ref=0,a.global=!1,a.id=++ht,Ke.env,a.env=ze?{Promise:z,PromiseProp:{value:z,configurable:!0,writable:!0},all:z.all,race:z.race,allSettled:z.allSettled,any:z.any,resolve:z.resolve,reject:z.reject}:{},t&&s(a,t),++i.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var o=wt(a,e,n,r);return a.ref===0&&a.finalize(),o}function _t(){return V.id||=++dt,++V.awaits,V.echoes+=Ne,V.id}function vt(){return V.awaits?(--V.awaits===0&&(V.id=0),V.echoes=V.awaits*Ne,!0):!1}(``+Re).indexOf(`[native code]`)===-1&&(_t=vt=F);function yt(e){return V.echoes&&e&&e.constructor===I?(_t(),e.then(function(e){return vt(),e},function(e){return vt(),H(e)})):e}function bt(e){++mt,V.echoes&&--V.echoes!==0||(V.echoes=V.awaits=V.id=0),ft.push(R),St(e,!0)}function xt(){var e=ft[ft.length-1];ft.pop(),St(e,!1)}function St(e,t){var n=R;if((t?V.echoes&&(!pt++||e!==R):pt&&(!--pt||e!==R))&&queueMicrotask(t?bt.bind(null,e):xt),e!==R&&(R=e,n===Ke&&(Ke.env=Ct()),ze)){var r=Ke.env.Promise,a=e.env;(n.global||e.global)&&(Object.defineProperty(i,"Promise",a.PromiseProp),r.all=a.all,r.race=a.race,r.resolve=a.resolve,r.reject=a.reject,a.allSettled&&(r.allSettled=a.allSettled),a.any&&(r.any=a.any))}}function Ct(){var e=i.Promise;return ze?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(i,`Promise`),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function wt(e,t,n,r,i){var a=R;try{return St(e,!0),t(n,r,i)}finally{St(a,!1)}}function Tt(e,t,n,r){return typeof e==`function`?function(){var i=R;n&&_t(),St(t,!0);try{return e.apply(this,arguments)}finally{St(i,!1),r&&queueMicrotask(vt)}}:e}function Et(e){Promise===I&&V.echoes===0?pt===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}var H=z.reject;function Dt(e,t,n,r){if(!e.idbdb||!e._state.openComplete&&!R.letThrough&&!e._vip){if(e._state.openComplete)return H(new P.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return H(new P.DatabaseClosed);e.open().catch(F)}return e._state.dbReadyPromise.then(function(){return Dt(e,t,n,r)})}var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===_e.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn(`Dexie: Need to reopen db`),e.close({disableAutoOpen:!1}),e.open().then(function(){return Dt(e,t,n,r)})):H(i)}return i._promise(t,function(e,t){return gt(function(){return R.trans=i,r(e,t,i)})}).then(function(e){if(t===`readwrite`)try{i.idbtrans.commit()}catch{}return t===`readonly`?e:i._completion.then(function(){return e})})}var Ot=`4.4.7`,kt=``,At=-1/0,jt=`Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.`,Mt=`String expected.`,Nt=1e3,Pt=`__dbnames`,Ft=`readonly`,It=`readwrite`;function Lt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Rt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function zt(e){return typeof e==`string`&&!/\./.test(e)?function(t){return t[e]===void 0&&e in t&&(t=D(t),delete t[e]),t}:function(e){return e}}function U(){throw P.Type(`Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.`)}function W(e,t){try{var n=Ht(e),r=Ht(t);if(n!==r)return n===`Array`?1:r===`Array`?-1:n===`binary`?1:r===`binary`?-1:n===`string`?1:r===`string`?-1:n===`Date`?1:r===`Date`?-1:NaN;switch(n){case`number`:case`Date`:case`string`:return e>t?1:e<t?-1:0;case`binary`:return Vt(Ut(e),Ut(t));case`Array`:return Bt(e,t)}}catch{}return NaN}function Bt(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,a=0;a<i;++a){var o=W(e[a],t[a]);if(o!==0)return o}return n===r?0:n<r?-1:1}function Vt(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,a=0;a<i;++a)if(e[a]!==t[a])return e[a]<t[a]?-1:1;return n===r?0:n<r?-1:1}function Ht(e){var t=typeof e;if(t!==`object`)return t;if(ArrayBuffer.isView(e))return`binary`;var n=k(e);return n===`ArrayBuffer`?`binary`:n}function Ut(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Wt(e,t,n){var r=e.schema.yProps;return r?(t&&n.numFailures>0&&(t=t.filter(function(e,t){return!n.failures[t]})),Promise.all(r.map(function(n){var r=n.updatesTable;return t?e.db.table(r).where(`k`).anyOf(t).delete():e.db.table(r).clear()})).then(function(){return n})):n}var Gt=function(){function e(e){this[`@@propmod`]=e}return e.prototype.execute=function(e){var t=this[`@@propmod`];if(t.add!==void 0){var n=t.add;if(o(n))return r(r([],o(e)?e:[],!0),n,!0).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 TypeError(`Invalid term ${n}`)}if(t.remove!==void 0){var i=t.remove;if(o(i))return o(e)?e.filter(function(e){return!i.includes(e)}).sort():[];if(typeof i==`number`)return Number(e)-i;if(typeof i==`bigint`)try{return BigInt(e)-i}catch{return BigInt(0)-i}throw TypeError(`Invalid subtrahend ${i}`)}var a=t.replacePrefix?.[0];return a&&typeof e==`string`&&e.startsWith(a)?t.replacePrefix[1]+e.substring(a.length):e},e}();function Kt(e,t){for(var n=a(t),r=n.length,i=!1,o=0;o<r;++o){var s=n[o],c=t[s],l=C(e,s);c instanceof Gt?(w(e,s,c.execute(l)),i=!0):l!==c&&(w(e,s,c),i=!0)}return i}var qt=function(){function e(){}return e.prototype._trans=function(e,t,n){var r=this._tx||R.trans,i=this.name,a=Ae&&typeof console<`u`&&console.createTask&&console.createTask(`Dexie: ${e===`readonly`?`read`:`write`} ${this.name}`);function o(e,n,r){if(!r.schema[i])throw new P.NotFound(`Table `+i+` not part of transaction`);return t(r.idbtrans,r)}var s=it();try{var c=r&&r.db._novip===this.db._novip?r===R.trans?r._promise(e,o,n):gt(function(){return r._promise(e,o,n)},{trans:r,transless:R.transless||R}):Dt(this.db,e,[this.name],o);return a&&(c._consoleTask=a,c=c.catch(function(e){return console.trace(e),H(e)})),c}finally{s&&at()}},e.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?H(new P.Type(`Invalid argument to Table.get()`)):this._trans(`readonly`,function(t){return n.core.get({trans:t,key:e}).then(function(e){return n.hook.reading.fire(e)})}).then(t)},e.prototype.where=function(e){if(typeof e==`string`)return new this.db.WhereClause(this,e);if(o(e))return new this.db.WhereClause(this,`[${e.join(`+`)}]`);var t=a(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(e){if(e.compound&&t.every(function(t){return e.keyPath.indexOf(t)>=0})){for(var n=0;n<t.length;++n)if(t.indexOf(e.keyPath[n])===-1)return!1;return!0}return!1}).sort(function(e,t){return e.keyPath.length-t.keyPath.length})[0];if(n&&this.db._maxKey!==kt){var r=n.keyPath.slice(0,t.length);return this.where(r).equals(r.map(function(t){return e[t]}))}!n&&Ae&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit from a compound index [${t.join(`+`)}]`);var i=this.schema.idxByName;function s(e,t){return W(e,t)===0}var c=t.reduce(function(t,n){var r=t[0],a=t[1],c=i[n],l=e[n];return[r||c,r||!c?Lt(a,c&&c.multi?function(e){var t=C(e,n);return o(t)&&t.some(function(e){return s(l,e)})}:function(e){return s(l,C(e,n))}):a]},[null,null]),l=c[0],u=c[1];return l?this.where(l.name).equals(e[l.keyPath]).filter(u):n?this.filter(u):this.where(t).equals(``)},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,o(e)?`[${e.join(`+`)}]`:e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var n=this,r=n.db,i=n.name;this.schema.mappedClass=e,e.prototype instanceof U&&(e=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"db",{get:function(){return r},enumerable:!1,configurable:!0}),n.prototype.table=function(){return i},n}(e));for(var a=new Set,o=e.prototype;o;o=c(o))Object.getOwnPropertyNames(o).forEach(function(e){return a.add(e)});var s=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(!a.has(r))try{n[r]=t[r]}catch{}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=s,this.hook(`reading`,s),e},e.prototype.defineClass=function(){function e(e){s(this,e)}return this.mapToClass(e)},e.prototype.add=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,a=r.keyPath,o=e;return a&&i&&(o=zt(a)(e)),this._trans(`readwrite`,function(e){return n.core.mutate({trans:e,type:`add`,keys:t==null?null:[t],values:[o]})}).then(function(e){return e.numFailures?z.reject(e.failures[0]):e.lastResult}).then(function(t){if(a)try{w(e,a,t)}catch{}return t})},e.prototype.upsert=function(e,t){var n=this,r=this.schema.primKey.keyPath;return this._trans(`readwrite`,function(i){return n.core.get({trans:i,key:e}).then(function(a){var o=a??{};return Kt(o,t),r&&w(o,r,e),n.core.mutate({trans:i,type:`put`,values:[o],keys:[e],upsert:!0,updates:{keys:[e],changeSpecs:[t]}}).then(function(e){return e.numFailures?z.reject(e.failures[0]):!!a})})})},e.prototype.update=function(e,t){if(typeof e==`object`&&!o(e)){var n=C(e,this.schema.primKey.keyPath);return n===void 0?H(new P.InvalidArgument(`Given object does not contain its primary key`)):this.where(`:id`).equals(n).modify(t)}return this.where(`:id`).equals(e).modify(t)},e.prototype.put=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,a=r.keyPath,o=e;return a&&i&&(o=zt(a)(e)),this._trans(`readwrite`,function(e){return n.core.mutate({trans:e,type:`put`,values:[o],keys:t==null?null:[t]})}).then(function(e){return e.numFailures?z.reject(e.failures[0]):e.lastResult}).then(function(t){if(a)try{w(e,a,t)}catch{}return t})},e.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 Wt(t,[e],n)}).then(function(e){return e.numFailures?z.reject(e.failures[0]):void 0})})},e.prototype.clear=function(){var e=this;return this._trans(`readwrite`,function(t){return e.core.mutate({trans:t,type:`deleteRange`,range:Rt}).then(function(t){return Wt(e,null,t)})}).then(function(e){return e.numFailures?z.reject(e.failures[0]):void 0})},e.prototype.bulkGet=function(e){var t=this;return this._trans(`readonly`,function(n){return t.core.getMany({keys:e,trans:n}).then(function(e){return e.map(function(e){return t.hook.reading.fire(e)})})})},e.prototype.bulkAdd=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0;n||=i?void 0:t;var a=n?n.allKeys:void 0;return this._trans(`readwrite`,function(t){var n=r.schema.primKey,o=n.auto,s=n.keyPath;if(s&&i)throw new P.InvalidArgument(`bulkAdd(): keys argument invalid on tables with inbound keys`);if(i&&i.length!==e.length)throw new P.InvalidArgument(`Arguments objects and keys must have the same length`);var c=e.length,l=s&&o?e.map(zt(s)):e;return r.core.mutate({trans:t,type:`add`,keys:i,values:l,wantResults:a}).then(function(e){var t=e.numFailures,n=e.results,i=e.lastResult,o=e.failures,s=a?n:i;if(t===0)return s;throw new ge(`${r.name}.bulkAdd(): ${t} of ${c} operations failed`,o)})})},e.prototype.bulkPut=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0;n||=i?void 0:t;var a=n?n.allKeys:void 0;return this._trans(`readwrite`,function(t){var n=r.schema.primKey,o=n.auto,s=n.keyPath;if(s&&i)throw new P.InvalidArgument(`bulkPut(): keys argument invalid on tables with inbound keys`);if(i&&i.length!==e.length)throw new P.InvalidArgument(`Arguments objects and keys must have the same length`);var c=e.length,l=s&&o?e.map(zt(s)):e;return r.core.mutate({trans:t,type:`put`,keys:i,values:l,wantResults:a}).then(function(e){var t=e.numFailures,n=e.results,i=e.lastResult,o=e.failures,s=a?n:i;if(t===0)return s;throw new ge(`${r.name}.bulkPut(): ${t} of ${c} operations failed`,o)})})},e.prototype.bulkUpdate=function(e){var t=this,n=e.map(function(e){return e.key}),r=e.map(function(e){return e.changes}),i=[];return this._trans(`readwrite`,function(a){var o=t.core;return o.getMany({trans:a,keys:n,cache:`clone`}).then(function(s){var c=o.schema.primaryKey,l=c.outbound,u=c.extractKey,d=[],f=[];e.forEach(function(e,t){var n=e.key,r=e.changes,a=s[t];if(a){for(var o=0,c=Object.keys(r);o<c.length;o++){var p=c[o];w(a,p,r[p])}if(!l&&W(u(a),n)!==0)throw new P.Constraint(`Cannot update primary key in bulkUpdate()`);i.push(t),d.push(n),f.push(a)}});var p=d.length;return o.mutate({trans:a,type:`put`,keys:d,values:f,updates:{keys:n,changeSpecs:r}}).then(function(e){var n=e.numFailures,r=e.failures;if(n===0)return p;for(var a=0,o=Object.keys(r);a<o.length;a++){var s=o[a],c=i[Number(s)];if(c!=null){var l=r[s];delete r[s],r[c]=l}}throw new ge(`${t.name}.bulkUpdate(): ${n} of ${p} operations failed`,r)})})})},e.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans(`readwrite`,function(n){return t.core.mutate({trans:n,type:`delete`,keys:e}).then(function(n){return Wt(t,e,n)})}).then(function(e){var r=e.numFailures,i=e.lastResult,a=e.failures;if(r===0)return i;throw new ge(`${t.name}.bulkDelete(): ${r} of ${n} operations failed`,a)})},e}();function Jt(e){var t={},n=function(n,r){if(r){for(var i=arguments.length,a=Array(i-1);--i;)a[i-1]=arguments[i];return t[n].subscribe.apply(null,a),e}if(typeof n==`string`)return t[n]};n.addEventType=s;for(var r=1,i=arguments.length;r<i;++r)s(arguments[r]);return n;function s(e,r,i){if(typeof e==`object`)return c(e);r||=Oe,i||=F;var a={subscribers:[],fire:i,subscribe:function(e){a.subscribers.indexOf(e)===-1&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(r,i)}};return t[e]=n[e]=a,a}function c(e){a(e).forEach(function(t){var n=e[t];if(o(n))s(t,e[t][0],e[t][1]);else if(n===`asap`)var r=s(t,Se,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){x(function(){e.apply(null,t)})})});else throw new P.InvalidArgument(`Invalid event config`)})}}function Yt(e,t){return m(t).from({prototype:e}),t}function Xt(e){return Yt(qt.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Jt(null,{creating:[Te,F],reading:[Ce,Se],updating:[De,F],deleting:[Ee,F]})})}function Zt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Qt(e,t){e.filter=Lt(e.filter,t)}function $t(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Lt(r(),t())}:t,e.justLimit=n&&!r}function en(e,t){e.isMatch=Lt(e.isMatch,t)}function tn(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new P.Schema(`KeyPath `+e.index+` on object store `+t.name+` is not indexed`);return n}function nn(e,t,n){var r=tn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir===`prev`,unique:!!e.unique,query:{index:r,range:e.range}})}function rn(e,t,n,r){var i=e.replayFilter?Lt(e.filter,e.replayFilter()):e.filter;if(e.or){var a={},o=function(e,n,r){if(!i||i(n,r,function(e){return n.stop(e)},function(e){return n.fail(e)})){var o=n.primaryKey,s=``+o;s===`[object ArrayBuffer]`&&(s=``+new Uint8Array(o)),u(a,s)||(a[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(o,n),an(nn(e,r,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return an(nn(e,r,n),Lt(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function an(e,t,n,r){var i=B(r?function(e,t,i){return n(r(e),t,i)}:n);return e.then(function(e){if(e)return e.start(function(){var n=function(){return e.continue()};(!t||t(e,function(e){return n=e},function(t){e.stop(t),n=F},function(t){e.fail(t),n=F}))&&i(e.value,e,function(e){return n=e}),n()})})}var on=function(){function e(){}return e.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,H.bind(null,n.error)):n.table._trans(`readonly`,e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,H.bind(null,t.error)):t.table._trans(`readwrite`,e,`locked`)},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=Lt(t.algorithm,e)},e.prototype._iterate=function(e,t){return rn(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&s(n,e),t._ctx=n,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return rn(t,e,n,t.table.core)})},e.prototype.count=function(e){var t=this;return this._read(function(e){var n=t._ctx,r=n.table.core;if(Zt(n,!0))return r.count({trans:e,query:{index:tn(n,r.schema),range:n.range}}).then(function(e){return Math.min(e,n.limit)});var i=0;return rn(n,function(){return++i,!1},e,r).then(function(){return i})}).then(e)},e.prototype.sortBy=function(e,t){var n=e.split(`.`).reverse(),r=n[0],i=n.length-1;function a(e,t){return t?a(e[n[t]],t-1):e[r]}var o=this._ctx.dir===`next`?1:-1;function s(e,t){return W(a(e,i),a(t,i))*o}return this.toArray(function(e){return e.slice().sort(s)}).then(t)},e.prototype.toArray=function(e){var t=this;return this._read(function(e){var n=t._ctx;if(Zt(n,!0)&&n.limit>0){var r=n.valueMapper,i=tn(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,direction:n.dir===`prev`?`prev`:void 0,query:{index:i,range:n.range}}).then(function(e){var t=e.result;return r?t.map(r):t})}var a=[];return rn(n,function(e){return a.push(e)},e,n.table.core).then(function(){return a})},e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Zt(t)?$t(t,function(){var t=e;return function(e,n){return t===0?!0:t===1?(--t,!1):(n(function(){e.advance(t),t=0}),!1)}}):$t(t,function(){var t=e;return function(){return--t<0}})),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),$t(this._ctx,function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this},e.prototype.until=function(e,t){return Qt(this._ctx,function(n,r,i){return!e(n.value)||(r(i),t)}),this},e.prototype.first=function(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return Qt(this._ctx,function(t){return e(t.value)}),en(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir===`prev`?`next`:`prev`,this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})},e.prototype.eachUniqueKey=function(e){return this._ctx.unique=`unique`,this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if(Zt(t,!0)&&t.limit>0)return this._read(function(e){var n=tn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,direction:t.dir===`prev`?`prev`:void 0,query:{index:n,range:t.range}})}).then(function(e){return e.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique=`unique`,this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys(function(e){return e[0]}).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Qt(this._ctx,function(e){var t=e.primaryKey.toString(),r=u(n,t);return n[t]=!0,!r}),this},e.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(r){var i=typeof e==`function`?e:function(t){return Kt(t,e)},o=n.table.core,s=o.schema.primaryKey,c=s.outbound,l=s.extractKey,u=200,d=t.db._options.modifyChunkSize;d&&(u=typeof d==`object`?d[o.name]||d[`*`]||200:d);var f=[],p=0,m=[],h=function(e,t){var n=t.failures,r=t.numFailures;p+=e-r;for(var i=0,o=a(n);i<o.length;i++){var s=o[i];f.push(n[s])}},g=e===sn;return t.clone().primaryKeys().then(function(t){var a=Zt(n)&&n.limit===1/0&&(typeof e!=`function`||g)&&{index:n.index,range:n.range},s=function(d){var f=Math.min(u,t.length-d),p=t.slice(d,d+f);return(g?Promise.resolve([]):o.getMany({trans:r,keys:p,cache:`immutable`})).then(function(m){var _=[],v=[],y=c?[]:null,b=g?p:[];if(!g)for(var x=0;x<f;++x){var S=m[x],C={value:D(S),primKey:t[d+x]};i.call(C,C.value,C)!==!1&&(C.value==null?b.push(t[d+x]):!c&&W(l(S),l(C.value))!==0?(b.push(t[d+x]),_.push(C.value)):(v.push(C.value),c&&y.push(t[d+x])))}return Promise.resolve(_.length>0&&o.mutate({trans:r,type:`add`,values:_}).then(function(e){for(var t in e.failures)b.splice(parseInt(t),1);h(_.length,e)})).then(function(){return(v.length>0||a&&typeof e==`object`)&&o.mutate({trans:r,type:`put`,keys:y,values:v,criteria:a,changeSpec:typeof e!=`function`&&e,isAdditionalChunk:d>0}).then(function(e){return h(v.length,e)})}).then(function(){return(b.length>0||a&&g)&&o.mutate({trans:r,type:`delete`,keys:b,criteria:a,isAdditionalChunk:d>0}).then(function(e){return Wt(n.table,b,e)}).then(function(e){return h(b.length,e)})}).then(function(){return t.length>d+f&&s(d+u)})})};return s(0).then(function(){if(f.length>0)throw new N(`Error modifying one or more objects`,f,p,m);return t.length})})})},e.prototype.delete=function(){var e=this._ctx,t=e.range;return Zt(e)&&!e.table.schema.yProps&&(e.isPrimKey||t.type===3)?this._write(function(n){var r=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:n,query:{index:r,range:i}}).then(function(t){return e.table.core.mutate({trans:n,type:`deleteRange`,range:i}).then(function(e){var n=e.failures,r=e.numFailures;if(r)throw new N(`Could not delete some values`,Object.keys(n).map(function(e){return n[e]}),t-r);return t-r})})}):this.modify(sn)},e}(),sn=function(e,t){return t.value=null};function cn(e){return Yt(on.prototype,function(t,n){this.db=e;var r=Rt,i=null;if(n)try{r=n()}catch(e){i=e}var a=t._ctx,o=a.table,s=o.hook.reading.fire;this._ctx={table:o,index:a.index,isPrimKey:!a.index||o.schema.primKey.keyPath&&a.index===o.schema.primKey.name,range:r,keysOnly:!1,dir:`next`,unique:``,algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:a.or,valueMapper:s===Se?null:s}})}function G(e,t){return e<t?-1:e===t?0:1}function ln(e,t){return e>t?-1:e===t?0:1}function K(e,t,n){var r=e instanceof q?new e.Collection(e):e;return r._ctx.error=n?new n(t):TypeError(t),r}function un(e){var t=new e.Collection(e,function(){return gn(``)});return t._addAlgorithm(function(){return!1}),t}function dn(e){return e===`next`?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function fn(e){return e===`next`?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function pn(e,t,n,r,i,a){for(var o=Math.min(e.length,r.length),s=-1,c=0;c<o;++c){var l=t[c];if(l!==r[c])return i(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):i(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[c],l)<0&&(s=c)}return o<r.length&&a===`next`?e+n.substr(e.length):o<e.length&&a===`prev`?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function mn(e,t,n,r){var i,a,o,s,c,l,u,d=n.length;if(!n.every(function(e){return typeof e==`string`}))return K(e,Mt);function f(e){i=dn(e),a=fn(e),o=e===`next`?G:ln;var t=n.map(function(e){return{lower:a(e),upper:i(e)}}).sort(function(e,t){return o(e.lower,t.lower)});s=t.map(function(e){return e.upper}),c=t.map(function(e){return e.lower}),l=e,u=e===`next`?``:r}f(`next`);var p=new e.Collection(e,function(){return hn(s[0],c[d-1]+r)});p._ondirectionchange=function(e){f(e)};var m=0;return p._addAlgorithm(function(e,n,r){var i=e.key;if(typeof i!=`string`)return!1;var f=a(i);if(t(f,c,m))return!0;for(var p=null,h=m;h<d;++h){var g=pn(i,f,s[h],c[h],o,l);g===null&&p===null?m=h+1:(p===null||o(p,g)>0)&&(p=g)}return n(p===null?r:function(){e.continue(p+u)}),!1}),p}function hn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function gn(e){return{type:1,lower:e,upper:e}}var q=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,n,r){n=n!==!1,r=r===!0;try{return this._cmp(e,t)>0||this._cmp(e,t)===0&&(n||r)&&!(n&&r)?un(this):new this.Collection(this,function(){return hn(e,t,!n,!r)})}catch{return K(this,jt)}},e.prototype.equals=function(e){return e==null?K(this,jt):new this.Collection(this,function(){return gn(e)})},e.prototype.above=function(e){return e==null?K(this,jt):new this.Collection(this,function(){return hn(e,void 0,!0)})},e.prototype.aboveOrEqual=function(e){return e==null?K(this,jt):new this.Collection(this,function(){return hn(e,void 0,!1)})},e.prototype.below=function(e){return e==null?K(this,jt):new this.Collection(this,function(){return hn(void 0,e,!1,!0)})},e.prototype.belowOrEqual=function(e){return e==null?K(this,jt):new this.Collection(this,function(){return hn(void 0,e)})},e.prototype.startsWith=function(e){return typeof e==`string`?this.between(e,e+kt,!0,!0):K(this,Mt)},e.prototype.startsWithIgnoreCase=function(e){return e===``?this.startsWith(e):mn(this,function(e,t){return e.indexOf(t[0])===0},[e],kt)},e.prototype.equalsIgnoreCase=function(e){return mn(this,function(e,t){return e===t[0]},[e],``)},e.prototype.anyOfIgnoreCase=function(){var e=A.apply(ue,arguments);return e.length===0?un(this):mn(this,function(e,t){return t.indexOf(e)!==-1},e,``)},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=A.apply(ue,arguments);return e.length===0?un(this):mn(this,function(e,t){return t.some(function(t){return e.indexOf(t)===0})},e,kt)},e.prototype.anyOf=function(){var e=this,t=A.apply(ue,arguments),n=this._cmp;try{t.sort(n)}catch{return K(this,jt)}if(t.length===0)return un(this);var r=new this.Collection(this,function(){return hn(t[0],t[t.length-1])});r._ondirectionchange=function(r){n=r===`next`?e._ascending:e._descending,t.sort(n)};var i=0;return r._addAlgorithm(function(e,r,a){for(var o=e.key;n(o,t[i])>0;)if(++i,i===t.length)return r(a),!1;return n(o,t[i])===0||(r(function(){e.continue(t[i])}),!1)}),r},e.prototype.notEqual=function(e){return this.inAnyRange([[At,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=A.apply(ue,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return K(this,jt)}var t=e.reduce(function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[At,t]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var n=this,r=this._cmp,i=this._ascending,a=this._descending,o=this._min,s=this._max;if(e.length===0)return un(this);if(!e.every(function(e){return e[0]!==void 0&&e[1]!==void 0&&i(e[0],e[1])<=0}))return K(this,`First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower`,P.InvalidArgument);var c=!t||t.includeLowers!==!1,l=t&&t.includeUppers===!0;function u(e,t){for(var n=0,i=e.length;n<i;++n){var a=e[n];if(r(t[0],a[1])<0&&r(t[1],a[0])>0){a[0]=o(a[0],t[0]),a[1]=s(a[1],t[1]);break}}return n===i&&e.push(t),e}var d=i;function f(e,t){return d(e[0],t[0])}var p;try{p=e.reduce(u,[]),p.sort(f)}catch{return K(this,jt)}var m=0,h=l?function(e){return i(e,p[m][1])>0}:function(e){return i(e,p[m][1])>=0},g=c?function(e){return a(e,p[m][0])>0}:function(e){return a(e,p[m][0])>=0};function _(e){return!h(e)&&!g(e)}var v=h,y=new this.Collection(this,function(){return hn(p[0][0],p[p.length-1][1],!c,!l)});return y._ondirectionchange=function(e){e===`next`?(v=h,d=i):(v=g,d=a),p.sort(f)},y._addAlgorithm(function(e,t,r){for(var a=e.key;v(a);)if(++m,m===p.length)return t(r),!1;return _(a)?!0:(n._cmp(a,p[m][1])===0||n._cmp(a,p[m][0])===0||t(function(){d===i?e.continue(p[m][0]):e.continue(p[m][1])}),!1)}),y},e.prototype.startsWithAnyOf=function(){var e=A.apply(ue,arguments);return e.every(function(e){return typeof e==`string`})?e.length===0?un(this):this.inAnyRange(e.map(function(e){return[e,e+kt]})):K(this,`startsWithAnyOf() only works with strings`)},e}();function _n(e){return Yt(q.prototype,function(t,n,r){if(this.db=e,this._ctx={table:t,index:n===`:id`?null:n,or:r},this._cmp=this._ascending=W,this._descending=function(e,t){return W(t,e)},this._max=function(e,t){return W(e,t)>0?e:t},this._min=function(e,t){return W(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new P.MissingAPI})}function J(e){return B(function(t){return vn(t),e(t.target.error),!1})}function vn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var yn=`storagemutated`,bn=`x-storagemutated-1`,xn=Jt(null,yn),Sn=function(){function e(){}return e.prototype._lock=function(){return b(!R.global),++this._reculock,this._reculock===1&&!R.global&&(R.lockOwnerFor=this),this},e.prototype._unlock=function(){if(b(!R.global),--this._reculock===0)for(R.global||(R.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{wt(e[1],e[0])}catch{}}return this},e.prototype._locked=function(){return this._reculock&&R.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(b(!this.idbtrans),!e&&!n)switch(r&&r.name){case`DatabaseClosedError`:throw new P.DatabaseClosed(r);case`MissingAPIError`:throw new P.MissingAPI(r.message,r);default:throw new P.OpenFailed(r)}if(!this.active)throw new P.TransactionInactive;return b(this._completion._state===null),e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),e.onerror=B(function(n){vn(n),t._reject(e.error)}),e.onabort=B(function(n){vn(n),t.active&&t._reject(new P.Abort(e.error)),t.active=!1,t.on(`abort`).fire(n)}),e.oncomplete=B(function(){t.active=!1,t._resolve(),`mutatedParts`in e&&xn.storagemutated.fire(e.mutatedParts)}),this},e.prototype._promise=function(e,t,n){var r=this;if(e===`readwrite`&&this.mode!==`readwrite`)return H(new P.ReadOnly(`Transaction is readonly`));if(!this.active)return H(new P.TransactionInactive);if(this._locked())return new z(function(i,a){r._blockedFuncs.push([function(){r._promise(e,t,n).then(i,a)},R])});if(n)return gt(function(){var e=new z(function(e,n){r._lock();var i=t(e,n,r);i&&i.then&&i.then(e,n)});return e.finally(function(){return r._unlock()}),e._lib=!0,e});var i=new z(function(e,n){var i=t(e,n,r);i&&i.then&&i.then(e,n)});return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),n=z.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(function(){return n});else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);(function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)})()}var i=t._waitingFor;return new z(function(e,r){n.then(function(n){return t._waitingQueue.push(B(e.bind(null,n)))},function(e){return t._waitingQueue.push(B(r.bind(null,e)))}).finally(function(){t._waitingFor===i&&(t._waitingFor=null)})})},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new P.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||={};if(u(t,e))return t[e];var n=this.schema[e];if(!n)throw new P.NotFound(`Table `+e+` not part of transaction`);var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r},e}();function Cn(e){return Yt(Sn.prototype,function(t,n,r,i,a){var o=this;t!==`readonly`&&n.forEach(function(e){var t=r[e]?.yProps;t&&(n=n.concat(t.map(function(e){return e.updatesTable})))}),this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Jt(this,`complete`,`error`,`abort`),this.parent=a||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 z(function(e,t){o._resolve=e,o._reject=t}),this._completion.then(function(){o.active=!1,o.on.complete.fire()},function(e){var t=o.active;return o.active=!1,o.on.error.fire(e),o.parent?o.parent._reject(e):t&&o.idbtrans&&o.idbtrans.abort(),H(e)})})}function wn(e,t,n,r,i,a,o,s){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:a,src:(n&&!o?`&`:``)+(r?`*`:``)+(i?`++`:``)+Tn(t),type:s}}function Tn(e){return typeof e==`string`?e:e?`[`+[].join.call(e,`+`)+`]`:``}function En(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:S(n,function(e){return[e.name,e]})}}function Dn(e){return e.length===1?e[0]:e}var On=function(e){try{return e.only([[]]),On=function(){return[[]]},[[]]}catch{return On=function(){return kt},kt}};function kn(e){return e==null?function(){}:typeof e==`string`?An(e):function(t){return C(t,e)}}function An(e){return e.split(`.`).length===1?function(t){return t[e]}:function(t){return C(t,e)}}function jn(e){return[].slice.call(e)}var Mn=0;function Nn(e){return e==null?`:id`:typeof e==`string`?e:`[${e.join(`+`)}]`}function Pn(e,t,n){function r(e,t){var n=jn(e.objectStoreNames),r=n.length>0?t.objectStore(n[0]):{};return{schema:{name:e.name,tables:n.map(function(e){return t.objectStore(e)}).map(function(e){var t=e.keyPath,n=e.autoIncrement,r=o(t),i=t==null,a={},s={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:kn(t)},indexes:jn(e.indexNames).map(function(t){return e.index(t)}).map(function(e){var t=e.name,n=e.unique,r=e.multiEntry,i=e.keyPath,s={name:t,compound:o(i),keyPath:i,unique:n,multiEntry:r,extractKey:kn(i)};return a[Nn(i)]=s,s}),getIndexByKeyPath:function(e){return a[Nn(e)]}};return a[`:id`]=s.primaryKey,t!=null&&(a[Nn(t)]=s.primaryKey),s})},hasGetAll:n.length>0&&`getAll`in r&&!(typeof navigator<`u`&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604),hasIdb3Features:`getAllRecords`in r}}function i(e){if(e.type===3)return null;if(e.type===4)throw Error(`Cannot convert never type to IDBKeyRange`);var n=e.lower,r=e.upper,i=e.lowerOpen,a=e.upperOpen;return n===void 0?r===void 0?null:t.upperBound(r,!!a):r===void 0?t.lowerBound(n,!!i):t.bound(n,r,!!i,!!a)}function a(e){var t=e.name;function n(e){var n=e.trans,r=e.type,a=e.keys,o=e.values,s=e.range;return new Promise(function(e,c){e=B(e);var l=n.objectStore(t),u=l.keyPath==null,d=r===`put`||r===`add`;if(!d&&r!==`delete`&&r!==`deleteRange`)throw Error(`Invalid operation type: `+r);var f=(a||o||{length:1}).length;if(a&&o&&a.length!==o.length)throw Error(`Given keys array must have same length as given values array.`);if(f===0)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p,m=[],h=[],g=0,_=function(e){++g,vn(e)};if(r===`deleteRange`){if(s.type===4)return e({numFailures:g,failures:h,results:[],lastResult:void 0});s.type===3?m.push(p=l.clear()):m.push(p=l.delete(i(s)))}else{var v=d?u?[o,a]:[o,null]:[a,null],y=v[0],b=v[1];if(d)for(var x=0;x<f;++x)m.push(p=b&&b[x]!==void 0?l[r](y[x],b[x]):l[r](y[x])),p.onerror=_;else for(var x=0;x<f;++x)m.push(p=l[r](y[x])),p.onerror=_}var S=function(t){var n=t.target.result;m.forEach(function(e,t){return e.error!=null&&(h[t]=e.error)}),e({numFailures:g,failures:h,results:r===`delete`?a:m.map(function(e){return e.result}),lastResult:n})};p.onerror=function(e){_(e),S(e)},p.onsuccess=S})}function r(e){var n=e.trans,r=e.values,a=e.query,o=e.reverse,s=e.unique;return new Promise(function(e,c){e=B(e);var l=a.index,u=a.range,d=n.objectStore(t),f=l.isPrimaryKey?d:d.index(l.name),p=o?s?`prevunique`:`prev`:s?`nextunique`:`next`,m=r||!(`openKeyCursor`in f)?f.openCursor(i(u),p):f.openKeyCursor(i(u),p);m.onerror=J(c),m.onsuccess=B(function(t){var r=m.result;if(!r)e(null);else{r.___id=++Mn,r.done=!1;var i=r.continue.bind(r),a=r.continuePrimaryKey;a&&=a.bind(r);var o=r.advance.bind(r),s=function(){throw Error(`Cursor not started`)},l=function(){throw Error(`Cursor not stopped`)};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=s,r.fail=B(c),r.next=function(){var e=this,t=1;return this.start(function(){return t--?e.continue():e.stop()}).then(function(){return e})},r.start=function(e){var t=new Promise(function(e,t){e=B(e),m.onerror=J(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=l,e(t)}}),n=function(){if(m.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw Error(`Cursor behind last entry`)},r.stop()};return m.onsuccess=B(function(e){m.onsuccess=n,n()}),r.continue=i,r.continuePrimaryKey=a,r.advance=o,n(),t},e(r)}},c)})}function a(e,n){return function(r){return new Promise(function(a,o){a=B(a);var s=r.trans,c=r.values,l=r.limit,u=r.query,d=r.direction??`next`,f=l===1/0?void 0:l,p=u.index,m=u.range,h=s.objectStore(t),g=p.isPrimaryKey?h:h.index(p.name),_=i(m);if(l===0)return a({result:[]});if(n){var v={query:_,count:f,direction:d},y=c?g.getAll(v):g.getAllKeys(v);y.onsuccess=function(e){return a({result:e.target.result})},y.onerror=J(o)}else if(e&&d===`next`){var y=c?g.getAll(_,f):g.getAllKeys(_,f);y.onsuccess=function(e){return a({result:e.target.result})},y.onerror=J(o)}else{var b=0,x=c||!(`openKeyCursor`in g)?g.openCursor(_,d):g.openKeyCursor(_,d),S=[];x.onsuccess=function(){var e=x.result;if(!e||(S.push(c?e.value:e.primaryKey),++b===l))return a({result:S});e.continue()},x.onerror=J(o)}})}}return{name:t,schema:e,mutate:n,getMany:function(e){var n=e.trans,r=e.keys;return new Promise(function(e,i){e=B(e);for(var a=n.objectStore(t),o=r.length,s=Array(o),c=0,l=0,u,d=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},f=J(i),p=0;p<o;++p)r[p]!=null&&(u=a.get(r[p]),u._pos=p,u.onsuccess=d,u.onerror=f,++c);c===0&&e(s)})},get:function(e){var n=e.trans,r=e.key;return new Promise(function(e,i){e=B(e);var a=n.objectStore(t).get(r);a.onsuccess=function(t){return e(t.target.result)},a.onerror=J(i)})},query:a(l,u),openCursor:r,count:function(e){var n=e.query,r=e.trans,a=n.index,o=n.range;return new Promise(function(e,n){var s=r.objectStore(t),c=a.isPrimaryKey?s:s.index(a.name),l=i(o),u=l?c.count(l):c.count();u.onsuccess=B(function(t){return e(t.target.result)}),u.onerror=J(n)})}}}var s=r(e,n),c=s.schema,l=s.hasGetAll,u=s.hasIdb3Features,d=c.tables.map(function(e){return a(e)}),f={};return d.forEach(function(e){return f[e.name]=e}),{stack:`dbcore`,transaction:e.transaction.bind(e),table:function(e){if(!f[e])throw Error(`Table '${e}' not found`);return f[e]},MIN_KEY:-1/0,MAX_KEY:On(t),schema:c}}function Fn(e,t){return t.reduce(function(e,t){var r=t.create;return n(n({},e),r(e))},e)}function In(e,t,n,r){var i=n.IDBKeyRange;return n.indexedDB,{dbcore:Fn(Pn(t,i,r),e.dbcore)}}function Ln(e,t){var n=t.db;e.core=In(e._middlewares,n,e._deps,t).dbcore,e.tables.forEach(function(t){var n=t.name;e.core.schema.tables.some(function(e){return e.name===n})&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function Rn(e,t,n,r){n.forEach(function(n){var i=r[n];t.forEach(function(t){var r=g(t,n);(!r||`value`in r&&r.value===void 0)&&(t===e.Transaction.prototype||t instanceof e.Transaction?p(t,n,{get:function(){return this.table(n)},set:function(e){f(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,i))})})}function zn(e,t){t.forEach(function(t){for(var n in t)t[n]instanceof e.Table&&delete t[n]})}function Bn(e,t){return e._cfg.version-t._cfg.version}function Y(e,t,n,r){var i=e._dbSchema;n.objectStoreNames.contains(`$meta`)&&!i.$meta&&(i.$meta=En(`$meta`,$n(``)[0],[]),e._storeNames.push(`$meta`));var o=e._createTransaction(`readwrite`,e._storeNames,i);o.create(n),o._completion.catch(r);var s=o._reject.bind(o),c=R.transless||R;gt(function(){if(R.trans=o,R.transless=c,t===0)a(i).forEach(function(e){Gn(n,e,i[e].primKey,i[e].indexes)}),Ln(e,n),z.follow(function(){return e.on.populate.fire(o)}).catch(s);else return Ln(e,n),Hn(e,o,t).then(function(t){return Un(e,t,o,n)}).catch(s)})}function Vn(e,t){Kn(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=Yn(e,e.idbdb,t);Qn(e,e._dbSchema,t);for(var r=Wn(n,e._dbSchema),i=function(e){if(e.change.length||e.recreate)return console.warn(`Unable to patch indexes of table ${e.name} because it has changes on the type of index or primary key.`),{value:void 0};var n=t.objectStore(e.name);e.add.forEach(function(t){Ae&&console.debug(`Dexie upgrade patch: Creating missing index ${e.name}.${t.src}`),Jn(n,t)})},a=0,o=r.change;a<o.length;a++){var s=o[a],c=i(s);if(typeof c==`object`)return c.value}}function Hn(e,t,n){return t.storeNames.includes(`$meta`)?t.table(`$meta`).get(`version`).then(function(e){return e??n}):z.resolve(n)}function Un(e,t,n,r){var i=[],o=e._versions,s=e._dbSchema=Yn(e,e.idbdb,r),c=o.filter(function(e){return e._cfg.version>=t});if(c.length===0)return z.resolve();c.forEach(function(o){i.push(function(){var i=s,c=o._cfg.dbschema;Qn(e,i,r),Qn(e,c,r),s=e._dbSchema=c;var l=Wn(i,c);l.add.forEach(function(e){Gn(r,e[0],e[1].primKey,e[1].indexes)}),l.change.forEach(function(e){if(e.recreate)throw new P.Upgrade(`Not yet support for changing primary key`);var t=r.objectStore(e.name);e.add.forEach(function(e){return Jn(t,e)}),e.change.forEach(function(e){t.deleteIndex(e.name),Jn(t,e)}),e.del.forEach(function(e){return t.deleteIndex(e)})});var u=o._cfg.contentUpgrade;if(u&&o._cfg.version>t){Ln(e,r),n._memoizedTables={};var d=E(c);l.del.forEach(function(e){d[e]=i[e]}),zn(e,[e.Transaction.prototype]),Rn(e,[e.Transaction.prototype],a(d),d),n.schema=d;var f=de(u);f&&_t();var p,m=z.follow(function(){if(p=u(n),p&&f){var e=vt.bind(null,null);p.then(e,e)}});return p&&typeof p.then==`function`?z.resolve(p):m.then(function(){return p})}}),i.push(function(t){var r=o._cfg.dbschema;qn(r,t),zn(e,[e.Transaction.prototype]),Rn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}),i.push(function(t){e.idbdb.objectStoreNames.contains(`$meta`)&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore(`$meta`),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter(function(e){return e!==`$meta`})):t.objectStore(`$meta`).put(o._cfg.version,`version`))})});function l(){return i.length?z.resolve(i.shift()(n.idbtrans)).then(l):z.resolve()}return l().then(function(){Kn(s,r)})}function Wn(e,t){var n={del:[],add:[],change:[]},r;for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],a=t[r];if(!i)n.add.push([r,a]);else{var o={name:r,def:a,recreate:!1,del:[],add:[],change:[]};if(``+(i.primKey.keyPath||``)!=``+(a.primKey.keyPath||``)||i.primKey.auto!==a.primKey.auto)o.recreate=!0,n.change.push(o);else{var s=i.idxByName,c=a.idxByName,l=void 0;for(l in s)c[l]||o.del.push(l);for(l in c){var u=s[l],d=c[l];u?u.src!==d.src&&o.change.push(d):o.add.push(d)}(o.del.length>0||o.add.length>0||o.change.length>0)&&n.change.push(o)}}}return n}function Gn(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(e){return Jn(i,e)}),i}function Kn(e,t){a(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(Ae&&console.debug(`Dexie: Creating missing table`,n),Gn(t,n,e[n].primKey,e[n].indexes))})}function qn(e,t){[].slice.call(t.db.objectStoreNames).forEach(function(n){return e[n]==null&&t.db.deleteObjectStore(n)})}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Yn(e,t,n){var r={};return v(t.objectStoreNames,0).forEach(function(e){for(var t=n.objectStore(e),i=t.keyPath,a=wn(Tn(i),i||``,!0,!1,!!t.autoIncrement,i&&typeof i!=`string`,!0),o=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var l=wn(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&typeof i!=`string`,!1);o.push(l)}r[e]=En(e,a,o)}),r}function Xn(e,t,n){e.verno=t.version/10;var r=e._dbSchema=Yn(e,t,n);e._storeNames=v(t.objectStoreNames,0),Rn(e,[e._allTables],a(r),r)}function Zn(e,t){var n=Wn(Yn(e,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some(function(e){return e.add.length||e.change.length}))}function Qn(e,t,n){for(var r=n.db.objectStoreNames,a=0;a<r.length;++a){var o=r[a],s=n.objectStore(o);e._hasGetAll=`getAll`in s;for(var c=0;c<s.indexNames.length;++c){var l=s.indexNames[c],u=s.index(l).keyPath,d=typeof u==`string`?u:`[`+v(u).join(`+`)+`]`;if(t[o]){var f=t[o].idxByName[d];f&&(f.name=l,delete t[o].idxByName[d],t[o].idxByName[l]=f)}}}typeof navigator<`u`&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&i.WorkerGlobalScope&&i instanceof i.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function $n(e){return e.split(`,`).map(function(e,t){var n=e.split(`:`),r=n[1]?.trim();e=n[0].trim();var i=e.replace(/([&*]|\+\+)/g,``),a=/^\[/.test(i)?i.match(/^\[(.*)\]$/)[1].split(`+`):i;return wn(i,a||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),o(a),t===0,r)})}var er=function(){function e(){}return e.prototype._createTableSchema=function(e,t,n){return En(e,t,n)},e.prototype._parseIndexSyntax=function(e){return $n(e)},e.prototype._parseStoresSpec=function(e,t){var n=this;a(e).forEach(function(r){if(e[r]!==null){var i=n._parseIndexSyntax(e[r]),a=i.shift();if(!a)throw new P.Schema(`Invalid schema for table `+r+`: `+e[r]);if(a.unique=!0,a.multi)throw new P.Schema(`Primary key cannot be multiEntry*`);i.forEach(function(e){if(e.auto)throw new P.Schema(`Only primary key can be marked as autoIncrement (++)`);if(!e.keyPath)throw new P.Schema(`Index must have a name and cannot be an empty string`)}),t[r]=n._createTableSchema(r,a,i)}})},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?s(this._cfg.storesSource,e):e;var n=t._versions,r={},i={};return n.forEach(function(e){s(r,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(r,i)}),t._dbSchema=i,zn(t,[t._allTables,t,t.Transaction.prototype]),Rn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],a(i),i),t._storeNames=a(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=ke(this._cfg.contentUpgrade||F,e),this},e}();function tr(e){return Yt(er.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}var nr=rr();function rr(){if(typeof FinalizationRegistry<`u`&&typeof WeakRef<`u`){var e=new Set,t=new FinalizationRegistry(function(t){e.delete(t)}),n=function(){return Array.from(e).map(function(e){return e.deref()}).filter(function(e){return e!==void 0})},r=function(n){var r=new WeakRef(n._novip);if(e.add(r),t.register(n._novip,r,r),e.size>n._options.maxConnections){var i=e.values().next().value;e.delete(i),t.unregister(i)}},i=function(n){if(n)for(var r=e.values(),i=r.next();!i.done;){var a=i.value;if(a.deref()===n._novip){e.delete(a),t.unregister(a);return}i=r.next()}};return{toArray:n,add:r,remove:i}}var a=[],n=function(){return a},r=function(e){a.push(e._novip)},i=function(e){if(e){var t=a.indexOf(e._novip);t!==-1&&a.splice(t,1)}};return{toArray:n,add:r,remove:i}}function ir(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ri(Pt,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:`name`})),n.table(`dbnames`)}function ar(e){return e&&typeof e.databases==`function`}function or(e){var t=e.indexedDB,n=e.IDBKeyRange;return ar(t)?Promise.resolve(t.databases()).then(function(e){return e.map(function(e){return e.name}).filter(function(e){return e!==Pt})}):ir(t,n).toCollection().primaryKeys()}function sr(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!ar(n)&&t!==Pt&&ir(n,r).put({name:t}).catch(F)}function cr(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!ar(n)&&t!==Pt&&ir(n,r).delete(t).catch(F)}function lr(e){return gt(function(){return R.letThrough=!0,e()})}function ur(){if(navigator.userAgentData||!/Safari\//.test(navigator.userAgent)||/Chrom(e|ium)\//.test(navigator.userAgent)||!indexedDB.databases)return Promise.resolve();var e;return new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)})}var dr;function fr(e){return!(`from`in e)}var X=function(e,t){if(this)s(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0});else{var n=new X;return e&&`d`in e&&s(n,e),n}};d(X.prototype,(dr={add:function(e){return mr(this,e),this},addKey:function(e){return pr(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(e){return pr(t,e,e)}),this},hasKey:function(e){var t=gr(this).next(e).value;return t&&W(t.from,e)<=0&&W(t.to,e)>=0}},dr[se]=function(){return gr(this)},dr));function pr(e,t,n){var r=W(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(fr(e))return s(e,{from:t,to:n,d:1});var i=e.l,a=e.r;if(W(n,e.from)<0)return i?pr(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},_r(e);if(W(t,e.to)>0)return a?pr(a,t,n):e.r={from:t,to:n,d:1,l:null,r:null},_r(e);W(t,e.from)<0&&(e.from=t,e.l=null,e.d=a?a.d+1:1),W(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var o=!e.r;i&&!e.l&&mr(e,i),a&&o&&mr(e,a)}}function mr(e,t){function n(e,t){var r=t.from,i=t.to,a=t.l,o=t.r;pr(e,r,i),a&&n(e,a),o&&n(e,o)}fr(t)||n(e,t)}function hr(e,t){var n=gr(t),r=n.next();if(r.done)return!1;for(var i=r.value,a=gr(e),o=a.next(i.from),s=o.value;!r.done&&!o.done;){if(W(s.from,i.to)<=0&&W(s.to,i.from)>=0)return!0;W(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(o=a.next(i.from)).value}return!1}function gr(e){var t=fr(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&W(e,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,!n||W(e,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 _r(e){var t=(e.r?.d||0)-(e.l?.d||0),r=t>1?`r`:t<-1?`l`:``;if(r){var i=r===`r`?`l`:`r`,a=n({},e),o=e[r];e.from=o.from,e.to=o.to,e[r]=o[r],a[r]=o[i],e[i]=a,a.d=vr(a)}e.d=vr(e)}function vr(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}function yr(e,t){return a(t).forEach(function(n){e[n]?mr(e[n],t[n]):e[n]=ie(t[n])}),e}function br(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&hr(t[n],e[n])})}var xr={},Sr={},Cr=!1;function wr(e,t){yr(Sr,e),Cr||(Cr=!0,setTimeout(function(){Cr=!1;var e=Sr;Sr={},Tr(e,!1)},0))}function Tr(e,t){t===void 0&&(t=!1);var n=new Set;if(e.all)for(var r=0,i=Object.values(xr);r<i.length;r++){var a=i[r];Er(a,e,n,t)}else for(var o in e){var s=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(s){var a=xr[`idb://${s[1]}/${s[2]}`];a&&Er(a,e,n,t)}}n.forEach(function(e){return e()})}function Er(e,t,n,r){for(var i=[],a=0,o=Object.entries(e.queries.query);a<o.length;a++){for(var s=o[a],c=s[0],l=s[1],u=[],d=0,f=l;d<f.length;d++){var p=f[d];br(t,p.obsSet)?p.subscribers.forEach(function(e){return n.add(e)}):r&&u.push(p)}r&&i.push([c,u])}if(r)for(var m=0,h=i;m<h.length;m++){var g=h[m],c=g[0],u=g[1];e.queries.query[c]=u}}function Z(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?H(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller,a=Math.round(e.verno*10),o=!1;function s(){if(t.openCanceller!==r)throw new P.DatabaseClosed(`db.open() was cancelled`)}var c=t.dbReadyResolve,l=null,u=!1,d=function(){return new z(function(r,i){if(s(),!n)throw new P.MissingAPI;var c=e.name,f=t.autoSchema||!a?n.open(c):n.open(c,a);if(!f)throw new P.MissingAPI;f.onerror=J(i),f.onblocked=B(e._fireOnBlocked),f.onupgradeneeded=B(function(r){if(l=f.transaction,t.autoSchema&&!e._options.allowEmptyDB){f.onerror=vn,l.abort(),f.result.close();var a=n.deleteDatabase(c);a.onsuccess=a.onerror=B(function(){i(new P.NoSuchDatabase(`Database ${c} doesnt exist`))})}else{l.onerror=J(i);var s=r.oldVersion>2**62?0:r.oldVersion;u=s<1,e.idbdb=f.result,o&&Vn(e,l),Y(e,s/10,l,i)}},i),f.onsuccess=B(function(){l=null;var n=e.idbdb=f.result,i=v(n.objectStoreNames);if(i.length>0)try{var s=n.transaction(Dn(i),`readonly`);if(t.autoSchema)Xn(e,n,s);else if(Qn(e,e._dbSchema,s),!Zn(e,s)&&!o)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.`),n.close(),a=n.version+1,o=!0,r(d());Ln(e,s)}catch{}nr.add(e),n.onversionchange=B(function(n){t.vcFired=!0,e.on(`versionchange`).fire(n)}),n.onclose=B(function(){e.close({disableAutoOpen:!1})}),u&&sr(e._deps,c),r()},i)}).catch(function(e){switch(e?.name){case`UnknownError`:if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn(`Dexie: Workaround for Chrome UnknownError on open()`),d();break;case`VersionError`:if(a>0)return a=0,d()}return z.reject(e)})},f=typeof navigator<`u`&&!!n&&n===i.indexedDB;return z.race([r,(f?ur():z.resolve()).then(d)]).then(function(){return s(),t.onReadyBeingFired=[],z.resolve(lr(function(){return e.on.ready.fire(e.vip)})).then(function n(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(ke,F);return t.onReadyBeingFired=[],z.resolve(lr(function(){return r(e.vip)})).then(n)}})}).finally(function(){t.openCanceller===r&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(n){t.dbOpenError=n;try{l&&l.abort()}catch{}return r===t.openCanceller&&e._close(),H(n)}).finally(function(){t.openComplete=!0,c()}).then(function(){if(u){var t={};e.tables.forEach(function(n){n.schema.indexes.forEach(function(r){r.name&&(t[`idb://${e.name}/${n.name}/${r.name}`]=new X(-1/0,[[[]]]))}),t[`idb://${e.name}/${n.name}/`]=t[`idb://${e.name}/${n.name}/:dels`]=new X(-1/0,[[[]]])}),xn(yn).fire(t),Tr(t,!0)}return e})}function Dr(e){var t=function(t){return e.next(t)},n=function(t){return e.throw(t)},r=a(t),i=a(n);function a(e){return function(t){var n=e(t),a=n.value;return n.done?a:!a||typeof a.then!=`function`?o(a)?Promise.all(a).then(r,i):r(a):a.then(r,i)}}return a(t)()}function Or(e,t,n){var r=arguments.length;if(r<2)throw new P.InvalidArgument(`Too few arguments`);for(var i=Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,te(i),n]}function kr(e,t,n,r,i){return z.resolve().then(function(){var a=R.transless||R,o=e._createTransaction(t,n,e._dbSchema,r);o.explicit=!0;var s={trans:o,transless:a};if(r)o.idbtrans=r.idbtrans;else try{o.create(),o.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(r){return r.name===_e.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn(`Dexie: Need to reopen db`),e.close({disableAutoOpen:!1}),e.open().then(function(){return kr(e,t,n,null,i)})):H(r)}var c=de(i);c&&_t();var l,u=z.follow(function(){if(l=i.call(o,o),l){if(c){var e=vt.bind(null,null);l.then(e,e)}else typeof l.next==`function`&&typeof l.throw==`function`&&(l=Dr(l))}},s);return(l&&typeof l.then==`function`?z.resolve(l).then(function(e){return o.active?e:H(new P.PrematureCommit(`Transaction committed too early. See http://bit.ly/2kdckMn`))}):u.then(function(){return l})).then(function(e){return r&&o._resolve(),o._completion.then(function(){return e})}).catch(function(e){return o._reject(e),H(e)})})}function Ar(e,t,n){for(var r=o(e)?e.slice():[e],i=0;i<n;++i)r.push(t);return r}function jr(e){return n(n({},e),{table:function(t){var r=e.table(t),i=r.schema,a=Object.create(null),o=[];function s(e,t,r){var i=Nn(e),c=a[i]=a[i]||[],l=e==null?0:typeof e==`string`?1:e.length,u=t>0,d=n(n({},r),{name:u?`${i}(virtual-from:${r.name})`:r.name,lowLevelIndex:r,isVirtual:u,keyTail:t,keyLength:l,extractKey:kn(e),unique:!u&&r.unique});return c.push(d),d.isPrimaryKey||o.push(d),l>1&&s(l===2?e[0]:e.slice(0,l-1),t+1,r),c.sort(function(e,t){return e.keyTail-t.keyTail}),d}var c=s(i.primaryKey.keyPath,0,i.primaryKey);a[`:id`]=[c];for(var l=0,u=i.indexes;l<u.length;l++){var d=u[l];s(d.keyPath,0,d)}function f(e){var t=a[Nn(e)];return t&&t[0]}function p(t,n){return{type:t.type===1?2:t.type,lower:Ar(t.lower,t.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:Ar(t.upper,t.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0}}function m(e){var t=e.query.index;return t.isVirtual?n(n({},e),{query:{index:t.lowLevelIndex,range:p(e.query.range,t.keyTail)}}):e}return n(n({},r),{schema:n(n({},i),{primaryKey:c,indexes:o,getIndexByKeyPath:f}),count:function(e){return r.count(m(e))},query:function(e){return r.query(m(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,a=n.isVirtual,o=n.keyLength;if(!a)return r.openCursor(t);function s(n){function r(r){r==null?t.unique?n.continue(n.key.slice(0,o).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue():n.continue(Ar(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i))}return Object.create(n,{continue:{value:r},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(Ar(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return o===1?e[0]:e.slice(0,o)}},value:{get:function(){return n.value}}})}return r.openCursor(m(t)).then(function(e){return e&&s(e)})}})}})}var Mr={stack:`dbcore`,name:`VirtualIndexMiddleware`,level:1,create:jr};function Nr(e,t,n,r){return n||={},r||=``,a(e).forEach(function(i){if(!u(t,i))n[r+i]=void 0;else{var a=e[i],o=t[i];if(typeof a==`object`&&typeof o==`object`&&a&&o){var s=k(a);s===k(o)?s===`Object`?Nr(a,o,n,r+i+`.`):a!==o&&(n[r+i]=t[i]):n[r+i]=t[i]}else a!==o&&(n[r+i]=t[i])}}),a(t).forEach(function(i){u(e,i)||(n[r+i]=t[i])}),n}function Pr(e,t){return t.type===`delete`?t.keys:t.keys||t.values.map(e.extractKey)}var Fr={stack:`dbcore`,name:`HooksMiddleware`,level:2,create:function(e){return n(n({},e),{table:function(t){var i=e.table(t),a=i.schema.primaryKey;return n(n({},i),{mutate:function(e){var o=R.trans,s=o.table(t).hook,c=s.deleting,l=s.creating,d=s.updating;switch(e.type){case`add`:if(l.fire===F)break;return o._promise(`readwrite`,function(){return f(e)},!0);case`put`:if(l.fire===F&&d.fire===F)break;return o._promise(`readwrite`,function(){return f(e)},!0);case`delete`:if(c.fire===F)break;return o._promise(`readwrite`,function(){return f(e)},!0);case`deleteRange`:if(c.fire===F)break;return o._promise(`readwrite`,function(){return p(e)},!0)}return i.mutate(e);function f(e){var t=R.trans,o=e.keys||Pr(a,e);if(!o)throw Error(`Keys missing`);return e=e.type===`add`||e.type===`put`?n(n({},e),{keys:o}):n({},e),e.type!==`delete`&&(e.values=r([],e.values,!0)),e.keys&&(e.keys=r([],e.keys,!0)),Ir(i,e,o).then(function(n){var r=o.map(function(r,i){var o=n[i],s={onerror:null,onsuccess:null};if(e.type===`delete`)c.fire.call(s,r,o,t);else if(e.type===`add`||o===void 0){var f=l.fire.call(s,r,e.values[i],t);r==null&&f!=null&&(r=f,e.keys[i]=r,a.outbound||w(e.values[i],a.keyPath,r))}else{var p=Nr(o,e.values[i]),m=d.fire.call(s,p,r,o,t);if(m){var h=e.values[i];Object.keys(m).forEach(function(e){u(h,e)?h[e]=m[e]:w(h,e,m[e])})}}return s});return i.mutate(e).then(function(t){for(var i=t.failures,a=t.results,s=t.numFailures,c=t.lastResult,l=0;l<o.length;++l){var u=a?a[l]:o[l],d=r[l];u==null?d.onerror&&d.onerror(i[l]):d.onsuccess&&d.onsuccess(e.type===`put`&&n[l]?e.values[l]:u)}return{failures:i,results:a,numFailures:s,lastResult:c}}).catch(function(e){return r.forEach(function(t){return t.onerror&&t.onerror(e)}),Promise.reject(e)})})}function p(e){return m(e.trans,e.range,1e4)}function m(e,t,r){return i.query({trans:e,values:!1,query:{index:a,range:t},limit:r}).then(function(i){var a=i.result;return f({type:`delete`,keys:a,trans:e}).then(function(i){return i.numFailures>0?Promise.reject(i.failures[0]):a.length<r?{failures:[],numFailures:0,lastResult:void 0}:m(e,n(n({},t),{lower:a[a.length-1],lowerOpen:!0}),r)})})}}})}})}};function Ir(e,t,n){return t.type===`add`?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:`immutable`})}function Lr(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var r=[],i=0,a=0;i<t.keys.length&&a<e.length;++i)W(t.keys[i],e[a])===0&&(r.push(n?D(t.values[i]):t.values[i]),++a);return r.length===e.length?r:null}catch{return null}}var Rr={stack:`dbcore`,level:-1,create:function(e){return{table:function(t){var r=e.table(t);return n(n({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=Lr(e.keys,e.trans._cache,e.cache===`clone`);return t?z.resolve(t):r.getMany(e).then(function(t){return e.trans._cache={keys:e.keys,values:e.cache===`clone`?D(t):t},t})},mutate:function(e){return e.type!==`add`&&(e.trans._cache=null),r.mutate(e)}})}}}};function zr(e,t){return e.trans.mode===`readonly`&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!==`disabled`&&!t.schema.primaryKey.outbound}function Br(e,t){switch(e){case`query`:return t.values&&!t.unique;case`get`:return!1;case`getMany`:return!1;case`count`:return!1;case`openCursor`:return!1}}var Vr={stack:`dbcore`,level:0,name:`Observability`,create:function(e){var t=e.schema.name,r=new X(e.MIN_KEY,e.MAX_KEY);return n(n({},e),{transaction:function(t,n,r){if(R.subscr&&n!==`readonly`)throw new P.ReadOnly(`Readwrite transaction in liveQuery context. Querier source: ${R.querier}`);return e.transaction(t,n,r)},table:function(i){var s=e.table(i),c=s.schema,l=c.primaryKey,u=c.indexes,d=l.extractKey,f=l.outbound,p=l.autoIncrement&&u.filter(function(e){return e.compound&&e.keyPath.includes(l.keyPath)}),m=n(n({},s),{mutate:function(n){var a=n.trans,u=n.mutatedParts||={},d=function(e){var n=`idb://${t}/${i}/${e}`;return u[n]||(u[n]=new X)},f=d(``),m=d(`:dels`),h=n.type,g=n.type===`deleteRange`?[n.range]:n.type===`delete`?[n.keys]:n.values.length<50?[Pr(l,n).filter(function(e){return e!=null}),n.values]:[],_=g[0],v=g[1],y=n.trans._cache;if(o(_)){f.addKeys(_);var b=h===`delete`||_.length===v.length?Lr(_,y):null;b||m.addKeys(_),(b||v)&&Hr(d,c,b,v)}else if(_){var x={from:_.lower??e.MIN_KEY,to:_.upper??e.MAX_KEY};m.add(x),f.add(x)}else f.add(r),m.add(r),c.indexes.forEach(function(e){return d(e.name).add(r)});return s.mutate(n).then(function(e){return _&&(n.type===`add`||n.type===`put`)&&(f.addKeys(e.results),p&&p.forEach(function(t){for(var r=n.values.map(function(e){return t.extractKey(e)}),i=t.keyPath.findIndex(function(e){return e===l.keyPath}),a=0,o=e.results.length;a<o;++a)r[a][i]=e.results[a];d(t.name).addKeys(r)})),a.mutatedParts=yr(a.mutatedParts||{},u),e})}}),h=function(t){var n=t.query,r=n.index,i=n.range;return[r,new X(i.lower??e.MIN_KEY,i.upper??e.MAX_KEY)]},g={get:function(e){return[l,new X(e.key)]},getMany:function(e){return[l,new X().addKeys(e.keys)]},count:h,query:h,openCursor:h};return a(g).forEach(function(e){m[e]=function(a){var o=R.subscr,c=!!o,l=zr(R,s)&&Br(e,a)?a.obsSet={}:o;if(c){var u=function(e){var n=`idb://${t}/${i}/${e}`;return l[n]||(l[n]=new X)},p=u(``),m=u(`:dels`),h=g[e](a),_=h[0],v=h[1];if(e===`query`&&_.isPrimaryKey&&!a.values?m.add(v):u(_.name||``).add(v),!_.isPrimaryKey){if(e===`count`)m.add(r);else{var y=e===`query`&&f&&a.values&&s.query(n(n({},a),{values:!1}));return s[e].apply(this,arguments).then(function(t){if(e===`query`){if(f&&a.values)return y.then(function(e){var n=e.result;return p.addKeys(n),t});var n=a.values?t.result.map(d):t.result;a.values?p.addKeys(n):m.addKeys(n)}else if(e===`openCursor`){var r=t,i=a.values;return r&&Object.create(r,{key:{get:function(){return m.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return m.addKey(e),e}},value:{get:function(){return i&&p.addKey(r.primaryKey),r.value}}})}return t})}}}return s[e].apply(this,arguments)}}),m}})}};function Hr(e,t,n,r){function i(t){var i=e(t.name||``);function a(e){return e==null?null:t.extractKey(e)}var s=function(e){return t.multiEntry&&o(e)?e.forEach(function(e){return i.addKey(e)}):i.addKey(e)};(n||r).forEach(function(e,t){var i=n&&a(n[t]),o=r&&a(r[t]);W(i,o)!==0&&(i!=null&&s(i),o!=null&&s(o))})}t.indexes.forEach(i)}function Ur(e,t,r){if(r.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;if(r.numFailures===i)return null;var a=n({},t);return o(a.keys)&&(a.keys=a.keys.filter(function(e,t){return!(t in r.failures)})),`values`in a&&o(a.values)&&(a.values=a.values.filter(function(e,t){return!(t in r.failures)})),a}function Wr(e,t){return t.lower===void 0?!0:t.lowerOpen?W(e,t.lower)>0:W(e,t.lower)>=0}function Gr(e,t){return t.upper===void 0?!0:t.upperOpen?W(e,t.upper)<0:W(e,t.upper)<=0}function Kr(e,t){return Wr(e,t)&&Gr(e,t)}function qr(e,t,n,r,i,a){if(!n||n.length===0)return e;var s=t.query.index,c=s.multiEntry,l=t.query.range,u=r.schema.primaryKey.extractKey,d=s.extractKey,f=(s.lowLevelIndex||s).extractKey,p=n.reduce(function(e,n){var r=e,i=[];if(n.type===`add`||n.type===`put`)for(var a=new X,s=n.values.length-1;s>=0;--s){var f=n.values[s],p=u(f);if(!a.hasKey(p)){var m=d(f);(c&&o(m)?m.some(function(e){return Kr(e,l)}):Kr(m,l))&&(a.addKey(p),i.push(f))}}switch(n.type){case`add`:var h=new X().addKeys(t.values?e.map(function(e){return u(e)}):e);r=e.concat(t.values?i.filter(function(e){var t=u(e);return!h.hasKey(t)&&(h.addKey(t),!0)}):i.map(function(e){return u(e)}).filter(function(e){return!h.hasKey(e)&&(h.addKey(e),!0)}));break;case`put`:var g=new X().addKeys(n.values.map(function(e){return u(e)}));r=e.filter(function(e){return!g.hasKey(t.values?u(e):e)}).concat(t.values?i:i.map(function(e){return u(e)}));break;case`delete`:var _=new X().addKeys(n.keys);r=e.filter(function(e){return!_.hasKey(t.values?u(e):e)});break;case`deleteRange`:var v=n.range;r=e.filter(function(e){return!Kr(u(e),v)})}return r},e);if(p===e)return e;var m=function(e,t){return W(f(e),f(t))||W(u(e),u(t))};return p.sort(t.direction===`prev`||t.direction===`prevunique`?function(e,t){return m(t,e)}:m),t.limit&&t.limit<1/0&&(p.length>t.limit?p.length=t.limit:e.length===t.limit&&p.length<t.limit&&(i.dirty=!0)),a?Object.freeze(p):p}function Jr(e,t){return W(e.lower,t.lower)===0&&W(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function Yr(e,t,n,r){if(e===void 0)return t===void 0?0:-1;if(t===void 0)return 1;var i=W(e,t);if(i===0){if(n&&r)return 0;if(n)return 1;if(r)return-1}return i}function Xr(e,t,n,r){if(e===void 0)return t===void 0?0:1;if(t===void 0)return-1;var i=W(e,t);if(i===0){if(n&&r)return 0;if(n)return-1;if(r)return 1}return i}function Zr(e,t){return Yr(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&Xr(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function Qr(e,t,n,r){var i=xr[`idb://${e}/${t}`];if(!i)return[];var a=i.queries[n];if(!a)return[null,!1,i,null];var o=a[(r.query?r.query.index.name:null)||``];if(!o)return[null,!1,i,null];switch(n){case`query`:var s=r.direction??`next`,c=o.find(function(e){return e.req.limit===r.limit&&e.req.values===r.values&&(e.req.direction??`next`)===s&&Jr(e.req.query.range,r.query.range)});return c?[c,!0,i,o]:[o.find(function(e){return(`limit`in e.req?e.req.limit:1/0)>=r.limit&&(e.req.direction??`next`)===s&&(!r.values||e.req.values)&&Zr(e.req.query.range,r.query.range)}),!1,i,o];case`count`:var l=o.find(function(e){return Jr(e.req.query.range,r.query.range)});return[l,!!l,i,o]}}function $r(e,t,n,r){e.subscribers.add(n),r.addEventListener(`abort`,function(){e.subscribers.delete(n),e.subscribers.size===0&&ei(e,t)})}function ei(e,t){setTimeout(function(){e.subscribers.size===0&&le(t,e)},3e3)}var ti={stack:`dbcore`,level:0,name:`Cache`,create:function(e){var t=e.schema.name;return n(n({},e),{transaction:function(n,r,i){var a=e.transaction(n,r,i);if(r===`readwrite`){var o=new AbortController,s=o.signal,c=function(i){return function(){if(o.abort(),r===`readwrite`){for(var s=new Set,c=0,l=n;c<l.length;c++){var u=l[c],d=xr[`idb://${t}/${u}`];if(d){var f=e.table(u),p=d.optimisticOps.filter(function(e){return e.trans===a});if(a._explicit&&i&&a.mutatedParts)for(var m=0,h=Object.values(d.queries.query);m<h.length;m++)for(var g=h[m],_=0,v=g.slice();_<v.length;_++){var y=v[_];br(y.obsSet,a.mutatedParts)&&(le(g,y),y.subscribers.forEach(function(e){return s.add(e)}))}else if(p.length>0){d.optimisticOps=d.optimisticOps.filter(function(e){return e.trans!==a});for(var b=0,x=Object.values(d.queries.query);b<x.length;b++)for(var g=x[b],S=0,C=g.slice();S<C.length;S++){var y=C[S];if(y.res!=null&&a.mutatedParts){if(i&&!y.dirty){var w=Object.isFrozen(y.res),T=qr(y.res,y.req,p,f,y,w);y.dirty?(le(g,y),y.subscribers.forEach(function(e){return s.add(e)})):T!==y.res&&(y.res=T,y.promise=z.resolve({result:T}))}else y.dirty&&le(g,y),y.subscribers.forEach(function(e){return s.add(e)})}}}}}s.forEach(function(e){return e()})}}};a.addEventListener(`abort`,c(!1),{signal:s}),a.addEventListener(`error`,c(!1),{signal:s}),a.addEventListener(`complete`,c(!0),{signal:s})}return a},table:function(r){var i=e.table(r),a=i.schema.primaryKey;return n(n({},i),{mutate:function(e){var o=R.trans;if(a.outbound||o.db._options.cache===`disabled`||o.explicit||o.idbtrans.mode!==`readwrite`)return i.mutate(e);var s=xr[`idb://${t}/${r}`];if(!s)return i.mutate(e);var c=i.mutate(e);return(e.type===`add`||e.type===`put`)&&(e.values.length>=50||Pr(a,e).some(function(e){return e==null}))?c.then(function(t){var r=Ur(s,n(n({},e),{values:e.values.map(function(e,r){if(t.failures[r])return e;var i=a.keyPath?.includes(`.`)?D(e):n({},e);return w(i,a.keyPath,t.results[r]),i})}),t);s.optimisticOps.push(r),queueMicrotask(function(){return e.mutatedParts&&wr(e.mutatedParts)})}):(s.optimisticOps.push(e),e.mutatedParts&&wr(e.mutatedParts),c.then(function(t){if(t.numFailures>0){le(s.optimisticOps,e);var n=Ur(s,e,t);n&&s.optimisticOps.push(n),e.mutatedParts&&wr(e.mutatedParts)}}),c.catch(function(){le(s.optimisticOps,e),e.mutatedParts&&wr(e.mutatedParts)})),c},query:function(e){if(!zr(R,i)||!Br(`query`,e))return i.query(e);var n=R.trans?.db._options.cache===`immutable`,a=R,o=a.requery,s=a.signal,c=Qr(t,r,`query`,e),l=c[0],u=c[1],d=c[2],f=c[3];if(l&&u)l.obsSet=e.obsSet;else{var p=i.query(e).then(function(e){var t=e.result;if(l&&(l.res=t),n){for(var r=0,i=t.length;r<i;++r)Object.freeze(t[r]);Object.freeze(t)}return e}).catch(function(e){return f&&l&&le(f,l),Promise.reject(e)});l={obsSet:e.obsSet,promise:p,subscribers:new Set,type:`query`,req:e,dirty:!1},f?f.push(l):(f=[l],d||=xr[`idb://${t}/${r}`]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}},d.queries.query[e.query.index.name||``]=f)}return $r(l,f,o,s),l.promise.then(function(t){var r=qr(t.result,e,d?.optimisticOps,i,l,n);return{result:n?r:D(r)}})}})}})}};function ni(e,t){return new Proxy(e,{get:function(e,n,r){return n===`db`?t:Reflect.get(e,n,r)}})}var ri=function(){function e(t,r){var i=this;this._middlewares={},this.verno=0;var a=e.dependencies;this._options=r=n({addons:e.addons,autoOpen:!0,indexedDB:a.indexedDB,IDBKeyRange:a.IDBKeyRange,cache:`cloned`,maxConnections:Nt},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:F,dbReadyPromise:null,cancelOpen:F,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};s.dbReadyPromise=new z(function(e){s.dbReadyResolve=e}),s.openCanceller=new z(function(e,t){s.cancelOpen=t}),this._state=s,this.name=t,this.on=Jt(this,`populate`,`blocked`,`versionchange`,`close`,{ready:[ke,F]}),this.once=function(e,t){var n=function(){var r=[...arguments];i.on(e).unsubscribe(n),t.apply(i,r)};return i.on(e,n)},this.on.ready.subscribe=y(this.on.ready.subscribe,function(t){return function(n,r){e.vip(function(){var e=i._state;if(e.openComplete)e.dbOpenError||z.resolve().then(n),r&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),r&&t(n);else{t(n);var a=i;r||t(function e(){a.on.ready.unsubscribe(n),a.on.ready.unsubscribe(e)})}})}}),this.Collection=cn(this),this.Table=Xt(this),this.Transaction=Cn(this),this.Version=tr(this),this.WhereClause=_n(this),this.on(`versionchange`,function(e){e.newVersion>0?console.warn(`Another connection wants to upgrade database '${i.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${i.name}'. Closing db now to resume the delete request.`),i.close({disableAutoOpen:!1})}),this.on(`blocked`,function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${i.name}') was blocked`):console.warn(`Upgrade '${i.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=On(r.IDBKeyRange),this._createTransaction=function(e,t,n,r){return new i.Transaction(e,t,n,i._options.chromeTransactionDurability,r)},this._fireOnBlocked=function(e){i.on(`blocked`).fire(e),nr.toArray().filter(function(e){return e.name===i.name&&e!==i&&!e._state.vcFired}).map(function(t){return t.on(`versionchange`).fire(e)})},this.use(Rr),this.use(ti),this.use(Vr),this.use(Mr),this.use(Fr);var c=new Proxy(this,{get:function(e,t,n){if(t===`_vip`)return!0;if(t===`table`)return function(e){return ni(i.table(e),c)};var r=Reflect.get(e,t,n);return r instanceof qt?ni(r,c):t===`tables`?r.map(function(e){return ni(e,c)}):t===`_createTransaction`?function(){return ni(r.apply(this,arguments),c)}:r}});this.vip=c,o.forEach(function(e){return e(i)})}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new P.Type(`Given version is not a positive number`);if(e=Math.round(e*10)/10,this.idbdb||this._state.isBeingOpened)throw new P.Schema(`Cannot add version when database is open`);this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(t){return t._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(Bn),n.stores({}),this._state.autoSchema=!1,n)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||R.letThrough||this._vip)?e():new z(function(e,n){if(t._state.openComplete)return n(new P.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen){n(new P.DatabaseClosed);return}t.open().catch(F)}t._state.dbReadyPromise.then(e,n)}).then(e)},e.prototype.use=function(e){var t=e.stack,n=e.create,r=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var a=this._middlewares[t]||(this._middlewares[t]=[]);return a.push({stack:t,create:n,level:r??10,name:i}),a.sort(function(e,t){return e.level-t.level}),this},e.prototype.unuse=function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(e){return r?e.create!==r:n?e.name!==n:!1})),this},e.prototype.open=function(){var e=this;return wt(Ke,function(){return Z(e)})},e.prototype._close=function(){this.on.close.fire(new CustomEvent(`close`));var e=this._state;if(nr.remove(this),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new z(function(t){e.dbReadyResolve=t}),e.openCanceller=new z(function(t,n){e.cancelOpen=n}))},e.prototype.close=function(e){var t=(e===void 0?{disableAutoOpen:!0}:e).disableAutoOpen,n=this._state;t?(n.isBeingOpened&&n.cancelOpen(new P.DatabaseClosed),this._close(),n.autoOpen=!1,n.dbOpenError=new P.DatabaseClosed):(this._close(),n.autoOpen=this._options.autoOpen||n.isBeingOpened,n.openComplete=!1,n.dbOpenError=null)},e.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=arguments.length>0&&typeof arguments[0]!=`object`,r=this._state;return new z(function(i,a){var o=function(){t.close(e);var n=t._deps.indexedDB.deleteDatabase(t.name);n.onsuccess=B(function(){cr(t._deps,t.name),i()}),n.onerror=J(a),n.onblocked=t._fireOnBlocked};if(n)throw new P.InvalidArgument(`Invalid closeOptions argument to db.delete()`);r.isBeingOpened?r.dbReadyPromise.then(o):o()})},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return this.idbdb!==null},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name===`DatabaseClosedError`},e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return a(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=Or.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,n){var r=this,i=R.trans;i&&i.db===this&&e.indexOf(`!`)===-1||(i=null);var a=e.indexOf(`?`)!==-1;e=e.replace(`!`,``).replace(`?`,``);var o,s;try{if(s=t.map(function(e){var t=e instanceof r.Table?e.name:e;if(typeof t!=`string`)throw TypeError(`Invalid table argument to Dexie.transaction(). Only Table or String are allowed`);return t}),e==`r`||e===Ft)o=Ft;else if(e==`rw`||e==It)o=It;else throw new P.InvalidArgument(`Invalid transaction mode: `+e);if(i){if(i.mode===Ft&&o===It){if(a)i=null;else throw new P.SubTransaction(`Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY`)}i&&s.forEach(function(e){if(i&&i.storeNames.indexOf(e)===-1){if(a)i=null;else throw new P.SubTransaction(`Table `+e+` not included in parent transaction.`)}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,function(t,n){n(e)}):H(e)}var c=kr.bind(null,this,o,s,i,n);return i?i._promise(o,c,`lock`):R.trans?wt(R.transless,function(){return r._whenReady(c)}):this._whenReady(c)},e.prototype.table=function(e){if(!u(this._allTables,e))throw new P.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]},e}(),ii=typeof Symbol<`u`&&`observable`in Symbol?Symbol.observable:`@@observable`,ai=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,n){return this._subscribe(!e||typeof e==`function`?{next:e,error:t,complete:n}:e)},e.prototype[ii]=function(){return this},e}(),oi;try{oi={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch{oi={indexedDB:null,IDBKeyRange:null}}function si(e){var t=!1,n,r=new ai(function(r){var i=de(e);function a(t){var n=it();try{i&&_t();var r=gt(e,t);return i&&(r=r.finally(vt)),r}finally{n&&at()}}var o=!1,s,c={},l={},u={get closed(){return o},unsubscribe:function(){o||(o=!0,s&&s.abort(),d&&xn.storagemutated.unsubscribe(m))}};r.start&&r.start(u);var d=!1,f=function(){return Et(h)};function p(){return br(l,c)}var m=function(e){yr(c,e),p()&&f()},h=function(){if(!o&&oi.indexedDB){c={};var i={};s&&s.abort(),s=new AbortController;var u={subscr:i,signal:s.signal,requery:f,querier:e,trans:null},h=a(u);d||=(xn.storagemutated.subscribe(m),!0),Promise.resolve(h).then(function(e){t=!0,n=e,o||u.signal.aborted||(p()?f():(l=i,p()?f():(c={},Et(function(){return!o&&r.next&&r.next(e)}))))},function(e){o||u.signal.aborted||(t=!1,[`DatabaseClosedError`,`AbortError`].includes(e?.name)||o||Et(function(){o||r.error&&r.error(e)}))})}};return setTimeout(f,0),u});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var ci=ri;d(ci,n(n({},xe),{delete:function(e){return new ci(e,{addons:[]}).delete()},exists:function(e){return new ci(e,{addons:[]}).open().then(function(e){return e.close(),!0}).catch(`NoSuchDatabaseError`,function(){return!1})},getDatabaseNames:function(e){try{return or(ci.dependencies).then(e)}catch{return H(new P.MissingAPI)}},defineClass:function(){function e(e){s(this,e)}return e},ignoreTransaction:function(e){return R.trans?wt(R.transless||Ke,e):e()},vip:lr,async:function(e){return function(){try{var t=Dr(e.apply(this,arguments));return!t||typeof t.then!=`function`?z.resolve(t):t}catch(e){return H(e)}}},spawn:function(e,t,n){try{var r=Dr(e.apply(n,t||[]));return!r||typeof r.then!=`function`?z.resolve(r):r}catch(e){return H(e)}},currentTransaction:{get:function(){return R.trans||null}},waitFor:function(e,t){var n=z.resolve(typeof e==`function`?ci.ignoreTransaction(e):e).timeout(t||6e4);return R.trans?R.trans.waitFor(n):n},Promise:z,debug:{get:function(){return Ae},set:function(e){je(e)}},derive:m,extend:s,props:d,override:y,Events:Jt,on:xn,liveQuery:si,extendObservabilitySet:yr,getByKeyPath:C,setByKeyPath:w,delByKeyPath:T,shallowClone:E,deepClone:D,getObjectDiff:Nr,cmp:W,asap:x,minKey:At,addons:[],connections:{get:nr.toArray},errnames:_e,dependencies:oi,cache:xr,semVer:Ot,version:Ot.split(`.`).map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/10**(n*2)})})),ci.maxKey=On(ci.dependencies.IDBKeyRange),typeof dispatchEvent<`u`&&typeof addEventListener<`u`&&(xn(yn,function(e){if(!ui){var t=new CustomEvent(bn,{detail:e});ui=!0,dispatchEvent(t),ui=!1}}),addEventListener(bn,function(e){var t=e.detail;ui||li(t)}));function li(e){var t=ui;try{ui=!0,xn.storagemutated.fire(e),Tr(e,!0)}finally{ui=t}}var ui=!1,di,fi=function(){};typeof BroadcastChannel<`u`&&(fi=function(){di=new BroadcastChannel(bn),di.onmessage=function(e){return e.data&&li(e.data)}},fi(),typeof di.unref==`function`&&di.unref(),xn(yn,function(e){ui||di.postMessage(e)})),typeof addEventListener<`u`&&(addEventListener(`pagehide`,function(e){if(!ri.disableBfCache&&e.persisted){Ae&&console.debug(`Dexie: handling persisted pagehide`),di?.close();for(var t=0,n=nr.toArray();t<n.length;t++)n[t].close({disableAutoOpen:!1})}}),addEventListener(`pageshow`,function(e){!ri.disableBfCache&&e.persisted&&(Ae&&console.debug(`Dexie: handling persisted pageshow`),fi(),li({all:new X(-1/0,[[]])}))}));function pi(e){return new Gt({add:e})}function mi(e){return new Gt({remove:e})}function hi(e,t){return new Gt({replacePrefix:[e,t]})}return z.rejectionMapper=be,je(Ae),n(ri,Object.freeze({__proto__:null,DEFAULT_MAX_CONNECTIONS:Nt,Dexie:ri,Entity:U,PropModification:Gt,RangeSet:X,add:pi,cmp:W,default:ri,liveQuery:si,mergeRanges:mr,rangesOverlap:hr,remove:mi,replacePrefix:hi}),{default:ri}),ri}))}))(),1),y=Symbol.for(`Dexie`),b=globalThis[y]||(globalThis[y]=v.default);if(v.default.semVer!==b.semVer)throw Error(`Two different versions of Dexie loaded in the same app: ${v.default.semVer} and ${b.semVer}`);var{liveQuery:x,mergeRanges:S,rangesOverlap:C,RangeSet:w,cmp:T,Entity:E,PropModification:ee,replacePrefix:te,add:ne,remove:re,DexieYProvider:ie}=b,ae=c({SubDexie:()=>D,db:()=>k,get:()=>se,getDB:()=>oe,set:()=>ce}),D=class extends b{rows;constructor(e=`db`){super(e),this.version(1).stores({rows:`++id, key`})}},O,oe=(e=`db`)=>O??=new D(e),k=oe(),se=(e,t=!1)=>k.rows.where({key:e}).first().then(e=>t?e:e?.value),ce=(e,t)=>k.transaction(`rw`,k.rows,async()=>{let n=await k.rows.where({key:e}).modify({value:t});return n||await k.rows.add({key:e,value:t}),n||1}),le=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(n,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|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,g={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(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),ee=E.prototype;return w.prototype=ee,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){ee[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),ue=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(n,(function(){"use strict";var e={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`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),A=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(n,(function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms;return f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),de=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_utc=r()})(n,(function(){"use strict";var e=`minute`,t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(e){return new i({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if(typeof r==`string`&&(r=function(e){e===void 0&&(e=``);var r=e.match(t);if(!r)return null;var i=(``+r[0]).match(n)||[`-`,0,0],a=i[0],o=60*i[1]+ +i[2];return o===0?0:a===`+`?o:-o}(r),r===null))return this;var o=Math.abs(r)<=16?60*r:r;if(o===0)return this.utc(i);var s=this.clone();if(i)return s.$offset=o,s.$u=!1,s;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(o+c,e)).$offset=o,s.$x.$localOffset=c,s};var u=o.format;o.format=function(e){var t=e||(this.$u?`YYYY-MM-DDTHH:mm:ss[Z]`:``);return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return e===`s`&&this.$offset?a(this.format(`YYYY-MM-DD HH:mm:ss:SSS`)).toDate():d.call(this)};var f=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=a(e).local();return f.call(r,i,t,n)}}}))})),fe=c({FORMAT:()=>he,dayjs:()=>j.default}),j=u(le(),1),M=u(ue(),1),pe=u(A(),1),me=u(de(),1);j.default.extend(M.default),j.default.extend(pe.default),j.default.extend(me.default);var he={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`},N=s(((e,t)=>{t.exports=n;function n(e,t){if(t!==`$`)for(var n=r(t),i=0;i<n.length;i++)t=n[i].toString().replace(/\\"/g,`"`),(e[t]!==void 0||i===n.length-1)&&(e=e[t]);return e}function r(e){for(var t=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,n=[],r;r=t.exec(e);)n.push(r[1]||r[2]||r[3]);return n}})),ge=s((e=>{var t=N(),n=ve();e.getRegexFlags=function(e){var t=``;return e.ignoreCase&&(t+=`i`),e.global&&(t+=`g`),e.multiline&&(t+=`m`),t},e.stringifyFunction=function(e,t){if(typeof t==`function`)return t(e);var n=e.toString(),r=n.match(/^[^{]*{|^[^=]*=>/),i=r?r[0]:`<function> `,a=n[n.length-1]===`}`?`}`:``;return i.replace(/\r\n|\n/g,` `).replace(/\s+/g,` `)+` /* ... */ `+a},e.restore=function(e,r){var i=e[0],a=e.slice(1);switch(i){case`$`:return t(r,e);case`r`:var o=a.indexOf(`,`),s=a.slice(0,o),c=a.slice(o+1);return RegExp(c,s);case`d`:return new Date(+a);case`f`:var l=function(){throw Error(`can't run jsan parsed function`)};return l.toString=function(){return a},l;case`u`:return;case`e`:var u=Error(a);return u.stack=`Stack is unavailable for jsan parsed errors`,u;case`s`:return Symbol(a);case`g`:return Symbol.for(a);case`m`:return new Map(n.parse(a));case`l`:return new Set(n.parse(a));case`n`:return NaN;case`i`:return 1/0;case`y`:return-1/0;default:return console.warn(`unknown type`,e),e}}})),_e=s((e=>{N();var t=ge(),n=typeof WeakMap<`u`?WeakMap:function(){var e=[],t=[];return{set:function(n,r){e.push(n),t.push(r)},get:function(n){for(var r=0;r<e.length;r++)if(e[r]===n)return t[r]}}};e.decycle=function e(r,i,a,o){"use strict";o||=new n;var s=!Object.prototype.hasOwnProperty.call(i,`circular`),c=i.refs!==!1;return function n(r,l,u){var d,f,p,m=typeof a==`function`?a(u||``,r):r;if(i.date&&m instanceof Date)return{$jsan:`d`+m.getTime()};if(i.regex&&m instanceof RegExp)return{$jsan:`r`+t.getRegexFlags(m)+`,`+m.source};if(i.function&&typeof m==`function`)return{$jsan:`f`+t.stringifyFunction(m,i.function)};if(i.nan&&typeof m==`number`&&isNaN(m))return{$jsan:`n`};if(i.infinity){if(m===1/0)return{$jsan:`i`};if(m===-1/0)return{$jsan:`y`}}if(i.undefined&&m===void 0)return{$jsan:`u`};if(i.error&&m instanceof Error)return{$jsan:`e`+m.message};if(i.symbol&&typeof m==`symbol`){var h=Symbol.keyFor(m);return h===void 0?{$jsan:`s`+m.toString().slice(7,-1)}:{$jsan:`g`+h}}if(i.map&&typeof Map==`function`&&m instanceof Map&&typeof Array.from==`function`)return{$jsan:`m`+JSON.stringify(e(Array.from(m),i,a,o))};if(i.set&&typeof Set==`function`&&m instanceof Set&&typeof Array.from==`function`)return{$jsan:`l`+JSON.stringify(e(Array.from(m),i,a,o))};if(m&&typeof m.toJSON==`function`)try{m=m.toJSON(u)}catch{var g=u||`$`;return`toJSON failed for '`+(o.get(m)||g)+`'`}if(typeof m==`object`&&m&&!(m instanceof Boolean)&&!(m instanceof Date)&&!(m instanceof Number)&&!(m instanceof RegExp)&&!(m instanceof String)&&typeof m!=`symbol`&&!(m instanceof Error)){if(typeof m==`object`){var _=o.get(m);if(_){if(s&&c)return{$jsan:_};if(l.split(`.`).slice(0,-1).join(`.`).indexOf(_)===0)return s?{$jsan:_}:typeof i.circular==`function`?i.circular(m,l,_):i.circular;if(c)return{$jsan:_}}o.set(m,l)}if(Object.prototype.toString.apply(m)===`[object Array]`)for(p=[],d=0;d<m.length;d+=1)p[d]=n(m[d],l+`[`+d+`]`,d);else for(f in p={},m)if(Object.prototype.hasOwnProperty.call(m,f)){var v=/^\w+$/.test(f)?`.`+f:`[`+JSON.stringify(f)+`]`;p[f]=f===`$jsan`?[n(m[f],l+v)]:n(m[f],l+v,f)}return p}return m}(r,`$`)},e.retrocycle=function(e){"use strict";return function n(r){var i,a,o;if(r&&typeof r==`object`){if(Object.prototype.toString.apply(r)===`[object Array]`)for(i=0;i<r.length;i+=1)a=r[i],a&&typeof a==`object`&&(a.$jsan?r[i]=t.restore(a.$jsan,e):n(a));else for(o in r)if(typeof r[o]==`string`&&o===`$jsan`)return t.restore(r.$jsan,e);else o===`$jsan`&&(r[o]=r[o][0]),typeof r[o]==`object`&&(a=r[o],a&&typeof a==`object`&&(a.$jsan?r[o]=t.restore(a.$jsan,e):n(a)))}return r}(e)}})),ve=s((e=>{var t=_e();e.stringify=function(e,n,r,i){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(e):JSON.stringify.apply(JSON,arguments)}catch{}var a=i||!1;typeof a==`boolean`&&(a={date:a,function:a,regex:a,undefined:a,error:a,symbol:a,map:a,set:a,nan:a,infinity:a});var o=t.decycle(e,a,n);return arguments.length===1?JSON.stringify(o):JSON.stringify(o,Array.isArray(n)?n:null,r)},e.parse=function(e,n){var r=/"\$jsan"/.test(e),i=arguments.length===1?JSON.parse(e):JSON.parse(e,n);return r&&(i=t.retrocycle(i)),i}})),P=s(((e,t)=>{t.exports=ve()})),ye=c({parse:()=>F,stringify:()=>xe}),be=u(P(),1),xe=(e=null,t,n,r=!0)=>be.stringify(e,t,n,r),F=(e,t)=>be.parse(e,t),Se=c({SHA256:()=>Ce,id:()=>Te,random:()=>we}),Ce=async(e,t=!0)=>{let n=t?xe(e):e,r=new TextEncoder().encode(n),i=await crypto.subtle.digest(`SHA-256`,r);return Array.from(new Uint8Array(i)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},we=()=>{let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]},Te=()=>`${Date.now().toString(36).padStart(9,`0`)}${crypto.getRandomValues(new Uint32Array(1))[0].toString(36).padStart(7,`0`)}`;function Ee(e,t){return function(){return e.apply(t,arguments)}}var{toString:De}=Object.prototype,{getPrototypeOf:Oe}=Object,{iterator:ke,toStringTag:Ae}=Symbol,je=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Me=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),Ne=(e,t,n)=>e===Object.prototype||!n&&t===null,Pe=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(Me(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},Fe=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=Oe(n);if(Ne(n,i,n===e))return!1;if(je(n,t))return!0;n=i}return!1},Ie=(e,t)=>e!=null&&Fe(e,t)?e[t]:void 0,Le=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=Oe(e);if(t===null&&Pe(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:Oe(a);if(Ne(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)Me(t)||je(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},Re=(e=>t=>{let n=De.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>Re(t)===e),ze=e=>t=>typeof t===e,{isArray:Be}=Array,Ve=ze(`undefined`);function He(e){return e!==null&&!Ve(e)&&e.constructor!==null&&!Ve(e.constructor)&&L(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Ue=I(`ArrayBuffer`);function We(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ue(e.buffer),t}var Ge=ze(`string`),L=ze(`function`),Ke=ze(`number`),R=e=>typeof e==`object`&&!!e,qe=e=>e===!0||e===!1,Je=e=>{if(!R(e))return!1;let t=Oe(e);return(t===null||t===Object.prototype||Oe(t)===null)&&(Ne(e,t,!0)||!je(e,Ae)&&!je(e,ke))},Ye=e=>{if(!R(e)||He(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},z=I(`Date`),Xe=I(`File`),Ze=e=>!!(e&&e.uri!==void 0),Qe=e=>e&&e.getParts!==void 0,$e=I(`Blob`),et=I(`FileList`),tt=I(`Set`),nt=e=>R(e)&&L(e.pipe);function rt(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var it=rt(),at=it.FormData===void 0?void 0:it.FormData,ot=e=>{if(!e)return!1;if(at&&e instanceof at)return!0;let t=Oe(e);if(!t||t===Object.prototype||!L(e.append))return!1;let n=Re(e);return n===`formdata`||n===`object`&&L(e.toString)&&e.toString()===`[object FormData]`},st=I(`URLSearchParams`),[ct,lt,ut,B]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(I),V=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function dt(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Be(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(He(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ft(e,t){if(He(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var pt=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,mt=e=>!Ve(e)&&e!==pt;function ht(...e){let{caseless:t,skipUndefined:n}=mt(this)&&this||{},r={},i=t?Object.create(null):null,a=(e,t)=>{if(t===`__proto__`||t===`constructor`||t===`prototype`)return;let a=t;if(i&&typeof t==`string`){let e=t.toLowerCase(),n=i[e];n!==void 0&&je(r,n)?a=n:i[e]=t}let o=je(r,a)?r[a]:void 0;Je(o)&&Je(e)?r[a]=ht(o,e):Je(e)?r[a]=ht({},e):Be(e)?r[a]=e.slice():n&&Ve(e)||(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||He(n)||(dt(n,a),typeof n!=`object`||Be(n)||!Object.getOwnPropertySymbols))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];H.call(n,t)&&a(n[t],t)}}return r}var gt=(e,t,n,{allOwnKeys:r}={})=>(dt(t,(t,r)=>{n&&L(t)?Object.defineProperty(e,r,{__proto__:null,value:Ee(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),_t=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},yt=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=n!==!1&&Oe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},xt=e=>{if(!e)return null;if(Be(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;let n=new Set,r=new Set,i=e;for(;i!=null&&n.size<t;){if(r.has(i))return null;r.add(i);let a=Oe(i);if(Ne(i,a,i===e))break;Object.getOwnPropertyNames(i).forEach(e=>{let r=+e;Number.isInteger(r)&&r>=0&&r<t&&String(r)===e&&je(i,e)&&n.add(r)}),i=a}if(n.size!==t)return null;let a=Array(t);for(;t-->0;)a[t]=e[t];return a},St=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Oe(Uint8Array)),Ct=(e,t)=>{let n=(e&&e[ke]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},wt=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Tt=I(`HTMLFormElement`),Et=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:H}=Object.prototype,Dt=I(`RegExp`),Ot=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};dt(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},kt=e=>{Ot(e,(t,n)=>{if(L(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];L(r)&&(t.enumerable=!1,`writable`in t?t.writable=!1:t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})})},At=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Be(e)?r(e):r(String(e).split(t)),n},jt=()=>{},Mt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nt(e){return!!(e&&L(e.append)&&e[Ae]===`FormData`&&e[ke])}var Pt=e=>{let t=new WeakSet,n=e=>{if(R(e)){if(t.has(e))return;if(He(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(tt(e)){r=[];for(let t of e){let e=n(t);!Ve(e)&&r.push(e)}}else r=Be(e)?[]:{},dt(e,(e,t)=>{let i=n(e);!Ve(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},Ft=I(`AsyncFunction`),It=e=>e&&(R(e)||L(e))&&L(e.then)&&L(e.catch),Lt=((e,t)=>e?setImmediate:t?((e,t)=>(pt.addEventListener(`message`,({source:n,data:r})=>{n===pt&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),pt.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,L(pt.postMessage)),Rt=typeof queueMicrotask<`u`?queueMicrotask.bind(pt):typeof process<`u`&&process.nextTick||Lt,zt=e=>e!=null&&L(e[ke]),U={isArray:Be,isArrayBuffer:Ue,isBuffer:He,isFormData:ot,isArrayBufferView:We,isString:Ge,isNumber:Ke,isBoolean:qe,isObject:R,isPlainObject:Je,isEmptyObject:Ye,isReadableStream:ct,isRequest:lt,isResponse:ut,isHeaders:B,isUndefined:Ve,isDate:z,isFile:Xe,isReactNativeBlob:Ze,isReactNative:Qe,isBlob:$e,isRegExp:Dt,isFunction:L,isStream:nt,isURLSearchParams:st,isTypedArray:St,isFileList:et,forEach:dt,merge:ht,extend:gt,trim:V,stripBOM:_t,inherits:vt,toFlatObject:yt,kindOf:Re,kindOfTest:I,endsWith:bt,toArray:xt,forEachEntry:Ct,matchAll:wt,isHTMLForm:Tt,hasOwnProperty:je,hasOwnProp:je,hasOwnInPrototypeChain:Fe,getSafeProp:Ie,toSafeFlatObject:Le,reduceDescriptors:Ot,freezeMethods:kt,toObjectSet:At,toCamelCase:Et,noop:jt,toFiniteNumber:Mt,findKey:ft,global:pt,isContextDefined:mt,isSpecCompliantForm:Nt,toJSONObject:Pt,isAsyncFn:Ft,isThenable:It,setImmediate:Lt,asap:Rt,isIterable:zt,isSafeIterable:e=>e!=null&&Fe(e,ke)&&zt(e)},W=U.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`]),Bt=e=>{let t=Object.create(null),n,r,i;return e&&e.split(`
|
|
4
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=U.hasOwnProp(t,n);!n||a&&U.hasOwnProp(W,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function Vt(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Ht=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Ut=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Wt(e,t){return U.isArray(e)?e.map(e=>Wt(e,t)):Vt(String(e).replace(t,``))}var Gt=e=>Wt(e,Ht),Kt=e=>Wt(e,Ut);function qt(e){let t=Object.create(null);return U.forEach(e.toJSON(),(e,n)=>{t[n]=Kt(e)}),t}var Jt=Symbol(`internals`);function Yt(e){return e&&String(e).trim().toLowerCase()}function Xt(e){return e===!1||e==null?e:U.isArray(e)?e.map(Xt):Gt(String(e))}function Zt(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Qt=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function $t(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function en(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function tn(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=$t(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=$t(i.slice(0,a));if(!Qt.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=$t(i.slice(a+1));t[s]=en(c)}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var nn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),rn=`__Proto__`,an=e=>e===`__proto__`?rn:e;function on(e,t,n,r,i){if(U.isFunction(r))return r.call(e,t,n);if(i&&(t=n),U.isString(t)){if(U.isString(r))return t.indexOf(r)!==-1;if(U.isRegExp(r))return r.test(t)}}function sn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function cn(e,t){let n=U.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var G=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Yt(t);if(!i)return;let a=U.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[an(a||t)]=Xt(e))}let a=(e,t)=>U.forEach(e,(e,n)=>i(e,n,t));if(U.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(U.isString(e)&&(e=e.trim())&&!nn(e))a(Bt(e),t);else if(U.isObject(e)&&U.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!U.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],U.hasOwnProp(n,i)?(r=n[i],n[i]=U.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Yt(e),e){let n=U.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Zt(e);if(U.isFunction(t))return t.call(this,e,n);if(U.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Yt(e),e){let n=U.findKey(this,e);return!(!n||this[n]===void 0||t&&!on(this,this[n],n,t))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Yt(e),e){let i=U.findKey(n,e);i&&(!t||on(n,n[i],i,t))&&(delete n[i],r=!0)}}return U.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||on(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n=Object.create(null);return U.forEach(this,(r,i)=>{let a=U.findKey(n,i);if(a){t[a]=Xt(r),delete t[i];return}let o=an(e?sn(i):String(i).trim());o!==i&&delete t[i],t[o]=Xt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return U.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&U.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
5
|
+
`)}getSetCookie(){let e=this.get(`set-cookie`);return U.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return tn(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Jt]=this[Jt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Yt(e);t[r]||(cn(n,e),t[r]=!0)}return U.isArray(e)?e.forEach(r):r(e),this}};G.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),U.reduceDescriptors(G.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),U.freezeMethods(G);var ln=`[REDACTED ****]`;function K(e){if(U.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(U.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function un(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||U.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof G&&(e=e.toJSON()),r.push(e);let t;if(U.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);U.isUndefined(r)||(t[n]=r)});else{if(!U.isPlainObject(e)&&K(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?ln:i(a);U.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function dn(e){try{return String(e)}catch{return``}}function fn(e){return e.errors.map(e=>{try{return e&&e.message?dn(e.message):dn(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var pn=`
|
|
6
|
+
Caused by: `,mn=Symbol(`causeStack`);function hn(e,t){let n=U.hasOwnProp(e,mn)&&e[mn];return n&&t.endsWith(n)?t.length-n.length:-1}function gn(e,t){try{let n=t&&t.stack;if(typeof n!=`string`||!n)return;let r=e.stack;if(typeof r!=`string`||!r)return;let i=pn+n;e.stack=r+i,Object.defineProperty(e,mn,{__proto__:null,value:i})}catch{}}var q=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&U.isArray(t.errors)&&t.errors.length&&(s=fn(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,gn(c,t),t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&U.hasOwnProp(e,`redact`)?e.redact:void 0,n=U.isArray(t)&&t.length>0?un(e,t):U.toJSONObject(e);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:n,code:this.code,status:this.status}}};q.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,q.ERR_BAD_OPTION=`ERR_BAD_OPTION`,q.ECONNABORTED=`ECONNABORTED`,q.ETIMEDOUT=`ETIMEDOUT`,q.ECONNREFUSED=`ECONNREFUSED`,q.ERR_NETWORK=`ERR_NETWORK`,q.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,q.ERR_DEPRECATED=`ERR_DEPRECATED`,q.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,q.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,q.ERR_CANCELED=`ERR_CANCELED`,q.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,q.ERR_INVALID_URL=`ERR_INVALID_URL`,q.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function _n(e){return U.isPlainObject(e)||U.isArray(e)}function J(e){return U.endsWith(e,`[]`)?e.slice(0,-2):e}function vn(e,t,n){return e?e.concat(t).map(function(e,t){return e=J(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function yn(e){return U.isArray(e)&&!e.some(_n)}var bn=U.toFlatObject(U,{},null,function(e){return/^is[A-Z]/.test(e)});function xn(e,t,n){if(!U.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=U.getSafeProp(n,e);return U.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&U.isSpecCompliantForm(t),d=[];if(!U.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(U.isDate(e))return e.toISOString();if(U.isBoolean(e))return e.toString();if(!u&&U.isBlob(e))throw new q(`Blob is not supported. Use a Buffer instead.`);if(U.isArrayBuffer(e)||U.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new q(`Blob is not supported. Use a Buffer instead.`,q.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new q(`Object is too deeply nested (`+e+` levels). Max depth: `+l,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!U.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(U.isReactNative(t)&&U.isReactNativeBlob(e))return t.append(vn(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(U.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(U.isArray(e)&&yn(e)||(U.isFileList(e)||U.endsWith(n,`[]`))&&(a=U.toArray(e)))return n=J(n),a.forEach(function(e,r){!(U.isUndefined(e)||e===null)&&t.append(s===!0?vn([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return _n(e)?!0:(t.append(vn(r,n,o),f(e)),!1)}let g=Object.assign(bn,{defaultVisitor:h,convertValue:f,isVisitable:_n});function _(e,n,r=0){if(!U.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),U.forEach(e,function(e,i){(!(U.isUndefined(e)||e===null)&&a.call(t,e,U.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!U.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function Sn(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Cn(e,t){this._pairs=[],e&&xn(e,this,t)}var wn=Cn.prototype;wn.append=function(e,t){this._pairs.push([e,t])},wn.toString=function(e){let t=e?t=>e.call(this,t,Sn):Sn;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Tn(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function En(e,t,n){if(!t)return e;e||=``;let r=U.isFunction(n)?{serialize:n}:n,i=U.getSafeProp(r,`encode`)||Tn,a=U.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):U.isURLSearchParams(t)?t.toString():new Cn(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Dn=Symbol(`internals`);function On(e){return e?e.length:0}function kn(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function An(e){return typeof e==`string`&&e!==``&&String(Number(e))===e?Number(e):e}function jn(e,t){let n=e.handlers,r=On(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var Mn=class{constructor(){this.handlers=[],this[Dn]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[Dn];this.handlers??=[],jn(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[Dn];jn(this,t);let n=An(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(kn(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],jn(this,this[Dn]))}forEach(e){let t=this[Dn];jn(this,t),t.iterationDepth++;try{U.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(jn(this,t),kn(this.handlers),t.handlersLength=On(this.handlers))}}},Nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},Pn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Cn,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Fn=c({hasBrowserEnv:()=>In,hasStandardBrowserEnv:()=>Rn,hasStandardBrowserWebWorkerEnv:()=>zn,navigator:()=>Ln,origin:()=>Bn}),In=typeof window<`u`&&typeof document<`u`,Ln=typeof navigator==`object`&&navigator||void 0,Rn=In&&(!Ln||[`ReactNative`,`NativeScript`,`NS`].indexOf(Ln.product)<0),zn=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Bn=In&&window.location.href||`http://localhost`,Y={...Fn,...Pn};function Vn(e,t){return xn(e,new Y.classes.URLSearchParams,{visitor:function(e,t,n,r){return Y.isNode&&U.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var Hn=100;function Un(e){if(e>Hn)throw new q(`FormData field is too deeply nested (`+e+` levels). Max depth: `+Hn,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wn(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)Un(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Gn(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Kn(e){if(!U.isArray(e))return e;let t=Object.keys(e);return t.length!==e.length||t.some((e,t)=>e!==String(t))?Gn(e):e}function qn(e){let t=[e];for(;t.length;){let e=t.pop();Object.keys(e).forEach(n=>{let r=e[n]=Kn(e[n]);(U.isArray(r)||U.isPlainObject(r))&&t.push(r)})}return e}function Jn(e){function t(e,n,r,i){Un(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&U.isArray(r)?r.length:a,s?(U.hasOwnProp(r,a)?(r[a]=Kn(r[a]),r[a]=U.isArray(r[a])?r[a].concat(n):[r[a],n]):r[a]=n,!o):(U.hasOwnProp(r,a)&&U.isObject(r[a])||(r[a]=[]),t(e,n,r[a],i)&&U.isArray(r[a])&&(r[a]=Gn(r[a])),!o)}if(U.isFormData(e)&&U.isFunction(e.entries)){let n={};return U.forEachEntry(e,(e,r)=>{t(Wn(e),r,n,0)}),qn(n)}return null}var Yn=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),Xn=(e,t)=>e!=null&&U.hasOwnProp(e,t)?e[t]:void 0;function Zn(e,t,n){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Qn={transitional:Nn,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=U.isObject(e);if(i&&U.isHTMLForm(e)&&(e=new FormData(e)),U.isFormData(e))return r?JSON.stringify(Jn(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e)||U.isReadableStream(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Xn(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Vn(e,t).toString();if((a=U.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Xn(this,`env`),r=n&&n.FormData;return xn(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Zn(e)):e}],transformResponse:[function(e){let t=Xn(this,`transitional`)||Qn.transitional,n=t&&t.forcedJSONParsing,r=Xn(this,`responseType`),i=r===`json`;if(U.isResponse(e)||U.isReadableStream(e))return e;if(e&&U.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Xn(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?q.from(e,q.ERR_BAD_RESPONSE,this,null,Xn(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Y.classes.FormData,Blob:Y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};U.forEach(Yn,e=>{Qn.headers[e]={}});function $n(e,t){let n=this||Qn,r=t||n,i=G.from(r.headers),a=r.data;return U.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function er(e){return!!(e&&e.__CANCEL__)}var tr=class extends q{constructor(e,t,n){super(e??`canceled`,q.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function nr(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q(`Request failed with status code `+n.status,n.status>=400&&n.status<500?q.ERR_BAD_REQUEST:q.ERR_BAD_RESPONSE,n.config,n.request,n))}var rr=/[\t\n\r]/g;function ir(e){if(typeof e!=`string`)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(rr,``)}function ar(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||``}var or=e=>{try{return decodeURIComponent(e)}catch{return e}},sr=Y.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];U.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),U.isString(r)&&s.push(`path=${r}`),U.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),U.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie;if(!t)return null;let n=t.split(`;`);for(let t=0;t<n.length;t++){let r=n[t].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return or(r.slice(i+1))}return null},async readAsync(e){try{let t=typeof window<`u`&&window.cookieStore;if(t&&U.isFunction(t.get)){let n=await t.get(e);return n?or(n.value):null}}catch{}return this.read(e)},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},async readAsync(){return null},remove(){}};function cr(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function lr(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i),(...e)=>o(e)]}var ur=(e,t,n=3)=>{let r=0,i=cr(50,250);return lr(n=>{if(!n||!U.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},dr=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},fr=(e,t=U.asap)=>(...n)=>t(()=>e(...n)),X=Y.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||Y.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(Y.origin)):()=>!0;function pr(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mr(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var hr=/^https?:(?!\/\/)/i;function gr(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${ln}`)}function _r(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ln}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ln}`);return n===-1?r:`${r}#${gr(t.slice(n+1))}`}function vr(e,t){if(typeof e==`string`){let n=ir(e);if(hr.test(n))throw new q(`Invalid URL ${JSON.stringify(_r(n))}: missing "//" after protocol`,q.ERR_INVALID_URL,t)}}function yr(e,t,n,r){vr(t,r);let i=!pr(t);return e&&(i||n===!1)?(vr(e,r),mr(e,t)):t}function br(e){let t=[{value:e}],n=new WeakSet,r=new WeakSet;for(;t.length;){let{value:e,done:i}=t.pop();if(!U.isPlainObject(e)&&!U.isArray(e))continue;if(i){n.delete(e);continue}if(n.has(e))throw new q(`Circular reference detected in params`,q.ERR_BAD_OPTION_VALUE);if(r.has(e))continue;r.add(e),n.add(e),t.push({value:e,done:!0});let a=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{let n=Object.getOwnPropertyDescriptor(e,t);n&&n.enumerable&&a.push(t)}),a.forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`){let r=Object.getOwnPropertyDescriptor(e,n);r&&U.hasOwnProp(r,`value`)&&t.push({value:r.value})}else t.push({value:e[n]})})}}var xr=e=>e instanceof G?{...e}:e,Sr=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{let n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function Cr(e,t){let n=[],r=new WeakMap,i={};function a(e,t){if(!U.isPlainObject(t))return U.isArray(t)?t.slice():t;let a=U.isPlainObject(e)?e:i,o=r.get(t);if(o||(o=new WeakMap,r.set(t,o)),o.has(a))return o.get(a);let s={};return o.set(a,s),n.push({base:a,source:t,result:s}),s}let o=U.isUndefined(t)?a(void 0,e):a(e,t);for(;n.length;){let{base:e,source:t,result:r}=n.pop(),i=new Set(Sr(e)),o=new Set(Sr(t));new Set([...i,...o]).forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`)return;let s=o.has(n),c=s?t[n]:void 0,l=(!s||U.isPlainObject(c))&&i.has(n)?e[n]:void 0;r[n]=s?a(l,c):a(void 0,l)})}return br(o),o}function wr(e,t,n,r){return U.isPlainObject(e)&&U.isPlainObject(t)?U.merge.call({caseless:r},e,t):U.isPlainObject(t)?U.merge({},t):U.isArray(t)?t.slice():t}function Tr(e,t,n,r){if(!U.isUndefined(t))return wr(e,t,n,r);if(!U.isUndefined(e))return wr(void 0,e,n,r)}function Er(e,t){if(!U.isUndefined(t))return wr(void 0,t)}function Z(e,t){if(!U.isUndefined(t))return wr(void 0,t);if(!U.isUndefined(e))return wr(void 0,e)}function Dr(e,t,n){let r=U.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!U.isUndefined(r)){if(U.isPlainObject(r)){if(U.hasOwnProp(r,n))return r[n]}else return}let i=U.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(U.isPlainObject(i)&&U.hasOwnProp(i,n))return i[n]}function Or(e,t,n,r,i){if(U.hasOwnProp(i,n))return wr(e,t);if(U.hasOwnProp(r,n))return wr(void 0,e)}function kr(e,t,n){return Tr(xr(e),xr(t),n,!0)}var Ar=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),jr={url:Er,method:Er,data:Er,baseURL:Z,transformRequest:Z,transformResponse:Z,params:Cr,paramsSerializer:Z,timeout:Z,timeoutErrorMessage:Z,withCredentials:Z,withXSRFToken:Z,adapter:Z,responseType:Z,xsrfCookieName:Z,xsrfHeaderName:Z,onUploadProgress:Z,onDownloadProgress:Z,decompress:Z,maxContentLength:Z,maxBodyLength:Z,beforeRedirect:Z,transport:Z,httpAgent:Z,httpsAgent:Z,cancelToken:Z,socketPath:Z,allowedSocketPaths:Z,responseEncoding:Z,validateStatus:Or,headers:kr};function Mr(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",Ar);let r=Sr({...e,...t});for(let i=0,a=r.length;i<a;i++){let a=r[i];if(a===`__proto__`||a===`constructor`||a===`prototype`)continue;let o=U.hasOwnProp(jr,a)?jr[a]:Tr,s=U.hasOwnProp(e,a)?e[a]:void 0,c=U.hasOwnProp(t,a)?t[a]:void 0,l=o===Or?o(s,c,a,e,t):o(s,c,a);U.isUndefined(l)&&o!==Or||(n[a]=l)}return U.hasOwnProp(t,`validateStatus`)&&U.isUndefined(t.validateStatus)&&Dr(e,t,`validateStatusUndefinedResolves`)===!1&&(U.hasOwnProp(e,`validateStatus`)?n.validateStatus=wr(void 0,e.validateStatus):delete n.validateStatus),n}var Nr=[`content-type`,`content-length`];function Pr(e,t,n){n===`content-only`?Object.entries(t||{}).forEach(([t,n])=>{Nr.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var Fr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Ir=e=>sr.read(e);function Lr(e,t=Ir){let n=Mr({},e),r=e=>U.hasOwnProp(n,e)?n[e]:void 0,i=r(`data`),a=r(`withXSRFToken`),o=r(`xsrfHeaderName`),s=r(`xsrfCookieName`),c=r(`headers`),l=r(`auth`),u=r(`baseURL`),d=r(`allowAbsoluteUrls`),f=r(`url`);if(n.headers=c=G.from(c),n.url=En(yr(u,f,d,n),r(`params`),r(`paramsSerializer`)),l){let t=U.getSafeProp(l,`username`)||``,n=U.getSafeProp(l,`password`)||``,i=r(`transitional`),a=i&&U.hasOwnProp(i,`encodeBasicAuthUsername`)&&i.encodeBasicAuthUsername===!0;try{c.set(`Authorization`,`Basic `+btoa((a?Fr(t):t)+`:`+(n?Fr(n):``)))}catch(t){throw q.from(t,q.ERR_BAD_OPTION_VALUE,e)}}if(U.isFormData(i)){let e=U.getSafeProp(i,`getHeaders`);Y.hasStandardBrowserEnv||Y.hasStandardBrowserWebWorkerEnv||U.isReactNative(i)?c.setContentType(void 0):U.isFunction(e)&&Pr(c,e.call(i),r(`formDataHeaderPolicy`))}if(Y.hasStandardBrowserEnv&&(U.isFunction(a)&&(a=a(n)),a===!0||a==null&&X(n.url))){let e=o&&s&&t(s);e&&c.set(o,e)}return n}var Rr=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r;try{let e=Y.hasStandardBrowserEnv&&typeof window<`u`&&window.cookieStore;r=e&&U.isFunction(e.get)}catch{}let i,a=Lr(e,r?e=>(i=e,null):void 0),o=a.data,s=G.from(a.headers).normalize(),{responseType:c,onUploadProgress:l,onDownloadProgress:u}=a,d,f,p,m,h,g,_;function v(){clearTimeout(f);try{h&&h()}catch(e){setTimeout(()=>{throw e})}try{g&&g()}catch(e){setTimeout(()=>{throw e})}y&&(m&&y.removeEventListener(`progress`,m),y.upload&&(p&&y.upload.removeEventListener(`progress`,p),h&&y.upload.removeEventListener(`loadend`,h))),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener(`abort`,d)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function b(r){if(!y)return;if(y.status===0&&(ar(ir(a.url))||ar(Y.origin))!==`file`&&!(y.responseURL&&y.responseURL.startsWith(`file:`))){n(new q(`Request aborted`,q.ECONNABORTED,e,y)),v(),y=null;return}try{r?_&&_(r):g&&g()}catch(e){setTimeout(()=>{throw e})}if(!y)return;let i=G.from(`getAllResponseHeaders`in y&&y.getAllResponseHeaders());nr(function(e){t(e),v()},function(e){n(e),v()},{data:!c||c===`text`||c===`json`?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}if(`onloadend`in y?y.onloadend=b:y.onreadystatechange=function(){y&&y.readyState===4&&(y.status!==0||y.responseURL&&y.responseURL.startsWith(`file:`))&&setTimeout(b)},y.onabort=function(){y&&=(n(new q(`Request aborted`,q.ECONNABORTED,e,y)),v(),null)},y.onerror=function(t){let r=new q(t&&t.message?t.message:`Network Error`,q.ERR_NETWORK,e,y);r.event=t||null,n(r),v(),y=null},y.ontimeout=function(){if(!y)return;let t=a.timeout?`timeout of `+a.timeout+`ms exceeded`:`timeout exceeded`,r=a.transitional||Nn;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),n(new q(t,r.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,y)),v(),y=null},o===void 0&&s.setContentType(null),U.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),c&&c!==`json`&&(y.responseType=a.responseType),u&&([m,g,_]=ur(u,!0),y.addEventListener(`progress`,m)),l&&y.upload&&([p,h]=ur(l),y.upload.addEventListener(`progress`,p),y.upload.addEventListener(`loadend`,h)),a.cancelToken||a.signal){if(d=t=>{if(!y)return;n(!t||t.type?new tr(null,e,y):t);let r=y;v(),y=null,r.abort()},a.cancelToken&&a.cancelToken.subscribe(d),!y)return;a.signal&&(a.signal.aborted?d():a.signal.addEventListener(`abort`,d))}if(!y)return;let x=ar(a.url);if(x&&!Y.protocols.includes(x)){n(new q(`Unsupported protocol `+x+`:`,q.ERR_BAD_REQUEST,e)),v();return}let S=()=>{y&&(`setRequestHeader`in y&&U.forEach(qt(s),function(e,t){y.setRequestHeader(t,e)}),y.send(o||null))};if(i){let t=typeof performance<`u`&&U.isFunction(performance.now)?()=>performance.now():Date.now,r=y.timeout>0?t()+Number(y.timeout):void 0,o=()=>{if(!y)return;let e=y;e.ontimeout(),e.abort()};if(r!==void 0){let e=()=>{let n=r-t();n>0?f=setTimeout(e,Math.min(n,2147483647)):o()};e()}sr.readAsync(i).then(e=>{if(y){if(r!==void 0&&t()>=r)o();else{if(e){let t=U.hasOwnProp(a,`xsrfHeaderName`)&&a.xsrfHeaderName;s.set(t,e)}S()}}}).catch(t=>{y&&=(n(q.from(t,null,e,y)),v(),null)})}else S()})},zr=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof q?t:new tr(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new q(`timeout of ${t}ms exceeded`,q.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{let t=U.getSafeProp(e,`unsubscribe`);U.isFunction(t)?t.call(e,i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{r||(e.aborted?i.call(e):e.addEventListener(`abort`,i,{once:!0}))});let{signal:s}=n;return s.unsubscribe=()=>U.asap(o),s},Br=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Vr=async function*(e,t){for await(let n of Hr(e))yield*Br(n,t)},Hr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Ur=(e,t,n,r)=>{let i=Vr(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Wr=`\r
|
|
7
|
+
`,Gr=e=>String(e).replace(/\r\n|\r|\n/g,Wr),Kr=e=>String(e).replace(/[\r\n"]/g,e=>e===`\r`?`%0D`:e===`
|
|
8
|
+
`?`%0A`:`%22`),qr=(e,t)=>{let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t&&(i===13||i===10)?(i===13&&e.charCodeAt(r+1)===10&&r++,n+=2):i<128?n++:i<2048?n+=2:i>=55296&&i<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3}return n},Jr=class extends TypeError{constructor(e,t){super(e),this.name=`FormDataError`,this.reason=t}};function Yr(e,t,n,r,i){if(!U.isFunction(t))throw new Jr(`Blob is not supported`,`blob`);if(!U.isString(i)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(i)||/ $/.test(i))throw new Jr(`Invalid multipart boundary`,`boundary`);let a=`--`+i+`--\r
|
|
9
|
+
`,o=a.length,s=[],c=e=>{if(o+e>n)throw r()};c(0);for(let[t,n]of e){let e=U.isString(n),r=e?qr(n,!0):n.size;if(!Number.isFinite(r)||r<0)throw new Jr(`Unsupported FormData part size`,`part`);c(r+qr(t,!0)+(!e&&n.name?qr(n.name,!1):0)+(!e&&n.type?qr(n.type,!1):0));let a=`--`+i+`\r
|
|
10
|
+
Content-Disposition: form-data; name="`+Kr(Gr(t))+`"`;e||(a+=`; filename="`+Kr(U.isString(n.name)?n.name:`blob`)+`"\r
|
|
11
|
+
Content-Type: `+String(n.type||`application/octet-stream`).replace(/[\r\n]/g,``)),a+=`\r
|
|
12
|
+
\r
|
|
13
|
+
`;let l=qr(a,!1)+r+2;c(l),o+=l,s.push({header:a,value:n,isString:e})}let l=[];for(let e of s)l.push(e.header,e.isString?Gr(e.value):e.value,Wr);return l.push(a),new t(l,{type:`multipart/form-data; boundary=`+i})}function Xr(e,t,n,r,i){if(!U.isFunction(t))throw new q(`Blob is not supported`,q.ERR_NOT_SUPPORT);if(i===void 0){if(U.isFunction(Y.generateString))i=`axios-`+Y.generateString(36,`0123456789abcdef`);else{let e=U.global.crypto;if(!e||!U.isFunction(e.getRandomValues))throw new q(`Random byte generation is not supported`,q.ERR_NOT_SUPPORT);let t=new Uint8Array(18);e.getRandomValues(t),i=`axios-`+Array.from(t,e=>(`0`+e.toString(16)).slice(-2)).join(``)}}try{return Yr(e,t,n,r,i)}catch(e){if(e instanceof Jr){let t=e.reason===`boundary`?q.ERR_BAD_OPTION_VALUE:q.ERR_BAD_REQUEST;throw new q(e.message,t)}throw e}}var Zr=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Qr=(e,t,n)=>t+2<n&&Zr(e.charCodeAt(t+1))&&Zr(e.charCodeAt(t+2)),$r=e=>e<=57?e-48:(e&223)-55,ei=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ti=e=>e===9||e===10||e===12||e===13||e===32,ni=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},ri=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},ii=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);o===37&&Qr(e,a,t)&&(o=$r(e.charCodeAt(a+1))*16+$r(e.charCodeAt(a+2)),a+=2),ti(o)||(o===61?r++:!ei(o)||r>0?i=!0:n++)}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?ri(e):ni(n)},ai=(e,t,n)=>{if(!e||typeof e!=`string`||!/^data:/i.test(e))return 0;let r=e.indexOf(`,`);if(r<0)return 0;let i=e.slice(5,r),a=e.slice(r+1);if(n.test(i))return t(a);let o=0;for(let e=0,t=a.length;e<t;e++){let n=a.charCodeAt(e);if(n===37&&Qr(a,e,t))o+=1,e+=2;else if(n<128)o+=1;else if(n<2048)o+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=a.charCodeAt(e+1);t>=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o};function oi(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return ai(t===-1?e:e.slice(0,t),ii,/; *base64[\t\n\f\r ]*$/i)}var si=`1.21.0`,ci=65536,li={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:ui}=U,di=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),fi=e=>{if(!U.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},pi=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mi=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},hi=e=>{let t=U.global!==void 0&&U.global!==null?U.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=U.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);let i=U.hasOwnProp(e,`fetch`)?e.fetch:void 0,{Request:a,Response:o,Blob:s}=e,c=i?ui(i):typeof fetch==`function`,l=ui(a),u=ui(o);if(!c)return!1;let d=c&&ui(n),f=c&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),p=l&&d&&pi(()=>{let e=!1,t=new a(Y.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),m=u&&d&&pi(()=>U.isReadableStream(new o(``).body)),h=Object.assign(Object.create(null),li);l&&!pi(()=>new a(Y.origin,h))&&(delete h.cache,pi(()=>new a(Y.origin,h))||(h.cache=li.cache));let g={stream:m&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!g[e]&&(g[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new q(`Response type '${e}' is not supported`,q.ERR_NOT_SUPPORT,n)})});let _=async e=>{if(e==null)return 0;if(U.isBlob(e))return e.size;if(U.isArrayBufferView(e)||U.isArrayBuffer(e))return e.byteLength;if(U.isURLSearchParams(e)&&(e+=``),U.isString(e))return(await f(e)).byteLength},v=async(e,t)=>U.toFiniteNumber(e.getContentLength())??_(t);return async e=>{let{url:t,method:n,data:c,signal:u,cancelToken:f,timeout:y,onDownloadProgress:b,onUploadProgress:x,responseType:S,headers:C,withCredentials:w=`same-origin`,fetchOptions:T,maxContentLength:E,maxBodyLength:ee,maxRedirects:te}=Lr(e),ne=U.isNumber(E)&&E>-1,re=U.isNumber(ee)&&ee>-1,ie=t=>U.hasOwnProp(e,t)?e[t]:void 0,ae=i||fetch;S=S?(S+``).toLowerCase():`text`;let D=zr([u,f&&f.toAbortSignal()],y),O=null,oe=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),k,se=null,ce=null,le=()=>new q(`Request body larger than maxBodyLength limit`,q.ERR_BAD_REQUEST,e,O);try{let i,u=ie(`auth`);u&&(i={username:U.getSafeProp(u,`username`)||``,password:U.getSafeProp(u,`password`)||``});let f;if(mi(t)&&(f=new URL(t,Y.origin),!i&&(f.username||f.password)&&(i={username:fi(f.username),password:fi(f.password)}),(f.username||f.password)&&(f.username=``,f.password=``,t=f.href)),i&&(C.delete(`authorization`),C.set(`Authorization`,`Basic `+btoa(di((i.username||``)+`:`+(i.password||``))))),ne&&f&&f.protocol===`data:`&&oi(f.href)>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,O);let y=U.isSpecCompliantForm(c)&&G.from(ie(`headers`)).getContentType(),ue;if(U.isString(y)&&/^multipart\/form-data(?:\s*;|$)/i.test(y.trim())){let e=G.parseParameters(y);U.hasOwnProp(e,`boundary`)&&(ue=e.boundary)}if(U.isSpecCompliantForm(c)&&n!==`get`&&n!==`head`&&(re||x&&p||ue!==void 0)&&(c=Xr(c,s,re?ee:1/0,le,ue),C.setContentType(ue===void 0?c.type:y),k=c.size),re&&n!==`get`&&n!==`head`){let e=await _(c);if(typeof e==`number`&&isFinite(e)&&(k=e,e>ee))throw le()}let A=re&&(U.isReadableStream(c)||U.isStream(c)),de=(e,t,n)=>Ur(e,ci,e=>{if(re&&e>ee)throw se=le();t&&t(e)},n);if(p&&n!==`get`&&n!==`head`&&(x||A)){if(k??=await v(C,c),k!==0||A){let e=new a(t,{method:`POST`,body:c,duplex:`half`}),n;if(U.isFormData(c)&&(n=e.headers.get(`content-type`))&&C.setContentType(n),e.body){let[t,n]=x&&dr(k,ur(fr(x)))||[];c=de(e.body,t,n)}}}else if(A&&!l&&d&&n!==`get`&&n!==`head`)c=de(c);else if(A&&l&&!p&&n!==`get`&&n!==`head`)throw new q(`Stream request bodies are not supported by the current fetch implementation`,q.ERR_NOT_SUPPORT,e,O);U.isString(w)||(w=w?`include`:`omit`);let fe=l&&`credentials`in a.prototype;if(U.isFormData(c)){let e=C.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&C.delete(`content-type`)}C.set(`User-Agent`,`axios/`+si,!1);let j=T==null?T:Object.assign(Object.create(null),T);j&&(delete j.body,delete j.headers,delete j.method,delete j.signal,delete j.duplex,delete j.credentials);let M=Object.assign(Object.create(null),j,{signal:D,method:n.toUpperCase(),headers:qt(C.normalize()),body:c,duplex:`half`,credentials:fe?w:void 0});l&&(U.forEach(h,(e,t)=>{M[t]===void 0&&(M[t]=e)}),M.signal===void 0&&(M.signal=null),M.body===void 0&&(M.body=null)),te===0&&(M.redirect=`manual`,j&&(j.redirect=`manual`)),O=l&&new a(t,M);let pe=await(l?ae(O,j):ae(t,M)),me=G.from(pe.headers);if(ne){let t=U.toFiniteNumber(me.getContentLength());if(t!=null&&t>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,O)}let he=m&&(S===`stream`||S===`response`);if(m&&pe.body&&(b||ne||he&&oe)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=pe[e]});let n=U.toFiniteNumber(me.getContentLength()),[r,i]=b&&dr(n,ur(fr(b),!0))||[],a=0;pe=new o(Ur(pe.body,ci,t=>{if(ne&&(a=t,a>E))throw ce=new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),oe&&oe()}),t)}S||=`text`;let N=await g[U.findKey(g,S)||`text`](pe,e);if(ne&&!m&&!he){let t;if(N!=null&&(typeof N.byteLength==`number`?t=N.byteLength:typeof N.size==`number`?t=N.size:typeof N==`string`&&(t=typeof r==`function`?new r().encode(N).byteLength:N.length)),typeof t==`number`&&t>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,O)}return!he&&oe&&oe(),await new Promise((t,n)=>{nr(t,n,{data:N,headers:G.from(pe.headers),status:pe.status,statusText:pe.statusText,config:e,request:O})})}catch(t){if(oe&&oe(),D&&D.aborted&&D.reason instanceof q){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(se)throw O&&!se.request&&(se.request=O),se;if(ce)throw ce;if(t instanceof q)throw O&&!t.request&&(t.request=O),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new q(`Network Error`,q.ERR_NETWORK,e,O,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw q.from(t,t&&t.code,e,O,t&&t.response)}}},gi=new Map,_i=e=>{let t=Object.create(null),n=e&&U.hasOwnProp(e,`env`)&&e.env;[`fetch`,`Request`,`Response`,`Blob`].forEach(e=>{n&&U.hasOwnProp(n,e)&&(t[e]=n[e])});let{fetch:r,Request:i,Response:a,Blob:o}=t,s=[i,a,r,o],c=s.length,l,u,d=gi;for(;c--;)l=s[c],u=d.get(l),u===void 0&&d.set(l,u=c?new Map:hi(t)),d=u;return u};_i();var vi={http:null,xhr:Rr,fetch:{get:_i}};U.forEach(vi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var yi=e=>`- ${e}`,bi=e=>U.isFunction(e)||e===null||e===!1;function xi(e,t){e=U.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!bi(r)&&(i=vi[(n=String(r)).toLowerCase()],i===void 0))throw new q(`Unknown adapter '${n}'`);if(i&&(U.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new q(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
14
|
+
`+e.map(yi).join(`
|
|
15
|
+
`):` `+yi(e[0]):`as no adapter specified`),q.ERR_NOT_SUPPORT)}return i}var Si={getAdapter:xi,adapters:vi};function Ci(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tr(null,e)}function wi(e){return Math.max(0,Date.now()-e)}function Ti(e){let t=U.toSafeFlatObject(e);Ci(t),t.headers=G.from(U.getSafeProp(t,`headers`)),t.data=$n.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1);let n=Si.getAdapter(t.adapter||Qn.adapter,t),r=Date.now();return n(t).then(function(e){Ci(t),e.duration=wi(r),t.response=e;try{e.data=$n.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=G.from(e.headers),e},function(e){if(!er(e)&&(Ci(t),e&&e.response)){e.response.duration=wi(r),t.response=e.response;try{e.response.data=$n.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=G.from(e.response.headers)}return Promise.reject(e)})}var Ei={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Ei[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Di={};Ei.transitional=function(e,t,n){function r(e,t){return`[Axios v`+si+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new q(r(i,` has been removed`+(t?` in `+t:``)),q.ERR_DEPRECATED);return t&&!Di[i]&&(Di[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},Ei.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Oi(e,t,n){if(typeof e!=`object`||!e)throw new q(`options must be an object`,q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new q(`option `+a+` must be `+n,q.ERR_BAD_OPTION_VALUE)}else if(n!==!0)throw new q(`Unknown option `+a,q.ERR_BAD_OPTION)}}var ki={assertOptions:Oi,validators:Ei},Q=ki.validators,Ai=e=>{if(e==null||U.isPlainObject(e)||e instanceof G)return!0;try{return U.isObject(e)&&U.getSafeProp(e,Symbol.toStringTag)===`AxiosHeaders`&&[`toJSON`,`set`,`get`,`has`,`delete`,`clear`,`normalize`,`concat`,`toString`,Symbol.iterator].every(t=>U.isFunction(U.getSafeProp(e,t)))}catch{return!1}},ji=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Mn,response:new Mn}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(`
|
|
16
|
+
`);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(`
|
|
17
|
+
`),n=t===-1?-1:r.indexOf(`
|
|
18
|
+
`,t+1),i=n===-1?r:r.slice(n+1),a=String(e.stack),o=hn(e,a),s=o===-1?a:a.slice(0,o),c=o===-1?``:a.slice(o);s.endsWith(i)||(e.stack=s+`
|
|
19
|
+
`+r+c)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Mr(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&ki.assertOptions(n,{silentJSONParsing:Q.transitional(Q.boolean),forcedJSONParsing:Q.transitional(Q.boolean),clarifyTimeoutError:Q.transitional(Q.boolean),legacyInterceptorReqResOrdering:Q.transitional(Q.boolean),advertiseZstdAcceptEncoding:Q.transitional(Q.boolean),validateStatusUndefinedResolves:Q.transitional(Q.boolean),encodeBasicAuthUsername:Q.transitional(Q.boolean)},!1),r!=null&&(U.isFunction(r)?t.paramsSerializer={serialize:r}:ki.assertOptions(r,{encode:Q.function,serialize:Q.function},!0)),t.allowAbsoluteUrls!==void 0||(U.hasOwnProp(this.defaults,`allowAbsoluteUrls`)&&this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ki.assertOptions(t,{baseUrl:Q.spelling(`baseURL`),withXsrfToken:Q.spelling(`withXSRFToken`)},!0),t.method=(U.getSafeProp(t,`method`)||U.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=U.getSafeProp(i,`common`),o=U.getSafeProp(i,t.method),s=i&&U.merge(Ai(a)?a:void 0,Ai(o)?o:void 0);i&&U.forEach(Yn.concat(`common`),e=>{Ai(U.getSafeProp(i,e))&&delete i[e]}),t.headers=G.concat(s,i);let c=[],l=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;l&&=e.synchronous;let n=t.transitional||Nn;n&&n.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d,f=0,p;if(!l){let e=[Ti.bind(this),void 0];for(e.unshift(...c),e.push(...u),p=e.length,d=Promise.resolve(t);f<p;)d=d.then(e[f++],e[f++]);return d}p=c.length;let m=t;for(;f<p;){let e=c[f++],t=c[f++];try{m=e?e(m):m}catch(e){if(!t){d=Promise.reject(e);break}try{let n=t.call(this,e);U.isThenable(n)&&(d=Promise.resolve(n).then(()=>Ti.call(this,m)))}catch(e){d=Promise.reject(e)}break}}if(!d)try{d=Ti.call(this,m)}catch(e){d=Promise.reject(e)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(e){return e=Mr(this.defaults,e),En(yr(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};U.forEach([`delete`,`get`,`head`,`options`],function(e){ji.prototype[e]=async function(t,n){return this.request(Mr(n||{},{method:e,url:t,data:n&&U.hasOwnProp(n,`data`)?n.data:void 0}))}}),U.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return async function(n,r,i){return this.request(Mr(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}ji.prototype[e]=t(),e!==`query`&&(ji.prototype[e+`Form`]=t(!0))});var Mi=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new tr(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Ni(e){return function(t){return e.apply(null,t)}}function Pi(e){return U.isObject(e)&&e.isAxiosError===!0}var Fi={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fi).forEach(([e,t])=>{Fi[t]===void 0&&(Fi[t]=e)});function Ii(e){let t=new ji(e),n=Ee(ji.prototype.request,t);return U.extend(n,ji.prototype,t,{allOwnKeys:!0}),U.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Ii(Mr(e,t))},n}var $=Ii(Qn);$.Axios=ji,$.CanceledError=tr,$.CancelToken=Mi,$.isCancel=er,$.VERSION=si,$.toFormData=xn,$.AxiosError=q,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Ni,$.isAxiosError=Pi,$.mergeConfig=Mr,$.AxiosHeaders=G,$.formToJSON=e=>Jn(U.isHTMLForm(e)?new FormData(e):e),$.getAdapter=Si.getAdapter,$.HttpStatusCode=Fi,$.default=$;var Li=c({local:()=>Vi,session:()=>Hi}),Ri=class{storage;constructor(e){this.storage=e}getRaw(e,t=null){return this.storage?.getItem(e)??t}setRaw(e,t){this.storage?.setItem(e,t)}get(e,t=null){let n=this.getRaw(e);return n?F(n):t}set(e,t){this.setRaw(e,xe(t))}del(e){this.storage?.removeItem(e)}clear(){this.storage?.clear()}},zi=typeof localStorage>`u`?void 0:localStorage,Bi=typeof sessionStorage>`u`?void 0:sessionStorage,Vi=new Ri(zi),Hi=new Ri(Bi),Ui=`access_token`,Wi=(e,t=`请求异常.`)=>e?.message??e?.msg??t,Gi=$.create({baseURL:``,timeout:3e3}),Ki=()=>Gi.interceptors.request.use(e=>{let t=Vi.get(Ui);return t&&(e.headers.Authorization=`Bearer ${t}`),e}),qi=e=>Gi.interceptors.response.use(t=>{let n=t.data;if(t.status<200||t.status>=300){let t=Error(Wi(n));return e?e(t):Promise.reject(t)}return n&&typeof n==`object`&&`data`in n?n.data:n},t=>e?e(t):Promise.reject(t)),Ji=!1,Yi=[],Xi=async(e,t)=>{let n=e?.response;if(!n?.config)return Promise.reject(e);let r=n.config;if(r._skipRetry||r._retry)return Promise.reject(e);if(r._retry=!0,Ji)return new Promise((e,t)=>Yi.push({config:r,resolve:e,reject:t}));Ji=!0;try{await t();let e=Yi;return Yi=[],e.forEach(({config:e,resolve:t,reject:n})=>{Gi(e).then(t,n)}),Gi(r)}catch(e){let t=Yi;return Yi=[],t.forEach(({reject:t})=>t(e)),Promise.reject(e)}finally{Ji=!1}},Zi=c({ACCESS_TOKEN:()=>Ui,axios:()=>Gi,download:()=>ea,get:()=>Qi,message:()=>Wi,post:()=>$i,request:()=>ta,responseInterceptor:()=>qi,retry:()=>Xi,tokenRequestInterceptor:()=>Ki}),Qi=(e,t)=>ta({url:e,method:`GET`,params:t}),$i=(e,t)=>ta({url:e,method:`POST`,data:t}),ea=e=>(e.responseType??=`blob`,ta(e)),ta=e=>(e.headers={"Content-Type":`application/json`,...e.headers},Gi.request(e)),na=c({fail:()=>aa,loadModules:()=>oa,log:()=>ia,sleep:()=>ra}),ra=e=>new Promise(t=>setTimeout(t,e)),ia=(e,t)=>{t?console.log(t,e):console.log(e)},aa=e=>{throw Error(e)},oa=async e=>{let t={};for(let n in e){let r=await e[n](),i=n.split(`/`).pop()?.split(`.`).shift()??``;t[i]=r.default??r}return t},sa=c({open:()=>ua,params:()=>la,search:()=>ca}),ca=()=>new URLSearchParams(location.search),la=()=>Object.fromEntries(ca().entries()),ua=(e,t,n)=>(t??=`_blank`,window.open(e,t,n));Object.defineProperty(e,"array",{enumerable:!0,get:function(){return d}}),Object.defineProperty(e,"blob",{enumerable:!0,get:function(){return m}}),Object.defineProperty(e,"database",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(e,"date",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(e,"http",{enumerable:!0,get:function(){return Zi}}),Object.defineProperty(e,"json",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(e,"storage",{enumerable:!0,get:function(){return Li}}),Object.defineProperty(e,"system",{enumerable:!0,get:function(){return na}}),Object.defineProperty(e,"url",{enumerable:!0,get:function(){return sa}})});
|