1const $s = (e) => import(e), Hs = () => Promise.resolve().then(() => _s), { Fragment: Pn, jsx: a, jsxs: s } = globalThis.__GLOBALS__.ReactJSXRuntime; 2"use" in globalThis.__GLOBALS__.React || (globalThis.__GLOBALS__.React.use = () => { 3 throw new Error("`use` is not available in this version of React. Make currently only supports React 18, but `use` is only available in React 19+."); 4}); 5const Rn = globalThis.__GLOBALS__.React, { Children: Sn, cloneElement: Dn, Component: ja, createContext: xe, createElement: T, createFactory: En, createRef: Mn, forwardRef: ct, Fragment: st, isValidElement: Cn, lazy: Ln, memo: Pa, Profiler: Fn, PureComponent: Tn, startTransition: kt, StrictMode: On, Suspense: _n, use: $n, useCallback: dt, useContext: K, useDebugValue: Hn, useDeferredValue: Kn, useEffect: Ie, useId: Vn, useImperativeHandle: In, useInsertionEffect: Un, useLayoutEffect: gr, useMemo: be, useReducer: An, useRef: Dt, useState: se, useSyncExternalStore: Wn, useTransition: Bn, version: Gn } = globalThis.__GLOBALS__.React, Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 6 __proto__: null, 7 Children: Sn, 8 Component: ja, 9 Fragment: st, 10 Profiler: Fn, 11 PureComponent: Tn, 12 StrictMode: On, 13 Suspense: _n, 14 cloneElement: Dn, 15 createContext: xe, 16 createElement: T, 17 createFactory: En, 18 createRef: Mn, 19 default: Rn, 20 forwardRef: ct, 21 isValidElement: Cn, 22 lazy: Ln, 23 memo: Pa, 24 startTransition: kt, 25 use: $n, 26 useCallback: dt, 27 useContext: K, 28 useDebugValue: Hn, 29 useDeferredValue: Kn, 30 useEffect: Ie, 31 useId: Vn, 32 useImperativeHandle: In, 33 useInsertionEffect: Un, 34 useLayoutEffect: gr, 35 useMemo: be, 36 useReducer: An, 37 useRef: Dt, 38 useState: se, 39 useSyncExternalStore: Wn, 40 useTransition: Bn, 41 version: Gn 42}, Symbol.toStringTag, { value: "Module" })); 43/** 44 * react-router v7.13.0 45 * 46 * Copyright (c) Remix Software Inc. 47 * 48 * This source code is licensed under the MIT license found in the 49 * LICENSE.md file in the root directory of this source tree. 50 * 51 * @license MIT 52 */ 53var Ra = (e) => { 54 throw TypeError(e); 55}, Jn = (e, t, r) => t.has(e) || Ra("Cannot " + r), ir = (e, t, r) => (Jn(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Yn = (e, t, r) => t.has(e) ? Ra("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Br = "popstate"; 56function qn(e = {}) { 57 function t(i, n) { 58 let { pathname: l, search: o, hash: c } = i.location; 59 return Nt( 60 "", 61 { pathname: l, search: o, hash: c }, 62 // state defaults to `null` because `window.history.state` does 63 n.state && n.state.usr || null, 64 n.state && n.state.key || "default" 65 ); 66 } 67 function r(i, n) { 68 return typeof n == "string" ? n : Le(n); 69 } 70 return Qn( 71 t, 72 r, 73 null, 74 e 75 ); 76} 77function H(e, t) { 78 if (e === !1 || e === null || typeof e > "u") 79 throw new Error(t); 80} 81function ae(e, t) { 82 if (!e) { 83 typeof console < "u" && console.warn(t); 84 try { 85 throw new Error(t); 86 } catch { 87 } 88 } 89} 90function Xn() { 91 return Math.random().toString(36).substring(2, 10); 92} 93function Gr(e, t) { 94 return { 95 usr: e.state, 96 key: e.key, 97 idx: t 98 }; 99} 100function Nt(e, t, r = null, i) { 101 return { 102 pathname: typeof e == "string" ? e : e.pathname, 103 search: "", 104 hash: "", 105 ...typeof t == "string" ? Be(t) : t, 106 state: r, 107 // TODO: This could be cleaned up. push/replace should probably just take 108 // full Locations now and avoid the need to run through this flow at all 109 // But that's a pretty big refactor to the current test suite so going to 110 // keep as is for the time being and just let any incoming keys take precedence 111 key: t && t.key || i || Xn() 112 }; 113} 114function Le({ 115 pathname: e = "/", 116 search: t = "", 117 hash: r = "" 118}) { 119 return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e; 120} 121function Be(e) { 122 let t = {}; 123 if (e) { 124 let r = e.indexOf("#"); 125 r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r)); 126 let i = e.indexOf("?"); 127 i >= 0 && (t.search = e.substring(i), e = e.substring(0, i)), e && (t.pathname = e); 128 } 129 return t; 130} 131function Qn(e, t, r, i = {}) { 132 let { window: n = document.defaultView, v5Compat: l = !1 } = i, o = n.history, c = "POP", m = null, h = u(); 133 h == null && (h = 0, o.replaceState({ ...o.state, idx: h }, "")); 134 function u() { 135 return (o.state || { idx: null }).idx; 136 } 137 function p() { 138 c = "POP"; 139 let j = u(), S = j == null ? null : j - h; 140 h = j, m && m({ action: c, location: N.location, delta: S }); 141 } 142 function b(j, S) { 143 c = "PUSH"; 144 let z = Nt(N.location, j, S); 145 h = u() + 1; 146 let L = Gr(z, h), X = N.createHref(z); 147 try { 148 o.pushState(L, "", X); 149 } catch (W) { 150 if (W instanceof DOMException && W.name === "DataCloneError") 151 throw W; 152 n.location.assign(X); 153 } 154 l && m && m({ action: c, location: N.location, delta: 1 }); 155 } 156 function g(j, S) { 157 c = "REPLACE"; 158 let z = Nt(N.location, j, S); 159 h = u(); 160 let L = Gr(z, h), X = N.createHref(z); 161 o.replaceState(L, "", X), l && m && m({ action: c, location: N.location, delta: 0 }); 162 } 163 function k(j) { 164 return Sa(j); 165 } 166 let N = { 167 get action() { 168 return c; 169 }, 170 get location() { 171 return e(n, o); 172 }, 173 listen(j) { 174 if (m) 175 throw new Error("A history only accepts one active listener"); 176 return n.addEventListener(Br, p), m = j, () => { 177 n.removeEventListener(Br, p), m = null; 178 }; 179 }, 180 createHref(j) { 181 return t(n, j); 182 }, 183 createURL: k, 184 encodeLocation(j) { 185 let S = k(j); 186 return { 187 pathname: S.pathname, 188 search: S.search, 189 hash: S.hash 190 }; 191 }, 192 push: b, 193 replace: g, 194 go(j) { 195 return o.go(j); 196 } 197 }; 198 return N; 199} 200function Sa(e, t = !1) { 201 let r = "http://localhost"; 202 typeof window < "u" && (r = window.location.origin !== "null" ? window.location.origin : window.location.href), H(r, "No window.location.(origin|href) available to create URL"); 203 let i = typeof e == "string" ? e : Le(e); 204 return i = i.replace(/ $/, "%20"), !t && i.startsWith("//") && (i = r + i), new URL(i, r); 205} 206var bt, Zr = class { 207 /** 208 * Create a new `RouterContextProvider` instance 209 * @param init An optional initial context map to populate the provider with 210 */ 211 constructor(e) {
212 if (Yn(this, bt, /* @__PURE__ */ new Map()), e) 213 for (let [t, r] of e) 214 this.set(t, r); 215 } 216 /** 217 * Access a value from the context. If no value has been set for the context, 218 * it will return the context's `defaultValue` if provided, or throw an error 219 * if no `defaultValue` was set. 220 * @param context The context to get the value for 221 * @returns The value for the context, or the context's `defaultValue` if no 222 * value was set 223 */ 224 get(e) { 225 if (ir(this, bt).has(e)) 226 return ir(this, bt).get(e); 227 if (e.defaultValue !== void 0) 228 return e.defaultValue; 229 throw new Error("No value found for context"); 230 } 231 /** 232 * Set a value for the context. If the context already has a value set, this 233 * will overwrite it. 234 * 235 * @param context The context to set the value for 236 * @param value The value to set for the context 237 * @returns {void} 238 */ 239 set(e, t) { 240 ir(this, bt).set(e, t); 241 } 242}; 243bt = /* @__PURE__ */ new WeakMap(); 244var ei = /* @__PURE__ */ new Set([ 245 "lazy", 246 "caseSensitive", 247 "path", 248 "id", 249 "index", 250 "children" 251]); 252function ti(e) { 253 return ei.has( 254 e 255 ); 256} 257var ri = /* @__PURE__ */ new Set([ 258 "lazy", 259 "caseSensitive", 260 "path", 261 "id", 262 "index", 263 "middleware", 264 "children" 265]); 266function ai(e) { 267 return ri.has( 268 e 269 ); 270} 271function ni(e) { 272 return e.index === !0; 273} 274function zt(e, t, r = [], i = {}, n = !1) { 275 return e.map((l, o) => {
276 let c = [...r, String(o)], m = typeof l.id == "string" ? l.id : c.join("-"); 277 if (H( 278 l.index !== !0 || !l.children, 279 "Cannot specify children on an index route" 280 ), H( 281 n || !i[m], 282 `Found a route id collision on id "${m}". Route id's must be globally unique within Data Router usages` 283 ), ni(l)) { 284 let h = { 285 ...l, 286 id: m 287 }; 288 return i[m] = Jr( 289 h, 290 t(h) 291 ), h; 292 } else { 293 let h = { 294 ...l, 295 id: m, 296 children: void 0 297 }; 298 return i[m] = Jr( 299 h, 300 t(h) 301 ), l.children && (h.children = zt( 302 l.children, 303 t, 304 c, 305 i, 306 n 307 )), h; 308 } 309 }); 310} 311function Jr(e, t) { 312 return Object.assign(e, { 313 ...t, 314 ...typeof t.lazy == "object" && t.lazy != null ? { 315 lazy: { 316 ...e.lazy, 317 ...t.lazy 318 } 319 } : {} 320 }); 321} 322function Ke(e, t, r = "/") { 323 return xt(e, t, r, !1); 324} 325function xt(e, t, r, i) { 326 let n = typeof t == "string" ? Be(t) : t, l = Pe(n.pathname || "/", r); 327 if (l == null) 328 return null; 329 let o = Da(e); 330 li(o); 331 let c = null; 332 for (let m = 0; c == null && m < o.length; ++m) { 333 let h = yi(l); 334 c = pi( 335 o[m], 336 h, 337 i 338 ); 339 } 340 return c; 341} 342function ii(e, t) { 343 let { route: r, pathname: i, params: n } = e; 344 return { 345 id: r.id, 346 pathname: i, 347 params: n, 348 data: t[r.id], 349 loaderData: t[r.id], 350 handle: r.handle 351 }; 352} 353function Da(e, t = [], r = [], i = "", n = !1) { 354 let l = (o, c, m = n, h) => { 355 let u = { 356 relativePath: h === void 0 ? o.path || "" : h, 357 caseSensitive: o.caseSensitive === !0, 358 childrenIndex: c, 359 route: o 360 }; 361 if (u.relativePath.startsWith("/")) { 362 if (!u.relativePath.startsWith(i) && m) 363 return; 364 H( 365 u.relativePath.startsWith(i), 366 `Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.` 367 ), u.relativePath = u.relativePath.slice(i.length); 368 } 369 let p = Ce([i, u.relativePath]), b = r.concat(u); 370 o.children && o.children.length > 0 && (H( 371 // Our types know better, but runtime JS may not! 372 // @ts-expect-error 373 o.index !== !0, 374 `Index routes must not have child routes. Please remove all child routes from route path "${p}".` 375 ), Da( 376 o.children, 377 t, 378 b, 379 p, 380 m 381 )), !(o.path == null && !o.index) && t.push({ 382 path: p, 383 score: ui(p, o.index), 384 routesMeta: b 385 }); 386 }; 387 return e.forEach((o, c) => { 388 if (o.path === "" || !o.path?.includes("?")) 389 l(o, c); 390 else 391 for (let m of Ea(o.path)) 392 l(o, c, !0, m); 393 }), t; 394} 395function Ea(e) { 396 let t = e.split("/"); 397 if (t.length === 0) return []; 398 let [r, ...i] = t, n = r.endsWith("?"), l = r.replace(/\?$/, ""); 399 if (i.length === 0) 400 return n ? [l, ""] : [l]; 401 let o = Ea(i.join("/")), c = []; 402 return c.push( 403 ...o.map( 404 (m) => m === "" ? l : [l, m].join("/") 405 ) 406 ), n && c.push(...o), c.map( 407 (m) => e.startsWith("/") && m === "" ? "/" : m 408 ); 409} 410function li(e) { 411 e.sort( 412 (t, r) => t.score !== r.score ? r.score - t.score : fi( 413 t.routesMeta.map((i) => i.childrenIndex), 414 r.routesMeta.map((i) => i.childrenIndex) 415 ) 416 ); 417} 418var oi = /^:[\w-]+$/, si = 3, ci = 2, di = 1, mi = 10, hi = -2, Yr = (e) => e === "*"; 419function ui(e, t) { 420 let r = e.split("/"), i = r.length; 421 return r.some(Yr) && (i += hi), t && (i += ci), r.filter((n) => !Yr(n)).reduce( 422 (n, l) => n + (oi.test(l) ? si : l === "" ? di : mi), 423 i 424 ); 425} 426function fi(e, t) { 427 return e.length === t.length && e.slice(0, -1).every((i, n) => i === t[n]) ? ( 428 // If two routes are siblings, we should try to match the earlier sibling 429 // first. This allows people to have fine-grained control over the matching 430 // behavior by simply putting routes with identical paths in the order they 431 // want them tried. 432 e[e.length - 1] - t[t.length - 1] 433 ) : ( 434 // Otherwise, it doesn't really make sense to rank non-siblings by index, 435 // so they sort equally. 436 0 437 ); 438} 439function pi(e, t, r = !1) { 440 let { routesMeta: i } = e, n = {}, l = "/", o = []; 441 for (let c = 0; c < i.length; ++c) { 442 let m = i[c], h = c === i.length - 1, u = l === "/" ? t : t.slice(l.length) || "/", p = Zt( 443 { path: m.relativePath, caseSensitive: m.caseSensitive, end: h }, 444 u 445 ), b = m.route; 446 if (!p && h && r && !i[i.length - 1].route.index && (p = Zt( 447 { 448 path: m.relativePath, 449 caseSensitive: m.caseSensitive, 450 end: !1 451 }, 452 u 453 )), !p) 454 return null; 455 Object.assign(n, p.params), o.push({ 456 // TODO: Can this as be avoided? 457 params: n, 458 pathname: Ce([l, p.pathname]), 459 pathnameBase: xi( 460 Ce([l, p.pathnameBase]) 461 ), 462 route: b 463 }), p.pathnameBase !== "/" && (l = Ce([l, p.pathnameBase])); 464 } 465 return o; 466} 467function Zt(e, t) { 468 typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 }); 469 let [r, i] = vi( 470 e.path, 471 e.caseSensitive, 472 e.end 473 ), n = t.match(r); 474 if (!n) return null; 475 let l = n[0], o = l.replace(/(.)\/+$/, "$1"), c = n.slice(1); 476 return { 477 params: i.reduce( 478 (h, { paramName: u, isOptional: p }, b) => { 479 if (u === "*") { 480 let k = c[b] || ""; 481 o = l.slice(0, l.length - k.length).replace(/(.)\/+$/, "$1"); 482 } 483 const g = c[b]; 484 return p && !g ? h[u] = void 0 : h[u] = (g || "").replace(/%2F/g, "/"), h; 485 }, 486 {} 487 ), 488 pathname: l, 489 pathnameBase: o, 490 pattern: e 491 }; 492} 493function vi(e, t = !1, r = !0) { 494 ae( 495 e === "*" || !e.endsWith("*") || e.endsWith("/*"), 496 `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(/\*$/, "/*")}".` 497 ); 498 let i = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace( 499 /\/:([\w-]+)(\?)?/g, 500 (o, c, m) => (i.push({ paramName: c, isOptional: m != null }), m ? "/?([^\\/]+)?" : "/([^\\/]+)") 501 ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2"); 502 return e.endsWith("*") ? (i.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), i]; 503} 504function yi(e) { 505 try { 506 return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/"); 507 } catch (t) { 508 return ae( 509 !1, 510 `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).` 511 ), e; 512 } 513} 514function Pe(e, t) { 515 if (t === "/") return e; 516 if (!e.toLowerCase().startsWith(t.toLowerCase())) 517 return null; 518 let r = t.endsWith("/") ? t.length - 1 : t.length, i = e.charAt(r); 519 return i && i !== "/" ? null : e.slice(r) || "/"; 520} 521function gi({ 522 basename: e, 523 pathname: t 524}) { 525 return t === "/" ? e : Ce([e, t]); 526} 527var Ma = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, br = (e) => Ma.test(e); 528function bi(e, t = "/") { 529 let { 530 pathname: r, 531 search: i = "", 532 hash: n = "" 533 } = typeof e == "string" ? Be(e) : e, l; 534 return r ? (r = r.replace(/\/\/+/g, "/"), r.startsWith("/") ? l = qr(r.substring(1), "/") : l = qr(r, t)) : l = t, { 535 pathname: l, 536 search: wi(i), 537 hash: ki(n) 538 }; 539} 540function qr(e, t) { 541 let r = t.replace(/\/+$/, "").split("/"); 542 return e.split("/").forEach((n) => { 543 n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n); 544 }), r.length > 1 ? r.join("/") : "/"; 545} 546function lr(e, t, r, i) { 547 return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify( 548 i 549 )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`; 550} 551function Ca(e) { 552 return e.filter( 553 (t, r) => r === 0 || t.route.path && t.route.path.length > 0 554 ); 555} 556function xr(e) { 557 let t = Ca(e); 558 return t.map( 559 (r, i) => i === t.length - 1 ? r.pathname : r.pathnameBase 560 ); 561} 562function wr(e, t, r, i = !1) { 563 let n; 564 typeof e == "string" ? n = Be(e) : (n = { ...e }, H( 565 !n.pathname || !n.pathname.includes("?"), 566 lr("?", "pathname", "search", n) 567 ), H( 568 !n.pathname || !n.pathname.includes("#"), 569 lr("#", "pathname", "hash", n) 570 ), H( 571 !n.search || !n.search.includes("#"), 572 lr("#", "search", "hash", n) 573 )); 574 let l = e === "" || n.pathname === "", o = l ? "/" : n.pathname, c; 575 if (o == null) 576 c = r; 577 else { 578 let p = t.length - 1; 579 if (!i && o.startsWith("..")) { 580 let b = o.split("/"); 581 for (; b[0] === ".."; ) 582 b.shift(), p -= 1; 583 n.pathname = b.join("/"); 584 } 585 c = p >= 0 ? t[p] : "/"; 586 } 587 let m = bi(n, c), h = o && o !== "/" && o.endsWith("/"), u = (l || o === ".") && r.endsWith("/"); 588 return !m.pathname.endsWith("/") && (h || u) && (m.pathname += "/"), m; 589} 590var Ce = (e) => e.join("/").replace(/\/\/+/g, "/"), xi = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), wi = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ki = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, Et = class { 591 constructor(e, t, r, i = !1) { 592 this.status = e, this.statusText = t || "", this.internal = i, r instanceof Error ? (this.data = r.toString(), this.error = r) : this.data = r; 593 } 594}; 595function jt(e) { 596 return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e; 597} 598function Mt(e) { 599 return e.map((t) =>
599 t.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/"; 600} 601var La = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u"; 602function Fa(e, t) { 603 let r = e; 604 if (typeof r != "string" || !Ma.test(r)) 605 return { 606 absoluteURL: void 0, 607 isExternal: !1, 608 to: r 609 }; 610 let i = r, n = !1; 611 if (La) 612 try { 613 let l = new URL(window.location.href), o = r.startsWith("//") ? new URL(l.protocol + r) : new URL(r), c = Pe(o.pathname, t); 614 o.origin === l.origin && c != null ? r = c + o.search + o.hash : n = !0; 615 } catch { 616 ae( 617 !1, 618 `<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.` 619 ); 620 } 621 return { 622 absoluteURL: i, 623 isExternal: n, 624 to: r 625 }; 626} 627var Ue = Symbol("Uninstrumented"); 628function Ni(e, t) { 629 let r = { 630 lazy: [], 631 "lazy.loader": [], 632 "lazy.action": [], 633 "lazy.middleware": [], 634 middleware: [], 635 loader: [], 636 action: [] 637 }; 638 e.forEach( 639 (n) => n({ 640 id: t.id, 641 index: t.index, 642 path: t.path, 643 instrument(l) { 644 let o = Object.keys(r); 645 for (let c of o) 646 l[c] && r[c].push(l[c]); 647 } 648 }) 649 ); 650 let i = {}; 651 if (typeof t.lazy == "function" && r.lazy.length > 0) { 652 let n = it(r.lazy, t.lazy, () => { 653 }); 654 n && (i.lazy = n); 655 } 656 if (typeof t.lazy == "object") { 657 let n = t.lazy; 658 ["middleware", "loader", "action"].forEach((l) => { 659 let o = n[l], c = r[`lazy.${l}`]; 660 if (typeof o == "function" && c.length > 0) { 661 let m = it(c, o, () => { 662 }); 663 m && (i.lazy = Object.assign(i.lazy || {}, { 664 [l]: m 665 })); 666 } 667 }); 668 } 669 return ["loader", "action"].forEach((n) => { 670 let l = t[n]; 671 if (typeof l == "function" && r[n].length > 0) { 672 let o = l[Ue] ?? l, c = it( 673 r[n], 674 o, 675 (...m) => Xr(m[0]) 676 ); 677 c && (n === "loader" && o.hydrate === !0 && (c.hydrate = !0), c[Ue] = o, i[n] = c); 678 } 679 }), t.middleware && t.middleware.length > 0 && r.middleware.length > 0 && (i.middleware = t.middleware.map((n) => { 680 let l = n[Ue] ?? n, o = it( 681 r.middleware, 682 l, 683 (...c) => Xr(c[0]) 684 ); 685 return o ? (o[Ue] = l, o) : n; 686 })), i; 687} 688function zi(e, t) { 689 let r = { 690 navigate: [], 691 fetch: [] 692 }; 693 if (t.forEach( 694 (i) => i({ 695 instrument(n) { 696 let l = Object.keys(n); 697 for (let o of l) 698 n[o] && r[o].push(n[o]); 699 } 700 }) 701 ), r.navigate.length > 0) { 702 let i = e.navigate[Ue] ?? e.navigate, n = it( 703 r.navigate, 704 i, 705 (...l) => { 706 let [o, c] = l; 707 return { 708 to: typeof o == "number" || typeof o == "string" ? o : o ? Le(o) : ".", 709 ...Qr(e, c ?? {}) 710 }; 711 } 712 ); 713 n && (n[Ue] = i, e.navigate = n); 714 } 715 if (r.fetch.length > 0) { 716 let i = e.fetch[Ue] ?? e.fetch, n = it(r.fetch, i, (...l) => { 717 let [o, , c, m] = l; 718 return { 719 href: c ?? ".", 720 fetcherKey: o, 721 ...Qr(e, m ?? {}) 722 }; 723 }); 724 n && (n[Ue] = i, e.fetch = n); 725 } 726 return e; 727} 728function it(e, t, r) { 729 return e.length === 0 ? null : async (...i) => { 730 let n = await Ta( 731 e, 732 r(...i), 733 () => t(...i), 734 e.length - 1 735 ); 736 if (n.type === "error") 737 throw n.value; 738 return n.value; 739 }; 740} 741async function Ta(e, t, r, i) { 742 let n = e[i], l; 743 if (n) { 744 let o, c = async () => (o ? console.error("You cannot call instrumented handlers more than once") : o = Ta(e, t, r, i - 1), l = await o, H(l, "Expected a result"), l.type === "error" && l.value instanceof Error ? { status: "error", error: l.value } : { status: "success", error: void 0 }); 745 try { 746 await n(c, t); 747 } catch (m) { 748 console.error("An instrumentation function threw an error:", m); 749 } 750 o || await c(), await o; 751 } else 752 try { 753 l = { type: "success", value: await r() }; 754 } catch (o) { 755 l = { type: "error", value: o }; 756 } 757 return l || { 758 type: "error", 759 value: new Error("No result assigned in instrumentation chain.") 760 }; 761} 762function Xr(e) { 763 let { request: t, context: r, params: i, unstable_pattern: n } = e; 764 return { 765 request: ji(t), 766 params: { ...i }, 767 unstable_pattern: n, 768 context: Pi(r) 769 }; 770} 771function Qr(e, t) { 772 return { 773 currentUrl: Le(e.state.location), 774 ..."formMethod" in t ? { formMethod: t.formMethod } : {}, 775 ..."formEncType" in t ? { formEncType: t.formEncType } : {}, 776 ..."formData" in t ? { formData: t.formData } : {}, 777 ..."body" in t ? { body: t.body } : {} 778 }; 779} 780function ji(e) { 781 return { 782 method: e.method, 783 url: e.url, 784 headers: { 785 get: (...t) => e.headers.get(...t) 786 } 787 }; 788} 789function Pi(e) { 790 if (Si(e)) { 791 let t = { ...e }; 792 return Object.freeze(t), t; 793 } else 794 return { 795 get: (t) => e.get(t) 796 }; 797} 798var Ri = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); 799function Si(e) { 800 if (e === null || typeof e != "object") 801 return !1; 802 const t = Object.getPrototypeOf(e);
803 return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === Ri; 804} 805var Oa = [ 806 "POST", 807 "PUT", 808 "PATCH", 809 "DELETE" 810], Di = new Set( 811 Oa 812), Ei = [ 813 "GET", 814 ...Oa 815], Mi = new Set(Ei), _a = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), Ci = /* @__PURE__ */ new Set([307, 308]), or = { 816 state: "idle", 817 location: void 0, 818 formMethod: void 0, 819 formAction: void 0, 820 formEncType: void 0, 821 formData: void 0, 822 json: void 0, 823 text: void 0 824}, Li = { 825 state: "idle", 826 data: void 0, 827 formMethod: void 0, 828 formAction: void 0, 829 formEncType: void 0, 830 formData: void 0, 831 json: void 0, 832 text: void 0 833}, vt = { 834 state: "unblocked", 835 proceed: void 0, 836 reset: void 0, 837 location: void 0 838}, Fi = (e) => ({ 839 hasErrorBoundary: !!e.hasErrorBoundary 840}), $a = "remix-router-transitions", Ha = Symbol("ResetLoaderData"); 841function Ti(e) { 842 const t = e.window ? e.window : typeof window < "u" ? window : void 0, r = typeof t < "u" && typeof t.document < "u" && typeof t.document.createElement < "u"; 843 H( 844 e.routes.length > 0, 845 "You must provide a non-empty routes array to createRouter" 846 ); 847 let i = e.hydrationRouteProperties || [], n = e.mapRouteProperties || Fi, l = n; 848 if (e.unstable_instrumentations) { 849 let d = e.unstable_instrumentations; 850 l = (f) => ({ 851 ...n(f), 852 ...Ni( 853 d.map((v) => v.route).filter(Boolean), 854 f 855 ) 856 }); 857 } 858 let o = {}, c = zt( 859 e.routes, 860 l, 861 void 0, 862 o 863 ), m, h = e.basename || "/"; 864 h.startsWith("/") || (h = `/${h}`); 865 let u = e.dataStrategy || Ki, p = { 866 ...e.future 867 }, b = null, g = /* @__PURE__ */ new Set(), k = null, N = null, j = null, S = e.hydrationData != null, z = Ke(c, e.history.location, h), L = !1, X = null, W; 868 if (z == null && !e.patchRoutesOnNavigation) { 869 let d = je(404, { 870 pathname: e.history.location.pathname 871 }), { matches: f, route: v } = It(c); 872 W = !0, z = f, X = { [v.id]: d }; 873 } else if (z && !e.hydrationData && _t( 874 z, 875 c, 876 e.history.location.pathname 877 ).active && (z = null), z) 878 if (z.some((d) => d.route.lazy)) 879 W = !1; 880 else if (!z.some((d) => kr(d.route))) 881 W = !0; 882 else { 883 let d = e.hydrationData ? e.hydrationData.loaderData : null, f = e.hydrationData ? e.hydrationData.errors : null; 884 if (f) { 885 let v = z.findIndex( 886 (x) => f[x.route.id] !== void 0 887 ); 888 W = z.slice(0, v + 1).every( 889 (x) => !hr(x.route, d, f) 890 ); 891 } else 892 W = z.every( 893 (v) => !hr(v.route, d, f) 894 ); 895 } 896 else { 897 W = !1, z = []; 898 let d = _t( 899 null, 900 c, 901 e.history.location.pathname 902 ); 903 d.active && d.matches && (L = !0, z = d.matches); 904 } 905 let te, y = { 906 historyAction: e.history.action, 907 location: e.history.location, 908 matches: z, 909 initialized: W, 910 navigation: or, 911 // Don't restore on initial updateState() if we were SSR'd 912 restoreScrollPosition: e.hydrationData != null ? !1 : null, 913 preventScrollReset: !1, 914 revalidation: "idle", 915 loaderData: e.hydrationData && e.hydrationData.loaderData || {}, 916 actionData: e.hydrationData && e.hydrationData.actionData || null, 917 errors: e.hydrationData && e.hydrationData.errors || X, 918 fetchers: /* @__PURE__ */ new Map(), 919 blockers: /* @__PURE__ */ new Map() 920 }, O = "POP", A = null, q = !1, J, ie = !1, Se = /* @__PURE__ */ new Map(), ne = null, Z = !1, Q = !1, we = /* @__PURE__ */ new Set(), B = /* @__PURE__ */ new Map(), le = 0, fe = -1, De = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Set(), ke = /* @__PURE__ */ new Map(), Ne = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Set(), Ze = /* @__PURE__ */ new Map(), Tt, ht = null; 921 function sn() { 922 if (b = e.history.listen( 923 ({ action: d, location: f, delta: v }) => { 924 if (Tt) { 925 Tt(), Tt = void 0; 926 return; 927 } 928 ae( 929 Ze.size === 0 || v != null, 930 "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." 931 ); 932 let x = Vr({ 933 currentLocation: y.location, 934 nextLocation: f, 935 historyAction: d 936 }); 937 if (x && v != null) { 938 let w = new Promise((D) => { 939 Tt = D; 940 }); 941 e.history.go(v * -1), Ot(x, { 942 state: "blocked", 943 location: f, 944 proceed() { 945 Ot(x, { 946 state: "proceeding", 947 proceed: void 0, 948 reset: void 0, 949 location: f 950 }), w.then(() => e.history.go(v)); 951 }, 952 reset() { 953 let D = new Map(y.blockers); 954 D.set(x, vt), de({ blockers: D }); 955 } 956 }), A?.resolve(), A = null; 957 return; 958 } 959 return Je(d, f); 960 } 961 ), r) { 962 nl(t, Se); 963 let d = () => il(t, Se); 964 t.addEventListener("pagehide", d), ne = () => t.removeEventListener("pagehide", d); 965 } 966 return y.initialized || Je("POP", y.location, { 967 initialHydration: !0 968 }), te; 969 } 970 function cn() { 971 b && b(), ne && ne(), g.clear(), J && J.abort(), y.fetchers.forEac
971h((d, f) => rr(f)), y.blockers.forEach((d, f) => Kr(f)); 972 } 973 function dn(d) { 974 return g.add(d), () => g.delete(d); 975 } 976 function de(d, f = {}) { 977 d.matches && (d.matches = d.matches.map((w) => { 978 let D = o[w.route.id], P = w.route; 979 return P.element !== D.element || P.errorElement !== D.errorElement || P.hydrateFallbackElement !== D.hydrateFallbackElement ? { 980 ...w, 981 route: D 982 } : w; 983 })), y = { 984 ...y, 985 ...d 986 }; 987 let v = [], x = []; 988 y.fetchers.forEach((w, D) => { 989 w.state === "idle" && (ye.has(D) ? v.push(D) : x.push(D)); 990 }), ye.forEach((w) => { 991 !y.fetchers.has(w) && !B.has(w) && v.push(w); 992 }), [...g].forEach( 993 (w) => w(y, { 994 deletedFetchers: v, 995 newErrors: d.errors ?? null, 996 viewTransitionOpts: f.viewTransitionOpts, 997 flushSync: f.flushSync === !0 998 }) 999 ), v.forEach((w) => rr(w)), x.forEach((w) => y.fetchers.delete(w)); 1000 } 1001 function rt(d, f, { flushSync: v } = {}) { 1002 let x = y.actionData != null && y.navigation.formMethod != null && he(y.navigation.formMethod) && y.navigation.state === "loading" && d.state?._isRedirect !== !0, w; 1003 f.actionData ? Object.keys(f.actionData).length > 0 ? w = f.actionData : w = null : x ? w = y.actionData : w = null; 1004 let D = f.loaderData ? ca( 1005 y.loaderData, 1006 f.loaderData, 1007 f.matches || [], 1008 f.errors 1009 ) : y.loaderData, P = y.blockers; 1010 P.size > 0 && (P = new Map(P), P.forEach((F, M) => P.set(M, vt))); 1011 let R = Z ? !1 : Ur(d, f.matches || y.matches), E = q === !0 || y.navigation.formMethod != null && he(y.navigation.formMethod) && d.state?._isRedirect !== !0; 1012 m && (c = m, m = void 0), Z || O === "POP" || (O === "PUSH" ? e.history.push(d, d.state) : O === "REPLACE" && e.history.replace(d, d.state)); 1013 let C; 1014 if (O === "POP") { 1015 let F = Se.get(y.location.pathname); 1016 F && F.has(d.pathname) ? C = { 1017 currentLocation: y.location, 1018 nextLocation: d 1019 } : Se.has(d.pathname) && (C = { 1020 currentLocation: d, 1021 nextLocation: y.location 1022 }); 1023 } else if (ie) { 1024 let F = Se.get(y.location.pathname); 1025 F ? F.add(d.pathname) : (F = /* @__PURE__ */ new Set([d.pathname]), Se.set(y.location.pathname, F)), C = { 1026 currentLocation: y.location, 1027 nextLocation: d 1028 }; 1029 } 1030 de( 1031 { 1032 ...f, 1033 // matches, errors, fetchers go through as-is 1034 actionData: w, 1035 loaderData: D, 1036 historyAction: O, 1037 location: d, 1038 initialized: !0, 1039 navigation: or, 1040 revalidation: "idle", 1041 restoreScrollPosition: R, 1042 preventScrollReset: E, 1043 blockers: P 1044 }, 1045 { 1046 viewTransitionOpts: C, 1047 flushSync: v === !0 1048 } 1049 ), O = "POP", q = !1, ie = !1, Z = !1, Q = !1, A?.resolve(), A = null, ht?.resolve(), ht = null; 1050 } 1051 async function Lr(d, f) { 1052 if (A?.resolve(), A = null, typeof d == "number") { 1053 A || (A = ua()); 1054 let U = A.promise; 1055 return e.history.go(d), U; 1056 } 1057 let v = mr( 1058 y.location, 1059 y.matches, 1060 h, 1061 d, 1062 f?.fromRouteId, 1063 f?.relative 1064 ), { path: x, submission: w, error: D } = ea( 1065 !1, 1066 v, 1067 f 1068 ), P = y.location, R = Nt(y.location, x, f && f.state); 1069 R = { 1070 ...R, 1071 ...e.history.encodeLocation(R) 1072 }; 1073 let E = f && f.replace != null ? f.replace : void 0, C = "PUSH"; 1074 E === !0 ? C = "REPLACE" : E === !1 || w != null && he(w.formMethod) && w.formAction === y.location.pathname + y.location.search && (C = "REPLACE"); 1075 let F = f && "preventScrollReset" in f ? f.preventScrollReset === !0 : void 0, M = (f && f.flushSync) === !0, I = Vr({ 1076 currentLocation: P, 1077 nextLocation: R, 1078 historyAction: C 1079 }); 1080 if (I) { 1081 Ot(I, { 1082 state: "blocked", 1083 location: R, 1084 proceed() { 1085 Ot(I, { 1086 state: "proceeding", 1087 proceed: void 0, 1088 reset: void 0, 1089 location: R 1090 }), Lr(d, f); 1091 }, 1092 reset() { 1093 let U = new Map(y.blockers); 1094 U.set(I, vt), de({ blockers: U }); 1095 } 1096 }); 1097 return; 1098 } 1099 await Je(C, R, { 1100 submission: w, 1101 // Send through the formData serialization error if we have one so we can 1102 // render at the right error boundary after we match routes 1103 pendingError: D, 1104 preventScrollReset: F, 1105 replace: f && f.replace, 1106 enableViewTransition: f && f.viewTransition, 1107 flushSync: M, 1108 callSiteDefaultShouldRevalidate: f && f.unstable_defaultShouldRevalidate 1109 }); 1110 } 1111 function mn() { 1112 ht || (ht = ua()), tr(), de({ revalidation: "loading" }); 1113 let d = ht.promise; 1114 return y.navigation.state === "submitting" ? d : y.navigation.state === "i
1114dle" ? (Je(y.historyAction, y.location, { 1115 startUninterruptedRevalidation: !0 1116 }), d) : (Je( 1117 O || y.historyAction, 1118 y.navigation.location, 1119 { 1120 overrideNavigation: y.navigation, 1121 // Proxy through any rending view transition 1122 enableViewTransition: ie === !0 1123 } 1124 ), d); 1125 } 1126 async function Je(d, f, v) { 1127 J && J.abort(), J = null, O = d, Z = (v && v.startUninterruptedRevalidation) === !0, kn(y.location, y.matches), q = (v && v.preventScrollReset) === !0, ie = (v && v.enableViewTransition) === !0; 1128 let x = m || c, w = v && v.overrideNavigation, D = v?.initialHydration && y.matches && y.matches.length > 0 && !L ? ( 1129 // `matchRoutes()` has already been called if we're in here via `router.initialize()` 1130 y.matches 1131 ) : Ke(x, f, h), P = (v && v.flushSync) === !0; 1132 if (D && y.initialized && !Q && Zi(y.location, f) && !(v && v.submission && he(v.submission.formMethod))) { 1133 rt(f, { matches: D }, { flushSync: P }); 1134 return; 1135 } 1136 let R = _t(D, x, f.pathname); 1137 if (R.active && R.matches && (D = R.matches), !D) { 1138 let { error: oe, notFoundMatches: ue, route: G } = ar( 1139 f.pathname 1140 ); 1141 rt( 1142 f, 1143 { 1144 matches: ue, 1145 loaderData: {}, 1146 errors: { 1147 [G.id]: oe 1148 } 1149 }, 1150 { flushSync: P } 1151 ); 1152 return; 1153 } 1154 J = new AbortController(); 1155 let E = nt( 1156 e.history, 1157 f, 1158 J.signal, 1159 v && v.submission 1160 ), C = e.getContext ? await e.getContext() : new Zr(), F; 1161 if (v && v.pendingError) 1162 F = [ 1163 Ve(D).route.id, 1164 { type: "error", error: v.pendingError } 1165 ]; 1166 else if (v && v.submission && he(v.submission.formMethod)) { 1167 let oe = await hn( 1168 E, 1169 f, 1170 v.submission, 1171 D, 1172 C, 1173 R.active, 1174 v && v.initialHydration === !0, 1175 { replace: v.replace, flushSync: P } 1176 ); 1177 if (oe.shortCircuited) 1178 return; 1179 if (oe.pendingActionResult) { 1180 let [ue, G] = oe.pendingActionResult; 1181 if (ge(G) && jt(G.error) && G.error.status === 404) { 1182 J = null, rt(f, { 1183 matches: oe.matches, 1184 loaderData: {}, 1185 errors: { 1186 [ue]: G.error 1187 } 1188 }); 1189 return; 1190 } 1191 } 1192 D = oe.matches || D, F = oe.pendingActionResult, w = sr(f, v.submission), P = !1, R.active = !1, E = nt( 1193 e.history, 1194 E.url, 1195 E.signal 1196 ); 1197 } 1198 let { 1199 shortCircuited: M, 1200 matches: I, 1201 loaderData: U, 1202 errors: ce 1203 } = await un( 1204 E, 1205 f, 1206 D, 1207 C, 1208 R.active, 1209 w, 1210 v && v.submission, 1211 v && v.fetcherSubmission, 1212 v && v.replace, 1213 v && v.initialHydration === !0, 1214 P, 1215 F, 1216 v && v.callSiteDefaultShouldRevalidate 1217 ); 1218 M || (J = null, rt(f, { 1219 matches: I || D, 1220 ...da(F), 1221 loaderData: U, 1222 errors: ce 1223 })); 1224 } 1225 async function hn(d, f, v, x, w, D, P, R = {}) { 1226 tr(); 1227 let E = rl(f, v); 1228 if (de({ navigation: E }, { flushSync: R.flushSync === !0 }), D) { 1229 let M = await $t( 1230 x, 1231 f.pathname, 1232 d.signal 1233 ); 1234 if (M.type === "aborted") 1235 return { shortCircuited: !0 }; 1236 if (M.type === "error") { 1237 if (M.partialMatches.length === 0) { 1238 let { matches: U, route: ce } = It(c); 1239 return { 1240 matches: U, 1241 pendingActionResult: [ 1242 ce.id, 1243 { 1244 type: "error", 1245 error: M.error 1246 } 1247 ] 1248 }; 1249 } 1250 let I = Ve(M.partialMatches).route.id; 1251 return { 1252 matches: M.partialMatches, 1253 pendingActionResult: [ 1254 I, 1255 { 1256 type: "error", 1257 error: M.error 1258 } 1259 ] 1260 }; 1261 } else if (M.matches) 1262 x = M.matches; 1263 else { 1264 let { notFoundMatches: I, error: U, route: ce } = ar( 1265 f.pathname 1266 ); 1267 return { 1268 matches: I, 1269 pendingActionResult: [ 1270 ce.id, 1271 { 1272 type: "error", 1273 error: U 1274 } 1275 ] 1276 }; 1277 } 1278 } 1279 let C, F = Wt(x, f); 1280 if (!F.route.action && !F.route.lazy) 1281 C = { 1282 type: "error", 1283 error: je(405, { 1284 method: d.method, 1285 pathname: f.pathname, 1286 routeId: F.route.id 1287 }) 1288 }; 1289 else { 1290 let M = ot( 1291 l, 1292 o, 1293 d, 1294 x, 1295 F, 1296 P ? [] : i, 1297 w 1298 ), I = await ut( 1299 d, 1300 M, 1301 w, 1302 null 1303 ); 1304 if (C = I[F.route.id], !C) { 1305 for (let U of x) 1306 if (I[U.route.id]) { 1307 C = I[U.route.id]; 1308 break; 1309 } 1310 } 1311 if (d.signal.aborted) 1312 return { shortCircuited: !0 }; 1313 } 1314 if (et(C)) { 1315 let M; 1316 return R && R.replace != null ? M = R.replace : M = la( 1317 C.response.headers.get("Location"), 1318 new URL(d.url), 1319 h, 1320 e.history 1321 ) === y.location.pathname + y.location.search, await Ye(d, C, !0, { 1322 submission: v, 1323 replace: M 1324 }), { shortCircuited: !0 }; 1325 } 1326 if (ge(C)) { 1327 let M = Ve(x, F.route.id); 1328 return (R && R.replace) !== !0 && (O = "PUSH"), { 1329 matches: x, 1330 pendingActionResult: [ 1331 M.route.id, 1332 C, 1333 F.route.id 1334 ] 1335 }; 1336 } 1337 return { 1338 matches: x, 1339 pendingActionResult: [F.route.id, C] 1340 }; 1341 } 1342 async function un(d, f, v, x, w, D, P, R, E, C, F, M, I) { 1343 let U = D || sr(f, P), ce = P || R || ha(U), oe = !Z && !C; 1344 if (w) { 1345 if (oe) { 1346 let me = Fr(M); 1347 de( 1348 { 1349 navigation: U, 1350 ...me !== void 0 ? { actionData: me } : {} 1351 }, 1352 { 1353 flushSync: F 1354 } 1355 ); 1356 } 1357 let V = await $t( 1358 v, 1359 f.pathname, 1360 d.signal 1361 ); 1362 if (V.type === "aborted") 1363 return { shortCircuited: !0 }; 1364 if (V.type === "error") { 1365 if (V.partialMatches.length === 0) { 1366 let { matches: at, route: Qe } = It(c); 1367 return { 1368 matches: at, 1369 loaderData: {}, 1370 errors: { 1371 [Qe.id]: V.error 1372 } 1373 }; 1374 } 1375 let me = Ve(V.partialMatches).route.id; 1376 return { 1377 matches: V.partialMatches, 1378 loaderData: {}, 1379 errors: { 1380 [me]: V.error 1381 } 1382 }; 1383 } else if (V.matches) 1384 v = V.matches; 1385 else { 1386 let { error: me, notFoundMatches: at, route: Qe } = ar( 1387 f.pathname 1388 ); 1389 return { 1390 matches: at, 1391 loaderData: {}, 1392 errors: { 1393 [Qe.id]: me 1394 } 1395 }; 1396 } 1397 } 1398 let ue = m || c, { dsMatches: G, revalidatingFetchers: ze } = ta( 1399 d, 1400 x, 1401 l, 1402 o, 1403 e.history, 1404 y, 1405 v, 1406 ce, 1407 f, 1408 C ? [] : i, 1409 C === !0, 1410 Q, 1411 we, 1412 ye, 1413 ke, 1414 pe, 1415 ue, 1416 h, 1417 e.patchRoutesOnNavigation != null, 1418 M, 1419 I 1420 ); 1421 if (fe = ++le, !e.dataStrategy && !G.some((V) => V.shouldLoad) && !G.some( 1422 (V) => V.route.middleware && V.route.middleware.length > 0 1423 ) && ze.length === 0) { 1424 let V = $r(); 1425 return rt( 1426 f, 1427 { 1428 matches: v, 1429 loaderData: {}, 1430 // Commit pending error if we're short circuiting 1431 errors: M && ge(M[1]) ? { [M[0]]: M[1].error } : null, 1432 ...da(M), 1433 ...V ? { fetchers: new Map(y.fetchers) } : {} 1434 }, 1435 { flushSync: F } 1436 ), { shortCircuited: !0 }; 1437 } 1438 if (oe) { 1439 let V = {}; 1440 if (!w) { 1441 V.navigation = U; 1442 let me = Fr(M); 1443 me !== void 0 && (V.actionData = me); 1444 } 1445 ze.length > 0 && (V.fetchers = fn(ze)), de(V, { flushSync: F }); 1446 } 1447 ze.forEach((V) => { 1448 Oe(V.key), V.controller && B.set(V.key, V.controller); 1449 }); 1450 let qe = () => ze.forEach((V) => Oe(V.key)); 1451 J && J.signal.addEventListener( 1452 "abort", 1453 qe 1454 ); 1455 let { loaderResults: ft, fetcherResults: He } = await Tr( 1456 G, 1457 ze, 1458 d, 1459 x 1460 ); 1461 if (d.signal.aborted) 1462 return { shortCircuited: !0 }; 1463 J && J.signal.removeEventListener( 1464 "abort", 1465 qe 1466 ), ze.forEach((V) => B.delete(V.key)); 1467 let Me = Ut(ft); 1468 if (Me) 1469 return await Ye(d, Me.result, !0, { 1470 replace: E 1471 }), { shortCircuited: !0 }; 1472 if (Me = Ut(He), Me) 1473 return pe.add(Me.key), await Ye(d, Me.result, !0, { 1474 replace: E 1475 }), { shortCircuited: !0 }; 1476 let { loaderData: nr, errors: pt } = sa( 1477 y, 1478 v, 1479 ft, 1480 M, 1481 ze, 1482 He 1483 ); 1484 C && y.errors && (pt = { ...y.errors, ...pt }); 1485 let Xe = $r(), Ht = Hr(fe), Kt = Xe || Ht || ze.length > 0; 1486 return { 1487 matches: v, 1488 loaderData: nr, 1489 errors: pt, 1490 ...Kt ? { fetchers: new Map(y.fetchers) } : {} 1491 }; 1492 } 1493 function Fr(d) { 1494 if (d && !ge(d[1])) 1495 return { 1496 [d[0]]: d[1].data 1497 }; 1498 if (y.actionData) 1499 return Object.keys(y.actionData).length === 0 ? null : y.actionData; 1500 } 1501 function fn(d) { 1502 return d.forEach((f) => { 1503 let v = y.fetchers.get(f.key), x = yt( 1504 void 0, 1505 v ? v.data : void 0 1506 ); 1507 y.fetchers.set(f.key, x); 1508 }), new Map(y.fetchers); 1509 } 1510 async function pn(d, f, v, x) { 1511 Oe(d); 1512 let w = (x && x.flushSync) === !0, D = m || c, P = mr( 1513 y.location, 1514 y.matches, 1515 h, 1516 v, 1517 f, 1518 x?.relative 1519 ), R = Ke(D, P, h), E = _t(R, D, P); 1520 if (E.active && E.matches && (R = E.matches), !R) { 1521 Te( 1522 d, 1523 f, 1524 je(404, { pathname: P }), 1525 { flushSync: w } 1526 ); 1527 return; 1528 } 1529 let { path: C, submission: F, error: M } = ea( 1530 !0, 1531 P, 1532 x 1533 ); 1534 if (M) { 1535 Te(d, f, M, { flushSync: w }); 1536 return; 1537 } 1538 let I = e.getContext ? await e.getContext() : new Zr(), U = (x && x.preventScrollReset) === !0; 1539 if (F && he(F.formMethod)) { 1540 await vn( 1541 d, 1542 f, 1543 C, 1544 R, 1545 I, 1546 E.active, 1547 w, 1548 U, 1549 F, 1550 x && x.unstable_defaultShouldRevalidate 1551 ); 1552 return; 1553 } 1554 ke.set(d, { routeId: f, path: C }), await yn( 1555 d, 1556 f, 1557 C, 1558 R, 1559 I, 1560 E.active, 1561 w, 1562 U, 1563 F 1564 ); 1565 } 1566 async function vn(d, f, v, x, w, D, P, R, E, C) { 1567 tr(), ke.delete(d); 1568 let F = y.fetchers.get(d); 1569 Fe(d, al(E, F), { 1570 flushSync: P 1571 }); 1572 let M = new AbortController(), I = nt( 1573 e.history, 1574 v, 1575 M.signal, 1576 E 1577 ); 1578 if (D) { 1579 let re = await $t( 1580 x, 1581 new URL(I.url).pathname, 1582 I.signal, 1583 d 1584 ); 1585 if (re.type === "aborted") 1586 return; 1587 if (re.type === "error") { 1588 Te(d, f, re.error, { flushSync: P }); 1589 return; 1590 } else if (re.matches) 1591 x = re.matches; 1592 else { 1593 Te( 1594 d, 1595 f, 1596 je(404, { pathname: v }), 1597 { flushSync: P } 1598 ); 1599 return; 1600 } 1601 } 1602 let U = Wt(x, v); 1603 if (!U.route.action && !U.route.lazy) { 1604 let re = je(405, { 1605 method: E.formMethod, 1606 pathname: v, 1607 routeId: f 1608 }); 1609 Te(d, f, re, { flushSync: P }); 1610 return; 1611 } 1612 B.set(d, M);
1613 let ce = le, oe = ot( 1614 l, 1615 o, 1616 I, 1617 x, 1618 U, 1619 i, 1620 w 1621 ), ue = await ut( 1622 I, 1623 oe, 1624 w, 1625 d 1626 ), G = ue[U.route.id]; 1627 if (!G) { 1628 for (let re of oe) 1629 if (ue[re.route.id]) { 1630 G = ue[re.route.id]; 1631 break; 1632 } 1633 } 1634 if (I.signal.aborted) { 1635 B.get(d) === M && B.delete(d); 1636 return; 1637 } 1638 if (ye.has(d)) { 1639 if (et(G) || ge(G)) { 1640 Fe(d, _e(void 0)); 1641 return; 1642 } 1643 } else { 1644 if (et(G)) 1645 if (B.delete(d), fe > ce) { 1646 Fe(d, _e(void 0)); 1647 return; 1648 } else 1649 return pe.add(d), Fe(d, yt(E)), Ye(I, G, !1, { 1650 fetcherSubmission: E, 1651 preventScrollReset: R 1652 }); 1653 if (ge(G)) { 1654 Te(d, f, G.error); 1655 return; 1656 } 1657 } 1658 let ze = y.navigation.location || y.location, qe = nt( 1659 e.history, 1660 ze, 1661 M.signal 1662 ), ft = m || c, He = y.navigation.state !== "idle" ? Ke(ft, y.navigation.location, h) : y.matches; 1663 H(He, "Didn't find any matches after fetcher action"); 1664 let Me = ++le; 1665 De.set(d, Me); 1666 let nr = yt(E, G.data); 1667 y.fetchers.set(d, nr); 1668 let { dsMatches: pt, revalidatingFetchers: Xe } = ta( 1669 qe, 1670 w, 1671 l, 1672 o, 1673 e.history, 1674 y, 1675 He, 1676 E, 1677 ze, 1678 i, 1679 !1, 1680 Q, 1681 we, 1682 ye, 1683 ke, 1684 pe, 1685 ft, 1686 h, 1687 e.patchRoutesOnNavigation != null, 1688 [U.route.id, G], 1689 C 1690 ); 1691 Xe.filter((re) => re.key !== d).forEach((re) => { 1692 let Vt = re.key, Wr = y.fetchers.get(Vt), jn = yt( 1693 void 0, 1694 Wr ? Wr.data : void 0 1695 ); 1696 y.fetchers.set(Vt, jn), Oe(Vt), re.controller && B.set(Vt, re.controller); 1697 }), de({ fetchers: new Map(y.fetchers) }); 1698 let Ht = () => Xe.forEach((re) => Oe(re.key)); 1699 M.signal.addEventListener( 1700 "abort", 1701 Ht 1702 ); 1703 let { loaderResults: Kt, fetcherResults: V } = await Tr( 1704 pt, 1705 Xe, 1706 qe, 1707 w 1708 ); 1709 if (M.signal.aborted) 1710 return; 1711 if (M.signal.removeEventListener( 1712 "abort", 1713 Ht
1714 ), De.delete(d), B.delete(d), Xe.forEach((re) => B.delete(re.key)), y.fetchers.has(d)) { 1715 let re = _e(G.data); 1716 y.fetchers.set(d, re); 1717 } 1718 let me = Ut(Kt); 1719 if (me) 1720 return Ye( 1721 qe, 1722 me.result, 1723 !1, 1724 { preventScrollReset: R } 1725 ); 1726 if (me = Ut(V), me) 1727 return pe.add(me.key), Ye( 1728 qe, 1729 me.result, 1730 !1, 1731 { preventScrollReset: R } 1732 ); 1733 let { loaderData: at, errors: Qe } = sa( 1734 y, 1735 He, 1736 Kt, 1737 void 0, 1738 Xe, 1739 V 1740 ); 1741 Hr(Me), y.navigation.state === "loading" && Me > fe ? (H(O, "Expected pending action"), J && J.abort(), rt(y.navigation.location, { 1742 matches: He, 1743 loaderData: at, 1744 errors: Qe, 1745 fetchers: new Map(y.fetchers) 1746 })) : (de({ 1747 errors: Qe, 1748 loaderData: ca( 1749 y.loaderData, 1750 at, 1751 He, 1752 Qe 1753 ), 1754 fetchers: new Map(y.fetchers) 1755 }), Q = !1); 1756 } 1757 async function yn(d, f, v, x, w, D, P, R, E) { 1758 let C = y.fetchers.get(d); 1759 Fe( 1760 d, 1761 yt( 1762 E, 1763 C ? C.data : void 0 1764 ), 1765 { flushSync: P } 1766 ); 1767 let F = new AbortController(), M = nt( 1768 e.history, 1769 v, 1770 F.signal 1771 ); 1772 if (D) { 1773 let G = await $t( 1774 x, 1775 new URL(M.url).pathname, 1776 M.signal, 1777 d 1778 ); 1779 if (G.type === "aborted") 1780 return; 1781 if (G.type === "error") { 1782 Te(d, f, G.error, { flushSync: P }); 1783 return; 1784 } else if (G.matches) 1785 x = G.matches; 1786 else { 1787 Te( 1788 d, 1789 f, 1790 je(404, { pathname: v }), 1791 { flushSync: P } 1792 ); 1793 return; 1794 } 1795 } 1796 let I = Wt(x, v); 1797 B.set(d, F); 1798 let U = le, ce = ot( 1799 l, 1800 o, 1801 M, 1802 x, 1803 I, 1804 i, 1805 w 1806 ), ue = (await ut( 1807 M, 1808 ce, 1809 w, 1810 d 1811 ))[I.route.id];
1812 if (B.get(d) === F && B.delete(d), !M.signal.aborted) { 1813 if (ye.has(d)) { 1814 Fe(d, _e(void 0)); 1815 return; 1816 } 1817 if (et(ue)) 1818 if (fe > U) { 1819 Fe(d, _e(void 0)); 1820 return; 1821 } else { 1822 pe.add(d), await Ye(M, ue, !1, { 1823 preventScrollReset: R 1824 }); 1825 return; 1826 } 1827 if (ge(ue)) { 1828 Te(d, f, ue.error); 1829 return; 1830 } 1831 Fe(d, _e(ue.data)); 1832 } 1833 } 1834 async function Ye(d, f, v, { 1835 submission: x, 1836 fetcherSubmission: w, 1837 preventScrollReset: D, 1838 replace: P 1839 } = {}) { 1840 v || (A?.resolve(), A = null), f.response.headers.has("X-Remix-Revalidate") && (Q = !0); 1841 let R = f.response.headers.get("Location"); 1842 H(R, "Expected a Location header on the redirect Response"), R = la( 1843 R, 1844 new URL(d.url), 1845 h, 1846 e.history 1847 ); 1848 let E = Nt(y.location, R, { 1849 _isRedirect: !0 1850 }); 1851 if (r) { 1852 let ce = !1; 1853 if (f.response.headers.has("X-Remix-Reload-Document")) 1854 ce = !0; 1855 else if (br(R)) { 1856 const oe = Sa(R, !0); 1857 ce = // Hard reload if it's an absolute URL to a new origin 1858 oe.origin !== t.location.origin || // Hard reload if it's an absolute URL that does not match our basename 1859 Pe(oe.pathname, h) == null; 1860 } 1861 if (ce) { 1862 P ? t.location.replace(R) : t.location.assign(R); 1863 return; 1864 } 1865 } 1866 J = null; 1867 let C = P === !0 || f.response.headers.has("X-Remix-Replace") ? "REPLACE" : "PUSH", { formMethod: F, formAction: M, formEncType: I } = y.navigation; 1868 !x && !w && F && M && I && (x = ha(y.navigation)); 1869 let U = x || w; 1870 if (Ci.has(f.response.status) && U && he(U.formMethod)) 1871 await Je(C, E, { 1872 submission: { 1873 ...U, 1874 formAction: R 1875 }, 1876 // Preserve these flags across redirects 1877 preventScrollReset: D || q, 1878 enableViewTransition: v ? ie : void 0 1879 }); 1880 else { 1881 let ce = sr( 1882 E, 1883 x 1884 ); 1885 await Je(C, E, { 1886 overrideNavigation: ce, 1887 // Send fetcher submissions through for shouldRevalidate 1888 fetcherSubmission: w, 1889 // Preserve these flags across redirects 1890 preventScrollReset: D || q, 1891 enableViewTransition: v ? ie : void 0 1892 }); 1893 } 1894 } 1895 async function ut(d, f, v, x) { 1896 let w, D = {}; 1897 try { 1898 w = await Ii( 1899 u, 1900 d, 1901 f, 1902 x, 1903 v, 1904 !1 1905 ); 1906 } catch (P) { 1907 return f.filter((R) => R.shouldLoad).forEach((R) => { 1908 D[R.route.id] = { 1909 type: "error", 1910 error: P 1911 }; 1912 }), D; 1913 } 1914 if (d.signal.aborted) 1915 return D; 1916 if (!he(d.method)) 1917 for (let P of f) { 1918 if (w[P.route.id]?.type === "error") 1919 break; 1920 !w.hasOwnProperty(P.route.id) && !y.loaderData.hasOwnProperty(P.route.id) && (!y.errors || !y.errors.hasOwnProperty(P.route.id)) && P.shouldCallHandler() && (w[P.route.id] = { 1921 type: "error", 1922 result: new Error( 1923 `No result returned from dataStrategy for route ${P.route.id}` 1924 ) 1925 }); 1926 } 1927 for (let [P, R] of Object.entries(w)) 1928 if (Xi(R)) { 1929 let E = R.result; 1930 D[P] = { 1931 type: "redirect", 1932 response: Bi( 1933 E, 1934 d, 1935 P, 1936 f, 1937 h 1938 ) 1939 }; 1940 } else 1941 D[P] = await Wi(R); 1942 return D; 1943 } 1944 async function Tr(d, f, v, x) { 1945 let w = ut( 1946 v, 1947 d, 1948 x, 1949 null 1950 ), D = Promise.all( 1951 f.map(async (E) => { 1952 if (E.matches && E.match && E.request && E.controller) { 1953 let F = (await ut( 1954 E.request, 1955 E.matches, 1956 x, 1957 E.key 1958 ))[E.match.route.id]; 1959 return { [E.key]: F }; 1960 } else 1961 return Promise.resolve({ 1962 [E.key]: { 1963 type: "error", 1964 error: je(404, { 1965 pathname: E.path 1966 }) 1967 } 1968 }); 1969 }) 1970 ), P = await w, R = (await D).reduce( 1971 (E, C) => Object.assign(E, C), 1972 {} 1973 ); 1974 return { 1975 loaderResults: P, 1976 fetcherResults: R 1977 }; 1978 } 1979 function tr() { 1980 Q = !0, ke.forEach((d, f) => { 1981 B.has(f) && we.add(f), Oe(f); 1982 }); 1983 } 1984 function Fe(d, f, v = {}) { 1985 y.fetchers.set(d, f), de( 1986 { fetchers: new Map(y.fetchers) }, 1987 { flushSync: (v && v.flushSync) === !0 } 1988 ); 1989 } 1990 function Te(d, f, v, x = {}) { 1991 let w = Ve(y.matches, f); 1992 rr(d), de( 1993 { 1994 errors: { 1995 [w.route.id]: v 1996 }, 1997 fetchers: new Map(y.fetchers) 1998 }, 1999 { flushSync: (x && x.flushSync) === !0 } 2000 ); 2001 } 2002 function Or(d) { 2003 return Ne.set(d, (Ne.get(d) || 0) + 1), ye.has(d) && ye.delete(d), y.fetchers.get(d) || Li; 2004 } 2005 function gn(d, f) { 2006 Oe(d, f?.reason), Fe(d, _e(null)); 2007 } 2008 function rr(d) { 2009 let f = y.fetchers.get(d); 2010 B.has(d) && !(f && f.state === "loading" && De.has(d)) && Oe(d), ke.delete(d), De.delete(d), pe.delete(d), ye.delete(d), we.delete(d), y.fetchers.delete(
2010d); 2011 } 2012 function bn(d) { 2013 let f = (Ne.get(d) || 0) - 1; 2014 f <= 0 ? (Ne.delete(d), ye.add(d)) : Ne.set(d, f), de({ fetchers: new Map(y.fetchers) }); 2015 } 2016 function Oe(d, f) { 2017 let v = B.get(d); 2018 v && (v.abort(f), B.delete(d)); 2019 } 2020 function _r(d) { 2021 for (let f of d) { 2022 let v = Or(f), x = _e(v.data); 2023 y.fetchers.set(f, x); 2024 } 2025 } 2026 function $r() { 2027 let d = [], f = !1; 2028 for (let v of pe) { 2029 let x = y.fetchers.get(v); 2030 H(x, `Expected fetcher: ${v}`), x.state === "loading" && (pe.delete(v), d.push(v), f = !0); 2031 } 2032 return _r(d), f; 2033 } 2034 function Hr(d) { 2035 let f = []; 2036 for (let [v, x] of De) 2037 if (x < d) { 2038 let w = y.fetchers.get(v); 2039 H(w, `Expected fetcher: ${v}`), w.state === "loading" && (Oe(v), De.delete(v), f.push(v)); 2040 } 2041 return _r(f), f.length > 0; 2042 } 2043 function xn(d, f) { 2044 let v = y.blockers.get(d) || vt; 2045 return Ze.get(d) !== f && Ze.set(d, f), v; 2046 } 2047 function Kr(d) { 2048 y.blockers.delete(d), Ze.delete(d); 2049 } 2050 function Ot(d, f) { 2051 let v = y.blockers.get(d) || vt; 2052 H( 2053 v.state === "unblocked" && f.state === "blocked" || v.state === "blocked" && f.state === "blocked" || v.state === "blocked" && f.state === "proceeding" || v.state === "blocked" && f.state === "unblocked" || v.state === "proceeding" && f.state === "unblocked", 2054 `Invalid blocker state transition: ${v.state} -> ${f.state}` 2055 ); 2056 let x = new Map(y.blockers); 2057 x.set(d, f), de({ blockers: x }); 2058 } 2059 function Vr({ 2060 currentLocation: d, 2061 nextLocation: f, 2062 historyAction: v 2063 }) { 2064 if (Ze.size === 0) 2065 return; 2066 Ze.size > 1 && ae(!1, "A router only supports one blocker at a time"); 2067 let x = Array.from(Ze.entries()), [w, D] = x[x.length - 1], P = y.blockers.get(w); 2068 if (!(P && P.state === "proceeding") && D({ currentLocation: d, nextLocation: f, historyAction: v })) 2069 return w; 2070 } 2071 function ar(d) { 2072 let f = je(404, { pathname: d }), v = m || c, { matches: x, route: w } = It(v); 2073 return { notFoundMatches: x, route: w, error: f }; 2074 } 2075 function wn(d, f, v) { 2076 if (k = d, j = f, N = v || null, !S && y.navigation === or) { 2077 S = !0; 2078 let x = Ur(y.location, y.matches); 2079 x != null && de({ restoreScrollPosition: x }); 2080 } 2081 return () => { 2082 k = null, j = null, N = null; 2083 }; 2084 } 2085 function Ir(d, f) { 2086 return N && N( 2087 d, 2088 f.map((x) => ii(x, y.loaderData)) 2089 ) || d.key; 2090 } 2091 function kn(d, f) { 2092 if (k && j) { 2093 let v = Ir(d, f); 2094 k[v] = j(); 2095 } 2096 } 2097 function Ur(d, f) { 2098 if (k) { 2099 let v = Ir(d, f), x = k[v]; 2100 if (typeof x == "number") 2101 return x; 2102 } 2103 return null; 2104 } 2105 function _t(d, f, v) { 2106 if (e.patchRoutesOnNavigation) 2107 if (d) { 2108 if (Object.keys(d[0].params).length > 0) 2109 return { active: !0, matches: xt( 2110 f, 2111 v, 2112 h, 2113 !0 2114 ) }; 2115 } else 2116 return { active: !0, matches: xt( 2117 f, 2118 v, 2119 h, 2120 !0 2121 ) || [] }; 2122 return { active: !1, matches: null }; 2123 } 2124 async function $t(d, f, v, x) { 2125 if (!e.patchRoutesOnNavigation) 2126 return { type: "success", matches: d }; 2127 let w = d; 2128 for (; ; ) { 2129 let D = m == null, P = m || c, R = o; 2130 try { 2131 await e.patchRoutesOnNavigation({ 2132 signal: v, 2133 path: f, 2134 matches: w, 2135 fetcherKey: x, 2136 patch: (F, M) => { 2137 v.aborted || ra( 2138 F, 2139 M, 2140 P, 2141 R, 2142 l, 2143 !1 2144 ); 2145 } 2146 }); 2147 } catch (F) { 2148 return { type: "error", error: F, partialMatches: w }; 2149 } finally { 2150 D && !v.aborted && (c = [...c]); 2151 } 2152 if (v.aborted) 2153 return { type: "aborted" }; 2154 let E = Ke(P, f, h), C = null; 2155 if (E) { 2156 if (Object.keys(E[0].params).length === 0) 2157 return { type: "success", matches: E }; 2158 if (C = xt( 2159 P, 2160 f, 2161 h, 2162 !0 2163 ), !(C && w.length < C.length && Ar( 2164 w, 2165 C.slice(0, w.length) 2166 ))) 2167 return { type: "success", matches: E }; 2168 } 2169 if (C || (C = xt( 2170 P, 2171 f, 2172 h, 2173 !0 2174 )), !C || Ar(w, C)) 2175 return { type: "success", matches: null }; 2176 w = C; 2177 } 2178 } 2179 function Ar(d, f) { 2180 return d.length === f.length && d.every((v, x) => v.route.id === f[x].route.id); 2181 } 2182 function Nn(d) { 2183 o = {}, m = zt( 2184 d, 2185 l, 2186 void 0, 2187 o 2188 ); 2189 } 2190 function zn(d, f, v = !1) { 2191 let x = m == null; 2192 ra( 2193 d, 2194 f, 2195 m || c, 2196 o, 2197 l, 2198 v 2199 ), x && (c = [...c], de({})); 2200 } 2201 return te = { 2202 get basename() { 2203 return h; 2204 }, 2205 get future() { 2206 return p; 2207 }, 2208 get state() { 2209 return y; 2210 }, 2211 get routes() { 2212 return c; 2213 }, 2214 get window() { 2215 return t; 2216 }, 2217 initialize: sn, 2218 subscribe: dn, 2219 enableScrollRestoration: wn, 2220 navigate: Lr, 2221 fetch: pn, 2222 revalidate: mn, 2223 // Passthrough to history-aware createHref used by useHref so we get proper 2224 // hash-aware URLs in DOM paths 2225 createHref: (d) => e.history.createHref(d), 2226 encodeLocation: (d) => e.history.encodeLocation(d), 2227 getFetcher: Or, 2228 resetFetcher: gn, 2229 deleteFetcher: bn, 2230 dispose: cn, 2231 getBlocker: xn, 2232 deleteBlocker: Kr, 2233 patchRoutes: zn, 2234 _internalFetchControllers: B, 2235 // TODO: Remove setRoutes, it's temporary to avoid dealing with 2236 // updating the tree while validating the update algorithm. 2237 _internalSetRoutes: Nn, 2238 _internalSetStateDoNotUseOrYouWillBreakYourApp(d) { 2239 de(d); 2240 } 2241 }, e.unstable_instrumentations && (te = zi( 2242 te, 2243 e.unstable_instrumentations.map((d) =>
2243 d.router).filter(Boolean) 2244 )), te; 2245} 2246function Oi(e) { 2247 return e != null && ("formData" in e && e.formData != null || "body" in e && e.body !== void 0); 2248} 2249function mr(e, t, r, i, n, l) { 2250 let o, c; 2251 if (n) { 2252 o = []; 2253 for (let h of t) 2254 if (o.push(h), h.route.id === n) { 2255 c = h; 2256 break; 2257 } 2258 } else 2259 o = t, c = t[t.length - 1]; 2260 let m = wr( 2261 i || ".", 2262 xr(o), 2263 Pe(e.pathname, r) || e.pathname, 2264 l === "path" 2265 ); 2266 if (i == null && (m.search = e.search, m.hash = e.hash), (i == null || i === "" || i === ".") && c) { 2267 let h = zr(m.search); 2268 if (c.route.index && !h) 2269 m.search = m.search ? m.search.replace(/^\?/, "?index&") : "?index"; 2270 else if (!c.route.index && h) { 2271 let u = new URLSearchParams(m.search), p = u.getAll("index"); 2272 u.delete("index"), p.filter((g) => g).forEach((g) => u.append("index", g)); 2273 let b = u.toString(); 2274 m.search = b ? `?${b}` : ""; 2275 } 2276 } 2277 return r !== "/" && (m.pathname = gi({ basename: r, pathname: m.pathname })), Le(m); 2278} 2279function ea(e, t, r) { 2280 if (!r || !Oi(r)) 2281 return { path: t }; 2282 if (r.formMethod && !tl(r.formMethod)) 2283 return { 2284 path: t, 2285 error: je(405, { method: r.formMethod }) 2286 }; 2287 let i = () => ({ 2288 path: t, 2289 error: je(400, { type: "invalid-body" }) 2290 }), l = (r.formMethod || "get").toUpperCase(), o = Wa(t); 2291 if (r.body !== void 0) { 2292 if (r.formEncType === "text/plain") { 2293 if (!he(l)) 2294 return i(); 2295 let p = typeof r.body == "string" ? r.body : r.body instanceof FormData || r.body instanceof URLSearchParams ? ( 2296 // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data 2297 Array.from(r.body.entries()).reduce( 2298 (b, [g, k]) => `${b}${g}=${k} 2299`, 2300 "" 2301 ) 2302 ) : String(r.body); 2303 return { 2304 path: t, 2305 submission: { 2306 formMethod: l, 2307 formAction: o, 2308 formEncType: r.formEncType, 2309 formData: void 0, 2310 json: void 0, 2311 text: p 2312 } 2313 }; 2314 } else if (r.formEncType === "application/json") { 2315 if (!he(l)) 2316 return i(); 2317 try { 2318 let p = typeof r.body == "string" ? JSON.parse(r.body) : r.body; 2319 return { 2320 path: t, 2321 submission: { 2322 formMethod: l, 2323 formAction: o, 2324 formEncType: r.formEncType, 2325 formData: void 0, 2326 json: p, 2327 text: void 0 2328 } 2329 }; 2330 } catch { 2331 return i(); 2332 } 2333 } 2334 } 2335 H( 2336 typeof FormData == "function", 2337 "FormData is not available in this environment" 2338 ); 2339 let c, m; 2340 if (r.formData) 2341 c = fr(r.formData), m = r.formData; 2342 else if (r.body instanceof FormData) 2343 c = fr(r.body), m = r.body; 2344 else if (r.body instanceof URLSearchParams) 2345 c = r.body, m = oa(c); 2346 else if (r.body == null) 2347 c = new URLSearchParams(), m = new FormData(); 2348 else 2349 try { 2350 c = new URLSearchParams(r.body), m = oa(c); 2351 } catch { 2352 return i(); 2353 } 2354 let h = { 2355 formMethod: l, 2356 formAction: o, 2357 formEncType: r && r.formEncType || "application/x-www-form-urlencoded", 2358 formData: m, 2359 json: void 0, 2360 text: void 0 2361 }; 2362 if (he(h.formMethod)) 2363 return { path: t, submission: h }; 2364 let u = Be(t); 2365 return e && u.search && zr(u.search) && c.append("index", ""), u.search = `?${c}`, { path: Le(u), submission: h }; 2366} 2367function ta(e, t, r, i, n, l, o, c, m, h, u, p, b, g, k, N, j, S, z, L, X) { 2368 let W = L ? ge(L[1]) ? L[1].error : L[1].data : void 0, te = n.createURL(l.location), y = n.createURL(m), O; 2369 if (u && l.errors) { 2370 let Z = Object.keys(l.errors)[0]; 2371 O = o.findIndex((Q) => Q.route.id === Z); 2372 } else if (L && ge(L[1])) { 2373 let Z = L[0]; 2374 O = o.findIndex((Q) => Q.route.id === Z) - 1; 2375 } 2376 let A = L ? L[1].statusCode : void 0, q = A && A >= 400, J = { 2377 currentUrl: te, 2378 currentParams: l.matches[0]?.params || {}, 2379 nextUrl: y, 2380 nextParams: o[0].params, 2381 ...c, 2382 actionResult: W, 2383 actionStatus: A 2384 }, ie = Mt(o), Se = o.map((Z, Q) => { 2385 let { route: we } = Z, B = null; 2386 if (O != null && Q > O ? B = !1 : we.lazy ? B = !0 : kr(we) ? u ? B = hr( 2387 we, 2388 l.loaderData, 2389 l.errors 2390 ) : _i(l.loaderData, l.matches[Q], Z) && (B = !0) : B = !1, B !== null) 2391 return ur( 2392 r, 2393 i, 2394 e, 2395 ie, 2396 Z, 2397 h, 2398 t, 2399 B 2400 ); 2401 let le = !1; 2402 typeof X == "boolean" ? le = X : q ? le = !1 : (p || te.pathname + te.search === y.pathname + y.search || te.search !== y.search || $i(l.matches[Q], Z)) && (le = !0); 2403 let fe = { 2404 ...J, 2405 defaultShouldRevalidate: le 2406 }, De = wt(Z, fe); 2407 return ur( 2408 r, 2409 i, 2410 e, 2411 ie, 2412 Z, 2413 h, 2414 t, 2415 De, 2416 fe, 2417 X 2418 ); 2419 }), ne = [];
2420 return k.forEach((Z, Q) => { 2421 if (u || !o.some((Ne) => Ne.route.id === Z.routeId) || g.has(Q)) 2422 return; 2423 let we = l.fetchers.get(Q), B = we && we.state !== "idle" && we.data === void 0, le = Ke(j, Z.path, S); 2424 if (!le) { 2425 if (z && B) 2426 return; 2427 ne.push({ 2428 key: Q, 2429 routeId: Z.routeId, 2430 path: Z.path, 2431 matches: null, 2432 match: null, 2433 request: null, 2434 controller: null 2435 }); 2436 return; 2437 } 2438 if (N.has(Q)) 2439 return; 2440 let fe = Wt(le, Z.path), De = new AbortController(), pe = nt( 2441 n, 2442 Z.path, 2443 De.signal 2444 ), ke = null; 2445 if (b.has(Q)) 2446 b.delete(Q), ke = ot( 2447 r, 2448 i, 2449 pe, 2450 le, 2451 fe, 2452 h, 2453 t 2454 ); 2455 else if (B) 2456 p && (ke = ot( 2457 r, 2458 i, 2459 pe, 2460 le, 2461 fe, 2462 h, 2463 t 2464 )); 2465 else { 2466 let Ne; 2467 typeof X == "boolean" ? Ne = X : q ? Ne = !1 : Ne = p; 2468 let ye = { 2469 ...J, 2470 defaultShouldRevalidate: Ne 2471 }; 2472 wt(fe, ye) && (ke = ot( 2473 r, 2474 i, 2475 pe, 2476 le, 2477 fe, 2478 h, 2479 t, 2480 ye 2481 )); 2482 } 2483 ke && ne.push({ 2484 key: Q, 2485 routeId: Z.routeId, 2486 path: Z.path, 2487 matches: ke, 2488 match: fe, 2489 request: pe, 2490 controller: De 2491 }); 2492 }), { dsMatches: Se, revalidatingFetchers: ne }; 2493} 2494function kr(e) { 2495 return e.loader != null || e.middleware != null && e.middleware.length > 0; 2496} 2497function hr(e, t, r) { 2498 if (e.lazy) 2499 return !0; 2500 if (!kr(e)) 2501 return !1; 2502 let i = t != null && e.id in t, n = r != null && r[e.id] !== void 0; 2503 return !i && n ? !1 : typeof e.loader == "function" && e.loader.hydrate === !0 ? !0 : !i && !n; 2504} 2505function _i(e, t, r) { 2506 let i = ( 2507 // [a] -> [a, b] 2508 !t || // [a, b] -> [a, c] 2509 r.route.id !== t.route.id 2510 ), n = !e.hasOwnProperty(r.route.id); 2511 return i || n; 2512} 2513function $i(e, t) { 2514 let r = e.route.path; 2515 return ( 2516 // param change for this match, /users/123 -> /users/456 2517 e.pathname !== t.pathname || // splat param changed, which is not present in match.path 2518 // e.g. /files/images/avatar.jpg -> files/finances.xls 2519 r != null && r.endsWith("*") && e.params["*"] !== t.params["*"] 2520 ); 2521} 2522function wt(e, t) { 2523 if (e.route.shouldRevalidate) { 2524 let r = e.route.shouldRevalidate(t); 2525 if (typeof r == "boolean") 2526 return r; 2527 } 2528 return t.defaultShouldRevalidate; 2529} 2530function ra(e, t, r, i, n, l) { 2531 let o; 2532 if (e) { 2533 let h = i[e]; 2534 H( 2535 h, 2536 `No route found to patch children into: routeId = ${e}` 2537 ), h.children || (h.children = []), o = h.children; 2538 } else 2539 o = r; 2540 let c = [], m = []; 2541 if (t.forEach((h) => { 2542 let u = o.find( 2543 (p) => Ka(h, p) 2544 ); 2545 u ? m.push({ existingRoute: u, newRoute: h }) : c.push(h); 2546 }), c.length > 0) { 2547 let h = zt( 2548 c, 2549 n, 2550 [e || "_", "patch", String(o?.length || "0")], 2551 i 2552 ); 2553 o.push(...h); 2554 } 2555 if (l && m.length > 0) 2556 for (let h = 0; h < m.length; h++) { 2557 let { existingRoute: u, newRoute: p } = m[h], b = u, [g] = zt( 2558 [p], 2559 n, 2560 [], 2561 // Doesn't matter for mutated routes since they already have an id 2562 {}, 2563 // Don't touch the manifest here since we're updating in place 2564 !0 2565 ); 2566 Object.assign(b, { 2567 element: g.element ? g.element : b.element, 2568 errorElement: g.errorElement ? g.errorElement : b.errorElement, 2569 hydrateFallbackElement: g.hydrateFallbackElement ? g.hydrateFallbackElement : b.hydrateFallbackElement 2570 }); 2571 } 2572} 2573function Ka(e, t) { 2574 return "id" in e && "id" in t && e.id === t.id ? !0 : e.index === t.index && e.path === t.path && e.caseSensitive === t.caseSensitive ? (!e.children || e.children.length === 0) && (!t.children || t.children.length === 0) ? !0 : e.children.every( 2575 (r, i) => t.children?.some((n) => Ka(r, n)) 2576 ) : !1; 2577} 2578var aa = /* @__PURE__ */ new WeakMap(), Va = ({ 2579 key: e, 2580 route: t, 2581 manifest: r, 2582 mapRouteProperties: i 2583}) => { 2584 let n = r[t.id]; 2585 if (H(n, "No route found in manifest"), !n.lazy || typeof n.lazy != "object") 2586 return; 2587 let l = n.lazy[e]; 2588 if (!l) 2589 return; 2590 let o = aa.get(n); 2591 o || (o = {}, aa.set(n, o)); 2592 let c = o[e]; 2593 if (c) 2594 return c; 2595 let m = (async () => { 2596 let h = ti(e), p = n[e] !== void 0 && e !== "hasErrorBoundary"; 2597 if (h) 2598 ae( 2599 !h, 2600 "Route property " + e + " is not a supported lazy route property. This property will be ignored." 2601 ), o[e] = Promise.resolve(); 2602 else if (p) 2603 ae( 2604 !1, 2605 `Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.` 2606 ); 2607 else { 2608 let b = await l(); 2609 b != null && (Object.assign(n, { [e]: b }), Object.assign(n, i(n))); 2610 } 2611 typeof n.lazy == "object" && (n.lazy[e] = void 0, Object.values(n.lazy).every((b) => b === void 0) && (n.lazy = void 0)); 2612 })();
2613 return o[e] = m, m; 2614}, na = /* @__PURE__ */ new WeakMap(); 2615function Hi(e, t, r, i, n) { 2616 let l = r[e.id]; 2617 if (H(l, "No route found in manifest"), !e.lazy) 2618 return { 2619 lazyRoutePromise: void 0, 2620 lazyHandlerPromise: void 0 2621 }; 2622 if (typeof e.lazy == "function") { 2623 let u = na.get(l); 2624 if (u) 2625 return { 2626 lazyRoutePromise: u, 2627 lazyHandlerPromise: u 2628 }; 2629 let p = (async () => { 2630 H( 2631 typeof e.lazy == "function", 2632 "No lazy route function found" 2633 ); 2634 let b = await e.lazy(), g = {}; 2635 for (let k in b) { 2636 let N = b[k]; 2637 if (N === void 0) 2638 continue; 2639 let j = ai(k), z = l[k] !== void 0 && // This property isn't static since it should always be updated based 2640 // on the route updates 2641 k !== "hasErrorBoundary"; 2642 j ? ae( 2643 !j, 2644 "Route property " + k + " is not a supported property to be returned from a lazy route function. This property will be ignored." 2645 ) : z ? ae( 2646 !z, 2647 `Route "${l.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.` 2648 ) : g[k] = N; 2649 } 2650 Object.assign(l, g), Object.assign(l, { 2651 // To keep things framework agnostic, we use the provided `mapRouteProperties` 2652 // function to set the framework-aware properties (`element`/`hasErrorBoundary`) 2653 // since the logic will differ between frameworks. 2654 ...i(l), 2655 lazy: void 0 2656 }); 2657 })(); 2658 return na.set(l, p), p.catch(() => { 2659 }), { 2660 lazyRoutePromise: p, 2661 lazyHandlerPromise: p 2662 }; 2663 } 2664 let o = Object.keys(e.lazy), c = [], m; 2665 for (let u of o) { 2666 if (n && n.includes(u)) 2667 continue; 2668 let p = Va({ 2669 key: u, 2670 route: e, 2671 manifest: r, 2672 mapRouteProperties: i 2673 }); 2674 p && (c.push(p), u === t && (m = p)); 2675 } 2676 let h = c.length > 0 ? Promise.all(c).then(() => { 2677 }) : void 0; 2678 return h?.catch(() => { 2679 }), m?.catch(() => { 2680 }), { 2681 lazyRoutePromise: h, 2682 lazyHandlerPromise: m 2683 }; 2684} 2685async function ia(e) { 2686 let t = e.matches.filter((n) => n.shouldLoad), r = {}; 2687 return (await Promise.all(t.map((n) => n.resolve()))).forEach((n, l) => { 2688 r[t[l].route.id] = n; 2689 }), r; 2690} 2691async function Ki(e) { 2692 return e.matches.some((t) => t.route.middleware) ? Ia(e, () => ia(e)) : ia(e); 2693} 2694function Ia(e, t) { 2695 return Vi( 2696 e, 2697 t, 2698 (i) => { 2699 if (el(i)) 2700 throw i; 2701 return i; 2702 }, 2703 Yi, 2704 r 2705 ); 2706 function r(i, n, l) { 2707 if (l) 2708 return Promise.resolve( 2709 Object.assign(l.value, { 2710 [n]: { type: "error", result: i } 2711 }) 2712 ); 2713 { 2714 let { matches: o } = e, c = Math.min( 2715 // Throwing route 2716 Math.max( 2717 o.findIndex((h) => h.route.id === n), 2718 0 2719 ), 2720 // or the shallowest route that needs to load data 2721 Math.max( 2722 o.findIndex((h) => h.shouldCallHandler()), 2723 0 2724 ) 2725 ), m = Ve( 2726 o, 2727 o[c].route.id 2728 ).route.id; 2729 return Promise.resolve({ 2730 [m]: { type: "error", result: i } 2731 }); 2732 } 2733 } 2734} 2735async function Vi(e, t, r, i, n) { 2736 let { matches: l, request: o, params: c, context: m, unstable_pattern: h } = e, u = l.flatMap( 2737 (b) => b.route.middleware ? b.route.middleware.map((g) => [b.route.id, g]) : [] 2738 ); 2739 return await Ua( 2740 { 2741 request: o, 2742 params: c, 2743 context: m, 2744 unstable_pattern: h 2745 }, 2746 u, 2747 t, 2748 r, 2749 i, 2750 n 2751 ); 2752} 2753async function Ua(e, t, r, i, n, l, o = 0) { 2754 let { request: c } = e; 2755 if (c.signal.aborted) 2756 throw c.signal.reason ?? new Error(`Request aborted: ${c.method} ${c.url}`); 2757 let m = t[o]; 2758 if (!m) 2759 return await r(); 2760 let [h, u] = m, p, b = async () => { 2761 if (p) 2762 throw new Error("You may only call `next()` once per middleware"); 2763 try { 2764 return p = { value: await Ua( 2765 e, 2766 t, 2767 r, 2768 i, 2769 n, 2770 l, 2771 o + 1 2772 ) }, p.value; 2773 } catch (g) { 2774 return p = { value: await l(g, h, p) }, p.value; 2775 } 2776 }; 2777 try { 2778 let g = await u(e, b), k = g != null ? i(g) : void 0; 2779 return n(k) ? k : p ? k ?? p.value : (p = { value: await b() }, p.value); 2780 } catch (g) { 2781 return await l(g, h, p); 2782 } 2783} 2784function Aa(e, t, r, i, n) { 2785 let l = Va({ 2786 key: "middleware", 2787 route: i.route, 2788 manifest: t, 2789 mapRouteProperties: e 2790 }), o = Hi( 2791 i.route, 2792 he(r.method) ? "action" : "loader", 2793 t, 2794 e, 2795 n 2796 ); 2797 return { 2798 middleware: l, 2799 route: o.lazyRoutePromise, 2800 handler: o.lazyHandlerPromise 2801 }; 2802} 2803function ur(e, t, r, i, n, l, o, c, m = null, h) { 2804 let u = !1, p = Aa( 2805 e, 2806 t, 2807 r, 2808 n, 2809 l 2810 ); 2811 return { 2812 ...n, 2813 _lazyPromises: p, 2814 shouldLoad: c, 2815 shouldRevalidateArgs: m, 2816 shouldCallHandler(b) { 2817 return u = !0, m ? typeof h == "boolean" ? wt(n, { 2818 ...m, 2819 defaultShouldRevalidate: h 2820 }) : typeof b == "boolean" ? wt(n, { 2821 ...m, 2822 defaultShouldRevalidate: b 2823 }) : wt(n, m) : c; 2824 }, 2825 resolve(b) { 2826 let { lazy: g, loader: k, middleware: N } = n.route, j = u || c || b && !he(r.method) && (g || k), S = N && N.length > 0 && !k && !g; 2827 return j && (he(r.method) || !S) ? Ui({ 2828 request: r, 2829 unstable_pattern: i, 2830 match: n, 2831 lazyHandlerPromise: p?.handler, 2832 lazyRoutePromise: p?.route, 2833 handlerOverride: b, 2834 scopedContext: o 2835 }) : Promise.resolve({ type: "data", result: void 0 }); 2836 } 2837 }; 2838} 2839function ot(e, t, r, i, n, l, o, c = null) { 2840 return i.map((m) => m.route.id !== n.route.id ? { 2841 ...m, 2842 shouldLoad: !1, 2843 shouldRevalidateArgs: c, 2844 shouldCallHandler: () => !1, 2845 _lazyPromises: Aa( 2846 e, 2847 t, 2848 r, 2849 m, 2850 l 2851 ), 2852 resolve: () => Promise.resolve({ type: "data", result: void 0 }) 2853 } : ur( 2854 e, 2855 t, 2856 r, 2857 Mt(i), 2858 m, 2859 l, 2860 o, 2861 !0, 2862 c 2863 )); 2864} 2865async function Ii(e, t, r, i, n, l) { 2866 r.some((h) => h._lazyPromises?.middleware) && await Promise.all(r.map((h) => h._lazyPromises?.middleware)); 2867 let o = { 2868 request: t, 2869 unstable_pattern: Mt(r), 2870 params: r[0].params, 2871 context: n, 2872 matches: r 2873 }, m = await e({ 2874 ...o, 2875 fetcherKey: i, 2876 runClientMiddleware: (h) => { 2877 let u = o; 2878 return Ia(u, () => h({ 2879 ...u, 2880 fetcherKey: i, 2881 runClientMiddleware: () => { 2882 throw new Error( 2883 "Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler" 2884 ); 2885 } 2886 })); 2887 } 2888 }); 2889 try { 2890 await Promise.all( 2891 r.flatMap((h) => [ 2892 h._lazyPromises?.handler, 2893 h._lazyPromises?.route 2894 ]) 2895 ); 2896 } catch { 2897 } 2898 return m; 2899} 2900async function Ui({ 2901 request: e, 2902 unstable_pattern: t, 2903 match: r, 2904 lazyHandlerPromise: i, 2905 lazyRoutePromise: n, 2906 handlerOverride: l, 2907 scopedContext: o 2908}) { 2909 let c, m, h = he(e.method), u = h ? "action" : "loader", p = (b) => { 2910 let g, k = new Promise((S, z) => g = z); 2911 m = () => g(), e.signal.addEventListener("abort", m); 2912 let N = (S) => typeof b != "function" ? Promise.reject( 2913 new Error( 2914 `You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${r.route.id}]` 2915 ) 2916 ) : b( 2917 { 2918 request: e, 2919 unstable_pattern: t, 2920 params: r.params, 2921 context: o 2922 }, 2923 ...S !== void 0 ? [S] : [] 2924 ), j = (async () => {
2925 try { 2926 return { type: "data", result: await (l ? l((z) => N(z)) : N()) }; 2927 } catch (S) { 2928 return { type: "error", result: S }; 2929 } 2930 })(); 2931 return Promise.race([j, k]); 2932 }; 2933 try { 2934 let b = h ? r.route.action : r.route.loader; 2935 if (i || n) 2936 if (b) { 2937 let g, [k] = await Promise.all([ 2938 // If the handler throws, don't let it immediately bubble out, 2939 // since we need to let the lazy() execution finish so we know if this 2940 // route has a boundary that can handle the error 2941 p(b).catch((N) => { 2942 g = N; 2943 }), 2944 // Ensure all lazy route promises are resolved before continuing 2945 i, 2946 n 2947 ]); 2948 if (g !== void 0) 2949 throw g; 2950 c = k; 2951 } else { 2952 await i; 2953 let g = h ? r.route.action : r.route.loader; 2954 if (g) 2955 [c] = await Promise.all([p(g), n]); 2956 else if (u === "action") { 2957 let k = new URL(e.url), N = k.pathname + k.search; 2958 throw je(405, { 2959 method: e.method, 2960 pathname: N, 2961 routeId: r.route.id 2962 }); 2963 } else 2964 return { type: "data", result: void 0 }; 2965 } 2966 else if (b) 2967 c = await p(b); 2968 else { 2969 let g = new URL(e.url), k = g.pathname + g.search; 2970 throw je(404, { 2971 pathname: k 2972 }); 2973 } 2974 } catch (b) { 2975 return { type: "error", result: b }; 2976 } finally { 2977 m && e.signal.removeEventListener("abort", m); 2978 } 2979 return c; 2980} 2981async function Ai(e) { 2982 let t = e.headers.get("Content-Type"); 2983 return t && /\bapplication\/json\b/.test(t) ? e.body == null ? null : e.json() : e.text(); 2984} 2985async function Wi(e) { 2986 let { result: t, type: r } = e; 2987 if (Nr(t)) { 2988 let i; 2989 try { 2990 i = await Ai(t); 2991 } catch (n) { 2992 return { type: "error", error: n }; 2993 } 2994 return r === "error" ? { 2995 type: "error", 2996 error: new Et(t.status, t.statusText, i), 2997 statusCode: t.status, 2998 headers: t.headers 2999 } : { 3000 type: "data", 3001 data: i, 3002 statusCode: t.status, 3003 headers: t.headers 3004 }; 3005 } 3006 return r === "error" ? ma(t) ? t.data instanceof Error ? { 3007 type: "error", 3008 error: t.data, 3009 statusCode: t.init?.status, 3010 headers: t.init?.headers ? new Headers(t.init.headers) : void 0 3011 } : { 3012 type: "error", 3013 error: Ji(t), 3014 statusCode: jt(t) ? t.status : void 0, 3015 headers: t.init?.headers ? new Headers(t.init.headers) : void 0 3016 } : { 3017 type: "error", 3018 error: t, 3019 statusCode: jt(t) ? t.status : void 0 3020 } : ma(t) ? { 3021 type: "data", 3022 data: t.data, 3023 statusCode: t.init?.status, 3024 headers: t.init?.headers ? new Headers(t.init.headers) : void 0 3025 } : { type: "data", data: t }; 3026} 3027function Bi(e, t, r, i, n) { 3028 let l = e.headers.get("Location"); 3029 if (H( 3030 l, 3031 "Redirects returned/thrown from loaders/actions must have a Location header" 3032 ), !br(l)) { 3033 let o = i.slice( 3034 0, 3035 i.findIndex((c) => c.route.id === r) + 1 3036 ); 3037 l = mr( 3038 new URL(t.url), 3039 o, 3040 n, 3041 l 3042 ), e.headers.set("Location", l); 3043 } 3044 return e; 3045} 3046function la(e, t, r, i) { 3047 let n = [ 3048 "about:", 3049 "blob:", 3050 "chrome:", 3051 "chrome-untrusted:", 3052 "content:", 3053 "data:", 3054 "devtools:", 3055 "file:", 3056 "filesystem:", 3057 // eslint-disable-next-line no-script-url 3058 "javascript:" 3059 ]; 3060 if (br(e)) { 3061 let l = e, o = l.startsWith("//") ? new URL(t.protocol + l) : new URL(l); 3062 if (n.includes(o.protocol)) 3063 throw new Error("Invalid redirect location"); 3064 let c = Pe(o.pathname, r) != null; 3065 if (o.origin === t.origin && c) 3066 return o.pathname + o.search + o.hash; 3067 } 3068 try { 3069 let l = i.createURL(e); 3070 if (n.includes(l.protocol)) 3071 throw new Error("Invalid redirect location"); 3072 } catch { 3073 } 3074 return e; 3075} 3076function nt(e, t, r, i) { 3077 let n = e.createURL(Wa(t)).toString(), l = { signal: r }; 3078 if (i && he(i.formMethod)) { 3079 let { formMethod: o, formEncType: c } = i; 3080 l.method = o.toUpperCase(), c === "application/json" ? (l.headers = new Headers({ "Content-Type": c }), l.body = JSON.stringify(i.json)) : c === "text/plain" ? l.body = i.text : c === "application/x-www-form-urlencoded" && i.formData ? l.body = fr(i.formData) : l.body = i.formData; 3081 }
3082 return new Request(n, l); 3083} 3084function fr(e) { 3085 let t = new URLSearchParams(); 3086 for (let [r, i] of e.entries()) 3087 t.append(r, typeof i == "string" ? i : i.name); 3088 return t; 3089} 3090function oa(e) { 3091 let t = new FormData(); 3092 for (let [r, i] of e.entries()) 3093 t.append(r, i); 3094 return t; 3095} 3096function Gi(e, t, r, i = !1, n = !1) { 3097 let l = {}, o = null, c, m = !1, h = {}, u = r && ge(r[1]) ? r[1].error : void 0; 3098 return e.forEach((p) => { 3099 if (!(p.route.id in t)) 3100 return; 3101 let b = p.route.id, g = t[b]; 3102 if (H( 3103 !et(g), 3104 "Cannot handle redirect results in processLoaderData" 3105 ), ge(g)) { 3106 let k = g.error; 3107 if (u !== void 0 && (k = u, u = void 0), o = o || {}, n) 3108 o[b] = k; 3109 else { 3110 let N = Ve(e, b); 3111 o[N.route.id] == null && (o[N.route.id] = k); 3112 } 3113 i || (l[b] = Ha), m || (m = !0, c = jt(g.error) ? g.error.status : 500), g.headers && (h[b] = g.headers); 3114 } else 3115 l[b] = g.data, g.statusCode && g.statusCode !== 200 && !m && (c = g.statusCode), g.headers && (h[b] = g.headers); 3116 }), u !== void 0 && r && (o = { [r[0]]: u }, r[2] && (l[r[2]] = void 0)), { 3117 loaderData: l, 3118 errors: o, 3119 statusCode: c || 200, 3120 loaderHeaders: h 3121 }; 3122} 3123function sa(e, t, r, i, n, l) { 3124 let { loaderData: o, errors: c } = Gi( 3125 t, 3126 r, 3127 i 3128 ); 3129 return n.filter((m) => !m.matches || m.matches.some((h) => h.shouldLoad)).forEach((m) => { 3130 let { key: h, match: u, controller: p } = m; 3131 if (p && p.signal.aborted) 3132 return; 3133 let b = l[h]; 3134 if (H(b, "Did not find corresponding fetcher result"), ge(b)) { 3135 let g = Ve(e.matches, u?.route.id); 3136 c && c[g.route.id] || (c = { 3137 ...c, 3138 [g.route.id]: b.error 3139 }), e.fetchers.delete(h); 3140 } else if (et(b)) 3141 H(!1, "Unhandled fetcher revalidation redirect"); 3142 else { 3143 let g = _e(b.data); 3144 e.fetchers.set(h, g); 3145 } 3146 }), { loaderData: o, errors: c }; 3147} 3148function ca(e, t, r, i) { 3149 let n = Object.entries(t).filter(([, l]) => l !== Ha).reduce((l, [o, c]) => (l[o] = c, l), {}); 3150 for (let l of r) { 3151 let o = l.route.id; 3152 if (!t.hasOwnProperty(o) && e.hasOwnProperty(o) && l.route.loader && (n[o] = e[o]), i && i.hasOwnProperty(o)) 3153 break; 3154 } 3155 return n; 3156} 3157function da(e) { 3158 return e ? ge(e[1]) ? { 3159 // Clear out prior actionData on errors 3160 actionData: {} 3161 } : { 3162 actionData: { 3163 [e[0]]: e[1].data 3164 } 3165 } : {}; 3166} 3167function Ve(e, t) { 3168 return (t ? e.slice(0, e.findIndex((i) => i.route.id === t) + 1) : [...e]).reverse().find((i) => i.route.hasErrorBoundary === !0) || e[0]; 3169} 3170function It(e) { 3171 let t = e.length === 1 ? e[0] : e.find((r) => r.index || !r.path || r.path === "/") || { 3172 id: "__shim-error-route__" 3173 }; 3174 return { 3175 matches: [ 3176 { 3177 params: {}, 3178 pathname: "", 3179 pathnameBase: "", 3180 route: t 3181 } 3182 ], 3183 route: t 3184 }; 3185} 3186function je(e, { 3187 pathname: t, 3188 routeId: r, 3189 method: i, 3190 type: n, 3191 message: l 3192} = {}) { 3193 let o = "Unknown Server Error", c = "Unknown @remix-run/router error"; 3194 return e === 400 ? (o = "Bad Request", i && t && r ? c = `You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.` : n === "invalid-body" && (c = "Unable to encode submission body")) : e === 403 ? (o = "Forbidden", c = `Route "${r}" does not match URL "${t}"`) : e === 404 ? (o = "Not Found", c = `No route matches URL "${t}"`) : e === 405 && (o = "Method Not Allowed", i && t && r ? c = `You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.` : i && (c = `Invalid request method "${i.toUpperCase()}"`)), new Et( 3195 e || 500, 3196 o, 3197 new Error(c), 3198 !0 3199 ); 3200} 3201function Ut(e) { 3202 let t = Object.entries(e); 3203 for (let r = t.length - 1; r >= 0; r--) { 3204 let [i, n] = t[r]; 3205 if (et(n)) 3206 return { key: i, result: n }; 3207 } 3208} 3209function Wa(e) { 3210 let t = typeof e == "string" ? Be(e) : e; 3211 return Le({ ...t, hash: "" }); 3212} 3213function Zi(e, t) { 3214 return e.pathname !== t.pathname || e.search !== t.search ? !1 : e.hash === "" ? t.hash !== "" : e.hash === t.hash ? !0 : t.hash !== ""; 3215} 3216function Ji(e) { 3217 return new Et( 3218 e.init?.status ?? 500, 3219 e.init?.statusText ?? "Internal Server Error", 3220 e.data 3221 ); 3222} 3223function Yi(e) { 3224 return e != null && typeof e == "object" && Object.entries(e).every( 3225 ([t, r]) => typeof t == "string" && qi(r) 3226 ); 3227} 3228function qi(e) { 3229 return e != null && typeof e == "object" && "type" in e && "result" in e && (e.type === "data" || e.type === "error"); 3230} 3231function Xi(e) { 3232 return Nr(e.result) && _a.has(e.result.status); 3233} 3234function ge(e) { 3235 return e.type === "error"; 3236} 3237function et(e) { 3238 return (e && e.type) === "redirect"; 3239} 3240function ma(e) { 3241 return typeof e == "object" && e != null && "type" in e && "data" in e && "init" in e && e.type === "DataWithResponseInit"; 3242} 3243function Nr(e) { 3244 return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.headers == "object" && typeof e.body < "u"; 3245} 3246function Qi(e) { 3247 return _a.has(e); 3248} 3249function el(e) { 3250 return Nr(e) && Qi(e.status) && e.headers.has("Location"); 3251} 3252function tl(e) { 3253 return Mi.has(e.toUpperCase()); 3254} 3255function he(e) { 3256 return Di.has(e.toUpperCase()); 3257} 3258function zr(e) { 3259 return new URLSearchParams(e).getAll("index").some((t) => t === ""); 3260} 3261function Wt(e, t) { 3262 let r = typeof t == "string" ? Be(t).search : t.search; 3263 if (e[e.length - 1].route.index && zr(r || "")) 3264 return e[e.length - 1]; 3265 let i = Ca(e); 3266 return i[i.length - 1]; 3267} 3268function ha(e) { 3269 let { formMethod: t, formAction: r, formEncType: i, text: n, formData: l, json: o } = e; 3270 if (!(!t || !r || !i)) { 3271 if (n != null) 3272 return { 3273 formMethod: t, 3274 formAction: r, 3275 formEncType: i, 3276 formData: void 0, 3277 json: void 0, 3278 text: n 3279 }; 3280 if (l != null) 3281 return { 3282 formMethod: t, 3283 formAction: r, 3284 formEncType: i, 3285 formData: l, 3286 json: void 0, 3287 text: void 0 3288 }; 3289 if (o !== void 0) 3290 return { 3291 formMethod: t, 3292 formAction: r, 3293 formEncType: i, 3294 formData: void 0, 3295 json: o, 3296 text: void 0 3297 }; 3298 } 3299} 3300function sr(e, t) { 3301 return t ? { 3302 state: "loading", 3303 location: e, 3304 formMethod: t.formMethod, 3305 formAction: t.formAction, 3306 formEncType: t.formEncType, 3307 formData: t.formData, 3308 json: t.json, 3309 text: t.text 3310 }
3310 : { 3311 state: "loading", 3312 location: e, 3313 formMethod: void 0, 3314 formAction: void 0, 3315 formEncType: void 0, 3316 formData: void 0, 3317 json: void 0, 3318 text: void 0 3319 }; 3320} 3321function rl(e, t) { 3322 return { 3323 state: "submitting", 3324 location: e, 3325 formMethod: t.formMethod, 3326 formAction: t.formAction, 3327 formEncType: t.formEncType, 3328 formData: t.formData, 3329 json: t.json, 3330 text: t.text 3331 }; 3332} 3333function yt(e, t) { 3334 return e ? { 3335 state: "loading", 3336 formMethod: e.formMethod, 3337 formAction: e.formAction, 3338 formEncType: e.formEncType, 3339 formData: e.formData, 3340 json: e.json, 3341 text: e.text, 3342 data: t 3343 } : { 3344 state: "loading", 3345 formMethod: void 0, 3346 formAction: void 0, 3347 formEncType: void 0, 3348 formData: void 0, 3349 json: void 0, 3350 text: void 0, 3351 data: t 3352 }; 3353} 3354function al(e, t) { 3355 return { 3356 state: "submitting", 3357 formMethod: e.formMethod, 3358 formAction: e.formAction, 3359 formEncType: e.formEncType, 3360 formData: e.formData, 3361 json: e.json, 3362 text: e.text, 3363 data: t ? t.data : void 0 3364 }; 3365} 3366function _e(e) { 3367 return { 3368 state: "idle", 3369 formMethod: void 0, 3370 formAction: void 0, 3371 formEncType: void 0, 3372 formData: void 0, 3373 json: void 0, 3374 text: void 0, 3375 data: e 3376 }; 3377} 3378function nl(e, t) { 3379 try { 3380 let r = e.sessionStorage.getItem( 3381 $a 3382 ); 3383 if (r) { 3384 let i = JSON.parse(r); 3385 for (let [n, l] of Object.entries(i || {})) 3386 l && Array.isArray(l) && t.set(n, new Set(l || [])); 3387 } 3388 } catch { 3389 } 3390} 3391function il(e, t) { 3392 if (t.size > 0) { 3393 let r = {}; 3394 for (let [i, n] of t) 3395 r[i] = [...n]; 3396 try { 3397 e.sessionStorage.setItem( 3398 $a, 3399 JSON.stringify(r) 3400 ); 3401 } catch (i) { 3402 ae( 3403 !1, 3404 `Failed to save applied view transitions in sessionStorage (${i}).` 3405 ); 3406 } 3407 } 3408} 3409function ua() { 3410 let e, t, r = new Promise((i, n) => { 3411 e = async (l) => { 3412 i(l); 3413 try { 3414 await r; 3415 } catch { 3416 } 3417 }, t = async (l) => { 3418 n(l); 3419 try { 3420 await r; 3421 } catch { 3422 } 3423 }; 3424 }); 3425 return { 3426 promise: r, 3427 //@ts-ignore 3428 resolve: e, 3429 //@ts-ignore 3430 reject: t 3431 }; 3432} 3433var tt = xe(null); 3434tt.displayName = "DataRouter"; 3435var Ct = xe(null); 3436Ct.displayName = "DataRouterState"; 3437var Ba = xe(!1); 3438function ll() { 3439 return K(Ba); 3440} 3441var jr = xe({ 3442 isTransitioning: !1 3443}); 3444jr.displayName = "ViewTransition"; 3445var Ga = xe( 3446 /* @__PURE__ */ new Map() 3447); 3448Ga.displayName = "Fetchers"; 3449var ol = xe(null); 3450ol.displayName = "Await"; 3451var Re = xe( 3452 null 3453); 3454Re.displayName = "Navigation"; 3455var Xt = xe( 3456 null 3457); 3458Xt.displayName = "Location"; 3459var Ee = xe({ 3460 outlet: null, 3461 matches: [], 3462 isDataRoute: !1 3463}); 3464Ee.displayName = "Route"; 3465var Pr = xe(null); 3466Pr.displayName = "RouteError"; 3467var Za = "REACT_ROUTER_ERROR", sl = "REDIRECT", cl = "ROUTE_ERROR_RESPONSE"; 3468function dl(e) { 3469 if (e.startsWith(`${Za}:${sl}:{`)) 3470 try { 3471 let t = JSON.parse(e.slice(28)); 3472 if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") 3473 return t; 3474 } catch { 3475 } 3476} 3477function ml(e) { 3478 if (e.startsWith( 3479 `${Za}:${cl}:{` 3480 )) 3481 try { 3482 let t = JSON.parse(e.slice(40)); 3483 if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") 3484 return new Et( 3485 t.status, 3486 t.statusText, 3487 t.data 3488 ); 3489 } catch { 3490 } 3491} 3492function hl(e, { relative: t } = {}) { 3493 H( 3494 Lt(), 3495 // TODO: This error is probably because they somehow have 2 versions of the 3496 // router loaded. We can help them understand how to avoid that. 3497 "useHref() may be used only in the context of a <Router> component." 3498 ); 3499 let { basename: r, navigator: i } = K(Re), { hash: n, pathname: l, search: o } = Ft(e, { relative: t }), c = l; 3500 return r !== "/" && (c = l === "/" ? r : Ce([r, l])), i.createHref({ pathname: c, search: o, hash: n }); 3501} 3502function Lt() { 3503 return K(Xt) != null; 3504} 3505function Ge() { 3506 return H( 3507 Lt(), 3508 // TODO: This error is probably because they somehow have 2 versions of the 3509 // router loaded. We can help them understand how to avoid that. 3510 "useLocation() may be used only in the context of a <Router> component." 3511 ), K(Xt).location; 3512} 3513var Ja = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
3514function Ya(e) { 3515 K(Re).static || gr(e); 3516} 3517function ul() { 3518 let { isDataRoute: e } = K(Ee); 3519 return e ? Sl() : fl(); 3520} 3521function fl() { 3522 H( 3523 Lt(), 3524 // TODO: This error is probably because they somehow have 2 versions of the 3525 // router loaded. We can help them understand how to avoid that. 3526 "useNavigate() may be used only in the context of a <Router> component." 3527 ); 3528 let e = K(tt), { basename: t, navigator: r } = K(Re), { matches: i } = K(Ee), { pathname: n } = Ge(), l = JSON.stringify(xr(i)), o = Dt(!1); 3529 return Ya(() => { 3530 o.current = !0; 3531 }), dt( 3532 (m, h = {}) => { 3533 if (ae(o.current, Ja), !o.current) return; 3534 if (typeof m == "number") { 3535 r.go(m); 3536 return; 3537 } 3538 let u = wr( 3539 m, 3540 JSON.parse(l), 3541 n, 3542 h.relative === "path" 3543 ); 3544 e == null && t !== "/" && (u.pathname = u.pathname === "/" ? t : Ce([t, u.pathname])), (h.replace ? r.replace : r.push)( 3545 u, 3546 h.state, 3547 h 3548 ); 3549 }, 3550 [ 3551 t, 3552 r, 3553 l, 3554 n, 3555 e 3556 ] 3557 ); 3558} 3559var pl = xe(null); 3560function vl(e) { 3561 let t = K(Ee).outlet; 3562 return be( 3563 () => t && /* @__PURE__ */ T(pl.Provider, { value: e }, t), 3564 [t, e] 3565 ); 3566} 3567function qa() { 3568 let { matches: e } = K(Ee), t = e[e.length - 1]; 3569 return t ? t.params : {}; 3570} 3571function Ft(e, { relative: t } = {}) { 3572 let { matches: r } = K(Ee), { pathname: i } = Ge(), n = JSON.stringify(xr(r)); 3573 return be( 3574 () => wr( 3575 e, 3576 JSON.parse(n), 3577 i, 3578 t === "path" 3579 ), 3580 [e, n, i, t] 3581 ); 3582} 3583function yl(e, t, r, i, n) { 3584 H( 3585 Lt(), 3586 // TODO: This error is probably because they somehow have 2 versions of the 3587 // router loaded. We can help them understand how to avoid that. 3588 "useRoutes() may be used only in the context of a <Router> component." 3589 ); 3590 let { navigator: l } = K(Re), { matches: o } = K(Ee), c = o[o.length - 1], m = c ? c.params : {}, h = c ? c.pathname : "/", u = c ? c.pathnameBase : "/", p = c && c.route; 3591 { 3592 let z = p && p.path || ""; 3593 Qa( 3594 h, 3595 !p || z.endsWith("*") || z.endsWith("*?"), 3596 `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${z}">) 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. 3597 3598Please change the parent <Route path="${z}"> to <Route path="${z === "/" ? "*" : `${z}/*`}">.` 3599 ); 3600 } 3601 let b = Ge(), g; 3602 g = b; 3603 let k = g.pathname || "/", N = k; 3604 if (u !== "/") { 3605 let z = u.replace(/^\//, "").split("/"); 3606 N = "/" + k.replace(/^\//, "").split("/").slice(z.length).join("/"); 3607 } 3608 let j = Ke(e, { pathname: N }); 3609 return ae( 3610 p || j != null, 3611 `No routes matched location "${g.pathname}${g.search}${g.hash}" ` 3612 ), ae( 3613 j == null || j[j.length - 1].route.element !== void 0 || j[j.length - 1].route.Component !== void 0 || j[j.length - 1].route.lazy !== void 0, 3614 `Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.` 3615 ), kl( 3616 j && j.map( 3617 (z) => Object.assign({}, z, { 3618 params: Object.assign({}, m, z.params), 3619 pathname: Ce([ 3620 u, 3621 // Re-encode pathnames that were decoded inside matchRoutes. 3622 // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses 3623 // `new URL()` internally and we need to prevent it from treating 3624 // them as separators 3625 l.encodeLocation ? l.encodeLocation( 3626 z.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23") 3627 ).pathname : z.pathname 3628 ]), 3629 pathnameBase: z.pathnameBase === "/" ? u : Ce([ 3630 u, 3631 // Re-encode pathnames that were decoded inside matchRoutes 3632 // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses 3633 // `new URL()` internally and we need to prevent it from treating 3634 // them as separators 3635 l.encodeLocation ? l.encodeLocation( 3636 z.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23") 3637 ).pathname : z.pathnameBase 3638 ]) 3639 }) 3640 ), 3641 o, 3642 r, 3643 i, 3644 n 3645 ); 3646} 3647function gl() { 3648 let e = Rl(), t = jt(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, i = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: i }, l = { padding: "2px 4px", backgroundColor: i }, o = null; 3649 return console.error( 3650 "Error handled by React Router default ErrorBoundary:", 3651 e
3652 ), o = /* @__PURE__ */ T(st, null, /* @__PURE__ */ T("p", null, "ð¿ Hey developer ð"), /* @__PURE__ */ T("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ T("code", { style: l }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ T("code", { style: l }, "errorElement"), " prop on your route.")), /* @__PURE__ */ T(st, null, /* @__PURE__ */ T("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ T("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ T("pre", { style: n }, r) : null, o); 3653} 3654var bl = /* @__PURE__ */ T(gl, null), Xa = class extends ja { 3655 constructor(e) { 3656 super(e), this.state = { 3657 location: e.location, 3658 revalidation: e.revalidation, 3659 error: e.error 3660 }; 3661 } 3662 static getDerivedStateFromError(e) { 3663 return { error: e }; 3664 } 3665 static getDerivedStateFromProps(e, t) { 3666 return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? { 3667 error: e.error, 3668 location: e.location, 3669 revalidation: e.revalidation 3670 } : { 3671 error: e.error !== void 0 ? e.error : t.error, 3672 location: t.location, 3673 revalidation: e.revalidation || t.revalidation 3674 }; 3675 } 3676 componentDidCatch(e, t) { 3677 this.props.onError ? this.props.onError(e, t) : console.error( 3678 "React Router caught the following error during render", 3679 e 3680 ); 3681 } 3682 render() { 3683 let e = this.state.error; 3684 if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") { 3685 const r = ml(e.digest); 3686 r && (e = r); 3687 } 3688 let t = e !== void 0 ? /* @__PURE__ */ T(Ee.Provider, { value: this.props.routeContext }, /* @__PURE__ */ T( 3689 Pr.Provider, 3690 { 3691 value: e, 3692 children: this.props.component 3693 } 3694 )) : this.props.children;
3695 return this.context ? /* @__PURE__ */ T(xl, { error: e }, t) : t; 3696 } 3697}; 3698Xa.contextType = Ba; 3699var cr = /* @__PURE__ */ new WeakMap(); 3700function xl({ 3701 children: e, 3702 error: t 3703}) { 3704 let { basename: r } = K(Re); 3705 if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") { 3706 let i = dl(t.digest); 3707 if (i) { 3708 let n = cr.get(t); 3709 if (n) throw n; 3710 let l = Fa(i.location, r); 3711 if (La && !cr.get(t)) 3712 if (l.isExternal || i.reloadDocument) 3713 window.location.href = l.absoluteURL || l.to; 3714 else { 3715 const o = Promise.resolve().then( 3716 () => window.__reactRouterDataRouter.navigate(l.to, { 3717 replace: i.replace 3718 }) 3719 ); 3720 throw cr.set(t, o), o; 3721 } 3722 return /* @__PURE__ */ T( 3723 "meta", 3724 { 3725 httpEquiv: "refresh", 3726 content: `0;url=${l.absoluteURL || l.to}` 3727 } 3728 ); 3729 } 3730 } 3731 return e; 3732} 3733function wl({ routeContext: e, match: t, children: r }) { 3734 let i = K(tt); 3735 return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ T(Ee.Provider, { value: e }, r); 3736} 3737function kl(e, t = [], r = null, i = null, n = null) { 3738 if (e == null) { 3739 if (!r) 3740 return null; 3741 if (r.errors) 3742 e = r.matches; 3743 else if (t.length === 0 && !r.initialized && r.matches.length > 0) 3744 e = r.matches; 3745 else 3746 return null; 3747 } 3748 let l = e, o = r?.errors; 3749 if (o != null) { 3750 let u = l.findIndex( 3751 (p) => p.route.id && o?.[p.route.id] !== void 0 3752 ); 3753 H( 3754 u >= 0, 3755 `Could not find a matching route for errors on route IDs: ${Object.keys( 3756 o 3757 ).join(",")}` 3758 ), l = l.slice( 3759 0, 3760 Math.min(l.length, u + 1) 3761 ); 3762 } 3763 let c = !1, m = -1; 3764 if (r) 3765 for (let u = 0; u < l.length; u++) { 3766 let p = l[u]; 3767 if ((p.route.HydrateFallback || p.route.hydrateFallbackElement) && (m = u), p.route.id) { 3768 let { loaderData: b, errors: g } = r, k = p.route.loader && !b.hasOwnProperty(p.route.id) && (!g || g[p.route.id] === void 0); 3769 if (p.route.lazy || k) { 3770 c = !0, m >= 0 ? l = l.slice(0, m + 1) : l = [l[0]]; 3771 break; 3772 } 3773 } 3774 } 3775 let h = r && i ? (u, p) => { 3776 i(u, { 3777 location: r.location, 3778 params: r.matches?.[0]?.params ?? {}, 3779 unstable_pattern: Mt(r.matches), 3780 errorInfo: p 3781 }); 3782 } : void 0; 3783 return l.reduceRight( 3784 (u, p, b) => { 3785 let g, k = !1, N = null, j = null; 3786 r && (g = o && p.route.id ? o[p.route.id] : void 0, N = p.route.errorElement || bl, c && (m < 0 && b === 0 ? (Qa( 3787 "route-fallback", 3788 !1, 3789 "No `HydrateFallback` element provided to render during initial hydration" 3790 ), k = !0, j = null) : m === b && (k = !0, j = p.route.hydrateFallbackElement || null))); 3791 let S = t.concat(l.slice(0, b + 1)), z = () => { 3792 let L; 3793 return g ? L = N : k ? L = j : p.route.Component ? L = /* @__PURE__ */ T(p.route.Component, null) : p.route.element ? L = p.route.element : L = u, /* @__PURE__ */ T( 3794 wl, 3795 { 3796 match: p, 3797 routeContext: { 3798 outlet: u, 3799 matches: S, 3800 isDataRoute: r != null 3801 }, 3802 children: L 3803 } 3804 ); 3805 }; 3806 return r && (p.route.ErrorBoundary || p.route.errorElement || b === 0) ? /* @__PURE__ */ T( 3807 Xa, 3808 { 3809 location: r.location, 3810 revalidation: r.revalidation, 3811 component: N, 3812 error: g, 3813 children: z(), 3814 routeContext: { outlet: null, matches: S, isDataRoute: !0 }, 3815 onError: h 3816 } 3817 ) : z(); 3818 }, 3819 null 3820 ); 3821} 3822function Rr(e) { 3823 return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`; 3824} 3825function Nl(e) { 3826 let t = K(tt); 3827 return H(t, Rr(e)), t; 3828} 3829function zl(e) { 3830 let t = K(Ct); 3831 return H(t, Rr(e)), t; 3832} 3833function jl(e) { 3834 let t = K(Ee); 3835 return H(t, Rr(e)), t; 3836} 3837function Sr(e) { 3838 let t = jl(e), r = t.matches[t.matches.length - 1]; 3839 return H( 3840 r.route.id, 3841 `${e} can only be used on routes that contain a unique "id"` 3842 ), r.route.id; 3843} 3844function Pl() { 3845 return Sr( 3846 "useRouteId" 3847 /* UseRouteId */ 3848 ); 3849} 3850function Rl() { 3851 let e = K(Pr), t = zl( 3852 "useRouteError" 3853 /* UseRouteError */ 3854 ), r = Sr( 3855 "useRouteError" 3856 /* UseRouteError */ 3857 ); 3858 return e !== void 0 ? e : t.errors?.[r]; 3859} 3860function Sl() { 3861 let { router: e } = Nl( 3862 "useNavigate" 3863 /* UseNavigateStable */ 3864 ), t = Sr( 3865 "useNavigate" 3866 /* UseNavigateStable */ 3867 ), r = Dt(!1); 3868 return Ya(() => { 3869 r.current = !0; 3870 }), dt( 3871 async (n, l = {}) => { 3872 ae(r.current, Ja), r.current && (typeof n == "number" ? await e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...l })); 3873 }, 3874 [e, t] 3875 ); 3876} 3877var fa = {}; 3878function Qa(e, t, r) { 3879 !t && !fa[e] && (fa[e] = !0, ae(!1, r)); 3880} 3881var pa = {}; 3882function va(e, t) { 3883 !e && !pa[t] && (pa[t] = !0, console.warn(t)); 3884} 3885var Dl = "useOptimistic", ya = Zn[Dl], El = () => { 3886}; 3887function Ml(e) { 3888 return ya ? ya(e) : [e, El]; 3889} 3890function Cl(e) { 3891 let t = { 3892 // Note: this check also occurs in createRoutesFromChildren so update 3893 // there if you change this -- please and thank you! 3894 hasErrorBoundary: e.hasErrorBoundary || e.ErrorBoundary != null || e.errorElement != null 3895 }; 3896 return e.Component && (e.element && ae( 3897 !1, 3898 "You should not include both `Component` and `element` on your route - `Component` will be used." 3899 ), Object.assign(t, { 3900 element: T(e.Component), 3901 Component: void 0 3902 })), e.HydrateFallback && (e.hydrateFallbackElement && ae( 3903 !1, 3904 "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used." 3905 ), Object.assign(t, { 3906 hydrateFallbackElement: T(e.HydrateFallback), 3907 HydrateFallback: void 0 3908 })), e.ErrorBoundary && (e.errorElement && ae( 3909 !1, 3910 "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used." 3911 ), Object.assign(t, { 3912 errorElement: T(e.ErrorBoundary), 3913 ErrorBoundary: void 0 3914 })), t; 3915} 3916var Ll = [ 3917 "HydrateFallback", 3918 "hydrateFallbackElement" 3919], Fl = class { 3920 constructor() { 3921 this.status = "pending", this.promise = new Promise((e, t) => { 3922 this.resolve = (r) => { 3923 this.status === "pending" && (this.status = "resolved", e(r)); 3924 }, this.reject = (r) => { 3925 this.status === "pending" && (this.status = "rejected", t(r)); 3926 }; 3927 }); 3928 } 3929}; 3930function Tl({ 3931 router: e, 3932 flushSync: t, 3933 onError: r, 3934 unstable_useTransitions: i 3935}) { 3936 i = ll() || i; 3937 let [l, o] = se(e.state), [c, m] = Ml(l), [h, u] = se(), [p, b] = se({ 3938 isTransitioning: !1 3939 }), [g, k] = se(), [N, j] = se(), [S, z] = se(), L = Dt(/* @__PURE__ */ new Map()), X = dt( 3940 (O, { deletedFetchers: A, newErrors: q, flushSync: J, viewTransitionOpts: ie }) => { 3941 q && r && Object.values(q).forEach( 3942 (ne) => r(ne, { 3943 location: O.location, 3944 params: O.matches[0]?.params ?? {}, 3945 unstable_pattern: Mt(O.matches) 3946 })
3947 ), O.fetchers.forEach((ne, Z) => { 3948 ne.data !== void 0 && L.current.set(Z, ne.data); 3949 }), A.forEach((ne) => L.current.delete(ne)), va( 3950 J === !1 || t != null, 3951 'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` 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.' 3952 ); 3953 let Se = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function"; 3954 if (va( 3955 ie == null || Se, 3956 "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." 3957 ), !ie || !Se) { 3958 t && J ? t(() => o(O)) : i === !1 ? o(O) : kt(() => { 3959 i === !0 && m((ne) => ga(ne, O)), o(O); 3960 }); 3961 return; 3962 } 3963 if (t && J) { 3964 t(() => { 3965 N && (g?.resolve(), N.skipTransition()), b({ 3966 isTransitioning: !0, 3967 flushSync: !0, 3968 currentLocation: ie.currentLocation, 3969 nextLocation: ie.nextLocation 3970 }); 3971 }); 3972 let ne = e.window.document.startViewTransition(() => { 3973 t(() => o(O)); 3974 }); 3975 ne.finished.finally(() => { 3976 t(() => { 3977 k(void 0), j(void 0), u(void 0), b({ isTransitioning: !1 }); 3978 }); 3979 }), t(() => j(ne)); 3980 return; 3981 } 3982 N ? (g?.resolve(), N.skipTransition(), z({ 3983 state: O, 3984 currentLocation: ie.currentLocation, 3985 nextLocation: ie.nextLocation 3986 })) : (u(O), b({ 3987 isTransitioning: !0, 3988 flushSync: !1, 3989 currentLocation: ie.currentLocation, 3990 nextLocation: ie.nextLocation 3991 })); 3992 }, 3993 [ 3994 e.window, 3995 t, 3996 N, 3997 g, 3998 i, 3999 m, 4000 r 4001 ] 4002 ); 4003 gr(() => e.subscribe(X), [e, X]), Ie(() => { 4004 p.isTransitioning && !p.flushSync && k(new Fl()); 4005 }, [p]), Ie(() => { 4006 if (g && h && e.window) { 4007 let O = h, A = g.promise, q = e.window.document.startViewTransition(async () => { 4008 i === !1 ? o(O) : kt(() => { 4009 i === !0 && m((J) => ga(J, O)), o(O); 4010 }), await A; 4011 }); 4012 q.finished.finally(() => { 4013 k(void 0), j(void 0), u(void 0), b({ isTransitioning: !1 }); 4014 }), j(q); 4015 } 4016 }, [ 4017 h, 4018 g, 4019 e.window, 4020 i, 4021 m 4022 ]), Ie(() => { 4023 g && h && c.location.key === h.location.key && g.resolve(); 4024 }, [g, N, c.location, h]), Ie(() => { 4025 !p.isTransitioning && S && (u(S.state), b({ 4026 isTransitioning: !0, 4027 flushSync: !1, 4028 currentLocation: S.currentLocation, 4029 nextLocation: S.nextLocation 4030 }), z(void 0)); 4031 }, [p.isTransitioning, S]); 4032 let W = be(() => ({ 4033 createHref: e.createHref, 4034 encodeLocation: e.encodeLocation, 4035 go: (O) => e.navigate(O), 4036 push: (O, A, q) => e.navigate(O, { 4037 state: A, 4038 preventScrollReset: q?.preventScrollReset 4039 }), 4040 replace: (O, A, q) => e.navigate(O, { 4041 replace: !0, 4042 state: A, 4043 preventScrollReset: q?.preventScrollReset 4044 }) 4045 }), [e]), te = e.basename || "/", y = be( 4046 () => ({ 4047 router: e, 4048 navigator: W, 4049 static: !1, 4050 basename: te, 4051 onError: r 4052 }), 4053 [e, W, te, r] 4054 ); 4055 return /* @__PURE__ */ T(st, null, /* @__PURE__ */ T(tt.Provider, { value: y }, /* @__PURE__ */ T(Ct.Provider, { value: c }, /* @__PURE__ */ T(Ga.Provider, { value: L.current }, /* @__PURE__ */ T(jr.Provider, { value: p }, /* @__PURE__ */ T( 4056 Hl, 4057 { 4058 basename: te, 4059 location: c.location, 4060 navigationType: c.historyAction, 4061 navigator: W, 4062 unstable_useTransitions: i 4063 }, 4064 /* @__PURE__ */ T( 4065 Ol, 4066 { 4067 routes: e.routes, 4068 future: e.future, 4069 state: c, 4070 onError: r 4071 } 4072 ) 4073 ))))), null); 4074} 4075function ga(e, t) { 4076 return { 4077 // Don't surface "current location specific" stuff mid-navigation 4078 // (historyAction, location, matches, loaderData, errors, initialized, 4079 // restoreScroll, preventScrollReset, blockers, etc.) 4080 ...e, 4081 // Only surface "pending/in-flight stuff" 4082 // (navigation, revalidation, actionData, fetchers, ) 4083 navigation: t.navigation.state !== "idle" ? t.navigation : e.navigation,
4084 revalidation: t.revalidation !== "idle" ? t.revalidation : e.revalidation, 4085 actionData: t.navigation.state !== "submitting" ? t.actionData : e.actionData, 4086 fetchers: t.fetchers 4087 }; 4088} 4089var Ol = Pa(_l); 4090function _l({ 4091 routes: e, 4092 future: t, 4093 state: r, 4094 onError: i 4095}) { 4096 return yl(e, void 0, r, i, t); 4097} 4098function $l(e) { 4099 return vl(e.context); 4100} 4101function Hl({ 4102 basename: e = "/", 4103 children: t = null, 4104 location: r, 4105 navigationType: i = "POP", 4106 navigator: n, 4107 static: l = !1, 4108 unstable_useTransitions: o 4109}) { 4110 H( 4111 !Lt(), 4112 "You cannot render a <Router> inside another <Router>. You should never have more than one in your app." 4113 ); 4114 let c = e.replace(/^\/*/, "/"), m = be( 4115 () => ({ 4116 basename: c, 4117 navigator: n, 4118 static: l, 4119 unstable_useTransitions: o, 4120 future: {} 4121 }), 4122 [c, n, l, o] 4123 ); 4124 typeof r == "string" && (r = Be(r)); 4125 let { 4126 pathname: h = "/", 4127 search: u = "", 4128 hash: p = "", 4129 state: b = null, 4130 key: g = "default" 4131 } = r, k = be(() => { 4132 let N = Pe(h, c); 4133 return N == null ? null : { 4134 location: { 4135 pathname: N, 4136 search: u, 4137 hash: p, 4138 state: b, 4139 key: g 4140 }, 4141 navigationType: i 4142 }; 4143 }, [c, h, u, p, b, g, i]); 4144 return ae( 4145 k != null, 4146 `<Router basename="${c}"> is not able to match the URL "${h}${u}${p}" because it does not start with the basename, so the <Router> won't render anything.` 4147 ), k == null ? null : /* @__PURE__ */ T(Re.Provider, { value: m }, /* @__PURE__ */ T(Xt.Provider, { children: t, value: k })); 4148} 4149var Bt = "get", Gt = "application/x-www-form-urlencoded"; 4150function Qt(e) { 4151 return typeof HTMLElement < "u" && e instanceof HTMLElement; 4152} 4153function Kl(e) { 4154 return Qt(e) && e.tagName.toLowerCase() === "button"; 4155} 4156function Vl(e) { 4157 return Qt(e) && e.tagName.toLowerCase() === "form"; 4158} 4159function Il(e) { 4160 return Qt(e) && e.tagName.toLowerCase() === "input"; 4161} 4162function Ul(e) { 4163 return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey); 4164} 4165function Al(e, t) { 4166 return e.button === 0 && // Ignore everything but left clicks 4167 (!t || t === "_self") && // Let browser handle "target=_blank" etc. 4168 !Ul(e); 4169} 4170var At = null; 4171function Wl() { 4172 if (At === null) 4173 try { 4174 new FormData( 4175 document.createElement("form"), 4176 // @ts-expect-error if FormData supports the submitter parameter, this will throw 4177 0 4178 ), At = !1; 4179 } catch { 4180 At = !0; 4181 } 4182 return At; 4183} 4184var Bl = /* @__PURE__ */ new Set([ 4185 "application/x-www-form-urlencoded", 4186 "multipart/form-data", 4187 "text/plain" 4188]); 4189function dr(e) { 4190 return e != null && !Bl.has(e) ? (ae( 4191 !1, 4192 `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gt}"` 4193 ), null) : e; 4194} 4195function Gl(e, t) { 4196 let r, i, n, l, o; 4197 if (Vl(e)) {
4198 let c = e.getAttribute("action"); 4199 i = c ? Pe(c, t) : null, r = e.getAttribute("method") || Bt, n = dr(e.getAttribute("enctype")) || Gt, l = new FormData(e); 4200 } else if (Kl(e) || Il(e) && (e.type === "submit" || e.type === "image")) { 4201 let c = e.form; 4202 if (c == null) 4203 throw new Error( 4204 'Cannot submit a <button> or <input type="submit"> without a <form>' 4205 ); 4206 let m = e.getAttribute("formaction") || c.getAttribute("action"); 4207 if (i = m ? Pe(m, t) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || Bt, n = dr(e.getAttribute("formenctype")) || dr(c.getAttribute("enctype")) || Gt, l = new FormData(c, e), !Wl()) { 4208 let { name: h, type: u, value: p } = e; 4209 if (u === "image") { 4210 let b = h ? `${h}.` : ""; 4211 l.append(`${b}x`, "0"), l.append(`${b}y`, "0"); 4212 } else h && l.append(h, p); 4213 } 4214 } else { 4215 if (Qt(e)) 4216 throw new Error( 4217 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">' 4218 ); 4219 r = Bt, i = null, n = Gt, o = e; 4220 } 4221 return l && n === "text/plain" && (o = l, l = void 0), { action: i, method: r.toLowerCase(), encType: n, formData: l, body: o }; 4222} 4223Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); 4224function Dr(e, t) { 4225 if (e === !1 || e === null || typeof e > "u") 4226 throw new Error(t); 4227} 4228function Zl(e, t, r, i) { 4229 let n = typeof e == "string" ? new URL( 4230 e, 4231 // This can be called during the SSR flow via PrefetchPageLinksImpl so 4232 // don't assume window is available 4233 typeof window > "u" ? "server://singlefetch/" : window.location.origin 4234 ) : e; 4235 return r ? n.pathname.endsWith("/") ? n.pathname = `${n.pathname}_.${i}` : n.pathname = `${n.pathname}.${i}` : n.pathname === "/" ? n.pathname = `_root.${i}` : t && Pe(n.pathname, t) === "/" ? n.pathname = `${t.replace(/\/$/, "")}/_root.${i}` : n.pathname = `${n.pathname.replace(/\/$/, "")}.${i}`, n; 4236} 4237async function Jl(e, t) { 4238 if (e.id in t) 4239 return t[e.id]; 4240 try { 4241 let r = await import( 4242 /* @vite-ignore */ 4243 /* webpackIgnore: true */ 4244 e.module 4245 ); 4246 return t[e.id] = r, r; 4247 } catch (r) { 4248 return console.error( 4249 `Error loading route module \`${e.module}\`, reloading page...` 4250 ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => { 4251 }); 4252 } 4253} 4254function Yl(e) { 4255 return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string"; 4256} 4257async function ql(e, t, r) { 4258 let i = await Promise.all( 4259 e.map(async (n) => { 4260 let l = t.routes[n.route.id]; 4261 if (l) { 4262 let o = await Jl(l, r); 4263 return o.links ? o.links() : []; 4264 } 4265 return []; 4266 }) 4267 ); 4268 return to( 4269 i.flat(1).filter(Yl).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map( 4270 (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" }
vendor: 4,188 bytes, lines 4270-4434
4270 : { ...n, rel: "prefetch" } 4271 ) 4272 ); 4273} 4274function ba(e, t, r, i, n, l) { 4275 let o = (m, h) => r[h] ? m.route.id !== r[h].route.id : !0, c = (m, h) => ( 4276 // param change, /users/123 -> /users/456 4277 r[h].pathname !== m.pathname || // splat param changed, which is not present in match.path 4278 // e.g. /files/images/avatar.jpg -> files/finances.xls 4279 r[h].route.path?.endsWith("*") && r[h].params["*"] !== m.params["*"] 4280 ); 4281 return l === "assets" ? t.filter( 4282 (m, h) => o(m, h) || c(m, h) 4283 ) : l === "data" ? t.filter((m, h) => { 4284 let u = i.routes[m.route.id]; 4285 if (!u || !u.hasLoader) 4286 return !1; 4287 if (o(m, h) || c(m, h)) 4288 return !0; 4289 if (m.route.shouldRevalidate) { 4290 let p = m.route.shouldRevalidate({ 4291 currentUrl: new URL( 4292 n.pathname + n.search + n.hash, 4293 window.origin 4294 ), 4295 currentParams: r[0]?.params || {}, 4296 nextUrl: new URL(e, window.origin), 4297 nextParams: m.params, 4298 defaultShouldRevalidate: !0 4299 }); 4300 if (typeof p == "boolean") 4301 return p; 4302 } 4303 return !0; 4304 }) : []; 4305} 4306function Xl(e, t, { includeHydrateFallback: r } = {}) { 4307 return Ql( 4308 e.map((i) => { 4309 let n = t.routes[i.route.id]; 4310 if (!n) return []; 4311 let l = [n.module]; 4312 return n.clientActionModule && (l = l.concat(n.clientActionModule)), n.clientLoaderModule && (l = l.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (l = l.concat(n.hydrateFallbackModule)), n.imports && (l = l.concat(n.imports)), l; 4313 }).flat(1) 4314 ); 4315} 4316function Ql(e) { 4317 return [...new Set(e)]; 4318} 4319function eo(e) { 4320 let t = {}, r = Object.keys(e).sort(); 4321 for (let i of r) 4322 t[i] = e[i]; 4323 return t; 4324} 4325function to(e, t) { 4326 let r = /* @__PURE__ */ new Set(); 4327 return new Set(t), e.reduce((i, n) => { 4328 let l = JSON.stringify(eo(n)); 4329 return r.has(l) || (r.add(l), i.push({ key: l, link: n })), i; 4330 }, []); 4331} 4332function en() { 4333 let e = K(tt); 4334 return Dr( 4335 e, 4336 "You must render this element inside a <DataRouterContext.Provider> element" 4337 ), e; 4338} 4339function ro() { 4340 let e = K(Ct); 4341 return Dr( 4342 e, 4343 "You must render this element inside a <DataRouterStateContext.Provider> element" 4344 ), e; 4345} 4346var Er = xe(void 0); 4347Er.displayName = "FrameworkContext"; 4348function tn() { 4349 let e = K(Er); 4350 return Dr( 4351 e, 4352 "You must render this element inside a <HydratedRouter> element" 4353 ), e; 4354} 4355function ao(e, t) { 4356 let r = K(Er), [i, n] = se(!1), [l, o] = se(!1), { onFocus: c, onBlur: m, onMouseEnter: h, onMouseLeave: u, onTouchStart: p } = t, b = Dt(null); 4357 Ie(() => { 4358 if (e === "render" && o(!0), e === "viewport") { 4359 let N = (S) => { 4360 S.forEach((z) => { 4361 o(z.isIntersecting); 4362 }); 4363 }, j = new IntersectionObserver(N, { threshold: 0.5 }); 4364 return b.current && j.observe(b.current), () => { 4365 j.disconnect(); 4366 }; 4367 } 4368 }, [e]), Ie(() => { 4369 if (i) { 4370 let N = setTimeout(() => { 4371 o(!0); 4372 }, 100); 4373 return () => { 4374 clearTimeout(N); 4375 }; 4376 } 4377 }, [i]); 4378 let g = () => { 4379 n(!0); 4380 }, k = () => { 4381 n(!1), o(!1); 4382 }; 4383 return r ? e !== "intent" ? [l, b, {}] : [ 4384 l, 4385 b, 4386 { 4387 onFocus: gt(c, g), 4388 onBlur: gt(m, k), 4389 onMouseEnter: gt(h, g), 4390 onMouseLeave: gt(u, k), 4391 onTouchStart: gt(p, g) 4392 } 4393 ] : [!1, b, {}]; 4394} 4395function gt(e, t) { 4396 return (r) => { 4397 e && e(r), r.defaultPrevented || t(r); 4398 }; 4399} 4400function no({ page: e, ...t }) { 4401 let { router: r } = en(), i = be( 4402 () => Ke(r.routes, e, r.basename), 4403 [r.routes, e, r.basename] 4404 ); 4405 return i ? /* @__PURE__ */ T(lo, { page: e, matches: i, ...t }) : null; 4406} 4407function io(e) { 4408 let { manifest: t, routeModules: r } = tn(), [i, n] = se([]); 4409 return Ie(() => { 4410 let l = !1; 4411 return ql(e, t, r).then( 4412 (o) => { 4413 l || n(o); 4414 } 4415 ), () => { 4416 l = !0; 4417 }; 4418 }, [e, t, r]), i; 4419} 4420function lo({ 4421 page: e, 4422 matches: t, 4423 ...r 4424}) { 4425 let i = Ge(), { future: n, manifest: l, routeModules: o } = tn(), { basename: c } = en(), { loaderData: m, matches: h } = ro(), u = be( 4426 () => ba( 4427 e, 4428 t, 4429 h, 4430 l, 4431 i, 4432 "data" 4433 ), 4434 [e, t, h, l, i]
4435 ), p = be( 4436 () => ba( 4437 e, 4438 t, 4439 h, 4440 l, 4441 i, 4442 "assets" 4443 ), 4444 [e, t, h, l, i] 4445 ), b = be(() => { 4446 if (e === i.pathname + i.search + i.hash) 4447 return []; 4448 let N = /* @__PURE__ */ new Set(), j = !1; 4449 if (t.forEach((z) => { 4450 let L = l.routes[z.route.id]; 4451 !L || !L.hasLoader || (!u.some((X) => X.route.id === z.route.id) && z.route.id in m && o[z.route.id]?.shouldRevalidate || L.hasClientLoader ? j = !0 : N.add(z.route.id)); 4452 }), N.size === 0) 4453 return []; 4454 let S = Zl( 4455 e, 4456 c, 4457 n.unstable_trailingSlashAwareDataRequests, 4458 "data" 4459 ); 4460 return j && N.size > 0 && S.searchParams.set( 4461 "_routes", 4462 t.filter((z) => N.has(z.route.id)).map((z) => z.route.id).join(",") 4463 ), [S.pathname + S.search]; 4464 }, [ 4465 c, 4466 n.unstable_trailingSlashAwareDataRequests, 4467 m, 4468 i, 4469 l, 4470 u, 4471 t, 4472 e, 4473 o 4474 ]), g = be( 4475 () => Xl(p, l), 4476 [p, l] 4477 ), k = io(p); 4478 return /* @__PURE__ */ T(st, null, b.map((N) => /* @__PURE__ */ T("link", { key: N, rel: "prefetch", as: "fetch", href: N, ...r })), g.map((N) => /* @__PURE__ */ T("link", { key: N, rel: "modulepreload", href: N, ...r })), k.map(({ key: N, link: j }) => ( 4479 // these don't spread `linkProps` because they are full link descriptors 4480 // already with their own props 4481 /* @__PURE__ */ T( 4482 "link", 4483 { 4484 key: N, 4485 nonce: r.nonce, 4486 ...j, 4487 crossOrigin: j.crossOrigin ?? r.crossOrigin 4488 } 4489 ) 4490 ))); 4491} 4492function oo(...e) { 4493 return (t) => { 4494 e.forEach((r) => { 4495 typeof r == "function" ? r(t) : r != null && (r.current = t); 4496 }); 4497 }; 4498} 4499var so = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u"; 4500try { 4501 so && (window.__reactRouterVersion = // @ts-expect-error 4502 "7.13.0"); 4503} catch { 4504} 4505function co(e, t) { 4506 return Ti({ 4507 basename: t?.basename, 4508 getContext: t?.getContext, 4509 future: t?.future, 4510 history: qn({ window: t?.window }), 4511 hydrationData: mo(), 4512 routes: e, 4513 mapRouteProperties: Cl, 4514 hydrationRouteProperties: Ll, 4515 dataStrategy: t?.dataStrategy, 4516 patchRoutesOnNavigation: t?.patchRoutesOnNavigation, 4517 window: t?.window, 4518 unstable_instrumentations: t?.unstable_instrumentations 4519 }).initialize(); 4520} 4521function mo() { 4522 let e = window?.__staticRouterHydrationData; 4523 return e && e.errors && (e = { 4524 ...e, 4525 errors: ho(e.errors) 4526 }), e; 4527} 4528function ho(e) { 4529 if (!e) return null; 4530 let t = Object.entries(e), r = {}; 4531 for (let [i, n] of t) 4532 if (n && n.__type === "RouteErrorResponse") 4533 r[i] = new Et( 4534 n.status, 4535 n.statusText, 4536 n.data, 4537 n.internal === !0 4538 ); 4539 else if (n && n.__type === "Error") { 4540 if (n.__subType) { 4541 let l = window[n.__subType]; 4542 if (typeof l == "function") 4543 try { 4544 let o = new l(n.message); 4545 o.stack = "", r[i] = o; 4546 } catch { 4547 } 4548 } 4549 if (r[i] == null) { 4550 let l = new Error(n.message); 4551 l.stack = "", r[i] = l; 4552 } 4553 } else 4554 r[i] = n; 4555 return r; 4556} 4557var rn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, $ = ct( 4558 function({ 4559 onClick: t, 4560 discover: r = "render", 4561 prefetch: i = "none", 4562 relative: n, 4563 reloadDocument: l, 4564 replace: o, 4565 state: c, 4566 target: m, 4567 to: h, 4568 preventScrollReset: u, 4569 viewTransition: p, 4570 unstable_defaultShouldRevalidate: b, 4571 ...g 4572 }, k) { 4573 let { basename: N, unstable_useTransitions: j } = K(Re), S = typeof h == "string" && rn.test(h), z = Fa(h, N); 4574 h = z.to; 4575 let L = hl(h, { relative: n }), [X, W, te] = ao( 4576 i, 4577 g 4578 ), y = vo(h, { 4579 replace: o, 4580 state: c, 4581 target: m, 4582 preventScrollReset: u, 4583 relative: n, 4584 viewTransition: p, 4585 unstable_defaultShouldRevalidate: b, 4586 unstable_useTransitions: j 4587 }); 4588 function O(q) { 4589 t && t(q), q.defaultPrevented || y(q); 4590 } 4591 let A = ( 4592 // eslint-disable-next-line jsx-a11y/anchor-has-content
4593 /* @__PURE__ */ T( 4594 "a", 4595 { 4596 ...g, 4597 ...te, 4598 href: z.absoluteURL || L, 4599 onClick: z.isExternal || l ? t : O, 4600 ref: oo(k, W), 4601 target: m, 4602 "data-discover": !S && r === "render" ? "true" : void 0 4603 } 4604 ) 4605 ); 4606 return X && !S ? /* @__PURE__ */ T(st, null, A, /* @__PURE__ */ T(no, { page: L })) : A; 4607 } 4608); 4609$.displayName = "Link"; 4610var uo = ct( 4611 function({ 4612 "aria-current": t = "page", 4613 caseSensitive: r = !1, 4614 className: i = "", 4615 end: n = !1, 4616 style: l, 4617 to: o, 4618 viewTransition: c, 4619 children: m, 4620 ...h 4621 }, u) { 4622 let p = Ft(o, { relative: h.relative }), b = Ge(), g = K(Ct), { navigator: k, basename: N } = K(Re), j = g != null && // Conditional usage is OK here because the usage of a data router is static 4623 // eslint-disable-next-line react-hooks/rules-of-hooks 4624 wo(p) && c === !0, S = k.encodeLocation ? k.encodeLocation(p).pathname : p.pathname, z = b.pathname, L = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null; 4625 r || (z = z.toLowerCase(), L = L ? L.toLowerCase() : null, S = S.toLowerCase()), L && N && (L = Pe(L, N) || L); 4626 const X = S !== "/" && S.endsWith("/") ? S.length - 1 : S.length; 4627 let W = z === S || !n && z.startsWith(S) && z.charAt(X) === "/", te = L != null && (L === S || !n && L.startsWith(S) && L.charAt(S.length) === "/"), y = { 4628 isActive: W, 4629 isPending: te, 4630 isTransitioning: j 4631 }, O = W ? t : void 0, A; 4632 typeof i == "function" ? A = i(y) : A = [ 4633 i, 4634 W ? "active" : null, 4635 te ? "pending" : null, 4636 j ? "transitioning" : null 4637 ].filter(Boolean).join(" "); 4638 let q = typeof l == "function" ? l(y) : l; 4639 return /* @__PURE__ */ T( 4640 $, 4641 { 4642 ...h, 4643 "aria-current": O, 4644 className: A, 4645 ref: u, 4646 style: q, 4647 to: o, 4648 viewTransition: c 4649 }, 4650 typeof m == "function" ? m(y) : m 4651 ); 4652 } 4653); 4654uo.displayName = "NavLink"; 4655var fo = ct( 4656 ({ 4657 discover: e = "render", 4658 fetcherKey: t, 4659 navigate: r, 4660 reloadDocument: i, 4661 replace: n, 4662 state: l, 4663 method: o = Bt, 4664 action: c, 4665 onSubmit: m, 4666 relative: h, 4667 preventScrollReset: u, 4668 viewTransition: p, 4669 unstable_defaultShouldRevalidate: b, 4670 ...g 4671 }, k) => { 4672 let { unstable_useTransitions: N } = K(Re), j = bo(), S = xo(c, { relative: h }), z = o.toLowerCase() === "get" ? "get" : "post", L = typeof c == "string" && rn.test(c); 4673 return /* @__PURE__ */ T( 4674 "form", 4675 { 4676 ref: k, 4677 method: z, 4678 action: S, 4679 onSubmit: i ? m : (W) => { 4680 if (m && m(W), W.defaultPrevented) return; 4681 W.preventDefault(); 4682 let te = W.nativeEvent.submitter, y = te?.getAttribute("formmethod") || o, O = () => j(te || W.currentTarget, { 4683 fetcherKey: t, 4684 method: y, 4685 navigate: r, 4686 replace: n, 4687 state: l, 4688 relative: h, 4689 preventScrollReset: u, 4690 viewTransition: p, 4691 unstable_defaultShouldRevalidate: b 4692 }); 4693 N && r !== !1 ? kt(() => O()) : O(); 4694 }, 4695 ...g, 4696 "data-discover": !L && e === "render" ? "true" : void 0 4697 } 4698 ); 4699 } 4700); 4701fo.displayName = "Form"; 4702function po(e) { 4703 return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`; 4704} 4705function an(e) { 4706 let t = K(tt); 4707 return H(t, po(e)), t; 4708} 4709function vo(e, { 4710 target: t, 4711 replace: r, 4712 state: i, 4713 preventScrollReset: n, 4714 relative: l, 4715 viewTransition: o, 4716 unstable_defaultShouldRevalidate: c, 4717 unstable_useTransitions: m 4718} = {}) { 4719 let h = ul(), u = Ge(), p = Ft(e, { relative: l }); 4720 return dt( 4721 (b) => { 4722 if (Al(b, t)) { 4723 b.preventDefault(); 4724 let g = r !== void 0 ? r : Le(u) === Le(p), k = () => h(e, { 4725 replace: g, 4726 state: i, 4727 preventScrollReset: n, 4728 relative: l, 4729 viewTransition: o, 4730 unstable_defaultShouldRevalidate: c 4731 }); 4732 m ? kt(() => k()) : k(); 4733 } 4734 }, 4735 [ 4736 u, 4737 h, 4738 p, 4739 r, 4740 i, 4741 t, 4742 e, 4743 n, 4744 l, 4745 o, 4746 c, 4747 m 4748 ] 4749 ); 4750} 4751var yo = 0, go = () => `__${String(++yo)}__`; 4752function bo() { 4753 let { router: e } = an( 4754 "useSubmit" 4755 /* UseSubmit */ 4756 ), { basename: t } = K(Re), r = Pl(), i = e.fetch, n = e.navigate; 4757 return dt( 4758 async (l, o = {}) => { 4759 let { action: c, method: m, encType: h, formData: u, body: p }
4759 = Gl( 4760 l, 4761 t 4762 ); 4763 if (o.navigate === !1) { 4764 let b = o.fetcherKey || go(); 4765 await i(b, r, o.action || c, { 4766 unstable_defaultShouldRevalidate: o.unstable_defaultShouldRevalidate, 4767 preventScrollReset: o.preventScrollReset, 4768 formData: u, 4769 body: p, 4770 formMethod: o.method || m, 4771 formEncType: o.encType || h, 4772 flushSync: o.flushSync 4773 }); 4774 } else 4775 await n(o.action || c, { 4776 unstable_defaultShouldRevalidate: o.unstable_defaultShouldRevalidate, 4777 preventScrollReset: o.preventScrollReset, 4778 formData: u, 4779 body: p, 4780 formMethod: o.method || m, 4781 formEncType: o.encType || h, 4782 replace: o.replace, 4783 state: o.state, 4784 fromRouteId: r, 4785 flushSync: o.flushSync, 4786 viewTransition: o.viewTransition 4787 }); 4788 }, 4789 [i, n, t, r] 4790 ); 4791} 4792function xo(e, { relative: t } = {}) { 4793 let { basename: r } = K(Re), i = K(Ee); 4794 H(i, "useFormAction must be used inside a RouteContext"); 4795 let [n] = i.matches.slice(-1), l = { ...Ft(e || ".", { relative: t }) }, o = Ge(); 4796 if (e == null) { 4797 l.search = o.search; 4798 let c = new URLSearchParams(l.search), m = c.getAll("index"); 4799 if (m.some((u) => u === "")) { 4800 c.delete("index"), m.filter((p) => p).forEach((p) => c.append("index", p)); 4801 let u = c.toString(); 4802 l.search = u ? `?${u}` : ""; 4803 } 4804 } 4805 return (!e || e === ".") && n.route.index && (l.search = l.search ? l.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (l.pathname = l.pathname === "/" ? r : Ce([r, l.pathname])), Le(l); 4806} 4807function wo(e, { relative: t } = {}) { 4808 let r = K(jr); 4809 H( 4810 r != null, 4811 "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?" 4812 ); 4813 let { basename: i } = an( 4814 "useViewTransitionState" 4815 /* useViewTransitionState */ 4816 ), n = Ft(e, { relative: t }); 4817 if (!r.isTransitioning) 4818 return !1; 4819 let l = Pe(r.currentLocation.pathname, i) || r.currentLocation.pathname, o = Pe(r.nextLocation.pathname, i) || r.nextLocation.pathname; 4820 return Zt(n.pathname, o) != null || Zt(n.pathname, l) != null; 4821} 4822/** 4823 * @license lucide-react v0.487.0 - ISC 4824 * 4825 * This source code is licensed under the ISC license. 4826 * See the LICENSE file in the root directory of this source tree. 4827 */ 4828const ko = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), No = (e) => e.replace( 4829 /^([A-Z])|[\s-_]+(\w)/g, 4830 (t, r, i) => i ? i.toUpperCase() : r.toLowerCase() 4831), xa = (e) => { 4832 const t = No(e); 4833 return t.charAt(0).toUpperCase() + t.slice(1); 4834}, nn = (...e) => e.filter((t, r, i) => !!t && t.trim() !== "" && i.indexOf(t) === r).join(" ").trim(); 4835/** 4836 * @license lucide-react v0.487.0 - ISC 4837 * 4838 * This source code is licensed under the ISC license. 4839 * See the LICENSE file in the root directory of this source tree. 4840 */ 4841var zo = { 4842 xmlns: "http://www.w3.org/2000/svg", 4843 width: 24, 4844 height: 24, 4845 viewBox: "0 0 24 24", 4846 fill: "none", 4847 stroke: "currentColor", 4848 strokeWidth: 2, 4849 strokeLinecap: "round", 4850 strokeLinejoin: "round" 4851}; 4852/** 4853 * @license lucide-react v0.487.0 - ISC 4854 * 4855 * This source code is licensed under the ISC license. 4856 * See the LICENSE file in the root directory of this source tree. 4857 */ 4858const jo = ct( 4859 ({ 4860 color: e = "currentColor", 4861 size: t = 24, 4862 strokeWidth: r = 2, 4863 absoluteStrokeWidth: i, 4864 className: n = "", 4865 children: l, 4866 iconNode: o, 4867 ...c 4868 }, m) => T( 4869 "svg", 4870 { 4871 ref: m, 4872 ...zo, 4873 width: t, 4874 height: t, 4875 stroke: e, 4876 strokeWidth: i ? Number(r) * 24 / Number(t) : r, 4877 className: nn("lucide", n), 4878 ...c 4879 }, 4880 [ 4881 ...o.map(([h, u]) => T(h, u)), 4882 ...Array.isArray(l) ? l : [l] 4883 ] 4884 ) 4885); 4886/** 4887 * @license lucide-react v0.487.0 - ISC 4888 * 4889 * This source code is licensed under the ISC license. 4890 * See the LICENSE file in the root directory of this source tree. 4891 */ 4892const ee = (e, t) => { 4893 const r = ct( 4894 ({ className: i, ...n }, l) => T(jo, { 4895 ref: l, 4896 iconNode: t, 4897 className: nn( 4898 `lucide-${ko(xa(e))}`, 4899 `lucide-${e}`, 4900 i 4901 ), 4902 ...n 4903 }) 4904 ); 4905 return r.displayName = xa(e), r; 4906}; 4907/** 4908 * @license lucide-react v0.487.0 - ISC 4909 * 4910 * This source code is licensed under the ISC license. 4911 * See the LICENSE file in the root directory of this source tree. 4912 */ 4913const Po = [ 4914 ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }], 4915 ["path", { d: "M19 12H5", key: "x3x0zl" }] 4916], Pt = ee("arrow-left", Po); 4917/** 4918 * @license lucide-react v0.487.0 - ISC 4919 * 4920 * This source code is licensed under the ISC license. 4921 * See the LICENSE file in the root directory of this source tree. 4922 */ 4923const Ro = [ 4924 ["path", { d: "M5 12h14", key: "1ays0h" }], 4925 ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }] 4926], ve = ee("arrow-right", Ro); 4927/** 4928 * @license lucide-react v0.487.0 - ISC 4929 * 4930 * This source code is licensed under the ISC license. 4931 * See the LICENSE file in the root directory of this source tree. 4932 */ 4933const So = [ 4934 ["path", { d: "M8 2v4", key: "1cmpym" }], 4935 ["path", { d: "M16 2v4", key: "4m81vk" }], 4936 ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }
4936], 4937 ["path", { d: "M3 10h18", key: "8toen8" }] 4938], Ae = ee("calendar", So); 4939/** 4940 * @license lucide-react v0.487.0 - ISC 4941 * 4942 * This source code is licensed under the ISC license. 4943 * See the LICENSE file in the root directory of this source tree. 4944 */ 4945const Do = [ 4946 ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }], 4947 ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }] 4948], Rt = ee("circle-check-big", Do); 4949/** 4950 * @license lucide-react v0.487.0 - ISC 4951 * 4952 * This source code is licensed under the ISC license. 4953 * See the LICENSE file in the root directory of this source tree. 4954 */ 4955const Eo = [ 4956 ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], 4957 ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }] 4958], We = ee("clock", Eo); 4959/** 4960 * @license lucide-react v0.487.0 - ISC 4961 * 4962 * This source code is licensed under the ISC license. 4963 * See the LICENSE file in the root directory of this source tree. 4964 */ 4965const Mo = [ 4966 ["path", { d: "M15 3h6v6", key: "1q9fwt" }], 4967 ["path", { d: "M10 14 21 3", key: "gplh6r" }], 4968 ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }] 4969], pr = ee("external-link", Mo); 4970/** 4971 * @license lucide-react v0.487.0 - ISC 4972 * 4973 * This source code is licensed under the ISC license. 4974 * See the LICENSE file in the root directory of this source tree. 4975 */ 4976const Co = [ 4977 [ 4978 "path", 4979 { d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z", key: "1jg4f8" } 4980 ] 4981], Lo = ee("facebook", Co); 4982/** 4983 * @license lucide-react v0.487.0 - ISC 4984 * 4985 * This source code is licensed under the ISC license. 4986 * See the LICENSE file in the root directory of this source tree. 4987 */ 4988const Fo = [ 4989 ["path", { d: "m11 17 2 2a1 1 0 1 0 3-3", key: "efffak" }], 4990 [ 4991 "path", 4992 { 4993 d: "m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4", 4994 key: "9pr0kb" 4995 } 4996 ], 4997 ["path", { d: "m21 3 1 11h-2", key: "1tisrp" }], 4998 ["path", { d: "M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3", key: "1uvwmv" }], 4999 ["path", { d: "M3 4h8", key: "1ep09j" }] 5000], To = ee("handshake", Fo); 5001/** 5002 * @license lucide-react v0.487.0 - ISC 5003 * 5004 * This source code is licensed under the ISC license. 5005 * See the LICENSE file in the root directory of this source tree. 5006 */ 5007const Oo = [ 5008 ["rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5", key: "2e1cvw" }], 5009 ["path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z", key: "9exkf1" }], 5010 ["line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5", key: "r4j83e" }] 5011], _o = ee("instagram", Oo); 5012/** 5013 * @license lucide-react v0.487.0 - ISC 5014 * 5015 * This source code is licensed under the ISC license. 5016 * See the LICENSE file in the root directory of this source tree. 5017 */ 5018const $o = [ 5019 [ 5020 "path", 5021 { 5022 d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z", 5023 key: "nnexq3" 5024 } 5025 ], 5026 ["path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12", key: "mt58a7" }] 5027], mt = ee("leaf", $o); 5028/** 5029 * @license lucide-react v0.487.0 - ISC 5030 * 5031 * This source code is licensed under the ISC license. 5032 * See the LICENSE file in the root directory of this source tree. 5033 */ 5034const Ho = [ 5035 ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }], 5036 ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }] 5037], er = ee("mail", Ho); 5038/** 5039 * @license lucide-react v0.487.0 - ISC 5040 * 5041 * This source code is licensed under the ISC license. 5042 * See the LICENSE file in the root directory of this source tree. 5043 */ 5044const Ko = [ 5045 [ 5046 "path", 5047 { 5048 d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0", 5049 key: "1r0f0z" 5050 } 5051 ], 5052 ["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }] 5053], $e = ee("map-pin", Ko); 5054/** 5055 * @license lucide-react v0.487.0 - ISC 5056 * 5057 * This source code is licensed under the ISC license. 5058 * See the LICENSE file in the root directory of this source tree. 5059 */ 5060const Vo = [ 5061 ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }], 5062 ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }], 5063 ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }
5063] 5064], Io = ee("menu", Vo); 5065/** 5066 * @license lucide-react v0.487.0 - ISC 5067 * 5068 * This source code is licensed under the ISC license. 5069 * See the LICENSE file in the root directory of this source tree. 5070 */ 5071const Uo = [ 5072 [ 5073 "path", 5074 { 5075 d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z", 5076 key: "foiqr5" 5077 } 5078 ] 5079], ln = ee("phone", Uo); 5080/** 5081 * @license lucide-react v0.487.0 - ISC 5082 * 5083 * This source code is licensed under the ISC license. 5084 * See the LICENSE file in the root directory of this source tree. 5085 */ 5086const Ao = [ 5087 ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }], 5088 ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }] 5089], wa = ee("search", Ao); 5090/** 5091 * @license lucide-react v0.487.0 - ISC 5092 * 5093 * This source code is licensed under the ISC license. 5094 * See the LICENSE file in the root directory of this source tree. 5095 */ 5096const Wo = [ 5097 [ 5098 "path", 5099 { 5100 d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z", 5101 key: "1ffxy3" 5102 } 5103 ], 5104 ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }] 5105], Bo = ee("send", Wo); 5106/** 5107 * @license lucide-react v0.487.0 - ISC 5108 * 5109 * This source code is licensed under the ISC license. 5110 * See the LICENSE file in the root directory of this source tree. 5111 */ 5112const Go = [ 5113 [ 5114 "path", 5115 { 5116 d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z", 5117 key: "oel41y" 5118 } 5119 ], 5120 ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }] 5121], on = ee("shield-check", Go); 5122/** 5123 * @license lucide-react v0.487.0 - ISC 5124 * 5125 * This source code is licensed under the ISC license. 5126 * See the LICENSE file in the root directory of this source tree. 5127 */ 5128const Zo = [ 5129 ["path", { d: "M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z", key: "hou9p0" }], 5130 ["path", { d: "M3 6h18", key: "d0wm0j" }], 5131 ["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }] 5132], Jo = ee("shopping-bag", Zo); 5133/** 5134 * @license lucide-react v0.487.0 - ISC 5135 * 5136 * This source code is licensed under the ISC license. 5137 * See the LICENSE file in the root directory of this source tree. 5138 */ 5139const Yo = [ 5140 ["path", { d: "M7 20h10", key: "e6iznv" }], 5141 ["path", { d: "M10 20c5.5-2.5.8-6.4 3-10", key: "161w41" }], 5142 [ 5143 "path", 5144 { 5145 d: "M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z", 5146 key: "9gtqwd" 5147 } 5148 ], 5149 [ 5150 "path", 5151 { 5152 d: "M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z", 5153 key: "bkxnd2" 5154 } 5155 ] 5156], qo = ee("sprout", Yo); 5157/** 5158 * @license lucide-react v0.487.0 - ISC 5159 * 5160 * This source code is licensed under the ISC license. 5161 * See the LICENSE file in the root directory of this source tree. 5162 */ 5163const Xo = [ 5164 [ 5165 "path", 5166 { 5167 d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z", 5168 key: "r04s7s" 5169 } 5170 ] 5171], Qo = ee("star", Xo); 5172/** 5173 * @license lucide-react v0.487.0 - ISC 5174 * 5175 * This source code is licensed under the ISC license. 5176 * See the LICENSE file in the root directory of this source tree. 5177 */ 5178const es = [ 5179 ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }], 5180 ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }] 5181], vr = ee("user", es); 5182/** 5183 * @license lucide-react v0.487.0 - ISC 5184 * 5185 * This source code is licensed under the ISC license. 5186 * See the LICENSE file in the root directory of this source tree. 5187 */ 5188const ts = [ 5189 ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }], 5190 ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }], 5191 ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }], 5192 ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }] 5193], Jt = ee("users", ts); 5194/** 5195 * @license lucide-react v0.487.0 - ISC 5196 * 5197 * This source code is licensed under the ISC license. 5198 * See the LICENSE file in the root directory of this source tree. 5199 */ 5200const rs = [ 5201 ["path", { d: "M18 6 6 18", key: "1bl5f8" }], 5202 ["path", { d: "m6 6 12 12", key: "d8bk6v" }] 5203], yr = ee("x", rs), ka = [ 5204 { label: "TermÃny", href: "/terminy" }, 5205 { label: "Výrobci", href: "/vyrobci" }, 5206 { label: "Aktuality", href: "/aktuality" }, 5207 { label: "O nás", href: "/o-nas" }, 5208 { label: "PartneÅi", href: "/partneri" }, 5209 { label: "Kodex", href: "/kodex" }, 5210 { label: "Kontakt", href: "/kontakt" } 5211]; 5212function as() { 5213 const [e, t] = se(!1), r = Ge(), i = (n) => r.pathname === n || r.pathname.startsWith(n + "/"); 5214 return /* @__PURE__ */ s("header", { className: "bg-white border-b border-[#e8dfd0] sticky top-0 z-50", children: [
5215 /* @__PURE__ */ a("div", { className: "max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between h-16 gap-4", children: [ 5216 /* @__PURE__ */ s( 5217 $, 5218 { 5219 to: "/", 5220 className: "flex items-center gap-2 group flex-shrink-0", 5221 onClick: () => t(!1), 5222 children: [ 5223 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-[#3d6b4f] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(mt, { className: "w-4 h-4 text-white" }) }), 5224 /* @__PURE__ */ s("div", { className: "flex flex-col leading-tight", children: [ 5225 /* @__PURE__ */ a( 5226 "span", 5227 { 5228 className: "text-[#2c1f0e] font-semibold text-sm sm:text-base", 5229 style: { fontFamily: "'Playfair Display', Georgia, serif" }, 5230 children: "VýchodoÄeské trhy" 5231 } 5232 ), 5233 /* @__PURE__ */ a("span", { className: "text-[#6b6355] text-xs hidden lg:block", children: "Regionálnà farmáÅské trhy" }) 5234 ] }) 5235 ] 5236 } 5237 ),
5238 /* @__PURE__ */ a("nav", { className: "hidden md:flex items-center gap-0.5 flex-1 justify-end", children: ka.map((n) => /* @__PURE__ */ a( 5239 $, 5240 { 5241 to: n.href, 5242 className: `px-2.5 py-1.5 rounded-md text-sm transition-colors whitespace-nowrap ${i(n.href) ? "text-[#3d6b4f] bg-[#e8f0ea]" : "text-[#6b6355] hover:text-[#2c1f0e] hover:bg-[#f0ebe0]"}`, 5243 children: n.label 5244 }, 5245 n.href 5246 )) }), 5247 /* @__PURE__ */ a( 5248 "button", 5249 { 5250 onClick: () => t(!e), 5251 className: "md:hidden p-2 rounded-md text-[#6b6355] hover:text-[#2c1f0e] hover:bg-[#f0ebe0] transition-colors flex-shrink-0", 5252 "aria-label": e ? "ZavÅÃt menu" : "OtevÅÃt menu", 5253 children: e ? /* @__PURE__ */ a(yr, { className: "w-5 h-5" }) : /* @__PURE__ */ a(Io, { className: "w-5 h-5" }) 5254 } 5255 ) 5256 ] }) }), 5257 e && /* @__PURE__ */ a("div", { className: "md:hidden border-t border-[#e8dfd0] bg-white", children: /* @__PURE__ */ a("div", { className: "max-w-[1200px] mx-auto px-4 py-3 grid grid-cols-2 gap-1", children: ka.map((n) => /* @__PURE__ */ a( 5258 $, 5259 { 5260 to: n.href, 5261 onClick: () => t(!1), 5262 className: `px-3 py-2.5 rounded-md text-sm transition-colors ${i(n.href) ? "text-[#3d6b4f] bg-[#e8f0ea]" : "text-[#6b6355] hover:text-[#2c1f0e] hover:bg-[#f0ebe0]"}`, 5263 children: n.label 5264 }, 5265 n.href 5266 )) }) }) 5267 ] }); 5268} 5269function ns() { 5270 return /* @__PURE__ */ a("footer", { className: "bg-[#2c1f0e] text-white", children: /* @__PURE__ */ s("div", { className: "max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8 py-12", children: [ 5271 /* @__PURE__ */ s("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8", children: [
5272 /* @__PURE__ */ s("div", { className: "sm:col-span-2 lg:col-span-1", children: [ 5273 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [ 5274 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-[#3d6b4f] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(mt, { className: "w-4 h-4 text-white" }) }), 5275 /* @__PURE__ */ a("span", { className: "font-semibold", style: { fontFamily: "'Playfair Display', Georgia, serif" }, children: "VýchodoÄeské trhy" }) 5276 ] }), 5277 /* @__PURE__ */ a("p", { className: "text-[#c8bfb0] text-sm leading-relaxed mb-4", children: "Propojujeme lokálnà výrobce s jejich zákaznÃky. Regionálnà farmáÅské trhy v Královéhradeckém a Pardubickém kraji." }), 5278 /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [ 5279 /* @__PURE__ */ a( 5280 "a", 5281 { 5282 href: "https://facebook.com", 5283 target: "_blank", 5284 rel: "noopener noreferrer", 5285 "aria-label": "Facebook", 5286 className: "w-8 h-8 rounded-full bg-white/10 flex items-center justify-center hover:bg-[#3d6b4f] transition-colors", 5287 children: /* @__PURE__ */ a(Lo, { className: "w-4 h-4" }) 5288 } 5289 ),
5290 /* @__PURE__ */ a( 5291 "a", 5292 { 5293 href: "https://instagram.com", 5294 target: "_blank", 5295 rel: "noopener noreferrer", 5296 "aria-label": "Instagram", 5297 className: "w-8 h-8 rounded-full bg-white/10 flex items-center justify-center hover:bg-[#3d6b4f] transition-colors", 5298 children: /* @__PURE__ */ a(_o, { className: "w-4 h-4" }) 5299 } 5300 ) 5301 ] }) 5302 ] }), 5303 /* @__PURE__ */ s("div", { children: [ 5304 /* @__PURE__ */ a("h4", { className: "text-white mb-4 text-sm font-semibold uppercase tracking-wider", style: { fontFamily: "inherit" }, children: "Navigace" }), 5305 /* @__PURE__ */ a("ul", { className: "flex flex-col gap-2", children: [ 5306 { label: "TermÃny trhů", href: "/terminy" }, 5307 { label: "Výrobci", href: "/vyrobci" }, 5308 { label: "Aktuality", href: "/aktuality" }, 5309 { label: "O nás", href: "/o-nas" }, 5310 { label: "NaÅ¡i partneÅi", href: "/partneri" }, 5311 { label: "Kodex výrobce", href: "/kodex" }, 5312 { label: "Kontakt", href: "/kontakt" } 5313 ].map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a( 5314 $, 5315 { 5316 to: e.href, 5317 className: "text-[#c8bfb0] text-sm hover:text-white transition-colors", 5318 children: e.label 5319 } 5320 ) }, e.href)) }) 5321 ] }),
5322 /* @__PURE__ */ s("div", { children: [ 5323 /* @__PURE__ */ a("h4", { className: "text-white mb-4 text-sm font-semibold uppercase tracking-wider", style: { fontFamily: "inherit" }, children: "Kontakt" }), 5324 /* @__PURE__ */ s("ul", { className: "flex flex-col gap-3", children: [ 5325 /* @__PURE__ */ s("li", { className: "flex items-start gap-2 text-[#c8bfb0] text-sm", children: [ 5326 /* @__PURE__ */ a(er, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[#3d6b4f]" }), 5327 /* @__PURE__ */ a("a", { href: "mailto:[email protected]", className: "hover:text-white transition-colors", children: "[email protected]" }) 5328 ] }), 5329 /* @__PURE__ */ s("li", { className: "flex items-start gap-2 text-[#c8bfb0] text-sm", children: [ 5330 /* @__PURE__ */ a(ln, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[#3d6b4f]" }), 5331 /* @__PURE__ */ a("a", { href: "tel:+420601234567", className: "hover:text-white transition-colors", children: "+420 601 234 567" }) 5332 ] }),
5333 /* @__PURE__ */ s("li", { className: "flex items-start gap-2 text-[#c8bfb0] text-sm", children: [ 5334 /* @__PURE__ */ a($e, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[#3d6b4f]" }), 5335 /* @__PURE__ */ s("span", { children: [ 5336 "Hradec Králové,", 5337 /* @__PURE__ */ a("br", {}), 5338 "Královéhradecký kraj" 5339 ] }) 5340 ] }) 5341 ] }) 5342 ] }), 5343 /* @__PURE__ */ s("div", { children: [ 5344 /* @__PURE__ */ a("h4", { className: "text-white mb-4 text-sm font-semibold uppercase tracking-wider", style: { fontFamily: "inherit" }, children: "Novinky e-mailem" }), 5345 /* @__PURE__ */ a("p", { className: "text-[#c8bfb0] text-sm mb-3", children: "Dostávejte pÅehled nadcházejÃcÃch trhů pÅÃmo do schránky." }), 5346 /* @__PURE__ */ s( 5347 "form", 5348 { 5349 onSubmit: (e) => e.preventDefault(), 5350 className: "flex flex-col gap-2", 5351 children: [ 5352 /* @__PURE__ */ a( 5353 "input", 5354 { 5355 type: "email", 5356 placeholder: "Váš e-mail", 5357 className: "px-3 py-2 rounded-md bg-white/10 border border-white/20 text-white placeholder:text-white/50 text-sm focus:outline-none focus:ring-2 focus:ring-[#3d6b4f] focus:border-transparent" 5358 } 5359 ),
5360 /* @__PURE__ */ a( 5361 "button", 5362 { 5363 type: "submit", 5364 className: "px-3 py-2 bg-[#3d6b4f] text-white rounded-md text-sm hover:bg-[#2d5240] transition-colors", 5365 children: "OdebÃrat novinky" 5366 } 5367 ) 5368 ] 5369 } 5370 ) 5371 ] }) 5372 ] }), 5373 /* @__PURE__ */ s("div", { className: "mt-10 pt-6 border-t border-white/10 flex flex-col sm:flex-row items-center justify-between gap-4", children: [ 5374 /* @__PURE__ */ a("p", { className: "text-[#8a7f72] text-sm", children: "© 2026 VýchodoÄeské trhy. VÅ¡echna práva vyhrazena." }), 5375 /* @__PURE__ */ s("div", { className: "flex items-center gap-4", children: [ 5376 /* @__PURE__ */ a($, { to: "/kodex", className: "text-[#8a7f72] text-sm hover:text-white transition-colors", children: "Kodex výrobce" }), 5377 /* @__PURE__ */ a("span", { className: "text-[#8a7f72]", children: "·" }), 5378 /* @__PURE__ */ a("a", { href: "#", className: "text-[#8a7f72] text-sm hover:text-white transition-colors", children: "Ochrana osobnÃch údajů" }) 5379 ] }) 5380 ] }) 5381 ] }) }); 5382} 5383const is = [ 5384 "VÅ¡e", 5385 "Ovoce a zelenina", 5386 "Pekárna", 5387 "MléÄné výrobky", 5388 "Maso a uzeniny", 5389 "Med a džemy", 5390 "Houby a lesnà plody", 5391 "Åemeslné výrobky", 5392 "KvÄtiny a byliny" 5393], Yt = [ 5394 { 5395 id: "trh-2026-03-07", 5396 title: "Jarnà trhy v Hradci Králové", 5397 date: "7. bÅezna 2026", 5398 dateISO: "2026-03-07", 5399 time: "8:00 â 14:00", 5400 location: "Hradec Králové", 5401 address: "Velké námÄstÃ, Hradec Králové", 5402 shortDescription: "UvÃtejte jaro s prvnÃmi Äerstvými produkty regionu. PÅes 30 výrobců z Královéhradeckého kraje.", 5403 description: `Zveme vás na prvnà jarnà trhy sezóny 2026, které se uskuteÄnà na Velkém námÄstà v Hradci Králové. PÅijÄte si pochutnat na Äerstvých produktech od ovÄÅených mÃstnÃch výrobců z celého Královéhradeckého kraje. 5404 5405Letos se tÄÅ¡te na nové stánky s bylinkáÅstvÃm, tradiÄnà pekárnu z Náchoda a rozÅ¡ÃÅenou nabÃdku bio zeleniny. Na mÃstÄ bude také živá hudba a program pro dÄti. 5406 5407Vstup je volný. DoporuÄujeme pÅijÃt vÄas â nejlepšà zbožà se rychle prodá!`, 5408 image: "https://images.unsplash.com/photo-1687199126330-556bb3c85b2f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5409 isPast: !1, 5410 vendorIds: ["v1", "v2", "v3", "v4", "v5", "v6"], 5411 tags: ["JarnÃ", "Velký trh", "Hudba"] 5412 }, 5413 { 5414 id: "trh-2026-03-21", 5415 title: "Trhy v PardubicÃch", 5416 date: "21. bÅezna 2026", 5417 dateISO: "2026-03-21", 5418 time: "9:00 â 13:00", 5419 location: "Pardubice", 5420 address: "PernÅ¡týnské námÄstÃ, Pardubice", 5421 shortDescription: "Regionálnà trhy na historickém námÄstà Pardubic. Lokálnà potraviny, Åemesla a Äerstvé produkty.", 5422 description: `PernÅ¡týnské námÄstà v PardubicÃch ožije tradiÄnÃmi trhy plnými lokálnÃch produktů. PÅijÄte podpoÅit mÃstnà výrobce a zemÄdÄlce. 5423 5424Najdete zde Äerstvé ovoce a zeleninu, domácà peÄivo, mléÄné výrobky, med, džemy a dalšà speciality Pardubického kraje. SouÄástà programu jsou ukázky tradiÄnÃho Åemesel.`, 5425 image: "https://images.unsplash.com/photo-1765475794605-92b17c24591c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5426 isPast: !1, 5427 vendorIds: ["v2", "v4", "v6", "v7", "v8"], 5428 tags: ["Åemesla", "Rodinné"] 5429 }, 5430 { 5431 id: "trh-2026-04-04", 5432 title: "VelikonoÄnà trhy v JiÄÃnÄ", 5433 date: "4. dubna 2026", 5434 dateISO: "2026-04-04", 5435 time: "8:30 â 14:00", 5436 location: "JiÄÃn", 5437 address: "ValdÅ¡tejnovo námÄstÃ, JiÄÃn", 5438 shortDescription: "TradiÄnà velikonoÄnà trhy s bohatou nabÃdkou sezonnÃch produktů a velikonoÄnÃch dekoracÃ.", 5439 description: `Velikonoce pÅicházejÃ! Slavnostnà trhy na ValdÅ¡tejnovÄ námÄstà v JiÄÃnÄ nabÃdnou tradiÄnà velikonoÄnà produkty, Äerstvé jarnà potraviny a ruÄnÄ vyrábÄné dekorace. 5440 5441PÅijÄte si pochutnat na ÄerstvÄ vypeÄeném mazanci, nákupem podpoÅte mÃstnà výrobce a ponoÅte se do velikonoÄnà atmosféry ve srdci historického JiÄÃna.`, 5442 image: "https://images.unsplash.com/photo-1771098302156-d92e3cbb3b68?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5443 isPast: !1, 5444 vendorIds: ["v1", "v3", "v5", "v7", "v8", "v9"], 5445 tags: ["Velikonoce", "SezónnÃ", "Dekorace"] 5446 }, 5447 { 5448 id: "trh-2026-01-18", 5449 title: "Zimnà trhy v Hradci Králové", 5450 date: "18. ledna 2026", 5451 dateISO: "2026-01-18", 5452 time: "9:00 â 13:00", 5453 location: "Hradec Králové", 5454 address: "Velké námÄstÃ, Hradec Králové", 5455 shortDescription: "Podzimnà trhy s bohatou úrodou z regionálnÃch farem. KoÅenová zelenina, jablka, houby a much more.", 5456 description: "Zimnà trhy nabÃdly tradiÄnà zimnà produkty â koÅenovou zeleninu, kysané zel
5456Ã, jableÄné produkty a teplé nápoje. PÅes 25 výrobců z regionu potÄÅ¡ilo sezónnÃmi specialitami navzdory chladnému poÄasÃ.", 5457 image: "https://images.unsplash.com/photo-1695088956481-6c46b7714537?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5458 isPast: !0, 5459 vendorIds: ["v1", "v2", "v4", "v6"], 5460 tags: ["ZimnÃ", "SezónnÃ"] 5461 }, 5462 { 5463 id: "trh-2025-11-08", 5464 title: "Podzimnà trhy v NáchodÄ", 5465 date: "8. listopadu 2025", 5466 dateISO: "2025-11-08", 5467 time: "8:00 â 14:00", 5468 location: "Náchod", 5469 address: "Masarykovo námÄstÃ, Náchod", 5470 shortDescription: "Bohaté podzimnà trhy s dýnÄmi, jablky, houbami a ÅÃjnovou úrodou z celého PodkrkonoÅ¡Ã.", 5471 description: "Podzimnà trhy v NáchodÄ pÅivÃtaly stovky spokojených zákaznÃků. VýbÄr z tradiÄnÃch podzimnÃch plodin â dýnÄ, brambory, mrkev, jablka a hruÅ¡ky. HoubaÅi pÅedstavili suÅ¡ené a nakládané houby z KrkonoÅ¡ského podhůÅÃ.", 5472 image: "https://images.unsplash.com/photo-1762921168452-9bd784f685fd?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5473 isPast: !0, 5474 vendorIds: ["v3", "v5", "v7", "v9"], 5475 tags: ["Podzim", "Houby", "DýnÄ"] 5476 } 5477], lt = [ 5478 { 5479 id: "v1", 5480 name: "Farma HoráÄek", 5481 category: "Ovoce a zelenina", 5482 shortDescription: "Bio zelenina a ovoce z rodinné farmy v Královéhradeckém kraji. PÄstujeme bez chemie od roku 1998.", 5483 description: "Rodinná farma s 25letou tradicà bio zemÄdÄlstvÃ. PÄstujeme pÅes 60 druhů zeleniny a ovoce.", 5484 image: "https://images.unsplash.com/photo-1687199126330-556bb3c85b2f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5485 origin: "Hradec Králové", 5486 featured: !0 5487 }, 5488 { 5489 id: "v2", 5490 name: "Pekárna U Nováků", 5491 category: "Pekárna", 5492 shortDescription: "TradiÄnà pekárna z Náchoda. Žitný chléb, vánoÄky, koláÄe a speciality z kváskového tÄsta.", 5493 description: "Rodinná pekárna s tradicà od roku 1987. PeÄeme na dÅevo, použÃváme lokálnà mouky.", 5494 image: "https://images.unsplash.com/photo-1565801776220-10bd41565980?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5495 origin: "Náchod", 5496 featured: !0 5497 }, 5498 { 5499 id: "v3", 5500 name: "VÄelà farma Kopecký", 5501 category: "Med a džemy", 5502 shortDescription: "PÅÃrodnà medy, vosky a výrobky z vlastnÃch úlů z PodkrkonoÅ¡Ã. Divoký kvÄtový i lesnà med.", 5503 description: "VÄelaÅ tÅetà generace z KrkonoÅ¡ského podhůÅÃ. PÅes 120 úlů, 15 druhů medu.", 5504 image: "https://images.unsplash.com/photo-1703007739223-3e87d56e03e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5505 origin: "Trutnov", 5506 featured: !0 5507 }, 5508 { 5509 id: "v4", 5510 name: "Sýrárna PodkrkonoÅ¡Ã", 5511 category: "MléÄné výrobky", 5512 shortDescription: "ZrajÃcà sýry, tvaroh, jogurty a kefÃr z vlastnÃho mléka. TradiÄnà postupy bez pÅÃdatných látek.", 5513 description: "MléÄná farma s vlastnà sýrárnou. Výroba pÅÃrodnÃch sýrů a fermentovaných mléÄných výrobků.", 5514 image: "https://images.unsplash.com/photo-1545064093-a2592bca2c08?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5515 origin: "Jilemnice", 5516 featured: !0 5517 }, 5518 { 5519 id: "v5", 5520 name: "Lesnà dary KrkonoÅ¡", 5521 category: "Houby a lesnà plody", 5522 shortDescription: "SuÅ¡ené a nakládané houby, lesnà plody, sirupy a bylinné Äaje z Äistých krkonoÅ¡ských lesů.", 5523 description: "Rodinný sbÄr lesnÃch plodů a hub z KrkonoÅ¡ského národnÃho parku a okolÃ.", 5524 image: "https://images.unsplash.com/photo-1762921168452-9bd784f685fd?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5525 origin: "VrchlabÃ", 5526 featured: !1 5527 }, 5528 { 5529 id: "v6", 5530 name: "Zahrádka Marcely KrejÄÃ", 5531 category: "KvÄtiny a byliny", 5532 shortDescription: "Sezónnà Åezané kvÄtiny, suché vazby, léÄivé bylinky a vonné vÄnce z ekologické zahrady.", 5533 description: "Ekologická zahrada s pÄstovánÃm sezónnÃch kvÄtin a léÄivých bylin bez pesticidů.", 5534 image: "https://images.unsplash.com/photo-1759508598254-680b933c146d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5535 origin: "Pardubice", 5536 featured: !1 5537 }, 5538 { 5539 id: "v7", 5540 name: "Džemy a zavaÅeniny Strnad", 5541 category: "Med a džemy", 5542 shortDescription: "Domácà džemy, kompoty, sirupy a zavaÅeniny z lokálnÃho ovoce. Bez konzervantů a pÅÃdatných látek.", 5543 description: "RuÄnà výroba džemů a zavaÅenin z lokálnÃho ovoce tradiÄnÃmi metodami.",
5544 image: "https://images.unsplash.com/photo-1695088956481-6c46b7714537?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5545 origin: "JiÄÃn", 5546 featured: !1 5547 }, 5548 { 5549 id: "v8", 5550 name: "Keramika PoláÄková", 5551 category: "Åemeslné výrobky", 5552 shortDescription: "RuÄnÄ toÄená keramika, kameninové nádobà a užitkové pÅedmÄty s pÅÃrodnÃmi motivy.", 5553 description: "Keramická dÃlna s 20letou tradicÃ. Každý kus je unikát, toÄen na kruhu.", 5554 image: "https://images.unsplash.com/photo-1761210719325-283557e92487?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5555 origin: "Hradec Králové", 5556 featured: !0 5557 }, 5558 { 5559 id: "v9", 5560 name: "Maso z VysoÄiny", 5561 category: "Maso a uzeniny", 5562 shortDescription: "Produkty z volnÄ pasených zvÃÅat â klobásy, uzeniny, slanina a paÅ¡tiky. TradiÄnà recepty.", 5563 description: "Rodinné hospodáÅstvà s volným chovem prasat a drůbeže na VysoÄinÄ.", 5564 image: "https://images.unsplash.com/photo-1771098302156-d92e3cbb3b68?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 5565 origin: "Nová Paka", 5566 featured: !1 5567 } 5568], St = [ 5569 { 5570 id: "nova-sezona-2026", 5571 title: "Sezóna 2026 startuje â co nás Äeká?", 5572 date: "15. února 2026", 5573 dateISO: "2026-02-15", 5574 excerpt: "Nová sezóna VýchodoÄeských trhů startuje v bÅeznu. PÅinášÃme pÅehled plánovaných termÃnů, nové výrobce a vylepÅ¡enÃ, která jsme pro vás pÅipravili.", 5575 content: `Váženà pÅÃznivci trhů, jsme rádi, že vás můžeme p
5575ÅivÃtat do nové sezóny VýchodoÄeských trhů! Po úspÄÅ¡ném roce 2025 jsme pracovali na tom, aby byly trhy jeÅ¡tÄ lepÅ¡Ã, pÅÃvÄtivÄjšà a bohatšà na výrobce. 5576 5577**Co je nového v sezónÄ 2026?** 5578 5579Letos rozÅ¡iÅujeme naÅ¡e trhy o dvÄ nová mÃsta â JiÄÃn a Náchod budou hostit pravidelné mÄsÃÄnà trhy po celou sezónu. Celkem plánujeme 24 trhů v 6 mÄstech Královéhradeckého a Pardubického kraje. 5580 5581PÅivÃtáme také nové výrobce: pekárnu specialit z celozrnné mouky, výrobce pÅÃrodnà kosmetiky a farmáÅe specializujÃcÃho se na staré odrůdy zeleniny. 5582 5583**Plán termÃnů** 5584 5585Prvnà trhy sezóny probÄhnou 7. bÅezna 2026 na Velkém námÄstà v Hradci Králové. LetoÅ¡nà sezóna potrvá do konce ÅÃjna a vyvrcholà tradiÄnÃmi adventnÃmi trhy v prosinci. 5586 5587**PÅihlaste se k odbÄru novinek** 5588 5589Chcete být vždy vÄas informováni? OdebÃrejte naÅ¡e novinky a my vám poÅ¡leme pÅipomÃnku pÅed každými trhy ve vaÅ¡em nejbližšÃm mÄstÄ.`, 5590 image: "https://images.unsplash.com/photo-1687199126330-556bb3c85b2f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5591 author: "Redakce VýchodoÄeských trhů", 5592 category: "Novinky" 5593 }, 5594 { 5595 id: "novy-vyrce-keramika", 5596 title: "Nový výrobce: Keramika PoláÄková z Hradce Králové", 5597 date: "3. února 2026", 5598 dateISO: "2026-02-03", 5599 excerpt: "PÅedstavujeme nového výrobce v našà sÃti â keramickou dÃlnu KateÅiny PoláÄkové, která tvoÅà ruÄnÄ toÄenou keramiku s pÅÃrodnÃmi motivy.", 5600 content: `Každý pÅÃbÄh za stánkem na naÅ¡ich trzÃch je jedineÄný. Dnes vám chceme pÅedstavit KateÅinu PoláÄkovou a jejà keramickou dÃlnu, která se do našà rodiny výrobců pÅidá od jarnà sezóny 2026. 5601 5602KateÅina se vÄnuje keramice již 20 let. ZaÄÃnala jako konÃÄek, ale postupnÄ se ze záliby stal plnohodnotný způsob obživy. Dnes provozuje vlastnà dÃlnu v Hradci Králové, kde tvoÅà ruÄnÄ toÄené nádobà a dekorativnà pÅedmÄty z kameniny. 5603 5604**PÅÃrodnà motivy a lokálnà materiály** 5605 5606KateÅina Äerpá inspiraci z pÅÃrody Královéhradeckého kraje â jejà výrobky nesou vzory listů, vÄtvà a kamenů. K glazovánà použÃvá pÅÃrodnà pigmenty a každý kus je svým způsobem originál. 5607 5608âMám ráda, když lidé moje nádobà opravdu použÃvajÃ," ÅÃká KateÅina. âNejkrásnÄjšà je vidÄt, jak se moje hrnky každý den toÄà v rukou spokojeného zákaznÃka." 5609 5610Keramiku PoláÄková najdete poprvé na trzÃch 7. bÅezna v Hradci Králové.`, 5611 image: "https://images.unsplash.com/photo-1761210719325-283557e92487?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5612 author: "Jana Horáková", 5613 category: "Výrobci" 5614 }, 5615 { 5616 id: "sezona-2025-ohlednik", 5617 title: "Ohlédnutà za sezónou 2025 â dÄkujeme!", 5618 date: "20. listopadu 2025", 5619 dateISO: "2025-11-20", 5620 excerpt: "Sezóna 2025 je za námi a bylo to úžasné. PÅes 8 000 spokojených návÅ¡tÄvnÃků, 45 výrobců a 18 úspÄÅ¡ných trhů. Shrnujeme to nejlepÅ¡Ã.", 5621 content: `Sezóna 2025 VýchodoÄeských trhů oficálnÄ skonÄila podzimnÃmi trhy v NáchodÄ. Je Äas se ohlédnout a podÄkovat vÅ¡em, kteÅà ji spolutvoÅili. 5622 5623**ÄÃsla hovoÅà za vÅ¡e** 5624 5625- 18 trhů v 5 mÄstech 5626- PÅes 8 000 spokojených zákaznÃků 5627- 45 pravidelných výrobců 5628- Nový rekord návÅ¡tÄvnosti v Hradci Králové (1 200 návÅ¡tÄvnÃků za jeden den) 5629 5630**NejoblÃbenÄjšà výrobce sezóny** 5631 5632ZákaznÃci v letoÅ¡nà anketÄ jako svého oblÃbeného výrobce nejÄastÄji zvolili VÄelà farmu Kopecký a Pekárnu U Nováků. Gratulujeme! 5633 5634**Co pÅijde v roce 2026** 5635 5636Pracujeme pilnÄ na tom, aby byla sezóna 2026 jeÅ¡tÄ lepÅ¡Ã. PÅidáme nová mÃsta konánÃ, pÅivÃtáme nové výrobce a rozÅ¡ÃÅÃme doprovodný program. 5637 5638Budeme se tÄÅ¡it na vidÄnou v bÅeznu 2026!`, 5639 image: "https://images.unsplash.com/photo-1765475794605-92b17c24591c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5640 author: "Redakce VýchodoÄeských trhů", 5641 category: "Novinky" 5642 }, 5643 { 5644 id: "med-vcely-kopecky", 5645 title: "Jak vzniká med z Podkrkonošà â za výrobcem Kopeckým", 5646 date: "5. ÅÃjna 2025", 5647 dateISO: "2025-10-05", 5648 excerpt: "NavÅ¡tÃvili jsme vÄelà farmu Miroslava Kopeckého v TrutnovÄ a zjistili jsme, co stojà za jejich výjimeÄnými medy z krkonoÅ¡ského podhůÅÃ.", 5649 content: `Ráno v TrutnovÄ. Mlha se pomalu zvedá nad loukami a Miroslav Kopecký jde ke svým úlům. Procházà jimi klidnÄ, bez náspÄchu â tÅicet let práce s vÄelami ho nauÄilo trpÄlivosti. 5650 5651**TÅetà generace vÄelaÅů** 5652 5653Miroslav je tÅetà generacà vÄelaÅe v rodinÄ Kopeckých. Tradici zaÄal jeho dÄd, pokraÄoval otec a dnes Miroslav peÄuje o 120 úlů rozložených v okolà Trutnova a v KrkonoÅ¡ském podhůÅÃ. 5654 5655âKaždé stanoviÅ¡tÄ má svůj charakter," vysvÄtluje Miroslav. âMed od luk blÃzko Labe chutná jinak než med z lesnÃho prostÅedÃ. Proto nabÃzÃme tolik různých druhů." 5656 5657**PÅÃrodnà metody, žádná chemie** 5658 5659Miroslav se zásadnÄ vyhýbá syntetickým pÅÃpravkům. LéÄenà vÄel provádà pouze pÅÃpravky na bázi kyseliny mravenÄà a šťavelové. Med nijak nezahÅÃvá ani nepasterizuje, aby zachoval vÅ¡echny pÅirozené látky. 5660 5661**15 druhů medu** 5662 5663Na trzÃch najdete med lipový, pohankový, lesnÃ, malinový, z alpských luk a dalšà speciality. Každý rok pÅibývajà nové druhy podle toho, kde Miroslav umÃstà úly.`, 5664 image: "https://images.unsplash.com/photo-1703007739223-3e87d56e03e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", 5665 author: "Tomáš BeneÅ¡", 5666 category: "Výrobci" 5667 } 5668], Mr = [ 5669 { 5670 id: "p1", 5671 name: "Kraj Královéhradecký", 5672 shortName: "KHK", 5673 tagline: "Kraj, kde rostou naÅ¡e trhy", 5674 description: "Hlavnà institucionálnà partner a spolufinancovatel rozvojových aktivit trhů v regionu.", 5675 accentColor: "#3d6b4f", 5676 website: "https://www.kr-kralovehradecky.cz", 5677 tier: "hlavnÃ" 5678 }, 5679 { 5680 id: "p2", 5681 name: "Hradec Králové", 5682 shortName: "HK", 5683 tagline: "Hostitelské mÄsto trhů",
5684 description: "MÄsto nám dlouhodobÄ poskytuje Velké námÄstà pro konánà trhů a podporuje komunitnà aktivity.", 5685 accentColor: "#7a5230", 5686 website: "https://www.hradeckralove.org", 5687 tier: "komunálnÃ" 5688 }, 5689 { 5690 id: "p3", 5691 name: "Bio Institut", 5692 shortName: "BI", 5693 tagline: "Certifikace bio výrobců", 5694 description: "Zajišťuje certifikaci a metodickou podporu pro bio výrobce zapojené do sÃtÄ trhů.", 5695 accentColor: "#5a8a3d", 5696 website: "https://bioinstitut.cz", 5697 tier: "hlavnÃ" 5698 }, 5699 { 5700 id: "p4", 5701 name: "Rozhlas Hradec", 5702 shortName: "RH", 5703 tagline: "Mediálnà partner", 5704 description: "Regionálnà rozhlas zajišťuje mediálnà pokrytà každého termÃnu trhů a pravidelné reportáže.", 5705 accentColor: "#c0550a", 5706 website: "#", 5707 tier: "mediálnÃ" 5708 }, 5709 { 5710 id: "p5", 5711 name: "ZemÄdÄlská banka", 5712 shortName: "ZB", 5713 tagline: "FinanÄnà podpora výrobců", 5714 description: "Partnerská banka nabÃzà zvýhodnÄné úvÄry a finanÄnà poradenstvà pro lokálnà zemÄdÄlce.", 5715 accentColor: "#1a5c8a", 5716 website: "#", 5717 tier: "hlavnÃ" 5718 }, 5719 { 5720 id: "p6", 5721 name: "Slow Food CZ", 5722 shortName: "SF", 5723 tagline: "Komunita dobrého jÃdla", 5724 description: "Mezinárodnà komunita Slow Food sdÃlà naÅ¡e hodnoty â lokálnà původ, kvalita a pÅÃbÄh za každým produktem.", 5725 accentColor: "#8b2c1a", 5726 website: "https://slowfood.cz", 5727 tier: "mediálnÃ" 5728 } 5729], ls = [ 5730 { 5731 id: "t1", 5732 name: "Markéta Horáková", 5733 role: "Zakladatelka & Åeditelka", 5734 bio: "Markéta stojà za vznikem VýchodoÄeských trhů od roku 2018. VÄÅÃ, že jÃdlo má mÃt pÅÃbÄh a lokálnà výrobci si zasloužà pÅÃmé spojenà se svými zákaznÃky.", 5735 image: "https://images.unsplash.com/photo-1679745776849-99c231c9b27d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400" 5736 }, 5737 { 5738 id: "t2", 5739 name: "Tomáš BeneÅ¡", 5740 role: "Koordinátor výrobců", 5741 bio: "Tomáš se vÄnuje výbÄru a komunikaci s výrobci. Každý nový výrobce projde osobnÃm setkánÃm a posouzenÃm jeho výrobnÃho procesu.", 5742 image: "https://images.unsplash.com/photo-1770392988936-dc3d8581e0c9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400" 5743 }, 5744 { 5745 id: "t3", 5746 name: "Jana KrejÄová", 5747 role: "Komunikace & marketing", 5748 bio: "Jana se stará o to, aby se zprávy o trhách dostaly ke správným lidem. Spravuje sociálnà sÃtÄ, newsletter a vztahy s médii.", 5749 image: "https://images.unsplash.com/photo-1650213236604-6dd826c965c0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400" 5750 } 5751]; 5752function Cr({ vendor: e }) { 5753 return /* @__PURE__ */ s( 5754 "article", 5755 { 5756 className: "group flex flex-col bg-white rounded-2xl overflow-hidden transition-all duration-300 hover:-translate-y-0.5", 5757 style: { 5758 boxShadow: "0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.07)" 5759 }, 5760 onMouseEnter: (t) => { 5761 t.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.09), 0 12px 32px rgba(0,0,0,0.10)"; 5762 }, 5763 onMouseLeave: (t) => { 5764 t.currentTarget.style.boxShadow = "0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.07)"; 5765 }, 5766 children: [
5767 /* @__PURE__ */ a("div", { className: "aspect-[16/9] overflow-hidden bg-[#f0ebe0] flex-shrink-0", children: /* @__PURE__ */ a( 5768 "img", 5769 { 5770 src: e.image, 5771 alt: e.name, 5772 className: "w-full h-full object-cover transition-transform duration-500 group-hover:scale-[1.04]" 5773 } 5774 ) }), 5775 /* @__PURE__ */ s("div", { className: "flex flex-col flex-1 px-5 py-4 gap-3", children: [ 5776 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-wrap", children: [ 5777 /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full bg-[#e8f0ea] text-[#3d6b4f] text-xs", style: { fontWeight: 500 }, children: e.category }), 5778 e.featured && /* @__PURE__ */ a("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full bg-[#f5ede3] text-[#7a5230] text-xs", style: { fontWeight: 500 }, children: "Vybraný" }) 5779 ] }), 5780 /* @__PURE__ */ a( 5781 "h3", 5782 { 5783 className: "text-[#2c1f0e] leading-snug", 5784 style: { 5785 fontFamily: "'Playfair Display', Georgia, serif", 5786 fontSize: "1.05rem", 5787 fontWeight: 700 5788 }, 5789 children: e.name 5790 } 5791 ),
5792 /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[#9b9390]", children: [ 5793 /* @__PURE__ */ a($e, { className: "w-3 h-3 text-[#3d6b4f] flex-shrink-0" }), 5794 /* @__PURE__ */ a("span", { className: "text-xs", children: e.origin }) 5795 ] }), 5796 /* @__PURE__ */ s("div", { className: "flex flex-col gap-3 mt-auto pt-3 border-t border-[#f5f2ee]", children: [ 5797 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed line-clamp-2", children: e.shortDescription }), 5798 /* @__PURE__ */ s( 5799 "span", 5800 { 5801 className: "inline-flex items-center gap-1 text-[#3d6b4f] text-xs self-start transition-gap duration-200 group-hover:gap-1.5", 5802 style: { fontWeight: 500 }, 5803 children: [ 5804 "Zjistit vÃce", 5805 /* @__PURE__ */ a(ve, { className: "w-3 h-3" }) 5806 ] 5807 } 5808 ) 5809 ] }) 5810 ] }) 5811 ] 5812 } 5813 ); 5814} 5815function Y({ children: e, variant: t = "default", size: r = "sm", className: i = "" }) { 5816 const n = "inline-flex items-center rounded-full font-medium tracking-wide", l = { 5817 sm: "px-3 py-0.5 text-xs", 5818 md: "px-4 py-1 text-sm" 5819 }, o = { 5820 default: "bg-[#f0ebe0] text-[#6b6355]", 5821 green: "bg-[#e8f0ea] text-[#3d6b4f]", 5822 brown: "bg-[#f5ede3] text-[#7a5230]", 5823 outline: "border border-[#e8dfd0] text-[#6b6355] bg-transparent" 5824 }; 5825 return /* @__PURE__ */ a("span", { className: `${n} ${l[r]} ${o[t]} ${i}`, children: e }); 5826} 5827function qt({ article: e, variant: t = "default" }) { 5828 return t === "horizontal" ? /* @__PURE__ */ s("article", { className: "bg-white rounded-xl border border-[#e8dfd0] overflow-hidden hover:shadow-md transition-shadow group flex flex-col sm:flex-row", children: [ 5829 /* @__PURE__ */ a("div", { className: "sm:w-56 lg:w-72 aspect-[16/9] sm:aspect-auto overflow-hidden flex-shrink-0", children: /* @__PURE__ */ a( 5830 "img", 5831 { 5832 src: e.image, 5833 alt: e.title, 5834 className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" 5835 } 5836 ) }), 5837 /* @__PURE__ */ s("div", { className: "p-5 flex flex-col justify-between flex-1", children: [
5838 /* @__PURE__ */ s("div", { children: [ 5839 /* @__PURE__ */ a("div", { className: "mb-2", children: /* @__PURE__ */ a(Y, { variant: "brown", children: e.category }) }), 5840 /* @__PURE__ */ a("h3", { className: "text-[#2c1f0e] mb-2 leading-snug", style: { fontFamily: "'Playfair Display', Georgia, serif" }, children: e.title }), 5841 /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 mb-3", children: [ 5842 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 text-[#6b6355] text-xs", children: [ 5843 /* @__PURE__ */ a(Ae, { className: "w-3 h-3 text-[#3d6b4f]" }), 5844 /* @__PURE__ */ a("span", { children: e.date }) 5845 ] }), 5846 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 text-[#6b6355] text-xs", children: [ 5847 /* @__PURE__ */ a(vr, { className: "w-3 h-3 text-[#3d6b4f]" }), 5848 /* @__PURE__ */ a("span", { children: e.author }) 5849 ] }) 5850 ] }), 5851 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed line-clamp-2", children: e.excerpt }) 5852 ] }),
5853 /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ s( 5854 $, 5855 { 5856 to: `/aktuality/${e.id}`, 5857 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm font-medium hover:gap-2.5 transition-all group/link", 5858 children: [ 5859 "ÄÃst dál", 5860 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover/link:translate-x-0.5" }) 5861 ] 5862 } 5863 ) }) 5864 ] }) 5865 ] }) : /* @__PURE__ */ s("article", { className: "bg-white rounded-xl border border-[#e8dfd0] overflow-hidden hover:shadow-md transition-shadow group", children: [ 5866 /* @__PURE__ */ a("div", { className: "aspect-[16/9] overflow-hidden", children: /* @__PURE__ */ a( 5867 "img", 5868 { 5869 src: e.image, 5870 alt: e.title, 5871 className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" 5872 } 5873 ) }), 5874 /* @__PURE__ */ s("div", { className: "p-5", children: [ 5875 /* @__PURE__ */ a("div", { className: "mb-2", children: /* @__PURE__ */ a(Y, { variant: "brown", children: e.category }) }),
5876 /* @__PURE__ */ a("h3", { className: "text-[#2c1f0e] mb-2 leading-snug", style: { fontFamily: "'Playfair Display', Georgia, serif" }, children: e.title }), 5877 /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 mb-3", children: [ 5878 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 text-[#6b6355] text-xs", children: [ 5879 /* @__PURE__ */ a(Ae, { className: "w-3 h-3 text-[#3d6b4f]" }), 5880 /* @__PURE__ */ a("span", { children: e.date }) 5881 ] }), 5882 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 text-[#6b6355] text-xs", children: [ 5883 /* @__PURE__ */ a(vr, { className: "w-3 h-3 text-[#3d6b4f]" }), 5884 /* @__PURE__ */ a("span", { children: e.author }) 5885 ] }) 5886 ] }), 5887 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed line-clamp-3 mb-4", children: e.excerpt }), 5888 /* @__PURE__ */ s( 5889 $, 5890 { 5891 to: `/aktuality/${e.id}`, 5892 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm font-medium hover:gap-2.5 transition-all group/link", 5893 children: [ 5894 "ÄÃst dál",
5895 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover/link:translate-x-0.5" }) 5896 ] 5897 } 5898 ) 5899 ] }) 5900 ] }); 5901} 5902function _({ children: e, className: t = "", as: r = "section" }) { 5903 return /* @__PURE__ */ a(r, { className: `w-full px-4 sm:px-6 lg:px-8 ${t}`, children: /* @__PURE__ */ a("div", { className: "max-w-[1200px] mx-auto", children: e }) }); 5904} 5905function os(e) { 5906 const t = e.indexOf("."); 5907 return t === -1 ? { day: e, rest: "" } : { day: e.slice(0, t + 1), rest: e.slice(t + 1).trim() }; 5908} 5909function ss({ 5910 nextDate: e, 5911 nextTime: t, 5912 venueName: r, 5913 venueCity: i, 5914 imageUrl: n 5915}) { 5916 const { day: l, rest: o } = os(e); 5917 return /* @__PURE__ */ s("section", { className: "relative min-h-[600px] sm:min-h-[680px] flex items-center overflow-hidden", children: [ 5918 /* @__PURE__ */ s("div", { className: "absolute inset-0", children: [ 5919 /* @__PURE__ */ a( 5920 "img", 5921 { 5922 src: n, 5923 alt: "FarmáÅské trhy", 5924 className: "w-full h-full object-cover" 5925 } 5926 ),
5927 /* @__PURE__ */ a("div", { className: "absolute inset-0 bg-gradient-to-br from-[#1a110a]/80 via-[#1e1208]/70 to-[#1a2e1f]/75" }) 5928 ] }), 5929 /* @__PURE__ */ a("div", { className: "relative z-10 w-full px-4 sm:px-6 lg:px-8 py-16 sm:py-20 lg:py-24", children: /* @__PURE__ */ a("div", { className: "max-w-[1200px] mx-auto", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-16 items-center", children: [ 5930 /* @__PURE__ */ s("div", { children: [ 5931 /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/12 text-white/90 text-sm mb-7 border border-white/20 backdrop-blur-sm", children: [ 5932 /* @__PURE__ */ a(mt, { className: "w-3.5 h-3.5 text-[#7ec99e] flex-shrink-0" }), 5933 "Regionálnà farmáÅské trhy · Hradec Králové" 5934 ] }), 5935 /* @__PURE__ */ s( 5936 "h1", 5937 { 5938 className: "text-white mb-5", 5939 style: { 5940 fontFamily: "'Playfair Display', Georgia, serif", 5941 fontSize: "clamp(2.1rem, 4.5vw, 3.25rem)", 5942 fontWeight: 700, 5943 lineHeight: 1.15 5944 }, 5945 children: [ 5946 "VÃtejte na",
5947 /* @__PURE__ */ a("br", {}), 5948 "VýchodoÄeských trzÃch" 5949 ] 5950 } 5951 ), 5952 /* @__PURE__ */ a( 5953 "p", 5954 { 5955 className: "text-white/75 leading-relaxed mb-10 max-w-[460px]", 5956 style: { fontSize: "1.05rem" }, 5957 children: "Pravidelné trhy lokálnÃch výrobců a farmáÅů z celého regionu. Äerstvé, poctivé, s pÅÃbÄhem â vždy na Velkém námÄstà v Hradci Králové." 5958 } 5959 ), 5960 /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3", children: [ 5961 /* @__PURE__ */ s( 5962 $, 5963 { 5964 to: "/trziste", 5965 className: "inline-flex items-center gap-2 px-6 py-3 bg-[#3d6b4f] text-white rounded-lg hover:bg-[#2d5240] transition-colors text-sm", 5966 style: { fontWeight: 500 }, 5967 children: [ 5968 "Zobrazit vÅ¡echny termÃny", 5969 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 5970 ] 5971 } 5972 ),
5973 /* @__PURE__ */ s( 5974 "a", 5975 { 5976 href: "#novinky", 5977 className: "inline-flex items-center gap-2 px-6 py-3 rounded-lg border border-white/25 text-white/90 hover:bg-white/10 transition-colors backdrop-blur-sm text-sm", 5978 style: { fontWeight: 500 }, 5979 children: [ 5980 /* @__PURE__ */ a(er, { className: "w-4 h-4 text-white/70" }), 5981 "OdebÃrat novinky" 5982 ] 5983 } 5984 ) 5985 ] }) 5986 ] }), 5987 /* @__PURE__ */ a("div", { className: "flex justify-center lg:justify-end", children: /* @__PURE__ */ s( 5988 "div", 5989 { 5990 className: "w-full max-w-sm rounded-2xl overflow-hidden", 5991 style: { 5992 background: "rgba(255, 255, 255, 0.18)", 5993 backdropFilter: "blur(18px)", 5994 WebkitBackdropFilter: "blur(18px)", 5995 border: "1px solid rgba(255, 255, 255, 0.28)", 5996 boxShadow: "0 8px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.35)" 5997 }, 5998 children: [
5999 /* @__PURE__ */ s( 6000 "div", 6001 { 6002 className: "px-6 py-4 flex items-center gap-2.5", 6003 style: { background: "rgba(61, 107, 79, 0.75)", borderBottom: "1px solid rgba(255,255,255,0.12)" }, 6004 children: [ 6005 /* @__PURE__ */ a(Ae, { className: "w-4 h-4 text-white/80 flex-shrink-0" }), 6006 /* @__PURE__ */ a( 6007 "span", 6008 { 6009 className: "text-white text-xs uppercase tracking-widest", 6010 style: { fontWeight: 600 }, 6011 children: "PÅÃÅ¡tà termÃn" 6012 } 6013 ) 6014 ] 6015 } 6016 ), 6017 /* @__PURE__ */ s("div", { className: "px-7 pt-7 pb-2", children: [ 6018 /* @__PURE__ */ a( 6019 "p", 6020 { 6021 className: "text-white leading-none mb-1", 6022 style: { 6023 fontFamily: "'Playfair Display', Georgia, serif", 6024 fontSize: "clamp(4.5rem, 9vw, 6rem)", 6025 fontWeight: 700, 6026 textShadow: "0 2px 12px rgba(0,0,0,0.25)" 6027 }, 6028 children: l 6029 } 6030 ),
6031 /* @__PURE__ */ a( 6032 "p", 6033 { 6034 className: "text-white/90", 6035 style: { 6036 fontFamily: "'Playfair Display', Georgia, serif", 6037 fontSize: "clamp(1.3rem, 2.5vw, 1.55rem)", 6038 fontWeight: 500 6039 }, 6040 children: o 6041 } 6042 ) 6043 ] }), 6044 /* @__PURE__ */ a("div", { className: "mx-7 my-5 h-px", style: { background: "rgba(255,255,255,0.2)" } }), 6045 /* @__PURE__ */ s("div", { className: "px-7 pb-7 flex flex-col gap-4", children: [ 6046 /* @__PURE__ */ s("div", { className: "flex items-center gap-3.5", children: [ 6047 /* @__PURE__ */ a( 6048 "div", 6049 { 6050 className: "w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0", 6051 style: { background: "rgba(255,255,255,0.15)", border: "1px solid rgba(255,255,255,0.22)" }, 6052 children: /* @__PURE__ */ a(We, { className: "w-4 h-4 text-white" }) 6053 } 6054 ),
6055 /* @__PURE__ */ s("div", { children: [ 6056 /* @__PURE__ */ a("p", { className: "text-white/55 text-xs uppercase tracking-wider mb-0.5", children: "Äas" }), 6057 /* @__PURE__ */ a( 6058 "p", 6059 { 6060 className: "text-white", 6061 style: { fontWeight: 600, fontSize: "0.95rem" }, 6062 children: t 6063 } 6064 ) 6065 ] }) 6066 ] }), 6067 /* @__PURE__ */ s("div", { className: "flex items-center gap-3.5", children: [ 6068 /* @__PURE__ */ a( 6069 "div", 6070 { 6071 className: "w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0", 6072 style: { background: "rgba(255,255,255,0.15)", border: "1px solid rgba(255,255,255,0.22)" }, 6073 children: /* @__PURE__ */ a($e, { className: "w-4 h-4 text-white" }) 6074 } 6075 ), 6076 /* @__P
6076URE__ */ s("div", { children: [ 6077 /* @__PURE__ */ a("p", { className: "text-white/55 text-xs uppercase tracking-wider mb-0.5", children: "MÃsto" }), 6078 /* @__PURE__ */ a( 6079 "p", 6080 { 6081 className: "text-white", 6082 style: { fontWeight: 600, fontSize: "0.95rem" }, 6083 children: r 6084 } 6085 ), 6086 /* @__PURE__ */ a("p", { className: "text-white/70 text-sm", children: i }) 6087 ] }) 6088 ] }) 6089 ] }) 6090 ] 6091 } 6092 ) }) 6093 ] }) }) }) 6094 ] }); 6095} 6096function cs({ market: e, isNext: t = !1 }) { 6097 const r = e.date.indexOf(". "), i = r !== -1 ? e.date.slice(0, r) : e.date, n = r !== -1 ? e.date.slice(r + 2) : "", l = e.tags[0] ?? ""; 6098 return t ? /* @__PURE__ */ s("article", { className: "relative rounded-xl bg-[#3d6b4f] p-5 flex flex-col justify-between min-h-[156px] overflow-hidden", children: [ 6099 /* @__PURE__ */ a( 6100 "div", 6101 { 6102 className: "absolute -right-6 -top-6 w-28 h-28 rounded-full opacity-10 bg-white pointer-events-none", 6103 "aria-hidden": !0 6104 } 6105 ), 6106 /* @__PURE__ */ s("div", { className: "flex items-center justify-between mb-3", children: [
6107 /* @__PURE__ */ a("span", { className: "text-[#a8d4b8] text-xs uppercase tracking-widest select-none", children: "PÅÃÅ¡tà termÃn" }), 6108 /* @__PURE__ */ a("span", { className: "px-2 py-0.5 rounded-full bg-white/15 text-white/90 text-xs border border-white/20", children: l }) 6109 ] }), 6110 /* @__PURE__ */ s("div", { className: "flex-1", children: [ 6111 /* @__PURE__ */ s( 6112 "p", 6113 { 6114 className: "text-white leading-none", 6115 style: { 6116 fontFamily: "'Playfair Display', Georgia, serif", 6117 fontSize: "clamp(2rem, 4vw, 2.5rem)", 6118 fontWeight: 700 6119 }, 6120 children: [ 6121 i, 6122 "." 6123 ] 6124 } 6125 ), 6126 /* @__PURE__ */ a( 6127 "p", 6128 { 6129 className: "text-white/75 mt-0.5", 6130 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1rem" }, 6131 children: n 6132 } 6133 ) 6134 ] }), 6135 /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 mt-4 pt-3 border-t border-white/15", children: [
6136 /* @__PURE__ */ a(We, { className: "w-3.5 h-3.5 text-white/60 flex-shrink-0" }), 6137 /* @__PURE__ */ a("span", { className: "text-white/80 text-sm", children: e.time }) 6138 ] }) 6139 ] }) : /* @__PURE__ */ s("article", { className: "rounded-xl bg-white border border-[#e8dfd0] p-5 flex flex-col justify-between min-h-[156px] hover:border-[#c8d9c0] hover:shadow-sm transition-all", children: [ 6140 /* @__PURE__ */ a("div", { className: "flex items-start justify-between mb-3", children: /* @__PURE__ */ a("span", { className: "px-2 py-0.5 rounded-full bg-[#e8f0ea] text-[#3d6b4f] text-xs border border-[#c8ddd0]", children: l }) }), 6141 /* @__PURE__ */ s("div", { className: "flex-1", children: [ 6142 /* @__PURE__ */ s( 6143 "p", 6144 { 6145 className: "text-[#2c1f0e] leading-none", 6146 style: { 6147 fontFamily: "'Playfair Display', Georgia, serif", 6148 fontSize: "clamp(1.7rem, 3vw, 2.1rem)", 6149 fontWeight: 700 6150 }, 6151 children: [ 6152 i, 6153 "." 6154 ] 6155 } 6156 ),
6157 /* @__PURE__ */ a( 6158 "p", 6159 { 6160 className: "text-[#6b6355] mt-0.5", 6161 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "0.95rem" }, 6162 children: n 6163 } 6164 ) 6165 ] }), 6166 /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 mt-4 pt-3 border-t border-[#f0ebe0]", children: [ 6167 /* @__PURE__ */ a(We, { className: "w-3.5 h-3.5 text-[#3d6b4f] flex-shrink-0" }), 6168 /* @__PURE__ */ a("span", { className: "text-[#6b6355] text-sm", children: e.time }) 6169 ] }) 6170 ] }); 6171} 6172const ds = "Velké námÄstÃ", ms = "Hradec Králové", hs = "https://images.unsplash.com/photo-1762965619672-cfabbdfc7bb2?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxsb2NhbCUyMG1hcmtldCUyMHN0YWxscyUyMGZyZXNoJTIwcHJvZHVjZSUyMHZlZ2V0YWJsZXN8ZW58MXx8fHwxNzcxNTA2MDU1fDA&ixlib=rb-4.1.0&q=80&w=1080&utm_source=figma&utm_medium=referral", us = "https://images.unsplash.com/photo-1758346971711-70afe26e6326?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=800"; 6173function fs() { 6174 const [e, t] = se(""), [r, i] = se(!1), n = Yt.filter((u) => !u.isPast).slice(0, 3), l = lt.filter((u) => u.featured).slice(0, 6), o = St.slice(0, 3), c = n[0], m = Mr.slice(0, 6), h = (u) => { 6175 u.preventDefault(), e && (i(!0), t("")); 6176 }; 6177 return /* @__PURE__ */ s("main", { children: [ 6178 c && /* @__PURE__ */ a( 6179 ss, 6180 { 6181 nextDate: c.date, 6182 nextTime: c.time, 6183 venueName: ds, 6184 venueCity: ms, 6185 imageUrl: hs 6186 } 6187 ), 6188 /* @__PURE__ */ a("div", { className: "bg-[#3d6b4f] text-white", children: /* @__PURE__ */ a(_, { className: "py-6", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-center", children: [ 6189 { 6190 icon: Ae, 6191 value: "24", 6192 label: "trhů roÄnÄ" 6193 }, 6194 { icon: Jt, value: "45+", label: "výrobců" }, 6195 { 6196 icon: We, 6197 value: "každý mÄsÃc", 6198 label: "pravidelnÄ" 6199 }, 6200 { 6201 icon: Qo, 6202 value: "8 000+", 6203 label: "zákaznÃků" 6204 } 6205 ].map((u) => /* @__PURE__ */ s( 6206 "div", 6207 { 6208 className: "flex flex-col items-center gap-1", 6209 children: [
6210 /* @__PURE__ */ a(u.icon, { className: "w-5 h-5 text-white/70 mb-1" }), 6211 /* @__PURE__ */ a( 6212 "span", 6213 { 6214 className: "text-2xl font-bold", 6215 style: { 6216 fontFamily: "'Playfair Display', Georgia, serif" 6217 }, 6218 children: u.value 6219 } 6220 ), 6221 /* @__PURE__ */ a("span", { className: "text-white/75 text-sm", children: u.label }) 6222 ] 6223 }, 6224 u.label 6225 )) }) }) }), 6226 /* @__PURE__ */ s(_, { className: "py-16", children: [ 6227 /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-8", children: [ 6228 /* @__PURE__ */ s("div", { children: [ 6229 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "TermÃny 2026" }), 6230 /* @__PURE__ */ a( 6231 "h2", 6232 { 6233 className: "text-[#2c1f0e]", 6234 style: { 6235 fontFamily: "'Playfair Display', Georgia, serif", 6236 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6237 }, 6238 children: "NadcházejÃcà trhy" 6239 } 6240 ),
6241 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm mt-1.5", children: "Každý mÄsÃc na stejném mÃstÄ â Velké námÄstÃ, Hradec Králové" }) 6242 ] }), 6243 /* @__PURE__ */ s( 6244 $, 6245 { 6246 to: "/trziste", 6247 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm font-medium hover:gap-2.5 transition-all group flex-shrink-0", 6248 children: [ 6249 "VÅ¡echny termÃny", 6250 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover:translate-x-0.5" }) 6251 ] 6252 } 6253 ) 6254 ] }), 6255 /* @__PURE__ */ a("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3 sm:gap-4", children: n.map((u, p) => /* @__PURE__ */ a( 6256 cs, 6257 { 6258 market: u, 6259 isNext: p === 0 6260 }, 6261 u.id 6262 )) }) 6263 ] }), 6264 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] py-16", children: /* @__PURE__ */ a(_, { children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12 items-center", children: [
6265 /* @__PURE__ */ s("div", { children: [ 6266 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-3", children: "Kdo jsme" }), 6267 /* @__PURE__ */ a( 6268 "h2", 6269 { 6270 className: "text-[#2c1f0e] mb-5", 6271 style: { 6272 fontFamily: "'Playfair Display', Georgia, serif", 6273 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6274 }, 6275 children: "Lokálnà trhy s pÅÃbÄhem" 6276 } 6277 ), 6278 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed mb-4", children: "VýchodoÄeské trhy vznikly z pÅesvÄdÄenÃ, že jÃdlo má mÃt pÅÃbÄh a výrobce má mÃt tváÅ. Od roku 2018 propojujeme farmáÅe, ÅemeslnÃky a nadÅ¡ené zákaznÃky z Královéhradeckého a Pardubického kraje." }), 6279 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed mb-6", children: "Každý výrobce na naÅ¡ich trzÃch proÅ¡el peÄlivým výbÄrem. Klademe důraz na lokálnà původ, tradiÄnà postupy a férové podmÃnky." }),
6280 /* @__PURE__ */ a("ul", { className: "flex flex-col gap-3 mb-8", children: [ 6281 "Pouze lokálnà výrobci z regionu", 6282 "PÅÃmý prodej bez prostÅednÃků", 6283 "Transparentnà kodex výrobce", 6284 "Vstup volný pro veÅejnost" 6285 ].map((u) => /* @__PURE__ */ s( 6286 "li", 6287 { 6288 className: "flex items-center gap-2.5 text-[#2c1f0e] text-sm", 6289 children: [ 6290 /* @__PURE__ */ a("div", { className: "w-5 h-5 rounded-full bg-[#e8f0ea] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(Rt, { className: "w-3.5 h-3.5 text-[#3d6b4f]" }) }), 6291 u 6292 ] 6293 }, 6294 u 6295 )) }), 6296 /* @__PURE__ */ s( 6297 $, 6298 { 6299 to: "/kodex", 6300 className: "inline-flex items-center gap-1.5 px-5 py-2.5 border-2 border-[#3d6b4f] text-[#3d6b4f] rounded-lg text-sm font-medium hover:bg-[#3d6b4f] hover:text-white transition-colors", 6301 children: [ 6302 "ÄÃst kodex výrobce",
6303 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 6304 ] 6305 } 6306 ) 6307 ] }), 6308 /* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-4", children: [ 6309 /* @__PURE__ */ a("div", { className: "rounded-xl overflow-hidden aspect-[3/4]", children: /* @__PURE__ */ a( 6310 "img", 6311 { 6312 src: "https://images.unsplash.com/photo-1771098302156-d92e3cbb3b68?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=600", 6313 alt: "Výrobci na trhu", 6314 className: "w-full h-full object-cover" 6315 } 6316 ) }), 6317 /* @__PURE__ */ s("div", { className: "flex flex-col gap-4", children: [ 6318 /* @__PURE__ */ a("div", { className: "rounded-xl overflow-hidden aspect-square", children: /* @__PURE__ */ a( 6319 "img", 6320 { 6321 src: "https://images.unsplash.com/photo-1703007739223-3e87d56e03e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 6322 alt: "Med", 6323 className: "w-full h-full object-cover" 6324 } 6325 ) }),
6326 /* @__PURE__ */ a("div", { className: "rounded-xl overflow-hidden flex-1", children: /* @__PURE__ */ a( 6327 "img", 6328 { 6329 src: "https://images.unsplash.com/photo-1565801776220-10bd41565980?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=400", 6330 alt: "Pekárna", 6331 className: "w-full h-full object-cover" 6332 } 6333 ) }) 6334 ] }) 6335 ] }) 6336 ] }) }) }), 6337 /* @__PURE__ */ s(_, { className: "py-16", children: [ 6338 /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-10", children: [ 6339 /* @__PURE__ */ s("div", { children: [ 6340 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "Naši výrobci" }), 6341 /* @__PURE__ */ a( 6342 "h2", 6343 { 6344 className: "text-[#2c1f0e]", 6345 style: { 6346 fontFamily: "'Playfair Display', Georgia, serif", 6347 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6348 }, 6349 children: "Poznajte výrobce" 6350 } 6351 ) 6352 ] }),
6353 /* @__PURE__ */ s( 6354 $, 6355 { 6356 to: "/vyrobci", 6357 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm font-medium hover:gap-2.5 transition-all group", 6358 children: [ 6359 "Všichni výrobci", 6360 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover:translate-x-0.5" }) 6361 ] 6362 } 6363 ) 6364 ] }), 6365 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6", children: l.map((u) => /* @__PURE__ */ a(Cr, { vendor: u }, u.id)) }) 6366 ] }), 6367 /* @__PURE__ */ a("section", { id: "novinky", className: "bg-[#3d6b4f] py-16", children: /* @__PURE__ */ a(_, { children: /* @__PURE__ */ s("div", { className: "max-w-xl mx-auto text-center", children: [ 6368 /* @__PURE__ */ a("div", { className: "w-12 h-12 rounded-full bg-white/15 flex items-center justify-center mx-auto mb-5", children: /* @__PURE__ */ a(er, { className: "w-6 h-6 text-white" }) }),
6369 /* @__PURE__ */ a( 6370 "h2", 6371 { 6372 className: "text-white mb-3", 6373 style: { 6374 fontFamily: "'Playfair Display', Georgia, serif", 6375 fontSize: "clamp(1.6rem, 3vw, 2rem)" 6376 }, 6377 children: "OdebÃrat novinky" 6378 } 6379 ), 6380 /* @__PURE__ */ a("p", { className: "text-white/80 leading-relaxed mb-8", children: "Dostávejte pÅehled termÃnů trhů, novinky od výrobců a sezónnà tipy pÅÃmo do vašà e-mailové schránky. Žádný spam, odhlášenà jednÃm kliknutÃm." }), 6381 r ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center gap-2 bg-white/15 rounded-xl px-6 py-4 border border-white/25", children: [ 6382 /* @__PURE__ */ a(Rt, { className: "w-5 h-5 text-[#7ec99e]" }), 6383 /* @__PURE__ */ a("span", { className: "text-white font-medium", children: "DÄkujeme! PÅihlásili jste se k odbÄru novinek." }) 6384 ] }) : /* @__PURE__ */ s( 6385 "form", 6386 { 6387 onSubmit: h, 6388 className: "flex flex-col sm:flex-row gap-3", 6389 children: [
6390 /* @__PURE__ */ a( 6391 "input", 6392 { 6393 type: "email", 6394 required: !0, 6395 value: e, 6396 onChange: (u) => t(u.target.value), 6397 placeholder: "Váš e-mail", 6398 className: "flex-1 px-4 py-3 rounded-lg bg-white/15 border border-white/25 text-white placeholder:text-white/60 focus:outline-none focus:ring-2 focus:ring-white/40 backdrop-blur-sm" 6399 } 6400 ), 6401 /* @__PURE__ */ a( 6402 "button", 6403 { 6404 type: "submit", 6405 className: "px-6 py-3 bg-white text-[#3d6b4f] rounded-lg font-medium hover:bg-[#f0ebe0] transition-colors flex-shrink-0", 6406 children: "OdebÃrat novinky" 6407 } 6408 ) 6409 ] 6410 } 6411 ), 6412 /* @__PURE__ */ a("p", { className: "text-white/55 text-xs mt-4", children: "OdeslánÃm souhlasÃte se zpracovánÃm e-mailu pro zasÃlánà novinek. Odhlásit se lze kdykoli." }) 6413 ] }) }) }), 6414 /* @__PURE__ */ s(_, { className: "py-16", children: [
6415 /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-10", children: [ 6416 /* @__PURE__ */ s("div", { children: [ 6417 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-3", children: "Aktuality" }), 6418 /* @__PURE__ */ a( 6419 "h2", 6420 { 6421 className: "text-[#2c1f0e]", 6422 style: { 6423 fontFamily: "'Playfair Display', Georgia, serif", 6424 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6425 }, 6426 children: "NejnovÄjšà zprávy" 6427 } 6428 ) 6429 ] }), 6430 /* @__PURE__ */ s( 6431 $, 6432 { 6433 to: "/aktuality", 6434 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm font-medium hover:gap-2.5 transition-all group", 6435 children: [ 6436 "VÅ¡echny aktuality", 6437 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover:translate-x-0.5" }) 6438 ] 6439 } 6440 ) 6441 ] }),
6442 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: o.map((u) => /* @__PURE__ */ a(qt, { article: u }, u.id)) }) 6443 ] }), 6444 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] py-12", children: /* @__PURE__ */ a(_, { children: /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-6 text-center sm:text-left", children: [ 6445 /* @__PURE__ */ s("div", { children: [ 6446 /* @__PURE__ */ a( 6447 "h3", 6448 { 6449 className: "text-[#2c1f0e] mb-2", 6450 style: { 6451 fontFamily: "'Playfair Display', Georgia, serif", 6452 fontSize: "1.5rem" 6453 }, 6454 children: "Chcete prodávat na naÅ¡ich trzÃch?" 6455 } 6456 ), 6457 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm", children: "Jsme vždy otevÅeni novým lokálnÃm výrobcům. PÅeÄtÄte si náš kodex a kontaktujte nás." }) 6458 ] }), 6459 /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-3 justify-center sm:justify-start", children: [
6460 /* @__PURE__ */ s( 6461 $, 6462 { 6463 to: "/kodex", 6464 className: "inline-flex items-center gap-2 px-5 py-2.5 border border-[#3d6b4f] text-[#3d6b4f] rounded-lg text-sm font-medium hover:bg-[#3d6b4f] hover:text-white transition-colors", 6465 children: [ 6466 /* @__PURE__ */ a(Jo, { className: "w-4 h-4" }), 6467 "Kodex výrobce" 6468 ] 6469 } 6470 ), 6471 /* @__PURE__ */ s( 6472 $, 6473 { 6474 to: "/kontakt", 6475 className: "inline-flex items-center gap-2 px-5 py-2.5 bg-[#3d6b4f] text-white rounded-lg text-sm font-medium hover:bg-[#2d5240] transition-colors", 6476 children: [ 6477 "Kontaktujte nás", 6478 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 6479 ] 6480 } 6481 ) 6482 ] }) 6483 ] }) }) }), 6484 /* @__PURE__ */ a(_, { className: "py-16", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12 items-center", children: [ 6485 /* @__PURE__ */ s("div", { children: [
6486 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "O nás" }), 6487 /* @__PURE__ */ a( 6488 "h2", 6489 { 6490 className: "text-[#2c1f0e] mb-5", 6491 style: { 6492 fontFamily: "'Playfair Display', Georgia, serif", 6493 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6494 }, 6495 children: "Komunita za lokálnÃmi trhy" 6496 } 6497 ), 6498 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed mb-6", children: "Od roku 2018 propojujeme farmáÅe, ÅemeslnÃky a zákaznÃky z Královéhradeckého a Pardubického kraje. VÄÅÃme, že lokálnà potraviny majà pÅÃbÄh â a ten pÅÃbÄh stojà za to vyprávÄt." }), 6499 /* @__PURE__ */ a("ul", { className: "flex flex-col gap-4 mb-8", children: [ 6500 { 6501 icon: $e, 6502 color: "bg-[#e8f0ea] text-[#3d6b4f]", 6503 title: "Lokálnà produkty", 6504 desc: "VýhradnÄ od výrobců z regionu, bez prostÅednÃků." 6505 }, 6506 { 6507 icon: Jt, 6508 color: "bg-[#f5ede3] text-[#7a5230]", 6509 title: "Komunita", 6510 desc: "Trhy jsou mÃsto setkánÃ, nejen mÃsto nákupu." 6511 }, 6512 { 6513 icon: on, 6514 color: "bg-[#e8f0ea] text-[#3d6b4f]", 6515 title: "Transparentnost", 6516 desc: "Každý výrobce proÅ¡el provÄÅenÃm. Pravidla jsou veÅejná." 6517 } 6518 ].map((u) => /* @__PURE__ */ s( 6519 "li", 6520 { 6521 className: "flex items-start gap-3", 6522 children: [
6523 /* @__PURE__ */ a( 6524 "div", 6525 { 6526 className: `w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 mt-0.5 ${u.color}`, 6527 children: /* @__PURE__ */ a(u.icon, { className: "w-4 h-4" }) 6528 } 6529 ), 6530 /* @__PURE__ */ s("div", { children: [ 6531 /* @__PURE__ */ a( 6532 "p", 6533 { 6534 className: "text-[#2c1f0e] text-sm", 6535 style: { fontWeight: 600 }, 6536 children: u.title 6537 } 6538 ), 6539 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm", children: u.desc }) 6540 ] }) 6541 ] 6542 }, 6543 u.title 6544 )) }), 6545 /* @__PURE__ */ s( 6546 $, 6547 { 6548 to: "/o-nas", 6549 className: "inline-flex items-center gap-1.5 px-5 py-2.5 bg-[#3d6b4f] text-white rounded-lg text-sm hover:bg-[#2d5240] transition-colors", 6550 style: { fontWeight: 500 }, 6551 children: [ 6552 "VÃce o nás",
6553 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 6554 ] 6555 } 6556 ) 6557 ] }), 6558 /* @__PURE__ */ a("div", { className: "rounded-2xl overflow-hidden aspect-[4/3] shadow-md", children: /* @__PURE__ */ a( 6559 "img", 6560 { 6561 src: us, 6562 alt: "Tým VýchodoÄeských trhů", 6563 className: "w-full h-full object-cover" 6564 } 6565 ) }) 6566 ] }) }), 6567 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] py-16", children: /* @__PURE__ */ s(_, { children: [ 6568 /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-10", children: [ 6569 /* @__PURE__ */ s("div", { children: [ 6570 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-3", children: "PartneÅi" }), 6571 /* @__PURE__ */ a( 6572 "h2", 6573 { 6574 className: "text-[#2c1f0e]", 6575 style: { 6576 fontFamily: "'Playfair Display', Georgia, serif", 6577 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 6578 }, 6579 children: "NaÅ¡i partneÅi" 6580 } 6581 ),
6582 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm mt-1.5", children: "Organizace a instituce, které podporujà rozvoj lokálnÃch trhů." }) 6583 ] }), 6584 /* @__PURE__ */ s( 6585 $, 6586 { 6587 to: "/partneri", 6588 className: "inline-flex items-center gap-1.5 text-[#3d6b4f] text-sm hover:gap-2.5 transition-all group flex-shrink-0", 6589 style: { fontWeight: 500 }, 6590 children: [ 6591 "Zobrazit vÅ¡echny partnery", 6592 /* @__PURE__ */ a(ve, { className: "w-4 h-4 transition-transform group-hover:translate-x-0.5" }) 6593 ] 6594 } 6595 ) 6596 ] }), 6597 /* @__PURE__ */ a("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4", children: m.map((u) => /* @__PURE__ */ s( 6598 $, 6599 { 6600 to: "/partneri", 6601 className: "group flex flex-col items-center gap-2.5 p-4 rounded-xl bg-white border border-[#e8dfd0] hover:border-[#c8bfb0] transition-all duration-200", 6602 style: { 6603 boxShadow: "0 1px 3px rgba(0,0,0,0.04)" 6604 }, 6605 children: [
6606 /* @__PURE__ */ a( 6607 "div", 6608 { 6609 className: "w-14 h-14 rounded-xl flex items-center justify-center transition-all duration-300", 6610 style: { 6611 background: "#f0ebe0", 6612 filter: "grayscale(1) opacity(0.65)" 6613 }, 6614 onMouseEnter: (p) => { 6615 p.currentTarget.style.filter = "grayscale(0) opacity(1)", p.currentTarget.style.background = u.accentColor + "18"; 6616 }, 6617 onMouseLeave: (p) => { 6618 p.currentTarget.style.filter = "grayscale(1) opacity(0.65)", p.currentTarget.style.background = "#f0ebe0"; 6619 }, 6620 children: /* @__PURE__ */ a( 6621 "span", 6622 { 6623 className: "leading-none select-none", 6624 style: { 6625 fontFamily: "'Playfair Display', Georgia, serif", 6626 fontSize: "1.1rem", 6627 fontWeight: 700, 6628 color: u.accentColor 6629 }, 6630 children: u.shortName 6631 } 6632 ) 6633 } 6634 ),
6635 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs text-center leading-tight line-clamp-2 group-hover:text-[#2c1f0e] transition-colors", children: u.name }) 6636 ] 6637 }, 6638 u.id 6639 )) }) 6640 ] }) }) 6641 ] }); 6642} 6643const ps = "Velké námÄstÃ, Hradec Králové"; 6644function Na(e) { 6645 const t = e.indexOf(". "); 6646 return t === -1 ? [e, ""] : [e.slice(0, t), e.slice(t + 2)]; 6647} 6648function vs() { 6649 const e = Yt.filter((r) => !r.isPast).sort((r, i) => new Date(r.dateISO).getTime() - new Date(i.dateISO).getTime()), t = Yt.filter((r) => r.isPast).sort((r, i) => new Date(i.dateISO).getTime() - new Date(r.dateISO).getTime()); 6650 return /* @__PURE__ */ s("main", { children: [ 6651 /* @__PURE__ */ a("div", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0] py-10", children: /* @__PURE__ */ s(_, { children: [ 6652 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-4", children: [ 6653 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }),
6654 /* @__PURE__ */ a("span", { children: "/" }), 6655 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: "TermÃny" }) 6656 ] }), 6657 /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-5", children: [ 6658 /* @__PURE__ */ s("div", { children: [ 6659 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "TermÃny 2026" }), 6660 /* @__PURE__ */ a( 6661 "h1", 6662 { 6663 className: "text-[#2c1f0e] mb-3", 6664 style: { 6665 fontFamily: "'Playfair Display', Georgia, serif", 6666 fontSize: "clamp(1.8rem, 4vw, 2.5rem)" 6667 }, 6668 children: "PÅehled trhů" 6669 } 6670 ), 6671 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-md text-sm leading-relaxed", children: "Pravidelné farmáÅské trhy, vždy na stejném mÃstÄ. Vstup volný pro veÅejnost." }), 6672 /* @__PURE__ */ s("div", { className: "flex items-start gap-2.5 mt-5 bg-white border border-[#e8dfd0] rounded-xl px-4 py-3 inline-flex w-fit", children: [
6673 /* @__PURE__ */ a("div", { className: "w-7 h-7 rounded-full bg-[#e8f0ea] flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ a($e, { className: "w-3.5 h-3.5 text-[#3d6b4f]" }) }), 6674 /* @__PURE__ */ s("div", { children: [ 6675 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] text-sm", style: { fontWeight: 500 }, children: ps }), 6676 /* @__PURE__ */ a("p", { className: "text-[#9b9390] text-xs mt-0.5", children: "Stálé mÃsto konánà vÅ¡ech trhů" }) 6677 ] }) 6678 ] }) 6679 ] }), 6680 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#3d6b4f] text-sm bg-[#e8f0ea] border border-[#c8ddd0] rounded-xl px-4 py-2.5 self-start flex-shrink-0", children: [ 6681 /* @__PURE__ */ a(Ae, { className: "w-4 h-4 flex-shrink-0" }), 6682 /* @__PURE__ */ s("span", { children: [ 6683 /* @__PURE__ */ a("span", { style: { fontWeight: 600 }, children: e.length }), 6684 " nadcházejÃcÃ", 6685 e.length === 1 ? " termÃn" : " termÃny" 6686 ] }) 6687 ] }) 6688 ] }) 6689 ] }) }), 6690 /* @__PURE__ */ s(_, { className: "py-12", children: [
6691 /* @__PURE__ */ a( 6692 "h2", 6693 { 6694 className: "text-[#2c1f0e] mb-6", 6695 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.25rem" }, 6696 children: "NadcházejÃcà termÃny" 6697 } 6698 ), 6699 e.length > 0 ? /* @__PURE__ */ a("div", { className: "max-w-2xl flex flex-col gap-1.5", children: e.map((r, i) => { 6700 const n = i === 0, [l, o] = Na(r.date), c = r.tags[0] ?? null; 6701 return /* @__PURE__ */ s( 6702 "div", 6703 { 6704 className: n ? "flex items-center gap-4 sm:gap-5 px-4 py-4 rounded-xl bg-[#edf5f1] border border-[#b8d9c5]" : "flex items-center gap-4 sm:gap-5 px-4 py-3.5 rounded-lg border border-transparent hover:bg-[#faf8f5] hover:border-[#ede7dc] transition-colors", 6705 children: [ 6706 /* @__PURE__ */ s( 6707 "span", 6708 { 6709 className: `w-10 flex-shrink-0 leading-none select-none ${n ? "text-[#2c4f3a]" : "text-[#2c1f0e]"}`, 6710 style: { 6711 fontFamily: "'Playfair Display', Georgia, serif", 6712 fontSize: "clamp(1.5rem, 3vw, 1.9rem)", 6713 fontWeight: 700 6714 }, 6715 children: [ 6716 l, 6717 "." 6718 ] 6719 } 6720 ),
6721 /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [ 6722 /* @__PURE__ */ a( 6723 "p", 6724 { 6725 className: `leading-tight ${n ? "text-[#1e3a2a]" : "text-[#2c1f0e]"}`, 6726 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "0.95rem" }, 6727 children: o 6728 } 6729 ), 6730 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 mt-1", children: [ 6731 /* @__PURE__ */ a(We, { className: "w-3 h-3 flex-shrink-0 text-[#3d6b4f]" }), 6732 /* @__PURE__ */ a("span", { className: `text-xs ${n ? "text-[#4a7a5e]" : "text-[#6b6355]"}`, children: r.time }) 6733 ] }) 6734 ] }), 6735 c && /* @__PURE__ */ a( 6736 "span", 6737 { 6738 className: `hidden sm:inline-block text-xs px-2.5 py-0.5 rounded-full flex-shrink-0 ${n ? "bg-[#c8e8d5] text-[#2c4f3a] border border-[#a0ccb4]" : "bg-[#f0ebe0] text-[#7a6b5a] border border-[#e0d7c8]"}`, 6739 children: c 6740 } 6741 ), 6742 n && /* @__PURE__ */ a("span", { className: "text-xs px-2.5 py-0.5 rounded-full bg-[#3d6b4f] text-white flex-shrink-0", children: "PÅÃÅ¡tÃ" }) 6743 ] 6744 }, 6745 r.id 6746 ); 6747 }) }) : /* @__PURE__ */ s("div", { className: "max-w-2xl text-center py-12 text-[#6b6355]", children: [
6748 /* @__PURE__ */ a(Ae, { className: "w-9 h-9 mx-auto mb-3 text-[#c8bfb0]" }), 6749 /* @__PURE__ */ a("p", { className: "text-sm", children: "Žádné nadcházejÃcà trhy nejsou momentálnÄ naplánované." }), 6750 /* @__PURE__ */ a("p", { className: "text-xs mt-1 text-[#a0978e]", children: "Sledujte nás pro nejnovÄjšà termÃny." }) 6751 ] }) 6752 ] }), 6753 t.length > 0 && /* @__PURE__ */ s("div", { className: "relative", children: [ 6754 /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ a("div", { className: "w-full max-w-[1200px] mx-auto", children: /* @__PURE__ */ a("div", { className: "h-px bg-[#e8dfd0]" }) }) }), 6755 /* @__PURE__ */ a(_, { className: "relative py-0", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2 bg-[#f9f6f2] px-4 py-1.5 text-[#a0978e] text-xs border border-[#e8dfd0] rounded-full", children: [
6756 /* @__PURE__ */ a(Rt, { className: "w-3 h-3" }), 6757 "ProbÄhlé trhy" 6758 ] }) }) }) 6759 ] }), 6760 t.length > 0 && /* @__PURE__ */ a(_, { className: "pb-14 pt-8", children: /* @__PURE__ */ a("div", { className: "max-w-2xl flex flex-col gap-1", children: t.map((r) => { 6761 const [i, n] = Na(r.date), l = r.tags[0] ?? null; 6762 return /* @__PURE__ */ s( 6763 "div", 6764 { 6765 className: "flex items-center gap-4 sm:gap-5 px-4 py-3 rounded-lg", 6766 children: [ 6767 /* @__PURE__ */ s( 6768 "span", 6769 { 6770 className: "w-10 flex-shrink-0 leading-none text-[#c8bfb0] select-none", 6771 style: { 6772 fontFamily: "'Playfair Display', Georgia, serif", 6773 fontSize: "clamp(1.5rem, 3vw, 1.9rem)", 6774 fontWeight: 700 6775 }, 6776 children: [ 6777 i, 6778 "." 6779 ] 6780 } 6781 ), 6782 /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
6783 /* @__PURE__ */ a( 6784 "p", 6785 { 6786 className: "text-[#a0978e] leading-tight", 6787 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "0.95rem" }, 6788 children: n 6789 } 6790 ), 6791 /* @__PURE__ */ s("div", { className: "flex items-center gap-1 mt-1", children: [ 6792 /* @__PURE__ */ a(We, { className: "w-3 h-3 text-[#c8bfb0] flex-shrink-0" }), 6793 /* @__PURE__ */ a("span", { className: "text-[#c8bfb0] text-xs", children: r.time }) 6794 ] }) 6795 ] }), 6796 l && /* @__PURE__ */ a("span", { className: "hidden sm:inline-block text-xs px-2.5 py-0.5 rounded-full bg-[#f5f2ee] text-[#b8b0a8] border border-[#e8e0d8] flex-shrink-0", children: l }) 6797 ] 6798 }, 6799 r.id 6800 ); 6801 }) }) }) 6802 ] }); 6803} 6804function ys() { 6805 const { id: e } = qa(), t = Yt.find((i) => i.id === e); 6806 if (!t) 6807 return /* @__PURE__ */ a("main", { className: "min-h-[50vh] flex items-center justify-center", children: /* @__PURE__ */ a(_, { children: /* @__PURE__ */ s("div", { className: "text-center py-16", children: [
6808 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-lg mb-4", children: "Trh nebyl nalezen." }), 6809 /* @__PURE__ */ s( 6810 $, 6811 { 6812 to: "/trziste", 6813 className: "inline-flex items-center gap-2 text-[#3d6b4f] text-sm font-medium", 6814 children: [ 6815 /* @__PURE__ */ a(Pt, { className: "w-4 h-4" }), 6816 "ZpÄt na pÅehled trhů" 6817 ] 6818 } 6819 ) 6820 ] }) }) }); 6821 const r = lt.filter((i) => t.vendorIds.includes(i.id)); 6822 return /* @__PURE__ */ s("main", { children: [ 6823 /* @__PURE__ */ s("div", { className: "relative h-64 sm:h-80 lg:h-96 overflow-hidden", children: [ 6824 /* @__PURE__ */ a( 6825 "img", 6826 { 6827 src: t.image, 6828 alt: t.title, 6829 className: "w-full h-full object-cover" 6830 } 6831 ), 6832 /* @__PURE__ */ a("div", { className: "absolute inset-0 bg-[#1e1208]/40" }) 6833 ] }), 6834 /* @__PURE__ */ s(_, { className: "py-10", children: [ 6835 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-6", children: [
6836 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }), 6837 /* @__PURE__ */ a("span", { children: "/" }), 6838 /* @__PURE__ */ a($, { to: "/trziste", className: "hover:text-[#3d6b4f] transition-colors", children: "Trhy" }), 6839 /* @__PURE__ */ a("span", { children: "/" }), 6840 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: t.title }) 6841 ] }), 6842 /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-10", children: [ 6843 /* @__PURE__ */ s("div", { className: "lg:col-span-2", children: [ 6844 /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-1.5 mb-4", children: [ 6845 t.tags.map((i) => /* @__PURE__ */ a(Y, { variant: "green", children: i }, i)), 6846 t.isPast && /* @__PURE__ */ a(Y, { variant: "outline", children: "ProbÄhlý" }) 6847 ] }), 6848 /* @__PURE__ */ a( 6849 "h1", 6850 { 6851 className: "text-[#2c1f0e] mb-6", 6852 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.5rem)" }, 6853 children: t.title 6854 } 6855 ),
6856 /* @__PURE__ */ a("div", { className: "prose max-w-none", children: t.description.split(` 6857 6858`).map((i, n) => /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] leading-relaxed mb-4 text-base", children: i }, n)) }) 6859 ] }), 6860 /* @__PURE__ */ a("div", { className: "lg:col-span-1", children: /* @__PURE__ */ s("div", { className: "bg-[#f0ebe0] rounded-xl p-6 border border-[#e8dfd0] sticky top-24", children: [ 6861 /* @__PURE__ */ a("h3", { className: "text-[#2c1f0e] mb-5 text-base", style: { fontFamily: "'Playfair Display', Georgia, serif" }, children: "Informace o trhu" }), 6862 /* @__PURE__ */ s("ul", { className: "flex flex-col gap-4", children: [ 6863 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 6864 /* @__PURE__ */ a(Ae, { className: "w-4 h-4 text-[#3d6b4f] mt-0.5 flex-shrink-0" }), 6865 /* @__PURE__ */ s("div", { children: [ 6866 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Datum" }),
6867 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] text-sm font-medium", children: t.date }) 6868 ] }) 6869 ] }), 6870 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 6871 /* @__PURE__ */ a(We, { className: "w-4 h-4 text-[#3d6b4f] mt-0.5 flex-shrink-0" }), 6872 /* @__PURE__ */ s("div", { children: [ 6873 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Äas" }), 6874 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] text-sm font-medium", children: t.time }) 6875 ] }) 6876 ] }), 6877 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 6878 /* @__PURE__ */ a($e, { className: "w-4 h-4 text-[#3d6b4f] mt-0.5 flex-shrink-0" }), 6879 /* @__PURE__ */ s("div", { children: [ 6880 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "MÃsto" }),
6881 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] text-sm font-medium", children: t.location }), 6882 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs mt-0.5", children: t.address }) 6883 ] }) 6884 ] }), 6885 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 6886 /* @__PURE__ */ a(Jt, { className: "w-4 h-4 text-[#3d6b4f] mt-0.5 flex-shrink-0" }), 6887 /* @__PURE__ */ s("div", { children: [ 6888 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Výrobci" }), 6889 /* @__PURE__ */ s("p", { className: "text-[#2c1f0e] text-sm font-medium", children: [ 6890 r.length, 6891 " výrobců" 6892 ] }) 6893 ] }) 6894 ] }) 6895 ] }), 6896 !t.isPast && /* @__PURE__ */ a("div", { className: "mt-6 pt-5 border-t border-[#e8dfd0]", children: /* @__PURE__ */ s( 6897 "a", 6898 { 6899 href: `https://maps.google.com/?q=${encodeURIComponent(t.address)}`, 6900 target: "_blank", 6901 rel: "noopener noreferrer", 6902 className: "w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-[#3d6b4f] text-white rounded-lg text-sm hover:bg-[#2d5240] transition-colors", 6903 children: [
6904 /* @__PURE__ */ a(pr, { className: "w-4 h-4" }), 6905 "OtevÅÃt v mapách" 6906 ] 6907 } 6908 ) }) 6909 ] }) }) 6910 ] }) 6911 ] }), 6912 /* @__PURE__ */ a("div", { className: "border-t border-[#e8dfd0]", children: /* @__PURE__ */ s(_, { className: "py-10", children: [ 6913 /* @__PURE__ */ a( 6914 "h2", 6915 { 6916 className: "text-[#2c1f0e] mb-6", 6917 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 6918 children: "Kde nás najdete" 6919 } 6920 ), 6921 /* @__PURE__ */ s("div", { className: "rounded-xl overflow-hidden border border-[#e8dfd0] bg-[#f0ebe0] h-64 flex flex-col items-center justify-center gap-3 text-[#6b6355]", children: [ 6922 /* @__PURE__ */ a($e, { className: "w-10 h-10 text-[#3d6b4f]" }), 6923 /* @__PURE__ */ s("div", { className: "text-center", children: [ 6924 /* @__PURE__ */ a("p", { className: "font-medium text-[#2c1f0e]", children: t.location }), 6925 /* @__PURE__ */ a("p", { className: "text-sm", children: t.address }) 6926 ] }),
6927 /* @__PURE__ */ s( 6928 "a", 6929 { 6930 href: `https://maps.google.com/?q=${encodeURIComponent(t.address)}`, 6931 target: "_blank", 6932 rel: "noopener noreferrer", 6933 className: "inline-flex items-center gap-1.5 px-4 py-2 bg-[#3d6b4f] text-white rounded-lg text-sm hover:bg-[#2d5240] transition-colors mt-1", 6934 children: [ 6935 /* @__PURE__ */ a(pr, { className: "w-3.5 h-3.5" }), 6936 "Zobrazit na mapÄ" 6937 ] 6938 } 6939 ) 6940 ] }) 6941 ] }) }), 6942 r.length > 0 && /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] border-t border-[#e8dfd0]", children: /* @__PURE__ */ s(_, { className: "py-12", children: [ 6943 /* @__PURE__ */ a( 6944 "h2", 6945 { 6946 className: "text-[#2c1f0e] mb-8", 6947 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 6948 children: "Výrobci na tomto trhu" 6949 } 6950 ), 6951 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6", children: r.map((i) => /* @__PURE__ */ a(Cr, { vendor: i }, i.id)) }) 6952 ] }) }), 6953 /* @__PURE__ */ a(_, { className: "py-8", children: /* @__PURE__ */ s( 6954 $, 6955 { 6956 to: "/trziste", 6957 className: "inline-flex items-center gap-2 text-[#3d6b4f] text-sm font-medium hover:gap-3 transition-all", 6958 children: [
6959 /* @__PURE__ */ a(Pt, { className: "w-4 h-4" }), 6960 "ZpÄt na pÅehled trhů" 6961 ] 6962 } 6963 ) }) 6964 ] }); 6965} 6966function gs() { 6967 const [e, t] = se(""), [r, i] = se("VÅ¡e"), n = be(() => lt.filter((l) => { 6968 const o = e === "" || l.name.toLowerCase().includes(e.toLowerCase()) || l.shortDescription.toLowerCase().includes(e.toLowerCase()) || l.origin.toLowerCase().includes(e.toLowerCase()), c = r === "VÅ¡e" || l.category === r; 6969 return o && c; 6970 }), [e, r]); 6971 return /* @__PURE__ */ s("main", { children: [ 6972 /* @__PURE__ */ a("div", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0] py-10", children: /* @__PURE__ */ s(_, { children: [ 6973 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-3", children: [ 6974 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }), 6975 /* @__PURE__ */ a("span", { children: "/" }), 6976 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: "Výrobci" }) 6977 ] }),
6978 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "NaÅ¡i výrobci" }), 6979 /* @__PURE__ */ a( 6980 "h1", 6981 { 6982 className: "text-[#2c1f0e] mb-2", 6983 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.5rem)" }, 6984 children: "AdresáŠvýrobců" 6985 } 6986 ), 6987 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-xl", children: "Poznáváme lokálnà výrobce, farmáÅe a ÅemeslnÃky z Královéhradeckého a Pardubického kraje. Každý z nich proÅ¡el výbÄrovým procesem." }) 6988 ] }) }), 6989 /* @__PURE__ */ s(_, { className: "py-10", children: [ 6990 /* @__PURE__ */ s("div", { className: "mb-8 flex flex-col gap-5", children: [ 6991 /* @__PURE__ */ s("div", { className: "relative max-w-md", children: [ 6992 /* @__PURE__ */ a(wa, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#6b6355]" }), 6993 /* @__PURE__ */ a( 6994 "input", 6995 { 6996 type: "text", 6997 value: e, 6998 onChange: (l) => t(l.target.value), 6999 placeholder: "Hledat výrobce...", 7000 className: "w-full pl-9 pr-9 py-2.5 rounded-lg border border-[#e8dfd0] bg-white text-[#2c1f0e] placeholder:text-[#b0a899] focus:outline-none focus:ring-2 focus:ring-[#3d6b4f]/30 focus:border-[#3d6b4f] transition-colors text-sm" 7001 } 7002 ), 7003 e && /* @__PURE__ */ a( 7004 "button", 7005 { 7006 onClick: () => t(""), 7007 className: "absolute right-3 top-1/2 -translate-y-1/2 text-[#6b6355] hover:text-[#2c1f0e]", 7008 "aria-label": "Vymazat hledánÃ", 7009 children: /* @__PURE__ */ a(yr, { className: "w-4 h-4" }) 7010 } 7011 ) 7012 ] }),
7013 /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: is.map((l) => /* @__PURE__ */ a( 7014 "button", 7015 { 7016 onClick: () => i(l), 7017 className: `px-3 py-1.5 rounded-full text-sm transition-colors ${r === l ? "bg-[#3d6b4f] text-white" : "bg-[#f0ebe0] text-[#6b6355] hover:bg-[#e8dfd0] hover:text-[#2c1f0e]"}`, 7018 children: l 7019 }, 7020 l 7021 )) }) 7022 ] }), 7023 /* @__PURE__ */ s("div", { className: "flex items-center justify-between mb-6", children: [ 7024 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm", children: n.length === lt.length ? `${lt.length} výrobců` : `${n.length} z ${lt.length} výrobců` }), 7025 (e || r !== "Vše") && /* @__PURE__ */ s( 7026 "button", 7027 { 7028 onClick: () => { 7029 t(""), i("Vše"); 7030 }, 7031 className: "text-[#3d6b4f] text-sm hover:underline flex items-center gap-1", 7032 children: [ 7033 /* @__PURE__ */ a(yr, { className: "w-3.5 h-3.5" }), 7034 "Zrušit filtry" 7035 ] 7036 } 7037 ) 7038 ] }), 7039 n.length > 0 ? /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 sm:gap-6", children: n.map((l) => /* @__PURE__ */ a(Cr, { vendor: l }, l.id)) }) : /* @__PURE__ */ s("div", { className: "text-center py-16 text-[#6b6355]", children: [
7040 /* @__PURE__ */ a(wa, { className: "w-10 h-10 mx-auto mb-3 text-[#c8bfb0]" }), 7041 /* @__PURE__ */ a("p", { className: "font-medium text-[#2c1f0e]", children: "Žádnà výrobci nenalezeni" }), 7042 /* @__PURE__ */ a("p", { className: "text-sm mt-1", children: "Zkuste zmÄnit vyhledávánà nebo filtr kategorie." }) 7043 ] }) 7044 ] }) 7045 ] }); 7046} 7047function bs() { 7048 const e = St[0], t = St.slice(1); 7049 return /* @__PURE__ */ s("main", { children: [ 7050 /* @__PURE__ */ a("div", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0] py-10", children: /* @__PURE__ */ s(_, { children: [ 7051 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-3", children: [ 7052 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }), 7053 /* @__PURE__ */ a("span", { children: "/" }), 7054 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: "Aktuality" }) 7055 ] }), 7056 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-3", children: "Blog & zprávy" }),
7057 /* @__PURE__ */ a( 7058 "h1", 7059 { 7060 className: "text-[#2c1f0e] mb-2", 7061 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.5rem)" }, 7062 children: "Aktuality" 7063 } 7064 ), 7065 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-xl", children: "Novinky ze svÄta VýchodoÄeských trhů, pÅedstavenà výrobců, sezónnà tipy a reportáže." }) 7066 ] }) }), 7067 /* @__PURE__ */ s(_, { className: "py-12", children: [ 7068 e && /* @__PURE__ */ a("div", { className: "mb-12", children: /* @__PURE__ */ a(qt, { article: e, variant: "horizontal" }) }), 7069 t.length > 0 && /* @__PURE__ */ s(Pn, { children: [ 7070 /* @__PURE__ */ a( 7071 "h2", 7072 { 7073 className: "text-[#2c1f0e] mb-6", 7074 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 7075 children: "Dalšà zprávy" 7076 } 7077 ), 7078 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: t.map((r) => /* @__PURE__ */ a(qt, { article: r }, r.id)) }) 7079 ] }) 7080 ] }) 7081 ] }); 7082} 7083function xs() { 7084 const { id: e } = qa(), t = St.find((n) => n.id === e), r = St.filter((n) => n.id !== e).slice(0, 2); 7085 if (!t) 7086 return /* @__PURE__ */ a("main", { className: "min-h-[50vh] flex items-center justify-center", children: /* @__PURE__ */ a(_, { children: /* @__PURE__ */ s("div", { className: "text-center py-16", children: [
7087 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-lg mb-4", children: "Älánek nebyl nalezen." }), 7088 /* @__PURE__ */ s($, { to: "/aktuality", className: "inline-flex items-center gap-2 text-[#3d6b4f] text-sm font-medium", children: [ 7089 /* @__PURE__ */ a(Pt, { className: "w-4 h-4" }), 7090 "ZpÄt na aktuality" 7091 ] }) 7092 ] }) }) }); 7093 const i = t.content.split(` 7094 7095`); 7096 return /* @__PURE__ */ s("main", { children: [ 7097 /* @__PURE__ */ s("div", { className: "relative h-64 sm:h-80 lg:h-[420px] overflow-hidden", children: [ 7098 /* @__PURE__ */ a( 7099 "img", 7100 { 7101 src: t.image, 7102 alt: t.title, 7103 className: "w-full h-full object-cover" 7104 } 7105 ), 7106 /* @__PURE__ */ a("div", { className: "absolute inset-0 bg-[#1e1208]/35" }) 7107 ] }), 7108 /* @__PURE__ */ s(_, { className: "py-10", children: [ 7109 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-6", children: [ 7110 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }),
7111 /* @__PURE__ */ a("span", { children: "/" }), 7112 /* @__PURE__ */ a($, { to: "/aktuality", className: "hover:text-[#3d6b4f] transition-colors", children: "Aktuality" }), 7113 /* @__PURE__ */ a("span", { children: "/" }), 7114 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e] truncate max-w-[200px]", children: t.title }) 7115 ] }), 7116 /* @__PURE__ */ s("div", { className: "max-w-2xl mx-auto", children: [ 7117 /* @__PURE__ */ a(Y, { variant: "brown", className: "mb-4", children: t.category }), 7118 /* @__PURE__ */ a( 7119 "h1", 7120 { 7121 className: "text-[#2c1f0e] mb-5", 7122 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.8rem)", lineHeight: 1.2 }, 7123 children: t.title 7124 } 7125 ), 7126 /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-2 pb-6 mb-6 border-b border-[#e8dfd0]", children: [ 7127 /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[#6b6355] text-sm", children: [
7128 /* @__PURE__ */ a(Ae, { className: "w-4 h-4 text-[#3d6b4f]" }), 7129 /* @__PURE__ */ a("span", { children: t.date }) 7130 ] }), 7131 /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[#6b6355] text-sm", children: [ 7132 /* @__PURE__ */ a(vr, { className: "w-4 h-4 text-[#3d6b4f]" }), 7133 /* @__PURE__ */ a("span", { children: t.author }) 7134 ] }) 7135 ] }), 7136 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] leading-relaxed mb-6 text-lg", style: { fontFamily: "'Playfair Display', Georgia, serif", fontStyle: "italic" }, children: t.excerpt }), 7137 /* @__PURE__ */ a("div", { className: "space-y-4", children: i.map((n, l) => { 7138 if (n.startsWith("**") && n.endsWith("**")) { 7139 const o = n.slice(2, -2); 7140 return /* @__PURE__ */ a( 7141 "h3", 7142 { 7143 className: "text-[#2c1f0e] mt-6 mb-2", 7144 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.2rem" }, 7145 children: o 7146 }, 7147 l 7148 ); 7149 } 7150 if (n.includes("**")) { 7151 const o = n.split(/\*\*(.*?)\*\*/g); 7152 return /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] leading-relaxed", children: o.map( 7153 (c, m) => m % 2 === 1 ? /* @__PURE__ */ a("strong", { className: "font-semibold text-[#2c1f0e]", children: c }, m) : c 7154 ) }, l); 7155 } 7156 if (n.startsWith("- ")) { 7157 const o = n.split(` 7158`).filter((c) => c.startsWith("- ")); 7159 return /* @__PURE__ */ a("ul", { className: "space-y-1.5 pl-4", children: o.map((c, m) => /* @__PURE__ */ s("li", { className: "text-[#2c1f0e] leading-relaxed flex items-start gap-2", children: [
7160 /* @__PURE__ */ a("span", { className: "text-[#3d6b4f] mt-1.5 flex-shrink-0", children: "â¢" }), 7161 /* @__PURE__ */ a("span", { children: c.slice(2) }) 7162 ] }, m)) }, l); 7163 } 7164 return /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] leading-relaxed", children: n }, l); 7165 }) }), 7166 /* @__PURE__ */ a("div", { className: "mt-10 pt-6 border-t border-[#e8dfd0]", children: /* @__PURE__ */ s( 7167 $, 7168 { 7169 to: "/aktuality", 7170 className: "inline-flex items-center gap-2 text-[#3d6b4f] text-sm font-medium hover:gap-3 transition-all", 7171 children: [ 7172 /* @__PURE__ */ a(Pt, { className: "w-4 h-4" }), 7173 "ZpÄt na aktuality" 7174 ] 7175 } 7176 ) }) 7177 ] }) 7178 ] }), 7179 r.length > 0 && /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] border-t border-[#e8dfd0]", children: /* @__PURE__ */ s(_, { className: "py-12", children: [ 7180 /* @__PURE__ */ a( 7181 "h2", 7182 { 7183 className: "text-[#2c1f0e] mb-8", 7184 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 7185 children: "Dalšà Älánky" 7186 } 7187 ),
7188 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: r.map((n) => /* @__PURE__ */ a(qt, { article: n }, n.id)) }) 7189 ] }) }) 7190 ] }); 7191} 7192const ws = [ 7193 { 7194 number: "01", 7195 title: "Lokálnà původ", 7196 body: "VÅ¡echny produkty musà pocházet z Královéhradeckého nebo Pardubického kraje, pÅÃpadnÄ ze sousednÃch krajů. Vzdálenost výroby od mÃsta trhu nesmà pÅekroÄit 150 km." 7197 }, 7198 { 7199 number: "02", 7200 title: "Vlastnà výroba", 7201 body: "Výrobce musà být zároveÅ producent. PÅeprodej cizÃch výrobků nenà povolen. Každý prodávajÃcà musà být schopen doložit vlastnà výrobnà proces." 7202 }, 7203 { 7204 number: "03", 7205 title: "Transparentnost", 7206 body: "Výrobce je povinen sdÃlet informace o složenà produktů, použitých surovinách a způsobu výroby. ZákaznÃk má právo se zeptat na cokoli." 7207 }, 7208 { 7209 number: "04", 7210 title: "Bez klamavého oznaÄenÃ", 7211 body: "Zakázáno je jakékoli oznaÄenÃ, které by mohlo uvést zákaznÃka v omyl. Slova jako 'domácÃ', 'bio' nebo 'tradiÄnÃ' musejà být podložena prokazatelnou skuteÄnostÃ." 7212 }, 7213 { 7214 number: "05", 7215 title: "Férovost a respekt", 7216 body: "Ke kolegům výrobcům, organizátorům i zákaznÃkům se výrobce chová s úctou a respektem. Vzájemná solidarita je základem komunity." 7217 }, 7218 { 7219 number: "06", 7220 title: "Å etrnost k prostÅedÃ", 7221 body: "Výrobce se snažà minimalizovat dopad své Äinnosti na životnà prostÅedà â preferuje ekologické balenÃ, kompostovatelné materiály a odpovÄdné hospodaÅenÃ." 7222 } 7223]; 7224function ks() { 7225 return /* @__PURE__ */ s("main", { children: [ 7226 /* @__PURE__ */ a("div", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0] py-10", children: /* @__PURE__ */ s(_, { children: [
7227 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-3", children: [ 7228 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }), 7229 /* @__PURE__ */ a("span", { children: "/" }), 7230 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: "Kodex výrobce" }) 7231 ] }), 7232 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "Pravidla" }), 7233 /* @__PURE__ */ a( 7234 "h1", 7235 { 7236 className: "text-[#2c1f0e] mb-2", 7237 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.5rem)" }, 7238 children: "Kodex výrobce" 7239 } 7240 ), 7241 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-xl", children: "Kodex výrobce stanovuje pravidla a hodnoty, ke kterým se každý výrobce na VýchodoÄeských trzÃch hlásÃ. Je základem důvÄry mezi výrobci a zákaznÃky." }) 7242 ] }) }), 7243 /* @__PURE__ */ a(_, { className: "py-12", children: /* @__PURE__ */ s("div", { className: "max-w-3xl", children: [
7244 /* @__PURE__ */ a("div", { className: "bg-[#e8f0ea] rounded-xl p-6 border border-[#c8ddd0] mb-12", children: /* @__PURE__ */ s("div", { className: "flex items-start gap-3", children: [ 7245 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-[#3d6b4f] flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ a(mt, { className: "w-4 h-4 text-white" }) }), 7246 /* @__PURE__ */ s("div", { children: [ 7247 /* @__PURE__ */ a("h3", { className: "text-[#2c1f0e] mb-2", style: { fontFamily: "'Playfair Display', Georgia, serif" }, children: "ProÄ máme kodex?" }), 7248 /* @__PURE__ */ a("p", { className: "text-[#3d6b4f] text-sm leading-relaxed", children: "VÄÅÃme, že trhy jsou vÃc než jen mÃsto nákupu. Jsou to mÃsta setkávánÃ, sdÃlenà a vzájemné důvÄry. Aby si tuto důvÄru trhy uchovaly, potÅebujeme jasná pravidla, ke kterým se každý výrobce dobrovolnÄ hlásÃ." }) 7249 ] }) 7250 ] }) }), 7251 /* @__PURE__ */ a("div", { className: "space-y-8 mb-12", children: ws.map((e) => /* @__PURE__ */ s("div", { className: "flex gap-5", children: [
7252 /* @__PURE__ */ a("div", { className: "flex-shrink-0", children: /* @__PURE__ */ a( 7253 "span", 7254 { 7255 className: "text-[#e8dfd0] select-none", 7256 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "2.5rem", fontWeight: 700, lineHeight: 1 }, 7257 children: e.number 7258 } 7259 ) }), 7260 /* @__PURE__ */ s("div", { className: "pt-1", children: [ 7261 /* @__PURE__ */ a( 7262 "h3", 7263 { 7264 className: "text-[#2c1f0e] mb-2", 7265 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.2rem" }, 7266 children: e.title 7267 } 7268 ), 7269 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed text-sm", children: e.body }) 7270 ] }) 7271 ] }, e.number)) }), 7272 /* @__PURE__ */ s("div", { className: "mb-12", children: [ 7273 /* @__PURE__ */ a( 7274 "h2", 7275 { 7276 className: "text-[#2c1f0e] mb-6", 7277 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 7278 children: "Závazky výrobce" 7279 } 7280 ),
7281 /* @__PURE__ */ a("ul", { className: "space-y-3", children: [ 7282 "Podpisem pÅihlášky výrobce kodex pÅijÃmá a zavazuje se jej dodržovat.", 7283 "PoruÅ¡enà kodexu může vést k doÄasnému nebo trvalému vylouÄenà z trhů.", 7284 "OrganizátoÅi trhů majà právo kdykoli provést namátkovou kontrolu původu produktů.", 7285 "Výrobce je povinen informovat organizátory o jakýchkoli zmÄnách ve výrobnÃm procesu.", 7286 "Výrobce se zavazuje k dohodnuté pÅÃtomnosti na trhu a vÄasné omluvÄ v pÅÃpadÄ absence." 7287 ].map((e, t) => /* @__PURE__ */ s("li", { className: "flex items-start gap-2.5", children: [ 7288 /* @__PURE__ */ a(Rt, { className: "w-4 h-4 text-[#3d6b4f] mt-0.5 flex-shrink-0" }), 7289 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e] text-sm leading-relaxed", children: e }) 7290 ] }, t)) }) 7291 ] }), 7292 /* @__PURE__ */ s("div", { className: "bg-[#f0ebe0] rounded-xl p-6 border border-[#e8dfd0]", children: [ 7293 /* @__PURE__ */ a( 7294 "h3", 7295 { 7296 className: "text-[#2c1f0e] mb-2", 7297 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.2rem" }, 7298 children: "Chcete se stát výrobcem?" 7299 } 7300 ),
7301 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed mb-4", children: "PÅihlaste se do našà komunity výrobců. Po pÅeÄtenà kodexu nás kontaktujte a my vás provedeme procesem pÅijetÃ." }), 7302 /* @__PURE__ */ s( 7303 $, 7304 { 7305 to: "/kontakt", 7306 className: "inline-flex items-center gap-2 px-5 py-2.5 bg-[#3d6b4f] text-white rounded-lg text-sm font-medium hover:bg-[#2d5240] transition-colors", 7307 children: [ 7308 "Kontaktujte nás", 7309 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 7310 ] 7311 } 7312 ) 7313 ] }), 7314 /* @__PURE__ */ a("p", { className: "text-[#c8bfb0] text-xs mt-8", children: "Kodex výrobce byl naposledy aktualizován v lednu 2026. Verze 3.1." }) 7315 ] }) }) 7316 ] }); 7317} 7318function Ns() { 7319 const [e, t] = se({ 7320 name: "", 7321 email: "", 7322 subject: "", 7323 message: "", 7324 gdpr: !1 7325 }), [r, i] = se({}), [n, l] = se(!1), o = () => { 7326 const u = {}; 7327 return e.name.trim() || (u.name = "Jméno je povinné."), e.email.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email) || (u.email = "Neplatný formát e-mailu.") : u.email = "E-mail je povinný.", e.subject.trim() || (u.subject = "PÅedmÄt je povinný."), e.message.trim() ? e.message.trim().length < 20 && (u.message = "Zpráva musà mÃt alespoÅ 20 znaků.") : u.message = "Zpráva je povinná.", e.gdpr || (u.gdpr = "Pro odeslánà formuláÅe je nutný souhlas."), i(u), Object.keys(u).length === 0; 7328 }, c = (u) => { 7329 u.preventDefault(), o() && l(!0); 7330 }, m = (u) => { 7331 const { name: p, value: b, type: g } = u.target, k = g === "checkbox" ? u.target.checked : void 0; 7332 t((N) => ({ ...N, [p]: g === "checkbox" ? k : b })), r[p] && i((N) => ({ ...N, [p]: void 0 })); 7333 }, h = (u) => `w-full px-4 py-2.5 rounded-lg border text-[#2c1f0e] placeholder:text-[#b0a899] bg-white focus:outline-none focus:ring-2 transition-colors text-sm ${r[u] ? "border-red-400 focus:ring-red-200" : "border-[#e8dfd0] focus:ring-[#3d6b4f]/25 focus:border-[#3d6b4f]"}`; 7334 return /* @__PURE__ */ s("main", { children: [ 7335 /* @__PURE__ */ a("div", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0] py-10", children: /* @__PURE__ */ s(_, { children: [
7336 /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[#6b6355] text-sm mb-3", children: [ 7337 /* @__PURE__ */ a($, { to: "/", className: "hover:text-[#3d6b4f] transition-colors", children: "Domů" }), 7338 /* @__PURE__ */ a("span", { children: "/" }), 7339 /* @__PURE__ */ a("span", { className: "text-[#2c1f0e]", children: "Kontakt" }) 7340 ] }), 7341 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "Kontakt" }), 7342 /* @__PURE__ */ a( 7343 "h1", 7344 { 7345 className: "text-[#2c1f0e] mb-2", 7346 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(1.8rem, 4vw, 2.5rem)" }, 7347 children: "NapiÅ¡te nám" 7348 } 7349 ), 7350 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-xl", children: "Máte dotaz, zájem o prodejnà mÃsto nebo jen chcete ÅÃct ahoj? Rádi vám odpovÃme." }) 7351 ] }) }), 7352 /* @__PURE__ */ a(_, { className: "py-12", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-10", children: [
7353 /* @__PURE__ */ a("div", { className: "lg:col-span-2", children: n ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [ 7354 /* @__PURE__ */ a("div", { className: "w-16 h-16 rounded-full bg-[#e8f0ea] flex items-center justify-center mb-5", children: /* @__PURE__ */ a(Rt, { className: "w-8 h-8 text-[#3d6b4f]" }) }), 7355 /* @__PURE__ */ a( 7356 "h2", 7357 { 7358 className: "text-[#2c1f0e] mb-3", 7359 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 7360 children: "Zpráva odeslána!" 7361 } 7362 ), 7363 /* @__PURE__ */ a("p", { className: "text-[#6b6355] max-w-sm leading-relaxed mb-6", children: "DÄkujeme za vaÅ¡i zprávu. OdpovÃme vám co nejdÅÃve, obvykle do 1â2 pracovnÃch dnů." }), 7364 /* @__PURE__ */ a( 7365 "button", 7366 { 7367 onClick: () => { 7368 l(!1), t({ name: "", email: "", subject: "", message: "", gdpr: !1 }); 7369 }, 7370 className: "inline-flex items-center gap-2 px-5 py-2.5 border border-[#3d6b4f] text-[#3d6b4f] rounded-lg text-sm hover:bg-[#3d6b4f] hover:text-white transition-colors", 7371 children: "Odeslat dalšà zprávu" 7372 } 7373 ) 7374 ] }) : /* @__PURE__ */ s("form", { onSubmit: c, noValidate: !0, className: "space-y-5", children: [
7375 /* @__PURE__ */ s("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-5", children: [ 7376 /* @__PURE__ */ s("div", { children: [ 7377 /* @__PURE__ */ s("label", { htmlFor: "name", className: "block text-sm text-[#2c1f0e] mb-1.5", children: [ 7378 "Jméno a pÅÃjmenà ", 7379 /* @__PURE__ */ a("span", { className: "text-red-500", children: "*" }) 7380 ] }), 7381 /* @__PURE__ */ a( 7382 "input", 7383 { 7384 id: "name", 7385 name: "name", 7386 type: "text", 7387 value: e.name, 7388 onChange: m, 7389 placeholder: "Jan Novák", 7390 className: h("name") 7391 } 7392 ), 7393 r.name && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-1", children: r.name }) 7394 ] }), 7395 /* @__PURE__ */ s("div", { children: [ 7396 /* @__PURE__ */ s("label", { htmlFor: "email", className: "block text-sm text-[#2c1f0e] mb-1.5", children: [ 7397 "E-mail ",
7398 /* @__PURE__ */ a("span", { className: "text-red-500", children: "*" }) 7399 ] }), 7400 /* @__PURE__ */ a( 7401 "input", 7402 { 7403 id: "email", 7404 name: "email", 7405 type: "email", 7406 value: e.email, 7407 onChange: m, 7408 placeholder: "[email protected]", 7409 className: h("email") 7410 } 7411 ), 7412 r.email && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-1", children: r.email }) 7413 ] }) 7414 ] }), 7415 /* @__PURE__ */ s("div", { children: [ 7416 /* @__PURE__ */ s("label", { htmlFor: "subject", className: "block text-sm text-[#2c1f0e] mb-1.5", children: [ 7417 "PÅedmÄt ", 7418 /* @__PURE__ */ a("span", { className: "text-red-500", children: "*" }) 7419 ] }), 7420 /* @__PURE__ */ s( 7421 "select", 7422 { 7423 id: "subject", 7424 name: "subject", 7425 value: e.subject, 7426 onChange: m, 7427 className: h("subject"), 7428 children: [
7429 /* @__PURE__ */ a("option", { value: "", children: "Vyberte pÅedmÄt" }), 7430 /* @__PURE__ */ a("option", { value: "Zájem o prodejnà mÃsto", children: "Zájem o prodejnà mÃsto" }), 7431 /* @__PURE__ */ a("option", { value: "Dotaz ke trhům", children: "Dotaz ke trhům" }), 7432 /* @__PURE__ */ a("option", { value: "Spolupráce a partnerstvÃ", children: "Spolupráce a partnerstvÃ" }), 7433 /* @__PURE__ */ a("option", { value: "Mediálnà dotaz", children: "Mediálnà dotaz" }), 7434 /* @__PURE__ */ a("option", { value: "Jiné", children: "Jiné" }) 7435 ] 7436 } 7437 ), 7438 r.subject && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-1", children: r.subject }) 7439 ] }), 7440 /* @__PURE__ */ s("div", { children: [ 7441 /* @__PURE__ */ s("label", { htmlFor: "message", className: "block text-sm text-[#2c1f0e] mb-1.5", children: [ 7442 "Zpráva ", 7443 /* @__PURE__ */ a("span", { className: "text-red-500", children: "*" }) 7444 ] }),
7445 /* @__PURE__ */ a( 7446 "textarea", 7447 { 7448 id: "message", 7449 name: "message", 7450 rows: 6, 7451 value: e.message, 7452 onChange: m, 7453 placeholder: "Napište nám svůj dotaz nebo zprávu...", 7454 className: `${h("message")} resize-none` 7455 } 7456 ), 7457 r.message && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-1", children: r.message }) 7458 ] }), 7459 /* @__PURE__ */ s("div", { children: [ 7460 /* @__PURE__ */ s("label", { className: "flex items-start gap-3 cursor-pointer group", children: [ 7461 /* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [ 7462 /* @__PURE__ */ a( 7463 "input", 7464 { 7465 type: "checkbox", 7466 name: "gdpr", 7467 checked: e.gdpr, 7468 onChange: m, 7469 className: "sr-only" 7470 } 7471 ), 7472 /* @__P
7472URE__ */ a( 7473 "div", 7474 { 7475 className: `w-5 h-5 rounded border-2 flex items-center justify-center transition-colors ${e.gdpr ? "bg-[#3d6b4f] border-[#3d6b4f]" : r.gdpr ? "border-red-400 bg-white" : "border-[#c8bfb0] bg-white group-hover:border-[#3d6b4f]"}`, 7476 children: e.gdpr && /* @__PURE__ */ a("svg", { className: "w-3 h-3 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) 7477 } 7478 ) 7479 ] }), 7480 /* @__PURE__ */ s("span", { className: "text-sm text-[#6b6355] leading-relaxed", children: [ 7481 "SouhlasÃm se zpracovánÃm osobnÃch údajů pro úÄely odpovÄdi na tento dotaz. VaÅ¡e údaje nebudou sdÃleny s tÅetÃmi stranami a budou smazány po vyÅÃzenà dotazu.", 7482 " ", 7483 /* @__PURE__ */ a("span", { className: "text-red-500", children: "*" }) 7484 ] }) 7485 ] }), 7486 r.gdpr && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-1.5 pl-8", children: r.gdpr }) 7487 ] }),
7488 /* @__PURE__ */ a("div", { className: "pt-2", children: /* @__PURE__ */ s( 7489 "button", 7490 { 7491 type: "submit", 7492 className: "inline-flex items-center gap-2 px-6 py-3 bg-[#3d6b4f] text-white rounded-lg text-sm font-medium hover:bg-[#2d5240] transition-colors focus:outline-none focus:ring-2 focus:ring-[#3d6b4f] focus:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed", 7493 children: [ 7494 /* @__PURE__ */ a(Bo, { className: "w-4 h-4" }), 7495 "Odeslat zprávu" 7496 ] 7497 } 7498 ) }) 7499 ] }) }), 7500 /* @__PURE__ */ s("div", { className: "lg:col-span-1 space-y-6", children: [ 7501 /* @__PURE__ */ s("div", { className: "bg-[#f0ebe0] rounded-xl p-6 border border-[#e8dfd0]", children: [ 7502 /* @__PURE__ */ a( 7503 "h3", 7504 { 7505 className: "text-[#2c1f0e] mb-5 text-base", 7506 style: { fontFamily: "'Playfair Display', Georgia, serif" }, 7507 children: "Kontaktnà informace" 7508 } 7509 ),
7510 /* @__PURE__ */ s("ul", { className: "space-y-4", children: [ 7511 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 7512 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-lg bg-[#e8f0ea] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(er, { className: "w-4 h-4 text-[#3d6b4f]" }) }), 7513 /* @__PURE__ */ s("div", { children: [ 7514 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "E-mail" }), 7515 /* @__PURE__ */ a("a", { href: "mailto:[email protected]", className: "text-[#2c1f0e] text-sm hover:text-[#3d6b4f] transition-colors", children: "[email protected]" }) 7516 ] }) 7517 ] }), 7518 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 7519 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-lg bg-[#e8f0ea] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(ln, { className: "w-4 h-4 text-[#3d6b4f]" }) }),
7520 /* @__PURE__ */ s("div", { children: [ 7521 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Telefon" }), 7522 /* @__PURE__ */ a("a", { href: "tel:+420601234567", className: "text-[#2c1f0e] text-sm hover:text-[#3d6b4f] transition-colors", children: "+420 601 234 567" }) 7523 ] }) 7524 ] }), 7525 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 7526 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-lg bg-[#e8f0ea] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a($e, { className: "w-4 h-4 text-[#3d6b4f]" }) }), 7527 /* @__PURE__ */ s("div", { children: [ 7528 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Adresa" }), 7529 /* @__PURE__ */ s("p", { className: "text-[#2c1f0e] text-sm", children: [ 7530 "Velké námÄstà 12", 7531 /* @__P
7531URE__ */ a("br", {}), 7532 "500 03 Hradec Králové" 7533 ] }) 7534 ] }) 7535 ] }), 7536 /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [ 7537 /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-lg bg-[#e8f0ea] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(We, { className: "w-4 h-4 text-[#3d6b4f]" }) }), 7538 /* @__PURE__ */ s("div", { children: [ 7539 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-xs uppercase tracking-wider mb-0.5", children: "Dostupnost" }), 7540 /* @__PURE__ */ s("p", { className: "text-[#2c1f0e] text-sm", children: [ 7541 "PoâPá: 9:00â16:00", 7542 /* @__PURE__ */ a("br", {}), 7543 /* @__PURE__ */ a("span", { className: "text-[#6b6355]", children: "OdpovÃdáme do 2 pracovnÃch dnů" }) 7544 ] }) 7545 ] }) 7546 ] }) 7547 ] }) 7548 ] }), 7549 /* @__PURE__ */ s("div", { className: "bg-white rounded-xl p-5 border border-[#e8dfd0]", children: [
7550 /* @__PURE__ */ a("h4", { className: "text-[#2c1f0e] text-sm font-medium mb-3", children: "Rychlé odkazy" }), 7551 /* @__PURE__ */ a("ul", { className: "space-y-2", children: [ 7552 { label: "PÅehled trhů", href: "/trziste" }, 7553 { label: "AdresáŠvýrobců", href: "/vyrobci" }, 7554 { label: "Kodex výrobce", href: "/kodex" }, 7555 { label: "Aktuality", href: "/aktuality" } 7556 ].map((u) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a($, { to: u.href, className: "text-[#3d6b4f] text-sm hover:underline", children: u.label }) }, u.href)) }) 7557 ] }) 7558 ] }) 7559 ] }) }) 7560 ] }); 7561} 7562const zs = "https://images.unsplash.com/photo-1770462957003-d7f5ac079362?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080", js = "https://images.unsplash.com/photo-1721143911423-8a22b5c15d8a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=800", Ps = [ 7563 { 7564 icon: $e, 7565 title: "Lokálnà původ", 7566 description: "Každý výrobce musà pocházet z Královéhradeckého nebo Pardubického kraje. Žádné zprostÅedkovatele, žádné anonymnà produkty.", 7567 color: "bg-[#e8f0ea] text-[#3d6b4f]" 7568 }, 7569 { 7570 icon: mt, 7571 title: "PÅÃrodnà pÅÃstup", 7572 description: "UpÅednostÅujeme ekologické a tradiÄnà metody výroby. NaÅ¡i výrobci pracujà s pÅÃrodou, ne proti nÃ.", 7573 color: "bg-[#f5ede3] text-[#7a5230]" 7574 }, 7575 { 7576 icon: Jt, 7577 title: "Komunita", 7578 description: "Trhy jsou mÃsto setkánÃ. Podporujeme vzájemné vztahy mezi výrobci, zákaznÃky i mÃstnà komunitou.", 7579 color: "bg-[#e8f0ea] text-[#3d6b4f]" 7580 }, 7581 { 7582 icon: on, 7583 title: "Transparentnost", 7584 description: "Každý výrobce proÅ¡el provÄÅenÃm. NaÅ¡e kritéria jsou veÅejná a jasná â viz kodex výrobce.", 7585 color: "bg-[#f5ede3] text-[#7a5230]" 7586 } 7587]; 7588function Rs() { 7589 return /* @__PURE__ */ s("main", { children: [ 7590 /* @__PURE__ */ s( 7591 "section", 7592 { 7593 className: "relative overflow-hidden", 7594 style: { minHeight: "400px" }, 7595 children: [
7596 /* @__PURE__ */ s("div", { className: "absolute inset-0", children: [ 7597 /* @__PURE__ */ a( 7598 "img", 7599 { 7600 src: zs, 7601 alt: "Atmosféra trhů", 7602 className: "w-full h-full object-cover" 7603 } 7604 ), 7605 /* @__PURE__ */ a( 7606 "div", 7607 { 7608 className: "absolute inset-0", 7609 style: { 7610 background: "linear-gradient(to right, rgba(44,31,14,0.82) 0%, rgba(44,31,14,0.55) 60%, rgba(44,31,14,0.25) 100%)" 7611 } 7612 } 7613 ) 7614 ] }), 7615 /* @__PURE__ */ a(_, { className: "relative py-20 sm:py-28", children: /* @__PURE__ */ s("div", { className: "max-w-xl", children: [ 7616 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-4", children: "O nás" }), 7617 /* @__PURE__ */ a( 7618 "h1", 7619 { 7620 className: "text-white mb-5", 7621 style: { 7622 fontFamily: "'Playfair Display', Georgia, serif", 7623 fontSize: "clamp(2rem, 5vw, 3.25rem)", 7624 lineHeight: 1.15 7625 }, 7626 children: "PÅÃbÄh VýchodoÄeských trhů" 7627 } 7628 ),
7629 /* @__PURE__ */ a("p", { className: "text-white/80 leading-relaxed", style: { maxWidth: "480px" }, children: "Jsme komunitnà projekt, který od roku 2018 propojuje lokálnà výrobce s lidmi, kteÅà si vážà původu a kvality toho, co jedÃ." }) 7630 ] }) }) 7631 ] 7632 } 7633 ), 7634 /* @__PURE__ */ a(_, { className: "py-16 sm:py-20", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center", children: [ 7635 /* @__PURE__ */ s("div", { children: [ 7636 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-4", children: "Mise" }), 7637 /* @__PURE__ */ a( 7638 "h2", 7639 { 7640 className: "text-[#2c1f0e] mb-6", 7641 style: { 7642 fontFamily: "'Playfair Display', Georgia, serif", 7643 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 7644 }, 7645 children: "Propojujeme farmáÅe s lidmi" 7646 } 7647 ), 7648 /* @__PURE__ */ s("div", { className: "flex flex-col gap-4 text-[#6b6355] leading-relaxed", children: [
7649 /* @__PURE__ */ a("p", { children: "VýchodoÄeské trhy vznikly z pÅesvÄdÄenÃ, že jÃdlo má mÃt pÅÃbÄh. Že cesta od pole k talÃÅi má být krátká, pÅÃmá a průhledná. V roce 2018 jsme uspoÅádali prvnà trh s pÄti výrobci na Velkém námÄstà v Hradci Králové. Dnes máme 45 pravidelných výrobců a tisÃce spokojených zákaznÃků." }), 7650 /* @__PURE__ */ a("p", { children: "Nejsme jen tržiÅ¡tÄ. Jsme komunita lidà â farmáÅů, ÅemeslnÃků, zákaznÃků, dobrovolnÃků â kteÅà sdÃlà pÅesvÄdÄenÃ, že lokálnà potraviny jsou lepÅ¡Ã. Lepšà pro zdravÃ, pro pÅÃrodu a pro lidi kolem nás." }), 7651 /* @__PURE__ */ a("p", { children: "Každý výrobce, který se objevà na naÅ¡ich trzÃch, proÅ¡el osobnÃm pohovorem a splnil naÅ¡e kritéria. Záležà nám na původu produktů, způsobu výroby i na tom, aby za každým stánkem stál skuteÄný ÄlovÄk s pÅÃbÄhem." }) 7652 ] }) 7653 ] }), 7654 /* @__PURE__ */ a("div", { className: "rounded-2xl overflow-hidden aspect-[4/3] shadow-lg", children: /* @__PURE__ */ a( 7655 "img", 7656 { 7657 src: js, 7658 alt: "Lokálnà výrobky z regionu", 7659 className: "w-full h-full object-cover" 7660 } 7661 ) }) 7662 ] }) }), 7663 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] py-16 sm:py-20", children: /* @__PURE__ */ s(_, { children: [
7664 /* @__PURE__ */ s("div", { className: "text-center mb-12", children: [ 7665 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-4", children: "Hodnoty" }), 7666 /* @__PURE__ */ a( 7667 "h2", 7668 { 7669 className: "text-[#2c1f0e]", 7670 style: { 7671 fontFamily: "'Playfair Display', Georgia, serif", 7672 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 7673 }, 7674 children: "Na Äem nám záležÃ" 7675 } 7676 ) 7677 ] }), 7678 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6", children: Ps.map((e) => /* @__PURE__ */ s( 7679 "div", 7680 { 7681 className: "bg-white rounded-2xl p-6 flex flex-col gap-4", 7682 style: { boxShadow: "0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.06)" }, 7683 children: [ 7684 /* @__PURE__ */ a("div", { className: `w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${e.color}`, children: /* @__PURE__ */ a(e.icon, { className: "w-5 h-5" }) }),
7685 /* @__PURE__ */ s("div", { children: [ 7686 /* @__PURE__ */ a( 7687 "h3", 7688 { 7689 className: "text-[#2c1f0e] mb-2", 7690 style: { 7691 fontFamily: "'Playfair Display', Georgia, serif", 7692 fontSize: "1.05rem", 7693 fontWeight: 700 7694 }, 7695 children: e.title 7696 } 7697 ), 7698 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed", children: e.description }) 7699 ] }) 7700 ] 7701 }, 7702 e.title 7703 )) }) 7704 ] }) }), 7705 /* @__PURE__ */ s(_, { className: "py-16 sm:py-20", children: [ 7706 /* @__PURE__ */ s("div", { className: "text-center mb-12", children: [ 7707 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-4", children: "Tým" }), 7708 /* @__PURE__ */ a( 7709 "h2", 7710 { 7711 className: "text-[#2c1f0e]", 7712 style: { 7713 fontFamily: "'Playfair Display', Georgia, serif", 7714 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 7715 }, 7716 children: "Lidé za projektem" 7717 } 7718 ),
7719 /* @__PURE__ */ a("p", { className: "text-[#6b6355] mt-3 max-w-lg mx-auto text-sm leading-relaxed", children: "Malý tým s velkým zápalem. Každý z nás vÄÅÃ, že lokálnà potravinový systém stojà za to budovat." }) 7720 ] }), 7721 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 max-w-3xl mx-auto", children: ls.map((e) => /* @__PURE__ */ s("div", { className: "flex flex-col items-center text-center gap-4", children: [ 7722 /* @__PURE__ */ a( 7723 "div", 7724 { 7725 className: "w-24 h-24 rounded-full overflow-hidden flex-shrink-0", 7726 style: { boxShadow: "0 2px 10px rgba(0,0,0,0.1)" }, 7727 children: /* @__PURE__ */ a( 7728 "img", 7729 { 7730 src: e.image, 7731 alt: e.name, 7732 className: "w-full h-full object-cover" 7733 } 7734 ) 7735 } 7736 ), 7737 /* @__PURE__ */ s("div", { children: [ 7738 /* @__PURE__ */ a( 7739 "p", 7740 { 7741 className: "text-[#2c1f0e] mb-0.5", 7742 style: { 7743 fontFamily: "'Playfair Display', Georgia, serif", 7744 fontSize: "1rem", 7745 fontWeight: 700 7746 }, 7747 children: e.name 7748 } 7749 ),
7750 /* @__PURE__ */ a("p", { className: "text-[#3d6b4f] text-xs mb-3", style: { fontWeight: 500 }, children: e.role }), 7751 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed", children: e.bio }) 7752 ] }) 7753 ] }, e.id)) }) 7754 ] }), 7755 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] py-16 sm:py-20", children: /* @__PURE__ */ s(_, { children: [ 7756 /* @__PURE__ */ s("div", { className: "text-center mb-12", children: [ 7757 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-4", children: "Historie" }), 7758 /* @__PURE__ */ a( 7759 "h2", 7760 { 7761 className: "text-[#2c1f0e]", 7762 style: { 7763 fontFamily: "'Playfair Display', Georgia, serif", 7764 fontSize: "clamp(1.6rem, 3vw, 2.25rem)" 7765 }, 7766 children: "NaÅ¡e milnÃky" 7767 } 7768 ) 7769 ] }), 7770 /* @__PURE__ */ a("div", { className: "max-w-2xl mx-auto flex flex-col gap-0", children: [ 7771 { 7772 year: "2018", 7773 event: "Prvnà trh", 7774 detail: "5 výrobců, 200 návÅ¡tÄvnÃků, Velké námÄstà Hradec Králové." 7775 }, 7776 { 7777 year: "2020", 7778 event: "RozÅ¡ÃÅenà do Pardubic", 7779 detail: "OtevÃráme trhy i v Pardubickém kraji. 20 výrobců v sÃti." 7780 }, 7781 { 7782 year: "2022", 7783 event: "Kodex výrobce", 7784 detail: "Zavedenà transparentnÃch pravidel Älenstvà a certifikace." 7785 }, 7786 { 7787 year: "2024", 7788 event: "Nová mÃsta", 7789 detail: "Trhy novÄ i v JiÄÃnÄ, NáchodÄ a TrutnovÄ. 40+ výrobců." 7790 }, 7791 { 7792 year: "2026", 7793 event: "Sezóna 2026", 7794 detail: "24 trhů, 45 výrobců, pÅes 8 000 zákaznÃků roÄnÄ." 7795 } 7796 ].map((e, t, r) => /* @__PURE__ */ s("div", { className: "flex gap-6 items-start", children: [
7797 /* @__PURE__ */ s("div", { className: "flex flex-col items-center flex-shrink-0", children: [ 7798 /* @__PURE__ */ a("div", { className: "w-10 h-10 rounded-full bg-[#3d6b4f] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ a(qo, { className: "w-4 h-4 text-white" }) }), 7799 t < r.length - 1 && /* @__PURE__ */ a("div", { className: "w-px flex-1 bg-[#c8bfb0] mt-1", style: { minHeight: "36px" } }) 7800 ] }), 7801 /* @__PURE__ */ s("div", { className: "pb-8", children: [ 7802 /* @__PURE__ */ s("div", { className: "flex items-baseline gap-3 mb-1", children: [ 7803 /* @__PURE__ */ a( 7804 "span", 7805 { 7806 className: "text-[#3d6b4f]", 7807 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.1rem", fontWeight: 700 }, 7808 children: e.year 7809 } 7810 ), 7811 /* @__PURE__ */ a( 7812 "span", 7813 { 7814 className: "text-[#2c1f0e]", 7815 style: { fontWeight: 600, fontSize: "0.95rem" }, 7816 children: e.event 7817 } 7818 ) 7819 ] }),
7820 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed", children: e.detail }) 7821 ] }) 7822 ] }, e.year)) }) 7823 ] }) }), 7824 /* @__PURE__ */ a(_, { className: "py-16", children: /* @__PURE__ */ s( 7825 "div", 7826 { 7827 className: "rounded-2xl p-8 sm:p-12 text-center", 7828 style: { background: "linear-gradient(135deg, #3d6b4f 0%, #2d5240 100%)" }, 7829 children: [ 7830 /* @__PURE__ */ a("div", { className: "w-12 h-12 rounded-full bg-white/15 flex items-center justify-center mx-auto mb-5", children: /* @__PURE__ */ a(To, { className: "w-6 h-6 text-white" }) }), 7831 /* @__PURE__ */ a( 7832 "h2", 7833 { 7834 className: "text-white mb-3", 7835 style: { 7836 fontFamily: "'Playfair Display', Georgia, serif", 7837 fontSize: "clamp(1.4rem, 3vw, 2rem)" 7838 }, 7839 children: "Chcete se stát partnerem nebo výrobcem?" 7840 } 7841 ), 7842 /* @__PURE__ */ a("p", { className: "text-white/75 leading-relaxed mb-8 max-w-md mx-auto text-sm", children: "Rádi vás pÅivÃtáme do našà komunity. ProhlédnÄte si kodex výrobce nebo nás kontaktujte pÅÃmo." }),
7843 /* @__PURE__ */ s("div", { className: "flex flex-wrap justify-center gap-3", children: [ 7844 /* @__PURE__ */ a( 7845 $, 7846 { 7847 to: "/kodex", 7848 className: "inline-flex items-center gap-2 px-5 py-2.5 border border-white/40 text-white rounded-lg text-sm hover:bg-white/10 transition-colors", 7849 style: { fontWeight: 500 }, 7850 children: "Kodex výrobce" 7851 } 7852 ), 7853 /* @__PURE__ */ s( 7854 $, 7855 { 7856 to: "/kontakt", 7857 className: "inline-flex items-center gap-2 px-5 py-2.5 bg-white text-[#3d6b4f] rounded-lg text-sm hover:bg-[#f0ebe0] transition-colors", 7858 style: { fontWeight: 500 }, 7859 children: [ 7860 "Kontaktujte nás", 7861 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 7862 ] 7863 } 7864 ) 7865 ] }) 7866 ] 7867 } 7868 ) }) 7869 ] }); 7870} 7871const Ss = { 7872 hlavnÃ: "Hlavnà partner", 7873 mediálnÃ: "Mediálnà partner", 7874 komunálnÃ: "Komunálnà partner" 7875}, Ds = { 7876 hlavnÃ: "bg-[#e8f0ea] text-[#3d6b4f]", 7877 mediálnÃ: "bg-[#f5ede3] text-[#7a5230]", 7878 komunálnÃ: "bg-[#e8eef5] text-[#1a5c8a]" 7879}; 7880function za({ partner: e }) { 7881 return /* @__PURE__ */ s( 7882 "a", 7883 { 7884 href: e.website, 7885 target: "_blank", 7886 rel: "noopener noreferrer", 7887 className: "group flex flex-col items-center gap-4 p-6 rounded-2xl bg-white transition-all duration-300 hover:-translate-y-0.5", 7888 style: { 7889 boxShadow: "0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06)" 7890 }, 7891 onMouseEnter: (t) => { 7892 t.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.09)"; 7893 }, 7894 onMouseLeave: (t) => { 7895 t.currentTarget.style.boxShadow = "0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06)"; 7896 }, 7897 children: [
7898 /* @__PURE__ */ a( 7899 "div", 7900 { 7901 className: "w-20 h-20 rounded-2xl flex items-center justify-center flex-shrink-0 transition-all duration-300", 7902 style: { 7903 background: "#f0ebe0", 7904 filter: "grayscale(1)" 7905 }, 7906 onMouseEnter: (t) => { 7907 t.currentTarget.style.filter = "grayscale(0)", t.currentTarget.style.background = e.accentColor + "18"; 7908 }, 7909 onMouseLeave: (t) => { 7910 t.currentTarget.style.filter = "grayscale(1)", t.currentTarget.style.background = "#f0ebe0"; 7911 }, 7912 children: /* @__PURE__ */ a( 7913 "span", 7914 { 7915 className: "select-none leading-none", 7916 style: { 7917 fontFamily: "'Playfair Display', Georgia, serif", 7918 fontSize: "1.5rem", 7919 fontWeight: 700, 7920 color: e.accentColor 7921 }, 7922 children: e.shortName 7923 } 7924 ) 7925 } 7926 ),
7927 /* @__PURE__ */ a( 7928 "span", 7929 { 7930 className: `text-xs px-2.5 py-0.5 rounded-full ${Ds[e.tier]}`, 7931 style: { fontWeight: 500 }, 7932 children: Ss[e.tier] 7933 } 7934 ), 7935 /* @__PURE__ */ s("div", { className: "text-center", children: [ 7936 /* @__PURE__ */ a( 7937 "p", 7938 { 7939 className: "text-[#2c1f0e] mb-1", 7940 style: { 7941 fontFamily: "'Playfair Display', Georgia, serif", 7942 fontSize: "0.95rem", 7943 fontWeight: 700 7944 }, 7945 children: e.name 7946 } 7947 ), 7948 /* @__PURE__ */ a("p", { className: "text-[#9b9390] text-xs", children: e.tagline }) 7949 ] }), 7950 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm leading-relaxed text-center line-clamp-3", children: e.description }), 7951 e.website !== "#" && /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[#3d6b4f] text-xs opacity-0 group-hover:opacity-100 transition-opacity", style: { fontWeight: 500 }, children: [ 7952 "NavÅ¡tÃvit web",
7953 /* @__PURE__ */ a(pr, { className: "w-3 h-3" }) 7954 ] }) 7955 ] 7956 } 7957 ); 7958} 7959const Es = Mr.filter((e) => e.tier === "hlavnÃ"), Ms = Mr.filter((e) => e.tier !== "hlavnÃ"); 7960function Cs() { 7961 return /* @__PURE__ */ s("main", { children: [ 7962 /* @__PURE__ */ a("section", { className: "bg-[#f0ebe0] border-b border-[#e8dfd0]", children: /* @__PURE__ */ a(_, { className: "py-14 sm:py-18", children: /* @__PURE__ */ s("div", { className: "max-w-xl", children: [ 7963 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-4", children: "PartneÅi" }), 7964 /* @__PURE__ */ a( 7965 "h1", 7966 { 7967 className: "text-[#2c1f0e] mb-4", 7968 style: { 7969 fontFamily: "'Playfair Display', Georgia, serif", 7970 fontSize: "clamp(2rem, 5vw, 3rem)", 7971 lineHeight: 1.15 7972 }, 7973 children: "NaÅ¡i partneÅi" 7974 } 7975 ), 7976 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed", style: { maxWidth: "460px" }, children: "VýchodoÄeské trhy stojà na spolupráci s institucemi, médii a organizacemi, které sdÃlà naÅ¡e hodnoty. Každý partner pÅispÃvá k tomu, aby trhy byly lepšà pro výrobce i pro zákaznÃky." }) 7977 ] }) }) }), 7978 /* @__PURE__ */ s(_, { className: "py-16", children: [
7979 /* @__PURE__ */ s("div", { className: "mb-10", children: [ 7980 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-3", children: "Hlavnà partneÅi" }), 7981 /* @__PURE__ */ a( 7982 "h2", 7983 { 7984 className: "text-[#2c1f0e]", 7985 style: { 7986 fontFamily: "'Playfair Display', Georgia, serif", 7987 fontSize: "clamp(1.4rem, 2.5vw, 1.9rem)" 7988 }, 7989 children: "KlÃÄovà podporovatelé" 7990 } 7991 ), 7992 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm mt-2", children: "Organizace a instituce, které jsou s námi od zaÄátku a umožÅujà rozvoj trhů." }) 7993 ] }), 7994 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: Es.map((e) => /* @__PURE__ */ a(za, { partner: e }, e.id)) }) 7995 ] }), 7996 /* @__PURE__ */ a("section", { className: "bg-[#f9f7f3] py-16 border-t border-[#e8dfd0]", children: /* @__PURE__ */ s(_, { children: [ 7997 /* @__PURE__ */ s("div", { className: "mb-10", children: [
7998 /* @__PURE__ */ a(Y, { variant: "brown", size: "md", className: "mb-3", children: "Mediálnà & komunálnà partneÅi" }), 7999 /* @__PURE__ */ a( 8000 "h2", 8001 { 8002 className: "text-[#2c1f0e]", 8003 style: { 8004 fontFamily: "'Playfair Display', Georgia, serif", 8005 fontSize: "clamp(1.4rem, 2.5vw, 1.9rem)" 8006 }, 8007 children: "Komunitnà sÃÅ¥" 8008 } 8009 ), 8010 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm mt-2", children: "Média, komunity a organizace, které Å¡ÃÅà povÄdomà o trhách a sdÃlà naÅ¡e hodnoty." }) 8011 ] }), 8012 /* @__PURE__ */ a("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: Ms.map((e) => /* @__PURE__ */ a(za, { partner: e }, e.id)) }) 8013 ] }) }), 8014 /* @__PURE__ */ a(_, { className: "py-16", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 items-center", children: [ 8015 /* @__PURE__ */ s("div", { children: [
8016 /* @__PURE__ */ a(Y, { variant: "green", size: "md", className: "mb-4", children: "Spolupráce" }), 8017 /* @__PURE__ */ a( 8018 "h2", 8019 { 8020 className: "text-[#2c1f0e] mb-5", 8021 style: { 8022 fontFamily: "'Playfair Display', Georgia, serif", 8023 fontSize: "clamp(1.5rem, 3vw, 2rem)" 8024 }, 8025 children: "StaÅte se partnerem trhů" 8026 } 8027 ), 8028 /* @__PURE__ */ s("div", { className: "flex flex-col gap-3 text-[#6b6355] leading-relaxed text-sm mb-8", children: [ 8029 /* @__PURE__ */ a("p", { children: "Hledáme partnery, kteÅà sdÃlà naÅ¡e pÅesvÄdÄenà o lokálnÃch potravinách a komunitnÃm způsobu života. Partnerstvà může mÃt různou formu â od mediálnÃho pokrytà pÅes institucionálnà podporu až po pÅÃmé zapojenà do programu trhů." }), 8030 /* @__PURE__ */ a("p", { children: "Jako partner zÃskáte viditelnost na webu, sociálnÃch sÃtÃch a pÅÃmo na trhách. NabÃzÃme férové a transparentnà podmÃnky spolupráce." }) 8031 ] }),
8032 /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-3", children: [ 8033 /* @__PURE__ */ s( 8034 $, 8035 { 8036 to: "/kontakt", 8037 className: "inline-flex items-center gap-2 px-5 py-2.5 bg-[#3d6b4f] text-white rounded-lg text-sm hover:bg-[#2d5240] transition-colors", 8038 style: { fontWeight: 500 }, 8039 children: [ 8040 "Kontaktujte nás", 8041 /* @__PURE__ */ a(ve, { className: "w-4 h-4" }) 8042 ] 8043 } 8044 ), 8045 /* @__PURE__ */ a( 8046 $, 8047 { 8048 to: "/o-nas", 8049 className: "inline-flex items-center gap-2 px-5 py-2.5 border border-[#3d6b4f] text-[#3d6b4f] rounded-lg text-sm hover:bg-[#e8f0ea] transition-colors", 8050 style: { fontWeight: 500 }, 8051 children: "VÃce o nás" 8052 } 8053 ) 8054 ] }) 8055 ] }), 8056 /* @__PURE__ */ s("div", { className: "bg-[#f0ebe0] rounded-2xl p-8", children: [ 8057 /* @__PURE__ */ a( 8058 "h3", 8059 { 8060 className: "text-[#2c1f0e] mb-6", 8061 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.1rem", fontWeight: 700 }, 8062 children: "Co partnerstvà pÅinášÃ" 8063 } 8064 ),
8065 /* @__PURE__ */ a("ul", { className: "flex flex-col gap-4", children: [ 8066 { title: "Viditelnost na webu", desc: "Logo a popis na stránce partnerů a na homepage." }, 8067 { title: "PÅÃtomnost na trhách", desc: "Banner nebo informaÄnà stojan na každém termÃnu." }, 8068 { title: "ZmÃnky v komunikaci", desc: "Newsletter, sociálnà sÃtÄ a tiskové zprávy." }, 8069 { title: "PÅÃmé oslovenà komunity", desc: "PÅÃstup k zákaznÃkům, kteÅà si vážà lokálnÃho původu." } 8070 ].map((e) => /* @__PURE__ */ s("li", { className: "flex gap-3", children: [ 8071 /* @__PURE__ */ a("div", { className: "w-5 h-5 rounded-full bg-[#3d6b4f] flex items-center justify-center flex-shrink-0 mt-0.5", children: /* @__PURE__ */ a("div", { className: "w-1.5 h-1.5 rounded-full bg-white" }) }), 8072 /* @__PURE__ */ s("div", { children: [ 8073 /* @__PURE__ */ a("p", { className: "text-[#2c1f0e] text-sm", style: { fontWeight: 600 }, children: e.title }), 8074 /* @__PURE__ */ a("p", { className: "text-[#6b6355] text-sm", children: e.desc }) 8075 ] }) 8076 ] }, e.title)) }) 8077 ] }) 8078 ] }) }) 8079 ] }); 8080} 8081function Ls() { 8082 return /* @__PURE__ */ a("main", { className: "min-h-[60vh] flex items-center", children: /* @__PURE__ */ a(_, { className: "py-16", children: /* @__PURE__ */ s("div", { className: "text-center max-w-md mx-auto", children: [ 8083 /* @__PURE__ */ a("div", { className: "w-16 h-16 rounded-full bg-[#e8f0ea] flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ a(mt, { className: "w-8 h-8 text-[#3d6b4f]" }) }), 8084 /* @__PURE__ */ a( 8085 "h1", 8086 { 8087 className: "text-[#2c1f0e] mb-3", 8088 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "clamp(2rem, 5vw, 3rem)" }, 8089 children: "404" 8090 } 8091 ), 8092 /* @__PURE__ */ a( 8093 "h2", 8094 { 8095 className: "text-[#2c1f0e] mb-4", 8096 style: { fontFamily: "'Playfair Display', Georgia, serif", fontSize: "1.5rem" }, 8097 children: "Stránka nenalezena" 8098 } 8099 ), 8100 /* @__PURE__ */ a("p", { className: "text-[#6b6355] leading-relaxed mb-8", children: "Omlouváme se, stránka, kterou hledáte, neexistuje nebo byla pÅesunuta." }), 8101 /* @__PURE__ */ s( 8102 $, 8103 { 8104 to: "/", 8105 className: "inline-flex items-center gap-2 px-6 py-3 bg-[#3d6b4f] text-white rounded-lg text-sm font-medium hover:bg-[#2d5240] transition-colors", 8106 children: [
8107 /* @__PURE__ */ a(Pt, { className: "w-4 h-4" }), 8108 "ZpÄt na hlavnà stránku" 8109 ] 8110 } 8111 ) 8112 ] }) }) }); 8113} 8114function Fs() { 8115 return /* @__PURE__ */ s("div", { className: "min-h-screen flex flex-col bg-[#faf8f3]", children: [ 8116 /* @__PURE__ */ a(as, {}), 8117 /* @__PURE__ */ a("div", { className: "flex-1", children: /* @__PURE__ */ a($l, {}) }), 8118 /* @__PURE__ */ a(ns, {}) 8119 ] }); 8120} 8121const Ts = co([ 8122 { 8123 path: "/", 8124 Component: Fs, 8125 children: [ 8126 { index: !0, Component: fs }, 8127 { path: "terminy", Component: vs }, 8128 { path: "trziste/:id", Component: ys }, 8129 { path: "vyrobci", Component: gs }, 8130 { path: "aktuality", Component: bs }, 8131 { path: "aktuality/:id", Component: xs }, 8132 { path: "kodex", Component: ks }, 8133 { path: "kontakt", Component: Ns }, 8134 { path: "o-nas", Component: Rs }, 8135 { path: "partneri", Component: Cs }, 8136 { path: "*", Component: Ls } 8137 ] 8138 } 8139]); 8140function Os() { 8141 return /* @__PURE__ */ a(Tl, { router: Ts }); 8142} 8143const _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 8144 __proto__: null, 8145 default: Os 8146}, Symbol.toStringTag, { value: "Module" })); 8147export { 8148 Hs as Code0_8, 8149 $s as __importModule__ 8150};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.