forstok-ui-lib 1.0.3 → 1.0.5
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/dist/index.d.ts +24 -2
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +2 -1
- package/src/components/input/input.styles.ts +70 -0
- package/src/components/input/input.tsx +109 -0
- package/src/typeds/base.typed.ts +50 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import t from"react";import
|
|
1
|
+
import*as e from"react";import t,{useState as r,useEffect as n}from"react";import o,{css as a}from"styled-components";function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}"function"==typeof SuppressedError&&SuppressedError;var l,s={exports:{}},c={};var u,p,d={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,21 +7,21 @@ import*as e from"react";import t from"react";import r,{css as n}from"styled-comp
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function
|
|
10
|
+
*/function h(){return u||(u=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===F?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case C:return"Fragment";case S:return"Portal";case R:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case L:return"SuspenseList"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case _:return(t.displayName||"Context")+".Provider";case O:return(t._context.displayName||"Context")+".Consumer";case j:var r=t.render;return(t=t.displayName)||(t=""!==(t=r.displayName||r.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case T:return null!==(r=t.displayName||null)?r:e(t.type)||"Memo";case N:r=t._payload,t=t._init;try{return e(t(r))}catch(e){}}return null}function r(e){return""+e}function n(e){try{r(e);var t=!1}catch(e){t=!0}if(t){var n=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),r(e)}}function o(){}function a(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",K=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+K}function i(e,t){if(!e||Y)return"";var r=V.get(e);if(void 0!==r)return r;Y=!0,r=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n;n=U.H,U.H=null,function(){if(0===z){m=console.log,v=console.info,y=console.warn,g=console.error,b=console.group,w=console.groupCollapsed,x=console.groupEnd;var e={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}();try{var i={DetermineComponentFrameRoot:function(){try{if(t){var r=function(){throw Error()};if(Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(r,[])}catch(e){var n=e}Reflect.construct(e,[],r)}else{try{r.call()}catch(e){n=e}e.call(r.prototype)}}else{try{throw Error()}catch(e){n=e}(r=e())&&"function"==typeof r.catch&&r.catch((function(){}))}}catch(e){if(e&&n&&"string"==typeof e.stack)return[e.stack,n.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=i.DetermineComponentFrameRoot(),c=s[0],u=s[1];if(c&&u){var p=c.split("\n"),d=u.split("\n");for(s=l=0;l<p.length&&!p[l].includes("DetermineComponentFrameRoot");)l++;for(;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;if(l===p.length||s===d.length)for(l=p.length-1,s=d.length-1;1<=l&&0<=s&&p[l]!==d[s];)s--;for(;1<=l&&0<=s;l--,s--)if(p[l]!==d[s]){if(1!==l||1!==s)do{if(l--,0>--s||p[l]!==d[s]){var h="\n"+p[l].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),"function"==typeof e&&V.set(e,h),h}}while(1<=l&&0<=s);break}}}finally{Y=!1,U.H=n,function(){if(0==--z){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:m}),info:W({},e,{value:v}),warn:W({},e,{value:y}),error:W({},e,{value:g}),group:W({},e,{value:b}),groupCollapsed:W({},e,{value:w}),groupEnd:W({},e,{value:x})})}0>z&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=r}return p=(p=e?e.displayName||e.name:"")?a(p):"","function"==typeof e&&V.set(e,p),p}function l(e){if(null==e)return"";if("function"==typeof e){var t=e.prototype;return i(e,!(!t||!t.isReactComponent))}if("string"==typeof e)return a(e);switch(e){case P:return a("Suspense");case L:return a("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case j:return e=i(e.render,!1);case T:return l(e.type);case N:t=e._payload,e=e._init;try{return l(e(t))}catch(e){}}return""}function s(){var e=U.A;return null===e?null:e.getOwner()}function c(){var t=e(this.type);return q[t]||(q[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(t=this.props.ref)?t:null}function u(t,r,o,a,i,l){if("string"==typeof t||"function"==typeof t||t===C||t===R||t===E||t===P||t===L||t===D||"object"==typeof t&&null!==t&&(t.$$typeof===N||t.$$typeof===T||t.$$typeof===_||t.$$typeof===O||t.$$typeof===j||t.$$typeof===B||void 0!==t.getModuleId)){var u=r.children;if(void 0!==u)if(a)if(I(u)){for(a=0;a<u.length;a++)p(u[a],t);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(u,t)}else u="",(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===t?a="null":I(t)?a="array":void 0!==t&&t.$$typeof===k?(a="<"+(e(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",a,u);if(M.call(r,"key")){u=e(t);var d=Object.keys(r).filter((function(e){return"key"!==e}));a=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",G[u+a]||(d=0<d.length?"{"+d.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,u,d,u),G[u+a]=!0)}if(u=null,void 0!==o&&(n(o),u=""+o),function(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(n(r.key),u=""+r.key),"key"in r)for(var h in o={},r)"key"!==h&&(o[h]=r[h]);else o=r;return u&&function(e,t){function r(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,r,n,o,a){return r=a.ref,e={$$typeof:k,type:e,key:t,props:a,_owner:o},null!==(void 0!==r?r:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,u,l,0,s(),o)}function p(e,t){if("object"==typeof e&&e&&e.$$typeof!==X)if(I(e))for(var r=0;r<e.length;r++){var n=e[r];h(n)&&f(n,t)}else if(h(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?r=null:r="function"==typeof(r=A&&e[A]||e["@@iterator"])?r:null,"function"==typeof r&&r!==e.entries&&(r=r.call(e))!==e)for(;!(e=r.next()).done;)h(e.value)&&f(e.value,t)}function h(e){return"object"==typeof e&&null!==e&&e.$$typeof===k}function f(t,r){if(t._store&&!t._store.validated&&null==t.key&&(t._store.validated=1,r=function(t){var r="",n=s();return n&&(n=e(n.type))&&(r="\n\nCheck the render method of `"+n+"`."),r||(t=e(t))&&(r="\n\nCheck the top-level render call using <"+t+">."),r}(r),!Q[r])){Q[r]=!0;var n="";t&&null!=t._owner&&t._owner!==s()&&(n=null,"number"==typeof t._owner.tag?n=e(t._owner.type):"string"==typeof t._owner.name&&(n=t._owner.name),n=" It was passed a child from "+n+".");var o=U.getCurrentStack;U.getCurrentStack=function(){var e=l(t.type);return o&&(e+=o()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,n),U.getCurrentStack=o}}var m,v,y,g,b,w,x,$=t,k=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),_=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),A=Symbol.iterator,F=Symbol.for("react.client.reference"),U=$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,W=Object.assign,B=Symbol.for("react.client.reference"),I=Array.isArray,z=0;o.__reactDisabledLog=!0;var H,K,J,Y=!1,V=new("function"==typeof WeakMap?WeakMap:Map),X=Symbol.for("react.client.reference"),q={},G={},Q={};d.Fragment=C,d.jsx=function(e,t,r,n,o){return u(e,t,r,!1,0,o)},d.jsxs=function(e,t,r,n,o){return u(e,t,r,!0,0,o)}}()),d}var f=(p||(p=1,"production"===process.env.NODE_ENV?s.exports=function(){if(l)return c;l=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(t,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:e,type:t,key:o,ref:void 0!==r?r:null,props:n}}return c.Fragment=t,c.jsx=r,c.jsxs=r,c}():s.exports=h()),s.exports);const m=a`
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
text-overflow: ellipsis;
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
display: block;
|
|
15
15
|
max-width: 100%;
|
|
16
16
|
width: auto;
|
|
17
|
-
`,
|
|
17
|
+
`,v=o.span`
|
|
18
18
|
display: grid;
|
|
19
19
|
i {
|
|
20
20
|
display: inline-block;
|
|
21
21
|
margin-left: 5px;
|
|
22
22
|
}
|
|
23
|
-
${({$color:e,$elipsis:t})=>{let r="";return"mute"===e?r+="\n color: var(--mt-clr);\n ":"blue"===e?r+="\n color: var(--pri-clr-lnk__hvr);\n ":"green"===e?r+="\n color: green;\n ":"red"===e?r+="\n color: var(--sta-clr);\n ":"grey"===e||"darkgrey"===e?r+="\n color: var(--mt-clr);\n ":"supergrey"===e?r+="\n color: #929291;\n ":"orange"===e?r+="\n color: orange;\n ":"black"===e?r+="\n color: #000000;\n ":"lightgreen"===e?r+="\n color: #21BA45;\n ":"mate"===e?r+="\n color: #495057;\n ":"initial"===e&&(r+="\n color: var(--pri-clr);\n "),t&&(r+=
|
|
24
|
-
`,
|
|
23
|
+
${({$color:e,$elipsis:t})=>{let r="";return"mute"===e?r+="\n color: var(--mt-clr);\n ":"blue"===e?r+="\n color: var(--pri-clr-lnk__hvr);\n ":"green"===e?r+="\n color: green;\n ":"red"===e?r+="\n color: var(--sta-clr);\n ":"grey"===e||"darkgrey"===e?r+="\n color: var(--mt-clr);\n ":"supergrey"===e?r+="\n color: #929291;\n ":"orange"===e?r+="\n color: orange;\n ":"black"===e?r+="\n color: #000000;\n ":"lightgreen"===e?r+="\n color: #21BA45;\n ":"mate"===e?r+="\n color: #495057;\n ":"initial"===e&&(r+="\n color: var(--pri-clr);\n "),t&&(r+=m),r}}
|
|
24
|
+
`,y=e=>{var{children:t,$color:r,$elipsis:n=!0}=e,o=i(e,["children","$color","$elipsis"]);return f.jsx(v,Object.assign({$elipsis:!!n,$color:r},o,{children:t}))};var g,b={};!function(){if(g)return b;g=1,Object.defineProperty(b,"__esModule",{value:!0}),b.parse=function(e,t){const r=new a,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const a=e.indexOf(";",c),s=-1===a?n:a;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const u=i(e,c,t),p=l(e,t,u),d=e.slice(u,p);if(void 0===r[d]){let n=i(e,t+1,s),a=l(e,s,n);const c=o(e.slice(n,a));r[d]=c}c=s+1}while(c<n);return r},b.serialize=function(a,i,l){const s=l?.encode||encodeURIComponent;if(!e.test(a))throw new TypeError(`argument name is invalid: ${a}`);const c=s(i);if(!t.test(c))throw new TypeError(`argument val is invalid: ${i}`);let u=a+"="+c;if(!l)return u;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);u+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);u+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);u+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);u+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(u+="; HttpOnly");l.secure&&(u+="; Secure");l.partitioned&&(u+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return u};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function i(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();
|
|
25
25
|
/**
|
|
26
26
|
* react-router v7.1.5
|
|
27
27
|
*
|
|
@@ -32,20 +32,20 @@ import*as e from"react";import t from"react";import r,{css as n}from"styled-comp
|
|
|
32
32
|
*
|
|
33
33
|
* @license MIT
|
|
34
34
|
*/
|
|
35
|
-
var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,l="POP",s=null,c=u();null==c&&(c=0,i.replaceState({...i.state,idx:c},""));function u(){return(i.state||{idx:null}).idx}function p(){l="POP";let e=u(),t=null==e?null:e-c;c=e,s&&s({action:l,location:m.location,delta:t})}function d(e,t){l="PUSH";let r=$(m.location,e,t);c=u()+1;let n=k(r,c),p=m.createHref(r);try{i.pushState(n,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}a&&s&&s({action:l,location:m.location,delta:1})}function h(e,t){l="REPLACE";let r=$(m.location,e,t);c=u();let n=k(r,c),o=m.createHref(r);i.replaceState(n,"",o),a&&s&&s({action:l,location:m.location,delta:0})}function f(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:S(e);return r=r.replace(/ $/,"%20"),w(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return l},get location(){return e(o,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(g,p),s=e,()=>{o.removeEventListener(g,p),s=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:d,replace:h,go:e=>i.go(e)};return m}((function(e,t){let{pathname:r,search:n,hash:o}=e.location;return $("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:S(t)}),0,e)}function w(e,t){if(!1===e||null==e)throw new Error(t)}function x(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function k(e,t){return{usr:e.state,key:e.key,idx:t}}function $(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?E(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function S({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function E(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function C(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?E(t):t,a=W(o.pathname||"/",r);if(null==a)return null;let i=R(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let l=null;for(let e=0;null==l&&e<i.length;++e){let t=U(a);l=F(i[e],t,n)}return l}(e,t,r,!1)}function R(e,t=[],r=[],n=""){let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(w(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let l=H([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(w(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),R(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:A(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of _(e.path))o(e,t,r);else o(e,t)})),t}function _(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=_(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}var O=/^:[\w-]+$/,j=3,P=2,T=1,L=10,N=-2,D=e=>"*"===e;function A(e,t){let r=e.split("/"),n=r.length;return r.some(D)&&(n+=N),t&&(n+=P),r.filter((e=>!D(e))).reduce(((e,t)=>e+(O.test(t)?j:""===t?T:L)),n)}function F(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",u=M({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!u&&s&&r&&!n[n.length-1].route.index&&(u=M({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:H([a,u.pathname]),pathnameBase:J(H([a,u.pathnameBase])),route:p}),"/"!==u.pathnameBase&&(a=H([a,u.pathnameBase]))}return i}function M(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){x("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function U(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return x(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function W(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function z(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function I(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function B(e,t,r,n=!1){let o;"string"==typeof e?o=E(e):(o={...e},w(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),w(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),w(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?E(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:Y(n),hash:K(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}var H=e=>e.join("/").replace(/\/\/+/g,"/"),J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",K=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var V=["POST","PUT","PATCH","DELETE"];new Set(V);var X=["GET",...V];new Set(X);var q=e.createContext(null);q.displayName="DataRouter";var G=e.createContext(null);G.displayName="DataRouterState";var Q=e.createContext({isTransitioning:!1});Q.displayName="ViewTransition",e.createContext(new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var Z=e.createContext(null);Z.displayName="Navigation";var ee=e.createContext(null);ee.displayName="Location";var te=e.createContext({outlet:null,matches:[],isDataRoute:!1});te.displayName="Route";var re=e.createContext(null);function ne(){return null!=e.useContext(ee)}function oe(){return w(ne(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(ee).location}re.displayName="RouteError";var ae="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ie(t){e.useContext(Z).static||e.useLayoutEffect(t)}function le(){let{isDataRoute:t}=e.useContext(te);return t?function(){let{router:t}=function(t){let r=e.useContext(q);return w(r,fe(t)),r}("useNavigate"),r=me("useNavigate"),n=e.useRef(!1);return ie((()=>{n.current=!0})),e.useCallback((async(e,o={})=>{x(n.current,ae),n.current&&("number"==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,...o}))}),[t,r])}():function(){w(ne(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(q),{basename:r,navigator:n}=e.useContext(Z),{matches:o}=e.useContext(te),{pathname:a}=oe(),i=JSON.stringify(I(o)),l=e.useRef(!1);return ie((()=>{l.current=!0})),e.useCallback(((e,o={})=>{if(x(l.current,ae),!l.current)return;if("number"==typeof e)return void n.go(e);let s=B(e,JSON.parse(i),a,"path"===o.relative);null==t&&"/"!==r&&(s.pathname="/"===s.pathname?r:H([r,s.pathname])),(o.replace?n.replace:n.push)(s,o.state,o)}),[r,n,i,a,t])}()}function se(t,{relative:r}={}){let{matches:n}=e.useContext(te),{pathname:o}=oe(),a=JSON.stringify(I(n));return e.useMemo((()=>B(t,JSON.parse(a),o,"path"===r)),[t,a,o,r])}function ce(t,r,n,o){w(ne(),"useRoutes() may be used only in the context of a <Router> component.");let a,{navigator:i,static:l}=e.useContext(Z),{matches:s}=e.useContext(te),c=s[s.length-1],u=c?c.params:{},p=c?c.pathname:"/",d=c?c.pathnameBase:"/",h=c&&c.route;{let e=h&&h.path||"";ye(p,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}a=oe();let f=a.pathname||"/",m=f;if("/"!==d){let e=d.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=!l&&n&&n.matches&&n.matches.length>0?n.matches:C(t,{pathname:m});x(h||null!=v,`No routes matched location "${a.pathname}${a.search}${a.hash}" `),x(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${a.pathname}${a.search}${a.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(t,r=[],n=null){if(null==t){if(!n)return null;if(n.errors)t=n.matches;else{if(0!==r.length||n.initialized||!(n.matches.length>0))return null;t=n.matches}}let o=t,a=n?.errors;if(null!=a){let e=o.findIndex((e=>e.route.id&&void 0!==a?.[e.route.id]));w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let i=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){i=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((t,s,c)=>{let u,p=!1,d=null,h=null;n&&(u=a&&s.route.id?a[s.route.id]:void 0,d=s.route.errorElement||pe,i&&(l<0&&0===c?(ye("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=s.route.hydrateFallbackElement||null)));let f=r.concat(o.slice(0,c+1)),m=()=>{let r;return r=u?d:p?h:s.route.Component?e.createElement(s.route.Component,null):s.route.element?s.route.element:t,e.createElement(he,{match:s,routeContext:{outlet:t,matches:f,isDataRoute:null!=n},children:r})};return n&&(s.route.ErrorBoundary||s.route.errorElement||0===c)?e.createElement(de,{location:n.location,revalidation:n.revalidation,component:d,error:u,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:H([d,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:H([d,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,o);return y}function ue(){let t=function(){let t=e.useContext(re),r=function(t){let r=e.useContext(G);return w(r,fe(t)),r}("useRouteError"),n=me("useRouteError");if(void 0!==t)return t;return r.errors?.[n]}(),r=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:i},"ErrorBoundary")," or"," ",e.createElement("code",{style:i},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:a},n):null,l)}e.createContext(null);var pe=e.createElement(ue,null),de=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(te.Provider,{value:this.props.routeContext},e.createElement(re.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function he({routeContext:t,match:r,children:n}){let o=e.useContext(q);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(te.Provider,{value:t},n)}function fe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function me(t){let r=function(t){let r=e.useContext(te);return w(r,fe(t)),r}(t),n=r.matches[r.matches.length-1];return w(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}var ve={};function ye(e,t,r){t||ve[e]||(ve[e]=!0,x(!1,r))}function ge({basename:t="/",children:r=null,location:n,navigationType:o="POP",navigator:a,static:i=!1}){w(!ne(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),s=e.useMemo((()=>({basename:l,navigator:a,static:i,future:{}})),[l,a,i]);"string"==typeof n&&(n=E(n));let{pathname:c="/",search:u="",hash:p="",state:d=null,key:h="default"}=n,f=e.useMemo((()=>{let e=W(c,l);return null==e?null:{location:{pathname:e,search:u,hash:p,state:d,key:h},navigationType:o}}),[l,c,u,p,d,h,o]);return x(null!=f,`<Router basename="${l}"> is not able to match the URL "${c}${u}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==f?null:e.createElement(Z.Provider,{value:s},e.createElement(ee.Provider,{children:r,value:f}))}e.memo((function({routes:e,future:t,state:r}){return ce(e,0,r,t)}));var be="get",we="application/x-www-form-urlencoded";function xe(e){return null!=e&&"string"==typeof e.tagName}var ke=null;var $e=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Se(e){return null==e||$e.has(e)?e:(x(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${we}"`),null)}function Ee(e,t){let r,n,o,a,i;if(xe(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?W(i,t):null,r=e.getAttribute("method")||be,o=Se(e.getAttribute("enctype"))||we,a=new FormData(e)}else if(function(e){return xe(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return xe(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?W(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||be,o=Se(e.getAttribute("formenctype"))||Se(i.getAttribute("enctype"))||we,a=new FormData(i,e),!function(){if(null===ke)try{new FormData(document.createElement("form"),0),ke=!1}catch(e){ke=!0}return ke}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(xe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=be,n=null,o=we,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function Ce(e,t){if(!1===e||null==e)throw new Error(t)}function Re(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function _e(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw t;return window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Re).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function Oe(e,t,r,n,o,a){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter(((e,t)=>i(e,t)||l(e,t))):"data"===a?t.filter(((t,a)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,a)||l(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function je(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Pe=e.createContext(void 0);function Te(){let t=e.useContext(Pe);return Ce(t,"You must render this element inside a <HydratedRouter> element"),t}function Le(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ne({page:t,...r}){let{router:n}=function(){let t=e.useContext(q);return Ce(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}(),o=e.useMemo((()=>C(n.routes,t,n.basename)),[n.routes,t,n.basename]);return o?e.createElement(De,{page:t,matches:o,...r}):null}function De({page:t,matches:r,...n}){let o=oe(),{manifest:a,routeModules:i}=Te(),{loaderData:l,matches:s}=function(){let t=e.useContext(G);return Ce(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}(),c=e.useMemo((()=>Oe(t,r,s,a,o,"data")),[t,r,s,a,o]),u=e.useMemo((()=>Oe(t,r,s,a,o,"assets")),[t,r,s,a,o]),p=e.useMemo((()=>{if(t===o.pathname+o.search+o.hash)return[];let e=new Set,n=!1;if(r.forEach((t=>{let r=a.routes[t.route.id];r&&r.hasLoader&&(!c.some((e=>e.route.id===t.route.id))&&t.route.id in l&&i[t.route.id]?.shouldRevalidate||r.hasClientLoader?n=!0:e.add(t.route.id))})),0===e.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(t);return n&&e.size>0&&s.searchParams.set("_routes",r.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[s.pathname+s.search]}),[l,o,a,c,r,t,i]),d=e.useMemo((()=>je(u,a)),[u,a]),h=function(t){let{manifest:r,routeModules:n}=Te(),[o,a]=e.useState([]);return e.useEffect((()=>{let e=!1;return _e(t,r,n).then((t=>{e||a(t)})),()=>{e=!0}}),[t,r,n]),o}(u);return e.createElement(e.Fragment,null,p.map((t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...n}))),d.map((t=>e.createElement("link",{key:t,rel:"modulepreload",href:t,...n}))),h.map((({key:t,link:r})=>e.createElement("link",{key:t,...r}))))}function Ae(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Pe.displayName="FrameworkContext";var Fe="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Fe&&(window.__reactRouterVersion="7.1.5")}catch(e){}function Me({basename:t,children:r,window:n}){let o=e.useRef();null==o.current&&(o.current=b({window:n,v5Compat:!0}));let a=o.current,[i,l]=e.useState({action:a.action,location:a.location}),s=e.useCallback((t=>{e.startTransition((()=>l(t)))}),[l]);return e.useLayoutEffect((()=>a.listen(s)),[a,s]),e.createElement(ge,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}var Ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,We=e.forwardRef((function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:a,replace:i,state:l,target:s,to:c,preventScrollReset:u,viewTransition:p,...d},h){let f,{basename:m}=e.useContext(Z),v="string"==typeof c&&Ue.test(c),y=!1;if("string"==typeof c&&v&&(f=c,Fe))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=W(t.pathname,m);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:y=!0}catch(e){x(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(t,{relative:r}={}){w(ne(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=e.useContext(Z),{hash:a,pathname:i,search:l}=se(t,{relative:r}),s=i;return"/"!==n&&(s="/"===i?n:H([n,i])),o.createHref({pathname:s,search:l,hash:a})}(c,{relative:o}),[b,k,$]=function(t,r){let n=e.useContext(Pe),[o,a]=e.useState(!1),[i,l]=e.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:p,onTouchStart:d}=r,h=e.useRef(null);e.useEffect((()=>{if("render"===t&&l(!0),"viewport"===t){let e=new IntersectionObserver((e=>{e.forEach((e=>{l(e.isIntersecting)}))}),{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}}),[t]),e.useEffect((()=>{if(o){let e=setTimeout((()=>{l(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let f=()=>{a(!0)},m=()=>{a(!1),l(!1)};return n?"intent"!==t?[i,h,{}]:[i,h,{onFocus:Le(s,f),onBlur:Le(c,m),onMouseEnter:Le(u,f),onMouseLeave:Le(p,m),onTouchStart:Le(d,f)}]:[!1,h,{}]}(n,d),E=function(t,{target:r,replace:n,state:o,preventScrollReset:a,relative:i,viewTransition:l}={}){let s=le(),c=oe(),u=se(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let r=void 0!==n?n:S(c)===S(u);s(t,{replace:r,state:o,preventScrollReset:a,relative:i,viewTransition:l})}}),[c,s,u,n,o,r,t,a,i,l])}(c,{replace:i,state:l,target:s,preventScrollReset:u,relative:o,viewTransition:p});let C=e.createElement("a",{...d,...$,href:f||g,onClick:y||a?t:function(e){t&&t(e),e.defaultPrevented||E(e)},ref:Ae(h,k),target:s,"data-discover":v||"render"!==r?void 0:"true"});return b&&!v?e.createElement(e.Fragment,null,C,e.createElement(Ne,{page:g})):C}));function ze(t){let r=e.useContext(q);return w(r,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),r}We.displayName="Link",e.forwardRef((function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:a,to:i,viewTransition:l,children:s,...c},u){let p=se(i,{relative:c.relative}),d=oe(),h=e.useContext(G),{navigator:f,basename:m}=e.useContext(Z),v=null!=h&&function(t,r={}){let n=e.useContext(Q);w(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ze("useViewTransitionState"),a=se(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=W(n.currentLocation.pathname,o)||n.currentLocation.pathname,l=W(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=M(a.pathname,l)||null!=M(a.pathname,i)}(p)&&!0===l,y=f.encodeLocation?f.encodeLocation(p).pathname:p.pathname,g=d.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(g=g.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=W(b,m)||b);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,$=g===y||!o&&g.startsWith(y)&&"/"===g.charAt(x),S=null!=b&&(b===y||!o&&b.startsWith(y)&&"/"===b.charAt(y.length)),E={isActive:$,isPending:S,isTransitioning:v},C=$?t:void 0;k="function"==typeof n?n(E):[n,$?"active":null,S?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let R="function"==typeof a?a(E):a;return e.createElement(We,{...c,"aria-current":C,className:k,ref:u,style:R,to:i,viewTransition:l},"function"==typeof s?s(E):s)})).displayName="NavLink",e.forwardRef((({discover:t="render",fetcherKey:r,navigate:n,reloadDocument:o,replace:a,state:i,method:l=be,action:s,onSubmit:c,relative:u,preventScrollReset:p,viewTransition:d,...h},f)=>{let m=function(){let{router:t}=ze("useSubmit"),{basename:r}=e.useContext(Z),n=me("useRouteId");return e.useCallback((async(e,o={})=>{let{action:a,method:i,encType:l,formData:s,body:c}=Ee(e,r);if(!1===o.navigate){let e=o.fetcherKey||Be();await t.fetch(e,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await t.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[t,r,n])}(),v=function(t,{relative:r}={}){let{basename:n}=e.useContext(Z),o=e.useContext(te);w(o,"useFormAction must be used inside a RouteContext");let[a]=o.matches.slice(-1),i={...se(t||".",{relative:r})},l=oe();if(null==t){i.search=l.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}t&&"."!==t||!a.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(i.pathname="/"===i.pathname?n:H([n,i.pathname]));return S(i)}(s,{relative:u}),y="get"===l.toLowerCase()?"get":"post",g="string"==typeof s&&Ue.test(s);return e.createElement("form",{ref:f,method:y,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,o=t?.getAttribute("formmethod")||l;m(t||e.currentTarget,{fetcherKey:r,method:o,navigate:n,replace:a,state:i,relative:u,preventScrollReset:p,viewTransition:d})},...h,"data-discover":g||"render"!==t?void 0:"true"})})).displayName="Form";var Ie=0,Be=()=>`__${String(++Ie)}__`;new TextEncoder,n`
|
|
35
|
+
var w="popstate";function x(e={}){return function(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,l="POP",s=null,c=u();null==c&&(c=0,i.replaceState({...i.state,idx:c},""));function u(){return(i.state||{idx:null}).idx}function p(){l="POP";let e=u(),t=null==e?null:e-c;c=e,s&&s({action:l,location:m.location,delta:t})}function d(e,t){l="PUSH";let r=C(m.location,e,t);c=u()+1;let n=S(r,c),p=m.createHref(r);try{i.pushState(n,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}a&&s&&s({action:l,location:m.location,delta:1})}function h(e,t){l="REPLACE";let r=C(m.location,e,t);c=u();let n=S(r,c),o=m.createHref(r);i.replaceState(n,"",o),a&&s&&s({action:l,location:m.location,delta:0})}function f(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:E(e);return r=r.replace(/ $/,"%20"),$(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return l},get location(){return e(o,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(w,p),s=e,()=>{o.removeEventListener(w,p),s=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:d,replace:h,go:e=>i.go(e)};return m}((function(e,t){let{pathname:r,search:n,hash:o}=e.location;return C("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:E(t)}),0,e)}function $(e,t){if(!1===e||null==e)throw new Error(t)}function k(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function S(e,t){return{usr:e.state,key:e.key,idx:t}}function C(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?R(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function E({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function R(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function O(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?R(t):t,a=I(o.pathname||"/",r);if(null==a)return null;let i=_(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let l=null;for(let e=0;null==l&&e<i.length;++e){let t=B(a);l=M(i[e],t,n)}return l}(e,t,r,!1)}function _(e,t=[],r=[],n=""){let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&($(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let l=J([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&($(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),_(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:U(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of j(e.path))o(e,t,r);else o(e,t)})),t}function j(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=j(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}var P=/^:[\w-]+$/,L=3,T=2,N=1,D=10,A=-2,F=e=>"*"===e;function U(e,t){let r=e.split("/"),n=r.length;return r.some(F)&&(n+=A),t&&(n+=T),r.filter((e=>!F(e))).reduce(((e,t)=>e+(P.test(t)?L:""===t?N:D)),n)}function M(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",u=W({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!u&&s&&r&&!n[n.length-1].route.index&&(u=W({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:J([a,u.pathname]),pathnameBase:Y(J([a,u.pathnameBase])),route:p}),"/"!==u.pathnameBase&&(a=J([a,u.pathnameBase]))}return i}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){k("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function B(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return k(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function z(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function H(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function K(e,t,r,n=!1){let o;"string"==typeof e?o=R(e):(o={...e},$(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),$(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),$(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?R(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:V(n),hash:X(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}var J=e=>e.join("/").replace(/\/\/+/g,"/"),Y=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),V=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",X=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var q=["POST","PUT","PATCH","DELETE"];new Set(q);var G=["GET",...q];new Set(G);var Q=e.createContext(null);Q.displayName="DataRouter";var Z=e.createContext(null);Z.displayName="DataRouterState";var ee=e.createContext({isTransitioning:!1});ee.displayName="ViewTransition",e.createContext(new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var te=e.createContext(null);te.displayName="Navigation";var re=e.createContext(null);re.displayName="Location";var ne=e.createContext({outlet:null,matches:[],isDataRoute:!1});ne.displayName="Route";var oe=e.createContext(null);function ae(){return null!=e.useContext(re)}function ie(){return $(ae(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(re).location}oe.displayName="RouteError";var le="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function se(t){e.useContext(te).static||e.useLayoutEffect(t)}function ce(){let{isDataRoute:t}=e.useContext(ne);return t?function(){let{router:t}=function(t){let r=e.useContext(Q);return $(r,ve(t)),r}("useNavigate"),r=ye("useNavigate"),n=e.useRef(!1);return se((()=>{n.current=!0})),e.useCallback((async(e,o={})=>{k(n.current,le),n.current&&("number"==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,...o}))}),[t,r])}():function(){$(ae(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(Q),{basename:r,navigator:n}=e.useContext(te),{matches:o}=e.useContext(ne),{pathname:a}=ie(),i=JSON.stringify(H(o)),l=e.useRef(!1);return se((()=>{l.current=!0})),e.useCallback(((e,o={})=>{if(k(l.current,le),!l.current)return;if("number"==typeof e)return void n.go(e);let s=K(e,JSON.parse(i),a,"path"===o.relative);null==t&&"/"!==r&&(s.pathname="/"===s.pathname?r:J([r,s.pathname])),(o.replace?n.replace:n.push)(s,o.state,o)}),[r,n,i,a,t])}()}function ue(t,{relative:r}={}){let{matches:n}=e.useContext(ne),{pathname:o}=ie(),a=JSON.stringify(H(n));return e.useMemo((()=>K(t,JSON.parse(a),o,"path"===r)),[t,a,o,r])}function pe(t,r,n,o){$(ae(),"useRoutes() may be used only in the context of a <Router> component.");let a,{navigator:i,static:l}=e.useContext(te),{matches:s}=e.useContext(ne),c=s[s.length-1],u=c?c.params:{},p=c?c.pathname:"/",d=c?c.pathnameBase:"/",h=c&&c.route;{let e=h&&h.path||"";be(p,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}a=ie();let f=a.pathname||"/",m=f;if("/"!==d){let e=d.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=!l&&n&&n.matches&&n.matches.length>0?n.matches:O(t,{pathname:m});k(h||null!=v,`No routes matched location "${a.pathname}${a.search}${a.hash}" `),k(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${a.pathname}${a.search}${a.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(t,r=[],n=null){if(null==t){if(!n)return null;if(n.errors)t=n.matches;else{if(0!==r.length||n.initialized||!(n.matches.length>0))return null;t=n.matches}}let o=t,a=n?.errors;if(null!=a){let e=o.findIndex((e=>e.route.id&&void 0!==a?.[e.route.id]));$(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let i=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){i=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((t,s,c)=>{let u,p=!1,d=null,h=null;n&&(u=a&&s.route.id?a[s.route.id]:void 0,d=s.route.errorElement||he,i&&(l<0&&0===c?(be("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=s.route.hydrateFallbackElement||null)));let f=r.concat(o.slice(0,c+1)),m=()=>{let r;return r=u?d:p?h:s.route.Component?e.createElement(s.route.Component,null):s.route.element?s.route.element:t,e.createElement(me,{match:s,routeContext:{outlet:t,matches:f,isDataRoute:null!=n},children:r})};return n&&(s.route.ErrorBoundary||s.route.errorElement||0===c)?e.createElement(fe,{location:n.location,revalidation:n.revalidation,component:d,error:u,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:J([d,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:J([d,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,o);return y}function de(){let t=function(){let t=e.useContext(oe),r=function(t){let r=e.useContext(Z);return $(r,ve(t)),r}("useRouteError"),n=ye("useRouteError");if(void 0!==t)return t;return r.errors?.[n]}(),r=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:i},"ErrorBoundary")," or"," ",e.createElement("code",{style:i},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:a},n):null,l)}e.createContext(null);var he=e.createElement(de,null),fe=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(ne.Provider,{value:this.props.routeContext},e.createElement(oe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function me({routeContext:t,match:r,children:n}){let o=e.useContext(Q);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(ne.Provider,{value:t},n)}function ve(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ye(t){let r=function(t){let r=e.useContext(ne);return $(r,ve(t)),r}(t),n=r.matches[r.matches.length-1];return $(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}var ge={};function be(e,t,r){t||ge[e]||(ge[e]=!0,k(!1,r))}function we({basename:t="/",children:r=null,location:n,navigationType:o="POP",navigator:a,static:i=!1}){$(!ae(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),s=e.useMemo((()=>({basename:l,navigator:a,static:i,future:{}})),[l,a,i]);"string"==typeof n&&(n=R(n));let{pathname:c="/",search:u="",hash:p="",state:d=null,key:h="default"}=n,f=e.useMemo((()=>{let e=I(c,l);return null==e?null:{location:{pathname:e,search:u,hash:p,state:d,key:h},navigationType:o}}),[l,c,u,p,d,h,o]);return k(null!=f,`<Router basename="${l}"> is not able to match the URL "${c}${u}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==f?null:e.createElement(te.Provider,{value:s},e.createElement(re.Provider,{children:r,value:f}))}e.memo((function({routes:e,future:t,state:r}){return pe(e,0,r,t)}));var xe="get",$e="application/x-www-form-urlencoded";function ke(e){return null!=e&&"string"==typeof e.tagName}var Se=null;var Ce=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ee(e){return null==e||Ce.has(e)?e:(k(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$e}"`),null)}function Re(e,t){let r,n,o,a,i;if(ke(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?I(i,t):null,r=e.getAttribute("method")||xe,o=Ee(e.getAttribute("enctype"))||$e,a=new FormData(e)}else if(function(e){return ke(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ke(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?I(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||xe,o=Ee(e.getAttribute("formenctype"))||Ee(i.getAttribute("enctype"))||$e,a=new FormData(i,e),!function(){if(null===Se)try{new FormData(document.createElement("form"),0),Se=!1}catch(e){Se=!0}return Se}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(ke(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=xe,n=null,o=$e,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function Oe(e,t){if(!1===e||null==e)throw new Error(t)}function _e(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function je(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw t;return window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(_e).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function Pe(e,t,r,n,o,a){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter(((e,t)=>i(e,t)||l(e,t))):"data"===a?t.filter(((t,a)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,a)||l(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Le(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Te=e.createContext(void 0);function Ne(){let t=e.useContext(Te);return Oe(t,"You must render this element inside a <HydratedRouter> element"),t}function De(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ae({page:t,...r}){let{router:n}=function(){let t=e.useContext(Q);return Oe(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}(),o=e.useMemo((()=>O(n.routes,t,n.basename)),[n.routes,t,n.basename]);return o?e.createElement(Fe,{page:t,matches:o,...r}):null}function Fe({page:t,matches:r,...n}){let o=ie(),{manifest:a,routeModules:i}=Ne(),{loaderData:l,matches:s}=function(){let t=e.useContext(Z);return Oe(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}(),c=e.useMemo((()=>Pe(t,r,s,a,o,"data")),[t,r,s,a,o]),u=e.useMemo((()=>Pe(t,r,s,a,o,"assets")),[t,r,s,a,o]),p=e.useMemo((()=>{if(t===o.pathname+o.search+o.hash)return[];let e=new Set,n=!1;if(r.forEach((t=>{let r=a.routes[t.route.id];r&&r.hasLoader&&(!c.some((e=>e.route.id===t.route.id))&&t.route.id in l&&i[t.route.id]?.shouldRevalidate||r.hasClientLoader?n=!0:e.add(t.route.id))})),0===e.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(t);return n&&e.size>0&&s.searchParams.set("_routes",r.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[s.pathname+s.search]}),[l,o,a,c,r,t,i]),d=e.useMemo((()=>Le(u,a)),[u,a]),h=function(t){let{manifest:r,routeModules:n}=Ne(),[o,a]=e.useState([]);return e.useEffect((()=>{let e=!1;return je(t,r,n).then((t=>{e||a(t)})),()=>{e=!0}}),[t,r,n]),o}(u);return e.createElement(e.Fragment,null,p.map((t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...n}))),d.map((t=>e.createElement("link",{key:t,rel:"modulepreload",href:t,...n}))),h.map((({key:t,link:r})=>e.createElement("link",{key:t,...r}))))}function Ue(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Te.displayName="FrameworkContext";var Me="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Me&&(window.__reactRouterVersion="7.1.5")}catch(e){}function We({basename:t,children:r,window:n}){let o=e.useRef();null==o.current&&(o.current=x({window:n,v5Compat:!0}));let a=o.current,[i,l]=e.useState({action:a.action,location:a.location}),s=e.useCallback((t=>{e.startTransition((()=>l(t)))}),[l]);return e.useLayoutEffect((()=>a.listen(s)),[a,s]),e.createElement(we,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}var Be=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ie=e.forwardRef((function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:a,replace:i,state:l,target:s,to:c,preventScrollReset:u,viewTransition:p,...d},h){let f,{basename:m}=e.useContext(te),v="string"==typeof c&&Be.test(c),y=!1;if("string"==typeof c&&v&&(f=c,Me))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=I(t.pathname,m);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:y=!0}catch(e){k(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(t,{relative:r}={}){$(ae(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=e.useContext(te),{hash:a,pathname:i,search:l}=ue(t,{relative:r}),s=i;return"/"!==n&&(s="/"===i?n:J([n,i])),o.createHref({pathname:s,search:l,hash:a})}(c,{relative:o}),[b,w,x]=function(t,r){let n=e.useContext(Te),[o,a]=e.useState(!1),[i,l]=e.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:p,onTouchStart:d}=r,h=e.useRef(null);e.useEffect((()=>{if("render"===t&&l(!0),"viewport"===t){let e=new IntersectionObserver((e=>{e.forEach((e=>{l(e.isIntersecting)}))}),{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}}),[t]),e.useEffect((()=>{if(o){let e=setTimeout((()=>{l(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let f=()=>{a(!0)},m=()=>{a(!1),l(!1)};return n?"intent"!==t?[i,h,{}]:[i,h,{onFocus:De(s,f),onBlur:De(c,m),onMouseEnter:De(u,f),onMouseLeave:De(p,m),onTouchStart:De(d,f)}]:[!1,h,{}]}(n,d),S=function(t,{target:r,replace:n,state:o,preventScrollReset:a,relative:i,viewTransition:l}={}){let s=ce(),c=ie(),u=ue(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let r=void 0!==n?n:E(c)===E(u);s(t,{replace:r,state:o,preventScrollReset:a,relative:i,viewTransition:l})}}),[c,s,u,n,o,r,t,a,i,l])}(c,{replace:i,state:l,target:s,preventScrollReset:u,relative:o,viewTransition:p});let C=e.createElement("a",{...d,...x,href:f||g,onClick:y||a?t:function(e){t&&t(e),e.defaultPrevented||S(e)},ref:Ue(h,w),target:s,"data-discover":v||"render"!==r?void 0:"true"});return b&&!v?e.createElement(e.Fragment,null,C,e.createElement(Ae,{page:g})):C}));function ze(t){let r=e.useContext(Q);return $(r,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),r}Ie.displayName="Link",e.forwardRef((function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:a,to:i,viewTransition:l,children:s,...c},u){let p=ue(i,{relative:c.relative}),d=ie(),h=e.useContext(Z),{navigator:f,basename:m}=e.useContext(te),v=null!=h&&function(t,r={}){let n=e.useContext(ee);$(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ze("useViewTransitionState"),a=ue(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=I(n.currentLocation.pathname,o)||n.currentLocation.pathname,l=I(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=W(a.pathname,l)||null!=W(a.pathname,i)}(p)&&!0===l,y=f.encodeLocation?f.encodeLocation(p).pathname:p.pathname,g=d.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(g=g.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=I(b,m)||b);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,k=g===y||!o&&g.startsWith(y)&&"/"===g.charAt(w),S=null!=b&&(b===y||!o&&b.startsWith(y)&&"/"===b.charAt(y.length)),C={isActive:k,isPending:S,isTransitioning:v},E=k?t:void 0;x="function"==typeof n?n(C):[n,k?"active":null,S?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let R="function"==typeof a?a(C):a;return e.createElement(Ie,{...c,"aria-current":E,className:x,ref:u,style:R,to:i,viewTransition:l},"function"==typeof s?s(C):s)})).displayName="NavLink",e.forwardRef((({discover:t="render",fetcherKey:r,navigate:n,reloadDocument:o,replace:a,state:i,method:l=xe,action:s,onSubmit:c,relative:u,preventScrollReset:p,viewTransition:d,...h},f)=>{let m=function(){let{router:t}=ze("useSubmit"),{basename:r}=e.useContext(te),n=ye("useRouteId");return e.useCallback((async(e,o={})=>{let{action:a,method:i,encType:l,formData:s,body:c}=Re(e,r);if(!1===o.navigate){let e=o.fetcherKey||Ke();await t.fetch(e,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await t.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[t,r,n])}(),v=function(t,{relative:r}={}){let{basename:n}=e.useContext(te),o=e.useContext(ne);$(o,"useFormAction must be used inside a RouteContext");let[a]=o.matches.slice(-1),i={...ue(t||".",{relative:r})},l=ie();if(null==t){i.search=l.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}t&&"."!==t||!a.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(i.pathname="/"===i.pathname?n:J([n,i.pathname]));return E(i)}(s,{relative:u}),y="get"===l.toLowerCase()?"get":"post",g="string"==typeof s&&Be.test(s);return e.createElement("form",{ref:f,method:y,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,o=t?.getAttribute("formmethod")||l;m(t||e.currentTarget,{fetcherKey:r,method:o,navigate:n,replace:a,state:i,relative:u,preventScrollReset:p,viewTransition:d})},...h,"data-discover":g||"render"!==t?void 0:"true"})})).displayName="Form";var He=0,Ke=()=>`__${String(++He)}__`;new TextEncoder,a`
|
|
36
36
|
list-style: none;
|
|
37
37
|
padding: 0;
|
|
38
38
|
margin: 0;
|
|
39
|
-
`,
|
|
39
|
+
`,a`
|
|
40
40
|
width: 100%;
|
|
41
|
-
`,
|
|
41
|
+
`,a`
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
text-overflow: ellipsis;
|
|
44
44
|
white-space: nowrap;
|
|
45
45
|
display: block;
|
|
46
46
|
max-width: 100%;
|
|
47
47
|
width: auto;
|
|
48
|
-
`;const
|
|
48
|
+
`;const Je=a`
|
|
49
49
|
display: -webkit-box !important;
|
|
50
50
|
-webkit-line-clamp: 2;
|
|
51
51
|
-webkit-box-orient: vertical;
|
|
@@ -54,7 +54,7 @@ var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=docum
|
|
|
54
54
|
overflow-wrap: anywhere;
|
|
55
55
|
word-break: break-all;
|
|
56
56
|
line-height: 16px;
|
|
57
|
-
`;
|
|
57
|
+
`;a`
|
|
58
58
|
display: -webkit-box !important;
|
|
59
59
|
-webkit-line-clamp: 3 !important;
|
|
60
60
|
-webkit-box-orient: vertical !important;
|
|
@@ -63,27 +63,27 @@ var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=docum
|
|
|
63
63
|
overflow-wrap: anywhere !important;
|
|
64
64
|
word-break: break-word !important;
|
|
65
65
|
line-height: 16px;
|
|
66
|
-
`,
|
|
66
|
+
`,a`
|
|
67
67
|
background-color: var(--pri-clr-bg);
|
|
68
68
|
box-shadow: var(--pri-shd-bx);
|
|
69
69
|
border-radius: var(--pri-rd);
|
|
70
70
|
border: 1px solid var(--lay-clr-ln);
|
|
71
|
-
`,
|
|
71
|
+
`,a`
|
|
72
72
|
background-color: var(--pri-clr-bg);
|
|
73
73
|
border: 1px solid var(--sec-clr-ln);
|
|
74
74
|
box-shadow: var(--sec-shd-bx);
|
|
75
75
|
border-radius: var(--sec-rd);
|
|
76
|
-
`,
|
|
76
|
+
`,a`
|
|
77
77
|
font-size: 12px;
|
|
78
78
|
font-weight: 600;
|
|
79
79
|
letter-spacing: 0.3px;
|
|
80
80
|
text-transform: capitalize;
|
|
81
|
-
`,
|
|
81
|
+
`,a`
|
|
82
82
|
color: var(--hd-clr);
|
|
83
83
|
font-weight: 600;
|
|
84
84
|
font-size: 13px;
|
|
85
85
|
text-transform: capitalize;
|
|
86
|
-
`;const
|
|
86
|
+
`;const Ye=a`
|
|
87
87
|
color: var(--pri-clr-lnk);
|
|
88
88
|
&,
|
|
89
89
|
&:hover {
|
|
@@ -92,7 +92,7 @@ var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=docum
|
|
|
92
92
|
&:hover {
|
|
93
93
|
color: var(--pri-clr-lnk__hvr);
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,Ve=a`
|
|
96
96
|
color: var(--pri-clr-lnk);
|
|
97
97
|
&,
|
|
98
98
|
&:hover {
|
|
@@ -101,7 +101,7 @@ var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=docum
|
|
|
101
101
|
&:hover {
|
|
102
102
|
color: var(--sec-clr-lnk__hvr);
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
104
|
+
`,Xe=a`
|
|
105
105
|
position: relative;
|
|
106
106
|
display: inline-grid;
|
|
107
107
|
padding: 0 16px;
|
|
@@ -115,17 +115,29 @@ var g="popstate";function b(e={}){return function(e,t,r,n={}){let{window:o=docum
|
|
|
115
115
|
&:hover {
|
|
116
116
|
text-decoration: none;
|
|
117
117
|
}
|
|
118
|
-
`,
|
|
118
|
+
`,qe=({mode:e,$elipsis:t,$activated:r,$shadow:n,disabled:o})=>{let a="";return"clear"===e?a+=Ye:"clearR"===e?a+=Ve:"blue"===e?a+="\n &, &:hover {\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n }\n ":"trans"===e?a+=Xe+"\n height: auto;\n padding: 0;\n opacity: 1;\n &, \n &:hover { \n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n } \n &:hover {\n opacity: .9; \n }\n ":"hover"===e?a+=Xe+"\n height: auto;\n width: max-content;\n padding: 3px 6px;\n position: relative;\n left: -6px;\n color: initial;\n grid-gap: 4px;\n &:hover { \n border-radius: var(--ter-rd);\n box-shadow: 1px 1px var(--pri-clr-ln);\n background-color: var(--mt-clr-bg__fc);\n text-decoration: none;\n }\n ":"whiteB"===e?a+=Xe+"\n color: var(--ter-clr);\n background-color: var(--cl-clr-bg);\n border: 1px solid var(--sec-clr-ln);\n &, \n &:hover { \n background-color: var(--cl-clr-bg__hvr);\n } \n ":"redB"===e?a+=Xe+"\n color: var(--act-clr);\n background-color: var(--act-clr-bg);\n &:hover {\n background-color: var(--act-clr-bg__hvr);\n } \n ":"greyB"===e&&(a+=Xe+"\n color: var(--act-clr);\n background-color: var(--mt-clr-bg__fc);\n &:hover {\n background-color: var(--cl-clr-bg__hvr);\n } \n "),r&&(a+="\n color: var(--sta-clr);\n font-weight: 400;\n ","clear"!==e&&"clearR"!==e||(a+="\n color: var(--pri-clr-lnk__act);\n font-weight: 600;\n ")),t&&(a+=`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n max-width: 100%;\n width: auto;\n ${Je}\n `),n&&(a+="\n box-shadow: var(--act-shd-bx);\n "),o&&(a+="\n color: #A9A9A9;\n opacity: 0.7;\n pointer-events: none;\n "),a},Ge=o(Ie)`
|
|
119
119
|
&._refHoverLink {
|
|
120
120
|
padding: 3px 0px 0px 6px;
|
|
121
121
|
position: relative;
|
|
122
122
|
top: -3px;
|
|
123
123
|
}
|
|
124
|
-
${
|
|
125
|
-
`,
|
|
126
|
-
${
|
|
127
|
-
`,
|
|
124
|
+
${qe}
|
|
125
|
+
`,Qe=o.a`
|
|
126
|
+
${qe}
|
|
127
|
+
`,Ze=o.span`
|
|
128
128
|
cursor:pointer;
|
|
129
|
-
${
|
|
130
|
-
`,
|
|
129
|
+
${qe}
|
|
130
|
+
`,et=e=>{var{children:t,mode:r,$activated:n,$elipsis:o,to:a,$shadow:l,disabled:s}=e,c=i(e,["children","mode","$activated","$elipsis","to","$shadow","disabled"]);return f.jsx(We,{children:f.jsx(Ge,Object.assign({className:"_refLink",to:a,mode:r,$activated:!!n,$elipsis:!!o,$shadow:!!l,disabled:!!s},c,{children:t}))})},tt=e=>{var{children:t,mode:r,$activated:n=!1,href:o,to:a,$elipsis:l=!1,$shadow:s=!1,disabled:c=!1}=e,u=i(e,["children","mode","$activated","href","to","$elipsis","$shadow","disabled"]);const{onClick:p}=u;return o?f.jsx(Qe,Object.assign({className:"_refLink",mode:r,$activated:!!n,$elipsis:!!l,$shadow:!!s,disabled:!!c,href:o},u,{children:t})):a?f.jsx(et,Object.assign({to:a,className:"_refLink",mode:r,$activated:n&&!0,$elipsis:!!l,$shadow:!!s,disabled:!!c},u,{children:t})):f.jsx(Ze,Object.assign({className:"_refLink",mode:r,$activated:!!n,$elipsis:!!l,$shadow:!!s,disabled:!!c,onClick:p},u,{children:t}))},rt=a`
|
|
131
|
+
border: 0;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
font-weight: 400;
|
|
134
|
+
color: var(--sec-clr);
|
|
135
|
+
background-color: var(--act-clr-bg);
|
|
136
|
+
`,nt=o.input`
|
|
137
|
+
&._refQuantitiyInput {
|
|
138
|
+
width: 55px;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
${({width:e,height:t,$iconLeft:r,$iconRight:n,$isError:o,mode:a,type:i})=>{let l="";return r&&(l+=" \n padding-left: 35px; \n "),n&&(l+=" \n padding-right: 35px; \n "),o&&(l+=" \n border:1px solid var(--err-clr-ln) !important; \n "),t&&(l+=` \n height: ${t}px\n max-height: ${t}px\n `),"search"===a&&(l+=' \n background-color: transparent;\n &, &:not([type="submit"]):focus, &:active, &:active:focus {\n border: 1px solid transparent !important;\n outline: none !important;\n box-shadow: none !important;\n }\n ',r&&(l+=" \n padding-left: 39px; \n ")),"transaction"===a&&(l+="\n padding-left: 45px;\n "),e&&(l+=` \n width: ${e}px \n `),"submit"===i&&(l+=rt),l}}
|
|
142
|
+
`,ot=e=>{var t,{mode:o,$isError:a,$iconLeft:l,$iconRight:s,reset:c,setReset:u,isForceUpdate:p,setForceUpdate:d,evChange:h,evBlur:m,isField:v,evChangeCustom:y,evEnter:g,evKeyUp:b}=e,w=i(e,["mode","$isError","$iconLeft","$iconRight","reset","setReset","isForceUpdate","setForceUpdate","evChange","evBlur","isField","evChangeCustom","evEnter","evKeyUp"]);const{type:x,name:$,defaultValue:k,defaultChecked:S}=w,C=null!==(t=null==k?void 0:k.toString())&&void 0!==t?t:"",[E,R]=r(C),[O,_]=r(S||!1);n((()=>{var e;if(p){const t=null!==(e=null==k?void 0:k.toString())&&void 0!==e?e:"";R(t),_(S||!1),d&&d(!1)}c&&(R(""),_(!1),u&&u(!1))}),[p,d,c,u,k,S,_,o]);const j=e=>{const t=e.target.value;R(t)};let P=Object.assign({},w);delete P.defaultValue,delete P.defaultChecked;const L=f.jsx(nt,Object.assign({mode:o,$isError:a,$iconLeft:l,$iconRight:s,checked:O,value:E,onChange:e=>{j(e),h&&h(e)},onBlur:e=>{j(e),(e=>{if(m&&m(e),v&&g&&g(e),v&&$){const t="number"===x?parseInt(e.target.value):e.target.value.trim();y&&y($,t)}})(e)},onKeyUp:e=>{b&&b(e),(e=>{"Enter"===e.key&&(e.preventDefault(),v&&g&&g(e))})(e)}},"number"===x&&{onKeyPress:e=>("number"===x&&(isNaN(Number(e.key))||void 0===e.key||""===e.key)&&e.preventDefault(),!0)},"number"===x&&{onPaste:e=>{const t=(e.clipboardData||window.clipboardData).getData("text").replace(/[^0-9]/g,"");e.preventDefault(),document.execCommand("insertText",!1,t)}},"number"===x&&{onFocus:e=>e.target.addEventListener("wheel",(function(e){e.preventDefault()}),{passive:!1})},"number"===x&&{min:"0"},P));return L};export{ot as InputComponent,tt as LinkComponent,y as TextComponent};
|
|
131
143
|
//# sourceMappingURL=index.mjs.map
|