@yorz/cli 0.3.0 → 0.3.4

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 (68) hide show
  1. package/README.md +27 -52
  2. package/dist/cli/index.js +160 -39
  3. package/dist/gui/assets/{abnfDiagram-VRR7QNED-Dvg_gtwF.js → abnfDiagram-VRR7QNED-CToCZW1F.js} +1 -1
  4. package/dist/gui/assets/{arc-DPHbXQf3.js → arc-oKNztn93.js} +1 -1
  5. package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-d6PCjJn6.js → architectureDiagram-ZJ3FMSHR-D9xnGSm6.js} +1 -1
  6. package/dist/gui/assets/{blockDiagram-677ZJIJ3-BC2I0xtq.js → blockDiagram-677ZJIJ3-DUfLbkLH.js} +1 -1
  7. package/dist/gui/assets/{c4Diagram-LMCZKHZV-B-KrLqya.js → c4Diagram-LMCZKHZV-aTEaKOPX.js} +1 -1
  8. package/dist/gui/assets/channel-D8ba0HoQ.js +1 -0
  9. package/dist/gui/assets/{chunk-2Q5K7J3B-D_6tE8D9.js → chunk-2Q5K7J3B-4U-VsWeF.js} +1 -1
  10. package/dist/gui/assets/{chunk-32BRIVSS-Bjgyu8pc.js → chunk-32BRIVSS-DKQaN0vN.js} +1 -1
  11. package/dist/gui/assets/{chunk-5VM5RSS4-D2ExKDZn.js → chunk-5VM5RSS4-CexiXwx1.js} +1 -1
  12. package/dist/gui/assets/{chunk-EX3LRPZG-CAgqmiG1.js → chunk-EX3LRPZG-DzPQlsW5.js} +1 -1
  13. package/dist/gui/assets/{chunk-JWPE2WC7-32xYgKDA.js → chunk-JWPE2WC7-cHxwYQyh.js} +1 -1
  14. package/dist/gui/assets/{chunk-MOJQB5TN-DmF1hIRM.js → chunk-MOJQB5TN-DNz-nXAV.js} +1 -1
  15. package/dist/gui/assets/{chunk-RYQCIY6F-BpygaLmn.js → chunk-RYQCIY6F-DcheWlZK.js} +1 -1
  16. package/dist/gui/assets/{chunk-V7JOEXUC-CL5xjYjs.js → chunk-V7JOEXUC-CsscvNz_.js} +1 -1
  17. package/dist/gui/assets/{chunk-VR4S4FIN-CUKOpnGv.js → chunk-VR4S4FIN-DlI4Zxwq.js} +1 -1
  18. package/dist/gui/assets/{chunk-XXDRQBXY-rH7GWHx4.js → chunk-XXDRQBXY-HCnZrWqz.js} +1 -1
  19. package/dist/gui/assets/classDiagram-OUVF2IWQ-DlvbQg6E.js +1 -0
  20. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DlvbQg6E.js +1 -0
  21. package/dist/gui/assets/{cose-bilkent-JH36ORCC-Cq80riEI.js → cose-bilkent-JH36ORCC-BRdvtU7b.js} +1 -1
  22. package/dist/gui/assets/{cynefin-VYW2F7L2-DhvCHInV.js → cynefin-VYW2F7L2-B9v1qADI.js} +1 -1
  23. package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-U9_xrCTX.js → cynefinDiagram-TSTJHNR4-Cy4vVTQs.js} +1 -1
  24. package/dist/gui/assets/{dagre-VKFMJZFB-D39LwJ1s.js → dagre-VKFMJZFB-BiOZFReM.js} +1 -1
  25. package/dist/gui/assets/{diagram-FQU43EPY-DyZSy6Y2.js → diagram-FQU43EPY-drLlkfZ-.js} +1 -1
  26. package/dist/gui/assets/{diagram-G47NLZAW-CWTyg-w3.js → diagram-G47NLZAW-DR4xC90B.js} +1 -1
  27. package/dist/gui/assets/{diagram-NH7WQ7WH-Cfmxj_yc.js → diagram-NH7WQ7WH-auv4K2Ky.js} +1 -1
  28. package/dist/gui/assets/{diagram-OA4YK3LP-BWR9rLtc.js → diagram-OA4YK3LP-ClCS6mNB.js} +1 -1
  29. package/dist/gui/assets/{diagram-WEI45ONY-BtqMg5zg.js → diagram-WEI45ONY-BFwyQYzT.js} +1 -1
  30. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-GFU4rZWL.js → ebnfDiagram-CCIWWBDH-BWXg2jSj.js} +1 -1
  31. package/dist/gui/assets/{erDiagram-Q63AITRT-ByNYUzxd.js → erDiagram-Q63AITRT-Co9CPBVY.js} +1 -1
  32. package/dist/gui/assets/{flowDiagram-23GEKE2U-GIo3zItT.js → flowDiagram-23GEKE2U-BntEDAjt.js} +1 -1
  33. package/dist/gui/assets/{ganttDiagram-NO4QXBWP-BfDrggvI.js → ganttDiagram-NO4QXBWP-DoPSKIWP.js} +1 -1
  34. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-wZAUbbfD.js → gitGraphDiagram-IHSO6WYX-DHE6ng8r.js} +1 -1
  35. package/dist/gui/assets/index-B_NGA1xd.css +1 -0
  36. package/dist/gui/assets/index-BskSzOyX.js +673 -0
  37. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-CbVgWslR.js → infoDiagram-FWYZ7A6U-J7dh8QQl.js} +1 -1
  38. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-DiZGLvml.js → ishikawaDiagram-FXEZZL3T-D9yNcyZB.js} +1 -1
  39. package/dist/gui/assets/{journeyDiagram-5HDEW3XC-Bto56knB.js → journeyDiagram-5HDEW3XC-Bz2vtfQ8.js} +1 -1
  40. package/dist/gui/assets/{kanban-definition-HUTT4EX6-CyuHCEsI.js → kanban-definition-HUTT4EX6-CF8Y7-tO.js} +1 -1
  41. package/dist/gui/assets/{linear-B9sLmbPn.js → linear-N0bLEB8w.js} +1 -1
  42. package/dist/gui/assets/{mermaid.core-bOetDHeS.js → mermaid.core-BqfH6JD9.js} +4 -4
  43. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-BUliAfjd.js → mindmap-definition-LN4V7U3C-Uzs98b4p.js} +1 -1
  44. package/dist/gui/assets/{pegDiagram-2B236MQR-DFWc28Wx.js → pegDiagram-2B236MQR-CTzmKG10.js} +1 -1
  45. package/dist/gui/assets/{pieDiagram-ENE6RG2P-DBqrT9tz.js → pieDiagram-ENE6RG2P-p3ZF7ovq.js} +1 -1
  46. package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-CrPtmaKy.js → quadrantDiagram-ABIIQ3AL-DP0S7jUf.js} +1 -1
  47. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-CQhfd0gh.js → railroadDiagram-RFXS5EU6-C8z5Y9JK.js} +1 -1
  48. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-BaZ77i_q.js → requirementDiagram-TGXJPOKE-D7MO6nqL.js} +1 -1
  49. package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-DC3Exphe.js → sankeyDiagram-HTMAVEWB-B03YKqvh.js} +1 -1
  50. package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-Bw7wZpQ8.js → sequenceDiagram-DBY2YBRQ-DsS-bbE5.js} +1 -1
  51. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-opzemt6R.js → sizeCapture-X5ZJPWSS-OcZAF91M.js} +1 -1
  52. package/dist/gui/assets/{stateDiagram-2N3HPSRC--RB2GGES.js → stateDiagram-2N3HPSRC-BCQVsBFy.js} +1 -1
  53. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CF1hqxG-.js +1 -0
  54. package/dist/gui/assets/{swimlanes-5IMT3BWC-Bf3o_9Jk.js → swimlanes-5IMT3BWC-C1inQhlb.js} +2 -2
  55. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-8LLwrRNh.js +8 -0
  56. package/dist/gui/assets/{timeline-definition-FHXFAJF6-CT2bRE0k.js → timeline-definition-FHXFAJF6-C3eJioRO.js} +1 -1
  57. package/dist/gui/assets/{vennDiagram-L72KCM5P-BYzZHPMG.js → vennDiagram-L72KCM5P-Dhnq6I7h.js} +1 -1
  58. package/dist/gui/assets/{wardleyDiagram-EHGQE667-C0QK5-46.js → wardleyDiagram-EHGQE667-B8urU-xJ.js} +1 -1
  59. package/dist/gui/assets/{xychartDiagram-FW5EYKEG-CD_Qgw-N.js → xychartDiagram-FW5EYKEG-BMyOJa1W.js} +1 -1
  60. package/dist/gui/index.html +2 -2
  61. package/package.json +3 -3
  62. package/dist/gui/assets/channel-q4TDwCwL.js +0 -1
  63. package/dist/gui/assets/classDiagram-OUVF2IWQ-TaYrCNs6.js +0 -1
  64. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-TaYrCNs6.js +0 -1
  65. package/dist/gui/assets/index-5bFeMSvk.css +0 -1
  66. package/dist/gui/assets/index-TN_K4jQM.js +0 -673
  67. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CvRHcdjg.js +0 -1
  68. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-D30sOFxA.js +0 -8
@@ -0,0 +1,673 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Le={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return wc(this.context.count)},getNextContextId(){return wc(this.context.count++)}};function wc(e){const t=String(e),n=t.length-1;return Le.context.id+(n?String.fromCharCode(96+n):"")+t}function xo(e){Le.context=e}const Fh=!1,Bh=(e,t)=>e===t,un=Symbol("solid-proxy"),wf=typeof Proxy=="function",Ti=Symbol("solid-track"),Di={equals:Bh};let _f=Tf;const pn=1,Do=2,Ef={owned:null,cleanups:null,context:null,owner:null},$s={};var je=null;let pe=null,zh=null,tt=null,zt=null,Ft=null,Yi=0;function Dr(e,t){const n=tt,r=je,o=e.length===0,i=t===void 0?r:t,s=o?Ef:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>Et(()=>dr(s)));je=s,tt=null;try{return Jt(a,!0)}finally{tt=n,je=r}}function $(e,t){t=t?Object.assign({},Di,t):Di;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(pe&&pe.running&&pe.sources.has(n)?o=o(n.tValue):o=o(n.value)),Af(n,o));return[Cf.bind(n),r]}function Ya(e,t,n){const r=Qi(e,t,!0,pn);ao(r)}function le(e,t,n){const r=Qi(e,t,!1,pn);ao(r)}function oe(e,t,n){_f=jh;const r=Qi(e,t,!1,pn),o=Nr&&lt(Nr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Ft?Ft.push(r):ao(r)}function re(e,t,n){n=n?Object.assign({},Di,n):Di;const r=Qi(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ao(r),Cf.bind(r)}function Uh(e){return e&&typeof e=="object"&&"then"in e}function hn(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=$s,u=null,c=!1,l=!1,d="initialValue"in i,f=typeof r=="function"&&re(r);const p=new Set,[g,b]=(i.storage||$)(i.initialValue),[h,y]=$(void 0),[v,x]=$(void 0,{equals:!1}),[k,E]=$(d?"ready":"unresolved");Le.context&&(u=Le.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Le.load&&Le.has(u)&&(a=Le.load(u)));function S(T,R,M,C){return s===T&&(s=null,C!==void 0&&(d=!0),(T===a||R===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(C,{value:R})),a=$s,pe&&T&&c?(pe.promises.delete(T),c=!1,Jt(()=>{pe.running=!0,O(R,M)},!1)):O(R,M)),R}function O(T,R){Jt(()=>{R===void 0&&b(()=>T),E(R!==void 0?"errored":d?"ready":"unresolved"),y(R);for(const M of p.keys())M.decrement();p.clear()},!1)}function _(){const T=Nr&&lt(Nr),R=g(),M=h();if(M!==void 0&&!s)throw M;return tt&&!tt.user&&T&&Ya(()=>{v(),s&&(T.resolved&&pe&&c?pe.promises.add(s):p.has(T)||(T.increment(),p.add(T)))}),R}function I(T=!0){if(T!==!1&&l)return;l=!1;const R=f?f():r;if(c=pe&&pe.running,R==null||R===!1){S(s,Et(g));return}pe&&s&&pe.promises.delete(s);let M;const C=a!==$s?a:Et(()=>{try{return o(R,{value:g(),refetching:T})}catch(N){M=N}});if(M!==void 0){S(s,void 0,Ci(M),R);return}else if(!Uh(C))return S(s,C,void 0,R),C;return s=C,"v"in C?(C.s===1?S(s,C.v,void 0,R):S(s,void 0,Ci(C.v),R),C):(l=!0,queueMicrotask(()=>l=!1),Jt(()=>{E(d?"refreshing":"pending"),x()},!1),C.then(N=>S(C,N,void 0,R),N=>S(C,void 0,Ci(N),R)))}Object.defineProperties(_,{state:{get:()=>k()},error:{get:()=>h()},loading:{get(){const T=k();return T==="pending"||T==="refreshing"}},latest:{get(){if(!d)return _();const T=h();if(T&&!s)throw T;return g()}}});let L=je;return f?Ya(()=>(L=je,I(!1))):I(!1),[_,{refetch:T=>Zi(L,()=>I(T)),mutate:b}]}function kf(e){return Jt(e,!1)}function Et(e){if(tt===null)return e();const t=tt;tt=null;try{return e()}finally{tt=t}}function kt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const u=Et(()=>t(a,o,s));return o=a,u}}function Vt(e){oe(()=>Et(e))}function ae(e){return je===null||(je.cleanups===null?je.cleanups=[e]:je.cleanups.push(e)),e}function Za(){return tt}function Oo(){return je}function Zi(e,t){const n=je,r=tt;je=e,tt=null;try{return Jt(t,!0)}catch(o){ku(o)}finally{je=n,tt=r}}function Sf(e){if(pe&&pe.running)return e(),pe.done;const t=tt,n=je;return Promise.resolve().then(()=>{tt=t,je=n;let r;return Nr&&(r=pe||(pe={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Jt(e,!1),tt=je=null,r?r.done:void 0})}const[kT,_c]=$(!1);function Kh(e){Ft.push.apply(Ft,e),e.length=0}function mt(e,t){const n=Symbol("context");return{id:n,Provider:Gh(n),defaultValue:e}}function lt(e){let t;return je&&je.context&&(t=je.context[e.id])!==void 0?t:e.defaultValue}function Xi(e){const t=re(e),n=re(()=>Xa(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nr;function Hh(){return Nr||(Nr=mt())}function Cf(){const e=pe&&pe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===pn)ao(this);else{const t=zt;zt=null,Jt(()=>Ri(this),!1),zt=t}if(tt){const t=this.observers;if(!t||t[t.length-1]!==tt){const n=t?t.length:0;tt.sources?(tt.sources.push(this),tt.sourceSlots.push(n)):(tt.sources=[this],tt.sourceSlots=[n]),t?(t.push(tt),this.observerSlots.push(tt.sources.length-1)):(this.observers=[tt],this.observerSlots=[tt.sources.length-1])}}return e&&pe.sources.has(this)?this.tValue:this.value}function Af(e,t,n){let r=pe&&pe.running&&pe.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(pe){const o=pe.running;(o||!n&&pe.sources.has(e))&&(pe.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Jt(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=pe&&pe.running;s&&pe.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?zt.push(i):Ft.push(i),i.observers&&Df(i)),s?i.tState=pn:i.state=pn)}if(zt.length>1e6)throw zt=[],new Error},!1)}return t}function ao(e){if(!e.fn)return;dr(e);const t=Yi;Ec(e,pe&&pe.running&&pe.sources.has(e)?e.tValue:e.value,t),pe&&!pe.running&&pe.sources.has(e)&&queueMicrotask(()=>{Jt(()=>{pe&&(pe.running=!0),tt=je=e,Ec(e,e.tValue,t),tt=je=null},!1)})}function Ec(e,t,n){let r;const o=je,i=tt;tt=je=e;try{r=e.fn(t)}catch(s){return e.pure&&(pe&&pe.running?(e.tState=pn,e.tOwned&&e.tOwned.forEach(dr),e.tOwned=void 0):(e.state=pn,e.owned&&e.owned.forEach(dr),e.owned=null)),e.updatedAt=n+1,ku(s)}finally{tt=i,je=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Af(e,r,!0):pe&&pe.running&&e.pure?(pe.sources.has(e)||(e.value=r),pe.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Qi(e,t,n,r=pn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:je,context:je?je.context:null,pure:n};return pe&&pe.running&&(i.state=0,i.tState=r),je===null||je!==Ef&&(pe&&pe.running&&je.pure?je.tOwned?je.tOwned.push(i):je.tOwned=[i]:je.owned?je.owned.push(i):je.owned=[i]),i}function Oi(e){const t=pe&&pe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Do)return Ri(e);if(e.suspense&&Et(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Yi);){if(t&&pe.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(pe.disposed.has(o))return}if((t?e.tState:e.state)===pn)ao(e);else if((t?e.tState:e.state)===Do){const o=zt;zt=null,Jt(()=>Ri(e,n[0]),!1),zt=o}}}function Jt(e,t){if(zt)return e();let n=!1;t||(zt=[]),Ft?n=!0:Ft=[],Yi++;try{const r=e();return qh(n),r}catch(r){n||(Ft=null),zt=null,ku(r)}}function qh(e){if(zt&&(Tf(zt),zt=null),e)return;let t;if(pe){if(!pe.promises.size&&!pe.queue.size){const r=pe.sources,o=pe.disposed;Ft.push.apply(Ft,pe.effects),t=pe.resolve;for(const i of Ft)"tState"in i&&(i.state=i.tState),delete i.tState;pe=null,Jt(()=>{for(const i of o)dr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)dr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}_c(!1)},!1)}else if(pe.running){pe.running=!1,pe.effects.push.apply(pe.effects,Ft),Ft=null,_c(!0);return}}const n=Ft;Ft=null,n.length&&Jt(()=>_f(n),!1),t&&t()}function Tf(e){for(let t=0;t<e.length;t++)Oi(e[t])}function jh(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Oi(r)}if(Le.context){if(Le.count){Le.effects||(Le.effects=[]),Le.effects.push(...e.slice(0,n));return}xo()}for(Le.effects&&(Le.done||!Le.count)&&(e=[...Le.effects,...e],n+=Le.effects.length,delete Le.effects),t=0;t<n;t++)Oi(e[t])}function Ri(e,t){const n=pe&&pe.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===pn?o!==t&&(!o.updatedAt||o.updatedAt<Yi)&&Oi(o):i===Do&&Ri(o,t)}}}function Df(e){const t=pe&&pe.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Do:r.state=Do,r.pure?zt.push(r):Ft.push(r),r.observers&&Df(r))}}function dr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)dr(e.tOwned[t]);delete e.tOwned}if(pe&&pe.running&&e.pure)Of(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)dr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}pe&&pe.running?e.tState=0:e.state=0}function Of(e,t){if(t||(e.tState=0,pe.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Of(e.owned[n])}function Ci(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ku(e,t=je){throw Ci(e)}function Xa(e){if(typeof e=="function"&&!e.length)return Xa(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Xa(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Gh(e,t){return function(r){let o;return le(()=>o=Et(()=>(je.context={...je.context,[e]:r.value},Xi(()=>r.children))),void 0),o}}const Vh=Symbol("fallback");function kc(e){for(let t=0;t<e.length;t++)e[t]()}function Wh(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>kc(i)),()=>{let u=e()||[],c=u.length,l,d;return u[Ti],Et(()=>{let p,g,b,h,y,v,x,k,E;if(c===0)s!==0&&(kc(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Vh],o[0]=Dr(S=>(i[0]=S,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Dr(f);s=c}else{for(b=new Array(c),h=new Array(c),a&&(y=new Array(c)),v=0,x=Math.min(s,c);v<x&&r[v]===u[v];v++);for(x=s-1,k=c-1;x>=v&&k>=v&&r[x]===u[k];x--,k--)b[k]=o[x],h[k]=i[x],a&&(y[k]=a[x]);for(p=new Map,g=new Array(k+1),d=k;d>=v;d--)E=u[d],l=p.get(E),g[d]=l===void 0?-1:l,p.set(E,d);for(l=v;l<=x;l++)E=r[l],d=p.get(E),d!==void 0&&d!==-1?(b[d]=o[l],h[d]=i[l],a&&(y[d]=a[l]),d=g[d],p.set(E,d)):i[l]();for(d=v;d<c;d++)d in b?(o[d]=b[d],i[d]=h[d],a&&(a[d]=y[d],a[d](d))):o[d]=Dr(f);o=o.slice(0,s=c),r=u.slice(0)}return o});function f(p){if(i[d]=p,a){const[g,b]=$(d);return a[d]=b,t(u[d],g)}return t(u[d])}}}function m(e,t){return Et(()=>e(t||{}))}function li(){return!0}const Qa={get(e,t,n){return t===un?n:e.get(t)},has(e,t){return t===un?!0:e.has(t)},set:li,deleteProperty:li,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:li,deleteProperty:li}},ownKeys(e){return e.keys()}};function Ps(e){return(e=typeof e=="function"?e():e)?e:{}}function Yh(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Q(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&un in a,e[s]=typeof a=="function"?(t=!0,re(a)):a}if(wf&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Ps(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Ps(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Ps(e[a])));return[...new Set(s)]}},Qa);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:Yh.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[l];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function _e(e,...t){const n=t.length;if(wf&&un in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Qa));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},Qa)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Zh=0;function qt(){return Le.context?Le.getNextContextId():`cl-${Zh++}`}const Xh=e=>`Stale read from <${e}>.`;function bt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return re(Wh(()=>e.each,e.children,t||void 0))}function Y(e){const t=e.keyed,n=re(()=>e.when,void 0,void 0),r=t?n:re(n,void 0,{equals:(o,i)=>!o==!i});return re(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?Et(()=>i(t?o:()=>{if(!Et(r))throw Xh("Show");return n()})):i}return e.fallback},void 0,void 0)}const Qh=mt();function Ji(e){let t=0,n,r,o,i,s;const[a,u]=$(!1),c=Hh(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Oo();if(Le.context&&Le.load){const g=Le.getContextId();let b=Le.load(g);if(b&&(typeof b!="object"||b.s!==1?o=b:Le.gather(g)),o&&o!=="$$f"){const[h,y]=$(void 0,{equals:!1});i=h,o.then(()=>{if(Le.done)return y();Le.gather(g),xo(r),y(),xo()},v=>{s=v,y()})}}const f=lt(Qh);f&&(n=f.register(l.inFallback));let p;return ae(()=>p&&p()),m(c.Provider,{value:l,get children(){return re(()=>{if(s)throw s;if(r=Le.context,i)return i(),i=void 0;r&&o==="$$f"&&xo();const g=re(()=>e.children);return re(b=>{const h=l.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!h||o&&o!=="$$f")&&y)return l.resolved=!0,p&&p(),p=r=o=void 0,Kh(l.effects),g();if(v)return p?b:Dr(x=>(p=x,r&&(xo({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Jh=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],em=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Jh]),tm=new Set(["innerHTML","textContent","innerText","children"]),nm=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),rm=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function om(e,t){const n=rm[e];return typeof n=="object"?n[t]?n.$:void 0:n}const im=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sm=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),am={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},de=e=>re(()=>e());function um(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,f=1,p;for(;++d<o&&d<i&&!((p=c.get(t[d]))==null||p!==l+f);)f++;if(f>l-a){const g=t[s];for(;a<l;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Sc="_$DX_DELEGATE";function cm(e,t,n,r={}){let o;return Dr(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function B(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function ln(e,t=window.document){const n=t[Sc]||(t[Sc]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,mm))}}function we(e,t,n){$r(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function lm(e,t,n,r){$r(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function dm(e,t,n){$r(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ct(e,t){$r(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ni(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function fm(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Cc(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(Cc(e,a,!0),n[a]=u)}return n}function ur(e,t,n){if(!t)return n?we(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Ro(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Wn(e,t={},n,r){const o={};return r||le(()=>o.children=No(e,t.children,o.children)),le(()=>typeof t.ref=="function"&&Gn(t.ref,e)),le(()=>gm(e,t,n,!0,o,!0)),o}function Gn(e,t,n){return Et(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return No(e,t,r,n);le(o=>No(e,t(),o,n),r)}function gm(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Ac(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Ac(e,s,a,o[s],n,i,t)}}function pm(e){let t,n;return!$r()||!(t=Le.registry.get(n=bm()))?e():(Le.completed&&Le.completed.add(t),Le.registry.delete(n),t)}function $r(e){return!!Le.context&&!Le.done&&(!e||e.isConnected)}function hm(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Cc(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Ac(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return ur(e,n,r);if(t==="classList")return fm(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),p=im.has(f);if(!p&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(p||n)&&(Ni(e,f,n,p),p&&ln([f]))}else if(t.slice(0,5)==="attr:")we(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")dm(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=tm.has(t))||!o&&((l=om(t,e.tagName))||(u=em.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if($r(e))return n;t==="class"||t==="className"?ct(e,n):a&&!u&&!c?e[hm(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&am[t.split(":")[0]];f?lm(e,f,t,n):we(e,nm[t]||t,n)}return n}function mm(e){if(Le.registry&&Le.events&&Le.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Le.registry&&!Le.done&&(Le.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function No(e,t,n,r,o){const i=$r(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=Ur(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Ur(e,n,r)}else{if(s==="function")return le(()=>{let u=t();for(;typeof u=="function";)u=u();n=No(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(Ja(u,t,n,o))return le(()=>n=No(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=Ur(e,n,r),a)return n}else c?n.length===0?Tc(e,u,r):um(e,n,u):(n&&Ur(e),Tc(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Ur(e,n,r,t);Ur(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ja(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Ja(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Ja(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function Tc(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Ur(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function bm(){return Le.getNextContextId()}const ym=!1,vm="http://www.w3.org/2000/svg";function Rf(e,t=!1,n=void 0){return t?document.createElementNS(vm,e):document.createElement(e,{is:n})}function Su(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Oo();let i,s=!!Le.context;return oe(()=>{s&&(Oo().user=s=!1),i||(i=Zi(o,()=>re(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=$(!1),l=()=>c(!0);Dr(d=>w(a,()=>u()?d():i(),null)),ae(l)}else{const u=Rf(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ae(()=>a.removeChild(u))}},void 0,{render:!s}),n}function xm(e,t){const n=re(e);return re(()=>{const r=n();switch(typeof r){case"function":return Et(()=>r(t));case"string":const o=sm.has(r),i=Le.context?pm():Rf(r,o,Et(()=>t.is));return Wn(i,t,o),i}})}function Nf(e){const[,t]=_e(e,["component"]);return xm(()=>e.component,t)}function If(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let eu;function Cu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),eu=window.history.state._depth}Cu();function wm(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function _m(e,t){let n=!1;return()=>{const r=eu;Cu();const o=r==null?null:eu-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Em=/^(?:[a-z0-9]+:)?\/\//i,km=/^\/+|(\/)\/+$/g,Mf="http://sr";function Or(e,t=!1){const n=e.replace(km,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ai(e,t,n){if(Em.test(t))return;const r=Or(e),o=n&&Or(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+Or(t,!i)}function Sm(e,t){if(e==null)throw new Error(t);return e}function Cm(e,t){return Or(e).replace(/\/*(\*.*)?$/g,"")+Or(t)}function Lf(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Am(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const p=i[f],g=p[0]===":",b=g?u[f]:u[f].toLowerCase(),h=g?p.slice(1):p.toLowerCase();if(g&&Fs(b,d(h)))l.params[h]=b;else if(g||!Fs(b,h))return null;l.path+=`/${b}`}if(o){const f=c?u.slice(-c).join("/"):"";if(Fs(f,d(o)))l.params[o]=f;else return null}return l}}function Fs(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Tm(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function $f(e){const t=new Map,n=Oo();return new Proxy({},{get(r,o){return t.has(o)||Zi(n,()=>t.set(o,re(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Pf(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return Pf(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Dm=100,Ff=mt(),Au=mt(),Wo=()=>Sm(lt(Ff),"<A> and 'use' router primitives can be only used inside a Route."),Om=()=>lt(Au)||Wo().base,Rm=e=>{const t=Om();return re(()=>t.resolvePath(e()))},Nm=e=>{const t=Wo();return re(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},es=()=>Wo().navigatorFactory(),ts=()=>Wo().location,ns=()=>Wo().params;function Im(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Bf(e.path).reduce((c,l)=>{for(const d of Pf(l)){const f=Cm(t,d);let p=a?f:f.split("/*",1)[0];p=p.split("/").map(g=>g.startsWith(":")||g.startsWith("*")?g:encodeURIComponent(g)).join("/"),c.push({...u,originalPath:l,pattern:p,matcher:Am(p,!a,e.matchFilters)})}return c},[])}function Mm(e,t=0){return{routes:e,score:Tm(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Bf(e){return Array.isArray(e)?e:[e]}function zf(e,t="",n=[],r=[]){const o=Bf(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=Im(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)zf(a.children,c.pattern,n,r);else{const d=Mm([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Bs(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Lm(e,t,n){const r=new URL(Mf),o=re(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=re(()=>o().pathname),s=re(()=>o().search,!0),a=re(()=>o().hash),u=()=>"",c=kt(s,()=>Lf(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):$f(c)}}let Tr;function $m(){return Tr}function Pm(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(C=>C),u=s.renderPath||(C=>C),c=s.beforeLeave||If(),l=Ai("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,f]=$(!1);let p;const g=(C,N)=>{N.value===b()&&N.state===y()||(p===void 0&&f(!0),Tr=C,p=N,Sf(()=>{p===N&&(h(p.value),v(p.state),E[1](F=>F.filter(j=>j.pending)))}).finally(()=>{p===N&&kf(()=>{Tr=void 0,C==="navigate"&&R(p),f(!1),p=void 0})}))},[b,h]=$(o().value),[y,v]=$(o().state),x=Lm(b,y,s.queryWrapper),k=[],E=$([]),S=re(()=>typeof r.transformUrl=="function"?Bs(t(),r.transformUrl(x.pathname)):Bs(t(),x.pathname)),O=()=>{const C=S(),N={};for(let F=0;F<C.length;F++)Object.assign(N,C[F].params);return N},_=s.paramsWrapper?s.paramsWrapper(O,t):$f(O),I={pattern:l,path:()=>l,outlet:()=>null,resolvePath(C){return Ai(l,C)}};return le(kt(o,C=>g("native",C),{defer:!0})),{base:I,location:x,params:_,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:T,matches:S,beforeLeave:c,preloadRoute:M,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:E};function L(C,N,F){Et(()=>{if(typeof N=="number"){N&&(s.go?s.go(N):console.warn("Router integration does not support relative routing"));return}const j=!N||N[0]==="?",{replace:U,resolve:z,scroll:P,state:X}={replace:!1,resolve:!j,scroll:!0,...F},V=z?C.resolvePath(N):Ai(j&&x.pathname||"",N);if(V===void 0)throw new Error(`Path '${N}' is not a routable path`);if(k.length>=Dm)throw new Error("Too many redirects");const ne=b();(V!==ne||X!==y())&&(ym||c.confirm(V,F)&&(k.push({value:ne,replace:U,scroll:P,state:y()}),g("navigate",{value:V,state:X})))})}function T(C){return C=C||lt(Au)||I,(N,F)=>L(C,N,F)}function R(C){const N=k[0];N&&(i({...C,replace:N.replace,scroll:N.scroll}),k.length=0)}function M(C,N){const F=Bs(t(),C.pathname),j=Tr;Tr="preload";for(let U in F){const{route:z,params:P}=F[U];z.component&&z.component.preload&&z.component.preload();const{preload:X}=z;N&&X&&Zi(n(),()=>X({params:P,location:{pathname:C.pathname,search:C.search,hash:C.hash,query:Lf(C),state:null,key:""},intent:"preload"}))}Tr=j}}function Fm(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=re(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:Tr||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?m(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(p){return Ai(o.path(),p,l())}}}const Bm=e=>t=>{const{base:n}=t,r=Xi(()=>t.children),o=re(()=>zf(r(),t.base||""));let i;const s=Pm(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),m(Ff.Provider,{value:s,get children(){return m(zm,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[de(()=>(i=Oo())&&null),m(Um,{routerState:s,get branches(){return o()}})]}})}})};function zm(e){const t=e.routerState.location,n=e.routerState.params,r=re(()=>e.preload&&Et(()=>{e.preload({params:n,location:t,intent:$m()||"initial"})}));return m(Y,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>m(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Um(e){const t=[];let n;const r=re(kt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Dr(p=>{t[c]=p,u[c]=Fm(e.routerState,u[c-1]||e.routerState.base,Dc(()=>r()[c+1]),()=>{const g=e.routerState.matches();return g[c]??g[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return Dc(()=>r()&&n)()}const Dc=e=>()=>m(Y,{get when(){return e()},keyed:!0,children:t=>m(Au.Provider,{value:t,get children(){return t.outlet()}})}),Er=e=>{const t=Xi(()=>e.children);return Q(e,{get children(){return t()}})};function Km([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Hm(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Km($(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Le.registry&&!Le.done&&(Le.done=!0),o));return e.init&&ae(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Bm({signal:r,create:e.create,utils:e.utils})}function qm(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function jm(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Gm=new Map;function Vm({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(b){return b.namespaceURI==="http://www.w3.org/2000/svg"}function l(b){if(b.defaultPrevented||b.button!==0||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)return;const h=b.composedPath().find(S=>S instanceof Node&&S.nodeName.toUpperCase()==="A");if(!h||t&&!h.hasAttribute("link"))return;const y=c(h),v=y?h.href.baseVal:h.href;if((y?h.target.baseVal:h.target)||!v&&!h.hasAttribute("state"))return;const k=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||k&&k.includes("external"))return;const E=y?new URL(v,document.baseURI):new URL(v);if(!(E.origin!==window.location.origin||i&&E.pathname&&!E.pathname.toLowerCase().startsWith(i.toLowerCase())))return[h,E]}function d(b){const h=l(b);if(!h)return;const[y,v]=h,x=o.parsePath(v.pathname+v.search+v.hash),k=y.getAttribute("state");b.preventDefault(),s(x,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:k?JSON.parse(k):void 0})}function f(b){const h=l(b);if(!h)return;const[y,v]=h;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,y.getAttribute("preload")!=="false")}function p(b){clearTimeout(a);const h=l(b);if(!h)return u=null;const[y,v]=h;u!==y&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,y.getAttribute("preload")!=="false"),u=y},20))}function g(b){if(b.defaultPrevented)return;let h=b.submitter&&b.submitter.hasAttribute("formaction")?b.submitter.getAttribute("formaction"):b.target.getAttribute("action");if(!h)return;if(!h.startsWith("https://action/")){const v=new URL(h,Mf);if(h=o.parsePath(v.pathname+v.search),!h.startsWith(n))return}if(b.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=Gm.get(h);if(y){b.preventDefault();const v=new FormData(b.target,b.submitter);y.call({r:o,f:b.target},b.target.enctype==="multipart/form-data"?v:new URLSearchParams(v))}}ln(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",p,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",g),ae(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",g)})}}function Wm(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=If();return Hm({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(wm(s),"",r):window.history.pushState(s,"",r),jm(decodeURIComponent(window.location.hash.slice(1)),i),Cu()},init:r=>qm(window,"popstate",_m(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Vm({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Ym=B("<a>");function fr(e){e=Q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=_e(e,["href","state","class","activeClass","inactiveClass","end"]),n=Rm(()=>e.href),r=Nm(n),o=ts(),i=re(()=>{const s=n();if(s===void 0)return[!1,!1];const a=Or(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(Or(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Ym();return Wn(s,Q(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Zm(e){const t=es(),n=ts(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const Ii=Symbol("store-raw"),Rr=Symbol("store-node"),Sn=Symbol("store-has"),Uf=Symbol("store-self");function Kf(e){let t=e[un];if(!t&&(Object.defineProperty(e,un,{value:t=new Proxy(e,Jm)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function In(e){let t;return e!=null&&typeof e=="object"&&(e[un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ir(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Ii])return n;if(!In(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Ir(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=Ir(o,t))!==o&&(e[i]=r))}return e}function Mi(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Io(e,t,n){if(e[t])return e[t];const[r,o]=$(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Xm(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===un||t===Rr||(delete n.value,delete n.writable,n.get=()=>e[un][t]),n}function Hf(e){Za()&&Io(Mi(e,Rr),Uf)()}function Qm(e){return Hf(e),Reflect.ownKeys(e)}const Jm={get(e,t,n){if(t===Ii)return e;if(t===un)return n;if(t===Ti)return Hf(e),n;const r=Mi(e,Rr),o=r[t];let i=o?o():e[t];if(t===Rr||t===Sn||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Za()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Io(r,t,i)())}return In(i)?Kf(i):i},has(e,t){return t===Ii||t===un||t===Ti||t===Rr||t===Sn||t==="__proto__"?!0:(Za()&&Io(Mi(e,Sn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Qm,getOwnPropertyDescriptor:Xm};function Gt(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Sn]&&e[Sn][t]&&o!==void 0&&e[Sn][t].$()):(e[t]=n,e[Sn]&&e[Sn][t]&&o===void 0&&e[Sn][t].$());let s=Mi(e,Rr),a;if((a=Io(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Io(s,"length",i))&&a.$(e.length)}(a=s[Uf])&&a.$()}function qf(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];jf(o)||Gt(e,o,t[o])}}function jf(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function eb(e,t){if(typeof t=="function"&&(t=t(e)),t=Ir(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Gt(e,n,o)}Gt(e,"length",r)}else qf(e,t)}function wo(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&jf(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)wo(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&wo(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let d=u;d<=c;d+=l)wo(e,[d].concat(t),n);return}else if(t.length>1){wo(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ir(i),r===void 0||In(o)&&In(i)&&!Array.isArray(i)?qf(o,i):Gt(e,r,i))}function tb(...[e,t]){const n=Ir(e||{}),r=Array.isArray(n),o=Kf(n);function i(...s){kf(()=>{r&&s.length===1?eb(n,s[0]):wo(n,s)})}return[o,i]}const tu=Symbol("store-root");function Oc(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Yr(e,t,n,r,o){if(Oc(n))return;const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==tu&&(!In(e)||!In(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){Gt(t,n,e);return}if(s){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let c,l,d,f,p,g,b,h;for(d=0,f=Math.min(i.length,e.length);d<f&&(i[d]===e[d]||o&&i[d]&&e[d]&&i[d][o]&&i[d][o]===e[d][o]);d++)Yr(e[d],i,d,r,o);const y=new Array(e.length),v=new Map;for(f=i.length-1,p=e.length-1;f>=d&&p>=d&&(i[f]===e[p]||o&&i[f]&&e[p]&&i[f][o]&&i[f][o]===e[p][o]);f--,p--)y[p]=i[f];if(d>p||d>f){for(l=d;l<=p;l++)Gt(i,l,e[l]);for(;l<e.length;l++)Gt(i,l,y[l]),Yr(e[l],i,l,r,o);i.length>e.length&&Gt(i,"length",e.length);return}for(b=new Array(p+1),l=p;l>=d;l--)g=e[l],h=o&&g?g[o]:g,c=v.get(h),b[l]=c===void 0?-1:c,v.set(h,l);for(c=d;c<=f;c++)g=i[c],h=o&&g?g[o]:g,l=v.get(h),l!==void 0&&l!==-1&&(y[l]=i[c],l=b[l],v.set(h,l));for(l=d;l<e.length;l++)l in y?(Gt(i,l,y[l]),Yr(e[l],i,l,r,o)):Gt(i,l,e[l])}else for(let c=0,l=e.length;c<l;c++)Yr(e[c],i,c,r,o);i.length>e.length&&Gt(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)Oc(a[c])||Yr(e[a[c]],i,a[c],r,o);const u=Object.keys(i);for(let c=0,l=u.length;c<l;c++)e[u[c]]===void 0&&Gt(i,u[c],void 0)}function nb(e,t={}){const{merge:n,key:r="id"}=t,o=Ir(e);return i=>{if(!In(i)||!In(o))return o;const s=Yr(o,{[tu]:i},tu,n,r);return s===void 0?i:s}}const Li=new WeakMap,Gf={get(e,t){if(t===Ii)return e;const n=e[t];if(t===un||t===Ti||t===Rr||t===Sn||t==="__proto__")return n;let r;return In(n)?Li.get(n)||(Li.set(n,r=new Proxy(n,Gf)),r):n},set(e,t,n){return Gt(e,t,Ir(n)),!0},deleteProperty(e,t){return Gt(e,t,void 0,!0),!0}};function Rc(e){return t=>{if(In(t)){let n;(n=Li.get(t))||Li.set(t,n=new Proxy(t,Gf)),e(n)}return t}}const Me=e=>typeof e=="string",go=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Nc=e=>e==null?"":String(e),rb=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ob=/###/g,Ic=e=>e&&e.includes("###")?e.replace(ob,"."):e,Mc=e=>!e||Me(e),So=(e,t,n)=>{const r=Me(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Mc(e))return{};const i=Ic(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Mc(e)?{}:{obj:e,k:Ic(r[o])}},Lc=(e,t,n)=>{const{obj:r,k:o}=So(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=So(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=So(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ib=(e,t,n,r)=>{const{obj:o,k:i}=So(e,t,Object);o[i]=o[i]||[],o[i].push(n)},$i=(e,t)=>{const{obj:n,k:r}=So(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},sb=(e,t,n)=>{const r=$i(e,n);return r!==void 0?r:$i(t,n)},Vf=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Me(e[r])||e[r]instanceof String||Me(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Vf(e[r],t[r],n):e[r]=t[r]);return e},Bn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ab={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},ub=e=>Me(e)?e.replace(/[&<>"'\/]/g,t=>ab[t]):e;class cb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const lb=[" ",",","?","!",";"],db=new cb(20),fb=(e,t,n)=>{t=t||"",n=n||"";const r=lb.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=db.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},nu=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Mo=e=>e?.replace(/_/g,"-"),gb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Pi{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||gb,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>Me(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Me(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Pi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Pi(this.logger,t)}}var An=new Pi;class rs{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class $c extends rs{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Me(r)&&i?a.push(...r.split(i)):a.push(r)));const u=$i(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Me(r)?u:nu(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Lc(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(Me(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=$i(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Vf(u,r,i):u={...u,...r},Lc(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Wf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const Yf=Symbol("i18next/PATH_KEY");function pb(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Yf?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Jr(e,t){const{[Yf]:n}=e(pb()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const zs=e=>!Me(e)&&typeof e!="boolean"&&typeof e!="number";class Fi extends rs{constructor(t,n={}){super(),rb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=An.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=zs(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fb(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Me(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:Me(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Jr(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Jr(M,{...this.options,...o}):String(M));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,f=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const p=this.resolve(t,o);let g=p?.res;const b=p?.usedKey||a,h=p?.exactUsedKey||a,y=["[object Number]","[object Function]","[object RegExp]"],v=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,k=o.count!==void 0&&!Me(o.count),E=Fi.hasDefaultValue(o),S=k?this.pluralResolver.getSuffix(d,o.count,o):"",O=o.ordinal&&k?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",_=k&&!o.ordinal&&o.count===0,I=_&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${S}`]||o[`defaultValue${O}`]||o.defaultValue;let L=g;x&&!g&&E&&(L=I);const T=zs(L),R=Object.prototype.toString.apply(L);if(x&&L&&T&&!y.includes(R)&&!(Me(v)&&Array.isArray(L))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,L,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=M,p.usedParams=this.getUsedParamsDetails(o),p):M}if(s){const M=Array.isArray(L),C=M?[]:{},N=M?h:b;for(const F in L)if(Object.prototype.hasOwnProperty.call(L,F)){const j=`${N}${s}${F}`;E&&!g?C[F]=this.translate(j,{...o,defaultValue:zs(I)?I[F]:void 0,joinArrays:!1,ns:u}):C[F]=this.translate(j,{...o,joinArrays:!1,ns:u}),C[F]===j&&(C[F]=L[F])}g=C}}else if(x&&Me(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,t,o,r));else{let M=!1,C=!1;!this.isValidLookup(g)&&E&&(M=!0,g=I),this.isValidLookup(g)||(C=!0,g=a);const F=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:g,j=E&&I!==g&&this.options.updateMissing;if(C||M||j){if(this.logger.log(j?"updateKey":"missingKey",d,c,k&&!j?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,j?I:g),s){const X=this.resolve(a,{...o,keySeparator:!1});X&&X.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let X=0;X<z.length;X++)U.push(z[X]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(o.lng||this.language):U.push(o.lng||this.language);const P=(X,V,ne)=>{const q=E&&ne!==g?ne:F;this.options.missingKeyHandler?this.options.missingKeyHandler(X,c,V,q,j,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(X,c,V,q,j,o),this.emit("missingKey",X,c,V,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?U.forEach(X=>{const V=this.pluralResolver.getSuffixes(X,o);_&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(ne=>{P([X],a+ne,o[`defaultValue${ne}`]||I)})}):P(U,a,I))}g=this.extendTranslation(g,t,o,p,r),C&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}${l}${a}`),(C||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,M?g:void 0,o))}return i?(p.res=g,p.usedParams=this.getUsedParamsDetails(o),p):g}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Me(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let l=r.replace&&!Me(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c<f&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Me(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Wf.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return Me(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Jr(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Me(n.count),p=f&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Me(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(h=>{this.isValidLookup(r)||(a=h,!this.checkedLoadedFor[`${b[0]}-${h}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${b[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(y=>{if(this.isValidLookup(r))return;s=y;const v=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(v,l,y,h,n);else{let k;f&&(k=this.pluralResolver.getSuffix(y,n.count,n));const E=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&k.startsWith(S)&&v.push(l+k.replace(S,this.options.pluralSeparator)),v.push(l+k),p&&v.push(l+E)),g){const O=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(O),f&&(n.ordinal&&k.startsWith(S)&&v.push(O+k.replace(S,this.options.pluralSeparator)),v.push(O+k),p&&v.push(O+E))}}let x;for(;x=v.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(y,h,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Me(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class Pc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=An.create("languageUtils")}getScriptPartFromCode(t){if(t=Mo(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Mo(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Me(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Me(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Me(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Me(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const Fc={zero:0,one:1,two:2,few:3,many:4,other:5},Bc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hb{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=An.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Mo(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Bc;if(!t.match(/-|_/))return Bc;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>Fc[o]-Fc[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const zc=(e,t,n,r=".",o=!0)=>{let i=sb(e,t,n);return!i&&o&&Me(n)&&(i=nu(e,n,r),i===void 0&&(i=nu(t,n,r))),i},mb=e=>e.replace(/\$/g,"$$$$");class Uc{constructor(t={}){this.logger=An.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:h,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:ub,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Bn(i):s||"{{",this.suffix=a?Bn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?Bn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?Bn(l):"",this.nestingPrefix=f?Bn(f):p||Bn("$t("),this.nestingSuffix=g?Bn(g):b||Bn(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(!p.includes(this.formatSeparator)){const y=zc(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),b=g.shift().trim(),h=g.join(this.formatSeparator).trim();return this.format(zc(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...o,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>p},{regex:this.regexp,safeValue:p=>this.escapeValue?this.escape(p):p}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof l=="function"){const h=l(t,i,o);s=Me(h)?h:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!Me(s)&&!this.useRawValueToEscape&&(s=Nc(s));const b=p.safeValue(s);if(t=t.replace(i[0],mb(b)),d?(p.regex.lastIndex+=b.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${Bn(l)}[ ]*{`));let f=`{${d[1]}`;u=d[0],f=this.interpolate(f,s);const p=f.match(/'/g),g=f.match(/"/g);((p?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${l}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!Me(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!Me(i))return i;Me(i)||(i=Nc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const bb=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Kc=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Mo(r),o),t[s]=a),a(n)}},yb=e=>(t,n,r)=>e(Mo(n),r)(t);class vb{constructor(t={}){this.logger=An.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Kc:yb;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Kc(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=bb(c);if(this.formats[l]){let f=u;try{const p=o?.formatParams?.[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||r;f=this.formats[l](u,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const xb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wb extends rs{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=An.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{ib(u.loaded,[i],s),xb(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Me(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Me(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Us=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Me(e[1])&&(t.defaultValue=e[1]),Me(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Hc=e=>(Me(e.ns)&&(e.ns=[e.ns]),Me(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Me(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),di=()=>{},_b=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Co extends rs{constructor(t={},n){if(super(),this.options=Hc(t),this.services={},this.logger=An,this.modules={external:[]},_b(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Me(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Us();this.options={...r,...this.options,...Hc(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?An.init(o(this.modules.logger),this.options):An.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=vb;const l=new Pc(this.options);this.store=new $c(this.options.resources,this.options);const d=this.services;d.logger=An,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new hb(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Uc(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new wb(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Fi(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=di),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=go(),u=()=>{const c=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(l,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=di){let r=n;const o=Me(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=go();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=di),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Wf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=go();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=Me(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Me(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const d=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const f={...this.options,...l};Array.isArray(i)&&!d&&(f.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Jr(l.keyPrefix,f));const p=this.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>(typeof b=="function"&&(b=Jr(b,f)),`${l.keyPrefix}${p}${b}`)):(typeof a=="function"&&(a=Jr(a,f)),g=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(g,l)};return Me(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=go();return this.options.ns?(Me(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=go();Me(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new Pc(Us());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Co(t,n);return r.createInstance=Co.createInstance,r}cloneInstance(t={},n=di){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Co(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,d)=>(l[d]={...u[c][d]},l),u[c]),u),{});i.store=new $c(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...Us().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new Uc(c)}return i.translator=new Fi(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const xt=Co.createInstance();xt.createInstance;xt.dir;xt.init;xt.loadResources;xt.reloadResources;xt.use;xt.changeLanguage;xt.getFixedT;xt.t;xt.exists;xt.setDefaultNamespace;xt.hasLoadedNamespace;xt.loadNamespaces;xt.loadLanguages;const{slice:Eb,forEach:kb}=[];function Sb(e){return kb.call(Eb.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Cb(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const qc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ab=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!qc.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!qc.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},jc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Ab(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Tb={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return jc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&jc.create(n,e,r,o,i)}},Db={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},Ob={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Kr=null;const Gc=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.localStorage!==null,!Kr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Kr=!1}return Kr};var Rb={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Gc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Gc()&&window.localStorage.setItem(n,e)}};let Hr=null;const Vc=()=>{if(Hr!==null)return Hr;try{if(Hr=typeof window<"u"&&window.sessionStorage!==null,!Hr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Hr=!1}return Hr};var Nb={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Vc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Vc()&&window.sessionStorage.setItem(n,e)}},Ib={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Mb={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Lb={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},$b={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Zf=!1;try{document.cookie,Zf=!0}catch{}const Xf=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Zf||Xf.splice(1,1);const Pb=()=>({order:Xf,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Qf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Sb(n,this.options||{},Pb()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Tb),this.addDetector(Db),this.addDetector(Rb),this.addDetector(Nb),this.addDetector(Ib),this.addDetector(Mb),this.addDetector(Lb),this.addDetector($b),this.addDetector(Ob)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Cb(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Qf.type="languageDetector";const Fb={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"需求列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",languageSwitch:"切换语言",langZh:"中文",langEn:"English"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",refreshList:"刷新项目列表",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",inputPlaceholder:"输入消息,Enter 发送…",draftPlaceholder:"输入消息,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败"},home:{specList:"需求列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Agent 创建中…",creatingHint:"Agent 正在创建 spec 文档…可在右下角 Agent 面板查看流式输出,文档落地后将自动跳转。",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",specPathCopyFailed:"复制 spec 文件路径失败"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",stash:"暂存",reviewChanges:"Review 变更",reviewing:"Review 中…",committing:"提交中…",discarding:"丢弃中…",stashing:"暂存中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:",noReport:"尚无 review 报告。点击「Review 变更」让 Agent 生成。",lastReview:"最近一次 review:{{time}}",reviewHint:"Review 下方变更文件,生成报告"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",debugMode:"debug 模式",debugModeHint:"深度分析调试,尝试解决疑难问题",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},Bb={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",languageSwitch:"Switch Language",langZh:"中文",langEn:"English"},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",refreshList:"Refresh project list",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",inputPlaceholder:"Type a message, Enter to send…",draftPlaceholder:"Type a message — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Agent creating…",creatingHint:"Agent is creating spec document… Watch streaming output in the Agent panel at bottom-right. Auto-navigate when ready.",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",specPathCopyFailed:"Failed to copy spec file path"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",stash:"Stash",reviewChanges:"Review Changes",reviewing:"Reviewing…",committing:"Committing…",discarding:"Discarding…",stashing:"Stashing…",commitPlaceholder:"commit message…",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: ",noReport:'No review report yet. Click "Review Changes" to generate.',lastReview:"Last review: {{time}}",reviewHint:"Review changed files below and generate report"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",debugMode:"debug mode",debugModeHint:"Deep analysis & debugging — tackle stubborn, hard-to-solve issues",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",custom:"Custom",agent:"Agent",cmd:"Command (cmd)",cmdPlaceholder:"e.g. /usr/local/bin/my-agent",args:"Arguments (args, space-separated)",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",cmdRequired:"Custom command cmd cannot be empty",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},Jf=xt.use(Qf).init({resources:{"zh-CN":{translation:Fb},en:{translation:Bb}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});Jf.then(()=>{});/**
2
+ * @license lucide-solid v1.24.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */var zb={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"},qr=zb,Ub=mt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Kb=B("<svg>"),Hb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},qb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Wc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gb=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vb=e=>{const[t,n]=_e(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=lt(Ub);return(()=>{var o=Kb();return Wn(o,Q(qr,{get width(){return t.size??r.size??qr.width},get height(){return t.size??r.size??qr.height},get stroke(){return t.color??r.color??qr.stroke},get"stroke-width"(){return de(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])},get class(){return qb("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Wc(Gb(t.name))}`,`lucide-${Wc(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Hb(n)?"true":void 0}},n),!0,!0),w(o,m(bt,{get each(){return t.iconNode},children:([i,s])=>m(Nf,Q({component:i},s))})),o})()},yt=Vb,Wb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yb=e=>m(yt,Q(e,{iconNode:Wb,name:"check"})),Yc=Yb,Zb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xb=e=>m(yt,Q(e,{iconNode:Zb,name:"chevron-down"})),Tu=Xb,Qb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jb=e=>m(yt,Q(e,{iconNode:Qb,name:"chevron-right"})),e1=Jb,t1=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],n1=e=>m(yt,Q(e,{iconNode:t1,name:"chevrons-left"})),e0=n1,r1=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],o1=e=>m(yt,Q(e,{iconNode:r1,name:"chevrons-right"})),t0=o1,i1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s1=e=>m(yt,Q(e,{iconNode:i1,name:"circle-question-mark"})),a1=s1,u1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c1=e=>m(yt,Q(e,{iconNode:u1,name:"copy"})),l1=c1,d1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],f1=e=>m(yt,Q(e,{iconNode:d1,name:"ellipsis"})),g1=f1,p1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],h1=e=>m(yt,Q(e,{iconNode:p1,name:"git-branch"})),m1=h1,b1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],y1=e=>m(yt,Q(e,{iconNode:b1,name:"git-merge"})),v1=y1,x1=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],w1=e=>m(yt,Q(e,{iconNode:x1,name:"languages"})),_1=w1,E1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k1=e=>m(yt,Q(e,{iconNode:E1,name:"loader-circle"})),sr=k1,S1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],C1=e=>m(yt,Q(e,{iconNode:S1,name:"maximize-2"})),A1=C1,T1=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],D1=e=>m(yt,Q(e,{iconNode:T1,name:"minimize-2"})),O1=D1,R1=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],N1=e=>m(yt,Q(e,{iconNode:R1,name:"paperclip"})),I1=N1,M1=[["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",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],L1=e=>m(yt,Q(e,{iconNode:M1,name:"pencil"})),$1=L1,P1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],F1=e=>m(yt,Q(e,{iconNode:P1,name:"plus"})),Du=F1,B1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],z1=e=>m(yt,Q(e,{iconNode:B1,name:"refresh-cw"})),U1=z1,K1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],H1=e=>m(yt,Q(e,{iconNode:K1,name:"send"})),os=H1,q1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],j1=e=>m(yt,Q(e,{iconNode:q1,name:"square"})),G1=j1,V1=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],W1=e=>m(yt,Q(e,{iconNode:V1,name:"upload"})),Y1=W1,Z1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],X1=e=>m(yt,Q(e,{iconNode:Z1,name:"x"})),Yo=X1;function rt(e){return`/api/projects/${encodeURIComponent(e)}`}async function ru(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ye(e,t){const n=await fetch(e,t);if(!n.ok){const r=await ru(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const ze={listSpecs:e=>Ye(`${rt(e)}/specs`),getSpec:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${rt(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await ru(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),triggerReview:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/review`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),gitOp:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getReview:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/review`),getDebug:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ye("/api/projects"),removeProject:e=>Ye(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ye(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ye(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),createDraft:e=>Ye(`${rt(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await ru(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ye(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ye(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${rt(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ye(`${rt(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ye(`${rt(e)}/sessions`),createSession:(e,t={})=>Ye(`${rt(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/session`)},[Q1,n0]=$("");function Qr(e){e&&n0(e)}function J1(){n0("")}const[Tt,ey]=$(ty());function ty(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function Zo(){const e=ns();return()=>e.projectId??Tt()}function en(e="",t){const n=Tt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[cr,r0]=$(!1);function ny(){r0(e=>!e)}function Bi(){r0(!1)}function is(e){ae(Bi),oe(()=>{if(!cr())return;const t=n=>{n.key!=="Escape"||e?.()||Bi()};window.addEventListener("keydown",t),ae(()=>window.removeEventListener("keydown",t))})}function ry(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class oy{clientId=ry();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let Pr=new oy;function ss(e){const t=e;return t.readyState=()=>Pr.readyState(),t}function iy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Pr.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ss(o)}function as(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Pr.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ss(o)}function o0(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Pr.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ss(r)}function i0(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Pr.subscribe(n,r=>{r==="list-updated"&&t()})}function s0(e){return Pr.subscribe("projects",t=>{t==="projects-changed"&&e()})}function sy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Pr.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return ss(o)}function a0(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}function u0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=u0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function c0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=u0(e))&&(r&&(r+=" "),r+=t);return r}const ay=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},uy=(e,t)=>({classGroupId:e,validator:t}),l0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zi="-",Zc=[],cy="arbitrary..",ly=e=>{const t=fy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return dy(s);const a=s.split(zi),u=a[0]===""&&a.length>1?1:0;return d0(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?ay(c,u):u:c||Zc}return n[s]||Zc}}},d0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=d0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(zi):e.slice(t).join(zi),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},dy=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?cy+r:void 0})(),fy=e=>{const{theme:t,classGroups:n}=e;return gy(n,t)},gy=(e,t)=>{const n=l0();for(const r in e){const o=e[r];Ou(o,n,r,t)}return n},Ou=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];py(s,t,n,r)}},py=(e,t,n,r)=>{if(typeof e=="string"){hy(e,t,n);return}if(typeof e=="function"){my(e,t,n,r);return}by(e,t,n,r)},hy=(e,t,n)=>{const r=e===""?t:f0(t,e);r.classGroupId=n},my=(e,t,n,r)=>{if(yy(e)){Ou(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uy(n,e))},by=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Ou(u,f0(t,a),n,r)}},f0=(e,t)=>{let n=e;const r=t.split(zi),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=l0(),n.nextPart.set(s,a)),n=a}return n},yy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},ou="!",Xc=":",xy=[],Qc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),wy=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let b=0;b<l;b++){const h=o[b];if(s===0&&a===0){if(h===Xc){i.push(o.slice(u,b)),u=b+1;continue}if(h==="/"){c=b;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const d=i.length===0?o:o.slice(u);let f=d,p=!1;d.endsWith(ou)?(f=d.slice(0,-1),p=!0):d.startsWith(ou)&&(f=d.slice(1),p=!0);const g=c&&c>u?c-u:void 0;return Qc(i,p,f,g)};if(t){const o=t+Xc,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qc(xy,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},_y=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Ey=e=>({cache:vy(e.cacheSize),parseClassName:wy(e),sortModifiers:_y(e),postfixLookupClassGroupIds:ky(e),...ly(e)}),ky=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Sy=/\s+/,Cy=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Sy);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:f,modifiers:p,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:h}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!h,v;if(y){const O=b.substring(0,h);v=r(O);const _=v&&s[v]?r(b):void 0;_&&_!==v&&(v=_,y=!1)}else v=r(b);if(!v){if(!y){c=d+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),k=g?x+ou:x,E=k+v;if(a.indexOf(E)>-1)continue;a.push(E);const S=o(v,y);for(let O=0;O<S.length;++O){const _=S[O];a.push(k+_)}c=d+(c.length>0?" "+c:c)}return c},Ay=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=g0(n))&&(o&&(o+=" "),o+=r);return o},g0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=g0(e[r]))&&(n&&(n+=" "),n+=t);return n},Ty=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Ey(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=Cy(u,n);return o(u,l),l};return i=s,(...u)=>i(Ay(...u))},Dy=[],_t=e=>{const t=n=>n[e]||Dy;return t.isThemeGetter=!0,t},p0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Oy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ry=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ny=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Iy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,My=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ly=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Oy.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),En=e=>!!e&&Number.isInteger(Number(e)),Ks=e=>e.endsWith("%")&&qe(e.slice(0,-1)),zn=e=>Ry.test(e),m0=()=>!0,$y=e=>Ny.test(e)&&!Iy.test(e),Ru=()=>!1,Py=e=>My.test(e),Fy=e=>Ly.test(e),By=e=>!ve(e)&&!xe(e),zy=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Uy=e=>br(e,v0,Ru),ve=e=>p0.test(e),kr=e=>br(e,x0,$y),Jc=e=>br(e,Yy,qe),Ky=e=>br(e,_0,m0),Hy=e=>br(e,w0,Ru),el=e=>br(e,b0,Ru),qy=e=>br(e,y0,Fy),fi=e=>br(e,E0,Py),xe=e=>h0.test(e),po=e=>Fr(e,x0),jy=e=>Fr(e,w0),tl=e=>Fr(e,b0),Gy=e=>Fr(e,v0),Vy=e=>Fr(e,y0),gi=e=>Fr(e,E0,!0),Wy=e=>Fr(e,_0,!0),br=(e,t,n)=>{const r=p0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fr=(e,t,n=!1)=>{const r=h0.exec(e);return r?r[1]?t(r[1]):n:!1},b0=e=>e==="position"||e==="percentage",y0=e=>e==="image"||e==="url",v0=e=>e==="length"||e==="size"||e==="bg-size",x0=e=>e==="length",Yy=e=>e==="number",w0=e=>e==="family-name",_0=e=>e==="number"||e==="weight",E0=e=>e==="shadow",Zy=()=>{const e=_t("color"),t=_t("font"),n=_t("text"),r=_t("font-weight"),o=_t("tracking"),i=_t("leading"),s=_t("breakpoint"),a=_t("container"),u=_t("spacing"),c=_t("radius"),l=_t("shadow"),d=_t("inset-shadow"),f=_t("text-shadow"),p=_t("drop-shadow"),g=_t("blur"),b=_t("perspective"),h=_t("aspect"),y=_t("ease"),v=_t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...k(),xe,ve],S=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],_=()=>[xe,ve,u],I=()=>[nr,"full","auto",..._()],L=()=>[En,"none","subgrid",xe,ve],T=()=>["auto",{span:["full",En,xe,ve]},En,xe,ve],R=()=>[En,"auto",xe,ve],M=()=>["auto","min","max","fr",xe,ve],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",..._()],j=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],U=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",..._()],z=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],P=()=>[e,xe,ve],X=()=>[...k(),tl,el,{position:[xe,ve]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",Gy,Uy,{size:[xe,ve]}],q=()=>[Ks,po,kr],W=()=>["","none","full",c,xe,ve],ie=()=>["",qe,po,kr],be=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[qe,Ks,tl,el],Ee=()=>["","none",g,xe,ve],Pe=()=>["none",qe,xe,ve],Xe=()=>["none",qe,xe,ve],gt=()=>[qe,xe,ve],ce=()=>[nr,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zn],breakpoint:[zn],color:[m0],container:[zn],"drop-shadow":[zn],ease:["in","out","in-out"],font:[By],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zn],shadow:[zn],spacing:["px",qe],text:[zn],"text-shadow":[zn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,ve,xe,h]}],container:["container"],"container-type":[{"@container":["","normal","size",xe,ve]}],"container-named":[zy],columns:[{columns:[qe,ve,xe,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[En,"auto",xe,ve]}],basis:[{basis:[nr,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,nr,"auto","initial","none",ve]}],grow:[{grow:["",qe,xe,ve]}],shrink:[{shrink:["",qe,xe,ve]}],order:[{order:[En,"first","last","none",xe,ve]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,po,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Wy,Ky]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ks,ve]}],"font-family":[{font:[jy,Hy,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,xe,ve]}],"line-clamp":[{"line-clamp":[qe,"none",xe,Jc]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",xe,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",xe,kr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[qe,"auto",xe,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[En,xe,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},En,xe,ve],radial:["",xe,ve],conic:[En,xe,ve]},Vy,qy]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,xe,ve]}],"outline-w":[{outline:["",qe,po,kr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",l,gi,fi]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,gi,fi]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[qe,kr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,gi,fi]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[qe,xe,ve]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[xe,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,ve]}],filter:[{filter:["","none",xe,ve]}],blur:[{blur:Ee()}],brightness:[{brightness:[qe,xe,ve]}],contrast:[{contrast:[qe,xe,ve]}],"drop-shadow":[{"drop-shadow":["","none",p,gi,fi]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",qe,xe,ve]}],"hue-rotate":[{"hue-rotate":[qe,xe,ve]}],invert:[{invert:["",qe,xe,ve]}],saturate:[{saturate:[qe,xe,ve]}],sepia:[{sepia:["",qe,xe,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,ve]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[qe,xe,ve]}],"backdrop-contrast":[{"backdrop-contrast":[qe,xe,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,xe,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,xe,ve]}],"backdrop-invert":[{"backdrop-invert":["",qe,xe,ve]}],"backdrop-opacity":[{"backdrop-opacity":[qe,xe,ve]}],"backdrop-saturate":[{"backdrop-saturate":[qe,xe,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,xe,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",xe,ve]}],ease:[{ease:["linear","initial",y,xe,ve]}],delay:[{delay:[qe,xe,ve]}],animate:[{animate:["none",v,xe,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,xe,ve]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Xe()}],"scale-x":[{"scale-x":Xe()}],"scale-y":[{"scale-y":Xe()}],"scale-z":[{"scale-z":Xe()}],"scale-3d":["scale-3d"],skew:[{skew:gt()}],"skew-x":[{"skew-x":gt()}],"skew-y":[{"skew-y":gt()}],transform:[{transform:[xe,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],zoom:[{zoom:[En,xe,ve]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,ve]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[qe,po,kr,Jc]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Xy=Ty(Zy);function St(...e){return Xy(c0(e))}function Qy(e){return(...t)=>{for(const n of e)n&&n(...t)}}const Z=e=>typeof e=="function"&&!e.length?e():e,nl=e=>Array.isArray(e)?e:e?[e]:[];function Jy(e,...t){return typeof e=="function"?e(...t):e}const ev=ae;function tv(e,t,n,r){return e.addEventListener(t,n,r),ev(e.removeEventListener.bind(e,t,n,r))}function nv(e,t,n,r){const o=()=>{nl(Z(e)).forEach(i=>{i&&nl(Z(t)).forEach(s=>tv(i,s,n,r))})};typeof e=="function"?oe(o):le(o)}const rv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function rl(e){const t={};let n;for(;n=rv.exec(e);)t[n[1]]=n[2];return t}function yr(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=rl(e)}else typeof t=="string"&&(t=rl(t));return{...e,...t}}function ft(...e){return Qy(e)}function ov(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function iu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iv(e){return typeof e=="number"}function Zr(e){return Object.prototype.toString.call(e)==="[object String]"}function k0(e){return typeof e=="function"}function Yn(e){return t=>`${e()}-${t}`}function Bt(e,t){return e?e===t||e.contains(t):!1}function _o(e,t=!1){const{activeElement:n}=nn(e);if(!n?.nodeName)return null;if(C0(n)&&n.contentDocument)return _o(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=nn(n).getElementById(r);if(o)return o}}return n}function S0(e){return nn(e).defaultView||window}function nn(e){return e?e.ownerDocument||e:document}function C0(e){return e.tagName==="IFRAME"}var us=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(us||{});function Nu(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function cs(){return Nu(/^Mac/i)}function sv(){return Nu(/^iPhone/i)}function av(){return Nu(/^iPad/i)||cs()&&navigator.maxTouchPoints>1}function uv(){return sv()||av()}function cv(){return cs()||uv()}function Ke(e,t){return t&&(k0(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Ot(e){return t=>{for(const n of e)Ke(t,n)}}function lv(e){return cs()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Dt(e){if(e)if(dv())e.focus({preventScroll:!0});else{const t=fv(e);e.focus(),gv(t)}}var pi=null;function dv(){if(pi==null){pi=!1;try{document.createElement("div").focus({get preventScroll(){return pi=!0,!0}})}catch{}}return pi}function fv(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function gv(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var A0=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],pv=[...A0,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Iu=`${A0.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,hv=pv.join(':not([hidden]):not([tabindex="-1"]),');function T0(e,t){const r=Array.from(e.querySelectorAll(Iu)).filter(ol);return t&&ol(e)&&r.unshift(e),r.forEach((o,i)=>{if(C0(o)&&o.contentDocument){const s=o.contentDocument.body,a=T0(s,!1);r.splice(i,1,...a)}}),r}function ol(e){return D0(e)&&!mv(e)}function D0(e){return e.matches(Iu)&&Mu(e)}function mv(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Mu(e,t){return e.nodeName!=="#comment"&&bv(e)&&yv(e,t)&&(!e.parentElement||Mu(e.parentElement,e))}function bv(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function yv(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function vv(e,t,n){const r=t?.tabbable?hv:Iu,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Mu(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function il(e){let t=e;for(;t&&!xv(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function xv(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function wv(){}function _v(e){return[e.clientX,e.clientY]}function O0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,f]=t[u],[,p]=t[u===0?s-1:u-1]||[0,0],g=(l-f)*(n-c)-(c-d)*(r-l);if(f<l){if(r>=f&&r<l){if(g===0)return!0;g>0&&(r===f?r>p&&(o=!o):o=!o)}}else if(l<f){if(r>l&&r<=f){if(g===0)return!0;g<0&&(r===f?r<p&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function $e(e,t){return Q(e,t)}var ho=new Map,sl=new Set;function al(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=ho.get(n.target);r||(r=new Set,ho.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=ho.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ho.delete(n.target)),ho.size===0)){for(const o of sl)o();sl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?al():document.addEventListener("DOMContentLoaded",al));function su(e,t){const n=ul(e,t,"left"),r=ul(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function ul(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Ev(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=il(e);for(;e&&o&&e!==n&&o!==n;)su(o,e),e=o,o=il(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Lu={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ls(e,t){const[n,r]=$(cl(t?.()));return oe(()=>{r(e()?.tagName.toLowerCase()||cl(t?.()))}),n}function cl(e){return Zr(e)?e:void 0}function Ze(e){const[t,n]=_e(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return m(Nf,Q(n,{get component(){return t.as}}))}var kv=Object.defineProperty,vr=(e,t)=>{for(var n in t)kv(e,n,{get:t[n],enumerable:!0})},Sv={};vr(Sv,{Button:()=>R0,Root:()=>uo});var Cv=["button","color","file","image","reset","submit"];function Av(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Cv.indexOf(e.type)!==-1:!1}function uo(e){let t;const n=$e({type:"button"},e),[r,o]=_e(n,["ref","type","disabled"]),i=ls(()=>t,()=>"button"),s=re(()=>{const c=i();return c==null?!1:Av({tagName:c,type:r.type})}),a=re(()=>i()==="input"),u=re(()=>i()==="a"&&t?.getAttribute("href")!=null);return m(Ze,Q({as:"button",ref(c){var l=ft(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return de(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return de(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var R0=uo;const ll=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dl=c0,N0=(e,t)=>n=>{var r;if(t?.variants==null)return dl(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const f=ll(l)||ll(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,f]=l;return f===void 0||(c[d]=f),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:f,...p}=l;return Object.entries(p).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...a}[b]):{...i,...a}[b]===h})?[...c,d,f]:c},[]);return dl(e,s,u,n?.class,n?.className)},Tv=N0("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Be=e=>{const[t,n]=_e(e,["class","variant","size"]);return m(R0,Q({get class(){return St(Tv({size:t.size,variant:t.variant}),t.class)}},n))};var Dv=B("<div>");const Ov=N0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),I0=e=>{const[t,n]=_e(e,["class","variant"]);return(()=>{var r=Dv();return Wn(r,Q({get class(){return St(Ov({variant:t.variant}),t.class)}},n),!1,!1),r})()},[Rv,M0]=$(xt.language||"zh-CN"),[Nv,Iv]=$(xt.isInitialized);Jf.then(()=>{M0(xt.language||"zh-CN"),Iv(!0)});xt.on("languageChanged",e=>M0(e));function D(e,t){return xt.t(e,t)}function L0(){return{t:D,lng:re(()=>Rv()),ready:re(()=>Nv()),changeLanguage:e=>xt.changeLanguage(e)}}const ds=()=>{const e=()=>cr()?D("specDetail.exitFullscreen"):D("specDetail.fullscreen");return m(Be,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:ny,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return cr()},get children(){return m(Y,{get when(){return cr()},get fallback(){return m(A1,{class:"h-3 w-3"})},get children(){return m(O1,{class:"h-3 w-3"})}})}})};var Mv=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Lv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $v(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Mv.has(n)}const t=e.split("-")[0];return Lv.has(t)}function Pv(e){return $v(e)?"rtl":"ltr"}function $0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Pv(e)}}var au=$0(),Eo=new Set;function fl(){au=$0();for(const e of Eo)e(au)}function Fv(){const[e,t]=$(au),n=re(()=>e());return Vt(()=>{Eo.size===0&&window.addEventListener("languagechange",fl),Eo.add(t),ae(()=>{Eo.delete(t),Eo.size===0&&window.removeEventListener("languagechange",fl)})}),{locale:()=>n().locale,direction:()=>n().direction}}var Bv=mt();function xr(){const e=Fv();return lt(Bv)||e}var Hs=new Map;function zv(e){const{locale:t}=xr(),n=re(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return re(()=>{const r=n();let o;return Hs.has(r)&&(o=Hs.get(r)),o||(o=new Intl.Collator(t(),e),Hs.set(r,o)),o})}const Uv=["top","right","bottom","left"],gr=Math.min,Qt=Math.max,Ui=Math.round,hi=Math.floor,Rn=e=>({x:e,y:e}),Kv={left:"right",right:"left",bottom:"top",top:"bottom"};function uu(e,t,n){return Qt(e,gr(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function P0(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function qn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Pu(e){return P0(qn(e))}function Hv(e,t,n){n===void 0&&(n=!1);const r=co(e),o=Pu(e),i=$u(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ki(s)),[s,Ki(s)]}function qv(e){const t=Ki(e);return[cu(e),t,cu(t)]}function cu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gl=["left","right"],pl=["right","left"],jv=["top","bottom"],Gv=["bottom","top"];function Vv(e,t,n){switch(e){case"top":case"bottom":return n?t?pl:gl:t?gl:pl;case"left":case"right":return t?jv:Gv;default:return[]}}function Wv(e,t,n,r){const o=co(e);let i=Vv(pr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(cu)))),i}function Ki(e){const t=pr(e);return Kv[t]+e.slice(t.length)}function Yv(e){return{top:0,right:0,bottom:0,left:0,...e}}function F0(e){return typeof e!="number"?Yv(e):{top:e,right:e,bottom:e,left:e}}function Hi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function hl(e,t,n){let{reference:r,floating:o}=e;const i=qn(t),s=Pu(t),a=$u(s),u=pr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(co(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function Zv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Br(t,e),g=F0(p),h=a[f?d==="floating"?"reference":"floating":d],y=Hi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Hi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(y.top-E.top+g.top)/k.y,bottom:(E.bottom-y.bottom+g.bottom)/k.y,left:(y.left-E.left+g.left)/k.x,right:(E.right-y.right+g.right)/k.x}}const Xv=50,Qv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Zv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=hl(c,r,u),f=r,p=0;const g={};for(let b=0;b<i.length;b++){const h=i[b];if(!h)continue;const{name:y,fn:v}=h,{x,y:k,data:E,reset:S}=await v({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=k??d,g[y]={...g[y],...E},S&&p<Xv&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:d}=hl(c,f,u)),b=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:g}},Jv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=Br(e,t)||{};if(c==null)return{};const d=F0(l),f={x:n,y:r},p=Pu(o),g=$u(p),b=await s.getDimensions(c),h=p==="y",y=h?"top":"left",v=h?"bottom":"right",x=h?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[p]-f[p]-i.floating[g],E=f[p]-i.reference[p],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let O=S?S[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(S)))&&(O=a.floating[x]||i.floating[g]);const _=k/2-E/2,I=O/2-b[g]/2-1,L=gr(d[y],I),T=gr(d[v],I),R=L,M=O-b[g]-T,C=O/2-b[g]/2+_,N=uu(R,C,M),F=!u.arrow&&co(o)!=null&&C!==N&&i.reference[g]/2-(C<R?L:T)-b[g]/2<0,j=F?C<R?C-R:C-M:0;return{[p]:f[p]+j,data:{[p]:N,centerOffset:C-N-j,...F&&{alignmentOffset:j}},reset:F}}}),ex=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...h}=Br(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=pr(o),v=qn(a),x=pr(a)===a,k=await(u.isRTL==null?void 0:u.isRTL(c.floating)),E=f||(x||!b?[Ki(a)]:qv(a)),S=g!=="none";!f&&S&&E.push(...Wv(a,b,g,k));const O=[a,...E],_=await u.detectOverflow(t,h),I=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&I.push(_[y]),d){const C=Hv(o,s,k);I.push(_[C[0]],_[C[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(C=>C<=0)){var T,R;const C=(((T=i.flip)==null?void 0:T.index)||0)+1,N=O[C];if(N&&(!(d==="alignment"?v!==qn(N):!1)||L.every(U=>qn(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:C,overflows:L},reset:{placement:N}};let F=(R=L.filter(j=>j.overflows[0]<=0).sort((j,U)=>j.overflows[1]-U.overflows[1])[0])==null?void 0:R.placement;if(!F)switch(p){case"bestFit":{var M;const j=(M=L.filter(U=>{if(S){const z=qn(U.placement);return z===v||z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(z=>z>0).reduce((z,P)=>z+P,0)]).sort((U,z)=>U[1]-z[1])[0])==null?void 0:M[0];j&&(F=j);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bl(e){return Uv.some(t=>e[t]>=0)}const tx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Br(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=ml(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:bl(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=ml(s,n.floating);return{data:{escapedOffsets:a,escaped:bl(a)}}}default:return{}}}}},nx=new Set(["left","top"]);async function rx(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pr(n),a=co(n),u=qn(n)==="y",c=nx.has(s)?-1:1,l=i&&u?-1:1,d=Br(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*l,y:f*c}:{x:f*c,y:p*l}}const ox=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await rx(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},ix=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...c}=Br(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),f=qn(pr(o)),p=P0(f);let g=l[p],b=l[f];if(s){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=g+d[y],k=g-d[v];g=uu(x,g,k)}if(a){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=b+d[y],k=b-d[v];b=uu(x,b,k)}const h=u.fn({...t,[p]:g,[f]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[f]:a}}}}}},sx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Br(e,t),l=await s.detectOverflow(t,c),d=pr(o),f=co(o),p=qn(o)==="y",{width:g,height:b}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const v=b-l.top-l.bottom,x=g-l.left-l.right,k=gr(b-l[h],v),E=gr(g-l[y],x),S=!t.middlewareData.shift;let O=k,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=v),S&&!f){const L=Qt(l.left,0),T=Qt(l.right,0),R=Qt(l.top,0),M=Qt(l.bottom,0);p?_=g-2*(L!==0||T!==0?L+T:Qt(l.left,l.right)):O=b-2*(R!==0||M!==0?R+M:Qt(l.top,l.bottom))}await u({...t,availableWidth:_,availableHeight:O});const I=await s.getDimensions(a.floating);return g!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function fs(){return typeof window<"u"}function lo(e){return B0(e)?(e.nodeName||"").toLowerCase():"#document"}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(B0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B0(e){return fs()?e instanceof Node||e instanceof tn(e).Node:!1}function mn(e){return fs()?e instanceof Element||e instanceof tn(e).Element:!1}function Zn(e){return fs()?e instanceof HTMLElement||e instanceof tn(e).HTMLElement:!1}function yl(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function Xo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ax(e){return/^(table|td|th)$/.test(lo(e))}function gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ux=/transform|translate|scale|rotate|perspective|filter/,cx=/paint|layout|strict|content/,Sr=e=>!!e&&e!=="none";let qs;function Fu(e){const t=mn(e)?bn(e):e;return Sr(t.transform)||Sr(t.translate)||Sr(t.scale)||Sr(t.rotate)||Sr(t.perspective)||!Bu()&&(Sr(t.backdropFilter)||Sr(t.filter))||ux.test(t.willChange||"")||cx.test(t.contain||"")}function lx(e){let t=hr(e);for(;Zn(t)&&!ro(t);){if(Fu(t))return t;if(gs(t))return null;t=hr(t)}return null}function Bu(){return qs==null&&(qs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qs}function ro(e){return/^(html|body|#document)$/.test(lo(e))}function bn(e){return tn(e).getComputedStyle(e)}function ps(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yl(e)&&e.host||Mn(e);return yl(t)?t.host:t}function z0(e){const t=hr(e);return ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&Xo(t)?t:z0(t)}function Lo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=z0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=tn(o);if(i){const a=lu(s);return t.concat(s,s.visualViewport||[],Xo(o)?o:[],a&&n?Lo(a):[])}else return t.concat(o,Lo(o,[],n))}function lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U0(e){const t=bn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ui(n)!==i||Ui(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function zu(e){return mn(e)?e:e.contextElement}function eo(e){const t=zu(e);if(!Zn(t))return Rn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=U0(t);let s=(i?Ui(n.width):n.width)/r,a=(i?Ui(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const dx=Rn(0);function K0(e){const t=tn(e);return!Bu()||!t.visualViewport?dx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let s=Rn(1);t&&(r?mn(r)&&(s=eo(r)):s=eo(e));const a=fx(i,n,r)?K0(i):Rn(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const f=tn(i),p=r&&mn(r)?tn(r):r;let g=f,b=lu(g);for(;b&&r&&p!==g;){const h=eo(b),y=b.getBoundingClientRect(),v=bn(b),x=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*h.x,k=y.top+(b.clientTop+parseFloat(v.paddingTop))*h.y;u*=h.x,c*=h.y,l*=h.x,d*=h.y,u+=x,c+=k,g=tn(b),b=lu(g)}}return Hi({width:l,height:d,x:u,y:c})}function hs(e,t){const n=ps(e).scrollLeft;return t?t.left+n:Mr(Mn(e)).left+n}function H0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function gx(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Mn(r),a=t?gs(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Rn(1);const l=Rn(0),d=Zn(r);if((d||!d&&!i)&&((lo(r)!=="body"||Xo(s))&&(u=ps(r)),d)){const p=Mr(r);c=eo(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const f=s&&!d&&!i?H0(s,u):Rn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+f.x,y:n.y*c.y-u.scrollTop*c.y+l.y+f.y}}function px(e){return Array.from(e.getClientRects())}function hx(e){const t=Mn(e),n=ps(e),r=e.ownerDocument.body,o=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+hs(e);const a=-n.scrollTop;return bn(r).direction==="rtl"&&(s+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const vl=25;function mx(e,t){const n=tn(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Bu();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=hs(r);if(c<=0){const l=r.ownerDocument,d=l.body,f=getComputedStyle(d),p=l.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=vl&&(i-=g)}else c<=vl&&(i+=c);return{width:i,height:s,x:a,y:u}}function bx(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zn(e)?eo(e):Rn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function xl(e,t,n){let r;if(t==="viewport")r=mx(e,n);else if(t==="document")r=hx(Mn(e));else if(mn(t))r=bx(t,n);else{const o=K0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Hi(r)}function q0(e,t){const n=hr(e);return n===t||!mn(n)||ro(n)?!1:bn(n).position==="fixed"||q0(n,t)}function yx(e,t){const n=t.get(e);if(n)return n;let r=Lo(e,[],!1).filter(a=>mn(a)&&lo(a)!=="body"),o=null;const i=bn(e).position==="fixed";let s=i?hr(e):e;for(;mn(s)&&!ro(s);){const a=bn(s),u=Fu(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Xo(s)&&!u&&q0(e,s))?r=r.filter(l=>l!==s):o=a,s=hr(s)}return t.set(e,r),r}function vx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?gs(t)?[]:yx(t,this._c):[].concat(n),r],a=xl(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let f=1;f<s.length;f++){const p=xl(t,s[f],o);u=Qt(p.top,u),c=gr(p.right,c),l=gr(p.bottom,l),d=Qt(p.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function xx(e){const{width:t,height:n}=U0(e);return{width:t,height:n}}function wx(e,t,n){const r=Zn(t),o=Mn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Rn(0);function c(){u.x=hs(o)}if(r||!r&&!i)if((lo(t)!=="body"||Xo(o))&&(a=ps(t)),r){const p=Mr(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?H0(o,a):Rn(0),d=s.left+a.scrollLeft-u.x-l.x,f=s.top+a.scrollTop-u.y-l.y;return{x:d,y:f,width:s.width,height:s.height}}function js(e){return bn(e).position==="static"}function wl(e,t){if(!Zn(e)||bn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function j0(e,t){const n=tn(e);if(gs(e))return n;if(!Zn(e)){let o=hr(e);for(;o&&!ro(o);){if(mn(o)&&!js(o))return o;o=hr(o)}return n}let r=wl(e,t);for(;r&&ax(r)&&js(r);)r=wl(r,t);return r&&ro(r)&&js(r)&&!Fu(r)?n:r||lx(e)||n}const _x=async function(e){const t=this.getOffsetParent||j0,n=this.getDimensions,r=await n(e.floating);return{reference:wx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ex(e){return bn(e).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:gx,getDocumentElement:Mn,getClippingRect:vx,getOffsetParent:j0,getElementRects:_x,getClientRects:px,getDimensions:xx,getScale:eo,isElement:mn,isRTL:Ex};function V0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kx(e,t){let n=null,r;const o=Mn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=hi(d),b=hi(o.clientWidth-(l+f)),h=hi(o.clientHeight-(d+p)),y=hi(l),x={rootMargin:-g+"px "+-b+"px "+-h+"px "+-y+"px",threshold:Qt(0,gr(1,u))||1};let k=!0;function E(S){const O=S[0].intersectionRatio;if(O!==u){if(!k)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!V0(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function Sx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=zu(e),l=o||i?[...c?Lo(c):[],...t?Lo(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?kx(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!u&&p.observe(c),t&&p.observe(t));let g,b=u?Mr(e):null;u&&h();function h(){const y=Mr(e);b&&!V0(b,y)&&n(),b=y,g=requestAnimationFrame(h)}return n(),()=>{var y;l.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const Cx=ox,Ax=ix,Tx=ex,Dx=sx,Ox=tx,Rx=Jv,Nx=(e,t,n)=>{const r=new Map,o={platform:G0,...n},i={...o.platform,_c:r};return Qv(e,t,{...o,platform:i})};var Ix=B('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Uu=mt();function Ku(){const e=lt(Uu);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var du=30,_l=du/2,Mx={top:180,right:-90,bottom:0,left:90};function Qo(e){const t=Ku(),n=$e({size:du},e),[r,o]=_e(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Lx(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*(du/r.size),d=()=>`rotate(${Mx[i()]} ${_l} ${_l}) translate(0 2)`;return m(Ze,Q({as:"div",ref(f){var p=ft(t.setArrowRef,r.ref);typeof p=="function"&&p(f)},"aria-hidden":"true",get style(){return yr({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var f=Ix(),p=f.firstChild,g=p.firstChild;return g.nextSibling,le(()=>we(p,"transform",d())),f}}))}function Lx(e){const[t,n]=$();return oe(()=>{const r=e();r&&n(S0(r).getComputedStyle(r))}),t}function $x(e){const t=Ku(),[n,r]=_e(e,["ref","style"]);return m(Ze,Q({as:"div",ref(o){var i=ft(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return yr({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function El(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Px(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?El(r):e?e.getBoundingClientRect():El()}}}function Fx(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Bx={top:"bottom",right:"left",bottom:"top",left:"right"};function zx(e,t){const[n,r]=e.split("-"),o=Bx[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Ux(e){const t=$e({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=$(),[o,i]=$(),[s,a]=$(t.placement),u=()=>Px(t.anchorRef?.(),t.getAnchorRect),{direction:c}=xr();async function l(){const f=u(),p=n(),g=o();if(!f||!p)return;const b=(g?.clientHeight||0)/2,h=typeof t.gutter=="number"?t.gutter+b:t.gutter??b;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const y=[Cx(({placement:S})=>{const O=!!S.split("-")[1];return{mainAxis:h,crossAxis:O?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const S=typeof t.flip=="string"?t.flip.split(" "):void 0;if(S!==void 0&&!S.every(Fx))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(Tx({padding:t.overflowPadding,fallbackPlacements:S}))}(t.slide||t.overlap)&&y.push(Ax({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(Dx({padding:t.overflowPadding,apply({availableWidth:S,availableHeight:O,rects:_}){const I=Math.round(_.reference.width);S=Math.floor(S),O=Math.floor(O),p.style.setProperty("--kb-popper-anchor-width",`${I}px`),p.style.setProperty("--kb-popper-content-available-width",`${S}px`),p.style.setProperty("--kb-popper-content-available-height",`${O}px`),t.sameWidth&&(p.style.width=`${I}px`),t.fitViewport&&(p.style.maxWidth=`${S}px`,p.style.maxHeight=`${O}px`)}})),t.hideWhenDetached&&y.push(Ox({padding:t.detachedPadding})),g&&y.push(Rx({element:g,padding:t.arrowPadding}));const v=await Nx(f,p,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...G0,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",zx(v.placement,c()));const x=Math.round(v.x),k=Math.round(v.y);let E;if(t.hideWhenDetached&&(E=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${k}px, 0)`,visibility:E}),g&&v.middlewareData.arrow){const{x:S,y:O}=v.middlewareData.arrow,_=v.placement.split("-")[0];Object.assign(g.style,{left:S!=null?`${S}px`:"",top:O!=null?`${O}px`:"",[_]:"100%"})}}oe(()=>{const f=u(),p=n();if(!f||!p)return;const g=Sx(f,p,l,{elementResize:typeof ResizeObserver=="function"});ae(g)}),oe(()=>{const f=n(),p=t.contentRef?.();!f||!p||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(p).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return m(Uu.Provider,{value:d,get children(){return t.children}})}var ms=Object.assign(Ux,{Arrow:Qo,Context:Uu,usePopperContext:Ku,Positioner:$x});function W0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Zr(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Zr(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Zr(u)||iv(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=W0({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function Kx(e,t=[]){return re(()=>{const n=W0({dataSource:Z(e.dataSource),getKey:Z(e.getKey),getTextValue:Z(e.getTextValue),getDisabled:Z(e.getDisabled),getSectionChildren:Z(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function Jo(e){const[t,n]=$(e.defaultValue?.()),r=re(()=>e.value?.()!==void 0),o=re(()=>r()?e.value?.():t());return[o,s=>{Et(()=>{const a=Jy(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Y0(e){const[t,n]=Jo(e);return[()=>t()??!1,n]}function Hx(e){const[t,n]=Jo(e);return[()=>t()??[],n]}var Kn=class Z0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Z0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function qx(e){const[t,n]=Jo(e);return[()=>t()??new Kn,n]}function X0(e){return cv()?e.altKey:e.ctrlKey}function Xr(e){return cs()?e.metaKey:e.ctrlKey}function kl(e){return new Kn(e)}function jx(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Gx(e){const t=$e({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=$(!1),[o,i]=$(),s=re(()=>{const b=Z(t.selectedKeys);return b!=null?kl(b):b}),a=re(()=>{const b=Z(t.defaultSelectedKeys);return b!=null?kl(b):new Kn}),[u,c]=qx({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=$(Z(t.selectionBehavior)),f=()=>Z(t.selectionMode),p=()=>Z(t.disallowEmptySelection)??!1,g=b=>{(Z(t.allowDuplicateSelectionEvents)||!jx(b,u()))&&c(b)};return oe(()=>{const b=u();Z(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),oe(()=>{d(Z(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:g}}function Vx(e){const[t,n]=$(""),[r,o]=$(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(Z(e.isDisabled))return;const a=Z(e.keyboardDelegate),u=Z(e.selectionManager);if(!a.getKeyForSearch)return;const c=Wx(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(f=>f+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&Yx(l)&&(l=l[0],d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Wx(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Yx(e){return e.split("").every(t=>t===e[0])}function Zx(e,t,n){const o=Q({selectOnFocus:()=>Z(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=xr();let a={top:0,left:0};nv(()=>Z(o.isVirtualized)?void 0:i(),"scroll",()=>{const h=i();h&&(a={top:h.scrollTop,left:h.scrollLeft})});const{typeSelectHandlers:u}=Vx({isDisabled:()=>Z(o.disallowTypeAhead),keyboardDelegate:()=>Z(o.keyboardDelegate),selectionManager:()=>Z(o.selectionManager)}),c=()=>Z(o.orientation)??"vertical",l=h=>{Ke(h,u.onKeyDown),h.altKey&&h.key==="Tab"&&h.preventDefault();const y=t();if(!y?.contains(h.target))return;const v=Z(o.selectionManager),x=Z(o.selectOnFocus),k=_=>{_!=null&&(v.setFocusedKey(_),h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&!X0(h)&&v.replaceSelection(_))},E=Z(o.keyboardDelegate),S=Z(o.shouldFocusWrap),O=v.focusedKey();switch(h.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(E.getKeyBelow){h.preventDefault();let _;O!=null?_=E.getKeyBelow(O):_=E.getFirstKey?.(),_==null&&S&&(_=E.getFirstKey?.(O)),k(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(E.getKeyAbove){h.preventDefault();let _;O!=null?_=E.getKeyAbove(O):_=E.getLastKey?.(),_==null&&S&&(_=E.getLastKey?.(O)),k(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(E.getKeyLeftOf){h.preventDefault();const _=s()==="rtl";let I;O!=null?I=E.getKeyLeftOf(O):I=_?E.getFirstKey?.():E.getLastKey?.(),k(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(E.getKeyRightOf){h.preventDefault();const _=s()==="rtl";let I;O!=null?I=E.getKeyRightOf(O):I=_?E.getLastKey?.():E.getFirstKey?.(),k(I)}break}case"Home":if(E.getFirstKey){h.preventDefault();const _=E.getFirstKey(O,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"End":if(E.getLastKey){h.preventDefault();const _=E.getLastKey(O,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"PageDown":if(E.getKeyPageBelow&&O!=null){h.preventDefault();const _=E.getKeyPageBelow(O);k(_)}break;case"PageUp":if(E.getKeyPageAbove&&O!=null){h.preventDefault();const _=E.getKeyPageAbove(O);k(_)}break;case"a":Xr(h)&&v.selectionMode()==="multiple"&&Z(o.disallowSelectAll)!==!0&&(h.preventDefault(),v.selectAll());break;case"Escape":h.defaultPrevented||(h.preventDefault(),Z(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!Z(o.allowsTabNavigation)){if(h.shiftKey)y.focus();else{const _=vv(y,{tabbable:!0});let I,L;do L=_.lastChild(),L&&(I=L);while(L);I&&!I.contains(document.activeElement)&&Dt(I)}break}}},d=h=>{const y=Z(o.selectionManager),v=Z(o.keyboardDelegate),x=Z(o.selectOnFocus);if(y.isFocused()){h.currentTarget.contains(h.target)||y.setFocused(!1);return}if(h.currentTarget.contains(h.target)){if(y.setFocused(!0),y.focusedKey()==null){const k=S=>{S!=null&&(y.setFocusedKey(S),x&&y.replaceSelection(S))},E=h.relatedTarget;E&&h.currentTarget.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_FOLLOWING?k(y.lastSelectedKey()??v.getLastKey?.()):k(y.firstSelectedKey()??v.getFirstKey?.())}else if(!Z(o.isVirtualized)){const k=i();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const E=k.querySelector(`[data-key="${y.focusedKey()}"]`);E&&(Dt(E),su(k,E))}}}},f=h=>{const y=Z(o.selectionManager);h.currentTarget.contains(h.relatedTarget)||y.setFocused(!1)},p=h=>{i()===h.target&&h.preventDefault()},g=()=>{const h=Z(o.autoFocus);if(!h)return;const y=Z(o.selectionManager),v=Z(o.keyboardDelegate);let x;h==="first"&&(x=v.getFirstKey?.()),h==="last"&&(x=v.getLastKey?.());const k=y.selectedKeys();k.size&&(x=k.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const E=t();E&&x==null&&!Z(o.shouldUseVirtualFocus)&&Dt(E)};return Vt(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),oe(kt([i,()=>Z(o.isVirtualized),()=>Z(o.selectionManager).focusedKey()],h=>{const[y,v,x]=h;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const k=y.querySelector(`[data-key="${x}"]`);k&&su(y,k)}})),{tabIndex:re(()=>{if(!Z(o.shouldUseVirtualFocus))return Z(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:d,onFocusOut:f}}function Q0(e,t){const n=()=>Z(e.selectionManager),r=()=>Z(e.key),o=()=>Z(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Xr(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>Z(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=v=>{u()&&(c=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!Z(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&Z(e.shouldSelectOnPressUp)&&Z(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{u()&&(Z(e.shouldSelectOnPressUp)&&!Z(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},p=v=>{!u()||!["Enter"," "].includes(v.key)||(X0(v)?n().toggleSelection(r()):i(v))},g=v=>{a()&&v.preventDefault()},b=v=>{const x=t();o()||a()||!x||v.target===x&&n().setFocusedKey(r())},h=re(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=re(()=>Z(e.virtualized)?void 0:r());return oe(kt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,k,E,S])=>{v&&x===E&&S&&!k&&document.activeElement!==v&&(e.focus?e.focus():Dt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:h,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:f,onKeyDown:p,onMouseDown:g,onFocus:b}}var Xx=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Kn(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Kn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Kn([t],t,t):new Kn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Kn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Kn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Sl=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Qx(e){const t=Gx(e),r=Kx({dataSource:()=>Z(e.dataSource),getKey:()=>Z(e.getKey),getTextValue:()=>Z(e.getTextValue),getDisabled:()=>Z(e.getDisabled),getSectionChildren:()=>Z(e.getSectionChildren),factory:i=>e.filter?new Sl(e.filter(i)):new Sl(i)},[()=>e.filter]),o=new Xx(r,t);return Ya(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var Jx=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function ew(e,t,n){const r=zv({usage:"search",sensitivity:"base"}),o=re(()=>{const i=Z(e.keyboardDelegate);return i||new Jx(e.collection,t,r)});return Zx({selectionManager:()=>Z(e.selectionManager),keyboardDelegate:o,autoFocus:()=>Z(e.autoFocus),deferAutoFocus:()=>Z(e.deferAutoFocus),shouldFocusWrap:()=>Z(e.shouldFocusWrap),disallowEmptySelection:()=>Z(e.disallowEmptySelection),selectOnFocus:()=>Z(e.selectOnFocus),disallowTypeAhead:()=>Z(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Z(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Z(e.allowsTabNavigation),isVirtualized:()=>Z(e.isVirtualized),scrollToKey:i=>Z(e.scrollToKey)?.(i),orientation:()=>Z(e.orientation)},t)}var J0=mt();function eg(){return lt(J0)}function tw(){const e=eg();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function tg(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function nw(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&tg(o,n))return r+1}return 0}function rw(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:tg(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function ng(e,t){const n=rw(e);e!==n&&t(n)}function ow(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return nn(r).body}function iw(e,t){oe(()=>{const n=setTimeout(()=>{ng(e(),t)});ae(()=>clearTimeout(n))})}function sw(e,t){if(typeof IntersectionObserver!="function"){iw(e,t);return}let n=[];oe(()=>{const r=()=>{const s=!!n.length;n=e(),s&&ng(e(),t)},o=ow(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ae(()=>i.disconnect())})}function aw(e={}){const[t,n]=Hx({value:()=>Z(e.items),onChange:i=>e.onItemsChange?.(i)});sw(t,n);const r=i=>(n(s=>{const a=nw(s,i);return ov(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>m(J0.Provider,{value:{registerItem:r},get children(){return i.children}})}}function uw(e){const t=tw(),n=$e({shouldRegisterItem:!0},e);oe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ae(r)})}var qi="data-kb-top-layer",rg,fu=!1,Nn=[];function $o(e){return Nn.findIndex(t=>t.node===e)}function cw(e){return Nn[$o(e)]}function lw(e){return Nn.length>0&&Nn[Nn.length-1].node===e}function og(){return Nn.filter(e=>e.isPointerBlocking)}function dw(){return[...og()].slice(-1)[0]}function Hu(){return og().length>0}function ig(e){const t=$o(dw()?.node);return $o(e)<t}function fw(e){Nn.push(e)}function gw(e){const t=$o(e);t<0||Nn.splice(t,1)}function pw(){for(const{node:e}of Nn)e.style.pointerEvents=ig(e)?"none":"auto"}function hw(e){if(Hu()&&!fu){const t=nn(e);rg=document.body.style.pointerEvents,t.body.style.pointerEvents="none",fu=!0}}function mw(e){if(Hu())return;const t=nn(e);t.body.style.pointerEvents=rg,t.body.style.length===0&&t.body.removeAttribute("style"),fu=!1}var Xt={layers:Nn,isTopMostLayer:lw,hasPointerBlockingLayer:Hu,isBelowPointerBlockingLayer:ig,addLayer:fw,removeLayer:gw,indexOf:$o,find:cw,assignPointerEventToLayers:pw,disableBodyPointerEvents:hw,restoreBodyPointerEvents:mw},Gs="focusScope.autoFocusOnMount",Vs="focusScope.autoFocusOnUnmount",Cl={bubbles:!1,cancelable:!0},Al={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=iu(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=iu(this.stack,e),this.active()?.resume()}};function sg(e,t){const[n,r]=$(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=g=>e.onMountAutoFocus?.(g),a=g=>e.onUnmountAutoFocus?.(g),u=()=>nn(t()),c=()=>{const g=u().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Lu),g},l=()=>{const g=t();return g?T0(g,!0).filter(b=>!b.hasAttribute("data-focus-trap")):[]},d=()=>{const g=l();return g.length>0?g[0]:null},f=()=>{const g=l();return g.length>0?g[g.length-1]:null},p=()=>{const g=t();if(!g)return!1;const b=_o(g);return!b||Bt(g,b)?!1:D0(b)};oe(()=>{const g=t();if(!g)return;Al.add(o);const b=_o(g);if(!Bt(g,b)){const y=new CustomEvent(Gs,Cl);g.addEventListener(Gs,s),g.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{Dt(d()),_o(g)===b&&Dt(g)},0)}ae(()=>{g.removeEventListener(Gs,s),setTimeout(()=>{const y=new CustomEvent(Vs,Cl);p()&&y.preventDefault(),g.addEventListener(Vs,a),g.dispatchEvent(y),y.defaultPrevented||Dt(b??u().body),g.removeEventListener(Vs,a),Al.remove(o)},0)})}),oe(()=>{const g=t();if(!g||!Z(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${qi}]`)||(Bt(g,v)?i=v:Dt(i))},h=y=>{const x=y.relatedTarget??_o(g);x?.closest(`[${qi}]`)||Bt(g,x)||Dt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",h),ae(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",h)})}),oe(()=>{const g=t();if(!g||!Z(e.trapFocus)||n())return;const b=c();g.insertAdjacentElement("afterbegin",b);const h=c();g.insertAdjacentElement("beforeend",h);function y(x){const k=d(),E=f();x.relatedTarget===k?Dt(E):Dt(k)}b.addEventListener("focusin",y),h.addEventListener("focusin",y);const v=new MutationObserver(x=>{for(const k of x)k.previousSibling===h&&(h.remove(),g.insertAdjacentElement("beforeend",h)),k.nextSibling===b&&(b.remove(),g.insertAdjacentElement("afterbegin",b))});v.observe(g,{childList:!0,subtree:!1}),ae(()=>{b.removeEventListener("focusin",y),h.removeEventListener("focusin",y),b.remove(),h.remove(),v.disconnect()})})}var bw="data-live-announcer";function ag(e){oe(()=>{Z(e.isDisabled)||ae(yw(Z(e.targets),Z(e.root)))})}var mo=new WeakMap,an=[];function yw(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const f of u.querySelectorAll(`[${bw}], [${qi}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const p of n)if(f.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let f=l.nextNode();for(;f!=null;)i(f),f=l.nextNode()}},i=u=>{const c=mo.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),mo.set(u,c+1))};an.length&&an[an.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return an.push(a),()=>{s.disconnect();for(const u of r){const c=mo.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),mo.delete(u)):mo.set(u,c-1)}a===an[an.length-1]?(an.pop(),an.length&&an[an.length-1].observe()):an.splice(an.indexOf(a),1)}}function vw(e){const t=n=>{n.key===us.Escape&&e.onEscapeKeyDown?.(n)};oe(()=>{if(Z(e.isDisabled))return;const n=e.ownerDocument?.()??nn();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}var Tl="interactOutside.pointerDownOutside",Dl="interactOutside.focusOutside";function xw(e,t){let n,r=wv;const o=()=>nn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${qi}]`)||!Bt(o(),f)||Bt(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const p=t(),g=d.target;if(!p||!g||!u(d))return;const b=Ot([i,a]);g.addEventListener(Tl,b,{once:!0});const h=new CustomEvent(Tl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||lv(d)&&d.button===0}});g.dispatchEvent(h)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},l=d=>{const f=t(),p=d.target;if(!f||!p||!u(d))return;const g=Ot([s,a]);p.addEventListener(Dl,g,{once:!0});const b=new CustomEvent(Dl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});p.dispatchEvent(b)};oe(()=>{Z(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ae(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var ug=mt();function ww(){return lt(ug)}function qu(e){let t;const n=ww(),[r,o]=_e(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n?.registerNestedLayer(d);return()=>{i.delete(d),f?.()}};xw({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>Bt(f(),d))||[...i].some(f=>Bt(f,d)):!1,onPointerDownOutside:d=>{!t||Xt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Xt.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),vw({ownerDocument:()=>nn(t),onEscapeKeyDown:d=>{!t||!Xt.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Vt(()=>{if(!t)return;Xt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Xt.assignPointerEventToLayers(),Xt.disableBodyPointerEvents(t),ae(()=>{t&&(Xt.removeLayer(t),d?.(),Xt.assignPointerEventToLayers(),Xt.restoreBodyPointerEvents(t))})}),oe(kt([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const p=Xt.find(d);p&&p.isPointerBlocking!==f&&(p.isPointerBlocking=f,Xt.assignPointerEventToLayers()),f&&Xt.disableBodyPointerEvents(d),ae(()=>{Xt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return m(ug.Provider,{value:l,get children(){return m(Ze,Q({as:"div",ref(d){var f=ft(p=>t=p,r.ref);typeof f=="function"&&f(d)}},o))}})}function ei(e={}){const[t,n]=Y0({value:()=>Z(e.open),defaultValue:()=>!!Z(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function cg(e={}){const[t,n]=Y0({value:()=>Z(e.isSelected),defaultValue:()=>!!Z(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(i)},toggle:()=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(!t())}}}function Lt(e){return t=>(e(t),()=>e(void 0))}var Pt=e=>typeof e=="function"?e():e,gu=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},mi=new Map,_w=e=>{oe(()=>{const t=Pt(e.style)??{},n=Pt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=mi.get(e.key);o?o.activeCount++:mi.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ae(()=>{const i=mi.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}mi.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Ol=_w,Ew=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},kw=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Sw=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=Ew(o,t),d=l-u-r*c;(c!==0||d!==0)&&kw(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Rl,Nl]=$([]),Cw=e=>Rl().indexOf(e)===Rl().length-1,Aw=e=>{const t=Q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=qt();let r=[0,0],o=null,i=null;oe(()=>{Pt(t.enabled)&&(Nl(c=>[...c,n]),ae(()=>{Nl(c=>c.filter(l=>l!==n))}))}),oe(()=>{if(!Pt(t.enabled)||!Pt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Pt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];l>0&&(Pt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,f.push({key:"--scrollbar-width",value:`${l}px`}));const p=window.scrollY,g=window.scrollX;Ol({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Pt(t.restoreScrollPosition)&&l>0&&window.scrollTo(g,p)}})}else Ol({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),oe(()=>{!Cw(n)||!Pt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=Il(c),o=null,i=null},a=c=>{const l=c.target,d=Pt(t.element),f=Tw(c),p=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=p==="x"?f[0]:f[1],b=Ml(l,p,g,d);let h;d&&gu(d,l)?h=!b:h=!0,h&&c.cancelable&&c.preventDefault()},u=c=>{const l=Pt(t.element),d=c.target;let f;if(c.touches.length===2)f=!Pt(t.allowPinchZoom);else{if(o==null||i===null){const p=Il(c).map((b,h)=>r[h]-b),g=Math.abs(p[0])>Math.abs(p[1])?"x":"y";o=g,i=g==="x"?p[0]:p[1]}if(d.type==="range")f=!1;else{const p=Ml(d,o,i,l);l&&gu(l,d)?f=!p:f=!0}}f&&c.cancelable&&c.preventDefault()}},Tw=e=>[e.deltaX,e.deltaY],Il=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Ml=(e,t,n,r)=>{const o=r!==null&&gu(r,e),[i,s]=Sw(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Dw=Aw,lg=Dw,Ow=e=>{const t=re(()=>{const s=Pt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=$(Pt(e.show)?"present":"hidden");let i="none";return oe(s=>{const a=Pt(e.show);return Et(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),oe(()=>{const s=Pt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ae(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},Rw=Ow,Lr=Rw,Nw=mt();function bs(){return lt(Nw)}var Iw=mt();function dg(){return lt(Iw)}var fg=mt();function gg(){return lt(fg)}function Xn(){const e=gg();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var pg=mt();function ju(){const e=lt(pg);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var hg=mt();function Ln(){const e=lt(hg);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Gu(e){let t;const n=Ln(),r=Xn(),o=$e({id:n.generateId(`item-${qt()}`)},e),[i,s]=_e(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),p=()=>r.listState().selectionManager(),g=()=>s.id,b=()=>p().focusedKey()===g(),h=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};uw({getItem:()=>({ref:()=>t,type:"item",key:g(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=Q0({key:g,selectionManager:p,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=I=>{Ke(I,i.onPointerMove),I.pointerType==="mouse"&&(i.disabled?r.onItemLeave(I):(r.onItemEnter(I),I.defaultPrevented||(Dt(I.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=I=>{Ke(I,i.onPointerLeave),I.pointerType==="mouse"&&r.onItemLeave(I)},k=I=>{Ke(I,i.onPointerUp),!i.disabled&&I.button===0&&h()},E=I=>{if(Ke(I,i.onKeyDown),!I.repeat&&!i.disabled)switch(I.key){case"Enter":case" ":h();break}},S=re(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),O=re(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":b()?"":void 0})),_={isChecked:()=>i.checked,dataset:O,setLabelRef:f,generateId:Yn(()=>s.id),registerLabel:Lt(u),registerDescription:Lt(l)};return m(pg.Provider,{value:_,get children(){return m(Ze,Q({as:"div",ref(I){var L=ft(T=>t=T,i.ref);typeof L=="function"&&L(I)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return S()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return y.dataKey()},get onPointerDown(){return Ot([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return Ot([k,y.onPointerUp])},get onClick(){return Ot([i.onClick,y.onClick])},get onKeyDown(){return Ot([E,y.onKeyDown])},get onMouseDown(){return Ot([i.onMouseDown,y.onMouseDown])},get onFocus(){return Ot([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},O,s))}})}function mg(e){const t=$e({closeOnSelect:!1},e),[n,r]=_e(t,["checked","defaultChecked","onChange","onSelect"]),o=cg({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return m(Gu,Q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Po={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Po.next(e==="ltr"?"rtl":"ltr",t)},Ll={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function bg(e){const t=Ln(),n=Xn(),r=bs(),{direction:o}=xr(),i=$e({id:t.generateId("trigger")},e),[s,a]=_e(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=ls(()=>n.triggerRef(),()=>"button"),l=re(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);oe(kt(()=>r?.value(),y=>{l()&&y===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=y=>{Ke(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},p=y=>{Ke(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},g=y=>{if(Ke(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Ll.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Ev(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Ll.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Po.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Po.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{Ke(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},h=y=>{Ke(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return oe(()=>ae(n.registerTriggerId(s.id))),m(uo,Q({ref(y){var v=ft(n.setTriggerRef,s.ref);typeof v=="function"&&v(y)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:f,onMouseOver:b,onClick:p,onKeyDown:g,onFocus:h,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function yg(e){let t;const n=Ln(),r=Xn(),o=bs(),i=dg(),{direction:s}=xr(),a=$e({id:n.generateId(`content-${qt()}`)},e),[u,c]=_e(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=ew({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);sg({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=x=>{if(Bt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Po.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Po.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},g=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},b=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},h=x=>{Ke(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(Ke(x,u.onPointerMove),x.pointerType!=="mouse")return;const k=x.target,E=l!==x.clientX;Bt(x.currentTarget,k)&&E&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};oe(()=>ae(r.registerContentId(u.id))),ae(()=>r.setContentRef(void 0));const v={ref:ft(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Ot([u.onKeyDown,f.onKeyDown,p]),onMouseDown:Ot([u.onMouseDown,f.onMouseDown]),onFocusIn:Ot([u.onFocusIn,f.onFocusIn]),onFocusOut:Ot([u.onFocusOut,f.onFocusOut]),onPointerEnter:h,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return m(Y,{get when(){return r.contentPresent()},get children(){return m(Y,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return m(Ze,Q({as:"div"},()=>r.dataset(),v,c))},get children(){return m(ms.Positioner,{get children(){return m(qu,Q({get disableOutsidePointerEvents(){return de(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return yr({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:g,onFocusOutside:b,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function Mw(e){let t;const n=Ln(),r=Xn(),[o,i]=_e(e,["ref"]);return lg({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),m(yg,Q({ref(s){var a=ft(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var vg=mt();function Lw(){const e=lt(vg);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Vu(e){const t=Ln(),n=$e({id:t.generateId(`group-${qt()}`)},e),[r,o]=$(),i={generateId:Yn(()=>n.id),registerLabelId:Lt(o)};return m(vg.Provider,{value:i,get children(){return m(Ze,Q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function xg(e){const t=Lw(),n=$e({id:t.generateId("label")},e),[r,o]=_e(n,["id"]);return oe(()=>ae(t.registerLabelId(r.id))),m(Ze,Q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function wg(e){const t=Xn(),n=$e({children:"▼"},e);return m(Ze,Q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function _g(e){return m(Gu,Q({role:"menuitem",closeOnSelect:!0},e))}function Eg(e){const t=ju(),n=$e({id:t.generateId("description")},e),[r,o]=_e(n,["id"]);return oe(()=>ae(t.registerDescription(r.id))),m(Ze,Q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function kg(e){const t=ju(),n=$e({id:t.generateId("indicator")},e),[r,o]=_e(n,["forceMount"]);return m(Y,{get when(){return r.forceMount||t.isChecked()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}function Sg(e){const t=ju(),n=$e({id:t.generateId("label")},e),[r,o]=_e(n,["ref","id"]);return oe(()=>ae(t.registerLabel(r.id))),m(Ze,Q({as:"div",ref(i){var s=ft(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Cg(e){const t=Xn();return m(Y,{get when(){return t.contentPresent()},get children(){return m(Su,e)}})}var Ag=mt();function $w(){const e=lt(Ag);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Tg(e){const n=Ln().generateId(`radiogroup-${qt()}`),r=$e({id:n},e),[o,i]=_e(r,["value","defaultValue","onChange","disabled"]),[s,a]=Jo({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return m(Ag.Provider,{value:u,get children(){return m(Vu,i)}})}function Dg(e){const t=$w(),n=$e({closeOnSelect:!1},e),[r,o]=_e(n,["value","onSelect"]);return m(Gu,Q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function Pw(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function Fw(e,t){return t?O0([e.clientX,e.clientY],t):!1}function Og(e){const t=Ln(),n=eg(),r=gg(),o=bs(),i=dg(),s=$e({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=_e(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[f,p]=$(),[g,b]=$(),[h,y]=$(),[v,x]=$(),[k,E]=$(!0),[S,O]=$(u.placement),[_,I]=$([]),[L,T]=$([]),{DomCollectionProvider:R}=aw({items:L,onItemsChange:T}),M=ei({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:ee=>a.onOpenChange?.(ee)}),{present:C}=Lr({show:()=>t.forceMount()||M.isOpen(),element:()=>v()??null}),N=Qx({selectionMode:"none",dataSource:L}),F=ee=>{E(ee),M.open()},j=(ee=!1)=>{M.close(),ee&&r&&r.close(!0)},U=ee=>{E(ee),M.toggle()},z=()=>{const ee=v();ee&&(Dt(ee),N.selectionManager().setFocused(!0),N.selectionManager().setFocusedKey(void 0))},P=()=>{i!=null?setTimeout(()=>z()):z()},X=ee=>{I(Ee=>[...Ee,ee]);const fe=r?.registerNestedMenu(ee);return()=>{I(Ee=>iu(Ee,ee)),fe?.()}},V=ee=>d===l?.side&&Fw(ee,l?.area),ne=ee=>{V(ee)&&ee.preventDefault()},q=ee=>{V(ee)||P()},W=ee=>{V(ee)&&ee.preventDefault()};ag({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[v(),..._()].filter(Boolean)}),oe(()=>{const ee=v();if(!ee||!r)return;const fe=r.registerNestedMenu(ee);ae(()=>{fe()})}),oe(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),..._()])}),oe(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(h()?.focus(),o.autoFocusMenu()&&F(!0)):j())}),oe(()=>{r!==void 0||o===void 0||M.isOpen()&&o.setValue(t.value())}),ae(()=>{r===void 0&&o?.unregisterMenu(t.value())});const be={dataset:re(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresent:C,nestedMenus:_,currentPlacement:S,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>N,parentMenuContext:()=>r,triggerRef:h,contentRef:v,triggerId:f,contentId:g,setTriggerRef:y,setContentRef:x,open:F,close:j,toggle:U,focusContent:P,onItemEnter:ne,onItemLeave:q,onTriggerLeave:W,setPointerDir:ee=>d=ee,setPointerGraceTimeoutId:ee=>c=ee,setPointerGraceIntent:ee=>l=ee,registerNestedMenu:X,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:Lt(p),registerContentId:Lt(b)};return m(R,{get children(){return m(fg.Provider,{value:be,get children(){return m(Y,{when:i===void 0,get fallback(){return u.children},get children(){return m(ms,Q({anchorRef:h,contentRef:v,onCurrentPlacementChange:O},u))}})}})}})}function Rg(e){const{direction:t}=xr();return m(Og,Q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Bw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Ng(e){const t=Xn(),n=Ln(),[r,o]=_e(e,["onFocusOutside","onKeyDown"]),{direction:i}=xr();return m(yg,Q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Bt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Ke(l,r.onKeyDown);const d=Bt(l.currentTarget,l.target),f=Bw.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;d&&f&&p&&(t.close(),Dt(t.triggerRef()))}},o))}var $l=["Enter"," "],zw={open:(e,t)=>e==="ltr"?[...$l,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...$l,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Ig(e){let t;const n=Ln(),r=Xn(),o=$e({id:n.generateId(`sub-trigger-${qt()}`)},e),[i,s]=_e(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=xr(),l=()=>i.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},f=()=>r.listState().collection(),p=()=>d().focusedKey()===l(),g=Q0({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=x=>{Ke(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},h=x=>{if(Ke(x,i.onPointerMove),x.pointerType!=="mouse")return;const k=r.parentMenuContext();if(k?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){k?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),k?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),Dt(x.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(Ke(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const k=r.parentMenuContext(),E=r.contentRef();if(E){k?.setPointerGraceIntent({area:Pw(r.currentPlacement(),x,E),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(k?.pointerGraceTimeoutId());const S=window.setTimeout(()=>{k?.setPointerGraceIntent(null)},300);k?.setPointerGraceTimeoutId(S)}else{if(k?.onTriggerLeave(x),x.defaultPrevented)return;k?.setPointerGraceIntent(null)}k?.onItemLeave(x)},v=x=>{Ke(x,i.onKeyDown),!x.repeat&&(i.disabled||zw.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return oe(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ae(x)}),oe(kt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ae(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),oe(()=>ae(r.registerTriggerId(i.id))),ae(()=>{u()}),m(Ze,Q({as:"div",ref(x){var k=ft(E=>{r.setTriggerRef(E),t=E},i.ref);typeof k=="function"&&k(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return de(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return p()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Ot([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return Ot([i.onPointerUp,g.onPointerUp])},get onClick(){return Ot([b,g.onClick])},get onKeyDown(){return Ot([v,g.onKeyDown])},get onMouseDown(){return Ot([i.onMouseDown,g.onMouseDown])},get onFocus(){return Ot([i.onFocus,g.onFocus])},onPointerMove:h,onPointerLeave:y},()=>r.dataset(),s))}function Uw(e){const t=bs(),n=`menu-${qt()}`,r=$e({id:n,modal:!0},e),[o,i]=_e(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:Yn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return m(hg.Provider,{value:a,get children(){return m(Og,Q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var Kw={};vr(Kw,{Root:()=>ys,Separator:()=>Mg});function ys(e){let t;const n=$e({orientation:"horizontal"},e),[r,o]=_e(n,["ref","orientation"]),i=ls(()=>t,()=>"hr");return m(Ze,Q({as:"hr",ref(s){var a=ft(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Mg=ys,Hw={};vr(Hw,{Arrow:()=>Qo,CheckboxItem:()=>mg,Content:()=>Lg,DropdownMenu:()=>Vn,Group:()=>Vu,GroupLabel:()=>xg,Icon:()=>wg,Item:()=>_g,ItemDescription:()=>Eg,ItemIndicator:()=>kg,ItemLabel:()=>Sg,Portal:()=>Cg,RadioGroup:()=>Tg,RadioItem:()=>Dg,Root:()=>$g,Separator:()=>ys,Sub:()=>Rg,SubContent:()=>Ng,SubTrigger:()=>Ig,Trigger:()=>bg});function Lg(e){const t=Ln(),n=Xn(),[r,o]=_e(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return m(Mw,Q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||Dt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function $g(e){const t=`dropdownmenu-${qt()}`,n=$e({id:t},e);return m(Uw,n)}var Vn=Object.assign($g,{Arrow:Qo,CheckboxItem:mg,Content:Lg,Group:Vu,GroupLabel:xg,Icon:wg,Item:_g,ItemDescription:Eg,ItemIndicator:kg,ItemLabel:Sg,Portal:Cg,RadioGroup:Tg,RadioItem:Dg,Separator:ys,Sub:Rg,SubContent:Ng,SubTrigger:Ig,Trigger:bg});const Pg=Vn.Trigger;Vn.Group;Vn.Sub;Vn.RadioGroup;const Fg=e=>{const t=Q({gutter:4,flip:!1},e);return m(Vn,t)},Bg=e=>{const[t,n]=_e(e,["class"]);return m(Vn.Portal,{get children(){return m(Vn.Content,Q({get class(){return St("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},pu=e=>{const[t,n]=_e(e,["class","inset"]);return m(Vn.Item,Q({get class(){return St("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))};var qw={};vr(qw,{CloseButton:()=>Ug,Content:()=>Kg,Description:()=>Hg,Dialog:()=>jn,Overlay:()=>qg,Portal:()=>jg,Root:()=>Gg,Title:()=>Vg,Trigger:()=>Wg,useDialogContext:()=>wr});var zg=mt();function wr(){const e=lt(zg);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Ug(e){const t=wr(),[n,r]=_e(e,["aria-label","onClick"]);return m(uo,Q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ke(i,n.onClick),t.close()}},r))}function Kg(e){let t;const n=wr(),r=$e({id:n.generateId("content")},e),[o,i]=_e(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=f=>{o.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{o.onFocusOutside?.(f),n.modal()&&f.preventDefault()},l=f=>{o.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Bt(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{o.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),Dt(n.triggerRef())):(f.defaultPrevented||(s||Dt(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return ag({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),lg({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),sg({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),oe(()=>ae(n.registerContentId(i.id))),m(Y,{get when(){return n.contentPresent()},get children(){return m(qu,Q({ref(f){var p=ft(g=>{n.setContentRef(g),t=g},o.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return de(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function Hg(e){const t=wr(),n=$e({id:t.generateId("description")},e),[r,o]=_e(n,["id"]);return oe(()=>ae(t.registerDescriptionId(r.id))),m(Ze,Q({as:"p",get id(){return r.id}},o))}function qg(e){const t=wr(),[n,r]=_e(e,["ref","style","onPointerDown"]),o=i=>{Ke(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return m(Y,{get when(){return t.overlayPresent()},get children(){return m(Ze,Q({as:"div",ref(i){var s=ft(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return yr({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function jg(e){const t=wr();return m(Y,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return m(Su,e)}})}var Pl={dismiss:"Dismiss"};function Gg(e){const t=`dialog-${qt()}`,n=$e({id:t,modal:!0,translations:Pl},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(),b=ei({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),h=()=>n.forceMount||b.isOpen(),{present:y}=Lr({show:h,element:()=>c()??null}),{present:v}=Lr({show:h,element:()=>d()??null}),x={translations:()=>n.translations??Pl,isOpen:b.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:p,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:f,overlayPresent:y,contentPresent:v,close:b.close,toggle:b.toggle,setTriggerRef:g,generateId:Yn(()=>n.id),registerContentId:Lt(o),registerTitleId:Lt(s),registerDescriptionId:Lt(u)};return m(zg.Provider,{value:x,get children(){return n.children}})}function Vg(e){const t=wr(),n=$e({id:t.generateId("title")},e),[r,o]=_e(n,["id"]);return oe(()=>ae(t.registerTitleId(r.id))),m(Ze,Q({as:"h2",get id(){return r.id}},o))}function Wg(e){const t=wr(),[n,r]=_e(e,["ref","onClick"]);return m(uo,Q({ref(i){var s=ft(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Ke(i,n.onClick),t.toggle()}},r))}var jn=Object.assign(Gg,{CloseButton:Ug,Content:Kg,Description:Hg,Overlay:qg,Portal:jg,Title:Vg,Trigger:Wg}),jw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),Yg=B("<div>");const Cn=jn;jn.Trigger;const Fo=e=>{const[t,n]=_e(e,["class","children"]);return m(jn.Portal,{get children(){return[m(jn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(jn.Content,{get class(){return St("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[de(()=>t.children),m(jn.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return jw()}})]}})]}})},Bo=e=>{const[t,n]=_e(e,["class"]);return m(jn.Title,Q({get class(){return St("text-lg font-semibold text-foreground",t.class)}},n))},Wu=e=>{const[t,n]=_e(e,["class"]);return m(jn.Description,Q({get class(){return St(" text-muted-foreground",t.class)}},n))},zo=e=>{const[t,n]=_e(e,["class"]);return(()=>{var r=Yg();return Wn(r,Q({get class(){return St("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Uo=e=>{const[t,n]=_e(e,["class"]);return(()=>{var r=Yg();return Wn(r,Q({get class(){return St("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var Gw=B("<input>");const Ao=e=>{const[t,n]=_e(e,["class"]);return(()=>{var r=Gw();return Wn(r,Q({get class(){return St("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var Vw=B("<div><div class=sonner-spinner>"),Ww=B("<div class=sonner-loading-bar>"),Yw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>'),Zw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"clip-rule=evenodd>'),Xw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"clip-rule=evenodd>'),Qw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"clip-rule=evenodd>'),Jw=B('<svg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),e_=B("<div>"),t_=B("<button data-close-button>"),n_=B("<div data-icon>"),r_=B("<div data-description>"),o_=B("<li tabindex=0 data-sonner-toast><div data-content><div data-title>"),i_=B("<button data-button data-cancel>"),s_=B("<button data-button data-action>"),a_=B('<section tabindex=-1 aria-live=polite aria-relevant="additions text"aria-atomic=false data-react-aria-top-layer>'),u_=B("<ol tabindex=-1 data-sonner-toaster style=--width:356px>");function c_(e,{insertAt:t}={}){if(typeof document>"u")return;const n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}c_(`html[dir=ltr],
7
+ [data-sonner-toaster][dir=ltr] {
8
+ --toast-icon-margin-start: -3px;
9
+ --toast-icon-margin-end: 4px;
10
+ --toast-svg-margin-start: -1px;
11
+ --toast-svg-margin-end: 0px;
12
+ --toast-button-margin-start: auto;
13
+ --toast-button-margin-end: 0;
14
+ --toast-close-button-start: 0;
15
+ --toast-close-button-end: unset;
16
+ --toast-close-button-transform: translate(-35%, -35%);
17
+ }
18
+ html[dir=rtl],
19
+ [data-sonner-toaster][dir=rtl] {
20
+ --toast-icon-margin-start: 4px;
21
+ --toast-icon-margin-end: -3px;
22
+ --toast-svg-margin-start: 0px;
23
+ --toast-svg-margin-end: -1px;
24
+ --toast-button-margin-start: 0;
25
+ --toast-button-margin-end: auto;
26
+ --toast-close-button-start: unset;
27
+ --toast-close-button-end: 0;
28
+ --toast-close-button-transform: translate(35%, -35%);
29
+ }
30
+ [data-sonner-toaster] {
31
+ position: fixed;
32
+ width: var(--width);
33
+ font-family:
34
+ ui-sans-serif,
35
+ system-ui,
36
+ -apple-system,
37
+ BlinkMacSystemFont,
38
+ Segoe UI,
39
+ Roboto,
40
+ Helvetica Neue,
41
+ Arial,
42
+ Noto Sans,
43
+ sans-serif,
44
+ Apple Color Emoji,
45
+ Segoe UI Emoji,
46
+ Segoe UI Symbol,
47
+ Noto Color Emoji;
48
+ --gray1: hsl(0, 0%, 99%);
49
+ --gray2: hsl(0, 0%, 97.3%);
50
+ --gray3: hsl(0, 0%, 95.1%);
51
+ --gray4: hsl(0, 0%, 93%);
52
+ --gray5: hsl(0, 0%, 90.9%);
53
+ --gray6: hsl(0, 0%, 88.7%);
54
+ --gray7: hsl(0, 0%, 85.8%);
55
+ --gray8: hsl(0, 0%, 78%);
56
+ --gray9: hsl(0, 0%, 56.1%);
57
+ --gray10: hsl(0, 0%, 52.3%);
58
+ --gray11: hsl(0, 0%, 43.5%);
59
+ --gray12: hsl(0, 0%, 9%);
60
+ --border-radius: 8px;
61
+ box-sizing: border-box;
62
+ padding: 0;
63
+ margin: 0;
64
+ list-style: none;
65
+ outline: none;
66
+ z-index: 999999999;
67
+ transition: transform 400ms ease;
68
+ }
69
+ @media (hover: none) and (pointer: coarse) {
70
+ [data-sonner-toaster][data-lifted=true] {
71
+ transform: none;
72
+ }
73
+ }
74
+ [data-sonner-toaster][data-x-position=right] {
75
+ right: var(--offset-right);
76
+ }
77
+ [data-sonner-toaster][data-x-position=left] {
78
+ left: var(--offset-left);
79
+ }
80
+ [data-sonner-toaster][data-x-position=center] {
81
+ left: 50%;
82
+ transform: translateX(-50%);
83
+ }
84
+ [data-sonner-toaster][data-y-position=top] {
85
+ top: var(--offset-top);
86
+ }
87
+ [data-sonner-toaster][data-y-position=bottom] {
88
+ bottom: var(--offset-bottom);
89
+ }
90
+ [data-sonner-toast] {
91
+ --y: translateY(100%);
92
+ --lift-amount: calc(var(--lift) * var(--gap));
93
+ z-index: var(--z-index);
94
+ position: absolute;
95
+ opacity: 0;
96
+ transform: var(--y);
97
+ touch-action: none;
98
+ transition:
99
+ transform 400ms,
100
+ opacity 400ms,
101
+ height 400ms,
102
+ box-shadow 200ms;
103
+ box-sizing: border-box;
104
+ outline: none;
105
+ overflow-wrap: anywhere;
106
+ }
107
+ [data-sonner-toast][data-styled=true] {
108
+ padding: 16px;
109
+ background: var(--normal-bg);
110
+ border: 1px solid var(--normal-border);
111
+ color: var(--normal-text);
112
+ border-radius: var(--border-radius);
113
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
114
+ width: var(--width);
115
+ font-size: 13px;
116
+ display: flex;
117
+ align-items: center;
118
+ gap: 6px;
119
+ }
120
+ [data-sonner-toast]:focus-visible {
121
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
122
+ }
123
+ [data-sonner-toast][data-y-position=top] {
124
+ top: 0;
125
+ --y: translateY(-100%);
126
+ --lift: 1;
127
+ --lift-amount: calc(1 * var(--gap));
128
+ }
129
+ [data-sonner-toast][data-y-position=bottom] {
130
+ bottom: 0;
131
+ --y: translateY(100%);
132
+ --lift: -1;
133
+ --lift-amount: calc(var(--lift) * var(--gap));
134
+ }
135
+ [data-sonner-toast][data-styled=true] [data-description] {
136
+ font-weight: 400;
137
+ line-height: 1.4;
138
+ color: #3f3f3f;
139
+ }
140
+ [data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description] {
141
+ color: inherit;
142
+ }
143
+ [data-sonner-toaster][data-sonner-theme=dark] [data-description] {
144
+ color: hsl(0, 0%, 91%);
145
+ }
146
+ [data-sonner-toast][data-styled=true] [data-title] {
147
+ font-weight: 500;
148
+ line-height: 1.5;
149
+ color: inherit;
150
+ }
151
+ [data-sonner-toast][data-styled=true] [data-icon] {
152
+ display: flex;
153
+ height: 16px;
154
+ width: 16px;
155
+ position: relative;
156
+ justify-content: flex-start;
157
+ align-items: center;
158
+ flex-shrink: 0;
159
+ margin-left: var(--toast-icon-margin-start);
160
+ margin-right: var(--toast-icon-margin-end);
161
+ }
162
+ [data-sonner-toast][data-promise=true] [data-icon] > svg {
163
+ opacity: 0;
164
+ transform: scale(0.8);
165
+ transform-origin: center;
166
+ animation: sonner-fade-in 300ms ease forwards;
167
+ }
168
+ [data-sonner-toast][data-styled=true] [data-icon] > * {
169
+ flex-shrink: 0;
170
+ }
171
+ [data-sonner-toast][data-styled=true] [data-icon] svg {
172
+ margin-left: var(--toast-svg-margin-start);
173
+ margin-right: var(--toast-svg-margin-end);
174
+ }
175
+ [data-sonner-toast][data-styled=true] [data-content] {
176
+ display: flex;
177
+ flex-direction: column;
178
+ gap: 2px;
179
+ }
180
+ [data-sonner-toast][data-styled=true] [data-button] {
181
+ border-radius: 4px;
182
+ padding-left: 8px;
183
+ padding-right: 8px;
184
+ height: 24px;
185
+ font-size: 12px;
186
+ color: var(--normal-bg);
187
+ background: var(--normal-text);
188
+ margin-left: var(--toast-button-margin-start);
189
+ margin-right: var(--toast-button-margin-end);
190
+ border: none;
191
+ font-weight: 500;
192
+ cursor: pointer;
193
+ outline: none;
194
+ display: flex;
195
+ align-items: center;
196
+ flex-shrink: 0;
197
+ transition: opacity 400ms, box-shadow 200ms;
198
+ }
199
+ [data-sonner-toast][data-styled=true] [data-button]:focus-visible {
200
+ box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
201
+ }
202
+ [data-sonner-toast][data-styled=true] [data-button]:first-of-type {
203
+ margin-left: var(--toast-button-margin-start);
204
+ margin-right: var(--toast-button-margin-end);
205
+ }
206
+ [data-sonner-toast][data-styled=true] [data-cancel] {
207
+ color: var(--normal-text);
208
+ background: rgba(0, 0, 0, 0.08);
209
+ }
210
+ [data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel] {
211
+ background: rgba(255, 255, 255, 0.3);
212
+ }
213
+ [data-sonner-toast][data-styled=true] [data-close-button] {
214
+ position: absolute;
215
+ left: var(--toast-close-button-start);
216
+ right: var(--toast-close-button-end);
217
+ top: 0;
218
+ height: 20px;
219
+ width: 20px;
220
+ display: flex;
221
+ justify-content: center;
222
+ align-items: center;
223
+ padding: 0;
224
+ color: var(--normal-text);
225
+ background: var(--normal-bg);
226
+ border: 1px solid var(--normal-border);
227
+ transform: var(--toast-close-button-transform);
228
+ border-radius: 50%;
229
+ cursor: pointer;
230
+ z-index: 1;
231
+ transition:
232
+ opacity 100ms,
233
+ background 200ms,
234
+ border-color 200ms;
235
+ }
236
+ [data-sonner-toast][data-styled=true] [data-close-button]:focus-visible {
237
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
238
+ }
239
+ [data-sonner-toast][data-styled=true] [data-disabled=true] {
240
+ cursor: not-allowed;
241
+ }
242
+ [data-sonner-toast][data-styled=true]:hover [data-close-button]:hover {
243
+ background: var(--gray2);
244
+ border-color: var(--gray5);
245
+ }
246
+ [data-sonner-toast][data-swiping=true]::before {
247
+ content: "";
248
+ position: absolute;
249
+ left: -100%;
250
+ right: -100%;
251
+ height: 100%;
252
+ z-index: -1;
253
+ }
254
+ [data-sonner-toast][data-y-position=top][data-swiping=true]::before {
255
+ bottom: 50%;
256
+ transform: scaleY(3) translateY(50%);
257
+ }
258
+ [data-sonner-toast][data-y-position=bottom][data-swiping=true]::before {
259
+ top: 50%;
260
+ transform: scaleY(3) translateY(-50%);
261
+ }
262
+ [data-sonner-toast][data-swiping=false][data-removed=true]::before {
263
+ content: "";
264
+ position: absolute;
265
+ inset: 0;
266
+ transform: scaleY(2);
267
+ }
268
+ [data-sonner-toast][data-expanded=true]::after {
269
+ content: "";
270
+ position: absolute;
271
+ left: 0;
272
+ height: calc(var(--gap) + 1px);
273
+ bottom: 100%;
274
+ width: 100%;
275
+ }
276
+ [data-sonner-toast][data-mounted=true] {
277
+ --y: translateY(0);
278
+ opacity: 1;
279
+ }
280
+ [data-sonner-toast][data-expanded=false][data-front=false] {
281
+ --scale: var(--toasts-before) * 0.05 + 1;
282
+ --y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
283
+ height: var(--front-toast-height);
284
+ }
285
+ [data-sonner-toast] > * {
286
+ transition: opacity 400ms;
287
+ }
288
+ [data-sonner-toast][data-x-position=right] {
289
+ right: 0;
290
+ }
291
+ [data-sonner-toast][data-x-position=left] {
292
+ left: 0;
293
+ }
294
+ [data-sonner-toast][data-expanded=false][data-front=false][data-styled=true] > * {
295
+ opacity: 0;
296
+ }
297
+ [data-sonner-toast][data-visible=false] {
298
+ opacity: 0;
299
+ pointer-events: none;
300
+ }
301
+ [data-sonner-toast][data-mounted=true][data-expanded=true] {
302
+ --y: translateY(calc(var(--lift) * var(--offset)));
303
+ height: var(--initial-height);
304
+ }
305
+ [data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false] {
306
+ --y: translateY(calc(var(--lift) * -100%));
307
+ opacity: 0;
308
+ }
309
+ [data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true] {
310
+ --y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
311
+ opacity: 0;
312
+ }
313
+ [data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false] {
314
+ --y: translateY(40%);
315
+ opacity: 0;
316
+ transition: transform 500ms, opacity 200ms;
317
+ }
318
+ [data-sonner-toast][data-removed=true][data-front=false]::before {
319
+ height: calc(var(--initial-height) + 20%);
320
+ }
321
+ [data-sonner-toast][data-swiping=true] {
322
+ transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
323
+ transition: none;
324
+ }
325
+ [data-sonner-toast][data-swiped=true] {
326
+ -webkit-user-select: none;
327
+ user-select: none;
328
+ }
329
+ [data-sonner-toast][data-swipe-out=true][data-y-position=bottom],
330
+ [data-sonner-toast][data-swipe-out=true][data-y-position=top] {
331
+ animation-duration: 200ms;
332
+ animation-timing-function: ease-out;
333
+ animation-fill-mode: forwards;
334
+ }
335
+ [data-sonner-toast][data-swipe-out=true][data-swipe-direction=left] {
336
+ animation-name: swipe-out-left;
337
+ }
338
+ [data-sonner-toast][data-swipe-out=true][data-swipe-direction=right] {
339
+ animation-name: swipe-out-right;
340
+ }
341
+ [data-sonner-toast][data-swipe-out=true][data-swipe-direction=up] {
342
+ animation-name: swipe-out-up;
343
+ }
344
+ [data-sonner-toast][data-swipe-out=true][data-swipe-direction=down] {
345
+ animation-name: swipe-out-down;
346
+ }
347
+ @keyframes swipe-out-left {
348
+ from {
349
+ transform: var(--y) translateX(var(--swipe-amount-x));
350
+ opacity: 1;
351
+ }
352
+ to {
353
+ transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
354
+ opacity: 0;
355
+ }
356
+ }
357
+ @keyframes swipe-out-right {
358
+ from {
359
+ transform: var(--y) translateX(var(--swipe-amount-x));
360
+ opacity: 1;
361
+ }
362
+ to {
363
+ transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
364
+ opacity: 0;
365
+ }
366
+ }
367
+ @keyframes swipe-out-up {
368
+ from {
369
+ transform: var(--y) translateY(var(--swipe-amount-y));
370
+ opacity: 1;
371
+ }
372
+ to {
373
+ transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
374
+ opacity: 0;
375
+ }
376
+ }
377
+ @keyframes swipe-out-down {
378
+ from {
379
+ transform: var(--y) translateY(var(--swipe-amount-y));
380
+ opacity: 1;
381
+ }
382
+ to {
383
+ transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
384
+ opacity: 0;
385
+ }
386
+ }
387
+ @media (max-width: 600px) {
388
+ [data-sonner-toaster] {
389
+ position: fixed;
390
+ right: var(--mobile-offset-right);
391
+ left: var(--mobile-offset-left);
392
+ width: 100%;
393
+ }
394
+ [data-sonner-toaster][dir=rtl] {
395
+ left: calc(var(--mobile-offset-left) * -1);
396
+ }
397
+ [data-sonner-toaster] [data-sonner-toast] {
398
+ left: 0;
399
+ right: 0;
400
+ width: calc(100% - var(--mobile-offset-left) * 2);
401
+ }
402
+ [data-sonner-toaster][data-x-position=left] {
403
+ left: var(--mobile-offset-left);
404
+ }
405
+ [data-sonner-toaster][data-y-position=bottom] {
406
+ bottom: var(--mobile-offset-bottom);
407
+ }
408
+ [data-sonner-toaster][data-y-position=top] {
409
+ top: var(--mobile-offset-top);
410
+ }
411
+ [data-sonner-toaster][data-x-position=center] {
412
+ left: var(--mobile-offset-left);
413
+ right: var(--mobile-offset-right);
414
+ transform: none;
415
+ }
416
+ }
417
+ [data-sonner-toaster][data-sonner-theme=light] {
418
+ --normal-bg: #fff;
419
+ --normal-border: var(--gray4);
420
+ --normal-text: var(--gray12);
421
+ --success-bg: hsl(143, 85%, 96%);
422
+ --success-border: hsl(145, 92%, 87%);
423
+ --success-text: hsl(140, 100%, 27%);
424
+ --info-bg: hsl(208, 100%, 97%);
425
+ --info-border: hsl(221, 91%, 93%);
426
+ --info-text: hsl(210, 92%, 45%);
427
+ --warning-bg: hsl(49, 100%, 97%);
428
+ --warning-border: hsl(49, 91%, 84%);
429
+ --warning-text: hsl(31, 92%, 45%);
430
+ --error-bg: hsl(359, 100%, 97%);
431
+ --error-border: hsl(359, 100%, 94%);
432
+ --error-text: hsl(360, 100%, 45%);
433
+ }
434
+ [data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true] {
435
+ --normal-bg: #000;
436
+ --normal-border: hsl(0, 0%, 20%);
437
+ --normal-text: var(--gray1);
438
+ }
439
+ [data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true] {
440
+ --normal-bg: #fff;
441
+ --normal-border: var(--gray3);
442
+ --normal-text: var(--gray12);
443
+ }
444
+ [data-sonner-toaster][data-sonner-theme=dark] {
445
+ --normal-bg: #000;
446
+ --normal-bg-hover: hsl(0, 0%, 12%);
447
+ --normal-border: hsl(0, 0%, 20%);
448
+ --normal-border-hover: hsl(0, 0%, 25%);
449
+ --normal-text: var(--gray1);
450
+ --success-bg: hsl(150, 100%, 6%);
451
+ --success-border: hsl(147, 100%, 12%);
452
+ --success-text: hsl(150, 86%, 65%);
453
+ --info-bg: hsl(215, 100%, 6%);
454
+ --info-border: hsl(223, 43%, 17%);
455
+ --info-text: hsl(216, 87%, 65%);
456
+ --warning-bg: hsl(64, 100%, 6%);
457
+ --warning-border: hsl(60, 100%, 9%);
458
+ --warning-text: hsl(46, 87%, 65%);
459
+ --error-bg: hsl(358, 76%, 10%);
460
+ --error-border: hsl(357, 89%, 16%);
461
+ --error-text: hsl(358, 100%, 81%);
462
+ }
463
+ [data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button] {
464
+ background: var(--normal-bg);
465
+ border-color: var(--normal-border);
466
+ color: var(--normal-text);
467
+ }
468
+ [data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover {
469
+ background: var(--normal-bg-hover);
470
+ border-color: var(--normal-border-hover);
471
+ }
472
+ [data-rich-colors=true][data-sonner-toast][data-type=success] {
473
+ background: var(--success-bg);
474
+ border-color: var(--success-border);
475
+ color: var(--success-text);
476
+ }
477
+ [data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button] {
478
+ background: var(--success-bg);
479
+ border-color: var(--success-border);
480
+ color: var(--success-text);
481
+ }
482
+ [data-rich-colors=true][data-sonner-toast][data-type=info] {
483
+ background: var(--info-bg);
484
+ border-color: var(--info-border);
485
+ color: var(--info-text);
486
+ }
487
+ [data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button] {
488
+ background: var(--info-bg);
489
+ border-color: var(--info-border);
490
+ color: var(--info-text);
491
+ }
492
+ [data-rich-colors=true][data-sonner-toast][data-type=warning] {
493
+ background: var(--warning-bg);
494
+ border-color: var(--warning-border);
495
+ color: var(--warning-text);
496
+ }
497
+ [data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button] {
498
+ background: var(--warning-bg);
499
+ border-color: var(--warning-border);
500
+ color: var(--warning-text);
501
+ }
502
+ [data-rich-colors=true][data-sonner-toast][data-type=error] {
503
+ background: var(--error-bg);
504
+ border-color: var(--error-border);
505
+ color: var(--error-text);
506
+ }
507
+ [data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button] {
508
+ background: var(--error-bg);
509
+ border-color: var(--error-border);
510
+ color: var(--error-text);
511
+ }
512
+ .sonner-loading-wrapper {
513
+ --size: 16px;
514
+ height: var(--size);
515
+ width: var(--size);
516
+ position: absolute;
517
+ inset: 0;
518
+ z-index: 10;
519
+ }
520
+ .sonner-loading-wrapper[data-visible=false] {
521
+ transform-origin: center;
522
+ animation: sonner-fade-out 0.2s ease forwards;
523
+ }
524
+ .sonner-spinner {
525
+ position: relative;
526
+ top: 50%;
527
+ left: 50%;
528
+ height: var(--size);
529
+ width: var(--size);
530
+ }
531
+ .sonner-loading-bar {
532
+ animation: sonner-spin 1.2s linear infinite;
533
+ background: var(--gray11);
534
+ border-radius: 6px;
535
+ height: 8%;
536
+ left: -10%;
537
+ position: absolute;
538
+ top: -3.9%;
539
+ width: 24%;
540
+ }
541
+ .sonner-loading-bar:nth-child(1) {
542
+ animation-delay: -1.2s;
543
+ transform: rotate(0.0001deg) translate(146%);
544
+ }
545
+ .sonner-loading-bar:nth-child(2) {
546
+ animation-delay: -1.1s;
547
+ transform: rotate(30deg) translate(146%);
548
+ }
549
+ .sonner-loading-bar:nth-child(3) {
550
+ animation-delay: -1s;
551
+ transform: rotate(60deg) translate(146%);
552
+ }
553
+ .sonner-loading-bar:nth-child(4) {
554
+ animation-delay: -0.9s;
555
+ transform: rotate(90deg) translate(146%);
556
+ }
557
+ .sonner-loading-bar:nth-child(5) {
558
+ animation-delay: -0.8s;
559
+ transform: rotate(120deg) translate(146%);
560
+ }
561
+ .sonner-loading-bar:nth-child(6) {
562
+ animation-delay: -0.7s;
563
+ transform: rotate(150deg) translate(146%);
564
+ }
565
+ .sonner-loading-bar:nth-child(7) {
566
+ animation-delay: -0.6s;
567
+ transform: rotate(180deg) translate(146%);
568
+ }
569
+ .sonner-loading-bar:nth-child(8) {
570
+ animation-delay: -0.5s;
571
+ transform: rotate(210deg) translate(146%);
572
+ }
573
+ .sonner-loading-bar:nth-child(9) {
574
+ animation-delay: -0.4s;
575
+ transform: rotate(240deg) translate(146%);
576
+ }
577
+ .sonner-loading-bar:nth-child(10) {
578
+ animation-delay: -0.3s;
579
+ transform: rotate(270deg) translate(146%);
580
+ }
581
+ .sonner-loading-bar:nth-child(11) {
582
+ animation-delay: -0.2s;
583
+ transform: rotate(300deg) translate(146%);
584
+ }
585
+ .sonner-loading-bar:nth-child(12) {
586
+ animation-delay: -0.1s;
587
+ transform: rotate(330deg) translate(146%);
588
+ }
589
+ @keyframes sonner-fade-in {
590
+ 0% {
591
+ opacity: 0;
592
+ transform: scale(0.8);
593
+ }
594
+ 100% {
595
+ opacity: 1;
596
+ transform: scale(1);
597
+ }
598
+ }
599
+ @keyframes sonner-fade-out {
600
+ 0% {
601
+ opacity: 1;
602
+ transform: scale(1);
603
+ }
604
+ 100% {
605
+ opacity: 0;
606
+ transform: scale(0.8);
607
+ }
608
+ }
609
+ @keyframes sonner-spin {
610
+ 0% {
611
+ opacity: 1;
612
+ }
613
+ 100% {
614
+ opacity: 0.15;
615
+ }
616
+ }
617
+ @media (prefers-reduced-motion) {
618
+ [data-sonner-toast],
619
+ [data-sonner-toast] > *,
620
+ .sonner-loading-bar {
621
+ transition: none !important;
622
+ animation: none !important;
623
+ }
624
+ }
625
+ .sonner-loader {
626
+ position: absolute;
627
+ top: 50%;
628
+ left: 50%;
629
+ transform: translate(-50%, -50%);
630
+ transform-origin: center;
631
+ transition: opacity 200ms, transform 200ms;
632
+ }
633
+ .sonner-loader[data-visible=false] {
634
+ opacity: 0;
635
+ transform: scale(0.8) translate(-50%, -50%);
636
+ }
637
+ `);var l_=Array(12).fill(0);function d_(e){return(()=>{var t=Vw(),n=t.firstChild;return w(n,m(bt,{each:l_,children:(r,o)=>(()=>{var i=Ww();return le(()=>we(i,"data-index",o())),i})()})),le(r=>{var o=["sonner-loading-wrapper",e.class??e.className].filter(Boolean).join(" "),i=e.visible;return o!==r.e&&ct(t,r.e=o),i!==r.t&&we(t,"data-visible",r.t=i),r},{e:void 0,t:void 0}),t})()}function f_(){return Yw()}function g_(){return Zw()}function p_(){return Xw()}function h_(){return Qw()}function m_(e){switch(e){case"success":return m(f_,{});case"info":return m(p_,{});case"warning":return m(g_,{});case"error":return m(h_,{});default:return null}}function b_(){return Jw()}function y_(){const[e,t]=$(typeof document<"u"?document.hidden:!1);return Vt(()=>{const n=()=>{t(document.hidden)};document.addEventListener("visibilitychange",n),ae(()=>{document.removeEventListener("visibilitychange",n)})}),e}var hu=1,v_=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r=typeof e.id=="string"&&e.id.length>0,o=typeof e.id=="number"||r?e.id:hu++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t,dismissible:s}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>{this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})):this.toasts.forEach(t=>{this.dismissedToasts.add(t.id),this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e});error=(e,t)=>this.create({...t,message:e,type:"error"});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(typeof e=="function"?e():e);let o=n!==void 0,i;const s=r.then(async u=>{if(i=["resolve",u],w_(u))o=!1,this.create({id:n,type:"default",message:u});else if(x_(u)&&!u.ok){o=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(u instanceof Error){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(t.success!==void 0){o=!1;const c=typeof t.success=="function"?await t.success(u):t.success,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"success",description:l,...d})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally?.()}),a=()=>new Promise((u,c)=>{s.then(()=>{i[0]==="reject"?c(i[1]):u(i[1])}).catch(c)});return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})};custom=(e,t)=>{const n=t?.id||hu++;return this.create({jsx:e(n),...t,id:n}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function x_(e){return e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number"}function bi(e){return typeof e=="object"&&e!==null&&"message"in e}function w_(e){return typeof Node<"u"&&e instanceof Node}var jt=new v_;function __(e,t){const n=t?.id||hu++;return jt.addToast({title:e,...t,id:n}),n}var E_=__,k_=()=>jt.toasts,S_=()=>jt.getActiveToasts(),Tn=Object.assign(E_,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:k_,getToasts:S_});function Fl(e){return typeof e=="object"&&e!==null&&"label"in e}var C_=3,A_="24px",T_="16px",Bl=4e3,Zg=14,D_=45,O_=200;function kn(...e){return e.filter(Boolean).join(" ")}function yi(e){return typeof e=="function"?e():e}function R_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function zl(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function N_(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,s=i?"--mobile-offset":"--offset",a=i?T_:A_,u=c=>{for(const l of["top","right","bottom","left"])n[`${s}-${l}`]=typeof c=="number"?`${c}px`:c};if(typeof r=="number"||typeof r=="string"){u(r);return}if(typeof r=="object"&&r!==null){for(const c of["top","right","bottom","left"]){const l=r[c];n[`${s}-${c}`]=l===void 0?a:typeof l=="number"?`${l}px`:l}return}u(a)}),n}function mu(e,t){return e??t}function bu(e,t){return e??t??""}function ji(e,t){return e??t??""}function I_(e){return e!=="system"?e:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function M_(e){const[t,n]=$(!1),[r,o]=$(!1),[i,s]=$(!1),[a,u]=$(!1),[c,l]=$(!1),[d,f]=$(null),[p,g]=$(null),[b,h]=$(0),[y,v]=$(0);let x,k=null,E=0,S=0,O=Bl;const[_,I]=$(null),L=()=>e.index===0,T=()=>e.index+1<=e.visibleToasts,R=()=>e.toast.type,M=()=>e.toast.dismissible!==!1,C=()=>mu(e.classNames,e.classes),N=()=>ji(e.className,e.class),F=()=>bu(e.descriptionClassName,e.descriptionClass),j=()=>ji(e.toast.className,e.toast.class),U=()=>bu(e.toast.descriptionClassName,e.toast.descriptionClass),z=()=>mu(e.toast.classNames,e.toast.classes),P=()=>e.toast.closeButton??e.closeButton,X=()=>e.toast.duration??e.duration??Bl,V=()=>e.toast.invert??e.invert,ne=()=>R()==="loading",q=()=>e.swipeDirections??R_(e.position),W=re(()=>e.position.split("-")[0]),ie=re(()=>e.position.split("-")[1]),be=re(()=>Math.max(0,e.heights.findIndex(ce=>ce.toastId===e.toast.id))),ee=re(()=>e.heights.reduce((ce,J,he)=>he>=be()?ce:ce+J.height,0)),fe=re(()=>be()*(e.gap??Zg)+ee()),Ee=y_();oe(()=>{O=X()});function Pe(){o(!0),h(fe()),e.setHeights(ce=>ce.filter(J=>J.toastId!==e.toast.id)),window.setTimeout(()=>{e.removeToast(e.toast)},O_)}function Xe(){return e.icons?.loading?(()=>{var ce=e_();return w(ce,()=>e.icons.loading),le(J=>{var he=kn(C()?.loader,z()?.loader,"sonner-loader"),Ie=R()==="loading";return he!==J.e&&ct(ce,J.e=he),Ie!==J.t&&we(ce,"data-visible",J.t=Ie),J},{e:void 0,t:void 0}),ce})():m(d_,{get class(){return kn(C()?.loader,z()?.loader)},get visible(){return R()==="loading"}})}const gt=()=>e.toast.icon??e.icons?.[R()]??m_(R());return Vt(()=>{if(n(!0),!x)return;const ce=x.getBoundingClientRect().height;v(ce),e.setHeights(J=>[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:ce,position:e.toast.position},...J]),ae(()=>{e.setHeights(J=>J.filter(he=>he.toastId!==e.toast.id))})}),oe(()=>{if(!t()||!x)return;yi(e.toast.title),yi(e.toast.description);const ce=x.style.height;x.style.height="auto";const J=x.getBoundingClientRect().height;x.style.height=ce,v(J),e.setHeights(he=>he.find(G=>G.toastId===e.toast.id)?he.map(G=>G.toastId===e.toast.id?{...G,height:J}:G):[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:J,position:e.toast.position},...he])}),oe(kt(()=>[e.expanded,e.interacting,e.toast,R(),Ee(),X()],([ce,J,he,Ie])=>{if(he.promise&&Ie==="loading"||he.duration===Number.POSITIVE_INFINITY||Ie==="loading")return;let G;const Se=()=>{if(S<E){const Qe=new Date().getTime()-E;O-=Qe}S=new Date().getTime()},Oe=()=>{O!==Number.POSITIVE_INFINITY&&(E=new Date().getTime(),G=setTimeout(()=>{he.onAutoClose?.(he),Pe()},O))};ce||J||(e.pauseWhenPageIsHidden??!0)&&Ee()?Se():Oe(),ae(()=>{G&&clearTimeout(G)})})),oe(kt(()=>e.toast.delete,ce=>{ce&&(Pe(),e.toast.onDismiss?.(e.toast))})),(()=>{var ce=o_(),J=ce.firstChild,he=J.firstChild;ce.$$pointermove=G=>{if(!_()||!M()||(window.getSelection()?.toString().length??0)>0)return;const Se=G.clientY-_().y,Oe=G.clientX-_().x;!d()&&(Math.abs(Oe)>1||Math.abs(Se)>1)&&f(Math.abs(Oe)>Math.abs(Se)?"x":"y");const Ne={x:0,y:0},Qe=Ct=>1/(1.5+Math.abs(Ct)/20);d()==="y"?(q().includes("top")||q().includes("bottom"))&&(q().includes("top")&&Se<0||q().includes("bottom")&&Se>0?Ne.y=Se:Ne.y=Se*Qe(Se)):d()==="x"&&(q().includes("left")||q().includes("right"))&&(q().includes("left")&&Oe<0||q().includes("right")&&Oe>0?Ne.x=Oe:Ne.x=Oe*Qe(Oe)),(Math.abs(Ne.x)>0||Math.abs(Ne.y)>0)&&l(!0),x?.style.setProperty("--swipe-amount-x",`${Ne.x}px`),x?.style.setProperty("--swipe-amount-y",`${Ne.y}px`)},ce.$$pointerup=()=>{if(a()||!M())return;I(null);const G=Number(x?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),Se=Number(x?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Oe=Math.max(1,new Date().getTime()-(k?.getTime()??0)),Ne=d()==="x"?G:Se,Qe=Math.abs(Ne)/Oe;if(Math.abs(Ne)>=D_||Qe>.11){h(fe()),e.toast.onDismiss?.(e.toast),d()==="x"?g(G>0?"right":"left"):g(Se>0?"down":"up"),Pe(),u(!0);return}x?.style.setProperty("--swipe-amount-x","0px"),x?.style.setProperty("--swipe-amount-y","0px"),l(!1),s(!1),f(null)},ce.$$pointerdown=G=>{G.button!==2&&(ne()||!M()||G.target.closest("button")||(k=new Date,h(fe()),G.currentTarget.setPointerCapture(G.pointerId),s(!0),I({x:G.clientX,y:G.clientY})))},ce.addEventListener("dragend",()=>{s(!1),f(null),I(null)});var Ie=x;return typeof Ie=="function"?Gn(Ie,ce):x=ce,w(ce,m(Y,{get when(){return de(()=>!!(P()&&!e.toast.jsx))()&&R()!=="loading"},get children(){var G=t_();return G.$$click=()=>{ne()||!M()||(Pe(),e.toast.onDismiss?.(e.toast))},G.$$pointerup=Se=>Se.stopPropagation(),G.$$pointerdown=Se=>Se.stopPropagation(),w(G,()=>e.icons?.close??m(b_,{})),le(Se=>{var Oe=e.closeButtonAriaLabel??"Close toast",Ne=ne(),Qe=kn(C()?.closeButton,z()?.closeButton);return Oe!==Se.e&&we(G,"aria-label",Se.e=Oe),Ne!==Se.t&&we(G,"data-disabled",Se.t=Ne),Qe!==Se.a&&ct(G,Se.a=Qe),Se},{e:void 0,t:void 0,a:void 0}),G}}),J),w(ce,m(Y,{get when(){return de(()=>!!((R()||e.toast.icon||e.toast.promise)&&e.toast.icon!==null))()&&(e.icons?.[R()]!==null||e.toast.icon)},get children(){var G=n_();return w(G,(()=>{var Se=de(()=>!!(e.toast.promise||e.toast.type==="loading"&&!e.toast.icon));return()=>Se()?e.toast.icon||Xe():null})(),null),w(G,(()=>{var Se=de(()=>e.toast.type!=="loading");return()=>Se()?gt():null})(),null),le(()=>ct(G,kn(C()?.icon,z()?.icon))),G}}),J),w(he,(()=>{var G=de(()=>!!e.toast.jsx);return()=>G()?e.toast.jsx:yi(e.toast.title)})()),w(J,m(Y,{get when(){return e.toast.description},get children(){var G=r_();return w(G,()=>yi(e.toast.description)),le(()=>ct(G,kn(F(),U(),C()?.description,z()?.description))),G}}),null),w(ce,m(Y,{get when(){return e.toast.cancel},children:G=>m(Y,{get when(){return!Fl(G())},get fallback(){return(()=>{var Se=i_();return Se.$$click=Oe=>{const Ne=G();M()&&(Ne.onClick?.(Oe),Pe())},w(Se,()=>G().label),le(Oe=>{var Ne=e.toast.cancelButtonStyle??e.cancelButtonStyle,Qe=kn(C()?.cancelButton,z()?.cancelButton);return Oe.e=ur(Se,Ne,Oe.e),Qe!==Oe.t&&ct(Se,Oe.t=Qe),Oe},{e:void 0,t:void 0}),Se})()},get children(){return G()}})}),null),w(ce,m(Y,{get when(){return e.toast.action},children:G=>m(Y,{get when(){return!Fl(G())},get fallback(){return(()=>{var Se=s_();return Se.$$click=Oe=>{G().onClick?.(Oe),!Oe.defaultPrevented&&Pe()},w(Se,()=>G().label),le(Oe=>{var Ne=e.toast.actionButtonStyle??e.actionButtonStyle,Qe=kn(C()?.actionButton,z()?.actionButton);return Oe.e=ur(Se,Ne,Oe.e),Qe!==Oe.t&&ct(Se,Oe.t=Qe),Oe},{e:void 0,t:void 0}),Se})()},get children(){return G()}})}),null),le(G=>{var Se=kn(N(),j(),C()?.toast,z()?.toast,C()?.default,C()?.[R()],z()?.[R()]),Oe=e.toast.richColors??e.defaultRichColors,Ne=!(e.toast.jsx||e.toast.unstyled||e.unstyled),Qe=t(),Ct=!!e.toast.promise,Nt=c(),Re=r(),We=T(),pt=W(),It=ie(),Yt=e.index,Ut=L(),on=i(),dn=M(),K=R(),ue=V(),me=a(),Je=p(),Ue=!!(e.expanded||e.expandByDefault&&t()),et=e.toast.testId,Kt={"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${r()?b():fe()}px`,"--initial-height":e.expandByDefault?"auto":`${y()}px`,...e.style,...e.toast.style},Ge=kn(C()?.content,z()?.content),sn=kn(C()?.title,z()?.title);return Se!==G.e&&ct(ce,G.e=Se),Oe!==G.t&&we(ce,"data-rich-colors",G.t=Oe),Ne!==G.a&&we(ce,"data-styled",G.a=Ne),Qe!==G.o&&we(ce,"data-mounted",G.o=Qe),Ct!==G.i&&we(ce,"data-promise",G.i=Ct),Nt!==G.n&&we(ce,"data-swiped",G.n=Nt),Re!==G.s&&we(ce,"data-removed",G.s=Re),We!==G.h&&we(ce,"data-visible",G.h=We),pt!==G.r&&we(ce,"data-y-position",G.r=pt),It!==G.d&&we(ce,"data-x-position",G.d=It),Yt!==G.l&&we(ce,"data-index",G.l=Yt),Ut!==G.u&&we(ce,"data-front",G.u=Ut),on!==G.c&&we(ce,"data-swiping",G.c=on),dn!==G.w&&we(ce,"data-dismissible",G.w=dn),K!==G.m&&we(ce,"data-type",G.m=K),ue!==G.f&&we(ce,"data-invert",G.f=ue),me!==G.y&&we(ce,"data-swipe-out",G.y=me),Je!==G.g&&we(ce,"data-swipe-direction",G.g=Je),Ue!==G.p&&we(ce,"data-expanded",G.p=Ue),et!==G.b&&we(ce,"data-testid",G.b=et),G.T=ur(ce,Kt,G.T),Ge!==G.A&&ct(J,G.A=Ge),sn!==G.O&&ct(he,G.O=sn),G},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0}),ce})()}function L_(e){const t=Q({position:"bottom-right",hotkey:["altKey","KeyT"],theme:"light",gap:Zg,visibleToasts:C_,dir:zl(),containerAriaLabel:"Notifications"},e),n=I_(t.theme),[r,o]=tb({toasts:[]}),i=re(()=>{const T=r.toasts;return t.id?T.filter(R=>R.toasterId===t.id):T.filter(R=>!R.toasterId)}),s=re(()=>Array.from(new Set([t.position,...i().filter(T=>T.position).map(T=>T.position)]))),[a,u]=$([]),[c,l]=$(!1),[d,f]=$(!1),[p,g]=$(n),[b,h]=$(null),[y,v]=$(!1);let x;const k=()=>t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=()=>ji(t.className,t.class),S=()=>t.toastOptions,O=()=>mu(S()?.classNames,S()?.classes),_=()=>bu(S()?.descriptionClassName,S()?.descriptionClass),I=()=>ji(S()?.className,S()?.class),L=T=>{o("toasts",R=>(R.find(M=>M.id===T.id)?.delete||jt.dismiss(T.id),R.filter(({id:M})=>M!==T.id)))};return Vt(()=>{const T=jt.subscribe(R=>{if(R.dismiss){requestAnimationFrame(()=>{o("toasts",Rc(N=>{N.forEach(F=>{F.id===R.id&&(F.delete=!0)})}))});return}const M=R,C=r.toasts.findIndex(N=>N.id===M.id);if(C!==-1){o("toasts",C,nb(M));return}o("toasts",Rc(N=>{N.unshift(M)}))});ae(T)}),oe(()=>{const T=t.theme;if(T!=="system"){g(T);return}if(typeof window>"u")return;const R=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:C})=>{g(C?"dark":"light")};M(R);try{R.addEventListener("change",M),ae(()=>R.removeEventListener("change",M))}catch{R.addListener(M),ae(()=>R.removeListener(M))}}),oe(()=>{i().length<=1&&l(!1)}),Vt(()=>{const T=R=>{t.hotkey.length>0&&t.hotkey.every(C=>R[C]||R.code===C)&&(l(!0),x?.focus()),R.code==="Escape"&&(document.activeElement===x||x?.contains(document.activeElement))&&l(!1)};document.addEventListener("keydown",T),ae(()=>document.removeEventListener("keydown",T))}),ae(()=>{b()&&(b()?.focus({preventScroll:!0}),h(null),v(!1))}),(()=>{var T=a_();return w(T,m(bt,{get each(){return s()},children:(R,M)=>{const[C,N]=R.split("-"),F=re(()=>i().filter(U=>!U.position&&M()===0||U.position===R)),j=re(()=>a().filter(U=>M()===0&&!U.position||U.position===R));return m(Y,{get when(){return i().length>0},get children(){var U=u_();U.$$pointerup=()=>f(!1),U.$$pointerdown=P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||f(!0)},U.addEventListener("dragend",()=>l(!1)),U.addEventListener("mouseleave",()=>{d()||l(!1)}),U.$$mousemove=()=>l(!0),U.addEventListener("mouseenter",()=>l(!0)),U.addEventListener("focus",P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||y()||(v(!0),h(P.relatedTarget))}),U.addEventListener("blur",P=>{y()&&!P.currentTarget.contains(P.relatedTarget)&&(v(!1),b()&&(b()?.focus({preventScroll:!0}),h(null)))});var z=x;return typeof z=="function"?Gn(z,U):x=U,we(U,"data-y-position",C),we(U,"data-x-position",N),w(U,m(bt,{get each(){return F()},children:(P,X)=>m(M_,{get icons(){return t.icons},get index(){return X()},toast:P,get defaultRichColors(){return t.richColors},get duration(){return S()?.duration??t.duration},get class(){return I()},get descriptionClassName(){return _()},get invert(){return!!t.invert},get visibleToasts(){return t.visibleToasts},get closeButton(){return S()?.closeButton??t.closeButton??!1},get interacting(){return d()},position:R,get style(){return S()?.style},get unstyled(){return S()?.unstyled},get classNames(){return O()},get cancelButtonStyle(){return S()?.cancelButtonStyle},get actionButtonStyle(){return S()?.actionButtonStyle},get closeButtonAriaLabel(){return S()?.closeButtonAriaLabel},removeToast:L,get toasts(){return F()},get heights(){return j()},setHeights:u,get expandByDefault(){return!!t.expand},get gap(){return t.gap},get expanded(){return c()},get swipeDirections(){return t.swipeDirections},get pauseWhenPageIsHidden(){return t.pauseWhenPageIsHidden}})})),le(P=>{var X=t.dir==="auto"?zl():t.dir,V=E(),ne=p(),q={"--front-toast-height":`${j()[0]?.height??0}px`,"--gap":`${t.gap}px`,...t.style,...N_(t.offset,t.mobileOffset)};return X!==P.e&&we(U,"dir",P.e=X),V!==P.t&&ct(U,P.t=V),ne!==P.a&&we(U,"data-sonner-theme",P.a=ne),P.o=ur(U,q,P.o),P},{e:void 0,t:void 0,a:void 0,o:void 0}),U}})}})),le(()=>we(T,"aria-label",t.customAriaLabel??`${t.containerAriaLabel} ${k()}`)),T})()}/*!
638
+ * Original code by Emil Kowalski
639
+ * MIT Licensed, Copyright 2023 Emil Kowalski, see https://github.com/emilkowalski/sonner/blob/main/LICENSE.md for details
640
+ *
641
+ * Credits:
642
+ * https://github.com/emilkowalski/sonner/blob/main/src/index.tsx
643
+ */ln(["pointerdown","pointerup","pointermove","click","mousemove"]);const $_=e=>m(L_,Q({class:"toaster group",toastOptions:{classes:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},e));var P_=B('<span class=" text-muted-foreground">'),F_=B('<span class=" text-destructive">'),B_=B('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),z_=B('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),Ul=B('<p class=" text-destructive">'),U_=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),K_=B('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><h1 class="m-0 text-xl">'),H_=B('<p class=" text-muted-foreground">'),q_=B('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),j_=B('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),G_=B('<h2 class="my-1.5 text-base font-semibold">'),V_=B('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),W_=B('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),Y_=B('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),Kl=B("<span>."),Z_=B("<span>");const X_={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},Q_={feat:"text-emerald-600 dark:text-emerald-400",refct:"text-sky-600 dark:text-sky-400",fix:"text-rose-600 dark:text-rose-400"};function J_(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const e2=()=>{const e=es(),t=Zo(),[n,{refetch:r}]=hn(t,T=>T?ze.listSpecs(T):Promise.resolve([])),[o,{refetch:i}]=hn(()=>ze.listProjects()),s=re(()=>(o()??[]).find(T=>T.id===t())),a=re(()=>{const T=s();return T?.worktree?(o()??[]).some(R=>R.id===T.worktree.mainProjectId):!0}),u=re(()=>{const T=s();return T?.worktree?`feat(${T.worktree.branch}): merge from worktree`:""}),[c,l]=$(!1),[d,f]=$(null),[p,g]=$(!1),[b,h]=$(""),[y,v]=$(null),[x,k]=$(!1),[E,S]=$(null);is(()=>p()||y()!==null);let O=null;oe(()=>{const T=t();O?.(),O=null,T&&(O=i0(T,()=>{r()}))}),Vt(()=>{const T=s0(()=>{(async()=>{const R=s()?.worktree?.mainProjectId??null;await i();const M=t();!M||(o()??[]).some(N=>N.id===M)||R&&e(`/${encodeURIComponent(R)}`)})()});ae(T)}),ae(()=>{O?.(),O=null});function _(){s()?.worktree&&a()&&(h(u()),f(null),g(!0))}async function I(){const T=s();if(!T?.worktree||!a())return;const R=b().trim()||u();l(!0),f(null);try{const M=await ze.mergeWorktreeToMain(T.id,{commitMessage:R});g(!1),M.status==="merged"?(Tn.success(D("home.merged")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}`)):(Tn.info(D("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}/specs/${encodeURIComponent(M.conflictSpecId)}`))}catch(M){f(M.message)}finally{l(!1)}}async function L(T){const R=t();if(R){k(!0),S(null);try{await ze.deleteSpec(R,T),v(null),await r()}catch(M){S(M.message)}finally{k(!1)}}}return(()=>{var T=K_(),R=T.firstChild,M=R.firstChild;return w(M,()=>D("home.specList")),w(R,m(ds,{}),null),w(T,m(Y,{get when(){return s()?.worktree},get children(){var C=B_(),N=C.firstChild,F=N.firstChild;return w(F,()=>D("home.mainProject"),null),w(F,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(C,m(Be,{variant:"default",size:"sm",onClick:_,get disabled(){return c()||!a()},get title(){return de(()=>!!a())()?D("home.mergeHint"):D("home.mainUnreachable")},get children(){return[m(v1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!c())()?D("home.merging"):D("home.mergeToMain"))]}}),null),w(C,m(Y,{get when(){return!a()},get children(){var j=P_();return w(j,()=>D("home.mainUnreachable")),j}}),null),w(C,m(Y,{get when(){return d()},get children(){var j=F_();return w(j,d),j}}),null),C}}),null),w(T,m(Ji,{get fallback(){return(()=>{var C=H_();return w(C,()=>D("common.loading")),C})()},get children(){return m(Y,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var C=q_(),N=C.firstChild;return w(N,()=>D("home.noSpecs")),w(C,m(Be,{as:fr,get href(){return en("specs/new")},variant:"default",size:"sm",get children(){return[m(Du,{class:"mr-1 h-4 w-4"}),de(()=>D("home.createFirst"))]}}),null),C})()},get children(){var C=z_();return w(C,m(bt,{get each(){return n()??[]},children:N=>{const F=J_(N.id);return(()=>{var j=Y_(),U=j.firstChild;return w(j,m(fr,{get href(){return en(`specs/${encodeURIComponent(N.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var z=j_(),P=z.firstChild;return w(z,m(I0,{get class(){return`border-transparent ${X_[N.stage]??"bg-muted"} text-white uppercase`},get children(){return N.stage}}),P),w(P,()=>a0(N.updated_at)),z})(),(()=>{var z=G_();return w(z,()=>N.title||D("common.pendingAgent")),z})(),(()=>{var z=V_();return w(z,()=>N.summary||D("common.pendingAgent")),z})(),(()=>{var z=W_();return w(z,m(Y,{when:F,get fallback(){return N.id},children:P=>[(()=>{var X=Kl(),V=X.firstChild;return w(X,()=>P().prefix,V),X})(),(()=>{var X=Z_();return w(X,()=>P().type),le(()=>ct(X,`font-semibold ${Q_[P().type]??"text-foreground"}`)),X})(),(()=>{var X=Kl();return X.firstChild,w(X,()=>P().suffix,null),X})()]})),z})()]}}),U),w(U,m(Fg,{placement:"bottom-end",get children(){return[m(Pg,{as:Be,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return D("home.moreActions")},get children(){return m(g1,{class:"h-4 w-4"})}}),m(Bg,{get children(){return m(pu,{class:"text-destructive focus:text-destructive",onSelect:()=>v(N.id),get children(){return D("common.delete")}})}})]}})),j})()}})),C}})}}),null),w(T,m(Cn,{get open(){return p()},onOpenChange:C=>{g(C),C||f(null)},get children(){return m(Fo,{class:"max-w-md",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("home.mergeDialogTitle")}}),m(Wu,{get children(){return D("home.mergeDialogDescription")}})]}}),(()=>{var C=U_(),N=C.firstChild;return C.addEventListener("submit",F=>{F.preventDefault(),I()}),w(N,()=>D("home.mergeCommitMessage"),null),w(N,m(Ao,{id:"merge-commit-message",get value(){return b()},onInput:F=>h(F.currentTarget.value),get disabled(){return c()}}),null),w(C,m(Y,{get when(){return d()},get children(){var F=Ul();return w(F,d),F}}),null),w(C,m(Uo,{get children(){return[m(Be,{type:"button",variant:"outline",onClick:()=>g(!1),get disabled(){return c()},get children(){return D("common.cancel")}}),m(Be,{type:"submit",get disabled(){return c()||!a()},get children(){return de(()=>!!c())()?D("home.merging"):D("home.mergeToMain")}})]}}),null),C})()]}})}}),null),w(T,m(Cn,{get open(){return y()!==null},onOpenChange:C=>{C||(v(null),S(null))},get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return m(Bo,{get children(){return D("home.confirmDeleteSpec")}})}}),m(Y,{get when(){return E()},get children(){var C=Ul();return w(C,E),C}}),m(Uo,{get children(){return[m(Be,{variant:"outline",onClick:()=>v(null),get disabled(){return x()},get children(){return D("common.cancel")}}),m(Be,{variant:"destructive",onClick:()=>y()&&void L(y()),get disabled(){return x()},get children(){return de(()=>!!x())()?D("common.deleting"):D("common.confirmDelete")}})]}})]}})}}),null),T})()},Xg="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",t2=5*1024*1024,to=10,n2=new Set(["application/pdf","text/plain","text/markdown"]);function r2(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":null}function o2(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function Hl(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function i2(){return Math.random().toString(36).slice(2,8)}function Qg(e){const[t,n]=$([]),[r,o]=$(null),[i,s]=$(null),[a,u]=$(null),[c,l]=$(""),d=re(()=>t().length),f=re(()=>t().some(L=>L.status==="pending")),p=re(()=>t().some(L=>L.status==="failed"));ae(()=>{for(const L of t())L.previewUrl&&URL.revokeObjectURL(L.previewUrl)});async function g(){const L=r();if(L)return L;const{draftId:T}=await ze.createDraft(e.projectId());return o(T),T}function b(L){n(T=>[...T,L])}function h(L,T){n(R=>R.map(M=>M.id===L?{...M,...T}:M))}function y(L){n(T=>{const R=[];for(const M of T){if(M.id===L){M.previewUrl&&URL.revokeObjectURL(M.previewUrl);continue}R.push(M)}return R})}async function v(L){s(null);const T=t(),R=to-T.length;if(R<=0){s(D("newSpec.attachmentLimit",{max:to}));return}const M=[];for(const C of L.slice(0,R)){const N=o2(C),F=r2(N);if(!F){s(D("newSpec.unsupportedType",{name:N.name}));continue}if(F!=="image"&&!n2.has(N.type)){s(D("newSpec.unsupportedMime",{mime:N.type||"(unknown)"}));continue}if(N.size>t2){s(D("newSpec.fileTooLarge",{name:N.name}));continue}const j=`att-${Date.now()}-${i2()}`,U=F==="image"?URL.createObjectURL(N):void 0;M.push({id:j,file:N,name:N.name,kind:F,previewUrl:U,status:"pending"})}if(M.length!==0){L.length>R&&s(D("newSpec.attachmentRoomLimit",{room:R,current:T.length,max:to}));for(const C of M)b(C);try{const C=await g();for(const N of M)try{const F=await ze.uploadAttachment(e.projectId(),C,N.file);h(N.id,{storedName:F.storedName,name:F.storedName,status:"uploaded"})}catch(F){h(N.id,{status:"failed",error:F.message})}}catch(C){s(C.message);for(const N of M)h(N.id,{status:"failed",error:C.message})}}}async function x(L){const T=L.currentTarget;if(!T.files)return;const R=Array.from(T.files);T.value="",await v(R)}async function k(L){const T=L.clipboardData?.items;if(!T)return;const R=[];for(const M of Array.from(T))if(M.kind==="file"&&M.type.startsWith("image/")){const C=M.getAsFile();C&&R.push(C)}R.length!==0&&(L.preventDefault(),await v(R))}async function E(L){const T=t().find(R=>R.id===L);if(T){if(T.storedName&&r())try{await ze.deleteAttachment(e.projectId(),r(),T.storedName)}catch(R){s(R.message)}y(L)}}function S(L){l(Hl(L.name)),u(L.id)}async function O(L){const T=c().trim();if(u(null),!(!T||!L.storedName||!r())&&T!==Hl(L.name))try{const R=await ze.renameAttachment(e.projectId(),r(),L.storedName,T);h(L.id,{storedName:R.storedName,name:R.storedName})}catch(R){s(R.message)}}function _(){u(null)}function I(){const L=Et(t);for(const T of L)T.previewUrl&&URL.revokeObjectURL(T.previewUrl);L.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:f,hasFailed:p,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:v,onFileInputChange:x,onPaste:k,removeAttachment:E,beginRename:S,commitRename:O,cancelRename:_,reset:I}}var s2=B("<textarea>");const oo=e=>{const[t,n]=_e(e,["class"]);return(()=>{var r=s2();return Wn(r,Q({get class(){return St("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var a2=B('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),u2=B('<div class="relative w-full">'),c2=B("<li><button type=button>");const l2=150,d2=150,f2=2,g2=10,ql=1.5,Jg=e=>{const[t,n]=$(!1),[r,o]=$([]),[i,s]=$(0);let a,u=[],c=-1,l="",d=null,f=null;const p=()=>e.autosize!==!1,g=()=>e.minRows??f2,b=()=>e.maxRows??g2;ae(()=>{d&&clearTimeout(d),f&&clearTimeout(f)});function h(){if(!a||!p())return;const O=getComputedStyle(a),_=parseFloat(O.fontSize)||14,I=O.lineHeight==="normal"?_*ql:parseFloat(O.lineHeight)||_*ql,L=parseFloat(O.paddingTop)+parseFloat(O.paddingBottom)+parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth),T=I*g()+L,R=I*b()+L;a.style.height="auto";const M=Math.min(Math.max(a.scrollHeight,T),R);a.style.height=`${M}px`,a.style.overflowY=a.scrollHeight>R?"auto":"hidden"}Vt(h),oe(kt(()=>e.value,h));function y(){n(!1),o([]),s(0),c=-1,l="",u=[],d&&(clearTimeout(d),d=null)}function v(O){d&&clearTimeout(d),d=setTimeout(async()=>{const _=e.projectId;if(_)try{const I=await ze.listFiles(_,O);u=[],o(I.items),s(0)}catch{o([])}},l2)}function x(O){const _=O.selectionStart,I=O.value.slice(0,_),L=I.lastIndexOf("@");if(L===-1){y();return}if(L>0&&!/\s/.test(I[L-1])){y();return}const T=I.slice(L+1);if(!/^[\w./@-]*$/.test(T)){y();return}c=L,l=T,t()||n(!0),v(T)}function k(O){const _=e.value,I=_.slice(0,c),L=_.slice(c+1+l.length),T=`@${O}`;e.onValueChange(I+T+L),y();const R=I.length+T.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(R,R),h())})}function E(){u[i()]?.scrollIntoView({block:"nearest"})}function S(O){const _=r();if(t()&&_.length>0){if(O.key==="ArrowDown"){O.preventDefault(),s(I=>(I+1)%_.length),requestAnimationFrame(E);return}if(O.key==="ArrowUp"){O.preventDefault(),s(I=>(I-1+_.length)%_.length),requestAnimationFrame(E);return}if(O.key==="Enter"||O.key==="Tab"){if(!O.isComposing){O.preventDefault(),k(_[i()]);return}}else if(O.key==="Escape"){O.preventDefault(),y();return}}e.onKeyDown?.(O)}return(()=>{var O=u2();return w(O,m(oo,{ref(_){var I=a;typeof I=="function"?I(_):a=_},get rows(){return e.rows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return St(p()&&"resize-none",e.class)},onInput:_=>{e.onValueChange(_.currentTarget.value),x(_.currentTarget),h()},onKeyDown:S,onPaste:_=>e.onPaste?.(_),onBlur:()=>{f&&clearTimeout(f),f=setTimeout(y,d2)}}),null),w(O,m(Y,{get when(){return de(()=>!!t())()&&r().length>0},get children(){var _=a2();return w(_,m(bt,{get each(){return r()},children:(I,L)=>(()=>{var T=c2(),R=T.firstChild;return Gn(M=>u[L()]=M,T),R.$$mousedown=M=>{M.preventDefault(),k(I)},R.addEventListener("mouseenter",()=>s(L())),we(R,"title",I),w(R,I),le(()=>ct(R,St("block w-full overflow-hidden text-ellipsis whitespace-nowrap border-0 px-3 py-1.5 text-left text-sm",i()===L()?"bg-primary text-primary-foreground":"bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"))),T})()})),_}}),null),O})()};ln(["mousedown"]);var p2={};vr(p2,{Arrow:()=>Qo,Content:()=>tp,Portal:()=>np,Root:()=>rp,Tooltip:()=>Ko,Trigger:()=>op,useTooltipContext:()=>vs});var ep=mt();function vs(){const e=lt(ep);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function tp(e){const t=vs(),n=$e({id:t.generateId("content")},e),[r,o]=_e(n,["ref","style"]);return oe(()=>ae(t.registerContentId(o.id))),m(Y,{get when(){return t.contentPresent()},get children(){return m(ms.Positioner,{get children(){return m(qu,Q({ref(i){var s=ft(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return yr({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function np(e){const t=vs();return m(Y,{get when(){return t.contentPresent()},get children(){return m(Su,e)}})}function h2(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var Cr={},m2=0,jr=!1,Un,bo,Gr;function rp(e){const t=`tooltip-${qt()}`,n=`${++m2}`,r=$e({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=_e(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(i.placement),b=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:C=>o.onOpenChange?.(C)}),{present:h}=Lr({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{Cr[n]=x},v=()=>{for(const C in Cr)C!==n&&(Cr[C](!0),delete Cr[C])},x=(C=!1)=>{C||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,b.close()):s||(s=window.setTimeout(()=>{s=void 0,b.close()},o.closeDelay)),window.clearTimeout(Un),Un=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Gr=window.setTimeout(()=>{window.clearTimeout(Gr),Gr=void 0},o.skipDelayDuration)),jr&&(window.clearTimeout(bo),bo=window.setTimeout(()=>{delete Cr[n],bo=void 0,jr=!1},o.closeDelay))},k=()=>{clearTimeout(s),s=void 0,v(),y(),jr=!0,b.open(),window.clearTimeout(Un),Un=void 0,window.clearTimeout(bo),bo=void 0,window.clearTimeout(Gr),Gr=void 0},E=()=>{v(),y(),!b.isOpen()&&!Un&&!jr?Un=window.setTimeout(()=>{Un=void 0,jr=!0,k()},o.openDelay):b.isOpen()||k()},S=(C=!1)=>{!C&&o.openDelay&&o.openDelay>0&&!s&&!Gr?E():k()},O=()=>{window.clearTimeout(Un),Un=void 0,jr=!1},_=()=>{window.clearTimeout(s),s=void 0},I=C=>Bt(c(),C)||Bt(d(),C),L=C=>{const N=c(),F=d();if(!(!N||!F))return h2(C,N,F)},T=C=>{const N=C.target;if(I(N)){_();return}if(!o.ignoreSafeArea){const F=L(p());if(F&&O0(_v(C),F)){_();return}}s||x()};oe(()=>{if(!b.isOpen())return;const C=nn();C.addEventListener("pointermove",T,!0),ae(()=>{C.removeEventListener("pointermove",T,!0)})}),oe(()=>{const C=c();if(!C||!b.isOpen())return;const N=j=>{const U=j.target;Bt(U,C)&&x(!0)},F=S0();F.addEventListener("scroll",N,{capture:!0}),ae(()=>{F.removeEventListener("scroll",N,{capture:!0})})}),ae(()=>{clearTimeout(s),Cr[n]&&delete Cr[n]});const M={dataset:re(()=>({"data-expanded":b.isOpen()?"":void 0,"data-closed":b.isOpen()?void 0:""})),isOpen:b.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:h,openTooltip:S,hideTooltip:x,cancelOpening:O,generateId:Yn(()=>r.id),registerContentId:Lt(u),isTargetOnTooltip:I,setTriggerRef:l,setContentRef:f};return m(ep.Provider,{value:M,get children(){return m(ms,Q({anchorRef:c,contentRef:d,onCurrentPlacementChange:C=>{g(C),o.onCurrentPlacementChange?.(C)}},i))}})}function op(e){let t;const n=vs(),[r,o]=_e(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},l=y=>{n.isOpen()&&!s&&!a&&n.hideTooltip(y)},d=y=>{Ke(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},f=y=>{Ke(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=y=>{Ke(y,r.onPointerDown),i=!0,nn(t).addEventListener("pointerup",u,{once:!0})},g=y=>{Ke(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{Ke(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},h=y=>{Ke(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ae(()=>{nn(t).removeEventListener("pointerup",u)}),m(Ze,Q({as:"button",ref(y){var v=ft(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:p,onClick:g,onFocus:b,onBlur:h},()=>n.dataset(),o))}var Ko=Object.assign(rp,{Arrow:Qo,Content:tp,Portal:np,Trigger:op});const b2=Ko.Trigger,y2=e=>{const t=Q({gutter:4,flip:!1},e);return m(Ko,t)},v2=e=>{const[t,n]=_e(e,["class"]);return m(Ko.Portal,{get children(){return m(Ko.Content,Q({get class(){return St("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var x2=B('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const w2=e=>m(Cn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return m(Cn.Portal,{get children(){return[m(Cn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(Cn.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[m(Y,{get when(){return e.src},get children(){var t=x2();return le(n=>{var r=e.src,o=e.alt;return r!==n.e&&we(t,"src",n.e=r),o!==n.t&&we(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),m(Cn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return m(Yo,{class:"h-4 w-4"})}})]}})]}})}});var _2=B('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),ip=B('<img class="h-full w-full object-cover">'),E2=B('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),k2=B('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),S2=B('<span class="text-xs font-bold text-muted-foreground">'),C2=B('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),A2=B('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),T2=B('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),D2=B('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function O2(e){return e.status==="pending"?`${e.name} · ${D("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${D("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const sp=e=>{const t=e.ctrl,[n,r]=$(),[o,i]=$(),[s,a]=$(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return m(Y,{get when(){return e.compact},get fallback(){return m(R2,e)},get children(){return[(()=>{var c=_2();return w(c,m(bt,{get each(){return t.attachments()},children:l=>(()=>{var d=k2(),f=d.firstChild;return w(d,m(y2,{openDelay:150,closeDelay:0,get children(){return[m(b2,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[m(Y,{get when(){return de(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=S2();return w(p,()=>l.kind==="pdf"?"PDF":"TXT"),p})()},get children(){var p=ip();return le(g=>{var b=l.previewUrl,h=l.name;return b!==g.e&&we(p,"src",g.e=b),h!==g.t&&we(p,"alt",g.t=h),g},{e:void 0,t:void 0}),p}}),m(Y,{get when(){return l.status==="pending"},get children(){var p=E2();return w(p,m(sr,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),m(v2,{get children(){return O2(l)}})]}}),f),f.$$click=()=>void t.removeAttachment(l.id),w(f,m(Yo,{class:"h-3 w-3"})),le(p=>{var g=e.busy,b=D("newSpec.deleteAttachment",{name:l.name});return g!==p.e&&(f.disabled=p.e=g),b!==p.t&&we(f,"aria-label",p.t=b),p},{e:void 0,t:void 0}),d})()})),c})(),m(w2,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},R2=e=>{const t=e.ctrl;return(()=>{var n=C2();return w(n,m(bt,{get each(){return t.attachments()},children:r=>(()=>{var o=A2(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,m(Y,{get when(){return de(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=T2();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=ip();return le(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&we(u,"src",c.e=l),d!==c.t&&we(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,m(Y,{get when(){return de(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=D2();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),le(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?D("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&we(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return m(Ao,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,m(Y,{get when(){return r.status==="pending"},get children(){return[m(sr,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),de(()=>D("newSpec.uploading"))]}}),null),w(a,m(Y,{get when(){return r.status==="failed"},get children(){return D("newSpec.uploadFailed",{error:r.error})}}),null),w(a,m(Y,{get when(){return r.status==="uploaded"},get children(){return[de(()=>Math.round(r.file.size/1024))," KB · ",de(()=>r.kind)]}}),null),w(o,m(Be,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return D("newSpec.deleteAttachment",{name:r.name})},get children(){return m(Yo,{class:"h-3.5 w-3.5"})}}),null),le(()=>ct(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};ln(["click"]);var ap=["id","name","validationState","required","disabled","readOnly"];function up(e){const t=`form-control-${qt()}`,n=$e({id:t},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),d=(b,h,y)=>{const v=y!=null||r()!=null;return[y,r(),v&&h!=null?b:void 0].filter(Boolean).join(" ")||void 0},f=b=>[a(),c(),b].filter(Boolean).join(" ")||void 0,p=re(()=>({"data-valid":Z(n.validationState)==="valid"?"":void 0,"data-invalid":Z(n.validationState)==="invalid"?"":void 0,"data-required":Z(n.required)?"":void 0,"data-disabled":Z(n.disabled)?"":void 0,"data-readonly":Z(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>Z(n.name)??Z(n.id),dataset:p,validationState:()=>Z(n.validationState),isRequired:()=>Z(n.required),isDisabled:()=>Z(n.disabled),isReadOnly:()=>Z(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Yn(()=>Z(n.id)),registerLabel:Lt(o),registerField:Lt(s),registerDescription:Lt(u),registerErrorMessage:Lt(l)}}}var Yu=mt();function Qn(){const e=lt(Yu);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Zu(e){const t=Qn(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}var N2=["id","aria-label","aria-labelledby","aria-describedby"];function I2(e){const t=Qn(),n=$e({id:t.generateId("field")},e);return oe(()=>ae(t.registerField(Z(n.id)))),{fieldProps:{id:()=>Z(n.id),ariaLabel:()=>Z(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(Z(n.id),Z(n["aria-label"]),Z(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(Z(n["aria-describedby"]))}}}function cp(e){let t;const n=Qn(),r=$e({id:n.generateId("label")},e),[o,i]=_e(r,["ref"]),s=ls(()=>t,()=>"label");return oe(()=>ae(n.registerLabel(i.id))),m(Ze,Q({as:"label",ref(a){var u=ft(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return de(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function lp(e,t){oe(kt(e,n=>{if(n==null)return;const r=M2(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ae(()=>{r.removeEventListener("reset",t)}))}))}function M2(e){return L2(e)?e.form:e.closest("form")}function L2(e){return e.matches("textarea, input, select, button")}function Xu(e){const t=Qn(),n=$e({id:t.generateId("error-message")},e),[r,o]=_e(n,["forceMount"]),i=()=>t.validationState()==="invalid";return oe(()=>{i()&&ae(t.registerErrorMessage(o.id))}),m(Y,{get when(){return r.forceMount||i()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}var $2={};vr($2,{Checkbox:()=>lr,Control:()=>fp,Description:()=>gp,ErrorMessage:()=>pp,Indicator:()=>hp,Input:()=>mp,Label:()=>bp,Root:()=>yp,useCheckboxContext:()=>zr});var dp=mt();function zr(){const e=lt(dp);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function fp(e){const t=Qn(),n=zr(),r=$e({id:n.generateId("control")},e),[o,i]=_e(r,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:u=>{Ke(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Ke(u,o.onKeyDown),u.key===us.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function gp(e){const t=zr();return m(Zu,Q(()=>t.dataset(),e))}function pp(e){const t=zr();return m(Xu,Q(()=>t.dataset(),e))}function hp(e){const t=Qn(),n=zr(),[r,o]=$(),i=$e({id:n.generateId("indicator")},e),[s,a]=_e(i,["ref","forceMount"]),{present:u}=Lr({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return m(Y,{get when(){return u()},get children(){return m(Ze,Q({as:"div",ref(c){var l=ft(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function mp(e){let t;const n=Qn(),r=zr(),o=$e({id:r.generateId("input")},e),[i,s,a]=_e(o,["ref","style","onChange","onFocus","onBlur"],N2),{fieldProps:u}=I2(s),[c,l]=$(!1),d=g=>{if(Ke(g,i.onChange),g.stopPropagation(),!c()){const b=g.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},f=g=>{Ke(g,i.onFocus),r.setIsFocused(!0)},p=g=>{Ke(g,i.onBlur),r.setIsFocused(!1)};return oe(kt([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(kt([()=>t,()=>r.indeterminate(),()=>r.checked()],([g,b])=>{g&&(g.indeterminate=b)})),m(Ze,Q({as:"input",ref(g){var b=ft(h=>{r.setInputRef(h),t=h},i.ref);typeof b=="function"&&b(g)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return yr(Lu,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:f,onBlur:p},()=>n.dataset(),()=>r.dataset(),a))}function bp(e){const t=zr();return m(cp,Q(()=>t.dataset(),e))}function yp(e){let t;const n=`checkbox-${qt()}`,r=$e({value:"on",id:n},e),[o,i,s]=_e(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],ap),[a,u]=$(),[c,l]=$(!1),{formControlContext:d}=up(i),f=cg({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:h=>o.onChange?.(h),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});lp(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const p=h=>{Ke(h,o.onPointerDown),c()&&h.preventDefault()},g=re(()=>({"data-checked":f.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),b={value:()=>o.value,dataset:g,checked:()=>f.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:Yn(()=>Z(i.id)),toggle:()=>f.toggle(),setIsChecked:h=>f.setIsSelected(h),setIsFocused:l,setInputRef:u};return m(Yu.Provider,{value:d,get children(){return m(dp.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=ft(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"group",get id(){return Z(i.id)},onPointerDown:p},()=>d.dataset(),g,s,{get children(){return m(P2,{state:b,get children(){return o.children}})}}))}})}})}function P2(e){const t=Xi(()=>{const n=e.children;return k0(n)?n(e.state):n});return de(t)}var lr=Object.assign(yp,{Control:fp,Description:gp,ErrorMessage:pp,Indicator:hp,Input:mp,Label:bp}),F2=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const vp=lr.Label,xp=lr;lr.ErrorMessage;lr.Description;const wp=e=>{const[t,n]=_e(e,["class","children"]);return[m(lr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),m(lr.Control,Q({get class(){return St("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return m(lr.Indicator,{class:"flex items-center justify-center text-current",get children(){return F2()}})}}))]};var B2=B('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),z2=B('<span class="truncate font-medium text-foreground">');const xs=e=>(()=>{var t=B2();return w(t,m(bt,{get each(){return e.items},children:(n,r)=>[m(Y,{get when(){return r()>0},get children(){return m(e1,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),m(Y,{get when(){return n.href},get fallback(){return(()=>{var o=z2();return w(o,()=>n.label),o})()},get children(){return m(fr,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var U2=B('<span class="text-sm text-muted-foreground">'),K2=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),H2=B('<label><input type=radio name=type class=hidden><strong class=" "></strong><span class="text-sm text-muted-foreground">'),q2=B('<p class=" text-destructive">'),j2=B('<p class=" text-muted-foreground">');const G2=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],V2=()=>{const e=es(),t=Zo(),[n,r]=$(""),[o,i]=$("feat"),[s,a]=$("idle"),[u,c]=$(!1),l=()=>s()==="creating",d=Qg({projectId:t}),f=d.error,p=d.setError;let g=null,b=null,h=new Set,y="",v=!1,x;ae(()=>{g?.(),b?.()});async function k(){if(v)return;const S=y||t();try{const _=(await ze.listSpecs(S)).find(I=>!h.has(I.id));if(_){v=!0,g?.(),g=null,b?.(),b=null;const I=S?`/${S}/specs/${encodeURIComponent(_.id)}`:en(`specs/${encodeURIComponent(_.id)}`);e(I)}}catch{}}async function E(S){if(S.preventDefault(),s()==="creating")return;p(null);const O=n().trim();if(O.length<5){p(D("newSpec.descTooShort"));return}const _=d.attachments().filter(I=>I.status==="failed");if(_.length>0){p(D("newSpec.attachmentFailedCount",{count:_.length}));return}if(d.hasPending()){p(D("newSpec.attachmentUploading"));return}a("creating"),v=!1;try{const I=t();let L=I;if(u()){const N=W2(O);L=(await ze.createWorktree(I,{specSlug:N})).id}y=L;const T=await ze.listSpecs(L);h=new Set(T.map(N=>N.id));const R={type:o(),requirement:O},M=d.draftId();M&&(R.draftId=M);const C=await ze.createSpec(L,R);"draft"in C&&C.draft?(Qr(C.sessionId),b=as(L,C.sessionId,{onEvent:N=>{N.type==="error"&&(a("failed"),p(N.message||D("newSpec.agentRunFailed")),b?.(),b=null)}}),g=i0(L,()=>{k()}),k()):"id"in C&&e(`/${L}/specs/${encodeURIComponent(C.id)}`)}catch(I){p(I.message),a("failed")}}return(()=>{var S=K2(),O=S.firstChild,_=O.nextSibling,I=_.nextSibling,L=I.firstChild,T=L.firstChild,R=L.nextSibling,M=R.firstChild,C=R.nextSibling,N=C.firstChild,F=N.firstChild,j=F.nextSibling,U=j.nextSibling;w(O,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:D("breadcrumb.newSpec")}]}})),w(_,()=>D("newSpec.description")),I.addEventListener("submit",E),w(T,()=>D("newSpec.type")),w(L,()=>G2.map(P=>(()=>{var X=H2(),V=X.firstChild,ne=V.nextSibling,q=ne.nextSibling;return V.addEventListener("change",()=>i(P.value)),w(ne,()=>D(P.labelKey)),w(q,()=>D(P.hintKey)),le(W=>{var ie=`flex min-h-[44px] flex-1 cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===P.value?"border-primary bg-primary/10":"border-border bg-background"}`,be=l();return ie!==W.e&&ct(X,W.e=ie),be!==W.t&&(V.disabled=W.t=be),W},{e:void 0,t:void 0}),le(()=>V.value=P.value),le(()=>V.checked=o()===P.value),X})()),null),w(I,m(xp,{get checked(){return u()},onChange:P=>c(P),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[m(wp,{}),m(vp,{class:"cursor-pointer font-medium",get children(){return D("newSpec.parallelWorktree")}}),(()=>{var P=U2();return w(P,()=>D("newSpec.parallelWorktreeDesc")),P})()]}}),R),w(M,()=>D("newSpec.requirement")),w(R,m(Jg,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return D("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Ni(C,"paste",d.onPaste),w(F,()=>D("newSpec.attachments")),w(j,()=>D("newSpec.attachmentsHint",{count:d.count(),max:to})),w(N,m(Be,{variant:"outline",size:"sm",type:"button",onClick:()=>x?.click(),get disabled(){return l()||d.count()>=to},get children(){return[m(Y1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("newSpec.importAttachment"))]}}),U),Ni(U,"change",d.onFileInputChange);var z=x;return typeof z=="function"?Gn(z,U):x=U,we(U,"accept",Xg),w(C,m(Y,{get when(){return d.count()>0},get children(){return m(sp,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(I,(()=>{var P=de(()=>!!f());return()=>P()&&(()=>{var X=q2();return w(X,f),X})()})(),null),w(I,m(Be,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[de(()=>de(()=>!!l())()?m(sr,{class:"mr-1 h-4 w-4 animate-spin"}):m(os,{class:"mr-1 h-4 w-4"})),de(()=>de(()=>!!l())()?D("newSpec.creating"):D("newSpec.createAndStart"))]}}),null),w(I,(()=>{var P=de(()=>!!l());return()=>P()&&(()=>{var X=j2();return w(X,()=>D("newSpec.creatingHint")),X})()})(),null),le(()=>L.disabled=l()),S})()};function W2(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}var jl=11;function Y2(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===jl||e.nodeType===jl)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var vi,Z2="http://www.w3.org/1999/xhtml",Ht=typeof document>"u"?void 0:document,X2=!!Ht&&"content"in Ht.createElement("template"),Q2=!!Ht&&Ht.createRange&&"createContextualFragment"in Ht.createRange();function J2(e){var t=Ht.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function eE(e){vi||(vi=Ht.createRange(),vi.selectNode(Ht.body));var t=vi.createContextualFragment(e);return t.childNodes[0]}function tE(e){var t=Ht.createElement("body");return t.innerHTML=e,t.childNodes[0]}function nE(e){return e=e.trim(),X2?J2(e):Q2?eE(e):tE(e)}function xi(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function rE(e,t){return!t||t===Z2?Ht.createElement(e):Ht.createElementNS(t,e)}function oE(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Ws(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Gl={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Ws(e,t,"selected")},INPUT:function(e,t){Ws(e,t,"checked"),Ws(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},yo=1,Vl=11,Wl=3,Yl=8;function rr(){}function iE(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function sE(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=Ht.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=Ht.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=nE(r);else r.nodeType===Vl&&(r=r.firstElementChild);var u=o.getNodeKey||iE,c=o.onBeforeNodeAdded||rr,l=o.onNodeAdded||rr,d=o.onBeforeElUpdated||rr,f=o.onElUpdated||rr,p=o.onBeforeNodeDiscarded||rr,g=o.onNodeDiscarded||rr,b=o.onBeforeElChildrenUpdated||rr,h=o.skipFromChildren||rr,y=o.addChild||function(z,P){return z.appendChild(P)},v=o.childrenOnly===!0,x=Object.create(null),k=[];function E(z){k.push(z)}function S(z,P){if(z.nodeType===yo)for(var X=z.firstChild;X;){var V=void 0;P&&(V=u(X))?E(V):(g(X),X.firstChild&&S(X,P)),X=X.nextSibling}}function O(z,P,X){p(z)!==!1&&(P&&P.removeChild(z),g(z),S(z,X))}function _(z){if(z.nodeType===yo||z.nodeType===Vl)for(var P=z.firstChild;P;){var X=u(P);X&&(x[X]=P),_(P),P=P.nextSibling}}_(n);function I(z){l(z);for(var P=z.firstChild;P;){var X=P.nextSibling,V=u(P);if(V){var ne=x[V];ne&&xi(P,ne)?(P.parentNode.replaceChild(ne,P),T(ne,P)):I(P)}else I(P);P=X}}function L(z,P,X){for(;P;){var V=P.nextSibling;(X=u(P))?E(X):O(P,z,!0),P=V}}function T(z,P,X){var V=u(P);if(V&&delete x[V],!X){var ne=d(z,P);if(ne===!1||(ne instanceof HTMLElement&&(z=ne,_(z)),e(z,P),f(z),b(z,P)===!1))return}z.nodeName!=="TEXTAREA"?R(z,P):Gl.TEXTAREA(z,P)}function R(z,P){var X=h(z,P),V=P.firstChild,ne=z.firstChild,q,W,ie,be,ee;e:for(;V;){for(be=V.nextSibling,q=u(V);!X&&ne;){if(ie=ne.nextSibling,V.isSameNode&&V.isSameNode(ne)){V=be,ne=ie;continue e}W=u(ne);var fe=ne.nodeType,Ee=void 0;if(fe===V.nodeType&&(fe===yo?(q?q!==W&&((ee=x[q])?ie===ee?Ee=!1:(z.insertBefore(ee,ne),W?E(W):O(ne,z,!0),ne=ee,W=u(ne)):Ee=!1):W&&(Ee=!1),Ee=Ee!==!1&&xi(ne,V),Ee&&T(ne,V)):(fe===Wl||fe==Yl)&&(Ee=!0,ne.nodeValue!==V.nodeValue&&(ne.nodeValue=V.nodeValue))),Ee){V=be,ne=ie;continue e}W?E(W):O(ne,z,!0),ne=ie}if(q&&(ee=x[q])&&xi(ee,V))X||y(z,ee),T(ee,V);else{var Pe=c(V);Pe!==!1&&(Pe&&(V=Pe),V.actualize&&(V=V.actualize(z.ownerDocument||Ht)),y(z,V),I(V))}V=be,ne=ie}L(z,ne,W);var Xe=Gl[z.nodeName];Xe&&Xe(z,P)}var M=n,C=M.nodeType,N=r.nodeType;if(!v){if(C===yo)N===yo?xi(n,r)||(g(n),M=oE(n,rE(r.nodeName,r.namespaceURI))):M=r;else if(C===Wl||C===Yl){if(N===C)return M.nodeValue!==r.nodeValue&&(M.nodeValue=r.nodeValue),M;M=r}}if(M===r)g(n);else{if(r.isSameNode&&r.isSameNode(M))return;if(T(M,r,v),k)for(var F=0,j=k.length;F<j;F++){var U=x[k[F]];U&&O(U,U.parentNode,!1)}}return!v&&M!==n&&n.parentNode&&(M.actualize&&(M=M.actualize(n.ownerDocument||Ht)),n.parentNode.replaceChild(M,n)),M}}var aE=sE(Y2);const Zl={};function uE(e){let t=Zl[e];if(t)return t;t=Zl[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function io(e,t){typeof t!="string"&&(t=io.defaultChars);const n=uE(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let d=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}io.defaultChars=";/?:@&=+$,#";io.componentChars="";const Xl={};function cE(e){let t=Xl[e];if(t)return t;t=Xl[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function ti(e,t,n){typeof t!="string"&&(n=t,t=ti.defaultChars),typeof n>"u"&&(n=!0);const r=cE(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}ti.defaultChars=";/?:@&=+$,-_.!~*'()#";ti.componentChars="-_.!~*'()";function Qu(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Gi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const lE=/^([a-z0-9.+-]+:)/i,dE=/:[0-9]*$/,fE=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,gE=["<",">",'"',"`"," ","\r",`
644
+ `," "],pE=["{","}","|","\\","^","`"].concat(gE),hE=["'"].concat(pE),Ql=["%","/","?",";","#"].concat(hE),Jl=["/","?","#"],mE=255,ed=/^[+a-z0-9A-Z_-]{0,63}$/,bE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,td={javascript:!0,"javascript:":!0},nd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ju(e,t){if(e&&e instanceof Gi)return e;const n=new Gi;return n.parse(e,t),n}Gi.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=fE.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=lE.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&td[s])&&(i=i.substr(2),this.slashes=!0)),!td[s]&&(o||s&&!nd[s])){let c=-1;for(let g=0;g<Jl.length;g++)r=i.indexOf(Jl[g]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let g=0;g<Ql.length;g++)r=i.indexOf(Ql[g]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const f=i.slice(0,c);i=i.slice(c),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let b=0,h=g.length;b<h;b++){const y=g[b];if(y&&!y.match(ed)){let v="";for(let x=0,k=y.length;x<k;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(ed)){const x=g.slice(0,b),k=g.slice(b+1),E=y.match(bE);E&&(x.push(E[1]),k.unshift(E[2])),k.length&&(i=k.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>mE&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),nd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Gi.prototype.parseHost=function(e){let t=dE.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const yE=Object.freeze(Object.defineProperty({__proto__:null,decode:io,encode:ti,format:Qu,parse:Ju},Symbol.toStringTag,{value:"Module"})),_p=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ep=/[\0-\x1F\x7F-\x9F]/,vE=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ec=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,kp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Sp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,xE=Object.freeze(Object.defineProperty({__proto__:null,Any:_p,Cc:Ep,Cf:vE,P:ec,S:kp,Z:Sp},Symbol.toStringTag,{value:"Module"})),wE=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),_E=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ys;const EE=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),kE=(Ys=String.fromCodePoint)!==null&&Ys!==void 0?Ys:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function SE(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=EE.get(e))!==null&&t!==void 0?t:e}var Rt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Rt||(Rt={}));const CE=32;var ar;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ar||(ar={}));function yu(e){return e>=Rt.ZERO&&e<=Rt.NINE}function AE(e){return e>=Rt.UPPER_A&&e<=Rt.UPPER_F||e>=Rt.LOWER_A&&e<=Rt.LOWER_F}function TE(e){return e>=Rt.UPPER_A&&e<=Rt.UPPER_Z||e>=Rt.LOWER_A&&e<=Rt.LOWER_Z||yu(e)}function DE(e){return e===Rt.EQUALS||TE(e)}var At;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(At||(At={}));var Hn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Hn||(Hn={}));class OE{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=At.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Hn.Strict}startEntity(t){this.decodeMode=t,this.state=At.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case At.EntityStart:return t.charCodeAt(n)===Rt.NUM?(this.state=At.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=At.NamedEntity,this.stateNamedEntity(t,n));case At.NumericStart:return this.stateNumericStart(t,n);case At.NumericDecimal:return this.stateNumericDecimal(t,n);case At.NumericHex:return this.stateNumericHex(t,n);case At.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|CE)===Rt.LOWER_X?(this.state=At.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=At.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yu(o)||AE(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yu(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Rt.SEMI)this.consumed+=1;else if(this.decodeMode===Hn.Strict)return 0;return this.emitCodePoint(SE(this.result),this.consumed),this.errors&&(t!==Rt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=RE(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Hn.Attribute&&(i===0||DE(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14,i!==0){if(s===Rt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Hn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&ar.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~ar.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case At.NamedEntity:return this.result!==0&&(this.decodeMode!==Hn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case At.NumericDecimal:return this.emitNumericEntity(0,2);case At.NumericHex:return this.emitNumericEntity(0,3);case At.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case At.EntityStart:return 0}}}function Cp(e){let t="";const n=new OE(e,r=>t+=kE(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function RE(e,t,n,r){const o=(t&ar.BRANCH_LENGTH)>>7,i=t&ar.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const Ap=Cp(wE);Cp(_E);function NE(e,t=Hn.Legacy){return Ap(e,t)}function IE(e){return Ap(e,Hn.Strict)}function ME(e){return Object.prototype.toString.call(e)}function tc(e){return ME(e)==="[object String]"}const LE=Object.prototype.hasOwnProperty;function $E(e,t){return LE.call(e,t)}function ws(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Tp(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function nc(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ho(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Dp=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,PE=/&([a-z#][a-z0-9]{1,31});/gi,FE=new RegExp(Dp.source+"|"+PE.source,"gi"),BE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function zE(e,t){if(t.charCodeAt(0)===35&&BE.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return nc(r)?Ho(r):e}const n=NE(e);return n!==e?n:e}function UE(e){return e.indexOf("\\")<0?e:e.replace(Dp,"$1")}function so(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(FE,function(t,n,r){return n||zE(t,r)})}const KE=/[&<>"]/,HE=/[&<>"]/g,qE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function jE(e){return qE[e]}function mr(e){return KE.test(e)?e.replace(HE,jE):e}const GE=/[.?*+^$[\]\\(){}|-]/g;function VE(e){return e.replace(GE,"\\$&")}function ut(e){switch(e){case 9:case 32:return!0}return!1}function qo(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Op(e){return ec.test(e)||kp.test(e)}function jo(e){return Op(Ho(e))}function Go(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function _s(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function rd(e){return e===32||e===9||e===10||e===13}function Es(e){let t=0;for(;t<e.length&&rd(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&rd(e.charCodeAt(n));n--);return e.slice(t,n+1)}const WE={mdurl:yE,ucmicro:xE},YE=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Tp,asciiTrim:Es,assign:ws,escapeHtml:mr,escapeRE:VE,fromCodePoint:Ho,has:$E,isMdAsciiPunct:Go,isPunctChar:Op,isPunctCharCode:jo,isSpace:ut,isString:tc,isValidEntityCode:nc,isWhiteSpace:qo,lib:WE,normalizeReference:_s,unescapeAll:so,unescapeMd:UE},Symbol.toStringTag,{value:"Module"}));function ZE(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function XE(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=so(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=so(e.slice(t,o)),i.pos=o,i.ok=!0),i}function QE(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=so(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=so(e.slice(t,i)),s}const JE=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:XE,parseLinkLabel:ZE,parseLinkTitle:QE},Symbol.toStringTag,{value:"Module"})),$n={};$n.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+mr(i.content)+"</code>"};$n.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+mr(e[t].content)+`</code></pre>
645
+ `};$n.fence=function(e,t,n,r,o){const i=e[t],s=i.info?so(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||mr(i.content):c=mr(i.content),c.indexOf("<pre")===0)return c+`
646
+ `;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const f={attrs:d};return`<pre><code${o.renderAttrs(f)}>${c}</code></pre>
647
+ `}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
648
+ `};$n.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};$n.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
649
+ `:`<br>
650
+ `};$n.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
651
+ `:`<br>
652
+ `:`
653
+ `};$n.text=function(e,t){return mr(e[t].content)};$n.html_block=function(e,t){return e[t].content};$n.html_inline=function(e,t){return e[t].content};function fo(){this.rules=ws({},$n)}fo.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+mr(t.attrs[n][0])+'="'+mr(t.attrs[n][1])+'"';return o};fo.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
654
+ `),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
655
+ `:">",i};fo.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};fo.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
656
+ `;break}return r};fo.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function Wt(){this.__rules__=[],this.__cache__=null}Wt.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Wt.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};Wt.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};Wt.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Wt.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Wt.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Wt.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};Wt.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Wt.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};Wt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function vn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}vn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};vn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};vn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};vn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};vn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function Rp(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Rp.prototype.Token=vn;const ek=/\r\n?|\n/g,tk=/\0/g;function nk(e){let t;t=e.src.replace(ek,`
657
+ `),t=t.replace(tk,"�"),e.src=t}function rk(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function ok(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function ik(e){return/^<a[>\s]/i.test(e)}function sk(e){return/^<\/a\s*>/i.test(e)}function ak(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(ik(a.content)&&i>0&&i--,sk(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,f=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const g=c[p].url,b=e.md.normalizeLink(g);if(!e.md.validateLink(b))continue;let h=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(h)?h=e.md.normalizeLinkText("mailto:"+h).replace(/^mailto:/,""):h=e.md.normalizeLinkText(h):h=e.md.normalizeLinkText("http://"+h).replace(/^http:\/\//,"");const y=c[p].index;if(y>f){const E=new e.Token("text","",0);E.content=u.slice(f,y),E.level=d,l.push(E)}const v=new e.Token("link_open","a",1);v.attrs=[["href",b]],v.level=d++,v.markup="linkify",v.info="auto",l.push(v);const x=new e.Token("text","",0);x.content=h,x.level=d,l.push(x);const k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",l.push(k),f=c[p].lastIndex}if(f<u.length){const p=new e.Token("text","",0);p.content=u.slice(f),p.level=d,l.push(p)}t[n].children=o=Tp(o,s,l)}}}}const Np=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,uk=/\((c|tm|r)\)/i,ck=/\((c|tm|r)\)/ig,lk={c:"©",r:"®",tm:"™"};function dk(e,t){return lk[t.toLowerCase()]}function fk(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(ck,dk)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function gk(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Np.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function pk(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(uk.test(e.tokens[t].content)&&fk(e.tokens[t].children),Np.test(e.tokens[t].content)&&gk(e.tokens[t].children))}const hk=/['"]/,od=/['"]/g,id="’";function wi(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function mk(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function bk(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){od.lastIndex=c;const d=od.exec(u);if(!d)break;let f=!0,p=!0;c=d.index+1;const g=d[0]==="'";let b=32;if(d.index-1>=0)b=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){b=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(c<l)h=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}const y=Go(b)||jo(b),v=Go(h)||jo(h),x=qo(b),k=qo(h);if(k?f=!1:v&&(x||y||(f=!1)),x?p=!1:y&&(k||v||(p=!1)),h===34&&d[0]==='"'&&b>=48&&b<=57&&(p=f=!1),f&&p&&(f=y,p=v),!f&&!p){g&&wi(o,i,d.index,id);continue}if(p)for(n=r.length-1;n>=0;n--){let E=r[n];if(r[n].level<a)break;if(E.single===g&&r[n].level===a){E=r[n];let S,O;g?(S=t.md.options.quotes[2],O=t.md.options.quotes[3]):(S=t.md.options.quotes[0],O=t.md.options.quotes[1]),wi(o,i,d.index,O),wi(o,E.token,E.pos,S),r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:g,level:a}):p&&g&&wi(o,i,d.index,id)}}Object.keys(o).forEach(function(i){e[i].content=mk(e[i].content,o[i])})}function yk(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!hk.test(e.tokens[t].content)||bk(e.tokens[t].children,e)}function vk(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const Zs=[["normalize",nk],["block",rk],["inline",ok],["linkify",ak],["replacements",pk],["smartquotes",yk],["text_join",vk]];function rc(){this.ruler=new Wt;for(let e=0;e<Zs.length;e++)this.ruler.push(Zs[e][0],Zs[e][1])}rc.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};rc.prototype.State=Rp;function Pn(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const d=o.charCodeAt(s);if(!l)if(ut(d)){a++,d===9?u+=4-u%4:u++;continue}else l=!0;(d===10||s===c-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Pn.prototype.push=function(e,t,n){const r=new vn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Pn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Pn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Pn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!ut(r))break}return t};Pn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ut(this.src.charCodeAt(--t)))return t+1;return t};Pn.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};Pn.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Pn.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const f=this.src.charCodeAt(l);if(ut(f))f===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};Pn.prototype.Token=vn;const xk=65536;function Xs(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function sd(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function wk(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!ut(a)||s===45&&ut(a))return!1;for(;i<e.eMarks[o];){const k=e.src.charCodeAt(i);if(k!==124&&k!==45&&k!==58&&!ut(k))return!1;i++}let u=Xs(e,t+1),c=u.split("|");const l=[];for(let k=0;k<c.length;k++){const E=c[k].trim();if(!E){if(k===0||k===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(E))return!1;E.charCodeAt(E.length-1)===58?l.push(E.charCodeAt(0)===58?"center":"right"):E.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=Xs(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=sd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),b=[t,0];g.map=b;const h=e.push("thead_open","thead",1);h.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let k=0;k<c.length;k++){const E=e.push("th_open","th",1);l[k]&&(E.attrs=[["style","text-align:"+l[k]]]);const S=e.push("inline","",0);S.content=c[k].trim(),S.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let k=!1;for(let S=0,O=p.length;S<O;S++)if(p[S](e,o,n,!0)){k=!0;break}if(k||(u=Xs(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=sd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>xk))break;if(o===t+2){const S=e.push("tbody_open","tbody",1);S.map=v=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[o,o+1];for(let S=0;S<d;S++){const O=e.push("td_open","td",1);l[S]&&(O.attrs=[["style","text-align:"+l[S]]]);const _=e.push("inline","",0);_.content=c[S]?c[S].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=o),e.push("table_close","table",-1),b[1]=o,e.parentType=f,e.line=o,!0}function _k(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
658
+ `,i.map=[t,e.line],!0}function Ek(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){f=!0;break}u=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=l,p.content=e.getLines(t+1,d,u,!0),p.markup=c,p.map=[t,e.line],!0}function kk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<n;g++){const x=e.sCount[g]<e.blkIndent;if(o=e.bMarks[g]+e.tShift[g],i=e.eMarks[g],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let E=e.sCount[g]+1,S,O;e.src.charCodeAt(o)===32?(o++,E++,O=!1,S=!0):e.src.charCodeAt(o)===9?(S=!0,(e.bsCount[g]+E)%4===3?(o++,E++,O=!1):O=!0):S=!1;let _=E;for(a.push(e.bMarks[g]),e.bMarks[g]=o;o<i;){const I=e.src.charCodeAt(o);if(ut(I))I===9?_+=4-(_+e.bsCount[g]+(O?1:0))%4:_++;else break;o++}p=o>=i,u.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(S?1:0),c.push(e.sCount[g]),e.sCount[g]=_-E,l.push(e.tShift[g]),e.tShift[g]=o-e.bMarks[g];continue}if(p)break;let k=!1;for(let E=0,S=d.length;E<S;E++)if(d[E](e,g,n,!0)){k=!0;break}if(k){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]=-1}const b=e.blkIndent;e.blkIndent=0;const h=e.push("blockquote_open","blockquote",1);h.markup=">";const y=[t,0];h.map=y,e.md.block.tokenize(e,t,g);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,y[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=b,!0}function Sk(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!ut(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function ad(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!ut(i))return-1}return r}function ud(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!ut(i))?-1:o}function Ck(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Ak(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,f,p;if((p=ud(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],f=Number(e.src.slice(s,p-1)),l&&f!==1)return!1}else if((p=ad(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const g=e.src.charCodeAt(p-1),b=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);const h=[u,0];a.map=h,a.markup=String.fromCharCode(g);let y=!1;const v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=p,o=e.eMarks[u];const k=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let E=k;for(;i<o;){const N=e.src.charCodeAt(i);if(N===9)E+=4-(E+e.bsCount[u])%4;else if(N===32)E++;else break;i++}const S=i;let O;S>=o?O=1:O=E-k,O>4&&(O=1);const _=k+O;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const I=[u,0];a.map=I,d&&(a.info=e.src.slice(s,p-1));const L=e.tight,T=e.tShift[u],R=e.sCount[u],M=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[u]=S-e.bMarks[u],e.sCount[u]=E,S>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=M,e.tShift[u]=T,e.sCount[u]=R,e.tight=L,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),u=e.line,I[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let N=0,F=v.length;N<F;N++)if(v[N](e,u,n,!0)){C=!0;break}if(C)break;if(d){if(p=ud(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=ad(e,u),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),h[1]=u,e.line=u,e.parentType=x,c&&Ck(e,b),!0}function Tk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(v){const x=e.lineMax;if(v>=x||e.isEmpty(v))return null;let k=!1;if(e.sCount[v]-e.blkIndent>3&&(k=!0),e.sCount[v]<0&&(k=!0),!k){const O=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let I=!1;for(let L=0,T=O.length;L<T;L++)if(O[L](e,v,x,!0)){I=!0;break}if(e.parentType=_,I)return null}const E=e.bMarks[v]+e.tShift[v],S=e.eMarks[v];return e.src.slice(E,S+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const v=u.charCodeAt(o);if(v===91)return!1;if(v===93){c=o;break}else if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(v===92&&(o++,o<i&&u.charCodeAt(o)===10)){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ut(v))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const f=o,p=s,g=o;for(;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ut(v))break}let b=e.md.helpers.parseLinkTitle(u,o,i);for(;b.can_continue;){const v=a(s);if(v===null)break;u+=v,o=i,i=u.length,s++,b=e.md.helpers.parseLinkTitle(u,o,i,b)}let h;for(o<i&&g!==o&&b.ok?(h=b.str,o=b.pos):(h="",o=f,s=p);o<i;){const v=u.charCodeAt(o);if(!ut(v))break;o++}if(o<i&&u.charCodeAt(o)!==10&&h)for(h="",o=f,s=p;o<i;){const v=u.charCodeAt(o);if(!ut(v))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=_s(u.slice(1,c));return y?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:h,href:d}),e.line=s),!0):!1}const Dk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ok="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rk="[^\"'=<>`\\x00-\\x20]+",Nk="'[^']*'",Ik='"[^"]*"',Mk="(?:"+Rk+"|"+Nk+"|"+Ik+")",Lk="(?:\\s+"+Ok+"(?:\\s*=\\s*"+Mk+")?)",Ip="<[A-Za-z][A-Za-z0-9\\-]*"+Lk+"*\\s*\\/?>",Mp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",$k="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Pk="<[?][\\s\\S]*?[?]>",Fk="<![A-Za-z][^>]*>",Bk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",zk=new RegExp("^(?:"+Ip+"|"+Mp+"|"+$k+"|"+Pk+"|"+Fk+"|"+Bk+")"),Uk=new RegExp("^(?:"+Ip+"|"+Mp+")"),Ar=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Dk.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Uk.source+"\\s*$"),/^$/,!1]];function Kk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<Ar.length&&!Ar[a][0].test(s);a++);if(a===Ar.length)return!1;if(r)return Ar[a][2];let u=t+1;const c=Ar[a][1].test("");if(!Ar[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),Ar[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function Hk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!ut(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&ut(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Es(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function qk(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,g=r.length;p<g;p++)if(r[p](e,a,n,!0)){f=!0;break}if(f)break}if(!i)return e.parentType=o,!1;const u=Es(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function jk(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Es(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const _i=[["table",wk,["paragraph","reference"]],["code",_k],["fence",Ek,["paragraph","reference","blockquote","list"]],["blockquote",kk,["paragraph","reference","blockquote","list"]],["hr",Sk,["paragraph","reference","blockquote","list"]],["list",Ak,["paragraph","reference","blockquote"]],["reference",Tk],["html_block",Kk,["paragraph","reference","blockquote"]],["heading",Hk,["paragraph","reference","blockquote"]],["lheading",qk],["paragraph",jk]];function ks(){this.ruler=new Wt;for(let e=0;e<_i.length;e++)this.ruler.push(_i[e][0],_i[e][1],{alt:(_i[e][2]||[]).slice()})}ks.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};ks.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};ks.prototype.State=Pn;function ni(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}ni.prototype.pushPending=function(){const e=new vn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ni.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new vn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};ni.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const h=this.src.charCodeAt(e-2);o=(h&64512)===55296?65536+(h-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const h=this.src.charCodeAt(i+1);a=(h&64512)===56320?65536+(a-55296<<10)+(h-56320):65533}else(a&64512)===56320&&(a=65533);const u=Go(o)||jo(o),c=Go(a)||jo(a),l=qo(o),d=qo(a),f=!d&&(!c||l||u),p=!l&&(!u||d||c);return{can_open:f&&(t||!p||u),can_close:p&&(t||!f||c),length:s}};ni.prototype.Token=vn;function Gk(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Vk(e,t){let n=e.pos;for(;n<e.posMax&&!Gk(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const Wk=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Yk(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(Wk);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=a.length-i.length,!0}function Zk(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&ut(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const oc=[];for(let e=0;e<256;e++)oc.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){oc[e.charCodeAt(0)]=1});function Xk(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!ut(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&oc[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function Qk(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function Jk(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function cd(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function eS(e){const t=e.tokens_meta,n=e.tokens_meta.length;cd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&cd(e,t[r].delimiters)}const Lp={tokenize:Jk,postProcess:eS};function tS(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function ld(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function nS(e){const t=e.tokens_meta,n=e.tokens_meta.length;ld(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ld(e,t[r].delimiters)}const $p={tokenize:tS,postProcess:nS};function rS(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let g=p+1;if(g<d&&e.src.charCodeAt(g)===40){for(c=!1,g++;g<d&&(n=e.src.charCodeAt(g),!(!ut(n)&&n!==10));g++);if(g>=d)return!1;if(u=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?g=o.pos:s="",u=g;g<d&&(n=e.src.charCodeAt(g),!(!ut(n)&&n!==10));g++);if(o=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<d&&u!==g&&o.ok)for(a=o.str,g=o.pos;g<d&&(n=e.src.charCodeAt(g),!(!ut(n)&&n!==10));g++);}(g>=d||e.src.charCodeAt(g)!==41)&&(c=!0),g++}if(c){if(typeof e.env.references>"u")return!1;if(g<d&&e.src.charCodeAt(g)===91?(u=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?r=e.src.slice(u,g++):g=p+1):g=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[_s(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=p;const b=e.push("link_open","a",1),h=[["href",s]];b.attrs=h,a&&h.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function oS(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<f&&e.src.charCodeAt(i)===40){for(i++;i<f&&(n=e.src.charCodeAt(i),!(!ut(n)&&n!==10));i++);if(i>=f)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<f&&(n=e.src.charCodeAt(i),!(!ut(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<f&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<f&&(n=e.src.charCodeAt(i),!(!ut(n)&&n!==10));i++);else u="";if(i>=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<f&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=g+1):i=g+1,o||(o=e.src.slice(p,g)),s=e.env.references[_s(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(p,g);const b=[];e.md.inline.parse(r,e.md,e.env,b);const h=e.push("image","img",0),y=[["src",l],["alt",""]];h.attrs=y,h.children=b,h.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=f,!0}const iS=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,sS=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function aS(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(sS.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(iS.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function uS(e){return/^<a[>\s]/i.test(e)}function cS(e){return/^<\/a\s*>/i.test(e)}function lS(e){const t=e|32;return t>=97&&t<=122}function dS(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!lS(o))return!1;const i=e.src.slice(r).match(zk);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],uS(s.content)&&e.linkLevel++,cS(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const fS=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,gS=/^&([a-z][a-z0-9]{1,31});/i;function pS(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(fS);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=nc(s)?Ho(s):Ho(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(gS);if(i){const s=IE(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function dd(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+p,i[c]=p,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function hS(e){const t=e.tokens_meta,n=e.tokens_meta.length;dd(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&dd(t[r].delimiters)}function mS(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const Qs=[["text",Vk],["linkify",Yk],["newline",Zk],["escape",Xk],["backticks",Qk],["strikethrough",Lp.tokenize],["emphasis",$p.tokenize],["link",rS],["image",oS],["autolink",aS],["html_inline",dS],["entity",pS]],Js=[["balance_pairs",hS],["strikethrough",Lp.postProcess],["emphasis",$p.postProcess],["fragments_join",mS]];function ri(){this.ruler=new Wt;for(let e=0;e<Qs.length;e++)this.ruler.push(Qs[e][0],Qs[e][1]);this.ruler2=new Wt;for(let e=0;e<Js.length;e++)this.ruler2.push(Js[e][0],Js[e][1])}ri.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};ri.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ri.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};ri.prototype.State=ni;function bS(e){const t={};e=e||{},t.src_Any=_p.source,t.src_Cc=Ep.source,t.src_Z=Sp.source,t.src_P=ec.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function vu(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ss(e){return Object.prototype.toString.call(e)}function yS(e){return Ss(e)==="[object String]"}function vS(e){return Ss(e)==="[object Object]"}function xS(e){return Ss(e)==="[object RegExp]"}function fd(e){return Ss(e)==="[object Function]"}function wS(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Pp={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function _S(e){return Object.keys(e||{}).reduce(function(t,n){return t||Pp.hasOwnProperty(n)},!1)}const ES={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},kS="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",SS="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function CS(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function gd(){return function(e,t){t.normalize(e)}}function Vi(e){const t=e.re=bS(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(kS),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,vS(u)){xS(u.validate)?c.validate=CS(u.validate):fd(u.validate)?c.validate=u.validate:i(a,u),fd(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=gd();return}if(yS(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:gd()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(wS).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Fp(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function rn(e,t){if(!(this instanceof rn))return new rn(e,t);t||_S(e)&&(t=e,e={}),this.__opts__=vu({},Pp,t),this.__schemas__=vu({},ES,e),this.__compiled__={},this.__tlds__=SS,this.__tlds_replaced__=!1,this.re={},Vi(this)}rn.prototype.add=function(t,n){return this.__schemas__[t]=n,Vi(this),this};rn.prototype.set=function(t){return this.__opts__=vu(this.__opts__,t),this};rn.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};rn.prototype.pretest=function(t){return this.re.pretest.test(t)};rn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};rn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(f,p){return f?p?f.index!==p.index?f.index<p.index?f:p:f.lastIndex>=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const f=[r[l[0]],i[l[1]],o[l[2]]],p=c(c(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?l[0]++:p===f[1]?l[1]++:l[2]++,p.index<d)continue;const g=new Fp(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),n.push(g),d=p.lastIndex}return n.length?n:null};rn.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new Fp(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};rn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Vi(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Vi(this),this)};rn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};rn.prototype.onCompile=function(){};const no=2147483647,Dn=36,ic=1,Vo=26,AS=38,TS=700,Bp=72,zp=128,Up="-",DS=/^xn--/,OS=/[^\0-\x7F]/,RS=/[\x2E\u3002\uFF0E\uFF61]/g,NS={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ea=Dn-ic,On=Math.floor,ta=String.fromCharCode;function ir(e){throw new RangeError(NS[e])}function IS(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Kp(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(RS,".");const o=e.split("."),i=IS(o,t).join(".");return r+i}function Hp(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const MS=e=>String.fromCodePoint(...e),LS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Dn},pd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},qp=function(e,t,n){let r=0;for(e=n?On(e/TS):e>>1,e+=On(e/t);e>ea*Vo>>1;r+=Dn)e=On(e/ea);return On(r+(ea+1)*e/(e+AS))},jp=function(e){const t=[],n=e.length;let r=0,o=zp,i=Bp,s=e.lastIndexOf(Up);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&ir("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=Dn;;d+=Dn){a>=n&&ir("invalid-input");const f=LS(e.charCodeAt(a++));f>=Dn&&ir("invalid-input"),f>On((no-r)/l)&&ir("overflow"),r+=f*l;const p=d<=i?ic:d>=i+Vo?Vo:d-i;if(f<p)break;const g=Dn-p;l>On(no/g)&&ir("overflow"),l*=g}const c=t.length+1;i=qp(r-u,c,u==0),On(r/c)>no-o&&ir("overflow"),o+=On(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Gp=function(e){const t=[];e=Hp(e);const n=e.length;let r=zp,o=0,i=Bp;for(const u of e)u<128&&t.push(ta(u));const s=t.length;let a=s;for(s&&t.push(Up);a<n;){let u=no;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>On((no-o)/c)&&ir("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>no&&ir("overflow"),l===r){let d=o;for(let f=Dn;;f+=Dn){const p=f<=i?ic:f>=i+Vo?Vo:f-i;if(d<p)break;const g=d-p,b=Dn-p;t.push(ta(pd(p+g%b,0))),d=On(g/b)}t.push(ta(pd(d,0))),i=qp(o,c,a===s),o=0,++a}++o,++r}return t.join("")},$S=function(e){return Kp(e,function(t){return DS.test(t)?jp(t.slice(4).toLowerCase()):t})},PS=function(e){return Kp(e,function(t){return OS.test(t)?"xn--"+Gp(t):t})},Vp={version:"2.3.1",ucs2:{decode:Hp,encode:MS},decode:jp,encode:Gp,toASCII:PS,toUnicode:$S},FS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},BS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},zS={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},US={default:FS,zero:BS,commonmark:zS},KS=/^(vbscript|javascript|file|data):/,HS=/^data:image\/(gif|png|jpeg|webp);/;function qS(e){const t=e.trim().toLowerCase();return KS.test(t)?HS.test(t):!0}const Wp=["http:","https:","mailto:"];function jS(e){const t=Ju(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toASCII(t.hostname)}catch{}return ti(Qu(t))}function GS(e){const t=Ju(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toUnicode(t.hostname)}catch{}return io(Qu(t),io.defaultChars+"%")}function cn(e,t){if(!(this instanceof cn))return new cn(e,t);t||tc(e)||(t=e||{},e="default"),this.inline=new ri,this.block=new ks,this.core=new rc,this.renderer=new fo,this.linkify=new rn,this.validateLink=qS,this.normalizeLink=jS,this.normalizeLinkText=GS,this.utils=YE,this.helpers=ws({},JE),this.options={},this.configure(e),t&&this.set(t)}cn.prototype.set=function(e){return ws(this.options,e),this};cn.prototype.configure=function(e){const t=this;if(tc(e)){const n=e;if(e=US[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};cn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};cn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};cn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};cn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};cn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};cn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};cn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function sc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var na,hd;function VS(){if(hd)return na;hd=1;var e=!0,t=!1,n=!1;na=function(b,h){h&&(e=!h.enabled,t=!!h.label,n=!!h.labelAfter),b.core.ruler.after("inline","github-task-lists",function(y){for(var v=y.tokens,x=2;x<v.length;x++)i(v,x)&&(s(v[x],y.Token),r(v[x-2],"class","task-list-item"+(e?"":" enabled")),r(v[o(v,x-2)],"class","contains-task-list"))})};function r(b,h,y){var v=b.attrIndex(h),x=[h,y];v<0?b.attrPush(x):b.attrs[v]=x}function o(b,h){for(var y=b[h].level-1,v=h-1;v>=0;v--)if(b[v].level===y)return v;return-1}function i(b,h){return d(b[h])&&f(b[h-1])&&p(b[h-2])&&g(b[h])}function s(b,h){if(b.children.unshift(a(b,h)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),t)if(n){b.children.pop();var y="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+y+'">',b.children.push(l(b.content,y,h))}else b.children.unshift(u(h)),b.children.push(c(h))}function a(b,h){var y=new h("html_inline","",0),v=e?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?y.content='<input class="task-list-item-checkbox"'+v+'type="checkbox">':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(y.content='<input class="task-list-item-checkbox" checked=""'+v+'type="checkbox">'),y}function u(b){var h=new b("html_inline","",0);return h.content="<label>",h}function c(b){var h=new b("html_inline","",0);return h.content="</label>",h}function l(b,h,y){var v=new y("html_inline","",0);return v.content='<label class="task-list-item-label" for="'+h+'">'+b+"</label>",v.attrs=[{for:h}],v}function d(b){return b.type==="inline"}function f(b){return b.type==="paragraph_open"}function p(b){return b.type==="list_item_open"}function g(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return na}var WS=VS();const YS=sc(WS);var ra,md;function ZS(){if(md)return ra;md=1;function e(A){return A instanceof Map?A.clear=A.delete=A.set=function(){throw new Error("map is read-only")}:A instanceof Set&&(A.add=A.clear=A.delete=function(){throw new Error("set is read-only")}),Object.freeze(A),Object.getOwnPropertyNames(A).forEach(H=>{const te=A[H],Ce=typeof te;(Ce==="object"||Ce==="function")&&!Object.isFrozen(te)&&e(te)}),A}class t{constructor(H){H.data===void 0&&(H.data={}),this.data=H.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(A){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(A,...H){const te=Object.create(null);for(const Ce in A)te[Ce]=A[Ce];return H.forEach(function(Ce){for(const it in Ce)te[it]=Ce[it]}),te}const o="</span>",i=A=>!!A.scope,s=(A,{prefix:H})=>{if(A.startsWith("language:"))return A.replace("language:","language-");if(A.includes(".")){const te=A.split(".");return[`${H}${te.shift()}`,...te.map((Ce,it)=>`${Ce}${"_".repeat(it+1)}`)].join(" ")}return`${H}${A}`};class a{constructor(H,te){this.buffer="",this.classPrefix=te.classPrefix,H.walk(this)}addText(H){this.buffer+=n(H)}openNode(H){if(!i(H))return;const te=s(H.scope,{prefix:this.classPrefix});this.span(te)}closeNode(H){i(H)&&(this.buffer+=o)}value(){return this.buffer}span(H){this.buffer+=`<span class="${H}">`}}const u=(A={})=>{const H={children:[]};return Object.assign(H,A),H};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(H){this.top.children.push(H)}openNode(H){const te=u({scope:H});this.add(te),this.stack.push(te)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(H){return this.constructor._walk(H,this.rootNode)}static _walk(H,te){return typeof te=="string"?H.addText(te):te.children&&(H.openNode(te),te.children.forEach(Ce=>this._walk(H,Ce)),H.closeNode(te)),H}static _collapse(H){typeof H!="string"&&H.children&&(H.children.every(te=>typeof te=="string")?H.children=[H.children.join("")]:H.children.forEach(te=>{c._collapse(te)}))}}class l extends c{constructor(H){super(),this.options=H}addText(H){H!==""&&this.add(H)}startScope(H){this.openNode(H)}endScope(){this.closeNode()}__addSublanguage(H,te){const Ce=H.root;te&&(Ce.scope=`language:${te}`),this.add(Ce)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(A){return A?typeof A=="string"?A:A.source:null}function f(A){return b("(?=",A,")")}function p(A){return b("(?:",A,")*")}function g(A){return b("(?:",A,")?")}function b(...A){return A.map(te=>d(te)).join("")}function h(A){const H=A[A.length-1];return typeof H=="object"&&H.constructor===Object?(A.splice(A.length-1,1),H):{}}function y(...A){return"("+(h(A).capture?"":"?:")+A.map(Ce=>d(Ce)).join("|")+")"}function v(A){return new RegExp(A.toString()+"|").exec("").length-1}function x(A,H){const te=A&&A.exec(H);return te&&te.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function E(A,{joinWith:H}){let te=0;return A.map(Ce=>{te+=1;const it=te;let dt=d(Ce),ke="";for(;dt.length>0;){const ye=k.exec(dt);if(!ye){ke+=dt;break}ke+=dt.substring(0,ye.index),dt=dt.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?ke+="\\"+String(Number(ye[1])+it):(ke+=ye[0],ye[0]==="("&&te++)}return ke}).map(Ce=>`(${Ce})`).join(H)}const S=/\b\B/,O="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",T="\\b(0b[01]+)",R="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(A={})=>{const H=/^#![ ]*\//;return A.binary&&(A.begin=b(H,/.*\b/,A.binary,/\b.*/)),r({scope:"meta",begin:H,end:/$/,relevance:0,"on:begin":(te,Ce)=>{te.index!==0&&Ce.ignoreMatch()}},A)},C={begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[C]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[C]},j={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(A,H,te={}){const Ce=r({scope:"comment",begin:A,end:H,contains:[]},te);Ce.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const it=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ce.contains.push({begin:b(/[ ]+/,"(",it,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ce},z=U("//","$"),P=U("/\\*","\\*/"),X=U("#","$"),V={scope:"number",begin:I,relevance:0},ne={scope:"number",begin:L,relevance:0},q={scope:"number",begin:T,relevance:0},W={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[C,{begin:/\[/,end:/\]/,relevance:0,contains:[C]}]},ie={scope:"title",begin:O,relevance:0},be={scope:"title",begin:_,relevance:0},ee={begin:"\\.\\s*"+_,relevance:0};var Ee=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:C,BINARY_NUMBER_MODE:q,BINARY_NUMBER_RE:T,COMMENT:U,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:z,C_NUMBER_MODE:ne,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(A){return Object.assign(A,{"on:begin":(H,te)=>{te.data._beginMatch=H[1]},"on:end":(H,te)=>{te.data._beginMatch!==H[1]&&te.ignoreMatch()}})},HASH_COMMENT_MODE:X,IDENT_RE:O,MATCH_NOTHING_RE:S,METHOD_GUARD:ee,NUMBER_MODE:V,NUMBER_RE:I,PHRASAL_WORDS_MODE:j,QUOTE_STRING_MODE:F,REGEXP_MODE:W,RE_STARTERS_RE:R,SHEBANG:M,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:be});function Pe(A,H){A.input[A.index-1]==="."&&H.ignoreMatch()}function Xe(A,H){A.className!==void 0&&(A.scope=A.className,delete A.className)}function gt(A,H){H&&A.beginKeywords&&(A.begin="\\b("+A.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",A.__beforeBegin=Pe,A.keywords=A.keywords||A.beginKeywords,delete A.beginKeywords,A.relevance===void 0&&(A.relevance=0))}function ce(A,H){Array.isArray(A.illegal)&&(A.illegal=y(...A.illegal))}function J(A,H){if(A.match){if(A.begin||A.end)throw new Error("begin & end are not supported with match");A.begin=A.match,delete A.match}}function he(A,H){A.relevance===void 0&&(A.relevance=1)}const Ie=(A,H)=>{if(!A.beforeMatch)return;if(A.starts)throw new Error("beforeMatch cannot be used with starts");const te=Object.assign({},A);Object.keys(A).forEach(Ce=>{delete A[Ce]}),A.keywords=te.keywords,A.begin=b(te.beforeMatch,f(te.begin)),A.starts={relevance:0,contains:[Object.assign(te,{endsParent:!0})]},A.relevance=0,delete te.beforeMatch},G=["of","and","for","in","not","or","if","then","parent","list","value"],Se="keyword";function Oe(A,H,te=Se){const Ce=Object.create(null);return typeof A=="string"?it(te,A.split(" ")):Array.isArray(A)?it(te,A):Object.keys(A).forEach(function(dt){Object.assign(Ce,Oe(A[dt],H,dt))}),Ce;function it(dt,ke){H&&(ke=ke.map(ye=>ye.toLowerCase())),ke.forEach(function(ye){const Te=ye.split("|");Ce[Te[0]]=[dt,Ne(Te[0],Te[1])]})}}function Ne(A,H){return H?Number(H):Qe(A)?0:1}function Qe(A){return G.includes(A.toLowerCase())}const Ct={},Nt=A=>{console.error(A)},Re=(A,...H)=>{console.log(`WARN: ${A}`,...H)},We=(A,H)=>{Ct[`${A}/${H}`]||(console.log(`Deprecated as of ${A}. ${H}`),Ct[`${A}/${H}`]=!0)},pt=new Error;function It(A,H,{key:te}){let Ce=0;const it=A[te],dt={},ke={};for(let ye=1;ye<=H.length;ye++)ke[ye+Ce]=it[ye],dt[ye+Ce]=!0,Ce+=v(H[ye-1]);A[te]=ke,A[te]._emit=dt,A[te]._multi=!0}function Yt(A){if(Array.isArray(A.begin)){if(A.skip||A.excludeBegin||A.returnBegin)throw Nt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),pt;if(typeof A.beginScope!="object"||A.beginScope===null)throw Nt("beginScope must be object"),pt;It(A,A.begin,{key:"beginScope"}),A.begin=E(A.begin,{joinWith:""})}}function Ut(A){if(Array.isArray(A.end)){if(A.skip||A.excludeEnd||A.returnEnd)throw Nt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),pt;if(typeof A.endScope!="object"||A.endScope===null)throw Nt("endScope must be object"),pt;It(A,A.end,{key:"endScope"}),A.end=E(A.end,{joinWith:""})}}function on(A){A.scope&&typeof A.scope=="object"&&A.scope!==null&&(A.beginScope=A.scope,delete A.scope)}function dn(A){on(A),typeof A.beginScope=="string"&&(A.beginScope={_wrap:A.beginScope}),typeof A.endScope=="string"&&(A.endScope={_wrap:A.endScope}),Yt(A),Ut(A)}function K(A){function H(ke,ye){return new RegExp(d(ke),"m"+(A.case_insensitive?"i":"")+(A.unicodeRegex?"u":"")+(ye?"g":""))}class te{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,Te){Te.position=this.position++,this.matchIndexes[this.matchAt]=Te,this.regexes.push([Te,ye]),this.matchAt+=v(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(Te=>Te[1]);this.matcherRe=H(E(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const Te=this.matcherRe.exec(ye);if(!Te)return null;const vt=Te.findIndex((Jn,Os)=>Os>0&&Jn!==void 0),ht=this.matchIndexes[vt];return Te.splice(0,vt),Object.assign(Te,ht)}}class Ce{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const Te=new te;return this.rules.slice(ye).forEach(([vt,ht])=>Te.addRule(vt,ht)),Te.compile(),this.multiRegexes[ye]=Te,Te}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,Te){this.rules.push([ye,Te]),Te.type==="begin"&&this.count++}exec(ye){const Te=this.getMatcher(this.regexIndex);Te.lastIndex=this.lastIndex;let vt=Te.exec(ye);if(this.resumingScanAtSamePosition()&&!(vt&&vt.index===this.lastIndex)){const ht=this.getMatcher(0);ht.lastIndex=this.lastIndex+1,vt=ht.exec(ye)}return vt&&(this.regexIndex+=vt.position+1,this.regexIndex===this.count&&this.considerAll()),vt}}function it(ke){const ye=new Ce;return ke.contains.forEach(Te=>ye.addRule(Te.begin,{rule:Te,type:"begin"})),ke.terminatorEnd&&ye.addRule(ke.terminatorEnd,{type:"end"}),ke.illegal&&ye.addRule(ke.illegal,{type:"illegal"}),ye}function dt(ke,ye){const Te=ke;if(ke.isCompiled)return Te;[Xe,J,dn,Ie].forEach(ht=>ht(ke,ye)),A.compilerExtensions.forEach(ht=>ht(ke,ye)),ke.__beforeBegin=null,[gt,ce,he].forEach(ht=>ht(ke,ye)),ke.isCompiled=!0;let vt=null;return typeof ke.keywords=="object"&&ke.keywords.$pattern&&(ke.keywords=Object.assign({},ke.keywords),vt=ke.keywords.$pattern,delete ke.keywords.$pattern),vt=vt||/\w+/,ke.keywords&&(ke.keywords=Oe(ke.keywords,A.case_insensitive)),Te.keywordPatternRe=H(vt,!0),ye&&(ke.begin||(ke.begin=/\B|\b/),Te.beginRe=H(Te.begin),!ke.end&&!ke.endsWithParent&&(ke.end=/\B|\b/),ke.end&&(Te.endRe=H(Te.end)),Te.terminatorEnd=d(Te.end)||"",ke.endsWithParent&&ye.terminatorEnd&&(Te.terminatorEnd+=(ke.end?"|":"")+ye.terminatorEnd)),ke.illegal&&(Te.illegalRe=H(ke.illegal)),ke.contains||(ke.contains=[]),ke.contains=[].concat(...ke.contains.map(function(ht){return me(ht==="self"?ke:ht)})),ke.contains.forEach(function(ht){dt(ht,Te)}),ke.starts&&dt(ke.starts,ye),Te.matcher=it(Te),Te}if(A.compilerExtensions||(A.compilerExtensions=[]),A.contains&&A.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return A.classNameAliases=r(A.classNameAliases||{}),dt(A)}function ue(A){return A?A.endsWithParent||ue(A.starts):!1}function me(A){return A.variants&&!A.cachedVariants&&(A.cachedVariants=A.variants.map(function(H){return r(A,{variants:null},H)})),A.cachedVariants?A.cachedVariants:ue(A)?r(A,{starts:A.starts?r(A.starts):null}):Object.isFrozen(A)?r(A):A}var Je="11.11.1";class Ue extends Error{constructor(H,te){super(H),this.name="HTMLInjectionError",this.html=te}}const et=n,Kt=r,Ge=Symbol("nomatch"),sn=7,fn=function(A){const H=Object.create(null),te=Object.create(null),Ce=[];let it=!0;const dt="Could not find the language '{}', did you forget to load/include a language module?",ke={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function Te(se){return ye.noHighlightRe.test(se)}function vt(se){let De=se.className+" ";De+=se.parentNode?se.parentNode.className:"";const Ve=ye.languageDetectRe.exec(De);if(Ve){const st=er(Ve[1]);return st||(Re(dt.replace("{}",Ve[1])),Re("Falling back to no-highlight mode for this block.",se)),st?Ve[1]:"no-highlight"}return De.split(/\s+/).find(st=>Te(st)||er(st))}function ht(se,De,Ve){let st="",wt="";typeof De=="object"?(st=se,Ve=De.ignoreIllegals,wt=De.language):(We("10.7.0","highlight(lang, code, ...args) has been deprecated."),We("10.7.0",`Please use highlight(code, options) instead.
659
+ https://github.com/highlightjs/highlight.js/issues/2277`),wt=se,st=De),Ve===void 0&&(Ve=!0);const gn={code:st,language:wt};si("before:highlight",gn);const tr=gn.result?gn.result:Jn(gn.language,gn.code,Ve);return tr.code=gn.code,si("after:highlight",tr),tr}function Jn(se,De,Ve,st){const wt=Object.create(null);function gn(ge,Ae){return ge.keywords[Ae]}function tr(){if(!Fe.keywords){Mt.addText(at);return}let ge=0;Fe.keywordPatternRe.lastIndex=0;let Ae=Fe.keywordPatternRe.exec(at),He="";for(;Ae;){He+=at.substring(ge,Ae.index);const ot=_n.case_insensitive?Ae[0].toLowerCase():Ae[0],$t=gn(Fe,ot);if($t){const[Fn,$h]=$t;if(Mt.addText(He),He="",wt[ot]=(wt[ot]||0)+1,wt[ot]<=sn&&(ci+=$h),Fn.startsWith("_"))He+=Ae[0];else{const Ph=_n.classNameAliases[Fn]||Fn;wn(Ae[0],Ph)}}else He+=Ae[0];ge=Fe.keywordPatternRe.lastIndex,Ae=Fe.keywordPatternRe.exec(at)}He+=at.substring(ge),Mt.addText(He)}function ai(){if(at==="")return;let ge=null;if(typeof Fe.subLanguage=="string"){if(!H[Fe.subLanguage]){Mt.addText(at);return}ge=Jn(Fe.subLanguage,at,!0,xc[Fe.subLanguage]),xc[Fe.subLanguage]=ge._top}else ge=Rs(at,Fe.subLanguage.length?Fe.subLanguage:null);Fe.relevance>0&&(ci+=ge.relevance),Mt.__addSublanguage(ge._emitter,ge.language)}function Zt(){Fe.subLanguage!=null?ai():tr(),at=""}function wn(ge,Ae){ge!==""&&(Mt.startScope(Ae),Mt.addText(ge),Mt.endScope())}function mc(ge,Ae){let He=1;const ot=Ae.length-1;for(;He<=ot;){if(!ge._emit[He]){He++;continue}const $t=_n.classNameAliases[ge[He]]||ge[He],Fn=Ae[He];$t?wn(Fn,$t):(at=Fn,tr(),at=""),He++}}function bc(ge,Ae){return ge.scope&&typeof ge.scope=="string"&&Mt.openNode(_n.classNameAliases[ge.scope]||ge.scope),ge.beginScope&&(ge.beginScope._wrap?(wn(at,_n.classNameAliases[ge.beginScope._wrap]||ge.beginScope._wrap),at=""):ge.beginScope._multi&&(mc(ge.beginScope,Ae),at="")),Fe=Object.create(ge,{parent:{value:Fe}}),Fe}function yc(ge,Ae,He){let ot=x(ge.endRe,He);if(ot){if(ge["on:end"]){const $t=new t(ge);ge["on:end"](Ae,$t),$t.isMatchIgnored&&(ot=!1)}if(ot){for(;ge.endsParent&&ge.parent;)ge=ge.parent;return ge}}if(ge.endsWithParent)return yc(ge.parent,Ae,He)}function Rh(ge){return Fe.matcher.regexIndex===0?(at+=ge[0],1):(Ls=!0,0)}function Nh(ge){const Ae=ge[0],He=ge.rule,ot=new t(He),$t=[He.__beforeBegin,He["on:begin"]];for(const Fn of $t)if(Fn&&(Fn(ge,ot),ot.isMatchIgnored))return Rh(Ae);return He.skip?at+=Ae:(He.excludeBegin&&(at+=Ae),Zt(),!He.returnBegin&&!He.excludeBegin&&(at=Ae)),bc(He,ge),He.returnBegin?0:Ae.length}function Ih(ge){const Ae=ge[0],He=De.substring(ge.index),ot=yc(Fe,ge,He);if(!ot)return Ge;const $t=Fe;Fe.endScope&&Fe.endScope._wrap?(Zt(),wn(Ae,Fe.endScope._wrap)):Fe.endScope&&Fe.endScope._multi?(Zt(),mc(Fe.endScope,ge)):$t.skip?at+=Ae:($t.returnEnd||$t.excludeEnd||(at+=Ae),Zt(),$t.excludeEnd&&(at=Ae));do Fe.scope&&Mt.closeNode(),!Fe.skip&&!Fe.subLanguage&&(ci+=Fe.relevance),Fe=Fe.parent;while(Fe!==ot.parent);return ot.starts&&bc(ot.starts,ge),$t.returnEnd?0:Ae.length}function Mh(){const ge=[];for(let Ae=Fe;Ae!==_n;Ae=Ae.parent)Ae.scope&&ge.unshift(Ae.scope);ge.forEach(Ae=>Mt.openNode(Ae))}let ui={};function vc(ge,Ae){const He=Ae&&Ae[0];if(at+=ge,He==null)return Zt(),0;if(ui.type==="begin"&&Ae.type==="end"&&ui.index===Ae.index&&He===""){if(at+=De.slice(Ae.index,Ae.index+1),!it){const ot=new Error(`0 width match regex (${se})`);throw ot.languageName=se,ot.badRule=ui.rule,ot}return 1}if(ui=Ae,Ae.type==="begin")return Nh(Ae);if(Ae.type==="illegal"&&!Ve){const ot=new Error('Illegal lexeme "'+He+'" for mode "'+(Fe.scope||"<unnamed>")+'"');throw ot.mode=Fe,ot}else if(Ae.type==="end"){const ot=Ih(Ae);if(ot!==Ge)return ot}if(Ae.type==="illegal"&&He==="")return at+=`
660
+ `,1;if(Ms>1e5&&Ms>Ae.index*3)throw new Error("potential infinite loop, way more iterations than matches");return at+=He,He.length}const _n=er(se);if(!_n)throw Nt(dt.replace("{}",se)),new Error('Unknown language: "'+se+'"');const Lh=K(_n);let Is="",Fe=st||Lh;const xc={},Mt=new ye.__emitter(ye);Mh();let at="",ci=0,_r=0,Ms=0,Ls=!1;try{if(_n.__emitTokens)_n.__emitTokens(De,Mt);else{for(Fe.matcher.considerAll();;){Ms++,Ls?Ls=!1:Fe.matcher.considerAll(),Fe.matcher.lastIndex=_r;const ge=Fe.matcher.exec(De);if(!ge)break;const Ae=De.substring(_r,ge.index),He=vc(Ae,ge);_r=ge.index+He}vc(De.substring(_r))}return Mt.finalize(),Is=Mt.toHTML(),{language:se,value:Is,relevance:ci,illegal:!1,_emitter:Mt,_top:Fe}}catch(ge){if(ge.message&&ge.message.includes("Illegal"))return{language:se,value:et(De),illegal:!0,relevance:0,_illegalBy:{message:ge.message,index:_r,context:De.slice(_r-100,_r+100),mode:ge.mode,resultSoFar:Is},_emitter:Mt};if(it)return{language:se,value:et(De),illegal:!1,relevance:0,errorRaised:ge,_emitter:Mt,_top:Fe};throw ge}}function Os(se){const De={value:et(se),illegal:!1,relevance:0,_top:ke,_emitter:new ye.__emitter(ye)};return De._emitter.addText(se),De}function Rs(se,De){De=De||ye.languages||Object.keys(H);const Ve=Os(se),st=De.filter(er).filter(hc).map(Zt=>Jn(Zt,se,!1));st.unshift(Ve);const wt=st.sort((Zt,wn)=>{if(Zt.relevance!==wn.relevance)return wn.relevance-Zt.relevance;if(Zt.language&&wn.language){if(er(Zt.language).supersetOf===wn.language)return 1;if(er(wn.language).supersetOf===Zt.language)return-1}return 0}),[gn,tr]=wt,ai=gn;return ai.secondBest=tr,ai}function xh(se,De,Ve){const st=De&&te[De]||Ve;se.classList.add("hljs"),se.classList.add(`language-${st}`)}function Ns(se){let De=null;const Ve=vt(se);if(Te(Ve))return;if(si("before:highlightElement",{el:se,language:Ve}),se.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",se);return}if(se.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(se)),ye.throwUnescapedHTML))throw new Ue("One of your code blocks includes unescaped HTML.",se.innerHTML);De=se;const st=De.textContent,wt=Ve?ht(st,{language:Ve,ignoreIllegals:!0}):Rs(st);se.innerHTML=wt.value,se.dataset.highlighted="yes",xh(se,Ve,wt.language),se.result={language:wt.language,re:wt.relevance,relevance:wt.relevance},wt.secondBest&&(se.secondBest={language:wt.secondBest.language,relevance:wt.secondBest.relevance}),si("after:highlightElement",{el:se,result:wt,text:st})}function wh(se){ye=Kt(ye,se)}const _h=()=>{ii(),We("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Eh(){ii(),We("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let gc=!1;function ii(){function se(){ii()}if(document.readyState==="loading"){gc||window.addEventListener("DOMContentLoaded",se,!1),gc=!0;return}document.querySelectorAll(ye.cssSelector).forEach(Ns)}function kh(se,De){let Ve=null;try{Ve=De(A)}catch(st){if(Nt("Language definition for '{}' could not be registered.".replace("{}",se)),it)Nt(st);else throw st;Ve=ke}Ve.name||(Ve.name=se),H[se]=Ve,Ve.rawDefinition=De.bind(null,A),Ve.aliases&&pc(Ve.aliases,{languageName:se})}function Sh(se){delete H[se];for(const De of Object.keys(te))te[De]===se&&delete te[De]}function Ch(){return Object.keys(H)}function er(se){return se=(se||"").toLowerCase(),H[se]||H[te[se]]}function pc(se,{languageName:De}){typeof se=="string"&&(se=[se]),se.forEach(Ve=>{te[Ve.toLowerCase()]=De})}function hc(se){const De=er(se);return De&&!De.disableAutodetect}function Ah(se){se["before:highlightBlock"]&&!se["before:highlightElement"]&&(se["before:highlightElement"]=De=>{se["before:highlightBlock"](Object.assign({block:De.el},De))}),se["after:highlightBlock"]&&!se["after:highlightElement"]&&(se["after:highlightElement"]=De=>{se["after:highlightBlock"](Object.assign({block:De.el},De))})}function Th(se){Ah(se),Ce.push(se)}function Dh(se){const De=Ce.indexOf(se);De!==-1&&Ce.splice(De,1)}function si(se,De){const Ve=se;Ce.forEach(function(st){st[Ve]&&st[Ve](De)})}function Oh(se){return We("10.7.0","highlightBlock will be removed entirely in v12.0"),We("10.7.0","Please use highlightElement now."),Ns(se)}Object.assign(A,{highlight:ht,highlightAuto:Rs,highlightAll:ii,highlightElement:Ns,highlightBlock:Oh,configure:wh,initHighlighting:_h,initHighlightingOnLoad:Eh,registerLanguage:kh,unregisterLanguage:Sh,listLanguages:Ch,getLanguage:er,registerAliases:pc,autoDetection:hc,inherit:Kt,addPlugin:Th,removePlugin:Dh}),A.debugMode=function(){it=!1},A.safeMode=function(){it=!0},A.versionString=Je,A.regex={concat:b,lookahead:f,either:y,optional:g,anyNumberOfTimes:p};for(const se in Ee)typeof Ee[se]=="object"&&e(Ee[se]);return Object.assign(A,Ee),A},nt=fn({});return nt.newInstance=()=>fn({}),ra=nt,nt.HighlightJS=nt,nt.default=nt,ra}var oa,bd;function XS(){if(bd)return oa;bd=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return oa=e,oa}var ia,yd;function QS(){if(yd)return ia;yd=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=t.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],v={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],E=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:y,built_in:[...x,...k,"set","shopt",...E,...S]},contains:[g,t.SHEBANG(),b,f,s,a,v,u,c,l,d,r]}}return ia=e,ia}var sa,vd;function JS(){if(vd)return sa;vd=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:v.concat([{begin:/\(/,end:/\)/,keywords:y,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:g,returnBegin:!0,contains:[t.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(x,k,v,[f,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:l,keywords:y}}}return sa=e,sa}var aa,xd;function eC(){if(xd)return aa;xd=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],E={type:h,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},S={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},O=[S,f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:O.concat([{begin:/\(/,end:/\)/,keywords:E,contains:O.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:E,relevance:0},{begin:g,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:E,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(_,I,S,O,[f,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:E,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:E},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return aa=e,aa}var ua,wd;function tC(){if(wd)return ua;wd=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=t.inherit(d,{illegal:/\n/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=t.inherit(p,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,g]},h={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},y=t.inherit(h,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});p.contains=[h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],g.contains=[y,b,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[l,h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},k=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",E={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[v,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},E]}}return ua=e,ua}var ca,_d;function nC(){if(_d)return ca;_d=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),f={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},p="and or not only",g=/@-?\w[\w]*(-\w+)*/,b="[a-zA-Z-][a-zA-Z0-9_-]*",h=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,f,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+b,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...h,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...h,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...h,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return ca=u,ca}var la,Ed;function rC(){if(Ed)return la;Ed=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(l,{contains:[]}),p=t.inherit(d,{contains:[]});l.contains.push(p),d.contains.push(f);let g=[r,c];return[l,d,f,p].forEach(v=>{v.contains=v.contains.concat(g)}),g=g.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return la=e,la}var da,kd;function oC(){if(kd)return da;kd=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return da=e,da}var fa,Sd;function iC(){if(Sd)return fa;Sd=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},p="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},O=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:r}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=O,h.contains=O;const T=[{begin:/^\s*=>/,starts:{end:"$",contains:O}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:O}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(T).concat(l).concat(O)}}return fa=e,fa}var ga,Cd;function sC(){if(Cd)return ga;Cd=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return ga=e,ga}var pa,Ad;function aC(){if(Ad)return pa;Ad=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return pa=e,pa}var ha,Td;function uC(){if(Td)return ha;Td=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,f=n.either(c,l,d),p=n.concat(f,"(\\s*\\.\\s*",f,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return ha=e,ha}var ma,Dd;function cC(){if(Dd)return ma;Dd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),g={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},b={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:g,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[h,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:g,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[b,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,b]}}return ma=i,ma}var ba,Od;function lC(){if(Od)return ba;Od=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,d=(be,{after:ee})=>{const fe="</"+be[0].slice(1);return be.input.indexOf(fe,ee)!==-1},f=e,p={begin:"<>",end:"</>"},g=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(be,ee)=>{const fe=be[0].length+be.index,Ee=be.input[fe];if(Ee==="<"||Ee===","){ee.ignoreMatch();return}Ee===">"&&(d(be,{after:fe})||ee.ignoreMatch());let Pe;const Xe=be.input.substring(fe);if(Pe=Xe.match(/^\s*=/)){ee.ignoreMatch();return}if((Pe=Xe.match(/^\s+extends\s+/))&&Pe.index===0){ee.ignoreMatch();return}}},h={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",v=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",k={className:"number",variants:[{begin:`(\\b(${x})((${v})|\\.)?|(${v}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${v})\\b|\\.)?|(${v})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:h,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},O={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},I={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,E]},T={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:f+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},R=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,O,_,I,{match:/\$\d+/},k];E.contains=R.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(R)});const M=[].concat(T,E.contains),C=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(M)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:C},F={variants:[{match:[/class/,/\s+/,f,/\s+/,/extends/,/\s+/,l.concat(f,"(",l.concat(/\./,f),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,f],scope:{1:"keyword",3:"title.class"}}]},j={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},U={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},z={variants:[{match:[/function/,/\s+/,f,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(be){return l.concat("(?!",be.join("|"),")")}const V={match:l.concat(/\b/,X([...i,"super","import"].map(be=>`${be}\\s*\\(`)),f,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:l.concat(/\./,l.lookahead(l.concat(f,/(?![0-9A-Za-z$_(])/))),end:f,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,f,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},W="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,f,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(W)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:j},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),U,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,O,_,I,T,{match:/\$\d+/},k,j,{scope:"attr",match:f+l.lookahead(":"),relevance:0},ie,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,c.REGEXP_MODE,{className:"function",begin:W,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:g},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,c.inherit(c.TITLE_MODE,{begin:f,className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$"+f,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},V,P,F,q,{match:/\$[(.]/}]}}return ba=u,ba}var ya,Rd;function dC(){if(Rd)return ya;Rd=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return ya=e,ya}var va,Nd;function fC(){if(Nd)return va;Nd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},g=r,b=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=h;return y.variants[1].contains=[h],h.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,b,a,u,f,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,i.C_LINE_COMMENT_MODE,b],relevance:0},i.C_LINE_COMMENT_MODE,b,f,p,d,i.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,p]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
661
+ `},g]}}return va=o,va}var xa,Id;function gC(){if(Id)return xa;Id=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),f=u,p="and or not only",g="[\\w-]+",b="("+g+"|@\\{"+g+"\\})",h=[],y=[],v=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},x=function(M,C,N){return{className:M,begin:C,relevance:N}},k={$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},E={begin:"\\(",end:"\\)",contains:y,keywords:k,relevance:0};y.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,v("'"),v('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,E,x("variable","@@?"+g,10),x("variable","@\\{"+g+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:g+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const S=y.concat({begin:/\{/,end:/\}/,contains:h}),O={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},_={begin:b+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:y}}]},I={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:k,returnEnd:!0,contains:y,relevance:0}},L={className:"variable",variants:[{begin:"@"+g+"\\s*:",relevance:15},{begin:"@"+g}],starts:{end:"[;}]",returnEnd:!0,contains:S}},T={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,O,x("keyword","all\\b"),x("variable","@\\{"+g+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",b,0),x("selector-id","#"+b),x("selector-class","\\."+b,0),x("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:S},{begin:"!important"},d.FUNCTION_DISPATCH]},R={begin:g+`:(:)?(${f.join("|")})`,returnBegin:!0,contains:[T]};return h.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,I,L,R,_,T,O,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:h}}return xa=c,xa}var wa,Md;function pC(){if(Md)return wa;Md=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return wa=e,wa}var _a,Ld;function hC(){if(Ld)return _a;Ld=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return _a=e,_a}var Ea,$d;function mC(){if($d)return Ea;$d=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(h,y,v="\\1")=>{const x=v==="\\1"?v:n.concat(v,y);return n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,v,o)},g=(h,y,v)=>n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,v,o),b=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",n.either(...f,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",n.either(...f,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}return Ea=e,Ea}var ka,Pd;function bC(){if(Pd)return ka;Pd=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return ka=e,ka}var Sa,Fd;function yC(){if(Fd)return Sa;Fd=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(N,F)=>{F.data._beginMatch=N[1]||N[2]},"on:end":(N,F)=>{F.data._beginMatch!==N[1]&&F.ignoreMatch()}},p=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[
662
+ ]`,b={scope:"string",variants:[d,l,f,p]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],E={keyword:v,literal:(N=>{const F=[];return N.forEach(j=>{F.push(j),j.toLowerCase()===j?F.push(j.toUpperCase()):F.push(j.toLowerCase())}),F})(y),built_in:x},S=N=>N.map(F=>F.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",S(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},_=n.concat(o,"\\b(?!\\()"),I={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},L={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:E,contains:[L,a,I,t.C_BLOCK_COMMENT_MODE,b,h,O]},R={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",S(v).join("\\b|"),"|",S(x).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(R);const M=[L,I,t.C_BLOCK_COMMENT_MODE,b,h,O],C={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:E,contains:[C,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,R,I,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:E,contains:["self",C,a,I,t.C_BLOCK_COMMENT_MODE,b,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},b,h]}}return Sa=e,Sa}var Ca,Bd;function vC(){if(Bd)return Ca;Bd=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Ca=e,Ca}var Aa,zd;function xC(){if(zd)return Aa;zd=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Aa=e,Aa}var Ta,Ud;function wC(){if(Ud)return Ta;Ud=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,b=`\\b|${o.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${p})[jJ](?=${b})`}]},y={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,h,f,t.HASH_COMMENT_MODE]}]};return l.contains=[f,h,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,v,f]}]}}return Ta=e,Ta}var Da,Kd;function _C(){if(Kd)return Da;Kd=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Da=e,Da}var Oa,Hd;function EC(){if(Hd)return Oa;Hd=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Oa=e,Oa}var Ra,qd;function kC(){if(qd)return Ra;qd=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:d}},{className:"punctuation",begin:"->"},s]}}return Ra=e,Ra}var Na,jd;function SC(){if(jd)return Na;jd=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,f=i,p="@[a-z-]+",g="and or not only",h={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+f.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},h,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,h,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:p,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:p,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},h,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return Na=u,Na}var Ia,Gd;function CC(){if(Gd)return Ia;Gd=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Ia=e,Ia}var Ma,Vd;function AC(){if(Vd)return Ma;Vd=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=d,b=[...l,...c].filter(S=>!d.includes(S)),h={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:n.concat(/\b/,n.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function x(S){return n.concat(/\b/,n.either(...S.map(O=>O.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:x(p),relevance:0};function E(S,{exceptions:O,when:_}={}){const I=_;return O=O||[],S.map(L=>L.match(/\|\d+$/)||O.includes(L)?L:I(L)?`${L}|0`:L)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(b,{when:S=>S.length<3}),literal:s,type:u,built_in:f},contains:[{scope:"type",match:x(a)},k,v,h,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return Ma=e,Ma}var La,Wd;function TC(){if(Wd)return La;Wd=1;function e(_){return _?typeof _=="string"?_:_.source:null}function t(_){return n("(?=",_,")")}function n(..._){return _.map(L=>e(L)).join("")}function r(_){const I=_[_.length-1];return typeof I=="object"&&I.constructor===Object?(_.splice(_.length-1,1),I):{}}function o(..._){return"("+(r(_).capture?"":"?:")+_.map(T=>e(T)).join("|")+")"}const i=_=>n(/\b/,_,/\w$/.test(_)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],f=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),b=o(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),h=n(g,b,"*"),y=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=o(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(y,v,"*"),k=n(/[A-Z]/,v,"*"),E=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],S=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function O(_){const I={match:/\s+/,relevance:0},L=_.COMMENT("/\\*","\\*/",{contains:["self"]}),T=[_.C_LINE_COMMENT_MODE,L],R={match:[/\./,o(...s,...a)],className:{2:"keyword"}},M={match:n(/\./,o(...c)),relevance:0},C=c.filter(Ge=>typeof Ge=="string").concat(["_|0"]),N=c.filter(Ge=>typeof Ge!="string").concat(u).map(i),F={variants:[{className:"keyword",match:o(...N,...a)}]},j={$pattern:o(/\b\w+/,/#\w+/),keyword:C.concat(f),literal:l},U=[R,M,F],z={match:n(/\./,o(...p)),relevance:0},P={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},X=[z,P],V={match:/->/,relevance:0},ne={className:"operator",relevance:0,variants:[{match:h},{match:`\\.(\\.|${b})+`}]},q=[V,ne],W="([0-9]_*)+",ie="([0-9a-fA-F]_*)+",be={className:"number",relevance:0,variants:[{match:`\\b(${W})(\\.(${W}))?([eE][+-]?(${W}))?\\b`},{match:`\\b0x(${ie})(\\.(${ie}))?([pP][+-]?(${W}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ee=(Ge="")=>({className:"subst",variants:[{match:n(/\\/,Ge,/[0\\tnr"']/)},{match:n(/\\/,Ge,/u\{[0-9a-fA-F]{1,8}\}/)}]}),fe=(Ge="")=>({className:"subst",match:n(/\\/,Ge,/[\t ]*(?:[\r\n]|\r\n)/)}),Ee=(Ge="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ge,/\(/),end:/\)/}),Pe=(Ge="")=>({begin:n(Ge,/"""/),end:n(/"""/,Ge),contains:[ee(Ge),fe(Ge),Ee(Ge)]}),Xe=(Ge="")=>({begin:n(Ge,/"/),end:n(/"/,Ge),contains:[ee(Ge),Ee(Ge)]}),gt={className:"string",variants:[Pe(),Pe("#"),Pe("##"),Pe("###"),Xe(),Xe("#"),Xe("##"),Xe("###")]},ce=[_.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[_.BACKSLASH_ESCAPE]}],J={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ce},he=Ge=>{const sn=n(Ge,/\//),fn=n(/\//,Ge);return{begin:sn,end:fn,contains:[...ce,{scope:"comment",begin:`#(?!.*${fn})`,end:/$/}]}},Ie={scope:"regexp",variants:[he("###"),he("##"),he("#"),J]},G={match:n(/`/,x,/`/)},Se={className:"variable",match:/\$\d+/},Oe={className:"variable",match:`\\$${v}+`},Ne=[G,Se,Oe],Qe={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:S,contains:[...q,be,gt]}]}},Ct={scope:"keyword",match:n(/@/,o(...E),t(o(/\(/,/\s+/)))},Nt={scope:"meta",match:n(/@/,x)},Re=[Qe,Ct,Nt],We={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:k,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(k)),relevance:0}]},pt={begin:/</,end:/>/,keywords:j,contains:[...T,...U,...Re,V,We]};We.contains.push(pt);const It={match:n(x,/\s*:/),keywords:"_|0",relevance:0},Yt={begin:/\(/,end:/\)/,relevance:0,keywords:j,contains:["self",It,...T,Ie,...U,...X,...q,be,gt,...Ne,...Re,We]},Ut={begin:/</,end:/>/,keywords:"repeat each",contains:[...T,We]},on={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},dn={begin:/\(/,end:/\)/,keywords:j,contains:[on,...T,...U,...q,be,gt,...Re,We,Yt],endsParent:!0,illegal:/["']/},K={match:[/(func|macro)/,/\s+/,o(G.match,x,h)],className:{1:"keyword",3:"title.function"},contains:[Ut,dn,I],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ut,dn,I],illegal:/\[|%/},me={match:[/operator/,/\s+/,h],className:{1:"keyword",3:"title"}},Je={begin:[/precedencegroup/,/\s+/,k],className:{1:"keyword",3:"title"},contains:[We],keywords:[...d,...l],end:/}/},Ue={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},et={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Kt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:j,contains:[Ut,...U,{begin:/:/,end:/\{/,keywords:j,contains:[{scope:"title.class.inherited",match:k},...U],relevance:0}]};for(const Ge of gt.variants){const sn=Ge.contains.find(nt=>nt.label==="interpol");sn.keywords=j;const fn=[...U,...X,...q,be,gt,...Ne];sn.contains=[...fn,{begin:/\(/,end:/\)/,contains:["self",...fn]}]}return{name:"Swift",keywords:j,contains:[...T,K,ue,Ue,et,Kt,me,Je,{beginKeywords:"import",end:/$/,contains:[...T],relevance:0},Ie,...U,...X,...q,be,gt,...Ne,...Re,We,Yt]}}return La=O,La}var $a,Yd;function DC(){if(Yd)return $a;Yd=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,h,s,a],v=[...y];return v.pop(),v.push(u),g.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return $a=e,$a}var Pa,Zd;function OC(){if(Zd)return Pa;Zd=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,f=(ee,{after:fe})=>{const Ee="</"+ee[0].slice(1);return ee.input.indexOf(Ee,fe)!==-1},p=e,g={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,h={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,fe)=>{const Ee=ee[0].length+ee.index,Pe=ee.input[Ee];if(Pe==="<"||Pe===","){fe.ignoreMatch();return}Pe===">"&&(f(ee,{after:Ee})||fe.ignoreMatch());let Xe;const gt=ee.input.substring(Ee);if(Xe=gt.match(/^\s*=/)){fe.ignoreMatch();return}if((Xe=gt.match(/^\s+extends\s+/))&&Xe.index===0){fe.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",x=`\\.(${v})`,k="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${k})((${x})|\\.)?|(${x}))[eE][+-]?(${v})\\b`},{begin:`\\b(${k})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},L={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,S]},R={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:p+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},M=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,_,I,L,{match:/\$\d+/},E];S.contains=M.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(M)});const C=[].concat(R,S.contains),N=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(C)}]),F={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:N},j={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,d.concat(p,"(",d.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,p,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(ee){return d.concat("(?!",ee.join("|"),")")}const ne={match:d.concat(/\b/,V([...i,"super","import"].map(ee=>`${ee}\\s*\\(`)),p,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},q={begin:d.concat(/\./,d.lookahead(d.concat(p,/(?![0-9A-Za-z$_(])/))),end:p,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",be={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:N,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,_,I,L,R,{match:/\$\d+/},E,U,{scope:"attr",match:p+d.lookahead(":"),relevance:0},be,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,l.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:N}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:b},{begin:h.begin,"on:begin":h.isTrulyOpeningTag,end:h.end}],subLanguage:"xml",contains:[{begin:h.begin,end:h.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,l.inherit(l.TITLE_MODE,{begin:p,className:"title.function"})]},{match:/\.\.\./,relevance:0},q,{match:"\\$"+p,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},ne,X,j,W,{match:/\$[(.]/}]}}function c(l){const d=l.regex,f=u(l),p=e,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},h={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},v=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(v),literal:n,built_in:a.concat(g),"variable.language":s},k={className:"meta",begin:"@"+p},E=(I,L,T)=>{const R=I.contains.findIndex(M=>M.label===L);if(R===-1)throw new Error("can not find mode to replace");I.contains.splice(R,1,T)};Object.assign(f.keywords,x),f.exports.PARAMS_CONTAINS.push(k);const S=f.contains.find(I=>I.scope==="attr"),O=Object.assign({},S,{match:d.concat(p,d.lookahead(/\s*\?:/))});f.exports.PARAMS_CONTAINS.push([f.exports.CLASS_REFERENCE,S,O]),f.contains=f.contains.concat([k,b,h,O]),E(f,"shebang",l.SHEBANG()),E(f,"use_strict",y);const _=f.contains.find(I=>I.label==="func.def");return _.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return Pa=c,Pa}var Fa,Xd;function RC(){if(Xd)return Fa;Xd=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,f,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}return Fa=e,Fa}var Ba,Qd;function NC(){if(Qd)return Ba;Qd=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return Ba=e,Ba}var za,Jd;function IC(){if(Jd)return za;Jd=1;var e=ZS();return e.registerLanguage("xml",XS()),e.registerLanguage("bash",QS()),e.registerLanguage("c",JS()),e.registerLanguage("cpp",eC()),e.registerLanguage("csharp",tC()),e.registerLanguage("css",nC()),e.registerLanguage("markdown",rC()),e.registerLanguage("diff",oC()),e.registerLanguage("ruby",iC()),e.registerLanguage("go",sC()),e.registerLanguage("graphql",aC()),e.registerLanguage("ini",uC()),e.registerLanguage("java",cC()),e.registerLanguage("javascript",lC()),e.registerLanguage("json",dC()),e.registerLanguage("kotlin",fC()),e.registerLanguage("less",gC()),e.registerLanguage("lua",pC()),e.registerLanguage("makefile",hC()),e.registerLanguage("perl",mC()),e.registerLanguage("objectivec",bC()),e.registerLanguage("php",yC()),e.registerLanguage("php-template",vC()),e.registerLanguage("plaintext",xC()),e.registerLanguage("python",wC()),e.registerLanguage("python-repl",_C()),e.registerLanguage("r",EC()),e.registerLanguage("rust",kC()),e.registerLanguage("scss",SC()),e.registerLanguage("shell",CC()),e.registerLanguage("sql",AC()),e.registerLanguage("swift",TC()),e.registerLanguage("yaml",DC()),e.registerLanguage("typescript",OC()),e.registerLanguage("vbnet",RC()),e.registerLanguage("wasm",NC()),e.HighlightJS=e,e.default=e,za=e,za}var MC=IC();const ef=sc(MC),xn=new cn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&ef.getLanguage(t))try{const n=ef.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),LC=/^<\/?(?:details|summary)>$/i,$C=/^<details\s+open\s*>$/i,PC=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function FC(e){return LC.test(e)||$C.test(e)||PC.test(e)}function Yp(e){const t=xn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=FC(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}xn.renderer.rules.html_block=(e,t)=>Yp(e[t].content);xn.renderer.rules.html_inline=(e,t)=>Yp(e[t].content);const BC=xn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),tf=xn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),zC=xn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Zp(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function UC(e){return e.replace(/:\d+(?::\d+)?$/,"")}function KC(e){const n=UC(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function HC(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&KC(e)}function Ua(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function Vr(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}xn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=Zp(u[1],s,i?.projectId))}return BC(e,t,n,r,o)};xn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&HC(a[1])){const c=a[1];return Ua(s,"href"),Ua(s,"target"),Ua(s,"rel"),Vr(s,"role","button"),Vr(s,"tabindex","0"),Vr(s,"data-file-link","true"),Vr(s,"data-file-path",c),i.fileLinkTitle&&(Vr(s,"title",i.fileLinkTitle),Vr(s,"aria-label",i.fileLinkTitle)),tf(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Zp(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return tf(e,t,n,r,o)};xn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}">${u}</div>`}return zC(e,t,n,r,o)};xn.use(YS,{enabled:!1,label:!1});function Cs(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),xn.render(e,n)}function qC(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const jC="modulepreload",GC=function(e){return"/"+e},nf={},VC=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=GC(c),c in nf)return;nf[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":jC,l||(f.as="script"),f.crossOrigin="",f.href=c,u&&f.setAttribute("nonce",u),document.head.appendChild(f),l)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Ka=null,rf=Promise.resolve();const xu=new WeakMap;async function WC(){return Ka||(Ka=VC(()=>import("./mermaid.core-BqfH6JD9.js").then(e=>e.bp),[]).then(e=>e.default)),Ka}function YC(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function ZC(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function XC(e){const t=(xu.get(e)??0)+1;return xu.set(e,t),t}function Ha(e,t){return xu.get(e)===t}async function QC(e){const t=rf.then(e,e);rf=t.catch(()=>{}),await t}async function JC(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=XC(e),n=await WC();if(!Ha(e,t))return()=>{};if(await ZC(),!Ha(e,t))return()=>{};async function r(a){const u=a.filter(c=>c.isConnected&&e.contains(c));u.length!==0&&await QC(async()=>{if(!Ha(e,t))return;const c=u.filter(d=>d.isConnected&&e.contains(d));if(c.length===0)return;const l=YC();n.initialize({startOnLoad:!1,theme:l}),c.forEach(d=>{const f=d.getAttribute("data-mermaid-source");f&&(d.removeAttribute("data-processed"),d.textContent=f)});try{await n.run({nodes:c})}catch(d){console.error("[mermaid] render error:",d)}})}const o=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await r(o);const i=()=>void r(Array.from(e.querySelectorAll(".mermaid"))),s=window.matchMedia("(prefers-color-scheme: dark)");return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}}function e3(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function t3(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function n3(e,t,n={}){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!t3(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=e3(u.startContainer,e),f=D("selection.noSection"),p=d&&d.textContent?.trim()||f;i=c,t({text:c,rect:l,sectionPath:p})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const r3=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,o3=/^##\s+/,i3=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,s3=/^\d+\.\s+(.*\S)\s*$/,a3=/^\s*$/,of=/\s*[((]推荐[))]\s*$/,sf=/\s*(自由文本)\s*$/,u3=/^\[(choice|confirm)\]\s*/i,c3=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,l3=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function d3(e){const t=e.split(`
663
+ `);let n=0;for(;n<t.length&&!r3.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(o3.test(i))break;const s=h3(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>f3(i,s))}function f3(e,t){const n=u3.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=sf.test(o),s=i?o.replace(sf,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=g3(e.bodyLines);return{id:af(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=p3(e.bodyLines,t,s),u=i||a.length===0;return{id:af(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function g3(e){let t,n;for(const r of e){const o=r.trim(),i=c3.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=l3.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function p3(e,t,n){const r=[];let o=0;for(const i of e){if(a3.test(i))continue;const s=m3(i);if(s===null)continue;const a=of.test(s),u=a?s.replace(of,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:b3(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function h3(e){const t=i3.exec(e);return t?t[1]:null}function m3(e){const t=s3.exec(e);return t?t[1]:null}function af(e,t){return`q-${e}-${Xp(t)}`}function b3(e,t,n){return`q-${e}-o-${t}-${Xp(n)}`}function Xp(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var y3=B('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const v3=36,x3=140,w3=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-v3-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-x3-8);return{top:i,left:s,visible:!0}};return m(Y,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=y3();return o.$$mousedown=i=>i.preventDefault(),w(o,m(Be,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return D("selectionMenu.annotate")}}),null),w(o,m(Be,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return D("selectionMenu.explain")}}),null),le(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Ro(o,"top",i.e=s),a!==i.t&&Ro(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};ln(["mousedown"]);var _3=B('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-auto rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),E3=B('<p class="text-destructive ">');const k3=500,or=8,S3=e=>{const[t,n]=$(""),[r,o]=$(!1),[i,s]=$(null),[a,u]=$(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const f=a()||260,p=window.innerHeight,g=d.rect.bottom+or,b=d.rect.top-or-f;let h;g+f<=p-or?h=g:b>=or?h=b:h=Math.max(or,p-f-or);const y=Math.min(Math.max(or,d.rect.left),window.innerWidth-k3-or);return{top:h,left:y}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(f){s(f.message)}finally{o(!1)}}}return m(Y,{get when(){return de(()=>!!e.open)()&&e.snap},get children(){var d=_3(),f=d.firstChild,p=f.firstChild,g=f.nextSibling,b=g.firstChild,h=b.nextSibling,y=h.nextSibling,v=y.nextSibling,x=v.nextSibling;x.nextSibling;var k=g.nextSibling,E=k.firstChild;return d.$$mousedown=S=>S.stopPropagation(),Gn(S=>{queueMicrotask(()=>{S.offsetHeight!==a()&&u(S.offsetHeight)})},d),w(p,()=>D("annotate.title")),w(b,()=>e.snap?.sectionPath),w(g,()=>D("annotate.inSection"),y),w(g,()=>(e.snap?.text??"").slice(0,200),x),k.addEventListener("submit",l),w(k,m(oo,{rows:3,get value(){return t()},onInput:S=>n(S.currentTarget.value),get placeholder(){return D("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),E),w(k,(()=>{var S=de(()=>!!i());return()=>S()&&(()=>{var O=E3();return w(O,i),O})()})(),E),w(E,m(Be,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return D("common.cancel")}}),null),w(E,m(Be,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return de(()=>!!r())()?D("common.submitting"):D("annotate.submit")}}),null),le(S=>{var O=`${c().top}px`,_=`${c().left}px`;return O!==S.e&&Ro(d,"top",S.e=O),_!==S.t&&Ro(d,"left",S.t=_),S},{e:void 0,t:void 0}),d}})};ln(["mousedown"]);var C3=B('<label class="flex cursor-pointer items-start gap-1.5 ml-5"><input type=checkbox class=mt-1><span class="flex flex-col"><span class=font-medium></span><span class="text-sm text-muted-foreground">'),A3=B("<div><span class=text-muted-foreground></span><code class=font-mono>"),T3=B('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),D3=B('<div class="flex flex-col gap-1 text-sm">'),O3=B('<p class="text-destructive ">'),R3=B('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><fieldset class="m-0 flex flex-col gap-1.5 border-0 p-0"><legend class="mb-1 font-medium"></legend></fieldset><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">'),N3=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=append-kind><span>');const I3={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},M3=e=>{const[t,n]=$("fix"),[r,o]=$(!1),[i,s]=$(""),[a,u]=$(!1),[c,l]=$(null),[d,f]=$(null);oe(()=>{if(!e.open){f(null);return}const h=e.anchorEl;if(!h)return;const y=h.getBoundingClientRect(),x=Math.max(16,Math.min(y.left,window.innerWidth-384-16));f({top:y.bottom+8,left:x})}),oe(()=>{if(!e.open)return;const h=y=>{y.key==="Escape"&&(y.preventDefault(),b())};window.addEventListener("keydown",h),ae(()=>window.removeEventListener("keydown",h))});function p(){n("fix"),o(!1),s(""),l(null)}async function g(h){h.preventDefault();const y=i().trim();if(!y){l(D("appendTask.descRequired"));return}u(!0),l(null);try{await e.onSubmit({kind:t(),description:y,sectionPath:e.sectionPath,quote:e.quote,debug:t()==="fix"?r():void 0}),p(),e.onCancel()}catch(v){l(v.message)}finally{u(!1)}}function b(){e.onCancel()}return m(Y,{get when(){return e.open},get children(){var h=R3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,E=v.nextSibling,S=E.firstChild,O=S.firstChild,_=S.nextSibling,I=_.firstChild,L=_.nextSibling;return h.$$mousedown=b,y.$$mousedown=T=>T.stopPropagation(),w(x,()=>D("appendTask.title")),w(k,()=>D("appendTask.hint")),E.addEventListener("submit",g),w(O,()=>D("appendTask.type")),w(S,()=>["feat","refct","fix"].map(T=>(()=>{var R=N3(),M=R.firstChild,C=M.nextSibling;return M.addEventListener("change",()=>n(T)),M.value=T,w(C,()=>D(I3[T])),le(()=>M.disabled=a()),le(()=>M.checked=t()===T),R})()),null),w(E,m(Y,{get when(){return t()==="fix"},get children(){var T=C3(),R=T.firstChild,M=R.nextSibling,C=M.firstChild,N=C.nextSibling;return R.addEventListener("change",F=>o(F.currentTarget.checked)),w(C,()=>D("appendTask.debugMode")),w(N,()=>D("appendTask.debugModeHint")),le(()=>R.disabled=a()),le(()=>R.checked=r()),T}}),_),w(I,()=>D("appendTask.description")),w(_,m(oo,{rows:5,get value(){return i()},onInput:T=>s(T.currentTarget.value),get placeholder(){return D("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(E,m(Y,{get when(){return e.sectionPath||e.quote},get children(){var T=D3();return w(T,m(Y,{get when(){return e.sectionPath},get children(){var R=A3(),M=R.firstChild,C=M.nextSibling;return w(M,()=>D("appendTask.refSection")),w(C,()=>e.sectionPath),R}}),null),w(T,m(Y,{get when(){return e.quote},get children(){var R=T3();return w(R,()=>e.quote?.slice(0,200)),R}}),null),T}}),L),w(E,m(Y,{get when(){return c()},get children(){var T=O3();return w(T,c),T}}),L),w(L,m(Be,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return D("common.cancel")}}),null),w(L,m(Be,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!a())()?D("common.submitting"):D("appendTask.submit"))]}}),null),le(T=>{var R=D("appendTask.title"),M=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0,C=a();return R!==T.e&&we(y,"aria-label",T.e=R),T.t=ur(y,M,T.t),C!==T.a&&(S.disabled=T.a=C),T},{e:void 0,t:void 0,a:void 0}),h}})};ln(["mousedown"]);const ko="__freeform__",L3={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},$3="accept";function P3(e){return e!==$3}function F3(e,t,n){const r=L3[t],o=(n??"").trim();if(P3(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function B3(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===ko?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var z3=B('<p class="text-destructive mx-3 mt-1 ">'),U3=B('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-accent"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),K3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-option-freeform flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span>'),uf=B('<p class="m-0 break-words"><strong></strong>:'),H3=B("<div>"),cf=B('<ul class="m-0 ml-5 flex list-none flex-col gap-1 border-l border-border pl-2">'),q3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-confirm-accept flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span></span></label></li><li><label class="qcp-confirm-reject flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="font-medium text-destructive">'),j3=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),G3=B('<em class="text-accent text-sm not-italic"> '),qa=B('<li><label class="flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="min-w-0 break-words">'),V3=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function Qp(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function W3(e){const t=Qp(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function Y3(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-amber-500":"border-border":"border-border"}const Z3=e=>{const t=()=>{const h={};for(const y of e.questions){if(y.kind==="confirm"){h[y.id]={note:"",confirmTop:"accept"};continue}const v=y.options.find(x=>x.recommended);h[y.id]={selectedOptionLabel:v?.label??y.options[0]?.label,note:""}}return h},[n,r]=$(t()),[o,i]=$(!1),[s,a]=$(null);function u(h,y){r(v=>({...v,[h]:{...v[h],...y}}))}function c(h,y){u(h,{selectedOptionLabel:y})}function l(h,y){u(h,{note:y})}function d(h,y){y==="accept"?u(h,{confirmTop:y,confirmIntent:void 0,confirmDrop:void 0}):u(h,{confirmTop:y})}function f(h,y){y==="dropGoal"?u(h,{confirmIntent:y}):u(h,{confirmIntent:y,confirmDrop:void 0})}function p(h,y){u(h,{confirmDrop:y})}const g=re(()=>{const h=n();let y=0;for(const v of e.questions){const x=h[v.id];if(!x){y+=1;continue}if(v.kind==="confirm"){W3(x)||(y+=1);continue}const k=x.note??"";v.isFreeform||x.selectedOptionLabel===ko?k.trim()||(y+=1):x.selectedOptionLabel||(y+=1)}return y});async function b(){i(!0),a(null);try{const h=n(),y=[];for(const x of e.questions){const k=h[x.id]??{note:""};if(x.kind==="confirm"){const S=Qp(k);if(!S)continue;const O=F3(x,S,k.note);if(!O){a(D("questionConfirm.reasonRequired"));return}y.push(O);continue}const E=B3(x,k);E&&y.push(E)}const v={answers:y,freeformAnnotations:e.freeforms.map(x=>({sectionPath:x.sectionPath,quote:x.quote,note:x.note}))};if(v.answers.length===0&&v.freeformAnnotations.length===0){a(D("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(h){a(h.message)}finally{i(!1)}}return(()=>{var h=U3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,E=k.firstChild,S=E.nextSibling;S.nextSibling;var O=y.nextSibling;return w(x,()=>D("questionConfirm.title")),w(k,()=>D("questionConfirm.unanswered"),E),w(S,g),w(k,()=>e.questions.length,null),w(y,m(Be,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!o())()?D("common.submitting"):de(()=>!!e.running)()?D("questionConfirm.running"):D("questionConfirm.submitAll"))]}}),null),w(h,m(Y,{get when(){return s()},get children(){var _=z3();return w(_,s),_}}),O),w(O,m(bt,{get each(){return e.questions},children:_=>{const I=()=>n()[_.id]??{note:""},L=()=>_.kind!=="confirm"&&(_.isFreeform||I().selectedOptionLabel===ko),T=()=>_.kind==="confirm"&&I().confirmTop==="reject";return(()=>{var R=j3(),M=R.firstChild;return w(M,()=>_.text),w(R,m(Y,{get when(){return _.kind==="choice"},get children(){var C=K3(),N=C.firstChild,F=N.firstChild,j=F.firstChild,U=j.nextSibling;return w(C,m(bt,{get each(){return _.options},children:z=>(()=>{var P=qa(),X=P.firstChild,V=X.firstChild,ne=V.nextSibling;return V.addEventListener("change",()=>c(_.id,z.label)),w(ne,()=>z.label,null),w(ne,m(Y,{get when(){return z.recommended},get children(){var q=G3();return q.firstChild,w(q,()=>D("questionConfirm.recommended"),null),q}}),null),le(()=>we(V,"name",`q-${_.id}`)),le(()=>V.checked=I().selectedOptionLabel===z.label),P})()}),N),j.addEventListener("change",()=>c(_.id,ko)),w(U,()=>D("questionConfirm.freeformLabel")),le(()=>we(j,"name",`q-${_.id}`)),le(()=>j.checked=I().selectedOptionLabel===ko),C}}),null),w(R,m(Y,{get when(){return _.kind==="confirm"},get children(){return[(()=>{var C=H3();return w(C,m(Y,{get when(){return _.plan},get children(){var N=uf(),F=N.firstChild;return F.nextSibling,w(F,()=>D("questionConfirm.confirmPlanLabel")),w(N,()=>_.plan,null),N}}),null),w(C,m(Y,{get when(){return _.impact},get children(){var N=uf(),F=N.firstChild;return F.nextSibling,w(F,()=>D("questionConfirm.confirmImpactLabel")),w(N,()=>_.impact,null),N}}),null),le(()=>ct(C,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${Y3(_.impact)}`)),C})(),(()=>{var C=q3(),N=C.firstChild,F=N.firstChild,j=F.firstChild,U=j.nextSibling,z=N.nextSibling,P=z.firstChild,X=P.firstChild,V=X.nextSibling;return j.addEventListener("change",()=>d(_.id,"accept")),w(U,()=>D("questionConfirm.decisionAccept")),X.addEventListener("change",()=>d(_.id,"reject")),w(V,()=>D("questionConfirm.decisionReject")),w(C,m(Y,{get when(){return I().confirmTop==="reject"},get children(){var ne=cf();return w(ne,m(bt,{get each(){return[["alternative",D("questionConfirm.intentAlternative")],["constraint",D("questionConfirm.intentConstraint")],["dropGoal",D("questionConfirm.intentDropGoal")]]},children:([q,W])=>(()=>{var ie=qa(),be=ie.firstChild,ee=be.firstChild,fe=ee.nextSibling;return ee.addEventListener("change",()=>f(_.id,q)),w(fe,W),le(()=>we(ee,"name",`q-${_.id}-intent`)),le(()=>ee.checked=I().confirmIntent===q),ie})()}),null),w(ne,m(Y,{get when(){return I().confirmIntent==="dropGoal"},get children(){var q=cf();return w(q,m(bt,{get each(){return[["current",D("questionConfirm.dropGoalCurrent")],["spec",D("questionConfirm.dropGoalSpec")]]},children:([W,ie])=>(()=>{var be=qa(),ee=be.firstChild,fe=ee.firstChild,Ee=fe.nextSibling;return fe.addEventListener("change",()=>p(_.id,W)),w(Ee,ie),le(()=>we(fe,"name",`q-${_.id}-drop`)),le(()=>fe.checked=I().confirmDrop===W),be})()})),q}}),null),ne}}),null),le(ne=>{var q=`q-${_.id}`,W=`q-${_.id}`;return q!==ne.e&&we(j,"name",ne.e=q),W!==ne.t&&we(X,"name",ne.t=W),ne},{e:void 0,t:void 0}),le(()=>j.checked=I().confirmTop==="accept"),le(()=>X.checked=I().confirmTop==="reject"),C})()]}}),null),w(R,m(Y,{get when(){return L()},get children(){return m(oo,{class:"qcp-note",rows:2,get placeholder(){return D("questionConfirm.notePlaceholder")},get value(){return I().note},onInput:C=>l(_.id,C.currentTarget.value)})}}),null),w(R,m(Y,{get when(){return T()},get children(){return m(oo,{class:"qcp-reject-reason",rows:2,get placeholder(){return D("questionConfirm.reasonPlaceholder")},get value(){return I().note},onInput:C=>l(_.id,C.currentTarget.value)})}}),null),R})()}}),null),w(O,m(bt,{get each(){return e.freeforms},children:_=>(()=>{var I=V3(),L=I.firstChild,T=L.firstChild,R=L.nextSibling,M=R.firstChild,C=M.nextSibling,N=C.nextSibling,F=N.nextSibling,j=F.nextSibling;j.nextSibling;var U=R.nextSibling;return U.firstChild,w(T,()=>D("questionConfirm.selectionAnnotation")),w(L,m(Be,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(_.id),"aria-label":"remove",get children(){return m(Yo,{class:"h-4 w-4"})}}),null),w(M,()=>_.sectionPath),w(R,()=>D("questionConfirm.quoteConnector"),N),w(R,()=>_.quote.slice(0,200),j),w(U,()=>_.note,null),I})()}),null),le(()=>we(x,"title",D("questionConfirm.title"))),h})()};var X3=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),lf=B("<p class=text-muted-foreground>"),Q3=B('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><select><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select><time>'),J3=B('<p class="text-destructive ">'),eA=B('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const tA={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},nA=120,df=3,rA=150,oA=e=>new Promise(t=>setTimeout(t,e));async function iA(e,t,n){for(let r=0;r<=df;r+=1)try{return await ze.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<df&&await oA(rA)}return n??null}const sA=()=>{const e=ns(),t=Zo(),[n,r]=$(0),[o,i]=$(!1),[s,a]=$(""),[u]=hn(()=>[t(),e.id,n()],async([q,W],ie)=>iA(q,W,ie.value)),[c]=hn(()=>[t(),e.id,n()],async([q,W])=>{try{return await ze.getDebug(q,W)}catch{return{exists:!1,text:""}}}),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(null),[h,y]=$(null),[v,x]=$(null),[k,E]=$([]),[S,O]=$(!1),[_,I]=$(null);let L;const T=re(()=>{const q=u();return q?d3(q.body):[]}),R=re(()=>`@.yorz/specs/${e.id}/spec.md`),M=re(()=>!u()||o()?!1:T().length>0||k().length>0);oe(()=>{const q=e.id,W=t();if(!q||!W)return;let ie;const be=iy(W,q,{onUpdated:()=>{ie&&clearTimeout(ie),ie=setTimeout(()=>void Sf(()=>r(ee=>ee+1)),nA)}});ae(()=>{ie&&clearTimeout(ie),be()})}),oe(()=>{const q=e.id,W=t();!q||!W||ze.getSpecSession(W,q).then(({sessionId:ie,running:be})=>{ie&&(a(ie),i(be),Qr(ie))}).catch(()=>{})}),oe(()=>{const q=t(),W=s();if(!q||!W)return;const ie=o0(q,{onStatus:be=>{be.sessionId===W&&i(be.running)}});ae(ie)}),oe(()=>{const q=t(),W=s();if(!q||!W)return;const ie=as(q,W,{onEvent:be=>{(be.type==="turn-completed"||be.type==="error")&&i(!1)}});ae(ie)}),oe(()=>{const q=v();if(!q)return;const W=n3(q,d);ae(W)}),is(()=>S()||f()),oe(()=>{const q=v(),W=u();if(!q||!W)return;const ie=t();let be=!0,ee;const fe=Cs(W.body,{specId:W.id,projectId:ie||void 0});aE(q,`<article>${fe}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Ee,Pe)=>!(Ee.classList?.contains("mermaid")&&Ee.getAttribute("data-mermaid-source")===Pe.getAttribute?.("data-mermaid-source"))}),JC(q).then(Ee=>{if(!be){Ee();return}ee=Ee}),ae(()=>{be=!1,ee?.()})});async function C(){y(null),i(!0);try{const q=t(),{sessionId:W}=await ze.runAgent(q,e.id);a(W),Qr(W)}catch(q){i(!1),y(q.message)}}async function N(q){y(null);try{await ze.setStage(t(),e.id,q),r(W=>W+1)}catch(W){y(W.message)}}async function F(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(R()),Tn.success(D("specDetail.specPathCopied"))}catch{Tn.error(D("specDetail.specPathCopyFailed"))}}function j(q){b(q),p(!0)}async function U(q){const W=g();W&&E(ie=>[...ie,{id:`f-${Date.now()}-${ie.length}`,sectionPath:W.sectionPath,quote:W.text,note:q}])}function z(q){E(W=>W.filter(ie=>ie.id!==q))}async function P(q){await ze.submitQuestionAnswers(t(),e.id,q),E([]),await C()}function X(){I(l()),O(!0)}async function V(q){const W=t(),ie=await ze.appendItem(W,e.id,q);ie.sessionId&&(i(!0),a(ie.sessionId),Qr(ie.sessionId))}async function ne(q){i(!0);try{const W=t(),{sessionId:ie}=await ze.explain(W,e.id,q.text);a(ie),Qr(ie)}catch(W){i(!1),y(W.message)}}return(()=>{var q=X3();return w(q,m(Ji,{get fallback(){return(()=>{var W=lf();return w(W,()=>D("common.loading")),W})()},get children(){return m(Y,{get when(){return u()},get fallback(){return(()=>{var W=lf();return w(W,()=>D("specDetail.notFound")),W})()},children:W=>[(()=>{var ie=Q3(),be=ie.firstChild,ee=be.firstChild,fe=be.nextSibling,Ee=fe.firstChild,Pe=fe.nextSibling,Xe=Pe.firstChild,gt=Xe.nextSibling;return w(ee,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:W().id}]}}),null),w(ee,m(Be,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return D("specDetail.copySpecPath")},get"aria-label"(){return D("specDetail.copySpecPath")},onClick:()=>void F(),get children(){return m(l1,{class:"h-3.5 w-3.5"})}}),null),w(be,m(ds,{}),null),w(Ee,()=>W().frontmatter.summary||D("common.pendingAgent")),Xe.addEventListener("change",ce=>N(ce.currentTarget.value)),w(gt,()=>a0(W().frontmatter.updated_at)),w(Pe,m(Be,{variant:"outline",size:"sm",class:"append-btn",ref(ce){var J=L;typeof J=="function"?J(ce):L=ce},onClick:X,get children(){return D("specDetail.appendTask")}}),null),w(Pe,m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${W().id}/review`)},get children(){return D("specDetail.review")}}),null),w(Pe,m(Y,{get when(){return c()?.exists},get children(){return m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${W().id}/debug`)},get children(){return D("specDetail.debug")}})}}),null),w(Pe,m(Y,{get when(){return o()},get children(){return m(I0,{variant:"secondary",get children(){return D("specDetail.running")}})}}),null),le(ce=>{var J=`cursor-pointer appearance-none rounded-full border-0 px-2.5 py-0.5 text-sm font-semibold uppercase text-white ${tA[W().frontmatter.stage]??"bg-muted"}`,he=D("specDetail.forceStage");return J!==ce.e&&ct(Xe,ce.e=J),he!==ce.t&&we(Xe,"title",ce.t=he),ce},{e:void 0,t:void 0}),le(()=>Xe.value=W().frontmatter.stage),ie})(),m(Y,{get when(){return h()},get children(){var ie=J3();return w(ie,h),ie}}),(()=>{var ie=eA(),be=ie.firstChild;return w(ie,m(Y,{get when(){return M()},get children(){return m(Z3,{get questions(){return T()},get freeforms(){return k()},get running(){return o()},onRemoveFreeform:z,onSubmit:P})}}),be),Gn(x,be),ie})(),m(w3,{get snap(){return de(()=>!!f())()?null:l()},onAnnotate:j,onExplain:ne}),m(S3,{get open(){return f()},get snap(){return g()},onCancel:()=>p(!1),onSubmit:U}),m(M3,{get open(){return S()},get sectionPath(){return _()?.sectionPath},get quote(){return _()?.text},anchorEl:L,onCancel:()=>O(!1),onSubmit:V})]})}})),q})()},aA=e=>{const[t,n]=_e(e,["class"]);return m(Mg,Q({get class(){return St("shrink-0 bg-border data-[orientation=horizontal]:h-[1px] data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-[1px]",t.class)}},n))};var uA=B("<span>"),cA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),lA=B('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),dA=B('<p class=" text-muted-foreground">'),fA=B('<p class="text-destructive ">'),gA=B('<p class=" text-muted-foreground">(runId: <code></code>)'),ff=B("<p class=text-muted-foreground>"),pA=B('<div class="flex min-h-0 flex-1 gap-4"><section class="flex min-h-0 flex-[4] min-w-0 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"></div><div class="flex gap-4"><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label></div></section><section class="flex min-h-0 min-w-0 flex-[6] flex-col gap-2">'),hA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),mA=B('<label class="flex cursor-pointer items-center gap-2 px-2 py-0.5 "><input type=checkbox><span></span><span class="truncate font-mono text-sm">'),bA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),yA=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const vA={commit:"review.commit",discard:"review.discard",stash:"review.stash"},Ei={review:"review.reviewing",commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},ki={review:"review.reviewChanges",commit:"review.commit",discard:"review.discard",stash:"review.stash"},xA={M:"text-yellow-600",A:"text-green-600",D:"text-red-600","??":"text-blue-600",R:"text-purple-600"},wA=()=>{const e=ns(),t=Zo(),[n]=hn(()=>[t(),e.id],([J,he])=>ze.getSpec(J,he)),[r,o]=$(0),[i]=hn(()=>[t(),e.id,r()],async([J,he])=>ze.getReview(J,he)),[s,a]=$([]),[u,c]=$("manual"),[l,d]=$(new Set),[f,p]=$(""),[g,b]=$(!1),[h,y]=$(null),[v,x]=$(null),[k,E]=$(null),[S,O]=$(null),[_,I]=$(null),[L,T]=$(""),[R,M]=$(null);function C(J){return T(J),new Promise(he=>M(()=>he))}function N(J){const he=R();he&&(M(null),he(J))}let F,j=null;ae(()=>j?.()),ae(()=>N(!1)),is();function U(J){J&&(J.style.height="auto",J.style.height=`${J.scrollHeight}px`)}const z=re(()=>{const J=i()?.text??"";return J.trim()?Cs(J,{specId:e.id,projectId:t()}):""}),P=re(()=>_A(i()?.text??"")),X=re(()=>{const J=e.id.split("."),he=J.length>=2?J[1]:"feat",Ie=n()?.frontmatter.summary??"";return Ie?`${he}: ${Ie}`:`${he}: update`});oe(()=>{const J=X();J&&!g()&&p(J)}),oe(kt(f,()=>{U(F)})),Vt(()=>U(F)),oe(()=>{const J=t(),he=e.id;if(!J||!he)return;const Ie=sy(J,he,G=>{a(G),d(Se=>{const Oe=new Set(G.map(Qe=>Qe.path)),Ne=new Set;for(const Qe of Se)Oe.has(Qe)&&Ne.add(Qe);return Ne})});ae(()=>Ie())});function V(J){return _()===J}const ne=re(()=>_()),q=re(()=>v()!==null||ne()!==null||h()!==null);function W(J,he){j?.(),I(J),j=as(t(),he,{onEvent:Ie=>{(Ie.type==="turn-completed"||Ie.type==="error")&&(I(null),J==="review"&&o(G=>G+1),j?.(),j=null)}})}function ie(){return u()==="agent"?s().map(J=>J.path):[...l()]}async function be(J){if(q())return;E(null);const he=ie();if(he.length===0){E(D("review.selectAtLeastOne"));return}if(!(J==="discard"&&!await C(D("review.confirmDiscard")))){y(J);try{if(J==="commit"){const Ie=f().trim();if(!Ie){E(D("review.enterCommitMsg"));return}await ze.directCommit(t(),e.id,{message:Ie,paths:he})}else J==="discard"?await ze.directDiscard(t(),e.id,{paths:he}):J==="stash"&&await ze.directStash(t(),e.id,{message:f().trim()||`yorz:${e.id}`,paths:he})}catch(Ie){E(Ie.message)}finally{y(null)}}}async function ee(J){if(!q()&&(E(null),!(J==="discard"&&!await C(D("review.confirmDiscardAll"))))){x(J);try{const he=J==="review"?await ze.triggerReview(t(),e.id):await ze.gitOp(t(),e.id,J);O({kind:J,runId:he.runId}),Qr(he.sessionId),W(J,he.sessionId)}catch(he){E(he.message)}finally{x(null)}}}async function fe(J){u()==="manual"?await be(J):await ee(J)}function Ee(J){return V(J)||v()===J||h()===J}function Pe(J){d(he=>{const Ie=new Set(he);return Ie.has(J)?Ie.delete(J):Ie.add(J),Ie})}function Xe(){s().every(J=>l().has(J.path))?d(new Set):d(new Set(s().map(J=>J.path)))}const gt=re(()=>s().length>0&&s().every(J=>l().has(J.path))),ce=re(()=>u()==="manual"&&l().size===0);return(()=>{var J=hA();return w(J,m(Ji,{get fallback(){return(()=>{var he=ff();return w(he,()=>D("common.loading")),he})()},get children(){return[(()=>{var he=cA(),Ie=he.firstChild,G=Ie.firstChild,Se=Ie.nextSibling;return w(Ie,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:D("specDetail.review")}]}}),G),w(G,()=>n()?.frontmatter.summary||D("common.pendingAgent")),w(Se,m(Y,{get when(){return P()},get children(){var Oe=uA();return w(Oe,()=>D("review.lastReview",{time:P()})),Oe}}),null),w(Se,m(ds,{}),null),he})(),(()=>{var he=pA(),Ie=he.firstChild,G=Ie.firstChild,Se=G.nextSibling,Oe=Se.firstChild,Ne=Oe.firstChild,Qe=Oe.nextSibling,Ct=Qe.firstChild,Nt=Ie.nextSibling;return w(G,m(Be,{variant:"default",size:"sm",get disabled(){return q()||ce()},onClick:()=>fe("commit"),get children(){return[m(Y,{get when(){return Ee("commit")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ee("commit"))()?D(Ei.commit):D(ki.commit))]}}),null),w(G,m(Be,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return q()||ce()},onClick:()=>fe("discard"),get children(){return[m(Y,{get when(){return Ee("discard")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ee("discard"))()?D(Ei.discard):D(ki.discard))]}}),null),w(G,m(Be,{variant:"ghost",size:"sm",get disabled(){return q()||ce()},onClick:()=>fe("stash"),get children(){return[m(Y,{get when(){return Ee("stash")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ee("stash"))()?D(Ei.stash):D(ki.stash))]}}),null),w(G,m(aA,{orientation:"vertical",class:"h-6"}),null),w(G,m(Be,{variant:"ghost",size:"sm",get title(){return D("review.reviewHint")},get disabled(){return q()||s().length===0},onClick:()=>ee("review"),get children(){return[m(Y,{get when(){return Ee("review")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ee("review"))()?D(Ei.review):D(ki.review))]}}),null),w(Ie,m(oo,{ref(Re){var We=F;typeof We=="function"?We(Re):F=Re},get placeholder(){return D("review.commitPlaceholder")},get value(){return f()},onInput:Re=>{b(!0),p(Re.currentTarget.value),U(F)},get disabled(){return q()},rows:2,class:"resize-none"}),Se),Ne.addEventListener("change",()=>c("manual")),w(Oe,()=>D("review.manualSelect"),null),Ct.addEventListener("change",()=>c("agent")),w(Qe,()=>D("review.agentSelect"),null),w(Ie,m(Y,{get when(){return de(()=>u()==="manual")()&&s().length>0},get children(){var Re=lA(),We=Re.firstChild,pt=We.firstChild;return w(We,m(Be,{variant:"ghost",size:"sm",onClick:Xe,get disabled(){return q()},get children(){return de(()=>!!gt())()?D("review.deselectAll"):D("review.selectAll")}}),pt),w(pt,()=>D("review.fileCount",{selected:l().size,total:s().length})),w(Re,m(bt,{get each(){return s()},children:It=>(()=>{var Yt=mA(),Ut=Yt.firstChild,on=Ut.nextSibling,dn=on.nextSibling;return Ut.addEventListener("change",()=>Pe(It.path)),w(on,()=>It.status),w(dn,()=>It.path),le(K=>{var ue=q(),me=`inline-block w-6 text-center text-sm font-bold ${xA[It.status]??""}`;return ue!==K.e&&(Ut.disabled=K.e=ue),me!==K.t&&ct(on,K.t=me),K},{e:void 0,t:void 0}),le(()=>Ut.checked=l().has(It.path)),Yt})()}),null),Re}}),null),w(Ie,m(Y,{get when(){return de(()=>u()==="manual")()&&s().length===0},get children(){var Re=dA();return w(Re,()=>D("review.noChanges")),Re}}),null),w(Ie,m(Y,{get when(){return k()},get children(){var Re=fA();return w(Re,k),Re}}),null),w(Ie,m(Y,{get when(){return S()},get children(){var Re=gA(),We=Re.firstChild,pt=We.nextSibling;return w(Re,()=>D("review.dispatched"),We),w(Re,(()=>{var It=de(()=>S().kind==="review");return()=>It()?D("review.reviewChanges"):D(vA[S().kind])})(),We),w(pt,()=>S().runId.slice(0,8)),Re}}),null),w(Nt,m(Y,{get when(){return i.loading},get fallback(){return m(Y,{get when(){return z()},get fallback(){return(()=>{var Re=yA();return w(Re,()=>D("review.noReport")),Re})()},get children(){var Re=bA();return le(()=>Re.innerHTML=z()),Re}})},get children(){var Re=ff();return w(Re,()=>D("common.loading")),Re}})),le(Re=>{var We=q(),pt=q();return We!==Re.e&&(Ne.disabled=Re.e=We),pt!==Re.t&&(Ct.disabled=Re.t=pt),Re},{e:void 0,t:void 0}),le(()=>Ne.checked=u()==="manual"),le(()=>Ct.checked=u()==="agent"),he})()]}}),null),w(J,m(Cn,{get open(){return R()!==null},onOpenChange:he=>{he||N(!1)},get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("review.discardTitle")}}),m(Wu,{get children(){return L()}})]}}),m(Uo,{get children(){return[m(Be,{variant:"outline",onClick:()=>N(!1),get children(){return D("common.cancel")}}),m(Be,{variant:"destructive",onClick:()=>N(!0),get children(){return D("review.confirmDiscardAction")}})]}})]}})}}),null),J})()};function _A(e){if(!e)return"";const t=e.split(/\r?\n/);for(let n=0;n<t.length;n++){const r=/^##\s+(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s*$/.exec(t[n]??"");if(r)return r[1]??""}return""}var EA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),gf=B("<p class=text-muted-foreground>"),kA=B('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),SA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),CA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),AA=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const TA=()=>{const e=ns(),t=Zo();is();const[n]=hn(()=>[t(),e.id],([i,s])=>ze.getSpec(i,s)),[r]=hn(()=>[t(),e.id],([i,s])=>ze.getDebug(i,s)),o=re(()=>{const i=qC(r()?.text??"");return i.trim()?Cs(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=SA();return w(i,m(Ji,{get fallback(){return(()=>{var s=gf();return w(s,()=>D("common.loading")),s})()},get children(){return[(()=>{var s=EA(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:D("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||D("common.pendingAgent")),w(c,m(ds,{})),s})(),(()=>{var s=kA();return w(s,m(Y,{get when(){return r.loading},get fallback(){return m(Y,{get when(){return o()},get fallback(){return(()=>{var a=AA();return w(a,()=>D("specDebug.empty")),a})()},get children(){var a=CA();return le(()=>a.innerHTML=o()),a}})},get children(){var a=gf();return w(a,()=>D("common.loading")),a}})),s})()]}})),i})()};var DA=B('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add &lt;path&gt;');const Jp=()=>(()=>{var e=DA(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>D("welcome.title")),w(r,()=>D("welcome.description")),w(o,()=>D("welcome.addHint"),i),e})();var OA=B('<p class="p-8 text-muted-foreground">');const RA=()=>{const[e]=hn(()=>ze.listProjects());return m(Y,{get when(){return!e.loading},get fallback(){return(()=>{var t=OA();return w(t,()=>D("common.loading")),t})()},get children(){return m(Y,{get when(){return(e()??[]).length>0},get fallback(){return m(Jp,{})},get children(){return(()=>{const n=(e()??[])[0];return n?m(Zm,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var pf=B('<label class="flex flex-col gap-1 font-medium"><span>'),NA=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),IA=B('<p class=" text-muted-foreground">'),MA=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=project-config-agent><span>'),LA=B('<p class=" text-destructive">');const $A={claude:"ClaudeCode",opencode:"OpenCode",codex:"Codex",custom:D("projectConfig.custom")},vo=".yorz/specs",PA=e=>{const[t,n]=$("claude"),[r,o]=$(""),[i,s]=$(""),[a,u]=$(vo),[c,l]=$(vo),[d,f]=$(!1),[p,g]=$(!1),[b,h]=$(null);oe(()=>{e.open&&(h(null),f(!0),(async()=>{try{const E=await ze.getProjectConfig(e.projectId);y(E)}catch(E){h(E.message)}finally{f(!1)}})())});function y(E){n(E.agent.kind),E.agent.kind==="custom"?(o(E.agent.cmd),s(E.agent.args.join(" "))):(o(""),s(""));const S=E.specsDir||vo;u(S),l(S)}function v(E){return E.split(/\s+/).map(S=>S.trim()).filter(Boolean)}function x(){const E=t();if(E==="claude")return{kind:"claude"};if(E==="opencode")return{kind:"opencode"};if(E==="codex")return{kind:"codex"};const S=r().trim();return S?{kind:"custom",cmd:S,args:v(i())}:{error:D("projectConfig.cmdRequired")}}async function k(E){E.preventDefault(),h(null);const S=x();if("error"in S){h(S.error);return}const O=a().trim()||vo;if(O.split(/[\\/]/).some(_=>_==="..")){h(D("projectConfig.invalidPath"));return}g(!0);try{await ze.updateProjectConfig(e.projectId,{agent:S,specsDir:O});let _=D("projectConfig.saved");O!==c()&&(_+=D("projectConfig.oldSpecsHint")),e.onSaved?.(_),e.onClose()}catch(_){h(_.message)}finally{g(!1)}}return m(Cn,{get open(){return e.open},onOpenChange:E=>!E&&e.onClose(),get children(){return m(Fo,{class:"max-w-[480px]",get children(){return[m(zo,{get children(){return m(Bo,{get children(){return[de(()=>D("projectConfig.title"))," · ",de(()=>e.projectName)]}})}}),m(Y,{get when(){return!d()},get fallback(){return(()=>{var E=IA();return w(E,()=>D("common.loading")),E})()},get children(){var E=NA(),S=E.firstChild,O=S.firstChild,_=S.nextSibling,I=_.firstChild,L=I.nextSibling;return E.addEventListener("submit",k),w(O,()=>D("projectConfig.agent")),w(S,()=>["claude","opencode","codex","custom"].map(T=>(()=>{var R=MA(),M=R.firstChild,C=M.nextSibling;return M.addEventListener("change",()=>n(T)),M.value=T,w(C,()=>$A[T]),le(()=>M.disabled=p()),le(()=>M.checked=t()===T),R})()),null),w(E,m(Y,{get when(){return t()==="custom"},get children(){return[(()=>{var T=pf(),R=T.firstChild;return w(R,()=>D("projectConfig.cmd")),w(T,m(Ao,{type:"text",get value(){return r()},onInput:M=>o(M.currentTarget.value),get placeholder(){return D("projectConfig.cmdPlaceholder")},get disabled(){return p()}}),null),T})(),(()=>{var T=pf(),R=T.firstChild;return w(R,()=>D("projectConfig.args")),w(T,m(Ao,{type:"text",get value(){return i()},onInput:M=>s(M.currentTarget.value),placeholder:"--flag value",get disabled(){return p()}}),null),T})()]}}),_),w(I,()=>D("projectConfig.specsDir")),w(_,m(Ao,{type:"text",get value(){return a()},onInput:T=>u(T.currentTarget.value),placeholder:vo,get disabled(){return p()}}),L),w(L,()=>D("projectConfig.specsDirHint")),w(E,(()=>{var T=de(()=>!!b());return()=>T()&&(()=>{var R=LA();return w(R,b),R})()})(),null),w(E,m(Uo,{get children(){return[m(Be,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return p()},get children(){return D("common.cancel")}}),m(Be,{type:"submit",get disabled(){return p()},get children(){return de(()=>!!p())()?D("common.saving"):D("projectConfig.save")}})]}}),null),E}})]}})}})};var FA=B('<span class=" font-semibold tracking-wide">'),BA=B('<div class="flex items-center gap-1">'),zA=B('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),UA=B('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),KA=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),HA=B("<aside><header></header><footer>"),qA=B('<p class="px-2.5 py-2 text-muted-foreground">'),jA=B('<span class="block truncate">'),GA=B('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),VA=B('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),WA=B('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),YA=B('<li class="group relative flex items-center">'),ZA=B('<span class="inline-block font-semibold">'),XA=B('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),QA=B('<p class="mt-1 text-sm text-destructive break-words">'),JA=B('<p class="break-all font-semibold">');const eh="yorz.projectsSidebar.collapsed",th="yorz.projectsSidebar.width",ac=220,e6=.2,t6=160,n6=640;function r6(){try{return typeof window<"u"&&window.localStorage.getItem(eh)==="1"}catch{return!1}}function o6(e){try{typeof window<"u"&&window.localStorage.setItem(eh,e?"1":"0")}catch{}}function As(e){return Number.isFinite(e)?Math.min(n6,Math.max(t6,Math.round(e))):ac}function ja(){return typeof window>"u"?ac:As(window.innerWidth*e6)}function i6(){try{if(typeof window>"u")return ac;const e=window.localStorage.getItem(th);if(!e)return ja();const t=Number(e);return Number.isFinite(t)?As(t):ja()}catch{return ja()}}function s6(e){try{typeof window<"u"&&window.localStorage.setItem(th,String(As(e)))}catch{}}function hf(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}const a6=()=>{const[e,t]=$(r6()),[n,r]=$(i6()),[o,{refetch:i}]=hn(()=>ze.listProjects()),[s,a]=$(null),[u,c]=$(null),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(!1),h=es(),y=ts(),v=re(()=>{const N=y.pathname.match(/^\/([^/]+)/);return N&&N[1]!=="api"?N[1]:""}),x=()=>e()||cr();function k(){if(cr()){Bi();return}const N=!e();t(N),o6(N)}let E=null,S=null,O=null;Vt(()=>{const N=s0(()=>{i()});ae(N)});function _(N){x()||(N.preventDefault(),E={startX:N.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),S=F=>{if(!E)return;const j=F.clientX-E.startX,U=As(E.startW+j);E.raf==null&&(E.raf=requestAnimationFrame(()=>{E&&(E.raf=null,r(U))}))},O=()=>{E?.raf!=null&&cancelAnimationFrame(E.raf),E=null,document.body.classList.remove("is-resizing"),S&&document.removeEventListener("mousemove",S),O&&document.removeEventListener("mouseup",O),S=null,O=null,s6(n())},document.addEventListener("mousemove",S),document.addEventListener("mouseup",O))}ae(()=>{S&&document.removeEventListener("mousemove",S),O&&document.removeEventListener("mouseup",O),document.body.classList.remove("is-resizing")});function I(N,F){F.preventDefault(),F.stopPropagation(),c(N)}function L(N,F="success"){F==="error"?Tn.error(N):Tn.success(N)}function T(N,F){F.preventDefault(),F.stopPropagation(),p(!1),d(N)}async function R(){const N=l();if(N){b(!0);try{f()&&N.worktree?await ze.removeProjectWithFiles(N.id):await ze.removeProject(N.id),await i(),v()===N.id&&h("/"),d(null)}catch(F){const j=F.message;j.includes("409")?(Tn.error(D("sidebar.uncommittedChanges")),d(null)):(a(j),Tn.error(j))}finally{b(!1)}}}function M(){i()}const C=()=>x()?void 0:{width:`${n()}px`};return(()=>{var N=HA(),F=N.firstChild,j=F.nextSibling;return w(F,m(Y,{get when(){return!x()},get fallback(){return m(Be,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return D("sidebar.expand")},get children(){return m(t0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var U=FA();return w(U,()=>D("sidebar.title")),U})(),(()=>{var U=BA();return w(U,m(Be,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:M,get disabled(){return o.loading},get title(){return D("sidebar.refreshList")},get children(){return m(U1,{get class(){return`h-3.5 w-3.5 ${o.loading?"animate-spin":""}`}})}}),null),w(U,m(Be,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return D("sidebar.collapse")},get children(){return m(e0,{class:"h-4 w-4"})}}),null),U})()]}})),w(N,m(Y,{get when(){return o()!==void 0},get fallback(){return(()=>{var U=qA();return w(U,()=>D("common.loading")),U})()},get children(){var U=zA();return w(U,m(bt,{get each(){return o()??[]},children:z=>{const P=()=>v()===z.id;return(()=>{var X=YA();return w(X,m(fr,{get href(){return`/${encodeURIComponent(z.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${P()?"bg-accent text-accent-foreground font-semibold":"hover:bg-muted"} ${x()?"px-0 text-center":""}`},get title(){return z.path},get children(){return m(Y,{get when(){return!x()},get fallback(){return(()=>{var V=ZA();return w(V,()=>(z.name[0]??"?").toUpperCase()),V})()},get children(){return[(()=>{var V=jA();return w(V,()=>hf(z)),V})(),m(Y,{get when(){return z.worktree},get children(){var V=GA();return w(V,m(m1,{class:"h-3 w-3"}),null),w(V,()=>D("sidebar.worktreeBadge"),null),le(()=>we(V,"title",`worktree of ${z.worktree.mainPath}`)),V}})]}})}}),null),w(X,m(Y,{get when(){return!x()},get children(){return[(()=>{var V=VA();return V.$$click=ne=>I(z,ne),w(V,m($1,{class:"h-3.5 w-3.5"})),le(ne=>{var q=D("sidebar.configure",{name:z.name}),W=D("sidebar.projectConfig");return q!==ne.e&&we(V,"aria-label",ne.e=q),W!==ne.t&&we(V,"title",ne.t=W),ne},{e:void 0,t:void 0}),V})(),(()=>{var V=WA();return V.$$click=ne=>void T(z,ne),w(V,m(Yo,{class:"h-3.5 w-3.5"})),le(ne=>{var q=D("sidebar.removeProject",{name:z.name}),W=D("sidebar.deleteProject");return q!==ne.e&&we(V,"aria-label",ne.e=q),W!==ne.t&&we(V,"title",ne.t=W),ne},{e:void 0,t:void 0}),V})()]}}),null),X})()}})),U}}),j),w(j,m(Y,{get when(){return!x()},get fallback(){return(()=>{var U=XA();return w(U,m(a1,{class:"h-3.5 w-3.5"})),le(()=>we(U,"title",`${D("sidebar.addHint")}${D("sidebar.addCmd")}`)),U})()},get children(){var U=UA(),z=U.firstChild;return w(U,()=>D("sidebar.addHint"),z),w(z,()=>D("sidebar.addCmd")),U}}),null),w(j,(()=>{var U=de(()=>!!s());return()=>U()&&(()=>{var z=QA();return w(z,s),le(()=>we(z,"title",s())),z})()})(),null),w(N,m(Y,{get when(){return!x()},get children(){var U=KA();return U.$$mousedown=_,le(()=>we(U,"aria-label",D("sidebar.resizeHint"))),U}}),null),w(N,m(Y,{get when(){return u()},children:U=>m(PA,{open:!0,get projectId(){return U().id},get projectName(){return U().name},onClose:()=>c(null),onSaved:z=>L(z)})}),null),w(N,m(Cn,{get open(){return l()!==null},onOpenChange:U=>!U&&!g()&&d(null),get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("sidebar.deleteProject")}}),m(Wu,{get children(){return D("sidebar.deleteDesc")}})]}}),m(Y,{get when(){return l()},children:U=>[(()=>{var z=JA();return w(z,()=>hf(U())),z})(),m(Y,{get when(){return U().worktree},get children(){return m(xp,{get checked(){return f()},onChange:z=>p(z),class:"flex items-center gap-2 text-destructive",get children(){return[m(wp,{}),m(vp,{get children(){return D("sidebar.deleteFiles")}})]}})}})]}),m(Uo,{get children(){return[m(Be,{variant:"outline",onClick:()=>d(null),get disabled(){return g()},get children(){return D("common.cancel")}}),m(Be,{variant:"destructive",onClick:()=>void R(),get disabled(){return g()},get children(){return de(()=>!!g())()?D("common.deleting"):D("common.confirmDelete")}})]}})]}})}}),null),le(U=>{var z=`relative flex flex-col border-r bg-card shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,P=C(),X=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,V=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return z!==U.e&&ct(N,U.e=z),U.t=ur(N,P,U.t),X!==U.a&&ct(F,U.a=X),V!==U.o&&ct(j,U.o=V),U},{e:void 0,t:void 0,a:void 0,o:void 0}),N})()};ln(["mousedown","click"]);var u6=["second","minute","hour","day","week","month","year"];function c6(e,t){if(t===0)return["just now","right now"];var n=u6[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var l6=["秒","分钟","小时","天","周","个月","年"];function d6(e,t){if(t===0)return["刚刚","片刻后"];var n=l6[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var wu={},Ts=function(e,t){wu[e]=t},f6=function(e){return wu[e]||wu.en_US},Ga=[60,60,24,7,365/7/12,12];function g6(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function p6(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Ga[o]&&o<Ga.length;o++)e/=Ga[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function h6(e,t){var n=new Date;return(+n-+g6(e))/1e3}var m6=function(e,t,n){var r=h6(e);return p6(r,f6(t))};Ts("en_US",c6);Ts("zh_CN",d6);var Si={},mf;function b6(){if(mf)return Si;mf=1,Object.defineProperty(Si,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Si.default=t,Si}var y6=b6();const v6=sc(y6),bf=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function x6(e,t){return bf[t]??bf[0]}const w6=`
664
+
665
+ `;function _6(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function E6(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=_6(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:w6+i.text}:i),r=!0}else t.push(i)}}return t}function k6(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function S6(e){const t=[];let n=null;const r=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const o of e){if(o.kind==="context"){n=null;const a=t[t.length-1];a?.kind==="context"?a.contexts.push(o):t.push({kind:"context",contexts:[o]});continue}if(o.kind==="text"&&o.role==="user"){n=null;const a=t[t.length-1];a?.kind==="user"?a.text+=o.text:t.push({kind:"user",text:o.text});continue}const i=r(),s=i.segments[i.segments.length-1];if(o.kind==="text"){s?.kind==="text"?s.text+=o.text:i.segments.push({kind:"text",text:o.text});continue}s?.kind==="tools"?o.result!==void 0&&o.name===void 0?k6(s.tools,o.result):s.tools.push({...o}):i.segments.push({kind:"tools",tools:[{...o}]})}return t.filter(o=>o.kind!=="assistant"||o.segments.length>0)}var C6=B("<div>");const A6=e=>{const[t,n]=_e(e,["class"]);return(()=>{var r=C6();return Wn(r,Q({get class(){return St("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()};var T6={};vr(T6,{Collapsible:()=>Ds,Content:()=>rh,Root:()=>oh,Trigger:()=>ih,useCollapsibleContext:()=>uc});var nh=mt();function uc(){const e=lt(nh);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function rh(e){const[t,n]=$(),r=uc(),o=$e({id:r.generateId("content")},e),[i,s]=_e(o,["ref","id","style"]),{present:a}=Lr({show:r.shouldMount,element:()=>t()??null}),[u,c]=$(0),[l,d]=$(0);let p=r.isOpen()||a();return Vt(()=>{const g=requestAnimationFrame(()=>{p=!1});ae(()=>{cancelAnimationFrame(g)})}),oe(kt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const g=t().getBoundingClientRect();c(g.height),d(g.width),p||(t().style.transitionDuration="",t().style.animationName="")})),oe(kt(r.isOpen,g=>{!g&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>ae(r.registerContentId(i.id))),m(Y,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(g){var b=ft(n,i.ref);typeof b=="function"&&b(g)},get id(){return i.id},get style(){return yr({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function oh(e){const t=`collapsible-${qt()}`,n=$e({id:t},e),[r,o]=_e(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=$(),a=ei({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=re(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:Yn(()=>o.id),registerContentId:Lt(s)};return m(nh.Provider,{value:c,get children(){return m(Ze,Q({as:"div"},u,o))}})}function ih(e){const t=uc(),[n,r]=_e(e,["onClick"]);return m(uo,Q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Ke(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Ds=Object.assign(oh,{Content:rh,Trigger:ih});const cc=Ds;Ds.Trigger;const lc=e=>{const[t,n]=_e(e,["class"]);return m(Ds.Content,Q({get class(){return St("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var D6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),O6=B('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),R6=B('<div class="font-mono text-xs font-semibold">'),N6=B('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),I6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),M6=B("<div class=space-y-1>");const L6=e=>{const[t,n]=$(!1);return m(cc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=D6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Tu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>D("chat.toolCollapsed",{count:e.tools.length})),r})(),m(lc,{get children(){var r=O6();return w(r,m(bt,{get each(){return e.tools},children:o=>(()=>{var i=M6();return w(i,m(Y,{get when(){return o.name},get children(){var s=R6();return w(s,()=>o.name),s}}),null),w(i,m(Y,{get when(){return o.input!==void 0},get children(){var s=N6();return w(s,()=>$6(o.input)),s}}),null),w(i,m(Y,{get when(){return o.result!==void 0},get children(){var s=I6();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function $6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}ln(["click"]);var P6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),F6=B('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),B6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const z6=e=>{const[t,n]=$(!1);return m(cc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=P6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Tu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>D("chat.agentContextCollapsed",{count:e.contexts.length})),le(()=>we(r,"title",D("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),m(lc,{get children(){var r=F6();return w(r,m(bt,{get each(){return e.contexts},children:o=>(()=>{var i=B6();return w(i,()=>o.text),i})()})),r}})]}})};ln(["click"]);var U6={};vr(U6,{Description:()=>Zu,ErrorMessage:()=>Xu,Item:()=>uh,ItemControl:()=>ch,ItemDescription:()=>lh,ItemIndicator:()=>dh,ItemInput:()=>fh,ItemLabel:()=>gh,Label:()=>ph,RadioGroup:()=>yn,Root:()=>hh,useRadioGroupContext:()=>dc});var sh=mt();function dc(){const e=lt(sh);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var ah=mt();function oi(){const e=lt(ah);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function uh(e){const t=Qn(),n=dc(),r=`${t.generateId("item")}-${qt()}`,o=$e({id:r},e),[i,s]=_e(o,["value","disabled","onPointerDown"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(),[b,h]=$(!1),y=re(()=>n.isDefaultValue(i.value)),v=re(()=>n.isSelectedValue(i.value)),x=re(()=>i.disabled||t.isDisabled()||!1),k=O=>{Ke(O,i.onPointerDown),b()&&O.preventDefault()},E=re(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":v()?"":void 0})),S={value:()=>i.value,dataset:E,isDefault:y,isSelected:v,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:p,select:()=>n.setSelectedValue(i.value),generateId:Yn(()=>s.id),registerInput:Lt(u),registerLabel:Lt(l),registerDescription:Lt(f),setIsFocused:h,setInputRef:g};return m(ah.Provider,{value:S,get children(){return m(Ze,Q({as:"div",role:"group",onPointerDown:k},E,s))}})}function ch(e){const t=oi(),n=$e({id:t.generateId("control")},e),[r,o]=_e(n,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:a=>{Ke(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Ke(a,r.onKeyDown),a.key===us.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function lh(e){const t=oi(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}function dh(e){const t=oi(),n=$e({id:t.generateId("indicator")},e),[r,o]=_e(n,["ref","forceMount"]),[i,s]=$(),{present:a}=Lr({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return m(Y,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(u){var c=ft(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function fh(e){const t=Qn(),n=dc(),r=oi(),o=$e({id:r.generateId("input")},e),[i,s]=_e(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=$(!1),d=g=>{if(Ke(g,i.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const b=g.target;b.checked=r.isSelected()}l(!1)},f=g=>{Ke(g,i.onFocus),r.setIsFocused(!0)},p=g=>{Ke(g,i.onBlur),r.setIsFocused(!1)};return oe(kt([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;l(!0);const b=r.inputRef();b?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),b?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(()=>ae(r.registerInput(s.id))),m(Ze,Q({as:"input",ref(g){var b=ft(r.setInputRef,i.ref);typeof b=="function"&&b(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return yr({...Lu},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:f,onBlur:p},()=>r.dataset(),s))}function gh(e){const t=oi(),n=$e({id:t.generateId("label")},e);return oe(()=>ae(t.registerLabel(n.id))),m(Ze,Q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function ph(e){return m(cp,Q({as:"span"},e))}function hh(e){let t;const n=`radiogroup-${qt()}`,r=$e({id:n,orientation:"vertical"},e),[o,i,s]=_e(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ap),[a,u]=Jo({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:h=>o.onChange?.(h)}),{formControlContext:c}=up(i);lp(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(Z(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),f=h=>h===e.defaultValue,p=h=>h===a(),b={ariaDescribedBy:d,isDefaultValue:f,isSelectedValue:p,setSelectedValue:h=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(h),t))for(const y of t.querySelectorAll("[type='radio']")){const v=y;v.checked=p(v.value)}}};return m(Yu.Provider,{value:c,get children(){return m(sh.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=ft(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"radiogroup",get id(){return Z(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var yn=Object.assign(hh,{Description:Zu,ErrorMessage:Xu,Item:uh,ItemControl:ch,ItemDescription:lh,ItemIndicator:dh,ItemInput:fh,ItemLabel:gh,Label:ph});yn.Description;yn.ErrorMessage;yn.ItemDescription;const K6=yn.ItemInput,H6=yn.ItemLabel;yn.Label;const q6=yn,j6=yn.Item,G6=e=>{const[t,n]=_e(e,["class"]);return m(yn.ItemControl,Q({get class(){return St("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return m(yn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var V6=B('<span class="font-semibold tracking-wide">'),yf=B("<span>"),W6=B('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),Y6=B('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),Z6=B("<div class=mb-1.5>"),X6=B('<p class="mb-1 text-xs text-destructive">'),Q6=B('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-y-auto px-2.5 py-2"></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),J6=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),eT=B("<aside><header>"),tT=B('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),nT=B('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),rT=B('<p class="text-sm text-muted-foreground">'),oT=B('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 text-sm font-medium text-foreground">'),iT=B('<div class="mb-2 rounded bg-muted px-2 py-1.5 text-sm">'),sT=B('<div class="markdown chat-md">');const Va="yorz.layout.col2.collapsed",_u="yorz.layout.col2.width",vf="yorz.chat.sessionList.collapsed",mh="yorz.chat.sessionList.rows",aT="yorz.chat.sessionList.limit",uT="yorz.chat.sessionList.showHistory",bh=[3,5,10],cT=34,fc=340,lT=.4,yh=260,dT=960,fT=.8,gT=96,pT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,hT=1500,mT=80;function bT(e){return new Promise(t=>setTimeout(t,e))}Ts("en",x6);Ts("zh-CN",v6);function yT(){return typeof window>"u"?dT:Math.max(yh,Math.round(window.innerWidth*fT))}function Wi(e){return Number.isFinite(e)?Math.min(yT(),Math.max(yh,Math.round(e))):fc}function Wa(){return typeof window>"u"?fc:Wi(window.innerWidth*lT)}function xf(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function vT(){try{if(typeof window>"u")return fc;const e=window.localStorage.getItem(_u);if(!e)return Wa();const t=Number(e);return Number.isFinite(t)?Wi(t):Wa()}catch{return Wa()}}function To(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Wr(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Eu(e){return bh.includes(e)}function xT(){const e=Number(To(mh,""));if(Eu(e))return e;const t=Number(To(aT,""));return Eu(t)?t:To(uT,"0")==="1"?10:3}const wT=()=>{let e,t;const{lng:n}=L0(),r=Qg({projectId:()=>Tt()||""}),[o,i]=$(To(Va,"0")==="1"),[s,a]=$(vT()),[u,c]=$(To(vf,"0")!=="1"),[l,d]=$(xT()),[f,p]=$(""),[g,b]=$([]),h=re(()=>S6(g())),[y,v]=$(""),[x,k]=$(!0),[E,S]=$(Date.now()),[O,_]=$(!1),[I,L]=$({}),T=new Set,R=new Map;function M(K){let ue=R.get(K);if(!ue){let me=()=>{};ue={promise:new Promise(Ue=>{me=Ue}),resolve:me},R.set(K,ue)}return ue.promise}function C(K){M(K),R.get(K)?.resolve()}const[N,{refetch:F}]=hn(()=>Tt()||void 0,K=>ze.listSessions(K));oe(()=>{const K=N();K&&L(ue=>{const me={};for(const Ue of K)me[Ue.id]=!!Ue.running;const Je=f();return Je&&!(Je in me)&&ue[Je]===!0&&(me[Je]=!0),me})}),oe(kt(Tt,()=>{p(""),L({}),pt(),_(!1),T.clear(),R.clear(),r.reset()})),oe(()=>{const K=Tt();if(!K)return;const ue=o0(K,{onStatus:me=>{L(Je=>({...Je,[me.sessionId]:me.running})),me.running||F()}});ae(ue)});const j=K=>I()[K]===!0,U=re(()=>{const K=f();return K?j(K):!1}),z=re(()=>(N()??[]).filter(K=>j(K.id)).length),P=re(()=>N()??[]);function X(K){!K||K===f()||(p(K),F())}oe(()=>{const K=Q1();K&&(J1(),X(K),o()&&(i(!1),Wr(Va,"0")))});const V=()=>o()||cr();function ne(){if(cr()){Bi();return}const K=!o();i(K),Wr(Va,K?"1":"0")}function q(K){c(K),Wr(vf,K?"0":"1")}function W(K){const ue=Number(K);Eu(ue)&&(d(ue),Wr(mh,String(ue)))}function ie(K){return D(K===3?"chat.sessionListRows3":K===5?"chat.sessionListRows5":"chat.sessionListRows10")}function be(K){const ue=K.title.trim();return ue&&ue!==K.id&&!pT.test(ue)?ue:K.id}Vt(()=>{const K=()=>{const ue=Wi(s());ue!==s()&&(a(ue),Wr(_u,String(ue)))};window.addEventListener("resize",K),ae(()=>window.removeEventListener("resize",K))}),Vt(()=>{const K=window.setInterval(()=>S(Date.now()),6e4);ae(()=>window.clearInterval(K))});let ee=null,fe=null,Ee=null;function Pe(K){V()||(K.preventDefault(),ee={startX:K.clientX,startW:s(),raf:null},document.body.classList.add("is-resizing"),fe=ue=>{if(!ee)return;const me=Wi(ee.startW+(ue.clientX-ee.startX));ee.raf==null&&(ee.raf=requestAnimationFrame(()=>{ee&&(ee.raf=null,a(me))}))},Ee=()=>{ee?.raf!=null&&cancelAnimationFrame(ee.raf),ee=null,document.body.classList.remove("is-resizing"),fe&&document.removeEventListener("mousemove",fe),Ee&&document.removeEventListener("mouseup",Ee),fe=null,Ee=null,Wr(_u,String(s()))},document.addEventListener("mousemove",fe),document.addEventListener("mouseup",Ee))}ae(()=>{fe&&document.removeEventListener("mousemove",fe),Ee&&document.removeEventListener("mouseup",Ee),document.body.classList.remove("is-resizing")}),oe(()=>{const K=Tt(),ue=f();if(!K||!ue)return;let me=!1;k(!0),T.has(ue)||(pt(),ze.getSessionMessages(K,ue).then(Ue=>{me||pt(E6(Ue))}).catch(()=>{}));const Je=as(K,ue,{onReady:()=>C(ue),onEvent:Ue=>{Ue.type==="text"?Nt(Ue.delta):Ue.type==="tool-use"?We({kind:"tool",name:Ue.name,input:Ue.input}):Ue.type==="tool-result"?We({kind:"tool",result:Ue.text}):Ue.type==="turn-completed"?(Ct(),T.delete(ue),L(et=>({...et,[ue]:!1}))):Ue.type==="error"?(Re(`
666
+ ${D("chat.errorMessage",{message:Ue.message})}
667
+ `),L(et=>({...et,[ue]:!1}))):Ue.type==="session-started"&&Ue.sessionId!==ue&&(T.has(ue)&&T.add(Ue.sessionId),L(et=>({...et,[ue]:!1,[Ue.sessionId]:!0})),p(Ue.sessionId),F())}});ae(()=>{me=!0,R.delete(ue),Je()})}),oe(()=>{g(),x()&&requestAnimationFrame(gt)});function Xe(K){return K.scrollHeight-K.scrollTop-K.clientHeight<=gT}function gt(){e&&(e.scrollTop=e.scrollHeight)}function ce(){e&&k(Xe(e))}function J(K){return E(),!Number.isFinite(K)||K<=0?"":m6(K,n())}function he(K){return!Number.isFinite(K)||K<=0?"":new Date(K).toLocaleString(n())}async function Ie(K){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(K),Tn.success(D("chat.filePathCopied"))}catch{Tn.error(D("chat.filePathCopyFailed"))}}function G(K){const ue=xf(K.target);if(!ue||e&&!e.contains(ue))return;const me=ue.dataset.filePath;me&&(K.preventDefault(),Ie(me))}function Se(K){if(K.key!=="Enter"&&K.key!==" ")return;const ue=xf(K.target);if(!ue||e&&!e.contains(ue))return;const me=ue.dataset.filePath;me&&(K.preventDefault(),Ie(me))}let Oe="",Ne=null;function Qe(K,ue){const me=K[K.length-1];return me&&me.kind==="text"&&me.role==="assistant"?[...K.slice(0,-1),{...me,text:me.text+ue}]:[...K,{kind:"text",role:"assistant",text:ue}]}function Ct(){Ne!=null&&(clearTimeout(Ne),Ne=null);const K=Oe;Oe="",K&&b(ue=>Qe(ue,K))}function Nt(K){Oe+=K,Ne==null&&(Ne=window.setTimeout(Ct,mT))}function Re(K){Ct(),b(ue=>Qe(ue,K))}function We(K){Ct(),b(ue=>[...ue,K])}function pt(K=[]){Ne!=null&&(clearTimeout(Ne),Ne=null),Oe="",b(ue=>K.length===0&&ue.length===0?ue:K)}ae(()=>{Ne!=null&&clearTimeout(Ne)});function It(){!Tt()||!f()||(p(""),pt(),k(!0),r.reset())}async function Yt(){const K=Tt(),ue=f(),me=y().trim();if(!K||!me||O()||U()||r.hasPending())return;if(v(""),k(!0),!ue){await Ut(K,me);return}const Je=r.draftId()??void 0;We({kind:"text",role:"user",text:me}),L(Ue=>({...Ue,[ue]:!0}));try{await ze.sendSessionMessage(K,ue,me,Je),r.reset()}catch(Ue){Re(`
668
+ ${D("chat.errorMessage",{message:Ue.message})}
669
+ `),L(et=>({...et,[ue]:!1}))}}async function Ut(K,ue){_(!0);try{let me;try{me=(await ze.createSession(K,{})).sessionId}catch(et){v(ue),Re(`
670
+ ${D("chat.errorMessage",{message:et.message})}
671
+ `);return}T.add(me);const Je=r.draftId()??void 0,Ue=M(me);pt([{kind:"text",role:"user",text:ue}]),L(et=>({...et,[me]:!0})),p(me),await Promise.race([Ue,bT(hT)]);try{await ze.sendSessionMessage(K,me,ue,Je),r.reset()}catch(et){Re(`
672
+ ${D("chat.errorMessage",{message:et.message})}
673
+ `),L(Kt=>({...Kt,[me]:!1}))}F()}finally{_(!1)}}async function on(){const K=Tt(),ue=f();!K||!ue||(await ze.abortSession(K,ue).catch(()=>{}),L(me=>({...me,[ue]:!1})))}function dn(K){K.defaultPrevented||K.isComposing||K.key==="Enter"&&!K.shiftKey&&(K.preventDefault(),Yt())}return(()=>{var K=eT(),ue=K.firstChild;return w(ue,m(Y,{get when(){return!V()},get fallback(){return m(Be,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:ne,get title(){return D("chat.expand")},get children(){return m(t0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var me=V6();return w(me,()=>D("chat.title")),me})(),m(Be,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:ne,get title(){return D("chat.collapse")},get children(){return m(e0,{class:"h-4 w-4"})}})]}})),w(K,m(Y,{get when(){return!V()},get children(){var me=Q6(),Je=me.firstChild,Ue=Je.nextSibling,et=Ue.firstChild,Kt=et.firstChild,Ge=et.nextSibling;w(me,m(Y,{get when(){return Tt()},get children(){return m(A6,{class:"m-2 rounded-lg shadow-none",get children(){return m(cc,{get open(){return u()},onOpenChange:q,get children(){return[(()=>{var nt=W6(),A=nt.firstChild,H=A.nextSibling;return A.$$click=()=>q(!u()),w(A,m(Y,{get when(){return z()>0},get fallback(){return(()=>{var te=yf();return w(te,()=>D("chat.sessionsLabelPlain")),te})()},get children(){var te=yf();return w(te,()=>D("chat.sessionsLabel",{count:z()})),te}})),w(nt,m(q6,{class:"flex shrink-0 items-center gap-2",get value(){return String(l())},onChange:W,get"aria-label"(){return D("chat.sessionListRows")},get children(){return m(bt,{each:bh,children:te=>m(j6,{get value(){return String(te)},class:"flex items-center gap-1",get children(){return[m(K6,{}),m(G6,{class:"h-3 w-3"}),m(H6,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return ie(te)}})]}})})}}),H),H.$$click=()=>q(!u()),w(H,m(Tu,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${u()?"":"-rotate-90"}`}})),le(te=>{var Ce=u()?D("chat.collapseSessions"):D("chat.expandSessions"),it=u()?D("chat.collapseSessions"):D("chat.expandSessions");return Ce!==te.e&&we(A,"title",te.e=Ce),it!==te.t&&we(H,"title",te.t=it),te},{e:void 0,t:void 0}),nt})(),m(lc,{get children(){var nt=Y6();return w(nt,m(Y,{get when(){return P().length>0},get fallback(){return(()=>{var A=tT();return w(A,()=>D("chat.noRunningSessions")),A})()},get children(){return m(bt,{get each(){return P()},children:A=>(()=>{var H=nT(),te=H.firstChild,Ce=te.firstChild,it=Ce.firstChild,dt=it.nextSibling;dt.nextSibling;var ke=Ce.nextSibling,ye=ke.nextSibling;return te.$$click=()=>X(A.id),w(te,m(Y,{get when(){return j(A.id)},get children(){return m(sr,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Ce),w(Ce,()=>A.kind,dt),w(ke,()=>be(A)),w(ye,()=>J(A.updatedAt)),le(Te=>{var vt=`flex w-full items-center gap-1 px-2.5 py-1.5 text-left text-sm ${f()===A.id?"bg-background font-semibold":"hover:bg-background"}`,ht=j(A.id)?D("chat.sessionTitleRunning",{kind:A.kind,id:A.id}):D("chat.sessionTitle",{kind:A.kind,id:A.id}),Jn=he(A.updatedAt);return vt!==Te.e&&ct(te,Te.e=vt),ht!==Te.t&&we(te,"title",Te.t=ht),Jn!==Te.a&&we(ye,"title",Te.a=Jn),Te},{e:void 0,t:void 0,a:void 0}),H})()})}})),le(A=>Ro(nt,"max-height",`${l()*cT}px`)),nt}})]}})}})}}),Je),Je.addEventListener("scroll",ce),Je.$$keydown=Se,Je.$$click=G;var sn=e;typeof sn=="function"?Gn(sn,Je):e=Je,w(Je,m(Y,{get when(){return h().length>0},get fallback(){return(()=>{var nt=rT();return w(nt,(()=>{var A=de(()=>!!f());return()=>A()?D("chat.empty"):D("chat.draftEmpty")})()),nt})()},get children(){return m(bt,{get each(){return h()},children:nt=>m(Y,{get when(){return nt.kind==="context"?nt:null},get fallback(){return m(Y,{get when(){return nt.kind==="assistant"?nt:null},get fallback(){return(()=>{var A=oT();return w(A,()=>nt.text),A})()},children:A=>(()=>{var H=iT();return w(H,m(bt,{get each(){return A().segments},children:te=>m(Y,{get when(){return te.kind==="tools"?te:null},get fallback(){return(()=>{var Ce=sT();return le(()=>Ce.innerHTML=Cs(te.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:D("chat.copyFilePath")})),Ce})()},children:Ce=>m(L6,{get tools(){return Ce().tools}})})})),H})()})},children:A=>m(z6,{get contexts(){return A().contexts}})})})}})),w(Ue,m(Y,{get when(){return r.count()>0},get children(){var nt=Z6();return w(nt,m(sp,{ctrl:r,compact:!0})),nt}}),et),w(Ue,m(Y,{get when(){return r.error()},get children(){var nt=X6();return w(nt,()=>r.error()),nt}}),et),w(et,m(Jg,{get projectId(){return Tt()||""},get value(){return y()},onValueChange:v,onKeyDown:dn,get onPaste(){return r.onPaste},get placeholder(){return de(()=>!Tt())()?D("chat.noSessionPlaceholder"):de(()=>!!f())()?D("chat.inputPlaceholder"):D("chat.draftPlaceholder")},get disabled(){return!Tt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1 text-sm"}),Kt),w(et,m(Be,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!Tt()||r.count()>=to},get title(){return D("newSpec.importAttachment")},get children(){return m(I1,{class:"h-4 w-4"})}}),Kt),Ni(Kt,"change",r.onFileInputChange);var fn=t;return typeof fn=="function"?Gn(fn,Kt):t=Kt,we(Kt,"accept",Xg),w(Ge,m(Be,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:It,get disabled(){return!Tt()||!f()},get title(){return D("chat.newSession")},get children(){return m(Du,{class:"h-4 w-4"})}}),null),w(Ge,m(Y,{get when(){return U()},get fallback(){return m(Be,{size:"sm",onClick:()=>void Yt(),get disabled(){return!Tt()||!y().trim()||O()||r.hasPending()},get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("chat.send"))]}})},get children(){return m(Be,{variant:"outline",size:"sm",onClick:()=>void on(),get title(){return D("chat.abort")},get children(){return[m(G1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("chat.abort"))]}})}}),null),me}}),null),w(K,m(Y,{get when(){return!V()},get children(){var me=J6();return me.$$mousedown=Pe,me}}),null),le(me=>{var Je=`relative flex flex-col border-r bg-card shrink-0 ${V()?"w-9 transition-[width] duration-150":""}`,Ue=V()?void 0:{width:`${s()}px`},et=`flex items-center border-b ${V()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Je!==me.e&&ct(K,me.e=Je),me.t=ur(K,Ue,me.t),et!==me.a&&ct(ue,me.a=et),me},{e:void 0,t:void 0,a:void 0}),K})()};ln(["click","keydown","mousedown"]);var _T=B('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const ET=e=>{const t=ts(),{lng:n,changeLanguage:r}=L0(),o=re(()=>t.pathname===en("specs/new"));function i(s){s!==n()&&(r(s),window.location.reload())}return oe(()=>{const s=t.pathname.match(/^\/([^/]+)/);ey(s&&s[1]!=="api"?s[1]:"")}),(()=>{var s=_T(),a=s.firstChild,u=a.firstChild,c=a.nextSibling,l=c.firstChild;return w(a,m(fr,{href:"/",class:"text-lg font-bold",children:"YorZ"}),u),w(u,m(Y,{get when(){return Tt()},get children(){return m(Be,{as:fr,get href(){return en("specs/new")},get target(){return o()?"_blank":void 0},get rel(){return o()?"noopener":void 0},variant:"default",size:"sm",get children(){return[m(Du,{class:"mr-1 h-4 w-4"}),de(()=>D("shell.newSpec"))]}})}}),null),w(u,m(Fg,{placement:"bottom-end",get children(){return[m(Pg,{as:Be,variant:"ghost",size:"icon",get title(){return D("shell.languageSwitch")},get children(){return m(_1,{class:"h-4 w-4"})}}),m(Bg,{get children(){return[m(pu,{onSelect:()=>i("zh-CN"),get children(){return[m(Yc,{get class(){return`mr-2 h-4 w-4 ${n()==="zh-CN"?"opacity-100":"opacity-0"}`}}),de(()=>D("shell.langZh"))]}}),m(pu,{onSelect:()=>i("en"),get children(){return[m(Yc,{get class(){return`mr-2 h-4 w-4 ${n()==="en"?"opacity-100":"opacity-0"}`}}),de(()=>D("shell.langEn"))]}})]}})]}}),null),w(c,m(a6,{}),l),w(c,m(wT,{}),l),w(l,()=>e.children),w(s,m($_,{position:"top-center"}),null),s})()},vh=document.getElementById("app");if(!vh)throw new Error("missing #app root");cm(()=>m(Wm,{root:ET,get children(){return[m(Er,{path:"/",component:RA}),m(Er,{path:"/:projectId",component:e2}),m(Er,{path:"/:projectId/specs/new",component:V2}),m(Er,{path:"/:projectId/specs/:id",component:sA}),m(Er,{path:"/:projectId/specs/:id/review",component:wA}),m(Er,{path:"/:projectId/specs/:id/debug",component:TA}),m(Er,{path:"*",component:Jp})]}}),vh);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{VC as _,sc as g};