@zh-keyboard/react
Version:
基于React的中文虚拟键盘组件
44 lines • 172 kB
JavaScript
(function(se,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],M):(se=typeof globalThis<"u"?globalThis:se||self,M(se.ZhKeyboardReact={},se.React,se.ReactDOM))})(this,function(se,M,mt){"use strict";var fm=Object.defineProperty;var hm=(se,M,mt)=>M in se?fm(se,M,{enumerable:!0,configurable:!0,writable:!0,value:mt}):se[M]=mt;var xe=(se,M,mt)=>hm(se,typeof M!="symbol"?M+"":M,mt);var ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hr(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var rn={exports:{}},Dt={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gr;function Oi(){if(Gr)return Dt;Gr=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(h,j,x){var w=null;if(x!==void 0&&(w=""+x),j.key!==void 0&&(w=""+j.key),"key"in j){x={};for(var E in j)E!=="key"&&(x[E]=j[E])}else x=j;return j=x.ref,{$$typeof:a,type:h,key:w,ref:j!==void 0?j:null,props:x}}return Dt.Fragment=s,Dt.jsx=l,Dt.jsxs=l,Dt}var It={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Yr;function Ci(){return Yr||(Yr=1,process.env.NODE_ENV!=="production"&&function(){function a(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===_t?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case W:return"Fragment";case ae:return"Profiler";case re:return"StrictMode";case ie:return"Suspense";case pe:return"SuspenseList";case Ce:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case X:return"Portal";case Ae:return(P.displayName||"Context")+".Provider";case he:return(P._context.displayName||"Context")+".Consumer";case ge:var Q=P.render;return P=P.displayName,P||(P=Q.displayName||Q.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case ce:return Q=P.displayName||null,Q!==null?Q:a(P.type)||"Memo";case Fe:Q=P._payload,P=P._init;try{return a(P(Q))}catch{}}return null}function s(P){return""+P}function l(P){try{s(P);var Q=!1}catch{Q=!0}if(Q){Q=console;var le=Q.error,ve=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return le.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ve),s(P)}}function h(P){if(P===W)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===Fe)return"<...>";try{var Q=a(P);return Q?"<"+Q+">":"<...>"}catch{return"<...>"}}function j(){var P=wt.A;return P===null?null:P.getOwner()}function x(){return Error("react-stack-top-frame")}function w(P){if(We.call(P,"key")){var Q=Object.getOwnPropertyDescriptor(P,"key").get;if(Q&&Q.isReactWarning)return!1}return P.key!==void 0}function E(P,Q){function le(){xt||(xt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Q))}le.isReactWarning=!0,Object.defineProperty(P,"key",{get:le,configurable:!0})}function T(){var P=a(this.type);return kt[P]||(kt[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function q(P,Q,le,ve,De,je,Ne,it){return le=je.ref,P={$$typeof:F,type:P,key:Q,props:je,_owner:De},(le!==void 0?le:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:T}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ne}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:it}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function Y(P,Q,le,ve,De,je,Ne,it){var be=Q.children;if(be!==void 0)if(ve)if(qe(be)){for(ve=0;ve<be.length;ve++)U(be[ve]);Object.freeze&&Object.freeze(be)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else U(be);if(We.call(Q,"key")){be=a(P);var V=Object.keys(Q).filter(function(St){return St!=="key"});ve=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",Ue[be+ve]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,ve,be,V,be),Ue[be+ve]=!0)}if(be=null,le!==void 0&&(l(le),be=""+le),w(Q)&&(l(Q.key),be=""+Q.key),"key"in Q){le={};for(var Et in Q)Et!=="key"&&(le[Et]=Q[Et])}else le=Q;return be&&E(le,typeof P=="function"?P.displayName||P.name||"Unknown":P),q(P,be,je,De,j(),le,Ne,it)}function U(P){typeof P=="object"&&P!==null&&P.$$typeof===F&&P._store&&(P._store.validated=1)}var H=M,F=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),he=Symbol.for("react.consumer"),Ae=Symbol.for("react.context"),ge=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),Fe=Symbol.for("react.lazy"),Ce=Symbol.for("react.activity"),_t=Symbol.for("react.client.reference"),wt=H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,We=Object.prototype.hasOwnProperty,qe=Array.isArray,qt=console.createTask?console.createTask:function(){return null};H={"react-stack-bottom-frame":function(P){return P()}};var xt,kt={},mn=H["react-stack-bottom-frame"].bind(H,x)(),Ie=qt(h(x)),Ue={};It.Fragment=W,It.jsx=function(P,Q,le,ve,De){var je=1e4>wt.recentlyCreatedOwnerStacks++;return Y(P,Q,le,!1,ve,De,je?Error("react-stack-top-frame"):mn,je?qt(h(P)):Ie)},It.jsxs=function(P,Q,le,ve,De){var je=1e4>wt.recentlyCreatedOwnerStacks++;return Y(P,Q,le,!0,ve,De,je?Error("react-stack-top-frame"):mn,je?qt(h(P)):Ie)}}()),It}var Wr;function Ti(){return Wr||(Wr=1,process.env.NODE_ENV==="production"?rn.exports=Oi():rn.exports=Ci()),rn.exports}var A=Ti(),Xr=typeof global=="object"&&global&&global.Object===Object&&global,Pi=typeof self=="object"&&self&&self.Object===Object&&self,Me=Xr||Pi||Function("return this")(),gt=Me.Symbol,Zr=Object.prototype,Ai=Zr.hasOwnProperty,Ri=Zr.toString,Nt=gt?gt.toStringTag:void 0;function Di(a){var s=Ai.call(a,Nt),l=a[Nt];try{a[Nt]=void 0;var h=!0}catch{}var j=Ri.call(a);return h&&(s?a[Nt]=l:delete a[Nt]),j}var Ii=Object.prototype,Ni=Ii.toString;function zi(a){return Ni.call(a)}var Ki="[object Null]",Li="[object Undefined]",Qr=gt?gt.toStringTag:void 0;function zt(a){return a==null?a===void 0?Li:Ki:Qr&&Qr in Object(a)?Di(a):zi(a)}function Kt(a){return a!=null&&typeof a=="object"}var an=Array.isArray;function Jr(a){var s=typeof a;return a!=null&&(s=="object"||s=="function")}var Mi="[object AsyncFunction]",Bi="[object Function]",Fi="[object GeneratorFunction]",qi="[object Proxy]";function $r(a){if(!Jr(a))return!1;var s=zt(a);return s==Bi||s==Fi||s==Mi||s==qi}var Vn=Me["__core-js_shared__"],ea=function(){var a=/[^.]+$/.exec(Vn&&Vn.keys&&Vn.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function Ui(a){return!!ea&&ea in a}var Vi=Function.prototype,Hi=Vi.toString;function nt(a){if(a!=null){try{return Hi.call(a)}catch{}try{return a+""}catch{}}return""}var Gi=/[\\^$.*+?()[\]{}|]/g,Yi=/^\[object .+?Constructor\]$/,Wi=Function.prototype,Xi=Object.prototype,Zi=Wi.toString,Qi=Xi.hasOwnProperty,Ji=RegExp("^"+Zi.call(Qi).replace(Gi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $i(a){if(!Jr(a)||Ui(a))return!1;var s=$r(a)?Ji:Yi;return s.test(nt(a))}function eo(a,s){return a==null?void 0:a[s]}function bt(a,s){var l=eo(a,s);return $i(l)?l:void 0}var Hn=bt(Me,"WeakMap"),to=9007199254740991,no=/^(?:0|[1-9]\d*)$/;function ro(a,s){var l=typeof a;return s=s??to,!!s&&(l=="number"||l!="symbol"&&no.test(a))&&a>-1&&a%1==0&&a<s}function ta(a,s){return a===s||a!==a&&s!==s}var ao=9007199254740991;function na(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=ao}function io(a){return a!=null&&na(a.length)&&!$r(a)}var oo=Object.prototype;function so(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||oo;return a===l}function uo(a,s){for(var l=-1,h=Array(a);++l<a;)h[l]=s(l);return h}var co="[object Arguments]";function ra(a){return Kt(a)&&zt(a)==co}var aa=Object.prototype,lo=aa.hasOwnProperty,fo=aa.propertyIsEnumerable,ho=ra(function(){return arguments}())?ra:function(a){return Kt(a)&&lo.call(a,"callee")&&!fo.call(a,"callee")};function vo(){return!1}var ia=typeof se=="object"&&se&&!se.nodeType&&se,oa=ia&&typeof module=="object"&&module&&!module.nodeType&&module,po=oa&&oa.exports===ia,sa=po?Me.Buffer:void 0,yo=sa?sa.isBuffer:void 0,Gn=yo||vo,mo="[object Arguments]",go="[object Array]",bo="[object Boolean]",_o="[object Date]",wo="[object Error]",xo="[object Function]",ko="[object Map]",Eo="[object Number]",So="[object Object]",jo="[object RegExp]",Oo="[object Set]",Co="[object String]",To="[object WeakMap]",Po="[object ArrayBuffer]",Ao="[object DataView]",Ro="[object Float32Array]",Do="[object Float64Array]",Io="[object Int8Array]",No="[object Int16Array]",zo="[object Int32Array]",Ko="[object Uint8Array]",Lo="[object Uint8ClampedArray]",Mo="[object Uint16Array]",Bo="[object Uint32Array]",ue={};ue[Ro]=ue[Do]=ue[Io]=ue[No]=ue[zo]=ue[Ko]=ue[Lo]=ue[Mo]=ue[Bo]=!0,ue[mo]=ue[go]=ue[Po]=ue[bo]=ue[Ao]=ue[_o]=ue[wo]=ue[xo]=ue[ko]=ue[Eo]=ue[So]=ue[jo]=ue[Oo]=ue[Co]=ue[To]=!1;function Fo(a){return Kt(a)&&na(a.length)&&!!ue[zt(a)]}function qo(a){return function(s){return a(s)}}var ua=typeof se=="object"&&se&&!se.nodeType&&se,Lt=ua&&typeof module=="object"&&module&&!module.nodeType&&module,Uo=Lt&&Lt.exports===ua,Yn=Uo&&Xr.process,ca=function(){try{var a=Lt&&Lt.require&&Lt.require("util").types;return a||Yn&&Yn.binding&&Yn.binding("util")}catch{}}(),la=ca&&ca.isTypedArray,fa=la?qo(la):Fo,Vo=Object.prototype,Ho=Vo.hasOwnProperty;function Go(a,s){var l=an(a),h=!l&&ho(a),j=!l&&!h&&Gn(a),x=!l&&!h&&!j&&fa(a),w=l||h||j||x,E=w?uo(a.length,String):[],T=E.length;for(var q in a)Ho.call(a,q)&&!(w&&(q=="length"||j&&(q=="offset"||q=="parent")||x&&(q=="buffer"||q=="byteLength"||q=="byteOffset")||ro(q,T)))&&E.push(q);return E}function Yo(a,s){return function(l){return a(s(l))}}var Wo=Yo(Object.keys,Object),Xo=Object.prototype,Zo=Xo.hasOwnProperty;function Qo(a){if(!so(a))return Wo(a);var s=[];for(var l in Object(a))Zo.call(a,l)&&l!="constructor"&&s.push(l);return s}function Jo(a){return io(a)?Go(a):Qo(a)}var Mt=bt(Object,"create");function $o(){this.__data__=Mt?Mt(null):{},this.size=0}function es(a){var s=this.has(a)&&delete this.__data__[a];return this.size-=s?1:0,s}var ts="__lodash_hash_undefined__",ns=Object.prototype,rs=ns.hasOwnProperty;function as(a){var s=this.__data__;if(Mt){var l=s[a];return l===ts?void 0:l}return rs.call(s,a)?s[a]:void 0}var is=Object.prototype,os=is.hasOwnProperty;function ss(a){var s=this.__data__;return Mt?s[a]!==void 0:os.call(s,a)}var us="__lodash_hash_undefined__";function cs(a,s){var l=this.__data__;return this.size+=this.has(a)?0:1,l[a]=Mt&&s===void 0?us:s,this}function rt(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var h=a[s];this.set(h[0],h[1])}}rt.prototype.clear=$o,rt.prototype.delete=es,rt.prototype.get=as,rt.prototype.has=ss,rt.prototype.set=cs;function ls(){this.__data__=[],this.size=0}function on(a,s){for(var l=a.length;l--;)if(ta(a[l][0],s))return l;return-1}var fs=Array.prototype,hs=fs.splice;function ds(a){var s=this.__data__,l=on(s,a);if(l<0)return!1;var h=s.length-1;return l==h?s.pop():hs.call(s,l,1),--this.size,!0}function vs(a){var s=this.__data__,l=on(s,a);return l<0?void 0:s[l][1]}function ps(a){return on(this.__data__,a)>-1}function ys(a,s){var l=this.__data__,h=on(l,a);return h<0?(++this.size,l.push([a,s])):l[h][1]=s,this}function Be(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var h=a[s];this.set(h[0],h[1])}}Be.prototype.clear=ls,Be.prototype.delete=ds,Be.prototype.get=vs,Be.prototype.has=ps,Be.prototype.set=ys;var Bt=bt(Me,"Map");function ms(){this.size=0,this.__data__={hash:new rt,map:new(Bt||Be),string:new rt}}function gs(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function sn(a,s){var l=a.__data__;return gs(s)?l[typeof s=="string"?"string":"hash"]:l.map}function bs(a){var s=sn(this,a).delete(a);return this.size-=s?1:0,s}function _s(a){return sn(this,a).get(a)}function ws(a){return sn(this,a).has(a)}function xs(a,s){var l=sn(this,a),h=l.size;return l.set(a,s),this.size+=l.size==h?0:1,this}function at(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var h=a[s];this.set(h[0],h[1])}}at.prototype.clear=ms,at.prototype.delete=bs,at.prototype.get=_s,at.prototype.has=ws,at.prototype.set=xs;function ks(a,s){for(var l=-1,h=s.length,j=a.length;++l<h;)a[j+l]=s[l];return a}function Es(){this.__data__=new Be,this.size=0}function Ss(a){var s=this.__data__,l=s.delete(a);return this.size=s.size,l}function js(a){return this.__data__.get(a)}function Os(a){return this.__data__.has(a)}var Cs=200;function Ts(a,s){var l=this.__data__;if(l instanceof Be){var h=l.__data__;if(!Bt||h.length<Cs-1)return h.push([a,s]),this.size=++l.size,this;l=this.__data__=new at(h)}return l.set(a,s),this.size=l.size,this}function Ge(a){var s=this.__data__=new Be(a);this.size=s.size}Ge.prototype.clear=Es,Ge.prototype.delete=Ss,Ge.prototype.get=js,Ge.prototype.has=Os,Ge.prototype.set=Ts;function Ps(a,s){for(var l=-1,h=a==null?0:a.length,j=0,x=[];++l<h;){var w=a[l];s(w,l,a)&&(x[j++]=w)}return x}function As(){return[]}var Rs=Object.prototype,Ds=Rs.propertyIsEnumerable,ha=Object.getOwnPropertySymbols,Is=ha?function(a){return a==null?[]:(a=Object(a),Ps(ha(a),function(s){return Ds.call(a,s)}))}:As;function Ns(a,s,l){var h=s(a);return an(a)?h:ks(h,l(a))}function da(a){return Ns(a,Jo,Is)}var Wn=bt(Me,"DataView"),Xn=bt(Me,"Promise"),Zn=bt(Me,"Set"),va="[object Map]",zs="[object Object]",pa="[object Promise]",ya="[object Set]",ma="[object WeakMap]",ga="[object DataView]",Ks=nt(Wn),Ls=nt(Bt),Ms=nt(Xn),Bs=nt(Zn),Fs=nt(Hn),Ye=zt;(Wn&&Ye(new Wn(new ArrayBuffer(1)))!=ga||Bt&&Ye(new Bt)!=va||Xn&&Ye(Xn.resolve())!=pa||Zn&&Ye(new Zn)!=ya||Hn&&Ye(new Hn)!=ma)&&(Ye=function(a){var s=zt(a),l=s==zs?a.constructor:void 0,h=l?nt(l):"";if(h)switch(h){case Ks:return ga;case Ls:return va;case Ms:return pa;case Bs:return ya;case Fs:return ma}return s});var ba=Me.Uint8Array,qs="__lodash_hash_undefined__";function Us(a){return this.__data__.set(a,qs),this}function Vs(a){return this.__data__.has(a)}function un(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new at;++s<l;)this.add(a[s])}un.prototype.add=un.prototype.push=Us,un.prototype.has=Vs;function Hs(a,s){for(var l=-1,h=a==null?0:a.length;++l<h;)if(s(a[l],l,a))return!0;return!1}function Gs(a,s){return a.has(s)}var Ys=1,Ws=2;function _a(a,s,l,h,j,x){var w=l&Ys,E=a.length,T=s.length;if(E!=T&&!(w&&T>E))return!1;var q=x.get(a),Y=x.get(s);if(q&&Y)return q==s&&Y==a;var U=-1,H=!0,F=l&Ws?new un:void 0;for(x.set(a,s),x.set(s,a);++U<E;){var X=a[U],W=s[U];if(h)var re=w?h(W,X,U,s,a,x):h(X,W,U,a,s,x);if(re!==void 0){if(re)continue;H=!1;break}if(F){if(!Hs(s,function(ae,he){if(!Gs(F,he)&&(X===ae||j(X,ae,l,h,x)))return F.push(he)})){H=!1;break}}else if(!(X===W||j(X,W,l,h,x))){H=!1;break}}return x.delete(a),x.delete(s),H}function Xs(a){var s=-1,l=Array(a.size);return a.forEach(function(h,j){l[++s]=[j,h]}),l}function Zs(a){var s=-1,l=Array(a.size);return a.forEach(function(h){l[++s]=h}),l}var Qs=1,Js=2,$s="[object Boolean]",eu="[object Date]",tu="[object Error]",nu="[object Map]",ru="[object Number]",au="[object RegExp]",iu="[object Set]",ou="[object String]",su="[object Symbol]",uu="[object ArrayBuffer]",cu="[object DataView]",wa=gt?gt.prototype:void 0,Qn=wa?wa.valueOf:void 0;function lu(a,s,l,h,j,x,w){switch(l){case cu:if(a.byteLength!=s.byteLength||a.byteOffset!=s.byteOffset)return!1;a=a.buffer,s=s.buffer;case uu:return!(a.byteLength!=s.byteLength||!x(new ba(a),new ba(s)));case $s:case eu:case ru:return ta(+a,+s);case tu:return a.name==s.name&&a.message==s.message;case au:case ou:return a==s+"";case nu:var E=Xs;case iu:var T=h&Qs;if(E||(E=Zs),a.size!=s.size&&!T)return!1;var q=w.get(a);if(q)return q==s;h|=Js,w.set(a,s);var Y=_a(E(a),E(s),h,j,x,w);return w.delete(a),Y;case su:if(Qn)return Qn.call(a)==Qn.call(s)}return!1}var fu=1,hu=Object.prototype,du=hu.hasOwnProperty;function vu(a,s,l,h,j,x){var w=l&fu,E=da(a),T=E.length,q=da(s),Y=q.length;if(T!=Y&&!w)return!1;for(var U=T;U--;){var H=E[U];if(!(w?H in s:du.call(s,H)))return!1}var F=x.get(a),X=x.get(s);if(F&&X)return F==s&&X==a;var W=!0;x.set(a,s),x.set(s,a);for(var re=w;++U<T;){H=E[U];var ae=a[H],he=s[H];if(h)var Ae=w?h(he,ae,H,s,a,x):h(ae,he,H,a,s,x);if(!(Ae===void 0?ae===he||j(ae,he,l,h,x):Ae)){W=!1;break}re||(re=H=="constructor")}if(W&&!re){var ge=a.constructor,ie=s.constructor;ge!=ie&&"constructor"in a&&"constructor"in s&&!(typeof ge=="function"&&ge instanceof ge&&typeof ie=="function"&&ie instanceof ie)&&(W=!1)}return x.delete(a),x.delete(s),W}var pu=1,xa="[object Arguments]",ka="[object Array]",cn="[object Object]",yu=Object.prototype,Ea=yu.hasOwnProperty;function mu(a,s,l,h,j,x){var w=an(a),E=an(s),T=w?ka:Ye(a),q=E?ka:Ye(s);T=T==xa?cn:T,q=q==xa?cn:q;var Y=T==cn,U=q==cn,H=T==q;if(H&&Gn(a)){if(!Gn(s))return!1;w=!0,Y=!1}if(H&&!Y)return x||(x=new Ge),w||fa(a)?_a(a,s,l,h,j,x):lu(a,s,T,l,h,j,x);if(!(l&pu)){var F=Y&&Ea.call(a,"__wrapped__"),X=U&&Ea.call(s,"__wrapped__");if(F||X){var W=F?a.value():a,re=X?s.value():s;return x||(x=new Ge),j(W,re,l,h,x)}}return H?(x||(x=new Ge),vu(a,s,l,h,j,x)):!1}function Sa(a,s,l,h,j){return a===s?!0:a==null||s==null||!Kt(a)&&!Kt(s)?a!==a&&s!==s:mu(a,s,l,h,Sa,j)}function gu(a,s){return Sa(a,s)}/*! js-cookie v3.0.5 | MIT */function ln(a){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var h in l)a[h]=l[h]}return a}var bu={read:function(a){return a[0]==='"'&&(a=a.slice(1,-1)),a.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(a){return encodeURIComponent(a).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Jn(a,s){function l(j,x,w){if(!(typeof document>"u")){w=ln({},s,w),typeof w.expires=="number"&&(w.expires=new Date(Date.now()+w.expires*864e5)),w.expires&&(w.expires=w.expires.toUTCString()),j=encodeURIComponent(j).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var E="";for(var T in w)w[T]&&(E+="; "+T,w[T]!==!0&&(E+="="+w[T].split(";")[0]));return document.cookie=j+"="+a.write(x,j)+E}}function h(j){if(!(typeof document>"u"||arguments.length&&!j)){for(var x=document.cookie?document.cookie.split("; "):[],w={},E=0;E<x.length;E++){var T=x[E].split("="),q=T.slice(1).join("=");try{var Y=decodeURIComponent(T[0]);if(w[Y]=a.read(q,Y),j===Y)break}catch{}}return j?w[j]:w}}return Object.create({set:l,get:h,remove:function(j,x){l(j,"",ln({},x,{expires:-1}))},withAttributes:function(j){return Jn(this.converter,ln({},this.attributes,j))},withConverter:function(j){return Jn(ln({},this.converter,j),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(a)}})}Jn(bu,{path:"/"});var $n={exports:{}};/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/var ja;function _u(){return ja||(ja=1,function(a){(function(){var s=typeof window<"u"&&typeof window.document<"u"?window.document:{},l=a.exports,h=function(){for(var w,E=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],T=0,q=E.length,Y={};T<q;T++)if(w=E[T],w&&w[1]in s){for(T=0;T<w.length;T++)Y[E[0][T]]=w[T];return Y}return!1}(),j={change:h.fullscreenchange,error:h.fullscreenerror},x={request:function(w,E){return new Promise((function(T,q){var Y=(function(){this.off("change",Y),T()}).bind(this);this.on("change",Y),w=w||s.documentElement;var U=w[h.requestFullscreen](E);U instanceof Promise&&U.then(Y).catch(q)}).bind(this))},exit:function(){return new Promise((function(w,E){if(!this.isFullscreen){w();return}var T=(function(){this.off("change",T),w()}).bind(this);this.on("change",T);var q=s[h.exitFullscreen]();q instanceof Promise&&q.then(T).catch(E)}).bind(this))},toggle:function(w,E){return this.isFullscreen?this.exit():this.request(w,E)},onchange:function(w){this.on("change",w)},onerror:function(w){this.on("error",w)},on:function(w,E){var T=j[w];T&&s.addEventListener(T,E,!1)},off:function(w,E){var T=j[w];T&&s.removeEventListener(T,E,!1)},raw:h};if(!h){l?a.exports={isEnabled:!1}:window.screenfull={isEnabled:!1};return}Object.defineProperties(x,{isFullscreen:{get:function(){return!!s[h.fullscreenElement]}},element:{enumerable:!0,get:function(){return s[h.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!s[h.fullscreenEnabled]}}}),l?a.exports=x:window.screenfull=x})()}($n)),$n.exports}_u();var fn={exports:{}},er={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Oa;function wu(){if(Oa)return er;Oa=1;var a=M;function s(U,H){return U===H&&(U!==0||1/U===1/H)||U!==U&&H!==H}var l=typeof Object.is=="function"?Object.is:s,h=a.useState,j=a.useEffect,x=a.useLayoutEffect,w=a.useDebugValue;function E(U,H){var F=H(),X=h({inst:{value:F,getSnapshot:H}}),W=X[0].inst,re=X[1];return x(function(){W.value=F,W.getSnapshot=H,T(W)&&re({inst:W})},[U,F,H]),j(function(){return T(W)&&re({inst:W}),U(function(){T(W)&&re({inst:W})})},[U]),w(F),F}function T(U){var H=U.getSnapshot;U=U.value;try{var F=H();return!l(U,F)}catch{return!0}}function q(U,H){return H()}var Y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?q:E;return er.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:Y,er}var tr={};/**
* @license React
* use-sync-external-store-shim.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ca;function xu(){return Ca||(Ca=1,process.env.NODE_ENV!=="production"&&function(){function a(F,X){return F===X&&(F!==0||1/F===1/X)||F!==F&&X!==X}function s(F,X){Y||j.startTransition===void 0||(Y=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var W=X();if(!U){var re=X();x(W,re)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),U=!0)}re=w({inst:{value:W,getSnapshot:X}});var ae=re[0].inst,he=re[1];return T(function(){ae.value=W,ae.getSnapshot=X,l(ae)&&he({inst:ae})},[F,W,X]),E(function(){return l(ae)&&he({inst:ae}),F(function(){l(ae)&&he({inst:ae})})},[F]),q(W),W}function l(F){var X=F.getSnapshot;F=F.value;try{var W=X();return!x(F,W)}catch{return!0}}function h(F,X){return X()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var j=M,x=typeof Object.is=="function"?Object.is:a,w=j.useState,E=j.useEffect,T=j.useLayoutEffect,q=j.useDebugValue,Y=!1,U=!1,H=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:s;tr.useSyncExternalStore=j.useSyncExternalStore!==void 0?j.useSyncExternalStore:H,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),tr}var Ta;function ku(){return Ta||(Ta=1,process.env.NODE_ENV==="production"?fn.exports=wu():fn.exports=xu()),fn.exports}ku();var Pa,Aa;function Ra(a){return typeof a=="function"}const Eu=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test",nr=typeof window<"u",Su=typeof navigator<"u";nr&&(!((Aa=window)==null||(Pa=Aa.navigator)==null)&&Pa.userAgent)&&/iP(?:ad|hone|od)/.test(window.navigator.userAgent);const Da=nr?M.useLayoutEffect:M.useEffect,Ia=a=>{const s=M.useRef(a);return Da(()=>{s.current=a},[a]),s};function ju(a,...s){a&&a.addEventListener&&a.addEventListener(...s)}function Ou(a,...s){a&&a.removeEventListener&&a.removeEventListener(...s)}const rr=typeof window<"u"?window:void 0,ar={};function Na(a,s){if(!nr)return;if(!a)return s;let l;return Ra(a)?l=a():"current"in a?l=a.current:l=a,l}const Cu=a=>(a+1)%1e6;function Tu(){const[,a]=M.useReducer(Cu,0);return a}const Pu=(a,s,l)=>{process.env.NODE_ENV!=="production"&&((!Array.isArray(s)||!s.length)&&console.warn("`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),typeof l!="function"&&console.warn("`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list"));const h=M.useRef(void 0),j=Tu();h.current||(h.current=s),Da(()=>{l(s,h.current)||(h.current=s,j())}),M.useEffect(a,h.current)},za=(a,s)=>{process.env.NODE_ENV!=="production"&&(!Array.isArray(s)||!s.length)&&console.warn("`useDeepCompareEffect` should not be used with no dependencies. Use React.useEffect instead."),Pu(a,s,gu)};function hn(a,s,l,h=ar){const j=Ia(s);za(()=>{const x=Na(l,rr);if(!(x&&x.addEventListener))return;const w=E=>j.current(E);return ju(x,a,w,h),()=>{x&&x.removeEventListener&&Ou(x,a,w)}},[a,l,h])}const Au=a=>{Eu&&(Ra(a)||console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof a}".`)),M.useEffect(()=>{a==null||a()},[])},Ru=()=>{const[a,s]=M.useState(null),l=M.useCallback(()=>{var h;s((h=window)==null?void 0:h.document.activeElement)},[]);return hn("blur",l,rr,!0),hn("focus",l,rr,!0),Au(()=>{var h;s((h=window)==null?void 0:h.document.activeElement)}),a},Du=(a,s,l=ar)=>{const h=Ia(s),j=M.useRef(),x=M.useCallback(()=>{j.current&&j.current.disconnect()},[]);return za(()=>{const w=Na(a);if(w)return j.current=new ResizeObserver(h.current),j.current.observe(w,l),x},[h,x,a,l]),x},Ka=(a,s=ar)=>{const{box:l="content-box"}=s,[h,j]=M.useState(0),[x,w]=M.useState(0);return Du(a,([E])=>{const T=l==="border-box"?E.borderBoxSize:l==="content-box"?E.contentBoxSize:E.devicePixelContentBoxSize;T?(j(T.reduce((q,{inlineSize:Y})=>q+Y,0)),w(T.reduce((q,{blockSize:Y})=>q+Y,0))):(j(E.contentRect.width),w(E.contentRect.height))},s),[h,x]},dn=Su?navigator:void 0;dn&&(dn.connection||dn.mozConnection||dn.webkitConnection),M.use;var vn={exports:{}},Iu=vn.exports,La;function Nu(){return La||(La=1,function(a,s){(function(l,h){a.exports=h()})(Iu,function(){var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])})(e,t)},h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function j(e,t,n){for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var x=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ji,w=Object.keys,E=Array.isArray;function T(e,t){return typeof t!="object"||w(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||x.Promise||(x.Promise=Promise);var q=Object.getPrototypeOf,Y={}.hasOwnProperty;function U(e,t){return Y.call(e,t)}function H(e,t){typeof t=="function"&&(t=t(q(e))),(typeof Reflect>"u"?w:Reflect.ownKeys)(t).forEach(function(n){X(e,n,t[n])})}var F=Object.defineProperty;function X(e,t,n,r){F(e,t,T(n&&U(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function W(e){return{from:function(t){return e.prototype=Object.create(t.prototype),X(e.prototype,"constructor",e),{extend:H.bind(null,e.prototype)}}}}var re=Object.getOwnPropertyDescriptor,ae=[].slice;function he(e,t,n){return ae.call(e,t,n)}function Ae(e,t){return t(e)}function ge(e){if(!e)throw new Error("Assertion Failed")}function ie(e){x.setImmediate?setImmediate(e):setTimeout(e,0)}function pe(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 o=pe(e,t[r]);n.push(o)}return n}var u=t.indexOf(".");if(u!==-1){var c=e[t.substr(0,u)];return c==null?void 0:pe(c,t.substr(u+1))}}function ce(e,t,n){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){ge(typeof n!="string"&&"length"in n);for(var r=0,i=t.length;r<i;++r)ce(e,t[r],n[r])}else{var o,u,c=t.indexOf(".");c!==-1?(o=t.substr(0,c),(u=t.substr(c+1))===""?n===void 0?E(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n:ce(c=!(c=e[o])||!U(e,o)?e[o]={}:c,u,n)):n===void 0?E(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function Fe(e){var t,n={};for(t in e)U(e,t)&&(n[t]=e[t]);return n}var Ce=[].concat;function _t(e){return Ce.apply([],e)}var st="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(_t([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return x[e]}),wt=new Set(st.map(function(e){return x[e]})),We=null;function qe(e){return We=new WeakMap,e=function t(n){if(!n||typeof n!="object")return n;var r=We.get(n);if(r)return r;if(E(n)){r=[],We.set(n,r);for(var i=0,o=n.length;i<o;++i)r.push(t(n[i]))}else if(wt.has(n.constructor))r=n;else{var u,c=q(n);for(u in r=c===Object.prototype?{}:Object.create(c),We.set(n,r),n)U(n,u)&&(r[u]=t(n[u]))}return r}(e),We=null,e}var qt={}.toString;function xt(e){return qt.call(e).slice(8,-1)}var kt=typeof Symbol<"u"?Symbol.iterator:"@@iterator",mn=typeof kt=="symbol"?function(e){var t;return e!=null&&(t=e[kt])&&t.apply(e)}:function(){return null};function Ie(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var Ue={};function P(e){var t,n,r,i;if(arguments.length===1){if(E(e))return e.slice();if(this===Ue&&typeof e=="string")return[e];if(i=mn(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(n=new Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var Q=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Ht=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Re=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Ht),le={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 ve(e,t){this.name=e,this.message=t}function De(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,r,i){return i.indexOf(n)===r}).join(`
`)}function je(e,t,n,r){this.failures=t,this.failedKeys=r,this.successCount=n,this.message=De(e,t)}function Ne(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=De(e,this.failures)}W(ve).from(Error).extend({toString:function(){return this.name+": "+this.message}}),W(je).from(ve),W(Ne).from(ve);var it=Re.reduce(function(e,t){return e[t]=t+"Error",e},{}),be=ve,V=Re.reduce(function(e,t){var n=t+"Error";function r(i,o){this.name=n,i?typeof i=="string"?(this.message="".concat(i).concat(o?`
`+o:""),this.inner=o||null):typeof i=="object"&&(this.message="".concat(i.name," ").concat(i.message),this.inner=i):(this.message=le[t]||n,this.inner=null)}return W(r).from(be),e[t]=r,e},{});V.Syntax=SyntaxError,V.Type=TypeError,V.Range=RangeError;var Et=Ht.reduce(function(e,t){return e[t+"Error"]=V[t],e},{}),St=Re.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=V[t]),e},{});function oe(){}function Ut(e){return e}function Ny(e,t){return e==null||e===Ut?t:function(n){return t(e(n))}}function ot(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function zy(e,t){return e===oe?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 o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ot(r,this.onsuccess):r),i&&(this.onerror=this.onerror?ot(i,this.onerror):i),o!==void 0?o:n}}function Ky(e,t){return e===oe?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?ot(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ot(r,this.onerror):r)}}function Ly(e,t){return e===oe?t:function(n){var r=e.apply(this,arguments);T(n,r);var i=this.onsuccess,o=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?ot(i,this.onsuccess):i),o&&(this.onerror=this.onerror?ot(o,this.onerror):o),r===void 0?n===void 0?void 0:n:T(r,n)}}function My(e,t){return e===oe?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function cr(e,t){return e===oe?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}St.ModifyError=je,St.DexieError=ve,St.BulkError=Ne;var ze=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Ya(e){ze=e}var Vt={},Wa=100,st=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,q(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,q(t),e]}(),Ht=st[0],Re=st[1],st=st[2],Re=Re&&Re.then,ut=Ht&&Ht.constructor,lr=!!st,Gt=function(e,t){Yt.push([e,t]),gn&&(queueMicrotask(Fy),gn=!1)},fr=!0,gn=!0,ct=[],bn=[],hr=Ut,Xe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:oe,pgp:!1,env:{},finalize:oe},G=Xe,Yt=[],lt=0,_n=[];function L(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=G;if(typeof e!="function"){if(e!==Vt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&vr(this,this._value))}this._state=null,this._value=null,++t.ref,function n(r,i){try{i(function(o){if(r._state===null){if(o===r)throw new TypeError("A promise cannot be resolved with itself.");var u=r._lib&&jt();o&&typeof o.then=="function"?n(r,function(c,d){o instanceof L?o._then(c,d):o.then(c,d)}):(r._state=!0,r._value=o,Za(r)),u&&Ot()}},vr.bind(null,r))}catch(o){vr(r,o)}}(this,e)}var dr={get:function(){var e=G,t=En;function n(r,i){var o=this,u=!e.global&&(e!==G||t!==En),c=u&&!Qe(),d=new L(function(p,g){pr(o,new Xa(Ja(r,e,u,c),Ja(i,e,u,c),p,g,e))});return this._consoleTask&&(d._consoleTask=this._consoleTask),d}return n.prototype=Vt,n},set:function(e){X(this,"then",e&&e.prototype===Vt?dr:{get:function(){return e},set:dr.set})}};function Xa(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}function vr(e,t){var n,r;bn.push(t),e._state===null&&(n=e._lib&&jt(),t=hr(t),e._state=!1,e._value=t,r=e,ct.some(function(i){return i._value===r._value})||ct.push(r),Za(e),n&&Ot())}function Za(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pr(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),lt===0&&(++lt,Gt(function(){--lt==0&&yr()},[]))}function pr(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,++lt,Gt(By,[n,e,t])}else e._listeners.push(t)}function By(e,t,n){try{var r,i=t._value;!t._state&&bn.length&&(bn=[]),r=ze&&t._consoleTask?t._consoleTask.run(function(){return e(i)}):e(i),t._state||bn.indexOf(i)!==-1||function(o){for(var u=ct.length;u;)if(ct[--u]._value===o._value)return ct.splice(u,1)}(t),n.resolve(r)}catch(o){n.reject(o)}finally{--lt==0&&yr(),--n.psd.ref||n.psd.finalize()}}function Fy(){ft(Xe,function(){jt()&&Ot()})}function jt(){var e=fr;return gn=fr=!1,e}function Ot(){var e,t,n;do for(;0<Yt.length;)for(e=Yt,Yt=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(0<Yt.length);gn=fr=!0}function yr(){var e=ct;ct=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var t=_n.slice(0),n=t.length;n;)t[--n]()}function wn(e){return new L(Vt,!1,e)}function de(e,t){var n=G;return function(){var r=jt(),i=G;try{return Je(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{Je(i,!1),r&&Ot()}}}H(L.prototype,{then:dr,_then:function(e,t){pr(this,new Xa(null,null,e,t,G))},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(r){return(r instanceof t?n:wn)(r)}):this.then(null,function(r){return(r&&r.name===t?n:wn)(r)})},finally:function(e){return this.then(function(t){return L.resolve(e()).then(function(){return t})},function(t){return L.resolve(e()).then(function(){return wn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new L(function(r,i){var o=setTimeout(function(){return i(new V.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&X(L.prototype,Symbol.toStringTag,"Dexie.Promise"),Xe.env=Qa(),H(L,{all:function(){var e=P.apply(null,arguments).map(Sn);return new L(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,o){return L.resolve(i).then(function(u){e[o]=u,--r||t(e)},n)})})},resolve:function(e){return e instanceof L?e:e&&typeof e.then=="function"?new L(function(t,n){e.then(t,n)}):new L(Vt,!0,e)},reject:wn,race:function(){var e=P.apply(null,arguments).map(Sn);return new L(function(t,n){e.map(function(r){return L.resolve(r).then(t,n)})})},PSD:{get:function(){return G},set:function(e){return G=e}},totalEchoes:{get:function(){return En}},newPSD:Ze,usePSD:ft,scheduler:{get:function(){return Gt},set:function(e){Gt=e}},rejectionMapper:{get:function(){return hr},set:function(e){hr=e}},follow:function(e,t){return new L(function(n,r){return Ze(function(i,o){var u=G;u.unhandleds=[],u.onunhandled=o,u.finalize=ot(function(){var c,d=this;c=function(){d.unhandleds.length===0?i():o(d.unhandleds[0])},_n.push(function p(){c(),_n.splice(_n.indexOf(p),1)}),++lt,Gt(function(){--lt==0&&yr()},[])},u.finalize),e()},t,n,r)})}}),ut&&(ut.allSettled&&X(L,"allSettled",function(){var e=P.apply(null,arguments).map(Sn);return new L(function(t){e.length===0&&t([]);var n=e.length,r=new Array(n);e.forEach(function(i,o){return L.resolve(i).then(function(u){return r[o]={status:"fulfilled",value:u}},function(u){return r[o]={status:"rejected",reason:u}}).then(function(){return--n||t(r)})})})}),ut.any&&typeof AggregateError<"u"&&X(L,"any",function(){var e=P.apply(null,arguments).map(Sn);return new L(function(t,n){e.length===0&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,u){return L.resolve(o).then(function(c){return t(c)},function(c){i[u]=c,--r||n(new AggregateError(i))})})})}),ut.withResolvers&&(L.withResolvers=ut.withResolvers));var _e={awaits:0,echoes:0,id:0},qy=0,xn=[],kn=0,En=0,Uy=0;function Ze(e,t,n,r){var i=G,o=Object.create(i);return o.parent=i,o.ref=0,o.global=!1,o.id=++Uy,Xe.env,o.env=lr?{Promise:L,PromiseProp:{value:L,configurable:!0,writable:!0},all:L.all,race:L.race,allSettled:L.allSettled,any:L.any,resolve:L.resolve,reject:L.reject}:{},t&&T(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()},r=ft(o,e,n,r),o.ref===0&&o.finalize(),r}function Ct(){return _e.id||(_e.id=++qy),++_e.awaits,_e.echoes+=Wa,_e.id}function Qe(){return!!_e.awaits&&(--_e.awaits==0&&(_e.id=0),_e.echoes=_e.awaits*Wa,!0)}function Sn(e){return _e.echoes&&e&&e.constructor===ut?(Ct(),e.then(function(t){return Qe(),t},function(t){return Qe(),ye(t)})):e}function Vy(){var e=xn[xn.length-1];xn.pop(),Je(e,!1)}function Je(e,t){var n,r=G;(t?!_e.echoes||kn++&&e===G:!kn||--kn&&e===G)||queueMicrotask(t?(function(i){++En,_e.echoes&&--_e.echoes!=0||(_e.echoes=_e.awaits=_e.id=0),xn.push(G),Je(i,!0)}).bind(null,e):Vy),e!==G&&(G=e,r===Xe&&(Xe.env=Qa()),lr&&(n=Xe.env.Promise,t=e.env,(r.global||e.global)&&(Object.defineProperty(x,"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 Qa(){var e=x.Promise;return lr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(x,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function ft(e,t,n,r,i){var o=G;try{return Je(e,!0),t(n,r,i)}finally{Je(o,!1)}}function Ja(e,t,n,r){return typeof e!="function"?e:function(){var i=G;n&&Ct(),Je(t,!0);try{return e.apply(this,arguments)}finally{Je(i,!1),r&&queueMicrotask(Qe)}}}function mr(e){Promise===ut&&_e.echoes===0?kn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Re).indexOf("[native code]")===-1&&(Ct=Qe=oe);var ye=L.reject,ht="",Ve="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",$a="String expected.",Tt=[],jn="__dbnames",gr="readonly",br="readwrite";function dt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var ei={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function On(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=qe(t))[e],t}}function ti(){throw V.Type()}function te(e,t){try{var n=ni(e),r=ni(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"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(i,o){for(var u=i.length,c=o.length,d=u<c?u:c,p=0;p<d;++p)if(i[p]!==o[p])return i[p]<o[p]?-1:1;return u===c?0:u<c?-1:1}(ri(e),ri(t));case"Array":return function(i,o){for(var u=i.length,c=o.length,d=u<c?u:c,p=0;p<d;++p){var g=te(i[p],o[p]);if(g!==0)return g}return u===c?0:u<c?-1:1}(e,t)}}catch{}return NaN}function ni(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=xt(e),e==="ArrayBuffer"?"binary":e)}function ri(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var ai=(fe.prototype._trans=function(e,t,n){var r=this._tx||G.trans,i=this.name,o=ze&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function u(p,g,f){if(!f.schema[i])throw new V.NotFound("Table "+i+" not part of transaction");return t(f.idbtrans,f)}var c=jt();try{var d=r&&r.db._novip===this.db._novip?r===G.trans?r._promise(e,u,n):Ze(function(){return r._promise(e,u,n)},{trans:r,transless:G.transless||G}):function p(g,f,_,v){if(g.idbdb&&(g._state.openComplete||G.letThrough||g._vip)){var m=g._createTransaction(f,_,g._dbSchema);try{m.create(),g._state.PR1398_maxLoop=3}catch(b){return b.name===it.InvalidState&&g.isOpen()&&0<--g._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),g.close({disableAutoOpen:!1}),g.open().then(function(){return p(g,f,_,v)})):ye(b)}return m._promise(f,function(b,y){return Ze(function(){return G.trans=m,v(b,y,m)})}).then(function(b){if(f==="readwrite")try{m.idbtrans.commit()}catch{}return f==="readonly"?b:m._completion.then(function(){return b})})}if(g._state.openComplete)return ye(new V.DatabaseClosed(g._state.dbOpenError));if(!g._state.isBeingOpened){if(!g._state.autoOpen)return ye(new V.DatabaseClosed);g.open().catch(oe)}return g._state.dbReadyPromise.then(function(){return p(g,f,_,v)})}(this.db,e,[this.name],u);return o&&(d._consoleTask=o,d=d.catch(function(p){return console.trace(p),ye(p)})),d}finally{c&&Ot()}},fe.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?ye(new V.Type("Invalid argument to Table.get()")):this._trans("readonly",function(r){return n.core.get({trans:r,key:e}).then(function(i){return n.hook.reading.fire(i)})}).then(t)},fe.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(E(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=w(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(c){if(c.compound&&t.every(function(p){return 0<=c.keyPath.indexOf(p)})){for(var d=0;d<t.length;++d)if(t.indexOf(c.keyPath[d])===-1)return!1;return!0}return!1}).sort(function(c,d){return c.keyPath.length-d.keyPath.length})[0];if(n&&this.db._maxKey!==ht){var o=n.keyPath.slice(0,t.length);return this.where(o).equals(o.map(function(d){return e[d]}))}!n&&ze&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var r=this.schema.idxByName;function i(c,d){return te(c,d)===0}var u=t.reduce(function(f,d){var p=f[0],g=f[1],f=r[d],_=e[d];return[p||f,p||!f?dt(g,f&&f.multi?function(v){return v=pe(v,d),E(v)&&v.some(function(m){return i(_,m)})}:function(v){return i(_,pe(v,d))}):g]},[null,null]),o=u[0],u=u[1];return o?this.where(o.name).equals(e[o.keyPath]).filter(u):n?this.filter(u):this.where(t).equals("")},fe.prototype.filter=function(e){return this.toCollection().and(e)},fe.prototype.count=function(e){return this.toCollection().count(e)},fe.prototype.offset=function(e){return this.toCollection().offset(e)},fe.prototype.limit=function(e){return this.toCollection().limit(e)},fe.prototype.each=function(e){return this.toCollection().each(e)},fe.prototype.toArray=function(e){return this.toCollection().toArray(e)},fe.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},fe.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,E(e)?"[".concat(e.join("+"),"]"):e))},fe.prototype.reverse=function(){return this.toCollection().reverse()},fe.prototype.mapToClass=function(e){var t,n=this.db,r=this.name;function i(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof ti&&(function(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=d}l(d,p),d.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}(i,t=e),Object.defineProperty(i.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),i.prototype.table=function(){return r},e=i);for(var o=new Set,u=e.prototype;u;u=q(u))Object.getOwnPropertyNames(u).forEach(function(d){return o.add(d)});function c(d){if(!d)return d;var p,g=Object.create(e.prototype);for(p in d)if(!o.has(p))try{g[p]=d[p]}catch{}return g}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=c,this.hook("reading",c),e},fe.prototype.defineClass=function(){return this.mapToClass(function(e){T(this,e)})},fe.prototype.add=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,u=e;return o&&i&&(u=On(o)(e)),this._trans("readwrite",function(c){return n.core.mutate({trans:c,type:"add",keys:t!=null?[t]:null,values:[u]})}).then(function(c){return c.numFailures?L.reject(c.failures[0]):c.lastResult}).then(function(c){if(o)try{ce(e,o,c)}catch{}return c})},fe.prototype.update=function(e,t){return typeof e!="object"||E(e)?this.where(":id").equals(e).modify(t):(e=pe(e,this.schema.primKey.keyPath),e===void 0?ye(new V.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},fe.prototype.put=function(e,t){v