@eliseubatista99/react-scaffold-core 0.1.62 → 0.1.63
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/hooks/useOnScreen/useOnScreen.d.ts +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +159 -148
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function useOnScreen(ref: RefObject<HTMLElement | null>): boolean;
|
package/dist/index.cjs.js
CHANGED
|
@@ -112,7 +112,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
112
112
|
box-sizing: border-box;
|
|
113
113
|
display: flex;
|
|
114
114
|
}
|
|
115
|
-
`,ia=({styles:e,content:t,settings:r,gap:i=15})=>{const[a,s]=Y.useState(1),f=Y.useRef(null),u=Y.useRef(null);var l={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const h=t.map((x,j)=>K.jsx(na,{ref:j===0?u:void 0,styles:{paddingRight:`${i}px`,overflow:"visible",...x.styles},"data-testid":"carousel-slide-item",children:x.content})),g=()=>{if(l.slidesToShow){s(l.slidesToShow);return}const x=(f.current?.offsetWidth||i+1)-i,j=u.current?.offsetWidth||1;let $=Math.floor(x/j);$<1?$=1:$>t.length&&($=t.length),console.debug("Slides to show > ",{container:x,slide:j,res:$}),s($)};return Y.useEffect(()=>{g()},[f,u]),K.jsx(ra,{ref:f,styles:{...e},children:h.length>0&&K.jsx(ai,{...l,slidesToShow:a,children:h})})},aa=({checked:e,onToggle:t,styles:r,checkedStyles:i,customCheckedRender:a,customUncheckedRender:s})=>{const f=e?{...r,...i}:{...r};return K.jsxs("div",{onClick:u=>{u.preventDefault(),u.stopPropagation(),t?.(!e)},style:{width:"25px",height:"25px",borderRadius:"4px",border:"1px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...f},children:[e&&a,!e&&s]})},oa=e=>Y.useEffect(e,[]),Jr=()=>{const[e,t]=Y.useState({}),[r,i]=Y.useState(!1);return Y.useEffect(()=>{const a=u=>{t({x:u.clientX,y:u.clientY})},s=u=>{i(!0)},f=u=>{i(!1)};return window.addEventListener("pointermove",a),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",f),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",f)}},[]),{pointerPosition:e,isPointerDown:r}},Zr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:i})=>{const a=Y.useRef(!1),s=Y.useRef(!1),{pointerPosition:f,isPointerDown:u}=Jr(),l=Y.useRef({isDragging:!1}),h=Y.useCallback(E=>{if(!e||!e.current||!l.current)return;const p={...l.current};return p.posY=E.y,p.posX=E.x,l.current.startPosX&&l.current.posX&&(p.distanceX=l.current.startPosX-l.current.posX),l.current.startPosY&&l.current.posY&&(p.distanceY=-(l.current.startPosY-l.current.posY)),p},[]),g=Y.useCallback(E=>{E.preventDefault(),E.stopPropagation(),l.current.isDragging=!0,l.current.startPosY=E.clientY,l.current.startPosX=E.clientX;const p=h({x:E.clientX,y:E.clientY});p&&(l.current=p,r?.(p))},[h]),x=Y.useCallback(E=>{l.current.isDragging=!1;const p=h(f);p&&(i?.(p),p.startPosX=void 0,p.startPosY=void 0,l.current=p)},[h,f]),j=Y.useCallback(E=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",l.current.isDragging),!l.current.isDragging)return;const p=h(f);console.debug("useDrag > onPointerMove > Drag Result >",p),p&&(t?.(p),l.current=p)},[h,f]),$=Y.useCallback(async()=>{if(!a.current){for(;!e?.current;)await new Promise(E=>setTimeout(E,300));a.current=!0,e.current.onpointerdown=g,e.current.style.touchAction="none"}},[e?.current,g]);Y.useEffect(()=>{$()},[$]),Y.useEffect(()=>{j()},[f]),Y.useEffect(()=>{u!==s.current&&(s.current=u,u||x())},[u,s.current])},sa=()=>{const e=(u,l)=>{let h=0,g=`${u}`;for(const x in l){h===0&&(g=`${g}?`);const j=l[x];h>0&&(g=`${g}&`),g=`${g}${x}=${j}`,h++}return g},t=async(u,l,h,g)=>await(await fetch(u,{method:l,headers:h,body:g})).json();return{get:async(u,l)=>{const h=e(u,l);return t(h,"GET")},post:async(u,l)=>t(u,"POST",{"Content-Type":"application/json"},JSON.stringify(l)),put:async(u,l)=>t(u,"PUT",{"Content-Type":"application/json"},JSON.stringify(l)),patch:async(u,l)=>t(u,"PATCH",{"Content-Type":"application/json"},JSON.stringify(l)),delete:async(u,l)=>{const h=e(u,l);return t(h,"DELETE")}}},Qr={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},
|
|
115
|
+
`,ia=({styles:e,content:t,settings:r,gap:i=15})=>{const[a,s]=Y.useState(1),f=Y.useRef(null),u=Y.useRef(null);var l={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const h=t.map((x,j)=>K.jsx(na,{ref:j===0?u:void 0,styles:{paddingRight:`${i}px`,overflow:"visible",...x.styles},"data-testid":"carousel-slide-item",children:x.content})),g=()=>{if(l.slidesToShow){s(l.slidesToShow);return}const x=(f.current?.offsetWidth||i+1)-i,j=u.current?.offsetWidth||1;let $=Math.floor(x/j);$<1?$=1:$>t.length&&($=t.length),console.debug("Slides to show > ",{container:x,slide:j,res:$}),s($)};return Y.useEffect(()=>{g()},[f,u]),K.jsx(ra,{ref:f,styles:{...e},children:h.length>0&&K.jsx(ai,{...l,slidesToShow:a,children:h})})},aa=({checked:e,onToggle:t,styles:r,checkedStyles:i,customCheckedRender:a,customUncheckedRender:s})=>{const f=e?{...r,...i}:{...r};return K.jsxs("div",{onClick:u=>{u.preventDefault(),u.stopPropagation(),t?.(!e)},style:{width:"25px",height:"25px",borderRadius:"4px",border:"1px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...f},children:[e&&a,!e&&s]})},oa=e=>Y.useEffect(e,[]),Jr=()=>{const[e,t]=Y.useState({}),[r,i]=Y.useState(!1);return Y.useEffect(()=>{const a=u=>{t({x:u.clientX,y:u.clientY})},s=u=>{i(!0)},f=u=>{i(!1)};return window.addEventListener("pointermove",a),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",f),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",f)}},[]),{pointerPosition:e,isPointerDown:r}},Zr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:i})=>{const a=Y.useRef(!1),s=Y.useRef(!1),{pointerPosition:f,isPointerDown:u}=Jr(),l=Y.useRef({isDragging:!1}),h=Y.useCallback(E=>{if(!e||!e.current||!l.current)return;const p={...l.current};return p.posY=E.y,p.posX=E.x,l.current.startPosX&&l.current.posX&&(p.distanceX=l.current.startPosX-l.current.posX),l.current.startPosY&&l.current.posY&&(p.distanceY=-(l.current.startPosY-l.current.posY)),p},[]),g=Y.useCallback(E=>{E.preventDefault(),E.stopPropagation(),l.current.isDragging=!0,l.current.startPosY=E.clientY,l.current.startPosX=E.clientX;const p=h({x:E.clientX,y:E.clientY});p&&(l.current=p,r?.(p))},[h]),x=Y.useCallback(E=>{l.current.isDragging=!1;const p=h(f);p&&(i?.(p),p.startPosX=void 0,p.startPosY=void 0,l.current=p)},[h,f]),j=Y.useCallback(E=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",l.current.isDragging),!l.current.isDragging)return;const p=h(f);console.debug("useDrag > onPointerMove > Drag Result >",p),p&&(t?.(p),l.current=p)},[h,f]),$=Y.useCallback(async()=>{if(!a.current){for(;!e?.current;)await new Promise(E=>setTimeout(E,300));a.current=!0,e.current.onpointerdown=g,e.current.style.touchAction="none"}},[e?.current,g]);Y.useEffect(()=>{$()},[$]),Y.useEffect(()=>{j()},[f]),Y.useEffect(()=>{u!==s.current&&(s.current=u,u||x())},[u,s.current])},sa=()=>{const e=(u,l)=>{let h=0,g=`${u}`;for(const x in l){h===0&&(g=`${g}?`);const j=l[x];h>0&&(g=`${g}&`),g=`${g}${x}=${j}`,h++}return g},t=async(u,l,h,g)=>await(await fetch(u,{method:l,headers:h,body:g})).json();return{get:async(u,l)=>{const h=e(u,l);return t(h,"GET")},post:async(u,l)=>t(u,"POST",{"Content-Type":"application/json"},JSON.stringify(l)),put:async(u,l)=>t(u,"PUT",{"Content-Type":"application/json"},JSON.stringify(l)),patch:async(u,l)=>t(u,"PATCH",{"Content-Type":"application/json"},JSON.stringify(l)),delete:async(u,l)=>{const h=e(u,l);return t(h,"DELETE")}}};function la(e){const[t,r]=Y.useState(!1),i=Y.useMemo(()=>new IntersectionObserver(([a])=>r(a.isIntersecting)),[]);return Y.useEffect(()=>(e?.current&&i.observe(e?.current),()=>i.disconnect()),[e,i.disconnect,i.observe]),t}const Qr={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},ua=e=>{const t={...Qr,...e?.breakpointConfiguration},[r,i]=Y.useState(Cr(t)),a=()=>{i(Cr(t))};return Y.useEffect(()=>(window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}),[]),Y.useMemo(()=>r,[r])},ca=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",fa=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",Cr=e=>{const t=window.innerWidth,r=window.innerHeight,i=ca(t,e),a=fa(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:i,currentSize:a}},da=e=>{const t=e.translations,r=e.language,i=(s,f)=>{if(!s)return;let u=s[r];if(u)return f&&Object.keys(f).forEach(l=>{const h=f[l];u=u.replaceAll(`{{${l}}}`,`${h}`)}),u};return{t:(s,f)=>{if(t[s]){const u=i(t[s],f);return u??s}return s},getTranslation:i}};var Ue={},Pr;function ha(){if(Pr)return Ue;Pr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parse=f,Ue.serialize=h;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,i=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,s=(()=>{const j=function(){};return j.prototype=Object.create(null),j})();function f(j,$){const E=new s,p=j.length;if(p<2)return E;const I=$?.decode||g;let O=0;do{const F=j.indexOf("=",O);if(F===-1)break;const U=j.indexOf(";",O),V=U===-1?p:U;if(F>V){O=j.lastIndexOf(";",F-1)+1;continue}const v=u(j,O,F),b=l(j,F,v),w=j.slice(v,b);if(E[w]===void 0){let P=u(j,F+1,V),y=l(j,V,P);const d=I(j.slice(P,y));E[w]=d}O=V+1}while(O<p);return E}function u(j,$,E){do{const p=j.charCodeAt($);if(p!==32&&p!==9)return $}while(++$<E);return E}function l(j,$,E){for(;$>E;){const p=j.charCodeAt(--$);if(p!==32&&p!==9)return $+1}return E}function h(j,$,E){const p=E?.encode||encodeURIComponent;if(!e.test(j))throw new TypeError(`argument name is invalid: ${j}`);const I=p($);if(!t.test(I))throw new TypeError(`argument val is invalid: ${$}`);let O=j+"="+I;if(!E)return O;if(E.maxAge!==void 0){if(!Number.isInteger(E.maxAge))throw new TypeError(`option maxAge is invalid: ${E.maxAge}`);O+="; Max-Age="+E.maxAge}if(E.domain){if(!r.test(E.domain))throw new TypeError(`option domain is invalid: ${E.domain}`);O+="; Domain="+E.domain}if(E.path){if(!i.test(E.path))throw new TypeError(`option path is invalid: ${E.path}`);O+="; Path="+E.path}if(E.expires){if(!x(E.expires)||!Number.isFinite(E.expires.valueOf()))throw new TypeError(`option expires is invalid: ${E.expires}`);O+="; Expires="+E.expires.toUTCString()}if(E.httpOnly&&(O+="; HttpOnly"),E.secure&&(O+="; Secure"),E.partitioned&&(O+="; Partitioned"),E.priority)switch(typeof E.priority=="string"?E.priority.toLowerCase():void 0){case"low":O+="; Priority=Low";break;case"medium":O+="; Priority=Medium";break;case"high":O+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${E.priority}`)}if(E.sameSite)switch(typeof E.sameSite=="string"?E.sameSite.toLowerCase():E.sameSite){case!0:case"strict":O+="; SameSite=Strict";break;case"lax":O+="; SameSite=Lax";break;case"none":O+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${E.sameSite}`)}return O}function g(j){if(j.indexOf("%")===-1)return j;try{return decodeURIComponent(j)}catch{return j}}function x(j){return a.call(j)==="[object Date]"}return Ue}ha();/**
|
|
116
116
|
* react-router v7.6.3
|
|
117
117
|
*
|
|
118
118
|
* Copyright (c) Remix Software Inc.
|
|
@@ -121,9 +121,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
121
121
|
* LICENSE.md file in the root directory of this source tree.
|
|
122
122
|
*
|
|
123
123
|
* @license MIT
|
|
124
|
-
*/var Er="popstate";function ha(e={}){function t(i,a){let{pathname:s,search:f,hash:u}=i.location;return Nt("",{pathname:s,search:f,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(i,a){return typeof a=="string"?a:Xe(a)}return ma(t,r,null,e)}function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pa(){return Math.random().toString(36).substring(2,10)}function Rr(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?De(t):t,state:r,key:t&&t.key||i||pa()}}function Xe({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 De(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function ma(e,t,r,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,f=a.history,u="POP",l=null,h=g();h==null&&(h=0,f.replaceState({...f.state,idx:h},""));function g(){return(f.state||{idx:null}).idx}function x(){u="POP";let I=g(),O=I==null?null:I-h;h=I,l&&l({action:u,location:p.location,delta:O})}function j(I,O){u="PUSH";let F=Nt(p.location,I,O);h=g()+1;let U=Rr(F,h),V=p.createHref(F);try{f.pushState(U,"",V)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;a.location.assign(V)}s&&l&&l({action:u,location:p.location,delta:1})}function $(I,O){u="REPLACE";let F=Nt(p.location,I,O);h=g();let U=Rr(F,h),V=p.createHref(F);f.replaceState(U,"",V),s&&l&&l({action:u,location:p.location,delta:0})}function E(I){return va(I)}let p={get action(){return u},get location(){return e(a,f)},listen(I){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Er,x),l=I,()=>{a.removeEventListener(Er,x),l=null}},createHref(I){return t(a,I)},createURL:E,encodeLocation(I){let O=E(I);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:j,replace:$,go(I){return f.go(I)}};return p}function va(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ae(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Xe(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function en(e,t,r="/"){return ga(e,t,r,!1)}function ga(e,t,r,i){let a=typeof t=="string"?De(t):t,s=xe(a.pathname||"/",r);if(s==null)return null;let f=tn(e);ya(f);let u=null;for(let l=0;u==null&&l<f.length;++l){let h=Ta(s);u=Ea(f[l],h,i)}return u}function tn(e,t=[],r=[],i=""){let a=(s,f,u)=>{let l={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:f,route:s};l.relativePath.startsWith("/")&&(ae(l.relativePath.startsWith(i),`Absolute route path "${l.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(i.length));let h=Se([i,l.relativePath]),g=r.concat(l);s.children&&s.children.length>0&&(ae(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),tn(s.children,t,g,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:Ca(h,s.index),routesMeta:g})};return e.forEach((s,f)=>{if(s.path===""||!s.path?.includes("?"))a(s,f);else for(let u of rn(s.path))a(s,f,u)}),t}function rn(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let f=rn(i.join("/")),u=[];return u.push(...f.map(l=>l===""?s:[s,l].join("/"))),a&&u.push(...f),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function ya(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pa(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var ba=/^:[\w-]+$/,wa=3,Sa=2,xa=1,Oa=10,ka=-2,Tr=e=>e==="*";function Ca(e,t){let r=e.split("/"),i=r.length;return r.some(Tr)&&(i+=ka),t&&(i+=Sa),r.filter(a=>!Tr(a)).reduce((a,s)=>a+(ba.test(s)?wa:s===""?xa:Oa),i)}function Pa(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function Ea(e,t,r=!1){let{routesMeta:i}=e,a={},s="/",f=[];for(let u=0;u<i.length;++u){let l=i[u],h=u===i.length-1,g=s==="/"?t:t.slice(s.length)||"/",x=gt({path:l.relativePath,caseSensitive:l.caseSensitive,end:h},g),j=l.route;if(!x&&h&&r&&!i[i.length-1].route.index&&(x=gt({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},g)),!x)return null;Object.assign(a,x.params),f.push({params:a,pathname:Se([s,x.pathname]),pathnameBase:Da(Se([s,x.pathnameBase])),route:j}),x.pathnameBase!=="/"&&(s=Se([s,x.pathnameBase]))}return f}function gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=Ra(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],f=s.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:i.reduce((h,{paramName:g,isOptional:x},j)=>{if(g==="*"){let E=u[j]||"";f=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const $=u[j];return x&&!$?h[g]=void 0:h[g]=($||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:f,pattern:e}}function Ra(e,t=!1,r=!0){ve(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 i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,u,l)=>(i.push({paramName:u,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function Ta(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!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 xe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function _a(e,t="/"){let{pathname:r,search:i="",hash:a=""}=typeof e=="string"?De(e):e;return{pathname:r?r.startsWith("/")?r:ja(r,t):t,search:Ma(i),hash:$a(a)}}function ja(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Mt(e,t,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. 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 La(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function nn(e){let t=La(e);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function an(e,t,r,i=!1){let a;typeof e=="string"?a=De(e):(a={...e},ae(!a.pathname||!a.pathname.includes("?"),Mt("?","pathname","search",a)),ae(!a.pathname||!a.pathname.includes("#"),Mt("#","pathname","hash",a)),ae(!a.search||!a.search.includes("#"),Mt("#","search","hash",a)));let s=e===""||a.pathname==="",f=s?"/":a.pathname,u;if(f==null)u=r;else{let x=t.length-1;if(!i&&f.startsWith("..")){let j=f.split("/");for(;j[0]==="..";)j.shift(),x-=1;a.pathname=j.join("/")}u=x>=0?t[x]:"/"}let l=_a(a,u),h=f&&f!=="/"&&f.endsWith("/"),g=(s||f===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(h||g)&&(l.pathname+="/"),l}var Se=e=>e.join("/").replace(/\/\/+/g,"/"),Da=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ma=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$a=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ia(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var on=["POST","PUT","PATCH","DELETE"];new Set(on);var Aa=["GET",...on];new Set(Aa);var Me=D.createContext(null);Me.displayName="DataRouter";var Ot=D.createContext(null);Ot.displayName="DataRouterState";var sn=D.createContext({isTransitioning:!1});sn.displayName="ViewTransition";var Ha=D.createContext(new Map);Ha.displayName="Fetchers";var za=D.createContext(null);za.displayName="Await";var we=D.createContext(null);we.displayName="Navigation";var Je=D.createContext(null);Je.displayName="Location";var Oe=D.createContext({outlet:null,matches:[],isDataRoute:!1});Oe.displayName="Route";var Vt=D.createContext(null);Vt.displayName="RouteError";function Na(e,{relative:t}={}){ae(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=D.useContext(we),{hash:a,pathname:s,search:f}=Qe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:Se([r,s])),i.createHref({pathname:u,search:f,hash:a})}function Ze(){return D.useContext(Je)!=null}function ke(){return ae(Ze(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(Je).location}var ln="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function un(e){D.useContext(we).static||D.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=D.useContext(Oe);return e?Qa():Fa()}function Fa(){ae(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(Me),{basename:t,navigator:r}=D.useContext(we),{matches:i}=D.useContext(Oe),{pathname:a}=ke(),s=JSON.stringify(nn(i)),f=D.useRef(!1);return un(()=>{f.current=!0}),D.useCallback((l,h={})=>{if(ve(f.current,ln),!f.current)return;if(typeof l=="number"){r.go(l);return}let g=an(l,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Se([t,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[t,r,s,a,e])}D.createContext(null);function Qe(e,{relative:t}={}){let{matches:r}=D.useContext(Oe),{pathname:i}=ke(),a=JSON.stringify(nn(r));return D.useMemo(()=>an(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function Wa(e,t){return cn(e,t)}function cn(e,t,r,i){ae(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=D.useContext(we),{matches:s}=D.useContext(Oe),f=s[s.length-1],u=f?f.params:{},l=f?f.pathname:"/",h=f?f.pathnameBase:"/",g=f&&f.route;{let O=g&&g.path||"";fn(l,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${O}">) 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.
|
|
124
|
+
*/var Er="popstate";function pa(e={}){function t(i,a){let{pathname:s,search:f,hash:u}=i.location;return Nt("",{pathname:s,search:f,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(i,a){return typeof a=="string"?a:Xe(a)}return va(t,r,null,e)}function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ma(){return Math.random().toString(36).substring(2,10)}function Rr(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?De(t):t,state:r,key:t&&t.key||i||ma()}}function Xe({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 De(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function va(e,t,r,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,f=a.history,u="POP",l=null,h=g();h==null&&(h=0,f.replaceState({...f.state,idx:h},""));function g(){return(f.state||{idx:null}).idx}function x(){u="POP";let I=g(),O=I==null?null:I-h;h=I,l&&l({action:u,location:p.location,delta:O})}function j(I,O){u="PUSH";let F=Nt(p.location,I,O);h=g()+1;let U=Rr(F,h),V=p.createHref(F);try{f.pushState(U,"",V)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;a.location.assign(V)}s&&l&&l({action:u,location:p.location,delta:1})}function $(I,O){u="REPLACE";let F=Nt(p.location,I,O);h=g();let U=Rr(F,h),V=p.createHref(F);f.replaceState(U,"",V),s&&l&&l({action:u,location:p.location,delta:0})}function E(I){return ga(I)}let p={get action(){return u},get location(){return e(a,f)},listen(I){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Er,x),l=I,()=>{a.removeEventListener(Er,x),l=null}},createHref(I){return t(a,I)},createURL:E,encodeLocation(I){let O=E(I);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:j,replace:$,go(I){return f.go(I)}};return p}function ga(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ae(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Xe(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function en(e,t,r="/"){return ya(e,t,r,!1)}function ya(e,t,r,i){let a=typeof t=="string"?De(t):t,s=xe(a.pathname||"/",r);if(s==null)return null;let f=tn(e);ba(f);let u=null;for(let l=0;u==null&&l<f.length;++l){let h=_a(s);u=Ra(f[l],h,i)}return u}function tn(e,t=[],r=[],i=""){let a=(s,f,u)=>{let l={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:f,route:s};l.relativePath.startsWith("/")&&(ae(l.relativePath.startsWith(i),`Absolute route path "${l.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(i.length));let h=Se([i,l.relativePath]),g=r.concat(l);s.children&&s.children.length>0&&(ae(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),tn(s.children,t,g,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:Pa(h,s.index),routesMeta:g})};return e.forEach((s,f)=>{if(s.path===""||!s.path?.includes("?"))a(s,f);else for(let u of rn(s.path))a(s,f,u)}),t}function rn(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let f=rn(i.join("/")),u=[];return u.push(...f.map(l=>l===""?s:[s,l].join("/"))),a&&u.push(...f),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function ba(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ea(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var wa=/^:[\w-]+$/,Sa=3,xa=2,Oa=1,ka=10,Ca=-2,Tr=e=>e==="*";function Pa(e,t){let r=e.split("/"),i=r.length;return r.some(Tr)&&(i+=Ca),t&&(i+=xa),r.filter(a=>!Tr(a)).reduce((a,s)=>a+(wa.test(s)?Sa:s===""?Oa:ka),i)}function Ea(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function Ra(e,t,r=!1){let{routesMeta:i}=e,a={},s="/",f=[];for(let u=0;u<i.length;++u){let l=i[u],h=u===i.length-1,g=s==="/"?t:t.slice(s.length)||"/",x=gt({path:l.relativePath,caseSensitive:l.caseSensitive,end:h},g),j=l.route;if(!x&&h&&r&&!i[i.length-1].route.index&&(x=gt({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},g)),!x)return null;Object.assign(a,x.params),f.push({params:a,pathname:Se([s,x.pathname]),pathnameBase:Ma(Se([s,x.pathnameBase])),route:j}),x.pathnameBase!=="/"&&(s=Se([s,x.pathnameBase]))}return f}function gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=Ta(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],f=s.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:i.reduce((h,{paramName:g,isOptional:x},j)=>{if(g==="*"){let E=u[j]||"";f=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const $=u[j];return x&&!$?h[g]=void 0:h[g]=($||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:f,pattern:e}}function Ta(e,t=!1,r=!0){ve(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 i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,u,l)=>(i.push({paramName:u,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function _a(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!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 xe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function ja(e,t="/"){let{pathname:r,search:i="",hash:a=""}=typeof e=="string"?De(e):e;return{pathname:r?r.startsWith("/")?r:La(r,t):t,search:$a(i),hash:Ia(a)}}function La(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Mt(e,t,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. 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 Da(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function nn(e){let t=Da(e);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function an(e,t,r,i=!1){let a;typeof e=="string"?a=De(e):(a={...e},ae(!a.pathname||!a.pathname.includes("?"),Mt("?","pathname","search",a)),ae(!a.pathname||!a.pathname.includes("#"),Mt("#","pathname","hash",a)),ae(!a.search||!a.search.includes("#"),Mt("#","search","hash",a)));let s=e===""||a.pathname==="",f=s?"/":a.pathname,u;if(f==null)u=r;else{let x=t.length-1;if(!i&&f.startsWith("..")){let j=f.split("/");for(;j[0]==="..";)j.shift(),x-=1;a.pathname=j.join("/")}u=x>=0?t[x]:"/"}let l=ja(a,u),h=f&&f!=="/"&&f.endsWith("/"),g=(s||f===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(h||g)&&(l.pathname+="/"),l}var Se=e=>e.join("/").replace(/\/\/+/g,"/"),Ma=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$a=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ia=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Aa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var on=["POST","PUT","PATCH","DELETE"];new Set(on);var Ha=["GET",...on];new Set(Ha);var Me=D.createContext(null);Me.displayName="DataRouter";var Ot=D.createContext(null);Ot.displayName="DataRouterState";var sn=D.createContext({isTransitioning:!1});sn.displayName="ViewTransition";var za=D.createContext(new Map);za.displayName="Fetchers";var Na=D.createContext(null);Na.displayName="Await";var we=D.createContext(null);we.displayName="Navigation";var Je=D.createContext(null);Je.displayName="Location";var Oe=D.createContext({outlet:null,matches:[],isDataRoute:!1});Oe.displayName="Route";var Vt=D.createContext(null);Vt.displayName="RouteError";function Fa(e,{relative:t}={}){ae(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=D.useContext(we),{hash:a,pathname:s,search:f}=Qe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:Se([r,s])),i.createHref({pathname:u,search:f,hash:a})}function Ze(){return D.useContext(Je)!=null}function ke(){return ae(Ze(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(Je).location}var ln="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function un(e){D.useContext(we).static||D.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=D.useContext(Oe);return e?eo():Wa()}function Wa(){ae(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(Me),{basename:t,navigator:r}=D.useContext(we),{matches:i}=D.useContext(Oe),{pathname:a}=ke(),s=JSON.stringify(nn(i)),f=D.useRef(!1);return un(()=>{f.current=!0}),D.useCallback((l,h={})=>{if(ve(f.current,ln),!f.current)return;if(typeof l=="number"){r.go(l);return}let g=an(l,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Se([t,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[t,r,s,a,e])}D.createContext(null);function Qe(e,{relative:t}={}){let{matches:r}=D.useContext(Oe),{pathname:i}=ke(),a=JSON.stringify(nn(r));return D.useMemo(()=>an(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function Ua(e,t){return cn(e,t)}function cn(e,t,r,i){ae(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=D.useContext(we),{matches:s}=D.useContext(Oe),f=s[s.length-1],u=f?f.params:{},l=f?f.pathname:"/",h=f?f.pathnameBase:"/",g=f&&f.route;{let O=g&&g.path||"";fn(l,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${O}">) 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.
|
|
125
125
|
|
|
126
|
-
Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=ke(),j;if(t){let O=typeof t=="string"?De(t):t;ae(h==="/"||O.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${O.pathname}" was given in the \`location\` prop.`),j=O}else j=x;let $=j.pathname||"/",E=$;if(h!=="/"){let O=h.replace(/^\//,"").split("/");E="/"+$.replace(/^\//,"").split("/").slice(O.length).join("/")}let p=en(e,{pathname:E});ve(g||p!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),ve(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 I=Va(p&&p.map(O=>Object.assign({},O,{params:Object.assign({},u,O.params),pathname:Se([h,a.encodeLocation?a.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?h:Se([h,a.encodeLocation?a.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),s,r,i);return t&&I?D.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},I):I}function Ua(){let e=Za(),t=Ia(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",e),f=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:a},r):null,f)}var Ya=D.createElement(Ua,null),qa=class extends D.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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?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 this.state.error!==void 0?D.createElement(Oe.Provider,{value:this.props.routeContext},D.createElement(Vt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ba({routeContext:e,match:t,children:r}){let i=D.useContext(Me);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(Oe.Provider,{value:e},r)}function Va(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let l=a.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);ae(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,l+1))}let f=!1,u=-1;if(r)for(let l=0;l<a.length;l++){let h=a[l];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=l),h.route.id){let{loaderData:g,errors:x}=r,j=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||j){f=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((l,h,g)=>{let x,j=!1,$=null,E=null;r&&(x=s&&h.route.id?s[h.route.id]:void 0,$=h.route.errorElement||Ya,f&&(u<0&&g===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,E=null):u===g&&(j=!0,E=h.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,g+1)),I=()=>{let O;return x?O=$:j?O=E:h.route.Component?O=D.createElement(h.route.Component,null):h.route.element?O=h.route.element:O=l,D.createElement(Ba,{match:h,routeContext:{outlet:l,matches:p,isDataRoute:r!=null},children:O})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?D.createElement(qa,{location:r.location,revalidation:r.revalidation,component:$,error:x,children:I(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):I()},null)}function Gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xa(e){let t=D.useContext(Me);return ae(t,Gt(e)),t}function Ga(e){let t=D.useContext(Ot);return ae(t,Gt(e)),t}function Ka(e){let t=D.useContext(Oe);return ae(t,Gt(e)),t}function Kt(e){let t=Ka(e),r=t.matches[t.matches.length-1];return ae(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ja(){return Kt("useRouteId")}function Za(){let e=D.useContext(Vt),t=Ga("useRouteError"),r=Kt("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qa(){let{router:e}=Xa("useNavigate"),t=Kt("useNavigate"),r=D.useRef(!1);return un(()=>{r.current=!0}),D.useCallback(async(a,s={})=>{ve(r.current,ln),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var _r={};function fn(e,t,r){!t&&!_r[e]&&(_r[e]=!0,ve(!1,r))}D.memo(eo);function eo({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){ae(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function to({basename:e="/",children:t=null,location:r,navigationType:i="POP",navigator:a,static:s=!1}){ae(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),u=D.useMemo(()=>({basename:f,navigator:a,static:s,future:{}}),[f,a,s]);typeof r=="string"&&(r=De(r));let{pathname:l="/",search:h="",hash:g="",state:x=null,key:j="default"}=r,$=D.useMemo(()=>{let E=xe(l,f);return E==null?null:{location:{pathname:E,search:h,hash:g,state:x,key:j},navigationType:i}},[f,l,h,g,x,j,i]);return ve($!=null,`<Router basename="${f}"> is not able to match the URL "${l}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),$==null?null:D.createElement(we.Provider,{value:u},D.createElement(Je.Provider,{children:t,value:$}))}function ro({children:e,location:t}){return Wa(Ft(e),t)}function Ft(e,t=[]){let r=[];return D.Children.forEach(e,(i,a)=>{if(!D.isValidElement(i))return;let s=[...t,a];if(i.type===D.Fragment){r.push.apply(r,Ft(i.props.children,s));return}ae(i.type===dn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ae(!i.props.index||!i.props.children,"An index route cannot have child routes.");let f={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=Ft(i.props.children,s)),r.push(f)}),r}var ut="get",ct="application/x-www-form-urlencoded";function kt(e){return e!=null&&typeof e.tagName=="string"}function no(e){return kt(e)&&e.tagName.toLowerCase()==="button"}function io(e){return kt(e)&&e.tagName.toLowerCase()==="form"}function ao(e){return kt(e)&&e.tagName.toLowerCase()==="input"}function oo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function so(e,t){return e.button===0&&(!t||t==="_self")&&!oo(e)}function Wt(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(a=>[r,a]):[[r,i]])},[]))}function lo(e,t){let r=Wt(e);return t&&t.forEach((i,a)=>{r.has(a)||t.getAll(a).forEach(s=>{r.append(a,s)})}),r}var at=null;function uo(){if(at===null)try{new FormData(document.createElement("form"),0),at=!1}catch{at=!0}return at}var co=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!co.has(e)?(ve(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ct}"`),null):e}function fo(e,t){let r,i,a,s,f;if(io(e)){let u=e.getAttribute("action");i=u?xe(u,t):null,r=e.getAttribute("method")||ut,a=$t(e.getAttribute("enctype"))||ct,s=new FormData(e)}else if(no(e)||ao(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(i=l?xe(l,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||ut,a=$t(e.getAttribute("formenctype"))||$t(u.getAttribute("enctype"))||ct,s=new FormData(u,e),!uo()){let{name:h,type:g,value:x}=e;if(g==="image"){let j=h?`${h}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else h&&s.append(h,x)}}else{if(kt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ut,i=null,a=ct,f=e}return s&&a==="text/plain"&&(f=s,s=void 0),{action:i,method:r.toLowerCase(),encType:a,formData:s,body:f}}function Jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function ho(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(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function po(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function mo(e,t,r){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let f=await ho(s,r);return f.links?f.links():[]}return[]}));return bo(i.flat(1).filter(po).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jr(e,t,r,i,a,s){let f=(l,h)=>r[h]?l.route.id!==r[h].route.id:!0,u=(l,h)=>r[h].pathname!==l.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==l.params["*"];return s==="assets"?t.filter((l,h)=>f(l,h)||u(l,h)):s==="data"?t.filter((l,h)=>{let g=i.routes[l.route.id];if(!g||!g.hasLoader)return!1;if(f(l,h)||u(l,h))return!0;if(l.route.shouldRevalidate){let x=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function vo(e,t,{includeHydrateFallback:r}={}){return go(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function go(e){return[...new Set(e)]}function yo(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function bo(e,t){let r=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(yo(a));return r.has(s)||(r.add(s),i.push({key:s,link:a})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wo=new Set([100,101,204,205]);function So(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&xe(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function hn(){let e=D.useContext(Me);return Jt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xo(){let e=D.useContext(Ot);return Jt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zt=D.createContext(void 0);Zt.displayName="FrameworkContext";function pn(){let e=D.useContext(Zt);return Jt(e,"You must render this element inside a <HydratedRouter> element"),e}function Oo(e,t){let r=D.useContext(Zt),[i,a]=D.useState(!1),[s,f]=D.useState(!1),{onFocus:u,onBlur:l,onMouseEnter:h,onMouseLeave:g,onTouchStart:x}=t,j=D.useRef(null);D.useEffect(()=>{if(e==="render"&&f(!0),e==="viewport"){let p=O=>{O.forEach(F=>{f(F.isIntersecting)})},I=new IntersectionObserver(p,{threshold:.5});return j.current&&I.observe(j.current),()=>{I.disconnect()}}},[e]),D.useEffect(()=>{if(i){let p=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(p)}}},[i]);let $=()=>{a(!0)},E=()=>{a(!1),f(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(u,$),onBlur:Ye(l,E),onMouseEnter:Ye(h,$),onMouseLeave:Ye(g,E),onTouchStart:Ye(x,$)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function ko({page:e,...t}){let{router:r}=hn(),i=D.useMemo(()=>en(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?D.createElement(Po,{page:e,matches:i,...t}):null}function Co(e){let{manifest:t,routeModules:r}=pn(),[i,a]=D.useState([]);return D.useEffect(()=>{let s=!1;return mo(e,t,r).then(f=>{s||a(f)}),()=>{s=!0}},[e,t,r]),i}function Po({page:e,matches:t,...r}){let i=ke(),{manifest:a,routeModules:s}=pn(),{basename:f}=hn(),{loaderData:u,matches:l}=xo(),h=D.useMemo(()=>jr(e,t,l,a,i,"data"),[e,t,l,a,i]),g=D.useMemo(()=>jr(e,t,l,a,i,"assets"),[e,t,l,a,i]),x=D.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,p=!1;if(t.forEach(O=>{let F=a.routes[O.route.id];!F||!F.hasLoader||(!h.some(U=>U.route.id===O.route.id)&&O.route.id in u&&s[O.route.id]?.shouldRevalidate||F.hasClientLoader?p=!0:E.add(O.route.id))}),E.size===0)return[];let I=So(e,f);return p&&E.size>0&&I.searchParams.set("_routes",t.filter(O=>E.has(O.route.id)).map(O=>O.route.id).join(",")),[I.pathname+I.search]},[f,u,i,a,h,t,e,s]),j=D.useMemo(()=>vo(g,a),[g,a]),$=Co(g);return D.createElement(D.Fragment,null,x.map(E=>D.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),j.map(E=>D.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),$.map(({key:E,link:p})=>D.createElement("link",{key:E,...p})))}function Eo(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var mn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mn&&(window.__reactRouterVersion="7.6.3")}catch{}function Ro({basename:e,children:t,window:r}){let i=D.useRef();i.current==null&&(i.current=ha({window:r,v5Compat:!0}));let a=i.current,[s,f]=D.useState({action:a.action,location:a.location}),u=D.useCallback(l=>{D.startTransition(()=>f(l))},[f]);return D.useLayoutEffect(()=>a.listen(u),[a,u]),D.createElement(to,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=D.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:a,reloadDocument:s,replace:f,state:u,target:l,to:h,preventScrollReset:g,viewTransition:x,...j},$){let{basename:E}=D.useContext(we),p=typeof h=="string"&&vn.test(h),I,O=!1;if(typeof h=="string"&&p&&(I=h,mn))try{let y=new URL(window.location.href),d=h.startsWith("//")?new URL(y.protocol+h):new URL(h),k=xe(d.pathname,E);d.origin===y.origin&&k!=null?h=k+d.search+d.hash:O=!0}catch{ve(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Na(h,{relative:a}),[U,V,v]=Oo(i,j),b=Lo(h,{replace:f,state:u,target:l,preventScrollReset:g,relative:a,viewTransition:x});function w(y){t&&t(y),y.defaultPrevented||b(y)}let P=D.createElement("a",{...j,...v,href:I||F,onClick:O||s?t:w,ref:Eo($,V),target:l,"data-discover":!p&&r==="render"?"true":void 0});return U&&!p?D.createElement(D.Fragment,null,P,D.createElement(ko,{page:F})):P});gn.displayName="Link";var To=D.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:a=!1,style:s,to:f,viewTransition:u,children:l,...h},g){let x=Qe(f,{relative:h.relative}),j=ke(),$=D.useContext(Ot),{navigator:E,basename:p}=D.useContext(we),I=$!=null&&Ho(x)&&u===!0,O=E.encodeLocation?E.encodeLocation(x).pathname:x.pathname,F=j.pathname,U=$&&$.navigation&&$.navigation.location?$.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&p&&(U=xe(U,p)||U);const V=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let v=F===O||!a&&F.startsWith(O)&&F.charAt(V)==="/",b=U!=null&&(U===O||!a&&U.startsWith(O)&&U.charAt(O.length)==="/"),w={isActive:v,isPending:b,isTransitioning:I},P=v?t:void 0,y;typeof i=="function"?y=i(w):y=[i,v?"active":null,b?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let d=typeof s=="function"?s(w):s;return D.createElement(gn,{...h,"aria-current":P,className:y,ref:g,style:d,to:f,viewTransition:u},typeof l=="function"?l(w):l)});To.displayName="NavLink";var _o=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:s,method:f=ut,action:u,onSubmit:l,relative:h,preventScrollReset:g,viewTransition:x,...j},$)=>{let E=Io(),p=Ao(u,{relative:h}),I=f.toLowerCase()==="get"?"get":"post",O=typeof u=="string"&&vn.test(u),F=U=>{if(l&&l(U),U.defaultPrevented)return;U.preventDefault();let V=U.nativeEvent.submitter,v=V?.getAttribute("formmethod")||f;E(V||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:a,state:s,relative:h,preventScrollReset:g,viewTransition:x})};return D.createElement("form",{ref:$,method:I,action:p,onSubmit:i?l:F,...j,"data-discover":!O&&e==="render"?"true":void 0})});_o.displayName="Form";function jo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yn(e){let t=D.useContext(Me);return ae(t,jo(e)),t}function Lo(e,{target:t,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:f}={}){let u=Xt(),l=ke(),h=Qe(e,{relative:s});return D.useCallback(g=>{if(so(g,t)){g.preventDefault();let x=r!==void 0?r:Xe(l)===Xe(h);u(e,{replace:x,state:i,preventScrollReset:a,relative:s,viewTransition:f})}},[l,u,h,r,i,t,e,a,s,f])}function Do(e){ve(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=D.useRef(Wt(e)),r=D.useRef(!1),i=ke(),a=D.useMemo(()=>lo(i.search,r.current?null:t.current),[i.search]),s=Xt(),f=D.useCallback((u,l)=>{const h=Wt(typeof u=="function"?u(a):u);r.current=!0,s("?"+h,l)},[s,a]);return[a,f]}var Mo=0,$o=()=>`__${String(++Mo)}__`;function Io(){let{router:e}=yn("useSubmit"),{basename:t}=D.useContext(we),r=Ja();return D.useCallback(async(i,a={})=>{let{action:s,method:f,encType:u,formData:l,body:h}=fo(i,t);if(a.navigate===!1){let g=a.fetcherKey||$o();await e.fetch(g,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:l,body:h,formMethod:a.method||f,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:l,body:h,formMethod:a.method||f,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Ao(e,{relative:t}={}){let{basename:r}=D.useContext(we),i=D.useContext(Oe);ae(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...Qe(e||".",{relative:t})},f=ke();if(e==null){s.search=f.search;let u=new URLSearchParams(s.search),l=u.getAll("index");if(l.some(g=>g==="")){u.delete("index"),l.filter(x=>x).forEach(x=>u.append("index",x));let g=u.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function Ho(e,t={}){let r=D.useContext(sn);ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=yn("useViewTransitionState"),a=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,i)||r.currentLocation.pathname,f=xe(r.nextLocation.pathname,i)||r.nextLocation.pathname;return gt(a.pathname,f)!=null||gt(a.pathname,s)!=null}[...wo];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),zo=()=>{const[e,t]=Do(),r=Y.useMemo(()=>Object.fromEntries(e.entries()),[e]),i=Y.useCallback(h=>{const g={};return h.forEach(x=>{g[x]=e.get(x)}),g},[e]),a=Y.useCallback(h=>{const g=e.get(h);return g==null||g==null,g},[e]),s=Y.useCallback((h,g)=>{const x=new URLSearchParams(e);x.set(h,String(g)),t(x)},[e,t]),f=Y.useCallback(h=>{const g=new URLSearchParams(e);Object.entries(h).forEach(([x,j])=>{j!=null&&g.set(x,String(j))}),t(g)},[e,t]),u=Y.useCallback(h=>{const g=new URLSearchParams(e);g.delete(h),t(g)},[e,t]),l=Y.useCallback(h=>{const g=new URLSearchParams(e);h.forEach(x=>{g.delete(String(x))}),t(g)},[e,t]);return{getAll:()=>r,get:a,getMany:i,set:s,setMany:f,remove:u,removeMany:l}},No=()=>{const e=Xt(),t=ke(),r=zo(),i=Y.useContext(bn),a=u=>{const l=new URL(u.path,"http://dummy-base");return u.params&&Object.entries(u.params).forEach(([h,g])=>{g!=null&&l.searchParams.set(h,String(g))}),l.pathname+l.search},s=Y.useCallback(u=>{const l=a(u);u.addToHistory!==!1?(e(l),i.addToHistory(l)):(e(l,{replace:!0}),i.popFromHistory(1),i.addToHistory(l))},[e]),f=Y.useCallback(u=>{const l=u||1;e(-l),i.popFromHistory(l)},[e]);return{currentPath:t.pathname,history:i.history,searchParams:r,goBack:f,goTo:s}},Fo=({isReady:e=!0,routes:t,children:r})=>{const i=Y.useRef([]),[a,s]=Y.useState([]),f=Y.useCallback(x=>{i.current=x,s(x)},[]),u=(x,j=!1)=>{let $=[...i.current];j&&($=$.slice(0,$.length-1)),$=[...$,x],f($)},l=x=>{let j="",$=[];return i.current.length===0?"/":(i.current.length<=x?(j=i.current[0],$=[j]):($=i.current.slice(0,i.current.length-x),j=$[$.length-1]),f($),j)},h=x=>{f(x)},g=t.map(x=>K.jsx(dn,{path:x.path,element:x.render}));return K.jsx(bn.Provider,{value:{history:a,addToHistory:u,popFromHistory:l,replaceHistory:h},children:K.jsx(Ro,{children:e&&K.jsxs(K.Fragment,{children:[r,K.jsx(ro,{children:g})]})})})},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Wo=({children:e})=>{const t=Y.useRef([]),[r,i]=Y.useState([]),a=Y.useCallback(l=>{t.current=l,i(l)},[]),s=Y.useCallback(l=>t.current.some(h=>h===l),[]),f=Y.useCallback(l=>{s(l)||a([...t.current,l])},[s,a]),u=Y.useCallback(l=>{s(l)&&a(t.current.filter(g=>g!==l))},[s,a]);return K.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:f,hideItem:u},children:e})},et=()=>{const e=Y.useContext(wn),t=a=>e.visibleItems.some(s=>s===a),r=a=>{e.showItem(a)},i=a=>{e.hideItem(a)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:i}},Uo=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:i}=et(),[a,s]=Y.useState({isDragging:!1}),f=Y.useRef(null),u=Y.useRef(null),l=Y.useRef(null),[h,g]=Y.useState(0),x=E=>{s(E)},j=E=>{s(E),g(0)};return Zr({ref:l,onDrag:E=>{s(E);const p=u.current?.clientHeight||0;E.distanceY&&(g(E.distanceY<0?0:-E.distanceY),E.distanceY>=p-r&&(t?.(),j(E)))},onDragEnd:j,onDragStart:x}),{isVisible:i(e),drawerParentRef:f,drawerRef:u,drawerBottomDistance:h,handleRef:l}},Yo=e=>{const{children:t,backgroundStyles:r,contentStyles:i,handle:a}=e,{isVisible:s,drawerParentRef:f,drawerRef:u,handleRef:l,drawerBottomDistance:h}=Uo(e);return K.jsx(K.Fragment,{children:s&&K.jsx("div",{ref:f,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},children:K.jsxs("div",{ref:u,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${h}px`,...i},onClick:g=>{g.stopPropagation()},children:[K.jsx("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...a?.styles},children:a?.render}),t]})})})},qo=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),i=Y.useCallback(f=>{var u=Object.keys(f.currentTarget.elements),l=Object.values(f.currentTarget.elements),h=[];for(let g=0;g<u.length;g++){const x=u[g];if(t.findIndex($=>$.name===x)===-1)continue;const j=l[g].value;h.push({name:x,value:j})}return h},[e]),a=Y.useCallback(f=>{f.preventDefault();const u=i(f);e?.(u)},[e]);return{ref:r,submitForm:f=>{r.current&&r.current.requestSubmit()},handleFormSubmission:a}},Bo=e=>{const{fields:t,styles:r,submitButton:i}=e,{ref:a,handleFormSubmission:s,submitForm:f}=qo(e),u=Y.useCallback(()=>t.map(l=>({...l.content,key:l.name})),[t]);return K.jsxs("form",{ref:a,onSubmit:s,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[u(),K.jsx("div",{onClick:f,style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",...i.styles},children:i.content})]})},Vo=({src:e,alt:t="",onClick:r,styles:i})=>K.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...i},onClick:()=>{r?.()}}),Xo=je.div`
|
|
126
|
+
Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=ke(),j;if(t){let O=typeof t=="string"?De(t):t;ae(h==="/"||O.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${O.pathname}" was given in the \`location\` prop.`),j=O}else j=x;let $=j.pathname||"/",E=$;if(h!=="/"){let O=h.replace(/^\//,"").split("/");E="/"+$.replace(/^\//,"").split("/").slice(O.length).join("/")}let p=en(e,{pathname:E});ve(g||p!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),ve(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 I=Xa(p&&p.map(O=>Object.assign({},O,{params:Object.assign({},u,O.params),pathname:Se([h,a.encodeLocation?a.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?h:Se([h,a.encodeLocation?a.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),s,r,i);return t&&I?D.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},I):I}function Ya(){let e=Qa(),t=Aa(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",e),f=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:a},r):null,f)}var qa=D.createElement(Ya,null),Ba=class extends D.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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?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 this.state.error!==void 0?D.createElement(Oe.Provider,{value:this.props.routeContext},D.createElement(Vt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Va({routeContext:e,match:t,children:r}){let i=D.useContext(Me);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(Oe.Provider,{value:e},r)}function Xa(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let l=a.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);ae(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,l+1))}let f=!1,u=-1;if(r)for(let l=0;l<a.length;l++){let h=a[l];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=l),h.route.id){let{loaderData:g,errors:x}=r,j=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||j){f=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((l,h,g)=>{let x,j=!1,$=null,E=null;r&&(x=s&&h.route.id?s[h.route.id]:void 0,$=h.route.errorElement||qa,f&&(u<0&&g===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,E=null):u===g&&(j=!0,E=h.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,g+1)),I=()=>{let O;return x?O=$:j?O=E:h.route.Component?O=D.createElement(h.route.Component,null):h.route.element?O=h.route.element:O=l,D.createElement(Va,{match:h,routeContext:{outlet:l,matches:p,isDataRoute:r!=null},children:O})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?D.createElement(Ba,{location:r.location,revalidation:r.revalidation,component:$,error:x,children:I(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):I()},null)}function Gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ga(e){let t=D.useContext(Me);return ae(t,Gt(e)),t}function Ka(e){let t=D.useContext(Ot);return ae(t,Gt(e)),t}function Ja(e){let t=D.useContext(Oe);return ae(t,Gt(e)),t}function Kt(e){let t=Ja(e),r=t.matches[t.matches.length-1];return ae(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Za(){return Kt("useRouteId")}function Qa(){let e=D.useContext(Vt),t=Ka("useRouteError"),r=Kt("useRouteError");return e!==void 0?e:t.errors?.[r]}function eo(){let{router:e}=Ga("useNavigate"),t=Kt("useNavigate"),r=D.useRef(!1);return un(()=>{r.current=!0}),D.useCallback(async(a,s={})=>{ve(r.current,ln),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var _r={};function fn(e,t,r){!t&&!_r[e]&&(_r[e]=!0,ve(!1,r))}D.memo(to);function to({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){ae(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ro({basename:e="/",children:t=null,location:r,navigationType:i="POP",navigator:a,static:s=!1}){ae(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),u=D.useMemo(()=>({basename:f,navigator:a,static:s,future:{}}),[f,a,s]);typeof r=="string"&&(r=De(r));let{pathname:l="/",search:h="",hash:g="",state:x=null,key:j="default"}=r,$=D.useMemo(()=>{let E=xe(l,f);return E==null?null:{location:{pathname:E,search:h,hash:g,state:x,key:j},navigationType:i}},[f,l,h,g,x,j,i]);return ve($!=null,`<Router basename="${f}"> is not able to match the URL "${l}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),$==null?null:D.createElement(we.Provider,{value:u},D.createElement(Je.Provider,{children:t,value:$}))}function no({children:e,location:t}){return Ua(Ft(e),t)}function Ft(e,t=[]){let r=[];return D.Children.forEach(e,(i,a)=>{if(!D.isValidElement(i))return;let s=[...t,a];if(i.type===D.Fragment){r.push.apply(r,Ft(i.props.children,s));return}ae(i.type===dn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ae(!i.props.index||!i.props.children,"An index route cannot have child routes.");let f={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=Ft(i.props.children,s)),r.push(f)}),r}var ut="get",ct="application/x-www-form-urlencoded";function kt(e){return e!=null&&typeof e.tagName=="string"}function io(e){return kt(e)&&e.tagName.toLowerCase()==="button"}function ao(e){return kt(e)&&e.tagName.toLowerCase()==="form"}function oo(e){return kt(e)&&e.tagName.toLowerCase()==="input"}function so(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lo(e,t){return e.button===0&&(!t||t==="_self")&&!so(e)}function Wt(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(a=>[r,a]):[[r,i]])},[]))}function uo(e,t){let r=Wt(e);return t&&t.forEach((i,a)=>{r.has(a)||t.getAll(a).forEach(s=>{r.append(a,s)})}),r}var at=null;function co(){if(at===null)try{new FormData(document.createElement("form"),0),at=!1}catch{at=!0}return at}var fo=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!fo.has(e)?(ve(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ct}"`),null):e}function ho(e,t){let r,i,a,s,f;if(ao(e)){let u=e.getAttribute("action");i=u?xe(u,t):null,r=e.getAttribute("method")||ut,a=$t(e.getAttribute("enctype"))||ct,s=new FormData(e)}else if(io(e)||oo(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(i=l?xe(l,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||ut,a=$t(e.getAttribute("formenctype"))||$t(u.getAttribute("enctype"))||ct,s=new FormData(u,e),!co()){let{name:h,type:g,value:x}=e;if(g==="image"){let j=h?`${h}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else h&&s.append(h,x)}}else{if(kt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ut,i=null,a=ct,f=e}return s&&a==="text/plain"&&(f=s,s=void 0),{action:i,method:r.toLowerCase(),encType:a,formData:s,body:f}}function Jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function po(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(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function vo(e,t,r){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let f=await po(s,r);return f.links?f.links():[]}return[]}));return wo(i.flat(1).filter(mo).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jr(e,t,r,i,a,s){let f=(l,h)=>r[h]?l.route.id!==r[h].route.id:!0,u=(l,h)=>r[h].pathname!==l.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==l.params["*"];return s==="assets"?t.filter((l,h)=>f(l,h)||u(l,h)):s==="data"?t.filter((l,h)=>{let g=i.routes[l.route.id];if(!g||!g.hasLoader)return!1;if(f(l,h)||u(l,h))return!0;if(l.route.shouldRevalidate){let x=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function go(e,t,{includeHydrateFallback:r}={}){return yo(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function yo(e){return[...new Set(e)]}function bo(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function wo(e,t){let r=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(bo(a));return r.has(s)||(r.add(s),i.push({key:s,link:a})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var So=new Set([100,101,204,205]);function xo(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&xe(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function hn(){let e=D.useContext(Me);return Jt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Oo(){let e=D.useContext(Ot);return Jt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zt=D.createContext(void 0);Zt.displayName="FrameworkContext";function pn(){let e=D.useContext(Zt);return Jt(e,"You must render this element inside a <HydratedRouter> element"),e}function ko(e,t){let r=D.useContext(Zt),[i,a]=D.useState(!1),[s,f]=D.useState(!1),{onFocus:u,onBlur:l,onMouseEnter:h,onMouseLeave:g,onTouchStart:x}=t,j=D.useRef(null);D.useEffect(()=>{if(e==="render"&&f(!0),e==="viewport"){let p=O=>{O.forEach(F=>{f(F.isIntersecting)})},I=new IntersectionObserver(p,{threshold:.5});return j.current&&I.observe(j.current),()=>{I.disconnect()}}},[e]),D.useEffect(()=>{if(i){let p=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(p)}}},[i]);let $=()=>{a(!0)},E=()=>{a(!1),f(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(u,$),onBlur:Ye(l,E),onMouseEnter:Ye(h,$),onMouseLeave:Ye(g,E),onTouchStart:Ye(x,$)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Co({page:e,...t}){let{router:r}=hn(),i=D.useMemo(()=>en(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?D.createElement(Eo,{page:e,matches:i,...t}):null}function Po(e){let{manifest:t,routeModules:r}=pn(),[i,a]=D.useState([]);return D.useEffect(()=>{let s=!1;return vo(e,t,r).then(f=>{s||a(f)}),()=>{s=!0}},[e,t,r]),i}function Eo({page:e,matches:t,...r}){let i=ke(),{manifest:a,routeModules:s}=pn(),{basename:f}=hn(),{loaderData:u,matches:l}=Oo(),h=D.useMemo(()=>jr(e,t,l,a,i,"data"),[e,t,l,a,i]),g=D.useMemo(()=>jr(e,t,l,a,i,"assets"),[e,t,l,a,i]),x=D.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,p=!1;if(t.forEach(O=>{let F=a.routes[O.route.id];!F||!F.hasLoader||(!h.some(U=>U.route.id===O.route.id)&&O.route.id in u&&s[O.route.id]?.shouldRevalidate||F.hasClientLoader?p=!0:E.add(O.route.id))}),E.size===0)return[];let I=xo(e,f);return p&&E.size>0&&I.searchParams.set("_routes",t.filter(O=>E.has(O.route.id)).map(O=>O.route.id).join(",")),[I.pathname+I.search]},[f,u,i,a,h,t,e,s]),j=D.useMemo(()=>go(g,a),[g,a]),$=Po(g);return D.createElement(D.Fragment,null,x.map(E=>D.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),j.map(E=>D.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),$.map(({key:E,link:p})=>D.createElement("link",{key:E,...p})))}function Ro(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var mn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mn&&(window.__reactRouterVersion="7.6.3")}catch{}function To({basename:e,children:t,window:r}){let i=D.useRef();i.current==null&&(i.current=pa({window:r,v5Compat:!0}));let a=i.current,[s,f]=D.useState({action:a.action,location:a.location}),u=D.useCallback(l=>{D.startTransition(()=>f(l))},[f]);return D.useLayoutEffect(()=>a.listen(u),[a,u]),D.createElement(ro,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=D.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:a,reloadDocument:s,replace:f,state:u,target:l,to:h,preventScrollReset:g,viewTransition:x,...j},$){let{basename:E}=D.useContext(we),p=typeof h=="string"&&vn.test(h),I,O=!1;if(typeof h=="string"&&p&&(I=h,mn))try{let y=new URL(window.location.href),d=h.startsWith("//")?new URL(y.protocol+h):new URL(h),k=xe(d.pathname,E);d.origin===y.origin&&k!=null?h=k+d.search+d.hash:O=!0}catch{ve(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Fa(h,{relative:a}),[U,V,v]=ko(i,j),b=Do(h,{replace:f,state:u,target:l,preventScrollReset:g,relative:a,viewTransition:x});function w(y){t&&t(y),y.defaultPrevented||b(y)}let P=D.createElement("a",{...j,...v,href:I||F,onClick:O||s?t:w,ref:Ro($,V),target:l,"data-discover":!p&&r==="render"?"true":void 0});return U&&!p?D.createElement(D.Fragment,null,P,D.createElement(Co,{page:F})):P});gn.displayName="Link";var _o=D.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:a=!1,style:s,to:f,viewTransition:u,children:l,...h},g){let x=Qe(f,{relative:h.relative}),j=ke(),$=D.useContext(Ot),{navigator:E,basename:p}=D.useContext(we),I=$!=null&&zo(x)&&u===!0,O=E.encodeLocation?E.encodeLocation(x).pathname:x.pathname,F=j.pathname,U=$&&$.navigation&&$.navigation.location?$.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&p&&(U=xe(U,p)||U);const V=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let v=F===O||!a&&F.startsWith(O)&&F.charAt(V)==="/",b=U!=null&&(U===O||!a&&U.startsWith(O)&&U.charAt(O.length)==="/"),w={isActive:v,isPending:b,isTransitioning:I},P=v?t:void 0,y;typeof i=="function"?y=i(w):y=[i,v?"active":null,b?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let d=typeof s=="function"?s(w):s;return D.createElement(gn,{...h,"aria-current":P,className:y,ref:g,style:d,to:f,viewTransition:u},typeof l=="function"?l(w):l)});_o.displayName="NavLink";var jo=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:s,method:f=ut,action:u,onSubmit:l,relative:h,preventScrollReset:g,viewTransition:x,...j},$)=>{let E=Ao(),p=Ho(u,{relative:h}),I=f.toLowerCase()==="get"?"get":"post",O=typeof u=="string"&&vn.test(u),F=U=>{if(l&&l(U),U.defaultPrevented)return;U.preventDefault();let V=U.nativeEvent.submitter,v=V?.getAttribute("formmethod")||f;E(V||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:a,state:s,relative:h,preventScrollReset:g,viewTransition:x})};return D.createElement("form",{ref:$,method:I,action:p,onSubmit:i?l:F,...j,"data-discover":!O&&e==="render"?"true":void 0})});jo.displayName="Form";function Lo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yn(e){let t=D.useContext(Me);return ae(t,Lo(e)),t}function Do(e,{target:t,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:f}={}){let u=Xt(),l=ke(),h=Qe(e,{relative:s});return D.useCallback(g=>{if(lo(g,t)){g.preventDefault();let x=r!==void 0?r:Xe(l)===Xe(h);u(e,{replace:x,state:i,preventScrollReset:a,relative:s,viewTransition:f})}},[l,u,h,r,i,t,e,a,s,f])}function Mo(e){ve(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=D.useRef(Wt(e)),r=D.useRef(!1),i=ke(),a=D.useMemo(()=>uo(i.search,r.current?null:t.current),[i.search]),s=Xt(),f=D.useCallback((u,l)=>{const h=Wt(typeof u=="function"?u(a):u);r.current=!0,s("?"+h,l)},[s,a]);return[a,f]}var $o=0,Io=()=>`__${String(++$o)}__`;function Ao(){let{router:e}=yn("useSubmit"),{basename:t}=D.useContext(we),r=Za();return D.useCallback(async(i,a={})=>{let{action:s,method:f,encType:u,formData:l,body:h}=ho(i,t);if(a.navigate===!1){let g=a.fetcherKey||Io();await e.fetch(g,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:l,body:h,formMethod:a.method||f,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:l,body:h,formMethod:a.method||f,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Ho(e,{relative:t}={}){let{basename:r}=D.useContext(we),i=D.useContext(Oe);ae(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...Qe(e||".",{relative:t})},f=ke();if(e==null){s.search=f.search;let u=new URLSearchParams(s.search),l=u.getAll("index");if(l.some(g=>g==="")){u.delete("index"),l.filter(x=>x).forEach(x=>u.append("index",x));let g=u.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function zo(e,t={}){let r=D.useContext(sn);ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=yn("useViewTransitionState"),a=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,i)||r.currentLocation.pathname,f=xe(r.nextLocation.pathname,i)||r.nextLocation.pathname;return gt(a.pathname,f)!=null||gt(a.pathname,s)!=null}[...So];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),No=()=>{const[e,t]=Mo(),r=Y.useMemo(()=>Object.fromEntries(e.entries()),[e]),i=Y.useCallback(h=>{const g={};return h.forEach(x=>{g[x]=e.get(x)}),g},[e]),a=Y.useCallback(h=>{const g=e.get(h);return g==null||g==null,g},[e]),s=Y.useCallback((h,g)=>{const x=new URLSearchParams(e);x.set(h,String(g)),t(x)},[e,t]),f=Y.useCallback(h=>{const g=new URLSearchParams(e);Object.entries(h).forEach(([x,j])=>{j!=null&&g.set(x,String(j))}),t(g)},[e,t]),u=Y.useCallback(h=>{const g=new URLSearchParams(e);g.delete(h),t(g)},[e,t]),l=Y.useCallback(h=>{const g=new URLSearchParams(e);h.forEach(x=>{g.delete(String(x))}),t(g)},[e,t]);return{getAll:()=>r,get:a,getMany:i,set:s,setMany:f,remove:u,removeMany:l}},Fo=()=>{const e=Xt(),t=ke(),r=No(),i=Y.useContext(bn),a=u=>{const l=new URL(u.path,"http://dummy-base");return u.params&&Object.entries(u.params).forEach(([h,g])=>{g!=null&&l.searchParams.set(h,String(g))}),l.pathname+l.search},s=Y.useCallback(u=>{const l=a(u);u.addToHistory!==!1?(e(l),i.addToHistory(l)):(e(l,{replace:!0}),i.popFromHistory(1),i.addToHistory(l))},[e]),f=Y.useCallback(u=>{const l=u||1;e(-l),i.popFromHistory(l)},[e]);return{currentPath:t.pathname,history:i.history,searchParams:r,goBack:f,goTo:s}},Wo=({isReady:e=!0,routes:t,children:r})=>{const i=Y.useRef([]),[a,s]=Y.useState([]),f=Y.useCallback(x=>{i.current=x,s(x)},[]),u=(x,j=!1)=>{let $=[...i.current];j&&($=$.slice(0,$.length-1)),$=[...$,x],f($)},l=x=>{let j="",$=[];return i.current.length===0?"/":(i.current.length<=x?(j=i.current[0],$=[j]):($=i.current.slice(0,i.current.length-x),j=$[$.length-1]),f($),j)},h=x=>{f(x)},g=t.map(x=>K.jsx(dn,{path:x.path,element:x.render}));return K.jsx(bn.Provider,{value:{history:a,addToHistory:u,popFromHistory:l,replaceHistory:h},children:K.jsx(To,{children:e&&K.jsxs(K.Fragment,{children:[r,K.jsx(no,{children:g})]})})})},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Uo=({children:e})=>{const t=Y.useRef([]),[r,i]=Y.useState([]),a=Y.useCallback(l=>{t.current=l,i(l)},[]),s=Y.useCallback(l=>t.current.some(h=>h===l),[]),f=Y.useCallback(l=>{s(l)||a([...t.current,l])},[s,a]),u=Y.useCallback(l=>{s(l)&&a(t.current.filter(g=>g!==l))},[s,a]);return K.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:f,hideItem:u},children:e})},et=()=>{const e=Y.useContext(wn),t=a=>e.visibleItems.some(s=>s===a),r=a=>{e.showItem(a)},i=a=>{e.hideItem(a)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:i}},Yo=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:i}=et(),[a,s]=Y.useState({isDragging:!1}),f=Y.useRef(null),u=Y.useRef(null),l=Y.useRef(null),[h,g]=Y.useState(0),x=E=>{s(E)},j=E=>{s(E),g(0)};return Zr({ref:l,onDrag:E=>{s(E);const p=u.current?.clientHeight||0;E.distanceY&&(g(E.distanceY<0?0:-E.distanceY),E.distanceY>=p-r&&(t?.(),j(E)))},onDragEnd:j,onDragStart:x}),{isVisible:i(e),drawerParentRef:f,drawerRef:u,drawerBottomDistance:h,handleRef:l}},qo=e=>{const{children:t,backgroundStyles:r,contentStyles:i,handle:a}=e,{isVisible:s,drawerParentRef:f,drawerRef:u,handleRef:l,drawerBottomDistance:h}=Yo(e);return K.jsx(K.Fragment,{children:s&&K.jsx("div",{ref:f,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},children:K.jsxs("div",{ref:u,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${h}px`,...i},onClick:g=>{g.stopPropagation()},children:[K.jsx("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...a?.styles},children:a?.render}),t]})})})},Bo=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),i=Y.useCallback(f=>{var u=Object.keys(f.currentTarget.elements),l=Object.values(f.currentTarget.elements),h=[];for(let g=0;g<u.length;g++){const x=u[g];if(t.findIndex($=>$.name===x)===-1)continue;const j=l[g].value;h.push({name:x,value:j})}return h},[e]),a=Y.useCallback(f=>{f.preventDefault();const u=i(f);e?.(u)},[e]);return{ref:r,submitForm:f=>{r.current&&r.current.requestSubmit()},handleFormSubmission:a}},Vo=e=>{const{fields:t,styles:r,submitButton:i}=e,{ref:a,handleFormSubmission:s,submitForm:f}=Bo(e),u=Y.useCallback(()=>t.map(l=>({...l.content,key:l.name})),[t]);return K.jsxs("form",{ref:a,onSubmit:s,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[u(),K.jsx("div",{onClick:f,style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",...i.styles},children:i.content})]})},Xo=({src:e,alt:t="",onClick:r,styles:i})=>K.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...i},onClick:()=>{r?.()}}),Go=je.div`
|
|
127
127
|
display: flex;
|
|
128
128
|
flex-direction: column;
|
|
129
129
|
font-family: inherit;
|
|
@@ -141,7 +141,7 @@ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}
|
|
|
141
141
|
input:-webkit-autofill {
|
|
142
142
|
background-color: #00000000;
|
|
143
143
|
}
|
|
144
|
-
`,
|
|
144
|
+
`,Ko=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,autoComplete:f="off",value:u,initialValue:l,type:h="text",onChange:g,onFocus:x,inputStyles:j,containerProps:$,step:E})=>{const p=O=>{g?.(O.currentTarget.value)},I=O=>{O.preventDefault(),O.stopPropagation(),x?.()};return K.jsxs(Go,{style:{width:"100%",maxWidth:"357px",gap:"8px",...$},children:[t,K.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",height:"47px",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",padding:"5px 15px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,fontSize:"16px",lineHeight:"24px",outline:"none",alignItems:"center",gap:"10px",...j},children:[r,K.jsx("input",{name:e,type:h,autoComplete:f,step:E,style:{flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none"},placeholder:s,value:u,defaultValue:l,onChange:p,onFocus:I}),i]}),a]})},Jo=({id:e,styles:t,children:r})=>{const{isItemVisible:i}=et();return K.jsx(K.Fragment,{children:i(e)&&K.jsx("div",{style:{width:"100%",minHeight:"100%",left:0,top:0,position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...t},children:r})})},Zo=({id:e,children:t,backgroundStyles:r,contentStyles:i,onClickOutsideModal:a})=>{const{isItemVisible:s}=et();return K.jsx(K.Fragment,{children:s(e)&&K.jsx("div",{style:{width:"100%",height:"100%",minHeight:"100vh",background:"#00000068",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...r},onClick:()=>{a?.()},children:K.jsx("div",{style:{width:"90%",maxWidth:"375px",height:"fit-content",minHeight:"80px",maxHeight:"50%",background:"#ffffff",borderRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1001,position:"relative",padding:"24px",...i},onClick:f=>{f.stopPropagation()},children:t})})})},Qo=e=>{const t=Y.useRef(null),r=Y.useRef(null),[i,a]=Y.useState(24),[s,f]=Y.useState(24),u=Y.useCallback(()=>{t.current&&a(t.current.clientHeight)},[t,t.current]),l=Y.useCallback(()=>{r.current&&f(r.current.clientHeight)},[r,r.current]),h=Y.useCallback(()=>{let g=0;return e.header?.visibility==="always"&&(g=g+(i||0)),e.footer?.visibility==="always"&&(g=g+(s||0)),g},[r,r.current]);return Y.useEffect(()=>{u()},[u,t,t.current]),Y.useEffect(()=>{l()},[l,r,r.current]),{header:{...e.header,visible:e.header!==void 0,height:e.header?.visibility==="fixed"?0:i,ref:t},footer:{...e.footer,visible:e.footer!==void 0,height:e.footer?.visibility==="fixed"?0:s,ref:r},page:{extraHeight:h()}}},es=je.div`
|
|
145
145
|
min-height: 100%;
|
|
146
146
|
max-height: 100%;
|
|
147
147
|
width: 100%;
|
|
@@ -161,4 +161,4 @@ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}
|
|
|
161
161
|
box-sizing: border-box;
|
|
162
162
|
position: relative;
|
|
163
163
|
}
|
|
164
|
-
`,es=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:f}=e,{footer:u,header:l}=Zo(e);return K.jsxs(Qo,{id:"page-container",styles:{...t},children:[l.visible&&K.jsx("div",{ref:l.ref,id:"page-header",style:{width:"100%",zIndex:99,position:l.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...l.styles},children:l.content}),K.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${l.height}px`,marginBottom:`-${u.height}px`},children:K.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:f?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${l.height}px`,paddingBottom:`${u.height}px`,...r},children:i})}),u.visible&&K.jsx("div",{ref:u.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:u.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...u.styles},children:u.content})]})},ts=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:f="",onClick:u,styles:l})=>K.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...l},onClick:()=>u?.(),children:K.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),rs=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=Y.useRef(!1),{isItemVisible:s,hideItem:f}=et();return Y.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>f(e),i*1e3))},[a,s,f]),K.jsx(K.Fragment,{children:s(e)&&K.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},ns=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>K.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...i},children:r});class is{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class as{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,i=!0)=>i?t===r:t.toUpperCase()===r.toUpperCase()}var ft={exports:{}},os=ft.exports,Lr;function ss(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(os,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",f="second",u="minute",l="hour",h="day",g="week",x="month",j="quarter",$="year",E="date",p="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var C=["th","st","nd","rd"],_=T%100;return"["+T+(C[(_-20)%10]||C[_]||C[0])+"]"}},U=function(T,C,_){var o=String(T);return!o||o.length>=C?T:""+Array(C+1-o.length).join(_)+T},V={s:U,z:function(T){var C=-T.utcOffset(),_=Math.abs(C),o=Math.floor(_/60),H=_%60;return(C<=0?"+":"-")+U(o,2,"0")+":"+U(H,2,"0")},m:function T(C,_){if(C.date()<_.date())return-T(_,C);var o=12*(_.year()-C.year())+(_.month()-C.month()),H=C.clone().add(o,x),m=_-H<0,n=C.clone().add(o+(m?-1:1),x);return+(-(o+(_-H)/(m?H-n:n-H))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:x,y:$,w:g,d:h,D:E,h:l,m:u,s:f,ms:s,Q:j}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",b={};b[v]=F;var w="$isDayjsObject",P=function(T){return T instanceof A||!(!T||!T[w])},y=function T(C,_,o){var H;if(!C)return v;if(typeof C=="string"){var m=C.toLowerCase();b[m]&&(H=m),_&&(b[m]=_,H=m);var n=C.split("-");if(!H&&n.length>1)return T(n[0])}else{var c=C.name;b[c]=C,H=c}return!o&&H&&(v=H),H||!o&&v},d=function(T,C){if(P(T))return T.clone();var _=typeof C=="object"?C:{};return _.date=T,_.args=arguments,new A(_)},k=V;k.l=y,k.i=P,k.w=function(T,C){return d(T,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var A=function(){function T(_){this.$L=y(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[w]=!0}var C=T.prototype;return C.parse=function(_){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(k.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var n=H.match(I);if(n){var c=n[2]-1||0,S=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(_),this.init()},C.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},C.$utils=function(){return k},C.isValid=function(){return this.$d.toString()!==p},C.isSame=function(_,o){var H=d(_);return this.startOf(o)<=H&&H<=this.endOf(o)},C.isAfter=function(_,o){return d(_)<this.startOf(o)},C.isBefore=function(_,o){return this.endOf(o)<d(_)},C.$g=function(_,o,H){return k.u(_)?this[o]:this.set(H,_)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(_,o){var H=this,m=!!k.u(o)||o,n=k.p(_),c=function(G,X){var J=k.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?J:J.endOf(h)},S=function(G,X){return k.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},M=this.$W,L=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case $:return m?c(1,0):c(31,11);case x:return m?c(1,L):c(0,L+1);case g:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return c(m?z-B:z+(6-B),L);case h:case E:return S(N+"Hours",0);case l:return S(N+"Minutes",1);case u:return S(N+"Seconds",2);case f:return S(N+"Milliseconds",3);default:return this.clone()}},C.endOf=function(_){return this.startOf(_,!1)},C.$set=function(_,o){var H,m=k.p(_),n="set"+(this.$u?"UTC":""),c=(H={},H[h]=n+"Date",H[E]=n+"Date",H[x]=n+"Month",H[$]=n+"FullYear",H[l]=n+"Hours",H[u]=n+"Minutes",H[f]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===x||m===$){var M=this.clone().set(E,1);M.$d[c](S),M.init(),this.$d=M.set(E,Math.min(this.$D,M.daysInMonth())).$d}else c&&this.$d[c](S);return this.init(),this},C.set=function(_,o){return this.clone().$set(_,o)},C.get=function(_){return this[k.p(_)]()},C.add=function(_,o){var H,m=this;_=Number(_);var n=k.p(o),c=function(L){var z=d(m);return k.w(z.date(z.date()+Math.round(L*_)),m)};if(n===x)return this.set(x,this.$M+_);if(n===$)return this.set($,this.$y+_);if(n===h)return c(1);if(n===g)return c(7);var S=(H={},H[u]=i,H[l]=a,H[f]=r,H)[n]||1,M=this.$d.getTime()+_*S;return k.w(M,this)},C.subtract=function(_,o){return this.add(-1*_,o)},C.format=function(_){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=_||"YYYY-MM-DDTHH:mm:ssZ",n=k.z(this),c=this.$H,S=this.$m,M=this.$M,L=H.weekdays,z=H.months,N=H.meridiem,W=function(X,J,te,Z){return X&&(X[J]||X(o,m))||te[J].slice(0,Z)},B=function(X){return k.s(c%12||12,X,"0")},G=N||function(X,J,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(O,function(X,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return k.s(o.$y,4,"0");case"M":return M+1;case"MM":return k.s(M+1,2,"0");case"MMM":return W(H.monthsShort,M,z,3);case"MMMM":return W(z,M);case"D":return o.$D;case"DD":return k.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,L,2);case"ddd":return W(H.weekdaysShort,o.$W,L,3);case"dddd":return L[o.$W];case"H":return String(c);case"HH":return k.s(c,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(c,S,!0);case"A":return G(c,S,!1);case"m":return String(S);case"mm":return k.s(S,2,"0");case"s":return String(o.$s);case"ss":return k.s(o.$s,2,"0");case"SSS":return k.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(_,o,H){var m,n=this,c=k.p(o),S=d(_),M=(S.utcOffset()-this.utcOffset())*i,L=this-S,z=function(){return k.m(n,S)};switch(c){case $:m=z()/12;break;case x:m=z();break;case j:m=z()/3;break;case g:m=(L-M)/6048e5;break;case h:m=(L-M)/864e5;break;case l:m=L/a;break;case u:m=L/i;break;case f:m=L/r;break;default:m=L}return H?m:k.a(m)},C.daysInMonth=function(){return this.endOf(x).$D},C.$locale=function(){return b[this.$L]},C.locale=function(_,o){if(!_)return this.$L;var H=this.clone(),m=y(_,o,!0);return m&&(H.$L=m),H},C.clone=function(){return k.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},T}(),R=A.prototype;return d.prototype=R,[["$ms",s],["$s",f],["$m",u],["$H",l],["$W",h],["$M",x],["$y",$],["$D",E]].forEach(function(T){R[T[1]]=function(C){return this.$g(C,T[0],T[1])}}),d.extend=function(T,C){return T.$i||(T(C,A,d),T.$i=!0),d},d.locale=y,d.isDayjs=P,d.unix=function(T){return d(1e3*T)},d.en=b[v],d.Ls=b,d.p={},d})}(ft)),ft.exports}var ls=ss();const dt=Ut(ls);var ht={exports:{}},us=ht.exports,Dr;function cs(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(us,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,f,u){var l=f.prototype;u.utc=function(p){var I={date:p,utc:!0,args:arguments};return new f(I)},l.utc=function(p){var I=u(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},l.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=l.init;l.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else g.call(this)};var x=l.utcOffset;l.utcOffset=function(p,I){var O=this.$utils().u;if(O(p))return this.$u?0:O(this.$offset)?x.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(i);if(!b)return null;var w=(""+b[0]).match(a)||["-",0,0],P=w[0],y=60*+w[1]+ +w[2];return y===0?0:P==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc(I);var U=this.clone();if(I)return U.$offset=F,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(F+V,r)).$offset=F,U.$x.$localOffset=V,U};var j=l.format;l.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,I)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var $=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():$.call(this)};var E=l.diff;l.diff=function(p,I,O){if(p&&this.$u===p.$u)return E.call(this,p,I,O);var F=this.local(),U=u(p).local();return E.call(F,U,I,O)}}})}(ht)),ht.exports}var fs=cs();const ds=Ut(fs);dt.extend(ds);class hs{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const i=()=>{t()?r():setTimeout(i,100)};i()});static waitForAsyncCondition=t=>new Promise(r=>{const i=async()=>{await t()?r():setTimeout(i,100)};i()});static differenceInMonths=(t,r)=>{let i=0;return i=(r.getFullYear()-t.getFullYear())*12,i-=t.getMonth(),i+=r.getMonth(),i};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),f=r.hour(),u=r.minute(),l=r.day();return{day:i,month:a,year:s,hour:f,minute:u,weekday:l}}catch{return}};static formatDateLocalTime=(t,r)=>t?dt.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?dt.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}exports.Button=En;exports.Carousel=ia;exports.Checkbox=aa;exports.Drawer=Yo;exports.FeedbackProvider=Wo;exports.Form=Bo;exports.Image=Vo;exports.InputField=Go;exports.Loader=Ko;exports.Modal=Jo;exports.NavigationProvider=Fo;exports.PageLayout=es;exports.ScrollHelper=is;exports.SvgImage=ts;exports.TextHelper=as;exports.TimeHelper=hs;exports.Toast=rs;exports.Typography=ns;exports.defaultBreakpoints=Qr;exports.useDidMount=oa;exports.useDrag=Zr;exports.useFeedback=et;exports.useFetch=sa;exports.useNavigation=No;exports.usePointer=Jr;exports.useResponsive=la;exports.useTranslations=fa;
|
|
164
|
+
`,ts=e=>{const{containerStyles:t,pageStyles:r,children:i,allowScroll:a=!0,floatingContent:s,reserveSpaceForScrollbar:f}=e,{footer:u,header:l}=Qo(e);return K.jsxs(es,{id:"page-container",styles:{...t},children:[l.visible&&K.jsx("div",{ref:l.ref,id:"page-header",style:{width:"100%",zIndex:99,position:l.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...l.styles},children:l.content}),K.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${l.height}px`,marginBottom:`-${u.height}px`},children:K.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:a?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:f?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${l.height}px`,paddingBottom:`${u.height}px`,...r},children:i})}),u.visible&&K.jsx("div",{ref:u.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:u.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...u.styles},children:u.content})]})},rs=({src:e,width:t="22",height:r="28",stroke:i,viewBox:a="0 0 22 28",fill:s="#000000",alt:f="",onClick:u,styles:l})=>K.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...l},onClick:()=>u?.(),children:K.jsx("svg",{width:t,height:r,viewBox:a,fill:s,stroke:i,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),ns=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=Y.useRef(!1),{isItemVisible:s,hideItem:f}=et();return Y.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>f(e),i*1e3))},[a,s,f]),K.jsx(K.Fragment,{children:s(e)&&K.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},is=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>K.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...i},children:r});class as{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class os{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,i=!0)=>i?t===r:t.toUpperCase()===r.toUpperCase()}var ft={exports:{}},ss=ft.exports,Lr;function ls(){return Lr||(Lr=1,function(e,t){(function(r,i){e.exports=i()})(ss,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",f="second",u="minute",l="hour",h="day",g="week",x="month",j="quarter",$="year",E="date",p="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var C=["th","st","nd","rd"],_=T%100;return"["+T+(C[(_-20)%10]||C[_]||C[0])+"]"}},U=function(T,C,_){var o=String(T);return!o||o.length>=C?T:""+Array(C+1-o.length).join(_)+T},V={s:U,z:function(T){var C=-T.utcOffset(),_=Math.abs(C),o=Math.floor(_/60),H=_%60;return(C<=0?"+":"-")+U(o,2,"0")+":"+U(H,2,"0")},m:function T(C,_){if(C.date()<_.date())return-T(_,C);var o=12*(_.year()-C.year())+(_.month()-C.month()),H=C.clone().add(o,x),m=_-H<0,n=C.clone().add(o+(m?-1:1),x);return+(-(o+(_-H)/(m?H-n:n-H))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:x,y:$,w:g,d:h,D:E,h:l,m:u,s:f,ms:s,Q:j}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",b={};b[v]=F;var w="$isDayjsObject",P=function(T){return T instanceof A||!(!T||!T[w])},y=function T(C,_,o){var H;if(!C)return v;if(typeof C=="string"){var m=C.toLowerCase();b[m]&&(H=m),_&&(b[m]=_,H=m);var n=C.split("-");if(!H&&n.length>1)return T(n[0])}else{var c=C.name;b[c]=C,H=c}return!o&&H&&(v=H),H||!o&&v},d=function(T,C){if(P(T))return T.clone();var _=typeof C=="object"?C:{};return _.date=T,_.args=arguments,new A(_)},k=V;k.l=y,k.i=P,k.w=function(T,C){return d(T,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var A=function(){function T(_){this.$L=y(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[w]=!0}var C=T.prototype;return C.parse=function(_){this.$d=function(o){var H=o.date,m=o.utc;if(H===null)return new Date(NaN);if(k.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var n=H.match(I);if(n){var c=n[2]-1||0,S=(n[7]||"0").substring(0,3);return m?new Date(Date.UTC(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],c,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(H)}(_),this.init()},C.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},C.$utils=function(){return k},C.isValid=function(){return this.$d.toString()!==p},C.isSame=function(_,o){var H=d(_);return this.startOf(o)<=H&&H<=this.endOf(o)},C.isAfter=function(_,o){return d(_)<this.startOf(o)},C.isBefore=function(_,o){return this.endOf(o)<d(_)},C.$g=function(_,o,H){return k.u(_)?this[o]:this.set(H,_)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(_,o){var H=this,m=!!k.u(o)||o,n=k.p(_),c=function(G,X){var J=k.w(H.$u?Date.UTC(H.$y,X,G):new Date(H.$y,X,G),H);return m?J:J.endOf(h)},S=function(G,X){return k.w(H.toDate()[G].apply(H.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},M=this.$W,L=this.$M,z=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case $:return m?c(1,0):c(31,11);case x:return m?c(1,L):c(0,L+1);case g:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return c(m?z-B:z+(6-B),L);case h:case E:return S(N+"Hours",0);case l:return S(N+"Minutes",1);case u:return S(N+"Seconds",2);case f:return S(N+"Milliseconds",3);default:return this.clone()}},C.endOf=function(_){return this.startOf(_,!1)},C.$set=function(_,o){var H,m=k.p(_),n="set"+(this.$u?"UTC":""),c=(H={},H[h]=n+"Date",H[E]=n+"Date",H[x]=n+"Month",H[$]=n+"FullYear",H[l]=n+"Hours",H[u]=n+"Minutes",H[f]=n+"Seconds",H[s]=n+"Milliseconds",H)[m],S=m===h?this.$D+(o-this.$W):o;if(m===x||m===$){var M=this.clone().set(E,1);M.$d[c](S),M.init(),this.$d=M.set(E,Math.min(this.$D,M.daysInMonth())).$d}else c&&this.$d[c](S);return this.init(),this},C.set=function(_,o){return this.clone().$set(_,o)},C.get=function(_){return this[k.p(_)]()},C.add=function(_,o){var H,m=this;_=Number(_);var n=k.p(o),c=function(L){var z=d(m);return k.w(z.date(z.date()+Math.round(L*_)),m)};if(n===x)return this.set(x,this.$M+_);if(n===$)return this.set($,this.$y+_);if(n===h)return c(1);if(n===g)return c(7);var S=(H={},H[u]=i,H[l]=a,H[f]=r,H)[n]||1,M=this.$d.getTime()+_*S;return k.w(M,this)},C.subtract=function(_,o){return this.add(-1*_,o)},C.format=function(_){var o=this,H=this.$locale();if(!this.isValid())return H.invalidDate||p;var m=_||"YYYY-MM-DDTHH:mm:ssZ",n=k.z(this),c=this.$H,S=this.$m,M=this.$M,L=H.weekdays,z=H.months,N=H.meridiem,W=function(X,J,te,Z){return X&&(X[J]||X(o,m))||te[J].slice(0,Z)},B=function(X){return k.s(c%12||12,X,"0")},G=N||function(X,J,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return m.replace(O,function(X,J){return J||function(te){switch(te){case"YY":return String(o.$y).slice(-2);case"YYYY":return k.s(o.$y,4,"0");case"M":return M+1;case"MM":return k.s(M+1,2,"0");case"MMM":return W(H.monthsShort,M,z,3);case"MMMM":return W(z,M);case"D":return o.$D;case"DD":return k.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return W(H.weekdaysMin,o.$W,L,2);case"ddd":return W(H.weekdaysShort,o.$W,L,3);case"dddd":return L[o.$W];case"H":return String(c);case"HH":return k.s(c,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(c,S,!0);case"A":return G(c,S,!1);case"m":return String(S);case"mm":return k.s(S,2,"0");case"s":return String(o.$s);case"ss":return k.s(o.$s,2,"0");case"SSS":return k.s(o.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(_,o,H){var m,n=this,c=k.p(o),S=d(_),M=(S.utcOffset()-this.utcOffset())*i,L=this-S,z=function(){return k.m(n,S)};switch(c){case $:m=z()/12;break;case x:m=z();break;case j:m=z()/3;break;case g:m=(L-M)/6048e5;break;case h:m=(L-M)/864e5;break;case l:m=L/a;break;case u:m=L/i;break;case f:m=L/r;break;default:m=L}return H?m:k.a(m)},C.daysInMonth=function(){return this.endOf(x).$D},C.$locale=function(){return b[this.$L]},C.locale=function(_,o){if(!_)return this.$L;var H=this.clone(),m=y(_,o,!0);return m&&(H.$L=m),H},C.clone=function(){return k.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},T}(),R=A.prototype;return d.prototype=R,[["$ms",s],["$s",f],["$m",u],["$H",l],["$W",h],["$M",x],["$y",$],["$D",E]].forEach(function(T){R[T[1]]=function(C){return this.$g(C,T[0],T[1])}}),d.extend=function(T,C){return T.$i||(T(C,A,d),T.$i=!0),d},d.locale=y,d.isDayjs=P,d.unix=function(T){return d(1e3*T)},d.en=b[v],d.Ls=b,d.p={},d})}(ft)),ft.exports}var us=ls();const dt=Ut(us);var ht={exports:{}},cs=ht.exports,Dr;function fs(){return Dr||(Dr=1,function(e,t){(function(r,i){e.exports=i()})(cs,function(){var r="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,f,u){var l=f.prototype;u.utc=function(p){var I={date:p,utc:!0,args:arguments};return new f(I)},l.utc=function(p){var I=u(this.toDate(),{locale:this.$L,utc:!0});return p?I.add(this.utcOffset(),r):I},l.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),h.call(this,p)};var g=l.init;l.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else g.call(this)};var x=l.utcOffset;l.utcOffset=function(p,I){var O=this.$utils().u;if(O(p))return this.$u?0:O(this.$offset)?x.call(this):this.$offset;if(typeof p=="string"&&(p=function(v){v===void 0&&(v="");var b=v.match(i);if(!b)return null;var w=(""+b[0]).match(a)||["-",0,0],P=w[0],y=60*+w[1]+ +w[2];return y===0?0:P==="+"?y:-y}(p),p===null))return this;var F=Math.abs(p)<=16?60*p:p;if(F===0)return this.utc(I);var U=this.clone();if(I)return U.$offset=F,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(F+V,r)).$offset=F,U.$x.$localOffset=V,U};var j=l.format;l.format=function(p){var I=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,I)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var $=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():$.call(this)};var E=l.diff;l.diff=function(p,I,O){if(p&&this.$u===p.$u)return E.call(this,p,I,O);var F=this.local(),U=u(p).local();return E.call(F,U,I,O)}}})}(ht)),ht.exports}var ds=fs();const hs=Ut(ds);dt.extend(hs);class ps{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const i=()=>{t()?r():setTimeout(i,100)};i()});static waitForAsyncCondition=t=>new Promise(r=>{const i=async()=>{await t()?r():setTimeout(i,100)};i()});static differenceInMonths=(t,r)=>{let i=0;return i=(r.getFullYear()-t.getFullYear())*12,i-=t.getMonth(),i+=r.getMonth(),i};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=dt.utc(t),i=r.date(),a=r.month(),s=r.year(),f=r.hour(),u=r.minute(),l=r.day();return{day:i,month:a,year:s,hour:f,minute:u,weekday:l}}catch{return}};static formatDateLocalTime=(t,r)=>t?dt.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?dt.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}exports.Button=En;exports.Carousel=ia;exports.Checkbox=aa;exports.Drawer=qo;exports.FeedbackProvider=Uo;exports.Form=Vo;exports.Image=Xo;exports.InputField=Ko;exports.Loader=Jo;exports.Modal=Zo;exports.NavigationProvider=Wo;exports.PageLayout=ts;exports.ScrollHelper=as;exports.SvgImage=rs;exports.TextHelper=os;exports.TimeHelper=ps;exports.Toast=ns;exports.Typography=is;exports.defaultBreakpoints=Qr;exports.useDidMount=oa;exports.useDrag=Zr;exports.useFeedback=et;exports.useFetch=sa;exports.useNavigation=Fo;exports.useOnScreen=la;exports.usePointer=Jr;exports.useResponsive=ua;exports.useTranslations=da;
|