@spark-ui/internal-utils 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.3.1](https://github.com/adevinta/spark/compare/@spark-ui/internal-utils@2.3.0...@spark-ui/internal-utils@2.3.1) (2024-05-30)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **internal-utils:** update rollup conf, include ext peerDeps to avoid deps mismatches at call site ([fc4ec83](https://github.com/adevinta/spark/commit/fc4ec8360965735e148316304e1e2cf3c769d2b3))
11
+
6
12
  # [2.3.0](https://github.com/adevinta/spark/compare/@spark-ui/internal-utils@2.2.0...@spark-ui/internal-utils@2.3.0) (2024-03-15)
7
13
 
8
14
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -1,31 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),qt=Object.freeze(Object.defineProperty({__proto__:null,designs:["filled","outlined","tinted","ghost","contrast","dashed"],intents:["current","main","support","success","error","info","alert","danger","neutral","surface","accent","basic"],shapes:["rounded","square","pill"],sizes:["current","sm","md","lg","xl"]},Symbol.toStringTag,{value:"Module"}));var Ot,ze={exports:{}},m={},Rt,Ue={exports:{}};/**
2
- * @license React
3
- * react.development.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */process.env.NODE_ENV==="production"?ze.exports=function(){if(Ot)return m;Ot=1;var j=Symbol.for("react.element"),f=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),Y=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),H=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),X=Symbol.iterator,F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W=Object.assign,fe={};function M(r,u,v){this.props=r,this.context=u,this.refs=fe,this.updater=v||F}function pe(){}function Q(r,u,v){this.props=r,this.context=u,this.refs=fe,this.updater=v||F}M.prototype.isReactComponent={},M.prototype.setState=function(r,u){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,u,"setState")},M.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")},pe.prototype=M.prototype;var Z=Q.prototype=new pe;Z.constructor=Q,W(Z,M.prototype),Z.isPureReactComponent=!0;var U=Array.isArray,$=Object.prototype.hasOwnProperty,T={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function G(r,u,v){var _,d={},R=null,S=null;if(u!=null)for(_ in u.ref!==void 0&&(S=u.ref),u.key!==void 0&&(R=""+u.key),u)$.call(u,_)&&!z.hasOwnProperty(_)&&(d[_]=u[_]);var C=arguments.length-2;if(C===1)d.children=v;else if(1<C){for(var E=Array(C),w=0;w<C;w++)E[w]=arguments[w+2];d.children=E}if(r&&r.defaultProps)for(_ in C=r.defaultProps)d[_]===void 0&&(d[_]=C[_]);return{$$typeof:j,type:r,key:R,ref:S,props:d,_owner:T.current}}function ee(r){return typeof r=="object"&&r!==null&&r.$$typeof===j}var de=/\/+/g;function se(r,u){return typeof r=="object"&&r!==null&&r.key!=null?function(v){var _={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(d){return _[d]})}(""+r.key):u.toString(36)}function te(r,u,v,_,d){var R=typeof r;R!=="undefined"&&R!=="boolean"||(r=null);var S=!1;if(r===null)S=!0;else switch(R){case"string":case"number":S=!0;break;case"object":switch(r.$$typeof){case j:case f:S=!0}}if(S)return d=d(S=r),r=_===""?"."+se(S,0):_,U(d)?(v="",r!=null&&(v=r.replace(de,"$&/")+"/"),te(d,u,v,"",function(w){return w})):d!=null&&(ee(d)&&(d=function(w,ye){return{$$typeof:j,type:w.type,key:ye,ref:w.ref,props:w.props,_owner:w._owner}}(d,v+(!d.key||S&&S.key===d.key?"":(""+d.key).replace(de,"$&/")+"/")+r)),u.push(d)),1;if(S=0,_=_===""?".":_+":",U(r))for(var C=0;C<r.length;C++){var E=_+se(R=r[C],C);S+=te(R,u,v,E,d)}else if(E=function(w){return w===null||typeof w!="object"?null:typeof(w=X&&w[X]||w["@@iterator"])=="function"?w:null}(r),typeof E=="function")for(r=E.call(r),C=0;!(R=r.next()).done;)S+=te(R=R.value,u,v,E=_+se(R,C++),d);else if(R==="object")throw u=String(r),Error("Objects are not valid as a React child (found: "+(u==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":u)+"). If you meant to render a collection of children, use an array instead.");return S}function re(r,u,v){if(r==null)return r;var _=[],d=0;return te(r,_,"","",function(R){return u.call(v,R,d++)}),_}function Re(r){if(r._status===-1){var u=r._result;(u=u()).then(function(v){r._status!==0&&r._status!==-1||(r._status=1,r._result=v)},function(v){r._status!==0&&r._status!==-1||(r._status=2,r._result=v)}),r._status===-1&&(r._status=0,r._result=u)}if(r._status===1)return r._result.default;throw r._result}var O={current:null},L={transition:null},h={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:L,ReactCurrentOwner:T};return m.Children={map:re,forEach:function(r,u,v){re(r,function(){u.apply(this,arguments)},v)},count:function(r){var u=0;return re(r,function(){u++}),u},toArray:function(r){return re(r,function(u){return u})||[]},only:function(r){if(!ee(r))throw Error("React.Children.only expected to receive a single React element child.");return r}},m.Component=M,m.Fragment=I,m.Profiler=D,m.PureComponent=Q,m.StrictMode=A,m.Suspense=K,m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h,m.cloneElement=function(r,u,v){if(r==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+r+".");var _=W({},r.props),d=r.key,R=r.ref,S=r._owner;if(u!=null){if(u.ref!==void 0&&(R=u.ref,S=T.current),u.key!==void 0&&(d=""+u.key),r.type&&r.type.defaultProps)var C=r.type.defaultProps;for(E in u)$.call(u,E)&&!z.hasOwnProperty(E)&&(_[E]=u[E]===void 0&&C!==void 0?C[E]:u[E])}var E=arguments.length-2;if(E===1)_.children=v;else if(1<E){C=Array(E);for(var w=0;w<E;w++)C[w]=arguments[w+2];_.children=C}return{$$typeof:j,type:r.type,key:d,ref:R,props:_,_owner:S}},m.createContext=function(r){return(r={$$typeof:Y,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:B,_context:r},r.Consumer=r},m.createElement=G,m.createFactory=function(r){var u=G.bind(null,r);return u.type=r,u},m.createRef=function(){return{current:null}},m.forwardRef=function(r){return{$$typeof:ie,render:r}},m.isValidElement=ee,m.lazy=function(r){return{$$typeof:J,_payload:{_status:-1,_result:r},_init:Re}},m.memo=function(r,u){return{$$typeof:H,type:r,compare:u===void 0?null:u}},m.startTransition=function(r){var u=L.transition;L.transition={};try{r()}finally{L.transition=u}},m.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},m.useCallback=function(r,u){return O.current.useCallback(r,u)},m.useContext=function(r){return O.current.useContext(r)},m.useDebugValue=function(){},m.useDeferredValue=function(r){return O.current.useDeferredValue(r)},m.useEffect=function(r,u){return O.current.useEffect(r,u)},m.useId=function(){return O.current.useId()},m.useImperativeHandle=function(r,u,v){return O.current.useImperativeHandle(r,u,v)},m.useInsertionEffect=function(r,u){return O.current.useInsertionEffect(r,u)},m.useLayoutEffect=function(r,u){return O.current.useLayoutEffect(r,u)},m.useMemo=function(r,u){return O.current.useMemo(r,u)},m.useReducer=function(r,u,v){return O.current.useReducer(r,u,v)},m.useRef=function(r){return O.current.useRef(r)},m.useState=function(r){return O.current.useState(r)},m.useSyncExternalStore=function(r,u,v){return O.current.useSyncExternalStore(r,u,v)},m.useTransition=function(){return O.current.useTransition()},m.version="18.2.0",m}():ze.exports=(Rt||(Rt=1,function(j,f){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var I=Symbol.for("react.element"),A=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),ie=Symbol.for("react.provider"),K=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),M=Symbol.iterator,pe="@@iterator";function Q(e){if(e===null||typeof e!="object")return null;var t=M&&e[M]||e[pe];return typeof t=="function"?t:null}var Z={current:null},U={transition:null},$={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},T={current:null},z={},G=null;function ee(e){G=e}z.setExtraStackFrame=function(e){G=e},z.getCurrentStack=null,z.getStackAddendum=function(){var e="";G&&(e+=G);var t=z.getCurrentStack;return t&&(e+=t()||""),e};var de=!1,se=!1,te=!1,re=!1,Re=!1,O={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:U,ReactCurrentOwner:T};function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r("warn",e,n)}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r("error",e,n)}function r(e,t,n){var o=O.ReactDebugCurrentFrame.getStackAddendum();o!==""&&(t+="%s",n=n.concat([o]));var a=n.map(function(s){return String(s)});a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}O.ReactDebugCurrentFrame=z,O.ReactCurrentActQueue=$;var u={};function v(e,t){var n=e.constructor,o=n&&(n.displayName||n.name)||"ReactClass",a=o+"."+t;u[a]||(h("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.",t,o),u[a]=!0)}var _={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){v(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,o){v(e,"replaceState")},enqueueSetState:function(e,t,n,o){v(e,"setState")}},d=Object.assign,R={};function S(e,t,n){this.props=e,this.context=t,this.refs=R,this.updater=n||_}Object.freeze(R),S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var C={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)."]},E=function(e,t){Object.defineProperty(S.prototype,e,{get:function(){L("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var w in C)C.hasOwnProperty(w)&&E(w,C[w]);function ye(){}function Ee(e,t,n){this.props=e,this.context=t,this.refs=R,this.updater=n||_}ye.prototype=S.prototype;var je=Ee.prototype=new ye;je.constructor=Ee,d(je,S.prototype),je.isPureReactComponent=!0;var Et=Array.isArray;function me(e){return Et(e)}function qe(e){return""+e}function he(e){if(function(t){try{return qe(t),!1}catch{return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}(e)),qe(e)}function Be(e){return e.displayName||"Context"}function q(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case A:return"Portal";case Y:return"Profiler";case B:return"StrictMode";case J:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case K:return Be(e)+".Consumer";case ie:return Be(e._context)+".Provider";case H:return function(s,i,p){var b=s.displayName;if(b)return b;var g=i.displayName||i.name||"";return g!==""?p+"("+g+")":p}(e,e.render,"ForwardRef");case F:var t=e.displayName||null;return t!==null?t:q(e.type)||"Memo";case W:var n=e,o=n._payload,a=n._init;try{return q(a(o))}catch{return null}}return null}var Ye,He,Pe,ce=Object.prototype.hasOwnProperty,We={key:!0,ref:!0,__self:!0,__source:!0};function Ge(e){if(ce.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Ke(e){if(ce.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}Pe={};var $e=function(e,t,n,o,a,s,i){var p={$$typeof:I,type:e,key:t,ref:n,props:i,_owner:s,_store:{}};return Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(p,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(p,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p};function jt(e,t,n){var o,a={},s=null,i=null,p=null,b=null;if(t!=null)for(o in Ge(t)&&(i=t.ref,function(y){if(typeof y.ref=="string"&&T.current&&y.__self&&T.current.stateNode!==y.__self){var N=q(T.current.type);Pe[N]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N,y.ref),Pe[N]=!0)}}(t)),Ke(t)&&(he(t.key),s=""+t.key),p=t.__self===void 0?null:t.__self,b=t.__source===void 0?null:t.__source,t)ce.call(t,o)&&!We.hasOwnProperty(o)&&(a[o]=t[o]);var g=arguments.length-2;if(g===1)a.children=n;else if(g>1){for(var l=Array(g),c=0;c<g;c++)l[c]=arguments[c+2];Object.freeze&&Object.freeze(l),a.children=l}if(e&&e.defaultProps){var k=e.defaultProps;for(o in k)a[o]===void 0&&(a[o]=k[o])}if(s||i){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&function(y,N){var V=function(){Ye||(Ye=!0,h("%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://reactjs.org/link/special-props)",N))};V.isReactWarning=!0,Object.defineProperty(y,"key",{get:V,configurable:!0})}(a,P),i&&function(y,N){var V=function(){He||(He=!0,h("%s: `ref` 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://reactjs.org/link/special-props)",N))};V.isReactWarning=!0,Object.defineProperty(y,"ref",{get:V,configurable:!0})}(a,P)}return $e(e,s,i,p,b,T.current,a)}function Pt(e,t,n){if(e==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o,a,s=d({},e.props),i=e.key,p=e.ref,b=e._self,g=e._source,l=e._owner;if(t!=null)for(o in Ge(t)&&(p=t.ref,l=T.current),Ke(t)&&(he(t.key),i=""+t.key),e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)ce.call(t,o)&&!We.hasOwnProperty(o)&&(t[o]===void 0&&a!==void 0?s[o]=a[o]:s[o]=t[o]);var c=arguments.length-2;if(c===1)s.children=n;else if(c>1){for(var k=Array(c),P=0;P<c;P++)k[P]=arguments[P+2];s.children=k}return $e(e.type,i,p,b,g,l,s)}function ne(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}var Je=".",$t=":",Xe=!1,xt=/\/+/g;function Qe(e){return e.replace(xt,"$&/")}function xe(e,t){return typeof e=="object"&&e!==null&&e.key!=null?(he(e.key),n=""+e.key,o={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(a){return o[a]})):t.toString(36);var n,o}function ve(e,t,n,o,a){var s=typeof e;s!=="undefined"&&s!=="boolean"||(e=null);var i,p,b,g=!1;if(e===null)g=!0;else switch(s){case"string":case"number":g=!0;break;case"object":switch(e.$$typeof){case I:case A:g=!0}}if(g){var l=e,c=a(l),k=o===""?Je+xe(l,0):o;if(me(c)){var P="";k!=null&&(P=Qe(k)+"/"),ve(c,t,P,"",function(Ut){return Ut})}else c!=null&&(ne(c)&&(!c.key||l&&l.key===c.key||he(c.key),i=c,p=n+(!c.key||l&&l.key===c.key?"":Qe(""+c.key)+"/")+k,c=$e(i.type,p,i.ref,i._self,i._source,i._owner,i.props)),t.push(c));return 1}var y=0,N=o===""?Je:o+$t;if(me(e))for(var V=0;V<e.length;V++)y+=ve(b=e[V],t,n,N+xe(b,V),a);else{var Me=Q(e);if(typeof Me=="function"){var St=e;Me===St.entries&&(Xe||L("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Xe=!0);for(var kt,Ft=Me.call(St),Mt=0;!(kt=Ft.next()).done;)y+=ve(b=kt.value,t,n,N+xe(b,Mt++),a)}else if(s==="object"){var Ct=String(e);throw new Error("Objects are not valid as a React child (found: "+(Ct==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":Ct)+"). If you meant to render a collection of children, use an array instead.")}}return y}function ge(e,t,n){if(e==null)return e;var o=[],a=0;return ve(e,o,"","",function(s){return t.call(n,s,a++)}),o}var Ze,le=-1,Te=0,et=1,Tt=2;function Dt(e){if(e._status===le){var t=(0,e._result)();if(t.then(function(a){if(e._status===Te||e._status===le){var s=e;s._status=et,s._result=a}},function(a){if(e._status===Te||e._status===le){var s=e;s._status=Tt,s._result=a}}),e._status===le){var n=e;n._status=Te,n._result=t}}if(e._status===et){var o=e._result;return o===void 0&&h(`lazy: Expected the result of a dynamic import() call. Instead received: %s
10
-
11
- Your code should look like:
12
- const MyComponent = lazy(() => import('./MyComponent'))
13
-
14
- Did you accidentally put curly braces around the import?`,o),"default"in o||h(`lazy: Expected the result of a dynamic import() call. Instead received: %s
15
-
16
- Your code should look like:
17
- const MyComponent = lazy(() => import('./MyComponent'))`,o),o.default}throw e._result}function tt(e){return typeof e=="string"||typeof e=="function"||!!(e===D||e===Y||Re||e===B||e===J||e===X||re||e===fe||de||se||te)||typeof e=="object"&&e!==null&&(e.$$typeof===W||e.$$typeof===F||e.$$typeof===ie||e.$$typeof===K||e.$$typeof===H||e.$$typeof===Ze||e.getModuleId!==void 0)}function x(){var e=Z.current;return e===null&&h(`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:
18
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
19
- 2. You might be breaking the Rules of Hooks
20
- 3. You might have more than one copy of React in the same app
21
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}Ze=Symbol.for("react.module.reference");var rt,nt,ot,at,ut,it,st,be=0;function ct(){}ct.__reactDisabledLog=!0;var De,Ie=O.ReactCurrentDispatcher;function _e(e,t,n){if(De===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);De=o&&o[1]||""}return`
22
- `+De+e}var we,Le=!1,It=typeof WeakMap=="function"?WeakMap:Map;function lt(e,t){if(!e||Le)return"";var n,o=we.get(e);if(o!==void 0)return o;Le=!0;var a,s=Error.prepareStackTrace;Error.prepareStackTrace=void 0,a=Ie.current,Ie.current=null,function(){if(be===0){rt=console.log,nt=console.info,ot=console.warn,at=console.error,ut=console.group,it=console.groupCollapsed,st=console.groupEnd;var y={configurable:!0,enumerable:!0,value:ct,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}be++}();try{if(t){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(y){n=y}Reflect.construct(e,[],i)}else{try{i.call()}catch(y){n=y}e.call(i.prototype)}}else{try{throw Error()}catch(y){n=y}e()}}catch(y){if(y&&n&&typeof y.stack=="string"){for(var p=y.stack.split(`
23
- `),b=n.stack.split(`
24
- `),g=p.length-1,l=b.length-1;g>=1&&l>=0&&p[g]!==b[l];)l--;for(;g>=1&&l>=0;g--,l--)if(p[g]!==b[l]){if(g!==1||l!==1)do if(g--,--l<0||p[g]!==b[l]){var c=`
25
- `+p[g].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),typeof e=="function"&&we.set(e,c),c}while(g>=1&&l>=0);break}}}finally{Le=!1,Ie.current=a,function(){if(--be==0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:d({},y,{value:rt}),info:d({},y,{value:nt}),warn:d({},y,{value:ot}),error:d({},y,{value:at}),group:d({},y,{value:ut}),groupCollapsed:d({},y,{value:it}),groupEnd:d({},y,{value:st})})}be<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=s}var k=e?e.displayName||e.name:"",P=k?_e(k):"";return typeof e=="function"&&we.set(e,P),P}function Se(e,t,n){if(e==null)return"";if(typeof e=="function")return lt(e,function(i){var p=i.prototype;return!(!p||!p.isReactComponent)}(e));if(typeof e=="string")return _e(e);switch(e){case J:return _e("Suspense");case X:return _e("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case H:return lt(e.render,!1);case F:return Se(e.type,t,n);case W:var o=e,a=o._payload,s=o._init;try{return Se(s(a),t,n)}catch{}}return""}we=new It;var Ne,ft={},pt=O.ReactDebugCurrentFrame;function ke(e){if(e){var t=e._owner,n=Se(e.type,e._source,t?t.type:null);pt.setExtraStackFrame(n)}else pt.setExtraStackFrame(null)}function oe(e){if(e){var t=e._owner;ee(Se(e.type,e._source,t?t.type:null))}else ee(null)}function dt(){if(T.current){var e=q(T.current.type);if(e)return`
26
-
27
- Check the render method of \``+e+"`."}return""}Ne=!1;var yt={};function mt(e,t){if(e._store&&!e._store.validated&&e.key==null){e._store.validated=!0;var n=function(a){var s=dt();if(!s){var i=typeof a=="string"?a:a.displayName||a.name;i&&(s=`
28
-
29
- Check the top-level render call using <`+i+">.")}return s}(t);if(!yt[n]){yt[n]=!0;var o="";e&&e._owner&&e._owner!==T.current&&(o=" It was passed a child from "+q(e._owner.type)+"."),oe(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),oe(null)}}}function ht(e,t){if(typeof e=="object"){if(me(e))for(var n=0;n<e.length;n++){var o=e[n];ne(o)&&mt(o,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var a=Q(e);if(typeof a=="function"&&a!==e.entries)for(var s,i=a.call(e);!(s=i.next()).done;)ne(s.value)&&mt(s.value,t)}}}function vt(e){var t,n=e.type;if(n!=null&&typeof n!="string"){if(typeof n=="function")t=n.propTypes;else{if(typeof n!="object"||n.$$typeof!==H&&n.$$typeof!==F)return;t=n.propTypes}if(t){var o=q(n);(function(a,s,i,p,b){var g=Function.call.bind(ce);for(var l in a)if(g(a,l)){var c=void 0;try{if(typeof a[l]!="function"){var k=Error((p||"React class")+": "+i+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}c=a[l](s,l,p,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){c=P}!c||c instanceof Error||(ke(b),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",p||"React class",i,l,typeof c),ke(null)),c instanceof Error&&!(c.message in ft)&&(ft[c.message]=!0,ke(b),h("Failed %s type: %s",i,c.message),ke(null))}})(t,e.props,"prop",o,e)}else n.PropTypes===void 0||Ne||(Ne=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q(n)||"Unknown"));typeof n.getDefaultProps!="function"||n.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gt(e,t,n){var o,a,s=tt(e);if(!s){var i,p="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(p+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),p+=((o=t)!=null&&(a=o.__source)!==void 0?`
30
-
31
- Check your code at `+a.fileName.replace(/^.*[\\\/]/,"")+":"+a.lineNumber+".":"")||dt(),e===null?i="null":me(e)?i="array":e!==void 0&&e.$$typeof===I?(i="<"+(q(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,h("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,p)}var b=jt.apply(this,arguments);if(b==null)return b;if(s)for(var g=2;g<arguments.length;g++)ht(arguments[g],e);return e===D?function(l){for(var c=Object.keys(l.props),k=0;k<c.length;k++){var P=c[k];if(P!=="children"&&P!=="key"){oe(l),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),oe(null);break}}l.ref!==null&&(oe(l),h("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(b):vt(b),b}var bt=!1,_t=!1,Ce=null,ae=0,wt=!1;function Oe(e){e!==ae-1&&h("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ae=e}function Ve(e,t,n){var o=$.current;if(o!==null)try{Fe(o),function(a){if(Ce===null)try{var s=("require"+Math.random()).slice(0,7);Ce=(j&&j[s]).call(j,"timers").setImmediate}catch{Ce=function(p){_t===!1&&(_t=!0,typeof MessageChannel>"u"&&h("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 b=new MessageChannel;b.port1.onmessage=p,b.port2.postMessage(void 0)}}Ce(a)}(function(){o.length===0?($.current=null,t(e)):Ve(e,t,n)})}catch(a){n(a)}else t(e)}var Ae=!1;function Fe(e){if(!Ae){Ae=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do n=n(!0);while(n!==null)}e.length=0}catch(o){throw e=e.slice(t+1),o}finally{Ae=!1}}}var Lt=gt,Nt=function(e,t,n){for(var o=Pt.apply(this,arguments),a=2;a<arguments.length;a++)ht(arguments[a],o.type);return vt(o),o},Vt=function(e){var t=gt.bind(null,e);return t.type=e,bt||(bt=!0,L("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return L("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},At={map:ge,forEach:function(e,t,n){ge(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ge(e,function(){t++}),t},toArray:function(e){return ge(e,function(t){return t})||[]},only:function(e){if(!ne(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};f.Children=At,f.Component=S,f.Fragment=D,f.Profiler=Y,f.PureComponent=Ee,f.StrictMode=B,f.Suspense=J,f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,f.cloneElement=Nt,f.createContext=function(e){var t={$$typeof:K,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:ie,_context:t};var n=!1,o=!1,a=!1,s={$$typeof:K,_context:t};return Object.defineProperties(s,{Provider:{get:function(){return o||(o=!0,h("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(i){t.Provider=i}},_currentValue:{get:function(){return t._currentValue},set:function(i){t._currentValue=i}},_currentValue2:{get:function(){return t._currentValue2},set:function(i){t._currentValue2=i}},_threadCount:{get:function(){return t._threadCount},set:function(i){t._threadCount=i}},Consumer:{get:function(){return n||(n=!0,h("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(i){a||(L("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",i),a=!0)}}}),t.Consumer=s,t._currentRenderer=null,t._currentRenderer2=null,t},f.createElement=Lt,f.createFactory=Vt,f.createRef=function(){var e={current:null};return Object.seal(e),e},f.forwardRef=function(e){e!=null&&e.$$typeof===F?h("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?h("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&h("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&&e.propTypes==null||h("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:H,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(o){t=o,e.name||e.displayName||(e.displayName=o)}}),n},f.isValidElement=ne,f.lazy=function(e){var t,n,o={$$typeof:W,_payload:{_status:le,_result:e},_init:Dt};return Object.defineProperties(o,{defaultProps:{configurable:!0,get:function(){return t},set:function(a){h("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=a,Object.defineProperty(o,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(a){h("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=a,Object.defineProperty(o,"propTypes",{enumerable:!0})}}}),o},f.memo=function(e,t){tt(e)||h("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e);var n,o={$$typeof:F,type:e,compare:t===void 0?null:t};return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(a){n=a,e.name||e.displayName||(e.displayName=a)}}),o},f.startTransition=function(e,t){var n=U.transition;U.transition={};var o=U.transition;U.transition._updatedFibers=new Set;try{e()}finally{U.transition=n,n===null&&o._updatedFibers&&(o._updatedFibers.size>10&&L("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."),o._updatedFibers.clear())}},f.unstable_act=function(e){var t=ae;ae++,$.current===null&&($.current=[]);var n,o=$.isBatchingLegacy;try{if($.isBatchingLegacy=!0,n=e(),!o&&$.didScheduleLegacyUpdate){var a=$.current;a!==null&&($.didScheduleLegacyUpdate=!1,Fe(a))}}catch(l){throw Oe(t),l}finally{$.isBatchingLegacy=o}if(n!==null&&typeof n=="object"&&typeof n.then=="function"){var s=n,i=!1,p={then:function(l,c){i=!0,s.then(function(k){Oe(t),ae===0?Ve(k,l,c):l(k)},function(k){Oe(t),c(k)})}};return wt||typeof Promise>"u"||Promise.resolve().then(function(){}).then(function(){i||(wt=!0,h("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 () => ...);"))}),p}var b=n;if(Oe(t),ae===0){var g=$.current;return g!==null&&(Fe(g),$.current=null),{then:function(l,c){$.current===null?($.current=[],Ve(b,l,c)):l(b)}}}return{then:function(l,c){l(b)}}},f.useCallback=function(e,t){return x().useCallback(e,t)},f.useContext=function(e){var t=x();if(e._context!==void 0){var n=e._context;n.Consumer===e?h("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&h("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},f.useDebugValue=function(e,t){return x().useDebugValue(e,t)},f.useDeferredValue=function(e){return x().useDeferredValue(e)},f.useEffect=function(e,t){return x().useEffect(e,t)},f.useId=function(){return x().useId()},f.useImperativeHandle=function(e,t,n){return x().useImperativeHandle(e,t,n)},f.useInsertionEffect=function(e,t){return x().useInsertionEffect(e,t)},f.useLayoutEffect=function(e,t){return x().useLayoutEffect(e,t)},f.useMemo=function(e,t){return x().useMemo(e,t)},f.useReducer=function(e,t,n){return x().useReducer(e,t,n)},f.useRef=function(e){return x().useRef(e)},f.useState=function(e){return x().useState(e)},f.useSyncExternalStore=function(e,t,n){return x().useSyncExternalStore(e,t,n)},f.useTransition=function(){return x().useTransition()},f.version="18.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Ue,Ue.exports)),Ue.exports);var ue=ze.exports;function Bt(j){return ue.isValidElement(j)&&function(f){return ue.isValidElement(f)&&!!f.props.children}(j)&&ue.Children.toArray(j.props.children).reduce((f,I)=>f||ue.isValidElement(I),!1)}exports.VariantTypes=zt,exports.deepFind=function j(f,I){let A;return ue.Children.toArray(f).find((D,B,Y)=>I(D,B,Y)?(A=D,!0):!(!ue.isValidElement(D)||!Bt(D))&&(A=j(D.props.children,I),A!==void 0)),A},exports.makeVariants=function(j){return j},exports.tw=function(j){return j},exports.variantConstants=qt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),a=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),d=Object.freeze(Object.defineProperty({__proto__:null,designs:["filled","outlined","tinted","ghost","contrast","dashed"],intents:["current","main","support","success","error","info","alert","danger","neutral","surface","accent","basic"],shapes:["rounded","square","pill"],sizes:["current","sm","md","lg","xl"]},Symbol.toStringTag,{value:"Module"}));function u(e){return r.isValidElement(e)&&function(n){return r.isValidElement(n)&&!!n.props.children}(e)&&r.Children.toArray(e.props.children).reduce((n,i)=>n||r.isValidElement(i),!1)}exports.VariantTypes=a,exports.deepFind=function e(n,i){let o;return r.Children.toArray(n).find((t,l,s)=>i(t,l,s)?(o=t,!0):!(!r.isValidElement(t)||!u(t))&&(o=e(t.props.children,i),o!==void 0)),o},exports.makeVariants=function(e){return e},exports.tw=function(e){return e},exports.variantConstants=d;
package/dist/index.mjs CHANGED
@@ -1,1052 +1,24 @@
1
- function Bt(R) {
2
- return R;
1
+ import { isValidElement as o, Children as a } from "react";
2
+ function c(e) {
3
+ return e;
3
4
  }
4
- function Yt(R) {
5
- return R;
5
+ function p(e) {
6
+ return e;
6
7
  }
7
- const Ht = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), Wt = Object.freeze(Object.defineProperty({ __proto__: null, designs: ["filled", "outlined", "tinted", "ghost", "contrast", "dashed"], intents: ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "accent", "basic"], shapes: ["rounded", "square", "pill"], sizes: ["current", "sm", "md", "lg", "xl"] }, Symbol.toStringTag, { value: "Module" }));
8
- var Ot, ze = { exports: {} }, m = {}, Rt, je, v, Ue = { exports: {} };
9
- /**
10
- * @license React
11
- * react.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its 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
- */
18
- process.env.NODE_ENV === "production" ? ze.exports = function() {
19
- if (Ot)
20
- return m;
21
- Ot = 1;
22
- var R = Symbol.for("react.element"), T = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), H = Symbol.for("react.provider"), J = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), ne = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), G = Symbol.iterator, pe = { isMounted: function() {
23
- return !1;
24
- }, enqueueForceUpdate: function() {
25
- }, enqueueReplaceState: function() {
26
- }, enqueueSetState: function() {
27
- } }, oe = Object.assign, de = {};
28
- function F(r, u, p) {
29
- this.props = r, this.context = u, this.refs = de, this.updater = p || pe;
30
- }
31
- function ae() {
32
- }
33
- function N(r, u, p) {
34
- this.props = r, this.context = u, this.refs = de, this.updater = p || pe;
35
- }
36
- F.prototype.isReactComponent = {}, F.prototype.setState = function(r, u) {
37
- if (typeof r != "object" && typeof r != "function" && r != null)
38
- throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
39
- this.updater.enqueueSetState(this, r, u, "setState");
40
- }, F.prototype.forceUpdate = function(r) {
41
- this.updater.enqueueForceUpdate(this, r, "forceUpdate");
42
- }, ae.prototype = F.prototype;
43
- var j = N.prototype = new ae();
44
- j.constructor = N, oe(j, F.prototype), j.isPureReactComponent = !0;
45
- var D = Array.isArray, U = Object.prototype.hasOwnProperty, z = { current: null }, ue = { key: !0, ref: !0, __self: !0, __source: !0 };
46
- function ye(r, u, p) {
47
- var _, h = {}, O = null, E = null;
48
- if (u != null)
49
- for (_ in u.ref !== void 0 && (E = u.ref), u.key !== void 0 && (O = "" + u.key), u)
50
- U.call(u, _) && !ue.hasOwnProperty(_) && (h[_] = u[_]);
51
- var k = arguments.length - 2;
52
- if (k === 1)
53
- h.children = p;
54
- else if (1 < k) {
55
- for (var C = Array(k), w = 0; w < k; w++)
56
- C[w] = arguments[w + 2];
57
- h.children = C;
58
- }
59
- if (r && r.defaultProps)
60
- for (_ in k = r.defaultProps)
61
- h[_] === void 0 && (h[_] = k[_]);
62
- return { $$typeof: R, type: r, key: O, ref: E, props: h, _owner: z.current };
63
- }
64
- function ie(r) {
65
- return typeof r == "object" && r !== null && r.$$typeof === R;
66
- }
67
- var me = /\/+/g;
68
- function se(r, u) {
69
- return typeof r == "object" && r !== null && r.key != null ? function(p) {
70
- var _ = { "=": "=0", ":": "=2" };
71
- return "$" + p.replace(/[=:]/g, function(h) {
72
- return _[h];
73
- });
74
- }("" + r.key) : u.toString(36);
75
- }
76
- function Q(r, u, p, _, h) {
77
- var O = typeof r;
78
- O !== "undefined" && O !== "boolean" || (r = null);
79
- var E = !1;
80
- if (r === null)
81
- E = !0;
82
- else
83
- switch (O) {
84
- case "string":
85
- case "number":
86
- E = !0;
87
- break;
88
- case "object":
89
- switch (r.$$typeof) {
90
- case R:
91
- case T:
92
- E = !0;
93
- }
94
- }
95
- if (E)
96
- return h = h(E = r), r = _ === "" ? "." + se(E, 0) : _, D(h) ? (p = "", r != null && (p = r.replace(me, "$&/") + "/"), Q(h, u, p, "", function(w) {
97
- return w;
98
- })) : h != null && (ie(h) && (h = function(w, ce) {
99
- return { $$typeof: R, type: w.type, key: ce, ref: w.ref, props: w.props, _owner: w._owner };
100
- }(h, p + (!h.key || E && E.key === h.key ? "" : ("" + h.key).replace(me, "$&/") + "/") + r)), u.push(h)), 1;
101
- if (E = 0, _ = _ === "" ? "." : _ + ":", D(r))
102
- for (var k = 0; k < r.length; k++) {
103
- var C = _ + se(O = r[k], k);
104
- E += Q(O, u, p, C, h);
105
- }
106
- else if (C = function(w) {
107
- return w === null || typeof w != "object" ? null : typeof (w = G && w[G] || w["@@iterator"]) == "function" ? w : null;
108
- }(r), typeof C == "function")
109
- for (r = C.call(r), k = 0; !(O = r.next()).done; )
110
- E += Q(O = O.value, u, p, C = _ + se(O, k++), h);
111
- else if (O === "object")
112
- throw u = String(r), Error("Objects are not valid as a React child (found: " + (u === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : u) + "). If you meant to render a collection of children, use an array instead.");
113
- return E;
114
- }
115
- function L(r, u, p) {
116
- if (r == null)
117
- return r;
118
- var _ = [], h = 0;
119
- return Q(r, _, "", "", function(O) {
120
- return u.call(p, O, h++);
121
- }), _;
122
- }
123
- function q(r) {
124
- if (r._status === -1) {
125
- var u = r._result;
126
- (u = u()).then(function(p) {
127
- r._status !== 0 && r._status !== -1 || (r._status = 1, r._result = p);
128
- }, function(p) {
129
- r._status !== 0 && r._status !== -1 || (r._status = 2, r._result = p);
130
- }), r._status === -1 && (r._status = 0, r._result = u);
131
- }
132
- if (r._status === 1)
133
- return r._result.default;
134
- throw r._result;
135
- }
136
- var c = { current: null }, K = { transition: null }, he = { ReactCurrentDispatcher: c, ReactCurrentBatchConfig: K, ReactCurrentOwner: z };
137
- return m.Children = { map: L, forEach: function(r, u, p) {
138
- L(r, function() {
139
- u.apply(this, arguments);
140
- }, p);
141
- }, count: function(r) {
142
- var u = 0;
143
- return L(r, function() {
144
- u++;
145
- }), u;
146
- }, toArray: function(r) {
147
- return L(r, function(u) {
148
- return u;
149
- }) || [];
150
- }, only: function(r) {
151
- if (!ie(r))
152
- throw Error("React.Children.only expected to receive a single React element child.");
153
- return r;
154
- } }, m.Component = F, m.Fragment = $, m.Profiler = Y, m.PureComponent = N, m.StrictMode = I, m.Suspense = X, m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = he, m.cloneElement = function(r, u, p) {
155
- if (r == null)
156
- throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
157
- var _ = oe({}, r.props), h = r.key, O = r.ref, E = r._owner;
158
- if (u != null) {
159
- if (u.ref !== void 0 && (O = u.ref, E = z.current), u.key !== void 0 && (h = "" + u.key), r.type && r.type.defaultProps)
160
- var k = r.type.defaultProps;
161
- for (C in u)
162
- U.call(u, C) && !ue.hasOwnProperty(C) && (_[C] = u[C] === void 0 && k !== void 0 ? k[C] : u[C]);
163
- }
164
- var C = arguments.length - 2;
165
- if (C === 1)
166
- _.children = p;
167
- else if (1 < C) {
168
- k = Array(C);
169
- for (var w = 0; w < C; w++)
170
- k[w] = arguments[w + 2];
171
- _.children = k;
172
- }
173
- return { $$typeof: R, type: r.type, key: h, ref: O, props: _, _owner: E };
174
- }, m.createContext = function(r) {
175
- return (r = { $$typeof: J, _currentValue: r, _currentValue2: r, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }).Provider = { $$typeof: H, _context: r }, r.Consumer = r;
176
- }, m.createElement = ye, m.createFactory = function(r) {
177
- var u = ye.bind(null, r);
178
- return u.type = r, u;
179
- }, m.createRef = function() {
180
- return { current: null };
181
- }, m.forwardRef = function(r) {
182
- return { $$typeof: W, render: r };
183
- }, m.isValidElement = ie, m.lazy = function(r) {
184
- return { $$typeof: M, _payload: { _status: -1, _result: r }, _init: q };
185
- }, m.memo = function(r, u) {
186
- return { $$typeof: ne, type: r, compare: u === void 0 ? null : u };
187
- }, m.startTransition = function(r) {
188
- var u = K.transition;
189
- K.transition = {};
190
- try {
191
- r();
192
- } finally {
193
- K.transition = u;
194
- }
195
- }, m.unstable_act = function() {
196
- throw Error("act(...) is not supported in production builds of React.");
197
- }, m.useCallback = function(r, u) {
198
- return c.current.useCallback(r, u);
199
- }, m.useContext = function(r) {
200
- return c.current.useContext(r);
201
- }, m.useDebugValue = function() {
202
- }, m.useDeferredValue = function(r) {
203
- return c.current.useDeferredValue(r);
204
- }, m.useEffect = function(r, u) {
205
- return c.current.useEffect(r, u);
206
- }, m.useId = function() {
207
- return c.current.useId();
208
- }, m.useImperativeHandle = function(r, u, p) {
209
- return c.current.useImperativeHandle(r, u, p);
210
- }, m.useInsertionEffect = function(r, u) {
211
- return c.current.useInsertionEffect(r, u);
212
- }, m.useLayoutEffect = function(r, u) {
213
- return c.current.useLayoutEffect(r, u);
214
- }, m.useMemo = function(r, u) {
215
- return c.current.useMemo(r, u);
216
- }, m.useReducer = function(r, u, p) {
217
- return c.current.useReducer(r, u, p);
218
- }, m.useRef = function(r) {
219
- return c.current.useRef(r);
220
- }, m.useState = function(r) {
221
- return c.current.useState(r);
222
- }, m.useSyncExternalStore = function(r, u, p) {
223
- return c.current.useSyncExternalStore(r, u, p);
224
- }, m.useTransition = function() {
225
- return c.current.useTransition();
226
- }, m.version = "18.2.0", m;
227
- }() : ze.exports = (Rt || (Rt = 1, je = Ue, v = Ue.exports, process.env.NODE_ENV !== "production" && function() {
228
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
229
- var R = Symbol.for("react.element"), T = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), H = Symbol.for("react.provider"), J = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), ne = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), pe = Symbol.for("react.offscreen"), oe = Symbol.iterator, de = "@@iterator";
230
- function F(e) {
231
- if (e === null || typeof e != "object")
232
- return null;
233
- var t = oe && e[oe] || e[de];
234
- return typeof t == "function" ? t : null;
235
- }
236
- var ae = { current: null }, N = { transition: null }, j = { current: null, isBatchingLegacy: !1, didScheduleLegacyUpdate: !1 }, D = { current: null }, U = {}, z = null;
237
- function ue(e) {
238
- z = e;
239
- }
240
- U.setExtraStackFrame = function(e) {
241
- z = e;
242
- }, U.getCurrentStack = null, U.getStackAddendum = function() {
243
- var e = "";
244
- z && (e += z);
245
- var t = U.getCurrentStack;
246
- return t && (e += t() || ""), e;
247
- };
248
- var ye = !1, ie = !1, me = !1, se = !1, Q = !1, L = { ReactCurrentDispatcher: ae, ReactCurrentBatchConfig: N, ReactCurrentOwner: D };
249
- function q(e) {
250
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
251
- n[o - 1] = arguments[o];
252
- K("warn", e, n);
253
- }
254
- function c(e) {
255
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
256
- n[o - 1] = arguments[o];
257
- K("error", e, n);
258
- }
259
- function K(e, t, n) {
260
- var o = L.ReactDebugCurrentFrame.getStackAddendum();
261
- o !== "" && (t += "%s", n = n.concat([o]));
262
- var a = n.map(function(s) {
263
- return String(s);
264
- });
265
- a.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, a);
266
- }
267
- L.ReactDebugCurrentFrame = U, L.ReactCurrentActQueue = j;
268
- var he = {};
269
- function r(e, t) {
270
- var n = e.constructor, o = n && (n.displayName || n.name) || "ReactClass", a = o + "." + t;
271
- he[a] || (c("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.", t, o), he[a] = !0);
272
- }
273
- var u = { isMounted: function(e) {
274
- return !1;
275
- }, enqueueForceUpdate: function(e, t, n) {
276
- r(e, "forceUpdate");
277
- }, enqueueReplaceState: function(e, t, n, o) {
278
- r(e, "replaceState");
279
- }, enqueueSetState: function(e, t, n, o) {
280
- r(e, "setState");
281
- } }, p = Object.assign, _ = {};
282
- function h(e, t, n) {
283
- this.props = e, this.context = t, this.refs = _, this.updater = n || u;
284
- }
285
- Object.freeze(_), h.prototype.isReactComponent = {}, h.prototype.setState = function(e, t) {
286
- if (typeof e != "object" && typeof e != "function" && e != null)
287
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
288
- this.updater.enqueueSetState(this, e, t, "setState");
289
- }, h.prototype.forceUpdate = function(e) {
290
- this.updater.enqueueForceUpdate(this, e, "forceUpdate");
291
- };
292
- var O = { 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)."] }, E = function(e, t) {
293
- Object.defineProperty(h.prototype, e, { get: function() {
294
- q("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
295
- } });
296
- };
297
- for (var k in O)
298
- O.hasOwnProperty(k) && E(k, O[k]);
299
- function C() {
300
- }
301
- function w(e, t, n) {
302
- this.props = e, this.context = t, this.refs = _, this.updater = n || u;
303
- }
304
- C.prototype = h.prototype;
305
- var ce = w.prototype = new C();
306
- ce.constructor = w, p(ce, h.prototype), ce.isPureReactComponent = !0;
307
- var Et = Array.isArray;
308
- function ve(e) {
309
- return Et(e);
310
- }
311
- function qe(e) {
312
- return "" + e;
313
- }
314
- function ge(e) {
315
- if (function(t) {
316
- try {
317
- return qe(t), !1;
318
- } catch {
319
- return !0;
320
- }
321
- }(e))
322
- return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", function(t) {
323
- return typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
324
- }(e)), qe(e);
325
- }
326
- function Be(e) {
327
- return e.displayName || "Context";
328
- }
329
- function B(e) {
330
- if (e == null)
331
- return null;
332
- if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
333
- return e.displayName || e.name || null;
334
- if (typeof e == "string")
335
- return e;
336
- switch (e) {
337
- case $:
338
- return "Fragment";
339
- case T:
340
- return "Portal";
341
- case Y:
342
- return "Profiler";
343
- case I:
344
- return "StrictMode";
345
- case X:
346
- return "Suspense";
347
- case ne:
348
- return "SuspenseList";
349
- }
350
- if (typeof e == "object")
351
- switch (e.$$typeof) {
352
- case J:
353
- return Be(e) + ".Consumer";
354
- case H:
355
- return Be(e._context) + ".Provider";
356
- case W:
357
- return function(s, i, d) {
358
- var b = s.displayName;
359
- if (b)
360
- return b;
361
- var g = i.displayName || i.name || "";
362
- return g !== "" ? d + "(" + g + ")" : d;
363
- }(e, e.render, "ForwardRef");
364
- case M:
365
- var t = e.displayName || null;
366
- return t !== null ? t : B(e.type) || "Memo";
367
- case G:
368
- var n = e, o = n._payload, a = n._init;
369
- try {
370
- return B(a(o));
371
- } catch {
372
- return null;
373
- }
374
- }
375
- return null;
376
- }
377
- var Ye, He, Pe, le = Object.prototype.hasOwnProperty, We = { key: !0, ref: !0, __self: !0, __source: !0 };
378
- function Ge(e) {
379
- if (le.call(e, "ref")) {
380
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
381
- if (t && t.isReactWarning)
382
- return !1;
383
- }
384
- return e.ref !== void 0;
385
- }
386
- function Ke(e) {
387
- if (le.call(e, "key")) {
388
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
389
- if (t && t.isReactWarning)
390
- return !1;
391
- }
392
- return e.key !== void 0;
393
- }
394
- Pe = {};
395
- var xe = function(e, t, n, o, a, s, i) {
396
- var d = { $$typeof: R, type: e, key: t, ref: n, props: i, _owner: s, _store: {} };
397
- return Object.defineProperty(d._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(d, "_self", { configurable: !1, enumerable: !1, writable: !1, value: o }), Object.defineProperty(d, "_source", { configurable: !1, enumerable: !1, writable: !1, value: a }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
398
- };
399
- function jt(e, t, n) {
400
- var o, a = {}, s = null, i = null, d = null, b = null;
401
- if (t != null)
402
- for (o in Ge(t) && (i = t.ref, function(y) {
403
- if (typeof y.ref == "string" && D.current && y.__self && D.current.stateNode !== y.__self) {
404
- var V = B(D.current.type);
405
- Pe[V] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', V, y.ref), Pe[V] = !0);
406
- }
407
- }(t)), Ke(t) && (ge(t.key), s = "" + t.key), d = t.__self === void 0 ? null : t.__self, b = t.__source === void 0 ? null : t.__source, t)
408
- le.call(t, o) && !We.hasOwnProperty(o) && (a[o] = t[o]);
409
- var g = arguments.length - 2;
410
- if (g === 1)
411
- a.children = n;
412
- else if (g > 1) {
413
- for (var f = Array(g), l = 0; l < g; l++)
414
- f[l] = arguments[l + 2];
415
- Object.freeze && Object.freeze(f), a.children = f;
416
- }
417
- if (e && e.defaultProps) {
418
- var S = e.defaultProps;
419
- for (o in S)
420
- a[o] === void 0 && (a[o] = S[o]);
421
- }
422
- if (s || i) {
423
- var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
424
- s && function(y, V) {
425
- var A = function() {
426
- Ye || (Ye = !0, c("%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://reactjs.org/link/special-props)", V));
427
- };
428
- A.isReactWarning = !0, Object.defineProperty(y, "key", { get: A, configurable: !0 });
429
- }(a, P), i && function(y, V) {
430
- var A = function() {
431
- He || (He = !0, c("%s: `ref` 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://reactjs.org/link/special-props)", V));
432
- };
433
- A.isReactWarning = !0, Object.defineProperty(y, "ref", { get: A, configurable: !0 });
434
- }(a, P);
435
- }
436
- return xe(e, s, i, d, b, D.current, a);
437
- }
438
- function Pt(e, t, n) {
439
- if (e == null)
440
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
441
- var o, a, s = p({}, e.props), i = e.key, d = e.ref, b = e._self, g = e._source, f = e._owner;
442
- if (t != null)
443
- for (o in Ge(t) && (d = t.ref, f = D.current), Ke(t) && (ge(t.key), i = "" + t.key), e.type && e.type.defaultProps && (a = e.type.defaultProps), t)
444
- le.call(t, o) && !We.hasOwnProperty(o) && (t[o] === void 0 && a !== void 0 ? s[o] = a[o] : s[o] = t[o]);
445
- var l = arguments.length - 2;
446
- if (l === 1)
447
- s.children = n;
448
- else if (l > 1) {
449
- for (var S = Array(l), P = 0; P < l; P++)
450
- S[P] = arguments[P + 2];
451
- s.children = S;
452
- }
453
- return xe(e.type, i, d, b, g, f, s);
454
- }
455
- function Z(e) {
456
- return typeof e == "object" && e !== null && e.$$typeof === R;
457
- }
458
- var Je = ".", xt = ":", Xe = !1, $t = /\/+/g;
459
- function Qe(e) {
460
- return e.replace($t, "$&/");
461
- }
462
- function $e(e, t) {
463
- return typeof e == "object" && e !== null && e.key != null ? (ge(e.key), n = "" + e.key, o = { "=": "=0", ":": "=2" }, "$" + n.replace(/[=:]/g, function(a) {
464
- return o[a];
465
- })) : t.toString(36);
466
- var n, o;
467
- }
468
- function be(e, t, n, o, a) {
469
- var s = typeof e;
470
- s !== "undefined" && s !== "boolean" || (e = null);
471
- var i, d, b, g = !1;
472
- if (e === null)
473
- g = !0;
474
- else
475
- switch (s) {
476
- case "string":
477
- case "number":
478
- g = !0;
479
- break;
480
- case "object":
481
- switch (e.$$typeof) {
482
- case R:
483
- case T:
484
- g = !0;
485
- }
486
- }
487
- if (g) {
488
- var f = e, l = a(f), S = o === "" ? Je + $e(f, 0) : o;
489
- if (ve(l)) {
490
- var P = "";
491
- S != null && (P = Qe(S) + "/"), be(l, t, P, "", function(Ut) {
492
- return Ut;
493
- });
494
- } else
495
- l != null && (Z(l) && (!l.key || f && f.key === l.key || ge(l.key), i = l, d = n + (!l.key || f && f.key === l.key ? "" : Qe("" + l.key) + "/") + S, l = xe(i.type, d, i.ref, i._self, i._source, i._owner, i.props)), t.push(l));
496
- return 1;
497
- }
498
- var y = 0, V = o === "" ? Je : o + xt;
499
- if (ve(e))
500
- for (var A = 0; A < e.length; A++)
501
- y += be(b = e[A], t, n, V + $e(b, A), a);
502
- else {
503
- var Me = F(e);
504
- if (typeof Me == "function") {
505
- var St = e;
506
- Me === St.entries && (Xe || q("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Xe = !0);
507
- for (var kt, Ft = Me.call(St), Mt = 0; !(kt = Ft.next()).done; )
508
- y += be(b = kt.value, t, n, V + $e(b, Mt++), a);
509
- } else if (s === "object") {
510
- var Ct = String(e);
511
- throw new Error("Objects are not valid as a React child (found: " + (Ct === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Ct) + "). If you meant to render a collection of children, use an array instead.");
512
- }
513
- }
514
- return y;
515
- }
516
- function _e(e, t, n) {
517
- if (e == null)
518
- return e;
519
- var o = [], a = 0;
520
- return be(e, o, "", "", function(s) {
521
- return t.call(n, s, a++);
522
- }), o;
523
- }
524
- var Ze, fe = -1, Te = 0, et = 1, Tt = 2;
525
- function Dt(e) {
526
- if (e._status === fe) {
527
- var t = (0, e._result)();
528
- if (t.then(function(a) {
529
- if (e._status === Te || e._status === fe) {
530
- var s = e;
531
- s._status = et, s._result = a;
532
- }
533
- }, function(a) {
534
- if (e._status === Te || e._status === fe) {
535
- var s = e;
536
- s._status = Tt, s._result = a;
537
- }
538
- }), e._status === fe) {
539
- var n = e;
540
- n._status = Te, n._result = t;
541
- }
542
- }
543
- if (e._status === et) {
544
- var o = e._result;
545
- return o === void 0 && c(`lazy: Expected the result of a dynamic import() call. Instead received: %s
546
-
547
- Your code should look like:
548
- const MyComponent = lazy(() => import('./MyComponent'))
549
-
550
- Did you accidentally put curly braces around the import?`, o), "default" in o || c(`lazy: Expected the result of a dynamic import() call. Instead received: %s
551
-
552
- Your code should look like:
553
- const MyComponent = lazy(() => import('./MyComponent'))`, o), o.default;
554
- }
555
- throw e._result;
556
- }
557
- function tt(e) {
558
- return typeof e == "string" || typeof e == "function" || !!(e === $ || e === Y || Q || e === I || e === X || e === ne || se || e === pe || ye || ie || me) || typeof e == "object" && e !== null && (e.$$typeof === G || e.$$typeof === M || e.$$typeof === H || e.$$typeof === J || e.$$typeof === W || e.$$typeof === Ze || e.getModuleId !== void 0);
559
- }
560
- function x() {
561
- var e = ae.current;
562
- return e === null && c(`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:
563
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
564
- 2. You might be breaking the Rules of Hooks
565
- 3. You might have more than one copy of React in the same app
566
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
567
- }
568
- Ze = Symbol.for("react.module.reference");
569
- var rt, nt, ot, at, ut, it, st, we = 0;
570
- function ct() {
571
- }
572
- ct.__reactDisabledLog = !0;
573
- var De, Ie = L.ReactCurrentDispatcher;
574
- function Se(e, t, n) {
575
- if (De === void 0)
576
- try {
577
- throw Error();
578
- } catch (a) {
579
- var o = a.stack.trim().match(/\n( *(at )?)/);
580
- De = o && o[1] || "";
581
- }
582
- return `
583
- ` + De + e;
584
- }
585
- var ke, Le = !1, It = typeof WeakMap == "function" ? WeakMap : Map;
586
- function lt(e, t) {
587
- if (!e || Le)
588
- return "";
589
- var n, o = ke.get(e);
590
- if (o !== void 0)
591
- return o;
592
- Le = !0;
593
- var a, s = Error.prepareStackTrace;
594
- Error.prepareStackTrace = void 0, a = Ie.current, Ie.current = null, function() {
595
- if (we === 0) {
596
- rt = console.log, nt = console.info, ot = console.warn, at = console.error, ut = console.group, it = console.groupCollapsed, st = console.groupEnd;
597
- var y = { configurable: !0, enumerable: !0, value: ct, writable: !0 };
598
- Object.defineProperties(console, { info: y, log: y, warn: y, error: y, group: y, groupCollapsed: y, groupEnd: y });
599
- }
600
- we++;
601
- }();
602
- try {
603
- if (t) {
604
- var i = function() {
605
- throw Error();
606
- };
607
- if (Object.defineProperty(i.prototype, "props", { set: function() {
608
- throw Error();
609
- } }), typeof Reflect == "object" && Reflect.construct) {
610
- try {
611
- Reflect.construct(i, []);
612
- } catch (y) {
613
- n = y;
614
- }
615
- Reflect.construct(e, [], i);
616
- } else {
617
- try {
618
- i.call();
619
- } catch (y) {
620
- n = y;
621
- }
622
- e.call(i.prototype);
623
- }
624
- } else {
625
- try {
626
- throw Error();
627
- } catch (y) {
628
- n = y;
629
- }
630
- e();
631
- }
632
- } catch (y) {
633
- if (y && n && typeof y.stack == "string") {
634
- for (var d = y.stack.split(`
635
- `), b = n.stack.split(`
636
- `), g = d.length - 1, f = b.length - 1; g >= 1 && f >= 0 && d[g] !== b[f]; )
637
- f--;
638
- for (; g >= 1 && f >= 0; g--, f--)
639
- if (d[g] !== b[f]) {
640
- if (g !== 1 || f !== 1)
641
- do
642
- if (g--, --f < 0 || d[g] !== b[f]) {
643
- var l = `
644
- ` + d[g].replace(" at new ", " at ");
645
- return e.displayName && l.includes("<anonymous>") && (l = l.replace("<anonymous>", e.displayName)), typeof e == "function" && ke.set(e, l), l;
646
- }
647
- while (g >= 1 && f >= 0);
648
- break;
649
- }
650
- }
651
- } finally {
652
- Le = !1, Ie.current = a, function() {
653
- if (--we == 0) {
654
- var y = { configurable: !0, enumerable: !0, writable: !0 };
655
- Object.defineProperties(console, { log: p({}, y, { value: rt }), info: p({}, y, { value: nt }), warn: p({}, y, { value: ot }), error: p({}, y, { value: at }), group: p({}, y, { value: ut }), groupCollapsed: p({}, y, { value: it }), groupEnd: p({}, y, { value: st }) });
656
- }
657
- we < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
658
- }(), Error.prepareStackTrace = s;
659
- }
660
- var S = e ? e.displayName || e.name : "", P = S ? Se(S) : "";
661
- return typeof e == "function" && ke.set(e, P), P;
662
- }
663
- function Ce(e, t, n) {
664
- if (e == null)
665
- return "";
666
- if (typeof e == "function")
667
- return lt(e, function(i) {
668
- var d = i.prototype;
669
- return !(!d || !d.isReactComponent);
670
- }(e));
671
- if (typeof e == "string")
672
- return Se(e);
673
- switch (e) {
674
- case X:
675
- return Se("Suspense");
676
- case ne:
677
- return Se("SuspenseList");
678
- }
679
- if (typeof e == "object")
680
- switch (e.$$typeof) {
681
- case W:
682
- return lt(e.render, !1);
683
- case M:
684
- return Ce(e.type, t, n);
685
- case G:
686
- var o = e, a = o._payload, s = o._init;
687
- try {
688
- return Ce(s(a), t, n);
689
- } catch {
690
- }
691
- }
692
- return "";
693
- }
694
- ke = new It();
695
- var Ne, ft = {}, pt = L.ReactDebugCurrentFrame;
696
- function Oe(e) {
697
- if (e) {
698
- var t = e._owner, n = Ce(e.type, e._source, t ? t.type : null);
699
- pt.setExtraStackFrame(n);
700
- } else
701
- pt.setExtraStackFrame(null);
702
- }
703
- function ee(e) {
704
- if (e) {
705
- var t = e._owner;
706
- ue(Ce(e.type, e._source, t ? t.type : null));
707
- } else
708
- ue(null);
709
- }
710
- function dt() {
711
- if (D.current) {
712
- var e = B(D.current.type);
713
- if (e)
714
- return `
715
-
716
- Check the render method of \`` + e + "`.";
717
- }
718
- return "";
719
- }
720
- Ne = !1;
721
- var yt = {};
722
- function mt(e, t) {
723
- if (e._store && !e._store.validated && e.key == null) {
724
- e._store.validated = !0;
725
- var n = function(a) {
726
- var s = dt();
727
- if (!s) {
728
- var i = typeof a == "string" ? a : a.displayName || a.name;
729
- i && (s = `
730
-
731
- Check the top-level render call using <` + i + ">.");
732
- }
733
- return s;
734
- }(t);
735
- if (!yt[n]) {
736
- yt[n] = !0;
737
- var o = "";
738
- e && e._owner && e._owner !== D.current && (o = " It was passed a child from " + B(e._owner.type) + "."), ee(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), ee(null);
739
- }
740
- }
741
- }
742
- function ht(e, t) {
743
- if (typeof e == "object") {
744
- if (ve(e))
745
- for (var n = 0; n < e.length; n++) {
746
- var o = e[n];
747
- Z(o) && mt(o, t);
748
- }
749
- else if (Z(e))
750
- e._store && (e._store.validated = !0);
751
- else if (e) {
752
- var a = F(e);
753
- if (typeof a == "function" && a !== e.entries)
754
- for (var s, i = a.call(e); !(s = i.next()).done; )
755
- Z(s.value) && mt(s.value, t);
756
- }
757
- }
758
- }
759
- function vt(e) {
760
- var t, n = e.type;
761
- if (n != null && typeof n != "string") {
762
- if (typeof n == "function")
763
- t = n.propTypes;
764
- else {
765
- if (typeof n != "object" || n.$$typeof !== W && n.$$typeof !== M)
766
- return;
767
- t = n.propTypes;
768
- }
769
- if (t) {
770
- var o = B(n);
771
- (function(a, s, i, d, b) {
772
- var g = Function.call.bind(le);
773
- for (var f in a)
774
- if (g(a, f)) {
775
- var l = void 0;
776
- try {
777
- if (typeof a[f] != "function") {
778
- var S = Error((d || "React class") + ": " + i + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
779
- throw S.name = "Invariant Violation", S;
780
- }
781
- l = a[f](s, f, d, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
782
- } catch (P) {
783
- l = P;
784
- }
785
- !l || l instanceof Error || (Oe(b), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", d || "React class", i, f, typeof l), Oe(null)), l instanceof Error && !(l.message in ft) && (ft[l.message] = !0, Oe(b), c("Failed %s type: %s", i, l.message), Oe(null));
786
- }
787
- })(t, e.props, "prop", o, e);
788
- } else
789
- n.PropTypes === void 0 || Ne || (Ne = !0, c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B(n) || "Unknown"));
790
- typeof n.getDefaultProps != "function" || n.getDefaultProps.isReactClassApproved || c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
791
- }
792
- }
793
- function gt(e, t, n) {
794
- var o, a, s = tt(e);
795
- if (!s) {
796
- var i, d = "";
797
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), d += ((o = t) != null && (a = o.__source) !== void 0 ? `
798
-
799
- Check your code at ` + a.fileName.replace(/^.*[\\\/]/, "") + ":" + a.lineNumber + "." : "") || dt(), e === null ? i = "null" : ve(e) ? i = "array" : e !== void 0 && e.$$typeof === R ? (i = "<" + (B(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : i = typeof e, c("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", i, d);
800
- }
801
- var b = jt.apply(this, arguments);
802
- if (b == null)
803
- return b;
804
- if (s)
805
- for (var g = 2; g < arguments.length; g++)
806
- ht(arguments[g], e);
807
- return e === $ ? function(f) {
808
- for (var l = Object.keys(f.props), S = 0; S < l.length; S++) {
809
- var P = l[S];
810
- if (P !== "children" && P !== "key") {
811
- ee(f), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), ee(null);
812
- break;
813
- }
814
- }
815
- f.ref !== null && (ee(f), c("Invalid attribute `ref` supplied to `React.Fragment`."), ee(null));
816
- }(b) : vt(b), b;
817
- }
818
- var bt = !1, _t = !1, Re = null, te = 0, wt = !1;
819
- function Ee(e) {
820
- e !== te - 1 && c("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), te = e;
821
- }
822
- function Ve(e, t, n) {
823
- var o = j.current;
824
- if (o !== null)
825
- try {
826
- Fe(o), function(a) {
827
- if (Re === null)
828
- try {
829
- var s = ("require" + Math.random()).slice(0, 7);
830
- Re = (je && je[s]).call(je, "timers").setImmediate;
831
- } catch {
832
- Re = function(d) {
833
- _t === !1 && (_t = !0, typeof MessageChannel > "u" && c("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."));
834
- var b = new MessageChannel();
835
- b.port1.onmessage = d, b.port2.postMessage(void 0);
836
- };
837
- }
838
- Re(a);
839
- }(function() {
840
- o.length === 0 ? (j.current = null, t(e)) : Ve(e, t, n);
841
- });
842
- } catch (a) {
843
- n(a);
844
- }
845
- else
846
- t(e);
847
- }
848
- var Ae = !1;
849
- function Fe(e) {
850
- if (!Ae) {
851
- Ae = !0;
852
- var t = 0;
853
- try {
854
- for (; t < e.length; t++) {
855
- var n = e[t];
856
- do
857
- n = n(!0);
858
- while (n !== null);
859
- }
860
- e.length = 0;
861
- } catch (o) {
862
- throw e = e.slice(t + 1), o;
863
- } finally {
864
- Ae = !1;
865
- }
866
- }
867
- }
868
- var Lt = gt, Nt = function(e, t, n) {
869
- for (var o = Pt.apply(this, arguments), a = 2; a < arguments.length; a++)
870
- ht(arguments[a], o.type);
871
- return vt(o), o;
872
- }, Vt = function(e) {
873
- var t = gt.bind(null, e);
874
- return t.type = e, bt || (bt = !0, q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(t, "type", { enumerable: !1, get: function() {
875
- return q("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", { value: e }), e;
876
- } }), t;
877
- }, At = { map: _e, forEach: function(e, t, n) {
878
- _e(e, function() {
879
- t.apply(this, arguments);
880
- }, n);
881
- }, count: function(e) {
882
- var t = 0;
883
- return _e(e, function() {
884
- t++;
885
- }), t;
886
- }, toArray: function(e) {
887
- return _e(e, function(t) {
888
- return t;
889
- }) || [];
890
- }, only: function(e) {
891
- if (!Z(e))
892
- throw new Error("React.Children.only expected to receive a single React element child.");
893
- return e;
894
- } };
895
- v.Children = At, v.Component = h, v.Fragment = $, v.Profiler = Y, v.PureComponent = w, v.StrictMode = I, v.Suspense = X, v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = L, v.cloneElement = Nt, v.createContext = function(e) {
896
- var t = { $$typeof: J, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null };
897
- t.Provider = { $$typeof: H, _context: t };
898
- var n = !1, o = !1, a = !1, s = { $$typeof: J, _context: t };
899
- return Object.defineProperties(s, { Provider: { get: function() {
900
- return o || (o = !0, c("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), t.Provider;
901
- }, set: function(i) {
902
- t.Provider = i;
903
- } }, _currentValue: { get: function() {
904
- return t._currentValue;
905
- }, set: function(i) {
906
- t._currentValue = i;
907
- } }, _currentValue2: { get: function() {
908
- return t._currentValue2;
909
- }, set: function(i) {
910
- t._currentValue2 = i;
911
- } }, _threadCount: { get: function() {
912
- return t._threadCount;
913
- }, set: function(i) {
914
- t._threadCount = i;
915
- } }, Consumer: { get: function() {
916
- return n || (n = !0, c("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), t.Consumer;
917
- } }, displayName: { get: function() {
918
- return t.displayName;
919
- }, set: function(i) {
920
- a || (q("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", i), a = !0);
921
- } } }), t.Consumer = s, t._currentRenderer = null, t._currentRenderer2 = null, t;
922
- }, v.createElement = Lt, v.createFactory = Vt, v.createRef = function() {
923
- var e = { current: null };
924
- return Object.seal(e), e;
925
- }, v.forwardRef = function(e) {
926
- e != null && e.$$typeof === M ? c("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? c("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && c("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 && e.propTypes == null || c("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));
927
- var t, n = { $$typeof: W, render: e };
928
- return Object.defineProperty(n, "displayName", { enumerable: !1, configurable: !0, get: function() {
929
- return t;
930
- }, set: function(o) {
931
- t = o, e.name || e.displayName || (e.displayName = o);
932
- } }), n;
933
- }, v.isValidElement = Z, v.lazy = function(e) {
934
- var t, n, o = { $$typeof: G, _payload: { _status: fe, _result: e }, _init: Dt };
935
- return Object.defineProperties(o, { defaultProps: { configurable: !0, get: function() {
936
- return t;
937
- }, set: function(a) {
938
- c("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), t = a, Object.defineProperty(o, "defaultProps", { enumerable: !0 });
939
- } }, propTypes: { configurable: !0, get: function() {
940
- return n;
941
- }, set: function(a) {
942
- c("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), n = a, Object.defineProperty(o, "propTypes", { enumerable: !0 });
943
- } } }), o;
944
- }, v.memo = function(e, t) {
945
- tt(e) || c("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
946
- var n, o = { $$typeof: M, type: e, compare: t === void 0 ? null : t };
947
- return Object.defineProperty(o, "displayName", { enumerable: !1, configurable: !0, get: function() {
948
- return n;
949
- }, set: function(a) {
950
- n = a, e.name || e.displayName || (e.displayName = a);
951
- } }), o;
952
- }, v.startTransition = function(e, t) {
953
- var n = N.transition;
954
- N.transition = {};
955
- var o = N.transition;
956
- N.transition._updatedFibers = /* @__PURE__ */ new Set();
957
- try {
958
- e();
959
- } finally {
960
- N.transition = n, n === null && o._updatedFibers && (o._updatedFibers.size > 10 && q("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."), o._updatedFibers.clear());
961
- }
962
- }, v.unstable_act = function(e) {
963
- var t = te;
964
- te++, j.current === null && (j.current = []);
965
- var n, o = j.isBatchingLegacy;
966
- try {
967
- if (j.isBatchingLegacy = !0, n = e(), !o && j.didScheduleLegacyUpdate) {
968
- var a = j.current;
969
- a !== null && (j.didScheduleLegacyUpdate = !1, Fe(a));
970
- }
971
- } catch (f) {
972
- throw Ee(t), f;
973
- } finally {
974
- j.isBatchingLegacy = o;
975
- }
976
- if (n !== null && typeof n == "object" && typeof n.then == "function") {
977
- var s = n, i = !1, d = { then: function(f, l) {
978
- i = !0, s.then(function(S) {
979
- Ee(t), te === 0 ? Ve(S, f, l) : f(S);
980
- }, function(S) {
981
- Ee(t), l(S);
982
- });
983
- } };
984
- return wt || typeof Promise > "u" || Promise.resolve().then(function() {
985
- }).then(function() {
986
- i || (wt = !0, c("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 () => ...);"));
987
- }), d;
988
- }
989
- var b = n;
990
- if (Ee(t), te === 0) {
991
- var g = j.current;
992
- return g !== null && (Fe(g), j.current = null), { then: function(f, l) {
993
- j.current === null ? (j.current = [], Ve(b, f, l)) : f(b);
994
- } };
995
- }
996
- return { then: function(f, l) {
997
- f(b);
998
- } };
999
- }, v.useCallback = function(e, t) {
1000
- return x().useCallback(e, t);
1001
- }, v.useContext = function(e) {
1002
- var t = x();
1003
- if (e._context !== void 0) {
1004
- var n = e._context;
1005
- n.Consumer === e ? c("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : n.Provider === e && c("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1006
- }
1007
- return t.useContext(e);
1008
- }, v.useDebugValue = function(e, t) {
1009
- return x().useDebugValue(e, t);
1010
- }, v.useDeferredValue = function(e) {
1011
- return x().useDeferredValue(e);
1012
- }, v.useEffect = function(e, t) {
1013
- return x().useEffect(e, t);
1014
- }, v.useId = function() {
1015
- return x().useId();
1016
- }, v.useImperativeHandle = function(e, t, n) {
1017
- return x().useImperativeHandle(e, t, n);
1018
- }, v.useInsertionEffect = function(e, t) {
1019
- return x().useInsertionEffect(e, t);
1020
- }, v.useLayoutEffect = function(e, t) {
1021
- return x().useLayoutEffect(e, t);
1022
- }, v.useMemo = function(e, t) {
1023
- return x().useMemo(e, t);
1024
- }, v.useReducer = function(e, t, n) {
1025
- return x().useReducer(e, t, n);
1026
- }, v.useRef = function(e) {
1027
- return x().useRef(e);
1028
- }, v.useState = function(e) {
1029
- return x().useState(e);
1030
- }, v.useSyncExternalStore = function(e, t, n) {
1031
- return x().useSyncExternalStore(e, t, n);
1032
- }, v.useTransition = function() {
1033
- return x().useTransition();
1034
- }, v.version = "18.2.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1035
- }()), Ue.exports);
1036
- var re = ze.exports;
1037
- function zt(R) {
1038
- return re.isValidElement(R) && function(T) {
1039
- return re.isValidElement(T) && !!T.props.children;
1040
- }(R) && re.Children.toArray(R.props.children).reduce((T, $) => T || re.isValidElement($), !1);
8
+ const f = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), m = Object.freeze(Object.defineProperty({ __proto__: null, designs: ["filled", "outlined", "tinted", "ghost", "contrast", "dashed"], intents: ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "accent", "basic"], shapes: ["rounded", "square", "pill"], sizes: ["current", "sm", "md", "lg", "xl"] }, Symbol.toStringTag, { value: "Module" }));
9
+ function l(e) {
10
+ return o(e) && function(n) {
11
+ return o(n) && !!n.props.children;
12
+ }(e) && a.toArray(e.props.children).reduce((n, r) => n || o(r), !1);
1041
13
  }
1042
- function qt(R, T) {
1043
- let $;
1044
- return re.Children.toArray(R).find((I, Y, H) => T(I, Y, H) ? ($ = I, !0) : !(!re.isValidElement(I) || !zt(I)) && ($ = qt(I.props.children, T), $ !== void 0)), $;
14
+ function u(e, n) {
15
+ let r;
16
+ return a.toArray(e).find((t, s, i) => n(t, s, i) ? (r = t, !0) : !(!o(t) || !l(t)) && (r = u(t.props.children, n), r !== void 0)), r;
1045
17
  }
1046
18
  export {
1047
- Ht as VariantTypes,
1048
- qt as deepFind,
1049
- Yt as makeVariants,
1050
- Bt as tw,
1051
- Wt as variantConstants
19
+ f as VariantTypes,
20
+ u as deepFind,
21
+ p as makeVariants,
22
+ c as tw,
23
+ m as variantConstants
1052
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/internal-utils",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "package for sharing reusable code and resources across the codebase",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,6 +16,10 @@
16
16
  "scripts": {
17
17
  "build": "vite build"
18
18
  },
19
+ "peerDependencies": {
20
+ "react": "^18.0 || ^19.0",
21
+ "react-dom": "^18.0 || ^19.0"
22
+ },
19
23
  "repository": {
20
24
  "type": "git",
21
25
  "url": "https://github.com/adevinta/spark.git",
@@ -30,5 +34,5 @@
30
34
  },
31
35
  "homepage": "https://sparkui.vercel.app",
32
36
  "license": "MIT",
33
- "gitHead": "017b58f0d658252f4548068dd2ec6f962c9202fd"
37
+ "gitHead": "374c07a266a2b772cbedcd6040b774ac2c023226"
34
38
  }
package/vite.config.ts CHANGED
@@ -2,6 +2,9 @@ import { terser } from 'rollup-plugin-terser'
2
2
  import dts from 'vite-plugin-dts'
3
3
  import browserslistToEsbuild from 'browserslist-to-esbuild'
4
4
 
5
+ const pkg = require('./package.json')
6
+ const peerDeps = Object.keys(pkg.peerDependencies || {})
7
+
5
8
  export default {
6
9
  build: {
7
10
  target: browserslistToEsbuild(),
@@ -11,7 +14,7 @@ export default {
11
14
  fileName: 'index',
12
15
  },
13
16
  rollupOptions: {
14
- external: ['node:path', 'node:fs'],
17
+ external: ['node:path', 'node:fs', ...peerDeps],
15
18
  plugins: [terser()],
16
19
  },
17
20
  },