@react-motion-router/core 1.0.4 → 1.1.0
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/build/RouteData.d.ts +3 -0
- package/build/RouterBase.d.ts +7 -3
- package/build/ScreenBase.d.ts +0 -1
- package/build/SharedElement.d.ts +4 -8
- package/build/common/hooks.d.ts +2 -1
- package/build/common/types.d.ts +12 -4
- package/build/common/utils.d.ts +10 -0
- package/build/common/utils.js +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.js +1 -1
- package/package.json +62 -62
- package/LICENSE +0 -201
package/build/RouterBase.d.ts
CHANGED
|
@@ -42,9 +42,13 @@ export default abstract class RouterBase<P extends RouterBaseProps = RouterBaseP
|
|
|
42
42
|
static defaultProps: {
|
|
43
43
|
config: {
|
|
44
44
|
animation: {
|
|
45
|
-
in: {
|
|
46
|
-
type:
|
|
47
|
-
duration:
|
|
45
|
+
readonly in: {
|
|
46
|
+
readonly type: "none";
|
|
47
|
+
readonly duration: 0;
|
|
48
|
+
};
|
|
49
|
+
readonly out: {
|
|
50
|
+
readonly type: "none";
|
|
51
|
+
readonly duration: 0;
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
54
|
};
|
package/build/ScreenBase.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ export default abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseP
|
|
|
54
54
|
animationFactory(animation?: AnimationKeyframeEffectConfig | AnimationConfig | ReducedAnimationConfigSet | AnimationConfigFactory): AnimationConfigSet;
|
|
55
55
|
onExit: () => void;
|
|
56
56
|
onEnter: () => void;
|
|
57
|
-
private setTransforms;
|
|
58
57
|
private setRef;
|
|
59
58
|
get resolvedPathname(): P["resolvedPathname"] | undefined;
|
|
60
59
|
render(): JSX.Element;
|
package/build/SharedElement.d.ts
CHANGED
|
@@ -61,10 +61,7 @@ export declare class SharedElementScene {
|
|
|
61
61
|
private _nodes;
|
|
62
62
|
private _name;
|
|
63
63
|
private _scrollPos;
|
|
64
|
-
private
|
|
65
|
-
private _y;
|
|
66
|
-
private _xRatio;
|
|
67
|
-
private _yRatio;
|
|
64
|
+
private _getScreenRect;
|
|
68
65
|
private _keepAlive;
|
|
69
66
|
constructor(name: string);
|
|
70
67
|
addNode(node: SharedElementNode | null): void;
|
|
@@ -78,10 +75,7 @@ export declare class SharedElementScene {
|
|
|
78
75
|
get y(): number;
|
|
79
76
|
get keepAlive(): boolean;
|
|
80
77
|
set scrollPos(_scrollPos: Vec2);
|
|
81
|
-
set
|
|
82
|
-
set y(_y: number);
|
|
83
|
-
set xRatio(_xRatio: number);
|
|
84
|
-
set yRatio(_yRatio: number);
|
|
78
|
+
set getScreenRect(_getScreenRect: () => DOMRect);
|
|
85
79
|
set keepAlive(_keepAlive: boolean);
|
|
86
80
|
isEmpty(): boolean;
|
|
87
81
|
}
|
|
@@ -129,6 +123,8 @@ export declare class SharedElement extends React.Component<SharedElementProps, S
|
|
|
129
123
|
get CSSText(): string;
|
|
130
124
|
get id(): string;
|
|
131
125
|
get transitionType(): "fade" | "morph" | "fade-through" | "cross-fade" | undefined;
|
|
126
|
+
onCloneAppended: (e: HTMLElement) => void;
|
|
127
|
+
onCloneRemove: (e: HTMLElement) => void;
|
|
132
128
|
keepAlive(_keepAlive: boolean): Promise<void>;
|
|
133
129
|
hidden(_hidden: boolean): Promise<void>;
|
|
134
130
|
private setRef;
|
package/build/common/hooks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NavigationBase } from "..";
|
|
1
|
+
import { NavigationBase, RouteProp } from "..";
|
|
2
2
|
export declare function useReducedMotion(): boolean;
|
|
3
3
|
export declare function useNavigation<T extends NavigationBase = NavigationBase>(): NavigationBase;
|
|
4
4
|
export declare function useMotion(): number;
|
|
5
|
+
export declare function useRoute<T>(): RouteProp<T>;
|
package/build/common/types.d.ts
CHANGED
|
@@ -65,11 +65,13 @@ export interface LazyExoticComponent<T extends React.ComponentType<any>> extends
|
|
|
65
65
|
}>;
|
|
66
66
|
preloaded: T | undefined;
|
|
67
67
|
}
|
|
68
|
+
export interface RouteProp<T> {
|
|
69
|
+
path: string | undefined;
|
|
70
|
+
params: T;
|
|
71
|
+
preloaded: boolean;
|
|
72
|
+
}
|
|
68
73
|
export interface ScreenComponentBaseProps<T extends PlainObject = {}, N extends NavigationBase = NavigationBase> {
|
|
69
|
-
route:
|
|
70
|
-
params: T;
|
|
71
|
-
preloaded: boolean;
|
|
72
|
-
};
|
|
74
|
+
route: RouteProp<T>;
|
|
73
75
|
navigation: N;
|
|
74
76
|
orientation: ScreenOrientation;
|
|
75
77
|
}
|
|
@@ -77,4 +79,10 @@ export type PlainObject<T = any> = {
|
|
|
77
79
|
[key: string]: T;
|
|
78
80
|
};
|
|
79
81
|
export type RouterEventMap = Pick<HTMLElementEventMap, "navigate" | "go-back" | "motion-progress" | "motion-progress-start" | "motion-progress-end" | "page-animation-start" | "page-animation-end" | "page-animation-cancel">;
|
|
82
|
+
export type NodeAppendedEvent = CustomEvent<{
|
|
83
|
+
node: Node;
|
|
84
|
+
}>;
|
|
85
|
+
export type NodeRemovedEvent = CustomEvent<{
|
|
86
|
+
node: Node;
|
|
87
|
+
}>;
|
|
80
88
|
export {};
|
package/build/common/utils.d.ts
CHANGED
|
@@ -29,3 +29,13 @@ export declare function lazy<T extends React.ComponentType<any>>(factory: () =>
|
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
31
|
export declare function prefetchRoute(path: string, routerData: RouterData): Promise<boolean>;
|
|
32
|
+
export declare const DEFAULT_ANIMATION: {
|
|
33
|
+
readonly in: {
|
|
34
|
+
readonly type: "none";
|
|
35
|
+
readonly duration: 0;
|
|
36
|
+
};
|
|
37
|
+
readonly out: {
|
|
38
|
+
readonly type: "none";
|
|
39
|
+
readonly duration: 0;
|
|
40
|
+
};
|
|
41
|
+
};
|
package/build/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={689:e=>{e.exports=require("react")}},t={};function r(n){var
|
|
1
|
+
var e={689:e=>{e.exports=require("react")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};(()=>{r.d(n,{Nu:()=>u,PV:()=>l,Po:()=>d,QN:()=>i,Vo:()=>h,cT:()=>a,e1:()=>c,fJ:()=>p,hR:()=>o,kI:()=>m,r2:()=>w,rL:()=>f,uZ:()=>s});var e=r(689),t=r.n(e);function o(e,t=!0){let r="";const n={};let o=0;for(let a in e){if(o<e.length){const t=e[a];let n=e.getPropertyValue(t);if("visibility"===t)n="visible";r+=`${t}:${n};`}else{if(!t)break;let r=a,o=e[r];if("string"==typeof o&&"cssText"!==r&&!r.includes("webkit")&&!r.includes("grid")){switch(r){case"offset":r="cssOffset";break;case"float":r="cssFloat";break;case"visibility":o="visible"}n[r]=o}}o++}return[r,n]}function a(e){const t={};for(const r in e)if(e[r]&&e[r].length&&"function"!=typeof e[r]){if(/^\d+$/.test(r))continue;if("offset"===r)continue;t[r]=e[r]}return t}function s(e,t,r){return e<t?t:r&&e>r?r:e}function i(e,t,r=window.location.origin){if(void 0===e||void 0===t)return e===t?{exact:!0,matchedPathname:t}:null;const n=new URLPattern(e,r),o=new URL(t,r),a=n.exec(o);let s="",i="";for(let r=0;r<e.length;r++){if(e[r]!==t[r]){i=t.substring(r);break}s+=e[r]}return a?{exact:e===t,matchedPathname:s,rest:i}:null}function c(e,t,r=window.location.origin){return t.some((t=>i(t,e,r)))}function u(e,t=window){return new Promise((r=>{queueMicrotask((()=>r(t.dispatchEvent(e))))}))}function l(e,t){return"string"==typeof t&&(t=new URL(t)),"string"!=typeof e&&(e=e.pathname),e=e.replace(/^\//,""),t.pathname.endsWith("/")||(t=new URL(t.href+"/")),new URL(e,t)}function f(e){const t=new URLSearchParams(decodeURI(e)).entries(),r={};for(const[e,n]of t){let t="";try{t=JSON.parse(n)}catch(e){console.warn("Non JSON serialisable value was passed as URL route param."),t=n}r[e]=t}return Object.keys(r).length?r:void 0}function p(e,t){return(t||f)(e)||{}}function d(e,t){try{return(t||function(e){return new URLSearchParams(e).toString()})(e)}catch(e){console.error(e),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function h(e){const r=t().lazy(e);return r.preload=()=>{const t=e();return t.then((e=>r.preloaded=e.default)).catch(console.error),t},r}function m(e,r){let n=r;return new Promise(((o,a)=>{let s=!1;for(;n;){const c=n.routes;if(t().Children.forEach(c,(r=>{if(s)return;if(!t().isValidElement(r))return;i(r.props.path,e)&&(s=!0,queueMicrotask((async()=>{if("preload"in r.props.component)try{await r.props.component.preload(),o(s)}catch(e){a(e)}})))})),s)break;n=r.parentRouterData}s||o(!1)}))}const w={in:{type:"none",duration:0},out:{type:"none",duration:0}}})();var o=n.r2,a=n.uZ,s=n.PV,i=n.rL,c=n.Nu,u=n.hR,l=n.cT,f=n.e1,p=n.Vo,d=n.QN,h=n.kI,m=n.Po,w=n.fJ;export{o as DEFAULT_ANIMATION,a as clamp,s as concatenateURL,i as defaultSearchParamsToObject,c as dispatchEvent,u as getCSSData,l as getStyleObject,f as includesRoute,p as lazy,d as matchRoute,h as prefetchRoute,m as searchParamsFromObject,w as searchParamsToObject};
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScreenChild, AnimationConfig, AnimationConfigFactory } from './common/types';
|
|
1
|
+
import { ScreenChild, AnimationConfig, AnimationConfigFactory, NodeAppendedEvent, NodeRemovedEvent } from './common/types';
|
|
2
2
|
import RouterData from './RouterData';
|
|
3
3
|
import NavigationBase from './NavigationBase';
|
|
4
4
|
import type { BackEvent, BackEventDetail, NavigateEvent, NavigateEventDetail, NavigateOptions, NavigationOptions, GoBackOptions } from './NavigationBase';
|
|
@@ -22,6 +22,8 @@ interface MotionEventsMap {
|
|
|
22
22
|
"motion-progress-end": MotionProgressEndEvent;
|
|
23
23
|
"go-back": BackEvent;
|
|
24
24
|
"navigate": NavigateEvent;
|
|
25
|
+
"node-appended": NodeAppendedEvent;
|
|
26
|
+
"node-removed": NodeRemovedEvent;
|
|
25
27
|
}
|
|
26
28
|
declare global {
|
|
27
29
|
interface GlobalEventHandlersEventMap extends MotionEventsMap {
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
var t={837:(t,e,n)=>{var i=n(689),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var i,o={},l=null,u=null;for(i in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!h.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:l,ref:u,props:o,_owner:r.current}}e.Fragment=o,e.jsx=l,e.jsxs=l},322:(t,e,n)=>{t.exports=n(837)},174:(t,e,n)=>{n.d(e,{Nu:()=>u,Po:()=>m,QN:()=>h,Vo:()=>v,cT:()=>a,e1:()=>l,fJ:()=>p,hR:()=>o,kI:()=>f,r2:()=>c,rL:()=>d,uZ:()=>r});var i=n(689),s=n.n(i);function o(t,e=!0){let n="";const i={};let s=0;for(let o in t){if(s<t.length){const e=t[o];let i=t.getPropertyValue(e);if("visibility"===e)i="visible";n+=`${e}:${i};`}else{if(!e)break;let n=o,s=t[n];if("string"==typeof s&&"cssText"!==n&&!n.includes("webkit")&&!n.includes("grid")){switch(n){case"offset":n="cssOffset";break;case"float":n="cssFloat";break;case"visibility":s="visible"}i[n]=s}}s++}return[n,i]}function a(t){const e={};for(const n in t)if(t[n]&&t[n].length&&"function"!=typeof t[n]){if(/^\d+$/.test(n))continue;if("offset"===n)continue;e[n]=t[n]}return e}function r(t,e,n){return t<e?e:n&&t>n?n:t}function h(t,e,n=window.location.origin){if(void 0===t||void 0===e)return t===e?{exact:!0,matchedPathname:e}:null;const i=new URLPattern(t,n),s=new URL(e,n),o=i.exec(s);let a="",r="";for(let n=0;n<t.length;n++){if(t[n]!==e[n]){r=e.substring(n);break}a+=t[n]}return o?{exact:t===e,matchedPathname:a,rest:r}:null}function l(t,e,n=window.location.origin){return e.some((e=>h(e,t,n)))}function u(t,e=window){return new Promise((n=>{queueMicrotask((()=>n(e.dispatchEvent(t))))}))}function c(t,e){return"string"==typeof e&&(e=new URL(e)),"string"!=typeof t&&(t=t.pathname),t=t.replace(/^\//,""),e.pathname.endsWith("/")||(e=new URL(e.href+"/")),new URL(t,e)}function d(t){const e=new URLSearchParams(decodeURI(t)).entries(),n={};for(const[t,i]of e){let e="";try{e=JSON.parse(i)}catch(t){console.warn("Non JSON serialisable value was passed as URL route param."),e=i}n[t]=e}return Object.keys(n).length?n:void 0}function p(t,e){return(e||d)(t)||{}}function m(t,e){try{return(e||function(t){return new URLSearchParams(t).toString()})(t)}catch(t){console.error(t),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function v(t){const e=s().lazy(t);return e.preload=()=>{const n=t();return n.then((t=>e.preloaded=t.default)).catch(console.error),n},e}function f(t,e){let n=e;return new Promise(((i,o)=>{let a=!1;for(;n;){const r=n.routes;if(s().Children.forEach(r,(e=>{if(a)return;if(!s().isValidElement(e))return;h(e.props.path,t)&&(a=!0,queueMicrotask((async()=>{if("preload"in e.props.component)try{await e.props.component.preload(),i(a)}catch(t){o(t)}})))})),a)break;n=e.parentRouterData}a||i(!1)}))}},623:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("doubletap",t)}}e.default=o},813:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.tap=0]="tap",t[t.longpress=1]="longpress",t[t.pinchstart=2]="pinchstart",t[t.pinch=3]="pinch",t[t.pinchend=4]="pinchend",t[t.rotatestart=5]="rotatestart",t[t.rotate=6]="rotate",t[t.rotateend=7]="rotateend",t[t.swipestart=8]="swipestart",t[t.swipe=9]="swipe",t[t.swipeend=10]="swipeend",t[t.panstart=11]="panstart",t[t.pan=12]="pan",t[t.panend=13]="panend",t[t.doubletap=14]="doubletap"}(n||(n={})),void 0===window.TouchEvent&&(window.TouchEvent=PointerEvent);class i extends TouchEvent{constructor(t,e){if(super(t,{touches:Array.from(e.touches),targetTouches:Array.from(e.targetTouches),changedTouches:Array.from(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!0,cancelable:!0}),t.includes("end")||e.type.includes("end"))return this.gestureTarget=e.changedTouches[0].target,this.x=e.changedTouches[0].clientX,void(this.y=e.changedTouches[0].clientY);this.gestureTarget=e.touches[0].target,this.x=e.touches[0].clientX,this.y=e.touches[0].clientY}}e.default=i},646:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t,e){super("longpress",t),this.duration=0,this.duration=e}}e.default=o},577:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PanEndEvent=e.PanStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="panstart";break;case"end":i="panend";break;default:i="pan"}super(i,t),this.velocity=e.velocity,this.translation={x:e.translation.x,y:e.translation.y,magnitude:e.translation.magnitude,clientX:e.translation.clientX,clientY:e.translation.clientY,clientMagnitude:e.translation.clientMagnitude}}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PanStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PanEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},630:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PinchEndEvent=e.PinchStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="pinchstart";break;case"end":i="pinchend";break;default:i="pinch"}super(i,t),Object.defineProperty(this,"scale",{value:e.scale,writable:!1})}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PinchStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PinchEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},859:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="rotatestart";break;case"end":i="rotateend";break;default:i="rotate"}super(i,t),this.anchor={x:e.anchor.x,y:e.anchor.y,clientX:e.anchor.clientX,clientY:e.anchor.clientY},Object.defineProperty(this,"rotation",{value:e.rotation,writable:!1}),this.rotationDeg=e.rotationDeg}}e.default=class extends a{constructor(t,e){super(t,e)}};e.RotateStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.RotateEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},224:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SwipeEndEvent=e.SwipeStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="swipestart";break;case"end":i="swipeend";break;default:i="swipe"}super(i,t),this.velocity=e.velocity,this.direction=e.direction}}e.default=class extends a{constructor(t,e){super(t,e)}};e.SwipeStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.SwipeEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},884:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("tap",t)}}e.default=o},878:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return s(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateEvent=e.RotateStartEvent=e.PinchEndEvent=e.PinchEvent=e.PinchStartEvent=e.PanEndEvent=e.PanEvent=e.PanStartEvent=e.SwipeEndEvent=e.SwipeEvent=e.SwipeStartEvent=e.DoubleTapEvent=e.LongPressEvent=e.GestureEvent=e.TapEvent=void 0;const r=a(n(813));e.GestureEvent=r.default;const h=a(n(646));e.LongPressEvent=h.default;const l=a(n(884));e.TapEvent=l.default;const u=a(n(623));e.DoubleTapEvent=u.default;const c=o(n(224));e.SwipeEvent=c.default,Object.defineProperty(e,"SwipeEndEvent",{enumerable:!0,get:function(){return c.SwipeEndEvent}}),Object.defineProperty(e,"SwipeStartEvent",{enumerable:!0,get:function(){return c.SwipeStartEvent}});const d=o(n(577));e.PanEvent=d.default,Object.defineProperty(e,"PanEndEvent",{enumerable:!0,get:function(){return d.PanEndEvent}}),Object.defineProperty(e,"PanStartEvent",{enumerable:!0,get:function(){return d.PanStartEvent}});const p=o(n(630));e.PinchEvent=p.default,Object.defineProperty(e,"PinchEndEvent",{enumerable:!0,get:function(){return p.PinchEndEvent}}),Object.defineProperty(e,"PinchStartEvent",{enumerable:!0,get:function(){return p.PinchStartEvent}});const m=o(n(859));e.RotateEvent=m.default,Object.defineProperty(e,"RotateEndEvent",{enumerable:!0,get:function(){return m.RotateEndEvent}}),Object.defineProperty(e,"RotateStartEvent",{enumerable:!0,get:function(){return m.RotateStartEvent}});const v=n(47);var f;!function(t){t[t.right=0]="right",t[t.up=1]="up",t[t.left=2]="left",t[t.down=3]="down"}(f||(f={}));class g{constructor(){this.touchStart=new TouchEvent("touchstart")||{},this.touchMove=new TouchEvent("touchmove")||{},this.touchEnd=new TouchEvent("touchend")||{},this.touchCancel=new TouchEvent("touchcancel")||{},this.velocity=0,this.dxDy=new v.Vec2(0,0),this.scale=1,this.rotation=0,this.rotationDeg=0,this.anchor=new v.Vec2(0,0),this.octant=0,this.isPanning=!1,this.isPinching=!1,this.isSwiping=!1,this.isRotating=!1,this.touchStartTime=0,this.touchEndTime=0,this.lastTouchTime=0,this.taps=0,this.scaleBase=0,this.touchMoved=!1,this.touchDown=!1,this.shouldFire=!1,this.pointers=0,this.isLongPress=!1,this.longPressTimeout=0,this.touchStartListener=this.onTouchStart.bind(this),this.touchMoveListener=this.onTouchMove.bind(this),this.touchEndListener=this.onTouchEnd.bind(this),this.touchCancelListener=this.onTouchCancel.bind(this),this.currentTarget=window,this.config={longPressDuration:500,tapDelay:500,minPointers:1,numberOfTaps:0},g.listening||(TouchEvent&&window.addEventListener("touchstart",this.touchStartListener,!0),g.listening=!0)}bind(t){this.unbind(this.currentTarget),t.addEventListener("touchmove",this.touchMoveListener,!0),t.addEventListener("touchend",this.touchEndListener,!0),t.addEventListener("touchcancel",this.touchCancelListener,!0),this.currentTarget=t}unbind(t){t.removeEventListener("touchmove",this.touchMoveListener),t.removeEventListener("touchend",this.touchEndListener),t.removeEventListener("touchcancel",this.touchCancelListener)}clean(){this.touchMoved=!1,this.touchStartTime=0,this.touchDown=!1,this.scaleBase=0,this.longPressTimeout&&!this.isLongPress&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=0),this.isLongPress=!1}onPointerLeave(t){if(!t.touches.length){if(this.isSwiping){const e=new c.SwipeEndEvent(t,{velocity:this.velocity,direction:f[(0,v.closest)(this.octant,[0,1,2,3])]});this.dispatchEvent(e),this.isSwiping=!1}if(this.isPanning){const e=new d.PanEndEvent(t,{translation:this.dxDy,velocity:this.velocity});this.dispatchEvent(e),this.isPanning=!1}}if(1===t.touches.length){if(this.scaleBase=0,this.isPinching){const e=new p.PinchEndEvent(t,{scale:this.scale});this.dispatchEvent(e),this.isPinching=!1}if(this.isRotating){const e=new m.RotateEndEvent(t,{rotation:this.rotation,rotationDeg:this.rotationDeg,anchor:this.anchor});this.dispatchEvent(e),this.isRotating=!1}}}dispatchEvent(t){queueMicrotask((()=>{this.currentTarget.dispatchEvent(t)}))}onTouchStart(t){this.currentTarget!==t.touches[0].target&&(this.clean(),this.unbind(this.currentTarget),this.pointers=this.touchEnd.touches.length,this.taps=0),this.touchStart=t;const e=parseInt(t.touches[0].target.dataset.minpointers||"0")||this.config.minPointers;if(this.touchStart.touches.length<e)return void(this.shouldFire=!1);this.shouldFire=!0,this.touchStartTime=t.timeStamp,this.touchDown=!0,this.pointers||this.bind(t.touches[0].target),this.pointers=this.touchStart.touches.length;const n=parseFloat(this.currentTarget.dataset.longpressduration||"0")||this.config.longPressDuration;if(this.longPressTimeout||(this.longPressTimeout=setTimeout((()=>{if(!this.touchMoved&&this.touchDown){const t=Date.now()-this.touchStartTime,e=new h.default(this.touchStart,t);this.dispatchEvent(e),this.isLongPress=!0,this.longPressTimeout=0}}),n)),this.touchStart.touches.length>1){const t=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),e=new v.Vec2(this.touchStart.touches[1].clientX,this.touchStart.touches[1].clientY);this.scaleBase=t.substract(e).magnitude}else this.scaleBase=0}onTouchMove(t){if(!this.shouldFire)return;if(this.touchMoved=!0,this.touchMove=t,t.touches.length>1&&this.touchStart.touches.length>1&&(t.touches[1].clientX!==this.touchStart.touches[1].clientX||t.touches[1].clientY!==this.touchStart.touches[1].clientY)){const e=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[1].clientX,this.touchMove.touches[1].clientY),i=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),s=e.substract(n);if(this.scaleBase&&Math.abs(this.scaleBase-s.magnitude)>10){const e=s.magnitude/this.scaleBase;if(this.scale=e,this.isPinching){const n=new p.default(t,{scale:e});this.dispatchEvent(n)}else{const n=new p.PinchStartEvent(t,{scale:e});this.dispatchEvent(n),this.isPinching=!0}}this.anchor=e;let o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(o<0?o+=1.5708:o-=1.5708,this.rotation=o,this.rotationDeg=180*o/Math.PI,this.anchor=this.anchor,this.isRotating){const e=new m.default(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e)}else{const e=new m.RotateStartEvent(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e),this.isRotating=!0}}const e=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY).substract(e),i=n.magnitude,s={x:n.x/i,y:n.y/i},o=Math.atan2(s.y,s.x);this.octant=Math.round(4*o/(2*Math.PI)+4)%4;const a=(t.timeStamp-this.touchStart.timeStamp)/1e3,r=n.magnitude/a;if(this.isSwiping){const e=new c.default(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e)}else{const e=new c.SwipeStartEvent(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e),this.isSwiping=!0}if(this.dxDy=n,this.velocity=r,this.isPanning){const e=new d.default(t,{translation:n,velocity:r});this.dispatchEvent(e)}else{const e=new d.PanStartEvent(t,{translation:n,velocity:r});this.dispatchEvent(e),this.isPanning=!0}}onTouchEnd(t){const e=parseInt(this.currentTarget.dataset.numberoftaps||"0")||this.config.numberOfTaps;if(this.taps++,this.shouldFire=Boolean(this.taps>e),this.shouldFire){this.touchEnd=t,this.touchEndTime=t.timeStamp;const n=parseFloat(this.currentTarget.dataset.tapdelay||"0")||this.config.tapDelay;if(!this.touchMoved&&!this.isLongPress)if(1===this.taps||this.touchEndTime-this.lastTouchTime<n){if(this.taps%2===e){const e=new u.default(t);this.dispatchEvent(e),this.taps=0}const n=new l.default(t);this.dispatchEvent(n)}else this.taps=0}this.pointers=this.touchEnd.touches.length,this.lastTouchTime=this.touchEndTime,this.onPointerLeave(t),this.unbind(this.currentTarget),this.clean()}onTouchCancel(t){this.shouldFire&&(this.touchCancel=t,this.unbind(this.currentTarget),this.clean())}}function y(t){const e=t.type;t.composedPath().forEach((n=>{if(n instanceof HTMLElement){const i=n[_[e]];if("function"!=typeof i)return;i.apply(n,[t])}}))}g.listening=!1,e.default=g,window.GLOBAL_EVENT_DISPATCHER||(window.addEventListener("tap",y,{passive:!0}),window.addEventListener("longpress",y,{passive:!0}),window.addEventListener("doubletap",y,{passive:!0}),window.addEventListener("swipestart",y,{passive:!0}),window.addEventListener("swipe",y,{passive:!0}),window.addEventListener("swipeend",y,{passive:!0}),window.addEventListener("panstart",y,{passive:!0}),window.addEventListener("pan",y,{passive:!0}),window.addEventListener("panend",y,{passive:!0}),window.addEventListener("pinchstart",y,{passive:!0}),window.addEventListener("pinch",y,{passive:!0}),window.addEventListener("pinchend",y,{passive:!0}),window.addEventListener("rotatestart",y,{passive:!0}),window.addEventListener("rotate",y,{passive:!0}),window.addEventListener("rotateend",y,{passive:!0}));const _={tap:"ontap",doubletap:"ondoubletap",longpress:"onlongpress",swipestart:"onswipestart",swipe:"onswipe",swipeend:"onswipeend",panstart:"onpanstart",pan:"onpan",panend:"onpanend",pinchstart:"onpinchstart",pinch:"onpinch",pinchend:"onpinchend",rotatestart:"onrotatestart",rotate:"onrotate",rotateend:"onrotateend"};TouchEvent&&(window.gestureProvider=new g),window.GLOBAL_EVENT_DISPATCHER||(window.GLOBAL_EVENT_DISPATCHER=y)},47:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.closest=e.Vec2=e.assert=void 0,e.assert=function(t,e){if(!t)throw new Error(e)};e.Vec2=class{constructor(t,e){this._x=0,this._y=0,this._clientX=0,this._clientY=0,this._clientX=t,this._clientY=e,this._x=this.translateX(t),this._y=this.translateY(e)}translateY(t){return-(t-window.innerHeight/2)}translateX(t){return t-window.innerWidth/2}get x(){return this._x}get y(){return this._y}get clientX(){return this._clientX}get clientY(){return this._clientY}set x(t){this._clientX=t,this._x=this.translateX(t)}set y(t){this._clientY=t,this._y=this.translateY(t)}add(t){return this._x+=t.x,this._y+=t.y,this._clientX+=t.clientX,this._clientY+=t.clientY,this}substract(t){return this._x-=t.x,this._y-=t.y,this._clientX-=t.clientX,this._clientY-=t.clientY,this}dot(t){return this._x*t.x+this._y*t.y}get magnitude(){return Math.sqrt(Math.pow(this._x,2)+Math.pow(this._y,2))}get clientMagnitude(){return Math.sqrt(Math.pow(this._clientX,2)+Math.pow(this._clientY,2))}},e.closest=function(t,e){return e.reduce(((e,n)=>{let i=Math.abs(e-t),s=Math.abs(n-t);return i===s?e>n?e:n:s<i?n:e}))}},689:t=>{t.exports=require("react")}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};(()=>{n.d(i,{ee:()=>j,rN:()=>U,PM:()=>O,y_:()=>p,DC:()=>r,GW:()=>g,sV:()=>s,RG:()=>D,GI:()=>z,rJ:()=>R,uZ:()=>l.uZ,r2:()=>l.r2,rL:()=>l.rL,Nu:()=>l.Nu,hR:()=>l.hR,cT:()=>l.cT,e1:()=>l.e1,Vo:()=>l.Vo,QN:()=>l.QN,kI:()=>l.kI,Po:()=>l.Po,fJ:()=>l.fJ,nc:()=>I,HJ:()=>T,JZ:()=>N});var t=n(689),e=n.n(t);class s{constructor(t,e){this._parentRouterData=null,this._childRouterData=null,this._dispatchEvent=null,this._addEventListener=null,this._removeEventListener=null,this._currentPath="",this._routesData=new Map,this._backNavigating=!1,this._gestureNavigating=!1,this._mountedScreen=null,this._animation={in:{type:"none",duration:0},out:{type:"none",duration:0}},this._ghostLayer=null,this.routerInstance=t,e&&(this.navigation=e)}destructor(){this.parentRouterData&&(this.parentRouterData.childRouterData=null)}prefetchRoute(t){return(0,l.kI)(t,this)}set parentRouterData(t){this._parentRouterData=t,this._parentRouterData&&(this._parentRouterData.childRouterData=this)}set childRouterData(t){var e;const n=null===(e=this._childRouterData)||void 0===e?void 0:e.deref();if(void 0!==n&&t&&t.routerId!==n.routerId)throw new Error("It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.");this._childRouterData=t?new WeakRef(t):null}set dispatchEvent(t){this._dispatchEvent=t}set addEventListener(t){this._addEventListener=t}set removeEventListener(t){this._removeEventListener=t}set currentPath(t){this._currentPath=t}set routesData(t){this._routesData=t}set navigation(t){this._navigation=t}set animation(t){this._animation=t}set ghostLayer(t){this._ghostLayer=t}set backNavigating(t){this._backNavigating=t}set gestureNavigating(t){this._gestureNavigating=t}set paramsSerializer(t){this._paramsSerializer=t}set paramsDeserializer(t){this._paramsDeserializer=t}set mountedScreen(t){this._mountedScreen=t}get mountedScreen(){return this._mountedScreen}get routerId(){return this.routerInstance.id}get routes(){return this.routerInstance.props.children}get parentRouterData(){return this._parentRouterData}get childRouterData(){var t,e;return null!==(e=null===(t=this._childRouterData)||void 0===t?void 0:t.deref())&&void 0!==e?e:null}get dispatchEvent(){return this._dispatchEvent}get addEventListener(){return this._addEventListener}get removeEventListener(){return this._removeEventListener}get currentPath(){return this._currentPath}get routesData(){return this._routesData}get scrollRestorationData(){return s._scrollRestorationData}get navigation(){return this._navigation}get animation(){return this._animation}get ghostLayer(){return this._ghostLayer}get backNavigating(){return this._backNavigating}get gestureNavigating(){return this._gestureNavigating}get paramsSerializer(){return this._paramsSerializer}get paramsDeserializer(){return this._paramsDeserializer}}s._scrollRestorationData=new class{constructor(){this._map=new Map}set(t,e={x:0,y:0}){this._map.set(t,e)}get(t){return this._map.get(t)}};const o=(0,t.createContext)(null);class a{constructor(){this._map=new Map,this.mutationObserver=new MutationObserver(this.observeMutations.bind(this));const{head:t}=document;this.mutationObserver.observe(t,{childList:!0}),Array.from(t.querySelectorAll("meta")).forEach((t=>{this.mutationObserver.observe(t,{attributes:!0})})),Array.from(t.querySelectorAll("meta")).forEach(this.metaDataFromNode.bind(this))}get(t){const e=this.getMetaKey(t),n=this._map.get(e);if(!n)return;let i;return i=n.includes(",")&&n.includes("=")?n.split(/,\s*/).map((t=>t.split("="))):n,i}set(t,e){const n=this.getMetaKey(t),i=this.getMetaContent(e);this._map.set(n,i),this.updateMetaElement(n,i)}has(t){const e=this.getMetaKey(t);return this._map.has(e)}delete(t){var e;const n=this.getMetaKey(t);this._map.delete(n),null===(e=document.head.querySelector(`meta[${n}]`))||void 0===e||e.remove()}clear(){document.head.querySelectorAll("meta").forEach((t=>t.remove()))}entries(){return this._map.entries()}[Symbol.iterator](){return this.entries()}get size(){return this._map.size}observeMutations(t){for(const e of t){if("attributes"===e.type){const t=e.target;this.metaDataFromNode(t)}if("childList"!==e.type)return;e.removedNodes.forEach((t=>{if("META"===t.nodeName){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),n=[e.nodeName,e.value].join("=");this._map.has(n)&&this._map.delete(n)}})),e.addedNodes.forEach((t=>{"META"===t.nodeName&&this.metaDataFromNode(t)}))}}metaDataFromNode(t){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),[n]=Array.from(t.attributes).filter((t=>"content"===t.nodeName)),i=[e.nodeName,e.value].join("=");this._map.set(i,null==n?void 0:n.value)}getMetaKey(t){let e;return e="string"==typeof t?`name=${t}`:t.join("="),e}getMetaContent(t){if(!t)return;let e;return e="string"==typeof t?t:t.map((t=>t.join("="))).join(", "),e}updateMetaElement(t,e){const n=document.querySelector(`meta[${t}]`)||document.createElement("meta"),i=t.split("=");n.setAttribute(...i),e?n.setAttribute("content",e):n.removeAttribute("content"),n.parentElement||document.head.appendChild(n)}}class r{constructor(t,e,n=!1,i=null){var s;this._metaData=new a,this._currentParams={},this.popStateListener=t=>{var e;this._routerId,this.history.state.get("routerId");const n=null===(e=r.rootNavigatorRef)||void 0===e?void 0:e.deref(),i=(null==n?void 0:n.routerId)===this.routerId;(null===this.history.state.get("routerId")&&i||this.history.state.get("routerId")===this._routerId)&&this.onPopState(t)},this.routerData=e,this._disableBrowserRouting=n,this._routerId=t;const o=null===(s=r.rootNavigatorRef)||void 0===s?void 0:s.deref();o&&o.isInDocument||(r.rootNavigatorRef=new WeakRef(this)),window.addEventListener("popstate",this.popStateListener)}destructor(){var t;const e=null===(t=r.rootNavigatorRef)||void 0===t?void 0:t.deref();(null==e?void 0:e.routerId)===this.routerId&&(r.rootNavigatorRef=null),window.removeEventListener("popstate",this.popStateListener)}addEventListener(t,e,n){var i,s;null===(s=(i=this.routerData).addEventListener)||void 0===s||s.call(i,t,e,n)}removeEventListener(t,e,n){var i,s;return null===(s=(i=this.routerData).removeEventListener)||void 0===s?void 0:s.call(i,t,e,n)}get disableBrowserRouting(){return this._disableBrowserRouting}get routerId(){return this._routerId}canGoBack(){return this.history.canGoBack()}getNavigatorById(t,e){var n;const i=null!=e?e:null===(n=r.rootNavigatorRef)||void 0===n?void 0:n.deref();return i.routerId===t?i:i.routerData.childRouterData?void this.getNavigatorById(t,i.routerData.childRouterData.navigation):null}prefetchRoute(t){return this.routerData.prefetchRoute(t)}get dispatchEvent(){return this.routerData.dispatchEvent}get paramsDeserializer(){return this.routerData.paramsDeserializer}get paramsSerializer(){return this.routerData.paramsSerializer}get history(){return this._history}get metaData(){return this._metaData}get isInDocument(){return Boolean(document.getElementById(`${this.routerId}`))}}r.rootNavigatorRef=null;var h=n(322),l=n(174);class u{constructor(){this._play=!0,this._isPlaying=!1,this._currentScreen=null,this._nextScreen=null,this._progressUpdateID=0,this._pseudoElementInAnimation=null,this._pseudoElementOutAnimation=null,this._inAnimation=null,this._outAnimation=null,this._playbackRate=1,this._gestureNavigating=!1,this._backNavigating=!1,this._onEnd=null,this._onProgress=null,this._shouldAnimate=!0,this._dispatchEvent=null,this._addEventListener=null}updateProgress(){var t,e,n,i;if(this._gestureNavigating&&!this._play)return void window.cancelAnimationFrame(this._progressUpdateID);(()=>{this._onProgress&&this._onProgress(this.progress)})(),this._progressUpdateID=window.requestAnimationFrame(this.updateProgress.bind(this));const s=()=>{window.cancelAnimationFrame(this._progressUpdateID);const t=this._gestureNavigating?0:100;this.progress!==t&&this._onProgress&&this._onProgress(t)};Promise.all([null===(t=this._inAnimation)||void 0===t?void 0:t.finished,null===(e=this._outAnimation)||void 0===e?void 0:e.finished,null===(n=this._pseudoElementInAnimation)||void 0===n?void 0:n.finished,null===(i=this._pseudoElementOutAnimation)||void 0===i?void 0:i.finished]).then(s).catch(s)}reset(){this._onEnd=null,this._playbackRate=1,this._play=!0,this._gestureNavigating=!1}finish(){var t,e,n,i;null===(t=this._inAnimation)||void 0===t||t.finish(),null===(e=this._outAnimation)||void 0===e||e.finish(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.finish(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.finish()}cancel(){var t,e,n,i,s;null===(t=this._inAnimation)||void 0===t||t.cancel(),null===(e=this._outAnimation)||void 0===e||e.cancel(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.cancel(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.cancel(),this.reset();const o=new CustomEvent("page-animation-cancel",{bubbles:!0});null===(s=this.dispatchEvent)||void 0===s||s.call(this,o)}cleanUpAnimation(t){t&&(t.commitStyles(),t.cancel())}async animate(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p;if(this._isPlaying&&(this.cancel(),this._onEnd&&this._onEnd(),this.reset()),this._currentScreen&&this._nextScreen&&this._shouldAnimate){if(this._gestureNavigating&&await this._currentScreen.mounted(!0),this._backNavigating?(this._currentScreen.zIndex=1,this._nextScreen.zIndex=0):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1),this._onProgress&&this._onProgress(this.progress),this._onExit&&this._shouldAnimate&&this._onExit(),await this._nextScreen.mounted(!0),this._outAnimation=this._currentScreen.animation,this._pseudoElementOutAnimation=this._currentScreen.pseudoElementAnimation,this._inAnimation=this._nextScreen.animation,this._pseudoElementInAnimation=this._nextScreen.pseudoElementAnimation,this._isPlaying=!0,this._inAnimation&&this._outAnimation){if(!this._shouldAnimate)return this.finish(),this._isPlaying=!1,void(this._shouldAnimate=!0);if(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate,this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate),this._gestureNavigating){const s=(null===(t=this._inAnimation.effect)||void 0===t?void 0:t.getTiming().duration)||this.duration,o=(null===(e=this._outAnimation.effect)||void 0===e?void 0:e.getTiming().duration)||this.duration;if(this._inAnimation.currentTime=Number(s),this._outAnimation.currentTime=Number(o),this._pseudoElementInAnimation){const t=(null===(n=this._pseudoElementInAnimation.effect)||void 0===n?void 0:n.getTiming().duration)||this.duration;this._pseudoElementInAnimation.currentTime=Number(t)}if(this._pseudoElementOutAnimation){const t=(null===(i=this._pseudoElementOutAnimation.effect)||void 0===i?void 0:i.getTiming().duration)||this.duration;this._pseudoElementOutAnimation.currentTime=Number(t)}}await Promise.all([this._inAnimation.ready,this._outAnimation.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),this._play?(this._outAnimation.play(),this._inAnimation.play(),null===(h=this._pseudoElementInAnimation)||void 0===h||h.play(),null===(l=this._pseudoElementOutAnimation)||void 0===l||l.play()):(this._inAnimation.pause(),this._outAnimation.pause(),null===(a=this._pseudoElementInAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementOutAnimation)||void 0===r||r.pause(),this._isPlaying=!1);const m=new CustomEvent("page-animation-start",{bubbles:!0});null===(u=this.dispatchEvent)||void 0===u||u.call(this,m),this.updateProgress(),await Promise.all([this._outAnimation.finished,this._inAnimation.finished,null===(c=this._pseudoElementInAnimation)||void 0===c?void 0:c.finished,null===(d=this._pseudoElementOutAnimation)||void 0===d?void 0:d.finished]),this.cleanUpAnimation(this._inAnimation),this.cleanUpAnimation(this._outAnimation),this._inAnimation=null,this._outAnimation=null,this._isPlaying=!1;const v=new CustomEvent("page-animation-end",{bubbles:!0});null===(p=this.dispatchEvent)||void 0===p||p.call(this,v),this._gestureNavigating&&.5!==this._playbackRate?(this._nextScreen.zIndex=0,this._currentScreen.zIndex=1,await this._nextScreen.mounted(!1)):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1,this._currentScreen.mounted(!1)),this._onEnd&&this._onEnd()}}else this._shouldAnimate=!0}set onProgress(t){this._onProgress=t}set onEnd(t){this._onEnd=t}set shouldAnimate(t){this._shouldAnimate=t}set playbackRate(t){this._playbackRate=t,this._inAnimation&&this._outAnimation&&(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate),this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate)}set gestureNavigating(t){this._gestureNavigating=t}set backNavigating(t){this._backNavigating=t}set play(t){var e,n,i,s,o,a,r,h;this._play!==t&&(this._play=t,this._play&&this._gestureNavigating&&this.updateProgress(),t?(null===(e=this._inAnimation)||void 0===e||e.play(),null===(n=this._outAnimation)||void 0===n||n.play(),null===(i=this._pseudoElementInAnimation)||void 0===i||i.play(),null===(s=this._pseudoElementOutAnimation)||void 0===s||s.play()):(null===(o=this._inAnimation)||void 0===o||o.pause(),null===(a=this._outAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementInAnimation)||void 0===r||r.pause(),null===(h=this._pseudoElementOutAnimation)||void 0===h||h.pause()))}set progress(t){var e,n,i,s,o,a,r,h;this._onProgress&&this._onProgress(t);{let o=(null===(n=null===(e=this._inAnimation)||void 0===e?void 0:e.effect)||void 0===n?void 0:n.getTiming().duration)||this.duration;const a=t/100*Number(o);let r=(null===(s=null===(i=this._outAnimation)||void 0===i?void 0:i.effect)||void 0===s?void 0:s.getTiming().duration)||this.duration;const h=t/100*Number(r);this._inAnimation&&this._outAnimation&&(this._inAnimation.currentTime=a,this._outAnimation.currentTime=h)}{let e=(null===(a=null===(o=this._pseudoElementInAnimation)||void 0===o?void 0:o.effect)||void 0===a?void 0:a.getTiming().duration)||this.duration;const n=t/100*Number(e);let i=(null===(h=null===(r=this._pseudoElementOutAnimation)||void 0===r?void 0:r.effect)||void 0===h?void 0:h.getTiming().duration)||this.duration;const s=t/100*Number(i);this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.currentTime=n),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.currentTime=s)}}set currentScreen(t){this._currentScreen=t}set nextScreen(t){this._nextScreen=t,this._currentScreen||(t.mounted(!0,!1),this._nextScreen=null)}set onExit(t){this._onExit=t}set addEventListener(t){this._addEventListener=t}set dispatchEvent(t){this._dispatchEvent=t}get addEventListener(){return this._addEventListener}get dispatchEvent(){return this._dispatchEvent}get duration(){var t,e,n,i;const s=null===(t=this._currentScreen)||void 0===t?void 0:t.duration,o=null===(e=this._nextScreen)||void 0===e?void 0:e.duration,a=null===(n=this._currentScreen)||void 0===n?void 0:n.pseudoElementDuration,r=null===(i=this._nextScreen)||void 0===i?void 0:i.pseudoElementDuration;return Math.max(Number(s),Number(o),Number(a),Number(r))||0}get progress(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p,m,v;const f=null===(e=null===(t=this._outAnimation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration,g=null===(i=null===(n=this._inAnimation)||void 0===n?void 0:n.effect)||void 0===i?void 0:i.getComputedTiming().duration,y=null===(o=null===(s=this._pseudoElementOutAnimation)||void 0===s?void 0:s.effect)||void 0===o?void 0:o.getComputedTiming().duration,_=null===(r=null===(a=this._pseudoElementInAnimation)||void 0===a?void 0:a.effect)||void 0===r?void 0:r.getComputedTiming().duration,E=[Number(f),Number(g),Number(_),Number(y)],w=Math.max(...E.filter((t=>!isNaN(t))));let b;return w===Number(f)?b=null===(l=null===(h=this._outAnimation)||void 0===h?void 0:h.effect)||void 0===l?void 0:l.getComputedTiming().progress:w===Number(g)?b=null===(c=null===(u=this._inAnimation)||void 0===u?void 0:u.effect)||void 0===c?void 0:c.getComputedTiming().progress:w===Number(_)?b=null===(p=null===(d=this._pseudoElementInAnimation)||void 0===d?void 0:d.effect)||void 0===p?void 0:p.getComputedTiming().progress:w===Number(y)&&(b=null===(v=null===(m=this._pseudoElementOutAnimation)||void 0===m?void 0:m.effect)||void 0===v?void 0:v.getComputedTiming().progress),100*(Number(b)||0)}get gestureNavigating(){return this._gestureNavigating}get backNavigating(){return this._backNavigating}get isPlaying(){return this._isPlaying}get ready(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.ready,null===(i=this._inAnimation)||void 0===i?void 0:i.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),t()}catch(t){e(t)}}))}get finished(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.finished,null===(i=this._inAnimation)||void 0===i?void 0:i.finished,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.finished,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.finished]),t()}catch(t){e(t)}}))}get started(){return new Promise((async t=>{var e;null===(e=this.addEventListener)||void 0===e||e.call(this,"page-animation-start",(()=>{t()}),{once:!0})}))}}const c=(0,t.createContext)(new u);var d=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const p=(0,t.createContext)(0);function m(t,n,i,s){const{paths:o}=n;let a,r,h,u,c,d=!1,p=!1,m=null;n.paths.length&&(!(0,l.e1)(s,o)&&n.paths.includes(void 0)&&(s=void 0),""!==i&&!(0,l.e1)(i,o)&&n.paths.includes(void 0)&&(i=void 0));const v=[];let f;if(e().Children.forEach(n.children,(o=>{var a;if(!e().isValidElement(o))return;(0,l.QN)(o.props.resolvedPathname,s)&&(t.backNavigating||n.gestureNavigating)&&(null===(a=o.props.config)||void 0===a?void 0:a.keepAlive)&&(f=o.key||void 0);const r=(0,l.QN)(o.props.resolvedPathname,i);if(r&&!p){let t={out:!0,in:!1};n.gestureNavigating&&(t={in:!0,out:!1}),p=!0,v.push(e().cloneElement(o,Object.assign(Object.assign({},t),{resolvedPathname:r.matchedPathname})))}})),e().Children.forEach(t.children,(t=>{if(!e().isValidElement(t))return;n.paths.length||o.push(t.props.path);const i=(0,l.QN)(t.props.path,s);if(i&&!d){d=!0;const{config:s}=t.props;a=null==s?void 0:s.swipeDirection,r=null==s?void 0:s.swipeAreaWidth,u=null==s?void 0:s.hysteresis,c=null==s?void 0:s.disableDiscovery,h=null==s?void 0:s.minFlingVelocity,m=t.props.name||null;let o={in:!0,out:!1};n.gestureNavigating&&(o={out:!0,in:!1});const l=f||Math.random();v.push(e().cloneElement(t,Object.assign(Object.assign({},o),{resolvedPathname:i.matchedPathname,key:l})))}})),!e().Children.count(v)){return{children:e().Children.map(t.children,(t=>{var n;if(e().isValidElement(t)&&(0,l.QN)(t.props.path,void 0)){const{config:i}=t.props;return a=null==i?void 0:i.swipeDirection,r=null==i?void 0:i.swipeAreaWidth,u=null==i?void 0:i.hysteresis,c=null==i?void 0:i.disableDiscovery,h=null==i?void 0:i.minFlingVelocity,m=null!==(n=t.props.name)&&void 0!==n?n:null,e().cloneElement(t,{in:!0,out:!1})}})),name:m,swipeDirection:a||t.swipeDirection,swipeAreaWidth:r||t.swipeAreaWidth,hysteresis:u||t.hysteresis,disableDiscovery:void 0===c?t.disableDiscovery:c,minFlingVelocity:h||t.minFlingVelocity}}return{paths:o,children:v,name:m,currentPath:t.currentPath,swipeDirection:a||t.swipeDirection,swipeAreaWidth:r||t.swipeAreaWidth,hysteresis:u||t.hysteresis,disableDiscovery:void 0===c?t.disableDiscovery:c,minFlingVelocity:h||t.minFlingVelocity}}class v extends e().Component{constructor(){super(...arguments),this.onSwipeStartListener=this.onSwipeStart.bind(this),this.onSwipeListener=this.onSwipe.bind(this),this.onSwipeEndListener=this.onSwipeEnd.bind(this),this.ref=null,this.state={currentPath:"",children:this.props.children,progress:100,shouldPlay:!0,gestureNavigating:!1,shouldAnimate:!0,startX:0,startY:0,paths:[],swipeDirection:this.props.swipeDirection,swipeAreaWidth:this.props.swipeAreaWidth,minFlingVelocity:this.props.minFlingVelocity,hysteresis:this.props.hysteresis,disableDiscovery:!1},this.setRef=t=>{this.ref&&this.ref.removeEventListener("swipestart",this.onSwipeStartListener),this.ref=t,t&&t.addEventListener("swipestart",this.onSwipeStartListener)}}static getDerivedStateFromProps(t,e){if(t.currentPath!==e.currentPath){if(!e.shouldAnimate)return{currentPath:t.currentPath,shouldAnimate:!0};let n=t.currentPath;const i=m(t,e,e.currentPath,t.currentPath),{name:s}=i,o=d(i,["name"]);return o.children.sort(((t,e)=>(0,l.QN)(t.props.path,n)?1:-1)),t.onDocumentTitleChange(s),o}return null}componentDidMount(){this.context.onProgress=t=>{const e=this.props.backNavigating&&!this.state.gestureNavigating?99-t:t,n=(0,l.uZ)(e,0,100);this.setState({progress:n});const i=new CustomEvent("motion-progress",{detail:{progress:n}});this.props.dispatchEvent&&this.props.dispatchEvent(i)}}componentDidUpdate(t,e){t.currentPath!==this.state.currentPath&&!this.state.gestureNavigating&&e.shouldAnimate&&(this.context.play=!0,this.context.backNavigating=this.props.backNavigating,this.context.animate())}onGestureSuccess(t,e){this.props.onDocumentTitleChange(e),this.setState(t)}onSwipeStart(t){if(t.touches.length>1)return;if(this.state.disableDiscovery)return;if(this.context.isPlaying)return;if(0===this.context.duration)return;let e;switch(this.state.swipeDirection){case"left":case"right":e=t.x;break;case"up":case"down":e=t.y}if(t.direction===this.state.swipeDirection&&e<this.state.swipeAreaWidth){if(!this.props.lastPath)return;t.stopPropagation();for(let e of t.composedPath().reverse())if("classList"in e&&e.classList.length){if(e.classList.contains("gesture-region")&&"true"===e.dataset.disabled)return;if(e===t.gestureTarget)break}const e=m(this.props,Object.assign(Object.assign({},this.state),{gestureNavigating:!0}),this.props.currentPath,this.props.lastPath),{children:n,currentPath:i,paths:s,name:o}=e,a=d(e,["children","currentPath","paths","name"]);this.onGestureSuccess=this.onGestureSuccess.bind(this,a,o),this.props.navigation.addEventListener("go-back",this.onGestureSuccess,{once:!0}),this.props.onGestureNavigationStart(),this.setState({shouldPlay:!1,gestureNavigating:!0,children:n.sort((t=>(0,l.QN)(t.props.path,i)?-1:1)),startX:t.x,startY:t.y},(()=>{var t,e;const n=new CustomEvent("motion-progress-start");this.context.gestureNavigating=!0,this.context.playbackRate=-1,this.context.play=!1,this.context.backNavigating=this.props.backNavigating,this.context.animate(),this.props.dispatchEvent&&this.props.dispatchEvent(n),null===(t=this.ref)||void 0===t||t.addEventListener("swipe",this.onSwipeListener),null===(e=this.ref)||void 0===e||e.addEventListener("swipeend",this.onSwipeEndListener)}))}}onSwipe(t){if(this.state.shouldPlay)return;let e;switch(this.state.swipeDirection){case"left":case"right":{const n=window.innerWidth;e=-((0,l.uZ)(t.x-this.state.startX,10)-n)/n*100,"left"===this.state.swipeDirection&&(e=100-e);break}case"up":case"down":{const n=window.innerHeight;e=-((0,l.uZ)(t.y-this.state.startY,10)-n)/n*100,"up"===this.state.swipeDirection&&(e=100-e);break}}this.context.progress=(0,l.uZ)(e,.1,100)}onSwipeEnd(t){var e,n;if(this.state.shouldPlay)return;let i=null;const s=new CustomEvent("motion-progress-end");100-this.state.progress>this.state.hysteresis||t.velocity>this.state.minFlingVelocity?(t.velocity>=this.state.minFlingVelocity?this.context.playbackRate=-5:this.context.playbackRate=-1,i=()=>{this.context.reset(),this.props.onGestureNavigationEnd(),this.setState({gestureNavigating:!1}),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,shouldAnimate:!1})):(this.context.playbackRate=.5,i=()=>{this.props.navigation.removeEventListener("go-back",this.onGestureSuccess),this.context.reset(),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,gestureNavigating:!1})),this.setState({startX:0,startY:0}),this.context.onEnd=i,this.context.play=!0,null===(e=this.ref)||void 0===e||e.removeEventListener("swipe",this.onSwipeListener),null===(n=this.ref)||void 0===n||n.removeEventListener("swipeend",this.onSwipeEndListener)}render(){return(0,h.jsx)("div",Object.assign({className:"animation-layer",ref:this.setRef,style:{width:"100%",height:"100%",position:"relative"}},{children:(0,h.jsx)(p.Provider,Object.assign({value:this.state.progress},{children:this.state.children}))}))}}v.contextType=c;class f extends e().Component{constructor(){super(...arguments),this.ref=null,this._currentScene=null,this._nextScene=null,this.onProgressStartListener=this.onProgressStart.bind(this),this.onProgressListener=this.onProgress.bind(this),this.onProgressEndListener=this.onProgressEnd.bind(this),this.state={transitioning:!1,playing:!0}}set currentScene(t){this._currentScene=t}set nextScene(t){this._nextScene=t,!this._currentScene||this._currentScene.isEmpty()||this._nextScene.isEmpty()?(this._currentScene=null,this._nextScene=null):this.sharedElementTransition(this._currentScene,this._nextScene)}finish(){var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.finish()}sharedElementTransition(t,e){if(0===this.context.duration)return;if(this.state.transitioning)return void this.finish();const n=()=>{this.setState({transitioning:!1}),this._nextScene=null,this._currentScene=null},i=()=>{var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.cancel();n()};this.setState({transitioning:!0},(async()=>{var s,o,a,r,h,u,c,d,p,m,v,f,g,y,_,E,w,b,x,S,P,A,L,R,k,D,O,N,T,I,C,j,$,M,U,F,z,Y,X,B,V,H,W,G,K,q;for(const[n,i]of t.nodes)if(e.nodes.has(n)){const J=e.nodes.get(n).instance,Q=i.instance,Z=J.transitionType||Q.transitionType||"morph",tt=i.instance.node,et=e.nodes.get(n).instance.node;if(!tt||!et)continue;const nt=tt.firstElementChild,it=et.firstElementChild;if(!nt||!it)continue;const st=Q.clientRect,ot=J.clientRect;let at,rt,ht={},lt={};"morph"===Z&&([at,ht]=Q.CSSData,[rt,lt]=J.CSSData),at=Q.CSSText,rt=J.CSSText,nt.style.cssText=at,"morph"!==Z&&(it.style.cssText=rt),tt.style.position="absolute",nt.style.position="absolute",tt.style.zIndex=nt.style.zIndex,tt.style.top="0",tt.style.left="0",et.style.position="absolute",it.style.position="absolute",et.style.zIndex=it.style.zIndex,et.style.top="0",et.style.left="0";const ut={id:Q.id,start:{x:{node:tt,delay:null!==(h=null!==(a=null===(o=null===(s=Q.props.config)||void 0===s?void 0:s.x)||void 0===o?void 0:o.delay)&&void 0!==a?a:null===(r=J.props.config)||void 0===r?void 0:r.delay)&&void 0!==h?h:0,duration:(null===(c=null===(u=Q.props.config)||void 0===u?void 0:u.x)||void 0===c?void 0:c.duration)||(null===(d=J.props.config)||void 0===d?void 0:d.duration)||this.context.duration,easingFunction:(null===(m=null===(p=Q.props.config)||void 0===p?void 0:p.x)||void 0===m?void 0:m.easingFunction)||(null===(v=Q.props.config)||void 0===v?void 0:v.easingFunction)||"ease",position:st.x-(this.state.playing?0:t.x)},y:{node:nt,delay:null!==(E=null!==(y=null===(g=null===(f=Q.props.config)||void 0===f?void 0:f.y)||void 0===g?void 0:g.delay)&&void 0!==y?y:null===(_=J.props.config)||void 0===_?void 0:_.delay)&&void 0!==E?E:0,duration:(null===(b=null===(w=Q.props.config)||void 0===w?void 0:w.y)||void 0===b?void 0:b.duration)||(null===(x=J.props.config)||void 0===x?void 0:x.duration)||this.context.duration,easingFunction:(null===(P=null===(S=Q.props.config)||void 0===S?void 0:S.y)||void 0===P?void 0:P.easingFunction)||(null===(A=Q.props.config)||void 0===A?void 0:A.easingFunction)||"ease",position:st.y-(this.state.playing?0:t.y)}},end:{x:{node:et,delay:null!==(O=null!==(k=null===(R=null===(L=J.props.config)||void 0===L?void 0:L.x)||void 0===R?void 0:R.delay)&&void 0!==k?k:null===(D=J.props.config)||void 0===D?void 0:D.delay)&&void 0!==O?O:0,duration:(null===(T=null===(N=J.props.config)||void 0===N?void 0:N.x)||void 0===T?void 0:T.duration)||(null===(I=J.props.config)||void 0===I?void 0:I.duration)||this.context.duration,easingFunction:(null===(j=null===(C=J.props.config)||void 0===C?void 0:C.x)||void 0===j?void 0:j.easingFunction)||(null===($=J.props.config)||void 0===$?void 0:$.easingFunction)||"ease",position:ot.x-(this.state.playing?e.x:0)},y:{node:it,delay:null!==(Y=null!==(F=null===(U=null===(M=J.props.config)||void 0===M?void 0:M.y)||void 0===U?void 0:U.delay)&&void 0!==F?F:null===(z=J.props.config)||void 0===z?void 0:z.delay)&&void 0!==Y?Y:0,duration:(null===(B=null===(X=J.props.config)||void 0===X?void 0:X.y)||void 0===B?void 0:B.duration)||(null===(V=J.props.config)||void 0===V?void 0:V.duration)||this.context.duration,easingFunction:(null===(W=null===(H=J.props.config)||void 0===H?void 0:H.x)||void 0===W?void 0:W.easingFunction)||(null===(G=J.props.config)||void 0===G?void 0:G.easingFunction)||"ease",position:ot.y-(this.state.playing?e.y:0)}}};this.state.playing?(ut.end.x.position=ut.end.x.position/e.xRatio,ut.end.y.position=ut.end.y.position/e.yRatio):(ut.start.x.position=ut.start.x.position/t.xRatio,ut.start.y.position=ut.start.y.position/t.yRatio),tt.style.display="unset",et.style.display="unset";const ct=parseInt(tt.style.zIndex)||0,dt=parseInt(et.style.zIndex)||0;let pt,mt,vt,ft;et.style.zIndex=`${(0,l.uZ)(dt,0,ct-1)}`,null===(K=this.ref)||void 0===K||K.appendChild(tt),"morph"!==Z&&(null===(q=this.ref)||void 0===q||q.appendChild(et)),Q.hidden(!0),J.hidden(!0),tt.style.willChange="contents, transform, opacity",et.style.willChange="contents, transform, opacity","morph"===Z?(pt=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),mt=ut.start.y.node.animate([Object.assign(Object.assign({},ht),{transform:`translate(0px, ${ut.start.y.position}px) ${"none"===ht.transform?"":ht.transform}`}),Object.assign(Object.assign({},lt),{transform:`translate(0px, ${ut.end.y.position}px) ${"none"===lt.transform?"":lt.transform}`})],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`})):"fade"===Z?(pt=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),mt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),vt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),ft=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):"fade-through"===Z?(pt=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),mt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),vt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),ft=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):(pt=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),mt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),vt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),ft=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`}));const gt=[pt,mt,vt,ft];this.state.playing||gt.forEach((t=>{var e;if(!t)return;const n=this.context.duration;let i=null===(e=t.effect)||void 0===e?void 0:e.getComputedTiming().duration;"string"==typeof i&&(i=parseFloat(i)),i=i||n,t.currentTime=i,t.pause()}));const yt=async()=>{var e,i;console.assert(n===J.id,"Not sure what happened here."),console.assert(n===Q.id,"Not sure what happened here."),tt.style.willChange="auto",et.style.willChange="auto",await J.hidden(!1),t.keepAlive&&this.state.playing?Q.keepAlive(!0):(Q.keepAlive(!1),await Q.hidden(!1)),this.state.playing&&(null===(e=this.ref)||void 0===e||e.removeChild(tt),"morph"!==Z&&(null===(i=this.ref)||void 0===i||i.removeChild(et)))},_t=async()=>{tt.style.willChange="auto",et.style.willChange="auto",await Q.hidden(!1),await J.hidden(!1)};Promise.all(gt.map((t=>null==t?void 0:t.finished))).then(yt).catch(_t)}this.ref&&Promise.all(this.ref.getAnimations({subtree:!0}).map((t=>t.finished))).then(n).catch(i)})),this.props.navigation.addEventListener("page-animation-cancel",i,{once:!0})}componentDidMount(){this.props.instance&&this.props.instance(this),this.props.navigation.addEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}componentWillUnmount(){this.props.navigation.removeEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}onProgressStart(){this.setState({playing:!1})}onProgress(t){var e,n;if(!this.state.playing){const i=(null===(e=this.ref)||void 0===e?void 0:e.getAnimations({subtree:!0}))||[];for(const e of i){const i=t.detail.progress,s=this.context.duration;let o=null===(n=e.effect)||void 0===n?void 0:n.getComputedTiming().duration;"string"==typeof o&&(o=parseFloat(o)),o=o||s;const a=i/100*Number(o);e.currentTime=a}}}onProgressEnd(){this.state.playing||this.finish(),this.setState({playing:!0,transitioning:!1})}render(){return this.state.transitioning?(0,h.jsx)("div",{id:"ghost-layer",ref:t=>this.ref=t,style:{position:"absolute",zIndex:1e3,width:"100vw",height:"100vh",contain:"strict"}}):(0,h.jsx)(h.Fragment,{})}}f.contextType=c;class g extends e().Component{constructor(t){super(t),this.animationLayerData=new u,this.ref=null,this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.state={currentPath:"",backNavigating:!1,gestureNavigating:!1,routesData:new Map,implicitBack:!1,defaultDocumentTitle:document.title},this.onDocumentTitleChange=t=>{document.title=t||this.state.defaultDocumentTitle},this.setRef=t=>{this.ref&&(this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.animationLayerData.dispatchEvent=this.dispatchEvent,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.removeNavigationEventListeners(this.ref)),t&&(this.dispatchEvent=e=>(0,l.Nu)(e,t),this.addEventListener=(e,n,i)=>t.addEventListener(e,n,i),this.removeEventListener=(e,n,i)=>t.removeEventListener(e,n,i),this.animationLayerData.dispatchEvent=this.dispatchEvent,this.animationLayerData.addEventListener=this.addEventListener,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.addNavigationEventListeners(t))},this._id=t.id||Math.random().toString(),t.config?this.config=t.config:this.config={animation:{in:{type:"none",duration:0},out:{type:"none",duration:0}}}}componentDidMount(){this._routerData.paramsDeserializer=this.props.config.paramsDeserializer,this._routerData.paramsSerializer=this.props.config.paramsSerializer,window.addEventListener("popstate",this.onPopStateListener)}componentWillUnmount(){this.navigation.destructor(),this._routerData.destructor(),this.ref&&this.removeNavigationEventListeners(this.ref),window.removeEventListener("popstate",this.onPopStateListener)}initialise(t){let e=t.location.pathname;const n=this._routerData.paramsDeserializer||null,i=(0,l.fJ)(window.location.search,n),s=this.state.routesData;this._routerData.routesData=this.state.routesData,i&&s.set(e,Object.assign(Object.assign({},this.state.routesData.get(e)),{params:i})),this.setState({currentPath:e,routesData:s}),this._routerData.currentPath=e}get id(){return this._id}get parentRouterData(){return this._routerData.parentRouterData}get baseURL(){var t;const e=window.location.origin,n=this.props.config.basePathname||"";if(this.parentRouterData){const e=this.parentRouterData.navigation.history.baseURL,i=(null===(t=this.parentRouterData.mountedScreen)||void 0===t?void 0:t.resolvedPathname)||"";return(0,l.r2)(n,(0,l.r2)(i,e))}return new URL(n,e)}addNavigationEventListeners(t){t.addEventListener("go-back",this.onBackListener),t.addEventListener("navigate",this.onNavigateListener)}removeNavigationEventListeners(t){t.removeEventListener("go-back",this.onBackListener),t.removeEventListener("navigate",this.onNavigateListener)}render(){return(0,h.jsx)("div",Object.assign({id:this._id.toString(),className:"react-motion-router",style:{width:"100%",height:"100%"},ref:this.setRef},{children:(0,h.jsx)(o.Consumer,{children:t=>(this._routerData.parentRouterData=t,(0,h.jsx)(o.Provider,Object.assign({value:this._routerData},{children:(0,h.jsxs)(c.Provider,Object.assign({value:this.animationLayerData},{children:[Boolean(this.navigation)&&(0,h.jsx)(f,{instance:t=>{this._routerData.ghostLayer=t},backNavigating:this.state.backNavigating,gestureNavigating:this.state.gestureNavigating,navigation:this._routerData.navigation,animationLayerData:this.animationLayerData}),Boolean(this.navigation)&&(0,h.jsx)(v,Object.assign({disableBrowserRouting:this.props.config.disableBrowserRouting||!1,disableDiscovery:this.props.config.disableDiscovery||!1,hysteresis:this.props.config.hysteresis||50,minFlingVelocity:this.props.config.minFlingVelocity||400,swipeAreaWidth:this.props.config.swipeAreaWidth||100,swipeDirection:this.props.config.swipeDirection||"right",navigation:this._routerData.navigation,backNavigating:this.state.backNavigating,currentPath:this.navigation.history.current,lastPath:this.navigation.history.previous,onGestureNavigationStart:this.onGestureNavigationStart,onGestureNavigationEnd:this.onGestureNavigationEnd,onDocumentTitleChange:this.onDocumentTitleChange,dispatchEvent:this.dispatchEvent},{children:this.props.children}))]}))})))})}))}}g.defaultProps={config:{animation:{in:{type:"none",duration:0}}}};const y={"slide-right-in":[{transform:"translateX(100vw)"},{transform:"translateX(0vw)"}],"slide-back-right-in":[{transform:"translateX(50vw)"},{transform:"translateX(0vw)"}],"slide-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-50vw)"}],"slide-back-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-100vw)"}],"slide-left-in":[{transform:"translateX(-100vw)"},{transform:"translateX(0vw)"}],"slide-back-left-in":[{transform:"translateX(-50vw)"},{transform:"translateX(0vw)"}],"slide-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(50vw)"}],"slide-back-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(100vw)"}],"slide-up-in":[{transform:"translateY(100vh)"},{transform:"translateY(0vh)"}],"slide-back-up-in":[{transform:"translateY(50vh)"},{transform:"translateY(0vh)"}],"slide-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-50vh)"}],"slide-back-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-100vh)"}],"slide-down-in":[{transform:"translateY(-100vh)"},{transform:"translateY(0vh)"}],"slide-back-down-in":[{transform:"translateY(-50vh)"},{transform:"translateY(0vh)"}],"slide-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(50vh)"}],"slide-back-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(100vh)"}],"zoom-in-in":[{transform:"scale(0.85)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-in-out":[{transform:"scale(1)",opacity:1},{transform:"scale(1.15)",opacity:0}],"zoom-out-in":[{transform:"scale(1.15)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-out-out":[{transform:"scale(1)",opacity:1},{transform:"scale(0.85)",opacity:0}],"fade-in":[{opacity:0},{opacity:1}],"fade-out":[{opacity:1},{opacity:0}],none:[]},_={left:"right",right:"left",up:"down",down:"up",in:"out",out:"in"};class E extends e().Component{constructor(){super(...arguments),this._animationLayerData=null,this.ref=null,this.onAnimationEnd=this.animationEnd.bind(this),this.onNavigate=this.navigate.bind(this),this.setRef=this.onRef.bind(this),this.state={mounted:!1,zIndex:0}}onRef(t){this.ref=t}animationEnd(){this.ref&&(this.ref.style.willChange="auto",this.ref.style.pointerEvents="auto")}navigate(){this.ref&&(this.ref.style.willChange="transform, opacity",this.ref.style.pointerEvents="none")}componentDidMount(){this.props.navigation.addEventListener("page-animation-start",this.onNavigate),this.props.navigation.addEventListener("motion-progress-start",this.onNavigate),this.props.navigation.addEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.addEventListener("motion-progress-end",this.onAnimationEnd),this._animationLayerData&&(this.props.in&&(this._animationLayerData.nextScreen=this),this.props.out&&(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this))}componentDidUpdate(t){this._animationLayerData&&(this.props.out===t.out&&this.props.in===t.in||(this.props.out?(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this):this.props.in&&(this._animationLayerData.nextScreen=this)))}componentWillUnmount(){this.props.navigation.removeEventListener("page-animation-start",this.onNavigate),this.props.navigation.removeEventListener("motion-progress-start",this.onNavigate),this.props.navigation.removeEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.removeEventListener("motion-progress-end",this.onAnimationEnd)}getAnimationConfig(t,e){"function"==typeof e&&(e=e());const n=e[t];if(!("type"in n))return n;{let e=n.direction,i="";switch(this.props.backNavigating&&e&&("zoom"!==n.type&&"slide"!==n.type||(e=_[e],i="back-")),n.type){case"slide":return"in"!==e&&"out"!==e||(e="left"),[`slide-${i}${e||"left"}-${t}`,n.duration,n.easingFunction];case"zoom":return"in"!==e&&"out"!==e&&(e="in"),[`zoom-${e||"in"}-${t}`,n.duration,n.easingFunction];case"fade":return[`fade-${t}`,n.duration,n.easingFunction];default:return["none",n.duration,void 0]}}}get pseudoElementInAnimation(){return this.props.pseudoElement?this.getAnimationConfig("in",this.props.pseudoElement.animation):null}get pseudoElementOutAnimation(){return this.props.pseudoElement?this.getAnimationConfig("out",this.props.pseudoElement.animation):null}get inAnimation(){return this.getAnimationConfig("in",this.props.animation)}get outAnimation(){return this.getAnimationConfig("out",this.props.animation)}get pseudoElementDuration(){var t;const e=this.props.in?this.pseudoElementInAnimation:this.pseudoElementOutAnimation;if(!e)return null;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get duration(){var t;const e=this.props.in?this.inAnimation:this.outAnimation;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get pseudoElementAnimation(){var t,e,n;if(!this.ref||!this.props.pseudoElement)return null;const i=this.props.pseudoElement.selector;let s=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.pseudoElementInAnimation)){const[t,e,n]=this.pseudoElementInAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:n}=this.pseudoElementInAnimation;return n="number"==typeof n?{duration:n,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||s,pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.pseudoElementOutAnimation)){const[t,e,n]=this.pseudoElementOutAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:e}=this.pseudoElementOutAnimation;return e="number"==typeof e?{duration:e,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||s,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both",pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,e))}}get animation(){var t,e,n;if(!this.ref)return null;let i=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.inAnimation)){const[t,e,n]=this.inAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:n}=this.inAnimation;return n="number"==typeof n?{duration:n,easing:i,fill:"both"}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.outAnimation)){const[t,e,n]=this.outAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:e}=this.outAnimation;return e="number"==typeof e?{duration:e,easing:i,fill:"both"}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||i,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both"}),new Animation(new KeyframeEffect(this.ref,t,e))}}set zIndex(t){this.setState({zIndex:t})}mounted(t,e=!0){return new Promise((n=>{const i=()=>{var i,s;if(t){e&&this.ref&&(this.ref.style.willChange="transform, opacity");const t=Boolean(this.props.in&&!(null===(i=this._animationLayerData)||void 0===i?void 0:i.gestureNavigating)||this.props.out&&(null===(s=this._animationLayerData)||void 0===s?void 0:s.gestureNavigating));this.props.onEnter&&this.props.onEnter(t)}n()};this.props.keepAlive&&!t?n():this.setState({mounted:t},i)}))}render(){return(0,h.jsx)("div",Object.assign({id:`${this.props.name}-animation-provider`,className:"animation-provider",ref:this.setRef,style:{position:"absolute",width:"100%",height:"100%",contain:"strict",transformOrigin:"center center",zIndex:this.state.zIndex}},{children:(0,h.jsx)(c.Consumer,{children:t=>(this._animationLayerData=t,this.state.mounted?this.props.children:(0,h.jsx)(h.Fragment,{}))})}))}}var w,b,x,S;!function(t){t[t.center=0]="center",t[t.top=1]="top",t[t.bottom=2]="bottom",t[t.left=3]="left",t[t.right=4]="right"}(w||(w={})),function(t){t[t.cap=0]="cap",t[t.ch=1]="ch",t[t.em=2]="em",t[t.ex=3]="ex",t[t.ic=4]="ic",t[t.lh=5]="lh",t[t.rem=6]="rem",t[t.rlh=7]="rlh",t[t.vh=8]="vh",t[t.vw=9]="vw",t[t.vi=10]="vi",t[t.vb=11]="vb",t[t.vmin=12]="vmin",t[t.vmax=13]="vmax",t[t.px=14]="px",t[t.cm=15]="cm",t[t.mm=16]="mm",t[t.Q=17]="Q",t[t.in=18]="in",t[t.pc=19]="pc",t[t.pt=20]="pt",t[t["%"]=21]="%"}(b||(b={})),function(t){t[t.inital=0]="inital",t[t.inherit=1]="inherit",t[t.revert=2]="revert",t[t.unset=3]="unset"}(x||(x={})),function(t){t[t.morph=0]="morph",t[t["fade-through"]=1]="fade-through",t[t.fade=2]="fade",t[t["cross-fade"]=3]="cross-fade"}(S||(S={}));class P{constructor(t){this._nodes=new Map,this._name="",this._scrollPos=null,this._x=0,this._y=0,this._xRatio=0,this._yRatio=0,this._keepAlive=!1,this._name=t}addNode(t){t&&(console.assert(!this.nodes.has(t.id),`Duplicate Shared Element ID: ${t.id} in ${this._name}`),this._nodes.set(t.id,t))}removeNode(t){this._nodes.delete(t)}get xRatio(){return this._xRatio}get yRatio(){return this._yRatio}get nodes(){return this._nodes}get name(){return this._name}get scrollPos(){return this._scrollPos||{x:0,y:0}}get x(){return this._x}get y(){return this._y}get keepAlive(){return this._keepAlive}set scrollPos(t){this._scrollPos=t}set x(t){this._x=t}set y(t){this._y=t}set xRatio(t){this._xRatio=t}set yRatio(t){this._yRatio=t}set keepAlive(t){this._keepAlive=t}isEmpty(){return!Boolean(this._nodes.size)}}const A=(0,t.createContext)(null);function L(t,e,n){const i=e.cloneNode(!0).firstElementChild;return i?(n.props.config&&n.props.config.transformOrigin&&(i.style.transformOrigin=n.props.config.transformOrigin),{id:t,instance:n}):null}class R extends e().Component{constructor(){super(...arguments),this._id=this.props.id.toString(),this._ref=null,this._scene=null,this._mutationObserver=new MutationObserver(this.updateScene.bind(this)),this._callbackID=0,this._computedStyle=null,this._isMounted=!1,this.onRef=this.setRef.bind(this),this.state={hidden:!1,keepAlive:!1}}get scene(){return this._scene}get node(){return this._ref?this._ref.cloneNode(!0):null}get clientRect(){if(this._ref&&this._ref.firstElementChild){return this._ref.firstElementChild.getBoundingClientRect()}return new DOMRect}get CSSData(){const t=this._computedStyle;return t?(0,l.hR)(t):["",{}]}get CSSText(){const t=this._computedStyle;if(t){const[e]=(0,l.hR)(t,!1);return e}return""}get id(){return this._id}get transitionType(){var t;return null===(t=this.props.config)||void 0===t?void 0:t.type}keepAlive(t){return new Promise((e=>{this.setState({keepAlive:t},(()=>e()))}))}hidden(t){return new Promise(((e,n)=>{this._isMounted?this.setState({hidden:t},(()=>{e()})):e()}))}setRef(t){var e,n;this._ref!==t&&(this._ref&&(null===(e=this.scene)||void 0===e||e.removeNode(this._id),this._mutationObserver.disconnect(),this._computedStyle=null),this._ref=t,t&&(null===(n=this.scene)||void 0===n||n.addNode(L(this._id,t,this)),t.firstElementChild&&(this._computedStyle=window.getComputedStyle(t.firstElementChild),this._mutationObserver.observe(t.firstElementChild,{attributes:!0,childList:!0,subtree:!0}))))}updateScene(){const t=window.cancelIdleCallback?window.cancelIdleCallback:window.clearTimeout,e=window.requestIdleCallback?window.requestIdleCallback:window.setTimeout;t(this._callbackID),this._callbackID=e((()=>{var t,e;this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),null===(e=this.scene)||void 0===e||e.addNode(L(this._id,this._ref,this))),this._callbackID=0}))}componentDidMount(){this._isMounted=!0}componentDidUpdate(){var t,e;this._id!==this.props.id.toString()&&this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),this._id=this.props.id.toString(),null===(e=this.scene)||void 0===e||e.addNode(L(this._id,this._ref,this)))}componentWillUnmount(){this._isMounted=!1}render(){return(0,h.jsx)(A.Consumer,{children:t=>(this._scene=t,(0,h.jsx)("div",Object.assign({ref:this.onRef,id:`shared-element-${this._id}`,style:{display:this.state.hidden&&!this.keepAlive?"block":"contents",visibility:this.state.hidden?"hidden":"visible"}},{children:this.props.children})))})}}const k={in:{type:"none",duration:0},out:{type:"none",duration:0}};class D extends e().Component{constructor(){var t,e,n;super(...arguments),this.name=void 0===this.props.path?"not-found":(null===(t=this.props.path)||void 0===t?void 0:t.toString().slice(1).replace("/","-"))||"index",this.sharedElementScene=new P(this.name),this.ref=null,this.contextParams=null===(n=null===(e=this.context)||void 0===e?void 0:e.routesData.get(this.props.path))||void 0===n?void 0:n.params,this.onRef=this.setRef.bind(this),this.animation=k,this.pseudoElementAnimation=k,this.state={shouldKeepAlive:!1},this.onExit=()=>{this.context.backNavigating?this.setState({shouldKeepAlive:!1}):(this.ref&&(this.setTransforms(this.ref),this.context.navigation.addEventListener("page-animation-end",(()=>{this.ref&&this.setTransforms(this.ref)}),{once:!0})),this.setState({shouldKeepAlive:!0})),this.context.ghostLayer&&(this.context.ghostLayer.currentScene=this.sharedElementScene)},this.onEnter=()=>{this.context.ghostLayer&&(this.context.ghostLayer.nextScene=this.sharedElementScene)}}componentDidMount(){var t,n,i,s,o,a,r;this.sharedElementScene.keepAlive=(null===(t=this.props.config)||void 0===t?void 0:t.keepAlive)||!1,this.props.fallback&&e().isValidElement(this.props.fallback)?this.setState({fallback:e().cloneElement(this.props.fallback,{navigation:this.context.navigation,route:{params:Object.assign(Object.assign({},this.props.defaultParams),this.contextParams)}})}):this.setState({fallback:this.props.fallback}),this.animation=null!==(i=this.setupAnimation(null===(n=this.props.config)||void 0===n?void 0:n.animation))&&void 0!==i?i:this.context.animation,this.pseudoElementAnimation=null!==(a=this.setupAnimation(null===(o=null===(s=this.props.config)||void 0===s?void 0:s.pseudoElement)||void 0===o?void 0:o.animation))&&void 0!==a?a:k,this.contextParams=null===(r=this.context.routesData.get(this.props.path))||void 0===r?void 0:r.params,this.context.mountedScreen=this,this.forceUpdate()}shouldComponentUpdate(t){var e,n;return(null===(e=this.context.routesData.get(this.props.path))||void 0===e?void 0:e.params)!==this.contextParams?(this.contextParams=null===(n=this.context.routesData.get(this.props.path))||void 0===n?void 0:n.params,!0):!(!t.out||t.in)||(!(!t.in||t.out)||(t.in!==this.props.in||t.out!==this.props.out))}componentDidUpdate(t){var n,i,s;(null===(n=t.config)||void 0===n?void 0:n.keepAlive)!==(null===(i=this.props.config)||void 0===i?void 0:i.keepAlive)&&(this.sharedElementScene.keepAlive=(null===(s=this.props.config)||void 0===s?void 0:s.keepAlive)||!1),t.fallback!==this.props.fallback&&(this.props.fallback&&e().isValidElement(this.props.fallback)?this.setState({fallback:e().cloneElement(this.props.fallback,{navigation:this.context.navigation,route:{params:Object.assign(Object.assign({},this.props.defaultParams),this.contextParams)}})}):this.setState({fallback:this.props.fallback}))}setupAnimation(t){return t?"function"==typeof t?this.animationFactory.bind(this,t):"in"in t?{in:t.in,out:t.out||t.in}:{in:t,out:t}:null}animationFactory(t){if("function"==typeof t){let e=this.context.navigation.history.next;this.context.backNavigating||(e=this.context.navigation.history.previous);const n=t(e||"",this.context.navigation.history.current,this.context.gestureNavigating);return"in"in n?{in:n.in,out:n.out||n.in}:{in:n,out:n}}return this.context.animation}setTransforms(t){const e=t.getBoundingClientRect(),n=(e.width/window.innerWidth).toFixed(2),i=(e.height/window.innerHeight).toFixed(2);this.sharedElementScene.x=e.x,this.sharedElementScene.y=e.y,this.sharedElementScene.xRatio=parseFloat(n),this.sharedElementScene.yRatio=parseFloat(i)}setRef(t){this.ref!==t&&(this.ref=t,t&&this.setTransforms(t))}get resolvedPathname(){return this.props.resolvedPathname}render(){var e,n,i,s,o;let a,r=this.props.component,l=!1;return"preloaded"in this.props.component&&this.props.component.preloaded&&(r=this.props.component.preloaded,l=!0),(null===(e=this.props.config)||void 0===e?void 0:e.pseudoElement)&&(a={selector:null===(n=this.props.config)||void 0===n?void 0:n.pseudoElement.selector,animation:this.pseudoElementAnimation}),(0,h.jsx)(E,Object.assign({onExit:this.onExit,onEnter:this.onEnter,in:this.props.in||!1,out:this.props.out||!1,name:null!==(s=null===(i=this.props.name)||void 0===i?void 0:i.toLowerCase().replace(" ","-"))&&void 0!==s?s:this.name,resolvedPathname:this.props.resolvedPathname,animation:this.animation,pseudoElement:a,backNavigating:this.context.backNavigating,keepAlive:this.state.shouldKeepAlive&&(null===(o=this.props.config)||void 0===o?void 0:o.keepAlive)||!1,navigation:this.context.navigation},{children:(0,h.jsx)("div",Object.assign({id:this.name,ref:this.onRef,className:"screen",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",pointerEvents:"inherit",overflowX:"auto",overflowY:"auto"}},{children:(0,h.jsx)(A.Provider,Object.assign({value:this.sharedElementScene},{children:(0,h.jsx)(t.Suspense,Object.assign({fallback:this.state.fallback},{children:(0,h.jsx)(r,{route:{params:Object.assign(Object.assign({},this.props.defaultParams),this.contextParams),preloaded:l},navigation:this.context.navigation,orientation:screen.orientation})}))}))}))}))}}D.contextType=o,D.defaultProps={route:{params:{}}};class O{constructor(t,e,n){var i;this._stack=[],this._routerId=t,window.history.replaceState(Object.assign(Object.assign({},history.state),{routerId:this._routerId}),"",window.location.toString()),n=n||new URL(window.location.toString()),n=new URL(n.href.replace(/\/$/,"")),this._baseURL=n,this._defaultRoute=e,this.state.has(this.baseURL.pathname)||this.state.set(this.baseURL.pathname,{});const s=null===(i=this.state.get(this.baseURL.pathname))||void 0===i?void 0:i.stack;s?this._stack=[...s.filter((t=>Boolean(t)))]:this.state.has(this.baseURL.pathname)&&(this.state.get(this.baseURL.pathname).stack=[...this._stack])}set defaultRoute(t){this._defaultRoute=t}get length(){return this._stack.length}get defaultRoute(){return this._defaultRoute||"/"}get isEmpty(){return!this._stack.length}get baseURL(){return this._baseURL}get state(){return{set:(t,e)=>!!window.history.state&&(window.history.state[t]=e,!0),get:t=>window.history.state&&window.history.state[t]||null,has:t=>!!window.history.state&&t in window.history.state,delete:t=>!!window.history.state&&delete window.history.state[t],keys:()=>Object.keys(window.history.state||{}),values:()=>Object.values(window.history.state||{}),clear(){return this.keys().forEach((t=>delete window.history.state[t]))},get length(){return this.keys().length}}}pushState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.pushState(t,e,n)}replaceState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.replaceState(t,e,n)}static getURL(t,e,n=""){e.pathname.match(/\/$/)||(e=new URL(e.href+"/")),t.match(/^\//)&&(t=t.slice(1));const i=new URL(t,e);return i.search=n,i}}function N(){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),[n,i]=(0,t.useState)(e.matches);return e.onchange=()=>{i(e.matches)},n}function T(){const t=e().useContext(o);if(t)return t.navigation;throw new Error("RouterData is null. You may be trying to call useNavigation outside a Router.")}function I(){const[n,i]=(0,t.useState)(e().useContext(p)),s=T();return(0,t.useEffect)((()=>{const t=({detail:t})=>{i(t.progress)};return s.addEventListener("motion-progress",t),()=>s.removeEventListener("motion-progress",t)}),[]),n}var C=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function j(n){const i=e().useContext(o),s=T(),[a,r]=(0,t.useState)(""),[u,c]=(0,t.useState)(!1);(0,t.useEffect)((()=>{if(!s)return;let t,e;if("goBack"in n)t=$(s),e="";else{const s=(null==i?void 0:i.paramsSerializer)||null;t=n.href,e=(0,l.Po)(n.params||{},s)||""}const o=new URL(t,s.location.origin);o.hash=n.hash||"",o.search=e,o.origin===s.location.origin?(c(!1),r(o.href.replace(s.location.origin,""))):(c(!0),r(o.href))}),[n.href,n.params]);const{href:d,goBack:p,hash:m,onClick:v,replace:f,params:g}=n,y=C(n,["href","goBack","hash","onClick","replace","params"]);return s?(0,h.jsx)("a",Object.assign({href:a,onClick:t=>{t.stopPropagation(),s&&(u||(t.preventDefault(),v&&v(t),p&&s.goBack(),d&&s.navigate(d,g,{hash:m,replace:f})))}},y,{children:n.children})):(0,h.jsx)(h.Fragment,{})}function $(t){return t.canGoBack()?t.history.previous:t.parent?$(t.parent):document.referrer}var M=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function U(t){var{disabled:e,children:n}=t,i=M(t,["disabled","children"]);return(0,h.jsx)("div",Object.assign({className:"gesture-region","data-disabled":e,style:{display:"contents"}},i,{children:n}))}n(878);var F=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};class z extends e().Component{constructor(t){super(t),this.ref=null,this.scrollPos={x:0,y:0},this.routerData=null,this._mounted=!1,this.onPageAnimationEnd=()=>{window.location.hash&&requestAnimationFrame(this.onHashChange.bind(this))},this.onHashChange=()=>{var t;if(this.ref){const e=location.hash;try{null===(t=this.ref.querySelector(e))||void 0===t||t.scrollIntoView(this.props.hashScrollConfig)}catch(t){}}},this.setRef=t=>{t&&(this.scrollPos={x:t.scrollLeft,y:t.scrollTop},this.ref=t,location.hash&&!this._mounted&&this.onHashChange(),this._mounted=!0)},this.onHashChange=this.onHashChange.bind(this)}componentDidMount(){var t,e;const n=null===(t=this.routerData)||void 0===t?void 0:t.scrollRestorationData.get(this.props.id);n&&(this.scrollPos=n),this.ref&&this.props.shouldRestore&&this.ref.scrollTo({left:this.scrollPos.x,top:this.scrollPos.y}),null===(e=this.routerData)||void 0===e||e.navigation.addEventListener("page-animation-end",this.onPageAnimationEnd),window.addEventListener("hashchange",this.onHashChange)}componentWillUnmount(){var t,e,n,i;const s={x:(null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)||0,y:(null===(e=this.ref)||void 0===e?void 0:e.scrollTop)||0};null===(n=this.routerData)||void 0===n||n.scrollRestorationData.set(this.props.id,s),null===(i=this.routerData)||void 0===i||i.navigation.removeEventListener("page-animation-end",this.onPageAnimationEnd),window.removeEventListener("hashchange",this.onHashChange)}get scrollTop(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}get scrollLeft(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}get scrollWidth(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollWidth)&&void 0!==e?e:0}get scrollHeight(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){return(0,h.jsx)(o.Consumer,{children:t=>{this.routerData=t;const e=this.props,{style:n,shouldRestore:i,hashScrollConfig:s}=e,o=F(e,["style","shouldRestore","hashScrollConfig"]);return(0,h.jsx)("div",Object.assign({},o,{ref:this.setRef,style:Object.assign(Object.assign({},n),{overflow:"scroll"})},{children:this.props.children}))}})}}var Y=/[$_\p{ID_Start}]/u,X=/[$_\u200C\u200D\p{ID_Continue}]/u;function B(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function V(t,e=!1){const n=[];let i=0;for(;i<t.length;){const s=t[i],o=function(s){if(!e)throw new TypeError(s);n.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if("*"!==s)if("+"!==s&&"?"!==s)if("\\"!==s)if("{"!==s)if("}"!==s)if(":"!==s)if("("!==s)n.push({type:"CHAR",index:i,value:t[i++]});else{let e=1,s="",a=i+1,r=!1;if("?"===t[a]){o(`Pattern cannot start with "?" at ${a}`);continue}for(;a<t.length;){if(!B(t[a],!1)){o(`Invalid character '${t[a]}' at ${a}.`),r=!0;break}if("\\"!==t[a]){if(")"===t[a]){if(e--,0===e){a++;break}}else if("("===t[a]&&(e++,"?"!==t[a+1])){o(`Capturing groups are not allowed at ${a}`),r=!0;break}s+=t[a++]}else s+=t[a++]+t[a++]}if(r)continue;if(e){o(`Unbalanced pattern at ${i}`);continue}if(!s){o(`Missing pattern at ${i}`);continue}n.push({type:"PATTERN",index:i,value:s}),i=a}else{let e="",s=i+1;for(;s<t.length;){const n=t.substr(s,1);if(!(s===i+1&&Y.test(n)||s!==i+1&&X.test(n)))break;e+=t[s++]}if(!e){o(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:e}),i=s}else n.push({type:"CLOSE",index:i,value:t[i++]});else n.push({type:"OPEN",index:i,value:t[i++]});else n.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else n.push({type:"MODIFIER",index:i,value:t[i++]});else n.push({type:"ASTERISK",index:i,value:t[i++]})}return n.push({type:"END",index:i,value:""}),n}function H(t,e={}){const n=V(t),{prefixes:i="./"}=e,s=`[^${W(void 0===e.delimiter?"/#?":e.delimiter)}]+?`,o=[];let a=0,r=0,h="",l=new Set;const u=t=>{if(r<n.length&&n[r].type===t)return n[r++].value},c=()=>{const t=u("MODIFIER");return t||u("ASTERISK")},d=t=>{const e=u(t);if(void 0!==e)return e;const{type:i,index:s}=n[r];throw new TypeError(`Unexpected ${i} at ${s}, expected ${t}`)},p=()=>{let t,e="";for(;t=u("CHAR")||u("ESCAPED_CHAR");)e+=t;return e},m=e.encodePart||(t=>t);for(;r<n.length;){const t=u("CHAR"),e=u("NAME");let n=u("PATTERN");if(e||n||!u("ASTERISK")||(n=".*"),e||n){let r=t||"";-1===i.indexOf(r)&&(h+=r,r=""),h&&(o.push(m(h)),h="");const u=e||a++;if(l.has(u))throw new TypeError(`Duplicate name '${u}'.`);l.add(u),o.push({name:u,prefix:m(r),suffix:"",pattern:n||s,modifier:c()||""});continue}const r=t||u("ESCAPED_CHAR");if(r){h+=r;continue}if(u("OPEN")){const t=p(),e=u("NAME")||"";let n=u("PATTERN")||"";e||n||!u("ASTERISK")||(n=".*");const i=p();d("CLOSE");const r=c()||"";if(!e&&!n&&!r){h+=t;continue}if(!e&&!n&&!t)continue;h&&(o.push(m(h)),h=""),o.push({name:e||(n?a++:""),pattern:e&&!n?s:n,prefix:m(t),suffix:m(i),modifier:r})}else h&&(o.push(m(h)),h=""),d("END")}return o}function W(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function G(t){return t&&t.ignoreCase?"ui":"u"}function K(t,e,n={}){const{strict:i=!1,start:s=!0,end:o=!0,encode:a=(t=>t)}=n,r=`[${W(void 0===n.endsWith?"":n.endsWith)}]|$`,h=`[${W(void 0===n.delimiter?"/#?":n.delimiter)}]`;let l=s?"^":"";for(const n of t)if("string"==typeof n)l+=W(a(n));else{const t=W(a(n.prefix)),i=W(a(n.suffix));if(n.pattern)if(e&&e.push(n),t||i)if("+"===n.modifier||"*"===n.modifier){const e="*"===n.modifier?"?":"";l+=`(?:${t}((?:${n.pattern})(?:${i}${t}(?:${n.pattern}))*)${i})${e}`}else l+=`(?:${t}(${n.pattern})${i})${n.modifier}`;else"+"===n.modifier||"*"===n.modifier?l+=`((?:${n.pattern})${n.modifier})`:l+=`(${n.pattern})${n.modifier}`;else l+=`(?:${t}${i})${n.modifier}`}if(o)i||(l+=`${h}?`),l+=n.endsWith?`(?=${r})`:"$";else{const e=t[t.length-1],n="string"==typeof e?h.indexOf(e[e.length-1])>-1:void 0===e;i||(l+=`(?:${h}(?=${r}))?`),n||(l+=`(?=${h}|${r})`)}return new RegExp(l,G(n))}function q(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;const n=/\((?:\?<(.*?)>)?(?!\?)/g;let i=0,s=n.exec(t.source);for(;s;)e.push({name:s[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),s=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){const i=t.map((t=>q(t,e,n).source));return new RegExp(`(?:${i.join("|")})`,G(n))}(t,e,n):function(t,e,n){return K(H(t,n),e,n)}(t,e,n)}var J={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Q={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Z={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function tt(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function et(t){return!(!t||t.length<2)&&("["===t[0]||("\\"===t[0]||"{"===t[0])&&"["===t[1])}var nt=["ftp","file","http","https","ws","wss"];function it(t){if(!t)return!0;for(const e of nt)if(t.test(e))return!0;return!1}function st(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function ot(t){if(""===t)return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function at(t){if(""===t)return t;const e=new URL("https://example.com");return e.username=t,e.username}function rt(t){if(""===t)return t;const e=new URL("https://example.com");return e.password=t,e.password}function ht(t){if(""===t)return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);const e=new URL("https://example.com");return e.hostname=t,e.hostname}function lt(t){if(""===t)return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function ut(t){if(""===t)return t;if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function ct(t){if(""===t)return t;const e=new URL("https://example.com");return e.pathname="/"!==t[0]?"/-"+t:t,"/"!==t[0]?e.pathname.substring(2,e.pathname.length):e.pathname}function dt(t){if(""===t)return t;return new URL(`data:${t}`).pathname}function pt(t){if(""===t)return t;const e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function mt(t){if(""===t)return t;const e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var vt=["protocol","username","password","hostname","port","pathname","search","hash"],ft="*";function gt(t,e){if("string"!=typeof t)throw new TypeError("parameter 1 is not of type 'string'.");const n=new URL(t,e);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!=n.search?n.search.substring(1,n.search.length):void 0,hash:""!=n.hash?n.hash.substring(1,n.hash.length):void 0}}function yt(t,e){return e?Et(t):t}function _t(t,e,n){let i;if("string"==typeof e.baseURL)try{i=new URL(e.baseURL),t.protocol=yt(i.protocol.substring(0,i.protocol.length-1),n),t.username=yt(i.username,n),t.password=yt(i.password,n),t.hostname=yt(i.hostname,n),t.port=yt(i.port,n),t.pathname=yt(i.pathname,n),t.search=yt(i.search.substring(1,i.search.length),n),t.hash=yt(i.hash.substring(1,i.hash.length),n)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if("string"==typeof e.protocol&&(t.protocol=function(t,e){var n,i;return i=":",t=(n=t).endsWith(i)?n.substr(0,n.length-i.length):n,e||""===t?t:ot(t)}(e.protocol,n)),"string"==typeof e.username&&(t.username=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.username=t,n.username}(e.username,n)),"string"==typeof e.password&&(t.password=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.password=t,n.password}(e.password,n)),"string"==typeof e.hostname&&(t.hostname=function(t,e){return e||""===t?t:et(t)?lt(t):ht(t)}(e.hostname,n)),"string"==typeof e.port&&(t.port=function(t,e,n){return st(e)===t&&(t=""),n||""===t?t:ut(t)}(e.port,t.protocol,n)),"string"==typeof e.pathname){if(t.pathname=e.pathname,i&&!function(t,e){return!(!t.length||"/"!==t[0]&&(!e||t.length<2||"\\"!=t[0]&&"{"!=t[0]||"/"!=t[1]))}(t.pathname,n)){const e=i.pathname.lastIndexOf("/");e>=0&&(t.pathname=yt(i.pathname.substring(0,e+1),n)+t.pathname)}t.pathname=function(t,e,n){if(n||""===t)return t;if(e&&!nt.includes(e))return new URL(`${e}:${t}`).pathname;const i="/"==t[0];return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}(t.pathname,t.protocol,n)}return"string"==typeof e.search&&(t.search=function(t,e){if(t=tt(t,"?"),e||""===t)return t;const n=new URL("https://example.com");return n.search=t,n.search?n.search.substring(1,n.search.length):""}(e.search,n)),"string"==typeof e.hash&&(t.hash=function(t,e){if(t=tt(t,"#"),e||""===t)return t;const n=new URL("https://example.com");return n.hash=t,n.hash?n.hash.substring(1,n.hash.length):""}(e.hash,n)),t}function Et(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function wt(t,e){const n=`[^${i=void 0===e.delimiter?"/#?":e.delimiter,i.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}]+?`;var i;const s=/[$_\u200C\u200D\p{ID_Continue}]/u;let o="";for(let i=0;i<t.length;++i){const a=t[i],r=i>0?t[i-1]:null,h=i<t.length-1?t[i+1]:null;if("string"==typeof a){o+=Et(a);continue}if(""===a.pattern){if(""===a.modifier){o+=Et(a.prefix);continue}o+=`{${Et(a.prefix)}}${a.modifier}`;continue}const l="number"!=typeof a.name,u=void 0!==e.prefixes?e.prefixes:"./";let c=""!==a.suffix||""!==a.prefix&&(1!==a.prefix.length||!u.includes(a.prefix));if(!c&&l&&a.pattern===n&&""===a.modifier&&h&&!h.prefix&&!h.suffix)if("string"==typeof h){const t=h.length>0?h[0]:"";c=s.test(t)}else c="number"==typeof h.name;if(!c&&""===a.prefix&&r&&"string"==typeof r&&r.length>0){const t=r[r.length-1];c=u.includes(t)}c&&(o+="{"),o+=Et(a.prefix),l&&(o+=`:${a.name}`),".*"===a.pattern?l||r&&"string"!=typeof r&&!r.modifier&&!c&&""===a.prefix?o+="(.*)":o+="*":a.pattern===n?l||(o+=`(${n})`):o+=`(${a.pattern})`,a.pattern===n&&l&&""!==a.suffix&&s.test(a.suffix[0])&&(o+="\\"),o+=Et(a.suffix),c&&(o+="}"),o+=a.modifier}return o}var bt,xt,St,Pt=class{constructor(t={},e,n){this.regexp={},this.keys={},this.component_pattern={};try{let i;if("string"==typeof e?i=e:n=e,"string"==typeof t){const e=new class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=V(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(0===this.state){this.rewind(),this.isHashPrefix()?this.changeState(9,1):this.isSearchPrefix()?(this.changeState(8,1),this.internalResult.hash=""):(this.changeState(7,0),this.internalResult.search="",this.internalResult.hash="");continue}if(2===this.state){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1)}}}changeState(t,e){switch(this.state){case 0:case 2:case 10:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString()}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t<this.tokenList.length?this.tokenList[t]:this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const n=this.safeToken(t);return n.value===e&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return!0;if("?"!==this.tokenList[this.tokenIndex].value)return!1;const t=this.safeToken(this.tokenIndex-1);return"NAME"!==t.type&&"PATTERN"!==t.type&&"CLOSE"!==t.type&&"ASTERISK"!==t.type}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return"OPEN"==this.tokenList[this.tokenIndex].type}isGroupClose(){return"CLOSE"==this.tokenList[this.tokenIndex].type}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex],e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,J),t.encodePart=ot;const e=q(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=it(e)}}(t);if(e.parse(),t=e.result,void 0===i&&"string"!=typeof t.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||"object"!=typeof t)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}void 0===n&&(n={ignoreCase:!1});const s={ignoreCase:!0===n.ignoreCase},o={pathname:ft,protocol:ft,username:ft,password:ft,hostname:ft,port:ft,search:ft,hash:ft};let a;for(a of(this.pattern=_t(o,t,!0),st(this.pattern.protocol)===this.pattern.port&&(this.pattern.port=""),vt)){if(!(a in this.pattern))continue;const t={},e=this.pattern[a];switch(this.keys[a]=[],a){case"protocol":Object.assign(t,J),t.encodePart=ot;break;case"username":Object.assign(t,J),t.encodePart=at;break;case"password":Object.assign(t,J),t.encodePart=rt;break;case"hostname":Object.assign(t,Q),et(e)?t.encodePart=lt:t.encodePart=ht;break;case"port":Object.assign(t,J),t.encodePart=ut;break;case"pathname":it(this.regexp.protocol)?(Object.assign(t,Z,s),t.encodePart=ct):(Object.assign(t,J,s),t.encodePart=dt);break;case"search":Object.assign(t,J,s),t.encodePart=pt;break;case"hash":Object.assign(t,J,s),t.encodePart=mt}try{const n=H(e,t);this.regexp[a]=K(n,this.keys[a],t),this.component_pattern[a]=wt(n,t)}catch{throw new TypeError(`invalid ${a} pattern '${this.pattern[a]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return!1;try{i=_t(i,"object"==typeof t?t:gt(t,e),!1)}catch(t){return!1}for(n of vt)if(!this.regexp[n].exec(i[n]))return!1;return!0}exec(t={},e){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return;try{n=_t(n,"object"==typeof t?t:gt(t,e),!1)}catch(t){return null}let i,s={};for(i of(s.inputs=e?[t,e]:[t],vt)){let t=this.regexp[i].exec(n[i]);if(!t)return null;let e={};for(let[n,s]of this.keys[i].entries())if("string"==typeof s.name||"number"==typeof s.name){let i=t[n+1];e[s.name]=i}s[i]={input:n[i]||"",groups:e}}return s}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=Pt),function(t){t[t.up=0]="up",t[t.down=1]="down",t[t.left=2]="left",t[t.right=3]="right",t[t.in=4]="in",t[t.out=5]="out"}(bt||(bt={})),function(t){t[t.slide=0]="slide",t[t.fade=1]="fade",t[t.zoom=2]="zoom",t[t.none=3]="none"}(xt||(xt={})),function(t){t[t.ease=0]="ease",t[t["ease-in"]=1]="ease-in",t[t["ease-in-out"]=2]="ease-in-out",t[t["ease-out"]=3]="ease-out",t[t.linear=4]="linear"}(St||(St={})),globalThis.URLPattern||(globalThis.URLPattern=Pt),document.body.style.position="fixed",document.body.style.inset="0";const At=document.head.querySelector("title");At&&(At.ariaLive="polite");let Lt=document.getElementById("root");Lt&&(Lt.style.width="100%",Lt.style.height="100%")})();var s=i.ee,o=i.rN,a=i.PM,r=i.y_,h=i.DC,l=i.GW,u=i.sV,c=i.RG,d=i.GI,p=i.rJ,m=i.uZ,v=i.r2,f=i.rL,g=i.Nu,y=i.hR,_=i.cT,E=i.e1,w=i.Vo,b=i.QN,x=i.kI,S=i.Po,P=i.fJ,A=i.nc,L=i.HJ,R=i.JZ;export{s as Anchor,o as GestureRegion,a as HistoryBase,r as Motion,h as NavigationBase,l as RouterBase,u as RouterData,c as ScreenBase,d as ScrollRestoration,p as SharedElement,m as clamp,v as concatenateURL,f as defaultSearchParamsToObject,g as dispatchEvent,y as getCSSData,_ as getStyleObject,E as includesRoute,w as lazy,b as matchRoute,x as prefetchRoute,S as searchParamsFromObject,P as searchParamsToObject,A as useMotion,L as useNavigation,R as useReducedMotion};
|
|
2
|
+
var t={837:(t,e,n)=>{var i=n(689),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var i,o={},l=null,u=null;for(i in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!h.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:l,ref:u,props:o,_owner:r.current}}e.Fragment=o,e.jsx=l,e.jsxs=l},322:(t,e,n)=>{t.exports=n(837)},174:(t,e,n)=>{n.d(e,{Nu:()=>u,PV:()=>c,Po:()=>m,QN:()=>h,Vo:()=>v,cT:()=>a,e1:()=>l,fJ:()=>p,hR:()=>o,kI:()=>f,r2:()=>g,rL:()=>d,uZ:()=>r});var i=n(689),s=n.n(i);function o(t,e=!0){let n="";const i={};let s=0;for(let o in t){if(s<t.length){const e=t[o];let i=t.getPropertyValue(e);if("visibility"===e)i="visible";n+=`${e}:${i};`}else{if(!e)break;let n=o,s=t[n];if("string"==typeof s&&"cssText"!==n&&!n.includes("webkit")&&!n.includes("grid")){switch(n){case"offset":n="cssOffset";break;case"float":n="cssFloat";break;case"visibility":s="visible"}i[n]=s}}s++}return[n,i]}function a(t){const e={};for(const n in t)if(t[n]&&t[n].length&&"function"!=typeof t[n]){if(/^\d+$/.test(n))continue;if("offset"===n)continue;e[n]=t[n]}return e}function r(t,e,n){return t<e?e:n&&t>n?n:t}function h(t,e,n=window.location.origin){if(void 0===t||void 0===e)return t===e?{exact:!0,matchedPathname:e}:null;const i=new URLPattern(t,n),s=new URL(e,n),o=i.exec(s);let a="",r="";for(let n=0;n<t.length;n++){if(t[n]!==e[n]){r=e.substring(n);break}a+=t[n]}return o?{exact:t===e,matchedPathname:a,rest:r}:null}function l(t,e,n=window.location.origin){return e.some((e=>h(e,t,n)))}function u(t,e=window){return new Promise((n=>{queueMicrotask((()=>n(e.dispatchEvent(t))))}))}function c(t,e){return"string"==typeof e&&(e=new URL(e)),"string"!=typeof t&&(t=t.pathname),t=t.replace(/^\//,""),e.pathname.endsWith("/")||(e=new URL(e.href+"/")),new URL(t,e)}function d(t){const e=new URLSearchParams(decodeURI(t)).entries(),n={};for(const[t,i]of e){let e="";try{e=JSON.parse(i)}catch(t){console.warn("Non JSON serialisable value was passed as URL route param."),e=i}n[t]=e}return Object.keys(n).length?n:void 0}function p(t,e){return(e||d)(t)||{}}function m(t,e){try{return(e||function(t){return new URLSearchParams(t).toString()})(t)}catch(t){console.error(t),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function v(t){const e=s().lazy(t);return e.preload=()=>{const n=t();return n.then((t=>e.preloaded=t.default)).catch(console.error),n},e}function f(t,e){let n=e;return new Promise(((i,o)=>{let a=!1;for(;n;){const r=n.routes;if(s().Children.forEach(r,(e=>{if(a)return;if(!s().isValidElement(e))return;h(e.props.path,t)&&(a=!0,queueMicrotask((async()=>{if("preload"in e.props.component)try{await e.props.component.preload(),i(a)}catch(t){o(t)}})))})),a)break;n=e.parentRouterData}a||i(!1)}))}const g={in:{type:"none",duration:0},out:{type:"none",duration:0}}},623:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("doubletap",t)}}e.default=o},813:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.tap=0]="tap",t[t.longpress=1]="longpress",t[t.pinchstart=2]="pinchstart",t[t.pinch=3]="pinch",t[t.pinchend=4]="pinchend",t[t.rotatestart=5]="rotatestart",t[t.rotate=6]="rotate",t[t.rotateend=7]="rotateend",t[t.swipestart=8]="swipestart",t[t.swipe=9]="swipe",t[t.swipeend=10]="swipeend",t[t.panstart=11]="panstart",t[t.pan=12]="pan",t[t.panend=13]="panend",t[t.doubletap=14]="doubletap"}(n||(n={})),void 0===window.TouchEvent&&(window.TouchEvent=PointerEvent);class i extends TouchEvent{constructor(t,e){if(super(t,{touches:Array.from(e.touches),targetTouches:Array.from(e.targetTouches),changedTouches:Array.from(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!0,cancelable:!0}),t.includes("end")||e.type.includes("end"))return this.gestureTarget=e.changedTouches[0].target,this.x=e.changedTouches[0].clientX,void(this.y=e.changedTouches[0].clientY);this.gestureTarget=e.touches[0].target,this.x=e.touches[0].clientX,this.y=e.touches[0].clientY}}e.default=i},646:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t,e){super("longpress",t),this.duration=0,this.duration=e}}e.default=o},577:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PanEndEvent=e.PanStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="panstart";break;case"end":i="panend";break;default:i="pan"}super(i,t),this.velocity=e.velocity,this.translation={x:e.translation.x,y:e.translation.y,magnitude:e.translation.magnitude,clientX:e.translation.clientX,clientY:e.translation.clientY,clientMagnitude:e.translation.clientMagnitude}}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PanStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PanEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},630:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PinchEndEvent=e.PinchStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="pinchstart";break;case"end":i="pinchend";break;default:i="pinch"}super(i,t),Object.defineProperty(this,"scale",{value:e.scale,writable:!1})}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PinchStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PinchEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},859:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="rotatestart";break;case"end":i="rotateend";break;default:i="rotate"}super(i,t),this.anchor={x:e.anchor.x,y:e.anchor.y,clientX:e.anchor.clientX,clientY:e.anchor.clientY},Object.defineProperty(this,"rotation",{value:e.rotation,writable:!1}),this.rotationDeg=e.rotationDeg}}e.default=class extends a{constructor(t,e){super(t,e)}};e.RotateStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.RotateEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},224:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SwipeEndEvent=e.SwipeStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="swipestart";break;case"end":i="swipeend";break;default:i="swipe"}super(i,t),this.velocity=e.velocity,this.direction=e.direction}}e.default=class extends a{constructor(t,e){super(t,e)}};e.SwipeStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.SwipeEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},884:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("tap",t)}}e.default=o},878:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return s(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateEvent=e.RotateStartEvent=e.PinchEndEvent=e.PinchEvent=e.PinchStartEvent=e.PanEndEvent=e.PanEvent=e.PanStartEvent=e.SwipeEndEvent=e.SwipeEvent=e.SwipeStartEvent=e.DoubleTapEvent=e.LongPressEvent=e.GestureEvent=e.TapEvent=void 0;const r=a(n(813));e.GestureEvent=r.default;const h=a(n(646));e.LongPressEvent=h.default;const l=a(n(884));e.TapEvent=l.default;const u=a(n(623));e.DoubleTapEvent=u.default;const c=o(n(224));e.SwipeEvent=c.default,Object.defineProperty(e,"SwipeEndEvent",{enumerable:!0,get:function(){return c.SwipeEndEvent}}),Object.defineProperty(e,"SwipeStartEvent",{enumerable:!0,get:function(){return c.SwipeStartEvent}});const d=o(n(577));e.PanEvent=d.default,Object.defineProperty(e,"PanEndEvent",{enumerable:!0,get:function(){return d.PanEndEvent}}),Object.defineProperty(e,"PanStartEvent",{enumerable:!0,get:function(){return d.PanStartEvent}});const p=o(n(630));e.PinchEvent=p.default,Object.defineProperty(e,"PinchEndEvent",{enumerable:!0,get:function(){return p.PinchEndEvent}}),Object.defineProperty(e,"PinchStartEvent",{enumerable:!0,get:function(){return p.PinchStartEvent}});const m=o(n(859));e.RotateEvent=m.default,Object.defineProperty(e,"RotateEndEvent",{enumerable:!0,get:function(){return m.RotateEndEvent}}),Object.defineProperty(e,"RotateStartEvent",{enumerable:!0,get:function(){return m.RotateStartEvent}});const v=n(47);var f;!function(t){t[t.right=0]="right",t[t.up=1]="up",t[t.left=2]="left",t[t.down=3]="down"}(f||(f={}));class g{constructor(){this.touchStart=new TouchEvent("touchstart")||{},this.touchMove=new TouchEvent("touchmove")||{},this.touchEnd=new TouchEvent("touchend")||{},this.touchCancel=new TouchEvent("touchcancel")||{},this.velocity=0,this.dxDy=new v.Vec2(0,0),this.scale=1,this.rotation=0,this.rotationDeg=0,this.anchor=new v.Vec2(0,0),this.octant=0,this.isPanning=!1,this.isPinching=!1,this.isSwiping=!1,this.isRotating=!1,this.touchStartTime=0,this.touchEndTime=0,this.lastTouchTime=0,this.taps=0,this.scaleBase=0,this.touchMoved=!1,this.touchDown=!1,this.shouldFire=!1,this.pointers=0,this.isLongPress=!1,this.longPressTimeout=0,this.touchStartListener=this.onTouchStart.bind(this),this.touchMoveListener=this.onTouchMove.bind(this),this.touchEndListener=this.onTouchEnd.bind(this),this.touchCancelListener=this.onTouchCancel.bind(this),this.currentTarget=window,this.config={longPressDuration:500,tapDelay:500,minPointers:1,numberOfTaps:0},g.listening||(TouchEvent&&window.addEventListener("touchstart",this.touchStartListener,!0),g.listening=!0)}bind(t){this.unbind(this.currentTarget),t.addEventListener("touchmove",this.touchMoveListener,!0),t.addEventListener("touchend",this.touchEndListener,!0),t.addEventListener("touchcancel",this.touchCancelListener,!0),this.currentTarget=t}unbind(t){t.removeEventListener("touchmove",this.touchMoveListener),t.removeEventListener("touchend",this.touchEndListener),t.removeEventListener("touchcancel",this.touchCancelListener)}clean(){this.touchMoved=!1,this.touchStartTime=0,this.touchDown=!1,this.scaleBase=0,this.longPressTimeout&&!this.isLongPress&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=0),this.isLongPress=!1}onPointerLeave(t){if(!t.touches.length){if(this.isSwiping){const e=new c.SwipeEndEvent(t,{velocity:this.velocity,direction:f[(0,v.closest)(this.octant,[0,1,2,3])]});this.dispatchEvent(e),this.isSwiping=!1}if(this.isPanning){const e=new d.PanEndEvent(t,{translation:this.dxDy,velocity:this.velocity});this.dispatchEvent(e),this.isPanning=!1}}if(1===t.touches.length){if(this.scaleBase=0,this.isPinching){const e=new p.PinchEndEvent(t,{scale:this.scale});this.dispatchEvent(e),this.isPinching=!1}if(this.isRotating){const e=new m.RotateEndEvent(t,{rotation:this.rotation,rotationDeg:this.rotationDeg,anchor:this.anchor});this.dispatchEvent(e),this.isRotating=!1}}}dispatchEvent(t){queueMicrotask((()=>{this.currentTarget.dispatchEvent(t)}))}onTouchStart(t){this.currentTarget!==t.touches[0].target&&(this.clean(),this.unbind(this.currentTarget),this.pointers=this.touchEnd.touches.length,this.taps=0),this.touchStart=t;const e=parseInt(t.touches[0].target.dataset.minpointers||"0")||this.config.minPointers;if(this.touchStart.touches.length<e)return void(this.shouldFire=!1);this.shouldFire=!0,this.touchStartTime=t.timeStamp,this.touchDown=!0,this.pointers||this.bind(t.touches[0].target),this.pointers=this.touchStart.touches.length;const n=parseFloat(this.currentTarget.dataset.longpressduration||"0")||this.config.longPressDuration;if(this.longPressTimeout||(this.longPressTimeout=setTimeout((()=>{if(!this.touchMoved&&this.touchDown){const t=Date.now()-this.touchStartTime,e=new h.default(this.touchStart,t);this.dispatchEvent(e),this.isLongPress=!0,this.longPressTimeout=0}}),n)),this.touchStart.touches.length>1){const t=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),e=new v.Vec2(this.touchStart.touches[1].clientX,this.touchStart.touches[1].clientY);this.scaleBase=t.substract(e).magnitude}else this.scaleBase=0}onTouchMove(t){if(!this.shouldFire)return;if(this.touchMoved=!0,this.touchMove=t,t.touches.length>1&&this.touchStart.touches.length>1&&(t.touches[1].clientX!==this.touchStart.touches[1].clientX||t.touches[1].clientY!==this.touchStart.touches[1].clientY)){const e=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[1].clientX,this.touchMove.touches[1].clientY),i=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),s=e.substract(n);if(this.scaleBase&&Math.abs(this.scaleBase-s.magnitude)>10){const e=s.magnitude/this.scaleBase;if(this.scale=e,this.isPinching){const n=new p.default(t,{scale:e});this.dispatchEvent(n)}else{const n=new p.PinchStartEvent(t,{scale:e});this.dispatchEvent(n),this.isPinching=!0}}this.anchor=e;let o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(o<0?o+=1.5708:o-=1.5708,this.rotation=o,this.rotationDeg=180*o/Math.PI,this.anchor=this.anchor,this.isRotating){const e=new m.default(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e)}else{const e=new m.RotateStartEvent(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e),this.isRotating=!0}}const e=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY).substract(e),i=n.magnitude,s={x:n.x/i,y:n.y/i},o=Math.atan2(s.y,s.x);this.octant=Math.round(4*o/(2*Math.PI)+4)%4;const a=(t.timeStamp-this.touchStart.timeStamp)/1e3,r=n.magnitude/a;if(this.isSwiping){const e=new c.default(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e)}else{const e=new c.SwipeStartEvent(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e),this.isSwiping=!0}if(this.dxDy=n,this.velocity=r,this.isPanning){const e=new d.default(t,{translation:n,velocity:r});this.dispatchEvent(e)}else{const e=new d.PanStartEvent(t,{translation:n,velocity:r});this.dispatchEvent(e),this.isPanning=!0}}onTouchEnd(t){const e=parseInt(this.currentTarget.dataset.numberoftaps||"0")||this.config.numberOfTaps;if(this.taps++,this.shouldFire=Boolean(this.taps>e),this.shouldFire){this.touchEnd=t,this.touchEndTime=t.timeStamp;const n=parseFloat(this.currentTarget.dataset.tapdelay||"0")||this.config.tapDelay;if(!this.touchMoved&&!this.isLongPress)if(1===this.taps||this.touchEndTime-this.lastTouchTime<n){if(this.taps%2===e){const e=new u.default(t);this.dispatchEvent(e),this.taps=0}const n=new l.default(t);this.dispatchEvent(n)}else this.taps=0}this.pointers=this.touchEnd.touches.length,this.lastTouchTime=this.touchEndTime,this.onPointerLeave(t),this.unbind(this.currentTarget),this.clean()}onTouchCancel(t){this.shouldFire&&(this.touchCancel=t,this.unbind(this.currentTarget),this.clean())}}function y(t){const e=t.type;t.composedPath().forEach((n=>{if(n instanceof HTMLElement){const i=n[E[e]];if("function"!=typeof i)return;i.apply(n,[t])}}))}g.listening=!1,e.default=g,window.GLOBAL_EVENT_DISPATCHER||(window.addEventListener("tap",y,{passive:!0}),window.addEventListener("longpress",y,{passive:!0}),window.addEventListener("doubletap",y,{passive:!0}),window.addEventListener("swipestart",y,{passive:!0}),window.addEventListener("swipe",y,{passive:!0}),window.addEventListener("swipeend",y,{passive:!0}),window.addEventListener("panstart",y,{passive:!0}),window.addEventListener("pan",y,{passive:!0}),window.addEventListener("panend",y,{passive:!0}),window.addEventListener("pinchstart",y,{passive:!0}),window.addEventListener("pinch",y,{passive:!0}),window.addEventListener("pinchend",y,{passive:!0}),window.addEventListener("rotatestart",y,{passive:!0}),window.addEventListener("rotate",y,{passive:!0}),window.addEventListener("rotateend",y,{passive:!0}));const E={tap:"ontap",doubletap:"ondoubletap",longpress:"onlongpress",swipestart:"onswipestart",swipe:"onswipe",swipeend:"onswipeend",panstart:"onpanstart",pan:"onpan",panend:"onpanend",pinchstart:"onpinchstart",pinch:"onpinch",pinchend:"onpinchend",rotatestart:"onrotatestart",rotate:"onrotate",rotateend:"onrotateend"};TouchEvent&&(window.gestureProvider=new g),window.GLOBAL_EVENT_DISPATCHER||(window.GLOBAL_EVENT_DISPATCHER=y)},47:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.closest=e.Vec2=e.assert=void 0,e.assert=function(t,e){if(!t)throw new Error(e)};e.Vec2=class{constructor(t,e){this._x=0,this._y=0,this._clientX=0,this._clientY=0,this._clientX=t,this._clientY=e,this._x=this.translateX(t),this._y=this.translateY(e)}translateY(t){return-(t-window.innerHeight/2)}translateX(t){return t-window.innerWidth/2}get x(){return this._x}get y(){return this._y}get clientX(){return this._clientX}get clientY(){return this._clientY}set x(t){this._clientX=t,this._x=this.translateX(t)}set y(t){this._clientY=t,this._y=this.translateY(t)}add(t){return this._x+=t.x,this._y+=t.y,this._clientX+=t.clientX,this._clientY+=t.clientY,this}substract(t){return this._x-=t.x,this._y-=t.y,this._clientX-=t.clientX,this._clientY-=t.clientY,this}dot(t){return this._x*t.x+this._y*t.y}get magnitude(){return Math.sqrt(Math.pow(this._x,2)+Math.pow(this._y,2))}get clientMagnitude(){return Math.sqrt(Math.pow(this._clientX,2)+Math.pow(this._clientY,2))}},e.closest=function(t,e){return e.reduce(((e,n)=>{let i=Math.abs(e-t),s=Math.abs(n-t);return i===s?e>n?e:n:s<i?n:e}))}},689:t=>{t.exports=require("react")}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};(()=>{n.d(i,{ee:()=>$,r2:()=>l.r2,rN:()=>F,PM:()=>O,y_:()=>p,DC:()=>r,GW:()=>g,sV:()=>s,RG:()=>D,GI:()=>Y,rJ:()=>R,uZ:()=>l.uZ,PV:()=>l.PV,rL:()=>l.rL,Nu:()=>l.Nu,hR:()=>l.hR,cT:()=>l.cT,e1:()=>l.e1,Vo:()=>l.Vo,QN:()=>l.QN,kI:()=>l.kI,Po:()=>l.Po,fJ:()=>l.fJ,nc:()=>I,HJ:()=>T,JZ:()=>N,yj:()=>C});var t=n(689),e=n.n(t);class s{constructor(t,e){this._parentRouterData=null,this._childRouterData=null,this._dispatchEvent=null,this._addEventListener=null,this._removeEventListener=null,this._currentPath="",this._routesData=new Map,this._backNavigating=!1,this._gestureNavigating=!1,this._mountedScreen=null,this._animation=l.r2,this._ghostLayer=null,this.routerInstance=t,e&&(this.navigation=e)}destructor(){this.parentRouterData&&(this.parentRouterData.childRouterData=null)}prefetchRoute(t){return(0,l.kI)(t,this)}set parentRouterData(t){this._parentRouterData=t,this._parentRouterData&&(this._parentRouterData.childRouterData=this)}set childRouterData(t){var e;const n=null===(e=this._childRouterData)||void 0===e?void 0:e.deref();if(void 0!==n&&t&&t.routerId!==n.routerId)throw new Error("It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.");this._childRouterData=t?new WeakRef(t):null}set dispatchEvent(t){this._dispatchEvent=t}set addEventListener(t){this._addEventListener=t}set removeEventListener(t){this._removeEventListener=t}set currentPath(t){this._currentPath=t}set routesData(t){this._routesData=t}set navigation(t){this._navigation=t}set animation(t){this._animation=t}set ghostLayer(t){this._ghostLayer=t}set backNavigating(t){this._backNavigating=t}set gestureNavigating(t){this._gestureNavigating=t}set paramsSerializer(t){this._paramsSerializer=t}set paramsDeserializer(t){this._paramsDeserializer=t}set mountedScreen(t){this._mountedScreen=t}get mountedScreen(){return this._mountedScreen}get routerId(){return this.routerInstance.id}get routes(){return this.routerInstance.props.children}get parentRouterData(){return this._parentRouterData}get childRouterData(){var t,e;return null!==(e=null===(t=this._childRouterData)||void 0===t?void 0:t.deref())&&void 0!==e?e:null}get dispatchEvent(){return this._dispatchEvent}get addEventListener(){return this._addEventListener}get removeEventListener(){return this._removeEventListener}get currentPath(){return this._currentPath}get routesData(){return this._routesData}get scrollRestorationData(){return s._scrollRestorationData}get navigation(){return this._navigation}get animation(){return this._animation}get ghostLayer(){return this._ghostLayer}get backNavigating(){return this._backNavigating}get gestureNavigating(){return this._gestureNavigating}get paramsSerializer(){return this._paramsSerializer}get paramsDeserializer(){return this._paramsDeserializer}}s._scrollRestorationData=new class{constructor(){this._map=new Map}set(t,e={x:0,y:0}){this._map.set(t,e)}get(t){return this._map.get(t)}};const o=(0,t.createContext)(null);class a{constructor(){this._map=new Map,this.mutationObserver=new MutationObserver(this.observeMutations.bind(this));const{head:t}=document;this.mutationObserver.observe(t,{childList:!0}),Array.from(t.querySelectorAll("meta")).forEach((t=>{this.mutationObserver.observe(t,{attributes:!0})})),Array.from(t.querySelectorAll("meta")).forEach(this.metaDataFromNode.bind(this))}get(t){const e=this.getMetaKey(t),n=this._map.get(e);if(!n)return;let i;return i=n.includes(",")&&n.includes("=")?n.split(/,\s*/).map((t=>t.split("="))):n,i}set(t,e){const n=this.getMetaKey(t),i=this.getMetaContent(e);this._map.set(n,i),this.updateMetaElement(n,i)}has(t){const e=this.getMetaKey(t);return this._map.has(e)}delete(t){var e;const n=this.getMetaKey(t);this._map.delete(n),null===(e=document.head.querySelector(`meta[${n}]`))||void 0===e||e.remove()}clear(){document.head.querySelectorAll("meta").forEach((t=>t.remove()))}entries(){return this._map.entries()}[Symbol.iterator](){return this.entries()}get size(){return this._map.size}observeMutations(t){for(const e of t){if("attributes"===e.type){const t=e.target;this.metaDataFromNode(t)}if("childList"!==e.type)return;e.removedNodes.forEach((t=>{if("META"===t.nodeName){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),n=[e.nodeName,e.value].join("=");this._map.has(n)&&this._map.delete(n)}})),e.addedNodes.forEach((t=>{"META"===t.nodeName&&this.metaDataFromNode(t)}))}}metaDataFromNode(t){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),[n]=Array.from(t.attributes).filter((t=>"content"===t.nodeName)),i=[e.nodeName,e.value].join("=");this._map.set(i,null==n?void 0:n.value)}getMetaKey(t){let e;return e="string"==typeof t?`name=${t}`:t.join("="),e}getMetaContent(t){if(!t)return;let e;return e="string"==typeof t?t:t.map((t=>t.join("="))).join(", "),e}updateMetaElement(t,e){const n=document.querySelector(`meta[${t}]`)||document.createElement("meta"),i=t.split("=");n.setAttribute(...i),e?n.setAttribute("content",e):n.removeAttribute("content"),n.parentElement||document.head.appendChild(n)}}class r{constructor(t,e,n=!1,i=null){var s;this._metaData=new a,this._currentParams={},this.popStateListener=t=>{var e;this._routerId,this.history.state.get("routerId");const n=null===(e=r.rootNavigatorRef)||void 0===e?void 0:e.deref(),i=(null==n?void 0:n.routerId)===this.routerId;(null===this.history.state.get("routerId")&&i||this.history.state.get("routerId")===this._routerId)&&this.onPopState(t)},this.routerData=e,this._disableBrowserRouting=n,this._routerId=t;const o=null===(s=r.rootNavigatorRef)||void 0===s?void 0:s.deref();o&&o.isInDocument||(r.rootNavigatorRef=new WeakRef(this)),window.addEventListener("popstate",this.popStateListener)}destructor(){var t;const e=null===(t=r.rootNavigatorRef)||void 0===t?void 0:t.deref();(null==e?void 0:e.routerId)===this.routerId&&(r.rootNavigatorRef=null),window.removeEventListener("popstate",this.popStateListener)}addEventListener(t,e,n){var i,s;null===(s=(i=this.routerData).addEventListener)||void 0===s||s.call(i,t,e,n)}removeEventListener(t,e,n){var i,s;return null===(s=(i=this.routerData).removeEventListener)||void 0===s?void 0:s.call(i,t,e,n)}get disableBrowserRouting(){return this._disableBrowserRouting}get routerId(){return this._routerId}canGoBack(){return this.history.canGoBack()}getNavigatorById(t,e){var n;const i=null!=e?e:null===(n=r.rootNavigatorRef)||void 0===n?void 0:n.deref();return i.routerId===t?i:i.routerData.childRouterData?void this.getNavigatorById(t,i.routerData.childRouterData.navigation):null}prefetchRoute(t){return this.routerData.prefetchRoute(t)}get dispatchEvent(){return this.routerData.dispatchEvent}get paramsDeserializer(){return this.routerData.paramsDeserializer}get paramsSerializer(){return this.routerData.paramsSerializer}get history(){return this._history}get metaData(){return this._metaData}get isInDocument(){return Boolean(document.getElementById(`${this.routerId}`))}}r.rootNavigatorRef=null;var h=n(322),l=n(174);class u{constructor(){this._play=!0,this._isPlaying=!1,this._currentScreen=null,this._nextScreen=null,this._progressUpdateID=0,this._pseudoElementInAnimation=null,this._pseudoElementOutAnimation=null,this._inAnimation=null,this._outAnimation=null,this._playbackRate=1,this._gestureNavigating=!1,this._backNavigating=!1,this._onEnd=null,this._onProgress=null,this._shouldAnimate=!0,this._dispatchEvent=null,this._addEventListener=null}updateProgress(){var t,e,n,i;if(this._gestureNavigating&&!this._play)return void window.cancelAnimationFrame(this._progressUpdateID);(()=>{this._onProgress&&this._onProgress(this.progress)})(),this._progressUpdateID=window.requestAnimationFrame(this.updateProgress.bind(this));const s=()=>{window.cancelAnimationFrame(this._progressUpdateID);const t=this._gestureNavigating?0:100;this.progress!==t&&this._onProgress&&this._onProgress(t)};Promise.all([null===(t=this._inAnimation)||void 0===t?void 0:t.finished,null===(e=this._outAnimation)||void 0===e?void 0:e.finished,null===(n=this._pseudoElementInAnimation)||void 0===n?void 0:n.finished,null===(i=this._pseudoElementOutAnimation)||void 0===i?void 0:i.finished]).then(s).catch(s)}reset(){this._onEnd=null,this._playbackRate=1,this._play=!0,this._gestureNavigating=!1}finish(){var t,e,n,i;null===(t=this._inAnimation)||void 0===t||t.finish(),null===(e=this._outAnimation)||void 0===e||e.finish(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.finish(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.finish()}cancel(){var t,e,n,i,s;null===(t=this._inAnimation)||void 0===t||t.cancel(),null===(e=this._outAnimation)||void 0===e||e.cancel(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.cancel(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.cancel(),this.reset();const o=new CustomEvent("page-animation-cancel",{bubbles:!0});null===(s=this.dispatchEvent)||void 0===s||s.call(this,o)}cleanUpAnimation(t){t&&(t.commitStyles(),t.cancel())}async animate(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p;if(this._isPlaying&&(this.cancel(),this._onEnd&&this._onEnd(),this.reset()),this._currentScreen&&this._nextScreen&&this._shouldAnimate){if(this._gestureNavigating&&await this._currentScreen.mounted(!0),this._backNavigating?(this._currentScreen.zIndex=1,this._nextScreen.zIndex=0):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1),this._onProgress&&this._onProgress(this.progress),this._onExit&&this._shouldAnimate&&this._onExit(),await this._nextScreen.mounted(!0),this._outAnimation=this._currentScreen.animation,this._pseudoElementOutAnimation=this._currentScreen.pseudoElementAnimation,this._inAnimation=this._nextScreen.animation,this._pseudoElementInAnimation=this._nextScreen.pseudoElementAnimation,this._isPlaying=!0,this._inAnimation&&this._outAnimation){if(!this._shouldAnimate)return this.finish(),this._isPlaying=!1,void(this._shouldAnimate=!0);if(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate,this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate),this._gestureNavigating){const s=(null===(t=this._inAnimation.effect)||void 0===t?void 0:t.getTiming().duration)||this.duration,o=(null===(e=this._outAnimation.effect)||void 0===e?void 0:e.getTiming().duration)||this.duration;if(this._inAnimation.currentTime=Number(s),this._outAnimation.currentTime=Number(o),this._pseudoElementInAnimation){const t=(null===(n=this._pseudoElementInAnimation.effect)||void 0===n?void 0:n.getTiming().duration)||this.duration;this._pseudoElementInAnimation.currentTime=Number(t)}if(this._pseudoElementOutAnimation){const t=(null===(i=this._pseudoElementOutAnimation.effect)||void 0===i?void 0:i.getTiming().duration)||this.duration;this._pseudoElementOutAnimation.currentTime=Number(t)}}await Promise.all([this._inAnimation.ready,this._outAnimation.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),this._play?(this._outAnimation.play(),this._inAnimation.play(),null===(h=this._pseudoElementInAnimation)||void 0===h||h.play(),null===(l=this._pseudoElementOutAnimation)||void 0===l||l.play()):(this._inAnimation.pause(),this._outAnimation.pause(),null===(a=this._pseudoElementInAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementOutAnimation)||void 0===r||r.pause(),this._isPlaying=!1);const m=new CustomEvent("page-animation-start",{bubbles:!0});null===(u=this.dispatchEvent)||void 0===u||u.call(this,m),this.updateProgress(),await Promise.all([this._outAnimation.finished,this._inAnimation.finished,null===(c=this._pseudoElementInAnimation)||void 0===c?void 0:c.finished,null===(d=this._pseudoElementOutAnimation)||void 0===d?void 0:d.finished]),this.cleanUpAnimation(this._inAnimation),this.cleanUpAnimation(this._outAnimation),this._inAnimation=null,this._outAnimation=null,this._isPlaying=!1;const v=new CustomEvent("page-animation-end",{bubbles:!0});null===(p=this.dispatchEvent)||void 0===p||p.call(this,v),this._gestureNavigating&&.5!==this._playbackRate?(this._nextScreen.zIndex=0,this._currentScreen.zIndex=1,await this._nextScreen.mounted(!1)):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1,this._currentScreen.mounted(!1)),this._onEnd&&this._onEnd()}}else this._shouldAnimate=!0}set onProgress(t){this._onProgress=t}set onEnd(t){this._onEnd=t}set shouldAnimate(t){this._shouldAnimate=t}set playbackRate(t){this._playbackRate=t,this._inAnimation&&this._outAnimation&&(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate),this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate)}set gestureNavigating(t){this._gestureNavigating=t}set backNavigating(t){this._backNavigating=t}set play(t){var e,n,i,s,o,a,r,h;this._play!==t&&(this._play=t,this._play&&this._gestureNavigating&&this.updateProgress(),t?(null===(e=this._inAnimation)||void 0===e||e.play(),null===(n=this._outAnimation)||void 0===n||n.play(),null===(i=this._pseudoElementInAnimation)||void 0===i||i.play(),null===(s=this._pseudoElementOutAnimation)||void 0===s||s.play()):(null===(o=this._inAnimation)||void 0===o||o.pause(),null===(a=this._outAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementInAnimation)||void 0===r||r.pause(),null===(h=this._pseudoElementOutAnimation)||void 0===h||h.pause()))}set progress(t){var e,n,i,s,o,a,r,h;this._onProgress&&this._onProgress(t);{let o=(null===(n=null===(e=this._inAnimation)||void 0===e?void 0:e.effect)||void 0===n?void 0:n.getTiming().duration)||this.duration;const a=t/100*Number(o);let r=(null===(s=null===(i=this._outAnimation)||void 0===i?void 0:i.effect)||void 0===s?void 0:s.getTiming().duration)||this.duration;const h=t/100*Number(r);this._inAnimation&&this._outAnimation&&(this._inAnimation.currentTime=a,this._outAnimation.currentTime=h)}{let e=(null===(a=null===(o=this._pseudoElementInAnimation)||void 0===o?void 0:o.effect)||void 0===a?void 0:a.getTiming().duration)||this.duration;const n=t/100*Number(e);let i=(null===(h=null===(r=this._pseudoElementOutAnimation)||void 0===r?void 0:r.effect)||void 0===h?void 0:h.getTiming().duration)||this.duration;const s=t/100*Number(i);this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.currentTime=n),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.currentTime=s)}}set currentScreen(t){this._currentScreen=t}set nextScreen(t){this._nextScreen=t,this._currentScreen||(t.mounted(!0,!1),this._nextScreen=null)}set onExit(t){this._onExit=t}set addEventListener(t){this._addEventListener=t}set dispatchEvent(t){this._dispatchEvent=t}get addEventListener(){return this._addEventListener}get dispatchEvent(){return this._dispatchEvent}get duration(){var t,e,n,i;const s=null===(t=this._currentScreen)||void 0===t?void 0:t.duration,o=null===(e=this._nextScreen)||void 0===e?void 0:e.duration,a=null===(n=this._currentScreen)||void 0===n?void 0:n.pseudoElementDuration,r=null===(i=this._nextScreen)||void 0===i?void 0:i.pseudoElementDuration;return Math.max(Number(s),Number(o),Number(a),Number(r))||0}get progress(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p,m,v;const f=null===(e=null===(t=this._outAnimation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration,g=null===(i=null===(n=this._inAnimation)||void 0===n?void 0:n.effect)||void 0===i?void 0:i.getComputedTiming().duration,y=null===(o=null===(s=this._pseudoElementOutAnimation)||void 0===s?void 0:s.effect)||void 0===o?void 0:o.getComputedTiming().duration,E=null===(r=null===(a=this._pseudoElementInAnimation)||void 0===a?void 0:a.effect)||void 0===r?void 0:r.getComputedTiming().duration,_=[Number(f),Number(g),Number(E),Number(y)],w=Math.max(..._.filter((t=>!isNaN(t))));let b;return w===Number(f)?b=null===(l=null===(h=this._outAnimation)||void 0===h?void 0:h.effect)||void 0===l?void 0:l.getComputedTiming().progress:w===Number(g)?b=null===(c=null===(u=this._inAnimation)||void 0===u?void 0:u.effect)||void 0===c?void 0:c.getComputedTiming().progress:w===Number(E)?b=null===(p=null===(d=this._pseudoElementInAnimation)||void 0===d?void 0:d.effect)||void 0===p?void 0:p.getComputedTiming().progress:w===Number(y)&&(b=null===(v=null===(m=this._pseudoElementOutAnimation)||void 0===m?void 0:m.effect)||void 0===v?void 0:v.getComputedTiming().progress),100*(Number(b)||0)}get gestureNavigating(){return this._gestureNavigating}get backNavigating(){return this._backNavigating}get isPlaying(){return this._isPlaying}get ready(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.ready,null===(i=this._inAnimation)||void 0===i?void 0:i.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),t()}catch(t){e(t)}}))}get finished(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.finished,null===(i=this._inAnimation)||void 0===i?void 0:i.finished,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.finished,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.finished]),t()}catch(t){e(t)}}))}get started(){return new Promise((async t=>{var e;null===(e=this.addEventListener)||void 0===e||e.call(this,"page-animation-start",(()=>{t()}),{once:!0})}))}}const c=(0,t.createContext)(new u);var d=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const p=(0,t.createContext)(0);function m(t,n,i,s){const{paths:o}=n;let a,r,h,u,c,d=!1,p=!1,m=null;n.paths.length&&(!(0,l.e1)(s,o)&&n.paths.includes(void 0)&&(s=void 0),""!==i&&!(0,l.e1)(i,o)&&n.paths.includes(void 0)&&(i=void 0));const v=[];let f;if(e().Children.forEach(n.children,(o=>{var a;if(!e().isValidElement(o))return;(0,l.QN)(o.props.resolvedPathname,s)&&(t.backNavigating||n.gestureNavigating)&&(null===(a=o.props.config)||void 0===a?void 0:a.keepAlive)&&(f=o.key||void 0);const r=(0,l.QN)(o.props.resolvedPathname,i);if(r&&!p){let t={out:!0,in:!1};n.gestureNavigating&&(t={in:!0,out:!1}),p=!0,v.push(e().cloneElement(o,Object.assign(Object.assign({},t),{resolvedPathname:r.matchedPathname})))}})),e().Children.forEach(t.children,(t=>{if(!e().isValidElement(t))return;n.paths.length||o.push(t.props.path);const i=(0,l.QN)(t.props.path,s);if(i&&!d){d=!0;const{config:s}=t.props;a=null==s?void 0:s.swipeDirection,r=null==s?void 0:s.swipeAreaWidth,u=null==s?void 0:s.hysteresis,c=null==s?void 0:s.disableDiscovery,h=null==s?void 0:s.minFlingVelocity,m=t.props.name||null;let o={in:!0,out:!1};n.gestureNavigating&&(o={out:!0,in:!1});const l=f||Math.random();v.push(e().cloneElement(t,Object.assign(Object.assign({},o),{resolvedPathname:i.matchedPathname,key:l})))}})),!e().Children.count(v)){return{children:e().Children.map(t.children,(t=>{var n;if(e().isValidElement(t)&&(0,l.QN)(t.props.path,void 0)){const{config:i}=t.props;return a=null==i?void 0:i.swipeDirection,r=null==i?void 0:i.swipeAreaWidth,u=null==i?void 0:i.hysteresis,c=null==i?void 0:i.disableDiscovery,h=null==i?void 0:i.minFlingVelocity,m=null!==(n=t.props.name)&&void 0!==n?n:null,e().cloneElement(t,{in:!0,out:!1})}})),name:m,swipeDirection:a||t.swipeDirection,swipeAreaWidth:r||t.swipeAreaWidth,hysteresis:u||t.hysteresis,disableDiscovery:void 0===c?t.disableDiscovery:c,minFlingVelocity:h||t.minFlingVelocity}}return{paths:o,children:v,name:m,currentPath:t.currentPath,swipeDirection:a||t.swipeDirection,swipeAreaWidth:r||t.swipeAreaWidth,hysteresis:u||t.hysteresis,disableDiscovery:void 0===c?t.disableDiscovery:c,minFlingVelocity:h||t.minFlingVelocity}}class v extends e().Component{constructor(){super(...arguments),this.onSwipeStartListener=this.onSwipeStart.bind(this),this.onSwipeListener=this.onSwipe.bind(this),this.onSwipeEndListener=this.onSwipeEnd.bind(this),this.ref=null,this.state={currentPath:"",children:this.props.children,progress:100,shouldPlay:!0,gestureNavigating:!1,shouldAnimate:!0,startX:0,startY:0,paths:[],swipeDirection:this.props.swipeDirection,swipeAreaWidth:this.props.swipeAreaWidth,minFlingVelocity:this.props.minFlingVelocity,hysteresis:this.props.hysteresis,disableDiscovery:!1},this.setRef=t=>{this.ref&&this.ref.removeEventListener("swipestart",this.onSwipeStartListener),this.ref=t,t&&t.addEventListener("swipestart",this.onSwipeStartListener)}}static getDerivedStateFromProps(t,e){if(t.currentPath!==e.currentPath){if(!e.shouldAnimate)return{currentPath:t.currentPath,shouldAnimate:!0};let n=t.currentPath;const i=m(t,e,e.currentPath,t.currentPath),{name:s}=i,o=d(i,["name"]);return o.children.sort(((t,e)=>(0,l.QN)(t.props.path,n)?1:-1)),t.onDocumentTitleChange(s),o}return null}componentDidMount(){this.context.onProgress=t=>{const e=this.props.backNavigating&&!this.state.gestureNavigating?99-t:t,n=(0,l.uZ)(e,0,100);this.setState({progress:n});const i=new CustomEvent("motion-progress",{detail:{progress:n}});this.props.dispatchEvent&&this.props.dispatchEvent(i)}}componentDidUpdate(t,e){t.currentPath!==this.state.currentPath&&!this.state.gestureNavigating&&e.shouldAnimate&&(this.context.play=!0,this.context.backNavigating=this.props.backNavigating,this.context.animate())}onGestureSuccess(t,e){this.props.onDocumentTitleChange(e),this.setState(t)}onSwipeStart(t){if(t.touches.length>1)return;if(this.state.disableDiscovery)return;if(this.context.isPlaying)return;if(0===this.context.duration)return;let e;switch(this.state.swipeDirection){case"left":case"right":e=t.x;break;case"up":case"down":e=t.y}if(t.direction===this.state.swipeDirection&&e<this.state.swipeAreaWidth){if(!this.props.lastPath)return;t.stopPropagation();for(let e of t.composedPath().reverse())if("classList"in e&&e.classList.length){if(e.classList.contains("gesture-region")&&"true"===e.dataset.disabled)return;if(e===t.gestureTarget)break}const e=m(this.props,Object.assign(Object.assign({},this.state),{gestureNavigating:!0}),this.props.currentPath,this.props.lastPath),{children:n,currentPath:i,paths:s,name:o}=e,a=d(e,["children","currentPath","paths","name"]);this.onGestureSuccess=this.onGestureSuccess.bind(this,a,o),this.props.navigation.addEventListener("go-back",this.onGestureSuccess,{once:!0}),this.props.onGestureNavigationStart(),this.setState({shouldPlay:!1,gestureNavigating:!0,children:n.sort((t=>(0,l.QN)(t.props.path,i)?-1:1)),startX:t.x,startY:t.y},(()=>{var t,e;const n=new CustomEvent("motion-progress-start");this.context.gestureNavigating=!0,this.context.playbackRate=-1,this.context.play=!1,this.context.backNavigating=this.props.backNavigating,this.context.animate(),this.props.dispatchEvent&&this.props.dispatchEvent(n),null===(t=this.ref)||void 0===t||t.addEventListener("swipe",this.onSwipeListener),null===(e=this.ref)||void 0===e||e.addEventListener("swipeend",this.onSwipeEndListener)}))}}onSwipe(t){if(this.state.shouldPlay)return;let e;switch(this.state.swipeDirection){case"left":case"right":{const n=window.innerWidth;e=-((0,l.uZ)(t.x-this.state.startX,10)-n)/n*100,"left"===this.state.swipeDirection&&(e=100-e);break}case"up":case"down":{const n=window.innerHeight;e=-((0,l.uZ)(t.y-this.state.startY,10)-n)/n*100,"up"===this.state.swipeDirection&&(e=100-e);break}}this.context.progress=(0,l.uZ)(e,.1,100)}onSwipeEnd(t){var e,n;if(this.state.shouldPlay)return;let i=null;const s=new CustomEvent("motion-progress-end");100-this.state.progress>this.state.hysteresis||t.velocity>this.state.minFlingVelocity?(t.velocity>=this.state.minFlingVelocity?this.context.playbackRate=-5:this.context.playbackRate=-1,i=()=>{this.context.reset(),this.props.onGestureNavigationEnd(),this.setState({gestureNavigating:!1}),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,shouldAnimate:!1})):(this.context.playbackRate=.5,i=()=>{this.props.navigation.removeEventListener("go-back",this.onGestureSuccess),this.context.reset(),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,gestureNavigating:!1})),this.setState({startX:0,startY:0}),this.context.onEnd=i,this.context.play=!0,null===(e=this.ref)||void 0===e||e.removeEventListener("swipe",this.onSwipeListener),null===(n=this.ref)||void 0===n||n.removeEventListener("swipeend",this.onSwipeEndListener)}render(){return(0,h.jsx)("div",Object.assign({className:"animation-layer",ref:this.setRef,style:{width:"100%",height:"100%",position:"relative"}},{children:(0,h.jsx)(p.Provider,Object.assign({value:this.state.progress},{children:this.state.children}))}))}}v.contextType=c;class f extends e().Component{constructor(){super(...arguments),this.ref=null,this._currentScene=null,this._nextScene=null,this.onProgressStartListener=this.onProgressStart.bind(this),this.onProgressListener=this.onProgress.bind(this),this.onProgressEndListener=this.onProgressEnd.bind(this),this.state={transitioning:!1,playing:!0}}set currentScene(t){this._currentScene=t}set nextScene(t){this._nextScene=t,!this._currentScene||this._currentScene.isEmpty()||this._nextScene.isEmpty()?(this._currentScene=null,this._nextScene=null):this.sharedElementTransition(this._currentScene,this._nextScene)}finish(){var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.finish()}sharedElementTransition(t,e){if(0===this.context.duration)return;if(this.state.transitioning)return void this.finish();const n=()=>{this.setState({transitioning:!1}),this._nextScene=null,this._currentScene=null},i=()=>{var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.cancel();n()},s=queueMicrotask.bind(null,(async()=>{var s,o,a,r,h,u,c,d,p,m,v,f,g,y,E,_,w,b,x,S,P,A,L,R,k,D,O,N,T,I,C,j,$,M,U,F,z,Y,X,V,B,H,W,G,K,q;for(const[n,i]of t.nodes)if(e.nodes.has(n)){const J=e.nodes.get(n).instance,Q=i.instance,Z=J.transitionType||Q.transitionType||"morph",tt=i.instance.node,et=e.nodes.get(n).instance.node;if(!tt||!et)continue;const nt=tt.firstElementChild,it=et.firstElementChild;if(!nt||!it)continue;const st=Q.clientRect,ot=J.clientRect;let at,rt,ht={},lt={};"morph"===Z&&([at,ht]=Q.CSSData,[rt,lt]=J.CSSData),at=Q.CSSText,rt=J.CSSText,nt.style.cssText=at,"morph"!==Z&&(it.style.cssText=rt,et.style.position="absolute",it.style.position="absolute",et.style.zIndex=it.style.zIndex,et.style.top="0",et.style.left="0"),tt.style.position="absolute",nt.style.position="absolute",tt.style.zIndex=nt.style.zIndex,tt.style.top="0",tt.style.left="0";const ut={id:Q.id,start:{x:{node:tt,delay:null!==(h=null!==(a=null===(o=null===(s=Q.props.config)||void 0===s?void 0:s.x)||void 0===o?void 0:o.delay)&&void 0!==a?a:null===(r=J.props.config)||void 0===r?void 0:r.delay)&&void 0!==h?h:0,duration:(null===(c=null===(u=Q.props.config)||void 0===u?void 0:u.x)||void 0===c?void 0:c.duration)||(null===(d=J.props.config)||void 0===d?void 0:d.duration)||this.context.duration,easingFunction:(null===(m=null===(p=Q.props.config)||void 0===p?void 0:p.x)||void 0===m?void 0:m.easingFunction)||(null===(v=Q.props.config)||void 0===v?void 0:v.easingFunction)||"ease",position:st.x-(this.state.playing?0:t.x)},y:{node:nt,delay:null!==(_=null!==(y=null===(g=null===(f=Q.props.config)||void 0===f?void 0:f.y)||void 0===g?void 0:g.delay)&&void 0!==y?y:null===(E=J.props.config)||void 0===E?void 0:E.delay)&&void 0!==_?_:0,duration:(null===(b=null===(w=Q.props.config)||void 0===w?void 0:w.y)||void 0===b?void 0:b.duration)||(null===(x=J.props.config)||void 0===x?void 0:x.duration)||this.context.duration,easingFunction:(null===(P=null===(S=Q.props.config)||void 0===S?void 0:S.y)||void 0===P?void 0:P.easingFunction)||(null===(A=Q.props.config)||void 0===A?void 0:A.easingFunction)||"ease",position:st.y-(this.state.playing?0:t.y)}},end:{x:{node:et,delay:null!==(O=null!==(k=null===(R=null===(L=J.props.config)||void 0===L?void 0:L.x)||void 0===R?void 0:R.delay)&&void 0!==k?k:null===(D=J.props.config)||void 0===D?void 0:D.delay)&&void 0!==O?O:0,duration:(null===(T=null===(N=J.props.config)||void 0===N?void 0:N.x)||void 0===T?void 0:T.duration)||(null===(I=J.props.config)||void 0===I?void 0:I.duration)||this.context.duration,easingFunction:(null===(j=null===(C=J.props.config)||void 0===C?void 0:C.x)||void 0===j?void 0:j.easingFunction)||(null===($=J.props.config)||void 0===$?void 0:$.easingFunction)||"ease",position:ot.x-(this.state.playing?e.x:0)},y:{node:it,delay:null!==(Y=null!==(F=null===(U=null===(M=J.props.config)||void 0===M?void 0:M.y)||void 0===U?void 0:U.delay)&&void 0!==F?F:null===(z=J.props.config)||void 0===z?void 0:z.delay)&&void 0!==Y?Y:0,duration:(null===(V=null===(X=J.props.config)||void 0===X?void 0:X.y)||void 0===V?void 0:V.duration)||(null===(B=J.props.config)||void 0===B?void 0:B.duration)||this.context.duration,easingFunction:(null===(W=null===(H=J.props.config)||void 0===H?void 0:H.x)||void 0===W?void 0:W.easingFunction)||(null===(G=J.props.config)||void 0===G?void 0:G.easingFunction)||"ease",position:ot.y-(this.state.playing?e.y:0)}}};if(this.state.playing?(ut.end.x.position=ut.end.x.position/e.xRatio,ut.end.y.position=ut.end.y.position/e.yRatio):(ut.start.x.position=ut.start.x.position/t.xRatio,ut.start.y.position=ut.start.y.position/t.yRatio),tt.style.display="unset",null===(K=this.ref)||void 0===K||K.appendChild(tt),Q.onCloneAppended(tt),"morph"!==Z){const t=parseInt(tt.style.zIndex)||0,e=parseInt(et.style.zIndex)||0;et.style.zIndex=`${(0,l.uZ)(e,0,t-1)}`,et.style.display="unset",null===(q=this.ref)||void 0===q||q.appendChild(et),J.onCloneAppended(et)}else J.onCloneAppended(tt);let ct,dt,pt,mt;Q.hidden(!0),J.hidden(!0),tt.style.willChange="contents, transform, opacity","morph"!==Z&&(et.style.willChange="contents, transform, opacity"),"morph"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([Object.assign(Object.assign({},ht),{transform:`translate(0px, ${ut.start.y.position}px) ${"none"===ht.transform?"":ht.transform}`}),Object.assign(Object.assign({},lt),{transform:`translate(0px, ${ut.end.y.position}px) ${"none"===lt.transform?"":lt.transform}`})],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`})):"fade"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):"fade-through"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`}));const vt=[ct,dt,pt,mt];this.state.playing||vt.forEach((t=>{var e;if(!t)return;const n=this.context.duration;let i=null===(e=t.effect)||void 0===e?void 0:e.getComputedTiming().duration;"string"==typeof i&&(i=parseFloat(i)),i=i||n,t.currentTime=i,t.pause()}));const ft=async()=>{console.assert(n===J.id,"Not sure what happened here."),console.assert(n===Q.id,"Not sure what happened here."),tt.style.willChange="auto","morph"!==Z&&(et.style.willChange="auto"),await J.hidden(!1),t.keepAlive&&this.state.playing?Q.keepAlive(!0):(Q.keepAlive(!1),await Q.hidden(!1)),this.state.playing&&(Q.onCloneRemove(tt),"morph"!==Z?(J.onCloneRemove(et),et.remove()):J.onCloneRemove(tt),tt.remove())},gt=async()=>{tt.style.willChange="auto","morph"!==Z&&(et.style.willChange="auto"),await Q.hidden(!1),await J.hidden(!1)};Promise.all(vt.map((t=>null==t?void 0:t.finished))).then(ft).catch(gt)}this.ref&&Promise.all(this.ref.getAnimations({subtree:!0}).map((t=>t.finished))).then(n).catch(i)}));this.setState({transitioning:!0},s),this.props.navigation.addEventListener("page-animation-cancel",i,{once:!0})}componentDidMount(){this.props.instance&&this.props.instance(this),this.props.navigation.addEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}componentWillUnmount(){this.props.navigation.removeEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}onProgressStart(){this.setState({playing:!1})}onProgress(t){var e,n;if(!this.state.playing){const i=(null===(e=this.ref)||void 0===e?void 0:e.getAnimations({subtree:!0}))||[];for(const e of i){const i=t.detail.progress,s=this.context.duration;let o=null===(n=e.effect)||void 0===n?void 0:n.getComputedTiming().duration;"string"==typeof o&&(o=parseFloat(o)),o=o||s;const a=i/100*Number(o);e.currentTime=a}}}onProgressEnd(){this.state.playing||this.finish(),this.setState({playing:!0,transitioning:!1})}render(){return this.state.transitioning?(0,h.jsx)("div",{id:"ghost-layer",ref:t=>this.ref=t,style:{position:"absolute",zIndex:1e3,width:"100vw",height:"100vh",contain:"strict"}}):(0,h.jsx)(h.Fragment,{})}}f.contextType=c;class g extends e().Component{constructor(t){super(t),this.animationLayerData=new u,this.ref=null,this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.state={currentPath:"",backNavigating:!1,gestureNavigating:!1,routesData:new Map,implicitBack:!1,defaultDocumentTitle:document.title},this.onDocumentTitleChange=t=>{document.title=t||this.state.defaultDocumentTitle},this.setRef=t=>{this.ref&&(this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.animationLayerData.dispatchEvent=this.dispatchEvent,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.removeNavigationEventListeners(this.ref)),t&&(this.dispatchEvent=e=>(0,l.Nu)(e,t),this.addEventListener=(e,n,i)=>t.addEventListener(e,n,i),this.removeEventListener=(e,n,i)=>t.removeEventListener(e,n,i),this.animationLayerData.dispatchEvent=this.dispatchEvent,this.animationLayerData.addEventListener=this.addEventListener,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.addNavigationEventListeners(t))},this._id=t.id||Math.random().toString(),t.config?this.config=t.config:this.config={animation:l.r2}}componentDidMount(){this._routerData.paramsDeserializer=this.props.config.paramsDeserializer,this._routerData.paramsSerializer=this.props.config.paramsSerializer,window.addEventListener("popstate",this.onPopStateListener)}componentWillUnmount(){this.navigation.destructor(),this._routerData.destructor(),this.ref&&this.removeNavigationEventListeners(this.ref),window.removeEventListener("popstate",this.onPopStateListener)}initialise(t){let e=t.location.pathname;const n=this._routerData.paramsDeserializer||null,i=(0,l.fJ)(window.location.search,n),s=this.state.routesData;this._routerData.routesData=this.state.routesData,i&&s.set(e,Object.assign(Object.assign({},this.state.routesData.get(e)),{params:i})),this.setState({currentPath:e,routesData:s}),this._routerData.currentPath=e}get id(){return this._id}get parentRouterData(){return this._routerData.parentRouterData}get baseURL(){var t;const e=window.location.origin,n=this.props.config.basePathname||"";if(this.parentRouterData){const e=this.parentRouterData.navigation.history.baseURL,i=(null===(t=this.parentRouterData.mountedScreen)||void 0===t?void 0:t.resolvedPathname)||"";return(0,l.PV)(n,(0,l.PV)(i,e))}return new URL(n,e)}addNavigationEventListeners(t){t.addEventListener("go-back",this.onBackListener),t.addEventListener("navigate",this.onNavigateListener)}removeNavigationEventListeners(t){t.removeEventListener("go-back",this.onBackListener),t.removeEventListener("navigate",this.onNavigateListener)}render(){return(0,h.jsx)("div",Object.assign({id:this._id.toString(),className:"react-motion-router",style:{width:"100%",height:"100%"},ref:this.setRef},{children:(0,h.jsx)(o.Consumer,{children:t=>(this._routerData.parentRouterData=t,(0,h.jsx)(o.Provider,Object.assign({value:this._routerData},{children:(0,h.jsxs)(c.Provider,Object.assign({value:this.animationLayerData},{children:[Boolean(this.navigation)&&(0,h.jsx)(f,{instance:t=>{this._routerData.ghostLayer=t},backNavigating:this.state.backNavigating,gestureNavigating:this.state.gestureNavigating,navigation:this._routerData.navigation,animationLayerData:this.animationLayerData}),Boolean(this.navigation)&&(0,h.jsx)(v,Object.assign({disableBrowserRouting:this.props.config.disableBrowserRouting||!1,disableDiscovery:this.props.config.disableDiscovery||!1,hysteresis:this.props.config.hysteresis||50,minFlingVelocity:this.props.config.minFlingVelocity||400,swipeAreaWidth:this.props.config.swipeAreaWidth||100,swipeDirection:this.props.config.swipeDirection||"right",navigation:this._routerData.navigation,backNavigating:this.state.backNavigating,currentPath:this.navigation.history.current,lastPath:this.navigation.history.previous,onGestureNavigationStart:this.onGestureNavigationStart,onGestureNavigationEnd:this.onGestureNavigationEnd,onDocumentTitleChange:this.onDocumentTitleChange,dispatchEvent:this.dispatchEvent},{children:this.props.children}))]}))})))})}))}}g.defaultProps={config:{animation:l.r2}};const y={"slide-right-in":[{transform:"translateX(100vw)"},{transform:"translateX(0vw)"}],"slide-back-right-in":[{transform:"translateX(50vw)"},{transform:"translateX(0vw)"}],"slide-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-50vw)"}],"slide-back-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-100vw)"}],"slide-left-in":[{transform:"translateX(-100vw)"},{transform:"translateX(0vw)"}],"slide-back-left-in":[{transform:"translateX(-50vw)"},{transform:"translateX(0vw)"}],"slide-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(50vw)"}],"slide-back-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(100vw)"}],"slide-up-in":[{transform:"translateY(100vh)"},{transform:"translateY(0vh)"}],"slide-back-up-in":[{transform:"translateY(50vh)"},{transform:"translateY(0vh)"}],"slide-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-50vh)"}],"slide-back-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-100vh)"}],"slide-down-in":[{transform:"translateY(-100vh)"},{transform:"translateY(0vh)"}],"slide-back-down-in":[{transform:"translateY(-50vh)"},{transform:"translateY(0vh)"}],"slide-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(50vh)"}],"slide-back-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(100vh)"}],"zoom-in-in":[{transform:"scale(0.85)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-in-out":[{transform:"scale(1)",opacity:1},{transform:"scale(1.15)",opacity:0}],"zoom-out-in":[{transform:"scale(1.15)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-out-out":[{transform:"scale(1)",opacity:1},{transform:"scale(0.85)",opacity:0}],"fade-in":[{opacity:0},{opacity:1}],"fade-out":[{opacity:1},{opacity:0}],none:[]},E={left:"right",right:"left",up:"down",down:"up",in:"out",out:"in"};class _ extends e().Component{constructor(){super(...arguments),this._animationLayerData=null,this.ref=null,this.onAnimationEnd=this.animationEnd.bind(this),this.onNavigate=this.navigate.bind(this),this.setRef=this.onRef.bind(this),this.state={mounted:!1,zIndex:0}}onRef(t){this.ref=t}animationEnd(){this.ref&&(this.ref.style.willChange="auto",this.ref.style.pointerEvents="auto")}navigate(){this.ref&&(this.ref.style.willChange="transform, opacity",this.ref.style.pointerEvents="none")}componentDidMount(){this.props.navigation.addEventListener("page-animation-start",this.onNavigate),this.props.navigation.addEventListener("motion-progress-start",this.onNavigate),this.props.navigation.addEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.addEventListener("motion-progress-end",this.onAnimationEnd),this._animationLayerData&&(this.props.in&&(this._animationLayerData.nextScreen=this),this.props.out&&(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this))}componentDidUpdate(t){this._animationLayerData&&(this.props.out===t.out&&this.props.in===t.in||(this.props.out?(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this):this.props.in&&(this._animationLayerData.nextScreen=this)))}componentWillUnmount(){this.props.navigation.removeEventListener("page-animation-start",this.onNavigate),this.props.navigation.removeEventListener("motion-progress-start",this.onNavigate),this.props.navigation.removeEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.removeEventListener("motion-progress-end",this.onAnimationEnd)}getAnimationConfig(t,e){"function"==typeof e&&(e=e());const n=e[t];if(!("type"in n))return n;{let e=n.direction,i="";switch(this.props.backNavigating&&e&&("zoom"!==n.type&&"slide"!==n.type||(e=E[e],i="back-")),n.type){case"slide":return"in"!==e&&"out"!==e||(e="left"),[`slide-${i}${e||"left"}-${t}`,n.duration,n.easingFunction];case"zoom":return"in"!==e&&"out"!==e&&(e="in"),[`zoom-${e||"in"}-${t}`,n.duration,n.easingFunction];case"fade":return[`fade-${t}`,n.duration,n.easingFunction];default:return["none",n.duration,void 0]}}}get pseudoElementInAnimation(){return this.props.pseudoElement?this.getAnimationConfig("in",this.props.pseudoElement.animation):null}get pseudoElementOutAnimation(){return this.props.pseudoElement?this.getAnimationConfig("out",this.props.pseudoElement.animation):null}get inAnimation(){return this.getAnimationConfig("in",this.props.animation)}get outAnimation(){return this.getAnimationConfig("out",this.props.animation)}get pseudoElementDuration(){var t;const e=this.props.in?this.pseudoElementInAnimation:this.pseudoElementOutAnimation;if(!e)return null;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get duration(){var t;const e=this.props.in?this.inAnimation:this.outAnimation;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get pseudoElementAnimation(){var t,e,n;if(!this.ref||!this.props.pseudoElement)return null;const i=this.props.pseudoElement.selector;let s=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.pseudoElementInAnimation)){const[t,e,n]=this.pseudoElementInAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:n}=this.pseudoElementInAnimation;return n="number"==typeof n?{duration:n,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||s,pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.pseudoElementOutAnimation)){const[t,e,n]=this.pseudoElementOutAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:e}=this.pseudoElementOutAnimation;return e="number"==typeof e?{duration:e,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||s,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both",pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,e))}}get animation(){var t,e,n;if(!this.ref)return null;let i=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.inAnimation)){const[t,e,n]=this.inAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:n}=this.inAnimation;return n="number"==typeof n?{duration:n,easing:i,fill:"both"}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.outAnimation)){const[t,e,n]=this.outAnimation;return new Animation(new KeyframeEffect(this.ref,y[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:e}=this.outAnimation;return e="number"==typeof e?{duration:e,easing:i,fill:"both"}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||i,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both"}),new Animation(new KeyframeEffect(this.ref,t,e))}}set zIndex(t){this.setState({zIndex:t})}mounted(t,e=!0){return new Promise((n=>{const i=()=>{var i,s;if(t){e&&this.ref&&(this.ref.style.willChange="transform, opacity");const t=Boolean(this.props.in&&!(null===(i=this._animationLayerData)||void 0===i?void 0:i.gestureNavigating)||this.props.out&&(null===(s=this._animationLayerData)||void 0===s?void 0:s.gestureNavigating));this.props.onEnter&&this.props.onEnter(t)}n()};this.props.keepAlive&&!t?n():this.setState({mounted:t},i)}))}render(){return(0,h.jsx)("div",Object.assign({id:`${this.props.name}-animation-provider`,className:"animation-provider",ref:this.setRef,style:{position:"absolute",width:"100%",height:"100%",contain:"strict",transformOrigin:"center center",zIndex:this.state.zIndex}},{children:(0,h.jsx)(c.Consumer,{children:t=>(this._animationLayerData=t,this.state.mounted?this.props.children:(0,h.jsx)(h.Fragment,{}))})}))}}var w,b,x,S;!function(t){t[t.center=0]="center",t[t.top=1]="top",t[t.bottom=2]="bottom",t[t.left=3]="left",t[t.right=4]="right"}(w||(w={})),function(t){t[t.cap=0]="cap",t[t.ch=1]="ch",t[t.em=2]="em",t[t.ex=3]="ex",t[t.ic=4]="ic",t[t.lh=5]="lh",t[t.rem=6]="rem",t[t.rlh=7]="rlh",t[t.vh=8]="vh",t[t.vw=9]="vw",t[t.vi=10]="vi",t[t.vb=11]="vb",t[t.vmin=12]="vmin",t[t.vmax=13]="vmax",t[t.px=14]="px",t[t.cm=15]="cm",t[t.mm=16]="mm",t[t.Q=17]="Q",t[t.in=18]="in",t[t.pc=19]="pc",t[t.pt=20]="pt",t[t["%"]=21]="%"}(b||(b={})),function(t){t[t.inital=0]="inital",t[t.inherit=1]="inherit",t[t.revert=2]="revert",t[t.unset=3]="unset"}(x||(x={})),function(t){t[t.morph=0]="morph",t[t["fade-through"]=1]="fade-through",t[t.fade=2]="fade",t[t["cross-fade"]=3]="cross-fade"}(S||(S={}));class P{constructor(t){this._nodes=new Map,this._name="",this._scrollPos=null,this._getScreenRect=()=>new DOMRect,this._keepAlive=!1,this._name=t}addNode(t){t&&(console.assert(!this.nodes.has(t.id),`Duplicate Shared Element ID: ${t.id} in ${this._name}`),this._nodes.set(t.id,t))}removeNode(t){this._nodes.delete(t)}get xRatio(){const t=(this._getScreenRect().width/window.innerWidth).toFixed(2);return parseFloat(t)}get yRatio(){const t=(this._getScreenRect().height/window.innerHeight).toFixed(2);return parseFloat(t)}get nodes(){return this._nodes}get name(){return this._name}get scrollPos(){return this._scrollPos||{x:0,y:0}}get x(){return this._getScreenRect().x}get y(){return this._getScreenRect().y}get keepAlive(){return this._keepAlive}set scrollPos(t){this._scrollPos=t}set getScreenRect(t){this._getScreenRect=t}set keepAlive(t){this._keepAlive=t}isEmpty(){return!Boolean(this._nodes.size)}}const A=(0,t.createContext)(null);function L(t,e,n){const i=e.firstElementChild;return i?(n.props.config&&n.props.config.transformOrigin&&(i.style.transformOrigin=n.props.config.transformOrigin),{id:t,instance:n}):null}class R extends e().Component{constructor(){super(...arguments),this._id=this.props.id.toString(),this._ref=null,this._scene=null,this._mutationObserver=new MutationObserver(this.updateScene.bind(this)),this._callbackID=0,this._computedStyle=null,this._isMounted=!1,this.onRef=this.setRef.bind(this),this.state={hidden:!1,keepAlive:!1},this.onCloneAppended=t=>{},this.onCloneRemove=t=>{var e;if((null===(e=this._ref)||void 0===e?void 0:e.firstElementChild)instanceof HTMLVideoElement){const e=t.firstElementChild;this._ref.firstElementChild.currentTime=e.currentTime,e.paused||e.pause()}}}get scene(){return this._scene}get node(){var t;return this._ref?this._ref.firstElementChild instanceof HTMLVideoElement&&"morph"===(null!==(t=this.transitionType)&&void 0!==t?t:"morph")?this._ref:this._ref.cloneNode(!0):null}get clientRect(){if(this._ref&&this._ref.firstElementChild){return this._ref.firstElementChild.getBoundingClientRect()}return new DOMRect}get CSSData(){const t=this._computedStyle;return t?(0,l.hR)(t):["",{}]}get CSSText(){const t=this._computedStyle;if(t){const[e]=(0,l.hR)(t,!1);return e}return""}get id(){return this._id}get transitionType(){var t;return null===(t=this.props.config)||void 0===t?void 0:t.type}keepAlive(t){return new Promise((e=>{this.setState({keepAlive:t},(()=>e()))}))}hidden(t){return new Promise(((e,n)=>{this._isMounted?this.setState({hidden:t},(()=>{e()})):e()}))}setRef(t){var e,n;this._ref!==t&&(this._ref&&(null===(e=this.scene)||void 0===e||e.removeNode(this._id),this._mutationObserver.disconnect(),this._computedStyle=null),this._ref=t,t&&(null===(n=this.scene)||void 0===n||n.addNode(L(this._id,t,this)),t.firstElementChild&&(this._computedStyle=window.getComputedStyle(t.firstElementChild),this._mutationObserver.observe(t.firstElementChild,{attributes:!0,childList:!0,subtree:!0}))))}updateScene(){const t=window.cancelIdleCallback?window.cancelIdleCallback:window.clearTimeout,e=window.requestIdleCallback?window.requestIdleCallback:window.setTimeout;t(this._callbackID),this._callbackID=e((()=>{var t,e;this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),null===(e=this.scene)||void 0===e||e.addNode(L(this._id,this._ref,this))),this._callbackID=0}))}componentDidMount(){this._isMounted=!0}componentDidUpdate(){var t,e;this._id!==this.props.id.toString()&&this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),this._id=this.props.id.toString(),null===(e=this.scene)||void 0===e||e.addNode(L(this._id,this._ref,this)))}componentWillUnmount(){this._isMounted=!1}render(){return(0,h.jsx)(A.Consumer,{children:t=>(this._scene=t,(0,h.jsx)("div",Object.assign({ref:this.onRef,id:`shared-element-${this._id}`,style:{display:this.state.hidden&&!this.keepAlive?"block":"contents",visibility:this.state.hidden?"hidden":"visible"}},{children:this.props.children})))})}}const k=e().createContext({preloaded:!1,params:{},path:void 0});class D extends e().Component{constructor(){var t,e,n;super(...arguments),this.name=void 0===this.props.path?"not-found":(null===(t=this.props.path)||void 0===t?void 0:t.toString().slice(1).replace("/","-"))||"index",this.sharedElementScene=new P(this.name),this.ref=null,this.contextParams=null===(n=null===(e=this.context)||void 0===e?void 0:e.routesData.get(this.props.path))||void 0===n?void 0:n.params,this.onRef=this.setRef.bind(this),this.animation=l.r2,this.pseudoElementAnimation=l.r2,this.state={shouldKeepAlive:!1},this.onExit=()=>{this.context.backNavigating?this.setState({shouldKeepAlive:!1}):this.setState({shouldKeepAlive:!0}),this.context.ghostLayer&&(this.context.ghostLayer.currentScene=this.sharedElementScene)},this.onEnter=()=>{this.context.ghostLayer&&(this.context.ghostLayer.nextScene=this.sharedElementScene)}}componentDidMount(){var t,n,i,s,o,a,r;this.sharedElementScene.getScreenRect=()=>{var t;return(null===(t=this.ref)||void 0===t?void 0:t.getBoundingClientRect())||new DOMRect},this.sharedElementScene.keepAlive=(null===(t=this.props.config)||void 0===t?void 0:t.keepAlive)||!1,this.props.fallback&&e().isValidElement(this.props.fallback)?this.setState({fallback:e().cloneElement(this.props.fallback,{navigation:this.context.navigation,route:{params:Object.assign(Object.assign({},this.props.defaultParams),this.contextParams)}})}):this.setState({fallback:this.props.fallback}),this.animation=null!==(i=this.setupAnimation(null===(n=this.props.config)||void 0===n?void 0:n.animation))&&void 0!==i?i:this.context.animation,this.pseudoElementAnimation=null!==(a=this.setupAnimation(null===(o=null===(s=this.props.config)||void 0===s?void 0:s.pseudoElement)||void 0===o?void 0:o.animation))&&void 0!==a?a:l.r2,this.contextParams=null===(r=this.context.routesData.get(this.props.path))||void 0===r?void 0:r.params,this.context.mountedScreen=this,this.forceUpdate()}shouldComponentUpdate(t){var e,n;return(null===(e=this.context.routesData.get(this.props.path))||void 0===e?void 0:e.params)!==this.contextParams?(this.contextParams=null===(n=this.context.routesData.get(this.props.path))||void 0===n?void 0:n.params,!0):!(!t.out||t.in)||(!(!t.in||t.out)||(t.in!==this.props.in||t.out!==this.props.out))}componentDidUpdate(t){var n,i,s;(null===(n=t.config)||void 0===n?void 0:n.keepAlive)!==(null===(i=this.props.config)||void 0===i?void 0:i.keepAlive)&&(this.sharedElementScene.keepAlive=(null===(s=this.props.config)||void 0===s?void 0:s.keepAlive)||!1),t.fallback!==this.props.fallback&&(this.props.fallback&&e().isValidElement(this.props.fallback)?this.setState({fallback:e().cloneElement(this.props.fallback,{navigation:this.context.navigation,route:{params:Object.assign(Object.assign({},this.props.defaultParams),this.contextParams)}})}):this.setState({fallback:this.props.fallback}))}setupAnimation(t){return t?"function"==typeof t?this.animationFactory.bind(this,t):"in"in t?{in:t.in,out:t.out||t.in}:{in:t,out:t}:null}animationFactory(t){if("function"==typeof t){let e=this.context.navigation.history.next;this.context.backNavigating||(e=this.context.navigation.history.previous);const n=t(e||"",this.context.navigation.history.current,this.context.gestureNavigating);return"in"in n?{in:n.in,out:n.out||n.in}:{in:n,out:n}}return this.context.animation}setRef(t){this.ref!==t&&(this.ref=t)}get resolvedPathname(){return this.props.resolvedPathname}render(){var e,n,i,s,o;let a,r=this.props.component,l=!1;"preloaded"in this.props.component&&this.props.component.preloaded&&(r=this.props.component.preloaded,l=!0),(null===(e=this.props.config)||void 0===e?void 0:e.pseudoElement)&&(a={selector:null===(n=this.props.config)||void 0===n?void 0:n.pseudoElement.selector,animation:this.pseudoElementAnimation});const u=Object.assign(Object.assign({},this.props.defaultParams),this.contextParams);return(0,h.jsx)(_,Object.assign({onExit:this.onExit,onEnter:this.onEnter,in:this.props.in||!1,out:this.props.out||!1,name:null!==(s=null===(i=this.props.name)||void 0===i?void 0:i.toLowerCase().replace(" ","-"))&&void 0!==s?s:this.name,resolvedPathname:this.props.resolvedPathname,animation:this.animation,pseudoElement:a,backNavigating:this.context.backNavigating,keepAlive:this.state.shouldKeepAlive&&(null===(o=this.props.config)||void 0===o?void 0:o.keepAlive)||!1,navigation:this.context.navigation},{children:(0,h.jsx)("div",Object.assign({id:this.name,ref:this.onRef,className:"screen",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",pointerEvents:"inherit",overflowX:"auto",overflowY:"auto"}},{children:(0,h.jsx)(A.Provider,Object.assign({value:this.sharedElementScene},{children:(0,h.jsx)(k.Provider,Object.assign({value:{preloaded:l,path:this.props.path,params:u}},{children:(0,h.jsx)(t.Suspense,Object.assign({fallback:this.state.fallback},{children:(0,h.jsx)(r,{route:{path:this.props.path,params:u,preloaded:l},navigation:this.context.navigation,orientation:screen.orientation})}))}))}))}))}))}}D.contextType=o,D.defaultProps={route:{params:{}}};class O{constructor(t,e,n){var i;this._stack=[],this._routerId=t,window.history.replaceState(Object.assign(Object.assign({},history.state),{routerId:this._routerId}),"",window.location.toString()),n=n||new URL(window.location.toString()),n=new URL(n.href.replace(/\/$/,"")),this._baseURL=n,this._defaultRoute=e,this.state.has(this.baseURL.pathname)||this.state.set(this.baseURL.pathname,{});const s=null===(i=this.state.get(this.baseURL.pathname))||void 0===i?void 0:i.stack;s?this._stack=[...s.filter((t=>Boolean(t)))]:this.state.has(this.baseURL.pathname)&&(this.state.get(this.baseURL.pathname).stack=[...this._stack])}set defaultRoute(t){this._defaultRoute=t}get length(){return this._stack.length}get defaultRoute(){return this._defaultRoute||"/"}get isEmpty(){return!this._stack.length}get baseURL(){return this._baseURL}get state(){return{set:(t,e)=>!!window.history.state&&(window.history.state[t]=e,!0),get:t=>window.history.state&&window.history.state[t]||null,has:t=>!!window.history.state&&t in window.history.state,delete:t=>!!window.history.state&&delete window.history.state[t],keys:()=>Object.keys(window.history.state||{}),values:()=>Object.values(window.history.state||{}),clear(){return this.keys().forEach((t=>delete window.history.state[t]))},get length(){return this.keys().length}}}pushState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.pushState(t,e,n)}replaceState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.replaceState(t,e,n)}static getURL(t,e,n=""){e.pathname.match(/\/$/)||(e=new URL(e.href+"/")),t.match(/^\//)&&(t=t.slice(1));const i=new URL(t,e);return i.search=n,i}}function N(){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),[n,i]=(0,t.useState)(e.matches);return e.onchange=()=>{i(e.matches)},n}function T(){const t=e().useContext(o);if(t)return t.navigation;throw new Error("RouterData is null. You may be trying to call useNavigation outside a Router.")}function I(){const[n,i]=(0,t.useState)(e().useContext(p)),s=T();return(0,t.useEffect)((()=>{const t=({detail:t})=>{i(t.progress)};return s.addEventListener("motion-progress",t),()=>s.removeEventListener("motion-progress",t)}),[]),n}function C(){const t=e().useContext(k);if(t)return t;throw new Error("RouterData is null. You may be trying to call useRoute outside a Router.")}var j=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function $(n){const i=e().useContext(o),s=T(),[a,r]=(0,t.useState)(""),[u,c]=(0,t.useState)(!1);(0,t.useEffect)((()=>{if(!s)return;let t,e;if("goBack"in n)t=M(s),e="";else{const s=(null==i?void 0:i.paramsSerializer)||null;t=n.href,e=(0,l.Po)(n.params||{},s)||""}const o=new URL(t,s.location.origin);o.hash=n.hash||"",o.search=e,o.origin===s.location.origin?(c(!1),r(o.href.replace(s.location.origin,""))):(c(!0),r(o.href))}),[n.href,n.params]);const{href:d,goBack:p,hash:m,onClick:v,replace:f,params:g}=n,y=j(n,["href","goBack","hash","onClick","replace","params"]);return s?(0,h.jsx)("a",Object.assign({href:a,onClick:t=>{t.stopPropagation(),s&&(u||(t.preventDefault(),v&&v(t),p&&s.goBack(),d&&s.navigate(d,g,{hash:m,replace:f})))}},y,{children:n.children})):(0,h.jsx)(h.Fragment,{})}function M(t){return t.canGoBack()?t.history.previous:t.parent?M(t.parent):document.referrer}var U=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function F(t){var{disabled:e,children:n}=t,i=U(t,["disabled","children"]);return(0,h.jsx)("div",Object.assign({className:"gesture-region","data-disabled":e,style:{display:"contents"}},i,{children:n}))}n(878);var z=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};class Y extends e().Component{constructor(t){super(t),this.ref=null,this.scrollPos={x:0,y:0},this.routerData=null,this._mounted=!1,this.onPageAnimationEnd=()=>{window.location.hash&&requestAnimationFrame(this.onHashChange.bind(this))},this.onHashChange=()=>{var t;if(this.ref){const e=location.hash;try{null===(t=this.ref.querySelector(e))||void 0===t||t.scrollIntoView(this.props.hashScrollConfig)}catch(t){}}},this.setRef=t=>{t&&(this.scrollPos={x:t.scrollLeft,y:t.scrollTop},this.ref=t,location.hash&&!this._mounted&&this.onHashChange(),this._mounted=!0)},this.onHashChange=this.onHashChange.bind(this)}componentDidMount(){var t,e;const n=null===(t=this.routerData)||void 0===t?void 0:t.scrollRestorationData.get(this.props.id);n&&(this.scrollPos=n),this.ref&&this.props.shouldRestore&&this.ref.scrollTo({left:this.scrollPos.x,top:this.scrollPos.y}),null===(e=this.routerData)||void 0===e||e.navigation.addEventListener("page-animation-end",this.onPageAnimationEnd),window.addEventListener("hashchange",this.onHashChange)}componentWillUnmount(){var t,e,n,i;const s={x:(null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)||0,y:(null===(e=this.ref)||void 0===e?void 0:e.scrollTop)||0};null===(n=this.routerData)||void 0===n||n.scrollRestorationData.set(this.props.id,s),null===(i=this.routerData)||void 0===i||i.navigation.removeEventListener("page-animation-end",this.onPageAnimationEnd),window.removeEventListener("hashchange",this.onHashChange)}get scrollTop(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}get scrollLeft(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}get scrollWidth(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollWidth)&&void 0!==e?e:0}get scrollHeight(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){return(0,h.jsx)(o.Consumer,{children:t=>{this.routerData=t;const e=this.props,{style:n,shouldRestore:i,hashScrollConfig:s}=e,o=z(e,["style","shouldRestore","hashScrollConfig"]);return(0,h.jsx)("div",Object.assign({},o,{ref:this.setRef,style:Object.assign(Object.assign({},n),{overflow:"scroll"})},{children:this.props.children}))}})}}var X=/[$_\p{ID_Start}]/u,V=/[$_\u200C\u200D\p{ID_Continue}]/u;function B(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function H(t,e=!1){const n=[];let i=0;for(;i<t.length;){const s=t[i],o=function(s){if(!e)throw new TypeError(s);n.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if("*"!==s)if("+"!==s&&"?"!==s)if("\\"!==s)if("{"!==s)if("}"!==s)if(":"!==s)if("("!==s)n.push({type:"CHAR",index:i,value:t[i++]});else{let e=1,s="",a=i+1,r=!1;if("?"===t[a]){o(`Pattern cannot start with "?" at ${a}`);continue}for(;a<t.length;){if(!B(t[a],!1)){o(`Invalid character '${t[a]}' at ${a}.`),r=!0;break}if("\\"!==t[a]){if(")"===t[a]){if(e--,0===e){a++;break}}else if("("===t[a]&&(e++,"?"!==t[a+1])){o(`Capturing groups are not allowed at ${a}`),r=!0;break}s+=t[a++]}else s+=t[a++]+t[a++]}if(r)continue;if(e){o(`Unbalanced pattern at ${i}`);continue}if(!s){o(`Missing pattern at ${i}`);continue}n.push({type:"PATTERN",index:i,value:s}),i=a}else{let e="",s=i+1;for(;s<t.length;){const n=t.substr(s,1);if(!(s===i+1&&X.test(n)||s!==i+1&&V.test(n)))break;e+=t[s++]}if(!e){o(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:e}),i=s}else n.push({type:"CLOSE",index:i,value:t[i++]});else n.push({type:"OPEN",index:i,value:t[i++]});else n.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else n.push({type:"MODIFIER",index:i,value:t[i++]});else n.push({type:"ASTERISK",index:i,value:t[i++]})}return n.push({type:"END",index:i,value:""}),n}function W(t,e={}){const n=H(t),{prefixes:i="./"}=e,s=`[^${G(void 0===e.delimiter?"/#?":e.delimiter)}]+?`,o=[];let a=0,r=0,h="",l=new Set;const u=t=>{if(r<n.length&&n[r].type===t)return n[r++].value},c=()=>{const t=u("MODIFIER");return t||u("ASTERISK")},d=t=>{const e=u(t);if(void 0!==e)return e;const{type:i,index:s}=n[r];throw new TypeError(`Unexpected ${i} at ${s}, expected ${t}`)},p=()=>{let t,e="";for(;t=u("CHAR")||u("ESCAPED_CHAR");)e+=t;return e},m=e.encodePart||(t=>t);for(;r<n.length;){const t=u("CHAR"),e=u("NAME");let n=u("PATTERN");if(e||n||!u("ASTERISK")||(n=".*"),e||n){let r=t||"";-1===i.indexOf(r)&&(h+=r,r=""),h&&(o.push(m(h)),h="");const u=e||a++;if(l.has(u))throw new TypeError(`Duplicate name '${u}'.`);l.add(u),o.push({name:u,prefix:m(r),suffix:"",pattern:n||s,modifier:c()||""});continue}const r=t||u("ESCAPED_CHAR");if(r){h+=r;continue}if(u("OPEN")){const t=p(),e=u("NAME")||"";let n=u("PATTERN")||"";e||n||!u("ASTERISK")||(n=".*");const i=p();d("CLOSE");const r=c()||"";if(!e&&!n&&!r){h+=t;continue}if(!e&&!n&&!t)continue;h&&(o.push(m(h)),h=""),o.push({name:e||(n?a++:""),pattern:e&&!n?s:n,prefix:m(t),suffix:m(i),modifier:r})}else h&&(o.push(m(h)),h=""),d("END")}return o}function G(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function K(t){return t&&t.ignoreCase?"ui":"u"}function q(t,e,n={}){const{strict:i=!1,start:s=!0,end:o=!0,encode:a=(t=>t)}=n,r=`[${G(void 0===n.endsWith?"":n.endsWith)}]|$`,h=`[${G(void 0===n.delimiter?"/#?":n.delimiter)}]`;let l=s?"^":"";for(const n of t)if("string"==typeof n)l+=G(a(n));else{const t=G(a(n.prefix)),i=G(a(n.suffix));if(n.pattern)if(e&&e.push(n),t||i)if("+"===n.modifier||"*"===n.modifier){const e="*"===n.modifier?"?":"";l+=`(?:${t}((?:${n.pattern})(?:${i}${t}(?:${n.pattern}))*)${i})${e}`}else l+=`(?:${t}(${n.pattern})${i})${n.modifier}`;else"+"===n.modifier||"*"===n.modifier?l+=`((?:${n.pattern})${n.modifier})`:l+=`(${n.pattern})${n.modifier}`;else l+=`(?:${t}${i})${n.modifier}`}if(o)i||(l+=`${h}?`),l+=n.endsWith?`(?=${r})`:"$";else{const e=t[t.length-1],n="string"==typeof e?h.indexOf(e[e.length-1])>-1:void 0===e;i||(l+=`(?:${h}(?=${r}))?`),n||(l+=`(?=${h}|${r})`)}return new RegExp(l,K(n))}function J(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;const n=/\((?:\?<(.*?)>)?(?!\?)/g;let i=0,s=n.exec(t.source);for(;s;)e.push({name:s[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),s=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){const i=t.map((t=>J(t,e,n).source));return new RegExp(`(?:${i.join("|")})`,K(n))}(t,e,n):function(t,e,n){return q(W(t,n),e,n)}(t,e,n)}var Q={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Z={delimiter:".",prefixes:"",sensitive:!0,strict:!0},tt={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function et(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function nt(t){return!(!t||t.length<2)&&("["===t[0]||("\\"===t[0]||"{"===t[0])&&"["===t[1])}var it=["ftp","file","http","https","ws","wss"];function st(t){if(!t)return!0;for(const e of it)if(t.test(e))return!0;return!1}function ot(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function at(t){if(""===t)return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function rt(t){if(""===t)return t;const e=new URL("https://example.com");return e.username=t,e.username}function ht(t){if(""===t)return t;const e=new URL("https://example.com");return e.password=t,e.password}function lt(t){if(""===t)return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);const e=new URL("https://example.com");return e.hostname=t,e.hostname}function ut(t){if(""===t)return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function ct(t){if(""===t)return t;if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function dt(t){if(""===t)return t;const e=new URL("https://example.com");return e.pathname="/"!==t[0]?"/-"+t:t,"/"!==t[0]?e.pathname.substring(2,e.pathname.length):e.pathname}function pt(t){if(""===t)return t;return new URL(`data:${t}`).pathname}function mt(t){if(""===t)return t;const e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function vt(t){if(""===t)return t;const e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var ft=["protocol","username","password","hostname","port","pathname","search","hash"],gt="*";function yt(t,e){if("string"!=typeof t)throw new TypeError("parameter 1 is not of type 'string'.");const n=new URL(t,e);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!=n.search?n.search.substring(1,n.search.length):void 0,hash:""!=n.hash?n.hash.substring(1,n.hash.length):void 0}}function Et(t,e){return e?wt(t):t}function _t(t,e,n){let i;if("string"==typeof e.baseURL)try{i=new URL(e.baseURL),t.protocol=Et(i.protocol.substring(0,i.protocol.length-1),n),t.username=Et(i.username,n),t.password=Et(i.password,n),t.hostname=Et(i.hostname,n),t.port=Et(i.port,n),t.pathname=Et(i.pathname,n),t.search=Et(i.search.substring(1,i.search.length),n),t.hash=Et(i.hash.substring(1,i.hash.length),n)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if("string"==typeof e.protocol&&(t.protocol=function(t,e){var n,i;return i=":",t=(n=t).endsWith(i)?n.substr(0,n.length-i.length):n,e||""===t?t:at(t)}(e.protocol,n)),"string"==typeof e.username&&(t.username=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.username=t,n.username}(e.username,n)),"string"==typeof e.password&&(t.password=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.password=t,n.password}(e.password,n)),"string"==typeof e.hostname&&(t.hostname=function(t,e){return e||""===t?t:nt(t)?ut(t):lt(t)}(e.hostname,n)),"string"==typeof e.port&&(t.port=function(t,e,n){return ot(e)===t&&(t=""),n||""===t?t:ct(t)}(e.port,t.protocol,n)),"string"==typeof e.pathname){if(t.pathname=e.pathname,i&&!function(t,e){return!(!t.length||"/"!==t[0]&&(!e||t.length<2||"\\"!=t[0]&&"{"!=t[0]||"/"!=t[1]))}(t.pathname,n)){const e=i.pathname.lastIndexOf("/");e>=0&&(t.pathname=Et(i.pathname.substring(0,e+1),n)+t.pathname)}t.pathname=function(t,e,n){if(n||""===t)return t;if(e&&!it.includes(e))return new URL(`${e}:${t}`).pathname;const i="/"==t[0];return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}(t.pathname,t.protocol,n)}return"string"==typeof e.search&&(t.search=function(t,e){if(t=et(t,"?"),e||""===t)return t;const n=new URL("https://example.com");return n.search=t,n.search?n.search.substring(1,n.search.length):""}(e.search,n)),"string"==typeof e.hash&&(t.hash=function(t,e){if(t=et(t,"#"),e||""===t)return t;const n=new URL("https://example.com");return n.hash=t,n.hash?n.hash.substring(1,n.hash.length):""}(e.hash,n)),t}function wt(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function bt(t,e){const n=`[^${i=void 0===e.delimiter?"/#?":e.delimiter,i.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}]+?`;var i;const s=/[$_\u200C\u200D\p{ID_Continue}]/u;let o="";for(let i=0;i<t.length;++i){const a=t[i],r=i>0?t[i-1]:null,h=i<t.length-1?t[i+1]:null;if("string"==typeof a){o+=wt(a);continue}if(""===a.pattern){if(""===a.modifier){o+=wt(a.prefix);continue}o+=`{${wt(a.prefix)}}${a.modifier}`;continue}const l="number"!=typeof a.name,u=void 0!==e.prefixes?e.prefixes:"./";let c=""!==a.suffix||""!==a.prefix&&(1!==a.prefix.length||!u.includes(a.prefix));if(!c&&l&&a.pattern===n&&""===a.modifier&&h&&!h.prefix&&!h.suffix)if("string"==typeof h){const t=h.length>0?h[0]:"";c=s.test(t)}else c="number"==typeof h.name;if(!c&&""===a.prefix&&r&&"string"==typeof r&&r.length>0){const t=r[r.length-1];c=u.includes(t)}c&&(o+="{"),o+=wt(a.prefix),l&&(o+=`:${a.name}`),".*"===a.pattern?l||r&&"string"!=typeof r&&!r.modifier&&!c&&""===a.prefix?o+="(.*)":o+="*":a.pattern===n?l||(o+=`(${n})`):o+=`(${a.pattern})`,a.pattern===n&&l&&""!==a.suffix&&s.test(a.suffix[0])&&(o+="\\"),o+=wt(a.suffix),c&&(o+="}"),o+=a.modifier}return o}var xt,St,Pt,At=class{constructor(t={},e,n){this.regexp={},this.keys={},this.component_pattern={};try{let i;if("string"==typeof e?i=e:n=e,"string"==typeof t){const e=new class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=H(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(0===this.state){this.rewind(),this.isHashPrefix()?this.changeState(9,1):this.isSearchPrefix()?(this.changeState(8,1),this.internalResult.hash=""):(this.changeState(7,0),this.internalResult.search="",this.internalResult.hash="");continue}if(2===this.state){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1)}}}changeState(t,e){switch(this.state){case 0:case 2:case 10:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString()}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t<this.tokenList.length?this.tokenList[t]:this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const n=this.safeToken(t);return n.value===e&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return!0;if("?"!==this.tokenList[this.tokenIndex].value)return!1;const t=this.safeToken(this.tokenIndex-1);return"NAME"!==t.type&&"PATTERN"!==t.type&&"CLOSE"!==t.type&&"ASTERISK"!==t.type}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return"OPEN"==this.tokenList[this.tokenIndex].type}isGroupClose(){return"CLOSE"==this.tokenList[this.tokenIndex].type}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex],e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,Q),t.encodePart=at;const e=J(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=st(e)}}(t);if(e.parse(),t=e.result,void 0===i&&"string"!=typeof t.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||"object"!=typeof t)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}void 0===n&&(n={ignoreCase:!1});const s={ignoreCase:!0===n.ignoreCase},o={pathname:gt,protocol:gt,username:gt,password:gt,hostname:gt,port:gt,search:gt,hash:gt};let a;for(a of(this.pattern=_t(o,t,!0),ot(this.pattern.protocol)===this.pattern.port&&(this.pattern.port=""),ft)){if(!(a in this.pattern))continue;const t={},e=this.pattern[a];switch(this.keys[a]=[],a){case"protocol":Object.assign(t,Q),t.encodePart=at;break;case"username":Object.assign(t,Q),t.encodePart=rt;break;case"password":Object.assign(t,Q),t.encodePart=ht;break;case"hostname":Object.assign(t,Z),nt(e)?t.encodePart=ut:t.encodePart=lt;break;case"port":Object.assign(t,Q),t.encodePart=ct;break;case"pathname":st(this.regexp.protocol)?(Object.assign(t,tt,s),t.encodePart=dt):(Object.assign(t,Q,s),t.encodePart=pt);break;case"search":Object.assign(t,Q,s),t.encodePart=mt;break;case"hash":Object.assign(t,Q,s),t.encodePart=vt}try{const n=W(e,t);this.regexp[a]=q(n,this.keys[a],t),this.component_pattern[a]=bt(n,t)}catch{throw new TypeError(`invalid ${a} pattern '${this.pattern[a]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return!1;try{i=_t(i,"object"==typeof t?t:yt(t,e),!1)}catch(t){return!1}for(n of ft)if(!this.regexp[n].exec(i[n]))return!1;return!0}exec(t={},e){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return;try{n=_t(n,"object"==typeof t?t:yt(t,e),!1)}catch(t){return null}let i,s={};for(i of(s.inputs=e?[t,e]:[t],ft)){let t=this.regexp[i].exec(n[i]);if(!t)return null;let e={};for(let[n,s]of this.keys[i].entries())if("string"==typeof s.name||"number"==typeof s.name){let i=t[n+1];e[s.name]=i}s[i]={input:n[i]||"",groups:e}}return s}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=At),function(t){t[t.up=0]="up",t[t.down=1]="down",t[t.left=2]="left",t[t.right=3]="right",t[t.in=4]="in",t[t.out=5]="out"}(xt||(xt={})),function(t){t[t.slide=0]="slide",t[t.fade=1]="fade",t[t.zoom=2]="zoom",t[t.none=3]="none"}(St||(St={})),function(t){t[t.ease=0]="ease",t[t["ease-in"]=1]="ease-in",t[t["ease-in-out"]=2]="ease-in-out",t[t["ease-out"]=3]="ease-out",t[t.linear=4]="linear"}(Pt||(Pt={})),globalThis.URLPattern||(globalThis.URLPattern=At),document.body.style.position="fixed",document.body.style.inset="0";const Lt=document.head.querySelector("title");Lt&&(Lt.ariaLive="polite");let Rt=document.getElementById("root");Rt&&(Rt.style.width="100%",Rt.style.height="100%")})();var s=i.ee,o=i.r2,a=i.rN,r=i.PM,h=i.y_,l=i.DC,u=i.GW,c=i.sV,d=i.RG,p=i.GI,m=i.rJ,v=i.uZ,f=i.PV,g=i.rL,y=i.Nu,E=i.hR,_=i.cT,w=i.e1,b=i.Vo,x=i.QN,S=i.kI,P=i.Po,A=i.fJ,L=i.nc,R=i.HJ,k=i.JZ,D=i.yj;export{s as Anchor,o as DEFAULT_ANIMATION,a as GestureRegion,r as HistoryBase,h as Motion,l as NavigationBase,u as RouterBase,c as RouterData,d as ScreenBase,p as ScrollRestoration,m as SharedElement,v as clamp,f as concatenateURL,g as defaultSearchParamsToObject,y as dispatchEvent,E as getCSSData,_ as getStyleObject,w as includesRoute,b as lazy,x as matchRoute,S as prefetchRoute,P as searchParamsFromObject,A as searchParamsToObject,L as useMotion,R as useNavigation,k as useReducedMotion,D as useRoute};
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-motion-router/core",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"main": "build/index.js",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"build"
|
|
10
|
-
],
|
|
11
|
-
"description": "Declarative routing library for ReactJS ⚛ with animations baked in ⏮",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"build": "webpack",
|
|
15
|
-
"dev": "tsc -w",
|
|
16
|
-
"webpack:prod": "webpack",
|
|
17
|
-
"webpack:dev": "webpack -w"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/nxtexe/react-motion-router.git"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"react",
|
|
25
|
-
"router",
|
|
26
|
-
"route",
|
|
27
|
-
"routing",
|
|
28
|
-
"history",
|
|
29
|
-
"shared element",
|
|
30
|
-
"shared element transition",
|
|
31
|
-
"navigation",
|
|
32
|
-
"animation",
|
|
33
|
-
"transition"
|
|
34
|
-
],
|
|
35
|
-
"author": "nxtexe",
|
|
36
|
-
"license": "Apache-2.0",
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/nxtexe/react-motion-router/issues"
|
|
39
|
-
},
|
|
40
|
-
"homepage": "https://github.com/nxtexe/react-motion-router#readme",
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"urlpattern-polyfill": "^6.0.2",
|
|
43
|
-
"web-gesture-events": "^0.1.0"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"node": "^17.7.2",
|
|
47
|
-
"react": "^18.2.0",
|
|
48
|
-
"react-dom": "^18.0.0"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/node": "^17.0.23",
|
|
52
|
-
"@types/react": "^18.0.4",
|
|
53
|
-
"@types/react-dom": "^18.0.0",
|
|
54
|
-
"copy-webpack-plugin": "^11.0.0",
|
|
55
|
-
"rimraf": "^3.0.2",
|
|
56
|
-
"ts-loader": "^9.2.8",
|
|
57
|
-
"typescript": "^4.6.3",
|
|
58
|
-
"webpack": "^5.72.0",
|
|
59
|
-
"webpack-cli": "^4.9.2"
|
|
60
|
-
},
|
|
61
|
-
"gitHead": "
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-motion-router/core",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"main": "build/index.js",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"build"
|
|
10
|
+
],
|
|
11
|
+
"description": "Declarative routing library for ReactJS ⚛ with animations baked in ⏮",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
+
"build": "webpack",
|
|
15
|
+
"dev": "tsc -w",
|
|
16
|
+
"webpack:prod": "webpack",
|
|
17
|
+
"webpack:dev": "webpack -w"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/nxtexe/react-motion-router.git"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"react",
|
|
25
|
+
"router",
|
|
26
|
+
"route",
|
|
27
|
+
"routing",
|
|
28
|
+
"history",
|
|
29
|
+
"shared element",
|
|
30
|
+
"shared element transition",
|
|
31
|
+
"navigation",
|
|
32
|
+
"animation",
|
|
33
|
+
"transition"
|
|
34
|
+
],
|
|
35
|
+
"author": "nxtexe",
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/nxtexe/react-motion-router/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/nxtexe/react-motion-router#readme",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"urlpattern-polyfill": "^6.0.2",
|
|
43
|
+
"web-gesture-events": "^0.1.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"node": "^17.7.2",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^17.0.23",
|
|
52
|
+
"@types/react": "^18.0.4",
|
|
53
|
+
"@types/react-dom": "^18.0.0",
|
|
54
|
+
"copy-webpack-plugin": "^11.0.0",
|
|
55
|
+
"rimraf": "^3.0.2",
|
|
56
|
+
"ts-loader": "^9.2.8",
|
|
57
|
+
"typescript": "^4.6.3",
|
|
58
|
+
"webpack": "^5.72.0",
|
|
59
|
+
"webpack-cli": "^4.9.2"
|
|
60
|
+
},
|
|
61
|
+
"gitHead": "38a495e365799d870713ad00fcffd26af293582f"
|
|
62
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|