From a6ee623d3dcc820bf8e00c06bac60fb6001984a2 Mon Sep 17 00:00:00 2001 From: Ryota-Nitto Date: Fri, 13 Oct 2023 14:03:47 +0900 Subject: [PATCH 1/4] =?UTF-8?q?T2~T4=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- train/train_controller.py | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/train/train_controller.py b/train/train_controller.py index ea66f90..8fa4681 100644 --- a/train/train_controller.py +++ b/train/train_controller.py @@ -8,13 +8,25 @@ if platform.system() == "Windows": ADDRESS_T0 = 'e0:5a:1b:e2:7a:f2' ADDRESS_T1 = '94:b5:55:84:15:42' + ADDRESS_T2 = 'e0:5a:1b:e2:7b:1e' + ADDRESS_T3 = '1c:9d:c2:66:84:32' + ADDRESS_T4 = '24:4c:ab:f5:c6:3e' + elif platform.system() == "Darwin": ADDRESS_T0 = "00B55AE6-34AA-23C2-8C7B-8C11E6998E12" ADDRESS_T1 = "F2158243-18BB-D34C-88BC-F8F193CAD15E" + ADDRESS_T2 = 'EB57E065-90A0-B6D0-98BA-81096FA5765E' + ADDRESS_T3 = '4AA3AAE5-A039-8484-013C-32AD94F50BE0' + ADDRESS_T4 = 'FC44FB3F-CF7D-084C-EA29-7AFD10C47A57' + else: raise Exception(f"{platform.system()} not supported") +####### TODO: 車両のアドレスを指定してください ####### +address = ADDRESS_T2 +################################################# + SERVICE_UUID = "63cb613b-6562-4aa5-b602-030f103834a4" CHARACTERISTIC_SPEED_UUID = "88c9d9ae-bd53-4ab3-9f42-b3547575a743" CHARACTERISTIC_POSITIONID_UUID = "8bcd68d5-78ca-c1c3-d1ba-96d527ce8968" @@ -32,8 +44,7 @@ async def main(): for d in devices: print(" - ", d) - ####### TODO: クライアントのアドレスを選択してください ####### - async with BleakClient(ADDRESS_T0) as client: + async with BleakClient(address) as client: print("Connected to", client) print("Services:") for service in client.services: @@ -52,12 +63,22 @@ async def main(): await client.start_notify(characteristicRotation, rotationNotification_callback) await client.start_notify(characteristicVoltage, voltageNotification_callback) - i=150 #3V時171で回り始める - while(i<=255): - i = i+1 + if address == ADDRESS_T0: + i = 220 + elif address == ADDRESS_T1: + i = 200 + elif address == ADDRESS_T2: + i = 210 + elif address == ADDRESS_T3: + i = 220 + elif address == ADDRESS_T4: + i = 210 + + while(i<256): await client.write_gatt_char(characteristicSpeed, f"{i}".encode()) print("motorInput:", i) await asyncio.sleep(0.3) + async def positionIdNotification_callback(sender, data): From 462f6a479b7df384ed415a62c4ea12c68479f45c Mon Sep 17 00:00:00 2001 From: thgcMtdh Date: Fri, 13 Oct 2023 15:04:29 +0900 Subject: [PATCH 2/4] =?UTF-8?q?add:=20control=E3=81=A8server=E3=81=ABvolta?= =?UTF-8?q?ge=5FmV=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ptcs/ptcs_bridge/train_base.py | 4 ++++ ptcs/ptcs_bridge/train_client.py | 21 ++++++++++++++++++++- ptcs/ptcs_bridge/train_simulator.py | 10 +++++++++- ptcs/ptcs_control/components/train.py | 1 + ptcs/ptcs_server/server.py | 7 +++++++ ptcs/ptcs_server/types/state.py | 2 ++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ptcs/ptcs_bridge/train_base.py b/ptcs/ptcs_bridge/train_base.py index c27eefa..7a6193b 100644 --- a/ptcs/ptcs_bridge/train_base.py +++ b/ptcs/ptcs_bridge/train_base.py @@ -2,6 +2,7 @@ NotifyPositionIdCallback = Callable[["TrainBase", int], None] NotifyRotationCallback = Callable[["TrainBase", int], None] +NotifyVoltageCallback = Callable[["TrainBase", int], None] class TrainBase: @@ -21,3 +22,6 @@ async def start_notify_position_id(self, callback: NotifyPositionIdCallback) -> async def start_notify_rotation(self, callback: NotifyRotationCallback) -> None: raise NotImplementedError() + + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + raise NotImplementedError() diff --git a/ptcs/ptcs_bridge/train_client.py b/ptcs/ptcs_bridge/train_client.py index 85b8e7f..8f29d91 100644 --- a/ptcs/ptcs_bridge/train_client.py +++ b/ptcs/ptcs_bridge/train_client.py @@ -5,12 +5,18 @@ from bleak.backends.characteristic import BleakGATTCharacteristic from bleak.backends.service import BleakGATTService -from .train_base import NotifyPositionIdCallback, NotifyRotationCallback, TrainBase +from .train_base import ( + NotifyPositionIdCallback, + NotifyRotationCallback, + NotifyVoltageCallback, + TrainBase, +) SERVICE_UUID = UUID("63cb613b-6562-4aa5-b602-030f103834a4") CHARACTERISTIC_MOTOR_INPUT_UUID = UUID("88c9d9ae-bd53-4ab3-9f42-b3547575a743") CHARACTERISTIC_POSITION_ID_UUID = UUID("8bcd68d5-78ca-c1c3-d1ba-96d527ce8968") CHARACTERISTIC_ROTATION_UUID = UUID("aab17457-2755-8b50-caa1-432ff553d533") +CHARACTERISTIC_VOLTAGE_UUID = UUID("7ecc0ed2-5ef9-c9e6-5d16-582f86035ecf") logger = logging.getLogger(__name__) @@ -55,6 +61,9 @@ def _get_characteristic_position_id(self) -> BleakGATTCharacteristic: def _get_characteristic_rotation(self) -> BleakGATTCharacteristic: return self._get_characteristic(CHARACTERISTIC_ROTATION_UUID) + def _get_characteristic_voltage(self) -> BleakGATTCharacteristic: + return self._get_characteristic(CHARACTERISTIC_VOLTAGE_UUID) + async def send_speed(self, speed: int) -> None: assert 0 <= speed <= 255 characteristic_speed = self._get_characteristic_motor_input() @@ -80,3 +89,13 @@ def wrapped_callback(_characteristic: BleakGATTCharacteristic, data: bytearray): characteristic_rotation = self._get_characteristic_rotation() await self._client.start_notify(characteristic_rotation, wrapped_callback) + + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + def wrapped_callback(_characteristic: BleakGATTCharacteristic, data: bytearray): + assert len(data) == 4 + voltage = int.from_bytes(data, byteorder="little") + logger.info("%s notify voltage %s mV", self, voltage) + callback(self, voltage) + + characteristic_voltage = self._get_characteristic_voltage() + await self._client.start_notify(characteristic_voltage, wrapped_callback) diff --git a/ptcs/ptcs_bridge/train_simulator.py b/ptcs/ptcs_bridge/train_simulator.py index 69eb85a..a44703c 100644 --- a/ptcs/ptcs_bridge/train_simulator.py +++ b/ptcs/ptcs_bridge/train_simulator.py @@ -2,7 +2,12 @@ import logging import math -from .train_base import NotifyPositionIdCallback, NotifyRotationCallback, TrainBase +from .train_base import ( + NotifyPositionIdCallback, + NotifyRotationCallback, + NotifyVoltageCallback, + TrainBase, +) logger = logging.getLogger(__name__) @@ -82,6 +87,9 @@ async def start_notify_position_id(self, callback: NotifyPositionIdCallback) -> async def start_notify_rotation(self, callback: NotifyRotationCallback) -> None: self._notify_rotation_callback = callback + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + raise NotImplementedError() + async def main(): t0 = TrainSimulator("t0") diff --git a/ptcs/ptcs_control/components/train.py b/ptcs/ptcs_control/components/train.py index b426c92..ae52fc4 100644 --- a/ptcs/ptcs_control/components/train.py +++ b/ptcs/ptcs_control/components/train.py @@ -37,6 +37,7 @@ class Train(BaseComponent): stop: Stop | None = field(default=None) # 列車の停止目標 stop_distance: float = field(default=0.0) # 停止目標までの距離[cm] departure_time: int | None = field(default=None) # 発車予定時刻 + voltage_mV: int = field(default=0) # 電池電圧[mV] # commands speed_command: float = field(default=0.0) # 速度指令値 diff --git a/ptcs/ptcs_server/server.py b/ptcs/ptcs_server/server.py index 462866d..3084d93 100644 --- a/ptcs/ptcs_server/server.py +++ b/ptcs/ptcs_server/server.py @@ -76,8 +76,15 @@ def handle_notify_rotation(train_client: TrainBase, _rotation: int): return train_control.move_forward_mr(1) + def handle_notify_voltage(train_client: TrainBase, _voltage_mV: int): + train_control = control.trains.get(train_client.id) + if train_control is None: + return + train_control.voltage_mV = _voltage_mV + for train in bridge.trains.values(): await train.start_notify_rotation(handle_notify_rotation) + # await train.start_notify_voltage(handle_notify_voltage) while True: # control 内部の時計を現実世界の時間において進める diff --git a/ptcs/ptcs_server/types/state.py b/ptcs/ptcs_server/types/state.py index d6d5484..f3e73cb 100644 --- a/ptcs/ptcs_server/types/state.py +++ b/ptcs/ptcs_server/types/state.py @@ -54,6 +54,7 @@ class TrainState(BaseModel): stop_distance: float departure_time: int | None speed_command: float + voltage_mV: int @staticmethod def from_control(train: Train) -> TrainState: @@ -80,6 +81,7 @@ def from_control(train: Train) -> TrainState: stop_distance=train.stop_distance, departure_time=train.departure_time, speed_command=train.speed_command, + voltage_mV=train.voltage_mV, ) From 79290f1277cb4bea9e988087077aba26f064d8af Mon Sep 17 00:00:00 2001 From: thgcMtdh Date: Fri, 13 Oct 2023 15:17:15 +0900 Subject: [PATCH 3/4] =?UTF-8?q?add:=20ui=E3=81=AB=E9=9B=BB=E5=9C=A7?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ptcs/ptcs_client/dist/models/TrainState.ts | 1 + ptcs/ptcs_ui/src/components/Information.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ptcs/ptcs_client/dist/models/TrainState.ts b/ptcs/ptcs_client/dist/models/TrainState.ts index 77b1789..fb463ee 100644 --- a/ptcs/ptcs_client/dist/models/TrainState.ts +++ b/ptcs/ptcs_client/dist/models/TrainState.ts @@ -18,4 +18,5 @@ export type TrainState = { stop_distance: number; departure_time: (number | null); speed_command: number; + voltage_mV: number; }; diff --git a/ptcs/ptcs_ui/src/components/Information.tsx b/ptcs/ptcs_ui/src/components/Information.tsx index 5e34413..24899c5 100644 --- a/ptcs/ptcs_ui/src/components/Information.tsx +++ b/ptcs/ptcs_ui/src/components/Information.tsx @@ -17,6 +17,7 @@ export const Information: React.FC = () => { train speed + voltage @@ -30,6 +31,7 @@ export const Information: React.FC = () => { {id} {train.speed_command.toFixed(2)} + {train.voltage_mV} ))} From 3c473e5af952d2436ee263eb831a1f9d27847b10 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 06:17:49 +0000 Subject: [PATCH 4/4] Commit from GitHub Actions (Build and commit ptcs_ui) --- .../dist/assets/{index-e1ade6dd.js => index-5699ed18.js} | 2 +- ptcs/ptcs_ui/dist/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename ptcs/ptcs_ui/dist/assets/{index-e1ade6dd.js => index-5699ed18.js} (99%) diff --git a/ptcs/ptcs_ui/dist/assets/index-e1ade6dd.js b/ptcs/ptcs_ui/dist/assets/index-5699ed18.js similarity index 99% rename from ptcs/ptcs_ui/dist/assets/index-e1ade6dd.js rename to ptcs/ptcs_ui/dist/assets/index-5699ed18.js index 585fb8f..5d1f6dc 100644 --- a/ptcs/ptcs_ui/dist/assets/index-e1ade6dd.js +++ b/ptcs/ptcs_ui/dist/assets/index-5699ed18.js @@ -71,4 +71,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xe=typeof Symbol=="function"&&Symbol.for,Xu=xe?Symbol.for("react.element"):60103,Yu=xe?Symbol.for("react.portal"):60106,Vl=xe?Symbol.for("react.fragment"):60107,Hl=xe?Symbol.for("react.strict_mode"):60108,Wl=xe?Symbol.for("react.profiler"):60114,Gl=xe?Symbol.for("react.provider"):60109,Ql=xe?Symbol.for("react.context"):60110,Zu=xe?Symbol.for("react.async_mode"):60111,Kl=xe?Symbol.for("react.concurrent_mode"):60111,Xl=xe?Symbol.for("react.forward_ref"):60112,Yl=xe?Symbol.for("react.suspense"):60113,p_=xe?Symbol.for("react.suspense_list"):60120,Zl=xe?Symbol.for("react.memo"):60115,Jl=xe?Symbol.for("react.lazy"):60116,h_=xe?Symbol.for("react.block"):60121,m_=xe?Symbol.for("react.fundamental"):60117,y_=xe?Symbol.for("react.responder"):60118,g_=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xu:switch(e=e.type,e){case Zu:case Kl:case Vl:case Wl:case Hl:case Yl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Xl:case Jl:case Zl:case Gl:return e;default:return t}}case Yu:return t}}}function Gm(e){return rt(e)===Kl}ee.AsyncMode=Zu;ee.ConcurrentMode=Kl;ee.ContextConsumer=Ql;ee.ContextProvider=Gl;ee.Element=Xu;ee.ForwardRef=Xl;ee.Fragment=Vl;ee.Lazy=Jl;ee.Memo=Zl;ee.Portal=Yu;ee.Profiler=Wl;ee.StrictMode=Hl;ee.Suspense=Yl;ee.isAsyncMode=function(e){return Gm(e)||rt(e)===Zu};ee.isConcurrentMode=Gm;ee.isContextConsumer=function(e){return rt(e)===Ql};ee.isContextProvider=function(e){return rt(e)===Gl};ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xu};ee.isForwardRef=function(e){return rt(e)===Xl};ee.isFragment=function(e){return rt(e)===Vl};ee.isLazy=function(e){return rt(e)===Jl};ee.isMemo=function(e){return rt(e)===Zl};ee.isPortal=function(e){return rt(e)===Yu};ee.isProfiler=function(e){return rt(e)===Wl};ee.isStrictMode=function(e){return rt(e)===Hl};ee.isSuspense=function(e){return rt(e)===Yl};ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vl||e===Kl||e===Wl||e===Hl||e===Yl||e===p_||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===Xl||e.$$typeof===m_||e.$$typeof===y_||e.$$typeof===g_||e.$$typeof===h_)};ee.typeOf=rt;(function(e){e.exports=ee})(d_);var Qm=Us,v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Km={};Km[Qm.ForwardRef]=v_;Km[Qm.Memo]=w_;var __=!0;function S_(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var x_=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||__===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xm=function(t,n,r){x_(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function E_(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); + */var xe=typeof Symbol=="function"&&Symbol.for,Xu=xe?Symbol.for("react.element"):60103,Yu=xe?Symbol.for("react.portal"):60106,Vl=xe?Symbol.for("react.fragment"):60107,Hl=xe?Symbol.for("react.strict_mode"):60108,Wl=xe?Symbol.for("react.profiler"):60114,Gl=xe?Symbol.for("react.provider"):60109,Ql=xe?Symbol.for("react.context"):60110,Zu=xe?Symbol.for("react.async_mode"):60111,Kl=xe?Symbol.for("react.concurrent_mode"):60111,Xl=xe?Symbol.for("react.forward_ref"):60112,Yl=xe?Symbol.for("react.suspense"):60113,p_=xe?Symbol.for("react.suspense_list"):60120,Zl=xe?Symbol.for("react.memo"):60115,Jl=xe?Symbol.for("react.lazy"):60116,h_=xe?Symbol.for("react.block"):60121,m_=xe?Symbol.for("react.fundamental"):60117,y_=xe?Symbol.for("react.responder"):60118,g_=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xu:switch(e=e.type,e){case Zu:case Kl:case Vl:case Wl:case Hl:case Yl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Xl:case Jl:case Zl:case Gl:return e;default:return t}}case Yu:return t}}}function Gm(e){return rt(e)===Kl}ee.AsyncMode=Zu;ee.ConcurrentMode=Kl;ee.ContextConsumer=Ql;ee.ContextProvider=Gl;ee.Element=Xu;ee.ForwardRef=Xl;ee.Fragment=Vl;ee.Lazy=Jl;ee.Memo=Zl;ee.Portal=Yu;ee.Profiler=Wl;ee.StrictMode=Hl;ee.Suspense=Yl;ee.isAsyncMode=function(e){return Gm(e)||rt(e)===Zu};ee.isConcurrentMode=Gm;ee.isContextConsumer=function(e){return rt(e)===Ql};ee.isContextProvider=function(e){return rt(e)===Gl};ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xu};ee.isForwardRef=function(e){return rt(e)===Xl};ee.isFragment=function(e){return rt(e)===Vl};ee.isLazy=function(e){return rt(e)===Jl};ee.isMemo=function(e){return rt(e)===Zl};ee.isPortal=function(e){return rt(e)===Yu};ee.isProfiler=function(e){return rt(e)===Wl};ee.isStrictMode=function(e){return rt(e)===Hl};ee.isSuspense=function(e){return rt(e)===Yl};ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vl||e===Kl||e===Wl||e===Hl||e===Yl||e===p_||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===Xl||e.$$typeof===m_||e.$$typeof===y_||e.$$typeof===g_||e.$$typeof===h_)};ee.typeOf=rt;(function(e){e.exports=ee})(d_);var Qm=Us,v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Km={};Km[Qm.ForwardRef]=v_;Km[Qm.Memo]=w_;var __=!0;function S_(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var x_=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||__===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xm=function(t,n,r){x_(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function E_(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"}),R.jsx("th",{children:"voltage"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)}),R.jsx("td",{children:r.voltage_mV})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); diff --git a/ptcs/ptcs_ui/dist/index.html b/ptcs/ptcs_ui/dist/index.html index e332d61..27da906 100644 --- a/ptcs/ptcs_ui/dist/index.html +++ b/ptcs/ptcs_ui/dist/index.html @@ -5,7 +5,7 @@ Plarailers Train Control System - +