@service_laboratory/auth 1.0.7 → 1.0.8

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.
@@ -1,4 +1,4 @@
1
- (function(q,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(q=typeof globalThis<"u"?globalThis:q||self,x(q.auth={}))})(this,(function(q){"use strict";var x={exports:{}},fe={};/**
1
+ (function(p,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],m):(p=typeof globalThis<"u"?globalThis:p||self,m(p.auth={},p.react))})(this,(function(p,m){"use strict";var T={exports:{}},E={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,35 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Pe;function et(){if(Pe)return fe;Pe=1;var w=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function u(f,p,m){var A=null;if(m!==void 0&&(A=""+m),p.key!==void 0&&(A=""+p.key),"key"in p){m={};for(var D in p)D!=="key"&&(m[D]=p[D])}else m=p;return p=m.ref,{$$typeof:w,type:f,key:A,ref:p!==void 0?p:null,props:m}}return fe.Fragment=o,fe.jsx=u,fe.jsxs=u,fe}var le={},_e={exports:{}},_={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var je;function tt(){if(je)return _;je=1;var w=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),z=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),G=Symbol.iterator;function H(t){return t===null||typeof t!="object"?null:(t=G&&t[G]||t["@@iterator"],typeof t=="function"?t:null)}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},te=Object.assign,B={};function Y(t,n,i){this.props=t,this.context=n,this.refs=B,this.updater=i||F}Y.prototype.isReactComponent={},Y.prototype.setState=function(t,n){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,n,"setState")},Y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Q(){}Q.prototype=Y.prototype;function re(t,n,i){this.props=t,this.context=n,this.refs=B,this.updater=i||F}var j=re.prototype=new Q;j.constructor=re,te(j,Y.prototype),j.isPureReactComponent=!0;var ie=Array.isArray,T={H:null,A:null,T:null,S:null,V:null},ne=Object.prototype.hasOwnProperty;function oe(t,n,i,c,d,b){return i=b.ref,{$$typeof:w,type:t,key:n,ref:i!==void 0?i:null,props:b}}function L(t,n){return oe(t.type,n,void 0,void 0,void 0,t.props)}function U(t){return typeof t=="object"&&t!==null&&t.$$typeof===w}function de(t){var n={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(i){return n[i]})}var O=/\/+/g;function X(t,n){return typeof t=="object"&&t!==null&&t.key!=null?de(""+t.key):n.toString(36)}function V(){}function M(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(V,V):(t.status="pending",t.then(function(n){t.status==="pending"&&(t.status="fulfilled",t.value=n)},function(n){t.status==="pending"&&(t.status="rejected",t.reason=n)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function k(t,n,i,c,d){var b=typeof t;(b==="undefined"||b==="boolean")&&(t=null);var h=!1;if(t===null)h=!0;else switch(b){case"bigint":case"string":case"number":h=!0;break;case"object":switch(t.$$typeof){case w:case o:h=!0;break;case $:return h=t._init,k(h(t._payload),n,i,c,d)}}if(h)return d=d(t),h=c===""?"."+X(t,0):c,ie(d)?(i="",h!=null&&(i=h.replace(O,"$&/")+"/"),k(d,n,i,"",function(P){return P})):d!=null&&(U(d)&&(d=L(d,i+(d.key==null||t&&t.key===d.key?"":(""+d.key).replace(O,"$&/")+"/")+h)),n.push(d)),1;h=0;var C=c===""?".":c+":";if(ie(t))for(var v=0;v<t.length;v++)c=t[v],b=C+X(c,v),h+=k(c,n,i,b,d);else if(v=H(t),typeof v=="function")for(t=v.call(t),v=0;!(c=t.next()).done;)c=c.value,b=C+X(c,v++),h+=k(c,n,i,b,d);else if(b==="object"){if(typeof t.then=="function")return k(M(t),n,i,c,d);throw n=String(t),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return h}function I(t,n,i){if(t==null)return t;var c=[],d=0;return k(t,c,"","",function(b){return n.call(i,b,d++)}),c}function K(t){if(t._status===-1){var n=t._result;n=n(),n.then(function(i){(t._status===0||t._status===-1)&&(t._status=1,t._result=i)},function(i){(t._status===0||t._status===-1)&&(t._status=2,t._result=i)}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}var W=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function se(){}return _.Children={map:I,forEach:function(t,n,i){I(t,function(){n.apply(this,arguments)},i)},count:function(t){var n=0;return I(t,function(){n++}),n},toArray:function(t){return I(t,function(n){return n})||[]},only:function(t){if(!U(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},_.Component=Y,_.Fragment=u,_.Profiler=p,_.PureComponent=re,_.StrictMode=f,_.Suspense=ae,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,_.__COMPILER_RUNTIME={__proto__:null,c:function(t){return T.H.useMemoCache(t)}},_.cache=function(t){return function(){return t.apply(null,arguments)}},_.cloneElement=function(t,n,i){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var c=te({},t.props),d=t.key,b=void 0;if(n!=null)for(h in n.ref!==void 0&&(b=void 0),n.key!==void 0&&(d=""+n.key),n)!ne.call(n,h)||h==="key"||h==="__self"||h==="__source"||h==="ref"&&n.ref===void 0||(c[h]=n[h]);var h=arguments.length-2;if(h===1)c.children=i;else if(1<h){for(var C=Array(h),v=0;v<h;v++)C[v]=arguments[v+2];c.children=C}return oe(t.type,d,void 0,void 0,b,c)},_.createContext=function(t){return t={$$typeof:A,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:m,_context:t},t},_.createElement=function(t,n,i){var c,d={},b=null;if(n!=null)for(c in n.key!==void 0&&(b=""+n.key),n)ne.call(n,c)&&c!=="key"&&c!=="__self"&&c!=="__source"&&(d[c]=n[c]);var h=arguments.length-2;if(h===1)d.children=i;else if(1<h){for(var C=Array(h),v=0;v<h;v++)C[v]=arguments[v+2];d.children=C}if(t&&t.defaultProps)for(c in h=t.defaultProps,h)d[c]===void 0&&(d[c]=h[c]);return oe(t,b,void 0,void 0,null,d)},_.createRef=function(){return{current:null}},_.forwardRef=function(t){return{$$typeof:D,render:t}},_.isValidElement=U,_.lazy=function(t){return{$$typeof:$,_payload:{_status:-1,_result:t},_init:K}},_.memo=function(t,n){return{$$typeof:z,type:t,compare:n===void 0?null:n}},_.startTransition=function(t){var n=T.T,i={};T.T=i;try{var c=t(),d=T.S;d!==null&&d(i,c),typeof c=="object"&&c!==null&&typeof c.then=="function"&&c.then(se,W)}catch(b){W(b)}finally{T.T=n}},_.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},_.use=function(t){return T.H.use(t)},_.useActionState=function(t,n,i){return T.H.useActionState(t,n,i)},_.useCallback=function(t,n){return T.H.useCallback(t,n)},_.useContext=function(t){return T.H.useContext(t)},_.useDebugValue=function(){},_.useDeferredValue=function(t,n){return T.H.useDeferredValue(t,n)},_.useEffect=function(t,n,i){var c=T.H;if(typeof i=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return c.useEffect(t,n)},_.useId=function(){return T.H.useId()},_.useImperativeHandle=function(t,n,i){return T.H.useImperativeHandle(t,n,i)},_.useInsertionEffect=function(t,n){return T.H.useInsertionEffect(t,n)},_.useLayoutEffect=function(t,n){return T.H.useLayoutEffect(t,n)},_.useMemo=function(t,n){return T.H.useMemo(t,n)},_.useOptimistic=function(t,n){return T.H.useOptimistic(t,n)},_.useReducer=function(t,n,i){return T.H.useReducer(t,n,i)},_.useRef=function(t){return T.H.useRef(t)},_.useState=function(t){return T.H.useState(t)},_.useSyncExternalStore=function(t,n,i){return T.H.useSyncExternalStore(t,n,i)},_.useTransition=function(){return T.H.useTransition()},_.version="19.1.1",_}var pe={exports:{}};/**
18
- * @license React
19
- * react.development.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */pe.exports;var Ne;function rt(){return Ne||(Ne=1,(function(w,o){process.env.NODE_ENV!=="production"&&(function(){function u(e,r){Object.defineProperty(m.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",r[0],r[1])}})}function f(e){return e===null||typeof e!="object"?null:(e=ye&&e[ye]||e["@@iterator"],typeof e=="function"?e:null)}function p(e,r){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var s=e+"."+r;Ve[s]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",r,e),Ve[s]=!0)}function m(e,r,s){this.props=e,this.context=r,this.refs=ke,this.updater=s||We}function A(){}function D(e,r,s){this.props=e,this.context=r,this.refs=ke,this.updater=s||We}function ae(e){return""+e}function z(e){try{ae(e);var r=!1}catch{r=!0}if(r){r=console;var s=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),ae(e)}}function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===dt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case t:return"Fragment";case i:return"Profiler";case n:return"StrictMode";case h:return"Suspense";case C:return"SuspenseList";case he:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case se:return"Portal";case d:return(e.displayName||"Context")+".Provider";case c:return(e._context.displayName||"Context")+".Consumer";case b:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case v:return r=e.displayName||null,r!==null?r:$(e.type)||"Memo";case P:r=e._payload,e=e._init;try{return $(e(r))}catch{}}return null}function G(e){if(e===t)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===P)return"<...>";try{var r=$(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function H(){var e=g.A;return e===null?null:e.getOwner()}function F(){return Error("react-stack-top-frame")}function te(e){if(Re.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function B(e,r){function s(){Ge||(Ge=!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)",r))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function Y(){var e=$(this.type);return Be[e]||(Be[e]=!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.")),e=this.props.ref,e!==void 0?e:null}function Q(e,r,s,a,l,R,E,S){return s=R.ref,e={$$typeof:W,type:e,key:r,props:R,_owner:l},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:Y}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:E}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function re(e,r){return r=Q(e.type,r,void 0,void 0,e._owner,e.props,e._debugStack,e._debugTask),e._store&&(r._store.validated=e._store.validated),r}function j(e){return typeof e=="object"&&e!==null&&e.$$typeof===W}function ie(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(s){return r[s]})}function T(e,r){return typeof e=="object"&&e!==null&&e.key!=null?(z(e.key),ie(""+e.key)):r.toString(36)}function ne(){}function oe(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ne,ne):(e.status="pending",e.then(function(r){e.status==="pending"&&(e.status="fulfilled",e.value=r)},function(r){e.status==="pending"&&(e.status="rejected",e.reason=r)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function L(e,r,s,a,l){var R=typeof e;(R==="undefined"||R==="boolean")&&(e=null);var E=!1;if(e===null)E=!0;else switch(R){case"bigint":case"string":case"number":E=!0;break;case"object":switch(e.$$typeof){case W:case se:E=!0;break;case P:return E=e._init,L(E(e._payload),r,s,a,l)}}if(E){E=e,l=l(E);var S=a===""?"."+T(E,0):a;return xe(l)?(s="",S!=null&&(s=S.replace(Xe,"$&/")+"/"),L(l,r,s,"",function(Z){return Z})):l!=null&&(j(l)&&(l.key!=null&&(E&&E.key===l.key||z(l.key)),s=re(l,s+(l.key==null||E&&E.key===l.key?"":(""+l.key).replace(Xe,"$&/")+"/")+S),a!==""&&E!=null&&j(E)&&E.key==null&&E._store&&!E._store.validated&&(s._store.validated=2),l=s),r.push(l)),1}if(E=0,S=a===""?".":a+":",xe(e))for(var y=0;y<e.length;y++)a=e[y],R=S+T(a,y),E+=L(a,r,s,R,l);else if(y=f(e),typeof y=="function")for(y===e.entries&&(Qe||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Qe=!0),e=y.call(e),y=0;!(a=e.next()).done;)a=a.value,R=S+T(a,y++),E+=L(a,r,s,R,l);else if(R==="object"){if(typeof e.then=="function")return L(oe(e),r,s,a,l);throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return E}function U(e,r,s){if(e==null)return e;var a=[],l=0;return L(e,a,"","",function(R){return r.call(s,R,l++)}),a}function de(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s)},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return r=e._result,r===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
26
-
27
- Your code should look like:
28
- const MyComponent = lazy(() => import('./MyComponent'))
29
-
30
- Did you accidentally put curly braces around the import?`,r),"default"in r||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
31
-
32
- Your code should look like:
33
- const MyComponent = lazy(() => import('./MyComponent'))`,r),r.default;throw e._result}function O(){var e=g.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
34
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
35
- 2. You might be breaking the Rules of Hooks
36
- 3. You might have more than one copy of React in the same app
37
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function X(){}function V(e){if(we===null)try{var r=("require"+Math.random()).slice(0,7);we=(w&&w[r]).call(w,"timers").setImmediate}catch{we=function(a){Ze===!1&&(Ze=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var l=new MessageChannel;l.port1.onmessage=a,l.port2.postMessage(void 0)}}return we(e)}function M(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function k(e,r){r!==be-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),be=r}function I(e,r,s){var a=g.actQueue;if(a!==null)if(a.length!==0)try{K(a),V(function(){return I(e,r,s)});return}catch(l){g.thrownErrors.push(l)}else g.actQueue=null;0<g.thrownErrors.length?(a=M(g.thrownErrors),g.thrownErrors.length=0,s(a)):r(e)}function K(e){if(!Ce){Ce=!0;var r=0;try{for(;r<e.length;r++){var s=e[r];do{g.didUsePromise=!1;var a=s(!1);if(a!==null){if(g.didUsePromise){e[r]=s,e.splice(0,r);return}s=a}else break}while(!0)}e.length=0}catch(l){e.splice(0,r+1),g.thrownErrors.push(l)}finally{Ce=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var W=Symbol.for("react.transitional.element"),se=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),he=Symbol.for("react.activity"),ye=Symbol.iterator,Ve={},We={isMounted:function(){return!1},enqueueForceUpdate:function(e){p(e,"forceUpdate")},enqueueReplaceState:function(e){p(e,"replaceState")},enqueueSetState:function(e){p(e,"setState")}},qe=Object.assign,ke={};Object.freeze(ke),m.prototype.isReactComponent={},m.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var N={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ge;for(ge in N)N.hasOwnProperty(ge)&&u(ge,N[ge]);A.prototype=m.prototype,N=D.prototype=new A,N.constructor=D,qe(N,m.prototype),N.isPureReactComponent=!0;var xe=Array.isArray,dt=Symbol.for("react.client.reference"),g={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Re=Object.prototype.hasOwnProperty,ze=console.createTask?console.createTask:function(){return null};N={react_stack_bottom_frame:function(e){return e()}};var Ge,Fe,Be={},ht=N.react_stack_bottom_frame.bind(N,F)(),_t=ze(G(F)),Qe=!1,Xe=/\/+/g,Ke=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ze=!1,we=null,be=0,Te=!1,Ce=!1,Je=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:V;N=Object.freeze({__proto__:null,c:function(e){return O().useMemoCache(e)}}),o.Children={map:U,forEach:function(e,r,s){U(e,function(){r.apply(this,arguments)},s)},count:function(e){var r=0;return U(e,function(){r++}),r},toArray:function(e){return U(e,function(r){return r})||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},o.Component=m,o.Fragment=t,o.Profiler=i,o.PureComponent=D,o.StrictMode=n,o.Suspense=h,o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g,o.__COMPILER_RUNTIME=N,o.act=function(e){var r=g.actQueue,s=be;be++;var a=g.actQueue=r!==null?r:[],l=!1;try{var R=e()}catch(y){g.thrownErrors.push(y)}if(0<g.thrownErrors.length)throw k(r,s),e=M(g.thrownErrors),g.thrownErrors.length=0,e;if(R!==null&&typeof R=="object"&&typeof R.then=="function"){var E=R;return Je(function(){l||Te||(Te=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(y,Z){l=!0,E.then(function(ce){if(k(r,s),s===0){try{K(a),V(function(){return I(ce,y,Z)})}catch(mt){g.thrownErrors.push(mt)}if(0<g.thrownErrors.length){var vt=M(g.thrownErrors);g.thrownErrors.length=0,Z(vt)}}else y(ce)},function(ce){k(r,s),0<g.thrownErrors.length&&(ce=M(g.thrownErrors),g.thrownErrors.length=0),Z(ce)})}}}var S=R;if(k(r,s),s===0&&(K(a),a.length!==0&&Je(function(){l||Te||(Te=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),g.actQueue=null),0<g.thrownErrors.length)throw e=M(g.thrownErrors),g.thrownErrors.length=0,e;return{then:function(y,Z){l=!0,s===0?(g.actQueue=a,V(function(){return I(S,y,Z)})):y(S)}}},o.cache=function(e){return function(){return e.apply(null,arguments)}},o.captureOwnerStack=function(){var e=g.getCurrentStack;return e===null?null:e()},o.cloneElement=function(e,r,s){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=qe({},e.props),l=e.key,R=e._owner;if(r!=null){var E;e:{if(Re.call(r,"ref")&&(E=Object.getOwnPropertyDescriptor(r,"ref").get)&&E.isReactWarning){E=!1;break e}E=r.ref!==void 0}E&&(R=H()),te(r)&&(z(r.key),l=""+r.key);for(S in r)!Re.call(r,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&r.ref===void 0||(a[S]=r[S])}var S=arguments.length-2;if(S===1)a.children=s;else if(1<S){E=Array(S);for(var y=0;y<S;y++)E[y]=arguments[y+2];a.children=E}for(a=Q(e.type,l,void 0,void 0,R,a,e._debugStack,e._debugTask),l=2;l<arguments.length;l++)R=arguments[l],j(R)&&R._store&&(R._store.validated=1);return a},o.createContext=function(e){return e={$$typeof:d,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:c,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},o.createElement=function(e,r,s){for(var a=2;a<arguments.length;a++){var l=arguments[a];j(l)&&l._store&&(l._store.validated=1)}if(a={},l=null,r!=null)for(y in Fe||!("__self"in r)||"key"in r||(Fe=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),te(r)&&(z(r.key),l=""+r.key),r)Re.call(r,y)&&y!=="key"&&y!=="__self"&&y!=="__source"&&(a[y]=r[y]);var R=arguments.length-2;if(R===1)a.children=s;else if(1<R){for(var E=Array(R),S=0;S<R;S++)E[S]=arguments[S+2];Object.freeze&&Object.freeze(E),a.children=E}if(e&&e.defaultProps)for(y in R=e.defaultProps,R)a[y]===void 0&&(a[y]=R[y]);l&&B(a,typeof e=="function"?e.displayName||e.name||"Unknown":e);var y=1e4>g.recentlyCreatedOwnerStacks++;return Q(e,l,void 0,void 0,H(),a,y?Error("react-stack-top-frame"):ht,y?ze(G(e)):_t)},o.createRef=function(){var e={current:null};return Object.seal(e),e},o.forwardRef=function(e){e!=null&&e.$$typeof===v?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var r={$$typeof:b,render:e},s;return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return s},set:function(a){s=a,e.name||e.displayName||(Object.defineProperty(e,"name",{value:a}),e.displayName=a)}}),r},o.isValidElement=j,o.lazy=function(e){return{$$typeof:P,_payload:{_status:-1,_result:e},_init:de}},o.memo=function(e,r){e==null&&console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),r={$$typeof:v,type:e,compare:r===void 0?null:r};var s;return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return s},set:function(a){s=a,e.name||e.displayName||(Object.defineProperty(e,"name",{value:a}),e.displayName=a)}}),r},o.startTransition=function(e){var r=g.T,s={};g.T=s,s._updatedFibers=new Set;try{var a=e(),l=g.S;l!==null&&l(s,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(X,Ke)}catch(R){Ke(R)}finally{r===null&&s._updatedFibers&&(e=s._updatedFibers.size,s._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),g.T=r}},o.unstable_useCacheRefresh=function(){return O().useCacheRefresh()},o.use=function(e){return O().use(e)},o.useActionState=function(e,r,s){return O().useActionState(e,r,s)},o.useCallback=function(e,r){return O().useCallback(e,r)},o.useContext=function(e){var r=O();return e.$$typeof===c&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),r.useContext(e)},o.useDebugValue=function(e,r){return O().useDebugValue(e,r)},o.useDeferredValue=function(e,r){return O().useDeferredValue(e,r)},o.useEffect=function(e,r,s){e==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var a=O();if(typeof s=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,r)},o.useId=function(){return O().useId()},o.useImperativeHandle=function(e,r,s){return O().useImperativeHandle(e,r,s)},o.useInsertionEffect=function(e,r){return e==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),O().useInsertionEffect(e,r)},o.useLayoutEffect=function(e,r){return e==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),O().useLayoutEffect(e,r)},o.useMemo=function(e,r){return O().useMemo(e,r)},o.useOptimistic=function(e,r){return O().useOptimistic(e,r)},o.useReducer=function(e,r,s){return O().useReducer(e,r,s)},o.useRef=function(e){return O().useRef(e)},o.useState=function(e){return O().useState(e)},o.useSyncExternalStore=function(e,r,s){return O().useSyncExternalStore(e,r,s)},o.useTransition=function(){return O().useTransition()},o.version="19.1.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(pe,pe.exports)),pe.exports}var De;function Le(){return De||(De=1,process.env.NODE_ENV==="production"?_e.exports=tt():_e.exports=rt()),_e.exports}/**
9
+ */var I;function ee(){if(I)return E;I=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(s,n,a){var f=null;if(a!==void 0&&(f=""+a),n.key!==void 0&&(f=""+n.key),"key"in n){a={};for(var g in n)g!=="key"&&(a[g]=n[g])}else a=n;return n=a.ref,{$$typeof:i,type:s,key:f,ref:n!==void 0?n:null,props:a}}return E.Fragment=r,E.jsx=t,E.jsxs=t,E}var R={};/**
38
10
  * @license React
39
11
  * react-jsx-runtime.development.js
40
12
  *
@@ -42,9 +14,9 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
42
14
  *
43
15
  * This source code is licensed under the MIT license found in the
44
16
  * LICENSE file in the root directory of this source tree.
45
- */var Me;function nt(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&(function(){function w(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===de?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case Q:return"Profiler";case Y:return"StrictMode";case T:return"Suspense";case ne:return"SuspenseList";case U:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case te:return"Portal";case j:return(t.displayName||"Context")+".Provider";case re:return(t._context.displayName||"Context")+".Consumer";case ie:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case oe:return n=t.displayName||null,n!==null?n:w(t.type)||"Memo";case L:n=t._payload,t=t._init;try{return w(t(n))}catch{}}return null}function o(t){return""+t}function u(t){try{o(t);var n=!1}catch{n=!0}if(n){n=console;var i=n.error,c=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return i.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",c),o(t)}}function f(t){if(t===B)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===L)return"<...>";try{var n=w(t);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function p(){var t=O.A;return t===null?null:t.getOwner()}function m(){return Error("react-stack-top-frame")}function A(t){if(X.call(t,"key")){var n=Object.getOwnPropertyDescriptor(t,"key").get;if(n&&n.isReactWarning)return!1}return t.key!==void 0}function D(t,n){function i(){k||(k=!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)",n))}i.isReactWarning=!0,Object.defineProperty(t,"key",{get:i,configurable:!0})}function ae(){var t=w(this.type);return I[t]||(I[t]=!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.")),t=this.props.ref,t!==void 0?t:null}function z(t,n,i,c,d,b,h,C){return i=b.ref,t={$$typeof:F,type:t,key:n,props:b,_owner:d},(i!==void 0?i:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:ae}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function $(t,n,i,c,d,b,h,C){var v=n.children;if(v!==void 0)if(c)if(V(v)){for(c=0;c<v.length;c++)G(v[c]);Object.freeze&&Object.freeze(v)}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 G(v);if(X.call(n,"key")){v=w(t);var P=Object.keys(n).filter(function(ye){return ye!=="key"});c=0<P.length?"{key: someKey, "+P.join(": ..., ")+": ...}":"{key: someKey}",se[v+c]||(P=0<P.length?"{"+P.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var L;function te(){return L||(L=1,process.env.NODE_ENV!=="production"&&(function(){function i(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case he:return"Profiler";case pe:return"StrictMode";case be:return"Suspense";case Se:return"SuspenseList";case Re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case de:return"Portal";case ve:return(e.displayName||"Context")+".Provider";case _e:return(e._context.displayName||"Context")+".Consumer";case me:var o=e.render;return e=e.displayName,e||(e=o.displayName||o.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return o=e.displayName||null,o!==null?o:i(e.type)||"Memo";case q:o=e._payload,e=e._init;try{return i(e(o))}catch{}}return null}function r(e){return""+e}function t(e){try{r(e);var o=!1}catch{o=!0}if(o){o=console;var c=o.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),r(e)}}function s(e){if(e===j)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===q)return"<...>";try{var o=i(e);return o?"<"+o+">":"<...>"}catch{return"<...>"}}function n(){var e=x.A;return e===null?null:e.getOwner()}function a(){return Error("react-stack-top-frame")}function f(e){if(X.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}function g(e,o){function c(){B||(B=!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)",o))}c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}function ue(){var e=i(this.type);return H[e]||(H[e]=!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.")),e=this.props.ref,e!==void 0?e:null}function fe(e,o,c,l,h,d,C,N){return c=d.ref,e={$$typeof:J,type:e,key:o,props:d,_owner:h},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:ue}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function $(e,o,c,l,h,d,C,N){var u=o.children;if(u!==void 0)if(l)if(Te(u)){for(l=0;l<u.length;l++)z(u[l]);Object.freeze&&Object.freeze(u)}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 z(u);if(X.call(o,"key")){u=i(e);var S=Object.keys(o).filter(function(ke){return ke!=="key"});l=0<S.length?"{key: someKey, "+S.join(": ..., ")+": ...}":"{key: someKey}",K[u+l]||(S=0<S.length?"{"+S.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
46
18
  let props = %s;
47
19
  <%s {...props} />
48
20
  React keys must be passed directly to JSX without using spread:
49
21
  let props = %s;
50
- <%s key={someKey} {...props} />`,c,v,P,v),se[v+c]=!0)}if(v=null,i!==void 0&&(u(i),v=""+i),A(n)&&(u(n.key),v=""+n.key),"key"in n){i={};for(var he in n)he!=="key"&&(i[he]=n[he])}else i=n;return v&&D(i,typeof t=="function"?t.displayName||t.name||"Unknown":t),z(t,v,b,d,p(),i,h,C)}function G(t){typeof t=="object"&&t!==null&&t.$$typeof===F&&t._store&&(t._store.validated=1)}var H=Le(),F=Symbol.for("react.transitional.element"),te=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),j=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),de=Symbol.for("react.client.reference"),O=H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,V=Array.isArray,M=console.createTask?console.createTask:function(){return null};H={react_stack_bottom_frame:function(t){return t()}};var k,I={},K=H.react_stack_bottom_frame.bind(H,m)(),W=M(f(m)),se={};le.Fragment=B,le.jsx=function(t,n,i,c,d){var b=1e4>O.recentlyCreatedOwnerStacks++;return $(t,n,i,!1,c,d,b?Error("react-stack-top-frame"):K,b?M(f(t)):W)},le.jsxs=function(t,n,i,c,d){var b=1e4>O.recentlyCreatedOwnerStacks++;return $(t,n,i,!0,c,d,b?Error("react-stack-top-frame"):K,b?M(f(t)):W)}})()),le}var Ie;function ot(){return Ie||(Ie=1,process.env.NODE_ENV==="production"?x.exports=et():x.exports=nt()),x.exports}var $e=ot(),st=Le();function ut(){const[w,o]=st.useState(0);return $e.jsxs("div",{children:["login form ",w,$e.jsx("button",{onClick:()=>{o(u=>u+1)},type:"button",children:"click"})]})}const ue=new WeakMap,ve=new WeakMap,me={current:[]};let Se=!1;const Ee=new Set,Ye=new Map;function Ue(w){const o=Array.from(w).sort((u,f)=>u instanceof J&&u.options.deps.includes(f)?1:f instanceof J&&f.options.deps.includes(u)?-1:0);for(const u of o){if(me.current.includes(u))continue;me.current.push(u),u.recompute();const f=ve.get(u);if(f)for(const p of f){const m=ue.get(p);m&&Ue(m)}}}function at(w){w.listeners.forEach(o=>o({prevVal:w.prevState,currentVal:w.state}))}function it(w){w.listeners.forEach(o=>o({prevVal:w.prevState,currentVal:w.state}))}function ct(w){if(Ee.add(w),!Se)try{for(Se=!0;Ee.size>0;){const o=Array.from(Ee);Ee.clear();for(const u of o){const f=Ye.get(u)??u.prevState;u.prevState=f,at(u)}for(const u of o){const f=ue.get(u);f&&(me.current.push(u),Ue(f))}for(const u of o){const f=ue.get(u);if(f)for(const p of f)it(p)}}}finally{Se=!1,me.current=[],Ye.clear()}}function ft(w){return typeof w=="function"}class Oe{constructor(o,u){this.listeners=new Set,this.subscribe=f=>{var p,m;this.listeners.add(f);const A=(m=(p=this.options)==null?void 0:p.onSubscribe)==null?void 0:m.call(p,f,this);return()=>{this.listeners.delete(f),A?.()}},this.prevState=o,this.state=o,this.options=u}setState(o){var u,f,p;this.prevState=this.state,(u=this.options)!=null&&u.updateFn?this.state=this.options.updateFn(this.prevState)(o):ft(o)?this.state=o(this.prevState):this.state=o,(p=(f=this.options)==null?void 0:f.onUpdate)==null||p.call(f),ct(this)}}class J{constructor(o){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const u=[],f=[];for(const p of this.options.deps)u.push(p.prevState),f.push(p.state);return this.lastSeenDepValues=f,{prevDepVals:u,currDepVals:f,prevVal:this.prevState??void 0}},this.recompute=()=>{var u,f;this.prevState=this.state;const{prevDepVals:p,currDepVals:m,prevVal:A}=this.getDepVals();this.state=this.options.fn({prevDepVals:p,currDepVals:m,prevVal:A}),(f=(u=this.options).onUpdate)==null||f.call(u)},this.checkIfRecalculationNeededDeeply=()=>{for(const m of this.options.deps)m instanceof J&&m.checkIfRecalculationNeededDeeply();let u=!1;const f=this.lastSeenDepValues,{currDepVals:p}=this.getDepVals();for(let m=0;m<p.length;m++)if(p[m]!==f[m]){u=!0;break}u&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const u of this._subscriptions)u()}),this.subscribe=u=>{var f,p;this.listeners.add(u);const m=(p=(f=this.options).onSubscribe)==null?void 0:p.call(f,u,this);return()=>{this.listeners.delete(u),m?.()}},this.options=o,this.state=o.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(o=this.options.deps){for(const u of o)if(u instanceof J)u.registerOnGraph(),this.registerOnGraph(u.options.deps);else if(u instanceof Oe){let f=ue.get(u);f||(f=new Set,ue.set(u,f)),f.add(this);let p=ve.get(this);p||(p=new Set,ve.set(this,p)),p.add(u)}}unregisterFromGraph(o=this.options.deps){for(const u of o)if(u instanceof J)this.unregisterFromGraph(u.options.deps);else if(u instanceof Oe){const f=ue.get(u);f&&f.delete(this);const p=ve.get(this);p&&p.delete(u)}}}const Ae="Authorization",He=()=>({user:{id:null,email:null,roles:[],is_enabled:!1,is_active:!1},isAuthenticated:!1,isLoaded:!1}),ee=new Oe(He()),lt=new J({fn:()=>!!ee.state.user?.roles.find(w=>w.name==="admin"),deps:[ee]});class pt{accountStore;httpClient;constructor(o){this.httpClient=o,this.accountStore=ee}initAuthData(){const o=localStorage.getItem("token");o&&(this.httpClient.defaults.headers.common[Ae]=o)}async load(){try{const{data:o}=await this.httpClient.get("/api/auth/account/me");ee.setState(()=>({user:o,isAuthenticated:!0,isLoaded:!0}))}catch{ee.setState(o=>({...o,isLoaded:!0}))}}async login(o){const u=await this.httpClient.post("/api/auth/account/login",o),{user:f,access_token:p}=u.data;return f.is_active&&this._initUserData({user:f,access_token:p}),f}register(o){return this.httpClient.post("/api/auth/account/register",o)}async activate(o){const u=await this.httpClient.post("/api/auth/account/activate",o);this._initUserData(u.data)}logout(){ee.setState(()=>({...He(),isLoaded:!0})),this._clearAuthData()}startResetPassword(o){return this.httpClient.post("/api/auth/account/start-reset-password",o)}async resetPassword(o){const u=await this.httpClient.post("/api/auth/account/reset-password",o);this._initUserData(u.data)}_initUserData({user:o,access_token:u}){this._setAuthData(u),ee.setState(()=>({user:o,isAuthenticated:!0,isLoaded:!0}))}_setAuthData(o){localStorage.setItem("token",o),this.httpClient.defaults.headers.common[Ae]=o}_clearAuthData(){localStorage.removeItem("token"),delete this.httpClient.defaults.headers.common[Ae]}}q.Auth=pt,q.LoginForm=ut,q.isAdmin=lt,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
22
+ <%s key={someKey} {...props} />`,l,u,S,u),K[u+l]=!0)}if(u=null,c!==void 0&&(t(c),u=""+c),f(o)&&(t(o.key),u=""+o.key),"key"in o){c={};for(var F in o)F!=="key"&&(c[F]=o[F])}else c=o;return u&&g(c,typeof e=="function"?e.displayName||e.name||"Unknown":e),fe(e,u,d,h,n(),c,C,N)}function z(e){typeof e=="object"&&e!==null&&e.$$typeof===J&&e._store&&(e._store.validated=1)}var y=m,J=Symbol.for("react.transitional.element"),de=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),_e=Symbol.for("react.consumer"),ve=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Se=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),Re=Symbol.for("react.activity"),ge=Symbol.for("react.client.reference"),x=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,Te=Array.isArray,V=console.createTask?console.createTask:function(){return null};y={react_stack_bottom_frame:function(e){return e()}};var B,H={},Z=y.react_stack_bottom_frame.bind(y,a)(),Q=V(s(a)),K={};R.Fragment=j,R.jsx=function(e,o,c,l,h){var d=1e4>x.recentlyCreatedOwnerStacks++;return $(e,o,c,!1,l,h,d?Error("react-stack-top-frame"):Z,d?V(s(e)):Q)},R.jsxs=function(e,o,c,l,h){var d=1e4>x.recentlyCreatedOwnerStacks++;return $(e,o,c,!0,l,h,d?Error("react-stack-top-frame"):Z,d?V(s(e)):Q)}})()),R}var Y;function re(){return Y||(Y=1,process.env.NODE_ENV==="production"?T.exports=ee():T.exports=te()),T.exports}var U=re();function se(){const[i,r]=m.useState(0);return U.jsxs("div",{children:["login form ",i,U.jsx("button",{onClick:()=>{r(t=>t+1)},type:"button",children:"click"})]})}const b=new WeakMap,k=new WeakMap,A={current:[]};let O=!1;const w=new Set,M=new Map;function W(i){const r=Array.from(i).sort((t,s)=>t instanceof _&&t.options.deps.includes(s)?1:s instanceof _&&s.options.deps.includes(t)?-1:0);for(const t of r){if(A.current.includes(t))continue;A.current.push(t),t.recompute();const s=k.get(t);if(s)for(const n of s){const a=b.get(n);a&&W(a)}}}function ne(i){i.listeners.forEach(r=>r({prevVal:i.prevState,currentVal:i.state}))}function oe(i){i.listeners.forEach(r=>r({prevVal:i.prevState,currentVal:i.state}))}function ae(i){if(w.add(i),!O)try{for(O=!0;w.size>0;){const r=Array.from(w);w.clear();for(const t of r){const s=M.get(t)??t.prevState;t.prevState=s,ne(t)}for(const t of r){const s=b.get(t);s&&(A.current.push(t),W(s))}for(const t of r){const s=b.get(t);if(s)for(const n of s)oe(n)}}}finally{O=!1,A.current=[],M.clear()}}function ie(i){return typeof i=="function"}class D{constructor(r,t){this.listeners=new Set,this.subscribe=s=>{var n,a;this.listeners.add(s);const f=(a=(n=this.options)==null?void 0:n.onSubscribe)==null?void 0:a.call(n,s,this);return()=>{this.listeners.delete(s),f?.()}},this.prevState=r,this.state=r,this.options=t}setState(r){var t,s,n;this.prevState=this.state,(t=this.options)!=null&&t.updateFn?this.state=this.options.updateFn(this.prevState)(r):ie(r)?this.state=r(this.prevState):this.state=r,(n=(s=this.options)==null?void 0:s.onUpdate)==null||n.call(s),ae(this)}}class _{constructor(r){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const t=[],s=[];for(const n of this.options.deps)t.push(n.prevState),s.push(n.state);return this.lastSeenDepValues=s,{prevDepVals:t,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var t,s;this.prevState=this.state;const{prevDepVals:n,currDepVals:a,prevVal:f}=this.getDepVals();this.state=this.options.fn({prevDepVals:n,currDepVals:a,prevVal:f}),(s=(t=this.options).onUpdate)==null||s.call(t)},this.checkIfRecalculationNeededDeeply=()=>{for(const a of this.options.deps)a instanceof _&&a.checkIfRecalculationNeededDeeply();let t=!1;const s=this.lastSeenDepValues,{currDepVals:n}=this.getDepVals();for(let a=0;a<n.length;a++)if(n[a]!==s[a]){t=!0;break}t&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const t of this._subscriptions)t()}),this.subscribe=t=>{var s,n;this.listeners.add(t);const a=(n=(s=this.options).onSubscribe)==null?void 0:n.call(s,t,this);return()=>{this.listeners.delete(t),a?.()}},this.options=r,this.state=r.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(r=this.options.deps){for(const t of r)if(t instanceof _)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof D){let s=b.get(t);s||(s=new Set,b.set(t,s)),s.add(this);let n=k.get(this);n||(n=new Set,k.set(this,n)),n.add(t)}}unregisterFromGraph(r=this.options.deps){for(const t of r)if(t instanceof _)this.unregisterFromGraph(t.options.deps);else if(t instanceof D){const s=b.get(t);s&&s.delete(this);const n=k.get(this);n&&n.delete(t)}}}const P="Authorization",G=()=>({user:{id:null,email:null,roles:[],is_enabled:!1,is_active:!1},isAuthenticated:!1,isLoaded:!1}),v=new D(G()),ce=new _({fn:()=>!!v.state.user?.roles.find(i=>i.name==="admin"),deps:[v]});class le{accountStore;httpClient;constructor(r){this.httpClient=r,this.accountStore=v}initAuthData(){const r=localStorage.getItem("token");r&&(this.httpClient.defaults.headers.common[P]=r)}async load(){try{const{data:r}=await this.httpClient.get("/api/auth/account/me");v.setState(()=>({user:r,isAuthenticated:!0,isLoaded:!0}))}catch{v.setState(r=>({...r,isLoaded:!0}))}}async login(r){const t=await this.httpClient.post("/api/auth/account/login",r),{user:s,access_token:n}=t.data;return s.is_active&&this._initUserData({user:s,access_token:n}),s}register(r){return this.httpClient.post("/api/auth/account/register",r)}async activate(r){const t=await this.httpClient.post("/api/auth/account/activate",r);this._initUserData(t.data)}logout(){v.setState(()=>({...G(),isLoaded:!0})),this._clearAuthData()}startResetPassword(r){return this.httpClient.post("/api/auth/account/start-reset-password",r)}async resetPassword(r){const t=await this.httpClient.post("/api/auth/account/reset-password",r);this._initUserData(t.data)}_initUserData({user:r,access_token:t}){this._setAuthData(t),v.setState(()=>({user:r,isAuthenticated:!0,isLoaded:!0}))}_setAuthData(r){localStorage.setItem("token",r),this.httpClient.defaults.headers.common[P]=r}_clearAuthData(){localStorage.removeItem("token"),delete this.httpClient.defaults.headers.common[P]}}p.Auth=le,p.LoginForm=se,p.isAdmin=ce,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@service_laboratory/auth",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",