@designbyadrian/react-interactive-input 2.0.1 → 2.0.3
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/README.md +1 -1
- package/dist/react-interactive-input.cjs.js +8 -8
- package/dist/react-interactive-input.es.js +231 -229
- package/dist/types/utils.d.ts +1 -0
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<h1>React Interactive Input</h1>
|
|
4
4
|
</center>
|
|
5
5
|
|
|
6
|
-
 
|
|
6
|
+
   
|
|
7
7
|
|
|
8
8
|
In Blender and similar 3D applications, users can adjust values in numeric input boxes by clicking and dragging horizontally, often referred to as **scrubbing.**
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react");var me={exports:{}},J={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +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 Ie;function vr(){if(Ie)return
|
|
9
|
+
*/var Ie;function vr(){if(Ie)return J;Ie=1;var f=E,g=Symbol.for("react.element"),F=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,C=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A={key:!0,ref:!0,__self:!0,__source:!0};function O(y,v,x){var p,w={},c=null,R=null;x!==void 0&&(c=""+x),v.key!==void 0&&(c=""+v.key),v.ref!==void 0&&(R=v.ref);for(p in v)u.call(v,p)&&!A.hasOwnProperty(p)&&(w[p]=v[p]);if(y&&y.defaultProps)for(p in v=y.defaultProps,v)w[p]===void 0&&(w[p]=v[p]);return{$$typeof:g,type:y,key:c,ref:R,props:w,_owner:C.current}}return J.Fragment=F,J.jsx=O,J.jsxs=O,J}var X={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ve;function mr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var
|
|
18
|
-
`+
|
|
17
|
+
*/var Ve;function mr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var f=E,g=Symbol.for("react.element"),F=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S=Symbol.iterator,L="@@iterator";function I(e){if(e===null||typeof e!="object")return null;var r=S&&e[S]||e[L];return typeof r=="function"?r:null}var j=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function i(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];T("error",e,t)}}function T(e,r,t){{var n=j.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var l=t.map(function(o){return String(o)});l.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,l)}}var V=!1,Y=!1,K=!1,z=!1,ne=!1,U;U=Symbol.for("react.module.reference");function G(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===A||ne||e===C||e===x||e===p||z||e===R||V||Y||K||typeof e=="object"&&e!==null&&(e.$$typeof===c||e.$$typeof===w||e.$$typeof===O||e.$$typeof===y||e.$$typeof===v||e.$$typeof===U||e.getModuleId!==void 0))}function H(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function N(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&i("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 u:return"Fragment";case F:return"Portal";case A:return"Profiler";case C:return"StrictMode";case x:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return N(r)+".Consumer";case O:var t=e;return N(t._context)+".Provider";case v:return H(e,e.render,"ForwardRef");case w:var n=e.displayName||null;return n!==null?n:P(e.type)||"Memo";case c:{var s=e,l=s._payload,o=s._init;try{return P(o(l))}catch{return null}}}return null}var D=Object.assign,h=0,ae,Z,ge,pe,ye,he,be;function Ee(){}Ee.__reactDisabledLog=!0;function We(){{if(h===0){ae=console.log,Z=console.info,ge=console.warn,pe=console.error,ye=console.group,he=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}h++}}function Ye(){{if(h--,h===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:ae}),info:D({},e,{value:Z}),warn:D({},e,{value:ge}),error:D({},e,{value:pe}),group:D({},e,{value:ye}),groupCollapsed:D({},e,{value:he}),groupEnd:D({},e,{value:be})})}h<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=j.ReactCurrentDispatcher,ie;function Q(e,r,t){{if(ie===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);ie=n&&n[1]||""}return`
|
|
18
|
+
`+ie+e}}var ue=!1,ee;{var Ke=typeof WeakMap=="function"?WeakMap:Map;ee=new Ke}function Re(e,r){if(!e||ue)return"";{var t=ee.get(e);if(t!==void 0)return t}var n;ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var l;l=oe.current,oe.current=null,We();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(_){n=_}Reflect.construct(e,[],o)}else{try{o.call()}catch(_){n=_}e.call(o.prototype)}}else{try{throw Error()}catch(_){n=_}e()}}catch(_){if(_&&n&&typeof _.stack=="string"){for(var a=_.stack.split(`
|
|
19
19
|
`),b=n.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+a[
|
|
20
|
+
`),d=a.length-1,m=b.length-1;d>=1&&m>=0&&a[d]!==b[m];)m--;for(;d>=1&&m>=0;d--,m--)if(a[d]!==b[m]){if(d!==1||m!==1)do if(d--,m--,m<0||a[d]!==b[m]){var k=`
|
|
21
|
+
`+a[d].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,k),k}while(d>=1&&m>=0);break}}}finally{ue=!1,oe.current=l,Ye(),Error.prepareStackTrace=s}var W=e?e.displayName||e.name:"",M=W?Q(W):"";return typeof e=="function"&&ee.set(e,M),M}function Ue(e,r,t){return Re(e,!1)}function Ne(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,Ne(e));if(typeof e=="string")return Q(e);switch(e){case x:return Q("Suspense");case p:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Ue(e.render);case w:return re(e.type,r,t);case c:{var n=e,s=n._payload,l=n._init;try{return re(l(s),r,t)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,_e={},we=j.ReactDebugCurrentFrame;function te(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}function qe(e,r,t,n,s){{var l=Function.call.bind(q);for(var o in e)if(l(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var b=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){a=d}a&&!(a instanceof Error)&&(te(s),i("%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).",n||"React class",t,o,typeof a),te(null)),a instanceof Error&&!(a.message in _e)&&(_e[a.message]=!0,te(s),i("Failed %s type: %s",t,a.message),te(null))}}}var Be=Array.isArray;function se(e){return Be(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Xe(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Te(e){if(Xe(e))return i("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),Se(e)}var B=j.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},Ce,Oe,le;le={};function Ge(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function He(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=P(B.current.type);le[t]||(i('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',P(B.current.type),e.ref),le[t]=!0)}}function Qe(e,r){{var t=function(){Ce||(Ce=!0,i("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function er(e,r){{var t=function(){Oe||(Oe=!0,i("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var rr=function(e,r,t,n,s,l,o){var a={$$typeof:g,type:e,key:r,ref:t,props:o,_owner:l};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function tr(e,r,t,n,s){{var l,o={},a=null,b=null;t!==void 0&&(Te(t),a=""+t),He(r)&&(Te(r.key),a=""+r.key),Ge(r)&&(b=r.ref,Ze(r,s));for(l in r)q.call(r,l)&&!ze.hasOwnProperty(l)&&(o[l]=r[l]);if(e&&e.defaultProps){var d=e.defaultProps;for(l in d)o[l]===void 0&&(o[l]=d[l])}if(a||b){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Qe(o,m),b&&er(o,m)}return rr(e,a,b,s,n,B.current,o)}}var ce=j.ReactCurrentOwner,Pe=j.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}function ke(){{if(ce.current){var e=P(ce.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function nr(e){return""}var xe={};function ar(e){{var r=ke();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==ce.current&&(n=" It was passed a child from "+P(e._owner.type)+"."),$(e),i('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),$(null)}}function De(e,r){{if(typeof e!="object")return;if(se(e))for(var t=0;t<e.length;t++){var n=e[t];de(n)&&je(n,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var s=I(e);if(typeof s=="function"&&s!==e.entries)for(var l=s.call(e),o;!(o=l.next()).done;)de(o.value)&&je(o.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===v||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=P(r);qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var s=P(r);i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&i("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){$(e),i("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),$(null);break}}e.ref!==null&&($(e),i("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}var Fe={};function Ae(e,r,t,n,s,l){{var o=G(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=nr();b?a+=b:a+=ke();var d;e===null?d="null":se(e)?d="array":e!==void 0&&e.$$typeof===g?(d="<"+(P(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,i("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,a)}var m=tr(e,r,t,s,l);if(m==null)return m;if(o){var k=r.children;if(k!==void 0)if(n)if(se(k)){for(var W=0;W<k.length;W++)De(k[W],e);Object.freeze&&Object.freeze(k)}else i("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 De(k,e)}if(q.call(r,"key")){var M=P(e),_=Object.keys(r).filter(function(dr){return dr!=="key"}),ve=_.length>0?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}";if(!Fe[M+ve]){var fr=_.length>0?"{"+_.join(": ..., ")+": ...}":"{}";i(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,ve,M,fr,M),Fe[M+ve]=!0}}return e===u?ir(m):or(m),m}}function ur(e,r,t){return Ae(e,r,t,!0)}function sr(e,r,t){return Ae(e,r,t,!1)}var lr=sr,cr=ur;X.Fragment=u,X.jsx=lr,X.jsxs=cr}()),X}process.env.NODE_ENV==="production"?me.exports=vr():me.exports=mr();var Me=me.exports;function gr(){let f="";return function(F){const u=/^-?\d*([.,]?)\d*$/,C=F.match(u);return C&&(f=C[0]),f}}const Le=f=>{const g=f.toString().split(".");return g.length>1?g[1].length:0},pr=(f,g)=>Object.assign({},f,{target:{...f.currentTarget,value:g,name:f.target.name}}),yr=gr(),$e=E.forwardRef(({mask:f=yr,onChange:g,step:F=1,value:u,...C},A)=>{const[O,y]=E.useState(u||""),v=A||E.useRef(null),x=c=>{c.persist();const{value:R}=c.target,S=f(R);y(S),g&&g(pr(c,S.replace(",",".")))},p=(c,R)=>{c.persist();const S=c.target,L=parseFloat(O.replace(",","."))||0,I=parseFloat(F.toString()),j=Le(+F),T=(R?L+I:L-I).toFixed(j),V=f(T);if(y(V),g){const K={...new Event("change",{bubbles:!0}),target:{...S,value:V.replace(",","."),name:S.name}};g(K)}},w=c=>{c.key==="ArrowUp"?(c.preventDefault(),p(c,!0)):c.key==="ArrowDown"&&(c.preventDefault(),p(c,!1))};return E.useEffect(()=>{y(u||"")},[u]),Me.jsx("input",{...C,type:"text",ref:v,value:O,onChange:x,onKeyDown:w})});function hr({value:f,modifiers:g={altKey:1,ctrlKey:1,metaKey:1,shiftKey:.1},style:F={},...u}){const[C,A]=E.useState(String(f||0)),[O,y]=E.useState(""),[,v]=E.useState([0,0]),x=E.useRef(0),p=u.step?+u.step:1,w={cursor:"ew-resize",...F},c=i=>{var T;A(i.target.value),i.target.value!=="-"&&((T=u.onChange)==null||T.call(u,i))},R=E.useCallback(i=>{const T=i.target;v(V=>{const{clientX:Y,clientY:K}=i,[z,ne]=V,U=z-Y,G=ne-K;let H=1;O&&(H=g[O]||1);const N=p*H,P=Le(N);let D=Math.sqrt(U*U+G*G)*N;Y<z&&(D=-D);let h=x.current+D;if(u.min&&(h=Math.max(h,+u.min)),u.max&&(h=Math.min(h,+u.max)),h=+h.toFixed(P),h&&A(String(h)),h&&u.onChange){const Z={...new Event("change",{bubbles:!0}),target:{...T,value:h,name:T.name}};u.onChange(Z)}return V})},[O,u.max,u.min,p,g]),S=E.useCallback(()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",S)},[R]),L=E.useCallback(i=>{let T=+C;isNaN(T)&&(T=+(u.defaultValue||u.min||0)),x.current=T,v([i.clientX,i.clientY]),document.addEventListener("mousemove",R),document.addEventListener("mouseup",S)},[R,S,f,u.min,u.defaultValue]),I=i=>{i.metaKey?y("metaKey"):i.ctrlKey?y("ctrlKey"):i.altKey?y("altKey"):i.shiftKey&&y("shiftKey")},j=()=>{y("")};return E.useEffect(()=>{A(String(f||0))},[f]),E.useEffect(()=>(document.addEventListener("keydown",I),document.addEventListener("keyup",j),()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",S),document.removeEventListener("keydown",I),document.removeEventListener("keyup",j)}),[]),Me.jsx($e,{...u,style:w,onChange:c,onMouseDown:L,value:C})}exports.InteractiveInput=hr;exports.MaskedInput=$e;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import $e, { forwardRef as
|
|
2
|
-
var
|
|
1
|
+
import $e, { forwardRef as pr, useState as te, useRef as We, useEffect as ge, useCallback as me } from "react";
|
|
2
|
+
var pe = { exports: {} }, B = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,20 +10,20 @@ var ye = { exports: {} }, N = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var Me;
|
|
13
|
-
function
|
|
14
|
-
if (Me) return
|
|
13
|
+
function yr() {
|
|
14
|
+
if (Me) return B;
|
|
15
15
|
Me = 1;
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
P !== void 0 && (c = "" + P),
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
16
|
+
var f = $e, g = Symbol.for("react.element"), D = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, S = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function C(y, v, P) {
|
|
18
|
+
var p, _ = {}, c = null, b = null;
|
|
19
|
+
P !== void 0 && (c = "" + P), v.key !== void 0 && (c = "" + v.key), v.ref !== void 0 && (b = v.ref);
|
|
20
|
+
for (p in v) u.call(v, p) && !F.hasOwnProperty(p) && (_[p] = v[p]);
|
|
21
|
+
if (y && y.defaultProps) for (p in v = y.defaultProps, v) _[p] === void 0 && (_[p] = v[p]);
|
|
22
|
+
return { $$typeof: g, type: y, key: c, ref: b, props: _, _owner: S.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return B.Fragment = D, B.jsx = C, B.jsxs = C, B;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var J = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -36,24 +36,24 @@ var q = {};
|
|
|
36
36
|
var Le;
|
|
37
37
|
function hr() {
|
|
38
38
|
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var f = $e, g = Symbol.for("react.element"), D = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), y = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), c = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), w = Symbol.iterator, M = "@@iterator";
|
|
40
|
+
function A(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = w && e[w] || e[M];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var k = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
47
|
function i(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
50
50
|
t[n - 1] = arguments[n];
|
|
51
|
-
|
|
51
|
+
T("error", e, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function T(e, r, t) {
|
|
55
55
|
{
|
|
56
|
-
var n =
|
|
56
|
+
var n = k.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
57
57
|
s !== "" && (r += "%s", t = t.concat([s]));
|
|
58
58
|
var l = t.map(function(o) {
|
|
59
59
|
return String(o);
|
|
@@ -61,26 +61,26 @@ function hr() {
|
|
|
61
61
|
l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e === u || e ===
|
|
64
|
+
var V = !1, W = !1, Y = !1, X = !1, ne = !1, K;
|
|
65
|
+
K = Symbol.for("react.module.reference");
|
|
66
|
+
function z(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === F || ne || e === S || e === P || e === p || X || e === b || V || W || Y || typeof e == "object" && e !== null && (e.$$typeof === c || e.$$typeof === _ || e.$$typeof === C || e.$$typeof === y || e.$$typeof === v || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === K || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function G(e, r, t) {
|
|
74
74
|
var n = e.displayName;
|
|
75
75
|
if (n)
|
|
76
76
|
return n;
|
|
77
77
|
var s = r.displayName || r.name || "";
|
|
78
78
|
return s !== "" ? t + "(" + s + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function U(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function O(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
86
|
if (typeof e.tag == "number" && i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -90,34 +90,34 @@ function hr() {
|
|
|
90
90
|
switch (e) {
|
|
91
91
|
case u:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case D:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case F:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case S:
|
|
98
98
|
return "StrictMode";
|
|
99
99
|
case P:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case p:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case y:
|
|
107
107
|
var r = e;
|
|
108
|
-
return
|
|
109
|
-
case
|
|
108
|
+
return U(r) + ".Consumer";
|
|
109
|
+
case C:
|
|
110
110
|
var t = e;
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
return
|
|
114
|
-
case
|
|
111
|
+
return U(t._context) + ".Provider";
|
|
112
|
+
case v:
|
|
113
|
+
return G(e, e.render, "ForwardRef");
|
|
114
|
+
case _:
|
|
115
115
|
var n = e.displayName || null;
|
|
116
|
-
return n !== null ? n :
|
|
116
|
+
return n !== null ? n : O(e.type) || "Memo";
|
|
117
117
|
case c: {
|
|
118
118
|
var s = e, l = s._payload, o = s._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return O(o(l));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function hr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
128
|
+
var j = Object.assign, h = 0, ae, H, ye, he, Ee, be, Re;
|
|
129
129
|
function _e() {
|
|
130
130
|
}
|
|
131
131
|
_e.__reactDisabledLog = !0;
|
|
132
132
|
function Ue() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (h === 0) {
|
|
135
|
+
ae = console.log, H = console.info, ye = console.warn, he = console.error, Ee = console.group, be = console.groupCollapsed, Re = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -149,65 +149,65 @@ function hr() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
h++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
function Ne() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (h--, h === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
161
161
|
writable: !0
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
|
-
log:
|
|
165
|
-
value:
|
|
164
|
+
log: j({}, e, {
|
|
165
|
+
value: ae
|
|
166
166
|
}),
|
|
167
|
-
info:
|
|
168
|
-
value:
|
|
167
|
+
info: j({}, e, {
|
|
168
|
+
value: H
|
|
169
169
|
}),
|
|
170
|
-
warn:
|
|
171
|
-
value:
|
|
170
|
+
warn: j({}, e, {
|
|
171
|
+
value: ye
|
|
172
172
|
}),
|
|
173
|
-
error:
|
|
173
|
+
error: j({}, e, {
|
|
174
174
|
value: he
|
|
175
175
|
}),
|
|
176
|
-
group:
|
|
176
|
+
group: j({}, e, {
|
|
177
177
|
value: Ee
|
|
178
178
|
}),
|
|
179
|
-
groupCollapsed:
|
|
179
|
+
groupCollapsed: j({}, e, {
|
|
180
180
|
value: be
|
|
181
181
|
}),
|
|
182
|
-
groupEnd:
|
|
182
|
+
groupEnd: j({}, e, {
|
|
183
183
|
value: Re
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
h < 0 && i("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var oe = k.ReactCurrentDispatcher, ie;
|
|
191
191
|
function Z(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (ie === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (s) {
|
|
197
197
|
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
|
|
198
|
+
ie = n && n[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + ie + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var ue = !1, Q;
|
|
205
205
|
{
|
|
206
206
|
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
207
|
Q = new qe();
|
|
208
208
|
}
|
|
209
209
|
function we(e, r) {
|
|
210
|
-
if (!e ||
|
|
210
|
+
if (!e || ue)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
213
|
var t = Q.get(e);
|
|
@@ -215,11 +215,11 @@ function hr() {
|
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var n;
|
|
218
|
-
|
|
218
|
+
ue = !0;
|
|
219
219
|
var s = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var l;
|
|
222
|
-
l =
|
|
222
|
+
l = oe.current, oe.current = null, Ue();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var o = function() {
|
|
@@ -232,50 +232,50 @@ function hr() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(o, []);
|
|
235
|
-
} catch (
|
|
236
|
-
n =
|
|
235
|
+
} catch (R) {
|
|
236
|
+
n = R;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], o);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
o.call();
|
|
242
|
-
} catch (
|
|
243
|
-
n =
|
|
242
|
+
} catch (R) {
|
|
243
|
+
n = R;
|
|
244
244
|
}
|
|
245
245
|
e.call(o.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
n =
|
|
250
|
+
} catch (R) {
|
|
251
|
+
n = R;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var a =
|
|
255
|
+
} catch (R) {
|
|
256
|
+
if (R && n && typeof R.stack == "string") {
|
|
257
|
+
for (var a = R.stack.split(`
|
|
258
258
|
`), E = n.stack.split(`
|
|
259
|
-
`),
|
|
260
|
-
|
|
261
|
-
for (;
|
|
262
|
-
if (a[
|
|
263
|
-
if (
|
|
259
|
+
`), d = a.length - 1, m = E.length - 1; d >= 1 && m >= 0 && a[d] !== E[m]; )
|
|
260
|
+
m--;
|
|
261
|
+
for (; d >= 1 && m >= 0; d--, m--)
|
|
262
|
+
if (a[d] !== E[m]) {
|
|
263
|
+
if (d !== 1 || m !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
265
|
+
if (d--, m--, m < 0 || a[d] !== E[m]) {
|
|
266
266
|
var x = `
|
|
267
|
-
` + a[
|
|
267
|
+
` + a[d].replace(" at new ", " at ");
|
|
268
268
|
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, x), x;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (d >= 1 && m >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
ue = !1, oe.current = l, Ne(), Error.prepareStackTrace = s;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" && Q.set(e,
|
|
277
|
+
var $ = e ? e.displayName || e.name : "", I = $ ? Z($) : "";
|
|
278
|
+
return typeof e == "function" && Q.set(e, I), I;
|
|
279
279
|
}
|
|
280
280
|
function Be(e, r, t) {
|
|
281
281
|
return we(e, !1);
|
|
@@ -294,14 +294,14 @@ function hr() {
|
|
|
294
294
|
switch (e) {
|
|
295
295
|
case P:
|
|
296
296
|
return Z("Suspense");
|
|
297
|
-
case
|
|
297
|
+
case p:
|
|
298
298
|
return Z("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
302
|
+
case v:
|
|
303
303
|
return Be(e.render);
|
|
304
|
-
case
|
|
304
|
+
case _:
|
|
305
305
|
return ee(e.type, r, t);
|
|
306
306
|
case c: {
|
|
307
307
|
var n = e, s = n._payload, l = n._init;
|
|
@@ -313,7 +313,7 @@ function hr() {
|
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
316
|
+
var N = Object.prototype.hasOwnProperty, Te = {}, Se = k.ReactDebugCurrentFrame;
|
|
317
317
|
function re(e) {
|
|
318
318
|
if (e) {
|
|
319
319
|
var r = e._owner, t = ee(e.type, e._source, r ? r.type : null);
|
|
@@ -323,7 +323,7 @@ function hr() {
|
|
|
323
323
|
}
|
|
324
324
|
function Xe(e, r, t, n, s) {
|
|
325
325
|
{
|
|
326
|
-
var l = Function.call.bind(
|
|
326
|
+
var l = Function.call.bind(N);
|
|
327
327
|
for (var o in e)
|
|
328
328
|
if (l(e, o)) {
|
|
329
329
|
var a = void 0;
|
|
@@ -333,15 +333,15 @@ function hr() {
|
|
|
333
333
|
throw E.name = "Invariant Violation", E;
|
|
334
334
|
}
|
|
335
335
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (
|
|
337
|
-
a =
|
|
336
|
+
} catch (d) {
|
|
337
|
+
a = d;
|
|
338
338
|
}
|
|
339
339
|
a && !(a instanceof Error) && (re(s), i("%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).", n || "React class", t, o, typeof a), re(null)), a instanceof Error && !(a.message in Te) && (Te[a.message] = !0, re(s), i("Failed %s type: %s", t, a.message), re(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var ze = Array.isArray;
|
|
344
|
-
function
|
|
344
|
+
function se(e) {
|
|
345
345
|
return ze(e);
|
|
346
346
|
}
|
|
347
347
|
function Ge(e) {
|
|
@@ -364,15 +364,15 @@ function hr() {
|
|
|
364
364
|
if (He(e))
|
|
365
365
|
return i("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), Ce(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var q = k.ReactCurrentOwner, Ze = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
}, xe, Pe,
|
|
373
|
-
|
|
372
|
+
}, xe, Pe, le;
|
|
373
|
+
le = {};
|
|
374
374
|
function Qe(e) {
|
|
375
|
-
if (
|
|
375
|
+
if (N.call(e, "ref")) {
|
|
376
376
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
377
|
if (r && r.isReactWarning)
|
|
378
378
|
return !1;
|
|
@@ -380,7 +380,7 @@ function hr() {
|
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
382
|
function er(e) {
|
|
383
|
-
if (
|
|
383
|
+
if (N.call(e, "key")) {
|
|
384
384
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
385
|
if (r && r.isReactWarning)
|
|
386
386
|
return !1;
|
|
@@ -388,9 +388,9 @@ function hr() {
|
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
390
|
function rr(e, r) {
|
|
391
|
-
if (typeof e.ref == "string" &&
|
|
392
|
-
var t =
|
|
393
|
-
|
|
391
|
+
if (typeof e.ref == "string" && q.current && r && q.current.stateNode !== r) {
|
|
392
|
+
var t = O(q.current.type);
|
|
393
|
+
le[t] || (i('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', O(q.current.type), e.ref), le[t] = !0);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
function tr(e, r) {
|
|
@@ -418,7 +418,7 @@ function hr() {
|
|
|
418
418
|
var ar = function(e, r, t, n, s, l, o) {
|
|
419
419
|
var a = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof:
|
|
421
|
+
$$typeof: g,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: e,
|
|
424
424
|
key: r,
|
|
@@ -449,36 +449,36 @@ function hr() {
|
|
|
449
449
|
var l, o = {}, a = null, E = null;
|
|
450
450
|
t !== void 0 && (Oe(t), a = "" + t), er(r) && (Oe(r.key), a = "" + r.key), Qe(r) && (E = r.ref, rr(r, s));
|
|
451
451
|
for (l in r)
|
|
452
|
-
|
|
452
|
+
N.call(r, l) && !Ze.hasOwnProperty(l) && (o[l] = r[l]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (l in
|
|
456
|
-
o[l] === void 0 && (o[l] =
|
|
454
|
+
var d = e.defaultProps;
|
|
455
|
+
for (l in d)
|
|
456
|
+
o[l] === void 0 && (o[l] = d[l]);
|
|
457
457
|
}
|
|
458
458
|
if (a || E) {
|
|
459
|
-
var
|
|
460
|
-
a && tr(o,
|
|
459
|
+
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
+
a && tr(o, m), E && nr(o, m);
|
|
461
461
|
}
|
|
462
|
-
return ar(e, a, E, s, n,
|
|
462
|
+
return ar(e, a, E, s, n, q.current, o);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
465
|
+
var ce = k.ReactCurrentOwner, ke = k.ReactDebugCurrentFrame;
|
|
466
|
+
function L(e) {
|
|
467
467
|
if (e) {
|
|
468
468
|
var r = e._owner, t = ee(e.type, e._source, r ? r.type : null);
|
|
469
469
|
ke.setExtraStackFrame(t);
|
|
470
470
|
} else
|
|
471
471
|
ke.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
473
|
+
var fe;
|
|
474
|
+
fe = !1;
|
|
475
|
+
function de(e) {
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === g;
|
|
477
477
|
}
|
|
478
478
|
function je() {
|
|
479
479
|
{
|
|
480
|
-
if (
|
|
481
|
-
var e =
|
|
480
|
+
if (ce.current) {
|
|
481
|
+
var e = O(ce.current.type);
|
|
482
482
|
if (e)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -513,25 +513,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
513
513
|
return;
|
|
514
514
|
De[t] = !0;
|
|
515
515
|
var n = "";
|
|
516
|
-
e && e._owner && e._owner !==
|
|
516
|
+
e && e._owner && e._owner !== ce.current && (n = " It was passed a child from " + O(e._owner.type) + "."), L(e), i('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), L(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function Ae(e, r) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
|
-
if (
|
|
523
|
+
if (se(e))
|
|
524
524
|
for (var t = 0; t < e.length; t++) {
|
|
525
525
|
var n = e[t];
|
|
526
|
-
|
|
526
|
+
de(n) && Fe(n, r);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if (de(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var s =
|
|
531
|
+
var s = A(e);
|
|
532
532
|
if (typeof s == "function" && s !== e.entries)
|
|
533
533
|
for (var l = s.call(e), o; !(o = l.next()).done; )
|
|
534
|
-
|
|
534
|
+
de(o.value) && Fe(o.value, r);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -543,18 +543,18 @@ Check the top-level render call using <` + t + ">.");
|
|
|
543
543
|
var t;
|
|
544
544
|
if (typeof r == "function")
|
|
545
545
|
t = r.propTypes;
|
|
546
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
546
|
+
else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
|
-
r.$$typeof ===
|
|
548
|
+
r.$$typeof === _))
|
|
549
549
|
t = r.propTypes;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
552
|
if (t) {
|
|
553
|
-
var n =
|
|
553
|
+
var n = O(r);
|
|
554
554
|
Xe(t, e.props, "prop", n, e);
|
|
555
|
-
} else if (r.PropTypes !== void 0 && !
|
|
556
|
-
|
|
557
|
-
var s =
|
|
555
|
+
} else if (r.PropTypes !== void 0 && !fe) {
|
|
556
|
+
fe = !0;
|
|
557
|
+
var s = O(r);
|
|
558
558
|
i("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
559
559
|
}
|
|
560
560
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && i("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -565,56 +565,56 @@ Check the top-level render call using <` + t + ">.");
|
|
|
565
565
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
566
566
|
var n = r[t];
|
|
567
567
|
if (n !== "children" && n !== "key") {
|
|
568
|
-
|
|
568
|
+
L(e), i("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), L(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (
|
|
572
|
+
e.ref !== null && (L(e), i("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ve = {};
|
|
576
576
|
function Ie(e, r, t, n, s, l) {
|
|
577
577
|
{
|
|
578
|
-
var o =
|
|
578
|
+
var o = z(e);
|
|
579
579
|
if (!o) {
|
|
580
580
|
var a = "";
|
|
581
581
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
582
582
|
var E = ir();
|
|
583
583
|
E ? a += E : a += je();
|
|
584
|
-
var
|
|
585
|
-
e === null ?
|
|
584
|
+
var d;
|
|
585
|
+
e === null ? d = "null" : se(e) ? d = "array" : e !== void 0 && e.$$typeof === g ? (d = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, i("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
587
|
+
var m = or(e, r, t, s, l);
|
|
588
|
+
if (m == null)
|
|
589
|
+
return m;
|
|
590
590
|
if (o) {
|
|
591
591
|
var x = r.children;
|
|
592
592
|
if (x !== void 0)
|
|
593
593
|
if (n)
|
|
594
|
-
if (
|
|
595
|
-
for (var
|
|
596
|
-
Ae(x[
|
|
594
|
+
if (se(x)) {
|
|
595
|
+
for (var $ = 0; $ < x.length; $++)
|
|
596
|
+
Ae(x[$], e);
|
|
597
597
|
Object.freeze && Object.freeze(x);
|
|
598
598
|
} else
|
|
599
599
|
i("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
600
|
else
|
|
601
601
|
Ae(x, e);
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
var
|
|
605
|
-
return
|
|
606
|
-
}),
|
|
607
|
-
if (!Ve[
|
|
608
|
-
var mr =
|
|
603
|
+
if (N.call(r, "key")) {
|
|
604
|
+
var I = O(e), R = Object.keys(r).filter(function(gr) {
|
|
605
|
+
return gr !== "key";
|
|
606
|
+
}), ve = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!Ve[I + ve]) {
|
|
608
|
+
var mr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
|
|
609
609
|
i(`A props object containing a "key" prop is being spread into JSX:
|
|
610
610
|
let props = %s;
|
|
611
611
|
<%s {...props} />
|
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
|
613
613
|
let props = %s;
|
|
614
|
-
<%s key={someKey} {...props} />`,
|
|
614
|
+
<%s key={someKey} {...props} />`, ve, I, mr, I), Ve[I + ve] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return e === u ? lr(
|
|
617
|
+
return e === u ? lr(m) : sr(m), m;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
function cr(e, r, t) {
|
|
@@ -624,134 +624,136 @@ React keys must be passed directly to JSX without using spread:
|
|
|
624
624
|
return Ie(e, r, t, !1);
|
|
625
625
|
}
|
|
626
626
|
var dr = fr, vr = cr;
|
|
627
|
-
|
|
628
|
-
}()),
|
|
627
|
+
J.Fragment = u, J.jsx = dr, J.jsxs = vr;
|
|
628
|
+
}()), J;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ?
|
|
631
|
-
var Ye =
|
|
630
|
+
process.env.NODE_ENV === "production" ? pe.exports = yr() : pe.exports = hr();
|
|
631
|
+
var Ye = pe.exports;
|
|
632
632
|
function Er() {
|
|
633
|
-
let
|
|
634
|
-
return function(
|
|
635
|
-
const u = /^-?\d*([.,]?)\d*$/,
|
|
636
|
-
return
|
|
633
|
+
let f = "";
|
|
634
|
+
return function(D) {
|
|
635
|
+
const u = /^-?\d*([.,]?)\d*$/, S = D.match(u);
|
|
636
|
+
return S && (f = S[0]), f;
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
const Ke = (
|
|
640
|
-
const
|
|
641
|
-
return
|
|
642
|
-
}, br =
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
const W = {
|
|
639
|
+
const Ke = (f) => {
|
|
640
|
+
const g = f.toString().split(".");
|
|
641
|
+
return g.length > 1 ? g[1].length : 0;
|
|
642
|
+
}, br = (f, g) => Object.assign({}, f, {
|
|
643
|
+
target: {
|
|
644
|
+
...f.currentTarget,
|
|
645
|
+
value: g,
|
|
646
|
+
name: f.target.name
|
|
647
|
+
}
|
|
648
|
+
}), Rr = Er(), _r = pr(
|
|
649
|
+
({ mask: f = Rr, onChange: g, step: D = 1, value: u, ...S }, F) => {
|
|
650
|
+
const [C, y] = te(u || ""), v = F || We(null), P = (c) => {
|
|
651
|
+
c.persist();
|
|
652
|
+
const { value: b } = c.target, w = f(b);
|
|
653
|
+
y(w), g && g(br(c, w.replace(",", ".")));
|
|
654
|
+
}, p = (c, b) => {
|
|
655
|
+
c.persist();
|
|
656
|
+
const w = c.target, M = parseFloat(C.replace(",", ".")) || 0, A = parseFloat(D.toString()), k = Ke(+D), T = (b ? M + A : M - A).toFixed(k), V = f(T);
|
|
657
|
+
if (y(V), g) {
|
|
658
|
+
const Y = {
|
|
660
659
|
...new Event("change", { bubbles: !0 }),
|
|
661
660
|
target: {
|
|
662
|
-
...
|
|
663
|
-
value:
|
|
661
|
+
...w,
|
|
662
|
+
value: V.replace(",", "."),
|
|
663
|
+
name: w.name
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
|
-
|
|
666
|
+
g(Y);
|
|
667
667
|
}
|
|
668
|
-
},
|
|
669
|
-
c.key === "ArrowUp" ? (c.preventDefault(),
|
|
668
|
+
}, _ = (c) => {
|
|
669
|
+
c.key === "ArrowUp" ? (c.preventDefault(), p(c, !0)) : c.key === "ArrowDown" && (c.preventDefault(), p(c, !1));
|
|
670
670
|
};
|
|
671
|
-
return
|
|
672
|
-
|
|
671
|
+
return ge(() => {
|
|
672
|
+
y(u || "");
|
|
673
673
|
}, [u]), /* @__PURE__ */ Ye.jsx(
|
|
674
674
|
"input",
|
|
675
675
|
{
|
|
676
|
-
...
|
|
676
|
+
...S,
|
|
677
677
|
type: "text",
|
|
678
|
-
ref:
|
|
679
|
-
value:
|
|
678
|
+
ref: v,
|
|
679
|
+
value: C,
|
|
680
680
|
onChange: P,
|
|
681
|
-
onKeyDown:
|
|
681
|
+
onKeyDown: _
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
}
|
|
685
685
|
);
|
|
686
|
-
function
|
|
687
|
-
value:
|
|
688
|
-
modifiers:
|
|
686
|
+
function Tr({
|
|
687
|
+
value: f,
|
|
688
|
+
modifiers: g = {
|
|
689
689
|
altKey: 1,
|
|
690
690
|
ctrlKey: 1,
|
|
691
691
|
metaKey: 1,
|
|
692
692
|
shiftKey: 0.1
|
|
693
693
|
},
|
|
694
|
-
style:
|
|
694
|
+
style: D = {},
|
|
695
695
|
...u
|
|
696
696
|
}) {
|
|
697
|
-
const [
|
|
698
|
-
var
|
|
699
|
-
|
|
700
|
-
}, b =
|
|
697
|
+
const [S, F] = te(String(f || 0)), [C, y] = te(""), [, v] = te([0, 0]), P = We(0), p = u.step ? +u.step : 1, _ = { cursor: "ew-resize", ...D }, c = (i) => {
|
|
698
|
+
var T;
|
|
699
|
+
F(i.target.value), i.target.value !== "-" && ((T = u.onChange) == null || T.call(u, i));
|
|
700
|
+
}, b = me(
|
|
701
701
|
(i) => {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
702
|
+
const T = i.target;
|
|
703
|
+
v((V) => {
|
|
704
|
+
const { clientX: W, clientY: Y } = i, [X, ne] = V, K = X - W, z = ne - Y;
|
|
705
|
+
let G = 1;
|
|
706
|
+
C && (G = g[C] || 1);
|
|
707
|
+
const U = p * G, O = Ke(U);
|
|
708
|
+
let j = Math.sqrt(K * K + z * z) * U;
|
|
709
|
+
W < X && (j = -j);
|
|
710
|
+
let h = P.current + j;
|
|
711
|
+
if (u.min && (h = Math.max(h, +u.min)), u.max && (h = Math.min(h, +u.max)), h = +h.toFixed(O), h && F(String(h)), h && u.onChange) {
|
|
711
712
|
const H = {
|
|
712
713
|
...new Event("change", { bubbles: !0 }),
|
|
713
714
|
target: {
|
|
714
|
-
...
|
|
715
|
-
value:
|
|
715
|
+
...T,
|
|
716
|
+
value: h,
|
|
717
|
+
name: T.name
|
|
716
718
|
}
|
|
717
719
|
};
|
|
718
720
|
u.onChange(
|
|
719
721
|
H
|
|
720
722
|
);
|
|
721
723
|
}
|
|
722
|
-
return
|
|
724
|
+
return V;
|
|
723
725
|
});
|
|
724
726
|
},
|
|
725
|
-
[
|
|
726
|
-
),
|
|
727
|
-
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup",
|
|
728
|
-
}, [b]),
|
|
727
|
+
[C, u.max, u.min, p, g]
|
|
728
|
+
), w = me(() => {
|
|
729
|
+
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", w);
|
|
730
|
+
}, [b]), M = me(
|
|
729
731
|
(i) => {
|
|
730
|
-
let
|
|
731
|
-
isNaN(
|
|
732
|
+
let T = +S;
|
|
733
|
+
isNaN(T) && (T = +(u.defaultValue || u.min || 0)), P.current = T, v([i.clientX, i.clientY]), document.addEventListener("mousemove", b), document.addEventListener("mouseup", w);
|
|
732
734
|
},
|
|
733
|
-
[b,
|
|
734
|
-
),
|
|
735
|
-
i.metaKey ?
|
|
736
|
-
},
|
|
737
|
-
|
|
735
|
+
[b, w, f, u.min, u.defaultValue]
|
|
736
|
+
), A = (i) => {
|
|
737
|
+
i.metaKey ? y("metaKey") : i.ctrlKey ? y("ctrlKey") : i.altKey ? y("altKey") : i.shiftKey && y("shiftKey");
|
|
738
|
+
}, k = () => {
|
|
739
|
+
y("");
|
|
738
740
|
};
|
|
739
|
-
return
|
|
740
|
-
|
|
741
|
-
}, [
|
|
742
|
-
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup",
|
|
741
|
+
return ge(() => {
|
|
742
|
+
F(String(f || 0));
|
|
743
|
+
}, [f]), ge(() => (document.addEventListener("keydown", A), document.addEventListener("keyup", k), () => {
|
|
744
|
+
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", w), document.removeEventListener("keydown", A), document.removeEventListener("keyup", k);
|
|
743
745
|
}), []), /* @__PURE__ */ Ye.jsx(
|
|
744
|
-
|
|
746
|
+
_r,
|
|
745
747
|
{
|
|
746
748
|
...u,
|
|
747
|
-
style:
|
|
749
|
+
style: _,
|
|
748
750
|
onChange: c,
|
|
749
|
-
onMouseDown:
|
|
750
|
-
value:
|
|
751
|
+
onMouseDown: M,
|
|
752
|
+
value: S
|
|
751
753
|
}
|
|
752
754
|
);
|
|
753
755
|
}
|
|
754
756
|
export {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
+
Tr as InteractiveInput,
|
|
758
|
+
_r as MaskedInput
|
|
757
759
|
};
|
package/dist/types/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designbyadrian/react-interactive-input",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Adjust values in numeric input boxes by clicking and dragging horizontally, just like in Blender and similar 3D applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -29,11 +29,19 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build",
|
|
30
30
|
"deploy-storybook": "npm run build-storybook && touch ./storybook-static/.nojekyll && gh-pages -d storybook-static -t true"
|
|
31
31
|
},
|
|
32
|
-
"main": "dist/react-interactive-input.cjs.js",
|
|
33
|
-
"module": "dist/react-interactive-input.es.js",
|
|
34
32
|
"types": "dist/types/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"require": "./dist/react-interactive-input.cjs.js",
|
|
37
|
+
"import": "./dist/react-interactive-input.es.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"main": "./dist/react-interactive-input.cjs.js",
|
|
41
|
+
"module": "./dist/react-interactive-input.es.js",
|
|
35
42
|
"files": [
|
|
36
|
-
"dist"
|
|
43
|
+
"dist",
|
|
44
|
+
"dist/types"
|
|
37
45
|
],
|
|
38
46
|
"peerDependencies": {
|
|
39
47
|
"react": "^18.2.0",
|