@celsoft/coordinator 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +107 -0
  3. package/THIRD_PARTY_NOTICES.md +2005 -0
  4. package/agents/console.md +20 -0
  5. package/agents/free.md +110 -0
  6. package/build/0-JP6XL6LB.js +17 -0
  7. package/build/1-A52YZWNS.js +17 -0
  8. package/build/2-CLH2NM6F.js +32 -0
  9. package/build/3-4N467IB6.js +45 -0
  10. package/build/4-WL5H4LUW.js +29 -0
  11. package/build/_layout.svelte-KPUSX7LQ.js +27 -0
  12. package/build/_page.svelte-22H56UR6.js +7972 -0
  13. package/build/_page.svelte-CVWUNRQC.js +135 -0
  14. package/build/_page.svelte-LTZXBHMT.js +57 -0
  15. package/build/_server.ts-3KVBYN6P.js +20 -0
  16. package/build/_server.ts-3POPKVEM.js +47 -0
  17. package/build/_server.ts-5735T2V5.js +31 -0
  18. package/build/_server.ts-5VXGNWV2.js +38 -0
  19. package/build/_server.ts-645KP7WP.js +42 -0
  20. package/build/_server.ts-A3AA24Z2.js +28 -0
  21. package/build/_server.ts-CITUOEM6.js +58 -0
  22. package/build/_server.ts-I7HMTPOA.js +25 -0
  23. package/build/_server.ts-M5BQ4LLX.js +30 -0
  24. package/build/_server.ts-OB4O27HF.js +683 -0
  25. package/build/_server.ts-OJT7HE7M.js +15 -0
  26. package/build/_server.ts-OYGWVLZM.js +12 -0
  27. package/build/_server.ts-T75UVMQP.js +38 -0
  28. package/build/_server.ts-WYZYNHUZ.js +28 -0
  29. package/build/_server.ts-Z26EB47B.js +486 -0
  30. package/build/chunk-4CIG53L5.js +33 -0
  31. package/build/chunk-BJTJS3XY.js +338 -0
  32. package/build/chunk-F2CNWJZM.js +14 -0
  33. package/build/chunk-HGYE3UTU.js +416 -0
  34. package/build/chunk-KAYW2W7H.js +1311 -0
  35. package/build/chunk-LFP3UPCM.js +10 -0
  36. package/build/chunk-M44JEFEH.js +62 -0
  37. package/build/chunk-MC5AGLMY.js +39 -0
  38. package/build/chunk-NCZ77J5E.js +19798 -0
  39. package/build/chunk-NVNLDPUJ.js +2122 -0
  40. package/build/chunk-PDCON4KS.js +494 -0
  41. package/build/chunk-Q4OQNY5M.js +25 -0
  42. package/build/chunk-QCUOR2U5.js +75 -0
  43. package/build/chunk-R6RYZZWA.js +46 -0
  44. package/build/chunk-SOJTASZC.js +51 -0
  45. package/build/chunk-SU26PJVX.js +410 -0
  46. package/build/chunk-U5BSBG4R.js +506 -0
  47. package/build/chunk-UEKOZGRO.js +37 -0
  48. package/build/chunk-W6EFUWJ2.js +9 -0
  49. package/build/chunk-WOPREK6Q.js +117 -0
  50. package/build/chunk-WWJ3F4QS.js +127 -0
  51. package/build/chunk-ZGZJEEE3.js +1091 -0
  52. package/build/client/_app/immutable/assets/0.BGa5ZNDM.css +1 -0
  53. package/build/client/_app/immutable/chunks/BUrrLYDt.js +2 -0
  54. package/build/client/_app/immutable/chunks/BgFr_EyZ.js +4 -0
  55. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +82 -0
  56. package/build/client/_app/immutable/chunks/C8qZab0y.js +56 -0
  57. package/build/client/_app/immutable/chunks/C90fLsA5.js +4 -0
  58. package/build/client/_app/immutable/chunks/CRzLMJPS.js +1 -0
  59. package/build/client/_app/immutable/chunks/DLT1iIlz.js +2 -0
  60. package/build/client/_app/immutable/chunks/pIrVVOVY.js +2 -0
  61. package/build/client/_app/immutable/entry/app.0DERehLW.js +3 -0
  62. package/build/client/_app/immutable/entry/payload.DSmR2FwN.js +2 -0
  63. package/build/client/_app/immutable/entry/start.B7srFiqh.js +3 -0
  64. package/build/client/_app/immutable/nodes/0.aD9vJoxR.js +2 -0
  65. package/build/client/_app/immutable/nodes/1.Br4FL91i.js +2 -0
  66. package/build/client/_app/immutable/nodes/2.vl6OYfu3.js +8 -0
  67. package/build/client/_app/immutable/nodes/3.VYqJOLAF.js +2 -0
  68. package/build/client/_app/immutable/nodes/4.jF9UVlFN.js +2 -0
  69. package/build/client/_app/version.json +1 -0
  70. package/build/client/apple-touch-icon.png +0 -0
  71. package/build/client/favicon.ico +0 -0
  72. package/build/client/favicon.svg +48 -0
  73. package/build/client/icon-192.png +0 -0
  74. package/build/client/icon-512.png +0 -0
  75. package/build/client/icon-maskable-512.png +0 -0
  76. package/build/client/icon.svg +44 -0
  77. package/build/client/manifest.webmanifest +15 -0
  78. package/build/error.svelte-JXZDY65F.js +51 -0
  79. package/build/handler.js +716 -0
  80. package/build/hooks.server-34IMHRKC.js +43 -0
  81. package/build/instance-NP3FJIWW.js +2967 -0
  82. package/client/client.mjs +28 -0
  83. package/client/hooks.mjs +7 -0
  84. package/client/register.mjs +5 -0
  85. package/dist/cli.js +62826 -0
  86. package/dist/port.js +36691 -0
  87. package/package.json +20 -1
  88. package/skills/agents/.claude-plugin/plugin.json +5 -0
  89. package/skills/agents/hooks/hooks.json +1 -0
  90. package/skills/agents/hooks/register.ts +57 -0
  91. package/skills/agents/skills/bus-work/SKILL.md +66 -0
  92. package/skills/agents/skills/plan/SKILL.md +98 -0
  93. package/skills/console/.claude-plugin/plugin.json +5 -0
  94. package/skills/console/hooks/hooks.json +1 -0
  95. package/skills/console/hooks/register.ts +10 -0
  96. package/skills/console/skills/bus/SKILL.md +61 -0
  97. package/skills/default/.claude-plugin/plugin.json +5 -0
  98. package/skills/default/skills/git-workflow/SKILL.md +294 -0
  99. package/skills/default/skills/git-workflow/mise-tasks/_lib.sh +107 -0
  100. package/skills/default/skills/git-workflow/mise-tasks/clone +36 -0
  101. package/skills/default/skills/git-workflow/mise-tasks/repo-list +8 -0
  102. package/skills/default/skills/git-workflow/mise-tasks/unpushed +26 -0
  103. package/skills/default/skills/git-workflow/mise-tasks/worktree-add +60 -0
  104. package/skills/default/skills/github/SKILL.md +208 -0
  105. package/skills/default/skills/github/scripts/gh-org +196 -0
  106. package/skills/default/skills/plan-page/SKILL.md +300 -0
  107. package/skills/default/skills/plan-page/assets/index.html +854 -0
  108. package/skills/default/skills/plan-page/scripts/inline +46 -0
  109. package/skills/default/skills/plan-page/scripts/stage +26 -0
  110. package/skills/default/skills/secrets/SKILL.md +134 -0
  111. package/skills/default/skills/secrets/scripts/secrets-check +87 -0
  112. package/skills/default/skills/writing-style/SKILL.md +45 -0
  113. package/skills/extra/.claude-plugin/plugin.json +5 -0
  114. package/skills/extra/skills/artifacts/SKILL.md +52 -0
  115. package/skills/extra/skills/github-actions/SKILL.md +78 -0
  116. package/skills/extra/skills/github-actions/scan +32 -0
  117. package/skills/extra/skills/markdown-review/SKILL.md +70 -0
  118. package/skills/extra/skills/markdown-review/assets/index.html +201 -0
  119. package/skills/extra/skills/markdown-review/scripts/stage +36 -0
  120. package/skills/extra/skills/mise-usage/SKILL.md +155 -0
  121. package/skills/extra/skills/plugin-authoring/SKILL.md +317 -0
  122. package/skills/extra/skills/project-conventions/SKILL.md +64 -0
  123. package/skills/extra/skills/questions/SKILL.md +156 -0
  124. package/skills/extra/skills/questions/assets/index.html +376 -0
  125. package/skills/extra/skills/questions/scripts/stage +26 -0
  126. package/skills/extra/skills/serve/SKILL.md +165 -0
  127. package/skills/extra/skills/serve/scripts/serve +268 -0
  128. package/skills/extra/skills/serve/scripts/server.py +345 -0
  129. package/skills/extra/skills/skill-dependencies/SKILL.md +65 -0
  130. package/skills/extra/skills/skill-maintenance/SKILL.md +101 -0
  131. package/skills/extra/skills/ticketing/SKILL.md +125 -0
@@ -0,0 +1,56 @@
1
+ import{$ as e,D as t,F as n,H as r,I as i,J as a,L as o,M as s,O as c,P as l,Q as u,R as d,T as f,U as p,Y as m,Z as h,_ as ee,_t as g,at as _,c as v,ct as y,dt as b,et as x,ft as te,g as ne,gt as S,ht as re,i as ie,k as C,lt as ae,mt as w,n as T,nt as E,pt as D,r as oe,rt as O,t as k,u as A,ut as se,v as ce,w as le,x as j,y as ue,z as M}from"./BgFr_EyZ.js";import{d as de,i as fe,n as pe,o as me,p as he,s as ge,t as _e,u as ve}from"./BUrrLYDt.js";var ye=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1024'%20height='1024'%20viewBox='-50%20-50%201354%201354'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eCoordinator%20mark%3c/title%3e%3cdesc%20id='desc'%3eCream%20C-shaped%20gear%20surrounding%20four%20robot%20agents,%20connected%20with%20orange%20arcs%20and%20spokes.%20Transparent%20background.%3c/desc%3e%3cstyle%3e%20/*%20Change%20fill%20to%20any%20color%20for%20a%20solid%20background.%20No%20checkerboard%20is%20drawn.%20*/%20.background%20{fill:none;}%20.gear%20{fill:%23FFF6E9;stroke:%23091216;stroke-width:64;paint-order:stroke;stroke-linejoin:round;stroke-linecap:round;}%20.disc%20{fill:%23091216;}%20.connections%20{fill:none;stroke:%23FF8A00;stroke-width:49;}%20.spokes%20{fill:none;stroke:%23FF8A00;stroke-width:35;}%20.robot-shell%20{fill:%23FFF6E9;stroke:%23091216;stroke-width:24;}%20.robot-face%20{fill:%23091216;}%20.eyes%20{fill:%23FFFAF2;}%20.antenna-stem%20{stroke:%23FFF6E9;stroke-width:25;}%20.antenna-tip%20{fill:%23FFF6E9;stroke:%23091216;stroke-width:20;}%20[id^=robot-]%20{display:none;}%20.connections%20{stroke-width:110;}%20.spokes%20{stroke-width:90;}%20.gear%20{stroke-width:100;}%20%3c/style%3e%3cg%20id='background'%20data-name='Background,%20transparent;%20set%20its%20CSS%20fill%20for%20a%20solid%20one'%3e%3crect%20class='background'%20x='-16'%20y='-16'%20width='1286'%20height='1286'/%3e%3c/g%3e%3cg%20id='c-gear'%20data-name='C-shaped%20cream%20gear'%3e%3cpath%20class='gear'%20d='M971%20424%20L1104%20323%20Q1133%20299%201113%20267%20L990%20144%20Q963%20119%20934%20137%20L867%20169%20L782%20134%20L751%2051%20Q742%2027%20714%2027%20H582%20Q551%2027%20540%2053%20L506%20134%20L416%20173%20L351%20138%20Q325%20123%20302%20143%20L201%20244%20Q182%20264%20193%20290%20L220%20340%20L179%20426%20L96%20446%20Q73%20452%2066%20483%20L49%20580%20Q44%20607%2067%20623%20L119%20659%20L131%20753%20L85%20801%20Q65%20823%2080%20850%20L126%20939%20Q138%20964%20166%20959%20L239%20947%20L297%201008%20L285%201085%20Q280%201114%20303%201131%20L393%201182%20Q415%201195%20439%201177%20L492%201127%20L575%201147%20L604%201207%20Q614%201228%20641%201228%20H730%20Q755%201228%20766%201205%20L797%201142%20Q966%201130%201113%20986%20Q1139%20958%201117%20935%20L991%20856%20L908%20887%20A378%20378%200%201%201%20942%20418%20Z'/%3e%3c/g%3e%3cg%20id='central-disc'%20data-name='Dark%20central%20disc'%3e%3ccircle%20class='disc'%20cx='630'%20cy='631'%20r='367'/%3e%3c/g%3e%3cg%20id='inside'%20data-name='Everything%20inside%20the%20C,%20scaled%20to%20its%20opening'%20transform='translate(630%20631)%20scale(0.9)%20translate(-630%20-631)'%3e%3cg%20id='orange-orbit'%20data-name='Orange%20connecting%20arcs'%20class='connections'%3e%3ccircle%20cx='630'%20cy='621'%20r='329'/%3e%3c/g%3e%3cg%20id='orange-spokes'%20data-name='Orange%20connecting%20spokes'%20class='spokes'%3e%3cpath%20d='M632%20391V845%20M352%20622H919'/%3e%3c/g%3e%3cg%20id='robot-top'%20data-name='Robot%20top'%20transform='translate(634%20335)'%3e%3cg%20id='antenna-top'%20data-name='Antenna'%3e%3ccircle%20class='antenna-tip'%20cx='0'%20cy='-144'%20r='39'/%3e%3cpath%20class='antenna-stem'%20d='M0%20-144V-67'/%3e%3c/g%3e%3crect%20class='robot-shell'%20x='-130'%20y='-97'%20width='260'%20height='196'%20rx='86'/%3e%3crect%20class='robot-face'%20x='-89'%20y='-44'%20width='178'%20height='99'%20rx='40'/%3e%3cg%20class='eyes'%20data-name='Eyes'%3e%3ccircle%20cx='-42'%20cy='4'%20r='18.5'/%3e%3ccircle%20cx='42'%20cy='4'%20r='18.5'/%3e%3c/g%3e%3c/g%3e%3cg%20id='robot-left'%20data-name='Robot%20left'%20transform='translate(315%20625)'%3e%3cg%20id='antenna-left'%20data-name='Antenna'%3e%3ccircle%20class='antenna-tip'%20cx='0'%20cy='-144'%20r='39'/%3e%3cpath%20class='antenna-stem'%20d='M0%20-144V-67'/%3e%3c/g%3e%3crect%20class='robot-shell'%20x='-130'%20y='-97'%20width='260'%20height='196'%20rx='86'/%3e%3crect%20class='robot-face'%20x='-89'%20y='-44'%20width='178'%20height='99'%20rx='40'/%3e%3cg%20class='eyes'%20data-name='Eyes'%3e%3ccircle%20cx='-42'%20cy='4'%20r='18.5'/%3e%3ccircle%20cx='42'%20cy='4'%20r='18.5'/%3e%3c/g%3e%3c/g%3e%3cg%20id='robot-right'%20data-name='Robot%20right'%20transform='translate(940%20625)'%3e%3cg%20id='antenna-right'%20data-name='Antenna'%3e%3ccircle%20class='antenna-tip'%20cx='0'%20cy='-144'%20r='39'/%3e%3cpath%20class='antenna-stem'%20d='M0%20-144V-67'/%3e%3c/g%3e%3crect%20class='robot-shell'%20x='-130'%20y='-97'%20width='260'%20height='196'%20rx='86'/%3e%3crect%20class='robot-face'%20x='-89'%20y='-44'%20width='178'%20height='99'%20rx='40'/%3e%3cg%20class='eyes'%20data-name='Eyes'%3e%3ccircle%20cx='-42'%20cy='4'%20r='18.5'/%3e%3ccircle%20cx='42'%20cy='4'%20r='18.5'/%3e%3c/g%3e%3c/g%3e%3cg%20id='robot-bottom'%20data-name='Robot%20bottom'%20transform='translate(633%20957)'%3e%3cg%20id='antenna-bottom'%20data-name='Antenna'%3e%3ccircle%20class='antenna-tip'%20cx='0'%20cy='-144'%20r='39'/%3e%3cpath%20class='antenna-stem'%20d='M0%20-144V-67'/%3e%3c/g%3e%3crect%20class='robot-shell'%20x='-130'%20y='-97'%20width='260'%20height='196'%20rx='86'/%3e%3crect%20class='robot-face'%20x='-89'%20y='-44'%20width='178'%20height='99'%20rx='40'/%3e%3cg%20class='eyes'%20data-name='Eyes'%3e%3ccircle%20cx='-42'%20cy='4'%20r='18.5'/%3e%3ccircle%20cx='42'%20cy='4'%20r='18.5'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,be=new Set([`$$slots`,`$$events`,`$$legacy`,`icon`,`label`,`type`,`cancel`,`error`,`onclick`,`class`]),xe=i(`<span class="sd-spinner" aria-hidden="true"></span>`),Se=i(`<button><!></button>`);function Ce(e,n){se(n,!0);let r=k(n,`type`,3,`button`),i=k(n,`cancel`,3,!1),a=k(n,`error`,15,``),o=T(n,be),s=new fe({name:`An IconButton onclick`}),c=ve(),u=_(()=>me({own:s,form:c,submit:r()===`submit`,cancel:i()}));m(()=>{a(s.error)});var d=Se(),f=e=>ge(e,{own:s,form:c,submit:r()===`submit`,cancel:i(),onclick:n.onclick});v(d,()=>({type:r(),class:[`sd-iconbtn`,n.class],"aria-label":n.label,title:n.label,"aria-disabled":p(u).blocked?`true`:void 0,"aria-busy":p(u).spinning?`true`:void 0,onclick:f,...o}));var ee=h(d),g=e=>{var t=xe();l(e,t)},y=e=>{he(e,{get name(){return n.icon}})};t(ee,e=>{p(u).spinning?e(g):e(y,-1)}),w(d),l(e,d),ae()}function we(e,t={}){let n=t;function r(){n.open&&!e.open?e.showModal():!n.open&&e.open&&e.close()}function i(e){e.preventDefault(),n.onclose?.()}function a(t){if(t.target!==e)return;let r=e.getBoundingClientRect();t.clientX>=r.left&&t.clientX<=r.right&&t.clientY>=r.top&&t.clientY<=r.bottom||n.onclose?.()}return e.addEventListener(`cancel`,i),e.addEventListener(`click`,a),r(),{update(e){n=e,r()},destroy(){e.removeEventListener(`cancel`,i),e.removeEventListener(`click`,a),e.open&&e.close()}}}var Te=i(`<p class="sd-dialog-error" role="alert"> </p>`),Ee=i(`<div class="sd-dialog-body"><!> <!></div>`),De=i(`<footer class="sd-dialog-foot"><!></footer>`),Oe=i(`<!> <!>`,1),ke=i(`<span class="sd-dialog-icon"><!></span>`),Ae=i(`<p class="sd-dialog-sub"> </p>`),je=i(`<form class="sd-dialog-form" novalidate=""><!></form>`),Me=i(`<dialog><header class="sd-dialog-head"><!> <div class="sd-dialog-titles"><h2 class="sd-dialog-title"> </h2> <!></div> <!></header> <!></dialog>`);function Ne(n,i){let o=d();se(i,!0);let c=n=>{var r=Oe(),o=u(r),c=n=>{var r=Ee(),o=h(r);C(o,()=>i.children??S);var c=x(o,2),u=t=>{var n=Te(),r=e(n,!0);a(()=>s(r,_.error)),l(t,n)};t(c,e=>{_?.error&&e(u)}),w(r),l(n,r)};t(o,e=>{(i.children||_?.error)&&e(c)});var d=x(o,2),f=e=>{var t=De(),n=h(t);C(n,()=>i.footer),w(t),l(e,t)};t(d,e=>{i.footer&&e(f)}),l(n,r)},f=k(i,`open`,15,!1),p=k(i,`size`,3,`md`),g=k(i,`abortable`,3,!1),_=i.onsubmit?de(new fe({name:`A Dialog onsubmit`,abortable:g()})):void 0;m(()=>{!f()&&_&&(_.error=``)});function v(){if(_?.busy){if(!_.abortable)return;_.abort()}f(!1),i.onclose?.()}async function y(e){if(e.preventDefault(),!_||!i.onsubmit)return;let t=e.submitter??null;(await _.run(e=>i.onsubmit({...e,submitter:t}))).ok&&(f(!1),i.onclose?.())}var b=Me(),te=h(b),ne=h(te),re=e=>{var t=ke(),n=h(t);he(n,{get name(){return i.icon}}),w(t),l(e,t)};t(ne,e=>{i.icon&&e(re)});var ie=x(ne,2),T=h(ie),E=e(T,!0),D=x(T,2),oe=t=>{var n=Ae(),r=e(n,!0);a(()=>{A(n,`id`,`sd-dialog-${o}-desc`),s(r,i.description)}),l(t,n)};t(D,e=>{i.description&&e(oe)}),w(ie),Ce(x(ie,2),{icon:`x`,label:`Close`,cancel:!0,onclick:v}),w(te);var O=x(te,2),le=e=>{var t=je(),n=h(t);c(n),w(t),ue(t,(e,t)=>_e?.(e,t),()=>_.busy),r(`submit`,t,y),l(e,t)},j=e=>{c(e)};t(O,e=>{_?e(le):e(j,-1)}),w(b),ue(b,(e,t)=>we?.(e,t),()=>({open:f(),onclose:v})),a(()=>{ee(b,1,ce([`sd-dialog`,p()===`sm`&&`sd-dialog-sm`,p()===`lg`&&`sd-dialog-lg`])),A(b,`aria-labelledby`,`sd-dialog-${o}-title`),A(b,`aria-describedby`,i.description?`sd-dialog-${o}-desc`:void 0),A(T,`id`,`sd-dialog-${o}-title`),s(E,i.title)}),l(n,b),ae()}var Pe={bug:{label:`Bug`,tone:`warning`},feature:{label:`Feature`,tone:`info`},task:{label:`Task`,tone:`neutral`},chore:{label:`Chore`,tone:`neutral`}},Fe={open:{label:`Open`,tone:`success`},held:{label:`Held`,tone:`accent`},closed:{label:`Closed`,tone:`neutral`}},Ie={open:{label:`Opened`,tone:`info`},closed:{label:`Closed`,tone:`neutral`},dry_run:{label:`Dry run`,tone:`neutral`}},Le={landing:{label:`Landing`,tone:`info`},pr_open:{label:`PR open`,tone:`info`},landed:{label:`Landed`,tone:`success`},refused:{label:`Refused`,tone:`warning`},failed:{label:`Failed`,tone:`warning`},closed:{label:`PR closed`,tone:`neutral`},dry_run:{label:`Dry run`,tone:`neutral`}},Re={plan:`Plan to approve`,done:`Ready to land`,pr:`PR to open`,question:`Question`};function ze(e,t){if(t?.kind!==`plan`||!t.about)return null;let n=e.find(e=>e.address===t.about),r=n&&(n.plans.findLast(e=>!e.approved_at)??n.plans.at(-1));return n&&r?{issue:n,plan:r}:null}function Be(e){return e?e.landed?{label:`Landed`,tone:`success`}:e.state===`closed`?{label:`Closed, not landed`,tone:`danger`}:{label:Fe[e.state].label,tone:e.state===`held`?`accent`:`warning`}:{label:`Unknown`,tone:`danger`}}var Ve=e=>t=>{let n=e.slots[t];return n===void 0?void 0:e.sessions[n]?.lead??null},He=(e,t)=>e.filter(e=>e.blocked_by.includes(t)),Ue=(e,t)=>t.blocked_by.filter(t=>!e.find(e=>e.address===t)?.landed);function We(e){return e.filter(e=>e.checkout).map(e=>({kind:`checkout`,key:`checkout:${e.repo}`,tone:`warning`,href:Qe(e.repo),title:`${e.repo} checkout behind`,text:`Its ${e.default_branch} at ${e.checkout.at} is ${e.checkout.behind} behind origin and was not fast-forwarded: ${e.checkout.why}. ${e.checkout.fix} The bus retries every minute.`}))}function Ge(e){return e.map(e=>({kind:`record`,key:`record:${e.file}`,tone:`warning`,href:`#skills`,title:`${e.file} skipped`,text:e.file.startsWith(`.coord/`)?`It could not be read: ${e.detail}. Fix the file, then restart the server to read it.`:`${e.detail}. Fix it in the Repo: its Profiles are read again each time its checkout moves.`}))}function Ke(e,t){let n=e[t.repo]?.groups.find(e=>e.issues.includes(t.address));return n?{with:n.issues.filter(e=>e!==t.address),why:n.why}:null}var qe=e=>`#d=${encodeURIComponent(e)}`,Je=e=>e.state||`unknown`,Ye=e=>e?new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}):``,Xe=e=>e.repo||`no repo`,Ze=e=>`#i=`+encodeURIComponent(e),Qe=e=>`#r=`+encodeURIComponent(e),$e=(e,t)=>Qe(e)+`~`+t,et=e=>`https://github.com/${e}`,tt=e=>`#rs=`+encodeURIComponent(e),nt=e=>`#rk=`+encodeURIComponent(e),rt=e=>`#ss=`+encodeURIComponent(e),it=e=>`#s=`+encodeURIComponent(e),at=e=>!e.ended&&e.state===`starting`&&Date.now()-new Date(e.started).getTime()>2e4;function ot(e,t=Date.now()){if(!e)return``;let n=Math.max(0,(t-new Date(e).getTime())/1e3);for(let[e,t]of[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]]){let r=Math.floor(n/t);if(r>=1)return`${r} ${e}${r===1?``:`s`} ago`}return`just now`}function N(e,t){let n=e.match(RegExp(`^#`+t+`=(.+)$`));return n?decodeURIComponent(n[1]):``}var st=Symbol(`page`),ct=2e3,lt=class{csrf;#e=O(null);get st(){return p(this.#e)}set st(e){E(this.#e,e,!0)}#t=O(``);get hash(){return p(this.#t)}set hash(e){E(this.#t,e,!0)}#n=O(``);get note(){return p(this.#n)}set note(e){E(this.#n,e,!0)}#r=O(!1);get navOpen(){return p(this.#r)}set navOpen(e){E(this.#r,e,!0)}#i=O(!1);get live(){return p(this.#i)}set live(e){E(this.#i,e,!0)}#a=O(``);get switchWarning(){return p(this.#a)}set switchWarning(e){E(this.#a,e,!0)}#o=O(null);get dialog(){return p(this.#o)}set dialog(e){E(this.#o,e,!0)}last=``;asked=0;heldNote=null;open(e,t=``){return new Promise(n=>this.dialog={kind:e,arg:t,n:++this.asked,shown:n})}constructor(e){this.csrf=e}get selected(){return N(this.hash,`s`)}get selectedIssue(){return N(this.hash,`i`)}get selectedRepo(){return N(this.hash,`r`).split(`~`)[0]}get selectedChange(){return Number(N(this.hash,`r`).split(`~`)[1]??0)||0}get selectedRepoSettings(){return N(this.hash,`rs`)}get selectedRepoSecrets(){return N(this.hash,`rk`)}get selectedSlotSecrets(){return N(this.hash,`ss`)}get selectedDoc(){return N(this.hash,`d`)}get selectedPart(){return N(this.hash,`sk`)}go(e){location.hash=e}async poll(){try{let e=await fetch(`state.json`,{cache:`no-store`});if(e.status===401){location.href=`pair`;return}let t=await e.text();this.live=e.ok,t!==this.last&&(this.last=t,this.st=JSON.parse(t)),this.dropHeldNote()}catch{this.live=!1}}held(e,t){this.note=t,this.heldNote={id:e,text:t},this.dropHeldNote()}dropHeldNote(){let e=this.heldNote;e&&this.st&&(this.note===e.text?this.st.throttle.held.some(t=>t.id===e.id)||(this.note=``,this.heldNote=null):this.heldNote=null)}start(){let e=()=>this.hash=location.hash;e(),window.addEventListener(`hashchange`,e),this.poll();let t=setInterval(()=>void this.poll(),ct);return()=>{clearInterval(t),window.removeEventListener(`hashchange`,e)}}async post(e,t){return(await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,"X-CSRF":this.csrf},body:JSON.stringify(t)})).json()}async focus(e){let t=await this.post(`focus`,{session:e}).catch(()=>({error:`the server did not answer`}));this.switchWarning=t.error||``,t.cleanup&&await this.open(`cleanup`,e)}async terminal(e){let t=await this.post(`terminal`,{repo:e}).catch(()=>({error:`the server did not answer`}));this.note=t.error||``}async act(e){let t=await this.post(`act`,e);return this.note=t.error||``,await this.poll(),t}};function ut(e){return b(st,e)}function dt(){return y(st)}var ft={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},pt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function mt(e){return e!=null}function ht(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??ft.width,a=e.size??e.height??ft.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?pt(...c):pt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??ft[`stroke-width`])*Number(e.size??e.width??ft.width)/Number(t.size??t.width??ft.width):t.strokeWidth??ft[`stroke-width`];return[`svg`,{...Object.entries(ft).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&mt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&mt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&mt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var gt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},_t=Symbol(`lucide-context`),vt=()=>y(_t),yt=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),bt=o(`<svg><!><!></svg>`);function xt(e,t){se(t,!0);let r=vt()??{},i=k(t,`color`,19,()=>r.color??`currentColor`),a=k(t,`size`,19,()=>r.size??24),o=k(t,`width`,19,a),s=k(t,`height`,19,a),c=k(t,`strokeWidth`,19,()=>r.strokeWidth??2),d=k(t,`absoluteStrokeWidth`,19,()=>r.absoluteStrokeWidth??!1),m=k(t,`nonScalingStroke`,19,()=>r.nonScalingStroke??!1),ee=k(t,`iconNode`,19,()=>[]),y=k(t,`icon`,19,()=>({node:ee(),aliases:[],size:24})),b=T(t,yt),te=_(()=>!!t.children||gt(b)),ne=_(()=>ht(y(),{color:i(),width:o(),height:s(),strokeWidth:c(),absoluteStrokeWidth:d(),nonScalingStroke:m(),className:pt(`lucide-icon`,r.class),hasA11yProp:p(te),attributes:b})),ie=_(()=>g(p(ne),3)),E=_(()=>p(ie)[1]),D=_(()=>re(p(ie)[2],()=>[],!0)),oe=_(()=>({...p(E),class:[...p(E).class.split(` `),t.class]}));var O=bt();v(O,()=>({...p(oe)}));var A=h(O);le(A,17,()=>p(D),f,(e,t)=>{var r=_(()=>g(p(t),2));let i=()=>p(r)[0],a=()=>p(r)[1];var o=n(),s=u(o);j(s,i,!0,(e,t)=>{v(e,()=>({...a()}))}),l(e,o)});var ce=x(A);C(ce,()=>t.children??S),w(O),l(e,O),ae()}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=T(t,St),r={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16 9-5.5 5.5L8 12`}]],aliases:[`check-circle-2`]};xt(e,oe(()=>n,{get icon(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tt(e,t){let n=T(t,wt),r={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]]};xt(e,oe(()=>n,{get icon(){return r}}))}var Et=i(`<a> </a>`);function Dt(r,i){se(i,!0);let o=k(i,`id`,3,null),c=k(i,`slot`,3,null),d=dt(),f=_(()=>o()??(c()?d.st.slots[c()]:null)??null),m=_(()=>p(f)?d.st.sessions[p(f)]:null);var h=n(),ee=u(h),g=t=>{var n=Et(),r=e(n,!0);a(e=>{A(n,`href`,e),s(r,p(m).slot||p(m).track)},[()=>it(p(m).id)]),l(t,n)},v=e=>{var t=M();a(()=>s(t,o()??c())),l(e,t)};t(ee,e=>{p(m)?e(g):e(v,-1)}),l(r,h),ae()}function Ot(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function kt(e,t=`|`){return e.map(e=>$t(e)).join(t)}function At(e,t){return typeof t==`bigint`?t.toString():t}var jt=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Mt(e){return new jt(e)}function Nt(e){return e==null}function Pt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ft(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var It=Symbol(`evaluating`);function Lt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==It)return r===void 0&&(r=It,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function P(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Rt(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function F(e){return Rt(e._zod.def)??e._zod.def.shape}function zt(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return P(this,t,e),e},enumerable:!0,configurable:!0})}function Bt(e,t,n){t in e?P(e,t,n):e[t]=n}function Vt(e,t,n,r){let i=F(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?zt(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Bt(e,a,r?r(n.value,a):n.value))}}function Ht(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?zt(e,n,()=>t[n]):Bt(e,n,r.value))}}function I(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ut(e){return JSON.stringify(e)}function Wt(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Gt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var qt=Mt(()=>{if(V.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Jt(e){if(Kt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Kt(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Yt(e){return Jt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Xt=new Set([`string`,`number`,`symbol`]);function Zt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Qt(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function L(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function $t(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function en(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var tn={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},nn={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function rn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Vt(i,e,an(e,t)),Qt(e,I(n,{shape:i,checks:[]}))}function an(e,t){let n=F(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function on(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(an(e,t)),a={};return Vt(a,e,Reflect.ownKeys(F(e)).filter(e=>!i.has(e))),Qt(e,I(n,{shape:a,checks:[]}))}function sn(e,t){if(!Jt(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=F(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Qt(e,I(e._zod.def,{shape:cn(e,t)}))}function cn(e,t){let n={};return Vt(n,e,Reflect.ownKeys(F(e))),Ht(n,t),n}function ln(e,t){if(!Jt(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Qt(e,I(e._zod.def,{shape:cn(e,t)}))}function un(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Vt(n,e,Reflect.ownKeys(F(e))),Vt(n,t,Reflect.ownKeys(F(t))),Qt(e,I(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function dn(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(an(t,n)):void 0,o={};return Vt(o,t,Reflect.ownKeys(F(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Qt(t,I(t._zod.def,{shape:o,checks:[]}))}function fn(e,t,n){let r=n?new Set(an(t,n)):void 0,i={};return Vt(i,t,Reflect.ownKeys(F(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Qt(t,I(t._zod.def,{shape:i}))}function R(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function pn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function mn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function hn(e){return typeof e==`string`?e:e?.message}function gn(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function _n(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function vn(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:hn(e.inst?._zod.def?.error?.(e))??hn(a?.(e))??hn(t?.error?.(e))??hn(n.customError?.(e))??hn(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var yn=/[\uD800-\uDBFF]/;function bn(e){let t=e.length;if(!yn.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function xn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Sn(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Cn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function wn(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):On(e,n,r.value)}}function Tn(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function En(e,t,n){return Tn(e,t,n,!1)}function Dn(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Tn(this,n,r(this))},set(e){Tn(this,n,e)}})}return t}function On(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Tn(this,t,n.bind(this))},set(e){Tn(this,t,e)}})}function kn(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var An,jn=!1,Mn={configurable:!0,get(){jn=!0}};function z(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&An!==e._zod?An=void 0:(An=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Mn);let e=jn;jn=!1;try{let r=n(this);return jn?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),jn||=e,r}catch(n){throw delete this[t],jn||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Nn(e,t,n,r){let i=kn(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Pn=`~constantCatch`;function Fn(e){let t=()=>e;return t[Pn]=!0,t}var In,Ln={value:void 0,enumerable:!1},Rn=`captureStackTrace`in Error?Error:null;function zn(e){let t=Rn;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Rn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function B(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ln.value=new a(r);try{Object.defineProperty(n,"_zod",Ln)}finally{Ln.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),wn(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?zn(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Bn=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Vn=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(In=globalThis).__zod_globalConfig??(In.__zod_globalConfig={});var V=globalThis.__zod_globalConfig;function H(e){return e&&Object.assign(V,e),V}function Hn(){let e=this._zod;return e.message??=JSON.stringify(e.def,At,2),e.message}function Un(e){this._zod.message=e}var Wn={get:Hn,set:Un,enumerable:!0,configurable:!0},Gn={value:void 0,enumerable:!1},Kn=new WeakSet([Object.prototype,Error.prototype]),qn=B(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Gn.value=t,Object.defineProperty(e,"issues",Gn),Gn.value=void 0,Object.defineProperty(e,"message",Wn);let n=Object.getPrototypeOf(e);Kn.has(n)||(Kn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Jn(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Yn(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Jn(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xn(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Zn(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Qn=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Bn;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>vn(e,o,H())));throw Gt(n,a?.callee??t),n}return s.value};return t},$n=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>vn(e,o,H())));throw Gt(n,a?.callee??t),n}return s.value};return t},er=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Bn;return a.issues.length?tr(e,a.issues,i):{success:!0,data:a.value}};function tr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>vn(e,n,H()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var nr=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?tr(e,a.issues,i):{success:!0,data:a.value}},rr=Symbol.for(`zod.compile.invalid`),ir=Symbol.for(`zod.compile.fallback`),ar=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==rr)return!0;if(r.definite===!0&&n===void 0)return!1}return or(e,t,n)});function or(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[ir]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Bn;return a.issues.length===0}var sr=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},cr=e=>{let t=Qn(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Zn(n,a))};return n},lr=e=>{let t=Qn(e),n=(e,r,i,a)=>t(e,r,i,Zn(n,a));return n},ur=e=>{let t=$n(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Zn(n,a))};return n},dr=e=>{let t=$n(e),n=async(e,r,i,a)=>await t(e,r,i,Zn(n,a));return n},fr=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return er(e)(t,n,i)},pr=e=>(t,n,r)=>er(e)(t,n,r),mr=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nr(e)(t,n,i)},hr=e=>async(t,n,r)=>nr(e)(t,n,r),gr=/^[cC][0-9a-z]{6,}$/,_r=/^[0-9a-z]+$/,vr=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,yr=/^[0-9a-vA-V]{20}$/,br=/^[A-Za-z0-9]{27}$/,xr=/^[a-zA-Z0-9_-]{21}$/;function Sr(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Cr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Tr=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Er=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dr=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Or(){return new RegExp(Dr,`u`)}var kr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ar=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jr=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Mr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pr=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fr=/^https?$/,Ir=/^\+[1-9]\d{6,14}$/,Lr=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Rr(e){return RegExp(`^${e}$`)}var zr=Rr(Lr);function Br(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vr(e){return RegExp(`^${Br(e)}$`)}function Hr(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Br({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Br({precision:e.precision})}`:n;return RegExp(`^${Lr}T(?:${r})$`)}var Ur=/^[\s\S]{0,}$/,Wr=/^-?\d+$/,Gr=/^-?\d+(?:\.\d+)?$/,Kr=/^(?:true|false)$/i,qr=/^[^A-Z]*$/,Jr=/^[^a-z]*$/,U=B(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Yr=e=>{let t=e.value;return!Nt(t)&&t.length!==void 0},Xr={number:`number`,bigint:`bigint`,object:`date`},Zr=B(`$ZodCheckLessThan`,(e,t)=>{U.init(e,t);let n=Xr[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Xr[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qr=B(`$ZodCheckGreaterThan`,(e,t)=>{U.init(e,t);let n=Xr[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Xr[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$r=B(`$ZodCheckMultipleOf`,(e,t)=>{U.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ft(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ei=B(`$ZodCheckNumberFormat`,(e,t)=>{U.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=tn[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ti=B(`$ZodCheckMaxLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=Yr),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?bn(r):i)<=t.maximum)return;let a=xn(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ni=B(`$ZodCheckMinLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=Yr),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?bn(r):i)>=t.minimum)return;let a=xn(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ri=B(`$ZodCheckLengthEquals`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=Yr),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?bn(r):i;if(a===t.length)return;let o=xn(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ii=B(`$ZodCheckStringFormat`,(e,t)=>{var n,r;U.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ai=B(`$ZodCheckRegex`,(e,t)=>{ii.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),oi=B(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=qr,ii.init(e,t)}),si=B(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Jr,ii.init(e,t)}),ci=B(`$ZodCheckIncludes`,(e,t)=>{U.init(e,t);let n=Zt(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),li=B(`$ZodCheckStartsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`^${Zt(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ui=B(`$ZodCheckEndsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`.*${Zt(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),di=B(`$ZodCheckOverwrite`,(e,t)=>{U.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fi=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
3
+ `)}\n};`)(...Object.values(this.closed))}},pi={major:4,minor:6,patch:7},W=B(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pi;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=R(t),a;for(let o of n){if(o._zod.def.when){if(pn(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Bn;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(_n(t.issues,n,e),i||=R(t,n))});else{if(t.issues.length===n)continue;_n(t.issues,n,e),i||=R(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(R(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Bn;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Bn;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return En(this,`~standard`,gi(this))},set"~standard"(e){Tn(this,`~standard`,e)}}),mi=(e,t)=>e.issues.length?{issues:e.issues.map(e=>vn(e,t,H()))}:{value:e.value};async function hi(e,t){let n={async:!0};return mi(await e._zod.run({value:t,issues:[]},n),n)}function gi(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return mi(r,n)}catch{}return hi(e,t)},vendor:`zod`,version:1}}var _i=B(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=t.pattern??Ur,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),G=B(`$ZodStringFormat`,(e,t)=>{ii.init(e,t),_i.init(e,t)}),vi=B(`$ZodGUID`,(e,t)=>{t.pattern??=wr,G.init(e,t)}),yi=B(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Tr(e)}else t.pattern??=Tr();G.init(e,t)}),bi=B(`$ZodEmail`,(e,t)=>{t.pattern??=Er,G.init(e,t)});function xi(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Si(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?xi(e)||2:Ci(e,t)}function Ci(e,t){if(!t.normalize&&t.protocol?.source===Fr.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var wi=/[\t\n\r]/g;function Ti(e){return e.replace(wi,``)}function Ei(e,t){return t.lastIndex=0,t.test(e.hostname)}function Di(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Oi=B(`$ZodURL`,(e,t)=>{G.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Si(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Ti(r);return}t.hostname&&!Ei(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Di(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Ti(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ki=B(`$ZodEmoji`,(e,t)=>{t.pattern??=Or(),G.init(e,t)}),Ai=B(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?xr:Sr(t.length),G.init(e,t)}),ji=B(`$ZodCUID`,(e,t)=>{t.pattern??=gr,G.init(e,t)}),Mi=B(`$ZodCUID2`,(e,t)=>{t.pattern??=_r,G.init(e,t)}),Ni=B(`$ZodULID`,(e,t)=>{t.pattern??=vr,G.init(e,t)}),Pi=B(`$ZodXID`,(e,t)=>{t.pattern??=yr,G.init(e,t)}),Fi=B(`$ZodKSUID`,(e,t)=>{t.pattern??=br,G.init(e,t)}),Ii=B(`$ZodISODateTime`,(e,t)=>{t.pattern??=Hr(t),G.init(e,t)}),Li=B(`$ZodISODate`,(e,t)=>{t.pattern??=zr,G.init(e,t)}),Ri=B(`$ZodISOTime`,(e,t)=>{t.pattern??=Vr(t),G.init(e,t)}),zi=B(`$ZodISODuration`,(e,t)=>{t.pattern??=Cr,G.init(e,t)}),Bi=B(`$ZodIPv4`,(e,t)=>{t.pattern??=kr,G.init(e,t)}),Vi=/^[0-9a-fA-F:.]+$/;function Hi(e){return Vi.test(e)?xi(`http://[${e}]`):!1}var Ui=B(`$ZodIPv6`,(e,t)=>{t.pattern??=Ar,G.init(e,t),e._zod.check=n=>{Hi(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Wi=B(`$ZodCIDRv4`,(e,t)=>{t.pattern??=jr,G.init(e,t)});function Gi(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Hi(n)}var Ki=B(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Mr,G.init(e,t),e._zod.check=n=>{Gi(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function qi(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ji=/^[0-9a-zA-Z+/]*={0,2}$/,Yi=B(`$ZodBase64`,(e,t)=>{t.pattern??=Ji,G.init(e,t),e._zod.check=n=>{qi(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Xi=/^[A-Za-z0-9_-]*$/;function Zi(e){if(!Xi.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return qi(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Qi=B(`$ZodBase64URL`,(e,t)=>{t.pattern??=Xi,G.init(e,t),e._zod.check=n=>{Zi(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),$i=B(`$ZodE164`,(e,t)=>{t.pattern??=Ir,G.init(e,t)});function ea(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ta=B(`$ZodJWT`,(e,t)=>{G.init(e,t),e._zod.check=n=>{ea(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),na=B(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=Gr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ra=B(`$ZodNumberFormat`,(e,t)=>{ei.init(e,t),na.init(e,t)}),ia=B(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=Kr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),aa=B(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),oa=B(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function sa(e,t){let n=gn(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of gn(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,_n(n.issues,t,e),n}}return i(n,a)}}var ca=e=>Array.isArray(e)?e.length:-1;function la(e,t,n){e.issues.length&&t.issues.push(...mn(n,e.issues)),t.value[n]=e.value}var ua=B(`$ZodArray`,(e,t)=>{W.init(e,t);let n=V.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>la(t,r,e)));else if(la(c,r,e),s&&c.issues.length!==0&&R(c))break}return o.length?Promise.all(o).then(()=>r):r},sa(e,ca)});function da(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...mn(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var fa=[];function pa(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:fa,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=en(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ma(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(R(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>da(e,n,i,t,d,f))):da(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ha=B(`$ZodObject`,(e,t)=>{W.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Mt(()=>pa(t));z(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||P(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Kt,o=t.catchall,s,c=V.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(R(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>da(n,t,e,r,a,o))):da(s,t,e,r,a,o)}return o?ma(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ga=B(`$ZodObjectJIT`,(e,t)=>{ha.init(e,t);let n=e._zod.parse,r=Mt(()=>pa(t)),i=V.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new fi([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
4
+ let ${e}_ab = false;
5
+ for (let i = 0; i < ${e}.issues.length; i++) {
6
+ const iss = ${e}.issues[i];
7
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
8
+ payload.issues.push(iss);
9
+ if (iss.continue !== true) ${e}_ab = true;
10
+ }
11
+ if (${e}_ab && ctx && ctx.abortEarly) {
12
+ payload.value = newResult;
13
+ return payload;
14
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Ut(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
15
+ const ${n}_present = ${i};
16
+ if (!${n}.issues.length || ${n}_present) {
17
+ if (${n}.issues.length) {${c(n,r)}
18
+ }
19
+
20
+ if (${e}) {
21
+ newResult[${r}] = ${n}.value;
22
+ }
23
+ }
24
+
25
+ `)}else f?(o.write(`
26
+ if (${n}.issues.length) {${c(n,r)}
27
+ }
28
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
29
+ if (${n}.value !== undefined || ${i}) {
30
+ newResult[${r}] = ${n}.value;
31
+ }
32
+ `)):o.write(`
33
+ const ${n}_present = ${i};
34
+ if (${n}.issues.length) {${c(n,r)}
35
+ }
36
+ if (!${n}_present && !${n}.issues.length) {
37
+ payload.issues.push({
38
+ code: "invalid_type",
39
+ expected: "nonoptional",
40
+ input: undefined,
41
+ path: [${r}]
42
+ });
43
+ if (ctx && ctx.abortEarly) {
44
+ payload.value = newResult;
45
+ return payload;
46
+ }
47
+ }
48
+
49
+ if (${n}_present) {
50
+ newResult[${r}] = ${n}.value;
51
+ }
52
+
53
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Kt,c=!V.jitless,l=c&&qt.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ma([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function _a(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!R(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>vn(e,r,H())))}),t)}var va=B(`$ZodUnion`,(e,t)=>{W.init(e,t),z(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),z(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),z(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),z(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Pt(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>_a(t,r,e,i)):_a(o,r,e,i)}}),ya=B(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>xa(e,t,n)):xa(e,i,a)}});function ba(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Jt(e)&&Jt(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ba(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ba(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function xa(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ba(t.value,n.value);if(!c.valid){if(R(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Sa=B(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=V.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Jt(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>vn(e,i,H())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...mn(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...mn(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Gr.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>vn(e,i,H())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...mn(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...mn(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Ca=B(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=Ot(t.entries),r=new Set(n);e._zod.values=r,z(e,`pattern`,e=>{let t=Ot(e.def.entries).filter(e=>Xt.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Zt(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),wa=B(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,z(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Zt(e):e?Zt(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Ta=B(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,V.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Vn(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Bn;return n.value=i,n}});function Ea(e,t){return e.value=t.issues.length?void 0:t.value,e}var Da=B(`$ZodOptional`,(e,t)=>{W.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,z(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),z(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Pt(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ea(e,t)):Ea(e,r)}return t.innerType._zod.run(e,n)}}),Oa=B(`$ZodExactOptional`,(e,t)=>{Da.init(e,t),z(e,`values`,e=>e.def.innerType._zod.values),z(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ka=B(`$ZodNullable`,(e,t)=>{W.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin),z(e,`optout`,e=>e.def.innerType._zod.optout),z(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Pt(t.source)}|null)$`):void 0}),z(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Aa=B(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,z(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ja(e,t)):ja(r,t)}});function ja(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ma=B(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,z(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Na=B(`$ZodNonOptional`,(e,t)=>{W.init(e,t),z(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Pa(t,e)):Pa(i,e)}});function Pa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Fa(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>vn(e,r,H()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ia=B(`$ZodCatch`,(e,t)=>{W.init(e,t),z(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),z(e,`optout`,e=>e.def.innerType._zod.optout),z(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Fa(e,r,t,n)):Fa(e,r,t,n)}}),La=B(`$ZodPipe`,(e,t)=>{W.init(e,t),z(e,`values`,e=>e.def.in._zod.values),z(e,`optin`,e=>e.def.in._zod.optin),z(e,`optout`,e=>e.def.out._zod.optout),z(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ra(e,t.in,n)):Ra(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ra(e,t.out,n)):Ra(r,t.out,n)}});function Ra(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var za=B(`$ZodReadonly`,(e,t)=>{W.init(e,t),z(e,`propValues`,e=>e.def.innerType._zod.propValues),z(e,`values`,e=>e.def.innerType._zod.values),z(e,`optin`,e=>e.def.innerType?._zod?.optin),z(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ba):Ba(r)}});function Ba(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Va=B(`$ZodLazy`,(e,t)=>{W.init(e,t),Lt(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),z(e,`pattern`,e=>e.innerType?._zod?.pattern),z(e,`propValues`,e=>e.innerType?._zod?.propValues),z(e,`optin`,e=>e.innerType?._zod?.optin??void 0),z(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ha=B(`$ZodCustom`,(e,t)=>{U.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ua(t,n,r,e));Ua(i,n,r,e)}});function Ua(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Cn(e))}}var Wa=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ga=`~memo`,Ka=[];function qa(e){return typeof e==`object`&&!!e}function Ja(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ya=new WeakMap,Xa=0,Za=1,Qa=2;function $a(e,t,n){let r=Ya.get(e);if(r!==void 0)return r?Qa:Xa;if(t.has(e))return Qa;t.add(e);let i=Xa,a=e=>{if(i!==Qa&&e?._zod){let r=$a(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Xa;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Za:o.value?._zod?$a(o.value,t,n):Xa;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Rt(c);s(e?o(e,!0):Za),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?$a(r,t,!1):Za);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),eo(e,i)}function eo(e,t){return t!==Za&&Ya.set(e,t===Qa),t}function to(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var no,ro=[],io={alloc(e,t,n){let r=no;if(!r)return n;no=void 0;let i={value:n,issues:null};return r.set(t.value,i),ro.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&oo(n,e.value))throw new Wa;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=$a(e,new Set,!1);if(i===Xa)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Qa||r?n=!0:r=!0}let l=s.value;if(!qa(l))return t(s,c);let u=c[Ga];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ga]=u);let d;i===c?d=a:(d=to(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ja(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;no=d;let p=ro.length,m=t(s,c);no=void 0;let h=ro.length>p?ro.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ja(e.issues):Ka),e)):(h&&(h.issues=m.issues.length?Ja(m.issues):Ka),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ao(){return io}function oo(e,t){let n=e[Ga]?.backEdges;return n!==void 0&&qa(t)&&n.has(t)}var so=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Sn(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${$t(e.values[0])}`:`Invalid option: expected one of ${kt(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${kt(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function co(){return{localeError:so()}}var lo,uo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fo(){return new uo}(lo=globalThis).__zod_globalRegistry??(lo.__zod_globalRegistry=fo());var po=globalThis.__zod_globalRegistry;function mo(e){return e.checks&&=[...e.checks],e}function ho(e,t){return new e(mo({type:`string`,...L(t)}))}function go(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...L(t)})}function _o(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...L(t)})}function vo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...L(t)})}function yo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...L(t)})}function bo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...L(t)})}function xo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...L(t)})}function So(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...L(t)})}function Co(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...L(t)})}function wo(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...L(t)})}function To(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...L(t)})}function Eo(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...L(t)})}function Do(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...L(t)})}function Oo(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...L(t)})}function ko(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...L(t)})}function Ao(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...L(t)})}function jo(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...L(t)})}function Mo(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...L(t)})}function No(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...L(t)})}function Po(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...L(t)})}function Fo(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...L(t)})}function Io(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...L(t)})}function Lo(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...L(t)})}function Ro(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...L(t)})}function zo(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...L(t)})}function Bo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...L(t)})}function Vo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...L(t)})}function Ho(e,t){return new e(mo({type:`number`,checks:[],...L(t)}))}function Uo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...L(t)})}function Wo(e,t){return new e({type:`boolean`,...L(t)})}function Go(e){return new e({type:`unknown`})}function Ko(e,t){return new e({type:`never`,...L(t)})}function qo(e,t){return new Zr({check:`less_than`,...L(t),value:e,inclusive:!1})}function Jo(e,t){return new Zr({check:`less_than`,...L(t),value:e,inclusive:!0})}function Yo(e,t){return new Qr({check:`greater_than`,...L(t),value:e,inclusive:!1})}function Xo(e,t){return new Qr({check:`greater_than`,...L(t),value:e,inclusive:!0})}function Zo(e,t){return new $r({check:`multiple_of`,...L(t),value:e})}function Qo(e,t){return new ti({check:`max_length`,...L(t),maximum:e})}function $o(e,t){return new ni({check:`min_length`,...L(t),minimum:e})}function es(e,t){return new ri({check:`length_equals`,...L(t),length:e})}function ts(e,t){return new ai({check:`string_format`,format:`regex`,...L(t),pattern:e})}function ns(e){return new oi({check:`string_format`,format:`lowercase`,...L(e)})}function rs(e){return new si({check:`string_format`,format:`uppercase`,...L(e)})}function is(e,t){return new ci({check:`string_format`,format:`includes`,...L(t),includes:e})}function as(e,t){return new li({check:`string_format`,format:`starts_with`,...L(t),prefix:e})}function os(e,t){return new ui({check:`string_format`,format:`ends_with`,...L(t),suffix:e})}function ss(e){return new di({check:`overwrite`,tx:e})}function cs(e){return ss(t=>t.normalize(e))}function ls(){return ss(e=>e.trim())}function us(){return ss(e=>e.toLowerCase())}function ds(){return ss(e=>e.toUpperCase())}function fs(){return ss(e=>Wt(e))}function ps(e,t,n){return new e({type:`array`,element:t,...L(n)})}function ms(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...L(n)})}function hs(e,t){let n=gs(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Cn(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Cn(r))}},e(t.value,t)),t);return n}function gs(e,t){let n=new U({check:`custom`,...L(t)});return n._zod.check=e,n}function _s(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&P(e,t,n[t]);return e}function vs(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??po,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function K(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function q(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,q(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&_s(o.schema,c),t.io===`input`&&J(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ys(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function bs(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${ys(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+ys(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
54
+
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function xs(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;xs(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Ss=new Set([`type`,`properties`,`required`,`additionalProperties`]),Cs=[`oneOf`,`anyOf`];function ws(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ts(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Ss.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ws(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}P(n,r,e.length===1?e[0]:Ts(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ws(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Es(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Ss)if(t in e)return;let n=t.filter(e=>Cs.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ts(t);else{let e=n[0],i=Cs.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ts([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,_s(e,r))}function Ds(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):_s(i,s),_s(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())xs(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Es(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}_s(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,P(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ks(t,`input`,e.processors),output:ks(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function J(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return J(r.element,n);if(r.type===`set`)return J(r.valueType,n);if(r.type===`lazy`)return J(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return J(r.innerType,n);if(r.type===`intersection`)return J(r.left,n)||J(r.right,n);if(r.type===`record`||r.type===`map`)return J(r.keyType,n)||J(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:J(r.in,n)||J(r.out,n);if(r.type===`object`){for(let e in r.shape)if(J(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(J(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(J(e,n))return!0;return!!(r.rest&&J(r.rest,n))}return!1}var Os=(e,t={})=>n=>{let r=vs({...n,processors:t});return q(e,r),bs(r,e),Ds(r,e)},ks=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=vs({...i??{},target:a,io:t,processors:n});return q(e,o),bs(o,e),Ds(o,e)},As=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},js=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ms=(e,t)=>{As(e,`minimum`,t),js(e,`maximum`,t)},Ns=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ps=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Fs=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Is=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ls=(e,t)=>As(e,`minimum`,t.minimum),Rs=(e,t)=>js(e,`maximum`,t.maximum),zs=e=>(t,n)=>{Is(t,n.format);let[r,i]=e[n.format];As(t,`minimum`,r),js(t,`maximum`,i)},Bs={greater_than:(e,t)=>As(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>js(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ns(e,t.value),number_format:zs(tn),bigint_format:zs(nn),min_length:Ls,max_length:Rs,length_equals:(e,t)=>Ms(e,t.length),min_size:Ls,max_size:Rs,size_equals:(e,t)=>Ms(e,t.size),string_format:(e,t)=>{Is(e,t.format),t.pattern&&Ps(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Fs(e,t.mime)};function Y(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Bs[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&As(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&As(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&js(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&js(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ns(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Fs(t,i.mime);for(let e of i.patterns??[])Ps(t,e);return t}var Vs={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Hs=new Map([[Ji,Nr],[Xi,Pr]]),Us=e=>Hs.get(e)??e,Ws=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Y(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Vs[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Us);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Gs=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Y(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):K(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Ks=(e,t,n,r)=>{n.type=`boolean`},qs=(e,t,n,r)=>{K(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Js=(e,t,n,r)=>{K(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Ys=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Xs=(e,t,n,r)=>{K(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Zs=(e,t,n,r)=>{K(e,t,n,r,`Void cannot be represented in JSON Schema`)},Qs=(e,t,n,r)=>{n.not={}},$s=(e,t,n,r)=>{},ec=(e,t,n,r)=>{},tc=(e,t,n,r)=>{K(e,t,n,r,`Date cannot be represented in JSON Schema`)},nc=(e,t,n,r)=>{let i=e._zod.def,a=Ot(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},rc=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(K(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(K(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ic=(e,t,n,r)=>{K(e,t,n,r,`NaN cannot be represented in JSON Schema`)},ac=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},oc=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Y(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},sc=(e,t,n,r)=>{n.type=`boolean`},cc=(e,t,n,r)=>{K(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},lc=(e,t,n,r)=>{K(e,t,n,r,`Function types cannot be represented in JSON Schema`)},uc=(e,t,n,r)=>{K(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},dc=(e,t,n,r)=>{K(e,t,n,r,`Map cannot be represented in JSON Schema`)},fc=(e,t,n,r)=>{K(e,t,n,r,`Set cannot be represented in JSON Schema`)},pc=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Y(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=q(a.element,t,{...r,path:[...r.path,`items`]})};function mc(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?mc(t.out):t.type===`catch`?mc(t.innerType):e._zod.optin}var hc=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&K(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)P(i.properties,e,q(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?mc(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=q(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},gc=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>q(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},_c=(e,t,n,r)=>{let i=e._zod.def,a=q(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=q(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},vc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>q(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?q(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?mc(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Y(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function yc(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=yc(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>yc(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Gr:Wr).source)),p}var bc=new WeakMap;function xc(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of bc.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=yc(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Sc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Y(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=q(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)P(i.patternProperties,Us(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=q(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=bc.get(t);n||(n=[],bc.set(t,n),t.deferred.push(()=>xc(t))),n.push(e)}i.additionalProperties=q(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&mc(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Cc=(e,t,n,r)=>{let i=e._zod.def,a=q(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},wc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Tc=Symbol();function Ec(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(K(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Tc):JSON.parse(o)}var Dc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Ec(i.defaultValue,e,t,n,r);o!==Tc&&(n.default=o)},Oc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Ec(i.defaultValue,e,t,n,r);o!==Tc&&(n._prefault=o)},kc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{K(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Ac=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;q(o,t,r);let s=t.seen.get(e);s.ref=o},jc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Mc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Nc=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pc=(e,t,n,r)=>{let i=e._zod.innerType;q(i,t,r);let a=t.seen.get(e);a.ref=i},Fc={string:Ws,number:Gs,boolean:Ks,bigint:qs,symbol:Js,null:Ys,undefined:Xs,void:Zs,never:Qs,any:$s,unknown:ec,date:tc,enum:nc,literal:rc,nan:ic,template_literal:ac,file:oc,success:sc,custom:cc,function:lc,transform:uc,map:dc,set:fc,array:pc,object:hc,union:gc,intersection:_c,tuple:vc,record:Sc,nullable:Cc,nonoptional:wc,default:Dc,prefault:Oc,catch:kc,pipe:Ac,readonly:jc,promise:Mc,optional:Nc,lazy:Pc};function Ic(e,t){if(`_idmap`in e){let n=e,r=vs({...t,processors:Fc}),i={};for(let e of n._idmap.entries()){let[t,n]=e;q(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;bs(r,n),P(a,t,Ds(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=vs({...t,processors:Fc});return q(e,n),bs(n,e),Ds(n,e)}var Lc=new WeakSet([Object.prototype,Error.prototype]);function Rc(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var X=B(`ZodError`,(e,t)=>{qn.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Lc.has(n)||(Lc.add(n),Rc(n,`format`,e=>t=>Xn(e,t)),Rc(n,`flatten`,e=>t=>Yn(e,t)),Rc(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,At,2)}),Rc(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,At,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),zc=Qn(X),Bc=$n(X),Vc=er(X),Hc=nr(X),Uc=cr(X),Wc=lr(X),Gc=ur(X),Kc=dr(X),qc=fr(X),Jc=pr(X),Yc=mr(X),Xc=hr(X);function Zc(){V.localeError||H(co())}function Qc(){V.memoizer||H({memoizer:ao()})}var Z=B(`ZodType`,(e,t)=>(Zc(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(I(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Qt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(bu(e,t))},superRefine(e,t){return this.check(xu(e,t))},overwrite(e){return this.check(ss(e))},optional(){return eu(this)},exactOptional(){return nu(this)},nullable(){return iu(this)},nullish(){return eu(iu(this))},nonoptional(e){return uu(this,e)},array(){return Ll(this)},or(e){return Hl([this,e])},and(e){return Wl(this,e)},transform(e){return mu(this,Ql(e))},default(e){return ou(this,e)},prefault(e){return cu(this,e)},catch(e){return fu(this,e)},pipe(e){return mu(this,e)},readonly(){return gu(this)},describe(e){let t=this.clone();return po.add(t,{description:e}),t},meta(...e){if(e.length===0)return po.get(this);let t=this.clone();return po.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return En(this,`~standard`,{...gi(this),jsonSchema:{input:ks(this,`input`),output:ks(this,`output`)}})},set"~standard"(e){Tn(this,`~standard`,e)},parse:function e(t,n){return zc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Bc(this,t,n,{callee:e})},safeParse(e,t){return Vc(this,e,t)},async safeParseAsync(e,t){return Hc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Tn(this,`spa`,e)},validate(e,t){return ar(this,e,t)},validateAsync(e,t){return sr(this,e,t)},encode:function e(t,n){return Uc(this,t,n,{callee:e})},decode:function e(t,n){return Wc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Gc(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Kc(this,t,n,{callee:e})},safeEncode(e,t){return qc(this,e,t)},safeDecode(e,t){return Jc(this,e,t)},async safeEncodeAsync(e,t){return Yc(this,e,t)},async safeDecodeAsync(e,t){return Xc(this,e,t)},toJSONSchema(e){return Os(this,{})(e)},get description(){return po.get(this)?.description},get _def(){return this._zod.def}}),$c=B(`_ZodString`,(e,t)=>{_i.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ws(e,t,n,r)},Dn({format:e=>Y(e).format??null,minLength:e=>Y(e).minimum??null,maxLength:e=>Y(e).maximum??null},{regex(...e){return this.check(ts(...e))},includes(...e){return this.check(is(...e))},startsWith(...e){return this.check(as(...e))},endsWith(...e){return this.check(os(...e))},min(...e){return this.check($o(...e))},max(...e){return this.check(Qo(...e))},length(...e){return this.check(es(...e))},nonempty(...e){return this.check($o(1,...e))},lowercase(e){return this.check(ns(e))},uppercase(e){return this.check(rs(e))},trim(){return this.check(ls())},normalize(...e){return this.check(cs(...e))},toLowerCase(){return this.check(us())},toUpperCase(){return this.check(ds())},slugify(){return this.check(fs())}})),el=B(`ZodString`,(e,t)=>{_i.init(e,t),$c.init(e,t)},{email(e){return this.check(go(al,e))},url(e){return this.check(So(ll,e))},jwt(e){return this.check(Lo(Tl,e))},emoji(e){return this.check(Co(dl,e))},guid(e){return this.check(_o(sl,e))},uuid(e){return this.check(vo(cl,e))},uuidv4(e){return this.check(yo(cl,e))},uuidv6(e){return this.check(bo(cl,e))},uuidv7(e){return this.check(xo(cl,e))},nanoid(e){return this.check(wo(fl,e))},cuid(e){return this.check(To(pl,e))},cuid2(e){return this.check(Eo(ml,e))},ulid(e){return this.check(Do(hl,e))},base64(e){return this.check(Po(Sl,e))},base64url(e){return this.check(Fo(Cl,e))},xid(e){return this.check(Oo(gl,e))},ksuid(e){return this.check(ko(_l,e))},ipv4(e){return this.check(Ao(vl,e))},ipv6(e){return this.check(jo(yl,e))},cidrv4(e){return this.check(Mo(bl,e))},cidrv6(e){return this.check(No(xl,e))},e164(e){return this.check(Io(wl,e))},datetime(e){return this.check(Ro(tl,e))},date(e){return this.check(zo(nl,e))},time(e){return this.check(Bo(rl,e))},duration(e){return this.check(Vo(il,e))}});function Q(e){return ho(el,e)}var $=B(`ZodStringFormat`,(e,t)=>{G.init(e,t),$c.init(e,t)}),tl=B(`ZodISODateTime`,(e,t)=>{Ii.init(e,t),$.init(e,t)}),nl=B(`ZodISODate`,(e,t)=>{Li.init(e,t),$.init(e,t)}),rl=B(`ZodISOTime`,(e,t)=>{Ri.init(e,t),$.init(e,t)}),il=B(`ZodISODuration`,(e,t)=>{zi.init(e,t),$.init(e,t)}),al=B(`ZodEmail`,(e,t)=>{bi.init(e,t),$.init(e,t)});function ol(e){return go(al,e)}var sl=B(`ZodGUID`,(e,t)=>{vi.init(e,t),$.init(e,t)}),cl=B(`ZodUUID`,(e,t)=>{yi.init(e,t),$.init(e,t)}),ll=B(`ZodURL`,(e,t)=>{Oi.init(e,t),$.init(e,t)});function ul(e){return So(ll,e)}var dl=B(`ZodEmoji`,(e,t)=>{ki.init(e,t),$.init(e,t)}),fl=B(`ZodNanoID`,(e,t)=>{Ai.init(e,t),$.init(e,t)}),pl=B(`ZodCUID`,(e,t)=>{ji.init(e,t),$.init(e,t)}),ml=B(`ZodCUID2`,(e,t)=>{Mi.init(e,t),$.init(e,t)}),hl=B(`ZodULID`,(e,t)=>{Ni.init(e,t),$.init(e,t)}),gl=B(`ZodXID`,(e,t)=>{Pi.init(e,t),$.init(e,t)}),_l=B(`ZodKSUID`,(e,t)=>{Fi.init(e,t),$.init(e,t)}),vl=B(`ZodIPv4`,(e,t)=>{Bi.init(e,t),$.init(e,t)}),yl=B(`ZodIPv6`,(e,t)=>{Ui.init(e,t),$.init(e,t)}),bl=B(`ZodCIDRv4`,(e,t)=>{Wi.init(e,t),$.init(e,t)}),xl=B(`ZodCIDRv6`,(e,t)=>{Ki.init(e,t),$.init(e,t)}),Sl=B(`ZodBase64`,(e,t)=>{Yi.init(e,t),$.init(e,t)}),Cl=B(`ZodBase64URL`,(e,t)=>{Qi.init(e,t),$.init(e,t)}),wl=B(`ZodE164`,(e,t)=>{$i.init(e,t),$.init(e,t)}),Tl=B(`ZodJWT`,(e,t)=>{ta.init(e,t),$.init(e,t)}),El=B(`ZodNumber`,(e,t)=>{na.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gs(e,t,n,r),e.isFinite=!0},Dn({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Y(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Y(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Y(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Y(e).format??null},{gt(e,t){return this.check(Yo(e,t))},gte(e,t){return this.check(Xo(e,t))},min(e,t){return this.check(Xo(e,t))},lt(e,t){return this.check(qo(e,t))},lte(e,t){return this.check(Jo(e,t))},max(e,t){return this.check(Jo(e,t))},int(e){return this.check(kl(e))},safe(e){return this.check(kl(e))},positive(e){return this.check(Yo(0,e))},nonnegative(e){return this.check(Xo(0,e))},negative(e){return this.check(qo(0,e))},nonpositive(e){return this.check(Jo(0,e))},multipleOf(e,t){return this.check(Zo(e,t))},step(e,t){return this.check(Zo(e,t))},finite(){return this}}));function Dl(e){return Ho(El,e)}var Ol=B(`ZodNumberFormat`,(e,t)=>{ra.init(e,t),El.init(e,t)});function kl(e){return Uo(Ol,e)}var Al=B(`ZodBoolean`,(e,t)=>{ia.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ks(e,t,n,r)});function jl(e){return Wo(Al,e)}var Ml=B(`ZodUnknown`,(e,t)=>{aa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Nl(){return Go(Ml)}var Pl=B(`ZodNever`,(e,t)=>{oa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qs(e,t,n,r)});function Fl(e){return Ko(Pl,e)}var Il=B(`ZodArray`,(e,t)=>{Qc(),ua.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pc(e,t,n,r),e.element=t.element},{min(e,t){return this.check($o(e,t))},nonempty(e){return this.check($o(1,e))},max(e,t){return this.check(Qo(e,t))},length(e,t){return this.check(es(e,t))},unwrap(){return this.element}});function Ll(e,t){return ps(Il,e,t)}var Rl=B(`ZodObject`,(e,t)=>{Qc(),ga.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hc(e,t,n,r),Nn(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Jl(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(I(this._zod.def,{catchall:e}))},passthrough(){return this.clone(I(this._zod.def,{catchall:Nl()}))},loose(){return this.clone(I(this._zod.def,{catchall:Nl()}))},strict(){return this.clone(I(this._zod.def,{catchall:Fl()}))},strip(){return this.clone(I(this._zod.def,{catchall:void 0}))},extend(e){return sn(this,e)},safeExtend(e){return ln(this,e)},merge(e){return un(this,e)},pick(e){return rn(this,e)},omit(e){return on(this,e)},partial(...e){return dn($l,this,e[0])},exactPartial(...e){return dn(tu,this,e[0],`exactPartial`)},required(...e){return fn(lu,this,e[0])}});function zl(e,t){return new Rl({type:`object`,shape:e??{},...L(t)})}function Bl(e,t){return new Rl({type:`object`,shape:e,catchall:Fl(),...L(t)})}var Vl=B(`ZodUnion`,(e,t)=>{va.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r),e.options=t.options});function Hl(e,t){return new Vl({type:`union`,options:e,...L(t)})}var Ul=B(`ZodIntersection`,(e,t)=>{ya.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r)});function Wl(e,t){return new Ul({type:`intersection`,left:e,right:t})}var Gl=B(`ZodRecord`,(e,t)=>{Qc(),Sa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Kl(e,t,n){return!t||!t._zod?new Gl({type:`record`,keyType:Q(),valueType:e,...L(t)}):new Gl({type:`record`,keyType:e,valueType:t,...L(n)})}var ql=B(`ZodEnum`,(e,t)=>{Ca.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nc(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ql({...t,checks:[],...L(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ql({...t,checks:[],...L(r),entries:i})}});function Jl(e,t){return new ql({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...L(t)})}var Yl=B(`ZodLiteral`,(e,t)=>{wa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rc(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Xl(e,t){return new Yl({type:`literal`,values:Array.isArray(e)?e:[e],...L(t)})}var Zl=B(`ZodTransform`,(e,t)=>{Qc(),Ta.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uc(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Vn(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Cn(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Cn(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ql(e){return new Zl({type:`transform`,transform:e})}var $l=B(`ZodOptional`,(e,t)=>{Da.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function eu(e){return new $l({type:`optional`,innerType:e})}var tu=B(`ZodExactOptional`,(e,t)=>{Oa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nu(e){return new tu({type:`optional`,innerType:e})}var ru=B(`ZodNullable`,(e,t)=>{ka.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iu(e){return new ru({type:`nullable`,innerType:e})}var au=B(`ZodDefault`,(e,t)=>{Aa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ou(e,t){return new au({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Yt(t)}})}var su=B(`ZodPrefault`,(e,t)=>{Ma.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cu(e,t){return new su({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Yt(t)}})}var lu=B(`ZodNonOptional`,(e,t)=>{Na.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uu(e,t){return new lu({type:`nonoptional`,innerType:e,...L(t)})}var du=B(`ZodCatch`,(e,t)=>{Ia.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fu(e,t){return new du({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Fn(t)})}var pu=B(`ZodPipe`,(e,t)=>{La.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ac(e,t,n,r),e.in=t.in,e.out=t.out});function mu(e,t){return new pu({type:`pipe`,in:e,out:t})}var hu=B(`ZodReadonly`,(e,t)=>{za.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gu(e){return new hu({type:`readonly`,innerType:e})}var _u=B(`ZodLazy`,(e,t)=>{Va.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function vu(e){return new _u({type:`lazy`,getter:e})}var yu=B(`ZodCustom`,(e,t)=>{Ha.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cc(e,t,n,r)});function bu(e,t={}){return ms(yu,e,t)}function xu(e,t){return hs(e,t)}var Su=Q().regex(/^#[0-9a-fA-F]{6}$/,`Choose a color.`),Cu=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,wu=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,Tu=e=>[1,3,5].map(t=>Cu(parseInt(e.slice(t,t+2),16)/255));function Eu(e){let[t,n,r]=Tu(e),i=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),o=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return{L:s,C:Math.hypot(c,l),h:(Math.atan2(l,c)*180/Math.PI+360)%360}}function Du(e,t,n){let r=t*Math.cos(n*Math.PI/180),i=t*Math.sin(n*Math.PI/180),a=(e+.3963377774*r+.2158037573*i)**3,o=(e-.1055613458*r-.0638541728*i)**3,s=(e-.0894841775*r-1.291485548*i)**3;return[4.0767416621*a-3.3077115913*o+.2309699292*s,-1.2684380046*a+2.6097574011*o-.3413193965*s,-.0041960863*a-.7034186147*o+1.707614701*s]}var Ou=e=>e.every(e=>e>=-1e-4&&e<=1.0001),ku=e=>`#`+e.map(e=>Math.round(wu(Math.min(1,Math.max(0,e)))*255).toString(16).padStart(2,`0`)).join(``),Au=([e,t,n])=>.2126*e+.7152*t+.0722*n,ju=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05),Mu={dark:{L:[.7,.88],maxC:.16,ground:`#161a20`,soft:{L:.27,C:.045,step:-.01,stop:.16}},light:{L:[.4,.53],maxC:.16,ground:`#f8f9fb`,soft:{L:.955,C:.03,step:.005,stop:.995}}};function Nu(e,t,n){for(let r=t;r>0;r-=.005){let t=Du(e,r,n);if(Ou(t))return t}return Du(e,0,n)}function Pu(e,t,n,r){let i=Mu[e],a=Au(Tu(i.ground)),o=i.L[0]+t*(i.L[1]-i.L[0]),s=Nu(o,Math.min(n,i.maxC),r),c=e===`dark`?.01:-.01;for(;ju(Au(s),a)<4.5&&o>.05&&o<.98;)o+=c,s=Nu(o,Math.min(n,i.maxC),r);let l=Au(s),u=i.soft,d=Nu(u.L,Math.min(u.C,n),r);for(let t=u.L;(e===`dark`?t>=u.stop:t<=u.stop)&&(d=Nu(t,Math.min(u.C,n),r),!(ju(l,Au(d))>=4.5));t+=u.step);return{text:ku(s),soft:ku(d)}}function Fu(e){let{L:t,C:n,h:r}=Eu(Su.parse(e)),i=Math.min(1,Math.max(0,(t-.35)/.55));return{dark:Pu(`dark`,i,n,r),light:Pu(`light`,1-i,n,r)}}function Iu(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Lu=[.9,.5,.1],Ru=(e,t)=>ku(Nu(.45+t*.4,.13,e)),zu=[],Bu;function Vu(e){let{L:t,C:n,h:r}=Eu(e);return[t,n*Math.cos(r*Math.PI/180),n*Math.sin(r*Math.PI/180)]}function Hu(e){if(!Bu){Bu=[];for(let e=0;e<360;e+=4)for(let t of Lu){let n=Ru(e,t),r=Fu(n);Bu.push({h:e,level:Lu.indexOf(t),hex:n,dark:Vu(r.dark.text),light:Vu(r.light.text)})}zu.push(Bu.reduce((e,t)=>Math.abs(t.h-256)+t.level<Math.abs(e.h-256)+e.level?t:e))}for(;zu.length<=e;){let e=null,t=-1;for(let n of Bu){let r=1/0;for(let e of zu)r=Math.min(r,Math.hypot(n.dark[0]-e.dark[0],n.dark[1]-e.dark[1],n.dark[2]-e.dark[2]),Math.hypot(n.light[0]-e.light[0],n.light[1]-e.light[1],n.light[2]-e.light[2]));r>t&&([e,t]=[n,r])}zu.push(e)}return zu[e].hex}function Uu(e){if(typeof e==`number`)return Hu(Math.max(0,Math.trunc(e)-1));let t=Iu(String(e).trim().toLowerCase());return Ru(t%360,Lu[Math.floor(t/360)%Lu.length])}function Wu({color:e,seed:t}){let n=e&&Su.safeParse(e).success?e:t!=null&&t!==``?Uu(t):null;if(!n)return``;let r=Fu(n);return`--cat-d: ${r.dark.text}; --cat-soft-d: ${r.dark.soft}; --cat-l: ${r.light.text}; --cat-soft-l: ${r.light.soft};`}var Gu=i(`<span><!></span>`);function Ku(e,r){se(r,!0);let i=k(r,`tone`,3,`neutral`),o=k(r,`fill`,3,!1),s=k(r,`dot`,3,!1),c=_(()=>Wu({color:r.color,seed:r.seed}));var d=n(),f=u(d),m=e=>{var t=Gu(),n=h(t);C(n,()=>r.children??S),w(t),a(()=>{ee(t,1,ce([`sd-badge`,`sd-cat`,o()&&`sd-badge-fill`,s()&&`sd-badge-dot`])),ne(t,p(c))}),l(e,t)},g=e=>{var t=Gu(),n=h(t);C(n,()=>r.children??S),w(t),a(()=>ee(t,1,ce([`sd-badge`,i()!==`neutral`&&`sd-badge-${i()}`,s()&&`sd-badge-dot`]))),l(e,t)};t(f,e=>{p(c)?e(m):e(g,-1)}),l(e,d),ae()}var qu=`Name a repo: org/repo, or a GitHub URL to one.`,Ju=/^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$/,Yu=/^[A-Za-z0-9._-]{1,100}$/;function Xu(e){let[t,n,...r]=e.split(`/`);return!r.length&&Ju.test(t)&&n!==void 0&&Yu.test(n)&&!/^\.+$/.test(n)&&!/\.git$/i.test(n)}var Zu=Q().refine(Xu,qu);function Qu(e,t){let n=e.indexOf(t);return n<0?[``,e]:[e.slice(0,n),e.slice(n+1)]}function $u(e){let t=e.trim().replace(/^git\+/,``),n=t.match(/^[\w.-]+@github\.com(?:-[\w.-]+)?:(.+)$/i);if(n)t=n[1];else{let e=t.match(/^(?:(?:https?|ssh|git):\/\/)?(?:[\w.-]+@)?(?:www\.)?github\.com(?:-[\w.-]+)?(?::\d+)?\/(.+)$/i);if(e)t=e[1];else if(/^[a-z][a-z0-9+.-]*:/i.test(t))return null}let[r,i]=t.split(/[?#]/,1)[0].split(`/`);if(!r||!i)return null;let a=`${r}/${i.replace(/\.git$/i,``)}`;return Xu(a)?a:null}function ed(e,t){return Q().trim().min(1,`${e} is empty.`).max(t,`${e} is at most ${t} characters.`).regex(/^[^\r\n]*$/,`${e} is one line.`)}var td=ul({protocol:/^https$/,error:`A link is an https URL.`});Q().regex(/^[0-9a-f]{7,40}$/,`A commit is its hash: 7 to 40 lowercase hexadecimal digits.`);var nd=[`bug`,`feature`,`task`,`chore`],rd=`A slug is 1 to 40 lowercase letters, digits, or dashes, such as fix-login.`,id=/^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$/,ad=Q().regex(id,rd);function od(e){let[t,n]=Qu(e,`#`);return Xu(t)&&id.test(n)}Q().refine(od,{error:e=>`'${String(e.input)}' is not an issue, org/repo#slug`});var sd=ed(`A title`,120);Ll(Q().refine(Xu,`Name each follower repo as org/repo.`)).max(8,`An issue names at most 8 follower repos.`).refine(e=>new Set(e.map(e=>e.toLowerCase())).size===e.length,`Name each follower repo once.`),Bl({label:ed(`A label`,80).describe(`what it links to, such as Jira ticket WEB-142 or Confluence plan`),url:td.describe(`its https URL`)});var cd=i(`<!> <!> <!>`,1),ld=i(`<div class="dialog-form"><!> <div class="form-note" role="status"> </div></div>`),ud=i(`<div class="dialog-host"><!></div>`);function dd(t,n){se(n,!0);let r=k(n,`danger`,3,!1),i=k(n,`disabled`,3,!1),o=k(n,`note`,3,``),c=k(n,`size`,3,`md`),d=k(n,`open`,15,!1);var f=ud();Ne(h(f),{get title(){return n.title},get description(){return n.sub},get icon(){return n.icon},get size(){return c()},onsubmit:()=>n.onsubmit(),get open(){return d()},set open(e){d(e)},footer:e=>{var t=cd(),o=u(t);pe(o,{variant:`quiet`,cancel:!0,get"data-close"(){return n.id},onclick:()=>d(!1),children:(e,t)=>{D();var n=M(`Cancel`);l(e,n)},$$slots:{default:!0}});var c=x(o,2);C(c,()=>n.extra??S);var f=x(c,2);{let e=_(()=>r()?`danger`:`primary`);pe(f,{get variant(){return p(e)},type:`submit`,get"data-form"(){return n.form},get disabled(){return i()},children:(e,t)=>{D();var r=M();a(()=>s(r,n.action)),l(e,r)},$$slots:{default:!0}})}l(e,t)},children:(t,r)=>{var i=ld(),c=h(i);C(c,()=>n.children);var u=x(c,2),d=e(u,!0);w(i),a(()=>{A(i,`id`,n.form),A(u,`id`,`${n.form??``}-note`),s(d,o())}),l(t,i)},$$slots:{footer:!0,default:!0}}),w(f),a(()=>A(f,`id`,n.id)),l(t,f),ae()}var fd=`A document's name is 1 to 40 lowercase letters, digits, or dashes, such as store-design.`,pd=/^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$/,md=`allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms allow-modals allow-downloads`;Q().regex(pd,fd);var hd=i(`<div class="row-line body-sm sub" data-test="doc-versions"><span>Versions</span> <!></div>`),gd=i(`<span data-test="doc-plan-state"><!></span> <!>`,1),_d=i(`<p class="body"> <span class="mono-sm" data-test="doc-ask-type"> </span> as you:</p> <pre class="mono-sm doc-ask-body" data-test="doc-ask-body"> </pre>`,1),vd=i(`<div class="content-stack doc-view" data-view="doc"><div class="page-head"><div class="titles"><div class="title-row"><h1 class="title"> </h1> <span data-test="doc-live"><!></span></div> <div class="row-line body-sm sub"><a class="mono-sm"> </a> <!> <span> </span></div> <p class="body-sm sub" data-test="doc-meta">by <span class="mono-sm"><!></span> <span class="mono-sm"> </span> </p> <!></div> <div class="actions"><!> <!></div></div> <iframe class="doc-frame"></iframe></div> <!>`,1);function yd(r,i){se(i,!0);let o=k(i,`standalone`,3,!1),d=dt(),f=`coordinator-doc/1`,ee=[`message`,`issue_comment`,`issue_plan`],g=_(()=>i.i.plans.find(e=>e.link===i.d.path)),v=O(null),y=_(()=>p(v)!==null&&i.d.versions.includes(p(v))?p(v):i.d.version),b=_(()=>i.d.frame.replace(/\/\d+\/index\.html$/,`/${p(y)}/index.html`)),ne=_(()=>!!p(g)?.approved_at&&p(g).approved_version!==null&&p(g).approved_version!==i.d.version),S=O(void 0),re=!1,C=O(null),T=O(!1),oe=O(``),ce=_(()=>{let e=d.st,t=i.i.holder?e.sessions[e.slots[i.i.holder]]:void 0;return{document:{address:i.d.address,name:i.d.name,title:i.d.title,version:i.d.version,shown:p(y),versions:i.d.versions,by:i.d.by,updated_at:i.d.updated_at,link:i.d.link},repo:i.i.repo,issue:{address:i.i.address,title:i.i.title,type:i.i.type,state:i.i.state,holder:i.i.holder,plans:i.i.plans.map(({name:e,link:t,approved_at:n,approved_version:r})=>({name:e,link:t,approved_at:n,approved_version:r}))},slot:t?{slot:i.i.holder,stage:t.stage,status:t.status,state:t.state}:null,live:d.live}}),j=e=>p(S)?.contentWindow?.postMessage({protocol:f,...e},`*`),ue={src:``,at:``};m(()=>{let e={src:p(b),at:i.d.updated_at};p(S)&&e.src===ue.src&&e.at!==ue.at&&p(y)===i.d.version&&(E(T,!1),p(S).src=p(b)),ue=e}),m(()=>{let e=te(p(ce));re&&j({op:`change`,context:e})}),c(()=>{let e=e=>{if(!p(S)||e.source!==p(S).contentWindow)return;let t=e.data;if(t&&t.protocol===f){if(t.op===`context`)j({id:t.id,result:te(p(ce))});else if(t.op===`watch`)re=!0,j({op:`change`,context:te(p(ce))});else if(t.op===`act`){let e=t.body&&typeof t.body==`object`?t.body:{};ee.includes(t.type)?t.type!==`message`&&e.issue!==i.i.address?j({id:t.id,error:`a document acts only on its own issue, ${i.i.address}`}):p(C)?j({id:t.id,error:`the user is still answering another request`}):(E(C,{id:t.id,type:t.type,body:e},!0),E(oe,``),E(T,!0)):j({id:t.id,error:`a document may ask to send only ${ee.join(`, `)}`})}}};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)}),m(()=>{!p(T)&&p(C)&&(j({id:p(C).id,error:`the user declined`}),E(C,null))});async function de(){let e=p(C),t=await d.act({type:e.type,body:e.body});if(t.error)return E(oe,t.error,!0),!1;j({id:e.id,result:t}),E(C,null)}var fe=vd(),me=u(fe),he=h(me),ge=h(he),_e=h(ge),ve=h(_e),ye=e(ve,!0),be=x(ve,2),xe=h(be);{let e=_(()=>d.live?`success`:`warning`);Ku(xe,{get tone(){return p(e)},dot:!0,children:(e,t)=>{D();var n=M();a(()=>s(n,d.live?`Live`:`Offline`)),l(e,n)},$$slots:{default:!0}})}w(be),w(_e);var Se=x(_e,2),Ce=h(Se),we=e(Ce,!0),Te=x(Ce,2);Ku(Te,{get tone(){return Fe[i.i.state].tone},children:(e,t)=>{D();var n=M();a(()=>s(n,Fe[i.i.state].label)),l(e,n)},$$slots:{default:!0}});var Ee=x(Te,2),De=e(Ee,!0);w(Se);var Oe=x(Se,2),ke=x(h(Oe));Dt(h(ke),{get slot(){return i.d.by}}),w(ke);var Ae=x(ke);Ae.nodeValue=` · `;var je=x(Ae),Me=e(je,!0),Ne=x(je);w(Oe);var Pe=x(Oe,2),Ie=e=>{var t=hd(),n=x(h(t),2);le(n,16,()=>i.d.versions,e=>e,(e,t)=>{{let n=_(()=>t===p(y)?`secondary`:`quiet`);pe(e,{get variant(){return p(n)},size:`sm`,get"data-doc-version"(){return t},onclick:()=>E(v,t,!0),children:(e,n)=>{D();var r=M();a(()=>s(r,t)),l(e,r)},$$slots:{default:!0}})}}),w(t),l(e,t)};t(Pe,e=>{i.d.versions.length>1&&e(Ie)}),w(ge);var Le=x(ge,2),Re=h(Le),ze=e=>{var n=gd(),r=u(n),o=h(r);{let e=_(()=>p(g).approved_at&&!p(ne)?`success`:`warning`);Ku(o,{get tone(){return p(e)},children:(e,t)=>{D();var n=M();a(()=>s(n,p(g).approved_at?p(ne)?`Approved version ${p(g).approved_version}, now ${i.d.version}`:`Plan approved`:`Plan not approved yet`)),l(e,n)},$$slots:{default:!0}})}w(r);var c=x(r,2),f=e=>{pe(e,{variant:`primary`,get"data-approve-plan"(){return p(g).link},onclick:()=>d.act({type:`issue_plan`,body:{issue:i.i.address,link:p(g).link,approved:!0}}),get icon(){return Ct},children:(e,t)=>{D();var n=M(`Approve plan`);l(e,n)},$$slots:{default:!0}})};t(c,e=>{(!p(g).approved_at||p(ne))&&i.i.state!==`closed`&&e(f)}),l(e,n)};t(Re,e=>{p(g)&&e(ze)});var Be=x(Re,2),Ve=e=>{pe(e,{variant:`secondary`,get"data-doc-open"(){return i.d.address},onclick:()=>window.open(i.d.link,`_blank`,`noopener`),get icon(){return Tt},children:(e,t)=>{D();var n=M(`Open in new tab`);l(e,n)},$$slots:{default:!0}})};t(Be,e=>{o()||e(Ve)}),w(Le),w(he);var He=x(he,2);ie(He,e=>E(S,e),()=>p(S)),w(me),dd(x(me,2),{id:`doc-ask`,form:`doc-ask-form`,title:`This document asks to act as you`,sub:`It is sent only if you choose Send.`,icon:`shield`,action:`Send`,get note(){return p(oe)},onsubmit:de,get open(){return p(T)},set open(e){E(T,e,!0)},children:(r,o)=>{var c=n(),d=u(c),f=t=>{var n=_d(),r=u(n),o=h(r),c=x(o),d=e(c,!0);D(),w(r);var f=x(r,2),m=e(f,!0);a(e=>{s(o,`${i.d.title??``} asks to send `),s(d,p(C).type),s(m,e)},[()=>JSON.stringify(p(C).body,null,2)]),l(t,n)};t(d,e=>{p(C)&&e(f)}),l(r,c)},$$slots:{default:!0}}),a((e,t)=>{A(me,`data-doc`,i.d.address),s(ye,i.d.title),A(Ce,`href`,e),s(we,i.i.address),s(De,i.i.title),s(Me,i.d.name),s(Ne,` · version ${p(y)??``}${p(y)===i.d.version?``:` of ${i.d.version}`} · updated ${t??``}`),A(He,`title`,i.d.title),A(He,`src`,p(b)),A(He,`sandbox`,md)},[()=>Ze(i.i.address),()=>ot(i.d.updated_at)]),l(r,fe),ae()}export{nt as $,xt as A,ze as B,Bl as C,Dt as D,Ic as E,Le as F,Ke as G,$e as H,Fe as I,Ve as J,N as K,Pe as L,ut as M,dt as N,Tt as O,Re as P,Xe as Q,Ie as R,Kl as S,Hl as T,We as U,Be as V,qe as W,et as X,Ge as Y,Qe as Z,ol as _,ad as a,at,Dl as b,Zu as c,Ne as ct,Qu as d,tt as et,Ku as f,jl as g,Ll as h,sd as i,He as it,lt as j,Ct as k,Xu as l,Ce as lt,Jl as m,dd as n,rt as nt,Ju as o,Ue as ot,Wu as p,Ze as q,nd as r,Je as rt,qu as s,Ye as st,yd as t,it as tt,$u as u,ye as ut,vu as v,Q as w,zl as x,Xl as y,ot as z};
56
+ //# sourceMappingURL=C8qZab0y.js.map
@@ -0,0 +1,4 @@
1
+ import{A as e,D as t,F as n,G as r,I as i,J as a,M as o,N as s,O as c,P as l,Q as u,S as d,U as f,W as p,Z as m,at as h,et as g,gt as _,i as v,j as y,lt as b,mt as x,nt as S,rt as C,t as ee,ut as te,z as ne}from"./BgFr_EyZ.js";import{a as w,c as T,i as E,l as re,m as ie,n as ae,o as oe,r as se,s as ce,t as le}from"./DLT1iIlz.js";import{payload as ue}from"../entry/payload.DSmR2FwN.js";var de=class{constructor(e){this.status=e.status,this.body=e}toString(){return JSON.stringify(this.body)}},fe=class extends de{},pe=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},me=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`a://`);function he(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function ge(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function _e({href:e}){return e.split(`#`)[0]}function ve(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}function ye(e,t){let n=[];return e&&n.push([...new Headers(e)].join(`,`)),t&&n.push(t),ve(...n)}new TextEncoder,new TextDecoder;function be(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var xe=2**32-1,Se=xe-1,D=class extends Error{constructor(e,t,n,r){super(e),this.name=`DevalueError`,this.path=t.join(``),this.value=n,this.root=r}},Ce=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function we(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getPrototypeOf(t)===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Ce}function Te(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ee(e){return typeof Buffer<`u`&&Buffer.isBuffer(e)}function De(e){switch(e){case`"`:return`\\"`;case`<`:return`\\u003C`;case`\\`:return`\\\\`;case`
2
+ `:return`\\n`;case`\r`:return`\\r`;case` `:return`\\t`;case`\b`:return`\\b`;case`\f`:return`\\f`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return e<` `?`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`:``}}function O(e){let t=``,n=0,r=e.length;for(let i=0;i<r;i+=1){let r=e[i],a=De(r);a&&(t+=e.slice(n,i)+a,n=i+1)}return`"${n===0?e:t+e.slice(n)}"`}function Oe(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)}var ke=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Ae(e){return ke.test(e)?`.`+e:`[`+JSON.stringify(e)+`]`}function je(e){return!(!Number.isInteger(e)||e<0||e>Se)}function Me(e){return!(!Number.isInteger(e)||e<0||e>xe)}function Ne(e){if(e.length===0||e.length>1&&e.charCodeAt(0)===48)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return je(+e)}function Pe(e){for(var t=e.length-1;t>=0&&!Ne(e[t]);t--);return t+1}function Fe(e){let t=Object.keys(e);return t.length=Pe(t),t}function Ie(e){return new Uint8Array(e).toBase64()}function Le(e){return Uint8Array.fromBase64(e).buffer}function Re(e){return Buffer.from(e).toString(`base64`)}function ze(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function Be(e){let t=new Uint8Array(e),n=``,r=32768;for(let e=0;e<t.length;e+=r){let i=t.subarray(e,e+r);n+=String.fromCharCode.apply(null,i)}return btoa(n)}function Ve(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var He=typeof Uint8Array.fromBase64==`function`,Ue=typeof process==`object`&&process.versions?.node!==void 0,We=He?Ie:Ue?Re:Be,Ge=He?Le:Ue?ze:Ve;function Ke(e,t){if(!t)return e;let n={};for(let r of Object.keys(e))n[r]=t[r]??e[r];return n}var qe=Object.freeze({kind:`not-plain`}),Je=Object.freeze({kind:`symbol-keys`}),Ye=Object.freeze({identify:e=>e,typeOf:e=>e===null?`null`:typeof e,toPrimitive:e=>e,tagOf:e=>Te(e),isThenable:e=>typeof e.then==`function`,toPromise:e=>Promise.resolve(e),unbox:e=>e.valueOf(),toISOString:e=>isNaN(e.getDate())?``:e.toISOString(),toStringValue:e=>e.toString(),regExpInfo:e=>({source:e.source,flags:e.flags}),valuesOf:e=>e,entriesOf:e=>e,viewInfo:e=>(Ee(e)&&(e=new Uint8Array(e)),{buffer:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength,length:e.length,bufferByteLength:e.buffer.byteLength}),toArrayBuffer:e=>e,lengthOf:e=>e.length,hasOwn:(e,t)=>Object.hasOwn(e,t),indicesOf:e=>Fe(e),shapeOf:e=>we(e)?Oe(e).length>0?Je:{kind:Object.getPrototypeOf(e)===null?`null-proto`:`plain`,keys:Object.keys(e)}:qe,get:(e,t)=>e[t]}),Xe=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,`byteLength`).get,Ze=typeof SharedArrayBuffer>`u`?void 0:Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,`byteLength`).get,Qe=Object.freeze({fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e===`URL`?new URL(t):e===`URLSearchParams`?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,n,r)=>{try{Xe.call(t)}catch(e){if(!Ze)throw e;Ze.call(t)}let i=globalThis[e];return n===void 0?new i(t):new i(t,n,r)},box:e=>Object(e),createArray:e=>Array(e),createSparseArray:e=>{let t=[];return t[Se]=void 0,delete t[Se],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,n)=>{e[t]=n},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,n)=>{e.set(t,n)}});function $e(e,t,n){return et(JSON.parse(e),t,n)}function et(e,t,n){let r=Ke(Qe,n?.operations);if(typeof e==`number`)return s(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let i=e,a=Array(i.length),o=null;function s(e,n=!1){if(e===-1)return r.fromPrimitive(void 0);if(e===-3)return r.fromPrimitive(NaN);if(e===-4)return r.fromPrimitive(1/0);if(e===-5)return r.fromPrimitive(-1/0);if(e===-6)return r.fromPrimitive(-0);if(n||typeof e!=`number`)throw Error(`Invalid input`);if(e in a)return a[e];if(e>=i.length)throw Error(`Invalid input`);let c=i[e];if(!c||typeof c!=`object`)a[e]=r.fromPrimitive(c);else if(Array.isArray(c)){if(typeof c[0]==`string`){let n=c[0],l=t&&Object.hasOwn(t,n)?t[n]:void 0;if(l){let t=c[1];if(typeof t!=`number`&&(t=i.push(c[1])-1),Object.hasOwn(a,t))return a[e]=l(a[t]);if(o??=new Set,o.has(t))throw Error(`Invalid circular reference`);return o.add(t),a[e]=l(s(t)),o.delete(t),a[e]}switch(n){case`Date`:a[e]=r.fromISOString(c[1]);break;case`Set`:let t=r.createSet();a[e]=t;for(let e=1;e<c.length;e+=1)r.addValue(t,s(c[e]));break;case`Map`:let o=r.createMap();a[e]=o;for(let e=1;e<c.length;e+=2)r.addEntry(o,s(c[e]),s(c[e+1]));break;case`RegExp`:a[e]=r.fromRegExpInfo(c[1],c[2]);break;case`Object`:{let t=c[1];if(typeof i[t]==`object`&&i[t][0]!==`BigInt`)throw Error(`Invalid input`);a[e]=r.box(s(t));break}case`BigInt`:a[e]=r.fromPrimitive(BigInt(c[1]));break;case`null`:let l=r.createNullPrototypeObject();a[e]=l;for(let e=1;e<c.length;e+=2){let t=c[e];if(typeof t!=`string`)throw Error(`Cannot parse an object with a non-string key`);if(t===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(l,t,s(c[e+1]))}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(i[c[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=s(c[1]);a[e]=r.fromViewInfo(n,t,c[2],c[3]);break}case`ArrayBuffer`:{let t=c[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);a[e]=r.fromArrayBuffer(Ge(t));break}case`URL`:case`URLSearchParams`:case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:a[e]=r.fromStringValue(n,c[1]);break;default:throw Error(`Unknown type ${n}`)}}else if(c[0]===-7){let t=c[1];if(!Me(t))throw Error(`Invalid input`);let n=r.createSparseArray(t);a[e]=n;for(let e=2;e<c.length;e+=2){let i=c[e];if(!je(i)||i>=t)throw Error(`Invalid input`);r.set(n,i,s(c[e+1]))}}else{let t=r.createArray(c.length);a[e]=t;for(let e=0;e<c.length;e+=1){let n=c[e];n!==-2&&r.set(t,e,s(n))}}}else{let t=r.createObject();a[e]=t;for(let e of Object.keys(c)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(t,e,s(c[e]))}}return a[e]}return s(0)}function tt(e,t,n){let r=nt(!1,e,t,n);return typeof r==`string`?r:`[${r.join(`,`)}]`}function nt(e,t,n,r){let i=Ke(Ye,r?.operations),a=[],o=new Map,s=[];if(n)for(let e of Object.getOwnPropertyNames(n))s.push({key:e,fn:n[e]});let c=[],l=0;function u(n,r){let d=i.typeOf(n);if(d===`undefined`)return-1;let f;if(d===`number`){if(f=i.toPrimitive(n),Number.isNaN(f))return-3;if(f===1/0)return-4;if(f===-1/0)return-5;if(f===0&&1/f<0)return-6}let p=i.identify(n);if(o.has(p))return o.get(p);r??=l++,o.set(p,r);for(let{key:e,fn:t}of s){let i=t(n);if(i)return a[r]=`["${e}",${u(i)}]`,r}if(d===`function`)throw new D(`Cannot stringify a function`,c,n,t);if(d===`symbol`)throw new D(`Cannot stringify a Symbol primitive`,c,n,t);let m=``;if(d!==`object`)m=rt(d===`number`?f:i.toPrimitive(n));else if(i.isThenable(n)){if(!e)throw new D(`Cannot stringify a Promise or thenable — use stringifyAsync instead`,c,n,t);m=i.toPromise(n).then(e=>{let t=u(e,r);t<0&&(a[r]=t)}),m.catch(()=>{})}else{let e=i.tagOf(n);switch(e){case`Number`:case`String`:case`Boolean`:case`BigInt`:m=`["Object",${u(i.unbox(n))}]`;break;case`Date`:m=`["Date","${i.toISOString(n)}"]`;break;case`URL`:m=`["URL",${O(i.toStringValue(n))}]`;break;case`URLSearchParams`:m=`["URLSearchParams",${O(i.toStringValue(n))}]`;break;case`RegExp`:let{source:r,flags:a}=i.regExpInfo(n);m=a?`["RegExp",${O(r)},"${a}"]`:`["RegExp",${O(r)}]`;break;case`Array`:{let e=!1,t=i.lengthOf(n);m=`[`;for(let r=0;r<t;r+=1)if(r>0&&(m+=`,`),i.hasOwn(n,r))c.push(`[${r}]`),m+=u(i.get(n,r)),c.pop();else if(e)m+=-2;else{let r=i.indicesOf(n),a=r.length,o=String(t).length;if((t-a)*3>4+o+a*(o+1)){m=`[-7,`+t;for(let e=0;e<r.length;e++){let t=r[e];c.push(`[${t}]`),m+=`,`+t+`,`+u(i.get(n,t)),c.pop()}break}e=!0,m+=-2}m+=`]`;break}case`Set`:m=`["Set"`;for(let e of i.valuesOf(n))m+=`,${u(e)}`;m+=`]`;break;case`Map`:m=`["Map"`;for(let[e,t]of i.entriesOf(n)){let n=i.typeOf(e),r=n!==`object`&&n!==`function`&&n!==`symbol`;c.push(`.get(${r?rt(i.toPrimitive(e)):`...`})`),m+=`,${u(e)},${u(t)}`,c.pop()}m+=`]`;break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:{let t=i.viewInfo(n);m=`["`+e+`",`+u(t.buffer),t.byteLength!==t.bufferByteLength&&(m+=`,${t.byteOffset},${t.length}`),m+=`]`;break}case`DataView`:{let t=i.viewInfo(n);m=`["`+e+`",`+u(t.buffer),t.byteLength!==t.bufferByteLength&&(m+=`,${t.byteOffset},${t.byteLength}`),m+=`]`;break}case`ArrayBuffer`:m=`["ArrayBuffer","${We(i.toArrayBuffer(n))}"]`;break;case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:m=`["${e}",${O(i.toStringValue(n))}]`;break;default:{let e=i.shapeOf(n);if(e.kind===`not-plain`)throw new D(`Cannot stringify arbitrary non-POJOs`,c,n,t);if(e.kind===`symbol-keys`)throw new D(`Cannot stringify POJOs with symbolic keys`,c,n,t);if(e.kind===`null-proto`){m=`["null"`;for(let r of e.keys){if(r===`__proto__`)throw new D(`Cannot stringify objects with __proto__ keys`,c,n,t);c.push(Ae(r)),m+=`,${O(r)},${u(i.get(n,r))}`,c.pop()}m+=`]`}else{m=`{`;let r=!1;for(let a of e.keys){if(a===`__proto__`)throw new D(`Cannot stringify objects with __proto__ keys`,c,n,t);r&&(m+=`,`),r=!0,c.push(Ae(a)),m+=`${O(a)}:${u(i.get(n,a))}`,c.pop()}m+=`}`}}}}return a[r]=m,r}let d=u(t);return d<0?`${d}`:a}function rt(e){let t=typeof e;return t===`string`?O(e):e===void 0?`-1`:e===0&&1/e<0?`-6`:t===`bigint`?`["BigInt","${e}"]`:String(e)}var it=()=>{throw Error(``)},k=()=>{throw Error(``)},at={},ot={};function st(e){let t=Object.entries(e);t.length,at=Object.fromEntries(t.map(([e,t])=>[e,t.encode])),ot=Object.fromEntries(t.map(([e,t])=>[e,t.decode])),it=e=>tt(e,at),k=e=>$e(e,ot)}function ct(e,t){return e.origin===t.origin?e.href.slice(t.origin.length):e.href}var lt=`x-sveltekit-invalidated`,ut=`x-sveltekit-trailing-slash`;function dt(e,t){return e+`/`+t}var ft=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&ht(e),ft(e,t));var A=new Map;function pt(e,t){let n=_t(e,t);if(n){let e=document.querySelector(n);if(e?.textContent){e.remove();let{body:t,...r}=JSON.parse(e.textContent);e.getAttribute(`data-b64`)!==null&&(t=be(t));let i=e.getAttribute(`data-ttl`);return i&&A.set(n,{body:t,init:r,ttl:1e3*Number(i)}),Promise.resolve(new Response(t,r))}}return window.fetch(e,t)}function mt(e,t,n){if(A.size>0){let t=_t(e,n),r=t&&A.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);A.delete(t)}}return window.fetch(t,n)}function ht(e){let t=_t(gt(e));for(let e of A.keys())e.startsWith(t)&&A.delete(e)}function gt(e){return ct(new URL(e instanceof Request?e.url:e,location.href),location)}function _t(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=t.body;if(e&&typeof e!=`string`&&!ArrayBuffer.isView(e))return null;n+=`[data-hash="${ye(t.headers,e)}"]`}return n}function vt({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ce(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function yt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function bt(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var xt=`sveltekit:snapshot`,St=`sveltekit:navigation-snapshot`,Ct=`sveltekit:history-info`,wt=`sveltekit:metadata`,j={tap:1,hover:2,viewport:3,eager:4,false:-1},Tt=location.origin;function Et(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function Dt(){return{x:pageXOffset,y:pageYOffset}}function Ot(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var kt={...j,"":j.hover};function At(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function jt(e,t){for(;e&&e!==t;){if((e instanceof HTMLAnchorElement||e instanceof SVGAElement)&&e.hasAttribute(`href`))return e;e=At(e)}}function Mt(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||Pt(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Tt&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Nt(e){let t=null,n=null,r=null,i=null,a=null,o=e;for(;o&&o!==document.documentElement;)t===null&&(t=Ot(o,`preload-code`)),n===null&&(n=Ot(o,`preload-data`)),r===null&&(r=Ot(o,`reload`)),i===null&&(i=Ot(o,`replacestate`)),a===null&&(a=Ot(o,`reset`)),o=At(o);function s(e){switch(e){case``:case`true`:return!0;case`false`:return!1;default:return}}return{preload_code:kt[t??`false`],preload_data:kt[n??`false`],reload:s(r),replace_state:s(i),reset:s(a)??!0}}function Pt(e,t,n){return e.origin!==Tt||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Ft(e,t){let n=t?e.hash.split(`#`,3)[2]??``:e.hash.slice(1);return n?document.getElementById(decodeURIComponent(n)):null}function It(e){}function Lt(e){let t=document.activeElement;e&&(t instanceof HTMLElement||t instanceof SVGElement)&&t!==document.body&&t.blur()}function Rt(e){let t=e.getAttribute(`tabindex`);e.setAttribute(`tabindex`,`-1`),e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}function zt(e){let t=window.parent===window||document.hasFocus(),n=document.querySelector(`[autofocus]`);if(n)t&&n.focus();else{t&&Rt(Ft(e,!1)??document.body);let n=getSelection();if(n&&n.type!==`None`){let e=[];for(let t=0;t<n.rangeCount;t+=1)e.push(n.getRangeAt(t));setTimeout(()=>{if(n.rangeCount===e.length){for(let t=0;t<n.rangeCount;t+=1){let r=e[t],i=n.getRangeAt(t);if(r.commonAncestorContainer!==i.commonAncestorContainer||r.startContainer!==i.startContainer||r.endContainer!==i.endContainer||r.startOffset!==i.startOffset||r.endOffset!==i.endOffset)return}n.removeAllRanges()}})}}}var Bt=!0;function Vt(e,t,n){if(t&&Bt){if(n)scrollTo(n.x,n.y);else{let t=Ft(e,!1);t?t.scrollIntoView():scrollTo(0,0)}}Bt=!0}function Ht(e){throw Error(`https://svelte.dev/e/kit/redirect_loop`)}function Ut(e){throw Error(`https://svelte.dev/e/kit/reserved_query_parameter`)}var M=yt(`sveltekit:navigation-snapshot`)??{},Wt=new Set;function Gt(){return new Set(Wt)}function Kt(e){Wt.size===0?delete M[e]:M[e]=Object.fromEntries(Array.from(Wt,({id:e,capture:t})=>[e,it(t())]))}function qt(e,t){let n=M[e];for(let e of Wt)n&&Object.hasOwn(n,e.id)?e.restore(k(n[e.id])):t?.has(e)&&e.reset?.()}function Jt(e){delete M[e]}function Yt(e){Kt(e),bt(St,M)}var Xt=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Xt],[...new Set([...Xt])];function N(){}var Zt=`/__data.json`,Qt=`.html__data.json`;function $t(e){return e.endsWith(`.html`)?e.replace(/\.html$/,Qt):e.replace(/\/$/,``)+Zt}async function*en(e,t,n){let r=!1,i=[],a=``,o=new TextDecoder(void 0,n),s=t.length-1;for(;!r;){let n=await e.read();r=n.done;let c=a;n.value&&(c+=o.decode(n.value,{stream:!0})),r&&(c+=o.decode());let l=0,u=c.indexOf(t);for(;u!==-1;)i.length>0?(i.push(c.slice(l,u)),yield i.join(``),i=[]):yield c.slice(l,u),l=u+t.length,u=c.indexOf(t,l);let d=Math.max(l,c.length-s);d>l&&i.push(c.slice(l,d)),a=c.slice(d)}(i.length>0||a)&&(yield i.join(``)+a)}async function*tn(e){for await(let t of en(e,`
3
+ `,{fatal:!0})){let e=t.trim();e&&(yield JSON.parse(e))}}var nn=i(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),rn=i(`<!> <!>`,1);function an(e,r){te(r,!0);let i=(e,a=_,o=_)=>{let p=(e,t=_)=>{var r=n(),i=u(r);d(i,()=>f(g),(e,n)=>{n(e,{get error(){return t()}})}),l(e,r)},m=h(()=>a().component),g=h(()=>a().error),y=h(()=>a().data);var b=n(),x=u(b);s(x,{get failed(){return f(g)?p:void 0},get onerror(){return f(g)?r.onerror:void 0}},e=>{var s=n(),p=u(s),h=e=>{var t=n(),s=u(t);d(s,()=>f(m),(e,t)=>{v(t(e,{get data(){return f(y)},get form(){return r.form},get params(){return r.page.params},children:(e,t)=>{i(e,()=>a().child,()=>o()+1)},$$slots:{default:!0}}),e=>c()[o()]=e,()=>c()?.[o()])}),l(e,t)},g=e=>{var t=n(),i=u(t);d(i,()=>f(m),(e,t)=>{v(t(e,{get data(){return f(y)},get form(){return r.form},get params(){return r.page.params},get error(){return r.error}}),e=>c()[o()]=e,()=>c()?.[o()])}),l(e,t)};t(p,e=>{a().child?e(h):e(g,-1)}),l(e,s)}),l(e,b)},c=ee(r,`components`,7),p=C(!1),y=C(!1),w=C(``);fr(()=>{f(p)?(S(y,!0),S(w,document.title||`untitled page`,!0)):S(p,!0)});var T=rn(),E=u(T);i(E,()=>r.tree,()=>0);var re=g(E,2),ie=e=>{var n=nn(),r=m(n),i=e=>{var t=ne();a(()=>o(t,f(w))),l(e,t)};t(r,e=>{f(y)&&e(i)}),x(n),l(e,n)};t(re,e=>{f(p)&&e(ie)}),l(e,T),b()}var on=class{#e;get form(){return f(this.#e)}set form(e){S(this.#e,e)}#t;get error(){return f(this.#t)}set error(e){S(this.#t,e)}page;components=[];tree;onerror;constructor({page:e,tree:t,form:n,error:r,onerror:i=N}){this.page=e,this.tree=t,this.onerror=i,this.#e=C(n),this.#t=C(r)}},sn=class{component;error;#e=C({});get data(){return f(this.#e)}set data(e){S(this.#e,e)}#t=C();get child(){return f(this.#t)}set child(e){S(this.#t,e)}constructor(e,t){this.component=e,this.error=t}};function cn(e,t,n){let r=[void 0],i=-1;for(let a=1;a<e.length;a+=1){if(!e[a])continue;let o=a-1;for(;o>i+1&&t[o]==null;)--o;i=o;let s=t[o];r.push(s==null?void 0:n(s)?.catch(()=>void 0))}return Promise.all(r)}function*ln(e,t,n){for(;e--;){let r=n[e];if(r!=null){let n=e;for(;!t[n];)--n;yield{error:r,idx:n+1}}}}var un=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),P=new Set,F=yt(`sveltekit:history-info`)??{},I=yt(`sveltekit:snapshot`)??{},L;function dn(e){F[e].scroll=Dt()}function fn(e,t){F[e]={...F[e],resetIndex:t.resetIndex}}function pn(e,t){Jt(e);let n=e+1;for(;F[n];)delete F[n],Jt(n),n+=1;for(n=t+1;I[n];)delete I[n],n+=1}function R(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(N)}async function mn(){try{if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(T||`/`);e&&await e.update()}}catch{}}var hn,gn,_n,z,vn,B,yn={},bn={},xn=[],V=null;function Sn(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var Cn=new Map,wn=new Set,Tn=new Set,H=new Set,U={branch:[],error:null,url:null,nav:null},En=!1,Dn=!1,W=!1,G=null,On=!1,kn=!1,K,q,J;function Y(e=history.state){return e?.[wt]}var X,An,jn=new Set,Mn=new Map,Nn=new Map;re(async e=>{typeof e==`string`&&(e=new URL(e,location.href));let t=await Z(e,!1);return t?{id:t.route.id,params:t.params}:null}),Promise.resolve();function Pn(e,t,n){return In(e,t,n)}function*Fn(e){for(let[t,n]of e)for(let[e,r]of n)yield[dt(t,e),r]}async function In(e,t,n){if(ue.data){let{q:e={},p:t={},l:n={},f:r={}}=ue.data;for(let t in e)yn[t]=e[t];for(let e in n)yn[e]=n[e];for(let e in r)yn[e]=r[e];for(let e in t)bn[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,st(B.hooks.transport??{}),await e.hooks.init?.(),hn=vt(e),z=document.documentElement,vn=t,gn=e.nodes[0],_n=e.nodes[1];let[r]=await Promise.all([gn(),_n()]),i=new sn(r.component,void 0);L=new on({page:ae,tree:i,form:void 0,error:void 0,onerror:(e,t)=>P.add(t)});let a=Y();K=a?.historyIndex??0,q=a?.navigationIndex??0,J=a?.resetIndex??0,K||(K=q=J=Date.now(),history.replaceState({...history.state,[wt]:{historyIndex:K,navigationIndex:q,state:it({}),persistState:!1,resetIndex:K}},``)),fn(K,Y());let o=F[K]?.scroll;function s(){o&&(history.scrollRestoration=`manual`,scrollTo(o.x,o.y))}n?(s(),await hr(vn,n)):(await or({type:`enter`,url:Et(B.hash?br(new URL(location.href)):location.href),replace_state:!0,state:a?.persistState?k(a.state):{},persist_state:a?.persistState??!1}),s()),mr()}function Ln(){xn.length=0,kn=!1}function Rn(e){L.components.some(e=>e?.snapshot)&&(I[e]=L.components.map(e=>e?.snapshot?.capture()))}function zn(e){I[e]?.forEach((e,t)=>{L.components[t]?.snapshot?.restore(e)})}function Bn(){dn(K),bt(Ct,F),Rn(q),bt(xt,I),Yt(K)}async function Vn(e,t={},n=0,i={},a){let o,s;t.refreshAll&&Sn(),await or({type:t.type??`goto`,url:Et(e),reset:t.reset,replace_state:t.replace,state:t.state,persist_state:t.persistState,event:t.event,action_result:t.action_result,redirect_count:n,nav_token:i,intent:a,accept:()=>{if(t.refreshAll){kn=!0,o=new Set;for(let[e,t]of Fn(Mn))t.resource?.reset(),o.add(e);s=new Set;for(let[e]of Fn(Nn))s.add(e)}t.invalidate&&t.invalidate.forEach(pr)}}),t.refreshAll&&r().then(r).then(()=>{for(let[e,{resource:t}]of Fn(Mn))o?.has(e)&&t.start();for(let[e,{resource:t}]of Fn(Nn))s?.has(e)&&t.reconnect()})}async function Hn(e){if(e.id!==V?.id){Sn();let t={};jn.add(t),V={id:e.id,token:t,promise:Qn({...e,preload:t}).finally(()=>{jn.delete(t)}),fork:null},V.promise.catch(Sn)}return V.promise}async function Un(e){await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(([,e])=>e()))}async function Wn(e){let t=(await Z(e,!1))?.route;t&&await Un(t)}async function Gn(t,n,r){let i={params:U.params,route:{id:U.route?.id??null},url:new URL(location.href)};if(U={...t.state,nav:i},xr(t),(r?e:y)(an,{target:n,props:L,transformError:async e=>{let t=await $(e,U.nav);return E({error:t,status:t.status}),t}}),await Promise.resolve(),r){let e={from:null,to:{...i,scroll:F[K]?.scroll??Dt()},willUnload:!1,type:`enter`,shallow:!1,complete:Promise.resolve()};H.forEach(t=>t(e))}zn(q),En&&qt(K),Dn=!0}async function Kn({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(T&&(e.pathname===T||e.pathname===T+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=he(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{page:{...ae},tree:{}}};a&&(l.props.error=a),s!==void 0&&(l.props.form=s);let u={},d=!ae,f=r&&await cn(n,r,e=>e().then(e=>e.component)),p=l.props.tree,m=1,h=L.tree;for(let e=0;e<n.length;e+=1){let t=n[e],r=U.branch[e];if(t&&(d||!h||t?.data!==r?.data?(p.data={...u,...t.data},d=!0):p.data=h.data,u=p.data,e<n.length-1)){let t=e+1;for(;t<n.length&&!n[t];)t+=1;let r=n[t];r&&(p=p.child=new sn(r.node.component,f?.[m++]),h=h?.child)}}return(!U.url||e.href!==U.url.href||U.error!==a||s!==void 0&&s!==ae.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},shallow:null,status:i??a?.status??200,url:new URL(e),form:s??null,data:u}),l}async function qn({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function Jn(e,t,n){let r=new URL(e instanceof Request?e.url:e,n),i=ct(r,n);return{resolved:r,promise:Dn?mt(i,r.href,t):pt(i,t)}}function Yn(e,t,n,r,i,a){if(kn)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==U.params[e])return!0;for(let e of i.dependencies)if(xn.some(t=>t(new URL(e))))return!0;return!1}function Xn(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Zn(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r).sort(),a=t.searchParams.getAll(r).sort();i.length===a.length&&i.every((e,t)=>e===a[t])&&n.delete(r)}return n}async function Qn({id:e,invalidating:t,url:n,params:r,route:i,preload:a,action_result:o}){if(!o&&V?.id===e)return jn.delete(V.token),V.promise;let{errors:s,layouts:c,leaf:l}=i,u=[...c,l],d=u.length-1,f=o?.type===`error`;s.forEach(e=>e?.().catch(N)),u.forEach(e=>e?.[1]().catch(N));let p=null,m=U.url?e!==ir(U.url):!1,h=!U.route||i.id!==U.route.id,g=Zn(U.url,n),_=!1;{let t=u.map((e,t)=>{if(f&&t===d)return!1;let n=U.branch[t],i=!!e?.[0]&&(n?.loader!==e[1]||Yn(_,h,m,g,n.server?.uses,r));return i&&(_=!0),i});if(t.some(Boolean)){try{p=await gr(n,t)}catch(t){let o=await $(t,{url:n,params:r,route:{id:e}});if(a&&jn.has(a))throw o;return tr({error:o,url:n,route:i})}if(p.type===`redirect`)return p}}let v=p?.nodes,y=!1,b=u.map(async(e,t)=>{if(!e||f&&t===d)return;let a=U.branch[t],o=v?.[t];if((!o||o.type===`skip`)&&e[1]===a?.loader&&!Yn(y,h,m,g,a.universal?.uses,r))return a;if(y=!0,o?.type===`error`)throw new fe(o.error);return qn({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await b[n])?.data);return e},server_data_node:Xn(o===void 0&&e[0]?{type:`skip`}:o??null,e[0]?a?.server:void 0)})});for(let e of b)e.catch(N);let x=[];for(let e=0;e<u.length;e+=1)if(u[e])try{x.push(await b[e])}catch(t){if(t instanceof pe)return{type:`redirect`,status:t.status,location:t.location};if(a&&jn.has(a))throw await $(t,{params:r,url:n,route:{id:i.id}});let o;if(v?.includes(t))o=t.error;else if(t instanceof de)o=await $(t,{params:r,url:n,route:{id:i.id}});else{if(await w.check())return await mn(),await R(n);o=await $(t,{params:r,url:n,route:{id:i.id}})}return er({i:e,branch:x,errors:s,error:o,url:n,params:r,route:i})}else x.push(void 0);return o?.type===`error`?er({i:u.length,branch:x,errors:s,error:o.error,status:o.status,url:n,params:r,route:i}):Kn({url:n,params:r,branch:x,errors:s,error:null,route:i,status:o?.status,form:o?.type===`success`||o?.type===`failure`?o.data??null:t?void 0:null})}async function $n(e,t,n){for(let{error:r,idx:i}of ln(e,t,n))try{return t.slice(0,i).concat({node:await r(),loader:r,data:{},server:null,universal:null})}catch{continue}}async function er({i:e,branch:t,errors:n,error:r,status:i,url:a,params:o,route:s}){let c=await $n(e,t,n);return c?Kn({url:a,params:o,branch:c,errors:n,error:r,status:i,route:s}):lr(a,{id:s.id},r)}async function tr({error:e,url:t,route:n}){let r={},i=null;if(B.server_loads[0]===0)try{let e=await gr(t,[!0]);if(e.type!==`data`||e.nodes[0]&&e.nodes[0].type!==`data`)throw 0;i=e.nodes[0]??null}catch(e){if(!(e instanceof de&&e.status===404)&&(t.origin!==Tt||t.pathname!==location.pathname||En))return await R(t)}try{return Kn({url:t,params:r,branch:[await qn({loader:gn,url:t,params:r,route:n,parent:()=>Promise.resolve({}),server_data_node:Xn(i)}),{node:await _n(),loader:_n,universal:null,server:null,data:null}],error:e,errors:[],route:null})}catch(e){if(e instanceof pe){await Vn(new URL(e.location,location.href));return}let i=await B.get_error_template(),a=await $(e,{url:t,params:r,route:n}),o=String(a?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),s=i({status:a.status,message:o}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),e}}async function nr(e){let t=e.href;if(Cn.has(t))return Cn.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Jn(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);B.hash?n.hash=t:n.pathname=t,t=n}return t})();Cn.set(t,r),n=await r}catch{Cn.delete(t);return}return n}async function Z(e,t){if(e&&!Pt(e,T,B.hash)){let n=await nr(e);if(!n)return;let r=rr(n);for(let n of hn){let i=n.exec(r);if(i)return{id:ir(e),invalidating:t,route:n,params:i,url:e}}}}function rr(e){return ge(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(T.length))||`/`}function ir(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function ar({url:e,type:t,intent:n,delta:r,event:i,scroll:a,shallow:o=!1,target:s}){let c=!1,l=yr(U,n,e,t,a??null,o,s);l.navigation.type===`popstate`&&r!==void 0&&(l.navigation.delta=r),i!==void 0&&(l.navigation.event=i);let u={...l.navigation,cancel:()=>{c=!0,l.reject(Error(`navigation cancelled`))}};return W||wn.forEach(e=>e(u)),c?null:l}async function or({type:e,url:t,popped:n,reset:r=!0,replace_state:i,state:a={},persist_state:o=!1,redirect_count:s=0,nav_token:c={},accept:l=N,block:u=N,event:d,intent:f,action_result:m}){let h=X,g=An;X=An=c,f??=await Z(t,!1);let _=e===`enter`?yr(U,f,t,e):ar({url:t,type:e,delta:n?.delta,intent:f,scroll:n?.scroll,shallow:!!n?.shallow,target:n?.shallow??void 0,event:d});if(!_){u(),X===c&&(X=h),An===c&&(An=g);return}let v=K,y=q,b=Gt();l(),W=!0,Dn&&_.navigation.type!==`enter`&&se(_.navigation);let x=f&&await Qn({...f,action_result:m});if(!x){let e=Pt(t,T,B.hash),n=e&&!1;if(e&&!n)return await R(t,i);x=await lr(t,{id:null},await $(new me(404,`Not Found`,`Not found: ${t.pathname}${n?` (did you forget the hash?)`:``}`),{url:t,params:{},route:{id:null}}),i)}if(t=f?.url||t,X!==c){_.reject(Error(`navigation aborted`));return}if(!x)return;if(x.type===`redirect`){if(s<20){V?.id===f?.id&&Sn(),await or({type:e,url:new URL(x.location,t),popped:n,reset:r,replace_state:i,state:a,persist_state:o,redirect_count:s+1,nav_token:c}),_.fulfil(void 0);return}if(x=await tr({error:await $(ie(()=>Ht({url:t.href})),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!x)return}else if(x.props.page.status>=400&&await w.check())return await mn(),await R(t,i);if(Ln(),Dn&&!n&&(dn(v),Rn(y),i?Jt(v):Kt(v)),x.props.page.url.pathname!==t.pathname&&(t.pathname=x.props.page.url.pathname),n)a=n.state;else{let n=it(a);a=k(n);let s=+!i;e!==`enter`&&r&&(J+=1);let c={[wt]:{historyIndex:K+=s,navigationIndex:q+=s,state:n,persistState:o,resetIndex:J}};(i?history.replaceState:history.pushState).call(history,c,``,t),fn(K,c[wt]),i||pn(K,q)}let S=f&&V?.id===f.id?V.fork:null;V?.fork&&!S?Sn():(V=null,Q={element:void 0,href:void 0}),x.props.page.state=a,x.props.page.shallow=n?.shallow??null;let C;if(Dn){await sr(_.navigation);let e=n?.shallow?{params:x.state.params,route:{id:x.state.route?.id??null},url:x.state.url}:_.navigation.to;U={...x.state,nav:{params:e.params,route:e.route,url:e.url}},x.props.page&&(x.props.page.url=t),Lt(r);let i=S&&await S;if(i){C=i.commit();for(let e of P)e();P.clear()}else xr(x),C=p().then(()=>{for(let e of P)e();P.clear()});On=!0}else await Gn(x,vn,!1);await cr(_,c,t,n?.scroll,r,C)&&(e===`popstate`&&zn(q),qt(K,b),se(null))}async function sr(e){let t=(await Promise.all(Array.from(Tn,t=>t(e)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>H.delete(e))}t.push(e),t.forEach(e=>H.add(e))}}async function cr(e,t,n,r,i,a){return await a,X===t?(Vt(n,i,r),i&&document.activeElement===document.body&&zt(n),W=!1,e.fulfil(void 0),e.navigation.to&&(e.navigation.to.scroll=Dt()),H.forEach(t=>t(e.navigation)),!0):(e.reject(Error(`navigation aborted`)),!1)}async function lr(e,t,n,r){return e.origin===Tt&&e.pathname===location.pathname&&!En?await tr({error:n,url:e,route:t}):await R(e,r)}var Q={element:void 0,href:void 0};function ur(){let e,t,n;function r(){clearTimeout(e),t?.removeEventListener(`mousemove`,i),t?.removeEventListener(`mouseleave`,r),t=void 0}function i(){clearTimeout(e),e=setTimeout(()=>{t&&s(t,j.hover)},20)}z.addEventListener(`mouseover`,e=>{if(!(e.target instanceof Element))return;let n=jt(e.target,z);if(!n||n===t)return;r(),t=n;let a=Nt(n);a.preload_code<j.hover&&a.preload_data<j.hover||(n.addEventListener(`mousemove`,i),n.addEventListener(`mouseleave`,r,{once:!0}),i())});function a(e){if(e.defaultPrevented)return;let t=jt(e.composedPath()[0],z);t&&s(t,j.tap)}z.addEventListener(`mousedown`,a),z.addEventListener(`touchstart`,a,{passive:!0});let o=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(Wn(new URL(t.target.href)),o.unobserve(t.target))},{threshold:0});async function s(e,t){let r=e===Q.element&&e?.href===Q.href&&t>=n;if(!e||r)return;let{url:i,external:a,download:o}=Mt(e,T,B.hash);if(a||o)return;let s=Nt(e),c=i&&ir(U.url)===ir(i);if(!(s.reload||c)){if(t<=s.preload_data){Q={element:e,href:e.href},n=j.tap;let t=await Z(i,!1);if(!t)return;Hn(t).catch(N)}else t<=s.preload_code&&(Q={element:e,href:e.href},n=t,Wn(i))}}function c(){o.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:r}=Mt(e,T,B.hash);if(n||r)continue;let i=Nt(e);i.reload||(i.preload_code===j.viewport&&o.observe(e),i.preload_code===j.eager&&Wn(t))}}H.add(c),c()}async function $(e,t){if(e instanceof fe)return e.body;let n;n=e instanceof de?{kind:`app`,error:e.body}:e instanceof me?{kind:`framework`,error:{status:e.status,message:e.text}}:{kind:`unknown`,error:e};let r=n.kind===`unknown`?{status:500,message:`Internal Error`}:n.error,i={...n,event:t},a=await B.hooks.handleError(i);return{...r,...a}}function dr(e,t){c(()=>(e.add(t),()=>{e.delete(t)}))}function fr(e){dr(H,e)}function pr(e){if(typeof e==`function`)xn.push(e);else{let{href:t}=new URL(e,location.href);xn.push(e=>e.href===t)}}function mr(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(Bn(),!W){let e=yr(U,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};wn.forEach(e=>e(n))}t&&(e.preventDefault(),e.returnValue=``)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?Bn():w.check()}),addEventListener(`focus`,()=>{w.check()}),navigator.connection?.saveData||ur(),z.addEventListener(`click`,async t=>{if(t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=jt(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=Mt(n,T,B.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Nt(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(B.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===_e(location);if(i||s.reload&&(!u||!l)){ar({url:r,type:`link`,event:t})?W=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=U.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(G={...Y(),resetIndex:J+ +!!s.reset},dn(K),e(r),!s.replace_state)return;G=null}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)});let d=r.href!==location.href;await Vn(r,{type:`link`,reset:s.reset,replace:s.replace_state??!d,refreshAll:!d,event:t})}),z.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(Pt(r,T,!1))return;let i=e.target,a=Nt(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),or({type:`form`,url:r,reset:a.reset,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{let n=Y(t.state);if(n?.historyIndex){let r=n.historyIndex,i=F[K];if(r===K)return;X=An={};let a=r-K,o=n.resetIndex,s=o!==(i?.resetIndex??J),c=F[r]?.scroll,l=k(n.state),u=new URL(n.pageUrl??location.href),d=n.navigationIndex,f=U.url&&(location.href+U.url.href).includes(`#`)?_e(location)===_e(U.url):!1,p=d===q&&(On&&(n.pageUrl===void 0||n.pageUrl===location.href)||f),m=n.pageUrl?new URL(location.href):null,h=K,g=q,_=J;dn(h),p||Rn(g),Kt(h),K=r,q=d,J=o;let v=X,y=m?await Z(m,!1):void 0;if(X!==v)return;let b=m?{params:y?.params??null,route:y?{id:y.route.id}:null,url:m}:null;if(p){Lt(s),E({state:l,shallow:b}),e(u),s&&c&&scrollTo(c.x,c.y),qt(K,Gt()),W=!1,se(null);return}await or({type:`popstate`,url:u,reset:s,popped:{state:l,scroll:c,delta:a,shallow:b},block:()=>{K=h,q=g,J=_,history.go(-a)},nav_token:v,event:t})}else G||(e(new URL(location.href)),B.hash&&location.reload())}),addEventListener(`hashchange`,()=>{if(G){let e=G;G=null,J=e.resetIndex,history.replaceState({...history.state,[wt]:{...e,historyIndex:++K,navigationIndex:q}},``,location.href),fn(K,e)}});for(let e of document.querySelectorAll(`link`))un.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{if(e.persisted){se(null);let e=F[K]?.scroll;e&&scrollTo(e.x,e.y)}});function e(e){U.url=e,E({url:e})}}async function hr(e,{status:t,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){En=!0;let l=new URL(location.href),u;({params:i={},route:a={id:null}}=await Z(l,!1)||{}),u=hn.find(({id:e})=>e===a.id);let d,f=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=vr(r.uses)),qn({loader:B.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Xn(r)})}),o=await Promise.all(e);if(u){let e=u.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}d=await Kn({url:l,params:i,branch:o,status:t,error:n,errors:u?.errors,form:c,route:u??null})}catch(t){if(t instanceof pe)return await R(new URL(t.location,location.href));d=await tr({error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,f=!1}if(d){if(d.props.page){let e=Y();d.props.page.state=e?.persistState?k(e.state):{}}await Gn(d,e,f)}}async function gr(e,t){for(let t of e.searchParams.keys())t.startsWith(`x-sveltekit-`)&&Ut({key:t});let n=new URL(e);n.pathname=$t(e.pathname),e.pathname.endsWith(`/`)&&n.searchParams.append(ut,`1`),n.searchParams.append(lt,t.map(e=>e?`1`:`0`).join(``));let r=await(0,window.fetch)(n.href,{});if(le(r.headers.get(`x-sveltekit-version`)),!r.ok){let e={status:r.status,message:`Internal Error`};throw r.headers.get(`content-type`)?.includes(`application/json`)?e={status:r.status,...await r.json()}:r.status===404&&(e.message=`Not Found`),new fe(e)}return new Promise((e,t)=>{_r(e,r).catch(t)})}async function _r(e,t){let n=t.body.getReader(),r=new Map;function i(e){return et(e,{...B.decoders,Promise:e=>new Promise((t,n)=>{r.set(e,{fulfil:t,reject:n})})})}for await(let t of tn(n)){if(t.type===`redirect`)return e(t);if(t.type===`data`)t.nodes?.forEach(e=>{e?.type===`data`&&(e.uses=vr(e.uses),e.data=i(e.data))}),e(t);else if(t.type===`chunk`){let{id:e,data:n,error:a}=t,o=r.get(e);r.delete(e),a?o.reject(i(a)):o.fulfil(i(n))}}}function vr(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}function yr(e,t,n,r,i=null,a=!1,o){let s,c,l=new Promise((e,t)=>{s=e,c=t});return l.catch(N),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:Dt()},to:n&&{params:o?o.params:t?.params??null,route:{id:o?o.route?.id??null:t?.route?.id??null},url:o?.url??n,scroll:i},willUnload:!a&&!t,type:r,shallow:a,complete:l},fulfil:s,reject:c}}function br(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function xr(e){E(e.props.page),L.tree.data=e.props.tree.data,L.tree.child=e.props.tree.child,`form`in e.props&&(L.form=e.props.form),`error`in e.props&&(L.error=e.props.error)}export{It as load_css,Pn as start};
4
+ //# sourceMappingURL=C90fLsA5.js.map
@@ -0,0 +1 @@
1
+ var e=function(e,t){return new URL(e,t).href},t={},n=function(e){return e.pathname.endsWith(`.css`)},r=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},i=function(i,a,o){let s=Promise.resolve();if(a&&a.length>0){let i,c=document.querySelector(`meta[property=csp-nonce]`),l=c?.nonce||c?.getAttribute(`nonce`);function u(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}s=u(a.map(a=>{a=e(a,o);let s=d(a),c=n(s);return r(t,s.href,()=>{if(i===void 0){i={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];i.all.add(n.href),n.rel===`stylesheet`&&i.styles.add(n.href)}}if((c?i.styles:i.all).has(s.href))return;let e=document.createElement(`link`);if(e.rel=c?`stylesheet`:`modulepreload`,c||(e.as=`script`),e.crossOrigin=``,e.href=s.href,l&&e.setAttribute(`nonce`,l),document.head.appendChild(e),c)return new Promise((t,n)=>{e.addEventListener(`load`,t),e.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${s}`)))})})}).filter(e=>e!==void 0))}function c(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return s.then(e=>{for(let t of e||[])t.status===`rejected`&&c(t.reason);return i().catch(c)})};export{i as t};
@@ -0,0 +1,2 @@
1
+ import{K as e,U as t,nt as n,rt as r}from"./BgFr_EyZ.js";import{payload as i}from"../entry/payload.DSmR2FwN.js";var a=`font-weight: bold`,o=`font-weight: normal`;function s(e,t,n){let r=Error(`${e}\n${t}\nhttps://svelte.dev/e/kit/${e}`);throw r.name=`SvelteKit error`,Error.captureStackTrace?.(r,n),r}function c(e){try{e()}catch(e){return e}}function l(e){throw Error(`https://svelte.dev/e/kit/invalid_export`)}function u(e){throw Error(`https://svelte.dev/e/kit/invalid_export_location`)}function d(e){throw Error(`https://svelte.dev/e/kit/param_matcher_async`)}function f(e){throw Error(`https://svelte.dev/e/kit/param_matcher_result_invalid`)}function p(e){throw Error(`https://svelte.dev/e/kit/router_hash_page_options`)}var m=i.base??``,h=i.assets??m??``;function g(e){}function _(e){return e.replace(/[.*+?^${}()|[\]\\]/g,e=>`\\`+e)}var v=/^(\[)?(\.\.\.)?([\w-]+)(?:=([\w-]+))?(\])?$/,y=/^\/\((?:[^)]+)\)$/,b=/\[([ux])\+([^\]]+)\]/;function x(e){return String.fromCodePoint(...e.split(`-`).map(e=>parseInt(e,16)))}function S(e){let t=[];return{pattern:e===`/`||y.test(e)?/^\/$/:RegExp(`^${w(e).map(e=>{let n=/^\[\.\.\.([\w-]+)(?:=([\w-]+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[([\w-]+)(?:=([\w-]+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`)||e.startsWith(`u+`))return O(x(e.slice(2)));let[,r,a,o,s]=v.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return O(e)}).join(``)}).join(``)}/?$`),params:t}}function C(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function w(e){return e.slice(1).split(`/`).filter(C)}function T(e,t){let n=e[`~standard`].validate(t);if(n instanceof Promise&&d(),n.issues)return{success:!1};let r=n.value;return typeof r!=`string`&&typeof r!=`number`&&typeof r!=`boolean`&&typeof r!=`bigint`&&f(),{success:!0,value:r}}function E(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}let l=decodeURIComponent(c);if(s.matcher){let e=T(n[s.matcher],l);if(!e.success){if(s.optional&&s.chained){o++;continue}return}r[s.name]=e.value}else r[s.name]=l;let u=t[e+1],d=i[e+1];u&&!u.rest&&u.optional&&d&&s.chained&&(o=0),!u&&!d&&Object.keys(r).length===a.length&&(o=0)}if(!o)return r}var D={"%":`%25`,"/":`%2[Ff]`,"?":`%3[Ff]`,"#":`%23`};function O(e){return e.normalize().split(/([%/?#])/).map((e,t)=>t%2?D[e]:_(e)).join(``)}RegExp(`${b.source}|\\[(\\[)?(\\.\\.\\.)?([\\w-]+?)(?:=([\\w-]+))?\\]\\]?`,`g`);var k=i.version,A=new class{#e=r({});get data(){return t(this.#e)}set data(e){n(this.#e,e)}#t=r(null);get form(){return t(this.#t)}set form(e){n(this.#t,e)}#n=r(null);get error(){return t(this.#n)}set error(e){n(this.#n,e)}#r=r({});get params(){return t(this.#r)}set params(e){n(this.#r,e)}#i=r({id:null});get route(){return t(this.#i)}set route(e){n(this.#i,e)}#a=r(null);get shallow(){return t(this.#a)}set shallow(e){n(this.#a,e)}#o=r({});get state(){return t(this.#o)}set state(e){n(this.#o,e)}#s=r(-1);get status(){return t(this.#s)}set status(e){n(this.#s,e)}#c=r(new URL(`a:`));get url(){return t(this.#c)}set url(e){n(this.#c,e)}};function j(e){Object.assign(A,e)}var M={get data(){return A.data},get error(){return A.error},get form(){return A.form},get params(){return A.params},get route(){return A.route},get shallow(){return A.shallow},get state(){return A.state},get status(){return A.status},get url(){return A.url}},N=r(null);function P(e){n(N,e)}var F=36e5,I,L,R=r(!1),z={get current(){return t(R)},async check(){return window.clearTimeout(I),t(R)?Promise.resolve(!0):L??=(async()=>{try{let e=await fetch(`${h}/_app/version.json`,{headers:{"cache-control":`no-cache`}});if(!e.ok)return!1;let r=await e.json();return n(R,t(R)||r.version!==k)}catch{return!1}finally{L=void 0,t(R)||(I=window.setTimeout(z.check,F))}})()}};F&&(I=window.setTimeout(z.check,F));function B(r){r&&e(()=>n(R,t(R)||r!==k))}export{z as a,m as c,u as d,p as f,s as g,o as h,j as i,g as l,c as m,M as n,E as o,a as p,P as r,S as s,B as t,l as u};
2
+ //# sourceMappingURL=DLT1iIlz.js.map
@@ -0,0 +1,2 @@
1
+ var e={"refresh-cw":`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,shuffle:`<path d="m18 14 4 4-4 4" /> <path d="m18 2 4 4-4 4" /> <path d="M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22" /> <path d="M2 6h1.972a4 4 0 0 1 3.4 1.9l.4.6" /> <path d="M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45" />`,"grip-vertical":`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,folder:`<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />`,file:`<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" /> <path d="M14 2v4a2 2 0 0 0 2 2h4" />`,"arrow-up":`<path d="m5 12 7-7 7 7" /> <path d="M12 19V5" />`,house:`<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /> <path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />`,"key-round":`<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" /> <circle cx="16.5" cy="7.5" r=".5" fill="currentColor" />`,"monitor-smartphone":`<path d="M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" /> <path d="M10 19v-3.96 3.15" /> <path d="M7 19h5" /> <rect width="6" height="10" x="16" y="12" rx="2" />`,settings:`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> <circle cx="12" cy="12" r="3" />`,users:`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /> <circle cx="9" cy="7" r="4" /> <path d="M22 21v-2a4 4 0 0 0-3-3.87" /> <path d="M16 3.13a4 4 0 0 1 0 7.75" />`,activity:`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />`,box:`<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /> <path d="m3.3 7 8.7 5 8.7-5" /> <path d="M12 22V12" />`,copy:`<rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,eye:`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /> <circle cx="12" cy="12" r="3" />`,"eye-off":`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /> <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /> <path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /> <path d="m2 2 20 20" />`,check:`<path d="M20 6 9 17l-5-5" />`,plus:`<path d="M5 12h14" /> <path d="M12 5v14" />`,pencil:`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" />`,"chevron-right":`<path d="m9 18 6-6-6-6" />`,search:`<circle cx="11" cy="11" r="8" /> <path d="m21 21-4.3-4.3" />`,"log-out":`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /> <polyline points="16 17 21 12 16 7" /> <line x1="21" x2="9" y1="12" y2="12" />`,link:`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /> <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />`,webhook:`<path d="M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2" /> <path d="m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06" /> <path d="m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8" />`,"shield-check":`<path 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" /> <path d="m9 12 2 2 4-4" />`,terminal:`<polyline points="4 17 10 11 4 5" /> <line x1="12" x2="20" y1="19" y2="19" />`,"trash-2":`<path d="M3 6h18" /> <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /> <path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /> <line x1="10" x2="10" y1="11" y2="17" /> <line x1="14" x2="14" y1="11" y2="17" />`,x:`<path d="M18 6 6 18" /> <path d="m6 6 12 12" />`,"settings-2":`<path d="M20 7h-9" /> <path d="M14 17H5" /> <circle cx="17" cy="17" r="3" /> <circle cx="7" cy="7" r="3" />`,"rotate-ccw":`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" />`,cpu:`<rect width="16" height="16" x="4" y="4" rx="2" /> <rect width="6" height="6" x="9" y="9" rx="1" /> <path d="M15 2v2" /> <path d="M15 20v2" /> <path d="M2 15h2" /> <path d="M2 9h2" /> <path d="M20 15h2" /> <path d="M20 9h2" /> <path d="M9 2v2" /> <path d="M9 20v2" />`,globe:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,bell:`<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" /> <path d="M10.3 21a1.94 1.94 0 0 0 3.4 0" />`,"chevron-down":`<path d="m6 9 6 6 6-6" />`,"circle-help":`<circle cx="12" cy="12" r="10" /> <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /> <path d="M12 17h.01" />`},t=new Map;function n(e){for(let[n,r]of Object.entries(e))t.set(n,r)}var r=new Set;function i(n){if(typeof n!=`string`)return n?{component:n}:null;let i=t.get(n)??e[n];return i==null?(r.has(n)||(r.add(n),console.warn(`Service Dark: no icon named "${n}". Pass the Lucide component, or registerIcons({ "${n}": Component }) in the root layout.`)),null):typeof i==`string`?{markup:i}:{component:i}}export{i as n,n as t};
2
+ //# sourceMappingURL=pIrVVOVY.js.map
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.aD9vJoxR.js","../chunks/BgFr_EyZ.js","../chunks/pIrVVOVY.js","../assets/0.BGa5ZNDM.css","../nodes/1.Br4FL91i.js","../chunks/DLT1iIlz.js","./payload.DSmR2FwN.js","../nodes/2.vl6OYfu3.js","../chunks/C8qZab0y.js","../chunks/BUrrLYDt.js","../nodes/3.VYqJOLAF.js","../nodes/4.jF9UVlFN.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"../chunks/CRzLMJPS.js";var t={},n=[()=>e(()=>import(`../nodes/0.aD9vJoxR.js`),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>e(()=>import(`../nodes/1.Br4FL91i.js`),__vite__mapDeps([4,1,5,6]),import.meta.url),()=>e(()=>import(`../nodes/2.vl6OYfu3.js`),__vite__mapDeps([7,1,8,9,2]),import.meta.url),()=>e(()=>import(`../nodes/3.VYqJOLAF.js`),__vite__mapDeps([10,1,8,9,2]),import.meta.url),()=>e(()=>import(`../nodes/4.jF9UVlFN.js`),__vite__mapDeps([11,1,9,2]),import.meta.url)],r=[],i={"/":[-3],"/docs/[org]/[repo]/[slug]/[name]":[-4],"/pair":[-5]},a={handleError:(({kind:e,error:t})=>{e===`unknown`&&console.error(t)}),reroute:(()=>{}),transport:{}},o=Object.fromEntries(Object.entries(a.transport).map(([e,t])=>[e,t.decode])),s=Object.fromEntries(Object.entries(a.transport).map(([e,t])=>[e,t.encode])),c=!1,l=(e,t)=>o[e](t),u=()=>e(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{l as decode,o as decoders,i as dictionary,s as encoders,u as get_error_template,c as hash,a as hooks,t as matchers,n as nodes,r as server_loads};
3
+ //# sourceMappingURL=app.0DERehLW.js.map
@@ -0,0 +1,2 @@
1
+ var e={};function t(t){e=t}export{e as payload,t as set_payload};
2
+ //# sourceMappingURL=payload.DSmR2FwN.js.map
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/C90fLsA5.js","../chunks/BgFr_EyZ.js","../chunks/DLT1iIlz.js","./payload.DSmR2FwN.js"])))=>i.map(i=>d[i]);
2
+ import{set_payload as e}from"./payload.DSmR2FwN.js";import{t}from"../chunks/CRzLMJPS.js";var n;function r(r){e(r),n??=t(()=>import(`../chunks/C90fLsA5.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)}async function i(...e){return(await n).start(...e)}async function a(...e){return(await n).load_css(...e)}export{r as init,a as load_css,i as start};
3
+ //# sourceMappingURL=start.B7srFiqh.js.map
@@ -0,0 +1,2 @@
1
+ import{F as e,P as t,Q as n,k as r}from"../chunks/BgFr_EyZ.js";import{t as i}from"../chunks/pIrVVOVY.js";var a=`<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>`,o=`</title><path d="`,s=`"/></svg>`;i({github:(e=>`<path fill="currentColor" stroke="none" d="${e.path}" />`)({title:`GitHub`,slug:`github`,get svg(){return a+`GitHub`+o+this.path+s},path:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`,source:`https://github.com/logos`,hex:`181717`,guidelines:`https://github.com/logos`})});function c(i,a){var o=e(),s=n(o);r(s,()=>a.children),t(i,o)}export{c as component};
2
+ //# sourceMappingURL=0.aD9vJoxR.js.map
@@ -0,0 +1,2 @@
1
+ import{$ as e,I as t,J as n,M as r,P as i,Q as a,et as o,lt as s,ut as c}from"../chunks/BgFr_EyZ.js";import{n as l}from"../chunks/DLT1iIlz.js";var u=t(`<h1> </h1> <p> </p>`,1);function d(t,d){c(d,!0);var f=u(),p=a(f),m=e(p,!0),h=o(p,2),g=e(h,!0);n(()=>{r(m,l.status),r(g,l.error?.message)}),i(t,f),s()}export{d as component};
2
+ //# sourceMappingURL=1.Br4FL91i.js.map