react-semaphor 0.0.493 → 0.0.494

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.
@@ -4,7 +4,7 @@ var Ka = (t) => {
4
4
  var qn = (t, a, n) => a.has(t) || Ka("Cannot " + n);
5
5
  var me = (t, a, n) => (qn(t, a, "read from private field"), n ? n.call(t) : a.get(t)), Oe = (t, a, n) => a.has(t) ? Ka("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), Se = (t, a, n, r) => (qn(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), Ae = (t, a, n) => (qn(t, a, "access private method"), n);
6
6
  import { jsxs as s, jsx as e, Fragment as te } from "react/jsx-runtime";
7
- import { z as $r, A as Qn, B as Gr, Q as gs, C as ys, E as Jr, F as Hr, G as Ur, H as Yr, I as Kr, J as Qr, K as Qa, L as Wa, M as Wr, N as Zr, O as B, P as ha, v as K, w as At, R as it, T as Qt, U as vs, V as P, W as xe, X as Wt, Y as bn, Z as xn, _ as Nn, $ as _, a0 as Ce, a1 as pa, a2 as bs, a3 as xs, a4 as ae, a5 as Ns, a6 as Cs, a7 as ws, a8 as Xr, a9 as Za, aa as W, ab as fa, ac as ei, ad as le, ae as oe, af as ce, ag as de, ah as Xe, ai as _e, aj as Z, ak as ks, al as Je, am as He, an as Ft, ao as Ke, ap as yt, aq as zt, ar as Zt, as as Lt, at as et, au as Ss, av as Xt, aw as ga, ax as Ms, ay as vt, az as Wn, aA as Rt, x as T, aB as Ds, aC as Dt, aD as on, aE as bt, aF as Cn, aG as wn, aH as kn, aI as Sn, aJ as Mn, aK as Dn, aL as Tn, t as qe, aM as Ts, aN as Es, aO as Is, aP as Os, l as As, k as Fs, f as Ve, aQ as ti, e as Pe, aR as ni, g as pt, h as Be, aS as zs, j as ai, aT as si, aU as ri, aV as at, aW as tt, aX as Ls, aY as ii, y as ee, d as Rs, aZ as $t, a_ as Qe, a$ as li, b0 as Zn, b1 as ya, b2 as va, b3 as En, b4 as st, b5 as Vs, r as cn, p as Xn, b6 as Le, b7 as oi, b8 as rt, b9 as ci, ba as di, bb as mi, bc as ui, bd as js, be as hi, bf as In, bg as pi, bh as fi, bi as gi, bj as Xa, bk as yi, bl as vi, bm as bi, bn as xi, bo as ea, bp as ve, bq as We, br as ke, bs as Ze, bt as Ni, bu as qs, bv as Ps, bw as Bs, bx as Ci, by as wi, bz as ki, bA as Si, bB as Pn, bC as Mi, bD as es, bE as Di, bF as ts, bG as Ti, bH as Ei, bI as Ii, bJ as Oi, bK as _s, bL as Ai, bM as ba, bN as $s, bO as On, bP as Gs, bQ as kt, bR as Js, bS as Fi, bT as Hs, bU as An, bV as zi, bW as Li, bX as Us, bY as Ri, bZ as Fn, b_ as Ys, b$ as Vi, c0 as xt, c1 as Nt, c2 as be, c3 as dt, c4 as ji, c5 as qi, c6 as Pi, c7 as xa, c8 as Ks, c9 as Bi, ca as dn, cb as Qs, cc as mn, cd as Ws, ce as zn, cf as Zs, cg as _i, ch as $i, ci as Gi, cj as Xs, ck as lt, cl as pe, cm as fe, cn as ge, co as ft, cp as Ji, cq as Hi, cr as Ui, cs as Yi, q as Ki, ct as ns, cu as er, cv as Qi, cw as Wi, cx as Zi, cy as tr, cz as Na, cA as Vt, cB as Ca, cC as Ge, cD as Xi, cE as jt, cF as nr, cG as el, cH as tl, cI as nl, cJ as al, cK as sl, cL as rl, cM as il, cN as ll, cO as ol, cP as cl, cQ as Bn, cR as dl, cS as Gt, cT as $e, cU as wa, cV as ue, cW as ml, cX as ul, cY as hl, cZ as Tt, c_ as De, c$ as qt, d0 as ta, d1 as na, d2 as aa, d3 as un, d4 as Et, d5 as Jt, d6 as pl, d7 as fl, d8 as ar, d9 as gl, da as yl, db as vl, dc as bl, dd as xl, de as Nl } from "./index-DGUYwhJU.js";
7
+ import { z as $r, A as Qn, B as Gr, Q as gs, C as ys, E as Jr, F as Hr, G as Ur, H as Yr, I as Kr, J as Qr, K as Qa, L as Wa, M as Wr, N as Zr, O as B, P as ha, v as K, w as At, R as it, T as Qt, U as vs, V as P, W as xe, X as Wt, Y as bn, Z as xn, _ as Nn, $ as _, a0 as Ce, a1 as pa, a2 as bs, a3 as xs, a4 as ae, a5 as Ns, a6 as Cs, a7 as ws, a8 as Xr, a9 as Za, aa as W, ab as fa, ac as ei, ad as le, ae as oe, af as ce, ag as de, ah as Xe, ai as _e, aj as Z, ak as ks, al as Je, am as He, an as Ft, ao as Ke, ap as yt, aq as zt, ar as Zt, as as Lt, at as et, au as Ss, av as Xt, aw as ga, ax as Ms, ay as vt, az as Wn, aA as Rt, x as T, aB as Ds, aC as Dt, aD as on, aE as bt, aF as Cn, aG as wn, aH as kn, aI as Sn, aJ as Mn, aK as Dn, aL as Tn, t as qe, aM as Ts, aN as Es, aO as Is, aP as Os, l as As, k as Fs, f as Ve, aQ as ti, e as Pe, aR as ni, g as pt, h as Be, aS as zs, j as ai, aT as si, aU as ri, aV as at, aW as tt, aX as Ls, aY as ii, y as ee, d as Rs, aZ as $t, a_ as Qe, a$ as li, b0 as Zn, b1 as ya, b2 as va, b3 as En, b4 as st, b5 as Vs, r as cn, p as Xn, b6 as Le, b7 as oi, b8 as rt, b9 as ci, ba as di, bb as mi, bc as ui, bd as js, be as hi, bf as In, bg as pi, bh as fi, bi as gi, bj as Xa, bk as yi, bl as vi, bm as bi, bn as xi, bo as ea, bp as ve, bq as We, br as ke, bs as Ze, bt as Ni, bu as qs, bv as Ps, bw as Bs, bx as Ci, by as wi, bz as ki, bA as Si, bB as Pn, bC as Mi, bD as es, bE as Di, bF as ts, bG as Ti, bH as Ei, bI as Ii, bJ as Oi, bK as _s, bL as Ai, bM as ba, bN as $s, bO as On, bP as Gs, bQ as kt, bR as Js, bS as Fi, bT as Hs, bU as An, bV as zi, bW as Li, bX as Us, bY as Ri, bZ as Fn, b_ as Ys, b$ as Vi, c0 as xt, c1 as Nt, c2 as be, c3 as dt, c4 as ji, c5 as qi, c6 as Pi, c7 as xa, c8 as Ks, c9 as Bi, ca as dn, cb as Qs, cc as mn, cd as Ws, ce as zn, cf as Zs, cg as _i, ch as $i, ci as Gi, cj as Xs, ck as lt, cl as pe, cm as fe, cn as ge, co as ft, cp as Ji, cq as Hi, cr as Ui, cs as Yi, q as Ki, ct as ns, cu as er, cv as Qi, cw as Wi, cx as Zi, cy as tr, cz as Na, cA as Vt, cB as Ca, cC as Ge, cD as Xi, cE as jt, cF as nr, cG as el, cH as tl, cI as nl, cJ as al, cK as sl, cL as rl, cM as il, cN as ll, cO as ol, cP as cl, cQ as Bn, cR as dl, cS as Gt, cT as $e, cU as wa, cV as ue, cW as ml, cX as ul, cY as hl, cZ as Tt, c_ as De, c$ as qt, d0 as ta, d1 as na, d2 as aa, d3 as un, d4 as Et, d5 as Jt, d6 as pl, d7 as fl, d8 as ar, d9 as gl, da as yl, db as vl, dc as bl, dd as xl, de as Nl } from "./index-gOd6mefJ.js";
8
8
  import * as Ie from "react";
9
9
  import ze, { useState as j, useMemo as nt, useRef as gt, useCallback as Ne, useEffect as ye, Suspense as Cl } from "react";
10
10
  import "react-dom";
@@ -1,4 +1,4 @@
1
- "use strict";var zs=t=>{throw TypeError(t)};var Je=(t,a,n)=>a.has(t)||zs("Cannot "+n);var W=(t,a,n)=>(Je(t,a,"read from private field"),n?n.call(t):a.get(t)),re=(t,a,n)=>a.has(t)?zs("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,n),ee=(t,a,n,r)=>(Je(t,a,"write to private field"),r?r.call(t,n):a.set(t,n),n),ie=(t,a,n)=>(Je(t,a,"access private method"),n);const e=require("react/jsx-runtime"),s=require("./index-DkxTOaiT.js"),M=require("react");require("react-dom");function Rt(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const ae=Rt(M);function Rs(t,a){return t.filter(n=>!a.includes(n))}function Pt(t,a,n){const r=t.slice(0);return r[a]=n,r}var he,te,be,ve,ne,ue,Ee,Ie,De,Z,ts,ns,as,rs,is,Qs,Vt=(Qs=class extends s.Subscribable{constructor(a,n,r){super();re(this,Z);re(this,he);re(this,te);re(this,be);re(this,ve);re(this,ne);re(this,ue);re(this,Ee);re(this,Ie);re(this,De,[]);ee(this,he,a),ee(this,ve,r),ee(this,be,[]),ee(this,ne,[]),ee(this,te,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&W(this,ne).forEach(a=>{a.subscribe(n=>{ie(this,Z,rs).call(this,a,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,W(this,ne).forEach(a=>{a.destroy()})}setQueries(a,n,r){if(ee(this,be,a),ee(this,ve,n),process.env.NODE_ENV!=="production"){const i=a.map(o=>W(this,he).defaultQueryOptions(o).queryHash);new Set(i).size!==i.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}s.notifyManager.batch(()=>{const i=W(this,ne),o=ie(this,Z,as).call(this,W(this,be));ee(this,De,o),o.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions,r));const c=o.map(m=>m.observer),u=c.map(m=>m.getCurrentResult()),l=c.some((m,d)=>m!==i[d]);i.length===c.length&&!l||(ee(this,ne,c),ee(this,te,u),this.hasListeners()&&(Rs(i,c).forEach(m=>{m.destroy()}),Rs(c,i).forEach(m=>{m.subscribe(d=>{ie(this,Z,rs).call(this,m,d)})}),ie(this,Z,is).call(this)))})}getCurrentResult(){return W(this,te)}getQueries(){return W(this,ne).map(a=>a.getCurrentQuery())}getObservers(){return W(this,ne)}getOptimisticResult(a,n){const r=ie(this,Z,as).call(this,a),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[i,o=>ie(this,Z,ns).call(this,o??i,n),()=>ie(this,Z,ts).call(this,i,r)]}},he=new WeakMap,te=new WeakMap,be=new WeakMap,ve=new WeakMap,ne=new WeakMap,ue=new WeakMap,Ee=new WeakMap,Ie=new WeakMap,De=new WeakMap,Z=new WeakSet,ts=function(a,n){return n.map((r,i)=>{const o=a[i];return r.defaultedQueryOptions.notifyOnChangeProps?o:r.observer.trackResult(o,c=>{n.forEach(u=>{u.observer.trackProp(c)})})})},ns=function(a,n){return n?((!W(this,ue)||W(this,te)!==W(this,Ie)||n!==W(this,Ee))&&(ee(this,Ee,n),ee(this,Ie,W(this,te)),ee(this,ue,s.replaceEqualDeep(W(this,ue),n(a)))),W(this,ue)):a},as=function(a){const n=new Map(W(this,ne).map(i=>[i.options.queryHash,i])),r=[];return a.forEach(i=>{const o=W(this,he).defaultQueryOptions(i),c=n.get(o.queryHash);c?r.push({defaultedQueryOptions:o,observer:c}):r.push({defaultedQueryOptions:o,observer:new s.QueryObserver(W(this,he),o)})}),r},rs=function(a,n){const r=W(this,ne).indexOf(a);r!==-1&&(ee(this,te,Pt(W(this,te),r,n)),ie(this,Z,is).call(this))},is=function(){var a;if(this.hasListeners()){const n=W(this,ue),r=ie(this,Z,ts).call(this,W(this,te),W(this,De)),i=ie(this,Z,ns).call(this,r,(a=W(this,ve))==null?void 0:a.combine);n!==i&&s.notifyManager.batch(()=>{this.listeners.forEach(o=>{o(W(this,te))})})}},Qs);function qt({queries:t,...a},n){const r=s.useQueryClient(),i=s.useIsRestoring(),o=s.useQueryErrorResetBoundary(),c=ae.useMemo(()=>t.map(x=>{const S=r.defaultQueryOptions(x);return S._optimisticResults=i?"isRestoring":"optimistic",S}),[t,r,i]);c.forEach(x=>{s.ensureSuspenseTimers(x),s.ensurePreventErrorBoundaryRetry(x,o)}),s.useClearResetErrorBoundary(o);const[u]=ae.useState(()=>new Vt(r,c,a)),[l,m,d]=u.getOptimisticResult(c,a.combine),h=!i&&a.subscribed!==!1;ae.useSyncExternalStore(ae.useCallback(x=>h?u.subscribe(s.notifyManager.batchCalls(x)):s.noop,[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),ae.useEffect(()=>{u.setQueries(c,a,{listeners:!1})},[c,a,u]);const p=l.some((x,S)=>s.shouldSuspend(c[S],x))?l.flatMap((x,S)=>{const f=c[S];if(f){const j=new s.QueryObserver(r,f);if(s.shouldSuspend(f,x))return s.fetchOptimistic(f,j,o);s.willFetch(x,i)&&s.fetchOptimistic(f,j,o)}return[]}):[];if(p.length>0)throw Promise.all(p);const N=l.find((x,S)=>{const f=c[S];return f&&s.getHasError({result:x,errorResetBoundary:o,throwOnError:f.throwOnError,query:r.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(N!=null&&N.error)throw N.error;return m(d())}/**
1
+ "use strict";var zs=t=>{throw TypeError(t)};var Je=(t,a,n)=>a.has(t)||zs("Cannot "+n);var W=(t,a,n)=>(Je(t,a,"read from private field"),n?n.call(t):a.get(t)),re=(t,a,n)=>a.has(t)?zs("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,n),ee=(t,a,n,r)=>(Je(t,a,"write to private field"),r?r.call(t,n):a.set(t,n),n),ie=(t,a,n)=>(Je(t,a,"access private method"),n);const e=require("react/jsx-runtime"),s=require("./index-COH782HH.js"),M=require("react");require("react-dom");function Rt(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const ae=Rt(M);function Rs(t,a){return t.filter(n=>!a.includes(n))}function Pt(t,a,n){const r=t.slice(0);return r[a]=n,r}var he,te,be,ve,ne,ue,Ee,Ie,De,Z,ts,ns,as,rs,is,Qs,Vt=(Qs=class extends s.Subscribable{constructor(a,n,r){super();re(this,Z);re(this,he);re(this,te);re(this,be);re(this,ve);re(this,ne);re(this,ue);re(this,Ee);re(this,Ie);re(this,De,[]);ee(this,he,a),ee(this,ve,r),ee(this,be,[]),ee(this,ne,[]),ee(this,te,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&W(this,ne).forEach(a=>{a.subscribe(n=>{ie(this,Z,rs).call(this,a,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,W(this,ne).forEach(a=>{a.destroy()})}setQueries(a,n,r){if(ee(this,be,a),ee(this,ve,n),process.env.NODE_ENV!=="production"){const i=a.map(o=>W(this,he).defaultQueryOptions(o).queryHash);new Set(i).size!==i.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}s.notifyManager.batch(()=>{const i=W(this,ne),o=ie(this,Z,as).call(this,W(this,be));ee(this,De,o),o.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions,r));const c=o.map(m=>m.observer),u=c.map(m=>m.getCurrentResult()),l=c.some((m,d)=>m!==i[d]);i.length===c.length&&!l||(ee(this,ne,c),ee(this,te,u),this.hasListeners()&&(Rs(i,c).forEach(m=>{m.destroy()}),Rs(c,i).forEach(m=>{m.subscribe(d=>{ie(this,Z,rs).call(this,m,d)})}),ie(this,Z,is).call(this)))})}getCurrentResult(){return W(this,te)}getQueries(){return W(this,ne).map(a=>a.getCurrentQuery())}getObservers(){return W(this,ne)}getOptimisticResult(a,n){const r=ie(this,Z,as).call(this,a),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[i,o=>ie(this,Z,ns).call(this,o??i,n),()=>ie(this,Z,ts).call(this,i,r)]}},he=new WeakMap,te=new WeakMap,be=new WeakMap,ve=new WeakMap,ne=new WeakMap,ue=new WeakMap,Ee=new WeakMap,Ie=new WeakMap,De=new WeakMap,Z=new WeakSet,ts=function(a,n){return n.map((r,i)=>{const o=a[i];return r.defaultedQueryOptions.notifyOnChangeProps?o:r.observer.trackResult(o,c=>{n.forEach(u=>{u.observer.trackProp(c)})})})},ns=function(a,n){return n?((!W(this,ue)||W(this,te)!==W(this,Ie)||n!==W(this,Ee))&&(ee(this,Ee,n),ee(this,Ie,W(this,te)),ee(this,ue,s.replaceEqualDeep(W(this,ue),n(a)))),W(this,ue)):a},as=function(a){const n=new Map(W(this,ne).map(i=>[i.options.queryHash,i])),r=[];return a.forEach(i=>{const o=W(this,he).defaultQueryOptions(i),c=n.get(o.queryHash);c?r.push({defaultedQueryOptions:o,observer:c}):r.push({defaultedQueryOptions:o,observer:new s.QueryObserver(W(this,he),o)})}),r},rs=function(a,n){const r=W(this,ne).indexOf(a);r!==-1&&(ee(this,te,Pt(W(this,te),r,n)),ie(this,Z,is).call(this))},is=function(){var a;if(this.hasListeners()){const n=W(this,ue),r=ie(this,Z,ts).call(this,W(this,te),W(this,De)),i=ie(this,Z,ns).call(this,r,(a=W(this,ve))==null?void 0:a.combine);n!==i&&s.notifyManager.batch(()=>{this.listeners.forEach(o=>{o(W(this,te))})})}},Qs);function qt({queries:t,...a},n){const r=s.useQueryClient(),i=s.useIsRestoring(),o=s.useQueryErrorResetBoundary(),c=ae.useMemo(()=>t.map(x=>{const S=r.defaultQueryOptions(x);return S._optimisticResults=i?"isRestoring":"optimistic",S}),[t,r,i]);c.forEach(x=>{s.ensureSuspenseTimers(x),s.ensurePreventErrorBoundaryRetry(x,o)}),s.useClearResetErrorBoundary(o);const[u]=ae.useState(()=>new Vt(r,c,a)),[l,m,d]=u.getOptimisticResult(c,a.combine),h=!i&&a.subscribed!==!1;ae.useSyncExternalStore(ae.useCallback(x=>h?u.subscribe(s.notifyManager.batchCalls(x)):s.noop,[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),ae.useEffect(()=>{u.setQueries(c,a,{listeners:!1})},[c,a,u]);const p=l.some((x,S)=>s.shouldSuspend(c[S],x))?l.flatMap((x,S)=>{const f=c[S];if(f){const j=new s.QueryObserver(r,f);if(s.shouldSuspend(f,x))return s.fetchOptimistic(f,j,o);s.willFetch(x,i)&&s.fetchOptimistic(f,j,o)}return[]}):[];if(p.length>0)throw Promise.all(p);const N=l.find((x,S)=>{const f=c[S];return f&&s.getHasError({result:x,errorResetBoundary:o,throwOnError:f.throwOnError,query:r.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(N!=null&&N.error)throw N.error;return m(d())}/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.