@gobing-ai/spur 0.4.19 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.example.yaml +4 -0
  3. package/config/workflows/task-pipeline.yaml +28 -10
  4. package/package.json +9 -9
  5. package/plugins/sp/plugin.json +1 -1
  6. package/plugins/sp/scripts/hooks/fleet-guest-stop.ts +32 -12
  7. package/plugins/sp/skills/fleet-join/SKILL.md +77 -8
  8. package/plugins/sp/skills/spur-cli/references/agent.md +15 -5
  9. package/schemas/spur-config.schema.json +5 -0
  10. package/spur.js +4198 -2001
  11. package/web/_astro/{BoardApp.DY8fwPfw.js → BoardApp.DFBNysRC.js} +176 -176
  12. package/web/_astro/{BoardApp.CNF3sCnm.js → BoardApp.DspUVt5b.js} +1 -1
  13. package/web/_astro/{TaskDetail.8z3DgYux.js → TaskDetail.DEzLL6Fe.js} +1 -1
  14. package/web/_astro/{arc.CFEYbpFT.js → arc.TAQDSOGC.js} +1 -1
  15. package/web/_astro/{architectureDiagram-3BPJPVTR.3eDvG_X8.js → architectureDiagram-3BPJPVTR.D2Zyc6nm.js} +1 -1
  16. package/web/_astro/{blockDiagram-GPEHLZMM.CMbLzMpk.js → blockDiagram-GPEHLZMM.BnA_rJl6.js} +6 -6
  17. package/web/_astro/{board-facade-react-router-dom.Dy5pjzOw.js → board-facade-react-router-dom.CHNMUrya.js} +1 -1
  18. package/web/_astro/{board-facade-react-router.DjjqU27_.js → board-facade-react-router.Dob6MDgf.js} +1 -1
  19. package/web/_astro/{c4Diagram-AAUBKEIU.2lZW8nZ-.js → c4Diagram-AAUBKEIU.DVUo9pxo.js} +1 -1
  20. package/web/_astro/channel.DpBpvy1k.js +1 -0
  21. package/web/_astro/{chunk-2J33WTMH.BtM1eI3D.js → chunk-2J33WTMH.BJ-VkV91.js} +1 -1
  22. package/web/_astro/{chunk-4BX2VUAB.CKeckzAf.js → chunk-4BX2VUAB.xpN1rBQK.js} +1 -1
  23. package/web/_astro/{chunk-55IACEB6.BBmHet8U.js → chunk-55IACEB6.Dtu4VTmK.js} +1 -1
  24. package/web/_astro/{chunk-727SXJPM.Bi8v7M_x.js → chunk-727SXJPM.CjXhM1c1.js} +1 -1
  25. package/web/_astro/{chunk-AQP2D5EJ.DOcBJyb6.js → chunk-AQP2D5EJ.DSCad_Gd.js} +1 -1
  26. package/web/_astro/{chunk-FMBD7UC4.C-EdUBD7.js → chunk-FMBD7UC4.DxwDIiuY.js} +1 -1
  27. package/web/_astro/{chunk-ND2GUHAM.IqTyWQhk.js → chunk-ND2GUHAM.D5LgSWYE.js} +1 -1
  28. package/web/_astro/{chunk-QZHKN3VN.a2DShvIL.js → chunk-QZHKN3VN.CwXZoKZI.js} +1 -1
  29. package/web/_astro/chunk-YNUBSHFH.B6ndyWdA.js +7 -0
  30. package/web/_astro/{classDiagram-4FO5ZUOK.CQBnvIjk.js → classDiagram-4FO5ZUOK.DZ-I2QOo.js} +1 -1
  31. package/web/_astro/{classDiagram-v2-Q7XG4LA2.CQBnvIjk.js → classDiagram-v2-Q7XG4LA2.DZ-I2QOo.js} +1 -1
  32. package/web/_astro/{cose-bilkent-S5V4N54A.BW9Ryz7c.js → cose-bilkent-S5V4N54A.DszE5dpz.js} +1 -1
  33. package/web/_astro/{cynefin-OW5HDTMX.BPhLeSep.js → cynefin-OW5HDTMX.c-ctyPLt.js} +1 -1
  34. package/web/_astro/cytoscape.esm.BDkkwuE4.js +321 -0
  35. package/web/_astro/{dagre-BM42HDAG._oD9MsDB.js → dagre-BM42HDAG.Boq07Shn.js} +2 -2
  36. package/web/_astro/{diagram-2AECGRRQ.iciSOlxY.js → diagram-2AECGRRQ.Csap4wVu.js} +1 -1
  37. package/web/_astro/{diagram-5GNKFQAL.ZzqeC45Q.js → diagram-5GNKFQAL.Cy4jXe_F.js} +1 -1
  38. package/web/_astro/{diagram-KO2AKTUF.CMqWGOYB.js → diagram-KO2AKTUF.BXEZQbTM.js} +1 -1
  39. package/web/_astro/{diagram-LMA3HP47.B5MPN99W.js → diagram-LMA3HP47.CFcDobF6.js} +1 -1
  40. package/web/_astro/{diagram-OG6HWLK6.Zgi-ANAF.js → diagram-OG6HWLK6.CJ8Q1cQd.js} +1 -1
  41. package/web/_astro/{erDiagram-TEJ5UH35.Bd5aeIyR.js → erDiagram-TEJ5UH35.B409nFLg.js} +1 -1
  42. package/web/_astro/{flowDiagram-I6XJVG4X.B8LBo_PH.js → flowDiagram-I6XJVG4X.BtF5dGDY.js} +4 -4
  43. package/web/_astro/{ganttDiagram-6RSMTGT7.Di2HLHk4.js → ganttDiagram-6RSMTGT7.BbflTg4R.js} +1 -1
  44. package/web/_astro/{gitGraphDiagram-PVQCEYII.BqDuU6fc.js → gitGraphDiagram-PVQCEYII.BLPcOhGS.js} +1 -1
  45. package/web/_astro/{infoDiagram-5YYISTIA.C_hw98uF.js → infoDiagram-5YYISTIA.DsaY8QU3.js} +1 -1
  46. package/web/_astro/{ishikawaDiagram-YF4QCWOH.uK7JK9Kk.js → ishikawaDiagram-YF4QCWOH.D9PaTLtO.js} +1 -1
  47. package/web/_astro/{journeyDiagram-JHISSGLW.D03MNAmn.js → journeyDiagram-JHISSGLW.4_zPJ9m2.js} +1 -1
  48. package/web/_astro/{kanban-definition-UN3LZRKU.DuiDtKhq.js → kanban-definition-UN3LZRKU.IqD1vq7W.js} +3 -3
  49. package/web/_astro/{linear.Der6_z5m.js → linear.JJiEkviR.js} +1 -1
  50. package/web/_astro/{mermaid.core.CaxkEgwh.js → mermaid.core.Brxzivhz.js} +55 -55
  51. package/web/_astro/{mindmap-definition-RKZ34NQL.DecT082u.js → mindmap-definition-RKZ34NQL.B6pZnBGO.js} +1 -1
  52. package/web/_astro/{pieDiagram-4H26LBE5.DuAEfZXh.js → pieDiagram-4H26LBE5.MM6Of7YP.js} +1 -1
  53. package/web/_astro/{quadrantDiagram-W4KKPZXB.CWXczU1k.js → quadrantDiagram-W4KKPZXB.7eWQnH9R.js} +1 -1
  54. package/web/_astro/{requirementDiagram-4Y6WPE33.BsAHUsR6.js → requirementDiagram-4Y6WPE33.C3T9mbHc.js} +1 -1
  55. package/web/_astro/{sankeyDiagram-5OEKKPKP.ghBqvXN8.js → sankeyDiagram-5OEKKPKP.CqlwDe_m.js} +1 -1
  56. package/web/_astro/{sequenceDiagram-3UESZ5HK.BKbwb7ad.js → sequenceDiagram-3UESZ5HK.BNVlPChR.js} +4 -4
  57. package/web/_astro/{stateDiagram-AJRCARHV.D5geOKAc.js → stateDiagram-AJRCARHV.DSExW-ER.js} +1 -1
  58. package/web/_astro/{stateDiagram-v2-BHNVJYJU.Dc4Sjs4R.js → stateDiagram-v2-BHNVJYJU.CxE4k_fB.js} +1 -1
  59. package/web/_astro/{timeline-definition-PNZ67QCA.ve2dW2tR.js → timeline-definition-PNZ67QCA.uFqjG7Z5.js} +1 -1
  60. package/web/_astro/{vennDiagram-CIIHVFJN.BdJumy3f.js → vennDiagram-CIIHVFJN.DpTrAXYs.js} +5 -5
  61. package/web/_astro/{wardleyDiagram-YWT4CUSO.X8HgtN8V.js → wardleyDiagram-YWT4CUSO.Dl0KBFZe.js} +1 -1
  62. package/web/_astro/{xychartDiagram-2RQKCTM6.C30VVwQ6.js → xychartDiagram-2RQKCTM6.CE0syl0o.js} +1 -1
  63. package/web/board-runtime.json +2 -2
  64. package/web/index.html +2 -2
  65. package/web/_astro/channel.CdQ8ZO1m.js +0 -1
  66. package/web/_astro/chunk-YNUBSHFH.CxeAygfi.js +0 -7
  67. package/web/_astro/cytoscape.esm.BB4DxJjf.js +0 -321
@@ -1,7 +0,0 @@
1
- import{a$ as Ue,Y as ee,ab as Ee,q as te,t as ze,m as be,b0 as Ne,aN as qe,E as j,ag as Ce,h as Q,b1 as Ve,a5 as We,i as Je,aU as Xe,b2 as xe,b3 as se,b4 as oe,b5 as K,ae as A,b6 as ke,b7 as Qe,b8 as Ke,a0 as Ge,a1 as Ye,$ as Ze,O as et,J as tt,v as $,aj as rt,al as at,ai as nt,b9 as U,ba as st,bb as ie,bc as ot,bd as re,be as I,bf as it,bg as lt,bh as ut}from"./chunk-JMJ3UQ3L.BQJEJHu4.js";import{r as T,R as D,a as dt}from"./index.5dn-Zm-2.js";var P={},le;function ct(){if(le)return P;le=1,Object.defineProperty(P,"__esModule",{value:!0}),P.parseCookie=u,P.parse=u,P.stringifyCookie=s,P.stringifySetCookie=i,P.serialize=i,P.parseSetCookie=l,P.stringifySetCookie=i,P.serialize=i;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=/^-?\d+$/,o=Object.prototype.toString,d=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function u(f,S){const m=new d,c=f.length;if(c<2)return m;const g=S?.decode||y;let v=0;do{const C=p(f,v,c);if(C===-1)break;const E=h(f,v,c);if(C>E){v=f.lastIndexOf(";",C-1)+1;continue}const k=w(f,v,C);m[k]===void 0&&(m[k]=g(w(f,C+1,E))),v=E+1}while(v<c);return m}function s(f,S){const m=S?.encode||encodeURIComponent,c=[];for(const g of Object.keys(f)){const v=f[g];if(v===void 0)continue;if(!e.test(g))throw new TypeError(`cookie name is invalid: ${g}`);const C=m(v);if(!t.test(C))throw new TypeError(`cookie val is invalid: ${v}`);c.push(`${g}=${C}`)}return c.join("; ")}function i(f,S,m){const c=typeof f=="object"?f:{...m,name:f,value:String(S)},v=(typeof S=="object"?S:m)?.encode||encodeURIComponent;if(!e.test(c.name))throw new TypeError(`argument name is invalid: ${c.name}`);const C=c.value?v(c.value):"";if(!t.test(C))throw new TypeError(`argument val is invalid: ${c.value}`);let E=c.name+"="+C;if(c.maxAge!==void 0){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);E+="; Max-Age="+c.maxAge}if(c.domain){if(!r.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);E+="; Domain="+c.domain}if(c.path){if(!a.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);E+="; Path="+c.path}if(c.expires){if(!R(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);E+="; Expires="+c.expires.toUTCString()}if(c.httpOnly&&(E+="; HttpOnly"),c.secure&&(E+="; Secure"),c.partitioned&&(E+="; Partitioned"),c.priority)switch(typeof c.priority=="string"?c.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}if(c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}return E}function l(f,S){const m=S?.decode||y,c=f.length,g=h(f,0,c),v=p(f,0,g),C=v===-1?{name:"",value:m(w(f,0,g))}:{name:w(f,0,v),value:m(w(f,v+1,g))};let E=g+1;for(;E<c;){const k=h(f,E,c),O=p(f,E,k),x=O===-1?w(f,E,k):w(f,E,O),b=O===-1?void 0:w(f,O+1,k);switch(x.toLowerCase()){case"httponly":C.httpOnly=!0;break;case"secure":C.secure=!0;break;case"partitioned":C.partitioned=!0;break;case"domain":C.domain=b;break;case"path":C.path=b;break;case"max-age":b&&n.test(b)&&(C.maxAge=Number(b));break;case"expires":if(!b)break;const H=new Date(b);Number.isFinite(H.valueOf())&&(C.expires=H);break;case"priority":if(!b)break;const _=b.toLowerCase();(_==="low"||_==="medium"||_==="high")&&(C.priority=_);break;case"samesite":if(!b)break;const M=b.toLowerCase();(M==="lax"||M==="strict"||M==="none")&&(C.sameSite=M);break}E=k+1}return C}function h(f,S,m){const c=f.indexOf(";",S);return c===-1?m:c}function p(f,S,m){const c=f.indexOf("=",S);return c<m?c:-1}function w(f,S,m){let c=S,g=m;do{const v=f.charCodeAt(c);if(v!==32&&v!==9)break}while(++c<g);for(;g>c;){const v=f.charCodeAt(g-1);if(v!==32&&v!==9)break;g--}return f.slice(c,g)}function y(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function R(f){return o.call(f)==="[object Date]"}return P}var ue=ct(),F={exports:{}},de;function ft(){if(de)return F.exports;de=1;var e={decodeValues:!0,map:!1,silent:!1};function t(s){return typeof s!="string"||s in{}}function r(){return Object.create(null)}function a(s){return typeof s=="string"&&!!s.trim()}function n(s,i){var l=s.split(";").filter(a),h=l.shift(),p=o(h),w=p.name,y=p.value;if(i=i?Object.assign({},e,i):e,t(w))return null;try{y=i.decodeValues?decodeURIComponent(y):y}catch(f){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",f)}var R=r();return R.name=w,R.value=y,l.forEach(function(f){var S=f.split("="),m=S.shift().trimLeft().toLowerCase();if(!t(m)){var c=S.join("=");if(m==="expires")R.expires=new Date(c);else if(m==="max-age"){var g=parseInt(c,10);Number.isNaN(g)||(R.maxAge=g)}else m==="secure"?R.secure=!0:m==="httponly"?R.httpOnly=!0:m==="samesite"?R.sameSite=c:m==="partitioned"?R.partitioned=!0:m&&(R[m]=c)}}),R}function o(s){var i="",l="",h=s.split("=");return h.length>1?(i=h.shift(),l=h.join("=")):l=s,{name:i,value:l}}function d(s,i){if(i=i?Object.assign({},e,i):e,!s)return i.map?r():[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var l=s.headers[Object.keys(s.headers).find(function(p){return p.toLowerCase()==="set-cookie"})];!l&&s.headers.cookie&&!i.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=l}if(Array.isArray(s)||(s=[s]),i.map){var h=r();return s.filter(a).reduce(function(p,w){var y=n(w,i);return y&&!t(y.name)&&(p[y.name]=y),p},h)}else return s.filter(a).map(function(p){return n(p,i)}).filter(Boolean)}function u(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var i=[],l=0,h,p,w,y,R;function f(){for(;l<s.length&&/\s/.test(s.charAt(l));)l+=1;return l<s.length}function S(){return p=s.charAt(l),p!=="="&&p!==";"&&p!==","}for(;l<s.length;){for(h=l,R=!1;f();)if(p=s.charAt(l),p===","){for(w=l,l+=1,f(),y=l;l<s.length&&S();)l+=1;l<s.length&&s.charAt(l)==="="?(R=!0,l=y,i.push(s.substring(h,w)),h=l):l=w+1}else l+=1;(!R||l>=s.length)&&i.push(s.substring(h,s.length))}return i}return F.exports=d,F.exports.parse=d,F.exports.parseString=n,F.exports.splitCookiesString=u,F.exports}var ht=ft(),pt={};function Zt({context:e,url:t,nonce:r}){typeof t=="string"&&(t=new URL(t));let{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d}=e,u=Ue(a.routes,n,e.future,e.isSpaMode);e.staticHandlerContext.loaderData={...e.staticHandlerContext.loaderData};for(let i of e.staticHandlerContext.matches){let l=i.route.id,h=n[l],p=e.manifest.routes[l];h&&p&&ee(l,h.clientLoader,p.hasLoader,e.isSpaMode)&&(h.HydrateFallback||!p.hasLoader)&&delete e.staticHandlerContext.loaderData[l]}let s=Ee(u,e.staticHandlerContext);return T.createElement(T.Fragment,null,T.createElement(te.Provider,{value:{manifest:a,routeModules:n,criticalCss:o,serverHandoffString:d,future:e.future,ssr:e.ssr,isSpaMode:e.isSpaMode,routeDiscovery:e.routeDiscovery,serializeError:e.serializeError,renderMeta:e.renderMeta}},T.createElement(ze,{location:s.state.location},T.createElement(be,{router:s,context:e.staticHandlerContext,hydrate:!1}))),e.serverHandoffStream?T.createElement(T.Suspense,null,T.createElement(Ne,{context:e,identifier:0,reader:e.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:r})):null)}function er(e,t){return function({initialEntries:a,initialIndex:n,hydrationData:o,future:d}){let u=T.useRef(),s=T.useRef();if(u.current==null){s.current={future:{unstable_subResourceIntegrity:d?.unstable_subResourceIntegrity===!0,v8_middleware:d?.v8_middleware===!0},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},ssr:!1,isSpaMode:!1,routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"}};let i=Te(Ve(e,l=>l),t!==void 0?t:d?.v8_middleware?new Q:{},s.current.manifest,s.current.routeModules);u.current=We(i,{initialEntries:a,initialIndex:n,hydrationData:o})}return T.createElement(te.Provider,{value:s.current},T.createElement(Je,{router:u.current}))}}function Te(e,t,r,a,n){return e.map(o=>{if(!o.id)throw new Error("Expected a route.id in react-router processRoutes() function");let d={id:o.id,path:o.path,index:o.index,Component:o.Component?Ze(o.Component):void 0,HydrateFallback:o.HydrateFallback?Ye(o.HydrateFallback):void 0,ErrorBoundary:o.ErrorBoundary?Ge(o.ErrorBoundary):void 0,action:o.action?s=>o.action({...s,context:t}):void 0,loader:o.loader?s=>o.loader({...s,context:t}):void 0,middleware:o.middleware?o.middleware.map(s=>(...i)=>s({...i[0],context:t},i[1])):void 0,handle:o.handle,shouldRevalidate:o.shouldRevalidate},u={id:o.id,path:o.path,index:o.index,parentId:n,hasAction:o.action!=null,hasLoader:o.loader!=null,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:o.ErrorBoundary!=null,module:"build/stub-path-to-module.js",clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0};return r.routes[d.id]=u,a[o.id]={default:d.Component||et,ErrorBoundary:d.ErrorBoundary||void 0,handle:o.handle,links:o.links,meta:o.meta,shouldRevalidate:o.shouldRevalidate},o.children&&(d.children=Te(o.children,t,r,a,d.id)),d})}var ae=new TextEncoder,mt=async(e,t)=>{let r=ae.encode(e),a=await De(t,["sign"]),n=await crypto.subtle.sign("HMAC",a,r),o=btoa(String.fromCharCode(...new Uint8Array(n))).replace(/=+$/,"");return e+"."+o},yt=async(e,t)=>{let r=e.lastIndexOf("."),a=e.slice(0,r),n=e.slice(r+1),o=ae.encode(a),d=await De(t,["verify"]);try{let u=wt(atob(n));return await crypto.subtle.verify("HMAC",d,u,o)?a:!1}catch{return!1}},De=async(e,t)=>crypto.subtle.importKey("raw",ae.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);function wt(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}var He=(e,t={})=>{let{secrets:r=[],...a}={path:"/",sameSite:"lax",...t};return bt(e,a.expires),{get name(){return e},get isSigned(){return r.length>0},get expires(){return typeof a.maxAge<"u"?new Date(Date.now()+a.maxAge*1e3):a.expires},async parse(n,o){if(!n)return null;let d=ue.parse(n,{...a,...o});if(e in d){let u=d[e];return typeof u=="string"&&u!==""?await Rt(u,r):""}else return null},async serialize(n,o){return ue.serialize(e,n===""?"":await gt(n,r),{...a,...o})}}},_e=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function";async function gt(e,t){let r=vt(e);return t.length>0&&(r=await mt(r,t[0])),r}async function Rt(e,t){if(t.length>0){for(let r of t){let a=await yt(e,r);if(a!==!1)return ce(a)}return null}return ce(e)}function vt(e){return btoa(Et(encodeURIComponent(JSON.stringify(e))))}function ce(e){try{return JSON.parse(decodeURIComponent(St(atob(e))))}catch{return{}}}function St(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;)n=t.charAt(a++),/[\w*+\-./@]/.exec(n)?r+=n:(o=n.charCodeAt(0),o<256?r+="%"+fe(o,2):r+="%u"+fe(o,4).toUpperCase());return r}function fe(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function Et(e){let t=e.toString(),r="",a=0,n,o;for(;a<t.length;){if(n=t.charAt(a++),n==="%"){if(t.charAt(a)==="u"){if(o=t.slice(a+1,a+5),/^[\da-f]{4}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=5;continue}}else if(o=t.slice(a,a+2),/^[\da-f]{2}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),a+=2;continue}}r+=n}return r}function bt(e,t){ke(!t,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}function Ct(e){return Object.keys(e).reduce((t,r)=>{let a=e[r];return a&&(t[r]=a.module),t},{})}var xt=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(xt||{});function kt(e){return e==="development"||e==="production"||e==="test"}function V(e,t){if(e instanceof Error&&t!=="development"){let r=new Error("Unexpected Server Error");return r.stack=void 0,r}return e}function N(e,t){return Object.entries(e).reduce((r,[a,n])=>Object.assign(r,{[a]:V(n,t)}),{})}function Pe(e,t){let r=V(e,t);return{message:r.message,stack:r.stack}}function he(e,t){if(!e)return null;let r=Object.entries(e),a={};for(let[n,o]of r)if(A(o))a[n]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let d=V(o,t);a[n]={message:d.message,stack:d.stack,__type:"Error",...d.name!=="Error"?{__subType:d.name}:{}}}else a[n]=o;return a}function G(e,t,r){let a=Ce(e,t,r);return a?a.map(n=>({params:n.params,pathname:n.pathname,route:n.route})):null}async function pe(e,t){let r=await e({request:Dt(Tt(t.request)),params:t.params,context:t.context,unstable_pattern:t.unstable_pattern});if(ot(r)&&r.init&&r.init.status&&re(r.init.status))throw new Response(null,r.init);return r}function Tt(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let a=[];for(let o of r)o&&a.push(o);for(let o of a)t.searchParams.append("index",o);let n={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return n.body&&(n.duplex="half"),new Request(t.href,n)}function Dt(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function z(e,t){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),new Error(t)}var Oe="__reactRouterDevServerHooks";function tr(e){globalThis[Oe]=e}function W(){return globalThis[Oe]}function Ae(e,t){if(typeof process<"u")try{if(pt?.IS_RR_BUILD_REQUEST==="yes")return e.headers.get(t)}catch{}return null}function Le(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Ie(e,t="",r=Le(e)){return(r[t]||[]).map(a=>({...a,children:Ie(e,a.id,r)}))}function Fe(e,t,r="",a=Le(e)){return(a[r]||[]).map(n=>{let o={hasErrorBoundary:n.id==="root"||n.module.ErrorBoundary!=null,id:n.id,path:n.path,middleware:n.module.middleware,loader:n.module.loader?async d=>{let u=Ae(d.request,"X-React-Router-Prerender-Data");if(u!=null){let i=u&&decodeURI(u);z(i,"Missing prerendered data for route");let l=new TextEncoder().encode(i),h=new ReadableStream({start(y){y.enqueue(l),y.close()}}),w=(await tt(h,global)).value;if(w&&$ in w){let y=w[$],R={status:y.status};throw y.reload?rt(y.redirect,R):y.replace?at(y.redirect,R):nt(y.redirect,R)}else{z(w&&n.id in w,"Unable to decode prerendered data");let y=w[n.id];return z("data"in y,"Unable to process prerendered data"),y.data}}return await pe(n.module.loader,d)}:void 0,action:n.module.action?d=>pe(n.module.action,d):void 0,handle:n.module.handle};return n.index?{index:!0,...o}:{caseSensitive:n.caseSensitive,children:Fe(e,t,n.id,a),...o}})}function me(e){return K(JSON.stringify(e))}function ne(e,t){return Ht(e,r=>{let a=t.routes[r.route.id];return z(a,`Route with id "${r.route.id}" not found in build`),a.module.headers})}function Ht(e,t,r){let a=e.errors?e.matches.findIndex(u=>e.errors[u.route.id]):-1,n=a>=0?e.matches.slice(0,a+1):e.matches,o;if(a>=0){let{actionHeaders:u,actionData:s,loaderHeaders:i,loaderData:l}=e;e.matches.slice(a).some(h=>{let p=h.route.id;return u[p]&&(!s||!s.hasOwnProperty(p))?o=u[p]:i[p]&&!l.hasOwnProperty(p)&&(o=i[p]),o!=null})}const d=new Headers(r);return n.reduce((u,s,i)=>{let{id:l}=s.route,h=e.loaderHeaders[l]||new Headers,p=e.actionHeaders[l]||new Headers,w=o!=null&&i===n.length-1,y=w&&o!==h&&o!==p,R=t(s);if(R==null){let S=new Headers(u);return y&&L(o,S),L(p,S),L(h,S),S}let f=new Headers(typeof R=="function"?R({loaderHeaders:h,parentHeaders:u,actionHeaders:p,errorHeaders:w?o:void 0}):R);return y&&L(o,f),L(p,f),L(h,f),L(u,f),f},new Headers(d))}function L(e,t){let r=e.get("Set-Cookie");if(r){let a=ht.splitCookiesString(r),n=new Set(t.getSetCookie());a.forEach(o=>{n.has(o)||t.append("Set-Cookie",o)})}}var je=new Set([...lt,304]);async function _t(e,t,r,a,n,o,d){try{let l=new Request(n,{method:a.method,body:a.body,headers:a.headers,signal:a.signal,...a.body?{duplex:"half"}:void 0}),h=await r.query(l,{requestContext:o,skipLoaderErrorBubbling:!0,skipRevalidation:!0,generateMiddlewareResponse:e.future.v8_middleware?async p=>{try{let w=await p(l);return u(w)}catch(w){return s(w)}}:void 0});return u(h)}catch(l){return s(l)}function u(l){return I(l)?l:i(l)}function s(l){return d(l),B(a,e,t,{result:{error:l},headers:new Headers,status:500})}function i(l){let h=ne(l,e);if(re(l.statusCode)&&h.has("Location"))return new Response(null,{status:l.statusCode,headers:h});l.errors&&(Object.values(l.errors).forEach(w=>{(!A(w)||w.error)&&d(w)}),l.errors=N(l.errors,t));let p;return l.errors?p={error:Object.values(l.errors)[0]}:p={data:Object.values(l.actionData||{})[0]},B(a,e,t,{result:p,headers:h,status:l.statusCode})}}async function Pt(e,t,r,a,n,o,d){let u=new URL(a.url).searchParams.get("_routes"),s=u?new Set(u.split(",")):null;try{let p=new Request(n,{headers:a.headers,signal:a.signal}),w=await r.query(p,{requestContext:o,filterMatchesToLoad:y=>!s||s.has(y.route.id),skipLoaderErrorBubbling:!0,generateMiddlewareResponse:e.future.v8_middleware?async y=>{try{let R=await y(p);return i(R)}catch(R){return l(R)}}:void 0});return i(w)}catch(p){return l(p)}function i(p){return I(p)?p:h(p)}function l(p){return d(p),B(a,e,t,{result:{error:p},headers:new Headers,status:500})}function h(p){let w=ne(p,e);if(re(p.statusCode)&&w.has("Location"))return new Response(null,{status:p.statusCode,headers:w});p.errors&&(Object.values(p.errors).forEach(f=>{(!A(f)||f.error)&&d(f)}),p.errors=N(p.errors,t));let y={},R=new Set(p.matches.filter(f=>s?s.has(f.route.id):f.route.loader!=null).map(f=>f.route.id));if(p.errors)for(let[f,S]of Object.entries(p.errors))y[f]={error:S};for(let[f,S]of Object.entries(p.loaderData))!(f in y)&&R.has(f)&&(y[f]={data:S});return B(a,e,t,{result:y,headers:w,status:p.statusCode})}}function B(e,t,r,{result:a,headers:n,status:o}){let d=new Headers(n);return d.set("X-Remix-Response","yes"),je.has(o)?new Response(null,{status:o,headers:d}):(d.set("Content-Type","text/x-script"),d.delete("Content-Length"),new Response(Y(a,e.signal,t.entry.module.streamTimeout,r),{status:o||200,headers:d}))}function ye(e,t,r,a){let n=Ot(e.status,e.headers,r.basename),o=new Headers(e.headers);return o.delete("Location"),o.set("Content-Type","text/x-script"),B(t,r,a,{result:t.method==="GET"?{[$]:n}:n,headers:o,status:xe})}function Ot(e,t,r){let a=t.get("Location");return r&&(a=U(a,r)||a),{redirect:a,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function Y(e,t,r,a){let n=new AbortController,o=setTimeout(()=>n.abort(new Error("Server Timeout")),typeof r=="number"?r:4950);return t.addEventListener("abort",()=>clearTimeout(o)),ut(e,{signal:n.signal,plugins:[d=>{if(d instanceof Error){let{name:u,message:s,stack:i}=a==="production"?V(d,a):d;return["SanitizedError",u,s,i]}if(d instanceof j){let{data:u,status:s,statusText:i}=d;return["ErrorResponse",u,s,i]}if(d&&typeof d=="object"&&$ in d)return["SingleFetchRedirect",d[$]]}],postPlugins:[d=>{if(d&&typeof d=="object")return["SingleFetchClassInstance",Object.fromEntries(Object.entries(d))]},()=>["SingleFetchFallback"]]})}function we(e,t){let r=Ie(e.routes),a=Fe(e.routes,e.future),n=kt(t)?t:"production",o=Qe(a,{basename:e.basename,unstable_instrumentations:e.entry.module.unstable_instrumentations}),d=e.entry.module.handleError||((s,{request:i})=>{n!=="test"&&!i.signal.aborted&&console.error(A(s)&&s.error?s.error:s)}),u=async(s,i)=>{let l={},h,p=g=>{t==="development"&&W()?.processRequestError?.(g),d(g,{context:h,params:l,request:s})};if(e.future.v8_middleware){if(i&&!(i instanceof Q)){let g=new Error("Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function.");return p(g),q(g,n)}h=i||new Q}else h=i||{};let w=new URL(s.url),y=e.basename||"/",R=w.pathname;U(R,y)==="/_root.data"?R=y:R.endsWith(".data")&&(R=R.replace(/\.data$/,"")),U(R,y)!=="/"&&R.endsWith("/")&&(R=R.slice(0,-1));let f=Ae(s,"X-React-Router-SPA-Mode")==="yes";if(!e.ssr){let g=decodeURI(R);if(y!=="/"){let v=U(g,y);if(v==null)return d(new j(404,"Not Found",`Refusing to prerender the \`${g}\` path because it does not start with the basename \`${y}\``),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});g=v}if(e.prerender.length===0)f=!0;else if(!e.prerender.includes(g)&&!e.prerender.includes(g+"/")){if(w.pathname.endsWith(".data"))return d(new j(404,"Not Found",`Refusing to SSR the path \`${g}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`),{context:h,params:l,request:s}),new Response("Not Found",{status:404,statusText:"Not Found"});f=!0}}let S=st(e.routeDiscovery.manifestPath,y);if(w.pathname===S)try{return await At(e,r,w)}catch(g){return p(g),new Response("Unknown Server Error",{status:500})}let m=G(r,R,e.basename);m&&m.length>0&&Object.assign(l,m[0].params);let c;if(w.pathname.endsWith(".data")){let g=new URL(s.url);g.pathname=R;let v=G(r,g.pathname,e.basename);c=await Lt(n,e,o,s,g,h,p),ie(c)&&(c=ye(c,s,e,n)),e.entry.module.handleDataRequest&&(c=await e.entry.module.handleDataRequest(c,{context:h,params:v?v[0].params:{},request:s}),ie(c)&&(c=ye(c,s,e,n)))}else if(!f&&m&&m[m.length-1].route.module.default==null&&m[m.length-1].route.module.ErrorBoundary==null)c=await Ft(n,e,o,m.slice(-1)[0].route.id,s,h,p);else{let{pathname:g}=w,v;e.unstable_getCriticalCss?v=await e.unstable_getCriticalCss({pathname:g}):t==="development"&&W()?.getCriticalCss&&(v=await W()?.getCriticalCss?.(g)),c=await It(n,e,o,s,h,p,f,v)}return s.method==="HEAD"?new Response(null,{headers:c.headers,status:c.status,statusText:c.statusText}):c};return e.entry.module.unstable_instrumentations&&(u=Ke(u,e.entry.module.unstable_instrumentations.map(s=>s.handler).filter(Boolean))),{routes:r,dataRoutes:a,serverMode:n,staticHandler:o,errorHandler:d,requestHandler:u}}var rr=(e,t)=>{let r,a,n,o,d,u;return async function(i,l){if(r=typeof e=="function"?await e():e,typeof e=="function"){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}else if(!a||!n||!o||!d||!u){let h=we(r,t);a=h.routes,n=h.serverMode,o=h.staticHandler,d=h.errorHandler,u=h.requestHandler}return u(i,l)}};async function At(e,t,r){if(e.assets.version!==r.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let a={};if(r.searchParams.has("paths")){let n=new Set;(r.searchParams.get("paths")||"").split(",").filter(Boolean).forEach(u=>{u.startsWith("/")||(u=`/${u}`);let s=u.split("/").slice(1);s.forEach((i,l)=>{let h=s.slice(0,l+1).join("/");n.add(`/${h}`)})});for(let u of n){let s=G(t,u,e.basename);if(s)for(let i of s){let l=i.route.id,h=e.assets.routes[l];h&&(a[l]=h)}}return Response.json(a,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function Lt(e,t,r,a,n,o,d){return a.method!=="GET"?await _t(t,e,r,a,n,o,d):await Pt(t,e,r,a,n,o,d)}async function It(e,t,r,a,n,o,d,u){try{let i=await r.query(a,{requestContext:n,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(a);return I(h)||(h=await s(h,d)),h}catch(h){return o(h),new Response(null,{status:500})}}:void 0});return I(i)||(i=await s(i,d)),i}catch(i){return o(i),new Response(null,{status:500})}async function s(i,l){let h=ne(i,t);if(je.has(i.statusCode))return new Response(null,{status:i.statusCode,headers:h});i.errors&&(Object.values(i.errors).forEach(f=>{(!A(f)||f.error)&&o(f)}),i.errors=N(i.errors,e));let p={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)},w={basename:t.basename,future:t.future,routeDiscovery:t.routeDiscovery,ssr:t.ssr,isSpaMode:l},y={manifest:t.assets,routeModules:Ct(t.routes),staticHandlerContext:i,criticalCss:u,serverHandoffString:me({...w,criticalCss:u}),serverHandoffStream:Y(p,a.signal,t.entry.module.streamTimeout,e),renderMeta:{},future:t.future,ssr:t.ssr,routeDiscovery:t.routeDiscovery,isSpaMode:l,serializeError:f=>Pe(f,e)},R=t.entry.module.default;try{return await R(a,i.statusCode,h,y,n)}catch(f){o(f);let S=f;if(I(f))try{let c=await $t(f);S=new j(f.status,f.statusText,c)}catch{}i=it(r.dataRoutes,i,S),i.errors&&(i.errors=N(i.errors,e));let m={loaderData:i.loaderData,actionData:i.actionData,errors:he(i.errors,e)};y={...y,staticHandlerContext:i,serverHandoffString:me(w),serverHandoffStream:Y(m,a.signal,t.entry.module.streamTimeout,e),renderMeta:{}};try{return await R(a,i.statusCode,h,y,n)}catch(c){return o(c),q(c,e)}}}}async function Ft(e,t,r,a,n,o,d){try{let i=await r.queryRoute(n,{routeId:a,requestContext:o,generateMiddlewareResponse:t.future.v8_middleware?async l=>{try{let h=await l(n);return u(h)}catch(h){return s(h)}}:void 0});return u(i)}catch(i){return s(i)}function u(i){return I(i)?i:typeof i=="string"?new Response(i):Response.json(i)}function s(i){if(I(i))return i;if(A(i))return d(i),jt(i,e);if(i instanceof Error&&i.message==="Expected a response from queryRoute"){let l=new Error("Expected a Response to be returned from resource route handler");return d(l),q(l,e)}return d(i),q(i,e)}}function jt(e,t){return Response.json(Pe(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText})}function q(e,t){let r="Unexpected Server Error";return t!=="production"&&(r+=`
2
-
3
- ${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function $t(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}function J(e){return`__flash_${e}__`}var $e=(e={},t="")=>{let r=new Map(Object.entries(e));return{get id(){return t},get data(){return Object.fromEntries(r)},has(a){return r.has(a)||r.has(J(a))},get(a){if(r.has(a))return r.get(a);let n=J(a);if(r.has(n)){let o=r.get(n);return r.delete(n),o}},set(a,n){r.set(a,n)},flash(a,n){r.set(J(a),n)},unset(a){r.delete(a)}}},ar=e=>e!=null&&typeof e.id=="string"&&typeof e.data<"u"&&typeof e.has=="function"&&typeof e.get=="function"&&typeof e.set=="function"&&typeof e.flash=="function"&&typeof e.unset=="function";function Bt({cookie:e,createData:t,readData:r,updateData:a,deleteData:n}){let o=_e(e)?e:He(e?.name||"__session",e);return Be(o),{async getSession(d,u){let s=d&&await o.parse(d,u),i=s&&await r(s);return $e(i||{},s||"")},async commitSession(d,u){let{id:s,data:i}=d,l=u?.maxAge!=null?new Date(Date.now()+u.maxAge*1e3):u?.expires!=null?u.expires:o.expires;return s?await a(s,i,l):s=await t(i,l),o.serialize(s,u)},async destroySession(d,u){return await n(d.id),o.serialize("",{...u,maxAge:void 0,expires:new Date(0)})}}}function Be(e){ke(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`)}function nr({cookie:e}={}){let t=_e(e)?e:He(e?.name||"__session",e);return Be(t),{async getSession(r,a){return $e(r&&await t.parse(r,a)||{})},async commitSession(r,a){let n=await t.serialize(r.data,a);if(n.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+n.length);return n},async destroySession(r,a){return t.serialize("",{...a,maxAge:void 0,expires:new Date(0)})}}}function sr({cookie:e}={}){let t=new Map;return Bt({cookie:e,async createData(r,a){let n=Math.random().toString(36).substring(2,10);return t.set(n,{data:r,expires:a}),n},async readData(r){if(t.has(r)){let{data:a,expires:n}=t.get(r);if(!n||n>new Date)return a;n&&t.delete(r)}return null},async updateData(r,a,n){t.set(r,{data:a,expires:n})},async deleteData(r){t.delete(r)}})}function or(e,...t){let r=t[0],a=Mt(e).replace(/\/:([\w-]+)(\?)?/g,(n,o,d)=>{const u=d===void 0,s=r?.[o];if(u&&s===void 0)throw new Error(`Path '${e}' requires param '${o}' but it was not provided`);return s===void 0?"":"/"+s});if(e.endsWith("*")){const n=r?.["*"];n!==void 0&&(a+="/"+n)}return a||"/"}function Mt(e){let t=e.length-1,r=e[t];if(r!=="*"&&r!=="/")return e;for(t--;t>=0&&e[t]==="/";t--);return e.slice(0,t+1)}var Z=new TextEncoder,ge="</body></html>";function Re(e){let t=new TextDecoder,r,a=new Promise(s=>r=s),n=!1,o=[],d=null;function u(s){for(let i of o){let l=t.decode(i,{stream:!0});l.endsWith(ge)&&(l=l.slice(0,-ge.length)),s.enqueue(Z.encode(l))}o.length=0,d=null}return new TransformStream({transform(s,i){o.push(s),!d&&(d=setTimeout(async()=>{u(i),n||(n=!0,Ut(e,i).catch(l=>i.error(l)).then(r))},0))},async flush(s){await a,d&&(clearTimeout(d),u(s)),s.enqueue(Z.encode("</body></html>"))}})}async function Ut(e,t){let r=new TextDecoder("utf-8",{fatal:!0});const a=e.getReader();try{let o;for(;(o=await a.read())&&!o.done;){const d=o.value;try{X(JSON.stringify(r.decode(d,{stream:!0})),t)}catch{let s=JSON.stringify(btoa(String.fromCodePoint(...d)));X(`Uint8Array.from(atob(${s}), m => m.codePointAt(0))`,t)}}}finally{a.releaseLock()}let n=r.decode();n.length&&X(JSON.stringify(n),t)}function X(e,t){t.enqueue(Z.encode(`<script>${zt(`(self.__FLIGHT_DATA||=[]).push(${e})`)}<\/script>`))}function zt(e){return e.replace(/<!--/g,"<\\!--").replace(/<\/(script)/gi,"</\\$1")}var Nt=class extends D.Component{constructor(e){super(e),this.state={error:null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:null,location:e.location}:{error:t.error,location:t.location}}render(){return this.state.error?D.createElement(Me,{error:this.state.error,renderAppShell:!0}):this.props.children}};function ve({renderAppShell:e,title:t,children:r}){return e?D.createElement("html",{lang:"en"},D.createElement("head",null,D.createElement("meta",{charSet:"utf-8"}),D.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),D.createElement("title",null,t)),D.createElement("body",null,D.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r))):r}function Me({error:e,renderAppShell:t}){console.error(e);let r=D.createElement("script",{dangerouslySetInnerHTML:{__html:`
4
- console.log(
5
- "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
6
- );
7
- `}});if(A(e))return D.createElement(ve,{renderAppShell:t,title:"Unhandled Thrown Response!"},D.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return D.createElement(ve,{renderAppShell:t,title:"Application Error!"},D.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),D.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function ir({hasRootLayout:e}){let t=qe();if(e===void 0)throw new Error("Missing 'hasRootLayout' prop");return D.createElement(Me,{renderAppShell:!e,error:t})}function qt(e){const t={};for(const r of e.matches)Vt(t,r);return t}function Vt(e,t){t=Array.isArray(t)?t:[t];for(const r of t)e[r.id]={links:r.links,meta:r.meta,default:Wt}}var Wt=()=>null,Jt="use",Se=dt[Jt];function Xt(e){if(Se)return Se(e);throw new Error("React Router v7 requires React 19+ for RSC features.")}async function lr({request:e,serverResponse:t,createFromReadableStream:r,renderHTML:a,hydrate:n=!0}){const o=new URL(e.url);if(Qt(o)||Kt(o)||e.headers.has("rsc-action-id")||t.headers.get("React-Router-Resource")==="true")return t;if(!t.body)throw new Error("Missing body in server response");const s=t.clone();let i=null;n&&(i=t.clone());const l=t.body;let h,p=[];const w=()=>h?new ReadableStream({start(m){h.forEach(c=>m.enqueue(c)),p.push(m)}}):(h=[],l.pipeThrough(new TransformStream({transform(m,c){h.push(m),c.enqueue(m),p.forEach(g=>g.enqueue(m))},flush(){p.forEach(m=>m.close()),p=[]}})));let y=null;const R=()=>{const m=Promise.resolve(r(w()));return Object.defineProperties(m,{_deepestRenderedBoundaryId:{get(){return y},set(c){y=c}},formState:{get(){return m.then(c=>c.type==="render"?c.formState:void 0)}}})};let f,S;try{if(!s.body)throw new Error("Failed to clone server response");const m=await r(s.body);if(t.status===xe&&m.type==="redirect"){const x=new Headers(t.headers);return x.delete("Content-Encoding"),x.delete("Content-Length"),x.delete("Content-Type"),x.delete("X-Remix-Response"),x.set("Location",m.location),new Response(i?.body||"",{headers:x,status:m.status,statusText:t.statusText})}let c=new Headers,g=t.status,v=t.statusText,C=await a(R,{onError(x){if(typeof x=="object"&&x&&"digest"in x&&typeof x.digest=="string"){if(f=se(x.digest),f)return x.digest;let b=oe(x.digest);if(b)return S=b,g=b.status,v=b.statusText,x.digest}},onHeaders(x){for(const[b,H]of x)c.append(b,H)}});const E=new Headers(c);for(const[x,b]of t.headers)E.append(x,b);if(E.set("Content-Type","text/html; charset=utf-8"),f)return E.set("Location",f.location),new Response(C,{status:f.status,headers:E});const k=new TransformStream({flush(x){f&&x.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${K(f.location)}"/>`))}});if(!n)return new Response(C.pipeThrough(k),{status:g,statusText:v,headers:E});if(!i?.body)throw new Error("Failed to clone server response");const O=C.pipeThrough(Re(i.body)).pipeThrough(k);return new Response(O,{status:g,statusText:v,headers:E})}catch(m){if(m instanceof Response)return m;if(f)return new Response(`Redirect: ${f.location}`,{status:f.status,headers:{Location:f.location}});try{m=S??m;let[c,g]=A(m)?[m.status,m.statusText]:[500,""],v,C=new Headers;const E=await a(()=>{const H=Promise.resolve(r(w())).then(_=>Object.assign(_,{status:c,errors:y?{[y]:m}:{}}));return Object.defineProperties(H,{_deepestRenderedBoundaryId:{get(){return y},set(_){y=_}},formState:{get(){return H.then(_=>_.type==="render"?_.formState:void 0)}}})},{onError(b){if(typeof b=="object"&&b&&"digest"in b&&typeof b.digest=="string"){if(v=se(b.digest),v)return b.digest;let H=oe(b.digest);if(H)return c=H.status,g=H.statusText,b.digest}},onHeaders(b){for(const[H,_]of b)C.append(H,_)}}),k=new Headers(C);for(const[b,H]of t.headers)k.append(b,H);if(k.set("Content-Type","text/html; charset=utf-8"),v)return k.set("Location",v.location),new Response(E,{status:v.status,headers:k});const O=new TransformStream({flush(b){v&&b.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${K(v.location)}"/>`))}});if(!n)return new Response(E.pipeThrough(O),{status:c,statusText:g,headers:k});if(!i?.body)throw new Error("Failed to clone server response");const x=E.pipeThrough(Re(i.body)).pipeThrough(O);return new Response(x,{status:c,statusText:g,headers:k})}catch{}throw m}}function ur({getPayload:e}){const t=e(),r=Xt(t);if(r.type==="redirect")throw new Response(null,{status:r.status,headers:{Location:r.location}});if(r.type!=="render")return null;let a={...r.loaderData};for(const u of r.matches)ee(u.id,u.clientLoader,u.hasLoader,!1)&&(u.hydrateFallbackElement||!u.hasLoader)&&delete a[u.id];const n={get _deepestRenderedBoundaryId(){return t._deepestRenderedBoundaryId??null},set _deepestRenderedBoundaryId(u){t._deepestRenderedBoundaryId=u},actionData:r.actionData,actionHeaders:{},basename:r.basename,errors:r.errors,loaderData:a,loaderHeaders:{},location:r.location,statusCode:200,matches:r.matches.map(u=>({params:u.params,pathname:u.pathname,pathnameBase:u.pathnameBase,route:{id:u.id,action:u.hasAction||!!u.clientAction,handle:u.handle,hasErrorBoundary:u.hasErrorBoundary,loader:u.hasLoader||!!u.clientLoader,index:u.index,path:u.path,shouldRevalidate:u.shouldRevalidate}}))},o=Ee(r.matches.reduceRight((u,s)=>{const i={id:s.id,action:s.hasAction||!!s.clientAction,element:s.element,errorElement:s.errorElement,handle:s.handle,hasErrorBoundary:!!s.errorElement,hydrateFallbackElement:s.hydrateFallbackElement,index:s.index,loader:s.hasLoader||!!s.clientLoader,path:s.path,shouldRevalidate:s.shouldRevalidate};return u.length>0&&(i.children=u),[i]},[]),n),d={future:{v8_middleware:!1,unstable_subResourceIntegrity:!1},isSpaMode:!1,ssr:!0,criticalCss:"",manifest:{routes:{},version:"1",url:"",entry:{module:"",imports:[]}},routeDiscovery:{mode:"lazy",manifestPath:"/__manifest"},routeModules:qt(r)};return T.createElement(Xe.Provider,{value:!0},T.createElement(Nt,{location:r.location},T.createElement(te.Provider,{value:d},T.createElement(be,{context:n,router:o,hydrate:!1,nonce:r.nonce}))))}function Qt(e){return e.pathname.endsWith(".rsc")}function Kt(e){return e.pathname.endsWith(".manifest")}function dr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,n]of t)if(n&&n.__type==="RouteErrorResponse")r[a]=new j(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let o=window[n.__subType];if(typeof o=="function")try{let d=new o(n.message);d.stack=n.stack,r[a]=d}catch{}}if(r[a]==null){let o=new Error(n.message);o.stack=n.stack,r[a]=o}}else r[a]=n;return r}function cr({state:e,routes:t,getRouteInfo:r,location:a,basename:n,isSpaMode:o}){let d={...e,loaderData:{...e.loaderData}},u=Ce(t,a,n);if(u)for(let s of u){let i=s.route.id,l=r(i);ee(i,l.clientLoader,l.hasLoader,o)&&(l.hasHydrateFallback||!l.hasLoader)?delete d.loaderData[i]:l.hasLoader||(d.loaderData[i]=null)}return d}export{ir as R,Zt as S,xt as a,nr as b,He as c,dr as d,sr as e,rr as f,cr as g,er as h,$e as i,Bt as j,or as k,_e as l,ar as m,ur as n,Nt as o,Vt as p,lr as r,tr as s};