diff --git a/apps/nowait-admin/dist/assets/AdminAnalytics-DY_5fbon.js b/apps/nowait-admin/dist/assets/AdminAnalytics-DY_5fbon.js new file mode 100644 index 00000000..0c73f804 --- /dev/null +++ b/apps/nowait-admin/dist/assets/AdminAnalytics-DY_5fbon.js @@ -0,0 +1 @@ +import{j as e,r as N}from"./index-DWRamT31.js";import{u as f}from"./useQuery-CQz0YXSa.js";import{A as y}from"./AdminApi-BnHrq_k2.js";import{u as v}from"./useWindowWidth-hcMhglfJ.js";const S=async()=>(await y.get("/admin/statistics/popular-menu")).data.response,b=()=>f({queryKey:["popular-menu"],queryFn:S,staleTime:1e3*60*5}),k=async t=>{const n=(await y.get("/admin/statistics/sales",{params:{date:t}})).data.response;return typeof n=="string"?void 0:n},D=t=>f({queryKey:["sales-by-date",t],queryFn:()=>k(t),enabled:!!t,staleTime:1e3*60}),F=async()=>(await y.get("/admin/statistics/top-sales")).data.response,$=()=>f({queryKey:["top-sales"],queryFn:F,staleTime:1e3*60*5}),A=t=>{const c=new Date(t);if(isNaN(c.getTime()))return t;const n=c.getFullYear(),r=String(c.getMonth()+1).padStart(2,"0"),s=String(c.getDate()).padStart(2,"0"),i=["일","월","화","수","목","금","토"][c.getDay()];return`${n}.${r}.${s} ${i}`},I=({date:t,data:c,disabled:n,isTablet:r})=>e.jsxs("div",{className:`bg-white rounded-[16px] mt-[10px] ${n?"w-full flex flex-col justify-center items-center relative":""} ${r?"h-[364px] max-h-[50%] p-6 w-full":"max-w-[335px] h-[410px] p-[22px]"}`,children:[e.jsx("div",{className:`flex w-full justify-between mb-4 ${n?"absolute left-[22px] top-[22px] w-[710px]":""}`,children:e.jsxs("div",{className:"flex w-full items-center justify-between ",children:[e.jsx("h2",{className:"text-title-18-bold text-navy-80",children:"부스별 판매순위"}),e.jsx("span",{className:"flex text-[12px] text-gray-400 items-center absolute right-[48px]",children:A(t)})]})}),n&&e.jsxs("div",{className:"flex flex-col justify-center items-center text-black-60 text-13-regular",children:[e.jsx("p",{children:"집계된 데이터가 없어요."}),e.jsx("p",{children:"축제가 시작되면 순위를 표시할게요."})]}),e.jsx("ul",{children:c.map(s=>{const l=s.rankChange>0,i=s.rankChange<0,o=s.rankChange===0;return e.jsxs("li",{className:`flex h-[54px] justify-between items-center p-2 rounded relative ${s.isCurrentBooth?"bg-[#F5F8FA] w-[103%] left-1/2 -translate-x-1/2 rounded-[10px] px-[2.5%]":""}`,children:[e.jsxs("div",{className:"flex items-center w-1/2",children:[e.jsx("span",{className:"text-14-semibold text-gray-600 w-[30px] h-[23px]",children:s.rank}),e.jsx("div",{className:"w-9 h-9 rounded-full overflow-hidden mr-[10px]",children:e.jsx("img",{src:s.profileImageUrl,alt:s.name,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"flex items-center text-sm gap-2",children:[e.jsx("span",{className:"text-16-semibold text-black",children:s.name}),e.jsx("span",{className:"text-[12px] text-gray-400",children:s.department})]})]}),e.jsxs("div",{className:"flex items-center justify-between w-1/2 gap-3",children:[e.jsx("div",{}),e.jsxs("span",{className:"flex text-16-medium text-black",children:[s.salesCount,"건"]}),e.jsxs("div",{className:`text-14-semibold w-[40px] h-[29px] py-[5px] flex items-center justify-center rounded-[8px] ${l?"bg-[#FFF1F0] text-[#FF5A1F]":i?"bg-[#EDF4FF] text-[#3A75E5]":"bg-[#F2F2F2] text-[#7E7E7E]"}`,children:[l&&e.jsxs("span",{children:[s.rankChange," ↑"]}),i&&e.jsxs("span",{children:[Math.abs(s.rankChange)," ↓"]}),o&&e.jsx("span",{children:"0 -"})]})]})]},s.rank+s.name)})})]}),L="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2475_11738'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%3e%3crect%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2475_11738)'%3e%3cpath%20d='M15.0602%209.9987L8.93523%203.8737C8.7269%203.66536%208.6262%203.41884%208.63315%203.13411C8.64009%202.84939%208.74773%202.60286%208.95607%202.39453C9.1644%202.1862%209.41093%202.08203%209.69565%202.08203C9.98037%202.08203%2010.2269%202.1862%2010.4352%202.39453L16.8311%208.8112C16.9977%208.97786%2017.1227%209.16536%2017.2061%209.3737C17.2894%209.58203%2017.3311%209.79036%2017.3311%209.9987C17.3311%2010.207%2017.2894%2010.4154%2017.2061%2010.6237C17.1227%2010.832%2016.9977%2011.0195%2016.8311%2011.1862L10.4144%2017.6029C10.2061%2017.8112%209.96301%2017.9119%209.68523%2017.9049C9.40745%2017.898%209.1644%2017.7904%208.95607%2017.582C8.74773%2017.3737%208.64357%2017.1272%208.64357%2016.8424C8.64357%2016.5577%208.74773%2016.3112%208.95607%2016.1029L15.0602%209.9987Z'%20fill='%23C1C1C1'/%3e%3c/g%3e%3c/svg%3e",B="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_1261_7069'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%3e%3crect%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1261_7069)'%3e%3cpath%20d='M4.95833%2010.0003L11.0833%2016.1253C11.2917%2016.3337%2011.3924%2016.5767%2011.3854%2016.8545C11.3785%2017.1323%2011.2708%2017.3753%2011.0625%2017.5837C10.8542%2017.792%2010.6111%2017.8962%2010.3333%2017.8962C10.0556%2017.8962%209.8125%2017.792%209.60417%2017.5837L3.1875%2011.1878C3.02083%2011.0212%202.89583%2010.8337%202.8125%2010.6253C2.72917%2010.417%202.6875%2010.2087%202.6875%2010.0003C2.6875%209.792%202.72917%209.58367%202.8125%209.37534C2.89583%209.167%203.02083%208.9795%203.1875%208.81284L9.60417%202.39617C9.8125%202.18784%2010.059%202.08714%2010.3438%202.09409C10.6285%202.10103%2010.875%202.20867%2011.0833%202.417C11.2917%202.62534%2011.3958%202.86839%2011.3958%203.14617C11.3958%203.42395%2011.2917%203.667%2011.0833%203.87534L4.95833%2010.0003Z'%20fill='%231C1B1F'/%3e%3c/g%3e%3c/svg%3e",U="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_2722_12292'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%3e%3crect%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_2722_12292)'%3e%3cpath%20d='M15.0602%209.9987L8.93523%203.8737C8.7269%203.66536%208.6262%203.41884%208.63315%203.13411C8.64009%202.84939%208.74773%202.60286%208.95607%202.39453C9.1644%202.1862%209.41093%202.08203%209.69565%202.08203C9.98037%202.08203%2010.2269%202.1862%2010.4352%202.39453L16.8311%208.8112C16.9977%208.97786%2017.1227%209.16536%2017.2061%209.3737C17.2894%209.58203%2017.3311%209.79036%2017.3311%209.9987C17.3311%2010.207%2017.2894%2010.4154%2017.2061%2010.6237C17.1227%2010.832%2016.9977%2011.0195%2016.8311%2011.1862L10.4144%2017.6029C10.2061%2017.8112%209.96301%2017.9119%209.68523%2017.9049C9.40745%2017.898%209.1644%2017.7904%208.95607%2017.582C8.74773%2017.3737%208.64357%2017.1272%208.64357%2016.8424C8.64357%2016.5577%208.74773%2016.3112%208.95607%2016.1029L15.0602%209.9987Z'%20fill='%23222222'/%3e%3c/g%3e%3c/svg%3e",_=({sales:t,isTablet:c,onDateChange:n,currentDate:r})=>{const s=new Date().toISOString().slice(0,10),l=r>s,i=r===s;return console.log(t,"오늘 판배 목록"),e.jsxs("div",{className:`bg-white rounded-[16px] flex flex-col justify-between ${c?"p-6 w-full h-full":"p-5 w-[335px] min-h-[150px]"}`,children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{children:[e.jsx("p",{className:"text-title-18-bold text-navy-80",children:i?"오늘 매출":"이전 매출"}),e.jsx("p",{className:"text-13-regular text-black-60 mt-1",children:r})]}),e.jsxs("span",{className:"flex",children:[e.jsx("button",{className:`h-5 w-5 ${l?"cursor-not-allowed":"cursor-pointer"}`,onClick:()=>n(-1),children:e.jsx("img",{src:B})}),e.jsx("button",{className:`h-5 w-5 ${l||i?"cursor-not-allowed":"cursor-pointer"}`,onClick:()=>{!l&&!i&&n(1)},children:e.jsx("img",{src:l||i?L:U})})]})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("p",{className:"text-headline-22-bold text-navy-80",children:`${((t==null?void 0:t.amount)??0).toLocaleString()}원`}),!!(t!=null&&t.percent)&&t.percent>0&&e.jsx("span",{className:"text-[#FF4103] ml-1",children:`+${t==null?void 0:t.percent}%`})]}),!!(t!=null&&t.diffAmount)&&t.diffAmount>0&&e.jsx("p",{className:"text-13-regular text-black-80",children:`어제보다 ${t.diffAmount.toLocaleString()}원 더 벌었어요!`})]})]})},O=({title:t,date:c,amount:n,isTablet:r})=>e.jsxs("div",{className:`bg-white rounded-[16px] flex flex-col justify-between ${r?"p-6 w-full h-full":"p-5 w-[335px] min-h-[150px]"}`,children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-title-18-bold text-black",children:t}),e.jsx("p",{className:"text-13-regular text-gray-400 mt-1",children:c})]}),e.jsx("div",{className:"flex items-baseline gap-2 mt-4",children:e.jsxs("p",{className:"text-headline-22-bold text-[#1C1C1C]",children:[n.toLocaleString(),"원"]})})]}),E=({sales:t,currentDate:c,popularMenu:n,poupularMenuDisabled:r,isTablet:s,isMobile:l,onDateChange:i})=>{const o=(t==null?void 0:t.todaySalesSum)??0,h=(t==null?void 0:t.yesterdaySalesSum)??0,x=((t==null?void 0:t.cumulativeSalesBeforeYesterday)??0)+o,u=o-h,g=a=>{if(typeof a=="string")return`2${a.replace(/-/g,".")}`;const d=a.getFullYear(),w=String(a.getMonth()+1).padStart(2,"0"),C=String(a.getDate()).padStart(2,"0");return`${d}.${w}.${C}`},m=new Date;new Date(m).setDate(m.getDate()-1);const p=g(m);return console.log(n,"인기 메뉴"),e.jsxs("div",{className:`${s?"grid grid-cols-1 lg:grid-cols-2 gap-[10px] w-full h-[50%]":"flex flex-col gap-[10px]"} ${l?"min-h-[227px]":""}`,children:[e.jsxs("div",{className:"flex flex-col gap-[10px]",children:[e.jsx(_,{sales:{date:c,amount:(t==null?void 0:t.todaySalesSum)??0,diffAmount:u,percent:t!=null&&t.yesterdaySalesSum?parseFloat((((t==null?void 0:t.todaySalesSum)-(t==null?void 0:t.yesterdaySalesSum))/(t==null?void 0:t.yesterdaySalesSum)*100).toFixed(1)):0},currentDate:c,isTablet:s,onDateChange:i}),e.jsx(O,{title:"누적매출",date:`${p} 기준`,amount:x,isTablet:s})]}),e.jsxs("div",{className:`flex flex-col bg-white rounded-[16px] ${r?"justify-center items-center relative":""} ${s?"p-6":"p-[22px] w-[335px] h-[227px]"}`,children:[e.jsxs("div",{className:"flex flex-col ",children:[e.jsx("p",{className:`text-title-18-bold text-navy-80 ${r?"absolute top-6 left-6":""}`,children:"인기 메뉴 TOP 5"}),e.jsx("span",{className:"text-13-regular text-black-60",children:r?"":p}),r?e.jsxs("div",{className:"flex flex-col justify-center items-center text-center text-black-60 text-13-regular",children:[e.jsx("p",{children:"집계된 데이터가 없어요"}),e.jsx("p",{children:"아직 매출이 집계되지 않았을 수 있어요"})]}):""]}),e.jsx("ul",{className:"mt-[25px]",children:!r&&(n??[]).slice(0,5).map((a,d)=>e.jsxs("li",{className:"flex justify-between h-[52px]",children:[e.jsxs("span",{className:"flex text-16-bold items-center gap-[10px]",children:[d+1," ",e.jsx("div",{className:`h-9 w-9 rounded-[8px] overflow-hidden ${a.imageUrl??"bg-[#788FB6]"}`,children:e.jsx("img",{src:a.imageUrl,className:"h-full w-full object-cover"})}),e.jsx("p",{className:`text-16-semibold ${l?"truncate w-[100px]":""}`,children:a.menuName})]}),e.jsxs("span",{className:"text-16-medium",children:[a.soldCount,"개"]})]},a.menuId))})]})]})},P=()=>{const c=new Date().toISOString().slice(0,10),[n,r]=N.useState(()=>new Date().toISOString().slice(0,10));console.log(c,"오늘날짜");const s=v(),l=s>=768,i=s<432,{data:o}=$(),{data:h}=D(n),{data:x}=b(),u=(o==null?void 0:o.length)===0,g=localStorage.getItem("storeId"),m=(x==null?void 0:x.length)===0,j=o&&o.length>0?o.map(a=>({rank:a.currentRank,name:a.storeName,department:a.departmentName,salesCount:a.orderCount,rankChange:a.delta,isCurrentBooth:g==a.storeId.toString(),profileImageUrl:a.profileUrl})):[],p=a=>{const d=new Date(n);d.setDate(d.getDate()+a),r(d.toISOString().slice(0,10))};return console.log(x,"인기메뉴 원래데이터"),console.log(h,"날짜별 조회"),e.jsxs("div",{className:`w-full flex flex-col items-center ${i?"min-h-[1020px] ":""}`,children:[e.jsx(E,{isTablet:l,isMobile:i,sales:h,currentDate:n,popularMenu:x,poupularMenuDisabled:m,onDateChange:p}),e.jsx(I,{isTablet:l,date:c,data:j,disabled:u})]})};export{P as default}; diff --git a/apps/nowait-admin/dist/assets/AdminApi-BnHrq_k2.js b/apps/nowait-admin/dist/assets/AdminApi-BnHrq_k2.js new file mode 100644 index 00000000..eb554129 --- /dev/null +++ b/apps/nowait-admin/dist/assets/AdminApi-BnHrq_k2.js @@ -0,0 +1,6 @@ +function Je(e,t){return function(){return e.apply(t,arguments)}}const{toString:mt}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:se,toStringTag:Ve}=Symbol,oe=(e=>t=>{const n=mt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>oe(t)===e),ie=e=>t=>typeof t===e,{isArray:$}=Array,I=ie("undefined");function V(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const We=P("ArrayBuffer");function yt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&We(e.buffer),t}const bt=ie("string"),A=ie("function"),Ke=ie("number"),W=e=>e!==null&&typeof e=="object",wt=e=>e===!0||e===!1,Y=e=>{if(oe(e)!=="object")return!1;const t=we(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ve in e)&&!(se in e)},Et=e=>{if(!W(e)||V(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},gt=P("Date"),St=P("File"),Rt=P("Blob"),Ot=P("FileList"),At=e=>W(e)&&A(e.pipe),Tt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=oe(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},Ct=P("URLSearchParams"),[xt,Nt,Pt,Ft]=["ReadableStream","Request","Response","Headers"].map(P),Ut=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),$(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const D=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xe=e=>!I(e)&&e!==D;function he(){const{caseless:e,skipUndefined:t}=Xe(this)&&this||{},n={},r=(s,i)=>{const o=e&&ve(n,i)||i;Y(n[o])&&Y(s)?n[o]=he(n[o],s):Y(s)?n[o]=he({},s):$(s)?n[o]=s.slice():(!t||!I(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s(K(t,(s,i)=>{n&&A(s)?e[i]=Je(s,n):e[i]=s},{allOwnKeys:r}),e),Lt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Bt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&we(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Dt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},jt=e=>{if(!e)return null;if($(e))return e;let t=e.length;if(!Ke(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},qt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&we(Uint8Array)),Ht=(e,t)=>{const r=(e&&e[se]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},It=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$t=P("HTMLFormElement"),Mt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ne=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zt=P("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};K(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Jt=e=>{Ge(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return $(e)?r(e):r(String(e).split(t)),n},Wt=()=>{},Kt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vt(e){return!!(e&&A(e.append)&&e[Ve]==="FormData"&&e[se])}const Xt=e=>{const t=new Array(10),n=(r,s)=>{if(W(r)){if(t.indexOf(r)>=0)return;if(V(r))return r;if(!("toJSON"in r)){t[s]=r;const i=$(r)?[]:{};return K(r,(o,c)=>{const d=n(o,s+1);!I(d)&&(i[c]=d)}),t[s]=void 0,i}}return r};return n(e,0)},Gt=P("AsyncFunction"),Qt=e=>e&&(W(e)||A(e))&&A(e.then)&&A(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(D.addEventListener("message",({source:s,data:i})=>{s===D&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),D.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(D.postMessage)),Zt=typeof queueMicrotask<"u"?queueMicrotask.bind(D):typeof process<"u"&&process.nextTick||Qe,Yt=e=>e!=null&&A(e[se]),a={isArray:$,isArrayBuffer:We,isBuffer:V,isFormData:Tt,isArrayBufferView:yt,isString:bt,isNumber:Ke,isBoolean:wt,isObject:W,isPlainObject:Y,isEmptyObject:Et,isReadableStream:xt,isRequest:Nt,isResponse:Pt,isHeaders:Ft,isUndefined:I,isDate:gt,isFile:St,isBlob:Rt,isRegExp:zt,isFunction:A,isStream:At,isURLSearchParams:Ct,isTypedArray:qt,isFileList:Ot,forEach:K,merge:he,extend:_t,trim:Ut,stripBOM:Lt,inherits:kt,toFlatObject:Bt,kindOf:oe,kindOfTest:P,endsWith:Dt,toArray:jt,forEachEntry:Ht,matchAll:It,isHTMLForm:$t,hasOwnProperty:Ne,hasOwnProp:Ne,reduceDescriptors:Ge,freezeMethods:Jt,toObjectSet:Vt,toCamelCase:Mt,noop:Wt,toFiniteNumber:Kt,findKey:ve,global:D,isContextDefined:Xe,isSpecCompliantForm:vt,toJSONObject:Xt,isAsyncFn:Gt,isThenable:Qt,setImmediate:Qe,asap:Zt,isIterable:Yt};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ze=y.prototype,Ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ye[e]={value:e}});Object.defineProperties(y,Ye);Object.defineProperty(Ze,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ze);a.toFlatObject(e,o,function(l){return l!==Error.prototype},f=>f!=="isAxiosError");const c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return y.call(o,c,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const en=null;function me(e){return a.isPlainObject(e)||a.isArray(e)}function et(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,n){return e?e.concat(t).map(function(s,i){return s=et(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function tn(e){return a.isArray(e)&&!e.some(me)}const nn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ae(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,p){let E=u;if(u&&!p&&typeof u=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&tn(u)||(a.isFileList(u)||a.endsWith(m,"[]"))&&(E=a.toArray(u)))return m=et(m),E.forEach(function(g,O){!(a.isUndefined(g)||g===null)&&t.append(o===!0?Pe([m],O,i):o===null?m:m+"[]",f(g))}),!1}return me(u)?!0:(t.append(Pe(p,m,i),f(u)),!1)}const h=[],b=Object.assign(nn,{defaultVisitor:l,convertValue:f,isVisitable:me});function S(u,m){if(!a.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(u),a.forEach(u,function(E,C){(!(a.isUndefined(E)||E===null)&&s.call(t,E,a.isString(C)?C.trim():C,m,b))===!0&&S(E,m?m.concat(C):[C])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ee(e,t){this._pairs=[],e&&ae(e,this,t)}const tt=Ee.prototype;tt.append=function(t,n){this._pairs.push([t,n])};tt.toString=function(t){const n=t?function(r){return t.call(this,r,Fe)}:Fe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function rn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||rn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new Ee(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ue{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const rt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sn=typeof URLSearchParams<"u"?URLSearchParams:Ee,on=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,cn={isBrowser:!0,classes:{URLSearchParams:sn,FormData:on,Blob:an},protocols:["http","https","file","blob","url","data"]},ge=typeof window<"u"&&typeof document<"u",ye=typeof navigator=="object"&&navigator||void 0,ln=ge&&(!ye||["ReactNative","NativeScript","NS"].indexOf(ye.product)<0),un=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fn=ge&&window.location.href||"http://localhost",dn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ge,hasStandardBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:un,navigator:ye,origin:fn},Symbol.toStringTag,{value:"Module"})),R={...dn,...cn};function pn(e,t){return ae(e,new R.classes.URLSearchParams,{visitor:function(n,r,s,i){return R.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function hn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&a.isArray(s)?s.length:o,d?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=mn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(hn(r),s,n,0)}),n}return null}function yn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const v={transitional:rt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(st(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ae(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),yn(t)):t}],transformResponse:[function(t){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{v.headers[e]={}});const bn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wn=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_e=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function ee(e){return e===!1||e==null?e:a.isArray(e)?e.map(ee):String(e)}function En(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const gn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function fe(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Sn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Rn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let T=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,d,f){const l=J(d);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=ee(c))}const o=(c,d)=>a.forEach(c,(f,l)=>i(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!gn(t))o(wn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return En(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||fe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=J(o),o){const c=a.findKey(r,o);c&&(!n||fe(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||fe(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=ee(s),delete n[i];return}const c=t?Sn(i):String(i).trim();c!==i&&delete n[i],n[c]=ee(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[_e]=this[_e]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=J(o);r[c]||(Rn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(T.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(T);function de(e,t){const n=this||v,r=t||n,s=T.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ot(e){return!!(e&&e.__CANCEL__)}function M(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(M,y,{__CANCEL__:!0});function it(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function On(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function An(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[i];o||(o=f),n[s]=d,r[s]=f;let h=i,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o{n=l,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const l=Date.now(),h=l-n;h>=r?o(f,l):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const ne=(e,t,n=3)=>{let r=0;const s=An(50,250);return Tn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-r,f=s(d),l=o<=c;r=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-o)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Le=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ke=e=>(...t)=>a.asap(()=>e(...t)),Cn=R.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,R.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0,xn=R.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Nn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function at(e,t,n){let r=!Nn(t);return e&&(r||n==!1)?Pn(e,t):t}const Be=e=>e instanceof T?{...e}:e;function q(e,t){t=t||{};const n={};function r(f,l,h,b){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:b},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(f,l,h,b){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,l,h,b)}function i(f,l){if(!a.isUndefined(l))return r(void 0,l)}function o(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function c(f,l,h){if(h in t)return r(f,l);if(h in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(f,l,h)=>s(Be(f),Be(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){const h=d[l]||s,b=h(e[l],t[l],l);a.isUndefined(b)&&h!==c||(n[l]=b)}),n}const ct=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=T.from(o),t.url=nt(at(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,h])=>{f.includes(l.toLowerCase())&&o.set(l,h)})}}if(R.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Cn(t.url))){const d=s&&i&&xn.read(i);d&&o.set(s,d)}return t},Fn=typeof XMLHttpRequest<"u",Un=Fn&&function(e){return new Promise(function(n,r){const s=ct(e);let i=s.data;const o=T.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,l,h,b,S,u;function m(){S&&S(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function E(){if(!p)return;const g=T.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};it(function(x){n(x),m()},function(x){r(x),m()},N),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(O){const N=O&&O.message?O.message:"Network Error",k=new y(N,y.ERR_NETWORK,e,p);k.event=O||null,r(k),p=null},p.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||rt;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new y(O,N.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(O,N){p.setRequestHeader(N,O)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),f&&([b,u]=ne(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([h,S]=ne(d),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(l=g=>{p&&(r(!g||g.type?new M(null,e,p):g),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const C=On(s.url);if(C&&R.protocols.indexOf(C)===-1){r(new y("Unsupported protocol "+C+":",y.ERR_BAD_REQUEST,e));return}p.send(i||null)})},_n=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(f){if(!s){s=!0,c();const l=f instanceof Error?f:this.reason;r.abort(l instanceof y?l:new M(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Ln=function*(e,t){let n=e.byteLength;if(n{const s=kn(e,t);let i=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){c(),d.close();return}let h=l.byteLength;if(n){let b=i+=h;n(b)}d.enqueue(new Uint8Array(l))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},je=64*1024,{isFunction:Z}=a,Dn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:qe,TextEncoder:He}=a.global,Ie=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jn=e=>{e=a.merge.call({skipUndefined:!0},Dn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Z(t):typeof fetch=="function",i=Z(n),o=Z(r);if(!s)return!1;const c=s&&Z(qe),d=s&&(typeof He=="function"?(u=>m=>u.encode(m))(new He):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=i&&c&&Ie(()=>{let u=!1;const m=new n(R.origin,{body:new qe,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=o&&c&&Ie(()=>a.isReadableStream(new r("").body)),h={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!h[u]&&(h[u]=(m,p)=>{let E=m&&m[u];if(E)return E.call(m);throw new y(`Response type '${u}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const b=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new n(R.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(a.isArrayBufferView(u)||a.isArrayBuffer(u))return u.byteLength;if(a.isURLSearchParams(u)&&(u=u+""),a.isString(u))return(await d(u)).byteLength},S=async(u,m)=>{const p=a.toFiniteNumber(u.getContentLength());return p??b(m)};return async u=>{let{url:m,method:p,data:E,signal:C,cancelToken:g,timeout:O,onDownloadProgress:N,onUploadProgress:k,responseType:x,headers:le,withCredentials:X="same-origin",fetchOptions:Re}=ct(u),Oe=t||fetch;x=x?(x+"").toLowerCase():"text";let G=_n([C,g&&g.toAbortSignal()],O),z=null;const B=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Ae;try{if(k&&f&&p!=="get"&&p!=="head"&&(Ae=await S(le,E))!==0){let L=new n(m,{method:"POST",body:E,duplex:"half"}),H;if(a.isFormData(E)&&(H=L.headers.get("content-type"))&&le.setContentType(H),L.body){const[ue,Q]=Le(Ae,ne(ke(k)));E=De(L.body,je,ue,Q)}}a.isString(X)||(X=X?"include":"omit");const F=i&&"credentials"in n.prototype,Te={...Re,signal:G,method:p.toUpperCase(),headers:le.normalize().toJSON(),body:E,duplex:"half",credentials:F?X:void 0};z=i&&new n(m,Te);let _=await(i?Oe(z,Re):Oe(m,Te));const Ce=l&&(x==="stream"||x==="response");if(l&&(N||Ce&&B)){const L={};["status","statusText","headers"].forEach(xe=>{L[xe]=_[xe]});const H=a.toFiniteNumber(_.headers.get("content-length")),[ue,Q]=N&&Le(H,ne(ke(N),!0))||[];_=new r(De(_.body,je,ue,()=>{Q&&Q(),B&&B()}),L)}x=x||"text";let ht=await h[a.findKey(h,x)||"text"](_,u);return!Ce&&B&&B(),await new Promise((L,H)=>{it(L,H,{data:ht,headers:T.from(_.headers),status:_.status,statusText:_.statusText,config:u,request:z})})}catch(F){throw B&&B(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,u,z),{cause:F.cause||F}):y.from(F,F&&F.code,u,z)}}},qn=new Map,lt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,d,f,l=qn;for(;c--;)d=i[c],f=l.get(d),f===void 0&&l.set(d,f=c?new Map:jn(t)),l=f;return f};lt();const Se={http:en,xhr:Un,fetch:{get:lt}};a.forEach(Se,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const $e=e=>`- ${e}`,Hn=e=>a.isFunction(e)||e===null||e===!1;function In(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since : +`+o.map($e).join(` +`):" "+$e(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const ut={getAdapter:In,adapters:Se};function pe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new M(null,e)}function Me(e){return pe(e),e.headers=T.from(e.headers),e.data=de.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(e.adapter||v.adapter,e)(e).then(function(r){return pe(e),r.data=de.call(e,e.transformResponse,r),r.headers=T.from(r.headers),r},function(r){return ot(r)||(pe(e),r&&r.response&&(r.response.data=de.call(e,e.transformResponse,r.response),r.response.headers=T.from(r.response.headers))),Promise.reject(r)})}const ft="1.13.2",ce={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ce[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ze={};ce.transitional=function(t,n,r){function s(i,o){return"[Axios v"+ft+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!ze[o]&&(ze[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ce.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function $n(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],d=c===void 0||o(c,i,e);if(d!==!0)throw new y("option "+i+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const te={assertOptions:$n,validators:ce},U=te.validators;let j=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ue,response:new Ue}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:U.function,serialize:U.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),te.assertOptions(n,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=T.concat(o,i);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[Me.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new M(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new dt(function(s){t=s}),cancel:t}}};function zn(e){return function(n){return e.apply(null,n)}}function Jn(e){return a.isObject(e)&&e.isAxiosError===!0}const be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(be).forEach(([e,t])=>{be[t]=e});function pt(e){const t=new j(e),n=Je(j.prototype.request,t);return a.extend(n,j.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return pt(q(e,s))},n}const w=pt(v);w.Axios=j;w.CanceledError=M;w.CancelToken=Mn;w.isCancel=ot;w.VERSION=ft;w.toFormData=ae;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=zn;w.isAxiosError=Jn;w.mergeConfig=q;w.AxiosHeaders=T;w.formToJSON=e=>st(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=ut.getAdapter;w.HttpStatusCode=be;w.default=w;const{Axios:vn,AxiosError:Xn,CanceledError:Gn,isCancel:Qn,CancelToken:Zn,VERSION:Yn,all:er,Cancel:tr,isAxiosError:nr,spread:rr,toFormData:sr,AxiosHeaders:or,HttpStatusCode:ir,formToJSON:ar,getAdapter:cr,mergeConfig:lr}=w,Vn="https://nowait-admin.co.kr/",re=w.create({baseURL:Vn,headers:{"Content-Type":"application/json"}});re.interceptors.request.use(e=>{const t=localStorage.getItem("adminToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));re.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===403&&console.warn("403 Forbidden - 인증 에러 발생"),Promise.reject(e)});const ur=async(e,t)=>{try{return await re.delete(`/admin/orders/${e}`,{data:{reason:t}}),await re.patch(`/admin/orders/status/${e}`,{orderStatus:"CANCELLED"}),{success:!0}}catch(n){throw console.error("주문 취소 실패:",n),n}};export{re as A,ur as c,nr as i}; diff --git a/apps/nowait-admin/dist/assets/AdminAuth-Y112gamO.js b/apps/nowait-admin/dist/assets/AdminAuth-Y112gamO.js new file mode 100644 index 00000000..07c4fc7f --- /dev/null +++ b/apps/nowait-admin/dist/assets/AdminAuth-Y112gamO.js @@ -0,0 +1,3 @@ +import{j as t,u}from"./index-DWRamT31.js";import{R as i}from"./RedBadge-C3tGOhvn.js";const j=({children:l,buttonType:c="big",backgroundColor:d,textColor:h,borderColor:n,icon:s,iconPosition:r="left",fullWidth:x=!1,disabled:a=!1,onClick:m,className:g=""})=>{const w="inline-flex items-center justify-center font-semibold disabled:cursor-not-allowed focus:outline-none rounded-[12px]",e=(()=>{const o={big:{width:"100%",height:"60px",textClass:"text-17-semibold gap-2",defaultBg:"var(--cool-black)",defaultText:"var(--white-100)"},"call-status":{width:"158.5px",height:"60px",textClass:"text-14-semibold gap-2",defaultBg:"#FFF5E8",defaultText:"#FFA32B"},waiting:{width:"255px",height:"60px",textClass:"text-15-semibold gap-2",defaultBg:"var(--primary)",defaultText:"var(--white)"},icon:{width:"80px",height:"60px",textClass:"text-12-semibold gap-1.5",defaultBg:"var(--black-30)",defaultText:"var(--black-60)"}};return o[c]||o.big})(),p={backgroundColor:a?"var(--black-25)":d||e.defaultBg,color:a?"var(--black-55)":h||e.defaultText,borderColor:n||void 0,width:x?"100%":e.width,height:e.height},f=x?"w-full":"",b=[w,e.textClass,f,g].filter(Boolean).join(" ");return t.jsxs("button",{className:b,style:p,onClick:m,disabled:a,children:[s&&r==="left"&&t.jsx("span",{className:"flex items-center justify-center",children:s}),l,s&&r==="right"&&t.jsx("span",{className:"flex items-center justify-center",children:s})]})},k="data:image/svg+xml,%3csvg%20width='58'%20height='24'%20viewBox='0%200%2058%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M23.249%201C27.3362%201.0001%2028.0723%204.09703%2028.0723%207.91699C28.0722%2011.7368%2027.0091%2014.8339%2023.249%2014.834C19.4888%2014.834%2018.4258%2011.7369%2018.4258%207.91699C18.4258%204.09697%2019.5704%201%2023.249%201ZM23.9189%204.41895C22.4616%204.18544%2021.9155%205.71281%2021.541%207.64453C21.1665%209.5762%2021.2672%2011.2071%2022.5625%2011.415C23.8581%2011.6228%2024.5669%2010.1213%2024.9414%208.18945C25.3159%206.25774%2025.174%204.6202%2023.9189%204.41895Z'%20fill='%2316191E'/%3e%3cpath%20d='M46.1289%201C50.338%201%2051.7002%204.09697%2051.7002%207.91699C51.7002%2011.7369%2050.6267%2014.834%2046.1289%2014.834C41.6315%2014.8338%2040.5586%2011.7368%2040.5586%207.91699C40.5586%204.09711%2041.6727%201.00023%2046.1289%201ZM46.8564%204.41895C45.3991%204.18544%2044.853%205.71281%2044.4785%207.64453C44.104%209.5762%2044.2047%2011.2071%2045.5%2011.415C46.7956%2011.6228%2047.5044%2010.1213%2047.8789%208.18945C48.2534%206.25774%2048.1115%204.6202%2046.8564%204.41895Z'%20fill='%2316191E'/%3e%3crect%20x='2.05397'%20y='1.15553'%20width='3.57616'%20height='14.1196'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='7.44069'%20y='12.5227'%20width='3.57616'%20height='11.2033'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='21.5696'%20y='15.8137'%20width='3.57616'%20height='7.91316'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='27.8406'%20y='15.8137'%20width='3.20228'%20height='9.10958'%20transform='rotate(90%2027.8406%2015.8137)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='32.4031'%20y='20.5227'%20width='3.20228'%20height='5.22123'%20transform='rotate(90%2032.4031%2020.5227)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='56.8484'%20y='20.5227'%20width='3.20228'%20height='7.68883'%20transform='rotate(90%2056.8484%2020.5227)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='51.3171'%20y='20.5867'%20width='3.57616'%20height='4.6978'%20transform='rotate(180%2051.3171%2020.5867)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='53.1282'%20y='1.15553'%20width='3.57616'%20height='16.5872'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='29.7962'%20y='1.15553'%20width='3.57616'%20height='22.5692'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='17.2937'%20y='20.5227'%20width='3.20228'%20height='15.7646'%20transform='rotate(90%2017.2937%2020.5227)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='16.7702'%20y='12.3723'%20width='3.27706'%20height='14.7178'%20transform='rotate(90%2016.7702%2012.3723)'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3crect%20x='34.6555'%20y='1.15553'%20width='3.57616'%20height='22.5692'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3cpath%20d='M51.2432%2021.4775L40.4131%2023.708V20.1553L51.2432%2017.9258V21.4775Z'%20fill='%2316191E'%20stroke='%2316191E'%20stroke-width='0.162631'/%3e%3c/svg%3e",C="/assets/bg_festival-CYbdk6eS.svg",v="/assets/bg_order-C4LFRYk8.svg",E="/assets/bg_status-X4xZSgun.svg",N="/assets/bg_waiting-B0UxGpnI.svg",F=()=>{const l=u();return t.jsxs("div",{className:"relative min-h-screen flex flex-col bg-white",children:[t.jsxs("section",{className:"w-[576px] [@media(max-width:431px)]:w-[325px] text-left mx-auto mt-[50px] ",children:[t.jsx("div",{children:t.jsx("img",{src:k})}),t.jsxs("h2",{className:"text-3xl font-bold leading-snug mt-4",children:["기다림 없는 ",t.jsx("br",{})," 우리의 즐거운 축제"]}),t.jsx("div",{className:"mt-[44px] mb-[118.44px] flex justify-center items-center max-w-[498.91px] max-h-[394.56px] bg-transparent rounded-lg [@media(max-width:431px)]:w-[325px] [@media(max-width:431px)]:h-[325px]",children:t.jsx("img",{src:C,className:"w-full h-full object-cover"})})]}),t.jsxs("section",{className:"w-[576px] [@media(max-width:431px)]:w-[325px] mx-auto ",children:[t.jsx(i,{label:"웨이팅 관리",small:!1,changeColor:!0}),t.jsxs("h3",{className:"text-headline-28-bold mb-3 mt-3",children:["대기 없이 빠르게",t.jsx("br",{}),"입장 안내해요"]}),t.jsxs("p",{className:"text-16-regular text-black-70",children:["등록된 대기 팀 정보를 실시간으로 확인하고,",t.jsx("br",{}),"간편하게 입장 처리를 할 수 있어요."]}),t.jsx("div",{className:"mt-[38px] mb-[83px] w-[325px] h-[210px] w-60 bg-transparent rounded-lg [@media(max-width:431px)]:w-[325px]",children:t.jsx("img",{src:N,className:"w-full h-full object-cover"})})]}),t.jsxs("section",{className:"w-[576px] [@media(max-width:431px)]:w-[325px] mx-auto text-right",children:[t.jsx(i,{label:"주문 관리",small:!1,changeColor:!0}),t.jsxs("h3",{className:"text-headline-28-bold mb-3 mt-3",children:["주문 접수, 입금 확인도",t.jsx("br",{}),"간편하게 확인해요"]}),t.jsxs("p",{className:"text-16-regular text-black-70",children:["주문이 들어오면 리스트로 자동 표시되고,",t.jsx("br",{}),"입금 여부만 확인하면 주문 처리가 끝나요."]}),t.jsx("div",{className:"mt-[38px] mb-[96px] ml-auto w-[325px] h-[210px] bg-transparent rounded-lg [@media(max-width:431px)]:w-[325px]",children:t.jsx("img",{src:v,className:"h-full w-full object-cover"})})]}),t.jsxs("section",{className:"w-[576px] [@media(max-width:431px)]:w-[325px] mx-auto mb-[200px]",children:[t.jsx(i,{label:"운영 현황 요약",small:!1,changeColor:!0}),t.jsxs("h3",{className:"text-headline-28-bold mb-3 mt-3",children:["운영 상황을 한눈에",t.jsx("br",{}),"정리해드려요"]}),t.jsxs("p",{className:"text-16-regular text-black-70",children:["대기 팀 수, 주문 현황, 처리 건수까지",t.jsx("br",{}),"현재 진행 상황을 실시간 확인할 수 있어요."]}),t.jsx("div",{className:"mt-[38px] mb-[75px] w-[325px] h-[210px] bg-transparent rounded-lg [@media(max-width:431px)]:w-[325px]",children:t.jsx("img",{src:E,className:"w-full h-full object-cover"})})]}),t.jsx("div",{className:`fixed bottom-6 left-1/2 -translate-x-1/2 w-[576px] \r + [@media(max-width:431px)]:mb-0 \r + [@media(max-width:431px)]:w-[325px] rounded-[12px]`,children:t.jsx(j,{buttonType:"big",className:"text-15-semibold",onClick:()=>l("login"),children:"계정으로 시작하기"})})]})};export{F as default}; diff --git a/apps/nowait-admin/dist/assets/index-B3dcE3TV.js b/apps/nowait-admin/dist/assets/AdminBooth-DWYMO8hu.js similarity index 52% rename from apps/nowait-admin/dist/assets/index-B3dcE3TV.js rename to apps/nowait-admin/dist/assets/AdminBooth-DWYMO8hu.js index ab37f854..6daa2c18 100644 --- a/apps/nowait-admin/dist/assets/index-B3dcE3TV.js +++ b/apps/nowait-admin/dist/assets/AdminBooth-DWYMO8hu.js @@ -1,427 +1,16 @@ -var mp=e=>{throw TypeError(e)};var C4=(e,r,t)=>r.has(e)||mp("Cannot "+t);var J=(e,r,t)=>(C4(e,r,"read from private field"),t?t.call(e):r.get(e)),J0=(e,r,t)=>r.has(e)?mp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Z0=(e,r,t,a)=>(C4(e,r,"write to private field"),a?a.call(e,t):r.set(e,t),t),gr=(e,r,t)=>(C4(e,r,"access private method"),t);var Hf=(e,r,t,a)=>({set _(n){Z0(e,r,n,t)},get _(){return J(e,r,a)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const A of o.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&a(A)}).observe(document,{childList:!0,subtree:!0});function t(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(n){if(n.ep)return;n.ep=!0;const o=t(n);fetch(n.href,o)}})();function J2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var B4={exports:{}},dl={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gp;function ID(){if(gp)return dl;gp=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(a,n,o){var A=null;if(o!==void 0&&(A=""+o),n.key!==void 0&&(A=""+n.key),"key"in n){o={};for(var s in n)s!=="key"&&(o[s]=n[s])}else o=n;return n=o.ref,{$$typeof:e,type:a,key:A,ref:n!==void 0?n:null,props:o}}return dl.Fragment=r,dl.jsx=t,dl.jsxs=t,dl}var vp;function TD(){return vp||(vp=1,B4.exports=ID()),B4.exports}var E=TD(),D4={exports:{}},hl={},F4={exports:{}},S4={};/** - * @license React - * scheduler.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ep;function ZD(){return Ep||(Ep=1,(function(e){function r(G,z){var F=G.length;G.push(z);r:for(;0>>1,j=G[Z];if(0>>1;Zn(P,F))_n(o0,P)?(G[Z]=o0,G[_]=F,Z=_):(G[Z]=P,G[W]=F,Z=W);else if(_n(o0,F))G[Z]=o0,G[_]=F,Z=_;else break r}}return z}function n(G,z){var F=G.sortIndex-z.sortIndex;return F!==0?F:G.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var A=Date,s=A.now();e.unstable_now=function(){return A.now()-s}}var u=[],c=[],d=1,x=null,b=3,p=!1,g=!1,k=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function S(G){for(var z=t(c);z!==null;){if(z.callback===null)a(c);else if(z.startTime<=G)a(c),z.sortIndex=z.expirationTime,r(u,z);else break;z=t(c)}}function w(G){if(k=!1,S(G),!g)if(t(u)!==null)g=!0,T||(T=!0,i0());else{var z=t(c);z!==null&&r0(w,z.startTime-G)}}var T=!1,D=-1,X=5,U=-1;function Y(){return y?!0:!(e.unstable_now()-UG&&Y());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,b=x.priorityLevel;var j=Z(x.expirationTime<=G);if(G=e.unstable_now(),typeof j=="function"){x.callback=j,S(G),z=!0;break e}x===t(u)&&a(u),S(G)}else a(u);x=t(u)}if(x!==null)z=!0;else{var R=t(c);R!==null&&r0(w,R.startTime-G),z=!1}}break r}finally{x=null,b=F,p=!1}z=void 0}}finally{z?i0():T=!1}}}var i0;if(typeof N=="function")i0=function(){N($)};else if(typeof MessageChannel<"u"){var t0=new MessageChannel,a0=t0.port2;t0.port1.onmessage=$,i0=function(){a0.postMessage(null)}}else i0=function(){C($,0)};function r0(G,z){D=C(function(){G(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=F,r(c,G),t(u)===null&&G===t(c)&&(k?(M(D),D=-1):k=!0,r0(w,F-Z))):(G.sortIndex=j,r(u,G),g||p||(g=!0,T||(T=!0,i0()))),G},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(G){var z=b;return function(){var F=b;b=z;try{return G.apply(this,arguments)}finally{b=F}}}})(S4)),S4}var kp;function OD(){return kp||(kp=1,F4.exports=ZD()),F4.exports}var R4={exports:{}},cr={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var yp;function WD(){if(yp)return cr;yp=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),A=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function p(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,y={};function C(R,W,P){this.props=R,this.context=W,this.refs=y,this.updater=P||g}C.prototype.isReactComponent={},C.prototype.setState=function(R,W){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,W,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function M(){}M.prototype=C.prototype;function N(R,W,P){this.props=R,this.context=W,this.refs=y,this.updater=P||g}var S=N.prototype=new M;S.constructor=N,k(S,C.prototype),S.isPureReactComponent=!0;var w=Array.isArray;function T(){}var D={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function U(R,W,P){var _=P.ref;return{$$typeof:e,type:R,key:W,ref:_!==void 0?_:null,props:P}}function Y(R,W){return U(R.type,W,R.props)}function $(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function i0(R){var W={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(P){return W[P]})}var t0=/\/+/g;function a0(R,W){return typeof R=="object"&&R!==null&&R.key!=null?i0(""+R.key):W.toString(36)}function r0(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(T,T):(R.status="pending",R.then(function(W){R.status==="pending"&&(R.status="fulfilled",R.value=W)},function(W){R.status==="pending"&&(R.status="rejected",R.reason=W)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function G(R,W,P,_,o0){var L=typeof R;(L==="undefined"||L==="boolean")&&(R=null);var e0=!1;if(R===null)e0=!0;else switch(L){case"bigint":case"string":case"number":e0=!0;break;case"object":switch(R.$$typeof){case e:case r:e0=!0;break;case d:return e0=R._init,G(e0(R._payload),W,P,_,o0)}}if(e0)return o0=o0(R),e0=_===""?"."+a0(R,0):_,w(o0)?(P="",e0!=null&&(P=e0.replace(t0,"$&/")+"/"),G(o0,W,P,"",function(k0){return k0})):o0!=null&&($(o0)&&(o0=Y(o0,P+(o0.key==null||R&&R.key===o0.key?"":(""+o0.key).replace(t0,"$&/")+"/")+e0)),W.push(o0)),1;e0=0;var y0=_===""?".":_+":";if(w(R))for(var E0=0;E0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),N4.exports=_D(),N4.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dp;function jD(){if(Dp)return hl;Dp=1;var e=OD(),r=ks(),t=Pv();function a(i){var l="https://react.dev/errors/"+i;if(1j||(i.current=Z[j],Z[j]=null,j--)}function P(i,l){j++,Z[j]=i.current,i.current=l}var _=R(null),o0=R(null),L=R(null),e0=R(null);function y0(i,l){switch(P(L,l),P(o0,i),P(_,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?Gb(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=Gb(l),i=Pb(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}W(_),P(_,i)}function E0(){W(_),W(o0),W(L)}function k0(i){i.memoizedState!==null&&P(e0,i);var l=_.current,f=Pb(l,i.type);l!==f&&(P(o0,i),P(_,f))}function p0(i){o0.current===i&&(W(_),W(o0)),e0.current===i&&(W(e0),sl._currentValue=F)}var B0,D0;function z0(i){if(B0===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);B0=l&&l[1]||"",D0=-1)":-1m||Q[h]!==s0[m]){var d0=` -`+Q[h].replace(" at new "," at ");return i.displayName&&d0.includes("")&&(d0=d0.replace("",i.displayName)),d0}while(1<=h&&0<=m);break}}}finally{O0=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?z0(f):""}function Ar(i,l){switch(i.tag){case 26:case 27:case 5:return z0(i.type);case 16:return z0("Lazy");case 13:return i.child!==l&&l!==null?z0("Suspense Fallback"):z0("Suspense");case 19:return z0("SuspenseList");case 0:case 15:return or(i.type,!1);case 11:return or(i.type.render,!1);case 1:return or(i.type,!0);case 31:return z0("Activity");default:return""}}function br(i){try{var l="",f=null;do l+=Ar(i,f),f=i,i=i.return;while(i);return l}catch(h){return` -Error generating stack: `+h.message+` -`+h.stack}}var S0=Object.prototype.hasOwnProperty,W0=e.unstable_scheduleCallback,er=e.unstable_cancelCallback,kr=e.unstable_shouldYield,pr=e.unstable_requestPaint,ur=e.unstable_now,re=e.unstable_getCurrentPriorityLevel,Ir=e.unstable_ImmediatePriority,jr=e.unstable_UserBlockingPriority,qr=e.unstable_NormalPriority,it=e.unstable_LowPriority,dt=e.unstable_IdlePriority,ue=e.log,Dt=e.unstable_setDisableYieldValue,ee=null,te=null;function ae(i){if(typeof ue=="function"&&Dt(i),te&&typeof te.setStrictMode=="function")try{te.setStrictMode(ee,i)}catch{}}var Ur=Math.clz32?Math.clz32:Pe,Ra=Math.log,We=Math.LN2;function Pe(i){return i>>>=0,i===0?32:31-(Ra(i)/We|0)|0}var ke=256,xe=262144,Ft=4194304;function Ae(i){var l=i&42;if(l!==0)return l;switch(i&-i){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Y0(i,l,f){var h=i.pendingLanes;if(h===0)return 0;var m=0,v=i.suspendedLanes,B=i.pingedLanes;i=i.warmLanes;var O=h&134217727;return O!==0?(h=O&~v,h!==0?m=Ae(h):(B&=O,B!==0?m=Ae(B):f||(f=O&~i,f!==0&&(m=Ae(f))))):(O=h&~v,O!==0?m=Ae(O):B!==0?m=Ae(B):f||(f=h&~i,f!==0&&(m=Ae(f)))),m===0?0:l!==0&&l!==m&&(l&v)===0&&(v=m&-m,f=l&-l,v>=f||v===32&&(f&4194048)!==0)?l:m}function U0(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function $0(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function j0(){var i=Ft;return Ft<<=1,(Ft&62914560)===0&&(Ft=4194304),i}function Q0(i){for(var l=[],f=0;31>f;f++)l.push(i);return l}function N0(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function V(i,l,f,h,m,v){var B=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var O=i.entanglements,Q=i.expirationTimes,s0=i.hiddenUpdates;for(f=B&~f;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var DC=/[\n"\\]/g;function oa(i){return i.replace(DC,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function g1(i,l,f,h,m,v,B,O){i.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?i.type=B:i.removeAttribute("type"),l!=null?B==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+St(l)):i.value!==""+St(l)&&(i.value=""+St(l)):B!=="submit"&&B!=="reset"||i.removeAttribute("value"),l!=null?v1(i,B,St(l)):f!=null?v1(i,B,St(f)):h!=null&&i.removeAttribute("value"),m==null&&v!=null&&(i.defaultChecked=!!v),m!=null&&(i.checked=m&&typeof m!="function"&&typeof m!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?i.name=""+St(O):i.removeAttribute("name")}function Z6(i,l,f,h,m,v,B,O){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(i.type=v),l!=null||f!=null){if(!(v!=="submit"&&v!=="reset"||l!=null)){m1(i);return}f=f!=null?""+St(f):"",l=l!=null?""+St(l):f,O||l===i.value||(i.value=l),i.defaultValue=l}h=h??m,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=O?i.checked:!!h,i.defaultChecked=!!h,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(i.name=B),m1(i)}function v1(i,l,f){l==="number"&&Os(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function ro(i,l,f,h){if(i=i.options,l){l={};for(var m=0;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),C1=!1;if(fn)try{var DA={};Object.defineProperty(DA,"passive",{get:function(){C1=!0}}),window.addEventListener("test",DA,DA),window.removeEventListener("test",DA,DA)}catch{C1=!1}var zn=null,B1=null,_s=null;function P6(){if(_s)return _s;var i,l=B1,f=l.length,h,m="value"in zn?zn.value:zn.textContent,v=m.length;for(i=0;i=RA),Y6=" ",Q6=!1;function J6(i,l){switch(i){case"keyup":return eB.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function q6(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var no=!1;function aB(i,l){switch(i){case"compositionend":return q6(l);case"keypress":return l.which!==32?null:(Q6=!0,Y6);case"textInput":return i=l.data,i===Y6&&Q6?null:i;default:return null}}function nB(i,l){if(no)return i==="compositionend"||!N1&&J6(i,l)?(i=P6(),_s=B1=zn=null,no=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:f,offset:l-i};i=h}r:{for(;f;){if(f.nextSibling){f=f.nextSibling;break r}f=f.parentNode}f=void 0}f=i3(f)}}function A3(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?A3(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function l3(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=Os(i.document);l instanceof i.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)i=l.contentWindow;else break;l=Os(i.document)}return l}function T1(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var cB=fn&&"documentMode"in document&&11>=document.documentMode,io=null,Z1=null,TA=null,O1=!1;function s3(i,l,f){var h=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;O1||io==null||io!==Os(h)||(h=io,"selectionStart"in h&&T1(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),TA&&IA(TA,h)||(TA=h,h=Mf(Z1,"onSelect"),0>=B,m-=B,La=1<<32-Ur(l)+m|f<mr?(Sr=H0,H0=null):Sr=H0.sibling;var Or=f0(n0,H0,l0[mr],x0);if(Or===null){H0===null&&(H0=Sr);break}i&&H0&&Or.alternate===null&&l(n0,H0),K=v(Or,K,mr),Zr===null?K0=Or:Zr.sibling=Or,Zr=Or,H0=Sr}if(mr===l0.length)return f(n0,H0),Rr&&cn(n0,mr),K0;if(H0===null){for(;mrmr?(Sr=H0,H0=null):Sr=H0.sibling;var di=f0(n0,H0,Or.value,x0);if(di===null){H0===null&&(H0=Sr);break}i&&H0&&di.alternate===null&&l(n0,H0),K=v(di,K,mr),Zr===null?K0=di:Zr.sibling=di,Zr=di,H0=Sr}if(Or.done)return f(n0,H0),Rr&&cn(n0,mr),K0;if(H0===null){for(;!Or.done;mr++,Or=l0.next())Or=b0(n0,Or.value,x0),Or!==null&&(K=v(Or,K,mr),Zr===null?K0=Or:Zr.sibling=Or,Zr=Or);return Rr&&cn(n0,mr),K0}for(H0=h(H0);!Or.done;mr++,Or=l0.next())Or=c0(H0,n0,mr,Or.value,x0),Or!==null&&(i&&Or.alternate!==null&&H0.delete(Or.key===null?mr:Or.key),K=v(Or,K,mr),Zr===null?K0=Or:Zr.sibling=Or,Zr=Or);return i&&H0.forEach(function(MD){return l(n0,MD)}),Rr&&cn(n0,mr),K0}function Qr(n0,K,l0,x0){if(typeof l0=="object"&&l0!==null&&l0.type===k&&l0.key===null&&(l0=l0.props.children),typeof l0=="object"&&l0!==null){switch(l0.$$typeof){case p:r:{for(var K0=l0.key;K!==null;){if(K.key===K0){if(K0=l0.type,K0===k){if(K.tag===7){f(n0,K.sibling),x0=m(K,l0.props.children),x0.return=n0,n0=x0;break r}}else if(K.elementType===K0||typeof K0=="object"&&K0!==null&&K0.$$typeof===X&&A2(K0)===K.type){f(n0,K.sibling),x0=m(K,l0.props),VA(x0,l0),x0.return=n0,n0=x0;break r}f(n0,K);break}else l(n0,K);K=K.sibling}l0.type===k?(x0=t2(l0.props.children,n0.mode,x0,l0.key),x0.return=n0,n0=x0):(x0=Ys(l0.type,l0.key,l0.props,null,n0.mode,x0),VA(x0,l0),x0.return=n0,n0=x0)}return B(n0);case g:r:{for(K0=l0.key;K!==null;){if(K.key===K0)if(K.tag===4&&K.stateNode.containerInfo===l0.containerInfo&&K.stateNode.implementation===l0.implementation){f(n0,K.sibling),x0=m(K,l0.children||[]),x0.return=n0,n0=x0;break r}else{f(n0,K);break}else l(n0,K);K=K.sibling}x0=X1(l0,n0.mode,x0),x0.return=n0,n0=x0}return B(n0);case X:return l0=A2(l0),Qr(n0,K,l0,x0)}if(r0(l0))return L0(n0,K,l0,x0);if(i0(l0)){if(K0=i0(l0),typeof K0!="function")throw Error(a(150));return l0=K0.call(l0),nr(n0,K,l0,x0)}if(typeof l0.then=="function")return Qr(n0,K,ef(l0),x0);if(l0.$$typeof===N)return Qr(n0,K,qs(n0,l0),x0);tf(n0,l0)}return typeof l0=="string"&&l0!==""||typeof l0=="number"||typeof l0=="bigint"?(l0=""+l0,K!==null&&K.tag===6?(f(n0,K.sibling),x0=m(K,l0),x0.return=n0,n0=x0):(f(n0,K),x0=P1(l0,n0.mode,x0),x0.return=n0,n0=x0),B(n0)):f(n0,K)}return function(n0,K,l0,x0){try{jA=0;var K0=Qr(n0,K,l0,x0);return po=null,K0}catch(H0){if(H0===bo||H0===Ks)throw H0;var Zr=zt(29,H0,null,n0.mode);return Zr.lanes=x0,Zr.return=n0,Zr}finally{}}}var s2=M3(!0),I3=M3(!1),Jn=!1;function ed(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function td(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qn(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function $n(i,l,f){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(_r&2)!==0){var m=h.pending;return m===null?l.next=l:(l.next=m.next,m.next=l),h.pending=l,l=Hs(i),b3(i,null,f),l}return Us(i,h,l,f),Hs(i)}function GA(i,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var h=l.lanes;h&=i.pendingLanes,f|=h,l.lanes=f,A0(i,f)}}function ad(i,l){var f=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,f===h)){var m=null,v=null;if(f=f.firstBaseUpdate,f!==null){do{var B={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};v===null?m=v=B:v=v.next=B,f=f.next}while(f!==null);v===null?m=v=l:v=v.next=l}else m=v=l;f={baseState:h.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:h.shared,callbacks:h.callbacks},i.updateQueue=f;return}i=f.lastBaseUpdate,i===null?f.firstBaseUpdate=l:i.next=l,f.lastBaseUpdate=l}var nd=!1;function PA(){if(nd){var i=xo;if(i!==null)throw i}}function XA(i,l,f,h){nd=!1;var m=i.updateQueue;Jn=!1;var v=m.firstBaseUpdate,B=m.lastBaseUpdate,O=m.shared.pending;if(O!==null){m.shared.pending=null;var Q=O,s0=Q.next;Q.next=null,B===null?v=s0:B.next=s0,B=Q;var d0=i.alternate;d0!==null&&(d0=d0.updateQueue,O=d0.lastBaseUpdate,O!==B&&(O===null?d0.firstBaseUpdate=s0:O.next=s0,d0.lastBaseUpdate=Q))}if(v!==null){var b0=m.baseState;B=0,d0=s0=Q=null,O=v;do{var f0=O.lane&-536870913,c0=f0!==O.lane;if(c0?(Fr&f0)===f0:(h&f0)===f0){f0!==0&&f0===ho&&(nd=!0),d0!==null&&(d0=d0.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});r:{var L0=i,nr=O;f0=l;var Qr=f;switch(nr.tag){case 1:if(L0=nr.payload,typeof L0=="function"){b0=L0.call(Qr,b0,f0);break r}b0=L0;break r;case 3:L0.flags=L0.flags&-65537|128;case 0:if(L0=nr.payload,f0=typeof L0=="function"?L0.call(Qr,b0,f0):L0,f0==null)break r;b0=x({},b0,f0);break r;case 2:Jn=!0}}f0=O.callback,f0!==null&&(i.flags|=64,c0&&(i.flags|=8192),c0=m.callbacks,c0===null?m.callbacks=[f0]:c0.push(f0))}else c0={lane:f0,tag:O.tag,payload:O.payload,callback:O.callback,next:null},d0===null?(s0=d0=c0,Q=b0):d0=d0.next=c0,B|=f0;if(O=O.next,O===null){if(O=m.shared.pending,O===null)break;c0=O,O=c0.next,c0.next=null,m.lastBaseUpdate=c0,m.shared.pending=null}}while(!0);d0===null&&(Q=b0),m.baseState=Q,m.firstBaseUpdate=s0,m.lastBaseUpdate=d0,v===null&&(m.shared.lanes=0),ai|=B,i.lanes=B,i.memoizedState=b0}}function T3(i,l){if(typeof i!="function")throw Error(a(191,i));i.call(l)}function Z3(i,l){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;iv?v:8;var B=G.T,O={};G.T=O,yd(i,!1,l,f);try{var Q=m(),s0=G.S;if(s0!==null&&s0(O,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var d0=EB(Q,h);UA(i,l,d0,Jt(i))}else UA(i,l,h,Jt(i))}catch(b0){UA(i,l,{then:function(){},status:"rejected",reason:b0},Jt())}finally{z.p=v,B!==null&&O.types!==null&&(B.types=O.types),G.T=B}}function DB(){}function Ed(i,l,f,h){if(i.tag!==5)throw Error(a(476));var m=d5(i).queue;c5(i,m,l,F,f===null?DB:function(){return h5(i),f(h)})}function d5(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:F},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:f},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function h5(i){var l=d5(i);l.next===null&&(l=i.alternate.memoizedState),UA(i,l.next.queue,{},Jt())}function kd(){return $e(sl)}function x5(){return we().memoizedState}function b5(){return we().memoizedState}function FB(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var f=Jt();i=qn(f);var h=$n(l,i,f);h!==null&&(Zt(h,l,f),GA(h,l,f)),l={cache:q1()},i.payload=l;return}l=l.return}}function SB(i,l,f){var h=Jt();f={lane:h,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},df(i)?m5(l,f):(f=V1(i,l,f,h),f!==null&&(Zt(f,i,h),g5(f,l,h)))}function p5(i,l,f){var h=Jt();UA(i,l,f,h)}function UA(i,l,f,h){var m={lane:h,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(df(i))m5(l,m);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=l.lastRenderedReducer,v!==null))try{var B=l.lastRenderedState,O=v(B,f);if(m.hasEagerState=!0,m.eagerState=O,Lt(O,B))return Us(i,l,m,0),$r===null&&zs(),!1}catch{}finally{}if(f=V1(i,l,m,h),f!==null)return Zt(f,i,h),g5(f,l,h),!0}return!1}function yd(i,l,f,h){if(h={lane:2,revertLane:e4(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},df(i)){if(l)throw Error(a(479))}else l=V1(i,f,h,2),l!==null&&Zt(l,i,2)}function df(i){var l=i.alternate;return i===hr||l!==null&&l===hr}function m5(i,l){go=of=!0;var f=i.pending;f===null?l.next=l:(l.next=f.next,f.next=l),i.pending=l}function g5(i,l,f){if((f&4194048)!==0){var h=l.lanes;h&=i.pendingLanes,f|=h,l.lanes=f,A0(i,f)}}var HA={readContext:$e,use:sf,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useLayoutEffect:pe,useInsertionEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useSyncExternalStore:pe,useId:pe,useHostTransitionStatus:pe,useFormState:pe,useActionState:pe,useOptimistic:pe,useMemoCache:pe,useCacheRefresh:pe};HA.useEffectEvent=pe;var v5={readContext:$e,use:sf,useCallback:function(i,l){return xt().memoizedState=[i,l===void 0?null:l],i},useContext:$e,useEffect:a5,useImperativeHandle:function(i,l,f){f=f!=null?f.concat([i]):null,uf(4194308,4,A5.bind(null,l,i),f)},useLayoutEffect:function(i,l){return uf(4194308,4,i,l)},useInsertionEffect:function(i,l){uf(4,2,i,l)},useMemo:function(i,l){var f=xt();l=l===void 0?null:l;var h=i();if(f2){ae(!0);try{i()}finally{ae(!1)}}return f.memoizedState=[h,l],h},useReducer:function(i,l,f){var h=xt();if(f!==void 0){var m=f(l);if(f2){ae(!0);try{f(l)}finally{ae(!1)}}}else m=l;return h.memoizedState=h.baseState=m,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:m},h.queue=i,i=i.dispatch=SB.bind(null,hr,i),[h.memoizedState,i]},useRef:function(i){var l=xt();return i={current:i},l.memoizedState=i},useState:function(i){i=bd(i);var l=i.queue,f=p5.bind(null,hr,l);return l.dispatch=f,[i.memoizedState,f]},useDebugValue:gd,useDeferredValue:function(i,l){var f=xt();return vd(f,i,l)},useTransition:function(){var i=bd(!1);return i=c5.bind(null,hr,i.queue,!0,!1),xt().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,f){var h=hr,m=xt();if(Rr){if(f===void 0)throw Error(a(407));f=f()}else{if(f=l(),$r===null)throw Error(a(349));(Fr&127)!==0||G3(h,l,f)}m.memoizedState=f;var v={value:f,getSnapshot:l};return m.queue=v,a5(X3.bind(null,h,v,i),[i]),h.flags|=2048,Eo(9,{destroy:void 0},P3.bind(null,h,v,f,l),null),f},useId:function(){var i=xt(),l=$r.identifierPrefix;if(Rr){var f=za,h=La;f=(h&~(1<<32-Ur(h)-1)).toString(32)+f,l="_"+l+"R_"+f,f=Af++,0<\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof h.is=="string"?B.createElement("select",{is:h.is}):B.createElement("select"),h.multiple?v.multiple=!0:h.size&&(v.size=h.size);break;default:v=typeof h.is=="string"?B.createElement(m,{is:h.is}):B.createElement(m)}}v[V0]=l,v[I0]=h;r:for(B=l.child;B!==null;){if(B.tag===5||B.tag===6)v.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===l)break r;for(;B.sibling===null;){if(B.return===null||B.return===l)break r;B=B.return}B.sibling.return=B.return,B=B.sibling}l.stateNode=v;r:switch(rt(v,m,h),m){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break r;case"img":h=!0;break r;default:h=!1}h&&mn(l)}}return ie(l),Wd(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,f),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==h&&mn(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(a(166));if(i=L.current,uo(l)){if(i=l.stateNode,f=l.memoizedProps,h=null,m=qe,m!==null)switch(m.tag){case 27:case 5:h=m.memoizedProps}i[V0]=l,i=!!(i.nodeValue===f||h!==null&&h.suppressHydrationWarning===!0||jb(i.nodeValue,f)),i||Yn(l,!0)}else i=If(i).createTextNode(h),i[V0]=l,l.stateNode=i}return ie(l),null;case 31:if(f=l.memoizedState,i===null||i.memoizedState!==null){if(h=uo(l),f!==null){if(i===null){if(!h)throw Error(a(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[V0]=l}else a2(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ie(l),i=!1}else f=H1(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return l.flags&256?(Ht(l),l):(Ht(l),null);if((l.flags&128)!==0)throw Error(a(558))}return ie(l),null;case 13:if(h=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(m=uo(l),h!==null&&h.dehydrated!==null){if(i===null){if(!m)throw Error(a(318));if(m=l.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[V0]=l}else a2(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ie(l),m=!1}else m=H1(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),m=!0;if(!m)return l.flags&256?(Ht(l),l):(Ht(l),null)}return Ht(l),(l.flags&128)!==0?(l.lanes=f,l):(f=h!==null,i=i!==null&&i.memoizedState!==null,f&&(h=l.child,m=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(m=h.alternate.memoizedState.cachePool.pool),v=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(v=h.memoizedState.cachePool.pool),v!==m&&(h.flags|=2048)),f!==i&&f&&(l.child.flags|=8192),mf(l,l.updateQueue),ie(l),null);case 4:return E0(),i===null&&i4(l.stateNode.containerInfo),ie(l),null;case 10:return hn(l.type),ie(l),null;case 19:if(W(ye),h=l.memoizedState,h===null)return ie(l),null;if(m=(l.flags&128)!==0,v=h.rendering,v===null)if(m)QA(h,!1);else{if(me!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(v=nf(i),v!==null){for(l.flags|=128,QA(h,!1),i=v.updateQueue,l.updateQueue=i,mf(l,i),l.subtreeFlags=0,i=f,f=l.child;f!==null;)p3(f,i),f=f.sibling;return P(ye,ye.current&1|2),Rr&&cn(l,h.treeForkCount),l.child}i=i.sibling}h.tail!==null&&ur()>yf&&(l.flags|=128,m=!0,QA(h,!1),l.lanes=4194304)}else{if(!m)if(i=nf(v),i!==null){if(l.flags|=128,m=!0,i=i.updateQueue,l.updateQueue=i,mf(l,i),QA(h,!0),h.tail===null&&h.tailMode==="hidden"&&!v.alternate&&!Rr)return ie(l),null}else 2*ur()-h.renderingStartTime>yf&&f!==536870912&&(l.flags|=128,m=!0,QA(h,!1),l.lanes=4194304);h.isBackwards?(v.sibling=l.child,l.child=v):(i=h.last,i!==null?i.sibling=v:l.child=v,h.last=v)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=ur(),i.sibling=null,f=ye.current,P(ye,m?f&1|2:f&1),Rr&&cn(l,h.treeForkCount),i):(ie(l),null);case 22:case 23:return Ht(l),od(),h=l.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(f&536870912)!==0&&(l.flags&128)===0&&(ie(l),l.subtreeFlags&6&&(l.flags|=8192)):ie(l),f=l.updateQueue,f!==null&&mf(l,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==f&&(l.flags|=2048),i!==null&&W(o2),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),hn(Re),ie(l),null;case 25:return null;case 30:return null}throw Error(a(156,l.tag))}function TB(i,l){switch(z1(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return hn(Re),E0(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return p0(l),null;case 31:if(l.memoizedState!==null){if(Ht(l),l.alternate===null)throw Error(a(340));a2()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Ht(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(a(340));a2()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return W(ye),null;case 4:return E0(),null;case 10:return hn(l.type),null;case 22:case 23:return Ht(l),od(),i!==null&&W(o2),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return hn(Re),null;case 25:return null;default:return null}}function L5(i,l){switch(z1(l),l.tag){case 3:hn(Re),E0();break;case 26:case 27:case 5:p0(l);break;case 4:E0();break;case 31:l.memoizedState!==null&&Ht(l);break;case 13:Ht(l);break;case 19:W(ye);break;case 10:hn(l.type);break;case 22:case 23:Ht(l),od(),i!==null&&W(o2);break;case 24:hn(Re)}}function JA(i,l){try{var f=l.updateQueue,h=f!==null?f.lastEffect:null;if(h!==null){var m=h.next;f=m;do{if((f.tag&i)===i){h=void 0;var v=f.create,B=f.inst;h=v(),B.destroy=h}f=f.next}while(f!==m)}}catch(O){Xr(l,l.return,O)}}function ei(i,l,f){try{var h=l.updateQueue,m=h!==null?h.lastEffect:null;if(m!==null){var v=m.next;h=v;do{if((h.tag&i)===i){var B=h.inst,O=B.destroy;if(O!==void 0){B.destroy=void 0,m=l;var Q=f,s0=O;try{s0()}catch(d0){Xr(m,Q,d0)}}}h=h.next}while(h!==v)}}catch(d0){Xr(l,l.return,d0)}}function z5(i){var l=i.updateQueue;if(l!==null){var f=i.stateNode;try{Z3(l,f)}catch(h){Xr(i,i.return,h)}}}function U5(i,l,f){f.props=u2(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(h){Xr(i,l,h)}}function qA(i,l){try{var f=i.ref;if(f!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof f=="function"?i.refCleanup=f(h):f.current=h}}catch(m){Xr(i,l,m)}}function Ua(i,l){var f=i.ref,h=i.refCleanup;if(f!==null)if(typeof h=="function")try{h()}catch(m){Xr(i,l,m)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(m){Xr(i,l,m)}else f.current=null}function H5(i){var l=i.type,f=i.memoizedProps,h=i.stateNode;try{r:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&h.focus();break r;case"img":f.src?h.src=f.src:f.srcSet&&(h.srcset=f.srcSet)}}catch(m){Xr(i,i.return,m)}}function _d(i,l,f){try{var h=i.stateNode;tD(h,i.type,f,l),h[I0]=l}catch(m){Xr(i,i.return,m)}}function Y5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&li(i.type)||i.tag===4}function jd(i){r:for(;;){for(;i.sibling===null;){if(i.return===null||Y5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&li(i.type)||i.flags&2||i.child===null||i.tag===4)continue r;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Vd(i,l,f){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(i,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(i),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=sn));else if(h!==4&&(h===27&&li(i.type)&&(f=i.stateNode,l=null),i=i.child,i!==null))for(Vd(i,l,f),i=i.sibling;i!==null;)Vd(i,l,f),i=i.sibling}function gf(i,l,f){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?f.insertBefore(i,l):f.appendChild(i);else if(h!==4&&(h===27&&li(i.type)&&(f=i.stateNode),i=i.child,i!==null))for(gf(i,l,f),i=i.sibling;i!==null;)gf(i,l,f),i=i.sibling}function Q5(i){var l=i.stateNode,f=i.memoizedProps;try{for(var h=i.type,m=l.attributes;m.length;)l.removeAttributeNode(m[0]);rt(l,h,f),l[V0]=i,l[I0]=f}catch(v){Xr(i,i.return,v)}}var gn=!1,Ie=!1,Gd=!1,J5=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function ZB(i,l){if(i=i.containerInfo,l4=Vf,i=l3(i),T1(i)){if("selectionStart"in i)var f={start:i.selectionStart,end:i.selectionEnd};else r:{f=(f=i.ownerDocument)&&f.defaultView||window;var h=f.getSelection&&f.getSelection();if(h&&h.rangeCount!==0){f=h.anchorNode;var m=h.anchorOffset,v=h.focusNode;h=h.focusOffset;try{f.nodeType,v.nodeType}catch{f=null;break r}var B=0,O=-1,Q=-1,s0=0,d0=0,b0=i,f0=null;e:for(;;){for(var c0;b0!==f||m!==0&&b0.nodeType!==3||(O=B+m),b0!==v||h!==0&&b0.nodeType!==3||(Q=B+h),b0.nodeType===3&&(B+=b0.nodeValue.length),(c0=b0.firstChild)!==null;)f0=b0,b0=c0;for(;;){if(b0===i)break e;if(f0===f&&++s0===m&&(O=B),f0===v&&++d0===h&&(Q=B),(c0=b0.nextSibling)!==null)break;b0=f0,f0=b0.parentNode}b0=c0}f=O===-1||Q===-1?null:{start:O,end:Q}}else f=null}f=f||{start:0,end:0}}else f=null;for(s4={focusedElem:i,selectionRange:f},Vf=!1,Xe=l;Xe!==null;)if(l=Xe,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Xe=i;else for(;Xe!==null;){switch(l=Xe,v=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(f=0;f title"))),rt(v,h,f),v[V0]=i,dr(v),h=v;break r;case"link":var B=tp("link","href",m).get(h+(f.href||""));if(B){for(var O=0;OQr&&(B=Qr,Qr=nr,nr=B);var n0=o3(O,nr),K=o3(O,Qr);if(n0&&K&&(c0.rangeCount!==1||c0.anchorNode!==n0.node||c0.anchorOffset!==n0.offset||c0.focusNode!==K.node||c0.focusOffset!==K.offset)){var l0=b0.createRange();l0.setStart(n0.node,n0.offset),c0.removeAllRanges(),nr>Qr?(c0.addRange(l0),c0.extend(K.node,K.offset)):(l0.setEnd(K.node,K.offset),c0.addRange(l0))}}}}for(b0=[],c0=O;c0=c0.parentNode;)c0.nodeType===1&&b0.push({element:c0,left:c0.scrollLeft,top:c0.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;Of?32:f,G.T=null,f=Yd,Yd=null;var v=ii,B=wn;if(je=0,Bo=ii=null,wn=0,(_r&6)!==0)throw Error(a(331));var O=_r;if(_r|=4,Ab(v.current),nb(v,v.current,B,f),_r=O,al(0,!1),te&&typeof te.onPostCommitFiberRoot=="function")try{te.onPostCommitFiberRoot(ee,v)}catch{}return!0}finally{z.p=m,G.T=h,Cb(i,l)}}function Db(i,l,f){l=la(f,l),l=Dd(i.stateNode,l,2),i=$n(i,l,2),i!==null&&(N0(i,2),Ha(i))}function Xr(i,l,f){if(i.tag===3)Db(i,i,f);else for(;l!==null;){if(l.tag===3){Db(l,i,f);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ni===null||!ni.has(h))){i=la(f,i),f=F5(2),h=$n(l,f,2),h!==null&&(S5(f,h,l,i),N0(h,2),Ha(h));break}}l=l.return}}function $d(i,l,f){var h=i.pingCache;if(h===null){h=i.pingCache=new _B;var m=new Set;h.set(l,m)}else m=h.get(l),m===void 0&&(m=new Set,h.set(l,m));m.has(f)||(Ld=!0,m.add(f),i=XB.bind(null,i,l,f),l.then(i,i))}function XB(i,l,f){var h=i.pingCache;h!==null&&h.delete(l),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,$r===i&&(Fr&f)===f&&(me===4||me===3&&(Fr&62914560)===Fr&&300>ur()-kf?(_r&2)===0&&Do(i,0):zd|=f,Co===Fr&&(Co=0)),Ha(i)}function Fb(i,l){l===0&&(l=j0()),i=e2(i,l),i!==null&&(N0(i,l),Ha(i))}function LB(i){var l=i.memoizedState,f=0;l!==null&&(f=l.retryLane),Fb(i,f)}function zB(i,l){var f=0;switch(i.tag){case 31:case 13:var h=i.stateNode,m=i.memoizedState;m!==null&&(f=m.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(a(314))}h!==null&&h.delete(l),Fb(i,f)}function UB(i,l){return W0(i,l)}var Sf=null,So=null,Kd=!1,Rf=!1,r4=!1,Ai=0;function Ha(i){i!==So&&i.next===null&&(So===null?Sf=So=i:So=So.next=i),Rf=!0,Kd||(Kd=!0,YB())}function al(i,l){if(!r4&&Rf){r4=!0;do for(var f=!1,h=Sf;h!==null;){if(i!==0){var m=h.pendingLanes;if(m===0)var v=0;else{var B=h.suspendedLanes,O=h.pingedLanes;v=(1<<31-Ur(42|i)+1)-1,v&=m&~(B&~O),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(f=!0,Mb(h,v))}else v=Fr,v=Y0(h,h===$r?v:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(v&3)===0||U0(h,v)||(f=!0,Mb(h,v));h=h.next}while(f);r4=!1}}function HB(){Sb()}function Sb(){Rf=Kd=!1;var i=0;Ai!==0&&nD()&&(i=Ai);for(var l=ur(),f=null,h=Sf;h!==null;){var m=h.next,v=Rb(h,l);v===0?(h.next=null,f===null?Sf=m:f.next=m,m===null&&(So=f)):(f=h,(i!==0||(v&3)!==0)&&(Rf=!0)),h=m}je!==0&&je!==5||al(i),Ai!==0&&(Ai=0)}function Rb(i,l){for(var f=i.suspendedLanes,h=i.pingedLanes,m=i.expirationTimes,v=i.pendingLanes&-62914561;0O)break;var d0=Q.transferSize,b0=Q.initiatorType;d0&&Vb(b0)&&(Q=Q.responseEnd,B+=d0*(Q"u"?null:document;function $b(i,l,f){var h=Ro;if(h&&typeof l=="string"&&l){var m=oa(l);m='link[rel="'+i+'"][href="'+m+'"]',typeof f=="string"&&(m+='[crossorigin="'+f+'"]'),qb.has(m)||(qb.add(m),i={rel:i,crossOrigin:f,href:l},h.querySelector(m)===null&&(l=h.createElement("link"),rt(l,"link",i),dr(l),h.head.appendChild(l)))}}function dD(i){Cn.D(i),$b("dns-prefetch",i,null)}function hD(i,l){Cn.C(i,l),$b("preconnect",i,l)}function xD(i,l,f){Cn.L(i,l,f);var h=Ro;if(h&&i&&l){var m='link[rel="preload"][as="'+oa(l)+'"]';l==="image"&&f&&f.imageSrcSet?(m+='[imagesrcset="'+oa(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(m+='[imagesizes="'+oa(f.imageSizes)+'"]')):m+='[href="'+oa(i)+'"]';var v=m;switch(l){case"style":v=No(i);break;case"script":v=Mo(i)}ha.has(v)||(i=x({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:i,as:l},f),ha.set(v,i),h.querySelector(m)!==null||l==="style"&&h.querySelector(Al(v))||l==="script"&&h.querySelector(ll(v))||(l=h.createElement("link"),rt(l,"link",i),dr(l),h.head.appendChild(l)))}}function bD(i,l){Cn.m(i,l);var f=Ro;if(f&&i){var h=l&&typeof l.as=="string"?l.as:"script",m='link[rel="modulepreload"][as="'+oa(h)+'"][href="'+oa(i)+'"]',v=m;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Mo(i)}if(!ha.has(v)&&(i=x({rel:"modulepreload",href:i},l),ha.set(v,i),f.querySelector(m)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(ll(v)))return}h=f.createElement("link"),rt(h,"link",i),dr(h),f.head.appendChild(h)}}}function pD(i,l,f){Cn.S(i,l,f);var h=Ro;if(h&&i){var m=Mr(h).hoistableStyles,v=No(i);l=l||"default";var B=m.get(v);if(!B){var O={loading:0,preload:null};if(B=h.querySelector(Al(v)))O.loading=5;else{i=x({rel:"stylesheet",href:i,"data-precedence":l},f),(f=ha.get(v))&&b4(i,f);var Q=B=h.createElement("link");dr(Q),rt(Q,"link",i),Q._p=new Promise(function(s0,d0){Q.onload=s0,Q.onerror=d0}),Q.addEventListener("load",function(){O.loading|=1}),Q.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Zf(B,l,h)}B={type:"stylesheet",instance:B,count:1,state:O},m.set(v,B)}}}function mD(i,l){Cn.X(i,l);var f=Ro;if(f&&i){var h=Mr(f).hoistableScripts,m=Mo(i),v=h.get(m);v||(v=f.querySelector(ll(m)),v||(i=x({src:i,async:!0},l),(l=ha.get(m))&&p4(i,l),v=f.createElement("script"),dr(v),rt(v,"link",i),f.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(m,v))}}function gD(i,l){Cn.M(i,l);var f=Ro;if(f&&i){var h=Mr(f).hoistableScripts,m=Mo(i),v=h.get(m);v||(v=f.querySelector(ll(m)),v||(i=x({src:i,async:!0,type:"module"},l),(l=ha.get(m))&&p4(i,l),v=f.createElement("script"),dr(v),rt(v,"link",i),f.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(m,v))}}function Kb(i,l,f,h){var m=(m=L.current)?Tf(m):null;if(!m)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=No(f.href),f=Mr(m).hoistableStyles,h=f.get(l),h||(h={type:"style",instance:null,count:0,state:null},f.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=No(f.href);var v=Mr(m).hoistableStyles,B=v.get(i);if(B||(m=m.ownerDocument||m,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(i,B),(v=m.querySelector(Al(i)))&&!v._p&&(B.instance=v,B.state.loading=5),ha.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},ha.set(i,f),v||vD(m,i,f,B.state))),l&&h===null)throw Error(a(528,""));return B}if(l&&h!==null)throw Error(a(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Mo(f),f=Mr(m).hoistableScripts,h=f.get(l),h||(h={type:"script",instance:null,count:0,state:null},f.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function No(i){return'href="'+oa(i)+'"'}function Al(i){return'link[rel="stylesheet"]['+i+"]"}function rp(i){return x({},i,{"data-precedence":i.precedence,precedence:null})}function vD(i,l,f,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),rt(l,"link",f),dr(l),i.head.appendChild(l))}function Mo(i){return'[src="'+oa(i)+'"]'}function ll(i){return"script[async]"+i}function ep(i,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+oa(f.href)+'"]');if(h)return l.instance=h,dr(h),h;var m=x({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),dr(h),rt(h,"style",m),Zf(h,f.precedence,i),l.instance=h;case"stylesheet":m=No(f.href);var v=i.querySelector(Al(m));if(v)return l.state.loading|=4,l.instance=v,dr(v),v;h=rp(f),(m=ha.get(m))&&b4(h,m),v=(i.ownerDocument||i).createElement("link"),dr(v);var B=v;return B._p=new Promise(function(O,Q){B.onload=O,B.onerror=Q}),rt(v,"link",h),l.state.loading|=4,Zf(v,f.precedence,i),l.instance=v;case"script":return v=Mo(f.src),(m=i.querySelector(ll(v)))?(l.instance=m,dr(m),m):(h=f,(m=ha.get(v))&&(h=x({},f),p4(h,m)),i=i.ownerDocument||i,m=i.createElement("script"),dr(m),rt(m,"link",h),i.head.appendChild(m),l.instance=m);case"void":return null;default:throw Error(a(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,Zf(h,f.precedence,i));return l.instance}function Zf(i,l,f){for(var h=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=h.length?h[h.length-1]:null,v=m,B=0;B title"):null)}function ED(i,l,f){if(f===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return i=l.disabled,typeof l.precedence=="string"&&i==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function np(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function kD(i,l,f,h){if(f.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var m=No(h.href),v=l.querySelector(Al(m));if(v){l=v._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Wf.bind(i),l.then(i,i)),f.state.loading|=4,f.instance=v,dr(v);return}v=l.ownerDocument||l,h=rp(h),(m=ha.get(m))&&b4(h,m),v=v.createElement("link"),dr(v);var B=v;B._p=new Promise(function(O,Q){B.onload=O,B.onerror=Q}),rt(v,"link",h),f.instance=v}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(f,l),(l=f.state.preload)&&(f.state.loading&3)===0&&(i.count++,f=Wf.bind(i),l.addEventListener("load",f),l.addEventListener("error",f))}}var m4=0;function yD(i,l){return i.stylesheets&&i.count===0&&jf(i,i.stylesheets),0m4?50:800)+l);return i.unsuspend=f,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(m)}}:null}function Wf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jf(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var _f=null;function jf(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,_f=new Map,l.forEach(wD,i),_f=null,Wf.call(i))}function wD(i,l){if(!(l.state.loading&4)){var f=_f.get(i);if(f)var h=f.get(null);else{f=new Map,_f.set(i,f);for(var m=i.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),D4.exports=jD(),D4.exports}var GD=VD(),mA=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},PD={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},wi,e8,Nv,XD=(Nv=class{constructor(){J0(this,wi,PD);J0(this,e8,!1)}setTimeoutProvider(e){Z0(this,wi,e)}setTimeout(e,r){return J(this,wi).setTimeout(e,r)}clearTimeout(e){J(this,wi).clearTimeout(e)}setInterval(e,r){return J(this,wi).setInterval(e,r)}clearInterval(e){J(this,wi).clearInterval(e)}},wi=new WeakMap,e8=new WeakMap,Nv),m2=new XD;function LD(e){setTimeout(e,0)}var G2=typeof window>"u"||"Deno"in globalThis;function vt(){}function zD(e,r){return typeof e=="function"?e(r):e}function Xh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xv(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Wi(e,r){return typeof e=="function"?e(r):e}function va(e,r){return typeof e=="function"?e(r):e}function Sp(e,r){const{type:t="all",exact:a,fetchStatus:n,predicate:o,queryKey:A,stale:s}=e;if(A){if(a){if(r.queryHash!==t8(A,r.options))return!1}else if(!Ql(r.queryKey,A))return!1}if(t!=="all"){const u=r.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof s=="boolean"&&r.isStale()!==s||n&&n!==r.state.fetchStatus||o&&!o(r))}function Rp(e,r){const{exact:t,status:a,predicate:n,mutationKey:o}=e;if(o){if(!r.options.mutationKey)return!1;if(t){if(P2(r.options.mutationKey)!==P2(o))return!1}else if(!Ql(r.options.mutationKey,o))return!1}return!(a&&r.state.status!==a||n&&!n(r))}function t8(e,r){return((r==null?void 0:r.queryKeyHashFn)||P2)(e)}function P2(e){return JSON.stringify(e,(r,t)=>Lh(t)?Object.keys(t).sort().reduce((a,n)=>(a[n]=t[n],a),{}):t)}function Ql(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(t=>Ql(e[t],r[t])):!1}var UD=Object.prototype.hasOwnProperty;function Lv(e,r){if(e===r)return e;const t=Np(e)&&Np(r);if(!t&&!(Lh(e)&&Lh(r)))return r;const n=(t?e:Object.keys(e)).length,o=t?r:Object.keys(r),A=o.length,s=t?new Array(A):{};let u=0;for(let c=0;c{m2.setTimeout(r,e)})}function zh(e,r,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,r):t.structuralSharing!==!1?Lv(e,r):r}function YD(e,r,t=0){const a=[...e,r];return t&&a.length>t?a.slice(1):a}function QD(e,r,t=0){const a=[r,...e];return t&&a.length>t?a.slice(0,-1):a}var a8=Symbol();function zv(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===a8?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Uv(e,r){return typeof e=="function"?e(...r):!!e}var B2,Ci,Qo,Mv,JD=(Mv=class extends mA{constructor(){super();J0(this,B2);J0(this,Ci);J0(this,Qo);Z0(this,Qo,r=>{if(!G2&&window.addEventListener){const t=()=>r();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){J(this,Ci)||this.setEventListener(J(this,Qo))}onUnsubscribe(){var r;this.hasListeners()||((r=J(this,Ci))==null||r.call(this),Z0(this,Ci,void 0))}setEventListener(r){var t;Z0(this,Qo,r),(t=J(this,Ci))==null||t.call(this),Z0(this,Ci,r(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(r){J(this,B2)!==r&&(Z0(this,B2,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(t=>{t(r)})}isFocused(){var r;return typeof J(this,B2)=="boolean"?J(this,B2):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},B2=new WeakMap,Ci=new WeakMap,Qo=new WeakMap,Mv),n8=new JD;function Uh(){let e,r;const t=new Promise((n,o)=>{e=n,r=o});t.status="pending",t.catch(()=>{});function a(n){Object.assign(t,n),delete t.resolve,delete t.reject}return t.resolve=n=>{a({status:"fulfilled",value:n}),e(n)},t.reject=n=>{a({status:"rejected",reason:n}),r(n)},t}var qD=LD;function $D(){let e=[],r=0,t=s=>{s()},a=s=>{s()},n=qD;const o=s=>{r?e.push(s):n(()=>{t(s)})},A=()=>{const s=e;e=[],s.length&&n(()=>{a(()=>{s.forEach(u=>{t(u)})})})};return{batch:s=>{let u;r++;try{u=s()}finally{r--,r||A()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{t=s},setBatchNotifyFunction:s=>{a=s},setScheduler:s=>{n=s}}}var Ve=$D(),Jo,Bi,qo,Iv,KD=(Iv=class extends mA{constructor(){super();J0(this,Jo,!0);J0(this,Bi);J0(this,qo);Z0(this,qo,r=>{if(!G2&&window.addEventListener){const t=()=>r(!0),a=()=>r(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",a)}}})}onSubscribe(){J(this,Bi)||this.setEventListener(J(this,qo))}onUnsubscribe(){var r;this.hasListeners()||((r=J(this,Bi))==null||r.call(this),Z0(this,Bi,void 0))}setEventListener(r){var t;Z0(this,qo,r),(t=J(this,Bi))==null||t.call(this),Z0(this,Bi,r(this.setOnline.bind(this)))}setOnline(r){J(this,Jo)!==r&&(Z0(this,Jo,r),this.listeners.forEach(a=>{a(r)}))}isOnline(){return J(this,Jo)}},Jo=new WeakMap,Bi=new WeakMap,qo=new WeakMap,Iv),Ou=new KD;function rF(e){return Math.min(1e3*2**e,3e4)}function Hv(e){return(e??"online")==="online"?Ou.isOnline():!0}var Hh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Yv(e){let r=!1,t=0,a;const n=Uh(),o=()=>n.status!=="pending",A=k=>{var y;if(!o()){const C=new Hh(k);b(C),(y=e.onCancel)==null||y.call(e,C)}},s=()=>{r=!0},u=()=>{r=!1},c=()=>n8.isFocused()&&(e.networkMode==="always"||Ou.isOnline())&&e.canRun(),d=()=>Hv(e.networkMode)&&e.canRun(),x=k=>{o()||(a==null||a(),n.resolve(k))},b=k=>{o()||(a==null||a(),n.reject(k))},p=()=>new Promise(k=>{var y;a=C=>{(o()||c())&&k(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var k;a=void 0,o()||(k=e.onContinue)==null||k.call(e)}),g=()=>{if(o())return;let k;const y=t===0?e.initialPromise:void 0;try{k=y??e.fn()}catch(C){k=Promise.reject(C)}Promise.resolve(k).then(x).catch(C=>{var T;if(o())return;const M=e.retry??(G2?0:3),N=e.retryDelay??rF,S=typeof N=="function"?N(t,C):N,w=M===!0||typeof M=="number"&&tc()?void 0:p()).then(()=>{r?b(C):g()})})};return{promise:n,status:()=>n.status,cancel:A,continue:()=>(a==null||a(),n),cancelRetry:s,continueRetry:u,canStart:d,start:()=>(d()?g():p().then(g),n)}}var D2,Tv,Qv=(Tv=class{constructor(){J0(this,D2)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xh(this.gcTime)&&Z0(this,D2,m2.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(G2?1/0:300*1e3))}clearGcTimeout(){J(this,D2)&&(m2.clearTimeout(J(this,D2)),Z0(this,D2,void 0))}},D2=new WeakMap,Tv),F2,$o,ma,S2,Le,ps,R2,Za,Sn,Zv,eF=(Zv=class extends Qv{constructor(r){super();J0(this,Za);J0(this,F2);J0(this,$o);J0(this,ma);J0(this,S2);J0(this,Le);J0(this,ps);J0(this,R2);Z0(this,R2,!1),Z0(this,ps,r.defaultOptions),this.setOptions(r.options),this.observers=[],Z0(this,S2,r.client),Z0(this,ma,J(this,S2).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,Z0(this,F2,Tp(this.options)),this.state=r.state??J(this,F2),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=J(this,Le))==null?void 0:r.promise}setOptions(r){if(this.options={...J(this,ps),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Tp(this.options);t.data!==void 0&&(this.setState(Ip(t.data,t.dataUpdatedAt)),Z0(this,F2,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&J(this,ma).remove(this)}setData(r,t){const a=zh(this.state.data,r,this.options);return gr(this,Za,Sn).call(this,{data:a,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),a}setState(r,t){gr(this,Za,Sn).call(this,{type:"setState",state:r,setStateOptions:t})}cancel(r){var a,n;const t=(a=J(this,Le))==null?void 0:a.promise;return(n=J(this,Le))==null||n.cancel(r),t?t.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(J(this,F2))}isActive(){return this.observers.some(r=>va(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===a8||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>Wi(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!Xv(this.state.dataUpdatedAt,r)}onFocus(){var t;const r=this.observers.find(a=>a.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(t=J(this,Le))==null||t.continue()}onOnline(){var t;const r=this.observers.find(a=>a.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(t=J(this,Le))==null||t.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),J(this,ma).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(t=>t!==r),this.observers.length||(J(this,Le)&&(J(this,R2)?J(this,Le).cancel({revert:!0}):J(this,Le).cancelRetry()),this.scheduleGc()),J(this,ma).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||gr(this,Za,Sn).call(this,{type:"invalidate"})}async fetch(r,t){var u,c,d,x,b,p,g,k,y,C,M,N;if(this.state.fetchStatus!=="idle"&&((u=J(this,Le))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(J(this,Le))return J(this,Le).continueRetry(),J(this,Le).promise}if(r&&this.setOptions(r),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const a=new AbortController,n=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(Z0(this,R2,!0),a.signal)})},o=()=>{const S=zv(this.options,t),T=(()=>{const D={client:J(this,S2),queryKey:this.queryKey,meta:this.meta};return n(D),D})();return Z0(this,R2,!1),this.options.persister?this.options.persister(S,T,this):S(T)},s=(()=>{const S={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:J(this,S2),state:this.state,fetchFn:o};return n(S),S})();(c=this.options.behavior)==null||c.onFetch(s,this),Z0(this,$o,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&gr(this,Za,Sn).call(this,{type:"fetch",meta:(x=s.fetchOptions)==null?void 0:x.meta}),Z0(this,Le,Yv({initialPromise:t==null?void 0:t.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof Hh&&S.revert&&this.setState({...J(this,$o),fetchStatus:"idle"}),a.abort()},onFail:(S,w)=>{gr(this,Za,Sn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{gr(this,Za,Sn).call(this,{type:"pause"})},onContinue:()=>{gr(this,Za,Sn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await J(this,Le).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(b=J(this,ma).config).onSuccess)==null||p.call(b,S,this),(k=(g=J(this,ma).config).onSettled)==null||k.call(g,S,this.state.error,this),S}catch(S){if(S instanceof Hh){if(S.silent)return J(this,Le).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw gr(this,Za,Sn).call(this,{type:"error",error:S}),(C=(y=J(this,ma).config).onError)==null||C.call(y,S,this),(N=(M=J(this,ma).config).onSettled)==null||N.call(M,this.state.data,S,this),S}finally{this.scheduleGc()}}},F2=new WeakMap,$o=new WeakMap,ma=new WeakMap,S2=new WeakMap,Le=new WeakMap,ps=new WeakMap,R2=new WeakMap,Za=new WeakSet,Sn=function(r){const t=a=>{switch(r.type){case"failed":return{...a,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Jv(a.data,this.options),fetchMeta:r.meta??null};case"success":const n={...a,...Ip(r.data,r.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Z0(this,$o,r.manual?n:void 0),n;case"error":const o=r.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...r.state}}};this.state=t(this.state),Ve.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),J(this,ma).notify({query:this,type:"updated",action:r})})},Zv);function Jv(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hv(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ip(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tp(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,t=r!==void 0,a=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:t?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Wt,Nr,ms,mt,N2,Ko,Tn,Di,gs,rA,eA,M2,I2,Fi,tA,Gr,Sl,Yh,Qh,Jh,qh,$h,Kh,rx,qv,Ov,tF=(Ov=class extends mA{constructor(r,t){super();J0(this,Gr);J0(this,Wt);J0(this,Nr);J0(this,ms);J0(this,mt);J0(this,N2);J0(this,Ko);J0(this,Tn);J0(this,Di);J0(this,gs);J0(this,rA);J0(this,eA);J0(this,M2);J0(this,I2);J0(this,Fi);J0(this,tA,new Set);this.options=t,Z0(this,Wt,r),Z0(this,Di,null),Z0(this,Tn,Uh()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(J(this,Nr).addObserver(this),Zp(J(this,Nr),this.options)?gr(this,Gr,Sl).call(this):this.updateResult(),gr(this,Gr,qh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ex(J(this,Nr),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ex(J(this,Nr),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,gr(this,Gr,$h).call(this),gr(this,Gr,Kh).call(this),J(this,Nr).removeObserver(this)}setOptions(r){const t=this.options,a=J(this,Nr);if(this.options=J(this,Wt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof va(this.options.enabled,J(this,Nr))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");gr(this,Gr,rx).call(this),J(this,Nr).setOptions(this.options),t._defaulted&&!Zu(this.options,t)&&J(this,Wt).getQueryCache().notify({type:"observerOptionsUpdated",query:J(this,Nr),observer:this});const n=this.hasListeners();n&&Op(J(this,Nr),a,this.options,t)&&gr(this,Gr,Sl).call(this),this.updateResult(),n&&(J(this,Nr)!==a||va(this.options.enabled,J(this,Nr))!==va(t.enabled,J(this,Nr))||Wi(this.options.staleTime,J(this,Nr))!==Wi(t.staleTime,J(this,Nr)))&&gr(this,Gr,Yh).call(this);const o=gr(this,Gr,Qh).call(this);n&&(J(this,Nr)!==a||va(this.options.enabled,J(this,Nr))!==va(t.enabled,J(this,Nr))||o!==J(this,Fi))&&gr(this,Gr,Jh).call(this,o)}getOptimisticResult(r){const t=J(this,Wt).getQueryCache().build(J(this,Wt),r),a=this.createResult(t,r);return nF(this,a)&&(Z0(this,mt,a),Z0(this,Ko,this.options),Z0(this,N2,J(this,Nr).state)),a}getCurrentResult(){return J(this,mt)}trackResult(r,t){return new Proxy(r,{get:(a,n)=>(this.trackProp(n),t==null||t(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&J(this,Tn).status==="pending"&&J(this,Tn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,n))})}trackProp(r){J(this,tA).add(r)}getCurrentQuery(){return J(this,Nr)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const t=J(this,Wt).defaultQueryOptions(r),a=J(this,Wt).getQueryCache().build(J(this,Wt),t);return a.fetch().then(()=>this.createResult(a,t))}fetch(r){return gr(this,Gr,Sl).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),J(this,mt)))}createResult(r,t){var U;const a=J(this,Nr),n=this.options,o=J(this,mt),A=J(this,N2),s=J(this,Ko),c=r!==a?r.state:J(this,ms),{state:d}=r;let x={...d},b=!1,p;if(t._optimisticResults){const Y=this.hasListeners(),$=!Y&&Zp(r,t),i0=Y&&Op(r,a,t,n);($||i0)&&(x={...x,...Jv(d.data,r.options)}),t._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:g,errorUpdatedAt:k,status:y}=x;p=x.data;let C=!1;if(t.placeholderData!==void 0&&p===void 0&&y==="pending"){let Y;o!=null&&o.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData)?(Y=o.data,C=!0):Y=typeof t.placeholderData=="function"?t.placeholderData((U=J(this,eA))==null?void 0:U.state.data,J(this,eA)):t.placeholderData,Y!==void 0&&(y="success",p=zh(o==null?void 0:o.data,Y,t),b=!0)}if(t.select&&p!==void 0&&!C)if(o&&p===(A==null?void 0:A.data)&&t.select===J(this,gs))p=J(this,rA);else try{Z0(this,gs,t.select),p=t.select(p),p=zh(o==null?void 0:o.data,p,t),Z0(this,rA,p),Z0(this,Di,null)}catch(Y){Z0(this,Di,Y)}J(this,Di)&&(g=J(this,Di),p=J(this,rA),k=Date.now(),y="error");const M=x.fetchStatus==="fetching",N=y==="pending",S=y==="error",w=N&&M,T=p!==void 0,X={status:y,fetchStatus:x.fetchStatus,isPending:N,isSuccess:y==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:x.dataUpdatedAt,error:g,errorUpdatedAt:k,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>c.dataUpdateCount||x.errorUpdateCount>c.errorUpdateCount,isFetching:M,isRefetching:M&&!N,isLoadingError:S&&!T,isPaused:x.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:S&&T,isStale:i8(r,t),refetch:this.refetch,promise:J(this,Tn),isEnabled:va(t.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Y=t0=>{X.status==="error"?t0.reject(X.error):X.data!==void 0&&t0.resolve(X.data)},$=()=>{const t0=Z0(this,Tn,X.promise=Uh());Y(t0)},i0=J(this,Tn);switch(i0.status){case"pending":r.queryHash===a.queryHash&&Y(i0);break;case"fulfilled":(X.status==="error"||X.data!==i0.value)&&$();break;case"rejected":(X.status!=="error"||X.error!==i0.reason)&&$();break}}return X}updateResult(){const r=J(this,mt),t=this.createResult(J(this,Nr),this.options);if(Z0(this,N2,J(this,Nr).state),Z0(this,Ko,this.options),J(this,N2).data!==void 0&&Z0(this,eA,J(this,Nr)),Zu(t,r))return;Z0(this,mt,t);const a=()=>{if(!r)return!0;const{notifyOnChangeProps:n}=this.options,o=typeof n=="function"?n():n;if(o==="all"||!o&&!J(this,tA).size)return!0;const A=new Set(o??J(this,tA));return this.options.throwOnError&&A.add("error"),Object.keys(J(this,mt)).some(s=>{const u=s;return J(this,mt)[u]!==r[u]&&A.has(u)})};gr(this,Gr,qv).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&gr(this,Gr,qh).call(this)}},Wt=new WeakMap,Nr=new WeakMap,ms=new WeakMap,mt=new WeakMap,N2=new WeakMap,Ko=new WeakMap,Tn=new WeakMap,Di=new WeakMap,gs=new WeakMap,rA=new WeakMap,eA=new WeakMap,M2=new WeakMap,I2=new WeakMap,Fi=new WeakMap,tA=new WeakMap,Gr=new WeakSet,Sl=function(r){gr(this,Gr,rx).call(this);let t=J(this,Nr).fetch(this.options,r);return r!=null&&r.throwOnError||(t=t.catch(vt)),t},Yh=function(){gr(this,Gr,$h).call(this);const r=Wi(this.options.staleTime,J(this,Nr));if(G2||J(this,mt).isStale||!Xh(r))return;const a=Xv(J(this,mt).dataUpdatedAt,r)+1;Z0(this,M2,m2.setTimeout(()=>{J(this,mt).isStale||this.updateResult()},a))},Qh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(J(this,Nr)):this.options.refetchInterval)??!1},Jh=function(r){gr(this,Gr,Kh).call(this),Z0(this,Fi,r),!(G2||va(this.options.enabled,J(this,Nr))===!1||!Xh(J(this,Fi))||J(this,Fi)===0)&&Z0(this,I2,m2.setInterval(()=>{(this.options.refetchIntervalInBackground||n8.isFocused())&&gr(this,Gr,Sl).call(this)},J(this,Fi)))},qh=function(){gr(this,Gr,Yh).call(this),gr(this,Gr,Jh).call(this,gr(this,Gr,Qh).call(this))},$h=function(){J(this,M2)&&(m2.clearTimeout(J(this,M2)),Z0(this,M2,void 0))},Kh=function(){J(this,I2)&&(m2.clearInterval(J(this,I2)),Z0(this,I2,void 0))},rx=function(){const r=J(this,Wt).getQueryCache().build(J(this,Wt),this.options);if(r===J(this,Nr))return;const t=J(this,Nr);Z0(this,Nr,r),Z0(this,ms,r.state),this.hasListeners()&&(t==null||t.removeObserver(this),r.addObserver(this))},qv=function(r){Ve.batch(()=>{r.listeners&&this.listeners.forEach(t=>{t(J(this,mt))}),J(this,Wt).getQueryCache().notify({query:J(this,Nr),type:"observerResultsUpdated"})})},Ov);function aF(e,r){return va(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&r.retryOnMount===!1)}function Zp(e,r){return aF(e,r)||e.state.data!==void 0&&ex(e,r,r.refetchOnMount)}function ex(e,r,t){if(va(r.enabled,e)!==!1&&Wi(r.staleTime,e)!=="static"){const a=typeof t=="function"?t(e):t;return a==="always"||a!==!1&&i8(e,r)}return!1}function Op(e,r,t,a){return(e!==r||va(a.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&i8(e,t)}function i8(e,r){return va(r.enabled,e)!==!1&&e.isStaleByTime(Wi(r.staleTime,e))}function nF(e,r){return!Zu(e.getCurrentResult(),r)}function Wp(e){return{onFetch:(r,t)=>{var d,x,b,p,g;const a=r.options,n=(b=(x=(d=r.fetchOptions)==null?void 0:d.meta)==null?void 0:x.fetchMore)==null?void 0:b.direction,o=((p=r.state.data)==null?void 0:p.pages)||[],A=((g=r.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},u=0;const c=async()=>{let k=!1;const y=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(r.signal.aborted?k=!0:r.signal.addEventListener("abort",()=>{k=!0}),r.signal)})},C=zv(r.options,r.fetchOptions),M=async(N,S,w)=>{if(k)return Promise.reject();if(S==null&&N.pages.length)return Promise.resolve(N);const D=(()=>{const $={client:r.client,queryKey:r.queryKey,pageParam:S,direction:w?"backward":"forward",meta:r.options.meta};return y($),$})(),X=await C(D),{maxPages:U}=r.options,Y=w?QD:YD;return{pages:Y(N.pages,X,U),pageParams:Y(N.pageParams,S,U)}};if(n&&o.length){const N=n==="backward",S=N?iF:_p,w={pages:o,pageParams:A},T=S(a,w);s=await M(w,T,N)}else{const N=e??o.length;do{const S=u===0?A[0]??a.initialPageParam:_p(a,s);if(u>0&&S==null)break;s=await M(s,S),u++}while(u{var k,y;return(y=(k=r.options).persister)==null?void 0:y.call(k,c,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},t)}:r.fetchFn=c}}}function _p(e,{pages:r,pageParams:t}){const a=r.length-1;return r.length>0?e.getNextPageParam(r[a],r,t[a],t):void 0}function iF(e,{pages:r,pageParams:t}){var a;return r.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,r[0],r,t[0],t):void 0}var vs,Ka,gt,T2,rn,xi,Wv,oF=(Wv=class extends Qv{constructor(r){super();J0(this,rn);J0(this,vs);J0(this,Ka);J0(this,gt);J0(this,T2);Z0(this,vs,r.client),this.mutationId=r.mutationId,Z0(this,gt,r.mutationCache),Z0(this,Ka,[]),this.state=r.state||$v(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){J(this,Ka).includes(r)||(J(this,Ka).push(r),this.clearGcTimeout(),J(this,gt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){Z0(this,Ka,J(this,Ka).filter(t=>t!==r)),this.scheduleGc(),J(this,gt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){J(this,Ka).length||(this.state.status==="pending"?this.scheduleGc():J(this,gt).remove(this))}continue(){var r;return((r=J(this,T2))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var A,s,u,c,d,x,b,p,g,k,y,C,M,N,S,w,T,D,X,U;const t=()=>{gr(this,rn,xi).call(this,{type:"continue"})},a={client:J(this,vs),meta:this.options.meta,mutationKey:this.options.mutationKey};Z0(this,T2,Yv({fn:()=>this.options.mutationFn?this.options.mutationFn(r,a):Promise.reject(new Error("No mutationFn found")),onFail:(Y,$)=>{gr(this,rn,xi).call(this,{type:"failed",failureCount:Y,error:$})},onPause:()=>{gr(this,rn,xi).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>J(this,gt).canRun(this)}));const n=this.state.status==="pending",o=!J(this,T2).canStart();try{if(n)t();else{gr(this,rn,xi).call(this,{type:"pending",variables:r,isPaused:o}),await((s=(A=J(this,gt).config).onMutate)==null?void 0:s.call(A,r,this,a));const $=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,r,a));$!==this.state.context&&gr(this,rn,xi).call(this,{type:"pending",context:$,variables:r,isPaused:o})}const Y=await J(this,T2).start();return await((x=(d=J(this,gt).config).onSuccess)==null?void 0:x.call(d,Y,r,this.state.context,this,a)),await((p=(b=this.options).onSuccess)==null?void 0:p.call(b,Y,r,this.state.context,a)),await((k=(g=J(this,gt).config).onSettled)==null?void 0:k.call(g,Y,null,this.state.variables,this.state.context,this,a)),await((C=(y=this.options).onSettled)==null?void 0:C.call(y,Y,null,r,this.state.context,a)),gr(this,rn,xi).call(this,{type:"success",data:Y}),Y}catch(Y){try{throw await((N=(M=J(this,gt).config).onError)==null?void 0:N.call(M,Y,r,this.state.context,this,a)),await((w=(S=this.options).onError)==null?void 0:w.call(S,Y,r,this.state.context,a)),await((D=(T=J(this,gt).config).onSettled)==null?void 0:D.call(T,void 0,Y,this.state.variables,this.state.context,this,a)),await((U=(X=this.options).onSettled)==null?void 0:U.call(X,void 0,Y,r,this.state.context,a)),Y}finally{gr(this,rn,xi).call(this,{type:"error",error:Y})}}finally{J(this,gt).runNext(this)}}},vs=new WeakMap,Ka=new WeakMap,gt=new WeakMap,T2=new WeakMap,rn=new WeakSet,xi=function(r){const t=a=>{switch(r.type){case"failed":return{...a,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...a,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:r.error,failureCount:a.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ve.batch(()=>{J(this,Ka).forEach(a=>{a.onMutationUpdate(r)}),J(this,gt).notify({mutation:this,type:"updated",action:r})})},Wv);function $v(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zn,Oa,Es,_v,AF=(_v=class extends mA{constructor(r={}){super();J0(this,Zn);J0(this,Oa);J0(this,Es);this.config=r,Z0(this,Zn,new Set),Z0(this,Oa,new Map),Z0(this,Es,0)}build(r,t,a){const n=new oF({client:r,mutationCache:this,mutationId:++Hf(this,Es)._,options:r.defaultMutationOptions(t),state:a});return this.add(n),n}add(r){J(this,Zn).add(r);const t=Yf(r);if(typeof t=="string"){const a=J(this,Oa).get(t);a?a.push(r):J(this,Oa).set(t,[r])}this.notify({type:"added",mutation:r})}remove(r){if(J(this,Zn).delete(r)){const t=Yf(r);if(typeof t=="string"){const a=J(this,Oa).get(t);if(a)if(a.length>1){const n=a.indexOf(r);n!==-1&&a.splice(n,1)}else a[0]===r&&J(this,Oa).delete(t)}}this.notify({type:"removed",mutation:r})}canRun(r){const t=Yf(r);if(typeof t=="string"){const a=J(this,Oa).get(t),n=a==null?void 0:a.find(o=>o.state.status==="pending");return!n||n===r}else return!0}runNext(r){var a;const t=Yf(r);if(typeof t=="string"){const n=(a=J(this,Oa).get(t))==null?void 0:a.find(o=>o!==r&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ve.batch(()=>{J(this,Zn).forEach(r=>{this.notify({type:"removed",mutation:r})}),J(this,Zn).clear(),J(this,Oa).clear()})}getAll(){return Array.from(J(this,Zn))}find(r){const t={exact:!0,...r};return this.getAll().find(a=>Rp(t,a))}findAll(r={}){return this.getAll().filter(t=>Rp(r,t))}notify(r){Ve.batch(()=>{this.listeners.forEach(t=>{t(r)})})}resumePausedMutations(){const r=this.getAll().filter(t=>t.state.isPaused);return Ve.batch(()=>Promise.all(r.map(t=>t.continue().catch(vt))))}},Zn=new WeakMap,Oa=new WeakMap,Es=new WeakMap,_v);function Yf(e){var r;return(r=e.options.scope)==null?void 0:r.id}var On,Si,_t,Wn,Gn,mu,tx,jv,lF=(jv=class extends mA{constructor(t,a){super();J0(this,Gn);J0(this,On);J0(this,Si);J0(this,_t);J0(this,Wn);Z0(this,On,t),this.setOptions(a),this.bindMethods(),gr(this,Gn,mu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const a=this.options;this.options=J(this,On).defaultMutationOptions(t),Zu(this.options,a)||J(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:J(this,_t),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&P2(a.mutationKey)!==P2(this.options.mutationKey)?this.reset():((n=J(this,_t))==null?void 0:n.state.status)==="pending"&&J(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=J(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){gr(this,Gn,mu).call(this),gr(this,Gn,tx).call(this,t)}getCurrentResult(){return J(this,Si)}reset(){var t;(t=J(this,_t))==null||t.removeObserver(this),Z0(this,_t,void 0),gr(this,Gn,mu).call(this),gr(this,Gn,tx).call(this)}mutate(t,a){var n;return Z0(this,Wn,a),(n=J(this,_t))==null||n.removeObserver(this),Z0(this,_t,J(this,On).getMutationCache().build(J(this,On),this.options)),J(this,_t).addObserver(this),J(this,_t).execute(t)}},On=new WeakMap,Si=new WeakMap,_t=new WeakMap,Wn=new WeakMap,Gn=new WeakSet,mu=function(){var a;const t=((a=J(this,_t))==null?void 0:a.state)??$v();Z0(this,Si,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},tx=function(t){Ve.batch(()=>{var a,n,o,A,s,u,c,d;if(J(this,Wn)&&this.hasListeners()){const x=J(this,Si).variables,b=J(this,Si).context,p={client:J(this,On),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(a=J(this,Wn)).onSuccess)==null||n.call(a,t.data,x,b,p),(A=(o=J(this,Wn)).onSettled)==null||A.call(o,t.data,null,x,b,p)):(t==null?void 0:t.type)==="error"&&((u=(s=J(this,Wn)).onError)==null||u.call(s,t.error,x,b,p),(d=(c=J(this,Wn)).onSettled)==null||d.call(c,void 0,t.error,x,b,p))}this.listeners.forEach(x=>{x(J(this,Si))})})},jv),en,Vv,sF=(Vv=class extends mA{constructor(r={}){super();J0(this,en);this.config=r,Z0(this,en,new Map)}build(r,t,a){const n=t.queryKey,o=t.queryHash??t8(n,t);let A=this.get(o);return A||(A=new eF({client:r,queryKey:n,queryHash:o,options:r.defaultQueryOptions(t),state:a,defaultOptions:r.getQueryDefaults(n)}),this.add(A)),A}add(r){J(this,en).has(r.queryHash)||(J(this,en).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const t=J(this,en).get(r.queryHash);t&&(r.destroy(),t===r&&J(this,en).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Ve.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return J(this,en).get(r)}getAll(){return[...J(this,en).values()]}find(r){const t={exact:!0,...r};return this.getAll().find(a=>Sp(t,a))}findAll(r={}){const t=this.getAll();return Object.keys(r).length>0?t.filter(a=>Sp(r,a)):t}notify(r){Ve.batch(()=>{this.listeners.forEach(t=>{t(r)})})}onFocus(){Ve.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Ve.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},en=new WeakMap,Vv),ve,Ri,Ni,aA,nA,Mi,iA,oA,Gv,fF=(Gv=class{constructor(e={}){J0(this,ve);J0(this,Ri);J0(this,Ni);J0(this,aA);J0(this,nA);J0(this,Mi);J0(this,iA);J0(this,oA);Z0(this,ve,e.queryCache||new sF),Z0(this,Ri,e.mutationCache||new AF),Z0(this,Ni,e.defaultOptions||{}),Z0(this,aA,new Map),Z0(this,nA,new Map),Z0(this,Mi,0)}mount(){Hf(this,Mi)._++,J(this,Mi)===1&&(Z0(this,iA,n8.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,ve).onFocus())})),Z0(this,oA,Ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,ve).onOnline())})))}unmount(){var e,r;Hf(this,Mi)._--,J(this,Mi)===0&&((e=J(this,iA))==null||e.call(this),Z0(this,iA,void 0),(r=J(this,oA))==null||r.call(this),Z0(this,oA,void 0))}isFetching(e){return J(this,ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return J(this,Ri).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=J(this,ve).get(r.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),t=J(this,ve).build(this,r),a=t.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Wi(r.staleTime,t))&&this.prefetchQuery(r),Promise.resolve(a))}getQueriesData(e){return J(this,ve).findAll(e).map(({queryKey:r,state:t})=>{const a=t.data;return[r,a]})}setQueryData(e,r,t){const a=this.defaultQueryOptions({queryKey:e}),n=J(this,ve).get(a.queryHash),o=n==null?void 0:n.state.data,A=zD(r,o);if(A!==void 0)return J(this,ve).build(this,a).setData(A,{...t,manual:!0})}setQueriesData(e,r,t){return Ve.batch(()=>J(this,ve).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,r,t)]))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return(t=J(this,ve).get(r.queryHash))==null?void 0:t.state}removeQueries(e){const r=J(this,ve);Ve.batch(()=>{r.findAll(e).forEach(t=>{r.remove(t)})})}resetQueries(e,r){const t=J(this,ve);return Ve.batch(()=>(t.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const t={revert:!0,...r},a=Ve.batch(()=>J(this,ve).findAll(e).map(n=>n.cancel(t)));return Promise.all(a).then(vt).catch(vt)}invalidateQueries(e,r={}){return Ve.batch(()=>(J(this,ve).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const t={...r,cancelRefetch:r.cancelRefetch??!0},a=Ve.batch(()=>J(this,ve).findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let o=n.fetch(void 0,t);return t.throwOnError||(o=o.catch(vt)),n.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(vt)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const t=J(this,ve).build(this,r);return t.isStaleByTime(Wi(r.staleTime,t))?t.fetch(r):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vt).catch(vt)}fetchInfiniteQuery(e){return e.behavior=Wp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vt).catch(vt)}ensureInfiniteQueryData(e){return e.behavior=Wp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ou.isOnline()?J(this,Ri).resumePausedMutations():Promise.resolve()}getQueryCache(){return J(this,ve)}getMutationCache(){return J(this,Ri)}getDefaultOptions(){return J(this,Ni)}setDefaultOptions(e){Z0(this,Ni,e)}setQueryDefaults(e,r){J(this,aA).set(P2(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...J(this,aA).values()],t={};return r.forEach(a=>{Ql(e,a.queryKey)&&Object.assign(t,a.defaultOptions)}),t}setMutationDefaults(e,r){J(this,nA).set(P2(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...J(this,nA).values()],t={};return r.forEach(a=>{Ql(e,a.mutationKey)&&Object.assign(t,a.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const r={...J(this,Ni).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=t8(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===a8&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...J(this,Ni).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){J(this,ve).clear(),J(this,Ri).clear()}},ve=new WeakMap,Ri=new WeakMap,Ni=new WeakMap,aA=new WeakMap,nA=new WeakMap,Mi=new WeakMap,iA=new WeakMap,oA=new WeakMap,Gv),I=ks();const sr=J2(I);var Kv=I.createContext(void 0),r7=e=>{const r=I.useContext(Kv);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},uF=({client:e,children:r})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(Kv.Provider,{value:e,children:r})),e7=I.createContext(!1),cF=()=>I.useContext(e7);e7.Provider;function dF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hF=I.createContext(dF()),xF=()=>I.useContext(hF),bF=(e,r)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(r.isReset()||(e.retryOnMount=!1))},pF=e=>{I.useEffect(()=>{e.clearReset()},[e])},mF=({result:e,errorResetBoundary:r,throwOnError:t,query:a,suspense:n})=>e.isError&&!r.isReset()&&!e.isFetching&&a&&(n&&e.data===void 0||Uv(t,[e.error,a])),gF=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...n)=>t(a(...n)):t(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},vF=(e,r)=>e.isLoading&&e.isFetching&&!r,EF=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,jp=(e,r,t)=>r.fetchOptimistic(e).catch(()=>{t.clearReset()});function kF(e,r,t){var x,b,p,g,k;const a=cF(),n=xF(),o=r7(),A=o.defaultQueryOptions(e);(b=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||b.call(x,A),A._optimisticResults=a?"isRestoring":"optimistic",gF(A),bF(A,n),pF(n);const s=!o.getQueryCache().get(A.queryHash),[u]=I.useState(()=>new r(o,A)),c=u.getOptimisticResult(A),d=!a&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(y=>{const C=d?u.subscribe(Ve.batchCalls(y)):vt;return u.updateResult(),C},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),I.useEffect(()=>{u.setOptions(A)},[A,u]),EF(A,c))throw jp(A,u,n);if(mF({result:c,errorResetBoundary:n,throwOnError:A.throwOnError,query:o.getQueryCache().get(A.queryHash),suspense:A.suspense}))throw c.error;if((g=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,A,c),A.experimental_prefetchInRender&&!G2&&vF(c,a)){const y=s?jp(A,u,n):(k=o.getQueryCache().get(A.queryHash))==null?void 0:k.promise;y==null||y.catch(vt).finally(()=>{u.updateResult()})}return A.notifyOnChangeProps?c:u.trackResult(c)}function Pn(e,r){return kF(e,tF)}function ut(e,r){const t=r7(),[a]=I.useState(()=>new lF(t,e));I.useEffect(()=>{a.setOptions(e)},[a,e]);const n=I.useSyncExternalStore(I.useCallback(A=>a.subscribe(Ve.batchCalls(A)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=I.useCallback((A,s)=>{a.mutate(A,s).catch(vt)},[a]);if(n.error&&Uv(a.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:o,mutateAsync:n.mutate}}const yF=I.createContext({isDirty:!1,setIsDirty:()=>{},saveFn:null,setSaveFn:()=>{},showUnsavedModal:!1,setShowUnsavedModal:()=>{}});function wF({children:e}){const[r,t]=I.useState(!1),[a,n]=I.useState(null),[o,A]=I.useState(!1),s=I.useMemo(()=>({isDirty:r,setIsDirty:t,saveFn:a,setSaveFn:n,showUnsavedModal:o,setShowUnsavedModal:A}),[r,a,o]);return E.jsx(yF.Provider,{value:s,children:e})}/** - * react-router v7.9.5 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */var t7=e=>{throw TypeError(e)},CF=(e,r,t)=>r.has(e)||t7("Cannot "+t),M4=(e,r,t)=>(CF(e,r,"read from private field"),t?t.call(e):r.get(e)),BF=(e,r,t)=>r.has(e)?t7("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Vp="popstate";function DF(e={}){function r(a,n){let{pathname:o,search:A,hash:s}=a.location;return Jl("",{pathname:o,search:A,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function t(a,n){return typeof n=="string"?n:an(n)}return SF(r,t,null,e)}function wr(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function Ce(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function FF(){return Math.random().toString(36).substring(2,10)}function Gp(e,r){return{usr:e.state,key:e.key,idx:r}}function Jl(e,r,t=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?Yi(r):r,state:t,key:r&&r.key||a||FF()}}function an({pathname:e="/",search:r="",hash:t=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function Yi(e){let r={};if(e){let t=e.indexOf("#");t>=0&&(r.hash=e.substring(t),e=e.substring(0,t));let a=e.indexOf("?");a>=0&&(r.search=e.substring(a),e=e.substring(0,a)),e&&(r.pathname=e)}return r}function SF(e,r,t,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,A=n.history,s="POP",u=null,c=d();c==null&&(c=0,A.replaceState({...A.state,idx:c},""));function d(){return(A.state||{idx:null}).idx}function x(){s="POP";let y=d(),C=y==null?null:y-c;c=y,u&&u({action:s,location:k.location,delta:C})}function b(y,C){s="PUSH";let M=Jl(k.location,y,C);c=d()+1;let N=Gp(M,c),S=k.createHref(M);try{A.pushState(N,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;n.location.assign(S)}o&&u&&u({action:s,location:k.location,delta:1})}function p(y,C){s="REPLACE";let M=Jl(k.location,y,C);c=d();let N=Gp(M,c),S=k.createHref(M);A.replaceState(N,"",S),o&&u&&u({action:s,location:k.location,delta:0})}function g(y){return a7(y)}let k={get action(){return s},get location(){return e(n,A)},listen(y){if(u)throw new Error("A history only accepts one active listener");return n.addEventListener(Vp,x),u=y,()=>{n.removeEventListener(Vp,x),u=null}},createHref(y){return r(n,y)},createURL:g,encodeLocation(y){let C=g(y);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:p,go(y){return A.go(y)}};return k}function a7(e,r=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),wr(t,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:an(e);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=t+a),new URL(a,t)}var Rl,Pp=class{constructor(e){if(BF(this,Rl,new Map),e)for(let[r,t]of e)this.set(r,t)}get(e){if(M4(this,Rl).has(e))return M4(this,Rl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,r){M4(this,Rl).set(e,r)}};Rl=new WeakMap;var RF=new Set(["lazy","caseSensitive","path","id","index","children"]);function NF(e){return RF.has(e)}var MF=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function IF(e){return MF.has(e)}function TF(e){return e.index===!0}function ql(e,r,t=[],a={},n=!1){return e.map((o,A)=>{let s=[...t,String(A)],u=typeof o.id=="string"?o.id:s.join("-");if(wr(o.index!==!0||!o.children,"Cannot specify children on an index route"),wr(n||!a[u],`Found a route id collision on id "${u}". Route id's must be globally unique within Data Router usages`),TF(o)){let c={...o,id:u};return a[u]=Xp(c,r(c)),c}else{let c={...o,id:u,children:void 0};return a[u]=Xp(c,r(c)),o.children&&(c.children=ql(o.children,r,s,a,n)),c}})}function Xp(e,r){return Object.assign(e,{...r,...typeof r.lazy=="object"&&r.lazy!=null?{lazy:{...e.lazy,...r.lazy}}:{}})}function vi(e,r,t="/"){return gu(e,r,t,!1)}function gu(e,r,t,a){let n=typeof r=="string"?Yi(r):r,o=Xt(n.pathname||"/",t);if(o==null)return null;let A=n7(e);OF(A);let s=null;for(let u=0;s==null&&u{let d={relativePath:c===void 0?A.path||"":c,caseSensitive:A.caseSensitive===!0,childrenIndex:s,route:A};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(a)&&u)return;wr(d.relativePath.startsWith(a),`Absolute route path "${d.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(a.length)}let x=tn([a,d.relativePath]),b=t.concat(d);A.children&&A.children.length>0&&(wr(A.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),n7(A.children,r,b,x,u)),!(A.path==null&&!A.index)&&r.push({path:x,score:XF(x,A.index),routesMeta:b})};return e.forEach((A,s)=>{var u;if(A.path===""||!((u=A.path)!=null&&u.includes("?")))o(A,s);else for(let c of i7(A.path))o(A,s,!0,c)}),r}function i7(e){let r=e.split("/");if(r.length===0)return[];let[t,...a]=r,n=t.endsWith("?"),o=t.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let A=i7(a.join("/")),s=[];return s.push(...A.map(u=>u===""?o:[o,u].join("/"))),n&&s.push(...A),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function OF(e){e.sort((r,t)=>r.score!==t.score?t.score-r.score:LF(r.routesMeta.map(a=>a.childrenIndex),t.routesMeta.map(a=>a.childrenIndex)))}var WF=/^:[\w-]+$/,_F=3,jF=2,VF=1,GF=10,PF=-2,Lp=e=>e==="*";function XF(e,r){let t=e.split("/"),a=t.length;return t.some(Lp)&&(a+=PF),r&&(a+=jF),t.filter(n=>!Lp(n)).reduce((n,o)=>n+(WF.test(o)?_F:o===""?VF:GF),a)}function LF(e,r){return e.length===r.length&&e.slice(0,-1).every((a,n)=>a===r[n])?e[e.length-1]-r[r.length-1]:0}function zF(e,r,t=!1){let{routesMeta:a}=e,n={},o="/",A=[];for(let s=0;s{if(d==="*"){let g=s[b]||"";A=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[b];return x&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:A,pattern:e}}function UF(e,r=!1,t=!0){Ce(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 a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(A,s,u)=>(a.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,r?void 0:"i"),a]}function HF(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ce(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function Xt(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let t=r.endsWith("/")?r.length-1:r.length,a=e.charAt(t);return a&&a!=="/"?null:e.slice(t)||"/"}function YF({basename:e,pathname:r}){return r==="/"?e:tn([e,r])}function QF(e,r="/"){let{pathname:t,search:a="",hash:n=""}=typeof e=="string"?Yi(e):e;return{pathname:t?t.startsWith("/")?t:JF(t,r):r,search:$F(a),hash:KF(n)}}function JF(e,r){let t=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?t.length>1&&t.pop():n!=="."&&t.push(n)}),t.length>1?t.join("/"):"/"}function I4(e,r,t,a){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function o7(e){return e.filter((r,t)=>t===0||r.route.path&&r.route.path.length>0)}function Vc(e){let r=o7(e);return r.map((t,a)=>a===r.length-1?t.pathname:t.pathnameBase)}function Gc(e,r,t,a=!1){let n;typeof e=="string"?n=Yi(e):(n={...e},wr(!n.pathname||!n.pathname.includes("?"),I4("?","pathname","search",n)),wr(!n.pathname||!n.pathname.includes("#"),I4("#","pathname","hash",n)),wr(!n.search||!n.search.includes("#"),I4("#","search","hash",n)));let o=e===""||n.pathname==="",A=o?"/":n.pathname,s;if(A==null)s=t;else{let x=r.length-1;if(!a&&A.startsWith("..")){let b=A.split("/");for(;b[0]==="..";)b.shift(),x-=1;n.pathname=b.join("/")}s=x>=0?r[x]:"/"}let u=QF(n,s),c=A&&A!=="/"&&A.endsWith("/"),d=(o||A===".")&&t.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var tn=e=>e.join("/").replace(/\/\/+/g,"/"),qF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$F=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,KF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_u=class{constructor(e,r,t,a=!1){this.status=e,this.statusText=r||"",this.internal=a,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function $l(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function o8(e){return e.filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ii=Symbol("Uninstrumented");function rS(e,r){let t={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:r.id,index:r.index,path:r.path,instrument(o){let A=Object.keys(t);for(let s of A)o[s]&&t[s].push(o[s])}}));let a={};if(typeof r.lazy=="function"&&t.lazy.length>0){let n=Lo(t.lazy,r.lazy,()=>{});n&&(a.lazy=n)}if(typeof r.lazy=="object"){let n=r.lazy;["middleware","loader","action"].forEach(o=>{let A=n[o],s=t[`lazy.${o}`];if(typeof A=="function"&&s.length>0){let u=Lo(s,A,()=>{});u&&(a.lazy=Object.assign(a.lazy||{},{[o]:u}))}})}return["loader","action"].forEach(n=>{let o=r[n];if(typeof o=="function"&&t[n].length>0){let A=o[Ii]??o,s=Lo(t[n],A,(...u)=>zp(u[0]));s&&(s[Ii]=A,a[n]=s)}}),r.middleware&&r.middleware.length>0&&t.middleware.length>0&&(a.middleware=r.middleware.map(n=>{let o=n[Ii]??n,A=Lo(t.middleware,o,(...s)=>zp(s[0]));return A?(A[Ii]=o,A):n})),a}function eS(e,r){let t={navigate:[],fetch:[]};if(r.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let A of o)n[A]&&t[A].push(n[A])}})),t.navigate.length>0){let a=e.navigate[Ii]??e.navigate,n=Lo(t.navigate,a,(...o)=>{let[A,s]=o;return{to:typeof A=="number"||typeof A=="string"?A:A?an(A):".",...Up(e,s??{})}});n&&(n[Ii]=a,e.navigate=n)}if(t.fetch.length>0){let a=e.fetch[Ii]??e.fetch,n=Lo(t.fetch,a,(...o)=>{let[A,,s,u]=o;return{href:s??".",fetcherKey:A,...Up(e,u??{})}});n&&(n[Ii]=a,e.fetch=n)}return e}function Lo(e,r,t){return e.length===0?null:async(...a)=>{let n=await A7(e,t(...a),()=>r(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function A7(e,r,t,a){let n=e[a],o;if(n){let A,s=async()=>(A?console.error("You cannot call instrumented handlers more than once"):A=A7(e,r,t,a-1),o=await A,wr(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(s,r)}catch(u){console.error("An instrumentation function threw an error:",u)}A||await s(),await A}else try{o={type:"success",value:await t()}}catch(A){o={type:"error",value:A}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function zp(e){let{request:r,context:t,params:a,unstable_pattern:n}=e;return{request:tS(r),params:{...a},unstable_pattern:n,context:aS(t)}}function Up(e,r){return{currentUrl:an(e.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function tS(e){return{method:e.method,url:e.url,headers:{get:(...r)=>e.headers.get(...r)}}}function aS(e){if(iS(e)){let r={...e};return Object.freeze(r),r}else return{get:r=>e.get(r)}}var nS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iS(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===nS}var l7=["POST","PUT","PATCH","DELETE"],oS=new Set(l7),AS=["GET",...l7],lS=new Set(AS),sS=new Set([301,302,303,307,308]),fS=new Set([307,308]),T4={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wo={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},cS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,A8=e=>cS.test(e),dS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),s7="remix-router-transitions",f7=Symbol("ResetLoaderData");function hS(e){const r=e.window?e.window:typeof window<"u"?window:void 0,t=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";wr(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||dS,o=n;if(e.unstable_instrumentations){let V=e.unstable_instrumentations;o=q=>({...n(q),...rS(V.map(A0=>A0.route).filter(Boolean),q)})}let A={},s=ql(e.routes,o,void 0,A),u,c=e.basename||"/";c.startsWith("/")||(c=`/${c}`);let d=e.dataStrategy||gS,x={...e.future},b=null,p=new Set,g=null,k=null,y=null,C=e.hydrationData!=null,M=vi(s,e.history.location,c),N=!1,S=null,w;if(M==null&&!e.patchRoutesOnNavigation){let V=ga(404,{pathname:e.history.location.pathname}),{matches:q,route:A0}=Qf(s);w=!0,M=q,S={[A0.id]:V}}else if(M&&!e.hydrationData&&$0(M,s,e.history.location.pathname).active&&(M=null),M)if(M.some(V=>V.route.lazy))w=!1;else if(!M.some(V=>l8(V.route)))w=!0;else{let V=e.hydrationData?e.hydrationData.loaderData:null,q=e.hydrationData?e.hydrationData.errors:null;if(q){let A0=M.findIndex(h0=>q[h0.route.id]!==void 0);w=M.slice(0,A0+1).every(h0=>!nx(h0.route,V,q))}else w=M.every(A0=>!nx(A0.route,V,q))}else{w=!1,M=[];let V=$0(null,s,e.history.location.pathname);V.active&&V.matches&&(N=!0,M=V.matches)}let T,D={historyAction:e.history.action,location:e.history.location,matches:M,initialized:w,navigation:T4,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||S,fetchers:new Map,blockers:new Map},X="POP",U=!1,Y,$=!1,i0=new Map,t0=null,a0=!1,r0=!1,G=new Set,z=new Map,F=0,Z=-1,j=new Map,R=new Set,W=new Map,P=new Map,_=new Set,o0=new Map,L,e0=null;function y0(){if(b=e.history.listen(({action:V,location:q,delta:A0})=>{if(L){L(),L=void 0;return}Ce(o0.size===0||A0!=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 h0=ke({currentLocation:D.location,nextLocation:q,historyAction:V});if(h0&&A0!=null){let g0=new Promise(C0=>{L=C0});e.history.go(A0*-1),Pe(h0,{state:"blocked",location:q,proceed(){Pe(h0,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),g0.then(()=>e.history.go(A0))},reset(){let C0=new Map(D.blockers);C0.set(h0,Wo),p0({blockers:C0})}});return}return O0(V,q)}),t){TS(r,i0);let V=()=>ZS(r,i0);r.addEventListener("pagehide",V),t0=()=>r.removeEventListener("pagehide",V)}return D.initialized||O0("POP",D.location,{initialHydration:!0}),T}function E0(){b&&b(),t0&&t0(),p.clear(),Y&&Y.abort(),D.fetchers.forEach((V,q)=>ue(q)),D.blockers.forEach((V,q)=>We(q))}function k0(V){return p.add(V),()=>p.delete(V)}function p0(V,q={}){V.matches&&(V.matches=V.matches.map(g0=>{let C0=A[g0.route.id],M0=g0.route;return M0.element!==C0.element||M0.errorElement!==C0.errorElement||M0.hydrateFallbackElement!==C0.hydrateFallbackElement?{...g0,route:C0}:g0})),D={...D,...V};let A0=[],h0=[];D.fetchers.forEach((g0,C0)=>{g0.state==="idle"&&(_.has(C0)?A0.push(C0):h0.push(C0))}),_.forEach(g0=>{!D.fetchers.has(g0)&&!z.has(g0)&&A0.push(g0)}),[...p].forEach(g0=>g0(D,{deletedFetchers:A0,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),A0.forEach(g0=>ue(g0)),h0.forEach(g0=>D.fetchers.delete(g0))}function B0(V,q,{flushSync:A0}={}){var I0,X0;let h0=D.actionData!=null&&D.navigation.formMethod!=null&&Et(D.navigation.formMethod)&&D.navigation.state==="loading"&&((I0=V.state)==null?void 0:I0._isRedirect)!==!0,g0;q.actionData?Object.keys(q.actionData).length>0?g0=q.actionData:g0=null:h0?g0=D.actionData:g0=null;let C0=q.loaderData?tm(D.loaderData,q.loaderData,q.matches||[],q.errors):D.loaderData,M0=D.blockers;M0.size>0&&(M0=new Map(M0),M0.forEach((lr,Wr)=>M0.set(Wr,Wo)));let G0=a0?!1:U0(V,q.matches||D.matches),P0=U===!0||D.navigation.formMethod!=null&&Et(D.navigation.formMethod)&&((X0=V.state)==null?void 0:X0._isRedirect)!==!0;u&&(s=u,u=void 0),a0||X==="POP"||(X==="PUSH"?e.history.push(V,V.state):X==="REPLACE"&&e.history.replace(V,V.state));let V0;if(X==="POP"){let lr=i0.get(D.location.pathname);lr&&lr.has(V.pathname)?V0={currentLocation:D.location,nextLocation:V}:i0.has(V.pathname)&&(V0={currentLocation:V,nextLocation:D.location})}else if($){let lr=i0.get(D.location.pathname);lr?lr.add(V.pathname):(lr=new Set([V.pathname]),i0.set(D.location.pathname,lr)),V0={currentLocation:D.location,nextLocation:V}}p0({...q,actionData:g0,loaderData:C0,historyAction:X,location:V,initialized:!0,navigation:T4,revalidation:"idle",restoreScrollPosition:G0,preventScrollReset:P0,blockers:M0},{viewTransitionOpts:V0,flushSync:A0===!0}),X="POP",U=!1,$=!1,a0=!1,r0=!1,e0==null||e0.resolve(),e0=null}async function D0(V,q){if(typeof V=="number"){e.history.go(V);return}let A0=ax(D.location,D.matches,c,V,q==null?void 0:q.fromRouteId,q==null?void 0:q.relative),{path:h0,submission:g0,error:C0}=Hp(!1,A0,q),M0=D.location,G0=Jl(D.location,h0,q&&q.state);G0={...G0,...e.history.encodeLocation(G0)};let P0=q&&q.replace!=null?q.replace:void 0,V0="PUSH";P0===!0?V0="REPLACE":P0===!1||g0!=null&&Et(g0.formMethod)&&g0.formAction===D.location.pathname+D.location.search&&(V0="REPLACE");let I0=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,X0=(q&&q.flushSync)===!0,lr=ke({currentLocation:M0,nextLocation:G0,historyAction:V0});if(lr){Pe(lr,{state:"blocked",location:G0,proceed(){Pe(lr,{state:"proceeding",proceed:void 0,reset:void 0,location:G0}),D0(V,q)},reset(){let Wr=new Map(D.blockers);Wr.set(lr,Wo),p0({blockers:Wr})}});return}await O0(V0,G0,{submission:g0,pendingError:C0,preventScrollReset:I0,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:X0})}function z0(){e0||(e0=OS()),Ir(),p0({revalidation:"loading"});let V=e0.promise;return D.navigation.state==="submitting"?V:D.navigation.state==="idle"?(O0(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),V):(O0(X||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:$===!0}),V)}async function O0(V,q,A0){Y&&Y.abort(),Y=null,X=V,a0=(A0&&A0.startUninterruptedRevalidation)===!0,Y0(D.location,D.matches),U=(A0&&A0.preventScrollReset)===!0,$=(A0&&A0.enableViewTransition)===!0;let h0=u||s,g0=A0&&A0.overrideNavigation,C0=A0!=null&&A0.initialHydration&&D.matches&&D.matches.length>0&&!N?D.matches:vi(h0,q,c),M0=(A0&&A0.flushSync)===!0;if(C0&&D.initialized&&!r0&&DS(D.location,q)&&!(A0&&A0.submission&&Et(A0.submission.formMethod))){B0(q,{matches:C0},{flushSync:M0});return}let G0=$0(C0,h0,q.pathname);if(G0.active&&G0.matches&&(C0=G0.matches),!C0){let{error:Fe,notFoundMatches:F0,route:H}=xe(q.pathname);B0(q,{matches:F0,loaderData:{},errors:{[H.id]:Fe}},{flushSync:M0});return}Y=new AbortController;let P0=_o(e.history,q,Y.signal,A0&&A0.submission),V0=e.getContext?await e.getContext():new Pp,I0;if(A0&&A0.pendingError)I0=[Ei(C0).route.id,{type:"error",error:A0.pendingError}];else if(A0&&A0.submission&&Et(A0.submission.formMethod)){let Fe=await or(P0,q,A0.submission,C0,V0,G0.active,A0&&A0.initialHydration===!0,{replace:A0.replace,flushSync:M0});if(Fe.shortCircuited)return;if(Fe.pendingActionResult){let[F0,H]=Fe.pendingActionResult;if(qt(H)&&$l(H.error)&&H.error.status===404){Y=null,B0(q,{matches:Fe.matches,loaderData:{},errors:{[F0]:H.error}});return}}C0=Fe.matches||C0,I0=Fe.pendingActionResult,g0=Z4(q,A0.submission),M0=!1,G0.active=!1,P0=_o(e.history,P0.url,P0.signal)}let{shortCircuited:X0,matches:lr,loaderData:Wr,errors:ce}=await Ar(P0,q,C0,V0,G0.active,g0,A0&&A0.submission,A0&&A0.fetcherSubmission,A0&&A0.replace,A0&&A0.initialHydration===!0,M0,I0);X0||(Y=null,B0(q,{matches:lr||C0,...am(I0),loaderData:Wr,errors:ce}))}async function or(V,q,A0,h0,g0,C0,M0,G0={}){Ir();let P0=MS(q,A0);if(p0({navigation:P0},{flushSync:G0.flushSync===!0}),C0){let X0=await j0(h0,q.pathname,V.signal);if(X0.type==="aborted")return{shortCircuited:!0};if(X0.type==="error"){if(X0.partialMatches.length===0){let{matches:Wr,route:ce}=Qf(s);return{matches:Wr,pendingActionResult:[ce.id,{type:"error",error:X0.error}]}}let lr=Ei(X0.partialMatches).route.id;return{matches:X0.partialMatches,pendingActionResult:[lr,{type:"error",error:X0.error}]}}else if(X0.matches)h0=X0.matches;else{let{notFoundMatches:lr,error:Wr,route:ce}=xe(q.pathname);return{matches:lr,pendingActionResult:[ce.id,{type:"error",error:Wr}]}}}let V0,I0=vu(h0,q);if(!I0.route.action&&!I0.route.lazy)V0={type:"error",error:ga(405,{method:V.method,pathname:q.pathname,routeId:I0.route.id})};else{let X0=Uo(o,A,V,h0,I0,M0?[]:a,g0),lr=await ur(V,X0,g0,null);if(V0=lr[I0.route.id],!V0){for(let Wr of h0)if(lr[Wr.route.id]){V0=lr[Wr.route.id];break}}if(V.signal.aborted)return{shortCircuited:!0}}if(g2(V0)){let X0;return G0&&G0.replace!=null?X0=G0.replace:X0=Kp(V0.response.headers.get("Location"),new URL(V.url),c)===D.location.pathname+D.location.search,await pr(V,V0,!0,{submission:A0,replace:X0}),{shortCircuited:!0}}if(qt(V0)){let X0=Ei(h0,I0.route.id);return(G0&&G0.replace)!==!0&&(X="PUSH"),{matches:h0,pendingActionResult:[X0.route.id,V0,I0.route.id]}}return{matches:h0,pendingActionResult:[I0.route.id,V0]}}async function Ar(V,q,A0,h0,g0,C0,M0,G0,P0,V0,I0,X0){let lr=C0||Z4(q,M0),Wr=M0||G0||im(lr),ce=!a0&&!V0;if(g0){if(ce){let be=br(X0);p0({navigation:lr,...be!==void 0?{actionData:be}:{}},{flushSync:I0})}let ar=await j0(A0,q.pathname,V.signal);if(ar.type==="aborted")return{shortCircuited:!0};if(ar.type==="error"){if(ar.partialMatches.length===0){let{matches:na,route:An}=Qf(s);return{matches:na,loaderData:{},errors:{[An.id]:ar.error}}}let be=Ei(ar.partialMatches).route.id;return{matches:ar.partialMatches,loaderData:{},errors:{[be]:ar.error}}}else if(ar.matches)A0=ar.matches;else{let{error:be,notFoundMatches:na,route:An}=xe(q.pathname);return{matches:na,loaderData:{},errors:{[An.id]:be}}}}let Fe=u||s,{dsMatches:F0,revalidatingFetchers:H}=Yp(V,h0,o,A,e.history,D,A0,Wr,q,V0?[]:a,V0===!0,r0,G,_,W,R,Fe,c,e.patchRoutesOnNavigation!=null,X0);if(Z=++F,!e.dataStrategy&&!F0.some(ar=>ar.shouldLoad)&&!F0.some(ar=>ar.route.middleware&&ar.route.middleware.length>0)&&H.length===0){let ar=ae();return B0(q,{matches:A0,loaderData:{},errors:X0&&qt(X0[1])?{[X0[0]]:X0[1].error}:null,...am(X0),...ar?{fetchers:new Map(D.fetchers)}:{}},{flushSync:I0}),{shortCircuited:!0}}if(ce){let ar={};if(!g0){ar.navigation=lr;let be=br(X0);be!==void 0&&(ar.actionData=be)}H.length>0&&(ar.fetchers=S0(H)),p0(ar,{flushSync:I0})}H.forEach(ar=>{ee(ar.key),ar.controller&&z.set(ar.key,ar.controller)});let m0=()=>H.forEach(ar=>ee(ar.key));Y&&Y.signal.addEventListener("abort",m0);let{loaderResults:T0,fetcherResults:yr}=await re(F0,H,V,h0);if(V.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",m0),H.forEach(ar=>z.delete(ar.key));let Mr=Jf(T0);if(Mr)return await pr(V,Mr.result,!0,{replace:P0}),{shortCircuited:!0};if(Mr=Jf(yr),Mr)return R.add(Mr.key),await pr(V,Mr.result,!0,{replace:P0}),{shortCircuited:!0};let{loaderData:dr,errors:de}=em(D,A0,T0,X0,H,yr);V0&&D.errors&&(de={...D.errors,...de});let Se=ae(),_e=Ur(Z),ht=Se||_e||H.length>0;return{matches:A0,loaderData:dr,errors:de,...ht?{fetchers:new Map(D.fetchers)}:{}}}function br(V){if(V&&!qt(V[1]))return{[V[0]]:V[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function S0(V){return V.forEach(q=>{let A0=D.fetchers.get(q.key),h0=xl(void 0,A0?A0.data:void 0);D.fetchers.set(q.key,h0)}),new Map(D.fetchers)}async function W0(V,q,A0,h0){ee(V);let g0=(h0&&h0.flushSync)===!0,C0=u||s,M0=ax(D.location,D.matches,c,A0,q,h0==null?void 0:h0.relative),G0=vi(C0,M0,c),P0=$0(G0,C0,M0);if(P0.active&&P0.matches&&(G0=P0.matches),!G0){qr(V,q,ga(404,{pathname:M0}),{flushSync:g0});return}let{path:V0,submission:I0,error:X0}=Hp(!0,M0,h0);if(X0){qr(V,q,X0,{flushSync:g0});return}let lr=e.getContext?await e.getContext():new Pp,Wr=(h0&&h0.preventScrollReset)===!0;if(I0&&Et(I0.formMethod)){await er(V,q,V0,G0,lr,P0.active,g0,Wr,I0);return}W.set(V,{routeId:q,path:V0}),await kr(V,q,V0,G0,lr,P0.active,g0,Wr,I0)}async function er(V,q,A0,h0,g0,C0,M0,G0,P0){Ir(),W.delete(V);let V0=D.fetchers.get(V);jr(V,IS(P0,V0),{flushSync:M0});let I0=new AbortController,X0=_o(e.history,A0,I0.signal,P0);if(C0){let le=await j0(h0,new URL(X0.url).pathname,X0.signal,V);if(le.type==="aborted")return;if(le.type==="error"){qr(V,q,le.error,{flushSync:M0});return}else if(le.matches)h0=le.matches;else{qr(V,q,ga(404,{pathname:A0}),{flushSync:M0});return}}let lr=vu(h0,A0);if(!lr.route.action&&!lr.route.lazy){let le=ga(405,{method:P0.formMethod,pathname:A0,routeId:q});qr(V,q,le,{flushSync:M0});return}z.set(V,I0);let Wr=F,ce=Uo(o,A,X0,h0,lr,a,g0),F0=(await ur(X0,ce,g0,V))[lr.route.id];if(X0.signal.aborted){z.get(V)===I0&&z.delete(V);return}if(_.has(V)){if(g2(F0)||qt(F0)){jr(V,Rn(void 0));return}}else{if(g2(F0))if(z.delete(V),Z>Wr){jr(V,Rn(void 0));return}else return R.add(V),jr(V,xl(P0)),pr(X0,F0,!1,{fetcherSubmission:P0,preventScrollReset:G0});if(qt(F0)){qr(V,q,F0.error);return}}let H=D.navigation.location||D.location,m0=_o(e.history,H,I0.signal),T0=u||s,yr=D.navigation.state!=="idle"?vi(T0,D.navigation.location,c):D.matches;wr(yr,"Didn't find any matches after fetcher action");let Mr=++F;j.set(V,Mr);let dr=xl(P0,F0.data);D.fetchers.set(V,dr);let{dsMatches:de,revalidatingFetchers:Se}=Yp(m0,g0,o,A,e.history,D,yr,P0,H,a,!1,r0,G,_,W,R,T0,c,e.patchRoutesOnNavigation!=null,[lr.route.id,F0]);Se.filter(le=>le.key!==V).forEach(le=>{let ln=le.key,ia=D.fetchers.get(ln),St=xl(void 0,ia?ia.data:void 0);D.fetchers.set(ln,St),ee(ln),le.controller&&z.set(ln,le.controller)}),p0({fetchers:new Map(D.fetchers)});let _e=()=>Se.forEach(le=>ee(le.key));I0.signal.addEventListener("abort",_e);let{loaderResults:ht,fetcherResults:ar}=await re(de,Se,m0,g0);if(I0.signal.aborted)return;if(I0.signal.removeEventListener("abort",_e),j.delete(V),z.delete(V),Se.forEach(le=>z.delete(le.key)),D.fetchers.has(V)){let le=Rn(F0.data);D.fetchers.set(V,le)}let be=Jf(ht);if(be)return pr(m0,be.result,!1,{preventScrollReset:G0});if(be=Jf(ar),be)return R.add(be.key),pr(m0,be.result,!1,{preventScrollReset:G0});let{loaderData:na,errors:An}=em(D,yr,ht,void 0,Se,ar);Ur(Mr),D.navigation.state==="loading"&&Mr>Z?(wr(X,"Expected pending action"),Y&&Y.abort(),B0(D.navigation.location,{matches:yr,loaderData:na,errors:An,fetchers:new Map(D.fetchers)})):(p0({errors:An,loaderData:tm(D.loaderData,na,yr,An),fetchers:new Map(D.fetchers)}),r0=!1)}async function kr(V,q,A0,h0,g0,C0,M0,G0,P0){let V0=D.fetchers.get(V);jr(V,xl(P0,V0?V0.data:void 0),{flushSync:M0});let I0=new AbortController,X0=_o(e.history,A0,I0.signal);if(C0){let H=await j0(h0,new URL(X0.url).pathname,X0.signal,V);if(H.type==="aborted")return;if(H.type==="error"){qr(V,q,H.error,{flushSync:M0});return}else if(H.matches)h0=H.matches;else{qr(V,q,ga(404,{pathname:A0}),{flushSync:M0});return}}let lr=vu(h0,A0);z.set(V,I0);let Wr=F,ce=Uo(o,A,X0,h0,lr,a,g0),F0=(await ur(X0,ce,g0,V))[lr.route.id];if(z.get(V)===I0&&z.delete(V),!X0.signal.aborted){if(_.has(V)){jr(V,Rn(void 0));return}if(g2(F0))if(Z>Wr){jr(V,Rn(void 0));return}else{R.add(V),await pr(X0,F0,!1,{preventScrollReset:G0});return}if(qt(F0)){qr(V,q,F0.error);return}jr(V,Rn(F0.data))}}async function pr(V,q,A0,{submission:h0,fetcherSubmission:g0,preventScrollReset:C0,replace:M0}={}){q.response.headers.has("X-Remix-Revalidate")&&(r0=!0);let G0=q.response.headers.get("Location");wr(G0,"Expected a Location header on the redirect Response"),G0=Kp(G0,new URL(V.url),c);let P0=Jl(D.location,G0,{_isRedirect:!0});if(t){let ce=!1;if(q.response.headers.has("X-Remix-Reload-Document"))ce=!0;else if(A8(G0)){const Fe=a7(G0,!0);ce=Fe.origin!==r.location.origin||Xt(Fe.pathname,c)==null}if(ce){M0?r.location.replace(G0):r.location.assign(G0);return}}Y=null;let V0=M0===!0||q.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:I0,formAction:X0,formEncType:lr}=D.navigation;!h0&&!g0&&I0&&X0&&lr&&(h0=im(D.navigation));let Wr=h0||g0;if(fS.has(q.response.status)&&Wr&&Et(Wr.formMethod))await O0(V0,P0,{submission:{...Wr,formAction:G0},preventScrollReset:C0||U,enableViewTransition:A0?$:void 0});else{let ce=Z4(P0,h0);await O0(V0,P0,{overrideNavigation:ce,fetcherSubmission:g0,preventScrollReset:C0||U,enableViewTransition:A0?$:void 0})}}async function ur(V,q,A0,h0){let g0,C0={};try{g0=await ES(d,V,q,h0,A0,!1)}catch(M0){return q.filter(G0=>G0.shouldLoad).forEach(G0=>{C0[G0.route.id]={type:"error",error:M0}}),C0}if(V.signal.aborted)return C0;for(let[M0,G0]of Object.entries(g0))if(RS(G0)){let P0=G0.result;C0[M0]={type:"redirect",response:CS(P0,V,M0,q,c)}}else C0[M0]=await wS(G0);return C0}async function re(V,q,A0,h0){let g0=ur(A0,V,h0,null),C0=Promise.all(q.map(async P0=>{if(P0.matches&&P0.match&&P0.request&&P0.controller){let I0=(await ur(P0.request,P0.matches,h0,P0.key))[P0.match.route.id];return{[P0.key]:I0}}else return Promise.resolve({[P0.key]:{type:"error",error:ga(404,{pathname:P0.path})}})})),M0=await g0,G0=(await C0).reduce((P0,V0)=>Object.assign(P0,V0),{});return{loaderResults:M0,fetcherResults:G0}}function Ir(){r0=!0,W.forEach((V,q)=>{z.has(q)&&G.add(q),ee(q)})}function jr(V,q,A0={}){D.fetchers.set(V,q),p0({fetchers:new Map(D.fetchers)},{flushSync:(A0&&A0.flushSync)===!0})}function qr(V,q,A0,h0={}){let g0=Ei(D.matches,q);ue(V),p0({errors:{[g0.route.id]:A0},fetchers:new Map(D.fetchers)},{flushSync:(h0&&h0.flushSync)===!0})}function it(V){return P.set(V,(P.get(V)||0)+1),_.has(V)&&_.delete(V),D.fetchers.get(V)||uS}function dt(V,q){ee(V,q==null?void 0:q.reason),jr(V,Rn(null))}function ue(V){let q=D.fetchers.get(V);z.has(V)&&!(q&&q.state==="loading"&&j.has(V))&&ee(V),W.delete(V),j.delete(V),R.delete(V),_.delete(V),G.delete(V),D.fetchers.delete(V)}function Dt(V){let q=(P.get(V)||0)-1;q<=0?(P.delete(V),_.add(V)):P.set(V,q),p0({fetchers:new Map(D.fetchers)})}function ee(V,q){let A0=z.get(V);A0&&(A0.abort(q),z.delete(V))}function te(V){for(let q of V){let A0=it(q),h0=Rn(A0.data);D.fetchers.set(q,h0)}}function ae(){let V=[],q=!1;for(let A0 of R){let h0=D.fetchers.get(A0);wr(h0,`Expected fetcher: ${A0}`),h0.state==="loading"&&(R.delete(A0),V.push(A0),q=!0)}return te(V),q}function Ur(V){let q=[];for(let[A0,h0]of j)if(h00}function Ra(V,q){let A0=D.blockers.get(V)||Wo;return o0.get(V)!==q&&o0.set(V,q),A0}function We(V){D.blockers.delete(V),o0.delete(V)}function Pe(V,q){let A0=D.blockers.get(V)||Wo;wr(A0.state==="unblocked"&&q.state==="blocked"||A0.state==="blocked"&&q.state==="blocked"||A0.state==="blocked"&&q.state==="proceeding"||A0.state==="blocked"&&q.state==="unblocked"||A0.state==="proceeding"&&q.state==="unblocked",`Invalid blocker state transition: ${A0.state} -> ${q.state}`);let h0=new Map(D.blockers);h0.set(V,q),p0({blockers:h0})}function ke({currentLocation:V,nextLocation:q,historyAction:A0}){if(o0.size===0)return;o0.size>1&&Ce(!1,"A router only supports one blocker at a time");let h0=Array.from(o0.entries()),[g0,C0]=h0[h0.length-1],M0=D.blockers.get(g0);if(!(M0&&M0.state==="proceeding")&&C0({currentLocation:V,nextLocation:q,historyAction:A0}))return g0}function xe(V){let q=ga(404,{pathname:V}),A0=u||s,{matches:h0,route:g0}=Qf(A0);return{notFoundMatches:h0,route:g0,error:q}}function Ft(V,q,A0){if(g=V,y=q,k=A0||null,!C&&D.navigation===T4){C=!0;let h0=U0(D.location,D.matches);h0!=null&&p0({restoreScrollPosition:h0})}return()=>{g=null,y=null,k=null}}function Ae(V,q){return k&&k(V,q.map(h0=>ZF(h0,D.loaderData)))||V.key}function Y0(V,q){if(g&&y){let A0=Ae(V,q);g[A0]=y()}}function U0(V,q){if(g){let A0=Ae(V,q),h0=g[A0];if(typeof h0=="number")return h0}return null}function $0(V,q,A0){if(e.patchRoutesOnNavigation)if(V){if(Object.keys(V[0].params).length>0)return{active:!0,matches:gu(q,A0,c,!0)}}else return{active:!0,matches:gu(q,A0,c,!0)||[]};return{active:!1,matches:null}}async function j0(V,q,A0,h0){if(!e.patchRoutesOnNavigation)return{type:"success",matches:V};let g0=V;for(;;){let C0=u==null,M0=u||s,G0=A;try{await e.patchRoutesOnNavigation({signal:A0,path:q,matches:g0,fetcherKey:h0,patch:(I0,X0)=>{A0.aborted||Qp(I0,X0,M0,G0,o,!1)}})}catch(I0){return{type:"error",error:I0,partialMatches:g0}}finally{C0&&!A0.aborted&&(s=[...s])}if(A0.aborted)return{type:"aborted"};let P0=vi(M0,q,c);if(P0)return{type:"success",matches:P0};let V0=gu(M0,q,c,!0);if(!V0||g0.length===V0.length&&g0.every((I0,X0)=>I0.route.id===V0[X0].route.id))return{type:"success",matches:null};g0=V0}}function Q0(V){A={},u=ql(V,o,void 0,A)}function N0(V,q,A0=!1){let h0=u==null;Qp(V,q,u||s,A,o,A0),h0&&(s=[...s],p0({}))}return T={get basename(){return c},get future(){return x},get state(){return D},get routes(){return s},get window(){return r},initialize:y0,subscribe:k0,enableScrollRestoration:Ft,navigate:D0,fetch:W0,revalidate:z0,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:it,resetFetcher:dt,deleteFetcher:Dt,dispose:E0,getBlocker:Ra,deleteBlocker:We,patchRoutes:N0,_internalFetchControllers:z,_internalSetRoutes:Q0,_internalSetStateDoNotUseOrYouWillBreakYourApp(V){p0(V)}},e.unstable_instrumentations&&(T=eS(T,e.unstable_instrumentations.map(V=>V.router).filter(Boolean))),T}function xS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ax(e,r,t,a,n,o){let A,s;if(n){A=[];for(let c of r)if(A.push(c),c.route.id===n){s=c;break}}else A=r,s=r[r.length-1];let u=Gc(a||".",Vc(A),Xt(e.pathname,t)||e.pathname,o==="path");if(a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&s){let c=s8(u.search);if(s.route.index&&!c)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let d=new URLSearchParams(u.search),x=d.getAll("index");d.delete("index"),x.filter(p=>p).forEach(p=>d.append("index",p));let b=d.toString();u.search=b?`?${b}`:""}}return t!=="/"&&(u.pathname=YF({basename:t,pathname:u.pathname})),an(u)}function Hp(e,r,t){if(!t||!xS(t))return{path:r};if(t.formMethod&&!NS(t.formMethod))return{path:r,error:ga(405,{method:t.formMethod})};let a=()=>({path:r,error:ga(400,{type:"invalid-body"})}),o=(t.formMethod||"get").toUpperCase(),A=b7(r);if(t.body!==void 0){if(t.formEncType==="text/plain"){if(!Et(o))return a();let x=typeof t.body=="string"?t.body:t.body instanceof FormData||t.body instanceof URLSearchParams?Array.from(t.body.entries()).reduce((b,[p,g])=>`${b}${p}=${g} -`,""):String(t.body);return{path:r,submission:{formMethod:o,formAction:A,formEncType:t.formEncType,formData:void 0,json:void 0,text:x}}}else if(t.formEncType==="application/json"){if(!Et(o))return a();try{let x=typeof t.body=="string"?JSON.parse(t.body):t.body;return{path:r,submission:{formMethod:o,formAction:A,formEncType:t.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}wr(typeof FormData=="function","FormData is not available in this environment");let s,u;if(t.formData)s=ox(t.formData),u=t.formData;else if(t.body instanceof FormData)s=ox(t.body),u=t.body;else if(t.body instanceof URLSearchParams)s=t.body,u=rm(s);else if(t.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(t.body),u=rm(s)}catch{return a()}let c={formMethod:o,formAction:A,formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Et(c.formMethod))return{path:r,submission:c};let d=Yi(r);return e&&d.search&&s8(d.search)&&s.append("index",""),d.search=`?${s}`,{path:an(d),submission:c}}function Yp(e,r,t,a,n,o,A,s,u,c,d,x,b,p,g,k,y,C,M,N){var a0;let S=N?qt(N[1])?N[1].error:N[1].data:void 0,w=n.createURL(o.location),T=n.createURL(u),D;if(d&&o.errors){let r0=Object.keys(o.errors)[0];D=A.findIndex(G=>G.route.id===r0)}else if(N&&qt(N[1])){let r0=N[0];D=A.findIndex(G=>G.route.id===r0)-1}let X=N?N[1].statusCode:void 0,U=X&&X>=400,Y={currentUrl:w,currentParams:((a0=o.matches[0])==null?void 0:a0.params)||{},nextUrl:T,nextParams:A[0].params,...s,actionResult:S,actionStatus:X},$=o8(A.map(r0=>r0.route.path)),i0=A.map((r0,G)=>{let{route:z}=r0,F=null;if(D!=null&&G>D?F=!1:z.lazy?F=!0:l8(z)?d?F=nx(z,o.loaderData,o.errors):bS(o.loaderData,o.matches[G],r0)&&(F=!0):F=!1,F!==null)return ix(t,a,e,$,r0,c,r,F);let Z=U?!1:x||w.pathname+w.search===T.pathname+T.search||w.search!==T.search||pS(o.matches[G],r0),j={...Y,defaultShouldRevalidate:Z},R=ju(r0,j);return ix(t,a,e,$,r0,c,r,R,j)}),t0=[];return g.forEach((r0,G)=>{if(d||!A.some(_=>_.route.id===r0.routeId)||p.has(G))return;let z=o.fetchers.get(G),F=z&&z.state!=="idle"&&z.data===void 0,Z=vi(y,r0.path,C);if(!Z){if(M&&F)return;t0.push({key:G,routeId:r0.routeId,path:r0.path,matches:null,match:null,request:null,controller:null});return}if(k.has(G))return;let j=vu(Z,r0.path),R=new AbortController,W=_o(n,r0.path,R.signal),P=null;if(b.has(G))b.delete(G),P=Uo(t,a,W,Z,j,c,r);else if(F)x&&(P=Uo(t,a,W,Z,j,c,r));else{let _={...Y,defaultShouldRevalidate:U?!1:x};ju(j,_)&&(P=Uo(t,a,W,Z,j,c,r,_))}P&&t0.push({key:G,routeId:r0.routeId,path:r0.path,matches:P,match:j,request:W,controller:R})}),{dsMatches:i0,revalidatingFetchers:t0}}function l8(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function nx(e,r,t){if(e.lazy)return!0;if(!l8(e))return!1;let a=r!=null&&e.id in r,n=t!=null&&t[e.id]!==void 0;return!a&&n?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!n}function bS(e,r,t){let a=!r||t.route.id!==r.route.id,n=!e.hasOwnProperty(t.route.id);return a||n}function pS(e,r){let t=e.route.path;return e.pathname!==r.pathname||t!=null&&t.endsWith("*")&&e.params["*"]!==r.params["*"]}function ju(e,r){if(e.route.shouldRevalidate){let t=e.route.shouldRevalidate(r);if(typeof t=="boolean")return t}return r.defaultShouldRevalidate}function Qp(e,r,t,a,n,o){let A;if(e){let c=a[e];wr(c,`No route found to patch children into: routeId = ${e}`),c.children||(c.children=[]),A=c.children}else A=t;let s=[],u=[];if(r.forEach(c=>{let d=A.find(x=>u7(c,x));d?u.push({existingRoute:d,newRoute:c}):s.push(c)}),s.length>0){let c=ql(s,n,[e||"_","patch",String((A==null?void 0:A.length)||"0")],a);A.push(...c)}if(o&&u.length>0)for(let c=0;c{var n;return(n=r.children)==null?void 0:n.some(o=>u7(t,o))}):!1}var Jp=new WeakMap,c7=({key:e,route:r,manifest:t,mapRouteProperties:a})=>{let n=t[r.id];if(wr(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let A=Jp.get(n);A||(A={},Jp.set(n,A));let s=A[e];if(s)return s;let u=(async()=>{let c=NF(e),x=n[e]!==void 0&&e!=="hasErrorBoundary";if(c)Ce(!c,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),A[e]=Promise.resolve();else if(x)Ce(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await o();b!=null&&(Object.assign(n,{[e]:b}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(b=>b===void 0)&&(n.lazy=void 0))})();return A[e]=u,u},qp=new WeakMap;function mS(e,r,t,a,n){let o=t[e.id];if(wr(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=qp.get(o);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let x=(async()=>{wr(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),p={};for(let g in b){let k=b[g];if(k===void 0)continue;let y=IF(g),M=o[g]!==void 0&&g!=="hasErrorBoundary";y?Ce(!y,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):M?Ce(!M,`Route "${o.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):p[g]=k}Object.assign(o,p),Object.assign(o,{...a(o),lazy:void 0})})();return qp.set(o,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let A=Object.keys(e.lazy),s=[],u;for(let d of A){if(n&&n.includes(d))continue;let x=c7({key:d,route:e,manifest:t,mapRouteProperties:a});x&&(s.push(x),d===r&&(u=x))}let c=s.length>0?Promise.all(s).then(()=>{}):void 0;return c==null||c.catch(()=>{}),u==null||u.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:u}}async function $p(e){let r=e.matches.filter(n=>n.shouldLoad),t={};return(await Promise.all(r.map(n=>n.resolve()))).forEach((n,o)=>{t[r[o].route.id]=n}),t}async function gS(e){return e.matches.some(r=>r.route.middleware)?d7(e,()=>$p(e)):$p(e)}function d7(e,r){return vS(e,r,a=>a,FS,t);function t(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:A}=e,s=Math.min(Math.max(A.findIndex(c=>c.route.id===n),0),Math.max(A.findIndex(c=>c.unstable_shouldCallHandler()),0)),u=Ei(A,A[s].route.id).route.id;return Promise.resolve({[u]:{type:"error",result:a}})}}}async function vS(e,r,t,a,n){let{matches:o,request:A,params:s,context:u,unstable_pattern:c}=e,d=o.flatMap(b=>b.route.middleware?b.route.middleware.map(p=>[b.route.id,p]):[]);return await h7({request:A,params:s,context:u,unstable_pattern:c},d,r,t,a,n)}async function h7(e,r,t,a,n,o,A=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let u=r[A];if(!u)return await t();let[c,d]=u,x,b=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await h7(e,r,t,a,n,o,A+1)},x.value}catch(p){return x={value:await o(p,c,x)},x.value}};try{let p=await d(e,b),g=p!=null?a(p):void 0;return n(g)?g:x?g??x.value:(x={value:await b()},x.value)}catch(p){return await o(p,c,x)}}function x7(e,r,t,a,n){let o=c7({key:"middleware",route:a.route,manifest:r,mapRouteProperties:e}),A=mS(a.route,Et(t.method)?"action":"loader",r,e,n);return{middleware:o,route:A.lazyRoutePromise,handler:A.lazyHandlerPromise}}function ix(e,r,t,a,n,o,A,s,u=null){let c=!1,d=x7(e,r,t,n,o);return{...n,_lazyPromises:d,shouldLoad:s,unstable_shouldRevalidateArgs:u,unstable_shouldCallHandler(x){return c=!0,u?typeof x=="boolean"?ju(n,{...u,defaultShouldRevalidate:x}):ju(n,u):s},resolve(x){let{lazy:b,loader:p,middleware:g}=n.route,k=c||s||x&&!Et(t.method)&&(b||p),y=g&&g.length>0&&!p&&!b;return k&&(Et(t.method)||!y)?kS({request:t,unstable_pattern:a,match:n,lazyHandlerPromise:d==null?void 0:d.handler,lazyRoutePromise:d==null?void 0:d.route,handlerOverride:x,scopedContext:A}):Promise.resolve({type:"data",result:void 0})}}}function Uo(e,r,t,a,n,o,A,s=null){return a.map(u=>u.route.id!==n.route.id?{...u,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:x7(e,r,t,u,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ix(e,r,t,o8(a.map(c=>c.route.path)),u,o,A,!0,s))}async function ES(e,r,t,a,n,o){t.some(c=>{var d;return(d=c._lazyPromises)==null?void 0:d.middleware})&&await Promise.all(t.map(c=>{var d;return(d=c._lazyPromises)==null?void 0:d.middleware}));let A={request:r,unstable_pattern:o8(t.map(c=>c.route.path)),params:t[0].params,context:n,matches:t},u=await e({...A,fetcherKey:a,runClientMiddleware:c=>{let d=A;return d7(d,()=>c({...d,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(t.flatMap(c=>{var d,x;return[(d=c._lazyPromises)==null?void 0:d.handler,(x=c._lazyPromises)==null?void 0:x.route]}))}catch{}return u}async function kS({request:e,unstable_pattern:r,match:t,lazyHandlerPromise:a,lazyRoutePromise:n,handlerOverride:o,scopedContext:A}){let s,u,c=Et(e.method),d=c?"action":"loader",x=b=>{let p,g=new Promise((C,M)=>p=M);u=()=>p(),e.signal.addEventListener("abort",u);let k=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${t.route.id}]`)):b({request:e,unstable_pattern:r,params:t.params,context:A},...C!==void 0?[C]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(M=>k(M)):k())}}catch(C){return{type:"error",result:C}}})();return Promise.race([y,g])};try{let b=c?t.route.action:t.route.loader;if(a||n)if(b){let p,[g]=await Promise.all([x(b).catch(k=>{p=k}),a,n]);if(p!==void 0)throw p;s=g}else{await a;let p=c?t.route.action:t.route.loader;if(p)[s]=await Promise.all([x(p),n]);else if(d==="action"){let g=new URL(e.url),k=g.pathname+g.search;throw ga(405,{method:e.method,pathname:k,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(b)s=await x(b);else{let p=new URL(e.url),g=p.pathname+p.search;throw ga(404,{pathname:g})}}catch(b){return{type:"error",result:b}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function yS(e){let r=e.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?e.body==null?null:e.json():e.text()}async function wS(e){var a,n,o,A,s,u;let{result:r,type:t}=e;if(p7(r)){let c;try{c=await yS(r)}catch(d){return{type:"error",error:d}}return t==="error"?{type:"error",error:new _u(r.status,r.statusText,c),statusCode:r.status,headers:r.headers}:{type:"data",data:c,statusCode:r.status,headers:r.headers}}return t==="error"?nm(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:(a=r.init)==null?void 0:a.status,headers:(n=r.init)!=null&&n.headers?new Headers(r.init.headers):void 0}:{type:"error",error:new _u(((o=r.init)==null?void 0:o.status)||500,void 0,r.data),statusCode:$l(r)?r.status:void 0,headers:(A=r.init)!=null&&A.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:$l(r)?r.status:void 0}:nm(r)?{type:"data",data:r.data,statusCode:(s=r.init)==null?void 0:s.status,headers:(u=r.init)!=null&&u.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function CS(e,r,t,a,n){let o=e.headers.get("Location");if(wr(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!A8(o)){let A=a.slice(0,a.findIndex(s=>s.route.id===t)+1);o=ax(new URL(r.url),A,n,o),e.headers.set("Location",o)}return e}function Kp(e,r,t){if(A8(e)){let a=e,n=a.startsWith("//")?new URL(r.protocol+a):new URL(a),o=Xt(n.pathname,t)!=null;if(n.origin===r.origin&&o)return n.pathname+n.search+n.hash}return e}function _o(e,r,t,a){let n=e.createURL(b7(r)).toString(),o={signal:t};if(a&&Et(a.formMethod)){let{formMethod:A,formEncType:s}=a;o.method=A.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(a.json)):s==="text/plain"?o.body=a.text:s==="application/x-www-form-urlencoded"&&a.formData?o.body=ox(a.formData):o.body=a.formData}return new Request(n,o)}function ox(e){let r=new URLSearchParams;for(let[t,a]of e.entries())r.append(t,typeof a=="string"?a:a.name);return r}function rm(e){let r=new FormData;for(let[t,a]of e.entries())r.append(t,a);return r}function BS(e,r,t,a=!1,n=!1){let o={},A=null,s,u=!1,c={},d=t&&qt(t[1])?t[1].error:void 0;return e.forEach(x=>{if(!(x.route.id in r))return;let b=x.route.id,p=r[b];if(wr(!g2(p),"Cannot handle redirect results in processLoaderData"),qt(p)){let g=p.error;if(d!==void 0&&(g=d,d=void 0),A=A||{},n)A[b]=g;else{let k=Ei(e,b);A[k.route.id]==null&&(A[k.route.id]=g)}a||(o[b]=f7),u||(u=!0,s=$l(p.error)?p.error.status:500),p.headers&&(c[b]=p.headers)}else o[b]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(c[b]=p.headers)}),d!==void 0&&t&&(A={[t[0]]:d},t[2]&&(o[t[2]]=void 0)),{loaderData:o,errors:A,statusCode:s||200,loaderHeaders:c}}function em(e,r,t,a,n,o){let{loaderData:A,errors:s}=BS(r,t,a);return n.filter(u=>!u.matches||u.matches.some(c=>c.shouldLoad)).forEach(u=>{let{key:c,match:d,controller:x}=u;if(x&&x.signal.aborted)return;let b=o[c];if(wr(b,"Did not find corresponding fetcher result"),qt(b)){let p=Ei(e.matches,d==null?void 0:d.route.id);s&&s[p.route.id]||(s={...s,[p.route.id]:b.error}),e.fetchers.delete(c)}else if(g2(b))wr(!1,"Unhandled fetcher revalidation redirect");else{let p=Rn(b.data);e.fetchers.set(c,p)}}),{loaderData:A,errors:s}}function tm(e,r,t,a){let n=Object.entries(r).filter(([,o])=>o!==f7).reduce((o,[A,s])=>(o[A]=s,o),{});for(let o of t){let A=o.route.id;if(!r.hasOwnProperty(A)&&e.hasOwnProperty(A)&&o.route.loader&&(n[A]=e[A]),a&&a.hasOwnProperty(A))break}return n}function am(e){return e?qt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ei(e,r){return(r?e.slice(0,e.findIndex(a=>a.route.id===r)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Qf(e){let r=e.length===1?e[0]:e.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function ga(e,{pathname:r,routeId:t,method:a,type:n,message:o}={}){let A="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(A="Bad Request",a&&r&&t?s=`You made a ${a} request to "${r}" but did not provide a \`loader\` for route "${t}", so there is no way to handle the request.`:n==="invalid-body"&&(s="Unable to encode submission body")):e===403?(A="Forbidden",s=`Route "${t}" does not match URL "${r}"`):e===404?(A="Not Found",s=`No route matches URL "${r}"`):e===405&&(A="Method Not Allowed",a&&r&&t?s=`You made a ${a.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${t}", so there is no way to handle the request.`:a&&(s=`Invalid request method "${a.toUpperCase()}"`)),new _u(e||500,A,new Error(s),!0)}function Jf(e){let r=Object.entries(e);for(let t=r.length-1;t>=0;t--){let[a,n]=r[t];if(g2(n))return{key:a,result:n}}}function b7(e){let r=typeof e=="string"?Yi(e):e;return an({...r,hash:""})}function DS(e,r){return e.pathname!==r.pathname||e.search!==r.search?!1:e.hash===""?r.hash!=="":e.hash===r.hash?!0:r.hash!==""}function FS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([r,t])=>typeof r=="string"&&SS(t))}function SS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function RS(e){return p7(e.result)&&sS.has(e.result.status)}function qt(e){return e.type==="error"}function g2(e){return(e&&e.type)==="redirect"}function nm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function p7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function NS(e){return lS.has(e.toUpperCase())}function Et(e){return oS.has(e.toUpperCase())}function s8(e){return new URLSearchParams(e).getAll("index").some(r=>r==="")}function vu(e,r){let t=typeof r=="string"?Yi(r).search:r.search;if(e[e.length-1].route.index&&s8(t||""))return e[e.length-1];let a=o7(e);return a[a.length-1]}function im(e){let{formMethod:r,formAction:t,formEncType:a,text:n,formData:o,json:A}=e;if(!(!r||!t||!a)){if(n!=null)return{formMethod:r,formAction:t,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:r,formAction:t,formEncType:a,formData:o,json:void 0,text:void 0};if(A!==void 0)return{formMethod:r,formAction:t,formEncType:a,formData:void 0,json:A,text:void 0}}}function Z4(e,r){return r?{state:"loading",location:e,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function MS(e,r){return{state:"submitting",location:e,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function xl(e,r){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function IS(e,r){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r?r.data:void 0}}function Rn(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 TS(e,r){try{let t=e.sessionStorage.getItem(s7);if(t){let a=JSON.parse(t);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&r.set(n,new Set(o||[]))}}catch{}}function ZS(e,r){if(r.size>0){let t={};for(let[a,n]of r)t[a]=[...n];try{e.sessionStorage.setItem(s7,JSON.stringify(t))}catch(a){Ce(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function OS(){let e,r,t=new Promise((a,n)=>{e=async o=>{a(o);try{await t}catch{}},r=async o=>{n(o);try{await t}catch{}}});return{promise:t,resolve:e,reject:r}}var q2=I.createContext(null);q2.displayName="DataRouter";var ys=I.createContext(null);ys.displayName="DataRouterState";I.createContext(!1);var f8=I.createContext({isTransitioning:!1});f8.displayName="ViewTransition";var m7=I.createContext(new Map);m7.displayName="Fetchers";var WS=I.createContext(null);WS.displayName="Await";var Ga=I.createContext(null);Ga.displayName="Navigation";var Pc=I.createContext(null);Pc.displayName="Location";var Fa=I.createContext({outlet:null,matches:[],isDataRoute:!1});Fa.displayName="Route";var u8=I.createContext(null);u8.displayName="RouteError";function _S(e,{relative:r}={}){wr(gA(),"useHref() may be used only in the context of a component.");let{basename:t,navigator:a}=I.useContext(Ga),{hash:n,pathname:o,search:A}=ws(e,{relative:r}),s=o;return t!=="/"&&(s=o==="/"?t:tn([t,o])),a.createHref({pathname:s,search:A,hash:n})}function gA(){return I.useContext(Pc)!=null}function Sa(){return wr(gA(),"useLocation() may be used only in the context of a component."),I.useContext(Pc).location}var g7="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function v7(e){I.useContext(Ga).static||I.useLayoutEffect(e)}function Pa(){let{isDataRoute:e}=I.useContext(Fa);return e?rR():jS()}function jS(){wr(gA(),"useNavigate() may be used only in the context of a component.");let e=I.useContext(q2),{basename:r,navigator:t}=I.useContext(Ga),{matches:a}=I.useContext(Fa),{pathname:n}=Sa(),o=JSON.stringify(Vc(a)),A=I.useRef(!1);return v7(()=>{A.current=!0}),I.useCallback((u,c={})=>{if(Ce(A.current,g7),!A.current)return;if(typeof u=="number"){t.go(u);return}let d=Gc(u,JSON.parse(o),n,c.relative==="path");e==null&&r!=="/"&&(d.pathname=d.pathname==="/"?r:tn([r,d.pathname])),(c.replace?t.replace:t.push)(d,c.state,c)},[r,t,o,n,e])}var VS=I.createContext(null);function GS(e){let r=I.useContext(Fa).outlet;return I.useMemo(()=>r&&I.createElement(VS.Provider,{value:e},r),[r,e])}function PS(){let{matches:e}=I.useContext(Fa),r=e[e.length-1];return r?r.params:{}}function ws(e,{relative:r}={}){let{matches:t}=I.useContext(Fa),{pathname:a}=Sa(),n=JSON.stringify(Vc(t));return I.useMemo(()=>Gc(e,JSON.parse(n),a,r==="path"),[e,n,a,r])}function XS(e,r,t,a,n){wr(gA(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=I.useContext(Ga),{matches:A}=I.useContext(Fa),s=A[A.length-1],u=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",x=s&&s.route;{let M=x&&x.path||"";y7(c,!x||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let b=Sa(),p;p=b;let g=p.pathname||"/",k=g;if(d!=="/"){let M=d.replace(/^\//,"").split("/");k="/"+g.replace(/^\//,"").split("/").slice(M.length).join("/")}let y=vi(e,{pathname:k});return Ce(x||y!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ce(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),YS(y&&y.map(M=>Object.assign({},M,{params:Object.assign({},u,M.params),pathname:tn([d,o.encodeLocation?o.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?d:tn([d,o.encodeLocation?o.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),A,t,a,n)}function LS(){let e=qS(),r=$l(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},A=null;return console.error("Error handled by React Router default ErrorBoundary:",e),A=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:o},"ErrorBoundary")," or"," ",I.createElement("code",{style:o},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},r),t?I.createElement("pre",{style:n},t):null,A)}var zS=I.createElement(LS,null),US=class extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.unstable_onError?this.props.unstable_onError(e,r):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?I.createElement(Fa.Provider,{value:this.props.routeContext},I.createElement(u8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function HS({routeContext:e,match:r,children:t}){let a=I.useContext(q2);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),I.createElement(Fa.Provider,{value:e},t)}function YS(e,r=[],t=null,a=null,n=null){if(e==null){if(!t)return null;if(t.errors)e=t.matches;else if(r.length===0&&!t.initialized&&t.matches.length>0)e=t.matches;else return null}let o=e,A=t==null?void 0:t.errors;if(A!=null){let c=o.findIndex(d=>d.route.id&&(A==null?void 0:A[d.route.id])!==void 0);wr(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(A).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,u=-1;if(t)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,x)=>{let b,p=!1,g=null,k=null;t&&(b=A&&d.route.id?A[d.route.id]:void 0,g=d.route.errorElement||zS,s&&(u<0&&x===0?(y7("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,k=null):u===x&&(p=!0,k=d.route.hydrateFallbackElement||null)));let y=r.concat(o.slice(0,x+1)),C=()=>{let M;return b?M=g:p?M=k:d.route.Component?M=I.createElement(d.route.Component,null):d.route.element?M=d.route.element:M=c,I.createElement(HS,{match:d,routeContext:{outlet:c,matches:y,isDataRoute:t!=null},children:M})};return t&&(d.route.ErrorBoundary||d.route.errorElement||x===0)?I.createElement(US,{location:t.location,revalidation:t.revalidation,component:g,error:b,children:C(),routeContext:{outlet:null,matches:y,isDataRoute:!0},unstable_onError:a}):C()},null)}function c8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function E7(e){let r=I.useContext(q2);return wr(r,c8(e)),r}function k7(e){let r=I.useContext(ys);return wr(r,c8(e)),r}function QS(e){let r=I.useContext(Fa);return wr(r,c8(e)),r}function d8(e){let r=QS(e),t=r.matches[r.matches.length-1];return wr(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function JS(){return d8("useRouteId")}function qS(){var a;let e=I.useContext(u8),r=k7("useRouteError"),t=d8("useRouteError");return e!==void 0?e:(a=r.errors)==null?void 0:a[t]}var $S=0;function KS(e){let{router:r,basename:t}=E7("useBlocker"),a=k7("useBlocker"),[n,o]=I.useState(""),A=I.useCallback(s=>{if(typeof e!="function")return!!e;if(t==="/")return e(s);let{currentLocation:u,nextLocation:c,historyAction:d}=s;return e({currentLocation:{...u,pathname:Xt(u.pathname,t)||u.pathname},nextLocation:{...c,pathname:Xt(c.pathname,t)||c.pathname},historyAction:d})},[t,e]);return I.useEffect(()=>{let s=String(++$S);return o(s),()=>r.deleteBlocker(s)},[r]),I.useEffect(()=>{n!==""&&r.getBlocker(n,A)},[r,n,A]),n&&a.blockers.has(n)?a.blockers.get(n):Wo}function rR(){let{router:e}=E7("useNavigate"),r=d8("useNavigate"),t=I.useRef(!1);return v7(()=>{t.current=!0}),I.useCallback(async(n,o={})=>{Ce(t.current,g7),t.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:r,...o}))},[e,r])}var om={};function y7(e,r,t){!r&&!om[e]&&(om[e]=!0,Ce(!1,t))}var Am={};function lm(e,r){!e&&!Am[r]&&(Am[r]=!0,console.warn(r))}function eR(e){let r={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Ce(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:I.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Ce(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:I.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Ce(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:I.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),r}var tR=["HydrateFallback","hydrateFallbackElement"],aR=class{constructor(){this.status="pending",this.promise=new Promise((e,r)=>{this.resolve=t=>{this.status==="pending"&&(this.status="resolved",e(t))},this.reject=t=>{this.status==="pending"&&(this.status="rejected",r(t))}})}};function nR({router:e,flushSync:r,unstable_onError:t}){let[a,n]=I.useState(e.state),[o,A]=I.useState(),[s,u]=I.useState({isTransitioning:!1}),[c,d]=I.useState(),[x,b]=I.useState(),[p,g]=I.useState(),k=I.useRef(new Map),y=I.useCallback(w=>{n(T=>(w.errors&&t&&Object.entries(w.errors).forEach(([D,X])=>{var U;((U=T.errors)==null?void 0:U[D])!==X&&t(X)}),w))},[t]),C=I.useCallback((w,{deletedFetchers:T,flushSync:D,viewTransitionOpts:X})=>{w.fetchers.forEach((Y,$)=>{Y.data!==void 0&&k.current.set($,Y.data)}),T.forEach(Y=>k.current.delete(Y)),lm(D===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let U=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(lm(X==null||U,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!U){r&&D?r(()=>y(w)):I.startTransition(()=>y(w));return}if(r&&D){r(()=>{x&&(c&&c.resolve(),x.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let Y=e.window.document.startViewTransition(()=>{r(()=>y(w))});Y.finished.finally(()=>{r(()=>{d(void 0),b(void 0),A(void 0),u({isTransitioning:!1})})}),r(()=>b(Y));return}x?(c&&c.resolve(),x.skipTransition(),g({state:w,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(A(w),u({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,r,x,c,y]);I.useLayoutEffect(()=>e.subscribe(C),[e,C]),I.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new aR)},[s]),I.useEffect(()=>{if(c&&o&&e.window){let w=o,T=c.promise,D=e.window.document.startViewTransition(async()=>{I.startTransition(()=>y(w)),await T});D.finished.finally(()=>{d(void 0),b(void 0),A(void 0),u({isTransitioning:!1})}),b(D)}},[o,c,e.window,y]),I.useEffect(()=>{c&&o&&a.location.key===o.location.key&&c.resolve()},[c,x,a.location,o]),I.useEffect(()=>{!s.isTransitioning&&p&&(A(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),g(void 0))},[s.isTransitioning,p]);let M=I.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:w=>e.navigate(w),push:(w,T,D)=>e.navigate(w,{state:T,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(w,T,D)=>e.navigate(w,{replace:!0,state:T,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[e]),N=e.basename||"/",S=I.useMemo(()=>({router:e,navigator:M,static:!1,basename:N,unstable_onError:t}),[e,M,N,t]);return I.createElement(I.Fragment,null,I.createElement(q2.Provider,{value:S},I.createElement(ys.Provider,{value:a},I.createElement(m7.Provider,{value:k.current},I.createElement(f8.Provider,{value:s},I.createElement(lR,{basename:N,location:a.location,navigationType:a.historyAction,navigator:M},I.createElement(iR,{routes:e.routes,future:e.future,state:a,unstable_onError:t})))))),null)}var iR=I.memo(oR);function oR({routes:e,future:r,state:t,unstable_onError:a}){return XS(e,void 0,t,a,r)}function AR({to:e,replace:r,state:t,relative:a}){wr(gA()," may be used only in the context of a component.");let{static:n}=I.useContext(Ga);Ce(!n," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:o}=I.useContext(Fa),{pathname:A}=Sa(),s=Pa(),u=Gc(e,Vc(o),A,a==="path"),c=JSON.stringify(u);return I.useEffect(()=>{s(JSON.parse(c),{replace:r,state:t,relative:a})},[s,c,a,r,t]),null}function w7(e){return GS(e.context)}function lR({basename:e="/",children:r=null,location:t,navigationType:a="POP",navigator:n,static:o=!1}){wr(!gA(),"You cannot render a inside another . You should never have more than one in your app.");let A=e.replace(/^\/*/,"/"),s=I.useMemo(()=>({basename:A,navigator:n,static:o,future:{}}),[A,n,o]);typeof t=="string"&&(t=Yi(t));let{pathname:u="/",search:c="",hash:d="",state:x=null,key:b="default"}=t,p=I.useMemo(()=>{let g=Xt(u,A);return g==null?null:{location:{pathname:g,search:c,hash:d,state:x,key:b},navigationType:a}},[A,u,c,d,x,b,a]);return Ce(p!=null,` is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the won't render anything.`),p==null?null:I.createElement(Ga.Provider,{value:s},I.createElement(Pc.Provider,{children:r,value:p}))}var Eu="get",ku="application/x-www-form-urlencoded";function Xc(e){return e!=null&&typeof e.tagName=="string"}function sR(e){return Xc(e)&&e.tagName.toLowerCase()==="button"}function fR(e){return Xc(e)&&e.tagName.toLowerCase()==="form"}function uR(e){return Xc(e)&&e.tagName.toLowerCase()==="input"}function cR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dR(e,r){return e.button===0&&(!r||r==="_self")&&!cR(e)}var qf=null;function hR(){if(qf===null)try{new FormData(document.createElement("form"),0),qf=!1}catch{qf=!0}return qf}var xR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function O4(e){return e!=null&&!xR.has(e)?(Ce(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ku}"`),null):e}function bR(e,r){let t,a,n,o,A;if(fR(e)){let s=e.getAttribute("action");a=s?Xt(s,r):null,t=e.getAttribute("method")||Eu,n=O4(e.getAttribute("enctype"))||ku,o=new FormData(e)}else if(sR(e)||uR(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a )} @@ -434,7 +389,7 @@ const AccountPage = () => {
import("./NoticeEditor")); +const ImageCropModal = lazy(() => import("./Modal/ImageCropModal")); + const BoothSection = ({ location, departName, @@ -401,25 +402,29 @@ const BoothSection = ({ 방문자에게 보여질 공지사항을 작성해주세요 (선택)

{/* 공지사항 */} - + }> + + {cropSpec && width > 1279 && ( - setCropSpec(null)} - title={"이미지 편집하기"} - /> + }> + setCropSpec(null)} + title={"이미지 편집하기"} + /> + )} ); diff --git a/apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx b/apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx index d70cadc7..1ffb47c2 100644 --- a/apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx +++ b/apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx @@ -1,7 +1,7 @@ -import { useEffect, useState } from "react"; +import { Suspense, lazy, useEffect, useState } from "react"; +import type { CSSProperties } from "react"; import editOrderIcon from "../../../assets/edit_order_icon.svg"; import ToggleSwitch from "../../AdminHome/components/ToggleSwitch"; -import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; import MenuModal from "./Modal/menuModal"; import { useCreateMenu } from "../../../hooks/booth/menu/useCreateMenu"; import { useUploadMenuImage } from "../../../hooks/booth/useUploadMenuImage"; @@ -15,9 +15,21 @@ import { useUpdateMenuSort } from "../../../hooks/booth/menu/useUpadateMenuSort" import imgPlaceHolder from "../../../assets/menu_placeholder.png"; import { SwipeableRow } from "./Swipe/SwipeableRow"; +const DragDropContext = lazy(() => + import("react-beautiful-dnd").then((mod) => ({ + default: mod.DragDropContext, + })) +); +const Droppable = lazy(() => + import("react-beautiful-dnd").then((mod) => ({ default: mod.Droppable })) +); +const Draggable = lazy(() => + import("react-beautiful-dnd").then((mod) => ({ default: mod.Draggable })) +); + function lockVertical( - style?: React.CSSProperties -): React.CSSProperties | undefined { + style?: CSSProperties +): CSSProperties | undefined { if (!style || !style.transform) return style; const t = String(style.transform); const m2d = t.match(/translate\((-?\d+\.?\d*)px,\s*(-?\d+\.?\d*)px\)/); @@ -323,121 +335,123 @@ const MenuSection = ({ isTablet }: { isTablet: boolean }) => {
- - - {(provided) => ( -
- {menus.map((menu, idx) => ( - - {(provided) => { - const lockedStyle = lockVertical( - provided.draggableProps.style - ); - - return editMode ? ( -
- {/* rowContent 대신, 핸들 아이콘에만 dragHandleProps를 붙여줘야 해 */} + }> + + + {(provided) => ( +
+ {menus.map((menu, idx) => ( + + {(provided) => { + const lockedStyle = lockVertical( + provided.draggableProps.style + ); + + return editMode ? (
!editMode && openEditModal(menu)} + ref={provided.innerRef} + {...provided.draggableProps} + style={lockedStyle} + className="flex justify-between items-center py-4 w-full touch-pan-y select-none" > -
- placeholder + {/* rowContent 대신, 핸들 아이콘에만 dragHandleProps를 붙여줘야 해 */} +
!editMode && openEditModal(menu)} + > +
+ placeholder +
+
+ + {menu.name} + + + {formatNumber(menu.price)}원 + +
-
- - {menu.name} - - - {formatNumber(menu.price)}원 - -
-
- 순서 변경 -
- ) : ( - { - setSelectedMenu(menu); - setIsRemoveModalOpen(true); - }} - contentProps={{ - ...provided.draggableProps, // isDragDisabled=true라 드래그는 안됨 - style: lockedStyle, - className: - "flex justify-between items-center py-4 w-full", - }} - > -
openEditModal(menu)} + 순서 변경 +
+ ) : ( + { + setSelectedMenu(menu); + setIsRemoveModalOpen(true); + }} + contentProps={{ + ...provided.draggableProps, // isDragDisabled=true라 드래그는 안됨 + style: lockedStyle, + className: + "flex justify-between items-center py-4 w-full", + }} > -
- placeholder +
openEditModal(menu)} + > +
+ placeholder +
+
+ + {menu.name} + + + {formatNumber(menu.price)}원 + +
-
- - {menu.name} - - - {formatNumber(menu.price)}원 - -
-
- toggleSoldOut(idx)} - /> -
- ); - }} -
- ))} - {provided.placeholder} -
- )} -
-
+ toggleSoldOut(idx)} + /> + + ); + }} + + ))} + {provided.placeholder} +
+ )} + + +
{isAddModalOpen && ( import("./ImageCropModal")); + interface MenuModalProps { isEdit: boolean; initialData?: { @@ -26,17 +27,15 @@ interface PriceInputProps { setPrice: React.Dispatch>; } -// 가격 표시 세자리 마다 , 붙여서 표시 const formatNumber = (num: number) => { if (!num) return ""; - return String(num).replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " 원"; + return `${String(num).replace(/\B(?=(\d{3})+(?!\d))/g, ",")} 원`; }; const PriceInput: React.FC = ({ price, setPrice }) => { const [isFocused, setIsFocused] = useState(false); const handleChange = (e: React.ChangeEvent) => { - // 숫자만 추출 const rawValue = e.target.value.replace(/[^0-9]/g, ""); setPrice(rawValue); }; @@ -69,6 +68,7 @@ const PriceInput: React.FC = ({ price, setPrice }) => { }; const normalizePrice = (v: string) => v.replace(/[^0-9]/g, ""); + const MenuModal = ({ isEdit, initialData, @@ -77,18 +77,14 @@ const MenuModal = ({ onSubmit, onDelete, }: MenuModalProps) => { - console.log(initialData); - const [name, setName] = useState(initialData?.name || ""); const [adminDisplayName, setAdminDisplayName] = useState( initialData?.adminDisplayName || "" ); - const [price, setPrice] = useState(initialData?.price || ""); const [description, setDescription] = useState( initialData?.description || "" ); - const [image, setImage] = useState( initialData?.imageUrl || null ); @@ -100,42 +96,36 @@ const MenuModal = ({ }); const previewUrl = useObjectUrl(typeof image === "object" ? image : null); - const [cropTarget, setCropTarget] = useState(null); - const counterClass = (focused: boolean, hasValue: boolean) => - focused && hasValue ? "text-black" : "text-gray-400"; const { removeEmojiAll, removeEmojiSome } = useRemoveEmoji(); const [isComposingName, setIsComposingName] = useState(false); const [isComposingAdmin, setIsComposingAdmin] = useState(false); - const isFormValid = - name.trim() !== "" && - adminDisplayName.trim() !== "" && - String(price).trim() !== "" && - description.trim() !== ""; - - // 초기 스냅샷 (모달 열리는 동안 변하지 않음) const initialRef = useRef({ name: initialData?.name ?? "", adminDisplayName: initialData?.adminDisplayName ?? "", description: initialData?.description ?? "", price: normalizePrice(initialData?.price ?? ""), - // 편의를 위해 초기 이미지는 늘 "없음"으로 가정 (URL 기반이면 File이 아님) image: initialData?.imageUrl, }); - // 수정 여부 + const isFormValid = + name.trim() !== "" && + adminDisplayName.trim() !== "" && + String(price).trim() !== "" && + description.trim() !== ""; + const isDirty = useMemo(() => { const hasImageChanged = initialRef.current.image !== image; - const changed = + return ( name !== initialRef.current.name || adminDisplayName !== initialRef.current.adminDisplayName || description !== initialRef.current.description || normalizePrice(price) !== initialRef.current.price || - hasImageChanged; - return changed; + hasImageChanged + ); }, [name, adminDisplayName, description, price, image]); const handleSubmit = () => { @@ -150,6 +140,7 @@ const MenuModal = ({ }); onClose(); }; + const handleDelete = () => { onClose(); onDelete(); @@ -172,7 +163,7 @@ const MenuModal = ({ 닫기
@@ -193,7 +184,6 @@ const MenuModal = ({ value={name} onChange={(e) => { const v = e.target.value; - setName(isComposingName ? v : removeEmojiSome(v)); }} onCompositionStart={() => setIsComposingName(true)} @@ -204,22 +194,19 @@ const MenuModal = ({ onFocus={() => setFocus((f) => ({ ...f, name: true }))} onBlur={() => setFocus((f) => ({ ...f, name: false }))} maxLength={25} - className="w-full h-[52px] border border-[#DDDDDD] bg-black-5 bg-black-5 focus:bg-white px-4 py-2 border rounded-lg text-14-regular" + className="w-full h-[52px] border border-[#DDDDDD] bg-black-5 focus:bg-white px-4 py-2 rounded-lg text-14-regular" placeholder="메뉴명을 입력해주세요" /> -

+ }`}> 0)}`} + className={`${focus.name && name.length > 0 ? "text-black" : "text-gray-400"}`} > {name.length} {" "} / 25

- {/* 이미지 업로드 */} - {/* 관리자용 메뉴명 */} + {/* 관리자 표시 메뉴명 */}
setFocus((f) => ({ ...f, admin: false }))} onChange={(e) => { const v = e.target.value; - setAdminDisplayName( - isComposingAdmin ? v : removeEmojiAll(v) - ); + setAdminDisplayName(isComposingAdmin ? v : removeEmojiAll(v)); }} maxLength={10} - className="w-full h-[52px] border border-[#DDDDDD] bg-black-5 bg-black-5 focus:bg-white px-4 py-2 border rounded-lg text-14-regular" - placeholder={`${ + className="w-full h-[52px] border border-[#DDDDDD] bg-black-5 focus:bg-white px-4 py-2 rounded-lg text-14-regular" + placeholder={ isTablet - ? "주문 확인에 용이한 메뉴명으로 설정해주세요." - : "주문 확인이 쉬운 이름으로 설정해주세요" + ? "주문 확인용으로 메뉴명을 설정해주세요" + : "주문 확인용 메뉴명을 설정해주세요" } - `} /> -

+ }`}> 0 - )}`} + className={` ${ + focus.admin && adminDisplayName.length > 0 + ? "text-black" + : "text-gray-400" + }`} > {adminDisplayName.length} {" "} @@ -306,15 +289,12 @@ const MenuModal = ({ onFocus={() => setFocus((f) => ({ ...f, desc: true }))} onBlur={() => setFocus((f) => ({ ...f, desc: false }))} maxLength={250} - className="w-full border border-[#DDDDDD] bg-black-5 bg-black-5 focus:bg-white h-[120px] px-4 py-2 border rounded-lg text-14-regular h-24" + className="w-full border border-[#DDDDDD] bg-black-5 focus:bg-white h-[120px] px-4 py-2 rounded-lg text-14-regular" placeholder="메뉴 소개를 입력해주세요." />

0 - )}`} + className={`${focus.desc && description.length > 0 ? "text-black" : "text-gray-400"}`} > {description.length} {" "} @@ -335,13 +315,13 @@ const MenuModal = ({

)} @@ -350,7 +330,7 @@ const MenuModal = ({
{cropTarget && ( - { - setImage(cropped); // 크롭된 파일을 상태에 반영 - setCropTarget(null); // 모달 닫기 - }} - onClose={() => setCropTarget(null)} - title="메뉴 이미지 자르기" - /> + }> + { + setImage(cropped); + setCropTarget(null); + }} + onClose={() => setCropTarget(null)} + title="메뉴 이미지 자르기" + /> + )} ); diff --git a/apps/nowait-admin/src/utils/AdminApi.tsx b/apps/nowait-admin/src/utils/AdminApi.tsx index e63db226..0919c99b 100644 --- a/apps/nowait-admin/src/utils/AdminApi.tsx +++ b/apps/nowait-admin/src/utils/AdminApi.tsx @@ -1,6 +1,8 @@ import axios from "axios"; const API_URL = import.meta.env.VITE_ADMIN_API_URL; +// const LOCAL_API_URL = import.meta.env.VITE_LOCAL_ADMIN_API_URL; + // 자유게시판 전체 데이터 const AdminApi = axios.create({ baseURL: API_URL, diff --git a/apps/nowait-admin/vite.config.ts b/apps/nowait-admin/vite.config.ts index dcfe7827..019a9f97 100644 --- a/apps/nowait-admin/vite.config.ts +++ b/apps/nowait-admin/vite.config.ts @@ -4,5 +4,7 @@ import svgr from "vite-plugin-svgr"; // https://vite.dev/config/ export default defineConfig({ + server: { host: "0.0.0.0", port: 5173 }, + preview: { host: "0.0.0.0", port: 5173 }, plugins: [react(), svgr()], }); diff --git a/apps/nowait-user/src/api/menu.ts b/apps/nowait-user/src/api/menu.ts index dd2aca4d..b553e5ce 100644 --- a/apps/nowait-user/src/api/menu.ts +++ b/apps/nowait-user/src/api/menu.ts @@ -1,8 +1,6 @@ -import axios from "axios"; +import UserApi from "../utils/UserApi"; import type { MenuType } from "../types/order/menu"; -const API_URI = import.meta.env.VITE_SERVER_URI; - interface AllMenuServerResponse { success: boolean; @@ -22,8 +20,8 @@ interface MenuServerResponse { //주점에 해당하는 모든 메뉴 조회 export const getStoreMenus = async (publicCode: string) => { try { - const res = await axios.get( - `${API_URI}/v1/stores/${publicCode}/menus` + const res = await UserApi.get( + `/stores/${publicCode}/menus` ); if (res?.data.success) return res.data; } catch (error) { @@ -36,6 +34,6 @@ export const getStoreMenu = async ( publicCode: string, menuId: number ): Promise => { - const res = await axios.get(`${API_URI}/v1/stores/${publicCode}/menus/${menuId}`); + const res = await UserApi.get(`/stores/${publicCode}/menus/${menuId}`); return res.data; }; diff --git a/apps/nowait-user/src/api/order.ts b/apps/nowait-user/src/api/order.ts index 6318a65d..4607387e 100644 --- a/apps/nowait-user/src/api/order.ts +++ b/apps/nowait-user/src/api/order.ts @@ -1,4 +1,4 @@ -import axios from "axios"; +import UserApi from "../utils/UserApi"; import type { CreateOrderServerResponse, OrderDetailsServerResponse, @@ -6,22 +6,14 @@ import type { StorePaymentsResponse, } from "../types/order/order"; -const API_URI = import.meta.env.VITE_SERVER_URI; - -const api = axios.create({ - baseURL: `${API_URI}`, - withCredentials: true, -}); - - //주문 생성 export const createOrder = async ( publicCode: string, tableId: number, payload: OrderType ): Promise => { - const res = await api.post( - `v1/stores/${publicCode}/tables/${tableId}/orders`, + const res = await UserApi.post( + `/stores/${publicCode}/tables/${tableId}/orders`, payload ); return res.data; @@ -32,15 +24,15 @@ export const getOrderDetails = async ( publicCode: string, tableId: number ): Promise => { - const res = await api.get(`v1/stores/${publicCode}/tables/${tableId}/orders`); + const res = await UserApi.get(`/stores/${publicCode}/tables/${tableId}/orders`); return res.data; }; //주점 QR, 계좌번호 조회 export const getStorePayments = async (publicCode: string) => { try { - const res = await axios.get( - `${API_URI}/v1/stores/${publicCode}/payments` + const res = await UserApi.get( + `/stores/${publicCode}/payments` ); return res.data; } catch (error) { diff --git a/apps/nowait-user/src/api/reservation.ts b/apps/nowait-user/src/api/reservation.ts index 214a64a3..d125a56e 100644 --- a/apps/nowait-user/src/api/reservation.ts +++ b/apps/nowait-user/src/api/reservation.ts @@ -14,7 +14,7 @@ interface ServerResponse { // 모든 주점 정보 가져오기 export const getAllStores = async () => { - const response = await UserApi.get("/v1/stores", { + const response = await UserApi.get("/stores", { params: { page: 0, size: 50, @@ -27,7 +27,7 @@ export const getAllStores = async () => { export const getInfiniteAllStores = async ( pageParam: number ): Promise<{ storePageReadResponses: StoreType[]; hasNext: boolean }> => { - const response = await UserApi.get("/v1/stores", { + const response = await UserApi.get("/stores", { params: { page: pageParam, size: 5, @@ -39,7 +39,7 @@ export const getInfiniteAllStores = async ( // 주점 상세 정보 가져오기 export const getStore = async (publicCode: string) => { try { - const res = await UserApi.get(`/v1/stores/${publicCode}`); + const res = await UserApi.get(`/stores/${publicCode}`); return res.data; } catch (error) { console.log(error); @@ -52,20 +52,20 @@ export const createReservation = async ( payload: { partySize: number } ) => { const res = await UserApi.post( - `v1/users/me/waitings/${storeId}`, + `/users/me/waitings/legacy/${storeId}`, payload ); return res.data; }; export const getMyReservations = async () => { - const res = await UserApi.get("/v1/users/me/waitings"); + const res = await UserApi.get("/users/me/waitings"); return res.data; }; // 북마크 조회 export const getBookmark = async (): Promise => { - const res = await UserApi.get("/v1/users/me/bookmarks"); + const res = await UserApi.get("/users/me/bookmarks"); return res.data; }; @@ -74,7 +74,7 @@ export const createBookmark = async ( storeId: number | undefined, signal: AbortSignal ) => { - await UserApi.post(`/v1/users/me/bookmarks/${storeId}`, null, { signal }); + await UserApi.post(`/users/me/bookmarks/${storeId}`, null, { signal }); }; // 북마크 삭제 @@ -82,6 +82,6 @@ export const deleteBookmark = async ( storeId: number | undefined, signal: AbortSignal ) => { - const res = await UserApi.delete(`/v1/users/me/bookmarks/${storeId}`, { signal }); + const res = await UserApi.delete(`/users/me/bookmarks/${storeId}`, { signal }); return res.data; }; diff --git a/apps/nowait-user/src/components/common/modal/SearchModal.tsx b/apps/nowait-user/src/components/common/modal/SearchModal.tsx index 92960cd4..66d522f1 100644 --- a/apps/nowait-user/src/components/common/modal/SearchModal.tsx +++ b/apps/nowait-user/src/components/common/modal/SearchModal.tsx @@ -59,7 +59,7 @@ const SearchModal = ({ isOpen, onClose }: SearchModalProps) => { setIsSearching(true); try { const response = await UserApi.get( - `/v1/stores/search?keyword=${encodeURIComponent(query)}` + `/stores/search?keyword=${encodeURIComponent(query)}` ); if (response.data.success) { setSearchResults(response.data.response); diff --git a/apps/nowait-user/src/hooks/useCancelWaiting.ts b/apps/nowait-user/src/hooks/useCancelWaiting.ts index 352d1a7f..fa0e7988 100644 --- a/apps/nowait-user/src/hooks/useCancelWaiting.ts +++ b/apps/nowait-user/src/hooks/useCancelWaiting.ts @@ -6,7 +6,7 @@ import { useApiErrorHandler } from "./useApiErrorHandler"; const cancelWaiting = async (storeId: number): Promise => { try { const response = await UserApi.delete( - `/reservations/delete/queue/redis/${storeId}` + `/users/me/waitings/${storeId}` ); console.log("대기 취소 성공:", response.data); diff --git a/apps/nowait-user/src/hooks/useInfiniteStores.ts b/apps/nowait-user/src/hooks/useInfiniteStores.ts index 71477143..30c1ada4 100644 --- a/apps/nowait-user/src/hooks/useInfiniteStores.ts +++ b/apps/nowait-user/src/hooks/useInfiniteStores.ts @@ -45,7 +45,7 @@ const fetchStores = async ({ try { // UserApi 사용으로 헤더 설정 자동화 (인터셉터에서 최신 토큰 처리) const response = await UserApi.get( - "/v1/stores", + "/stores", { params: { page: pageParam, diff --git a/apps/nowait-user/src/hooks/useMyWaitingList.ts b/apps/nowait-user/src/hooks/useMyWaitingList.ts index 7b7dd176..75ce1ca6 100644 --- a/apps/nowait-user/src/hooks/useMyWaitingList.ts +++ b/apps/nowait-user/src/hooks/useMyWaitingList.ts @@ -29,7 +29,7 @@ interface MyWaitingResponse { const fetchMyWaitingList = async (): Promise => { try { const response = await UserApi.get( - "/v1/users/me/waitings" + "/users/me/waitings" ); console.log("내 대기 목록 서버 응답:", response.data); diff --git a/apps/nowait-user/src/hooks/useWaitingStores.ts b/apps/nowait-user/src/hooks/useWaitingStores.ts index 98e105c0..bff53635 100644 --- a/apps/nowait-user/src/hooks/useWaitingStores.ts +++ b/apps/nowait-user/src/hooks/useWaitingStores.ts @@ -26,7 +26,7 @@ const fetchWaitingStores = async ( ): Promise => { try { const response = await UserApi.get( - "/v1/stores/waiting-count", + "/stores/waiting-count", { params: { order, diff --git a/apps/nowait-user/src/utils/UserApi.tsx b/apps/nowait-user/src/utils/UserApi.tsx index 05c597a2..2e99e18b 100644 --- a/apps/nowait-user/src/utils/UserApi.tsx +++ b/apps/nowait-user/src/utils/UserApi.tsx @@ -3,7 +3,7 @@ import axios from "axios"; const API_URI = import.meta.env.VITE_SERVER_URI; const UserApi = axios.create({ - baseURL: API_URI, + baseURL: `${API_URI}/v1`, }); // 토큰 갱신 함수 (순환 참조 방지를 위해 여기서 직접 구현)