From ec8b00dbb71a84f15af47862b7e39b14913d692d Mon Sep 17 00:00:00 2001 From: jerry2013 <4749863+jerry2013@users.noreply.github.com> Date: Tue, 17 Sep 2024 20:19:19 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20iotum/io?= =?UTF-8?q?tum-samples@993803fd0d0f666a69202ad48c9b7e5c402f966c=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{App-a1oQg7iB.js => App-BdG_zeVJ.js} | 2 +- assets/{App-AqUT5z3W.js => App-C30Ofn4h.js} | 2 +- assets/{App-CSPR4YtY.js => App-CsJWJ5It.js} | 2 +- assets/{App-Bdhf7wuO.js => App-DOjDo7jI.js} | 2 +- assets/{App-CDEdi8wh.js => App-DR-I4vLc.js} | 2 +- assets/{App-DmoFs5Uu.js => App-ZsxsuayU.js} | 2 +- ...tRoom-NDXqfRzi.js => ChatRoom-CRBw39cb.js} | 2 +- ...ton-BiZLDXwy.js => MenuButton-tjvwGP7u.js} | 2 +- ...54g7T.js => OpenFullAppButton-RPXGZVs3.js} | 2 +- .../{index-BXCog4K2.js => index-D5Rkh0u5.js} | 26 +++++++++---------- index.html | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) rename assets/{App-a1oQg7iB.js => App-BdG_zeVJ.js} (89%) rename assets/{App-AqUT5z3W.js => App-C30Ofn4h.js} (96%) rename assets/{App-CSPR4YtY.js => App-CsJWJ5It.js} (90%) rename assets/{App-Bdhf7wuO.js => App-DOjDo7jI.js} (89%) rename assets/{App-CDEdi8wh.js => App-DR-I4vLc.js} (91%) rename assets/{App-DmoFs5Uu.js => App-ZsxsuayU.js} (95%) rename assets/{ChatRoom-NDXqfRzi.js => ChatRoom-CRBw39cb.js} (84%) rename assets/{MenuButton-BiZLDXwy.js => MenuButton-tjvwGP7u.js} (99%) rename assets/{OpenFullAppButton-Cc354g7T.js => OpenFullAppButton-RPXGZVs3.js} (76%) rename assets/{index-BXCog4K2.js => index-D5Rkh0u5.js} (91%) diff --git a/assets/App-a1oQg7iB.js b/assets/App-BdG_zeVJ.js similarity index 89% rename from assets/App-a1oQg7iB.js rename to assets/App-BdG_zeVJ.js index ff8ea0f8..c5611a2b 100644 --- a/assets/App-a1oQg7iB.js +++ b/assets/App-BdG_zeVJ.js @@ -1 +1 @@ -import{u as v,r as c,a as T,j as t,T as w,L as R}from"./index-BXCog4K2.js";import{D as l,S as h,M as A}from"./MenuButton-BiZLDXwy.js";const B="_chatContainer_17vrk_2",N="_badge_17vrk_12",D="_biggerButton_17vrk_26",g={chatContainer:B,badge:N,biggerButton:D},M=()=>{v();const[m,b]=c.useState(""),[f,p]=c.useState(0),[x,E]=c.useState(!0),r=c.useRef(null),o=T(n=>n.credentials),d=o.token&&o.domain&&o.hostId,j=n=>{var s;if(d)if((s=r.current)!=null&&s.instance)n();else{const{domain:i,token:u,hostId:a}=o;r.current=new l({domain:i,sso:{token:u,hostId:a},container:window,target:{name:"CallbridgeChatWidget",features:"width=800,height=600",checkExisting:!0}},h.Team),r.current.on("dashboard.READY",n),r.current.on("dashboard.NAVIGATE",e=>{console.log("navigate event:",e.service,e.pathname)})}},C=n=>{n.preventDefault();const{currentTarget:s}=n;s.disabled=!0;const i=setTimeout(()=>s.disabled=!1,2e3);j(()=>{clearTimeout(i),s.disabled=!1,r.current.instance.focus()})};return c.useEffect(()=>{if(d){const n=document.createElement("div"),{domain:s,token:i,hostId:u}=o,a=new l({domain:s,sso:{token:i,hostId:u},container:n},h.Team);return a.on("dashboard.UNREAD_MESSAGES",e=>{const S=Object.values(e.rooms).reduce((_,k)=>_+k,0);p(S),E(!1)}),a.on("widget.ERROR",e=>{console.error("Widget error:",e),b(JSON.stringify(e))}),()=>{var e;(e=r.current)==null||e.unload(),a==null||a.unload()}}},[d,o]),t.jsxs(t.Fragment,{children:[t.jsx(w,{position:"right"}),t.jsx(A,{position:"right"}),t.jsx("div",{className:g.chatContainer,children:x?t.jsx(R,{error:m,children:"Loading unread messages"}):t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:g.biggerButton,onClick:C,children:"Chat"}),t.jsx("span",{className:g.badge,children:f})]})})]})};export{M as default}; +import{u as v,r as c,a as T,j as t,T as w,L as R}from"./index-D5Rkh0u5.js";import{D as l,S as h,M as A}from"./MenuButton-tjvwGP7u.js";const B="_chatContainer_17vrk_2",N="_badge_17vrk_12",D="_biggerButton_17vrk_26",g={chatContainer:B,badge:N,biggerButton:D},M=()=>{v();const[m,b]=c.useState(""),[f,p]=c.useState(0),[x,E]=c.useState(!0),r=c.useRef(null),o=T(n=>n.credentials),d=o.token&&o.domain&&o.hostId,j=n=>{var s;if(d)if((s=r.current)!=null&&s.instance)n();else{const{domain:i,token:u,hostId:a}=o;r.current=new l({domain:i,sso:{token:u,hostId:a},container:window,target:{name:"CallbridgeChatWidget",features:"width=800,height=600",checkExisting:!0}},h.Team),r.current.on("dashboard.READY",n),r.current.on("dashboard.NAVIGATE",e=>{console.log("navigate event:",e.service,e.pathname)})}},C=n=>{n.preventDefault();const{currentTarget:s}=n;s.disabled=!0;const i=setTimeout(()=>s.disabled=!1,2e3);j(()=>{clearTimeout(i),s.disabled=!1,r.current.instance.focus()})};return c.useEffect(()=>{if(d){const n=document.createElement("div"),{domain:s,token:i,hostId:u}=o,a=new l({domain:s,sso:{token:i,hostId:u},container:n},h.Team);return a.on("dashboard.UNREAD_MESSAGES",e=>{const S=Object.values(e.rooms).reduce((_,k)=>_+k,0);p(S),E(!1)}),a.on("widget.ERROR",e=>{console.error("Widget error:",e),b(JSON.stringify(e))}),()=>{var e;(e=r.current)==null||e.unload(),a==null||a.unload()}}},[d,o]),t.jsxs(t.Fragment,{children:[t.jsx(w,{position:"right"}),t.jsx(A,{position:"right"}),t.jsx("div",{className:g.chatContainer,children:x?t.jsx(R,{error:m,children:"Loading unread messages"}):t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:g.biggerButton,onClick:C,children:"Chat"}),t.jsx("span",{className:g.badge,children:f})]})})]})};export{M as default}; diff --git a/assets/App-AqUT5z3W.js b/assets/App-C30Ofn4h.js similarity index 96% rename from assets/App-AqUT5z3W.js rename to assets/App-C30Ofn4h.js index ecc676c1..e2b40a22 100644 --- a/assets/App-AqUT5z3W.js +++ b/assets/App-C30Ofn4h.js @@ -1 +1 @@ -import{u as v,r as l,a as x,j as e,T as b}from"./index-BXCog4K2.js";import{M as _,b as f}from"./MenuButton-BiZLDXwy.js";const M="_form_1tv7w_2",w="_appContainer_1tv7w_55",E="_accessCodeInput_1tv7w_59",k="_startMeetingButton_1tv7w_66",S="_widgetContainer_1tv7w_80",y="_devices_1tv7w_84",a={form:M,appContainer:w,accessCodeInput:E,startMeetingButton:k,widgetContainer:S,devices:y},I=({domain:c,token:p,hostId:r,accessCode:m,muteMic:n,muteCam:C})=>{const o=new f({domain:c,sso:{token:p,hostId:r},container:"#meeting"},m,{skipJoin:!0,mute:{mic:n,camera:C}});return document.querySelector("#start").disabled=!0,o.on("room.READY",()=>{document.querySelector("#start").disabled=!1}),o.on("device.DEVICE_LIST_CHANGED",u=>{["audioinput","audiooutput","videoinput"].forEach(i=>{const s=document.querySelector(`select#${i}`);s.replaceChildren(s.firstChild),u[i].forEach(({label:t,deviceId:d})=>{s.appendChild(Object.assign(document.createElement("option"),{textContent:t,value:d}))})})}),o.on("device.DEVICE_IN_USE",({kind:u,deviceId:i})=>{const s=document.querySelector(`select#${u}`);s.value=i}),o},A=()=>{v();const[c,p]=l.useState(()=>{}),[r,m]=l.useState(()=>{}),n=l.useRef(),C=x(t=>t.credentials),o=({target:t})=>{switch(t.id){case"videoinput":n.current.setVideoInput(t.value);break;case"audioinput":n.current.setAudioInput(t.value);break;case"audiooutput":n.current.setAudioOutput(t.value);break;default:console.error("invalid",t.id);break}},u=()=>{n.current.setMute(!r)},i=()=>{n.current.setCamera(!c)},s=t=>{var h;t.preventDefault();const d=t.target.accessCode.value;if(!d){console.log("Access code not set, widget will not be rendered.");return}(h=n.current)==null||h.unload(),n.current=I({...C,accessCode:d,muteMic:!t.target.joinMic.checked,muteCam:!t.target.joinCam.checked}),n.current.on("participant.CHANGE",({isCameraOn:g,isMuted:j})=>{p(g),m(j)})};return l.useEffect(()=>()=>{var t;(t=n.current)==null||t.unload()},[]),e.jsxs("div",{className:a.appContainer,children:[e.jsxs("form",{className:a.form,onSubmit:s,children:[e.jsxs("label",{children:[e.jsx("span",{children:"Access Code:"}),e.jsx("input",{name:"accessCode",type:"text",required:!0,autoFocus:!0,className:a.accessCodeInput})]}),e.jsxs("label",{title:"join with microphone on",children:[e.jsx("input",{name:"joinMic",type:"checkbox",defaultChecked:!0}),e.jsx("span",{children:"mic"})]}),e.jsxs("label",{title:"join with camera on",children:[e.jsx("input",{name:"joinCam",type:"checkbox",defaultChecked:!0}),e.jsx("span",{children:"cam"})]}),e.jsx("button",{id:"start",type:"submit",className:a.startMeetingButton,children:"Start Meeting"})]}),e.jsx(b,{position:"right"}),e.jsx(_,{position:"right"}),e.jsxs("div",{className:a.devices,children:[e.jsx("select",{id:"audioinput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"audio input ..."})}),e.jsx("select",{id:"audiooutput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"audio output ..."})}),e.jsx("select",{id:"videoinput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"video input ..."})}),r!==void 0&&e.jsxs("button",{id:"toggleMic",type:"button",onClick:u,children:[r?"UNMUTE":"MUTE"," mic"]}),c!==void 0&&e.jsxs("button",{id:"toggleCam",type:"button",onClick:i,children:[c?"STOP":"START"," cam"]})]}),e.jsx("div",{id:"meeting",className:a.widgetContainer})]})};export{A as default}; +import{u as v,r as l,a as x,j as e,T as b}from"./index-D5Rkh0u5.js";import{M as _,b as f}from"./MenuButton-tjvwGP7u.js";const M="_form_1tv7w_2",w="_appContainer_1tv7w_55",E="_accessCodeInput_1tv7w_59",k="_startMeetingButton_1tv7w_66",S="_widgetContainer_1tv7w_80",y="_devices_1tv7w_84",a={form:M,appContainer:w,accessCodeInput:E,startMeetingButton:k,widgetContainer:S,devices:y},I=({domain:c,token:p,hostId:r,accessCode:m,muteMic:n,muteCam:C})=>{const o=new f({domain:c,sso:{token:p,hostId:r},container:"#meeting"},m,{skipJoin:!0,mute:{mic:n,camera:C}});return document.querySelector("#start").disabled=!0,o.on("room.READY",()=>{document.querySelector("#start").disabled=!1}),o.on("device.DEVICE_LIST_CHANGED",u=>{["audioinput","audiooutput","videoinput"].forEach(i=>{const s=document.querySelector(`select#${i}`);s.replaceChildren(s.firstChild),u[i].forEach(({label:t,deviceId:d})=>{s.appendChild(Object.assign(document.createElement("option"),{textContent:t,value:d}))})})}),o.on("device.DEVICE_IN_USE",({kind:u,deviceId:i})=>{const s=document.querySelector(`select#${u}`);s.value=i}),o},A=()=>{v();const[c,p]=l.useState(()=>{}),[r,m]=l.useState(()=>{}),n=l.useRef(),C=x(t=>t.credentials),o=({target:t})=>{switch(t.id){case"videoinput":n.current.setVideoInput(t.value);break;case"audioinput":n.current.setAudioInput(t.value);break;case"audiooutput":n.current.setAudioOutput(t.value);break;default:console.error("invalid",t.id);break}},u=()=>{n.current.setMute(!r)},i=()=>{n.current.setCamera(!c)},s=t=>{var h;t.preventDefault();const d=t.target.accessCode.value;if(!d){console.log("Access code not set, widget will not be rendered.");return}(h=n.current)==null||h.unload(),n.current=I({...C,accessCode:d,muteMic:!t.target.joinMic.checked,muteCam:!t.target.joinCam.checked}),n.current.on("participant.CHANGE",({isCameraOn:g,isMuted:j})=>{p(g),m(j)})};return l.useEffect(()=>()=>{var t;(t=n.current)==null||t.unload()},[]),e.jsxs("div",{className:a.appContainer,children:[e.jsxs("form",{className:a.form,onSubmit:s,children:[e.jsxs("label",{children:[e.jsx("span",{children:"Access Code:"}),e.jsx("input",{name:"accessCode",type:"text",required:!0,autoFocus:!0,className:a.accessCodeInput})]}),e.jsxs("label",{title:"join with microphone on",children:[e.jsx("input",{name:"joinMic",type:"checkbox",defaultChecked:!0}),e.jsx("span",{children:"mic"})]}),e.jsxs("label",{title:"join with camera on",children:[e.jsx("input",{name:"joinCam",type:"checkbox",defaultChecked:!0}),e.jsx("span",{children:"cam"})]}),e.jsx("button",{id:"start",type:"submit",className:a.startMeetingButton,children:"Start Meeting"})]}),e.jsx(b,{position:"right"}),e.jsx(_,{position:"right"}),e.jsxs("div",{className:a.devices,children:[e.jsx("select",{id:"audioinput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"audio input ..."})}),e.jsx("select",{id:"audiooutput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"audio output ..."})}),e.jsx("select",{id:"videoinput",onChange:o,children:e.jsx("option",{disabled:!0,value:"",children:"video input ..."})}),r!==void 0&&e.jsxs("button",{id:"toggleMic",type:"button",onClick:u,children:[r?"UNMUTE":"MUTE"," mic"]}),c!==void 0&&e.jsxs("button",{id:"toggleCam",type:"button",onClick:i,children:[c?"STOP":"START"," cam"]})]}),e.jsx("div",{id:"meeting",className:a.widgetContainer})]})};export{A as default}; diff --git a/assets/App-CSPR4YtY.js b/assets/App-CsJWJ5It.js similarity index 90% rename from assets/App-CSPR4YtY.js rename to assets/App-CsJWJ5It.js index 4e6a4c63..fb75dc1e 100644 --- a/assets/App-CSPR4YtY.js +++ b/assets/App-CsJWJ5It.js @@ -1 +1 @@ -import{u as C,r as o,a as g,j as t,T as _}from"./index-BXCog4K2.js";import{M as m,b as w}from"./MenuButton-BiZLDXwy.js";const x="_appContainer_186wz_1",f="_startButton_186wz_7",j="_accessCodeLabel_186wz_19",B="_accessCodeInput_186wz_24",b="_startMeetingButton_186wz_32",M="_widgetContainer_186wz_46",s={appContainer:x,startButton:f,accessCodeLabel:j,accessCodeInput:B,startMeetingButton:b,widgetContainer:M},N=()=>{C();const a=o.useRef(null),n=o.useRef(null),i=g(e=>e.credentials),u=e=>{var r;e.preventDefault();const c=e.target.accessCode.value;if(console.log("render meeting widget"),!c){console.log("Access code not set, widget will not be rendered.");return}(r=n.current)==null||r.unload();const{domain:d,token:l,hostId:p}=i;n.current=new w({domain:d,sso:{token:l,hostId:p},container:a.current},c,{skipJoin:!0})};return o.useEffect(()=>()=>{var e;(e=n.current)==null||e.unload()},[]),t.jsxs("div",{className:s.appContainer,children:[t.jsxs("form",{onSubmit:u,className:s.startButton,children:[t.jsx("div",{className:s.accessCodeLabel,children:"Access Code:"}),t.jsx("input",{type:"text",name:"accessCode",required:!0,autoFocus:!0,className:s.accessCodeInput}),t.jsx("button",{type:"submit",className:s.startMeetingButton,children:"Start Meeting"})]}),t.jsx(_,{position:"right"}),t.jsx(m,{position:"right"}),t.jsx("div",{ref:a,className:s.widgetContainer})]})};export{N as default}; +import{u as C,r as o,a as g,j as t,T as _}from"./index-D5Rkh0u5.js";import{M as m,b as w}from"./MenuButton-tjvwGP7u.js";const x="_appContainer_186wz_1",f="_startButton_186wz_7",j="_accessCodeLabel_186wz_19",B="_accessCodeInput_186wz_24",b="_startMeetingButton_186wz_32",M="_widgetContainer_186wz_46",s={appContainer:x,startButton:f,accessCodeLabel:j,accessCodeInput:B,startMeetingButton:b,widgetContainer:M},N=()=>{C();const a=o.useRef(null),n=o.useRef(null),i=g(e=>e.credentials),u=e=>{var r;e.preventDefault();const c=e.target.accessCode.value;if(console.log("render meeting widget"),!c){console.log("Access code not set, widget will not be rendered.");return}(r=n.current)==null||r.unload();const{domain:d,token:l,hostId:p}=i;n.current=new w({domain:d,sso:{token:l,hostId:p},container:a.current},c,{skipJoin:!0})};return o.useEffect(()=>()=>{var e;(e=n.current)==null||e.unload()},[]),t.jsxs("div",{className:s.appContainer,children:[t.jsxs("form",{onSubmit:u,className:s.startButton,children:[t.jsx("div",{className:s.accessCodeLabel,children:"Access Code:"}),t.jsx("input",{type:"text",name:"accessCode",required:!0,autoFocus:!0,className:s.accessCodeInput}),t.jsx("button",{type:"submit",className:s.startMeetingButton,children:"Start Meeting"})]}),t.jsx(_,{position:"right"}),t.jsx(m,{position:"right"}),t.jsx("div",{ref:a,className:s.widgetContainer})]})};export{N as default}; diff --git a/assets/App-Bdhf7wuO.js b/assets/App-DOjDo7jI.js similarity index 89% rename from assets/App-Bdhf7wuO.js rename to assets/App-DOjDo7jI.js index 58a813b0..b2b0ec59 100644 --- a/assets/App-Bdhf7wuO.js +++ b/assets/App-DOjDo7jI.js @@ -1 +1 @@ -import{j as o,T as w,u as v,r as u,a as N}from"./index-BXCog4K2.js";import{s as d,C as L}from"./ChatRoom-NDXqfRzi.js";import{M as T,D as _,S as f,L as x}from"./MenuButton-BiZLDXwy.js";const y=({rooms:h,onRoomClose:a})=>o.jsxs("div",{className:d.chatRoomsContainer,children:[h.map(t=>t.bool&&o.jsxs("div",{className:`${d.chatRoom} ${d.activeRoom}`,children:[o.jsx(L,{path:t.path}),o.jsx("button",{className:d.closeButton,onClick:()=>a(t.path),children:"x"})]},t.path)),o.jsx(w,{position:"right"}),o.jsx(T,{position:"right"})]}),A="_container_1w0rt_3",k="_roomListContainer_1w0rt_8",R={container:A,roomListContainer:k},$=()=>{v();const[h,a]=u.useState([]),t=N(e=>e.credentials),j=e=>{a(n=>n.map(s=>s.path===e?{...s,bool:!0}:s))},C=e=>{console.log(e+" was closed"),a(n=>n.map(s=>s.path===e?{...s,bool:!1}:s))},p=u.useCallback(({domain:e,token:n,hostId:s})=>{console.log("renderWidget ran");const i=new _({domain:e,sso:{token:n,hostId:s},container:"#chat"},f.Team,{layout:x.list,pathname:"/"});return i.once("dashboard.ROOM_LIST",r=>{const g=[],b=Object.values(r.rooms).map(m=>{const c=m.accounts.map(l=>l.name);if(c.length===1){const l=`${c[0]} (you)`;return g.push(c[0]),{name:l,path:m.path,bool:!1}}return{name:c.filter(l=>!g.includes(l)).join(", "),path:m.path,bool:!1}});a(b)}),i.on("dashboard.NAVIGATE",r=>{r.pathname!=="/"&&(i.load(f.Team,{layout:x.list}),console.log("There was a navigate event to "+r.pathname+" in the list widget and the list widget was reloaded")),j(r.pathname)}),i.on("dashboard.READY",()=>{console.log("The list widget was rendered")}),i},[]);return u.useEffect(()=>{if(t&&t.token&&t.domain&&t.hostId){const e=p(t);return()=>{e.unload()}}},[t,p]),o.jsxs("div",{className:R.container,children:[o.jsx("div",{id:"chat",className:R.roomListContainer}),o.jsx("div",{children:o.jsx(y,{rooms:h,onRoomClose:C})})]})};export{$ as default}; +import{j as o,T as w,u as v,r as u,a as N}from"./index-D5Rkh0u5.js";import{s as d,C as L}from"./ChatRoom-CRBw39cb.js";import{M as T,D as _,S as f,L as x}from"./MenuButton-tjvwGP7u.js";const y=({rooms:h,onRoomClose:a})=>o.jsxs("div",{className:d.chatRoomsContainer,children:[h.map(t=>t.bool&&o.jsxs("div",{className:`${d.chatRoom} ${d.activeRoom}`,children:[o.jsx(L,{path:t.path}),o.jsx("button",{className:d.closeButton,onClick:()=>a(t.path),children:"x"})]},t.path)),o.jsx(w,{position:"right"}),o.jsx(T,{position:"right"})]}),A="_container_1w0rt_3",k="_roomListContainer_1w0rt_8",R={container:A,roomListContainer:k},$=()=>{v();const[h,a]=u.useState([]),t=N(e=>e.credentials),j=e=>{a(n=>n.map(s=>s.path===e?{...s,bool:!0}:s))},C=e=>{console.log(e+" was closed"),a(n=>n.map(s=>s.path===e?{...s,bool:!1}:s))},p=u.useCallback(({domain:e,token:n,hostId:s})=>{console.log("renderWidget ran");const i=new _({domain:e,sso:{token:n,hostId:s},container:"#chat"},f.Team,{layout:x.list,pathname:"/"});return i.once("dashboard.ROOM_LIST",r=>{const g=[],b=Object.values(r.rooms).map(m=>{const c=m.accounts.map(l=>l.name);if(c.length===1){const l=`${c[0]} (you)`;return g.push(c[0]),{name:l,path:m.path,bool:!1}}return{name:c.filter(l=>!g.includes(l)).join(", "),path:m.path,bool:!1}});a(b)}),i.on("dashboard.NAVIGATE",r=>{r.pathname!=="/"&&(i.load(f.Team,{layout:x.list}),console.log("There was a navigate event to "+r.pathname+" in the list widget and the list widget was reloaded")),j(r.pathname)}),i.on("dashboard.READY",()=>{console.log("The list widget was rendered")}),i},[]);return u.useEffect(()=>{if(t&&t.token&&t.domain&&t.hostId){const e=p(t);return()=>{e.unload()}}},[t,p]),o.jsxs("div",{className:R.container,children:[o.jsx("div",{id:"chat",className:R.roomListContainer}),o.jsx("div",{children:o.jsx(y,{rooms:h,onRoomClose:C})})]})};export{$ as default}; diff --git a/assets/App-CDEdi8wh.js b/assets/App-DR-I4vLc.js similarity index 91% rename from assets/App-CDEdi8wh.js rename to assets/App-DR-I4vLc.js index ed33086b..f0e5d439 100644 --- a/assets/App-CDEdi8wh.js +++ b/assets/App-DR-I4vLc.js @@ -1 +1 @@ -import{j as t,T as S,u as C,b as O,r as f,a as y,L}from"./index-BXCog4K2.js";import{s as a,C as B}from"./ChatRoom-NDXqfRzi.js";import{M as w,a as k,D as E,S as M,L as T}from"./MenuButton-BiZLDXwy.js";import{O as A}from"./OpenFullAppButton-Cc354g7T.js";const I=({rooms:u,onRoomButtonClick:h,onRoomClose:m,children:p})=>t.jsxs("div",{className:a.container,children:[t.jsx("div",{className:a.roomListContainer,children:u.map(s=>t.jsx("div",{className:a.chatRoomItem,children:t.jsx("button",{onClick:()=>h(s.path),className:s.bool?a.active:"",children:s.name})},s.path))}),t.jsxs("div",{className:a.chatRoomsContainer,children:[u.map(s=>s.bool&&t.jsxs("div",{className:`${a.chatRoom} ${a.activeRoom}`,children:[t.jsx(B,{path:s.path}),t.jsx("button",{className:a.closeButton,onClick:()=>m(s.path),children:"x"})]},s.path)),t.jsx(S,{position:"right"}),t.jsx(w,{position:"right"}),p]})]}),D=()=>{C();const u=O(),[h,m]=f.useState(""),[p,s]=f.useState(()=>JSON.parse(decodeURI(u.hash.slice(1))||"[]").map(e=>({path:e,bool:!0}))),n=y(e=>e.credentials),g=(e,x)=>{s(j=>{const l=j.map(o=>o.path===e?{...o,bool:x}:o),i=l.filter(o=>o.bool).map(o=>o.path);return window.history.pushState(null,"","#"+(i.length?JSON.stringify(i):"")),l})},N=({domain:e,token:x,hostId:j})=>{const l=new E({domain:e,sso:{token:x,hostId:j},container:"#chat"},M.Team,{layout:T.list,pathname:"/"});return l.on("widget.ERROR",i=>{console.error("Widget error:",i),m(JSON.stringify(i))}),l.once("dashboard.ROOM_LIST",i=>{var R;const o=[],v=Object.values(i.rooms).map(r=>{const c=r.accounts.map(d=>d.name);if(c.length===1){const d=`${c[0]} (you)`;return o.push(c[0]),{name:d,path:r.path,bool:!1}}return{name:c.filter(d=>!o.includes(d)).join(", "),path:r.path,bool:!1}});s(r=>v.map(c=>({...c,bool:!!r.find(b=>b.path===c.path)}))),(R=document.querySelector("#loading"))==null||R.remove()}),l};return f.useEffect(()=>{if(n&&n.token&&n.domain&&n.hostId){const e=N(n);return setTimeout(()=>e.toggle(!1)),()=>{e.unload()}}},[n]),t.jsxs("div",{children:[t.jsx("div",{id:"room-buttons",children:t.jsx(I,{rooms:p,onRoomButtonClick:e=>g(e,!0),onRoomClose:e=>g(e,!1),children:t.jsx("div",{className:k.extraMenu,children:t.jsx(A,{...n})})})}),t.jsx("div",{id:"chat",children:t.jsx(L,{id:"loading",error:h})})]})};export{D as default}; +import{j as t,T as S,u as C,b as O,r as f,a as y,L}from"./index-D5Rkh0u5.js";import{s as a,C as B}from"./ChatRoom-CRBw39cb.js";import{M as w,a as k,D as E,S as M,L as T}from"./MenuButton-tjvwGP7u.js";import{O as A}from"./OpenFullAppButton-RPXGZVs3.js";const I=({rooms:u,onRoomButtonClick:h,onRoomClose:m,children:p})=>t.jsxs("div",{className:a.container,children:[t.jsx("div",{className:a.roomListContainer,children:u.map(s=>t.jsx("div",{className:a.chatRoomItem,children:t.jsx("button",{onClick:()=>h(s.path),className:s.bool?a.active:"",children:s.name})},s.path))}),t.jsxs("div",{className:a.chatRoomsContainer,children:[u.map(s=>s.bool&&t.jsxs("div",{className:`${a.chatRoom} ${a.activeRoom}`,children:[t.jsx(B,{path:s.path}),t.jsx("button",{className:a.closeButton,onClick:()=>m(s.path),children:"x"})]},s.path)),t.jsx(S,{position:"right"}),t.jsx(w,{position:"right"}),p]})]}),D=()=>{C();const u=O(),[h,m]=f.useState(""),[p,s]=f.useState(()=>JSON.parse(decodeURI(u.hash.slice(1))||"[]").map(e=>({path:e,bool:!0}))),n=y(e=>e.credentials),g=(e,x)=>{s(j=>{const l=j.map(o=>o.path===e?{...o,bool:x}:o),i=l.filter(o=>o.bool).map(o=>o.path);return window.history.pushState(null,"","#"+(i.length?JSON.stringify(i):"")),l})},N=({domain:e,token:x,hostId:j})=>{const l=new E({domain:e,sso:{token:x,hostId:j},container:"#chat"},M.Team,{layout:T.list,pathname:"/"});return l.on("widget.ERROR",i=>{console.error("Widget error:",i),m(JSON.stringify(i))}),l.once("dashboard.ROOM_LIST",i=>{var R;const o=[],v=Object.values(i.rooms).map(r=>{const c=r.accounts.map(d=>d.name);if(c.length===1){const d=`${c[0]} (you)`;return o.push(c[0]),{name:d,path:r.path,bool:!1}}return{name:c.filter(d=>!o.includes(d)).join(", "),path:r.path,bool:!1}});s(r=>v.map(c=>({...c,bool:!!r.find(b=>b.path===c.path)}))),(R=document.querySelector("#loading"))==null||R.remove()}),l};return f.useEffect(()=>{if(n&&n.token&&n.domain&&n.hostId){const e=N(n);return setTimeout(()=>e.toggle(!1)),()=>{e.unload()}}},[n]),t.jsxs("div",{children:[t.jsx("div",{id:"room-buttons",children:t.jsx(I,{rooms:p,onRoomButtonClick:e=>g(e,!0),onRoomClose:e=>g(e,!1),children:t.jsx("div",{className:k.extraMenu,children:t.jsx(A,{...n})})})}),t.jsx("div",{id:"chat",children:t.jsx(L,{id:"loading",error:h})})]})};export{D as default}; diff --git a/assets/App-DmoFs5Uu.js b/assets/App-ZsxsuayU.js similarity index 95% rename from assets/App-DmoFs5Uu.js rename to assets/App-ZsxsuayU.js index 3e5fce28..3f0478d4 100644 --- a/assets/App-DmoFs5Uu.js +++ b/assets/App-ZsxsuayU.js @@ -1 +1 @@ -import{u as H,b as O,r as n,a as k,j as o,L as U,T as G}from"./index-BXCog4K2.js";import{S as t,D as A,M as z,a as f}from"./MenuButton-BiZLDXwy.js";import{O as F}from"./OpenFullAppButton-Cc354g7T.js";const J="_appContainer_b3ogb_2",P="_verticalTabContainer_b3ogb_9",X="_active_b3ogb_30",q="_widgetContainer_b3ogb_38",K="_bordered_b3ogb_44",Q="_badge_b3ogb_48",p={appContainer:J,verticalTabContainer:P,active:X,widgetContainer:q,bordered:K,badge:Q},Z=[{svc:t.None,label:"Your App"},{svc:t.Team,label:"Team Chat"},{svc:t.Drive,label:"Drive"},{svc:t.Contacts,label:"Contacts"},{svc:t.Meet,label:"Meetings"}],ee=({setService:c,service:l,currentService:d,disabled:i,children:v})=>o.jsx("button",{type:"button",onClick:i?void 0:()=>c(l),disabled:i,className:d===l?p.active:void 0,style:{position:"relative"},children:v}),T=[50,51,52,53],te=({hideDashboardElements:c,setHideDashboardElements:l})=>{const d=()=>{l(c?void 0:T)};return o.jsx("div",{children:o.jsx("button",{type:"button",className:`${f.menuButton} ${f.hideDashboardElementsButton}`,onClick:d,children:`${c?"Show":"Hide"} Dashboard Elements`})})},oe=({hideDashboardElements:c,setHideDashboardElements:l})=>{const d=i=>{var S;const E=Array.from((S=i.target)==null?void 0:S.options).filter(u=>u.selected).map(u=>Number(u.value));l(E.length>0?E:void 0)};return o.jsx("div",{children:o.jsx("select",{multiple:!0,onChange:d,value:c||[],className:`${f.menuButton} ${f.multiSelectHideDashboardElements}`,children:T.map(i=>o.jsx("option",{value:i,children:i},i))})})},ae=()=>{H();const c=O(),[l,d]=n.useState(""),[i,v]=n.useState(!0),[E,S]=n.useState(0),[u,M]=n.useState(!1),[y,W]=n.useState(!1),[s,L]=n.useState(()=>{const e=c.hash.slice(1);return e in t?t[e]:t.None}),[B,I]=n.useState(!1),[x,w]=n.useState(void 0),j=n.useRef(),g=n.useRef(),r=n.useRef(),m=k(e=>e.credentials),D=n.useCallback((e,{domain:a,token:C,hostId:Y},$)=>{console.log("Widget loading");const R=N=>{const b=new A({domain:a,sso:{token:C,hostId:Y},container:e},N);return b.on("room.READY",()=>{console.log("Entered meeting")}),b.on("room.UNLOAD",()=>{var h;console.log("Left meeting: re-creating widget..."),(h=r.current)==null||h.unload(),r.current=R(),r.current.on("dashboard.READY",()=>{I(_=>!_)})}),b.on("dashboard.SESSION_EXPIRED",()=>{console.error("Widget error:","Session expired"),d("Session expired")}),b.on("widget.ERROR",h=>{console.error("Widget error:",h),d(JSON.stringify(h))}),b};r.current=R($),r.current.toggle(!1),r.current.on("dashboard.READY",()=>{M(!0),g.current=new A({domain:a,container:e},t.Team),g.current.toggle(!1),g.current.on("dashboard.UNREAD_MESSAGES",N=>{const b=Object.values(N.rooms).reduce((h,_)=>h+_,0);S(b)}),g.current.on("dashboard.READY",()=>{W(!0)})})},[]);n.useEffect(()=>{if(m.token&&m.domain&&m.hostId&&j.current)return D(j.current,m,s),()=>{var a,C;(a=r.current)==null||a.unload(),(C=g.current)==null||C.unload(),console.log("Widget unloaded")}},[m,D]),n.useEffect(()=>{u&&g.current.on("dashboard.NAVIGATE",e=>{const a=e.pathname!=="/"?e.pathname:"an unspecified room";console.log(`The chat widget navigated to this room: ${a}`)})},[u]),n.useEffect(()=>{var e,a;if((e=r.current)==null||e.toggle(!1),(a=g.current)==null||a.toggle(!1),v(s===t.None),s===t.None){console.log("Load your app"),window.history.pushState(null,"","#");return}s===t.Team?(g.current.toggle(!0),console.log("Load the team chat widget")):s===t.Meet?(r.current.toggle(!0),r.current.load(s,{hiddenElements:[]}),console.log("Load the Meet widget")):(r.current.toggle(!0),r.current.load(s),console.log(`Load the ${s} widget`)),window.history.pushState(null,"",`#${t[s]}`)},[s,B]),n.useEffect(()=>{var e;(e=r.current)==null||e.setHiddenElements(x)},[x]);const V=[p.widgetContainer,s!==t.None&&p.bordered].filter(Boolean).join(" ");return o.jsxs("div",{className:p.appContainer,children:[o.jsxs("div",{className:p.verticalTabContainer,children:[Z.map(({svc:e,label:a})=>o.jsxs(ee,{setService:L,service:e,currentService:s,disabled:!(e===t.Team?y:u),children:[a,e===t.Team&&o.jsx("span",{className:p.badge,children:E})]},e)),o.jsx(U,{error:l,isLoading:!u})]}),i&&o.jsx("div",{children:"Your app goes here"}),o.jsx(G,{position:"right"}),o.jsx(z,{position:"right"}),o.jsxs("div",{className:f.extraMenu,children:[s===t.Meet&&o.jsx(te,{hideDashboardElements:x,setHideDashboardElements:w}),s===t.Meet&&o.jsx(oe,{hideDashboardElements:x,setHideDashboardElements:w}),r.current&&o.jsx(F,{...m})]}),o.jsx("div",{ref:j,className:V})]})};export{ae as default}; +import{u as H,b as O,r as n,a as k,j as o,L as U,T as G}from"./index-D5Rkh0u5.js";import{S as t,D as A,M as z,a as f}from"./MenuButton-tjvwGP7u.js";import{O as F}from"./OpenFullAppButton-RPXGZVs3.js";const J="_appContainer_b3ogb_2",P="_verticalTabContainer_b3ogb_9",X="_active_b3ogb_30",q="_widgetContainer_b3ogb_38",K="_bordered_b3ogb_44",Q="_badge_b3ogb_48",p={appContainer:J,verticalTabContainer:P,active:X,widgetContainer:q,bordered:K,badge:Q},Z=[{svc:t.None,label:"Your App"},{svc:t.Team,label:"Team Chat"},{svc:t.Drive,label:"Drive"},{svc:t.Contacts,label:"Contacts"},{svc:t.Meet,label:"Meetings"}],ee=({setService:c,service:l,currentService:d,disabled:i,children:v})=>o.jsx("button",{type:"button",onClick:i?void 0:()=>c(l),disabled:i,className:d===l?p.active:void 0,style:{position:"relative"},children:v}),T=[50,51,52,53],te=({hideDashboardElements:c,setHideDashboardElements:l})=>{const d=()=>{l(c?void 0:T)};return o.jsx("div",{children:o.jsx("button",{type:"button",className:`${f.menuButton} ${f.hideDashboardElementsButton}`,onClick:d,children:`${c?"Show":"Hide"} Dashboard Elements`})})},oe=({hideDashboardElements:c,setHideDashboardElements:l})=>{const d=i=>{var S;const E=Array.from((S=i.target)==null?void 0:S.options).filter(u=>u.selected).map(u=>Number(u.value));l(E.length>0?E:void 0)};return o.jsx("div",{children:o.jsx("select",{multiple:!0,onChange:d,value:c||[],className:`${f.menuButton} ${f.multiSelectHideDashboardElements}`,children:T.map(i=>o.jsx("option",{value:i,children:i},i))})})},ae=()=>{H();const c=O(),[l,d]=n.useState(""),[i,v]=n.useState(!0),[E,S]=n.useState(0),[u,M]=n.useState(!1),[y,W]=n.useState(!1),[s,L]=n.useState(()=>{const e=c.hash.slice(1);return e in t?t[e]:t.None}),[B,I]=n.useState(!1),[x,w]=n.useState(void 0),j=n.useRef(),g=n.useRef(),r=n.useRef(),m=k(e=>e.credentials),D=n.useCallback((e,{domain:a,token:C,hostId:Y},$)=>{console.log("Widget loading");const R=N=>{const b=new A({domain:a,sso:{token:C,hostId:Y},container:e},N);return b.on("room.READY",()=>{console.log("Entered meeting")}),b.on("room.UNLOAD",()=>{var h;console.log("Left meeting: re-creating widget..."),(h=r.current)==null||h.unload(),r.current=R(),r.current.on("dashboard.READY",()=>{I(_=>!_)})}),b.on("dashboard.SESSION_EXPIRED",()=>{console.error("Widget error:","Session expired"),d("Session expired")}),b.on("widget.ERROR",h=>{console.error("Widget error:",h),d(JSON.stringify(h))}),b};r.current=R($),r.current.toggle(!1),r.current.on("dashboard.READY",()=>{M(!0),g.current=new A({domain:a,container:e},t.Team),g.current.toggle(!1),g.current.on("dashboard.UNREAD_MESSAGES",N=>{const b=Object.values(N.rooms).reduce((h,_)=>h+_,0);S(b)}),g.current.on("dashboard.READY",()=>{W(!0)})})},[]);n.useEffect(()=>{if(m.token&&m.domain&&m.hostId&&j.current)return D(j.current,m,s),()=>{var a,C;(a=r.current)==null||a.unload(),(C=g.current)==null||C.unload(),console.log("Widget unloaded")}},[m,D]),n.useEffect(()=>{u&&g.current.on("dashboard.NAVIGATE",e=>{const a=e.pathname!=="/"?e.pathname:"an unspecified room";console.log(`The chat widget navigated to this room: ${a}`)})},[u]),n.useEffect(()=>{var e,a;if((e=r.current)==null||e.toggle(!1),(a=g.current)==null||a.toggle(!1),v(s===t.None),s===t.None){console.log("Load your app"),window.history.pushState(null,"","#");return}s===t.Team?(g.current.toggle(!0),console.log("Load the team chat widget")):s===t.Meet?(r.current.toggle(!0),r.current.load(s,{hiddenElements:[]}),console.log("Load the Meet widget")):(r.current.toggle(!0),r.current.load(s),console.log(`Load the ${s} widget`)),window.history.pushState(null,"",`#${t[s]}`)},[s,B]),n.useEffect(()=>{var e;(e=r.current)==null||e.setHiddenElements(x)},[x]);const V=[p.widgetContainer,s!==t.None&&p.bordered].filter(Boolean).join(" ");return o.jsxs("div",{className:p.appContainer,children:[o.jsxs("div",{className:p.verticalTabContainer,children:[Z.map(({svc:e,label:a})=>o.jsxs(ee,{setService:L,service:e,currentService:s,disabled:!(e===t.Team?y:u),children:[a,e===t.Team&&o.jsx("span",{className:p.badge,children:E})]},e)),o.jsx(U,{error:l,isLoading:!u})]}),i&&o.jsx("div",{children:"Your app goes here"}),o.jsx(G,{position:"right"}),o.jsx(z,{position:"right"}),o.jsxs("div",{className:f.extraMenu,children:[s===t.Meet&&o.jsx(te,{hideDashboardElements:x,setHideDashboardElements:w}),s===t.Meet&&o.jsx(oe,{hideDashboardElements:x,setHideDashboardElements:w}),r.current&&o.jsx(F,{...m})]}),o.jsx("div",{ref:j,className:V})]})};export{ae as default}; diff --git a/assets/ChatRoom-NDXqfRzi.js b/assets/ChatRoom-CRBw39cb.js similarity index 84% rename from assets/ChatRoom-NDXqfRzi.js rename to assets/ChatRoom-CRBw39cb.js index 1ad37a8e..57ac21b2 100644 --- a/assets/ChatRoom-NDXqfRzi.js +++ b/assets/ChatRoom-CRBw39cb.js @@ -1 +1 @@ -import{r as e,a as s,j as r}from"./index-BXCog4K2.js";import{D as m,S as i,L as _}from"./MenuButton-BiZLDXwy.js";const h="_container_f93x5_2",l="_roomListContainer_f93x5_7",R="_chatRoomItem_f93x5_14",f="_active_f93x5_30",u="_chatRoomsContainer_f93x5_36",x="_chatRoom_f93x5_14",d="_activeRoom_f93x5_52",C="_closeButton_f93x5_57",v={container:h,roomListContainer:l,chatRoomItem:R,active:f,chatRoomsContainer:u,chatRoom:x,activeRoom:d,closeButton:C},w=o=>{const a=e.useRef(null),n=s(t=>t.credentials);return e.useEffect(()=>{const t=n.domain||"iotum.callbridge.rocks",c=new m({domain:t,container:a.current},i.Team,{layout:_.main,pathname:o.path});return console.log("A new chat room was opened: "+o.path),()=>{c.unload(),console.log("Chat room was closed: "+o.path)}},[o.path,n]),r.jsx("div",{ref:a,className:v.chatRoom})};export{w as C,v as s}; +import{r as e,a as s,j as r}from"./index-D5Rkh0u5.js";import{D as m,S as i,L as _}from"./MenuButton-tjvwGP7u.js";const h="_container_f93x5_2",l="_roomListContainer_f93x5_7",R="_chatRoomItem_f93x5_14",f="_active_f93x5_30",u="_chatRoomsContainer_f93x5_36",x="_chatRoom_f93x5_14",d="_activeRoom_f93x5_52",C="_closeButton_f93x5_57",v={container:h,roomListContainer:l,chatRoomItem:R,active:f,chatRoomsContainer:u,chatRoom:x,activeRoom:d,closeButton:C},w=o=>{const a=e.useRef(null),n=s(t=>t.credentials);return e.useEffect(()=>{const t=n.domain||"iotum.callbridge.rocks",c=new m({domain:t,container:a.current},i.Team,{layout:_.main,pathname:o.path});return console.log("A new chat room was opened: "+o.path),()=>{c.unload(),console.log("Chat room was closed: "+o.path)}},[o.path,n]),r.jsx("div",{ref:a,className:v.chatRoom})};export{w as C,v as s}; diff --git a/assets/MenuButton-BiZLDXwy.js b/assets/MenuButton-tjvwGP7u.js similarity index 99% rename from assets/MenuButton-BiZLDXwy.js rename to assets/MenuButton-tjvwGP7u.js index 4edce683..ca592e9a 100644 --- a/assets/MenuButton-BiZLDXwy.js +++ b/assets/MenuButton-tjvwGP7u.js @@ -1 +1 @@ -import{c as I,j as y}from"./index-BXCog4K2.js";var w={exports:{}},l=typeof Reflect=="object"?Reflect:null,b=l&&typeof l.apply=="function"?l.apply:function(t,n,s){return Function.prototype.apply.call(t,n,s)},_;l&&typeof l.ownKeys=="function"?_=l.ownKeys:Object.getOwnPropertySymbols?_=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:_=function(t){return Object.getOwnPropertyNames(t)};function U(e){console&&console.warn&&console.warn(e)}var E=Number.isNaN||function(t){return t!==t};function c(){c.init.call(this)}w.exports=c;w.exports.once=W;c.EventEmitter=c;c.prototype._events=void 0;c.prototype._eventsCount=0;c.prototype._maxListeners=void 0;var L=10;function p(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(e){if(typeof e!="number"||e<0||E(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");L=e}});c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};c.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||E(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function x(e){return e._maxListeners===void 0?c.defaultMaxListeners:e._maxListeners}c.prototype.getMaxListeners=function(){return x(this)};c.prototype.emit=function(t){for(var n=[],s=1;s0&&(r=n[0]),r instanceof Error)throw r;var u=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw u.context=r,u}var a=o[t];if(a===void 0)return!1;if(typeof a=="function")b(a,this,n);else for(var f=a.length,h=j(a,f),s=0;s0&&r.length>i&&!r.warned){r.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=r.length,U(u)}return e}c.prototype.addListener=function(t,n){return O(this,t,n,!1)};c.prototype.on=c.prototype.addListener;c.prototype.prependListener=function(t,n){return O(this,t,n,!0)};function $(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=$.bind(s);return i.listener=n,s.wrapFn=i,i}c.prototype.once=function(t,n){return p(n),this.on(t,C(this,t,n)),this};c.prototype.prependOnceListener=function(t,n){return p(n),this.prependListener(t,C(this,t,n)),this};c.prototype.removeListener=function(t,n){var s,i,o,r,u;if(p(n),i=this._events,i===void 0)return this;if(s=i[t],s===void 0)return this;if(s===n||s.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,s.listener||n));else if(typeof s!="function"){for(o=-1,r=s.length-1;r>=0;r--)if(s[r]===n||s[r].listener===n){u=s[r].listener,o=r;break}if(o<0)return this;o===0?s.shift():H(s,o),s.length===1&&(i[t]=s[0]),i.removeListener!==void 0&&this.emit("removeListener",t,u||n)}return this};c.prototype.off=c.prototype.removeListener;c.prototype.removeAllListeners=function(t){var n,s,i;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[t]),this;if(arguments.length===0){var o=Object.keys(s),r;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function M(e,t,n){var s=e._events;if(s===void 0)return[];var i=s[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?V(i):j(i,i.length)}c.prototype.listeners=function(t){return M(this,t,!0)};c.prototype.rawListeners=function(t){return M(this,t,!1)};c.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):R.call(e,t)};c.prototype.listenerCount=R;function R(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?_(this._events):[]};function j(e,t){for(var n=new Array(t),s=0;s{if(!(!this._container||this._instance)){if(typeof u.redirect_url=="string"){const a=new URL(u.redirect_url,this._url);v(a,{...u,redirect_url:null}),this._url.pathname==="/auth"?v(this._url,{redirect_url:`${a.pathname}${a.search}${a.hash}`}):this._url=a}else v(this._url,u);if(this._checkExisting&&(await new Promise(a=>{if(this.once("widget.LOAD",a),setTimeout(a,1500),"BroadcastChannel"in self){const f=new BroadcastChannel("widget-channel");f.postMessage(m),f.close()}}),this._instance)){this._send("widget",G);return}if(this._container){this._instance=q(this._container,this._url.href,{target:this._target,features:this._features,attached:this._attached});try{this._instance.onerror=a=>{this._error=a,this.emit("widget.ERROR",a instanceof Error?a.message:a)}}catch{this.emit("widget.ERROR","Unable to open")}}}},this._beforeUnload=u=>{this.wnd&&!this.wnd.closed&&this._send("widget",m,{name:this._target})},this._processEvent=({data:u,source:a})=>{if(!this._instance&&u){const{type:f,event:h,name:d}=u;if(f==="widget"&&h===m&&d===this._target){this._instance=a,this._ready=!0,this.emit("widget.LOAD");return}}if(a===this.wnd){const{type:f,event:h,...d}=u;if(f&&h){switch(h){case"READY":this._ready=!0,this.emit("widget.LOAD");break;case"UNLOAD":this.unload(),this.emit("widget.UNLOAD");break;case m:return}this.emit(`${f}.${h}`,d)}}},this._send=(u,a,f={})=>{var h;(h=this.wnd)==null||h.postMessage({type:u,action:a,...f},"*")},e&&(typeof e=="string"?this._container=document.querySelector(e):(this._container=e,e instanceof HTMLElement&&(this._attached=document.body.contains(e)))),!this._container)throw new Error("Unable to locate the container element");if(this._url=new URL(`https://${t}`),n){const{hostId:u,token:a}=n;if(!u||!a)throw new Error("Missing SSO parameters");this._url.pathname="/auth",this._url.searchParams.set("host_id",String(u)),this._url.searchParams.set("login_token_public_key",a)}window.addEventListener("message",this._processEvent),this._container===window&&window.addEventListener("beforeunload",this._beforeUnload),this._target=s,this._features=i,this._checkExisting=!!(s&&o),r&&this._load({redirect_url:"/page_to_see"})}unload(){var e;this._container=null,window.removeEventListener("message",this._processEvent),window.removeEventListener("beforeunload",this._beforeUnload),this._instance&&(this._instance instanceof Element?(!this._attached&&this._instance.style.display==="none"&&((e=this._instance.parentElement)==null||e.remove()),this._instance.remove()):this._instance.close(),this._instance=null),this._ready=!1}toggle(e){this._instance instanceof HTMLElement&&Object.assign(this._instance.style,P(e))}get isReady(){return this._ready}get instance(){return this._instance}get wnd(){return this._instance?this._instance instanceof Element?this._instance.contentWindow:this._instance:null}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}once(e,t){return this.emitter.once(e,t),this}emit(e,t){return this.emitter.emit(e,t)}removeAllListeners(e){return this.emitter.removeAllListeners(e),this}},J=(e=>(e.None="",e.Team="Team",e.Drive="Drive",e.Contacts="Contacts",e.Meet="Meet",e))(J||{}),z=(e=>(e.full="full",e.list="list",e.main="main",e.none="none",e))(z||{}),re=class extends N{constructor(e,t="",n={}){switch(super(e),t){case"Team":case"Drive":case"Contacts":case"Meet":this.once("dashboard.READY",()=>this.load(t,n));break}this._load({redirect_url:"/conf/loading"})}load(e,t={}){this._send("dashboard","load",{service:e,...t})}go(e){this._send("dashboard","go",{delta:e})}setHiddenElements(e){this._send("dashboard","setHiddenElements",{ids:e})}},Q=class extends N{constructor(e){super(e),this.setVideoInput=t=>{this._send("device","setVideoInput",{deviceId:t})},this.setAudioInput=t=>{this._send("device","setAudioInput",{deviceId:t})},this.setAudioOutput=t=>{this._send("device","setAudioOutput",{deviceId:t})},this.setCamera=t=>{this._send("conference",t===!0?"startCamera":"stopCamera")},this.setMute=t=>{this._send("conference",t===!0?"mute":"unmute")},this.setIncomingVideo=t=>{this._send("conference",t===!0?"enableIncomingVideo":"disableIncomingVideo")},this.setVolume=t=>{if(typeof t=="number"){if(t<0||t>1)throw new RangeError("volume")}else throw new TypeError;this._send("conference","setVolume",{volumn:t})},this.muteParticipant=t=>{t>0&&this._send("participant","mute",{id:t})},this.adjustParticipantAudio=(t,n)=>{const{volume:s,pan:i}=n;if(typeof s!="number"&&typeof i!="number")throw new TypeError;if(typeof s=="number"&&(s<0||s>1))throw new RangeError("volume");if(typeof i=="number"&&(i<-1||i>1))throw new RangeError("pan");t>0&&this._send("participant","adjustAudio",{id:t,volume:s,pan:i})}}},oe=class extends Q{constructor(e,t,n={}){super(e);const{target:{autoClose:s}={}}=e,{name:i,skipJoin:o,mute:{mic:r,camera:u}={},observer:a,moderatorToken:f,resolution:h,view:d,tiles:k,audioLevel:D,stripLayout:T,autoView:B,afterCallUrl:S}=n;this._load({redirect_url:`/conf/call/${t}`,name:i,skip_join:o,observer:a,moderator_token:f,res:h,view:d,tiles:k,audio_level:D,strip_layout:T,auto_view:B,after_call_url:S,auto_close:s,mute:[r&&"mic",u&&"camera"].filter(Boolean).join(",")||void 0})}};const X="_menuButton_4pe5b_1",Z="_hideDashboardElementsButton_4pe5b_31",ee="_multiSelectHideDashboardElements_4pe5b_39",te="_left_4pe5b_75",ne="_right_4pe5b_83",se="_extraMenu_4pe5b_91",g={menuButton:X,hideDashboardElementsButton:Z,multiSelectHideDashboardElements:ee,left:te,right:ne,extraMenu:se};function ae({position:e="left"}){const t=I(),n=()=>{console.log("Menu Button Clicked, Go To the Menu Page."),t("/iotum-samples/menu")},s=e==="right"?g.right:g.left;return y.jsx("div",{children:y.jsx("button",{className:`${g.menuButton} ${s}`,onClick:n,children:"Menu Page"})})}export{re as D,z as L,ae as M,J as S,g as a,oe as b}; +import{c as I,j as y}from"./index-D5Rkh0u5.js";var w={exports:{}},l=typeof Reflect=="object"?Reflect:null,b=l&&typeof l.apply=="function"?l.apply:function(t,n,s){return Function.prototype.apply.call(t,n,s)},_;l&&typeof l.ownKeys=="function"?_=l.ownKeys:Object.getOwnPropertySymbols?_=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:_=function(t){return Object.getOwnPropertyNames(t)};function U(e){console&&console.warn&&console.warn(e)}var E=Number.isNaN||function(t){return t!==t};function c(){c.init.call(this)}w.exports=c;w.exports.once=W;c.EventEmitter=c;c.prototype._events=void 0;c.prototype._eventsCount=0;c.prototype._maxListeners=void 0;var L=10;function p(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(e){if(typeof e!="number"||e<0||E(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");L=e}});c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};c.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||E(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function x(e){return e._maxListeners===void 0?c.defaultMaxListeners:e._maxListeners}c.prototype.getMaxListeners=function(){return x(this)};c.prototype.emit=function(t){for(var n=[],s=1;s0&&(r=n[0]),r instanceof Error)throw r;var u=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw u.context=r,u}var a=o[t];if(a===void 0)return!1;if(typeof a=="function")b(a,this,n);else for(var f=a.length,h=j(a,f),s=0;s0&&r.length>i&&!r.warned){r.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=r.length,U(u)}return e}c.prototype.addListener=function(t,n){return O(this,t,n,!1)};c.prototype.on=c.prototype.addListener;c.prototype.prependListener=function(t,n){return O(this,t,n,!0)};function $(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=$.bind(s);return i.listener=n,s.wrapFn=i,i}c.prototype.once=function(t,n){return p(n),this.on(t,C(this,t,n)),this};c.prototype.prependOnceListener=function(t,n){return p(n),this.prependListener(t,C(this,t,n)),this};c.prototype.removeListener=function(t,n){var s,i,o,r,u;if(p(n),i=this._events,i===void 0)return this;if(s=i[t],s===void 0)return this;if(s===n||s.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,s.listener||n));else if(typeof s!="function"){for(o=-1,r=s.length-1;r>=0;r--)if(s[r]===n||s[r].listener===n){u=s[r].listener,o=r;break}if(o<0)return this;o===0?s.shift():H(s,o),s.length===1&&(i[t]=s[0]),i.removeListener!==void 0&&this.emit("removeListener",t,u||n)}return this};c.prototype.off=c.prototype.removeListener;c.prototype.removeAllListeners=function(t){var n,s,i;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[t]),this;if(arguments.length===0){var o=Object.keys(s),r;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function M(e,t,n){var s=e._events;if(s===void 0)return[];var i=s[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?V(i):j(i,i.length)}c.prototype.listeners=function(t){return M(this,t,!0)};c.prototype.rawListeners=function(t){return M(this,t,!1)};c.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):R.call(e,t)};c.prototype.listenerCount=R;function R(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?_(this._events):[]};function j(e,t){for(var n=new Array(t),s=0;s{if(!(!this._container||this._instance)){if(typeof u.redirect_url=="string"){const a=new URL(u.redirect_url,this._url);v(a,{...u,redirect_url:null}),this._url.pathname==="/auth"?v(this._url,{redirect_url:`${a.pathname}${a.search}${a.hash}`}):this._url=a}else v(this._url,u);if(this._checkExisting&&(await new Promise(a=>{if(this.once("widget.LOAD",a),setTimeout(a,1500),"BroadcastChannel"in self){const f=new BroadcastChannel("widget-channel");f.postMessage(m),f.close()}}),this._instance)){this._send("widget",G);return}if(this._container){this._instance=q(this._container,this._url.href,{target:this._target,features:this._features,attached:this._attached});try{this._instance.onerror=a=>{this._error=a,this.emit("widget.ERROR",a instanceof Error?a.message:a)}}catch{this.emit("widget.ERROR","Unable to open")}}}},this._beforeUnload=u=>{this.wnd&&!this.wnd.closed&&this._send("widget",m,{name:this._target})},this._processEvent=({data:u,source:a})=>{if(!this._instance&&u){const{type:f,event:h,name:d}=u;if(f==="widget"&&h===m&&d===this._target){this._instance=a,this._ready=!0,this.emit("widget.LOAD");return}}if(a===this.wnd){const{type:f,event:h,...d}=u;if(f&&h){switch(h){case"READY":this._ready=!0,this.emit("widget.LOAD");break;case"UNLOAD":this.unload(),this.emit("widget.UNLOAD");break;case m:return}this.emit(`${f}.${h}`,d)}}},this._send=(u,a,f={})=>{var h;(h=this.wnd)==null||h.postMessage({type:u,action:a,...f},"*")},e&&(typeof e=="string"?this._container=document.querySelector(e):(this._container=e,e instanceof HTMLElement&&(this._attached=document.body.contains(e)))),!this._container)throw new Error("Unable to locate the container element");if(this._url=new URL(`https://${t}`),n){const{hostId:u,token:a}=n;if(!u||!a)throw new Error("Missing SSO parameters");this._url.pathname="/auth",this._url.searchParams.set("host_id",String(u)),this._url.searchParams.set("login_token_public_key",a)}window.addEventListener("message",this._processEvent),this._container===window&&window.addEventListener("beforeunload",this._beforeUnload),this._target=s,this._features=i,this._checkExisting=!!(s&&o),r&&this._load({redirect_url:"/page_to_see"})}unload(){var e;this._container=null,window.removeEventListener("message",this._processEvent),window.removeEventListener("beforeunload",this._beforeUnload),this._instance&&(this._instance instanceof Element?(!this._attached&&this._instance.style.display==="none"&&((e=this._instance.parentElement)==null||e.remove()),this._instance.remove()):this._instance.close(),this._instance=null),this._ready=!1}toggle(e){this._instance instanceof HTMLElement&&Object.assign(this._instance.style,P(e))}get isReady(){return this._ready}get instance(){return this._instance}get wnd(){return this._instance?this._instance instanceof Element?this._instance.contentWindow:this._instance:null}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}once(e,t){return this.emitter.once(e,t),this}emit(e,t){return this.emitter.emit(e,t)}removeAllListeners(e){return this.emitter.removeAllListeners(e),this}},J=(e=>(e.None="",e.Team="Team",e.Drive="Drive",e.Contacts="Contacts",e.Meet="Meet",e))(J||{}),z=(e=>(e.full="full",e.list="list",e.main="main",e.none="none",e))(z||{}),re=class extends N{constructor(e,t="",n={}){switch(super(e),t){case"Team":case"Drive":case"Contacts":case"Meet":this.once("dashboard.READY",()=>this.load(t,n));break}this._load({redirect_url:"/conf/loading"})}load(e,t={}){this._send("dashboard","load",{service:e,...t})}go(e){this._send("dashboard","go",{delta:e})}setHiddenElements(e){this._send("dashboard","setHiddenElements",{ids:e})}},Q=class extends N{constructor(e){super(e),this.setVideoInput=t=>{this._send("device","setVideoInput",{deviceId:t})},this.setAudioInput=t=>{this._send("device","setAudioInput",{deviceId:t})},this.setAudioOutput=t=>{this._send("device","setAudioOutput",{deviceId:t})},this.setCamera=t=>{this._send("conference",t===!0?"startCamera":"stopCamera")},this.setMute=t=>{this._send("conference",t===!0?"mute":"unmute")},this.setIncomingVideo=t=>{this._send("conference",t===!0?"enableIncomingVideo":"disableIncomingVideo")},this.setVolume=t=>{if(typeof t=="number"){if(t<0||t>1)throw new RangeError("volume")}else throw new TypeError;this._send("conference","setVolume",{volumn:t})},this.muteParticipant=t=>{t>0&&this._send("participant","mute",{id:t})},this.adjustParticipantAudio=(t,n)=>{const{volume:s,pan:i}=n;if(typeof s!="number"&&typeof i!="number")throw new TypeError;if(typeof s=="number"&&(s<0||s>1))throw new RangeError("volume");if(typeof i=="number"&&(i<-1||i>1))throw new RangeError("pan");t>0&&this._send("participant","adjustAudio",{id:t,volume:s,pan:i})}}},oe=class extends Q{constructor(e,t,n={}){super(e);const{target:{autoClose:s}={}}=e,{name:i,skipJoin:o,mute:{mic:r,camera:u}={},observer:a,moderatorToken:f,resolution:h,view:d,tiles:k,audioLevel:D,stripLayout:T,autoView:B,afterCallUrl:S}=n;this._load({redirect_url:`/conf/call/${t}`,name:i,skip_join:o,observer:a,moderator_token:f,res:h,view:d,tiles:k,audio_level:D,strip_layout:T,auto_view:B,after_call_url:S,auto_close:s,mute:[r&&"mic",u&&"camera"].filter(Boolean).join(",")||void 0})}};const X="_menuButton_4pe5b_1",Z="_hideDashboardElementsButton_4pe5b_31",ee="_multiSelectHideDashboardElements_4pe5b_39",te="_left_4pe5b_75",ne="_right_4pe5b_83",se="_extraMenu_4pe5b_91",g={menuButton:X,hideDashboardElementsButton:Z,multiSelectHideDashboardElements:ee,left:te,right:ne,extraMenu:se};function ae({position:e="left"}){const t=I(),n=()=>{console.log("Menu Button Clicked, Go To the Menu Page."),t("/iotum-samples/menu")},s=e==="right"?g.right:g.left;return y.jsx("div",{children:y.jsx("button",{className:`${g.menuButton} ${s}`,onClick:n,children:"Menu Page"})})}export{re as D,z as L,ae as M,J as S,g as a,oe as b}; diff --git a/assets/OpenFullAppButton-Cc354g7T.js b/assets/OpenFullAppButton-RPXGZVs3.js similarity index 76% rename from assets/OpenFullAppButton-Cc354g7T.js rename to assets/OpenFullAppButton-RPXGZVs3.js index 9c34ea7c..7da4ca94 100644 --- a/assets/OpenFullAppButton-Cc354g7T.js +++ b/assets/OpenFullAppButton-RPXGZVs3.js @@ -1 +1 @@ -import{j as a}from"./index-BXCog4K2.js";import{a as o}from"./MenuButton-BiZLDXwy.js";const l=({domain:n,token:r,hostId:t})=>{if(!n||!r||!t)return null;const e=new URL("/auth",`https://${n}`);return e.searchParams.append("host_id",String(t)),e.searchParams.append("login_token_public_key",r),e.searchParams.append("redirect_url",encodeURI("/conf/conferences/create?events=false")),a.jsx("div",{children:a.jsx("button",{type:"button",className:o.menuButton,onClick:()=>window.open(e.href,"portal","noreferrer"),children:"open full app"})})};export{l as O}; +import{j as a}from"./index-D5Rkh0u5.js";import{a as o}from"./MenuButton-tjvwGP7u.js";const l=({domain:n,token:r,hostId:t})=>{if(!n||!r||!t)return null;const e=new URL("/auth",`https://${n}`);return e.searchParams.append("host_id",String(t)),e.searchParams.append("login_token_public_key",r),e.searchParams.append("redirect_url",encodeURI("/conf/conferences/create?events=false")),a.jsx("div",{children:a.jsx("button",{type:"button",className:o.menuButton,onClick:()=>window.open(e.href,"portal","noreferrer"),children:"open full app"})})};export{l as O}; diff --git a/assets/index-BXCog4K2.js b/assets/index-D5Rkh0u5.js similarity index 91% rename from assets/index-BXCog4K2.js rename to assets/index-D5Rkh0u5.js index 07839e0e..ce3fbdd1 100644 --- a/assets/index-BXCog4K2.js +++ b/assets/index-D5Rkh0u5.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-Bdhf7wuO.js","assets/ChatRoom-NDXqfRzi.js","assets/MenuButton-BiZLDXwy.js","assets/MenuButton-Cf2IfmCg.css","assets/ChatRoom-C4CWQr1W.css","assets/App-RqDZe5Xw.css","assets/App-CDEdi8wh.js","assets/OpenFullAppButton-Cc354g7T.js","assets/App-CSPR4YtY.js","assets/App-lAwp7ioJ.css","assets/App-a1oQg7iB.js","assets/App-DvAD42v_.css","assets/App-DmoFs5Uu.js","assets/App-BEz0-8_O.css","assets/App-AqUT5z3W.js","assets/App-CFFHoJhH.css"])))=>i.map(i=>d[i]); -function rf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();const yh="modulepreload",gh=function(e){return"/iotum-samples/"+e},Es={},Vn=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),i=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));l=Promise.all(n.map(u=>{if(u=gh(u),u in Es)return;Es[u]=!0;const a=u.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${s}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":yh,a||(d.as="script"),d.crossOrigin="",d.href=u,i&&d.setAttribute("nonce",i),document.head.appendChild(d),a)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}return l.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})};function lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var of={exports:{}},Uo={},uf={exports:{}},Y={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-DOjDo7jI.js","assets/ChatRoom-CRBw39cb.js","assets/MenuButton-tjvwGP7u.js","assets/MenuButton-Cf2IfmCg.css","assets/ChatRoom-C4CWQr1W.css","assets/App-RqDZe5Xw.css","assets/App-DR-I4vLc.js","assets/OpenFullAppButton-RPXGZVs3.js","assets/App-CsJWJ5It.js","assets/App-lAwp7ioJ.css","assets/App-BdG_zeVJ.js","assets/App-DvAD42v_.css","assets/App-ZsxsuayU.js","assets/App-BEz0-8_O.css","assets/App-C30Ofn4h.js","assets/App-CFFHoJhH.css"])))=>i.map(i=>d[i]); +function rf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();const yh="modulepreload",gh=function(e){return"/iotum-samples/"+e},Es={},Vn=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),u=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.allSettled(n.map(a=>{if(a=gh(a),a in Es)return;Es[a]=!0;const s=a.endsWith(".css"),d=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":yh,s||(c.as="script"),c.crossOrigin="",c.href=a,u&&c.setAttribute("nonce",u),document.head.appendChild(c),s)return new Promise((m,w)=>{c.addEventListener("load",m),c.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return l.then(i=>{for(const u of i||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};function lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var of={exports:{}},Uo={},uf={exports:{}},Y={};/** * @license React * react.production.min.js * @@ -23,7 +23,7 @@ function rf(e,t){for(var n=0;n>>1,ie=D[le];if(0>>1;lel(Nt,W))Nel(it,Nt)?(D[le]=it,D[Ne]=W,le=Ne):(D[le]=Nt,D[Qe]=W,le=Qe);else if(Nel(it,W))D[le]=it,D[Ne]=W,le=Ne;else break e}}return F}function l(D,F){var W=D.sortIndex-F.sortIndex;return W!==0?W:D.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var a=[],s=[],d=1,f=null,m=3,w=!1,x=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(D){for(var F=n(s);F!==null;){if(F.callback===null)r(s);else if(F.startTime<=D)r(s),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(s)}}function k(D){if(S=!1,g(D),!x)if(n(a)!==null)x=!0,mt(T);else{var F=n(s);F!==null&&Qt(k,F.startTime-D)}}function T(D,F){x=!1,S&&(S=!1,h(v),v=-1),w=!0;var W=m;try{for(g(F),f=n(a);f!==null&&(!(f.expirationTime>F)||D&&!Q());){var le=f.callback;if(typeof le=="function"){f.callback=null,m=f.priorityLevel;var ie=le(f.expirationTime<=F);F=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(a)&&r(a),g(F)}else r(a);f=n(a)}if(f!==null)var We=!0;else{var Qe=n(s);Qe!==null&&Qt(k,Qe.startTime-F),We=!1}return We}finally{f=null,m=W,w=!1}}var N=!1,j=null,v=-1,B=5,O=-1;function Q(){return!(e.unstable_now()-OD||125le?(D.sortIndex=W,t(s,D),n(a)===null&&D===n(s)&&(S?(h(v),v=-1):S=!0,Qt(k,W-le))):(D.sortIndex=ie,t(a,D),x||w||(x=!0,mt(T))),D},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(D){var F=m;return function(){var W=m;m=F;try{return D.apply(this,arguments)}finally{m=W}}}})(Sf);wf.exports=Sf;var Bh=wf.exports;/** + */(function(e){function t(D,F){var W=D.length;D.push(F);e:for(;0>>1,ie=D[le];if(0>>1;lel(Nt,W))Nel(it,Nt)?(D[le]=it,D[Ne]=W,le=Ne):(D[le]=Nt,D[Qe]=W,le=Qe);else if(Nel(it,W))D[le]=it,D[Ne]=W,le=Ne;else break e}}return F}function l(D,F){var W=D.sortIndex-F.sortIndex;return W!==0?W:D.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var a=[],s=[],d=1,c=null,m=3,w=!1,x=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(D){for(var F=n(s);F!==null;){if(F.callback===null)r(s);else if(F.startTime<=D)r(s),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(s)}}function k(D){if(S=!1,g(D),!x)if(n(a)!==null)x=!0,mt(T);else{var F=n(s);F!==null&&Qt(k,F.startTime-D)}}function T(D,F){x=!1,S&&(S=!1,h(v),v=-1),w=!0;var W=m;try{for(g(F),c=n(a);c!==null&&(!(c.expirationTime>F)||D&&!Q());){var le=c.callback;if(typeof le=="function"){c.callback=null,m=c.priorityLevel;var ie=le(c.expirationTime<=F);F=e.unstable_now(),typeof ie=="function"?c.callback=ie:c===n(a)&&r(a),g(F)}else r(a);c=n(a)}if(c!==null)var We=!0;else{var Qe=n(s);Qe!==null&&Qt(k,Qe.startTime-F),We=!1}return We}finally{c=null,m=W,w=!1}}var N=!1,j=null,v=-1,B=5,O=-1;function Q(){return!(e.unstable_now()-OD||125le?(D.sortIndex=W,t(s,D),n(a)===null&&D===n(s)&&(S?(h(v),v=-1):S=!0,Qt(k,W-le))):(D.sortIndex=ie,t(a,D),x||w||(x=!0,mt(T))),D},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(D){var F=m;return function(){var W=m;m=F;try{return D.apply(this,arguments)}finally{m=W}}}})(Sf);wf.exports=Sf;var Bh=wf.exports;/** * @license React * react-dom.production.min.js * @@ -35,10 +35,10 @@ function rf(e,t){for(var n=0;nu||l[i]!==o[u]){var a=` -`+l[i].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=u);break}}}finally{zi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function Yh(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ji(e.type,!1),e;case 11:return e=ji(e.type.render,!1),e;case 1:return e=ji(e.type,!0),e;default:return""}}function hu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yn:return"Fragment";case Kn:return"Portal";case fu:return"Profiler";case fa:return"StrictMode";case du:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kf:return(e.displayName||"Context")+".Consumer";case xf:return(e._context.displayName||"Context")+".Provider";case da:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pa:return t=e.displayName||null,t!==null?t:hu(e.type)||"Memo";case Zt:t=e._payload,e=e._init;try{return hu(e(t))}catch{}}return null}function Xh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hu(t);case 8:return t===fa?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _f(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gh(e){var t=_f(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ol(e){e._valueTracker||(e._valueTracker=Gh(e))}function Pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_f(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mu(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ts(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Rf(e,t){t=t.checked,t!=null&&ca(e,"checked",t,!1)}function vu(e,t){Rf(e,t);var n=hn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yu(e,t.type,n):t.hasOwnProperty("defaultValue")&&yu(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ls(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yu(e,t,n){(t!=="number"||co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $r=Array.isArray;function or(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Il.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jh=["Webkit","ms","Moz","O"];Object.keys(Vr).forEach(function(e){Jh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vr[t]=Vr[e]})});function Df(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vr.hasOwnProperty(e)&&Vr[e]?(""+t).trim():t+"px"}function Mf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Df(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Zh=he({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Su(e,t){if(t){if(Zh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Eu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function ha(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ku=null,ir=null,ur=null;function Ms(e){if(e=wl(e)){if(typeof ku!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Wo(t),ku(e.stateNode,e.type,t))}}function zf(e){ir?ur?ur.push(e):ur=[e]:ir=e}function jf(){if(ir){var e=ir,t=ur;if(ur=ir=null,Ms(e),t)for(e=0;e>>=0,e===0?32:31-(am(e)/sm|0)|0}var Fl=64,$l=4194304;function Ur(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Ur(u):(o&=i,o!==0&&(r=Ur(o)))}else i=n&~l,i!==0?r=Ur(i):o!==0&&(r=Ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function pm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Wr),Bs=" ",Vs=!1;function ed(e,t){switch(e){case"keyup":return Bm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function td(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function Hm(e,t){switch(e){case"compositionend":return td(t);case"keypress":return t.which!==32?null:(Vs=!0,Bs);case"textInput":return e=t.data,e===Bs&&Vs?null:e;default:return null}}function Wm(e,t){if(Xn)return e==="compositionend"||!xa&&ed(e,t)?(e=qf(),eo=wa=tn=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ks(n)}}function od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function id(){for(var e=window,t=co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=co(e.document)}return t}function ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bm(e){var t=id(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&od(n.ownerDocument.documentElement,n)){if(r!==null&&ka(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ys(n,o);var i=Ys(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gn=null,Lu=null,Kr=null,Nu=!1;function Xs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nu||Gn==null||Gn!==co(r)||(r=Gn,"selectionStart"in r&&ka(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&ll(Kr,r)||(Kr=r,r=go(Lu,"onSelect"),0qn||(e.current=Iu[qn],Iu[qn]=null,qn--)}function oe(e,t){qn++,Iu[qn]=e.current,e.current=t}var mn={},Fe=gn(mn),Xe=gn(!1),zn=mn;function dr(e,t){var n=e.type.contextTypes;if(!n)return mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ge(e){return e=e.childContextTypes,e!=null}function So(){se(Xe),se(Fe)}function tc(e,t,n){if(Fe.current!==mn)throw Error(P(168));oe(Fe,t),oe(Xe,n)}function md(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(P(108,Xh(e)||"Unknown",l));return he({},n,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,zn=Fe.current,oe(Fe,e),oe(Xe,Xe.current),!0}function nc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=md(e,t,zn),r.__reactInternalMemoizedMergedChildContext=e,se(Xe),se(Fe),oe(Fe,e)):se(Xe),oe(Xe,n)}var It=null,Qo=!1,Xi=!1;function vd(e){It===null?It=[e]:It.push(e)}function fv(e){Qo=!0,vd(e)}function wn(){if(!Xi&&It!==null){Xi=!0;var e=0,t=b;try{var n=It;for(b=1;e>=i,l-=i,Ft=1<<32-Et(t)+l|n<v?(B=j,j=null):B=j.sibling;var O=m(h,j,g[v],k);if(O===null){j===null&&(j=B);break}e&&j&&O.alternate===null&&t(h,j),c=o(O,c,v),N===null?T=O:N.sibling=O,N=O,j=B}if(v===g.length)return n(h,j),ce&&Cn(h,v),T;if(j===null){for(;vv?(B=j,j=null):B=j.sibling;var Q=m(h,j,O.value,k);if(Q===null){j===null&&(j=B);break}e&&j&&Q.alternate===null&&t(h,j),c=o(Q,c,v),N===null?T=Q:N.sibling=Q,N=Q,j=B}if(O.done)return n(h,j),ce&&Cn(h,v),T;if(j===null){for(;!O.done;v++,O=g.next())O=f(h,O.value,k),O!==null&&(c=o(O,c,v),N===null?T=O:N.sibling=O,N=O);return ce&&Cn(h,v),T}for(j=r(h,j);!O.done;v++,O=g.next())O=w(j,h,v,O.value,k),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?v:O.key),c=o(O,c,v),N===null?T=O:N.sibling=O,N=O);return e&&j.forEach(function(re){return t(h,re)}),ce&&Cn(h,v),T}function R(h,c,g,k){if(typeof g=="object"&&g!==null&&g.type===Yn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case jl:e:{for(var T=g.key,N=c;N!==null;){if(N.key===T){if(T=g.type,T===Yn){if(N.tag===7){n(h,N.sibling),c=l(N,g.props.children),c.return=h,h=c;break e}}else if(N.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Zt&&oc(T)===N.type){n(h,N.sibling),c=l(N,g.props),c.ref=Dr(h,N,g),c.return=h,h=c;break e}n(h,N);break}else t(h,N);N=N.sibling}g.type===Yn?(c=Mn(g.props.children,h.mode,k,g.key),c.return=h,h=c):(k=ao(g.type,g.key,g.props,null,h.mode,k),k.ref=Dr(h,c,g),k.return=h,h=k)}return i(h);case Kn:e:{for(N=g.key;c!==null;){if(c.key===N)if(c.tag===4&&c.stateNode.containerInfo===g.containerInfo&&c.stateNode.implementation===g.implementation){n(h,c.sibling),c=l(c,g.children||[]),c.return=h,h=c;break e}else{n(h,c);break}else t(h,c);c=c.sibling}c=nu(g,h.mode,k),c.return=h,h=c}return i(h);case Zt:return N=g._init,R(h,c,N(g._payload),k)}if($r(g))return x(h,c,g,k);if(Pr(g))return S(h,c,g,k);Ql(h,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,c!==null&&c.tag===6?(n(h,c.sibling),c=l(c,g),c.return=h,h=c):(n(h,c),c=tu(g,h.mode,k),c.return=h,h=c),i(h)):n(h,c)}return R}var hr=Sd(!0),Ed=Sd(!1),Co=gn(null),_o=null,tr=null,Ra=null;function Ta(){Ra=tr=_o=null}function La(e){var t=Co.current;se(Co),e._currentValue=t}function Uu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function sr(e,t){_o=e,Ra=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function dt(e){var t=e._currentValue;if(Ra!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(_o===null)throw Error(P(308));tr=e,_o.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Tn=null;function Na(e){Tn===null?Tn=[e]:Tn.push(e)}function xd(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Na(t)):(n.next=l.next,l.next=n),t.interleaved=n,Vt(e,r)}function Vt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qt=!1;function Da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Vt(e,n)}return l=r.interleaved,l===null?(t.next=t,Na(r)):(t.next=l.next,l.next=t),r.interleaved=t,Vt(e,n)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,va(e,n)}}function ic(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Po(e,t,n,r){var l=e.updateQueue;qt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var a=u,s=a.next;a.next=null,i===null?o=s:i.next=s,i=a;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==i&&(u===null?d.firstBaseUpdate=s:u.next=s,d.lastBaseUpdate=a))}if(o!==null){var f=l.baseState;i=0,d=s=a=null,u=o;do{var m=u.lane,w=u.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:w,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var x=e,S=u;switch(m=t,w=n,S.tag){case 1:if(x=S.payload,typeof x=="function"){f=x.call(w,f,m);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=S.payload,m=typeof x=="function"?x.call(w,f,m):x,m==null)break e;f=he({},f,m);break e;case 2:qt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[u]:m.push(u))}else w={eventTime:w,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(s=d=w,a=f):d=d.next=w,i|=m;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;m=u,u=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(d===null&&(a=f),l.baseState=a,l.firstBaseUpdate=s,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);In|=i,e.lanes=i,e.memoizedState=f}}function uc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ji.transition;Ji.transition={};try{e(!1),t()}finally{b=n,Ji.transition=r}}function Ad(){return pt().memoizedState}function mv(e,t,n){var r=fn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bd(e))Vd(t,n);else if(n=xd(e,t,n,r),n!==null){var l=Be();xt(n,e,r,l),Hd(n,t,r)}}function vv(e,t,n){var r=fn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bd(e))Vd(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,kt(u,i)){var a=t.interleaved;a===null?(l.next=l,Na(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=xd(e,t,l,r),n!==null&&(l=Be(),xt(n,e,r,l),Hd(n,t,r))}}function Bd(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Vd(e,t){Yr=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,va(e,n)}}var Lo={readContext:dt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},yv={readContext:dt,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,lo(4194308,4,Od.bind(null,t,e),n)},useLayoutEffect:function(e,t){return lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return lo(4,2,e,t)},useMemo:function(e,t){var n=Pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mv.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:ac,useDebugValue:Ua,useDeferredValue:function(e){return Pt().memoizedState=e},useTransition:function(){var e=ac(!1),t=e[0];return e=hv.bind(null,e[1]),Pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,l=Pt();if(ce){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Te===null)throw Error(P(349));On&30||Rd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,sc(Ld.bind(null,r,o,e),[e]),r.flags|=2048,dl(9,Td.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pt(),t=Te.identifierPrefix;if(ce){var n=$t,r=Ft;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=u);break}}}finally{zi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function Yh(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ji(e.type,!1),e;case 11:return e=ji(e.type.render,!1),e;case 1:return e=ji(e.type,!0),e;default:return""}}function hu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yn:return"Fragment";case Kn:return"Portal";case fu:return"Profiler";case fa:return"StrictMode";case du:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kf:return(e.displayName||"Context")+".Consumer";case xf:return(e._context.displayName||"Context")+".Provider";case da:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pa:return t=e.displayName||null,t!==null?t:hu(e.type)||"Memo";case Zt:t=e._payload,e=e._init;try{return hu(e(t))}catch{}}return null}function Xh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hu(t);case 8:return t===fa?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _f(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gh(e){var t=_f(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ol(e){e._valueTracker||(e._valueTracker=Gh(e))}function Pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_f(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mu(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ts(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Rf(e,t){t=t.checked,t!=null&&ca(e,"checked",t,!1)}function vu(e,t){Rf(e,t);var n=hn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yu(e,t.type,n):t.hasOwnProperty("defaultValue")&&yu(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ls(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yu(e,t,n){(t!=="number"||co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $r=Array.isArray;function or(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Il.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jh=["Webkit","ms","Moz","O"];Object.keys(Vr).forEach(function(e){Jh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vr[t]=Vr[e]})});function Df(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vr.hasOwnProperty(e)&&Vr[e]?(""+t).trim():t+"px"}function Mf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Df(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Zh=he({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Su(e,t){if(t){if(Zh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Eu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function ha(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ku=null,ir=null,ur=null;function Ms(e){if(e=wl(e)){if(typeof ku!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Wo(t),ku(e.stateNode,e.type,t))}}function zf(e){ir?ur?ur.push(e):ur=[e]:ir=e}function jf(){if(ir){var e=ir,t=ur;if(ur=ir=null,Ms(e),t)for(e=0;e>>=0,e===0?32:31-(am(e)/sm|0)|0}var Fl=64,$l=4194304;function Ur(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Ur(u):(o&=i,o!==0&&(r=Ur(o)))}else i=n&~l,i!==0?r=Ur(i):o!==0&&(r=Ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function pm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Wr),Bs=" ",Vs=!1;function ed(e,t){switch(e){case"keyup":return Bm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function td(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function Hm(e,t){switch(e){case"compositionend":return td(t);case"keypress":return t.which!==32?null:(Vs=!0,Bs);case"textInput":return e=t.data,e===Bs&&Vs?null:e;default:return null}}function Wm(e,t){if(Xn)return e==="compositionend"||!xa&&ed(e,t)?(e=qf(),eo=wa=tn=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ks(n)}}function od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function id(){for(var e=window,t=co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=co(e.document)}return t}function ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bm(e){var t=id(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&od(n.ownerDocument.documentElement,n)){if(r!==null&&ka(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ys(n,o);var i=Ys(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gn=null,Lu=null,Kr=null,Nu=!1;function Xs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nu||Gn==null||Gn!==co(r)||(r=Gn,"selectionStart"in r&&ka(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&ll(Kr,r)||(Kr=r,r=go(Lu,"onSelect"),0qn||(e.current=Iu[qn],Iu[qn]=null,qn--)}function oe(e,t){qn++,Iu[qn]=e.current,e.current=t}var mn={},Fe=gn(mn),Xe=gn(!1),zn=mn;function dr(e,t){var n=e.type.contextTypes;if(!n)return mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ge(e){return e=e.childContextTypes,e!=null}function So(){se(Xe),se(Fe)}function tc(e,t,n){if(Fe.current!==mn)throw Error(P(168));oe(Fe,t),oe(Xe,n)}function md(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(P(108,Xh(e)||"Unknown",l));return he({},n,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,zn=Fe.current,oe(Fe,e),oe(Xe,Xe.current),!0}function nc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=md(e,t,zn),r.__reactInternalMemoizedMergedChildContext=e,se(Xe),se(Fe),oe(Fe,e)):se(Xe),oe(Xe,n)}var It=null,Qo=!1,Xi=!1;function vd(e){It===null?It=[e]:It.push(e)}function fv(e){Qo=!0,vd(e)}function wn(){if(!Xi&&It!==null){Xi=!0;var e=0,t=b;try{var n=It;for(b=1;e>=i,l-=i,Ft=1<<32-Et(t)+l|n<v?(B=j,j=null):B=j.sibling;var O=m(h,j,g[v],k);if(O===null){j===null&&(j=B);break}e&&j&&O.alternate===null&&t(h,j),f=o(O,f,v),N===null?T=O:N.sibling=O,N=O,j=B}if(v===g.length)return n(h,j),ce&&Cn(h,v),T;if(j===null){for(;vv?(B=j,j=null):B=j.sibling;var Q=m(h,j,O.value,k);if(Q===null){j===null&&(j=B);break}e&&j&&Q.alternate===null&&t(h,j),f=o(Q,f,v),N===null?T=Q:N.sibling=Q,N=Q,j=B}if(O.done)return n(h,j),ce&&Cn(h,v),T;if(j===null){for(;!O.done;v++,O=g.next())O=c(h,O.value,k),O!==null&&(f=o(O,f,v),N===null?T=O:N.sibling=O,N=O);return ce&&Cn(h,v),T}for(j=r(h,j);!O.done;v++,O=g.next())O=w(j,h,v,O.value,k),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?v:O.key),f=o(O,f,v),N===null?T=O:N.sibling=O,N=O);return e&&j.forEach(function(re){return t(h,re)}),ce&&Cn(h,v),T}function R(h,f,g,k){if(typeof g=="object"&&g!==null&&g.type===Yn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case jl:e:{for(var T=g.key,N=f;N!==null;){if(N.key===T){if(T=g.type,T===Yn){if(N.tag===7){n(h,N.sibling),f=l(N,g.props.children),f.return=h,h=f;break e}}else if(N.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Zt&&oc(T)===N.type){n(h,N.sibling),f=l(N,g.props),f.ref=Dr(h,N,g),f.return=h,h=f;break e}n(h,N);break}else t(h,N);N=N.sibling}g.type===Yn?(f=Mn(g.props.children,h.mode,k,g.key),f.return=h,h=f):(k=ao(g.type,g.key,g.props,null,h.mode,k),k.ref=Dr(h,f,g),k.return=h,h=k)}return i(h);case Kn:e:{for(N=g.key;f!==null;){if(f.key===N)if(f.tag===4&&f.stateNode.containerInfo===g.containerInfo&&f.stateNode.implementation===g.implementation){n(h,f.sibling),f=l(f,g.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=nu(g,h.mode,k),f.return=h,h=f}return i(h);case Zt:return N=g._init,R(h,f,N(g._payload),k)}if($r(g))return x(h,f,g,k);if(Pr(g))return S(h,f,g,k);Ql(h,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,f!==null&&f.tag===6?(n(h,f.sibling),f=l(f,g),f.return=h,h=f):(n(h,f),f=tu(g,h.mode,k),f.return=h,h=f),i(h)):n(h,f)}return R}var hr=Sd(!0),Ed=Sd(!1),Co=gn(null),_o=null,tr=null,Ra=null;function Ta(){Ra=tr=_o=null}function La(e){var t=Co.current;se(Co),e._currentValue=t}function Uu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function sr(e,t){_o=e,Ra=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function dt(e){var t=e._currentValue;if(Ra!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(_o===null)throw Error(P(308));tr=e,_o.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Tn=null;function Na(e){Tn===null?Tn=[e]:Tn.push(e)}function xd(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Na(t)):(n.next=l.next,l.next=n),t.interleaved=n,Vt(e,r)}function Vt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qt=!1;function Da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Vt(e,n)}return l=r.interleaved,l===null?(t.next=t,Na(r)):(t.next=l.next,l.next=t),r.interleaved=t,Vt(e,n)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,va(e,n)}}function ic(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Po(e,t,n,r){var l=e.updateQueue;qt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var a=u,s=a.next;a.next=null,i===null?o=s:i.next=s,i=a;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==i&&(u===null?d.firstBaseUpdate=s:u.next=s,d.lastBaseUpdate=a))}if(o!==null){var c=l.baseState;i=0,d=s=a=null,u=o;do{var m=u.lane,w=u.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:w,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var x=e,S=u;switch(m=t,w=n,S.tag){case 1:if(x=S.payload,typeof x=="function"){c=x.call(w,c,m);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=S.payload,m=typeof x=="function"?x.call(w,c,m):x,m==null)break e;c=he({},c,m);break e;case 2:qt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[u]:m.push(u))}else w={eventTime:w,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(s=d=w,a=c):d=d.next=w,i|=m;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;m=u,u=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(d===null&&(a=c),l.baseState=a,l.firstBaseUpdate=s,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);In|=i,e.lanes=i,e.memoizedState=c}}function uc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ji.transition;Ji.transition={};try{e(!1),t()}finally{b=n,Ji.transition=r}}function Ad(){return pt().memoizedState}function mv(e,t,n){var r=fn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bd(e))Vd(t,n);else if(n=xd(e,t,n,r),n!==null){var l=Be();xt(n,e,r,l),Hd(n,t,r)}}function vv(e,t,n){var r=fn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bd(e))Vd(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,kt(u,i)){var a=t.interleaved;a===null?(l.next=l,Na(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=xd(e,t,l,r),n!==null&&(l=Be(),xt(n,e,r,l),Hd(n,t,r))}}function Bd(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Vd(e,t){Yr=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,va(e,n)}}var Lo={readContext:dt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},yv={readContext:dt,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,lo(4194308,4,Od.bind(null,t,e),n)},useLayoutEffect:function(e,t){return lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return lo(4,2,e,t)},useMemo:function(e,t){var n=Pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mv.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:ac,useDebugValue:Ua,useDeferredValue:function(e){return Pt().memoizedState=e},useTransition:function(){var e=ac(!1),t=e[0];return e=hv.bind(null,e[1]),Pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,l=Pt();if(ce){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Te===null)throw Error(P(349));On&30||Rd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,sc(Ld.bind(null,r,o,e),[e]),r.flags|=2048,dl(9,Td.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pt(),t=Te.identifierPrefix;if(ce){var n=$t,r=Ft;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Rt]=t,e[ul]=r,bd(e,t,!1,!1),t.stateNode=e;e:{switch(i=Eu(n,r),n){case"dialog":ae("cancel",e),ae("close",e),l=r;break;case"iframe":case"object":case"embed":ae("load",e),l=r;break;case"video":case"audio":for(l=0;lyr&&(t.flags|=128,r=!0,Mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ro(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ce)return Oe(t),null}else 2*we()-o.renderingStartTime>yr&&n!==1073741824&&(t.flags|=128,r=!0,Mr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=we(),t.sibling=null,n=de.current,oe(de,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Qa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qe&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function _v(e,t){switch(_a(t),t.tag){case 1:return Ge(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mr(),se(Xe),se(Fe),ja(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return za(t),null;case 13:if(se(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(de),null;case 4:return mr(),null;case 10:return La(t.type._context),null;case 22:case 23:return Qa(),null;case 24:return null;default:return null}}var Yl=!1,Ie=!1,Pv=typeof WeakSet=="function"?WeakSet:Set,z=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Xu(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Sc=!1;function Rv(e,t){if(Du=vo,e=id(),ka(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,a=-1,s=0,d=0,f=e,m=null;t:for(;;){for(var w;f!==n||l!==0&&f.nodeType!==3||(u=i+l),f!==o||r!==0&&f.nodeType!==3||(a=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++s===l&&(u=i),m===o&&++d===r&&(a=i),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mu={focusedElem:e,selectionRange:n},vo=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,R=x.memoizedState,h=t.stateNode,c=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:yt(t.type,S),R);h.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(k){ge(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return x=Sc,Sc=!1,x}function Xr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Xu(t,n,o)}l=l.next}while(l!==r)}}function Xo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Gu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function np(e){var t=e.alternate;t!==null&&(e.alternate=null,np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[ul],delete t[Ou],delete t[sv],delete t[cv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rp(e){return e.tag===5||e.tag===3||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wo));else if(r!==4&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}function Zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zu(e,t,n),e=e.sibling;e!==null;)Zu(e,t,n),e=e.sibling}var De=null,gt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)lp(e,t,n),n=n.sibling}function lp(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(Ao,n)}catch{}switch(n.tag){case 5:Ie||nr(n,t);case 6:var r=De,l=gt;De=null,Gt(e,t,n),De=r,gt=l,De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?Yi(e.parentNode,n):e.nodeType===1&&Yi(e,n),nl(e)):Yi(De,n.stateNode));break;case 4:r=De,l=gt,De=n.stateNode.containerInfo,gt=!0,Gt(e,t,n),De=r,gt=l;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Xu(n,t,i),l=l.next}while(l!==r)}Gt(e,t,n);break;case 1:if(!Ie&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){ge(n,t,u)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,Gt(e,t,n),Ie=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function xc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pv),t.forEach(function(r){var l=Iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lv(r/1960))-r,10e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Mo=0,J&6)throw Error(P(331));var l=J;for(J|=4,z=e.current;z!==null;){var o=z,i=o.child;if(z.flags&16){var u=o.deletions;if(u!==null){for(var a=0;awe()-Ha?Dn(e,0):Va|=n),Je(e,t)}function dp(e,t){t===0&&(e.mode&1?(t=$l,$l<<=1,!($l&130023424)&&($l=4194304)):t=1);var n=Be();e=Vt(e,t),e!==null&&(yl(e,t,n),Je(e,n))}function Ov(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dp(e,n)}function Iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),dp(e,n)}var pp;pp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,kv(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,ce&&t.flags&1048576&&yd(t,ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oo(e,t),e=t.pendingProps;var l=dr(t,Fe.current);sr(t,n),l=Ia(null,t,r,e,l,n);var o=Fa();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(o=!0,Eo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Da(t),l.updater=Yo,t.stateNode=l,l._reactInternals=t,Bu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,ce&&o&&Ca(t),Ae(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=$v(r),e=yt(r,e),l){case 0:t=Hu(null,t,r,e,n);break e;case 1:t=yc(null,t,r,e,n);break e;case 11:t=mc(null,t,r,e,n);break e;case 14:t=vc(null,t,r,yt(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Hu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),yc(e,t,r,l,n);case 3:e:{if(Jd(t),e===null)throw Error(P(387));r=t.pendingProps,o=t.memoizedState,l=o.element,kd(e,t),Po(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=vr(Error(P(423)),t),t=gc(e,t,r,n,l);break e}else if(r!==l){l=vr(Error(P(424)),t),t=gc(e,t,r,n,l);break e}else for(et=an(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,St=null,n=Ed(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pr(),r===l){t=Ht(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Cd(t),e===null&&$u(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,zu(r,l)?i=null:o!==null&&zu(r,o)&&(t.flags|=32),Gd(e,t),Ae(e,t,i,n),t.child;case 6:return e===null&&$u(t),null;case 13:return Zd(e,t,n);case 4:return Ma(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),mc(e,t,r,l,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,oe(Co,r._currentValue),r._currentValue=i,o!==null)if(kt(o.value,i)){if(o.children===l.children&&!Xe.current){t=Ht(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Ut(-1,n&-n),a.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Uu(o.return,n,t),u.lanes|=n;break}a=a.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(P(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Uu(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ae(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,sr(t,n),l=dt(l),r=r(l),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,l=yt(r,t.pendingProps),l=yt(r.type,l),vc(e,t,r,l,n);case 15:return Yd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),oo(e,t),t.tag=1,Ge(r)?(e=!0,Eo(t)):e=!1,sr(t,n),Wd(t,r,l),Bu(t,r,l,n),Wu(null,t,r,!0,e,n);case 19:return qd(e,t,n);case 22:return Xd(e,t,n)}throw Error(P(156,t.tag))};function hp(e,t){return Bf(e,t)}function Fv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new Fv(e,t,n,r)}function Ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $v(e){if(typeof e=="function")return Ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===da)return 11;if(e===pa)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ao(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Ya(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yn:return Mn(n.children,l,o,t);case fa:i=8,l|=8;break;case fu:return e=ct(12,n,t,l|2),e.elementType=fu,e.lanes=o,e;case du:return e=ct(13,n,t,l),e.elementType=du,e.lanes=o,e;case pu:return e=ct(19,n,t,l),e.elementType=pu,e.lanes=o,e;case Cf:return Jo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xf:i=10;break e;case kf:i=9;break e;case da:i=11;break e;case pa:i=14;break e;case Zt:i=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=ct(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Mn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Jo(e,t,n,r){return e=ct(22,e,r,t),e.elementType=Cf,e.lanes=n,e.stateNode={isHidden:!1},e}function tu(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function nu(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uv(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ii(0),this.expirationTimes=Ii(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ii(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Xa(e,t,n,r,l,o,i,u,a){return e=new Uv(e,t,n,u,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ct(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(o),e}function Av(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gp)}catch(e){console.error(e)}}gp(),gf.exports=rt;var ti=gf.exports;const Qv=lf(ti),Kv=rf({__proto__:null,default:Qv},[ti]);var Nc=ti;su.createRoot=Nc.createRoot,su.hydrateRoot=Nc.hydrateRoot;var wp={exports:{}},Sp={};/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function bi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Sv=typeof WeakMap=="function"?WeakMap:Map;function Qd(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Do||(Do=!0,qu=r),Vu(e,t)},n}function Kd(e,t,n){n=Ut(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Vu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Vu(e,t),typeof r!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function dc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Sv;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=jv.bind(null,e,t,n),t.then(e,e))}function pc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function hc(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,sn(n,t,1))),n.lanes|=1),e)}var Ev=Wt.ReactCurrentOwner,Ye=!1;function Ae(e,t,n,r){t.child=e===null?Ed(t,null,n,r):hr(t,e.child,n,r)}function mc(e,t,n,r,l){n=n.render;var o=t.ref;return sr(t,l),r=Ia(e,t,n,r,o,l),n=Fa(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ht(e,t,l)):(ce&&n&&Ca(t),t.flags|=1,Ae(e,t,r,l),t.child)}function vc(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Ya(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Yd(e,t,o,r,l)):(e=ao(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:ll,n(i,r)&&e.ref===t.ref)return Ht(e,t,l)}return t.flags|=1,e=dn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Yd(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(ll(o,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,Ht(e,t,l)}return Hu(e,t,n,r,l)}function Xd(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(rr,qe),qe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(rr,qe),qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,oe(rr,qe),qe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,oe(rr,qe),qe|=r;return Ae(e,t,l,n),t.child}function Gd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hu(e,t,n,r,l){var o=Ge(n)?zn:Fe.current;return o=dr(t,o),sr(t,l),n=Ia(e,t,n,r,o,l),r=Fa(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ht(e,t,l)):(ce&&r&&Ca(t),t.flags|=1,Ae(e,t,n,l),t.child)}function yc(e,t,n,r,l){if(Ge(n)){var o=!0;Eo(t)}else o=!1;if(sr(t,l),t.stateNode===null)oo(e,t),Wd(t,n,r),Bu(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var a=i.context,s=n.contextType;typeof s=="object"&&s!==null?s=dt(s):(s=Ge(n)?zn:Fe.current,s=dr(t,s));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||a!==s)&&fc(t,i,r,s),qt=!1;var m=t.memoizedState;i.state=m,Po(t,r,i,l),a=t.memoizedState,u!==r||m!==a||Xe.current||qt?(typeof d=="function"&&(Au(t,n,d,r),a=t.memoizedState),(u=qt||cc(t,n,u,r,m,a,s))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),i.props=r,i.state=a,i.context=s,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,kd(e,t),u=t.memoizedProps,s=t.type===t.elementType?u:yt(t.type,u),i.props=s,c=t.pendingProps,m=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=dt(a):(a=Ge(n)?zn:Fe.current,a=dr(t,a));var w=n.getDerivedStateFromProps;(d=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==c||m!==a)&&fc(t,i,r,a),qt=!1,m=t.memoizedState,i.state=m,Po(t,r,i,l);var x=t.memoizedState;u!==c||m!==x||Xe.current||qt?(typeof w=="function"&&(Au(t,n,w,r),x=t.memoizedState),(s=qt||cc(t,n,s,r,m,x,a)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=a,r=s):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Wu(e,t,n,r,o,l)}function Wu(e,t,n,r,l,o){Gd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&nc(t,n,!1),Ht(e,t,o);r=t.stateNode,Ev.current=t;var u=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=hr(t,e.child,null,o),t.child=hr(t,null,u,o)):Ae(e,t,u,o),t.memoizedState=r.state,l&&nc(t,n,!0),t.child}function Jd(e){var t=e.stateNode;t.pendingContext?tc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tc(e,t.context,!1),Ma(e,t.containerInfo)}function gc(e,t,n,r,l){return pr(),Pa(l),t.flags|=256,Ae(e,t,n,r),t.child}var Qu={dehydrated:null,treeContext:null,retryLane:0};function Ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zd(e,t,n){var r=t.pendingProps,l=de.current,o=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),oe(de,l&1),e===null)return $u(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Jo(i,r,0,null),e=Mn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ku(n),t.memoizedState=Qu,e):Aa(t,i));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return xv(e,t,i,r,u,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,u=l.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=dn(l,a),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?o=dn(u,o):(o=Mn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Ku(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Qu,r}return o=e.child,e=o.sibling,r=dn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Aa(e,t){return t=Jo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Kl(e,t,n,r){return r!==null&&Pa(r),hr(t,e.child,null,n),e=Aa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xv(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=bi(Error(P(422))),Kl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Jo({mode:"visible",children:r.children},l,0,null),o=Mn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&hr(t,e.child,null,i),t.child.memoizedState=Ku(i),t.memoizedState=Qu,o);if(!(t.mode&1))return Kl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(P(419)),r=bi(o,r,void 0),Kl(e,t,i,r)}if(u=(i&e.childLanes)!==0,Ye||u){if(r=Te,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Vt(e,l),xt(r,e,l,-1))}return Ka(),r=bi(Error(P(421))),Kl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Ov.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,et=an(l.nextSibling),tt=t,ce=!0,St=null,e!==null&&(at[st++]=Ft,at[st++]=$t,at[st++]=jn,Ft=e.id,$t=e.overflow,jn=t),t=Aa(t,r.children),t.flags|=4096,t)}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Uu(e.return,t,n)}function eu(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function qd(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Ae(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(de,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ro(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),eu(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ro(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}eu(t,!0,n,null,o);break;case"together":eu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ht(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kv(e,t,n){switch(t.tag){case 3:Jd(t),pr();break;case 5:Cd(t);break;case 1:Ge(t.type)&&Eo(t);break;case 4:Ma(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;oe(Co,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(de,de.current&1),t.flags|=128,null):n&t.child.childLanes?Zd(e,t,n):(oe(de,de.current&1),e=Ht(e,t,n),e!==null?e.sibling:null);oe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return qd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),oe(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,Xd(e,t,n)}return Ht(e,t,n)}var bd,Yu,ep,tp;bd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Yu=function(){};ep=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Ln(Lt.current);var o=null;switch(n){case"input":l=mu(e,l),r=mu(e,r),o=[];break;case"select":l=he({},l,{value:void 0}),r=he({},r,{value:void 0}),o=[];break;case"textarea":l=gu(e,l),r=gu(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wo)}Su(n,r);var i;n=null;for(s in l)if(!r.hasOwnProperty(s)&&l.hasOwnProperty(s)&&l[s]!=null)if(s==="style"){var u=l[s];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Zr.hasOwnProperty(s)?o||(o=[]):(o=o||[]).push(s,null));for(s in r){var a=r[s];if(u=l!=null?l[s]:void 0,r.hasOwnProperty(s)&&a!==u&&(a!=null||u!=null))if(s==="style")if(u){for(i in u)!u.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&u[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(o||(o=[]),o.push(s,n)),n=a;else s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,u=u?u.__html:void 0,a!=null&&u!==a&&(o=o||[]).push(s,a)):s==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(s,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(Zr.hasOwnProperty(s)?(a!=null&&s==="onScroll"&&ae("scroll",e),o||u===a||(o=[])):(o=o||[]).push(s,a))}n&&(o=o||[]).push("style",n);var s=o;(t.updateQueue=s)&&(t.flags|=4)}};tp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mr(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Cv(e,t,n){var r=t.pendingProps;switch(_a(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Ge(t.type)&&So(),Oe(t),null;case 3:return r=t.stateNode,mr(),se(Xe),se(Fe),ja(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Wl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,St!==null&&(ta(St),St=null))),Yu(e,t),Oe(t),null;case 5:za(t);var l=Ln(sl.current);if(n=t.type,e!==null&&t.stateNode!=null)ep(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return Oe(t),null}if(e=Ln(Lt.current),Wl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Rt]=t,r[ul]=o,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Rt]=t,e[ul]=r,bd(e,t,!1,!1),t.stateNode=e;e:{switch(i=Eu(n,r),n){case"dialog":ae("cancel",e),ae("close",e),l=r;break;case"iframe":case"object":case"embed":ae("load",e),l=r;break;case"video":case"audio":for(l=0;lyr&&(t.flags|=128,r=!0,Mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ro(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ce)return Oe(t),null}else 2*we()-o.renderingStartTime>yr&&n!==1073741824&&(t.flags|=128,r=!0,Mr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=we(),t.sibling=null,n=de.current,oe(de,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Qa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qe&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function _v(e,t){switch(_a(t),t.tag){case 1:return Ge(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mr(),se(Xe),se(Fe),ja(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return za(t),null;case 13:if(se(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(de),null;case 4:return mr(),null;case 10:return La(t.type._context),null;case 22:case 23:return Qa(),null;case 24:return null;default:return null}}var Yl=!1,Ie=!1,Pv=typeof WeakSet=="function"?WeakSet:Set,z=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Xu(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Sc=!1;function Rv(e,t){if(Du=vo,e=id(),ka(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,a=-1,s=0,d=0,c=e,m=null;t:for(;;){for(var w;c!==n||l!==0&&c.nodeType!==3||(u=i+l),c!==o||r!==0&&c.nodeType!==3||(a=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(w=c.firstChild)!==null;)m=c,c=w;for(;;){if(c===e)break t;if(m===n&&++s===l&&(u=i),m===o&&++d===r&&(a=i),(w=c.nextSibling)!==null)break;c=m,m=c.parentNode}c=w}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mu={focusedElem:e,selectionRange:n},vo=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,R=x.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:yt(t.type,S),R);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(k){ge(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return x=Sc,Sc=!1,x}function Xr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Xu(t,n,o)}l=l.next}while(l!==r)}}function Xo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Gu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function np(e){var t=e.alternate;t!==null&&(e.alternate=null,np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[ul],delete t[Ou],delete t[sv],delete t[cv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rp(e){return e.tag===5||e.tag===3||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wo));else if(r!==4&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}function Zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zu(e,t,n),e=e.sibling;e!==null;)Zu(e,t,n),e=e.sibling}var De=null,gt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)lp(e,t,n),n=n.sibling}function lp(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(Ao,n)}catch{}switch(n.tag){case 5:Ie||nr(n,t);case 6:var r=De,l=gt;De=null,Gt(e,t,n),De=r,gt=l,De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?Yi(e.parentNode,n):e.nodeType===1&&Yi(e,n),nl(e)):Yi(De,n.stateNode));break;case 4:r=De,l=gt,De=n.stateNode.containerInfo,gt=!0,Gt(e,t,n),De=r,gt=l;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Xu(n,t,i),l=l.next}while(l!==r)}Gt(e,t,n);break;case 1:if(!Ie&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){ge(n,t,u)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,Gt(e,t,n),Ie=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function xc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pv),t.forEach(function(r){var l=Iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lv(r/1960))-r,10e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Mo=0,J&6)throw Error(P(331));var l=J;for(J|=4,z=e.current;z!==null;){var o=z,i=o.child;if(z.flags&16){var u=o.deletions;if(u!==null){for(var a=0;awe()-Ha?Dn(e,0):Va|=n),Je(e,t)}function dp(e,t){t===0&&(e.mode&1?(t=$l,$l<<=1,!($l&130023424)&&($l=4194304)):t=1);var n=Be();e=Vt(e,t),e!==null&&(yl(e,t,n),Je(e,n))}function Ov(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dp(e,n)}function Iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),dp(e,n)}var pp;pp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,kv(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,ce&&t.flags&1048576&&yd(t,ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oo(e,t),e=t.pendingProps;var l=dr(t,Fe.current);sr(t,n),l=Ia(null,t,r,e,l,n);var o=Fa();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(o=!0,Eo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Da(t),l.updater=Yo,t.stateNode=l,l._reactInternals=t,Bu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,ce&&o&&Ca(t),Ae(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=$v(r),e=yt(r,e),l){case 0:t=Hu(null,t,r,e,n);break e;case 1:t=yc(null,t,r,e,n);break e;case 11:t=mc(null,t,r,e,n);break e;case 14:t=vc(null,t,r,yt(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Hu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),yc(e,t,r,l,n);case 3:e:{if(Jd(t),e===null)throw Error(P(387));r=t.pendingProps,o=t.memoizedState,l=o.element,kd(e,t),Po(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=vr(Error(P(423)),t),t=gc(e,t,r,n,l);break e}else if(r!==l){l=vr(Error(P(424)),t),t=gc(e,t,r,n,l);break e}else for(et=an(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,St=null,n=Ed(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pr(),r===l){t=Ht(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Cd(t),e===null&&$u(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,zu(r,l)?i=null:o!==null&&zu(r,o)&&(t.flags|=32),Gd(e,t),Ae(e,t,i,n),t.child;case 6:return e===null&&$u(t),null;case 13:return Zd(e,t,n);case 4:return Ma(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),mc(e,t,r,l,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,oe(Co,r._currentValue),r._currentValue=i,o!==null)if(kt(o.value,i)){if(o.children===l.children&&!Xe.current){t=Ht(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Ut(-1,n&-n),a.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Uu(o.return,n,t),u.lanes|=n;break}a=a.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(P(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Uu(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ae(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,sr(t,n),l=dt(l),r=r(l),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,l=yt(r,t.pendingProps),l=yt(r.type,l),vc(e,t,r,l,n);case 15:return Yd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),oo(e,t),t.tag=1,Ge(r)?(e=!0,Eo(t)):e=!1,sr(t,n),Wd(t,r,l),Bu(t,r,l,n),Wu(null,t,r,!0,e,n);case 19:return qd(e,t,n);case 22:return Xd(e,t,n)}throw Error(P(156,t.tag))};function hp(e,t){return Bf(e,t)}function Fv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new Fv(e,t,n,r)}function Ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $v(e){if(typeof e=="function")return Ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===da)return 11;if(e===pa)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ao(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Ya(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yn:return Mn(n.children,l,o,t);case fa:i=8,l|=8;break;case fu:return e=ct(12,n,t,l|2),e.elementType=fu,e.lanes=o,e;case du:return e=ct(13,n,t,l),e.elementType=du,e.lanes=o,e;case pu:return e=ct(19,n,t,l),e.elementType=pu,e.lanes=o,e;case Cf:return Jo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xf:i=10;break e;case kf:i=9;break e;case da:i=11;break e;case pa:i=14;break e;case Zt:i=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=ct(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Mn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Jo(e,t,n,r){return e=ct(22,e,r,t),e.elementType=Cf,e.lanes=n,e.stateNode={isHidden:!1},e}function tu(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function nu(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uv(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ii(0),this.expirationTimes=Ii(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ii(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Xa(e,t,n,r,l,o,i,u,a){return e=new Uv(e,t,n,u,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ct(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(o),e}function Av(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gp)}catch(e){console.error(e)}}gp(),gf.exports=rt;var ti=gf.exports;const Qv=lf(ti),Kv=rf({__proto__:null,default:Qv},[ti]);var Nc=ti;su.createRoot=Nc.createRoot,su.hydrateRoot=Nc.hydrateRoot;var wp={exports:{}},Sp={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -54,7 +54,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ni=C,ry=ny;function ly(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oy=typeof Object.is=="function"?Object.is:ly,iy=ry.useSyncExternalStore,uy=ni.useRef,ay=ni.useEffect,sy=ni.useMemo,cy=ni.useDebugValue;xp.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var o=uy(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=sy(function(){function a(w){if(!s){if(s=!0,d=w,w=r(w),l!==void 0&&i.hasValue){var x=i.value;if(l(x,w))return f=x}return f=w}if(x=f,oy(d,w))return x;var S=r(w);return l!==void 0&&l(x,S)?x:(d=w,f=S)}var s=!1,d,f,m=n===void 0?null:n;return[function(){return a(t())},m===null?void 0:function(){return a(m())}]},[t,n,r,l]);var u=iy(e,o[0],o[1]);return ay(function(){i.hasValue=!0,i.value=u},[u]),cy(u),u};Ep.exports=xp;var fy=Ep.exports;function dy(e){e()}let kp=dy;const py=e=>kp=e,hy=()=>kp,Dc=Symbol.for("react-redux-context"),Mc=typeof globalThis<"u"?globalThis:{};function my(){var e;if(!C.createContext)return{};const t=(e=Mc[Dc])!=null?e:Mc[Dc]=new Map;let n=t.get(C.createContext);return n||(n=C.createContext(null),t.set(C.createContext,n)),n}const vn=my();function qa(e=vn){return function(){return C.useContext(e)}}const Cp=qa(),vy=()=>{throw new Error("uSES not initialized!")};let _p=vy;const yy=e=>{_p=e},gy=(e,t)=>e===t;function wy(e=vn){const t=e===vn?Cp:qa(e);return function(r,l={}){const{equalityFn:o=gy,stabilityCheck:i=void 0,noopCheck:u=void 0}=typeof l=="function"?{equalityFn:l}:l,{store:a,subscription:s,getServerState:d,stabilityCheck:f,noopCheck:m}=t();C.useRef(!0);const w=C.useCallback({[r.name](S){return r(S)}}[r.name],[r,f,i]),x=_p(s.addNestedSub,a.getState,d||a.getState,w,o);return C.useDebugValue(x),x}}const Pp=wy();var Rp={exports:{}},ee={};/** @license React v16.13.1 + */var ni=C,ry=ny;function ly(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oy=typeof Object.is=="function"?Object.is:ly,iy=ry.useSyncExternalStore,uy=ni.useRef,ay=ni.useEffect,sy=ni.useMemo,cy=ni.useDebugValue;xp.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var o=uy(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=sy(function(){function a(w){if(!s){if(s=!0,d=w,w=r(w),l!==void 0&&i.hasValue){var x=i.value;if(l(x,w))return c=x}return c=w}if(x=c,oy(d,w))return x;var S=r(w);return l!==void 0&&l(x,S)?x:(d=w,c=S)}var s=!1,d,c,m=n===void 0?null:n;return[function(){return a(t())},m===null?void 0:function(){return a(m())}]},[t,n,r,l]);var u=iy(e,o[0],o[1]);return ay(function(){i.hasValue=!0,i.value=u},[u]),cy(u),u};Ep.exports=xp;var fy=Ep.exports;function dy(e){e()}let kp=dy;const py=e=>kp=e,hy=()=>kp,Dc=Symbol.for("react-redux-context"),Mc=typeof globalThis<"u"?globalThis:{};function my(){var e;if(!C.createContext)return{};const t=(e=Mc[Dc])!=null?e:Mc[Dc]=new Map;let n=t.get(C.createContext);return n||(n=C.createContext(null),t.set(C.createContext,n)),n}const vn=my();function qa(e=vn){return function(){return C.useContext(e)}}const Cp=qa(),vy=()=>{throw new Error("uSES not initialized!")};let _p=vy;const yy=e=>{_p=e},gy=(e,t)=>e===t;function wy(e=vn){const t=e===vn?Cp:qa(e);return function(r,l={}){const{equalityFn:o=gy,stabilityCheck:i=void 0,noopCheck:u=void 0}=typeof l=="function"?{equalityFn:l}:l,{store:a,subscription:s,getServerState:d,stabilityCheck:c,noopCheck:m}=t();C.useRef(!0);const w=C.useCallback({[r.name](S){return r(S)}}[r.name],[r,c,i]),x=_p(s.addNestedSub,a.getState,d||a.getState,w,o);return C.useDebugValue(x),x}}const Pp=wy();var Rp={exports:{}},ee={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -69,7 +69,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ns=Symbol.for("react.element"),rs=Symbol.for("react.portal"),pi=Symbol.for("react.fragment"),hi=Symbol.for("react.strict_mode"),mi=Symbol.for("react.profiler"),vi=Symbol.for("react.provider"),yi=Symbol.for("react.context"),Ty=Symbol.for("react.server_context"),gi=Symbol.for("react.forward_ref"),wi=Symbol.for("react.suspense"),Si=Symbol.for("react.suspense_list"),Ei=Symbol.for("react.memo"),xi=Symbol.for("react.lazy"),Ly=Symbol.for("react.offscreen"),Dp;Dp=Symbol.for("react.module.reference");function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ns:switch(e=e.type,e){case pi:case mi:case hi:case wi:case Si:return e;default:switch(e=e&&e.$$typeof,e){case Ty:case yi:case gi:case xi:case Ei:case vi:return e;default:return t}}case rs:return t}}}ne.ContextConsumer=yi;ne.ContextProvider=vi;ne.Element=ns;ne.ForwardRef=gi;ne.Fragment=pi;ne.Lazy=xi;ne.Memo=Ei;ne.Portal=rs;ne.Profiler=mi;ne.StrictMode=hi;ne.Suspense=wi;ne.SuspenseList=Si;ne.isAsyncMode=function(){return!1};ne.isConcurrentMode=function(){return!1};ne.isContextConsumer=function(e){return ht(e)===yi};ne.isContextProvider=function(e){return ht(e)===vi};ne.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ns};ne.isForwardRef=function(e){return ht(e)===gi};ne.isFragment=function(e){return ht(e)===pi};ne.isLazy=function(e){return ht(e)===xi};ne.isMemo=function(e){return ht(e)===Ei};ne.isPortal=function(e){return ht(e)===rs};ne.isProfiler=function(e){return ht(e)===mi};ne.isStrictMode=function(e){return ht(e)===hi};ne.isSuspense=function(e){return ht(e)===wi};ne.isSuspenseList=function(e){return ht(e)===Si};ne.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pi||e===mi||e===hi||e===wi||e===Si||e===Ly||typeof e=="object"&&e!==null&&(e.$$typeof===xi||e.$$typeof===Ei||e.$$typeof===vi||e.$$typeof===yi||e.$$typeof===gi||e.$$typeof===Dp||e.getModuleId!==void 0)};ne.typeOf=ht;function Ny(){const e=hy();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],l=t;for(;l;)r.push(l),l=l.next;return r},subscribe(r){let l=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!l||t===null||(l=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const zc={notify(){},get:()=>[]};function Dy(e,t){let n,r=zc,l=0,o=!1;function i(S){d();const R=r.subscribe(S);let h=!1;return()=>{h||(h=!0,R(),f())}}function u(){r.notify()}function a(){x.onStateChange&&x.onStateChange()}function s(){return o}function d(){l++,n||(n=e.subscribe(a),r=Ny())}function f(){l--,n&&l===0&&(n(),n=void 0,r.clear(),r=zc)}function m(){o||(o=!0,d())}function w(){o&&(o=!1,f())}const x={addNestedSub:i,notifyNestedSubs:u,handleChangeWrapper:a,isSubscribed:s,trySubscribe:m,tryUnsubscribe:w,getListeners:()=>r};return x}const My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zy=My?C.useLayoutEffect:C.useEffect;function jy({store:e,context:t,children:n,serverState:r,stabilityCheck:l="once",noopCheck:o="once"}){const i=C.useMemo(()=>{const s=Dy(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0,stabilityCheck:l,noopCheck:o}},[e,r,l,o]),u=C.useMemo(()=>e.getState(),[e]);zy(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),u!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,u]);const a=t||vn;return C.createElement(a.Provider,{value:i},n)}function Mp(e=vn){const t=e===vn?Cp:qa(e);return function(){const{store:r}=t();return r}}const Oy=Mp();function Iy(e=vn){const t=e===vn?Oy:Mp(e);return function(){return t().dispatch}}const Fy=Iy();yy(fy.useSyncExternalStoreWithSelector);py(ti.unstable_batchedUpdates);/** + */var ns=Symbol.for("react.element"),rs=Symbol.for("react.portal"),pi=Symbol.for("react.fragment"),hi=Symbol.for("react.strict_mode"),mi=Symbol.for("react.profiler"),vi=Symbol.for("react.provider"),yi=Symbol.for("react.context"),Ty=Symbol.for("react.server_context"),gi=Symbol.for("react.forward_ref"),wi=Symbol.for("react.suspense"),Si=Symbol.for("react.suspense_list"),Ei=Symbol.for("react.memo"),xi=Symbol.for("react.lazy"),Ly=Symbol.for("react.offscreen"),Dp;Dp=Symbol.for("react.module.reference");function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ns:switch(e=e.type,e){case pi:case mi:case hi:case wi:case Si:return e;default:switch(e=e&&e.$$typeof,e){case Ty:case yi:case gi:case xi:case Ei:case vi:return e;default:return t}}case rs:return t}}}ne.ContextConsumer=yi;ne.ContextProvider=vi;ne.Element=ns;ne.ForwardRef=gi;ne.Fragment=pi;ne.Lazy=xi;ne.Memo=Ei;ne.Portal=rs;ne.Profiler=mi;ne.StrictMode=hi;ne.Suspense=wi;ne.SuspenseList=Si;ne.isAsyncMode=function(){return!1};ne.isConcurrentMode=function(){return!1};ne.isContextConsumer=function(e){return ht(e)===yi};ne.isContextProvider=function(e){return ht(e)===vi};ne.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ns};ne.isForwardRef=function(e){return ht(e)===gi};ne.isFragment=function(e){return ht(e)===pi};ne.isLazy=function(e){return ht(e)===xi};ne.isMemo=function(e){return ht(e)===Ei};ne.isPortal=function(e){return ht(e)===rs};ne.isProfiler=function(e){return ht(e)===mi};ne.isStrictMode=function(e){return ht(e)===hi};ne.isSuspense=function(e){return ht(e)===wi};ne.isSuspenseList=function(e){return ht(e)===Si};ne.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pi||e===mi||e===hi||e===wi||e===Si||e===Ly||typeof e=="object"&&e!==null&&(e.$$typeof===xi||e.$$typeof===Ei||e.$$typeof===vi||e.$$typeof===yi||e.$$typeof===gi||e.$$typeof===Dp||e.getModuleId!==void 0)};ne.typeOf=ht;function Ny(){const e=hy();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],l=t;for(;l;)r.push(l),l=l.next;return r},subscribe(r){let l=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!l||t===null||(l=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const zc={notify(){},get:()=>[]};function Dy(e,t){let n,r=zc,l=0,o=!1;function i(S){d();const R=r.subscribe(S);let h=!1;return()=>{h||(h=!0,R(),c())}}function u(){r.notify()}function a(){x.onStateChange&&x.onStateChange()}function s(){return o}function d(){l++,n||(n=e.subscribe(a),r=Ny())}function c(){l--,n&&l===0&&(n(),n=void 0,r.clear(),r=zc)}function m(){o||(o=!0,d())}function w(){o&&(o=!1,c())}const x={addNestedSub:i,notifyNestedSubs:u,handleChangeWrapper:a,isSubscribed:s,trySubscribe:m,tryUnsubscribe:w,getListeners:()=>r};return x}const My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zy=My?C.useLayoutEffect:C.useEffect;function jy({store:e,context:t,children:n,serverState:r,stabilityCheck:l="once",noopCheck:o="once"}){const i=C.useMemo(()=>{const s=Dy(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0,stabilityCheck:l,noopCheck:o}},[e,r,l,o]),u=C.useMemo(()=>e.getState(),[e]);zy(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),u!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,u]);const a=t||vn;return C.createElement(a.Provider,{value:i},n)}function Mp(e=vn){const t=e===vn?Cp:qa(e);return function(){const{store:r}=t();return r}}const Oy=Mp();function Iy(e=vn){const t=e===vn?Oy:Mp(e);return function(){return t().dispatch}}const Fy=Iy();yy(fy.useSyncExternalStoreWithSelector);py(ti.unstable_batchedUpdates);/** * @remix-run/router v1.19.2 * * Copyright (c) Remix Software Inc. @@ -78,9 +78,9 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function wr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uy(){return Math.random().toString(36).substr(2,8)}function Oc(e,t){return{usr:e.state,key:e.key,idx:t}}function hl(e,t,n,r){return n===void 0&&(n=null),fe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sn(t):t,{state:n,key:t&&t.key||r||Uy()})}function El(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Sn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ay(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,u=xe.Pop,a=null,s=d();s==null&&(s=0,i.replaceState(fe({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function f(){u=xe.Pop;let R=d(),h=R==null?null:R-s;s=R,a&&a({action:u,location:S.location,delta:h})}function m(R,h){u=xe.Push;let c=hl(S.location,R,h);s=d()+1;let g=Oc(c,s),k=S.createHref(c);try{i.pushState(g,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;l.location.assign(k)}o&&a&&a({action:u,location:S.location,delta:1})}function w(R,h){u=xe.Replace;let c=hl(S.location,R,h);s=d();let g=Oc(c,s),k=S.createHref(c);i.replaceState(g,"",k),o&&a&&a({action:u,location:S.location,delta:0})}function x(R){let h=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof R=="string"?R:El(R);return c=c.replace(/ $/,"%20"),X(h,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,h)}let S={get action(){return u},get location(){return e(l,i)},listen(R){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(jc,f),a=R,()=>{l.removeEventListener(jc,f),a=null}},createHref(R){return t(l,R)},createURL:x,encodeLocation(R){let h=x(R);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:w,go(R){return i.go(R)}};return S}var te;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(te||(te={}));const By=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vy(e){return e.index===!0}function ml(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,String(o)],u=typeof l.id=="string"?l.id:i.join("-");if(X(l.index!==!0||!l.children,"Cannot specify children on an index route"),X(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Vy(l)){let a=fe({},l,t(l),{id:u});return r[u]=a,a}else{let a=fe({},l,t(l),{id:u,children:void 0});return r[u]=a,l.children&&(a.children=ml(l.children,t,i,r)),a}})}function Pn(e,t,n){return n===void 0&&(n="/"),so(e,t,n,!1)}function so(e,t,n,r){let l=typeof t=="string"?Sn(t):t,o=xl(l.pathname||"/",n);if(o==null)return null;let i=zp(e);Wy(i);let u=null;for(let a=0;u==null&&a{let a={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};a.relativePath.startsWith("/")&&(X(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let s=pn([r,a.relativePath]),d=n.concat(a);o.children&&o.children.length>0&&(X(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),zp(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:Zy(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))l(o,i);else for(let a of jp(o.path))l(o,i,a)}),t}function jp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=jp(r.join("/")),u=[];return u.push(...i.map(a=>a===""?o:[o,a].join("/"))),l&&u.push(...i),u.map(a=>e.startsWith("/")&&a===""?"/":a)}function Wy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qy(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Qy=/^:[\w-]+$/,Ky=3,Yy=2,Xy=1,Gy=10,Jy=-2,Ic=e=>e==="*";function Zy(e,t){let n=e.split("/"),r=n.length;return n.some(Ic)&&(r+=Jy),t&&(r+=Yy),n.filter(l=>!Ic(l)).reduce((l,o)=>l+(Qy.test(o)?Ky:o===""?Xy:Gy),r)}function qy(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function by(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},o="/",i=[];for(let u=0;u{let{paramName:m,isOptional:w}=d;if(m==="*"){let S=u[f]||"";i=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=u[f];return w&&!x?s[m]=void 0:s[m]=(x||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function eg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),wr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,a)=>(r.push({paramName:u,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function tg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wr(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ng(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Sn(e):e;return{pathname:n?n.startsWith("/")?n:rg(n,t):t,search:og(r),hash:ig(l)}}function rg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function lu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Op(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ip(e,t){let n=Op(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fp(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Sn(e):(l=fe({},e),X(!l.pathname||!l.pathname.includes("?"),lu("?","pathname","search",l)),X(!l.pathname||!l.pathname.includes("#"),lu("#","pathname","hash",l)),X(!l.search||!l.search.includes("#"),lu("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,u;if(i==null)u=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;l.pathname=m.join("/")}u=f>=0?t[f]:"/"}let a=ng(l,u),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(s||d)&&(a.pathname+="/"),a}const pn=e=>e.join("/").replace(/\/\/+/g,"/"),lg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),og=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ig=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Oo{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ki(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $p=["post","put","patch","delete"],ug=new Set($p),ag=["get",...$p],sg=new Set(ag),cg=new Set([301,302,303,307,308]),fg=new Set([307,308]),ou={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},jr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ls=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Up="remix-router-transitions";function hg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let p=e.detectErrorBoundary;l=y=>({hasErrorBoundary:p(y)})}else l=pg;let o={},i=ml(e.routes,l,void 0,o),u,a=e.basename||"/",s=e.unstable_dataStrategy||Sg,d=e.unstable_patchRoutesOnNavigation,f=fe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,w=new Set,x=1e3,S=new Set,R=null,h=null,c=null,g=e.hydrationData!=null,k=Pn(i,e.history.location,a),T=null;if(k==null&&!d){let p=Ue(404,{pathname:e.history.location.pathname}),{matches:y,route:E}=Kc(i);k=y,T={[E.id]:p}}k&&!e.hydrationData&&Rl(k,i,e.history.location.pathname).active&&(k=null);let N;if(k)if(k.some(p=>p.route.lazy))N=!1;else if(!k.some(p=>p.route.loader))N=!0;else if(f.v7_partialHydration){let p=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,E=_=>_.route.loader?typeof _.route.loader=="function"&&_.route.loader.hydrate===!0?!1:p&&p[_.route.id]!==void 0||y&&y[_.route.id]!==void 0:!0;if(y){let _=k.findIndex(M=>y[M.route.id]!==void 0);N=k.slice(0,_+1).every(E)}else N=k.every(E)}else N=e.hydrationData!=null;else if(N=!1,k=[],f.v7_partialHydration){let p=Rl(null,i,e.history.location.pathname);p.active&&p.matches&&(k=p.matches)}let j,v={historyAction:e.history.action,location:e.history.location,matches:k,initialized:N,navigation:ou,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},B=xe.Pop,O=!1,Q,re=!1,Se=new Map,me=null,Ct=!1,mt=!1,Qt=[],D=new Set,F=new Map,W=0,le=-1,ie=new Map,We=new Set,Qe=new Map,Nt=new Map,Ne=new Set,it=new Map,En=new Map,bp=new Map,kl;function eh(){if(m=e.history.listen(p=>{let{action:y,location:E,delta:_}=p;if(kl){kl(),kl=void 0;return}wr(En.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let M=vs({currentLocation:v.location,nextLocation:E,historyAction:y});if(M&&_!=null){let A=new Promise(H=>{kl=H});e.history.go(_*-1),_l(M,{state:"blocked",location:E,proceed(){_l(M,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),A.then(()=>e.history.go(_))},reset(){let H=new Map(v.blockers);H.set(M,jr),$e({blockers:H})}});return}return xn(y,E)}),n){Og(t,Se);let p=()=>Ig(t,Se);t.addEventListener("pagehide",p),me=()=>t.removeEventListener("pagehide",p)}return v.initialized||xn(xe.Pop,v.location,{initialHydration:!0}),j}function th(){m&&m(),me&&me(),w.clear(),Q&&Q.abort(),v.fetchers.forEach((p,y)=>Cl(y)),v.blockers.forEach((p,y)=>ms(y))}function nh(p){return w.add(p),()=>w.delete(p)}function $e(p,y){y===void 0&&(y={}),v=fe({},v,p);let E=[],_=[];f.v7_fetcherPersist&&v.fetchers.forEach((M,A)=>{M.state==="idle"&&(Ne.has(A)?_.push(A):E.push(A))}),[...w].forEach(M=>M(v,{deletedFetchers:_,unstable_viewTransitionOpts:y.viewTransitionOpts,unstable_flushSync:y.flushSync===!0})),f.v7_fetcherPersist&&(E.forEach(M=>v.fetchers.delete(M)),_.forEach(M=>Cl(M)))}function An(p,y,E){var _,M;let{flushSync:A}=E===void 0?{}:E,H=v.actionData!=null&&v.navigation.formMethod!=null&&wt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((_=p.state)==null?void 0:_._isRedirect)!==!0,L;y.actionData?Object.keys(y.actionData).length>0?L=y.actionData:L=null:H?L=v.actionData:L=null;let V=y.loaderData?Wc(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,$=v.blockers;$.size>0&&($=new Map($),$.forEach((q,ue)=>$.set(ue,jr)));let U=O===!0||v.navigation.formMethod!=null&&wt(v.navigation.formMethod)&&((M=p.state)==null?void 0:M._isRedirect)!==!0;u&&(i=u,u=void 0),Ct||B===xe.Pop||(B===xe.Push?e.history.push(p,p.state):B===xe.Replace&&e.history.replace(p,p.state));let Z;if(B===xe.Pop){let q=Se.get(v.location.pathname);q&&q.has(p.pathname)?Z={currentLocation:v.location,nextLocation:p}:Se.has(p.pathname)&&(Z={currentLocation:p,nextLocation:v.location})}else if(re){let q=Se.get(v.location.pathname);q?q.add(p.pathname):(q=new Set([p.pathname]),Se.set(v.location.pathname,q)),Z={currentLocation:v.location,nextLocation:p}}$e(fe({},y,{actionData:L,loaderData:V,historyAction:B,location:p,initialized:!0,navigation:ou,revalidation:"idle",restoreScrollPosition:gs(p,y.matches||v.matches),preventScrollReset:U,blockers:$}),{viewTransitionOpts:Z,flushSync:A===!0}),B=xe.Pop,O=!1,re=!1,Ct=!1,mt=!1,Qt=[]}async function as(p,y){if(typeof p=="number"){e.history.go(p);return}let E=na(v.location,v.matches,a,f.v7_prependBasename,p,f.v7_relativeSplatPath,y==null?void 0:y.fromRouteId,y==null?void 0:y.relative),{path:_,submission:M,error:A}=$c(f.v7_normalizeFormMethod,!1,E,y),H=v.location,L=hl(v.location,_,y&&y.state);L=fe({},L,e.history.encodeLocation(L));let V=y&&y.replace!=null?y.replace:void 0,$=xe.Push;V===!0?$=xe.Replace:V===!1||M!=null&&wt(M.formMethod)&&M.formAction===v.location.pathname+v.location.search&&($=xe.Replace);let U=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,Z=(y&&y.unstable_flushSync)===!0,q=vs({currentLocation:H,nextLocation:L,historyAction:$});if(q){_l(q,{state:"blocked",location:L,proceed(){_l(q,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),as(p,y)},reset(){let ue=new Map(v.blockers);ue.set(q,jr),$e({blockers:ue})}});return}return await xn($,L,{submission:M,pendingError:A,preventScrollReset:U,replace:y&&y.replace,enableViewTransition:y&&y.unstable_viewTransition,flushSync:Z})}function rh(){if(Ti(),$e({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){xn(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}xn(B||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:re===!0})}}async function xn(p,y,E){Q&&Q.abort(),Q=null,B=p,Ct=(E&&E.startUninterruptedRevalidation)===!0,ph(v.location,v.matches),O=(E&&E.preventScrollReset)===!0,re=(E&&E.enableViewTransition)===!0;let _=u||i,M=E&&E.overrideNavigation,A=Pn(_,y,a),H=(E&&E.flushSync)===!0,L=Rl(A,_,y.pathname);if(L.active&&L.matches&&(A=L.matches),!A){let{error:G,notFoundMatches:Pe,route:Ee}=Li(y.pathname);An(y,{matches:Pe,loaderData:{},errors:{[Ee.id]:G}},{flushSync:H});return}if(v.initialized&&!mt&&Pg(v.location,y)&&!(E&&E.submission&&wt(E.submission.formMethod))){An(y,{matches:A},{flushSync:H});return}Q=new AbortController;let V=Wn(e.history,y,Q.signal,E&&E.submission),$;if(E&&E.pendingError)$=[lr(A).route.id,{type:te.error,error:E.pendingError}];else if(E&&E.submission&&wt(E.submission.formMethod)){let G=await lh(V,y,E.submission,A,L.active,{replace:E.replace,flushSync:H});if(G.shortCircuited)return;if(G.pendingActionResult){let[Pe,Ee]=G.pendingActionResult;if(be(Ee)&&ki(Ee.error)&&Ee.error.status===404){Q=null,An(y,{matches:G.matches,loaderData:{},errors:{[Pe]:Ee.error}});return}}A=G.matches||A,$=G.pendingActionResult,M=iu(y,E.submission),H=!1,L.active=!1,V=Wn(e.history,V.url,V.signal)}let{shortCircuited:U,matches:Z,loaderData:q,errors:ue}=await oh(V,y,A,L.active,M,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,H,$);U||(Q=null,An(y,fe({matches:Z||A},Qc($),{loaderData:q,errors:ue})))}async function lh(p,y,E,_,M,A){A===void 0&&(A={}),Ti();let H=zg(y,E);if($e({navigation:H},{flushSync:A.flushSync===!0}),M){let $=await Tl(_,y.pathname,p.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){let{boundaryId:U,error:Z}=Pl(y.pathname,$);return{matches:$.partialMatches,pendingActionResult:[U,{type:te.error,error:Z}]}}else if($.matches)_=$.matches;else{let{notFoundMatches:U,error:Z,route:q}=Li(y.pathname);return{matches:U,pendingActionResult:[q.id,{type:te.error,error:Z}]}}}let L,V=Br(_,y);if(!V.route.action&&!V.route.lazy)L={type:te.error,error:Ue(405,{method:p.method,pathname:y.pathname,routeId:V.route.id})};else if(L=(await Cr("action",v,p,[V],_,null))[V.route.id],p.signal.aborted)return{shortCircuited:!0};if(Nn(L)){let $;return A&&A.replace!=null?$=A.replace:$=Bc(L.response.headers.get("Location"),new URL(p.url),a)===v.location.pathname+v.location.search,await kn(p,L,!0,{submission:E,replace:$}),{shortCircuited:!0}}if(rn(L))throw Ue(400,{type:"defer-action"});if(be(L)){let $=lr(_,V.route.id);return(A&&A.replace)!==!0&&(B=xe.Push),{matches:_,pendingActionResult:[$.route.id,L]}}return{matches:_,pendingActionResult:[V.route.id,L]}}async function oh(p,y,E,_,M,A,H,L,V,$,U){let Z=M||iu(y,A),q=A||H||Xc(Z),ue=!Ct&&(!f.v7_partialHydration||!V);if(_){if(ue){let ve=ss(U);$e(fe({navigation:Z},ve!==void 0?{actionData:ve}:{}),{flushSync:$})}let K=await Tl(E,y.pathname,p.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{boundaryId:ve,error:Ze}=Pl(y.pathname,K);return{matches:K.partialMatches,loaderData:{},errors:{[ve]:Ze}}}else if(K.matches)E=K.matches;else{let{error:ve,notFoundMatches:Ze,route:ye}=Li(y.pathname);return{matches:Ze,loaderData:{},errors:{[ye.id]:ve}}}}let G=u||i,[Pe,Ee]=Uc(e.history,v,E,q,y,f.v7_partialHydration&&V===!0,f.v7_skipActionErrorRevalidation,mt,Qt,D,Ne,Qe,We,G,a,U);if(Ni(K=>!(E&&E.some(ve=>ve.route.id===K))||Pe&&Pe.some(ve=>ve.route.id===K)),le=++W,Pe.length===0&&Ee.length===0){let K=ps();return An(y,fe({matches:E,loaderData:{},errors:U&&be(U[1])?{[U[0]]:U[1].error}:null},Qc(U),K?{fetchers:new Map(v.fetchers)}:{}),{flushSync:$}),{shortCircuited:!0}}if(ue){let K={};if(!_){K.navigation=Z;let ve=ss(U);ve!==void 0&&(K.actionData=ve)}Ee.length>0&&(K.fetchers=ih(Ee)),$e(K,{flushSync:$})}Ee.forEach(K=>{F.has(K.key)&&Yt(K.key),K.controller&&F.set(K.key,K.controller)});let _r=()=>Ee.forEach(K=>Yt(K.key));Q&&Q.signal.addEventListener("abort",_r);let{loaderResults:Mt,fetcherResults:Bn}=await cs(v,E,Pe,Ee,p);if(p.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",_r),Ee.forEach(K=>F.delete(K.key));let Xt=Jl(Mt);if(Xt)return await kn(p,Xt.result,!0,{replace:L}),{shortCircuited:!0};if(Xt=Jl(Bn),Xt)return We.add(Xt.key),await kn(p,Xt.result,!0,{replace:L}),{shortCircuited:!0};let{loaderData:Ll,errors:zt}=Hc(v,E,Pe,Mt,U,Ee,Bn,it);it.forEach((K,ve)=>{K.subscribe(Ze=>{(Ze||K.done)&&it.delete(ve)})}),f.v7_partialHydration&&V&&v.errors&&Object.entries(v.errors).filter(K=>{let[ve]=K;return!Pe.some(Ze=>Ze.route.id===ve)}).forEach(K=>{let[ve,Ze]=K;zt=Object.assign(zt||{},{[ve]:Ze})});let Nl=ps(),Dl=hs(le),Ml=Nl||Dl||Ee.length>0;return fe({matches:E,loaderData:Ll,errors:zt},Ml?{fetchers:new Map(v.fetchers)}:{})}function ss(p){if(p&&!be(p[1]))return{[p[0]]:p[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function ih(p){return p.forEach(y=>{let E=v.fetchers.get(y.key),_=Or(void 0,E?E.data:void 0);v.fetchers.set(y.key,_)}),new Map(v.fetchers)}function uh(p,y,E,_){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");F.has(p)&&Yt(p);let M=(_&&_.unstable_flushSync)===!0,A=u||i,H=na(v.location,v.matches,a,f.v7_prependBasename,E,f.v7_relativeSplatPath,y,_==null?void 0:_.relative),L=Pn(A,H,a),V=Rl(L,A,H);if(V.active&&V.matches&&(L=V.matches),!L){Dt(p,y,Ue(404,{pathname:H}),{flushSync:M});return}let{path:$,submission:U,error:Z}=$c(f.v7_normalizeFormMethod,!0,H,_);if(Z){Dt(p,y,Z,{flushSync:M});return}let q=Br(L,$);if(O=(_&&_.preventScrollReset)===!0,U&&wt(U.formMethod)){ah(p,y,$,q,L,V.active,M,U);return}Qe.set(p,{routeId:y,path:$}),sh(p,y,$,q,L,V.active,M,U)}async function ah(p,y,E,_,M,A,H,L){Ti(),Qe.delete(p);function V(ye){if(!ye.route.action&&!ye.route.lazy){let jt=Ue(405,{method:L.formMethod,pathname:E,routeId:y});return Dt(p,y,jt,{flushSync:H}),!0}return!1}if(!A&&V(_))return;let $=v.fetchers.get(p);Kt(p,jg(L,$),{flushSync:H});let U=new AbortController,Z=Wn(e.history,E,U.signal,L);if(A){let ye=await Tl(M,E,Z.signal);if(ye.type==="aborted")return;if(ye.type==="error"){let{error:jt}=Pl(E,ye);Dt(p,y,jt,{flushSync:H});return}else if(ye.matches){if(M=ye.matches,_=Br(M,E),V(_))return}else{Dt(p,y,Ue(404,{pathname:E}),{flushSync:H});return}}F.set(p,U);let q=W,G=(await Cr("action",v,Z,[_],M,p))[_.route.id];if(Z.signal.aborted){F.get(p)===U&&F.delete(p);return}if(f.v7_fetcherPersist&&Ne.has(p)){if(Nn(G)||be(G)){Kt(p,Jt(void 0));return}}else{if(Nn(G))if(F.delete(p),le>q){Kt(p,Jt(void 0));return}else return We.add(p),Kt(p,Or(L)),kn(Z,G,!1,{fetcherSubmission:L});if(be(G)){Dt(p,y,G.error);return}}if(rn(G))throw Ue(400,{type:"defer-action"});let Pe=v.navigation.location||v.location,Ee=Wn(e.history,Pe,U.signal),_r=u||i,Mt=v.navigation.state!=="idle"?Pn(_r,v.navigation.location,a):v.matches;X(Mt,"Didn't find any matches after fetcher action");let Bn=++W;ie.set(p,Bn);let Xt=Or(L,G.data);v.fetchers.set(p,Xt);let[Ll,zt]=Uc(e.history,v,Mt,L,Pe,!1,f.v7_skipActionErrorRevalidation,mt,Qt,D,Ne,Qe,We,_r,a,[_.route.id,G]);zt.filter(ye=>ye.key!==p).forEach(ye=>{let jt=ye.key,Ss=v.fetchers.get(jt),vh=Or(void 0,Ss?Ss.data:void 0);v.fetchers.set(jt,vh),F.has(jt)&&Yt(jt),ye.controller&&F.set(jt,ye.controller)}),$e({fetchers:new Map(v.fetchers)});let Nl=()=>zt.forEach(ye=>Yt(ye.key));U.signal.addEventListener("abort",Nl);let{loaderResults:Dl,fetcherResults:Ml}=await cs(v,Mt,Ll,zt,Ee);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Nl),ie.delete(p),F.delete(p),zt.forEach(ye=>F.delete(ye.key));let K=Jl(Dl);if(K)return kn(Ee,K.result,!1);if(K=Jl(Ml),K)return We.add(K.key),kn(Ee,K.result,!1);let{loaderData:ve,errors:Ze}=Hc(v,Mt,Ll,Dl,void 0,zt,Ml,it);if(v.fetchers.has(p)){let ye=Jt(G.data);v.fetchers.set(p,ye)}hs(Bn),v.navigation.state==="loading"&&Bn>le?(X(B,"Expected pending action"),Q&&Q.abort(),An(v.navigation.location,{matches:Mt,loaderData:ve,errors:Ze,fetchers:new Map(v.fetchers)})):($e({errors:Ze,loaderData:Wc(v.loaderData,ve,Mt,Ze),fetchers:new Map(v.fetchers)}),mt=!1)}async function sh(p,y,E,_,M,A,H,L){let V=v.fetchers.get(p);Kt(p,Or(L,V?V.data:void 0),{flushSync:H});let $=new AbortController,U=Wn(e.history,E,$.signal);if(A){let G=await Tl(M,E,U.signal);if(G.type==="aborted")return;if(G.type==="error"){let{error:Pe}=Pl(E,G);Dt(p,y,Pe,{flushSync:H});return}else if(G.matches)M=G.matches,_=Br(M,E);else{Dt(p,y,Ue(404,{pathname:E}),{flushSync:H});return}}F.set(p,$);let Z=W,ue=(await Cr("loader",v,U,[_],M,p))[_.route.id];if(rn(ue)&&(ue=await os(ue,U.signal,!0)||ue),F.get(p)===$&&F.delete(p),!U.signal.aborted){if(Ne.has(p)){Kt(p,Jt(void 0));return}if(Nn(ue))if(le>Z){Kt(p,Jt(void 0));return}else{We.add(p),await kn(U,ue,!1);return}if(be(ue)){Dt(p,y,ue.error);return}X(!rn(ue),"Unhandled fetcher deferred data"),Kt(p,Jt(ue.data))}}async function kn(p,y,E,_){let{submission:M,fetcherSubmission:A,replace:H}=_===void 0?{}:_;y.response.headers.has("X-Remix-Revalidate")&&(mt=!0);let L=y.response.headers.get("Location");X(L,"Expected a Location header on the redirect Response"),L=Bc(L,new URL(p.url),a);let V=hl(v.location,L,{_isRedirect:!0});if(n){let G=!1;if(y.response.headers.has("X-Remix-Reload-Document"))G=!0;else if(ls.test(L)){const Pe=e.history.createURL(L);G=Pe.origin!==t.location.origin||xl(Pe.pathname,a)==null}if(G){H?t.location.replace(L):t.location.assign(L);return}}Q=null;let $=H===!0||y.response.headers.has("X-Remix-Replace")?xe.Replace:xe.Push,{formMethod:U,formAction:Z,formEncType:q}=v.navigation;!M&&!A&&U&&Z&&q&&(M=Xc(v.navigation));let ue=M||A;if(fg.has(y.response.status)&&ue&&wt(ue.formMethod))await xn($,V,{submission:fe({},ue,{formAction:L}),preventScrollReset:O,enableViewTransition:E?re:void 0});else{let G=iu(V,M);await xn($,V,{overrideNavigation:G,fetcherSubmission:A,preventScrollReset:O,enableViewTransition:E?re:void 0})}}async function Cr(p,y,E,_,M,A){let H,L={};try{H=await Eg(s,p,y,E,_,M,A,o,l)}catch(V){return _.forEach($=>{L[$.route.id]={type:te.error,error:V}}),L}for(let[V,$]of Object.entries(H))if(Tg($)){let U=$.result;L[V]={type:te.redirect,response:Cg(U,E,V,M,a,f.v7_relativeSplatPath)}}else L[V]=await kg($);return L}async function cs(p,y,E,_,M){let A=p.matches,H=Cr("loader",p,M,E,y,null),L=Promise.all(_.map(async U=>{if(U.matches&&U.match&&U.controller){let q=(await Cr("loader",p,Wn(e.history,U.path,U.controller.signal),[U.match],U.matches,U.key))[U.match.route.id];return{[U.key]:q}}else return Promise.resolve({[U.key]:{type:te.error,error:Ue(404,{pathname:U.path})}})})),V=await H,$=(await L).reduce((U,Z)=>Object.assign(U,Z),{});return await Promise.all([Dg(y,V,M.signal,A,p.loaderData),Mg(y,$,_)]),{loaderResults:V,fetcherResults:$}}function Ti(){mt=!0,Qt.push(...Ni()),Qe.forEach((p,y)=>{F.has(y)&&(D.add(y),Yt(y))})}function Kt(p,y,E){E===void 0&&(E={}),v.fetchers.set(p,y),$e({fetchers:new Map(v.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Dt(p,y,E,_){_===void 0&&(_={});let M=lr(v.matches,y);Cl(p),$e({errors:{[M.route.id]:E},fetchers:new Map(v.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function fs(p){return f.v7_fetcherPersist&&(Nt.set(p,(Nt.get(p)||0)+1),Ne.has(p)&&Ne.delete(p)),v.fetchers.get(p)||dg}function Cl(p){let y=v.fetchers.get(p);F.has(p)&&!(y&&y.state==="loading"&&ie.has(p))&&Yt(p),Qe.delete(p),ie.delete(p),We.delete(p),Ne.delete(p),D.delete(p),v.fetchers.delete(p)}function ch(p){if(f.v7_fetcherPersist){let y=(Nt.get(p)||0)-1;y<=0?(Nt.delete(p),Ne.add(p)):Nt.set(p,y)}else Cl(p);$e({fetchers:new Map(v.fetchers)})}function Yt(p){let y=F.get(p);X(y,"Expected fetch controller: "+p),y.abort(),F.delete(p)}function ds(p){for(let y of p){let E=fs(y),_=Jt(E.data);v.fetchers.set(y,_)}}function ps(){let p=[],y=!1;for(let E of We){let _=v.fetchers.get(E);X(_,"Expected fetcher: "+E),_.state==="loading"&&(We.delete(E),p.push(E),y=!0)}return ds(p),y}function hs(p){let y=[];for(let[E,_]of ie)if(_0}function fh(p,y){let E=v.blockers.get(p)||jr;return En.get(p)!==y&&En.set(p,y),E}function ms(p){v.blockers.delete(p),En.delete(p)}function _l(p,y){let E=v.blockers.get(p)||jr;X(E.state==="unblocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="proceeding"||E.state==="blocked"&&y.state==="unblocked"||E.state==="proceeding"&&y.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+y.state);let _=new Map(v.blockers);_.set(p,y),$e({blockers:_})}function vs(p){let{currentLocation:y,nextLocation:E,historyAction:_}=p;if(En.size===0)return;En.size>1&&wr(!1,"A router only supports one blocker at a time");let M=Array.from(En.entries()),[A,H]=M[M.length-1],L=v.blockers.get(A);if(!(L&&L.state==="proceeding")&&H({currentLocation:y,nextLocation:E,historyAction:_}))return A}function Li(p){let y=Ue(404,{pathname:p}),E=u||i,{matches:_,route:M}=Kc(E);return Ni(),{notFoundMatches:_,route:M,error:y}}function Pl(p,y){return{boundaryId:lr(y.partialMatches).route.id,error:Ue(400,{type:"route-discovery",pathname:p,message:y.error!=null&&"message"in y.error?y.error:String(y.error)})}}function Ni(p){let y=[];return it.forEach((E,_)=>{(!p||p(_))&&(E.cancel(),y.push(_),it.delete(_))}),y}function dh(p,y,E){if(R=p,c=y,h=E||null,!g&&v.navigation===ou){g=!0;let _=gs(v.location,v.matches);_!=null&&$e({restoreScrollPosition:_})}return()=>{R=null,c=null,h=null}}function ys(p,y){return h&&h(p,y.map(_=>Hy(_,v.loaderData)))||p.key}function ph(p,y){if(R&&c){let E=ys(p,y);R[E]=c()}}function gs(p,y){if(R){let E=ys(p,y),_=R[E];if(typeof _=="number")return _}return null}function Rl(p,y,E){if(d){if(S.has(E))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:so(y,E,a,!0)}}else return{active:!0,matches:so(y,E,a,!0)||[]}}return{active:!1,matches:null}}async function Tl(p,y,E){let _=p;for(;;){let M=u==null,A=u||i;try{await gg(d,y,_,A,o,l,bp,E)}catch(V){return{type:"error",error:V,partialMatches:_}}finally{M&&(i=[...i])}if(E.aborted)return{type:"aborted"};let H=Pn(A,y,a);if(H)return ws(y,S),{type:"success",matches:H};let L=so(A,y,a,!0);if(!L||_.length===L.length&&_.every((V,$)=>V.route.id===L[$].route.id))return ws(y,S),{type:"success",matches:null};_=L}}function ws(p,y){if(y.size>=x){let E=y.values().next().value;y.delete(E)}y.add(p)}function hh(p){o={},u=ml(p,l,void 0,o)}function mh(p,y){let E=u==null;Bp(p,y,u||i,o,l),E&&(i=[...i],$e({}))}return j={get basename(){return a},get future(){return f},get state(){return v},get routes(){return i},get window(){return t},initialize:eh,subscribe:nh,enableScrollRestoration:dh,navigate:as,fetch:uh,revalidate:rh,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:fs,deleteFetcher:ch,dispose:th,getBlocker:fh,deleteBlocker:ms,patchRoutes:mh,_internalFetchControllers:F,_internalActiveDeferreds:it,_internalSetRoutes:hh},j}function mg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function na(e,t,n,r,l,o,i,u){let a,s;if(i){a=[];for(let f of t)if(a.push(f),f.route.id===i){s=f;break}}else a=t,s=t[t.length-1];let d=Fp(l||".",Ip(a,o),xl(e.pathname,n)||e.pathname,u==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!is(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:pn([n,d.pathname])),El(d)}function $c(e,t,n,r){if(!r||!mg(r))return{path:n};if(r.formMethod&&!Ng(r.formMethod))return{path:n,error:Ue(405,{method:r.formMethod})};let l=()=>({path:n,error:Ue(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),u=Vp(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!wt(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,x)=>{let[S,R]=x;return""+w+S+"="+R+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!wt(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:u,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}X(typeof FormData=="function","FormData is not available in this environment");let a,s;if(r.formData)a=ra(r.formData),s=r.formData;else if(r.body instanceof FormData)a=ra(r.body),s=r.body;else if(r.body instanceof URLSearchParams)a=r.body,s=Vc(a);else if(r.body==null)a=new URLSearchParams,s=new FormData;else try{a=new URLSearchParams(r.body),s=Vc(a)}catch{return l()}let d={formMethod:i,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(wt(d.formMethod))return{path:n,submission:d};let f=Sn(n);return t&&f.search&&is(f.search)&&a.append("index",""),f.search="?"+a,{path:El(f),submission:d}}function vg(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Uc(e,t,n,r,l,o,i,u,a,s,d,f,m,w,x,S){let R=S?be(S[1])?S[1].error:S[1].data:void 0,h=e.createURL(t.location),c=e.createURL(l),g=S&&be(S[1])?S[0]:void 0,k=g?vg(n,g):n,T=S?S[1].statusCode:void 0,N=i&&T&&T>=400,j=k.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(yg(t.loaderData,t.matches[O],B)||a.some(me=>me===B.route.id))return!0;let re=t.matches[O],Se=B;return Ac(B,fe({currentUrl:h,currentParams:re.params,nextUrl:c,nextParams:Se.params},r,{actionResult:R,actionStatus:T,defaultShouldRevalidate:N?!1:u||h.pathname+h.search===c.pathname+c.search||h.search!==c.search||Ap(re,Se)}))}),v=[];return f.forEach((B,O)=>{if(o||!n.some(Ct=>Ct.route.id===B.routeId)||d.has(O))return;let Q=Pn(w,B.path,x);if(!Q){v.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let re=t.fetchers.get(O),Se=Br(Q,B.path),me=!1;m.has(O)?me=!1:s.has(O)?(s.delete(O),me=!0):re&&re.state!=="idle"&&re.data===void 0?me=u:me=Ac(Se,fe({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:R,actionStatus:T,defaultShouldRevalidate:N?!1:u})),me&&v.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:Se,controller:new AbortController})}),[j,v]}function yg(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Ap(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ac(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function gg(e,t,n,r,l,o,i,u){let a=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(a);s||(s=e({path:t,matches:n,patch:(d,f)=>{u.aborted||Bp(d,f,r,l,o)}}),i.set(a,s)),s&&Rg(s)&&await s}finally{i.delete(a)}}function Bp(e,t,n,r,l){if(e){var o;let i=r[e];X(i,"No route found to patch children into: routeId = "+e);let u=ml(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...u):i.children=u}else{let i=ml(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function wg(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];X(l,"No route found in manifest");let o={};for(let i in r){let a=l[i]!==void 0&&i!=="hasErrorBoundary";wr(!a,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!a&&!By.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,fe({},t(l),{lazy:void 0}))}async function Sg(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Eg(e,t,n,r,l,o,i,u,a,s){let d=o.map(w=>w.route.lazy?wg(w.route,a,u):void 0),f=o.map((w,x)=>{let S=d[x],R=l.some(c=>c.route.id===w.route.id);return fe({},w,{shouldLoad:R,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(R=!0),R?xg(t,r,w,S,c,s):Promise.resolve({type:te.data,result:void 0}))})}),m=await e({matches:f,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function xg(e,t,n,r,l,o){let i,u,a=s=>{let d,f=new Promise((x,S)=>d=S);u=()=>d(),t.signal.addEventListener("abort",u);let m=x=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...x!==void 0?[x]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(S=>m(S)):m())}}catch(x){return{type:"error",result:x}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([a(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=f}else if(await r,s=n.route[e],s)i=await a(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ue(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:te.data,result:void 0};else if(s)i=await a(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ue(404,{pathname:f})}X(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:te.error,result:s}}finally{u&&t.signal.removeEventListener("abort",u)}return i}async function kg(e){let{result:t,type:n}=e;if(Hp(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:te.error,error:d}}return n===te.error?{type:te.error,error:new Oo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:te.data,data:s,statusCode:t.status,headers:t.headers}}if(n===te.error){if(Yc(t)){var r;if(t.data instanceof Error){var l;return{type:te.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new Oo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:te.error,error:t,statusCode:ki(t)?t.status:void 0}}if(Lg(t)){var o,i;return{type:te.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(Yc(t)){var u,a;return{type:te.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:te.data,data:t}}function Cg(e,t,n,r,l,o){let i=e.headers.get("Location");if(X(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ls.test(i)){let u=r.slice(0,r.findIndex(a=>a.route.id===n)+1);i=na(new URL(t.url),u,l,!0,i,o),e.headers.set("Location",i)}return e}function Bc(e,t,n){if(ls.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=xl(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function Wn(e,t,n,r){let l=e.createURL(Vp(t)).toString(),o={signal:n};if(r&&wt(r.formMethod)){let{formMethod:i,formEncType:u}=r;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=ra(r.formData):o.body=r.formData}return new Request(l,o)}function ra(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Vc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _g(e,t,n,r,l){let o={},i=null,u,a=!1,s={},d=n&&be(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,w=t[m];if(X(!Nn(w),"Cannot handle redirect results in processLoaderData"),be(w)){let x=w.error;d!==void 0&&(x=d,d=void 0),i=i||{};{let S=lr(e,m);i[S.route.id]==null&&(i[S.route.id]=x)}o[m]=void 0,a||(a=!0,u=ki(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else rn(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!a&&(u=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!a&&(u=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:s}}function Hc(e,t,n,r,l,o,i,u){let{loaderData:a,errors:s}=_g(t,r,l,u);return o.forEach(d=>{let{key:f,match:m,controller:w}=d,x=i[f];if(X(x,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(be(x)){let S=lr(e.matches,m==null?void 0:m.route.id);s&&s[S.route.id]||(s=fe({},s,{[S.route.id]:x.error})),e.fetchers.delete(f)}else if(Nn(x))X(!1,"Unhandled fetcher revalidation redirect");else if(rn(x))X(!1,"Unhandled fetcher deferred data");else{let S=Jt(x.data);e.fetchers.set(f,S)}}),{loaderData:a,errors:s}}function Wc(e,t,n,r){let l=fe({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function Qc(e){return e?be(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function lr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Kc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ue(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,u="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(u="Bad Request",o==="route-discovery"?a='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: -`+i):l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(u="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",a='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Oo(e||500,u,new Error(a),!0)}function Jl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Nn(l))return{key:r,result:l}}}function Vp(e){let t=typeof e=="string"?Sn(e):e;return El(fe({},t,{hash:""}))}function Pg(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Rg(e){return typeof e=="object"&&e!=null&&"then"in e}function Tg(e){return Hp(e.result)&&cg.has(e.result.status)}function rn(e){return e.type===te.deferred}function be(e){return e.type===te.error}function Nn(e){return(e&&e.type)===te.redirect}function Yc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Lg(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Hp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ng(e){return sg.has(e.toLowerCase())}function wt(e){return ug.has(e.toLowerCase())}async function Dg(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i(m==null?void 0:m.route.id)===u);if(!s)continue;let d=r.find(m=>m.route.id===s.route.id),f=d!=null&&!Ap(d,s)&&(l&&l[s.route.id])!==void 0;rn(a)&&f&&await os(a,n,!1).then(m=>{m&&(t[u]=m)})}}async function Mg(e,t,n){for(let r=0;r(s==null?void 0:s.route.id)===o)&&rn(u)&&(X(i,"Expected an AbortController for revalidating fetcher deferred result"),await os(u,i.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function os(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:te.data,data:e.deferredData.unwrappedData}}catch(l){return{type:te.error,error:l}}return{type:te.data,data:e.deferredData.data}}}function is(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Br(e,t){let n=typeof t=="string"?Sn(t).search:t.search;if(e[e.length-1].route.index&&is(n||""))return e[e.length-1];let r=Op(e);return r[r.length-1]}function Xc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function iu(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zg(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Or(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function jg(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Jt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Og(e,t){try{let n=e.sessionStorage.getItem(Up);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Ig(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Up,JSON.stringify(n))}catch(r){wr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function wr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uy(){return Math.random().toString(36).substr(2,8)}function Oc(e,t){return{usr:e.state,key:e.key,idx:t}}function hl(e,t,n,r){return n===void 0&&(n=null),fe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sn(t):t,{state:n,key:t&&t.key||r||Uy()})}function El(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Sn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ay(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,u=xe.Pop,a=null,s=d();s==null&&(s=0,i.replaceState(fe({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function c(){u=xe.Pop;let R=d(),h=R==null?null:R-s;s=R,a&&a({action:u,location:S.location,delta:h})}function m(R,h){u=xe.Push;let f=hl(S.location,R,h);s=d()+1;let g=Oc(f,s),k=S.createHref(f);try{i.pushState(g,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;l.location.assign(k)}o&&a&&a({action:u,location:S.location,delta:1})}function w(R,h){u=xe.Replace;let f=hl(S.location,R,h);s=d();let g=Oc(f,s),k=S.createHref(f);i.replaceState(g,"",k),o&&a&&a({action:u,location:S.location,delta:0})}function x(R){let h=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof R=="string"?R:El(R);return f=f.replace(/ $/,"%20"),X(h,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,h)}let S={get action(){return u},get location(){return e(l,i)},listen(R){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(jc,c),a=R,()=>{l.removeEventListener(jc,c),a=null}},createHref(R){return t(l,R)},createURL:x,encodeLocation(R){let h=x(R);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:w,go(R){return i.go(R)}};return S}var te;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(te||(te={}));const By=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vy(e){return e.index===!0}function ml(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,String(o)],u=typeof l.id=="string"?l.id:i.join("-");if(X(l.index!==!0||!l.children,"Cannot specify children on an index route"),X(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Vy(l)){let a=fe({},l,t(l),{id:u});return r[u]=a,a}else{let a=fe({},l,t(l),{id:u,children:void 0});return r[u]=a,l.children&&(a.children=ml(l.children,t,i,r)),a}})}function Pn(e,t,n){return n===void 0&&(n="/"),so(e,t,n,!1)}function so(e,t,n,r){let l=typeof t=="string"?Sn(t):t,o=xl(l.pathname||"/",n);if(o==null)return null;let i=zp(e);Wy(i);let u=null;for(let a=0;u==null&&a{let a={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};a.relativePath.startsWith("/")&&(X(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let s=pn([r,a.relativePath]),d=n.concat(a);o.children&&o.children.length>0&&(X(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),zp(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:Zy(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))l(o,i);else for(let a of jp(o.path))l(o,i,a)}),t}function jp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=jp(r.join("/")),u=[];return u.push(...i.map(a=>a===""?o:[o,a].join("/"))),l&&u.push(...i),u.map(a=>e.startsWith("/")&&a===""?"/":a)}function Wy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qy(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Qy=/^:[\w-]+$/,Ky=3,Yy=2,Xy=1,Gy=10,Jy=-2,Ic=e=>e==="*";function Zy(e,t){let n=e.split("/"),r=n.length;return n.some(Ic)&&(r+=Jy),t&&(r+=Yy),n.filter(l=>!Ic(l)).reduce((l,o)=>l+(Qy.test(o)?Ky:o===""?Xy:Gy),r)}function qy(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function by(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},o="/",i=[];for(let u=0;u{let{paramName:m,isOptional:w}=d;if(m==="*"){let S=u[c]||"";i=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=u[c];return w&&!x?s[m]=void 0:s[m]=(x||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function eg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),wr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,a)=>(r.push({paramName:u,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function tg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wr(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ng(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Sn(e):e;return{pathname:n?n.startsWith("/")?n:rg(n,t):t,search:og(r),hash:ig(l)}}function rg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function lu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Op(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ip(e,t){let n=Op(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fp(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Sn(e):(l=fe({},e),X(!l.pathname||!l.pathname.includes("?"),lu("?","pathname","search",l)),X(!l.pathname||!l.pathname.includes("#"),lu("#","pathname","hash",l)),X(!l.search||!l.search.includes("#"),lu("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,u;if(i==null)u=n;else{let c=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),c-=1;l.pathname=m.join("/")}u=c>=0?t[c]:"/"}let a=ng(l,u),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(s||d)&&(a.pathname+="/"),a}const pn=e=>e.join("/").replace(/\/\/+/g,"/"),lg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),og=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ig=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Oo{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ki(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $p=["post","put","patch","delete"],ug=new Set($p),ag=["get",...$p],sg=new Set(ag),cg=new Set([301,302,303,307,308]),fg=new Set([307,308]),ou={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},jr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ls=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Up="remix-router-transitions";function hg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let p=e.detectErrorBoundary;l=y=>({hasErrorBoundary:p(y)})}else l=pg;let o={},i=ml(e.routes,l,void 0,o),u,a=e.basename||"/",s=e.unstable_dataStrategy||Sg,d=e.unstable_patchRoutesOnNavigation,c=fe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,w=new Set,x=1e3,S=new Set,R=null,h=null,f=null,g=e.hydrationData!=null,k=Pn(i,e.history.location,a),T=null;if(k==null&&!d){let p=Ue(404,{pathname:e.history.location.pathname}),{matches:y,route:E}=Kc(i);k=y,T={[E.id]:p}}k&&!e.hydrationData&&Rl(k,i,e.history.location.pathname).active&&(k=null);let N;if(k)if(k.some(p=>p.route.lazy))N=!1;else if(!k.some(p=>p.route.loader))N=!0;else if(c.v7_partialHydration){let p=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,E=_=>_.route.loader?typeof _.route.loader=="function"&&_.route.loader.hydrate===!0?!1:p&&p[_.route.id]!==void 0||y&&y[_.route.id]!==void 0:!0;if(y){let _=k.findIndex(M=>y[M.route.id]!==void 0);N=k.slice(0,_+1).every(E)}else N=k.every(E)}else N=e.hydrationData!=null;else if(N=!1,k=[],c.v7_partialHydration){let p=Rl(null,i,e.history.location.pathname);p.active&&p.matches&&(k=p.matches)}let j,v={historyAction:e.history.action,location:e.history.location,matches:k,initialized:N,navigation:ou,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},B=xe.Pop,O=!1,Q,re=!1,Se=new Map,me=null,Ct=!1,mt=!1,Qt=[],D=new Set,F=new Map,W=0,le=-1,ie=new Map,We=new Set,Qe=new Map,Nt=new Map,Ne=new Set,it=new Map,En=new Map,bp=new Map,kl;function eh(){if(m=e.history.listen(p=>{let{action:y,location:E,delta:_}=p;if(kl){kl(),kl=void 0;return}wr(En.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let M=vs({currentLocation:v.location,nextLocation:E,historyAction:y});if(M&&_!=null){let A=new Promise(H=>{kl=H});e.history.go(_*-1),_l(M,{state:"blocked",location:E,proceed(){_l(M,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),A.then(()=>e.history.go(_))},reset(){let H=new Map(v.blockers);H.set(M,jr),$e({blockers:H})}});return}return xn(y,E)}),n){Og(t,Se);let p=()=>Ig(t,Se);t.addEventListener("pagehide",p),me=()=>t.removeEventListener("pagehide",p)}return v.initialized||xn(xe.Pop,v.location,{initialHydration:!0}),j}function th(){m&&m(),me&&me(),w.clear(),Q&&Q.abort(),v.fetchers.forEach((p,y)=>Cl(y)),v.blockers.forEach((p,y)=>ms(y))}function nh(p){return w.add(p),()=>w.delete(p)}function $e(p,y){y===void 0&&(y={}),v=fe({},v,p);let E=[],_=[];c.v7_fetcherPersist&&v.fetchers.forEach((M,A)=>{M.state==="idle"&&(Ne.has(A)?_.push(A):E.push(A))}),[...w].forEach(M=>M(v,{deletedFetchers:_,unstable_viewTransitionOpts:y.viewTransitionOpts,unstable_flushSync:y.flushSync===!0})),c.v7_fetcherPersist&&(E.forEach(M=>v.fetchers.delete(M)),_.forEach(M=>Cl(M)))}function An(p,y,E){var _,M;let{flushSync:A}=E===void 0?{}:E,H=v.actionData!=null&&v.navigation.formMethod!=null&&wt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((_=p.state)==null?void 0:_._isRedirect)!==!0,L;y.actionData?Object.keys(y.actionData).length>0?L=y.actionData:L=null:H?L=v.actionData:L=null;let V=y.loaderData?Wc(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,$=v.blockers;$.size>0&&($=new Map($),$.forEach((q,ue)=>$.set(ue,jr)));let U=O===!0||v.navigation.formMethod!=null&&wt(v.navigation.formMethod)&&((M=p.state)==null?void 0:M._isRedirect)!==!0;u&&(i=u,u=void 0),Ct||B===xe.Pop||(B===xe.Push?e.history.push(p,p.state):B===xe.Replace&&e.history.replace(p,p.state));let Z;if(B===xe.Pop){let q=Se.get(v.location.pathname);q&&q.has(p.pathname)?Z={currentLocation:v.location,nextLocation:p}:Se.has(p.pathname)&&(Z={currentLocation:p,nextLocation:v.location})}else if(re){let q=Se.get(v.location.pathname);q?q.add(p.pathname):(q=new Set([p.pathname]),Se.set(v.location.pathname,q)),Z={currentLocation:v.location,nextLocation:p}}$e(fe({},y,{actionData:L,loaderData:V,historyAction:B,location:p,initialized:!0,navigation:ou,revalidation:"idle",restoreScrollPosition:gs(p,y.matches||v.matches),preventScrollReset:U,blockers:$}),{viewTransitionOpts:Z,flushSync:A===!0}),B=xe.Pop,O=!1,re=!1,Ct=!1,mt=!1,Qt=[]}async function as(p,y){if(typeof p=="number"){e.history.go(p);return}let E=na(v.location,v.matches,a,c.v7_prependBasename,p,c.v7_relativeSplatPath,y==null?void 0:y.fromRouteId,y==null?void 0:y.relative),{path:_,submission:M,error:A}=$c(c.v7_normalizeFormMethod,!1,E,y),H=v.location,L=hl(v.location,_,y&&y.state);L=fe({},L,e.history.encodeLocation(L));let V=y&&y.replace!=null?y.replace:void 0,$=xe.Push;V===!0?$=xe.Replace:V===!1||M!=null&&wt(M.formMethod)&&M.formAction===v.location.pathname+v.location.search&&($=xe.Replace);let U=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,Z=(y&&y.unstable_flushSync)===!0,q=vs({currentLocation:H,nextLocation:L,historyAction:$});if(q){_l(q,{state:"blocked",location:L,proceed(){_l(q,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),as(p,y)},reset(){let ue=new Map(v.blockers);ue.set(q,jr),$e({blockers:ue})}});return}return await xn($,L,{submission:M,pendingError:A,preventScrollReset:U,replace:y&&y.replace,enableViewTransition:y&&y.unstable_viewTransition,flushSync:Z})}function rh(){if(Ti(),$e({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){xn(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}xn(B||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:re===!0})}}async function xn(p,y,E){Q&&Q.abort(),Q=null,B=p,Ct=(E&&E.startUninterruptedRevalidation)===!0,ph(v.location,v.matches),O=(E&&E.preventScrollReset)===!0,re=(E&&E.enableViewTransition)===!0;let _=u||i,M=E&&E.overrideNavigation,A=Pn(_,y,a),H=(E&&E.flushSync)===!0,L=Rl(A,_,y.pathname);if(L.active&&L.matches&&(A=L.matches),!A){let{error:G,notFoundMatches:Pe,route:Ee}=Li(y.pathname);An(y,{matches:Pe,loaderData:{},errors:{[Ee.id]:G}},{flushSync:H});return}if(v.initialized&&!mt&&Pg(v.location,y)&&!(E&&E.submission&&wt(E.submission.formMethod))){An(y,{matches:A},{flushSync:H});return}Q=new AbortController;let V=Wn(e.history,y,Q.signal,E&&E.submission),$;if(E&&E.pendingError)$=[lr(A).route.id,{type:te.error,error:E.pendingError}];else if(E&&E.submission&&wt(E.submission.formMethod)){let G=await lh(V,y,E.submission,A,L.active,{replace:E.replace,flushSync:H});if(G.shortCircuited)return;if(G.pendingActionResult){let[Pe,Ee]=G.pendingActionResult;if(be(Ee)&&ki(Ee.error)&&Ee.error.status===404){Q=null,An(y,{matches:G.matches,loaderData:{},errors:{[Pe]:Ee.error}});return}}A=G.matches||A,$=G.pendingActionResult,M=iu(y,E.submission),H=!1,L.active=!1,V=Wn(e.history,V.url,V.signal)}let{shortCircuited:U,matches:Z,loaderData:q,errors:ue}=await oh(V,y,A,L.active,M,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,H,$);U||(Q=null,An(y,fe({matches:Z||A},Qc($),{loaderData:q,errors:ue})))}async function lh(p,y,E,_,M,A){A===void 0&&(A={}),Ti();let H=zg(y,E);if($e({navigation:H},{flushSync:A.flushSync===!0}),M){let $=await Tl(_,y.pathname,p.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){let{boundaryId:U,error:Z}=Pl(y.pathname,$);return{matches:$.partialMatches,pendingActionResult:[U,{type:te.error,error:Z}]}}else if($.matches)_=$.matches;else{let{notFoundMatches:U,error:Z,route:q}=Li(y.pathname);return{matches:U,pendingActionResult:[q.id,{type:te.error,error:Z}]}}}let L,V=Br(_,y);if(!V.route.action&&!V.route.lazy)L={type:te.error,error:Ue(405,{method:p.method,pathname:y.pathname,routeId:V.route.id})};else if(L=(await Cr("action",v,p,[V],_,null))[V.route.id],p.signal.aborted)return{shortCircuited:!0};if(Nn(L)){let $;return A&&A.replace!=null?$=A.replace:$=Bc(L.response.headers.get("Location"),new URL(p.url),a)===v.location.pathname+v.location.search,await kn(p,L,!0,{submission:E,replace:$}),{shortCircuited:!0}}if(rn(L))throw Ue(400,{type:"defer-action"});if(be(L)){let $=lr(_,V.route.id);return(A&&A.replace)!==!0&&(B=xe.Push),{matches:_,pendingActionResult:[$.route.id,L]}}return{matches:_,pendingActionResult:[V.route.id,L]}}async function oh(p,y,E,_,M,A,H,L,V,$,U){let Z=M||iu(y,A),q=A||H||Xc(Z),ue=!Ct&&(!c.v7_partialHydration||!V);if(_){if(ue){let ve=ss(U);$e(fe({navigation:Z},ve!==void 0?{actionData:ve}:{}),{flushSync:$})}let K=await Tl(E,y.pathname,p.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{boundaryId:ve,error:Ze}=Pl(y.pathname,K);return{matches:K.partialMatches,loaderData:{},errors:{[ve]:Ze}}}else if(K.matches)E=K.matches;else{let{error:ve,notFoundMatches:Ze,route:ye}=Li(y.pathname);return{matches:Ze,loaderData:{},errors:{[ye.id]:ve}}}}let G=u||i,[Pe,Ee]=Uc(e.history,v,E,q,y,c.v7_partialHydration&&V===!0,c.v7_skipActionErrorRevalidation,mt,Qt,D,Ne,Qe,We,G,a,U);if(Ni(K=>!(E&&E.some(ve=>ve.route.id===K))||Pe&&Pe.some(ve=>ve.route.id===K)),le=++W,Pe.length===0&&Ee.length===0){let K=ps();return An(y,fe({matches:E,loaderData:{},errors:U&&be(U[1])?{[U[0]]:U[1].error}:null},Qc(U),K?{fetchers:new Map(v.fetchers)}:{}),{flushSync:$}),{shortCircuited:!0}}if(ue){let K={};if(!_){K.navigation=Z;let ve=ss(U);ve!==void 0&&(K.actionData=ve)}Ee.length>0&&(K.fetchers=ih(Ee)),$e(K,{flushSync:$})}Ee.forEach(K=>{F.has(K.key)&&Yt(K.key),K.controller&&F.set(K.key,K.controller)});let _r=()=>Ee.forEach(K=>Yt(K.key));Q&&Q.signal.addEventListener("abort",_r);let{loaderResults:Mt,fetcherResults:Bn}=await cs(v,E,Pe,Ee,p);if(p.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",_r),Ee.forEach(K=>F.delete(K.key));let Xt=Jl(Mt);if(Xt)return await kn(p,Xt.result,!0,{replace:L}),{shortCircuited:!0};if(Xt=Jl(Bn),Xt)return We.add(Xt.key),await kn(p,Xt.result,!0,{replace:L}),{shortCircuited:!0};let{loaderData:Ll,errors:zt}=Hc(v,E,Pe,Mt,U,Ee,Bn,it);it.forEach((K,ve)=>{K.subscribe(Ze=>{(Ze||K.done)&&it.delete(ve)})}),c.v7_partialHydration&&V&&v.errors&&Object.entries(v.errors).filter(K=>{let[ve]=K;return!Pe.some(Ze=>Ze.route.id===ve)}).forEach(K=>{let[ve,Ze]=K;zt=Object.assign(zt||{},{[ve]:Ze})});let Nl=ps(),Dl=hs(le),Ml=Nl||Dl||Ee.length>0;return fe({matches:E,loaderData:Ll,errors:zt},Ml?{fetchers:new Map(v.fetchers)}:{})}function ss(p){if(p&&!be(p[1]))return{[p[0]]:p[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function ih(p){return p.forEach(y=>{let E=v.fetchers.get(y.key),_=Or(void 0,E?E.data:void 0);v.fetchers.set(y.key,_)}),new Map(v.fetchers)}function uh(p,y,E,_){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");F.has(p)&&Yt(p);let M=(_&&_.unstable_flushSync)===!0,A=u||i,H=na(v.location,v.matches,a,c.v7_prependBasename,E,c.v7_relativeSplatPath,y,_==null?void 0:_.relative),L=Pn(A,H,a),V=Rl(L,A,H);if(V.active&&V.matches&&(L=V.matches),!L){Dt(p,y,Ue(404,{pathname:H}),{flushSync:M});return}let{path:$,submission:U,error:Z}=$c(c.v7_normalizeFormMethod,!0,H,_);if(Z){Dt(p,y,Z,{flushSync:M});return}let q=Br(L,$);if(O=(_&&_.preventScrollReset)===!0,U&&wt(U.formMethod)){ah(p,y,$,q,L,V.active,M,U);return}Qe.set(p,{routeId:y,path:$}),sh(p,y,$,q,L,V.active,M,U)}async function ah(p,y,E,_,M,A,H,L){Ti(),Qe.delete(p);function V(ye){if(!ye.route.action&&!ye.route.lazy){let jt=Ue(405,{method:L.formMethod,pathname:E,routeId:y});return Dt(p,y,jt,{flushSync:H}),!0}return!1}if(!A&&V(_))return;let $=v.fetchers.get(p);Kt(p,jg(L,$),{flushSync:H});let U=new AbortController,Z=Wn(e.history,E,U.signal,L);if(A){let ye=await Tl(M,E,Z.signal);if(ye.type==="aborted")return;if(ye.type==="error"){let{error:jt}=Pl(E,ye);Dt(p,y,jt,{flushSync:H});return}else if(ye.matches){if(M=ye.matches,_=Br(M,E),V(_))return}else{Dt(p,y,Ue(404,{pathname:E}),{flushSync:H});return}}F.set(p,U);let q=W,G=(await Cr("action",v,Z,[_],M,p))[_.route.id];if(Z.signal.aborted){F.get(p)===U&&F.delete(p);return}if(c.v7_fetcherPersist&&Ne.has(p)){if(Nn(G)||be(G)){Kt(p,Jt(void 0));return}}else{if(Nn(G))if(F.delete(p),le>q){Kt(p,Jt(void 0));return}else return We.add(p),Kt(p,Or(L)),kn(Z,G,!1,{fetcherSubmission:L});if(be(G)){Dt(p,y,G.error);return}}if(rn(G))throw Ue(400,{type:"defer-action"});let Pe=v.navigation.location||v.location,Ee=Wn(e.history,Pe,U.signal),_r=u||i,Mt=v.navigation.state!=="idle"?Pn(_r,v.navigation.location,a):v.matches;X(Mt,"Didn't find any matches after fetcher action");let Bn=++W;ie.set(p,Bn);let Xt=Or(L,G.data);v.fetchers.set(p,Xt);let[Ll,zt]=Uc(e.history,v,Mt,L,Pe,!1,c.v7_skipActionErrorRevalidation,mt,Qt,D,Ne,Qe,We,_r,a,[_.route.id,G]);zt.filter(ye=>ye.key!==p).forEach(ye=>{let jt=ye.key,Ss=v.fetchers.get(jt),vh=Or(void 0,Ss?Ss.data:void 0);v.fetchers.set(jt,vh),F.has(jt)&&Yt(jt),ye.controller&&F.set(jt,ye.controller)}),$e({fetchers:new Map(v.fetchers)});let Nl=()=>zt.forEach(ye=>Yt(ye.key));U.signal.addEventListener("abort",Nl);let{loaderResults:Dl,fetcherResults:Ml}=await cs(v,Mt,Ll,zt,Ee);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Nl),ie.delete(p),F.delete(p),zt.forEach(ye=>F.delete(ye.key));let K=Jl(Dl);if(K)return kn(Ee,K.result,!1);if(K=Jl(Ml),K)return We.add(K.key),kn(Ee,K.result,!1);let{loaderData:ve,errors:Ze}=Hc(v,Mt,Ll,Dl,void 0,zt,Ml,it);if(v.fetchers.has(p)){let ye=Jt(G.data);v.fetchers.set(p,ye)}hs(Bn),v.navigation.state==="loading"&&Bn>le?(X(B,"Expected pending action"),Q&&Q.abort(),An(v.navigation.location,{matches:Mt,loaderData:ve,errors:Ze,fetchers:new Map(v.fetchers)})):($e({errors:Ze,loaderData:Wc(v.loaderData,ve,Mt,Ze),fetchers:new Map(v.fetchers)}),mt=!1)}async function sh(p,y,E,_,M,A,H,L){let V=v.fetchers.get(p);Kt(p,Or(L,V?V.data:void 0),{flushSync:H});let $=new AbortController,U=Wn(e.history,E,$.signal);if(A){let G=await Tl(M,E,U.signal);if(G.type==="aborted")return;if(G.type==="error"){let{error:Pe}=Pl(E,G);Dt(p,y,Pe,{flushSync:H});return}else if(G.matches)M=G.matches,_=Br(M,E);else{Dt(p,y,Ue(404,{pathname:E}),{flushSync:H});return}}F.set(p,$);let Z=W,ue=(await Cr("loader",v,U,[_],M,p))[_.route.id];if(rn(ue)&&(ue=await os(ue,U.signal,!0)||ue),F.get(p)===$&&F.delete(p),!U.signal.aborted){if(Ne.has(p)){Kt(p,Jt(void 0));return}if(Nn(ue))if(le>Z){Kt(p,Jt(void 0));return}else{We.add(p),await kn(U,ue,!1);return}if(be(ue)){Dt(p,y,ue.error);return}X(!rn(ue),"Unhandled fetcher deferred data"),Kt(p,Jt(ue.data))}}async function kn(p,y,E,_){let{submission:M,fetcherSubmission:A,replace:H}=_===void 0?{}:_;y.response.headers.has("X-Remix-Revalidate")&&(mt=!0);let L=y.response.headers.get("Location");X(L,"Expected a Location header on the redirect Response"),L=Bc(L,new URL(p.url),a);let V=hl(v.location,L,{_isRedirect:!0});if(n){let G=!1;if(y.response.headers.has("X-Remix-Reload-Document"))G=!0;else if(ls.test(L)){const Pe=e.history.createURL(L);G=Pe.origin!==t.location.origin||xl(Pe.pathname,a)==null}if(G){H?t.location.replace(L):t.location.assign(L);return}}Q=null;let $=H===!0||y.response.headers.has("X-Remix-Replace")?xe.Replace:xe.Push,{formMethod:U,formAction:Z,formEncType:q}=v.navigation;!M&&!A&&U&&Z&&q&&(M=Xc(v.navigation));let ue=M||A;if(fg.has(y.response.status)&&ue&&wt(ue.formMethod))await xn($,V,{submission:fe({},ue,{formAction:L}),preventScrollReset:O,enableViewTransition:E?re:void 0});else{let G=iu(V,M);await xn($,V,{overrideNavigation:G,fetcherSubmission:A,preventScrollReset:O,enableViewTransition:E?re:void 0})}}async function Cr(p,y,E,_,M,A){let H,L={};try{H=await Eg(s,p,y,E,_,M,A,o,l)}catch(V){return _.forEach($=>{L[$.route.id]={type:te.error,error:V}}),L}for(let[V,$]of Object.entries(H))if(Tg($)){let U=$.result;L[V]={type:te.redirect,response:Cg(U,E,V,M,a,c.v7_relativeSplatPath)}}else L[V]=await kg($);return L}async function cs(p,y,E,_,M){let A=p.matches,H=Cr("loader",p,M,E,y,null),L=Promise.all(_.map(async U=>{if(U.matches&&U.match&&U.controller){let q=(await Cr("loader",p,Wn(e.history,U.path,U.controller.signal),[U.match],U.matches,U.key))[U.match.route.id];return{[U.key]:q}}else return Promise.resolve({[U.key]:{type:te.error,error:Ue(404,{pathname:U.path})}})})),V=await H,$=(await L).reduce((U,Z)=>Object.assign(U,Z),{});return await Promise.all([Dg(y,V,M.signal,A,p.loaderData),Mg(y,$,_)]),{loaderResults:V,fetcherResults:$}}function Ti(){mt=!0,Qt.push(...Ni()),Qe.forEach((p,y)=>{F.has(y)&&(D.add(y),Yt(y))})}function Kt(p,y,E){E===void 0&&(E={}),v.fetchers.set(p,y),$e({fetchers:new Map(v.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Dt(p,y,E,_){_===void 0&&(_={});let M=lr(v.matches,y);Cl(p),$e({errors:{[M.route.id]:E},fetchers:new Map(v.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function fs(p){return c.v7_fetcherPersist&&(Nt.set(p,(Nt.get(p)||0)+1),Ne.has(p)&&Ne.delete(p)),v.fetchers.get(p)||dg}function Cl(p){let y=v.fetchers.get(p);F.has(p)&&!(y&&y.state==="loading"&&ie.has(p))&&Yt(p),Qe.delete(p),ie.delete(p),We.delete(p),Ne.delete(p),D.delete(p),v.fetchers.delete(p)}function ch(p){if(c.v7_fetcherPersist){let y=(Nt.get(p)||0)-1;y<=0?(Nt.delete(p),Ne.add(p)):Nt.set(p,y)}else Cl(p);$e({fetchers:new Map(v.fetchers)})}function Yt(p){let y=F.get(p);X(y,"Expected fetch controller: "+p),y.abort(),F.delete(p)}function ds(p){for(let y of p){let E=fs(y),_=Jt(E.data);v.fetchers.set(y,_)}}function ps(){let p=[],y=!1;for(let E of We){let _=v.fetchers.get(E);X(_,"Expected fetcher: "+E),_.state==="loading"&&(We.delete(E),p.push(E),y=!0)}return ds(p),y}function hs(p){let y=[];for(let[E,_]of ie)if(_0}function fh(p,y){let E=v.blockers.get(p)||jr;return En.get(p)!==y&&En.set(p,y),E}function ms(p){v.blockers.delete(p),En.delete(p)}function _l(p,y){let E=v.blockers.get(p)||jr;X(E.state==="unblocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="proceeding"||E.state==="blocked"&&y.state==="unblocked"||E.state==="proceeding"&&y.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+y.state);let _=new Map(v.blockers);_.set(p,y),$e({blockers:_})}function vs(p){let{currentLocation:y,nextLocation:E,historyAction:_}=p;if(En.size===0)return;En.size>1&&wr(!1,"A router only supports one blocker at a time");let M=Array.from(En.entries()),[A,H]=M[M.length-1],L=v.blockers.get(A);if(!(L&&L.state==="proceeding")&&H({currentLocation:y,nextLocation:E,historyAction:_}))return A}function Li(p){let y=Ue(404,{pathname:p}),E=u||i,{matches:_,route:M}=Kc(E);return Ni(),{notFoundMatches:_,route:M,error:y}}function Pl(p,y){return{boundaryId:lr(y.partialMatches).route.id,error:Ue(400,{type:"route-discovery",pathname:p,message:y.error!=null&&"message"in y.error?y.error:String(y.error)})}}function Ni(p){let y=[];return it.forEach((E,_)=>{(!p||p(_))&&(E.cancel(),y.push(_),it.delete(_))}),y}function dh(p,y,E){if(R=p,f=y,h=E||null,!g&&v.navigation===ou){g=!0;let _=gs(v.location,v.matches);_!=null&&$e({restoreScrollPosition:_})}return()=>{R=null,f=null,h=null}}function ys(p,y){return h&&h(p,y.map(_=>Hy(_,v.loaderData)))||p.key}function ph(p,y){if(R&&f){let E=ys(p,y);R[E]=f()}}function gs(p,y){if(R){let E=ys(p,y),_=R[E];if(typeof _=="number")return _}return null}function Rl(p,y,E){if(d){if(S.has(E))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:so(y,E,a,!0)}}else return{active:!0,matches:so(y,E,a,!0)||[]}}return{active:!1,matches:null}}async function Tl(p,y,E){let _=p;for(;;){let M=u==null,A=u||i;try{await gg(d,y,_,A,o,l,bp,E)}catch(V){return{type:"error",error:V,partialMatches:_}}finally{M&&(i=[...i])}if(E.aborted)return{type:"aborted"};let H=Pn(A,y,a);if(H)return ws(y,S),{type:"success",matches:H};let L=so(A,y,a,!0);if(!L||_.length===L.length&&_.every((V,$)=>V.route.id===L[$].route.id))return ws(y,S),{type:"success",matches:null};_=L}}function ws(p,y){if(y.size>=x){let E=y.values().next().value;y.delete(E)}y.add(p)}function hh(p){o={},u=ml(p,l,void 0,o)}function mh(p,y){let E=u==null;Bp(p,y,u||i,o,l),E&&(i=[...i],$e({}))}return j={get basename(){return a},get future(){return c},get state(){return v},get routes(){return i},get window(){return t},initialize:eh,subscribe:nh,enableScrollRestoration:dh,navigate:as,fetch:uh,revalidate:rh,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:fs,deleteFetcher:ch,dispose:th,getBlocker:fh,deleteBlocker:ms,patchRoutes:mh,_internalFetchControllers:F,_internalActiveDeferreds:it,_internalSetRoutes:hh},j}function mg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function na(e,t,n,r,l,o,i,u){let a,s;if(i){a=[];for(let c of t)if(a.push(c),c.route.id===i){s=c;break}}else a=t,s=t[t.length-1];let d=Fp(l||".",Ip(a,o),xl(e.pathname,n)||e.pathname,u==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!is(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:pn([n,d.pathname])),El(d)}function $c(e,t,n,r){if(!r||!mg(r))return{path:n};if(r.formMethod&&!Ng(r.formMethod))return{path:n,error:Ue(405,{method:r.formMethod})};let l=()=>({path:n,error:Ue(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),u=Vp(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!wt(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,x)=>{let[S,R]=x;return""+w+S+"="+R+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!wt(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:u,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}X(typeof FormData=="function","FormData is not available in this environment");let a,s;if(r.formData)a=ra(r.formData),s=r.formData;else if(r.body instanceof FormData)a=ra(r.body),s=r.body;else if(r.body instanceof URLSearchParams)a=r.body,s=Vc(a);else if(r.body==null)a=new URLSearchParams,s=new FormData;else try{a=new URLSearchParams(r.body),s=Vc(a)}catch{return l()}let d={formMethod:i,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(wt(d.formMethod))return{path:n,submission:d};let c=Sn(n);return t&&c.search&&is(c.search)&&a.append("index",""),c.search="?"+a,{path:El(c),submission:d}}function vg(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Uc(e,t,n,r,l,o,i,u,a,s,d,c,m,w,x,S){let R=S?be(S[1])?S[1].error:S[1].data:void 0,h=e.createURL(t.location),f=e.createURL(l),g=S&&be(S[1])?S[0]:void 0,k=g?vg(n,g):n,T=S?S[1].statusCode:void 0,N=i&&T&&T>=400,j=k.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(yg(t.loaderData,t.matches[O],B)||a.some(me=>me===B.route.id))return!0;let re=t.matches[O],Se=B;return Ac(B,fe({currentUrl:h,currentParams:re.params,nextUrl:f,nextParams:Se.params},r,{actionResult:R,actionStatus:T,defaultShouldRevalidate:N?!1:u||h.pathname+h.search===f.pathname+f.search||h.search!==f.search||Ap(re,Se)}))}),v=[];return c.forEach((B,O)=>{if(o||!n.some(Ct=>Ct.route.id===B.routeId)||d.has(O))return;let Q=Pn(w,B.path,x);if(!Q){v.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let re=t.fetchers.get(O),Se=Br(Q,B.path),me=!1;m.has(O)?me=!1:s.has(O)?(s.delete(O),me=!0):re&&re.state!=="idle"&&re.data===void 0?me=u:me=Ac(Se,fe({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:f,nextParams:n[n.length-1].params},r,{actionResult:R,actionStatus:T,defaultShouldRevalidate:N?!1:u})),me&&v.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:Se,controller:new AbortController})}),[j,v]}function yg(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Ap(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ac(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function gg(e,t,n,r,l,o,i,u){let a=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(a);s||(s=e({path:t,matches:n,patch:(d,c)=>{u.aborted||Bp(d,c,r,l,o)}}),i.set(a,s)),s&&Rg(s)&&await s}finally{i.delete(a)}}function Bp(e,t,n,r,l){if(e){var o;let i=r[e];X(i,"No route found to patch children into: routeId = "+e);let u=ml(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...u):i.children=u}else{let i=ml(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function wg(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];X(l,"No route found in manifest");let o={};for(let i in r){let a=l[i]!==void 0&&i!=="hasErrorBoundary";wr(!a,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!a&&!By.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,fe({},t(l),{lazy:void 0}))}async function Sg(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Eg(e,t,n,r,l,o,i,u,a,s){let d=o.map(w=>w.route.lazy?wg(w.route,a,u):void 0),c=o.map((w,x)=>{let S=d[x],R=l.some(f=>f.route.id===w.route.id);return fe({},w,{shouldLoad:R,resolve:async f=>(f&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(R=!0),R?xg(t,r,w,S,f,s):Promise.resolve({type:te.data,result:void 0}))})}),m=await e({matches:c,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function xg(e,t,n,r,l,o){let i,u,a=s=>{let d,c=new Promise((x,S)=>d=S);u=()=>d(),t.signal.addEventListener("abort",u);let m=x=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...x!==void 0?[x]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(S=>m(S)):m())}}catch(x){return{type:"error",result:x}}})();return Promise.race([w,c])};try{let s=n.route[e];if(r)if(s){let d,[c]=await Promise.all([a(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=c}else if(await r,s=n.route[e],s)i=await a(s);else if(e==="action"){let d=new URL(t.url),c=d.pathname+d.search;throw Ue(405,{method:t.method,pathname:c,routeId:n.route.id})}else return{type:te.data,result:void 0};else if(s)i=await a(s);else{let d=new URL(t.url),c=d.pathname+d.search;throw Ue(404,{pathname:c})}X(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:te.error,result:s}}finally{u&&t.signal.removeEventListener("abort",u)}return i}async function kg(e){let{result:t,type:n}=e;if(Hp(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:te.error,error:d}}return n===te.error?{type:te.error,error:new Oo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:te.data,data:s,statusCode:t.status,headers:t.headers}}if(n===te.error){if(Yc(t)){var r;if(t.data instanceof Error){var l;return{type:te.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new Oo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:te.error,error:t,statusCode:ki(t)?t.status:void 0}}if(Lg(t)){var o,i;return{type:te.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(Yc(t)){var u,a;return{type:te.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:te.data,data:t}}function Cg(e,t,n,r,l,o){let i=e.headers.get("Location");if(X(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ls.test(i)){let u=r.slice(0,r.findIndex(a=>a.route.id===n)+1);i=na(new URL(t.url),u,l,!0,i,o),e.headers.set("Location",i)}return e}function Bc(e,t,n){if(ls.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=xl(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function Wn(e,t,n,r){let l=e.createURL(Vp(t)).toString(),o={signal:n};if(r&&wt(r.formMethod)){let{formMethod:i,formEncType:u}=r;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(r.json)):u==="text/plain"?o.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?o.body=ra(r.formData):o.body=r.formData}return new Request(l,o)}function ra(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Vc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _g(e,t,n,r,l){let o={},i=null,u,a=!1,s={},d=n&&be(n[1])?n[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let m=c.route.id,w=t[m];if(X(!Nn(w),"Cannot handle redirect results in processLoaderData"),be(w)){let x=w.error;d!==void 0&&(x=d,d=void 0),i=i||{};{let S=lr(e,m);i[S.route.id]==null&&(i[S.route.id]=x)}o[m]=void 0,a||(a=!0,u=ki(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else rn(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!a&&(u=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!a&&(u=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:s}}function Hc(e,t,n,r,l,o,i,u){let{loaderData:a,errors:s}=_g(t,r,l,u);return o.forEach(d=>{let{key:c,match:m,controller:w}=d,x=i[c];if(X(x,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(be(x)){let S=lr(e.matches,m==null?void 0:m.route.id);s&&s[S.route.id]||(s=fe({},s,{[S.route.id]:x.error})),e.fetchers.delete(c)}else if(Nn(x))X(!1,"Unhandled fetcher revalidation redirect");else if(rn(x))X(!1,"Unhandled fetcher deferred data");else{let S=Jt(x.data);e.fetchers.set(c,S)}}),{loaderData:a,errors:s}}function Wc(e,t,n,r){let l=fe({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function Qc(e){return e?be(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function lr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Kc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ue(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,u="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(u="Bad Request",o==="route-discovery"?a='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: +`+i):l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(u="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(u="Not Found",a='No route matches URL "'+n+'"'):e===405&&(u="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Oo(e||500,u,new Error(a),!0)}function Jl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Nn(l))return{key:r,result:l}}}function Vp(e){let t=typeof e=="string"?Sn(e):e;return El(fe({},t,{hash:""}))}function Pg(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Rg(e){return typeof e=="object"&&e!=null&&"then"in e}function Tg(e){return Hp(e.result)&&cg.has(e.result.status)}function rn(e){return e.type===te.deferred}function be(e){return e.type===te.error}function Nn(e){return(e&&e.type)===te.redirect}function Yc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Lg(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Hp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ng(e){return sg.has(e.toLowerCase())}function wt(e){return ug.has(e.toLowerCase())}async function Dg(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i(m==null?void 0:m.route.id)===u);if(!s)continue;let d=r.find(m=>m.route.id===s.route.id),c=d!=null&&!Ap(d,s)&&(l&&l[s.route.id])!==void 0;rn(a)&&c&&await os(a,n,!1).then(m=>{m&&(t[u]=m)})}}async function Mg(e,t,n){for(let r=0;r(s==null?void 0:s.route.id)===o)&&rn(u)&&(X(i,"Expected an AbortController for revalidating fetcher deferred result"),await os(u,i.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function os(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:te.data,data:e.deferredData.unwrappedData}}catch(l){return{type:te.error,error:l}}return{type:te.data,data:e.deferredData.data}}}function is(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Br(e,t){let n=typeof t=="string"?Sn(t).search:t.search;if(e[e.length-1].route.index&&is(n||""))return e[e.length-1];let r=Op(e);return r[r.length-1]}function Xc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function iu(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zg(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Or(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function jg(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Jt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Og(e,t){try{let n=e.sessionStorage.getItem(Up);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Ig(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Up,JSON.stringify(n))}catch(r){wr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.26.2 * * Copyright (c) Remix Software Inc. @@ -89,7 +89,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),C.useCallback(function(s,d){if(d===void 0&&(d={}),!u.current)return;if(typeof s=="number"){r.go(s);return}let f=Fp(s,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:pn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}function $g(e,t,n,r){Pi()||X(!1);let{navigator:l}=C.useContext(_i),{matches:o}=C.useContext(kr),i=o[o.length-1],u=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let s=Kp(),d;d=s;let f=d.pathname||"/",m=f;if(a!=="/"){let S=a.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=Pn(e,{pathname:m});return Hg(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:pn([a,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:pn([a,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r)}function Ug(){let e=Yg(),t=ki(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,null)}const Ag=C.createElement(Ug,null);class Bg extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(kr.Provider,{value:this.props.routeContext},C.createElement(Qp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Vg(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(Ci);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(kr.Provider,{value:t},r)}function Hg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let d=i.findIndex(f=>f.route.id&&(u==null?void 0:u[f.route.id])!==void 0);d>=0||X(!1),i=i.slice(0,Math.min(i.length,d+1))}let a=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let w,x=!1,S=null,R=null;n&&(w=u&&f.route.id?u[f.route.id]:void 0,S=f.route.errorElement||Ag,a&&(s<0&&m===0?(Gg("route-fallback"),x=!0,R=null):s===m&&(x=!0,R=f.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,m+1)),c=()=>{let g;return w?g=S:x?g=R:f.route.Component?g=C.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=d,C.createElement(Vg,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:g})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?C.createElement(Bg,{location:n.location,revalidation:n.revalidation,component:S,error:w,children:c(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):c()},null)}var Xp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xp||{}),Fo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fo||{});function Wg(e){let t=C.useContext(Ci);return t||X(!1),t}function Qg(e){let t=C.useContext(Wp);return t||X(!1),t}function Kg(e){let t=C.useContext(kr);return t||X(!1),t}function Gp(e){let t=Kg(),n=t.matches[t.matches.length-1];return n.route.id||X(!1),n.route.id}function Yg(){var e;let t=C.useContext(Qp),n=Qg(Fo.UseRouteError),r=Gp(Fo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Xg(){let{router:e}=Wg(Xp.UseNavigateStable),t=Gp(Fo.UseNavigateStable),n=C.useRef(!1);return Yp(()=>{n.current=!0}),C.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Io({fromRouteId:t},o)))},[e,t])}const Gc={};function Gg(e,t,n){Gc[e]||(Gc[e]=!0)}function Jg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=xe.Pop,navigator:o,static:i=!1,future:u}=e;Pi()&&X(!1);let a=t.replace(/^\/*/,"/"),s=C.useMemo(()=>({basename:a,navigator:o,static:i,future:Io({v7_relativeSplatPath:!1},u)}),[a,u,o,i]);typeof r=="string"&&(r=Sn(r));let{pathname:d="/",search:f="",hash:m="",state:w=null,key:x="default"}=r,S=C.useMemo(()=>{let R=xl(d,a);return R==null?null:{location:{pathname:R,search:f,hash:m,state:w,key:x},navigationType:l}},[a,d,f,m,w,x,l]);return S==null?null:C.createElement(_i.Provider,{value:s},C.createElement(us.Provider,{children:n,value:S}))}new Promise(()=>{});function Zg(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),C.useCallback(function(s,d){if(d===void 0&&(d={}),!u.current)return;if(typeof s=="number"){r.go(s);return}let c=Fp(s,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:pn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,i,o,e])}function $g(e,t,n,r){Pi()||X(!1);let{navigator:l}=C.useContext(_i),{matches:o}=C.useContext(kr),i=o[o.length-1],u=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let s=Kp(),d;d=s;let c=d.pathname||"/",m=c;if(a!=="/"){let S=a.replace(/^\//,"").split("/");m="/"+c.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=Pn(e,{pathname:m});return Hg(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:pn([a,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:pn([a,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r)}function Ug(){let e=Yg(),t=ki(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,null)}const Ag=C.createElement(Ug,null);class Bg extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(kr.Provider,{value:this.props.routeContext},C.createElement(Qp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Vg(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(Ci);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(kr.Provider,{value:t},r)}function Hg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let d=i.findIndex(c=>c.route.id&&(u==null?void 0:u[c.route.id])!==void 0);d>=0||X(!1),i=i.slice(0,Math.min(i.length,d+1))}let a=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((d,c,m)=>{let w,x=!1,S=null,R=null;n&&(w=u&&c.route.id?u[c.route.id]:void 0,S=c.route.errorElement||Ag,a&&(s<0&&m===0?(Gg("route-fallback"),x=!0,R=null):s===m&&(x=!0,R=c.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,m+1)),f=()=>{let g;return w?g=S:x?g=R:c.route.Component?g=C.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=d,C.createElement(Vg,{match:c,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||m===0)?C.createElement(Bg,{location:n.location,revalidation:n.revalidation,component:S,error:w,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()},null)}var Xp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xp||{}),Fo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fo||{});function Wg(e){let t=C.useContext(Ci);return t||X(!1),t}function Qg(e){let t=C.useContext(Wp);return t||X(!1),t}function Kg(e){let t=C.useContext(kr);return t||X(!1),t}function Gp(e){let t=Kg(),n=t.matches[t.matches.length-1];return n.route.id||X(!1),n.route.id}function Yg(){var e;let t=C.useContext(Qp),n=Qg(Fo.UseRouteError),r=Gp(Fo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Xg(){let{router:e}=Wg(Xp.UseNavigateStable),t=Gp(Fo.UseNavigateStable),n=C.useRef(!1);return Yp(()=>{n.current=!0}),C.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Io({fromRouteId:t},o)))},[e,t])}const Gc={};function Gg(e,t,n){Gc[e]||(Gc[e]=!0)}function Jg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=xe.Pop,navigator:o,static:i=!1,future:u}=e;Pi()&&X(!1);let a=t.replace(/^\/*/,"/"),s=C.useMemo(()=>({basename:a,navigator:o,static:i,future:Io({v7_relativeSplatPath:!1},u)}),[a,u,o,i]);typeof r=="string"&&(r=Sn(r));let{pathname:d="/",search:c="",hash:m="",state:w=null,key:x="default"}=r,S=C.useMemo(()=>{let R=xl(d,a);return R==null?null:{location:{pathname:R,search:c,hash:m,state:w,key:x},navigationType:l}},[a,d,c,m,w,x,l]);return S==null?null:C.createElement(_i.Provider,{value:s},C.createElement(us.Provider,{children:n,value:S}))}new Promise(()=>{});function Zg(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.26.2 * * Copyright (c) Remix Software Inc. @@ -98,4 +98,4 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function a0(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=C.useState(n.state),[i,u]=C.useState(),[a,s]=C.useState({isTransitioning:!1}),[d,f]=C.useState(),[m,w]=C.useState(),[x,S]=C.useState(),R=C.useRef(new Map),{v7_startTransition:h}=r||{},c=C.useCallback(v=>{h?i0(v):v()},[h]),g=C.useCallback((v,B)=>{let{deletedFetchers:O,unstable_flushSync:Q,unstable_viewTransitionOpts:re}=B;O.forEach(me=>R.current.delete(me)),v.fetchers.forEach((me,Ct)=>{me.data!==void 0&&R.current.set(Ct,me.data)});let Se=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!re||Se){Q?Ir(()=>o(v)):c(()=>o(v));return}if(Q){Ir(()=>{m&&(d&&d.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:re.currentLocation,nextLocation:re.nextLocation})});let me=n.window.document.startViewTransition(()=>{Ir(()=>o(v))});me.finished.finally(()=>{Ir(()=>{f(void 0),w(void 0),u(void 0),s({isTransitioning:!1})})}),Ir(()=>w(me));return}m?(d&&d.resolve(),m.skipTransition(),S({state:v,currentLocation:re.currentLocation,nextLocation:re.nextLocation})):(u(v),s({isTransitioning:!0,flushSync:!1,currentLocation:re.currentLocation,nextLocation:re.nextLocation}))},[n.window,m,d,R,c]);C.useLayoutEffect(()=>n.subscribe(g),[n,g]),C.useEffect(()=>{a.isTransitioning&&!a.flushSync&&f(new u0)},[a]),C.useEffect(()=>{if(d&&i&&n.window){let v=i,B=d.promise,O=n.window.document.startViewTransition(async()=>{c(()=>o(v)),await B});O.finished.finally(()=>{f(void 0),w(void 0),u(void 0),s({isTransitioning:!1})}),w(O)}},[c,i,d,n.window]),C.useEffect(()=>{d&&i&&l.location.key===i.location.key&&d.resolve()},[d,m,l.location,i]),C.useEffect(()=>{!a.isTransitioning&&x&&(u(x.state),s({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[a.isTransitioning,x]),C.useEffect(()=>{},[]);let k=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:v=>n.navigate(v),push:(v,B,O)=>n.navigate(v,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(v,B,O)=>n.navigate(v,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),T=n.basename||"/",N=C.useMemo(()=>({router:n,navigator:k,static:!1,basename:T}),[n,k,T]),j=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.createElement(C.Fragment,null,C.createElement(Ci.Provider,{value:N},C.createElement(Wp.Provider,{value:l},C.createElement(r0.Provider,{value:R.current},C.createElement(n0.Provider,{value:a},C.createElement(Jg,{basename:T,location:l.location,navigationType:l.historyAction,navigator:k,future:j},l.initialized||n.future.v7_partialHydration?C.createElement(s0,{routes:n.routes,future:n.future,state:l}):t))))),null)}const s0=C.memo(c0);function c0(e){let{routes:t,future:n,state:r}=e;return $g(t,void 0,r,n)}var qc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qc||(qc={}));var bc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bc||(bc={}));const f0=({id:e=void 0,className:t=void 0,error:n=void 0,isLoading:r=!0,children:l=void 0})=>{const[o,i]=C.useState(1);return C.useEffect(()=>{if(n)return;const u=setInterval(()=>i(a=>a%3+1),500);return()=>clearInterval(u)},[n]),!r&&!n?null:I.jsx("div",{id:e,className:t,children:n?I.jsxs("div",{children:["Failed to load widget: ",n]}):I.jsxs(I.Fragment,{children:[l||"Loading widget"," ",".".repeat(o)]})})};function ut(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ef=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),uu=function(){return Math.random().toString(36).substring(7).split("").join(".")},tf={INIT:"@@redux/INIT"+uu(),REPLACE:"@@redux/REPLACE"+uu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+uu()}};function d0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Jp(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ut(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ut(1));return n(Jp)(e,t)}if(typeof e!="function")throw new Error(ut(2));var l=e,o=t,i=[],u=i,a=!1;function s(){u===i&&(u=i.slice())}function d(){if(a)throw new Error(ut(3));return o}function f(S){if(typeof S!="function")throw new Error(ut(4));if(a)throw new Error(ut(5));var R=!0;return s(),u.push(S),function(){if(R){if(a)throw new Error(ut(6));R=!1,s();var c=u.indexOf(S);u.splice(c,1),i=null}}}function m(S){if(!d0(S))throw new Error(ut(7));if(typeof S.type>"u")throw new Error(ut(8));if(a)throw new Error(ut(9));try{a=!0,o=l(o,S)}finally{a=!1}for(var R=i=u,h=0;h({type:Zp,payload:e}),p0=()=>{try{const e=localStorage.getItem("credentials");if(e)return JSON.parse(e)}catch(e){console.error("Error loading credentials from localStorage:",e)}return{token:null,domain:null,hostId:null}},h0={credentials:p0()},m0=(e=h0,t)=>{switch(t.type){case Zp:{const n=t.payload;try{const r=JSON.stringify(n);localStorage.setItem("credentials",r)}catch(r){console.error("Error saving data to localStorage",r)}return{...e,credentials:n}}default:return e}},v0=Jp(m0),y0=({onSubmit:e})=>{const{domain:t,token:n,hostId:r}=Pp(o=>o.credentials),l=o=>{o.preventDefault();const i=new FormData(o.currentTarget);e({domain:i.get("domain"),token:i.get("token"),hostId:i.get("hostId")})};return I.jsxs("div",{className:"form-wrapper",children:[I.jsx("h1",{className:"title",children:"iotum Sample Apps"}),I.jsxs("form",{onSubmit:l,className:"credentials",children:[I.jsxs("label",{children:["Domain:",I.jsx("input",{type:"text",name:"domain",defaultValue:t||"iotum.callbridge.rocks",required:!0})]}),I.jsx("br",{}),I.jsxs("label",{children:["SSO Token:",I.jsx("input",{type:"text",name:"token",defaultValue:n||"",required:!0})]}),I.jsx("br",{}),I.jsxs("label",{children:["Host ID:",I.jsx("input",{type:"text",name:"hostId",defaultValue:r||"",required:!0})]}),I.jsx("br",{}),I.jsx("button",{type:"submit",children:"Submit"})]})]})},g0=()=>{const[e,t]=C.useState(!1),n=Fy(),r=Ri();C.useEffect(()=>{n(nf({token:null,url:null,hostId:null}))},[n]);const l=o=>{console.log("Credentials submitted"),n(nf({token:o.token,domain:o.domain,hostId:o.hostId})),t(!0),r("/iotum-samples/menu")};return I.jsx("div",{children:e?I.jsx("p",{children:"Credentials submitted successfully!"}):I.jsx(y0,{onSubmit:l})})},Qn=({text:e,path:t})=>{const n=Ri();return I.jsx("button",{type:"button",className:"menu-button",onClick:()=>n(t),children:e})},w0="_tokenButton_1d3yw_1",S0="_left_1d3yw_39",E0="_right_1d3yw_47",au={tokenButton:w0,left:S0,right:E0};function qp({position:e="left"}){const t=Ri(),n=()=>{console.log("Token Button Clicked, Go To the Token Page."),t("/iotum-samples")},r=e==="right"?au.right:au.left;return I.jsx("div",{children:I.jsx("button",{className:`${au.tokenButton} ${r}`,onClick:n,children:"Token Page"})})}const x0=()=>{const e=Ri(),{token:t}=Pp(l=>l.credentials),[n,r]=C.useState(!!t);return C.useEffect(()=>{t?r(!0):(e("/iotum-samples/error-handling"),console.log("New credentials input needed"),r(!1))},[t,e]),n},k0=()=>x0()?I.jsxs("div",{className:"menu-container",children:[I.jsx("h1",{children:"iotum Sample Apps"}),I.jsxs("menu",{children:[I.jsxs("li",{children:[I.jsx(Qn,{text:"Tabbed Dashboard",path:"/iotum-samples/tabbed-dashboard"}),I.jsx("p",{children:"This sample shows how to integrate one or more of iotum’s features into your application using tabs. The user lands on the ‘parent’ application page, which would be a home or calling page, and this has additional tabs for Meetings, ‘Team Chat’, ‘Drive’, and ‘Contacts’. The iotum applications sit inside tabs to look and feel like part of the parent app. When a user clicks on ‘Team Chat’ for example, our widget renders."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Chat Room List",path:"/iotum-samples/chat-room-list"}),I.jsx("p",{children:"In this sample, the ‘Team Chat’ navigation will show as a strip in a narrow sidebar. Users can then select an individual chat ‘room’ (channel or DM) that will open in a floating window inside their application. The size and location of each floating window can be customized and the sidebar can be hidden or shown as required. This is a very flexible way of integrating the chat widget into another application."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Simple Meeting",path:"/iotum-samples/simple-meeting"}),I.jsx("p",{children:"This sample is an example of one of our most common integrations. This meeting widget can be used for almost any kind of application, from telehealth to a standard video call. The developer initiates a meeting for the user inside a container that can be controlled in a myriad of ways. This could be a floating window, in a tab, or a particular section of the page. The size, shape, and location are fully customizable."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Chat Room List UI",path:"/iotum-samples/list-widget-ui"}),I.jsx("p",{children:"In this sample, the parent application is in full control of how the user gets to the chat room. The user will perhaps see a list of contacts with a chat icon next to each name instead of seeing the ‘Team Chat’ sidebar UI. After clicking on that icon, a container will open with the chat conversation displayed. This container could be a floating window or could fill a large section of the window. The size, shape, and location are fully customizable. This is useful if you want to control how a user gets into a specific chat room with different people."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Popout Chat",path:"/iotum-samples/popout-chat"}),I.jsx("p",{children:"This sample shows two distinct options. The first is that a user can access ‘Team Chat’ via a button that could be located anywhere on the parent application and have the unread message count synced so that they know if there are new messages to read. The second is that this shows how the widget can pop out into another tab or window where that is the desired user experience."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Devices in Meeting",path:"/iotum-samples/meeting-devices"}),I.jsx("p",{children:"This sample shows how to manage media devices in meeting widget from the host page."})]})]}),I.jsx(qp,{position:"right"})]}):null,C0=()=>I.jsxs("div",{className:"redirect-container",children:[I.jsx("h1",{children:"Error!"}),I.jsx("h2",{children:"Please go back to the Token Page and login with credentials."}),I.jsx(qp,{position:"right"})]}),_0=()=>{const e=C.lazy(()=>Vn(()=>import("./App-Bdhf7wuO.js"),__vite__mapDeps([0,1,2,3,4,5]))),t=C.lazy(()=>Vn(()=>import("./App-CDEdi8wh.js"),__vite__mapDeps([6,1,2,3,4,7]))),n=C.lazy(()=>Vn(()=>import("./App-CSPR4YtY.js"),__vite__mapDeps([8,2,3,9]))),r=C.lazy(()=>Vn(()=>import("./App-a1oQg7iB.js"),__vite__mapDeps([10,2,3,11]))),l=C.lazy(()=>Vn(()=>import("./App-DmoFs5Uu.js"),__vite__mapDeps([12,2,3,7,13]))),o=C.lazy(()=>Vn(()=>import("./App-AqUT5z3W.js"),__vite__mapDeps([14,2,3,15])));return bg([{path:"/iotum-samples",element:I.jsx(g0,{})},{path:"/iotum-samples/menu",element:I.jsx(k0,{})},{path:"/iotum-samples/chat-room-list",element:I.jsx(e,{})},{path:"/iotum-samples/list-widget-ui",element:I.jsx(t,{})},{path:"/iotum-samples/simple-meeting",element:I.jsx(n,{})},{path:"/iotum-samples/meeting-devices",element:I.jsx(o,{})},{path:"/iotum-samples/popout-chat",element:I.jsx(r,{})},{path:"/iotum-samples/tabbed-dashboard",element:I.jsx(l,{})},{path:"/iotum-samples/error-handling",element:I.jsx(C0,{})}])},P0=su.createRoot(document.getElementById("root"));P0.render(I.jsx(vf.StrictMode,{children:I.jsx(jy,{store:v0,children:I.jsx(C.Suspense,{fallback:I.jsx(f0,{}),children:I.jsx(a0,{router:_0()})})})}));export{f0 as L,qp as T,Pp as a,Kp as b,Ri as c,I as j,C as r,x0 as u}; + */function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function a0(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=C.useState(n.state),[i,u]=C.useState(),[a,s]=C.useState({isTransitioning:!1}),[d,c]=C.useState(),[m,w]=C.useState(),[x,S]=C.useState(),R=C.useRef(new Map),{v7_startTransition:h}=r||{},f=C.useCallback(v=>{h?i0(v):v()},[h]),g=C.useCallback((v,B)=>{let{deletedFetchers:O,unstable_flushSync:Q,unstable_viewTransitionOpts:re}=B;O.forEach(me=>R.current.delete(me)),v.fetchers.forEach((me,Ct)=>{me.data!==void 0&&R.current.set(Ct,me.data)});let Se=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!re||Se){Q?Ir(()=>o(v)):f(()=>o(v));return}if(Q){Ir(()=>{m&&(d&&d.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:re.currentLocation,nextLocation:re.nextLocation})});let me=n.window.document.startViewTransition(()=>{Ir(()=>o(v))});me.finished.finally(()=>{Ir(()=>{c(void 0),w(void 0),u(void 0),s({isTransitioning:!1})})}),Ir(()=>w(me));return}m?(d&&d.resolve(),m.skipTransition(),S({state:v,currentLocation:re.currentLocation,nextLocation:re.nextLocation})):(u(v),s({isTransitioning:!0,flushSync:!1,currentLocation:re.currentLocation,nextLocation:re.nextLocation}))},[n.window,m,d,R,f]);C.useLayoutEffect(()=>n.subscribe(g),[n,g]),C.useEffect(()=>{a.isTransitioning&&!a.flushSync&&c(new u0)},[a]),C.useEffect(()=>{if(d&&i&&n.window){let v=i,B=d.promise,O=n.window.document.startViewTransition(async()=>{f(()=>o(v)),await B});O.finished.finally(()=>{c(void 0),w(void 0),u(void 0),s({isTransitioning:!1})}),w(O)}},[f,i,d,n.window]),C.useEffect(()=>{d&&i&&l.location.key===i.location.key&&d.resolve()},[d,m,l.location,i]),C.useEffect(()=>{!a.isTransitioning&&x&&(u(x.state),s({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[a.isTransitioning,x]),C.useEffect(()=>{},[]);let k=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:v=>n.navigate(v),push:(v,B,O)=>n.navigate(v,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(v,B,O)=>n.navigate(v,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),T=n.basename||"/",N=C.useMemo(()=>({router:n,navigator:k,static:!1,basename:T}),[n,k,T]),j=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.createElement(C.Fragment,null,C.createElement(Ci.Provider,{value:N},C.createElement(Wp.Provider,{value:l},C.createElement(r0.Provider,{value:R.current},C.createElement(n0.Provider,{value:a},C.createElement(Jg,{basename:T,location:l.location,navigationType:l.historyAction,navigator:k,future:j},l.initialized||n.future.v7_partialHydration?C.createElement(s0,{routes:n.routes,future:n.future,state:l}):t))))),null)}const s0=C.memo(c0);function c0(e){let{routes:t,future:n,state:r}=e;return $g(t,void 0,r,n)}var qc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qc||(qc={}));var bc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bc||(bc={}));const f0=({id:e=void 0,className:t=void 0,error:n=void 0,isLoading:r=!0,children:l=void 0})=>{const[o,i]=C.useState(1);return C.useEffect(()=>{if(n)return;const u=setInterval(()=>i(a=>a%3+1),500);return()=>clearInterval(u)},[n]),!r&&!n?null:I.jsx("div",{id:e,className:t,children:n?I.jsxs("div",{children:["Failed to load widget: ",n]}):I.jsxs(I.Fragment,{children:[l||"Loading widget"," ",".".repeat(o)]})})};function ut(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ef=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),uu=function(){return Math.random().toString(36).substring(7).split("").join(".")},tf={INIT:"@@redux/INIT"+uu(),REPLACE:"@@redux/REPLACE"+uu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+uu()}};function d0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Jp(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ut(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ut(1));return n(Jp)(e,t)}if(typeof e!="function")throw new Error(ut(2));var l=e,o=t,i=[],u=i,a=!1;function s(){u===i&&(u=i.slice())}function d(){if(a)throw new Error(ut(3));return o}function c(S){if(typeof S!="function")throw new Error(ut(4));if(a)throw new Error(ut(5));var R=!0;return s(),u.push(S),function(){if(R){if(a)throw new Error(ut(6));R=!1,s();var f=u.indexOf(S);u.splice(f,1),i=null}}}function m(S){if(!d0(S))throw new Error(ut(7));if(typeof S.type>"u")throw new Error(ut(8));if(a)throw new Error(ut(9));try{a=!0,o=l(o,S)}finally{a=!1}for(var R=i=u,h=0;h({type:Zp,payload:e}),p0=()=>{try{const e=localStorage.getItem("credentials");if(e)return JSON.parse(e)}catch(e){console.error("Error loading credentials from localStorage:",e)}return{token:null,domain:null,hostId:null}},h0={credentials:p0()},m0=(e=h0,t)=>{switch(t.type){case Zp:{const n=t.payload;try{const r=JSON.stringify(n);localStorage.setItem("credentials",r)}catch(r){console.error("Error saving data to localStorage",r)}return{...e,credentials:n}}default:return e}},v0=Jp(m0),y0=({onSubmit:e})=>{const{domain:t,token:n,hostId:r}=Pp(o=>o.credentials),l=o=>{o.preventDefault();const i=new FormData(o.currentTarget);e({domain:i.get("domain"),token:i.get("token"),hostId:i.get("hostId")})};return I.jsxs("div",{className:"form-wrapper",children:[I.jsx("h1",{className:"title",children:"iotum Sample Apps"}),I.jsxs("form",{onSubmit:l,className:"credentials",children:[I.jsxs("label",{children:["Domain:",I.jsx("input",{type:"text",name:"domain",defaultValue:t||"iotum.callbridge.rocks",required:!0})]}),I.jsx("br",{}),I.jsxs("label",{children:["SSO Token:",I.jsx("input",{type:"text",name:"token",defaultValue:n||"",required:!0})]}),I.jsx("br",{}),I.jsxs("label",{children:["Host ID:",I.jsx("input",{type:"text",name:"hostId",defaultValue:r||"",required:!0})]}),I.jsx("br",{}),I.jsx("button",{type:"submit",children:"Submit"})]})]})},g0=()=>{const[e,t]=C.useState(!1),n=Fy(),r=Ri();C.useEffect(()=>{n(nf({token:null,url:null,hostId:null}))},[n]);const l=o=>{console.log("Credentials submitted"),n(nf({token:o.token,domain:o.domain,hostId:o.hostId})),t(!0),r("/iotum-samples/menu")};return I.jsx("div",{children:e?I.jsx("p",{children:"Credentials submitted successfully!"}):I.jsx(y0,{onSubmit:l})})},Qn=({text:e,path:t})=>{const n=Ri();return I.jsx("button",{type:"button",className:"menu-button",onClick:()=>n(t),children:e})},w0="_tokenButton_1d3yw_1",S0="_left_1d3yw_39",E0="_right_1d3yw_47",au={tokenButton:w0,left:S0,right:E0};function qp({position:e="left"}){const t=Ri(),n=()=>{console.log("Token Button Clicked, Go To the Token Page."),t("/iotum-samples")},r=e==="right"?au.right:au.left;return I.jsx("div",{children:I.jsx("button",{className:`${au.tokenButton} ${r}`,onClick:n,children:"Token Page"})})}const x0=()=>{const e=Ri(),{token:t}=Pp(l=>l.credentials),[n,r]=C.useState(!!t);return C.useEffect(()=>{t?r(!0):(e("/iotum-samples/error-handling"),console.log("New credentials input needed"),r(!1))},[t,e]),n},k0=()=>x0()?I.jsxs("div",{className:"menu-container",children:[I.jsx("h1",{children:"iotum Sample Apps"}),I.jsxs("menu",{children:[I.jsxs("li",{children:[I.jsx(Qn,{text:"Tabbed Dashboard",path:"/iotum-samples/tabbed-dashboard"}),I.jsx("p",{children:"This sample shows how to integrate one or more of iotum’s features into your application using tabs. The user lands on the ‘parent’ application page, which would be a home or calling page, and this has additional tabs for Meetings, ‘Team Chat’, ‘Drive’, and ‘Contacts’. The iotum applications sit inside tabs to look and feel like part of the parent app. When a user clicks on ‘Team Chat’ for example, our widget renders."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Chat Room List",path:"/iotum-samples/chat-room-list"}),I.jsx("p",{children:"In this sample, the ‘Team Chat’ navigation will show as a strip in a narrow sidebar. Users can then select an individual chat ‘room’ (channel or DM) that will open in a floating window inside their application. The size and location of each floating window can be customized and the sidebar can be hidden or shown as required. This is a very flexible way of integrating the chat widget into another application."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Simple Meeting",path:"/iotum-samples/simple-meeting"}),I.jsx("p",{children:"This sample is an example of one of our most common integrations. This meeting widget can be used for almost any kind of application, from telehealth to a standard video call. The developer initiates a meeting for the user inside a container that can be controlled in a myriad of ways. This could be a floating window, in a tab, or a particular section of the page. The size, shape, and location are fully customizable."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Chat Room List UI",path:"/iotum-samples/list-widget-ui"}),I.jsx("p",{children:"In this sample, the parent application is in full control of how the user gets to the chat room. The user will perhaps see a list of contacts with a chat icon next to each name instead of seeing the ‘Team Chat’ sidebar UI. After clicking on that icon, a container will open with the chat conversation displayed. This container could be a floating window or could fill a large section of the window. The size, shape, and location are fully customizable. This is useful if you want to control how a user gets into a specific chat room with different people."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Popout Chat",path:"/iotum-samples/popout-chat"}),I.jsx("p",{children:"This sample shows two distinct options. The first is that a user can access ‘Team Chat’ via a button that could be located anywhere on the parent application and have the unread message count synced so that they know if there are new messages to read. The second is that this shows how the widget can pop out into another tab or window where that is the desired user experience."})]}),I.jsxs("li",{children:[I.jsx(Qn,{text:"Devices in Meeting",path:"/iotum-samples/meeting-devices"}),I.jsx("p",{children:"This sample shows how to manage media devices in meeting widget from the host page."})]})]}),I.jsx(qp,{position:"right"})]}):null,C0=()=>I.jsxs("div",{className:"redirect-container",children:[I.jsx("h1",{children:"Error!"}),I.jsx("h2",{children:"Please go back to the Token Page and login with credentials."}),I.jsx(qp,{position:"right"})]}),_0=()=>{const e=C.lazy(()=>Vn(()=>import("./App-DOjDo7jI.js"),__vite__mapDeps([0,1,2,3,4,5]))),t=C.lazy(()=>Vn(()=>import("./App-DR-I4vLc.js"),__vite__mapDeps([6,1,2,3,4,7]))),n=C.lazy(()=>Vn(()=>import("./App-CsJWJ5It.js"),__vite__mapDeps([8,2,3,9]))),r=C.lazy(()=>Vn(()=>import("./App-BdG_zeVJ.js"),__vite__mapDeps([10,2,3,11]))),l=C.lazy(()=>Vn(()=>import("./App-ZsxsuayU.js"),__vite__mapDeps([12,2,3,7,13]))),o=C.lazy(()=>Vn(()=>import("./App-C30Ofn4h.js"),__vite__mapDeps([14,2,3,15])));return bg([{path:"/iotum-samples",element:I.jsx(g0,{})},{path:"/iotum-samples/menu",element:I.jsx(k0,{})},{path:"/iotum-samples/chat-room-list",element:I.jsx(e,{})},{path:"/iotum-samples/list-widget-ui",element:I.jsx(t,{})},{path:"/iotum-samples/simple-meeting",element:I.jsx(n,{})},{path:"/iotum-samples/meeting-devices",element:I.jsx(o,{})},{path:"/iotum-samples/popout-chat",element:I.jsx(r,{})},{path:"/iotum-samples/tabbed-dashboard",element:I.jsx(l,{})},{path:"/iotum-samples/error-handling",element:I.jsx(C0,{})}])},P0=su.createRoot(document.getElementById("root"));P0.render(I.jsx(vf.StrictMode,{children:I.jsx(jy,{store:v0,children:I.jsx(C.Suspense,{fallback:I.jsx(f0,{}),children:I.jsx(a0,{router:_0()})})})}));export{f0 as L,qp as T,Pp as a,Kp as b,Ri as c,I as j,C as r,x0 as u}; diff --git a/index.html b/index.html index 68db17ca..8a49f5e1 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,7 @@ }(window.location)) - +