@yorz/cli 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/cli/index.js +312 -26
  2. package/dist/gui/assets/{abnfDiagram-VRR7QNED-1dYBKtgk.js → abnfDiagram-VRR7QNED-CpQSXKD3.js} +1 -1
  3. package/dist/gui/assets/{arc-OAvgDu2T.js → arc-BFSj3oux.js} +1 -1
  4. package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-DjLIXpVy.js → architectureDiagram-ZJ3FMSHR-DUUbTneR.js} +1 -1
  5. package/dist/gui/assets/{blockDiagram-677ZJIJ3-vDgSpIYO.js → blockDiagram-677ZJIJ3-b_cB7_jE.js} +1 -1
  6. package/dist/gui/assets/{c4Diagram-LMCZKHZV-CfqG7l8_.js → c4Diagram-LMCZKHZV-BW2WDVS6.js} +1 -1
  7. package/dist/gui/assets/channel-ChMv_4IC.js +1 -0
  8. package/dist/gui/assets/{chunk-2Q5K7J3B-BYR_jfQf.js → chunk-2Q5K7J3B-DBPdFkwf.js} +1 -1
  9. package/dist/gui/assets/{chunk-32BRIVSS-DCFUKQRk.js → chunk-32BRIVSS-DIbss3Mf.js} +1 -1
  10. package/dist/gui/assets/{chunk-5VM5RSS4-DrMq6ZH_.js → chunk-5VM5RSS4-iGPM2FiL.js} +1 -1
  11. package/dist/gui/assets/{chunk-EX3LRPZG-n95iKZ_F.js → chunk-EX3LRPZG-CFO6icXh.js} +1 -1
  12. package/dist/gui/assets/{chunk-JWPE2WC7-7X3iMA5d.js → chunk-JWPE2WC7-BoSzxOe1.js} +1 -1
  13. package/dist/gui/assets/{chunk-MOJQB5TN-BfJ7bYKG.js → chunk-MOJQB5TN-DenA9g0A.js} +1 -1
  14. package/dist/gui/assets/{chunk-RYQCIY6F-DMrZx7LT.js → chunk-RYQCIY6F-6OVqI5Jh.js} +1 -1
  15. package/dist/gui/assets/{chunk-V7JOEXUC-DEQ2ipfO.js → chunk-V7JOEXUC-CwTJoQCL.js} +1 -1
  16. package/dist/gui/assets/{chunk-VR4S4FIN-CEv2d05O.js → chunk-VR4S4FIN-D1Hv1RW-.js} +1 -1
  17. package/dist/gui/assets/{chunk-XXDRQBXY-B4TFXQyu.js → chunk-XXDRQBXY-5jwTXqEl.js} +1 -1
  18. package/dist/gui/assets/classDiagram-OUVF2IWQ-YMNyCLvX.js +1 -0
  19. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-YMNyCLvX.js +1 -0
  20. package/dist/gui/assets/{cose-bilkent-JH36ORCC-BvtDQXS8.js → cose-bilkent-JH36ORCC-Cc8VWY9x.js} +1 -1
  21. package/dist/gui/assets/{cynefin-VYW2F7L2-CACe6Hnx.js → cynefin-VYW2F7L2-BXFPytZ_.js} +1 -1
  22. package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-CYwNcXDx.js → cynefinDiagram-TSTJHNR4-WZDfGA2i.js} +1 -1
  23. package/dist/gui/assets/{dagre-VKFMJZFB-CM67mFp0.js → dagre-VKFMJZFB-Dip6iJOF.js} +1 -1
  24. package/dist/gui/assets/{diagram-FQU43EPY-DhY2YJ4E.js → diagram-FQU43EPY-CFLYoHwF.js} +1 -1
  25. package/dist/gui/assets/{diagram-G47NLZAW-SnGssRZe.js → diagram-G47NLZAW-BswWoT3h.js} +1 -1
  26. package/dist/gui/assets/{diagram-NH7WQ7WH-Bg3XxHtm.js → diagram-NH7WQ7WH-BizhF8Pc.js} +1 -1
  27. package/dist/gui/assets/{diagram-OA4YK3LP-C90tCphz.js → diagram-OA4YK3LP-BckN9mPI.js} +1 -1
  28. package/dist/gui/assets/{diagram-WEI45ONY-C_rdqlGR.js → diagram-WEI45ONY-ht6wkF4x.js} +1 -1
  29. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-C8tetpau.js → ebnfDiagram-CCIWWBDH-DyVIzHp5.js} +1 -1
  30. package/dist/gui/assets/{erDiagram-Q63AITRT-DeBf62pI.js → erDiagram-Q63AITRT-DRFWvAAm.js} +1 -1
  31. package/dist/gui/assets/{flowDiagram-23GEKE2U-ONut2CN0.js → flowDiagram-23GEKE2U-CiBwda7G.js} +1 -1
  32. package/dist/gui/assets/{ganttDiagram-NO4QXBWP-R0S1U9l5.js → ganttDiagram-NO4QXBWP-vRQNKo6Y.js} +1 -1
  33. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-1dBOeSWA.js → gitGraphDiagram-IHSO6WYX-BYCaD1Fo.js} +1 -1
  34. package/dist/gui/assets/index-Dwx7eFhj.css +1 -0
  35. package/dist/gui/assets/index-DzV2HQw-.js +36 -0
  36. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-Bizux-u4.js → infoDiagram-FWYZ7A6U-1Y32iWPH.js} +1 -1
  37. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-BQn9HrOR.js → ishikawaDiagram-FXEZZL3T-BQDQ7prq.js} +1 -1
  38. package/dist/gui/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  39. package/dist/gui/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  40. package/dist/gui/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  41. package/dist/gui/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  42. package/dist/gui/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 +0 -0
  43. package/dist/gui/assets/jetbrains-mono-latin-700-normal-D3wTyLJW.woff +0 -0
  44. package/dist/gui/assets/{journeyDiagram-5HDEW3XC-omxxk4CD.js → journeyDiagram-5HDEW3XC-DSWI24Bt.js} +1 -1
  45. package/dist/gui/assets/{kanban-definition-HUTT4EX6-ZSvya-tv.js → kanban-definition-HUTT4EX6-fiE0W_uC.js} +1 -1
  46. package/dist/gui/assets/{linear-DTfQvMfL.js → linear-DqWevqMh.js} +1 -1
  47. package/dist/gui/assets/{mermaid.core-D2k98UhU.js → mermaid.core-bsNbTKFB.js} +4 -4
  48. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-qF0S5c0K.js → mindmap-definition-LN4V7U3C-DnUeh13j.js} +1 -1
  49. package/dist/gui/assets/{pegDiagram-2B236MQR-C6QhP9Ha.js → pegDiagram-2B236MQR-DE_8gOxy.js} +1 -1
  50. package/dist/gui/assets/{pieDiagram-ENE6RG2P-Cq_W5lD8.js → pieDiagram-ENE6RG2P-Wf_jl50X.js} +1 -1
  51. package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-eKua4eTN.js → quadrantDiagram-ABIIQ3AL-Dt-Yn4ZI.js} +1 -1
  52. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-C6BzISnO.js → railroadDiagram-RFXS5EU6-0I6kqmlH.js} +1 -1
  53. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-Bb6d91xE.js → requirementDiagram-TGXJPOKE-Dozq39w_.js} +1 -1
  54. package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-D9QeyLBf.js → sankeyDiagram-HTMAVEWB-Cs7yO0KJ.js} +1 -1
  55. package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-CM4PvotC.js → sequenceDiagram-DBY2YBRQ-EQLpVCpV.js} +1 -1
  56. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-BpbgtMCY.js → sizeCapture-X5ZJPWSS-BXUb6X9N.js} +1 -1
  57. package/dist/gui/assets/{stateDiagram-2N3HPSRC-KJiPWD0D.js → stateDiagram-2N3HPSRC-CYHgCnOc.js} +1 -1
  58. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CqWHqtRs.js +1 -0
  59. package/dist/gui/assets/{swimlanes-5IMT3BWC-Pwo1O0dM.js → swimlanes-5IMT3BWC-BgsUQUHx.js} +2 -2
  60. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CoZVjlW6.js +8 -0
  61. package/dist/gui/assets/{timeline-definition-FHXFAJF6-CnQl8hPb.js → timeline-definition-FHXFAJF6-CQJufImP.js} +1 -1
  62. package/dist/gui/assets/{vennDiagram-L72KCM5P-CRw4PEIG.js → vennDiagram-L72KCM5P-L-2iYmD5.js} +1 -1
  63. package/dist/gui/assets/{wardleyDiagram-EHGQE667-DN0P5gP_.js → wardleyDiagram-EHGQE667-BamRRrE7.js} +1 -1
  64. package/dist/gui/assets/{xychartDiagram-FW5EYKEG-BpfpKwUH.js → xychartDiagram-FW5EYKEG-itKwurP4.js} +1 -1
  65. package/dist/gui/index.html +26 -3
  66. package/package.json +3 -2
  67. package/dist/gui/assets/channel-BEkoHvmA.js +0 -1
  68. package/dist/gui/assets/classDiagram-OUVF2IWQ-BholqSXk.js +0 -1
  69. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-BholqSXk.js +0 -1
  70. package/dist/gui/assets/index-CPS7XVHi.js +0 -36
  71. package/dist/gui/assets/index-CWpwy2sQ.css +0 -1
  72. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-eLHi55Yt.js +0 -1
  73. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BI7926G2.js +0 -8
@@ -0,0 +1,36 @@
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 Me={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return tl(this.context.count)},getNextContextId(){return tl(this.context.count++)}};function tl(e){const t=String(e),n=t.length-1;return Me.context.id+(n?String.fromCharCode(96+n):"")+t}function qo(e){Me.context=e}const ob=!1,ib=(e,t)=>e===t,un=Symbol("solid-proxy"),lg=typeof Proxy=="function",bu=Symbol("solid-track"),Qi={equals:ib};let dg=bg;const cn=1,Xo=2,fg={owned:null,cleanups:null,context:null,owner:null},ta={};var Ke=null;let pe=null,sb=null,Ye=null,It=null,Rt=null,bs=0;function Dr(e,t){const n=Ye,r=Ke,o=e.length===0,i=t===void 0?r:t,s=o?fg:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ht(()=>cr(s)));Ke=s,Ye=null;try{return qt(a,!0)}finally{Ye=n,Ke=r}}function $(e,t){t=t?Object.assign({},Qi,t):Qi;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)),mg(n,o));return[hg.bind(n),r]}function yu(e,t,n){const r=xs(e,t,!0,cn);ko(r)}function Le(e,t,n){const r=xs(e,t,!1,cn);ko(r)}function Q(e,t,n){dg=db;const r=xs(e,t,!1,cn),o=Nr&&Je(Nr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Rt?Rt.push(r):ko(r)}function ue(e,t,n){n=n?Object.assign({},Qi,n):Qi;const r=xs(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ko(r),hg.bind(r)}function ab(e){return e&&typeof e=="object"&&"then"in e}function jt(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=ta,u=null,c=!1,l=!1,d="initialValue"in i,g=typeof r=="function"&&ue(r);const h=new Set,[p,b]=(i.storage||$)(i.initialValue),[m,y]=$(void 0),[v,x]=$(void 0,{equals:!1}),[E,k]=$(d?"ready":"unresolved");Me.context&&(u=Me.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Me.load&&Me.has(u)&&(a=Me.load(u)));function S(A,P,L,R){return s===A&&(s=null,R!==void 0&&(d=!0),(A===a||P===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(R,{value:P})),a=ta,pe&&A&&c?(pe.promises.delete(A),c=!1,qt(()=>{pe.running=!0,I(P,L)},!1)):I(P,L)),P}function I(A,P){qt(()=>{P===void 0&&b(()=>A),k(P!==void 0?"errored":d?"ready":"unresolved"),y(P);for(const L of h.keys())L.decrement();h.clear()},!1)}function C(){const A=Nr&&Je(Nr),P=p(),L=m();if(L!==void 0&&!s)throw L;return Ye&&!Ye.user&&A&&yu(()=>{v(),s&&(A.resolved&&pe&&c?pe.promises.add(s):h.has(A)||(A.increment(),h.add(A)))}),P}function D(A=!0){if(A!==!1&&l)return;l=!1;const P=g?g():r;if(c=pe&&pe.running,P==null||P===!1){S(s,ht(p));return}pe&&s&&pe.promises.delete(s);let L;const R=a!==ta?a:ht(()=>{try{return o(P,{value:p(),refetching:A})}catch(O){L=O}});if(L!==void 0){S(s,void 0,Yi(L),P);return}else if(!ab(R))return S(s,R,void 0,P),R;return s=R,"v"in R?(R.s===1?S(s,R.v,void 0,P):S(s,void 0,Yi(R.v),P),R):(l=!0,queueMicrotask(()=>l=!1),qt(()=>{k(d?"refreshing":"pending"),x()},!1),R.then(O=>S(R,O,void 0,P),O=>S(R,void 0,Yi(O),P)))}Object.defineProperties(C,{state:{get:()=>E()},error:{get:()=>m()},loading:{get(){const A=E();return A==="pending"||A==="refreshing"}},latest:{get(){if(!d)return C();const A=m();if(A&&!s)throw A;return p()}}});let T=Ke;return g?yu(()=>(T=Ke,D(!1))):D(!1),[C,{refetch:A=>ys(T,()=>D(A)),mutate:b}]}function gg(e){return qt(e,!1)}function ht(e){if(Ye===null)return e();const t=Ye;Ye=null;try{return e()}finally{Ye=t}}function dt(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=ht(()=>t(a,o,s));return o=a,u}}function Xt(e){Q(()=>ht(e))}function ee(e){return Ke===null||(Ke.cleanups===null?Ke.cleanups=[e]:Ke.cleanups.push(e)),e}function vu(){return Ye}function Qo(){return Ke}function ys(e,t){const n=Ke,r=Ye;Ke=e,Ye=null;try{return qt(t,!0)}catch(o){Wu(o)}finally{Ke=n,Ye=r}}function pg(e){if(pe&&pe.running)return e(),pe.done;const t=Ye,n=Ke;return Promise.resolve().then(()=>{Ye=t,Ke=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),qt(e,!1),Ye=Ke=null,r?r.done:void 0})}const[gR,nl]=$(!1);function ub(e){Rt.push.apply(Rt,e),e.length=0}function it(e,t){const n=Symbol("context");return{id:n,Provider:fb(n),defaultValue:e}}function Je(e){let t;return Ke&&Ke.context&&(t=Ke.context[e.id])!==void 0?t:e.defaultValue}function vs(e){const t=ue(e),n=ue(()=>xu(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nr;function cb(){return Nr||(Nr=it())}function hg(){const e=pe&&pe.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===cn)ko(this);else{const t=It;It=null,qt(()=>es(this),!1),It=t}if(Ye){const t=this.observers;if(!t||t[t.length-1]!==Ye){const n=t?t.length:0;Ye.sources?(Ye.sources.push(this),Ye.sourceSlots.push(n)):(Ye.sources=[this],Ye.sourceSlots=[n]),t?(t.push(Ye),this.observerSlots.push(Ye.sources.length-1)):(this.observers=[Ye],this.observerSlots=[Ye.sources.length-1])}}return e&&pe.sources.has(this)?this.tValue:this.value}function mg(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&&qt(()=>{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?It.push(i):Rt.push(i),i.observers&&yg(i)),s?i.tState=cn:i.state=cn)}if(It.length>1e6)throw It=[],new Error},!1)}return t}function ko(e){if(!e.fn)return;cr(e);const t=bs;rl(e,pe&&pe.running&&pe.sources.has(e)?e.tValue:e.value,t),pe&&!pe.running&&pe.sources.has(e)&&queueMicrotask(()=>{qt(()=>{pe&&(pe.running=!0),Ye=Ke=e,rl(e,e.tValue,t),Ye=Ke=null},!1)})}function rl(e,t,n){let r;const o=Ke,i=Ye;Ye=Ke=e;try{r=e.fn(t)}catch(s){return e.pure&&(pe&&pe.running?(e.tState=cn,e.tOwned&&e.tOwned.forEach(cr),e.tOwned=void 0):(e.state=cn,e.owned&&e.owned.forEach(cr),e.owned=null)),e.updatedAt=n+1,Wu(s)}finally{Ye=i,Ke=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?mg(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 xs(e,t,n,r=cn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ke,context:Ke?Ke.context:null,pure:n};return pe&&pe.running&&(i.state=0,i.tState=r),Ke===null||Ke!==fg&&(pe&&pe.running&&Ke.pure?Ke.tOwned?Ke.tOwned.push(i):Ke.tOwned=[i]:Ke.owned?Ke.owned.push(i):Ke.owned=[i]),i}function Ji(e){const t=pe&&pe.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Xo)return es(e);if(e.suspense&&ht(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<bs);){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)===cn)ko(e);else if((t?e.tState:e.state)===Xo){const o=It;It=null,qt(()=>es(e,n[0]),!1),It=o}}}function qt(e,t){if(It)return e();let n=!1;t||(It=[]),Rt?n=!0:Rt=[],bs++;try{const r=e();return lb(n),r}catch(r){n||(Rt=null),It=null,Wu(r)}}function lb(e){if(It&&(bg(It),It=null),e)return;let t;if(pe){if(!pe.promises.size&&!pe.queue.size){const r=pe.sources,o=pe.disposed;Rt.push.apply(Rt,pe.effects),t=pe.resolve;for(const i of Rt)"tState"in i&&(i.state=i.tState),delete i.tState;pe=null,qt(()=>{for(const i of o)cr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)cr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}nl(!1)},!1)}else if(pe.running){pe.running=!1,pe.effects.push.apply(pe.effects,Rt),Rt=null,nl(!0);return}}const n=Rt;Rt=null,n.length&&qt(()=>dg(n),!1),t&&t()}function bg(e){for(let t=0;t<e.length;t++)Ji(e[t])}function db(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ji(r)}if(Me.context){if(Me.count){Me.effects||(Me.effects=[]),Me.effects.push(...e.slice(0,n));return}qo()}for(Me.effects&&(Me.done||!Me.count)&&(e=[...Me.effects,...e],n+=Me.effects.length,delete Me.effects),t=0;t<n;t++)Ji(e[t])}function es(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===cn?o!==t&&(!o.updatedAt||o.updatedAt<bs)&&Ji(o):i===Xo&&es(o,t)}}}function yg(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=Xo:r.state=Xo,r.pure?It.push(r):Rt.push(r),r.observers&&yg(r))}}function cr(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--)cr(e.tOwned[t]);delete e.tOwned}if(pe&&pe.running&&e.pure)vg(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)cr(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 vg(e,t){if(t||(e.tState=0,pe.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)vg(e.owned[n])}function Yi(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Wu(e,t=Ke){throw Yi(e)}function xu(e){if(typeof e=="function"&&!e.length)return xu(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=xu(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 fb(e,t){return function(r){let o;return Le(()=>o=ht(()=>(Ke.context={...Ke.context,[e]:r.value},vs(()=>r.children))),void 0),o}}const gb=Symbol("fallback");function ol(e){for(let t=0;t<e.length;t++)e[t]()}function pb(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ee(()=>ol(i)),()=>{let u=e()||[],c=u.length,l,d;return u[bu],ht(()=>{let h,p,b,m,y,v,x,E,k;if(c===0)s!==0&&(ol(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[gb],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(g);s=c}else{for(b=new Array(c),m=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,E=c-1;x>=v&&E>=v&&r[x]===u[E];x--,E--)b[E]=o[x],m[E]=i[x],a&&(y[E]=a[x]);for(h=new Map,p=new Array(E+1),d=E;d>=v;d--)k=u[d],l=h.get(k),p[d]=l===void 0?-1:l,h.set(k,d);for(l=v;l<=x;l++)k=r[l],d=h.get(k),d!==void 0&&d!==-1?(b[d]=o[l],m[d]=i[l],a&&(y[d]=a[l]),d=p[d],h.set(k,d)):i[l]();for(d=v;d<c;d++)d in b?(o[d]=b[d],i[d]=m[d],a&&(a[d]=y[d],a[d](d))):o[d]=Dr(g);o=o.slice(0,s=c),r=u.slice(0)}return o});function g(h){if(i[d]=h,a){const[p,b]=$(d);return a[d]=b,t(u[d],p)}return t(u[d])}}}function f(e,t){return ht(()=>e(t||{}))}function Ni(){return!0}const wu={get(e,t,n){return t===un?n:e.get(t)},has(e,t){return t===un?!0:e.has(t)},set:Ni,deleteProperty:Ni,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ni,deleteProperty:Ni}},ownKeys(e){return e.keys()}};function na(e){return(e=typeof e=="function"?e():e)?e:{}}function hb(){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,ue(a)):a}if(lg&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=na(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in na(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(na(e[a])));return[...new Set(s)]}},wu);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:hb.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const g=n[l];g&&(d.get?g.push(d.get.bind(a)):d.value!==void 0&&g.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 le(e,...t){const n=t.length;if(lg&&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)}},wu));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))}},wu)),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 mb=0;function kt(){return Me.context?Me.getNextContextId():`cl-${mb++}`}const bb=e=>`Stale read from <${e}>.`;function nt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ue(pb(()=>e.each,e.children,t||void 0))}function V(e){const t=e.keyed,n=ue(()=>e.when,void 0,void 0),r=t?n:ue(n,void 0,{equals:(o,i)=>!o==!i});return ue(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?ht(()=>i(t?o:()=>{if(!ht(r))throw bb("Show");return n()})):i}return e.fallback},void 0,void 0)}const yb=it();function ws(e){let t=0,n,r,o,i,s;const[a,u]=$(!1),c=cb(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Qo();if(Me.context&&Me.load){const p=Me.getContextId();let b=Me.load(p);if(b&&(typeof b!="object"||b.s!==1?o=b:Me.gather(p)),o&&o!=="$$f"){const[m,y]=$(void 0,{equals:!1});i=m,o.then(()=>{if(Me.done)return y();Me.gather(p),qo(r),y(),qo()},v=>{s=v,y()})}}const g=Je(yb);g&&(n=g.register(l.inFallback));let h;return ee(()=>h&&h()),f(c.Provider,{value:l,get children(){return ue(()=>{if(s)throw s;if(r=Me.context,i)return i(),i=void 0;r&&o==="$$f"&&qo();const p=ue(()=>e.children);return ue(b=>{const m=l.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!m||o&&o!=="$$f")&&y)return l.resolved=!0,h&&h(),h=r=o=void 0,ub(l.effects),p();if(v)return h?b:Dr(x=>(h=x,r&&(qo({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const vb=["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"],xb=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...vb]),wb=new Set(["innerHTML","textContent","innerText","children"]),_b=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Eb=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 kb(e,t){const n=Eb[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Cb=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Sb=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"]),Ab={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},J=e=>ue(()=>e());function Tb(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,g=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==l+g);)g++;if(g>l-a){const p=t[s];for(;a<l;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const il="_$DX_DELEGATE";function Db(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 U(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 Jt(e,t=window.document){const n=t[il]||(t[il]=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,$b))}}function We(e,t,n){zr(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ob(e,t,n,r){zr(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Rb(e,t,n){zr(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function St(e,t){zr(e)||(t==null?e.removeAttribute("class"):e.className=t)}function ts(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 Ib(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]||(sl(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||(sl(e,a,!0),n[a]=u)}return n}function _s(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 Jo(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function qn(e,t={},n,r){const o={};return r||Le(()=>o.children=ei(e,t.children,o.children)),Le(()=>typeof t.ref=="function"&&lr(t.ref,e)),Le(()=>Nb(e,t,n,!0,o,!0)),o}function lr(e,t,n){return ht(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return ei(e,t,r,n);Le(o=>ei(e,t(),o,n),r)}function Nb(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=al(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=al(e,s,a,o[s],n,i,t)}}function Mb(e){let t,n;return!zr()||!(t=Me.registry.get(n=Pb()))?e():(Me.completed&&Me.completed.add(t),Me.registry.delete(n),t)}function zr(e){return!!Me.context&&!Me.done&&(!e||e.isConnected)}function Lb(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function sl(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 al(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return _s(e,n,r);if(t==="classList")return Ib(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);r&&e.removeEventListener(g,r,typeof r!="function"&&r),n&&e.addEventListener(g,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);r&&e.removeEventListener(g,r,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),h=Cb.has(g);if(!h&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(g,p)}(h||n)&&(ts(e,g,n,h),h&&Jt([g]))}else if(t.slice(0,5)==="attr:")We(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Rb(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=wb.has(t))||!o&&((l=kb(t,e.tagName))||(u=xb.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(zr(e))return n;t==="class"||t==="className"?St(e,n):a&&!u&&!c?e[Lb(t)]=n:e[l||t]=n}else{const g=o&&t.indexOf(":")>-1&&Ab[t.split(":")[0]];g?Ob(e,g,t,n):We(e,_b[t]||t,n)}return n}function $b(e){if(Me.registry&&Me.events&&Me.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}}),Me.registry&&!Me.done&&(Me.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 ei(e,t,n,r,o){const i=zr(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=Qr(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=Qr(e,n,r)}else{if(s==="function")return Le(()=>{let u=t();for(;typeof u=="function";)u=u();n=ei(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(_u(u,t,n,o))return Le(()=>n=ei(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=Qr(e,n,r),a)return n}else c?n.length===0?ul(e,u,r):Tb(e,n,u):(n&&Qr(e),ul(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=Qr(e,n,r,t);Qr(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function _u(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=_u(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=_u(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 ul(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Qr(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 Pb(){return Me.getNextContextId()}const Fb=!1,Bb="http://www.w3.org/2000/svg";function xg(e,t=!1,n=void 0){return t?document.createElementNS(Bb,e):document.createElement(e,{is:n})}function Es(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Qo();let i,s=!!Me.context;return Q(()=>{s&&(Qo().user=s=!1),i||(i=ys(o,()=>ue(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=$(!1),l=()=>c(!0);Dr(d=>w(a,()=>u()?d():i(),null)),ee(l)}else{const u=xg(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),ee(()=>a.removeChild(u))}},void 0,{render:!s}),n}function zb(e,t){const n=ue(e);return ue(()=>{const r=n();switch(typeof r){case"function":return ht(()=>r(t));case"string":const o=Sb.has(r),i=Me.context?Mb():xg(r,o,ht(()=>t.is));return qn(i,t,o),i}})}function wg(e){const[,t]=le(e,["component"]);return zb(()=>e.component,t)}function _g(){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 Yu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Eu=window.history.state._depth}Yu();function Ub(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Kb(e,t){let n=!1;return()=>{const r=Eu;Yu();const o=r==null?null:Eu-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const qb=/^(?:[a-z0-9]+:)?\/\//i,Hb=/^\/+|(\/)\/+$/g,Eg="http://sr";function Or(e,t=!1){const n=e.replace(Hb,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Zi(e,t,n){if(qb.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 jb(e,t){if(e==null)throw new Error(t);return e}function Gb(e,t){return Or(e).replace(/\/*(\*.*)?$/g,"")+Or(t)}function kg(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 Vb(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=g=>n===void 0?void 0:n[g];for(let g=0;g<s;g++){const h=i[g],p=h[0]===":",b=p?u[g]:u[g].toLowerCase(),m=p?h.slice(1):h.toLowerCase();if(p&&ra(b,d(m)))l.params[m]=b;else if(p||!ra(b,m))return null;l.path+=`/${b}`}if(o){const g=c?u.slice(-c).join("/"):"";if(ra(g,d(o)))l.params[o]=g;else return null}return l}}function ra(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 Wb(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 Cg(e){const t=new Map,n=Qo();return new Proxy({},{get(r,o){return t.has(o)||ys(n,()=>t.set(o,ue(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Sg(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 Sg(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Yb=100,Ag=it(),Zu=it(),mi=()=>jb(Je(Ag),"<A> and 'use' router primitives can be only used inside a Route."),Zb=()=>Je(Zu)||mi().base,Xb=e=>{const t=Zb();return ue(()=>t.resolvePath(e()))},Qb=e=>{const t=mi();return ue(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Co=()=>mi().navigatorFactory(),ks=()=>mi().location,bi=()=>mi().params;function Jb(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 Tg(e.path).reduce((c,l)=>{for(const d of Sg(l)){const g=Gb(t,d);let h=a?g:g.split("/*",1)[0];h=h.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...u,originalPath:l,pattern:h,matcher:Vb(h,!a,e.matchFilters)})}return c},[])}function e1(e,t=0){return{routes:e,score:Wb(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 Tg(e){return Array.isArray(e)?e:[e]}function Dg(e,t="",n=[],r=[]){const o=Tg(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=Jb(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)Dg(a.children,c.pattern,n,r);else{const d=e1([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function oa(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function t1(e,t,n){const r=new URL(Eg),o=ue(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=ue(()=>o().pathname),s=ue(()=>o().search,!0),a=ue(()=>o().hash),u=()=>"",c=dt(s,()=>kg(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):Cg(c)}}let Ar;function n1(){return Ar}function r1(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(R=>R),u=s.renderPath||(R=>R),c=s.beforeLeave||_g(),l=Zi("",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,g]=$(!1);let h;const p=(R,O)=>{O.value===b()&&O.state===y()||(h===void 0&&g(!0),Ar=R,h=O,pg(()=>{h===O&&(m(h.value),v(h.state),k[1](N=>N.filter(z=>z.pending)))}).finally(()=>{h===O&&gg(()=>{Ar=void 0,R==="navigate"&&P(h),g(!1),h=void 0})}))},[b,m]=$(o().value),[y,v]=$(o().state),x=t1(b,y,s.queryWrapper),E=[],k=$([]),S=ue(()=>typeof r.transformUrl=="function"?oa(t(),r.transformUrl(x.pathname)):oa(t(),x.pathname)),I=()=>{const R=S(),O={};for(let N=0;N<R.length;N++)Object.assign(O,R[N].params);return O},C=s.paramsWrapper?s.paramsWrapper(I,t):Cg(I),D={pattern:l,path:()=>l,outlet:()=>null,resolvePath(R){return Zi(l,R)}};return Le(dt(o,R=>p("native",R),{defer:!0})),{base:D,location:x,params:C,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:A,matches:S,beforeLeave:c,preloadRoute:L,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:k};function T(R,O,N){ht(()=>{if(typeof O=="number"){O&&(s.go?s.go(O):console.warn("Router integration does not support relative routing"));return}const z=!O||O[0]==="?",{replace:B,resolve:F,scroll:K,state:re}={replace:!1,resolve:!z,scroll:!0,...N},j=F?R.resolvePath(O):Zi(z&&x.pathname||"",O);if(j===void 0)throw new Error(`Path '${O}' is not a routable path`);if(E.length>=Yb)throw new Error("Too many redirects");const se=b();(j!==se||re!==y())&&(Fb||c.confirm(j,N)&&(E.push({value:se,replace:B,scroll:K,state:y()}),p("navigate",{value:j,state:re})))})}function A(R){return R=R||Je(Zu)||D,(O,N)=>T(R,O,N)}function P(R){const O=E[0];O&&(i({...R,replace:O.replace,scroll:O.scroll}),E.length=0)}function L(R,O){const N=oa(t(),R.pathname),z=Ar;Ar="preload";for(let B in N){const{route:F,params:K}=N[B];F.component&&F.component.preload&&F.component.preload();const{preload:re}=F;O&&re&&ys(n(),()=>re({params:K,location:{pathname:R.pathname,search:R.search,hash:R.hash,query:kg(R),state:null,key:""},intent:"preload"}))}Ar=z}}function o1(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ue(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:Ar||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?f(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(h){return Zi(o.path(),h,l())}}}const i1=e=>t=>{const{base:n}=t,r=vs(()=>t.children),o=ue(()=>Dg(r(),t.base||""));let i;const s=r1(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),f(Ag.Provider,{value:s,get children(){return f(s1,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[J(()=>(i=Qo())&&null),f(a1,{routerState:s,get branches(){return o()}})]}})}})};function s1(e){const t=e.routerState.location,n=e.routerState.params,r=ue(()=>e.preload&&ht(()=>{e.preload({params:n,location:t,intent:n1()||"initial"})}));return f(V,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>f(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function a1(e){const t=[];let n;const r=ue(dt(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],g=o[c];s&&d&&g.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Dr(h=>{t[c]=h,u[c]=o1(e.routerState,u[c-1]||e.routerState.base,cl(()=>r()[c+1]),()=>{const p=e.routerState.matches();return p[c]??p[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return cl(()=>r()&&n)()}const cl=e=>()=>f(V,{get when(){return e()},keyed:!0,children:t=>f(Zu.Provider,{value:t,get children(){return t.outlet()}})}),Qn=e=>{const t=vs(()=>e.children);return q(e,{get children(){return t()}})};function u1([e,t],n,r){return[e,r?o=>t(r(o)):t]}function c1(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=u1($(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Me.registry&&!Me.done&&(Me.done=!0),o));return e.init&&ee(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),i1({signal:r,create:e.create,utils:e.utils})}function l1(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function d1(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const f1=new Map;function g1({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 m=b.composedPath().find(S=>S instanceof Node&&S.nodeName.toUpperCase()==="A");if(!m||t&&!m.hasAttribute("link"))return;const y=c(m),v=y?m.href.baseVal:m.href;if((y?m.target.baseVal:m.target)||!v&&!m.hasAttribute("state"))return;const E=(m.getAttribute("rel")||"").split(/\s+/);if(m.hasAttribute("download")||E&&E.includes("external"))return;const k=y?new URL(v,document.baseURI):new URL(v);if(!(k.origin!==window.location.origin||i&&k.pathname&&!k.pathname.toLowerCase().startsWith(i.toLowerCase())))return[m,k]}function d(b){const m=l(b);if(!m)return;const[y,v]=m,x=o.parsePath(v.pathname+v.search+v.hash),E=y.getAttribute("state");b.preventDefault(),s(x,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:E?JSON.parse(E):void 0})}function g(b){const m=l(b);if(!m)return;const[y,v]=m;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,y.getAttribute("preload")!=="false")}function h(b){clearTimeout(a);const m=l(b);if(!m)return u=null;const[y,v]=m;u!==y&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,y.getAttribute("preload")!=="false"),u=y},20))}function p(b){if(b.defaultPrevented)return;let m=b.submitter&&b.submitter.hasAttribute("formaction")?b.submitter.getAttribute("formaction"):b.target.getAttribute("action");if(!m)return;if(!m.startsWith("https://action/")){const v=new URL(m,Eg);if(m=o.parsePath(v.pathname+v.search),!m.startsWith(n))return}if(b.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=f1.get(m);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))}}Jt(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",p),ee(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",p)})}}function p1(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=_g();return c1({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Ub(s),"",r):window.history.pushState(s,"",r),d1(decodeURIComponent(window.location.hash.slice(1)),i),Yu()},init:r=>l1(window,"popstate",Kb(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:g1({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var h1=U("<a>");function kn(e){e=q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=le(e,["href","state","class","activeClass","inactiveClass","end"]),n=Xb(()=>e.href),r=Qb(n),o=ks(),i=ue(()=>{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=h1();return qn(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 m1(e){const t=Co(),n=ks(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const ku=Symbol("store-raw"),fo=Symbol("store-node"),Pn=Symbol("store-has"),Og=Symbol("store-self");function Rg(e){let t=e[un];if(!t&&(Object.defineProperty(e,un,{value:t=new Proxy(e,v1)}),!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 ns(e){let t;return e!=null&&typeof e=="object"&&(e[un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ti(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[ku])return n;if(!ns(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=ti(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=ti(o,t))!==o&&(e[i]=r))}return e}function rs(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function ni(e,t,n){if(e[t])return e[t];const[r,o]=$(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function b1(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===un||t===fo||(delete n.value,delete n.writable,n.get=()=>e[un][t]),n}function Ig(e){vu()&&ni(rs(e,fo),Og)()}function y1(e){return Ig(e),Reflect.ownKeys(e)}const v1={get(e,t,n){if(t===ku)return e;if(t===un)return n;if(t===bu)return Ig(e),n;const r=rs(e,fo),o=r[t];let i=o?o():e[t];if(t===fo||t===Pn||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);vu()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=ni(r,t,i)())}return ns(i)?Rg(i):i},has(e,t){return t===ku||t===un||t===bu||t===fo||t===Pn||t==="__proto__"?!0:(vu()&&ni(rs(e,Pn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:y1,getOwnPropertyDescriptor:b1};function os(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[Pn]&&e[Pn][t]&&o!==void 0&&e[Pn][t].$()):(e[t]=n,e[Pn]&&e[Pn][t]&&o===void 0&&e[Pn][t].$());let s=rs(e,fo),a;if((a=ni(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=ni(s,"length",i))&&a.$(e.length)}(a=s[Og])&&a.$()}function Ng(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Mg(o)||os(e,o,t[o])}}function Mg(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function x1(e,t){if(typeof t=="function"&&(t=t(e)),t=ti(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&&os(e,n,o)}os(e,"length",r)}else Ng(e,t)}function Ho(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&&Mg(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)Ho(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&Ho(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)Ho(e,[d].concat(t),n);return}else if(t.length>1){Ho(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=ti(i),r===void 0||ns(o)&&ns(i)&&!Array.isArray(i)?Ng(o,i):os(e,r,i))}function w1(...[e,t]){const n=ti(e||{}),r=Array.isArray(n),o=Rg(n);function i(...s){gg(()=>{r&&s.length===1?x1(n,s[0]):Ho(n,s)})}return[o,i]}const Ie=e=>typeof e=="string",$o=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},ll=e=>e==null?"":String(e),_1=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},E1=/###/g,dl=e=>e&&e.includes("###")?e.replace(E1,"."):e,fl=e=>!e||Ie(e),Wo=(e,t,n)=>{const r=Ie(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(fl(e))return{};const i=dl(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return fl(e)?{}:{obj:e,k:dl(r[o])}},gl=(e,t,n)=>{const{obj:r,k:o}=Wo(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=Wo(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=Wo(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},k1=(e,t,n,r)=>{const{obj:o,k:i}=Wo(e,t,Object);o[i]=o[i]||[],o[i].push(n)},is=(e,t)=>{const{obj:n,k:r}=Wo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},C1=(e,t,n)=>{const r=is(e,n);return r!==void 0?r:is(t,n)},Lg=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Ie(e[r])||e[r]instanceof String||Ie(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Lg(e[r],t[r],n):e[r]=t[r]);return e},Mn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),S1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},A1=e=>Ie(e)?e.replace(/[&<>"'\/]/g,t=>S1[t]):e;class T1{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 D1=[" ",",","?","!",";"],O1=new T1(20),R1=(e,t,n)=>{t=t||"",n=n||"";const r=D1.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=O1.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},Cu=(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},ri=e=>e?.replace(/_/g,"-"),I1={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 ss{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||I1,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=>Ie(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Ie(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ss(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ss(this.logger,t)}}var vn=new ss;class Cs{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 pl extends Cs{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):Ie(r)&&i?a.push(...r.split(i)):a.push(r)));const u=is(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Ie(r)?u:Cu(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),gl(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)(Ie(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=is(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Lg(u,r,i):u={...u,...r},gl(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 $g={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 Pg=Symbol("i18next/PATH_KEY");function N1(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Pg?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function go(e,t){const{[Pg]:n}=e(N1()),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 ia=e=>!Ie(e)&&typeof e!="boolean"&&typeof e!="number";class as extends Cs{constructor(t,n={}){super(),_1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=vn.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=ia(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&&!R1(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Ie(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:Ie(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=go(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?go(L,{...this.options,...o}):String(L));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,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return g?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 h=this.resolve(t,o);let p=h?.res;const b=h?.usedKey||a,m=h?.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,E=o.count!==void 0&&!Ie(o.count),k=as.hasDefaultValue(o),S=E?this.pluralResolver.getSuffix(d,o.count,o):"",I=o.ordinal&&E?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",C=E&&!o.ordinal&&o.count===0,D=C&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${S}`]||o[`defaultValue${I}`]||o.defaultValue;let T=p;x&&!p&&k&&(T=D);const A=ia(T),P=Object.prototype.toString.apply(T);if(x&&T&&A&&!y.includes(P)&&!(Ie(v)&&Array.isArray(T))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,T,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=L,h.usedParams=this.getUsedParamsDetails(o),h):L}if(s){const L=Array.isArray(T),R=L?[]:{},O=L?m:b;for(const N in T)if(Object.prototype.hasOwnProperty.call(T,N)){const z=`${O}${s}${N}`;k&&!p?R[N]=this.translate(z,{...o,defaultValue:ia(D)?D[N]:void 0,joinArrays:!1,ns:u}):R[N]=this.translate(z,{...o,joinArrays:!1,ns:u}),R[N]===z&&(R[N]=T[N])}p=R}}else if(x&&Ie(v)&&Array.isArray(p))p=p.join(v),p&&(p=this.extendTranslation(p,t,o,r));else{let L=!1,R=!1;!this.isValidLookup(p)&&k&&(L=!0,p=D),this.isValidLookup(p)||(R=!0,p=a);const N=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:p,z=k&&D!==p&&this.options.updateMissing;if(R||L||z){if(this.logger.log(z?"updateKey":"missingKey",d,c,E&&!z?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,z?D:p),s){const re=this.resolve(a,{...o,keySeparator:!1});re&&re.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 B=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let re=0;re<F.length;re++)B.push(F[re]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(o.lng||this.language):B.push(o.lng||this.language);const K=(re,j,se)=>{const Z=k&&se!==p?se:N;this.options.missingKeyHandler?this.options.missingKeyHandler(re,c,j,Z,z,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(re,c,j,Z,z,o),this.emit("missingKey",re,c,j,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?B.forEach(re=>{const j=this.pluralResolver.getSuffixes(re,o);C&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!j.includes(`${this.options.pluralSeparator}zero`)&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(se=>{K([re],a+se,o[`defaultValue${se}`]||D)})}):K(B,a,D))}p=this.extendTranslation(p,t,o,h,r),R&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${l}${a}`),(R||L)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,L?p:void 0,o))}return i?(h.res=p,h.usedParams=this.getUsedParamsDetails(o),h):p}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=Ie(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&&!Ie(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),g=d&&d.length;c<g&&(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=Ie(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=$g.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 Ie(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?go(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 g=n.count!==void 0&&!Ie(n.count),h=g&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(Ie(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(m=>{this.isValidLookup(r)||(a=m,!this.checkedLoadedFor[`${b[0]}-${m}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${b[0]}-${m}`]=!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,m,n);else{let E;g&&(E=this.pluralResolver.getSuffix(y,n.count,n));const k=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(n.ordinal&&E.startsWith(S)&&v.push(l+E.replace(S,this.options.pluralSeparator)),v.push(l+E),h&&v.push(l+k)),p){const I=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(I),g&&(n.ordinal&&E.startsWith(S)&&v.push(I+E.replace(S,this.options.pluralSeparator)),v.push(I+E),h&&v.push(I+k))}}let x;for(;x=v.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(y,m,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&&!Ie(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 hl{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vn.create("languageUtils")}getScriptPartFromCode(t){if(t=ri(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=ri(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ie(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)),Ie(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 Ie(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))):Ie(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const ml={zero:0,one:1,two:2,few:3,many:4,other:5},bl={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class M1{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=vn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=ri(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!"),bl;if(!t.match(/-|_/))return bl;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)=>ml[o]-ml[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 yl=(e,t,n,r=".",o=!0)=>{let i=C1(e,t,n);return!i&&o&&Ie(n)&&(i=Cu(e,n,r),i===void 0&&(i=Cu(t,n,r))),i},L1=e=>e.replace(/\$/g,"$$$$");class vl{constructor(t={}){this.logger=vn.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:g,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:b,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:A1,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Mn(i):s||"{{",this.suffix=a?Mn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?Mn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?Mn(l):"",this.nestingPrefix=g?Mn(g):h||Mn("$t("),this.nestingSuffix=p?Mn(p):b||Mn(")"),this.nestingOptionsSeparator=m||",",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=h=>{if(!h.includes(this.formatSeparator)){const y=yl(n,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:h}):y}const p=h.split(this.formatSeparator),b=p.shift().trim(),m=p.join(this.formatSeparator).trim();return this.format(yl(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),m,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:h=>h},{regex:this.regexp,safeValue:h=>this.escapeValue?this.escape(h):h}].forEach(h=>{for(a=0;i=h.regex.exec(t);){const p=i[1].trim();if(s=c(p),s===void 0)if(typeof l=="function"){const m=l(t,i,o);s=Ie(m)?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),s="";else!Ie(s)&&!this.useRawValueToEscape&&(s=ll(s));const b=h.safeValue(s);if(t=t.replace(i[0],L1(b)),d?(h.regex.lastIndex+=b.length,h.regex.lastIndex-=i[0].length):h.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(`${Mn(l)}[ ]*{`));let g=`{${d[1]}`;u=d[0],g=this.interpolate(g,s);const h=g.match(/'/g),p=g.match(/"/g);((h?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(g=g.replace(/'/g,'"'));try{s=JSON.parse(g),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${l}${g}`}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&&!Ie(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&&!Ie(i))return i;Ie(i)||(i=ll(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 $1=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}},xl=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(ri(r),o),t[s]=a),a(n)}},P1=e=>(t,n,r)=>e(ri(n),r)(t);class F1{constructor(t={}){this.logger=vn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?xl:P1;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()]=xl(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}=$1(c);if(this.formats[l]){let g=u;try{const h=o?.formatParams?.[o.interpolationkey]||{},p=h.locale||h.lng||o.locale||o.lng||r;g=this.formats[l](u,p,{...d,...o,...h})}catch(h){this.logger.warn(h)}return g}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const B1=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class z1 extends Cs{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=vn.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 g=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?s[g]===void 0&&(s[g]=!0):(this.state[g]=1,l=!1,s[g]===void 0&&(s[g]=!0),i[g]===void 0&&(i[g]=!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=>{k1(u.loaded,[i],s),B1(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();Ie(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ie(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 sa=()=>({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]),Ie(e[1])&&(t.defaultValue=e[1]),Ie(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}),wl=e=>(Ie(e.ns)&&(e.ns=[e.ns]),Ie(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ie(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Mi=()=>{},U1=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Yo extends Cs{constructor(t={},n){if(super(),this.options=wl(t),this.services={},this.logger=vn,this.modules={external:[]},U1(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&&(Ie(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=sa();this.options={...r,...this.options,...wl(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?vn.init(o(this.modules.logger),this.options):vn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=F1;const l=new hl(this.options);this.store=new pl(this.options.resources,this.options);const d=this.services;d.logger=vn,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new M1(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 vl(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new z1(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...h)=>{this.emit(g,...h)}),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 as(this.services,this.options),this.translator.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Mi),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=$o(),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=Mi){let r=n;const o=Ie(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=$o();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=Mi),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"&&$g.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=$o();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=Ie(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Ie(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 g={...this.options,...l};Array.isArray(i)&&!d&&(g.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=go(l.keyPrefix,g));const h=this.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(a)?p=a.map(b=>(typeof b=="function"&&(b=go(b,g)),`${l.keyPrefix}${h}${b}`)):(typeof a=="function"&&(a=go(a,g)),p=l.keyPrefix?`${l.keyPrefix}${h}${a}`:a),this.t(p,l)};return Ie(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=$o();return this.options.ns?(Ie(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=$o();Ie(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 hl(sa());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 Yo(t,n);return r.createInstance=Yo.createInstance,r}cloneInstance(t={},n=Mi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Yo(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 pl(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...sa().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new vl(c)}return i.translator=new as(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 pt=Yo.createInstance();pt.createInstance;pt.dir;pt.init;pt.loadResources;pt.reloadResources;pt.use;pt.changeLanguage;pt.getFixedT;pt.t;pt.exists;pt.setDefaultNamespace;pt.hasLoadedNamespace;pt.loadNamespaces;pt.loadLanguages;const{slice:K1,forEach:q1}=[];function H1(e){return q1.call(K1.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function j1(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 _l=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,G1=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(!_l.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!_l.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},El={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=G1(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 V1={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return El.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&El.create(n,e,r,o,i)}},W1={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}},Y1={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 Jr=null;const kl=()=>{if(Jr!==null)return Jr;try{if(Jr=typeof window<"u"&&window.localStorage!==null,!Jr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Jr=!1}return Jr};var Z1={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&kl())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&kl()&&window.localStorage.setItem(n,e)}};let eo=null;const Cl=()=>{if(eo!==null)return eo;try{if(eo=typeof window<"u"&&window.sessionStorage!==null,!eo)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{eo=!1}return eo};var X1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Cl())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Cl()&&window.sessionStorage.setItem(n,e)}},Q1={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}},J1={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}},ey={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}},ty={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 Fg=!1;try{document.cookie,Fg=!0}catch{}const Bg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Fg||Bg.splice(1,1);const ny=()=>({order:Bg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class zg{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=H1(n,this.options||{},ny()),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(V1),this.addDetector(W1),this.addDetector(Z1),this.addDetector(X1),this.addDetector(Q1),this.addDetector(J1),this.addDetector(ey),this.addDetector(ty),this.addDetector(Y1)}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&&!j1(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)}))}}zg.type="languageDetector";const ry={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",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:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发"},home:{specList:"Spec 列表",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 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",stash:"暂存",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:"已派发:"},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:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"会话结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置"},saved:"全局配置已保存",save:"保存"},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",started:"命令已启动",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",restarted:"命令已重启",stop:"终止",stopping:"终止中…",stopped:"命令已终止",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},oy={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",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.'},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",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, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — 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",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context"},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"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",stash:"Stash",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: "},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",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",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"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Session end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings"},saved:"Global settings saved",save:"Save"},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",started:"Command started",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",restarted:"Command restarted",stop:"Stop",stopping:"Stopping...",stopped:"Command stopped",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},Ug=pt.use(zg).init({resources:{"zh-CN":{translation:ry},en:{translation:oy}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});Ug.then(()=>{});const Kg="yorz.theme",qg="yorz.themeName",Hg="(prefers-color-scheme: dark)";function iy(e){return e==="system"||e==="light"||e==="dark"}function sy(e){return e==="terminal"||e==="graphite"||e==="paper"}function jg(){if(typeof localStorage>"u")return"system";try{const e=localStorage.getItem(Kg);return iy(e)?e:"system"}catch{return"system"}}function ay(){if(typeof localStorage>"u")return"terminal";try{const e=localStorage.getItem(qg);return sy(e)?e:"terminal"}catch{return"terminal"}}function Gg(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(Hg).matches?"dark":"light"}function Vg(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const[Su,uy]=$(jg()),[Wg,cy]=$(ay()),[Yg,ly]=$(Vg(jg(),Gg()==="dark"));function Zg(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function Au(e){const t=Vg(e,Gg()==="dark");ly(t),Zg(t,Wg())}function dy(e){uy(e);try{localStorage.setItem(Kg,e)}catch{}Au(e)}function fy(e){cy(e);try{localStorage.setItem(qg,e)}catch{}Zg(Yg(),e)}let Sl=!1;function gy(){Sl||(Sl=!0,Au(Su()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(Hg).addEventListener("change",()=>{Su()==="system"&&Au("system")}))}/**
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 py={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"},to=py,hy=it({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),my=U("<svg>"),by=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},yy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),vy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Al=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xy=e=>{const t=vy(e);return t.charAt(0).toUpperCase()+t.slice(1)},wy=e=>{const[t,n]=le(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=Je(hy);return(()=>{var o=my();return qn(o,q(to,{get width(){return t.size??r.size??to.width},get height(){return t.size??r.size??to.height},get stroke(){return t.color??r.color??to.stroke},get"stroke-width"(){return J(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??to["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??to["stroke-width"])},get class(){return yy("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Al(xy(t.name))}`,`lucide-${Al(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!by(n)?"true":void 0}},n),!0,!0),w(o,f(nt,{get each(){return t.iconNode},children:([i,s])=>f(wg,q({component:i},s))})),o})()},He=wy,_y=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ey=e=>f(He,q(e,{iconNode:_y,name:"arrow-left"})),ky=Ey,Cy=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Sy=e=>f(He,q(e,{iconNode:Cy,name:"bell"})),Ay=Sy,Ty=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Dy=e=>f(He,q(e,{iconNode:Ty,name:"check"})),Li=Dy,Oy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ry=e=>f(He,q(e,{iconNode:Oy,name:"chevron-down"})),Xu=Ry,Iy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ny=e=>f(He,q(e,{iconNode:Iy,name:"chevron-right"})),Xg=Ny,My=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Ly=e=>f(He,q(e,{iconNode:My,name:"chevrons-left"})),Qg=Ly,$y=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Py=e=>f(He,q(e,{iconNode:$y,name:"chevrons-right"})),Jg=Py,Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],By=e=>f(He,q(e,{iconNode:Fy,name:"circle-check"})),zy=By,Uy=[["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"}]],Ky=e=>f(He,q(e,{iconNode:Uy,name:"circle-question-mark"})),qy=Ky,Hy=[["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"}]],jy=e=>f(He,q(e,{iconNode:Hy,name:"copy"})),Gy=jy,Vy=[["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"}]],Wy=e=>f(He,q(e,{iconNode:Vy,name:"ellipsis"})),Yy=Wy,Zy=[["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"}]],Xy=e=>f(He,q(e,{iconNode:Zy,name:"git-branch"})),Qy=Xy,Jy=[["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"}]],ev=e=>f(He,q(e,{iconNode:Jy,name:"git-merge"})),tv=ev,nv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rv=e=>f(He,q(e,{iconNode:nv,name:"info"})),ov=rv,iv=[["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"}]],sv=e=>f(He,q(e,{iconNode:iv,name:"languages"})),av=sv,uv=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],cv=e=>f(He,q(e,{iconNode:uv,name:"loader-circle"})),ir=cv,lv=[["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"}]],dv=e=>f(He,q(e,{iconNode:lv,name:"maximize-2"})),fv=dv,gv=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],pv=e=>f(He,q(e,{iconNode:gv,name:"menu"})),hv=pv,mv=[["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"}]],bv=e=>f(He,q(e,{iconNode:mv,name:"minimize-2"})),yv=bv,vv=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],xv=e=>f(He,q(e,{iconNode:vv,name:"monitor"})),wv=xv,_v=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ev=e=>f(He,q(e,{iconNode:_v,name:"moon"})),kv=Ev,Cv=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Sv=e=>f(He,q(e,{iconNode:Cv,name:"palette"})),Av=Sv,Tv=[["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"}]],Dv=e=>f(He,q(e,{iconNode:Tv,name:"paperclip"})),Ov=Dv,Rv=[["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"}]],Iv=e=>f(He,q(e,{iconNode:Rv,name:"pencil"})),Nv=Iv,Mv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lv=e=>f(He,q(e,{iconNode:Mv,name:"plus"})),Ss=Lv,$v=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Pv=e=>f(He,q(e,{iconNode:$v,name:"rotate-ccw"})),Fv=Pv,Bv=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],zv=e=>f(He,q(e,{iconNode:Bv,name:"rotate-cw"})),Uv=zv,Kv=[["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"}]],qv=e=>f(He,q(e,{iconNode:Kv,name:"send"})),As=qv,Hv=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jv=e=>f(He,q(e,{iconNode:Hv,name:"settings"})),Gv=jv,Vv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Wv=e=>f(He,q(e,{iconNode:Vv,name:"square"})),ep=Wv,Yv=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Zv=e=>f(He,q(e,{iconNode:Yv,name:"sun"})),Xv=Zv,Qv=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Jv=e=>f(He,q(e,{iconNode:Qv,name:"terminal"})),ex=Jv,tx=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],nx=e=>f(He,q(e,{iconNode:tx,name:"trash-2"})),tp=nx,rx=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ox=e=>f(He,q(e,{iconNode:rx,name:"triangle-alert"})),ix=ox,sx=[["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"}]],ax=e=>f(He,q(e,{iconNode:sx,name:"upload"})),ux=ax,cx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lx=e=>f(He,q(e,{iconNode:cx,name:"x"})),Ur=lx;function qe(e){return`/api/projects/${encodeURIComponent(e)}`}async function Tu(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Re(e,t){const n=await fetch(e,t);if(!n.ok){const r=await Tu(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const xe={listSpecs:e=>Re(`${qe(e)}/specs`),getSpec:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${qe(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await Tu(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getDebug:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Re("/api/projects"),listSystemNotifications:()=>Re("/api/system-notifications"),deleteSystemNotification:e=>Re(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Re(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Re(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Re(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Re(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Re(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Re(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Re(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Re(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getGlobalConfig:()=>Re("/api/global-config"),updateGlobalConfig:e=>Re("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Re(`${qe(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(`${qe(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await Tu(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Re(`${qe(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Re(`${qe(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${qe(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${qe(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Re(`${qe(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Re(`${qe(e)}/sessions`),createSession:(e,t={})=>Re(`${qe(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Re(`${qe(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Re(`${qe(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)=>Re(`${qe(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Re(`${qe(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Re(`${qe(e)}/commands`),createCommand:(e,t)=>Re(`${qe(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Re(`${qe(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Re(`${qe(e)}/command-runs`),getCommandRun:(e,t)=>Re(`${qe(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Re(`${qe(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Re(`${qe(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Re(`${qe(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Re(`${qe(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[dx,np]=$("");function co(e){e&&np(e)}function fx(){np("")}const[yt,gx]=$(px());function px(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function So(){const e=bi();return()=>e.projectId??yt()}function At(e="",t){const n=yt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[sr,rp]=$(!1);function Qu(){rp(e=>!e)}function us(){rp(!1)}function Ts(e){ee(us),Q(()=>{if(!sr())return;const t=n=>{n.key!=="Escape"||e?.()||us()};window.addEventListener("keydown",t),ee(()=>window.removeEventListener("keydown",t))})}const[hx,mx]=$(0),[bx,Tl]=$(null);let Dl=0;function yx(){mx(e=>e+1)}function op(e){const t=++Dl;Tl(()=>e),ee(()=>{Dl===t&&Tl(null)})}function vx(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class xx{clientId=vx();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 Cn=new xx;function Ds(e){const t=e;return t.readyState=()=>Cn.readyState(),t}function wx(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Cn.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return Ds(o)}function Os(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Cn.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return Ds(o)}function ip(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Cn.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return Ds(r)}function sp(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Cn.subscribe(n,r=>{r==="list-updated"&&t()})}function ap(e){return Cn.subscribe("projects",t=>{t==="projects-changed"&&e()})}function _x(e){return Cn.subscribe("system-notifications",t=>{t==="updated"&&e()})}function Ex(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return Cn.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function kx(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return Cn.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function Cx(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Cn.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return Ds(o)}function up(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 cp(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=cp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function lp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=cp(e))&&(r&&(r+=" "),r+=t);return r}const Sx=(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},Ax=(e,t)=>({classGroupId:e,validator:t}),dp=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),cs="-",Ol=[],Tx="arbitrary..",Dx=e=>{const t=Rx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Ox(s);const a=s.split(cs),u=a[0]===""&&a.length>1?1:0;return fp(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?Sx(c,u):u:c||Ol}return n[s]||Ol}}},fp=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=fp(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(cs):e.slice(t).join(cs),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},Ox=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?Tx+r:void 0})(),Rx=e=>{const{theme:t,classGroups:n}=e;return Ix(n,t)},Ix=(e,t)=>{const n=dp();for(const r in e){const o=e[r];Ju(o,n,r,t)}return n},Ju=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Nx(s,t,n,r)}},Nx=(e,t,n,r)=>{if(typeof e=="string"){Mx(e,t,n);return}if(typeof e=="function"){Lx(e,t,n,r);return}$x(e,t,n,r)},Mx=(e,t,n)=>{const r=e===""?t:gp(t,e);r.classGroupId=n},Lx=(e,t,n,r)=>{if(Px(e)){Ju(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ax(n,e))},$x=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Ju(u,gp(t,a),n,r)}},gp=(e,t)=>{let n=e;const r=t.split(cs),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=dp(),n.nextPart.set(s,a)),n=a}return n},Px=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Fx=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)}}},Du="!",Rl=":",Bx=[],Il=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),zx=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 m=o[b];if(s===0&&a===0){if(m===Rl){i.push(o.slice(u,b)),u=b+1;continue}if(m==="/"){c=b;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(u);let g=d,h=!1;d.endsWith(Du)?(g=d.slice(0,-1),h=!0):d.startsWith(Du)&&(g=d.slice(1),h=!0);const p=c&&c>u?c-u:void 0;return Il(i,h,g,p)};if(t){const o=t+Rl,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Il(Bx,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Ux=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}},Kx=e=>({cache:Fx(e.cacheSize),parseClassName:zx(e),sortModifiers:Ux(e),postfixLookupClassGroupIds:qx(e),...Dx(e)}),qx=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},Hx=/\s+/,jx=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Hx);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:g,modifiers:h,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:m}=n(d);if(g){c=d+(c.length>0?" "+c:c);continue}let y=!!m,v;if(y){const I=b.substring(0,m);v=r(I);const C=v&&s[v]?r(b):void 0;C&&C!==v&&(v=C,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=h.length===0?"":h.length===1?h[0]:i(h).join(":"),E=p?x+Du:x,k=E+v;if(a.indexOf(k)>-1)continue;a.push(k);const S=o(v,y);for(let I=0;I<S.length;++I){const C=S[I];a.push(E+C)}c=d+(c.length>0?" "+c:c)}return c},Gx=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=pp(n))&&(o&&(o+=" "),o+=r);return o},pp=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pp(e[r]))&&(n&&(n+=" "),n+=t);return n},Vx=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Kx(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=jx(u,n);return o(u,l),l};return i=s,(...u)=>i(Gx(...u))},Wx=[],bt=e=>{const t=n=>n[e]||Wx;return t.isThemeGetter=!0,t},hp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xx=/\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$/,Qx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Jx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ew=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jn=e=>Yx.test(e),Ue=e=>!!e&&!Number.isNaN(Number(e)),yn=e=>!!e&&Number.isInteger(Number(e)),aa=e=>e.endsWith("%")&&Ue(e.slice(0,-1)),Ln=e=>Zx.test(e),bp=()=>!0,tw=e=>Xx.test(e)&&!Qx.test(e),ec=()=>!1,nw=e=>Jx.test(e),rw=e=>ew.test(e),ow=e=>!be(e)&&!ye(e),iw=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)),sw=e=>hr(e,xp,ec),be=e=>hp.test(e),Er=e=>hr(e,wp,tw),Nl=e=>hr(e,pw,Ue),aw=e=>hr(e,Ep,bp),uw=e=>hr(e,_p,ec),Ml=e=>hr(e,yp,ec),cw=e=>hr(e,vp,rw),$i=e=>hr(e,kp,nw),ye=e=>mp.test(e),Po=e=>Kr(e,wp),lw=e=>Kr(e,_p),Ll=e=>Kr(e,yp),dw=e=>Kr(e,xp),fw=e=>Kr(e,vp),Pi=e=>Kr(e,kp,!0),gw=e=>Kr(e,Ep,!0),hr=(e,t,n)=>{const r=hp.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kr=(e,t,n=!1)=>{const r=mp.exec(e);return r?r[1]?t(r[1]):n:!1},yp=e=>e==="position"||e==="percentage",vp=e=>e==="image"||e==="url",xp=e=>e==="length"||e==="size"||e==="bg-size",wp=e=>e==="length",pw=e=>e==="number",_p=e=>e==="family-name",Ep=e=>e==="number"||e==="weight",kp=e=>e==="shadow",hw=()=>{const e=bt("color"),t=bt("font"),n=bt("text"),r=bt("font-weight"),o=bt("tracking"),i=bt("leading"),s=bt("breakpoint"),a=bt("container"),u=bt("spacing"),c=bt("radius"),l=bt("shadow"),d=bt("inset-shadow"),g=bt("text-shadow"),h=bt("drop-shadow"),p=bt("blur"),b=bt("perspective"),m=bt("aspect"),y=bt("ease"),v=bt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...E(),ye,be],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[ye,be,u],D=()=>[Jn,"full","auto",...C()],T=()=>[yn,"none","subgrid",ye,be],A=()=>["auto",{span:["full",yn,ye,be]},yn,ye,be],P=()=>[yn,"auto",ye,be],L=()=>["auto","min","max","fr",ye,be],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...C()],z=()=>[Jn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],B=()=>[Jn,"screen","full","dvw","lvw","svw","min","max","fit",...C()],F=()=>[Jn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],K=()=>[e,ye,be],re=()=>[...E(),Ll,Ml,{position:[ye,be]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],se=()=>["auto","cover","contain",dw,sw,{size:[ye,be]}],Z=()=>[aa,Po,Er],G=()=>["","none","full",c,ye,be],ce=()=>["",Ue,Po,Er],me=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[Ue,aa,Ll,Ml],X=()=>["","none",p,ye,be],fe=()=>["none",Ue,ye,be],_e=()=>["none",Ue,ye,be],Be=()=>[Ue,ye,be],De=()=>[Jn,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[bp],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[ow],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",Ue],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jn,be,ye,m]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,be]}],"container-named":[iw],columns:[{columns:[Ue,be,ye,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:k()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[yn,"auto",ye,be]}],basis:[{basis:[Jn,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,Jn,"auto","initial","none",be]}],grow:[{grow:["",Ue,ye,be]}],shrink:[{shrink:["",Ue,ye,be]}],order:[{order:[yn,"first","last","none",ye,be]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[a,"screen",...z()]}],"min-w":[{"min-w":[a,"screen","none",...z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,Po,Er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,gw,aw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",aa,be]}],"font-family":[{font:[lw,uw,t]}],"font-features":[{"font-features":[be]}],"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,ye,be]}],"line-clamp":[{"line-clamp":[Ue,"none",ye,Nl]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ye,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ye,Er]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Ue,"auto",ye,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[yn,ye,be]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,be]}],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",ye,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yn,ye,be],radial:["",ye,be],conic:[yn,ye,be]},fw,cw]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ye,be]}],"outline-w":[{outline:["",Ue,Po,Er]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",l,Pi,$i]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,Pi,$i]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Ue,Er]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,Pi,$i]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Ue,ye,be]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[ye,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,be]}],filter:[{filter:["","none",ye,be]}],blur:[{blur:X()}],brightness:[{brightness:[Ue,ye,be]}],contrast:[{contrast:[Ue,ye,be]}],"drop-shadow":[{"drop-shadow":["","none",h,Pi,$i]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Ue,ye,be]}],"hue-rotate":[{"hue-rotate":[Ue,ye,be]}],invert:[{invert:["",Ue,ye,be]}],saturate:[{saturate:[Ue,ye,be]}],sepia:[{sepia:["",Ue,ye,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,be]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ye,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ye,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ye,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ye,be]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ye,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ye,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ye,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ye,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ye,be]}],ease:[{ease:["linear","initial",y,ye,be]}],delay:[{delay:[Ue,ye,be]}],animate:[{animate:["none",v,ye,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ye,be]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[ye,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],zoom:[{zoom:[yn,ye,be]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",ye,be]}],"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":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ye,be]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Ue,Po,Er,Nl]}],stroke:[{stroke:["none",...K()]}],"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"]}},mw=Vx(hw);function ot(...e){return mw(lp(e))}function bw(e){return(...t)=>{for(const n of e)n&&n(...t)}}const Y=e=>typeof e=="function"&&!e.length?e():e,$l=e=>Array.isArray(e)?e:e?[e]:[];function yw(e,...t){return typeof e=="function"?e(...t):e}const vw=ee;function xw(e,t,n,r){return e.addEventListener(t,n,r),vw(e.removeEventListener.bind(e,t,n,r))}function ww(e,t,n,r){const o=()=>{$l(Y(e)).forEach(i=>{i&&$l(Y(t)).forEach(s=>xw(i,s,n,r))})};typeof e=="function"?Q(o):Le(o)}const _w=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Pl(e){const t={};let n;for(;n=_w.exec(e);)t[n[1]]=n[2];return t}function en(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Pl(e)}else typeof t=="string"&&(t=Pl(t));return{...e,...t}}function Xe(...e){return bw(e)}function Ew(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Ou(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kw(e){return typeof e=="number"}function ao(e){return Object.prototype.toString.call(e)==="[object String]"}function tc(e){return typeof e=="function"}function tn(e){return t=>`${e()}-${t}`}function vt(e,t){return e?e===t||e.contains(t):!1}function jo(e,t=!1){const{activeElement:n}=Mt(e);if(!n?.nodeName)return null;if(Cp(n)&&n.contentDocument)return jo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=Mt(n).getElementById(r);if(o)return o}}return n}function nc(e){return Mt(e).defaultView||window}function Mt(e){return e?e.ownerDocument||e:document}function Cp(e){return e.tagName==="IFRAME"}var Rs=(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))(Rs||{});function rc(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Is(){return rc(/^Mac/i)}function Cw(){return rc(/^iPhone/i)}function Sw(){return rc(/^iPad/i)||Is()&&navigator.maxTouchPoints>1}function Aw(){return Cw()||Sw()}function Tw(){return Is()||Aw()}function Te(e,t){return t&&(tc(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function _t(e){return t=>{for(const n of e)Te(t,n)}}function Dw(e){return Is()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function gt(e){if(e)if(Ow())e.focus({preventScroll:!0});else{const t=Rw(e);e.focus(),Iw(t)}}var Fi=null;function Ow(){if(Fi==null){Fi=!1;try{document.createElement("div").focus({get preventScroll(){return Fi=!0,!0}})}catch{}}return Fi}function Rw(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 Iw(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Sp=["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'])"],Nw=[...Sp,'[tabindex]:not([tabindex="-1"]):not([disabled])'],oc=`${Sp.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,Mw=Nw.join(':not([hidden]):not([tabindex="-1"]),');function Ap(e,t){const r=Array.from(e.querySelectorAll(oc)).filter(Fl);return t&&Fl(e)&&r.unshift(e),r.forEach((o,i)=>{if(Cp(o)&&o.contentDocument){const s=o.contentDocument.body,a=Ap(s,!1);r.splice(i,1,...a)}}),r}function Fl(e){return Tp(e)&&!Lw(e)}function Tp(e){return e.matches(oc)&&ic(e)}function Lw(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function ic(e,t){return e.nodeName!=="#comment"&&$w(e)&&Pw(e,t)&&(!e.parentElement||ic(e.parentElement,e))}function $w(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 Pw(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Fw(e,t,n){const r=t?.tabbable?Mw:oc,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&ic(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Bl(e){let t=e;for(;t&&!Bw(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Bw(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function zw(){}function Uw(e){return[e.clientX,e.clientY]}function Dp(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,g]=t[u],[,h]=t[u===0?s-1:u-1]||[0,0],p=(l-g)*(n-c)-(c-d)*(r-l);if(g<l){if(r>=g&&r<l){if(p===0)return!0;p>0&&(r===g?r>h&&(o=!o):o=!o)}}else if(l<g){if(r>l&&r<=g){if(p===0)return!0;p<0&&(r===g?r<h&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function Se(e,t){return q(e,t)}var Fo=new Map,zl=new Set;function Ul(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=Fo.get(n.target);r||(r=new Set,Fo.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Fo.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Fo.delete(n.target)),Fo.size===0)){for(const o of zl)o();zl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Ul():document.addEventListener("DOMContentLoaded",Ul));function Ru(e,t){const n=Kl(e,t,"left"),r=Kl(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 Kl(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 Kw(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Bl(e);for(;e&&o&&e!==n&&o!==n;)Ru(o,e),e=o,o=Bl(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 sc={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 Ns(e,t){const[n,r]=$(ql(t?.()));return Q(()=>{r(e()?.tagName.toLowerCase()||ql(t?.()))}),n}function ql(e){return ao(e)?e:void 0}function Pe(e){const[t,n]=le(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(wg,q(n,{get component(){return t.as}}))}var qw=Object.defineProperty,Sn=(e,t)=>{for(var n in t)qw(e,n,{get:t[n],enumerable:!0})},Hw={};Sn(Hw,{Button:()=>Op,Root:()=>Hn});var jw=["button","color","file","image","reset","submit"];function Gw(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?jw.indexOf(e.type)!==-1:!1}function Hn(e){let t;const n=Se({type:"button"},e),[r,o]=le(n,["ref","type","disabled"]),i=Ns(()=>t,()=>"button"),s=ue(()=>{const c=i();return c==null?!1:Gw({tagName:c,type:r.type})}),a=ue(()=>i()==="input"),u=ue(()=>i()==="a"&&t?.getAttribute("href")!=null);return f(Pe,q({as:"button",ref(c){var l=Xe(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return J(()=>!!(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 J(()=>!!(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 Op=Hn;const Hl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jl=lp,Rp=(e,t)=>n=>{var r;if(t?.variants==null)return jl(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 g=Hl(l)||Hl(d);return o[c][g]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,g]=l;return g===void 0||(c[d]=g),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:g,...h}=l;return Object.entries(h).every(p=>{let[b,m]=p;return Array.isArray(m)?m.includes({...i,...a}[b]):{...i,...a}[b]===m})?[...c,d,g]:c},[]);return jl(e,s,u,n?.class,n?.className)},Vw=Rp("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"}}),ke=e=>{const[t,n]=le(e,["class","variant","size"]);return f(Op,q({get class(){return ot(Vw({size:t.size,variant:t.variant}),t.class)}},n))};var Ww=U("<div>");const Yw=Rp("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"}}),Ip=e=>{const[t,n]=le(e,["class","variant"]);return(()=>{var r=Ww();return qn(r,q({get class(){return ot(Yw({variant:t.variant}),t.class)}},n),!1,!1),r})()},[Zw,Np]=$(pt.language||"zh-CN"),[Xw,Qw]=$(pt.isInitialized);Ug.then(()=>{Np(pt.language||"zh-CN"),Qw(!0)});pt.on("languageChanged",e=>Np(e));function _(e,t){return pt.t(e,t)}function Mp(){return{t:_,lng:ue(()=>Zw()),ready:ue(()=>Xw()),changeLanguage:e=>pt.changeLanguage(e)}}const Ms=()=>{const e=()=>sr()?_("specDetail.exitFullscreen"):_("specDetail.fullscreen");return f(ke,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:Qu,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return sr()},get children(){return f(V,{get when(){return sr()},get fallback(){return f(fv,{class:"h-3 w-3"})},get children(){return f(yv,{class:"h-3 w-3"})}})}})};var Jw=U("<input>");const Rr=e=>{const[t,n]=le(e,["class"]);return(()=>{var r=Jw();return qn(r,q({get class(){return ot("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 e_=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),t_=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function n_(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return e_.has(n)}const t=e.split("-")[0];return t_.has(t)}function r_(e){return n_(e)?"rtl":"ltr"}function Lp(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:r_(e)}}var Iu=Lp(),Go=new Set;function Gl(){Iu=Lp();for(const e of Go)e(Iu)}function o_(){const[e,t]=$(Iu),n=ue(()=>e());return Xt(()=>{Go.size===0&&window.addEventListener("languagechange",Gl),Go.add(t),ee(()=>{Go.delete(t),Go.size===0&&window.removeEventListener("languagechange",Gl)})}),{locale:()=>n().locale,direction:()=>n().direction}}var i_=it();function mr(){const e=o_();return Je(i_)||e}var ua=new Map;function s_(e){const{locale:t}=mr(),n=ue(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ue(()=>{const r=n();let o;return ua.has(r)&&(o=ua.get(r)),o||(o=new Intl.Collator(t(),e),ua.set(r,o)),o})}const a_=["top","right","bottom","left"],dr=Math.min,Ut=Math.max,ls=Math.round,Bi=Math.floor,_n=e=>({x:e,y:e}),u_={left:"right",right:"left",bottom:"top",top:"bottom"};function Nu(e,t,n){return Ut(e,dr(t,n))}function qr(e,t){return typeof e=="function"?e(t):e}function fr(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function $p(e){return e==="x"?"y":"x"}function ac(e){return e==="y"?"height":"width"}function zn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function uc(e){return $p(zn(e))}function c_(e,t,n){n===void 0&&(n=!1);const r=Ao(e),o=uc(e),i=ac(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ds(s)),[s,ds(s)]}function l_(e){const t=ds(e);return[Mu(e),t,Mu(t)]}function Mu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Vl=["left","right"],Wl=["right","left"],d_=["top","bottom"],f_=["bottom","top"];function g_(e,t,n){switch(e){case"top":case"bottom":return n?t?Wl:Vl:t?Vl:Wl;case"left":case"right":return t?d_:f_;default:return[]}}function p_(e,t,n,r){const o=Ao(e);let i=g_(fr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Mu)))),i}function ds(e){const t=fr(e);return u_[t]+e.slice(t.length)}function h_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pp(e){return typeof e!="number"?h_(e):{top:e,right:e,bottom:e,left:e}}function fs(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 Yl(e,t,n){let{reference:r,floating:o}=e;const i=zn(t),s=uc(t),a=ac(s),u=fr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ao(t)){case"start":h[s]-=g*(n&&c?-1:1);break;case"end":h[s]+=g*(n&&c?-1:1);break}return h}async function m_(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:g=!1,padding:h=0}=qr(t,e),p=Pp(h),m=a[g?d==="floating"?"reference":"floating":d],y=fs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.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)),E=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},k=fs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(y.top-k.top+p.top)/E.y,bottom:(k.bottom-y.bottom+p.bottom)/E.y,left:(y.left-k.left+p.left)/E.x,right:(k.right-y.right+p.right)/E.x}}const b_=50,y_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:m_},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}=Yl(c,r,u),g=r,h=0;const p={};for(let b=0;b<i.length;b++){const m=i[b];if(!m)continue;const{name:y,fn:v}=m,{x,y:E,data:k,reset:S}=await v({x:l,y:d,initialPlacement:r,placement:g,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=E??d,p[y]={...p[y],...k},S&&h<b_&&(h++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:d}=Yl(c,g,u)),b=-1)}return{x:l,y:d,placement:g,strategy:o,middlewareData:p}},v_=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}=qr(e,t)||{};if(c==null)return{};const d=Pp(l),g={x:n,y:r},h=uc(o),p=ac(h),b=await s.getDimensions(c),m=h==="y",y=m?"top":"left",v=m?"bottom":"right",x=m?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[h]-g[h]-i.floating[p],k=g[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let I=S?S[x]:0;(!I||!await(s.isElement==null?void 0:s.isElement(S)))&&(I=a.floating[x]||i.floating[p]);const C=E/2-k/2,D=I/2-b[p]/2-1,T=dr(d[y],D),A=dr(d[v],D),P=T,L=I-b[p]-A,R=I/2-b[p]/2+C,O=Nu(P,R,L),N=!u.arrow&&Ao(o)!=null&&R!==O&&i.reference[p]/2-(R<P?T:A)-b[p]/2<0,z=N?R<P?R-P:R-L:0;return{[h]:g[h]+z,data:{[h]:O,centerOffset:R-O-z,...N&&{alignmentOffset:z}},reset:N}}}),x_=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:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...m}=qr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=fr(o),v=zn(a),x=fr(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),k=g||(x||!b?[ds(a)]:l_(a)),S=p!=="none";!g&&S&&k.push(...p_(a,b,p,E));const I=[a,...k],C=await u.detectOverflow(t,m),D=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&D.push(C[y]),d){const R=c_(o,s,E);D.push(C[R[0]],C[R[1]])}if(T=[...T,{placement:o,overflows:D}],!D.every(R=>R<=0)){var A,P;const R=(((A=i.flip)==null?void 0:A.index)||0)+1,O=I[R];if(O&&(!(d==="alignment"?v!==zn(O):!1)||T.every(B=>zn(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:R,overflows:T},reset:{placement:O}};let N=(P=T.filter(z=>z.overflows[0]<=0).sort((z,B)=>z.overflows[1]-B.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(h){case"bestFit":{var L;const z=(L=T.filter(B=>{if(S){const F=zn(B.placement);return F===v||F==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(F=>F>0).reduce((F,K)=>F+K,0)]).sort((B,F)=>B[1]-F[1])[0])==null?void 0:L[0];z&&(N=z);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Zl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xl(e){return a_.some(t=>e[t]>=0)}const w_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=qr(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Zl(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Xl(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Zl(s,n.floating);return{data:{escapedOffsets:a,escaped:Xl(a)}}}default:return{}}}}},__=new Set(["left","top"]);async function E_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=fr(n),a=Ao(n),u=zn(n)==="y",c=__.has(s)?-1:1,l=i&&u?-1:1,d=qr(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),u?{x:h*l,y:g*c}:{x:g*c,y:h*l}}const k_=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 E_(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}}}}},C_=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}=qr(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),g=zn(fr(o)),h=$p(g);let p=l[h],b=l[g];if(s){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",x=p+d[y],E=p-d[v];p=Nu(x,p,E)}if(a){const y=g==="y"?"top":"left",v=g==="y"?"bottom":"right",x=b+d[y],E=b-d[v];b=Nu(x,b,E)}const m=u.fn({...t,[h]:p,[g]:b});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[g]:a}}}}}},S_=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}=qr(e,t),l=await s.detectOverflow(t,c),d=fr(o),g=Ao(o),h=zn(o)==="y",{width:p,height:b}=i.floating;let m,y;d==="top"||d==="bottom"?(m=d,y=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,m=g==="end"?"top":"bottom");const v=b-l.top-l.bottom,x=p-l.left-l.right,E=dr(b-l[m],v),k=dr(p-l[y],x),S=!t.middlewareData.shift;let I=E,C=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=v),S&&!g){const T=Ut(l.left,0),A=Ut(l.right,0),P=Ut(l.top,0),L=Ut(l.bottom,0);h?C=p-2*(T!==0||A!==0?T+A:Ut(l.left,l.right)):I=b-2*(P!==0||L!==0?P+L:Ut(l.top,l.bottom))}await u({...t,availableWidth:C,availableHeight:I});const D=await s.getDimensions(a.floating);return p!==D.width||b!==D.height?{reset:{rects:!0}}:{}}}};function Ls(){return typeof window<"u"}function To(e){return Fp(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function An(e){var t;return(t=(Fp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fp(e){return Ls()?e instanceof Node||e instanceof Ht(e).Node:!1}function ln(e){return Ls()?e instanceof Element||e instanceof Ht(e).Element:!1}function jn(e){return Ls()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Ql(e){return!Ls()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function yi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function A_(e){return/^(table|td|th)$/.test(To(e))}function $s(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const T_=/transform|translate|scale|rotate|perspective|filter/,D_=/paint|layout|strict|content/,kr=e=>!!e&&e!=="none";let ca;function cc(e){const t=ln(e)?dn(e):e;return kr(t.transform)||kr(t.translate)||kr(t.scale)||kr(t.rotate)||kr(t.perspective)||!lc()&&(kr(t.backdropFilter)||kr(t.filter))||T_.test(t.willChange||"")||D_.test(t.contain||"")}function O_(e){let t=gr(e);for(;jn(t)&&!bo(t);){if(cc(t))return t;if($s(t))return null;t=gr(t)}return null}function lc(){return ca==null&&(ca=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ca}function bo(e){return/^(html|body|#document)$/.test(To(e))}function dn(e){return Ht(e).getComputedStyle(e)}function Ps(e){return ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gr(e){if(To(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ql(e)&&e.host||An(e);return Ql(t)?t.host:t}function Bp(e){const t=gr(e);return bo(t)?e.ownerDocument?e.ownerDocument.body:e.body:jn(t)&&yi(t)?t:Bp(t)}function oi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bp(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ht(o);if(i){const a=Lu(s);return t.concat(s,s.visualViewport||[],yi(o)?o:[],a&&n?oi(a):[])}else return t.concat(o,oi(o,[],n))}function Lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zp(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ls(n)!==i||ls(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function dc(e){return ln(e)?e:e.contextElement}function po(e){const t=dc(e);if(!jn(t))return _n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zp(t);let s=(i?ls(n.width):n.width)/r,a=(i?ls(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const R_=_n(0);function Up(e){const t=Ht(e);return!lc()||!t.visualViewport?R_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=dc(e);let s=_n(1);t&&(r?ln(r)&&(s=po(r)):s=po(e));const a=I_(i,n,r)?Up(i):_n(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 g=Ht(i),h=r&&ln(r)?Ht(r):r;let p=g,b=Lu(p);for(;b&&r&&h!==p;){const m=po(b),y=b.getBoundingClientRect(),v=dn(b),x=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*m.x,E=y.top+(b.clientTop+parseFloat(v.paddingTop))*m.y;u*=m.x,c*=m.y,l*=m.x,d*=m.y,u+=x,c+=E,p=Ht(b),b=Lu(p)}}return fs({width:l,height:d,x:u,y:c})}function Fs(e,t){const n=Ps(e).scrollLeft;return t?t.left+n:Mr(An(e)).left+n}function Kp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function N_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=An(r),a=t?$s(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=_n(1);const l=_n(0),d=jn(r);if((d||!d&&!i)&&((To(r)!=="body"||yi(s))&&(u=Ps(r)),d)){const h=Mr(r);c=po(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const g=s&&!d&&!i?Kp(s,u):_n(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-u.scrollTop*c.y+l.y+g.y}}function M_(e){return Array.from(e.getClientRects())}function L_(e){const t=An(e),n=Ps(e),r=e.ownerDocument.body,o=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fs(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=Ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Jl=25;function $_(e,t){const n=Ht(e),r=An(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=lc();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Fs(r);if(c<=0){const l=r.ownerDocument,d=l.body,g=getComputedStyle(d),h=l.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-h);p<=Jl&&(i-=p)}else c<=Jl&&(i+=c);return{width:i,height:s,x:a,y:u}}function P_(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=jn(e)?po(e):_n(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 ed(e,t,n){let r;if(t==="viewport")r=$_(e,n);else if(t==="document")r=L_(An(e));else if(ln(t))r=P_(t,n);else{const o=Up(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fs(r)}function qp(e,t){const n=gr(e);return n===t||!ln(n)||bo(n)?!1:dn(n).position==="fixed"||qp(n,t)}function F_(e,t){const n=t.get(e);if(n)return n;let r=oi(e,[],!1).filter(a=>ln(a)&&To(a)!=="body"),o=null;const i=dn(e).position==="fixed";let s=i?gr(e):e;for(;ln(s)&&!bo(s);){const a=dn(s),u=cc(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||yi(s)&&!u&&qp(e,s))?r=r.filter(l=>l!==s):o=a,s=gr(s)}return t.set(e,r),r}function B_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?$s(t)?[]:F_(t,this._c):[].concat(n),r],a=ed(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let g=1;g<s.length;g++){const h=ed(t,s[g],o);u=Ut(h.top,u),c=dr(h.right,c),l=dr(h.bottom,l),d=Ut(h.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function z_(e){const{width:t,height:n}=zp(e);return{width:t,height:n}}function U_(e,t,n){const r=jn(t),o=An(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=_n(0);function c(){u.x=Fs(o)}if(r||!r&&!i)if((To(t)!=="body"||yi(o))&&(a=Ps(t)),r){const h=Mr(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?Kp(o,a):_n(0),d=s.left+a.scrollLeft-u.x-l.x,g=s.top+a.scrollTop-u.y-l.y;return{x:d,y:g,width:s.width,height:s.height}}function la(e){return dn(e).position==="static"}function td(e,t){if(!jn(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return An(e)===n&&(n=n.ownerDocument.body),n}function Hp(e,t){const n=Ht(e);if($s(e))return n;if(!jn(e)){let o=gr(e);for(;o&&!bo(o);){if(ln(o)&&!la(o))return o;o=gr(o)}return n}let r=td(e,t);for(;r&&A_(r)&&la(r);)r=td(r,t);return r&&bo(r)&&la(r)&&!cc(r)?n:r||O_(e)||n}const K_=async function(e){const t=this.getOffsetParent||Hp,n=this.getDimensions,r=await n(e.floating);return{reference:U_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function q_(e){return dn(e).direction==="rtl"}const jp={convertOffsetParentRelativeRectToViewportRelativeRect:N_,getDocumentElement:An,getClippingRect:B_,getOffsetParent:Hp,getElementRects:K_,getClientRects:M_,getDimensions:z_,getScale:po,isElement:ln,isRTL:q_};function Gp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function H_(e,t){let n=null,r;const o=An(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:g,height:h}=c;if(a||t(),!g||!h)return;const p=Bi(d),b=Bi(o.clientWidth-(l+g)),m=Bi(o.clientHeight-(d+h)),y=Bi(l),x={rootMargin:-p+"px "+-b+"px "+-m+"px "+-y+"px",threshold:Ut(0,dr(1,u))||1};let E=!0;function k(S){const I=S[0].intersectionRatio;if(I!==u){if(!E)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!Gp(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return s(!0),i}function j_(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=dc(e),l=o||i?[...c?oi(c):[],...t?oi(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?H_(c,n):null;let g=-1,h=null;s&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!u&&h.observe(c),t&&h.observe(t));let p,b=u?Mr(e):null;u&&m();function m(){const y=Mr(e);b&&!Gp(b,y)&&n(),b=y,p=requestAnimationFrame(m)}return n(),()=>{var y;l.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(y=h)==null||y.disconnect(),h=null,u&&cancelAnimationFrame(p)}}const G_=k_,V_=C_,W_=x_,Y_=S_,Z_=w_,X_=v_,Q_=(e,t,n)=>{const r=new Map,o={platform:jp,...n},i={...o.platform,_c:r};return y_(e,t,{...o,platform:i})};var J_=U('<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>'),fc=it();function gc(){const e=Je(fc);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var $u=30,nd=$u/2,e2={top:180,right:-90,bottom:0,left:90};function Hr(e){const t=gc(),n=Se({size:$u},e),[r,o]=le(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=t2(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*($u/r.size),d=()=>`rotate(${e2[i()]} ${nd} ${nd}) translate(0 2)`;return f(Pe,q({as:"div",ref(g){var h=Xe(t.setArrowRef,r.ref);typeof h=="function"&&h(g)},"aria-hidden":"true",get style(){return en({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 g=J_(),h=g.firstChild,p=h.firstChild;return p.nextSibling,Le(()=>We(h,"transform",d())),g}}))}function t2(e){const[t,n]=$();return Q(()=>{const r=e();r&&n(nc(r).getComputedStyle(r))}),t}function n2(e){const t=gc(),[n,r]=le(e,["ref","style"]);return f(Pe,q({as:"div",ref(o){var i=Xe(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return en({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function rd(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 r2(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?rd(r):e?e.getBoundingClientRect():rd()}}}function o2(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var i2={top:"bottom",right:"left",bottom:"top",left:"right"};function s2(e,t){const[n,r]=e.split("-"),o=i2[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 a2(e){const t=Se({getAnchorRect:g=>g?.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=()=>r2(t.anchorRef?.(),t.getAnchorRect),{direction:c}=mr();async function l(){const g=u(),h=n(),p=o();if(!g||!h)return;const b=(p?.clientHeight||0)/2,m=typeof t.gutter=="number"?t.gutter+b:t.gutter??b;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),g.getBoundingClientRect();const y=[G_(({placement:S})=>{const I=!!S.split("-")[1];return{mainAxis:m,crossAxis:I?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(o2))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(W_({padding:t.overflowPadding,fallbackPlacements:S}))}(t.slide||t.overlap)&&y.push(V_({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(Y_({padding:t.overflowPadding,apply({availableWidth:S,availableHeight:I,rects:C}){const D=Math.round(C.reference.width);S=Math.floor(S),I=Math.floor(I),h.style.setProperty("--kb-popper-anchor-width",`${D}px`),h.style.setProperty("--kb-popper-content-available-width",`${S}px`),h.style.setProperty("--kb-popper-content-available-height",`${I}px`),t.sameWidth&&(h.style.width=`${D}px`),t.fitViewport&&(h.style.maxWidth=`${S}px`,h.style.maxHeight=`${I}px`)}})),t.hideWhenDetached&&y.push(Z_({padding:t.detachedPadding})),p&&y.push(X_({element:p,padding:t.arrowPadding}));const v=await Q_(g,h,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...jp,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",s2(v.placement,c()));const x=Math.round(v.x),E=Math.round(v.y);let k;if(t.hideWhenDetached&&(k=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${E}px, 0)`,visibility:k}),p&&v.middlewareData.arrow){const{x:S,y:I}=v.middlewareData.arrow,C=v.placement.split("-")[0];Object.assign(p.style,{left:S!=null?`${S}px`:"",top:I!=null?`${I}px`:"",[C]:"100%"})}}Q(()=>{const g=u(),h=n();if(!g||!h)return;const p=j_(g,h,l,{elementResize:typeof ResizeObserver=="function"});ee(p)}),Q(()=>{const g=n(),h=t.contentRef?.();!g||!h||queueMicrotask(()=>{g.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return f(fc.Provider,{value:d,get children(){return t.children}})}var Do=Object.assign(a2,{Arrow:Hr,Context:fc,usePopperContext:gc,Positioner:n2});function Vp(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=ao(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=ao(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(ao(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return ao(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(ao(u)||kw(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=Vp({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 u2(e,t=[]){return ue(()=>{const n=Vp({dataSource:Y(e.dataSource),getKey:Y(e.getKey),getTextValue:Y(e.getTextValue),getDisabled:Y(e.getDisabled),getSectionChildren:Y(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function vi(e){const[t,n]=$(e.defaultValue?.()),r=ue(()=>e.value?.()!==void 0),o=ue(()=>r()?e.value?.():t());return[o,s=>{ht(()=>{const a=yw(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Wp(e){const[t,n]=vi(e);return[()=>t()??!1,n]}function c2(e){const[t,n]=vi(e);return[()=>t()??[],n]}var Fn=class Yp extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Yp?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function l2(e){const[t,n]=vi(e);return[()=>t()??new Fn,n]}function Zp(e){return Tw()?e.altKey:e.ctrlKey}function uo(e){return Is()?e.metaKey:e.ctrlKey}function od(e){return new Fn(e)}function d2(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function f2(e){const t=Se({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=$(!1),[o,i]=$(),s=ue(()=>{const b=Y(t.selectedKeys);return b!=null?od(b):b}),a=ue(()=>{const b=Y(t.defaultSelectedKeys);return b!=null?od(b):new Fn}),[u,c]=l2({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=$(Y(t.selectionBehavior)),g=()=>Y(t.selectionMode),h=()=>Y(t.disallowEmptySelection)??!1,p=b=>{(Y(t.allowDuplicateSelectionEvents)||!d2(b,u()))&&c(b)};return Q(()=>{const b=u();Y(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),Q(()=>{d(Y(t.selectionBehavior)??"toggle")}),{selectionMode:g,disallowEmptySelection:h,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:p}}function g2(e){const[t,n]=$(""),[r,o]=$(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(Y(e.isDisabled))return;const a=Y(e.keyboardDelegate),u=Y(e.selectionManager);if(!a.getKeyForSearch)return;const c=p2(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(g=>g+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&h2(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 p2(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function h2(e){return e.split("").every(t=>t===e[0])}function m2(e,t,n){const o=q({selectOnFocus:()=>Y(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=mr();let a={top:0,left:0};ww(()=>Y(o.isVirtualized)?void 0:i(),"scroll",()=>{const m=i();m&&(a={top:m.scrollTop,left:m.scrollLeft})});const{typeSelectHandlers:u}=g2({isDisabled:()=>Y(o.disallowTypeAhead),keyboardDelegate:()=>Y(o.keyboardDelegate),selectionManager:()=>Y(o.selectionManager)}),c=()=>Y(o.orientation)??"vertical",l=m=>{Te(m,u.onKeyDown),m.altKey&&m.key==="Tab"&&m.preventDefault();const y=t();if(!y?.contains(m.target))return;const v=Y(o.selectionManager),x=Y(o.selectOnFocus),E=C=>{C!=null&&(v.setFocusedKey(C),m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(C):x&&!Zp(m)&&v.replaceSelection(C))},k=Y(o.keyboardDelegate),S=Y(o.shouldFocusWrap),I=v.focusedKey();switch(m.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(k.getKeyBelow){m.preventDefault();let C;I!=null?C=k.getKeyBelow(I):C=k.getFirstKey?.(),C==null&&S&&(C=k.getFirstKey?.(I)),E(C)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(k.getKeyAbove){m.preventDefault();let C;I!=null?C=k.getKeyAbove(I):C=k.getLastKey?.(),C==null&&S&&(C=k.getLastKey?.(I)),E(C)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(k.getKeyLeftOf){m.preventDefault();const C=s()==="rtl";let D;I!=null?D=k.getKeyLeftOf(I):D=C?k.getFirstKey?.():k.getLastKey?.(),E(D)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(k.getKeyRightOf){m.preventDefault();const C=s()==="rtl";let D;I!=null?D=k.getKeyRightOf(I):D=C?k.getLastKey?.():k.getFirstKey?.(),E(D)}break}case"Home":if(k.getFirstKey){m.preventDefault();const C=k.getFirstKey(I,uo(m));C!=null&&(v.setFocusedKey(C),uo(m)&&m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(C):x&&v.replaceSelection(C))}break;case"End":if(k.getLastKey){m.preventDefault();const C=k.getLastKey(I,uo(m));C!=null&&(v.setFocusedKey(C),uo(m)&&m.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(C):x&&v.replaceSelection(C))}break;case"PageDown":if(k.getKeyPageBelow&&I!=null){m.preventDefault();const C=k.getKeyPageBelow(I);E(C)}break;case"PageUp":if(k.getKeyPageAbove&&I!=null){m.preventDefault();const C=k.getKeyPageAbove(I);E(C)}break;case"a":uo(m)&&v.selectionMode()==="multiple"&&Y(o.disallowSelectAll)!==!0&&(m.preventDefault(),v.selectAll());break;case"Escape":m.defaultPrevented||(m.preventDefault(),Y(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!Y(o.allowsTabNavigation)){if(m.shiftKey)y.focus();else{const C=Fw(y,{tabbable:!0});let D,T;do T=C.lastChild(),T&&(D=T);while(T);D&&!D.contains(document.activeElement)&&gt(D)}break}}},d=m=>{const y=Y(o.selectionManager),v=Y(o.keyboardDelegate),x=Y(o.selectOnFocus);if(y.isFocused()){m.currentTarget.contains(m.target)||y.setFocused(!1);return}if(m.currentTarget.contains(m.target)){if(y.setFocused(!0),y.focusedKey()==null){const E=S=>{S!=null&&(y.setFocusedKey(S),x&&y.replaceSelection(S))},k=m.relatedTarget;k&&m.currentTarget.compareDocumentPosition(k)&Node.DOCUMENT_POSITION_FOLLOWING?E(y.lastSelectedKey()??v.getLastKey?.()):E(y.firstSelectedKey()??v.getFirstKey?.())}else if(!Y(o.isVirtualized)){const E=i();if(E){E.scrollTop=a.top,E.scrollLeft=a.left;const k=E.querySelector(`[data-key="${y.focusedKey()}"]`);k&&(gt(k),Ru(E,k))}}}},g=m=>{const y=Y(o.selectionManager);m.currentTarget.contains(m.relatedTarget)||y.setFocused(!1)},h=m=>{i()===m.target&&m.preventDefault()},p=()=>{const m=Y(o.autoFocus);if(!m)return;const y=Y(o.selectionManager),v=Y(o.keyboardDelegate);let x;m==="first"&&(x=v.getFirstKey?.()),m==="last"&&(x=v.getLastKey?.());const E=y.selectedKeys();E.size&&(x=E.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const k=t();k&&x==null&&!Y(o.shouldUseVirtualFocus)&&gt(k)};return Xt(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),Q(dt([i,()=>Y(o.isVirtualized),()=>Y(o.selectionManager).focusedKey()],m=>{const[y,v,x]=m;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const E=y.querySelector(`[data-key="${x}"]`);E&&Ru(y,E)}})),{tabIndex:ue(()=>{if(!Y(o.shouldUseVirtualFocus))return Y(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:h,onFocusIn:d,onFocusOut:g}}function Xp(e,t){const n=()=>Y(e.selectionManager),r=()=>Y(e.key),o=()=>Y(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"||uo(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>Y(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&&!Y(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&Y(e.shouldSelectOnPressUp)&&Y(e.allowsDifferentPressOrigin)&&i(v)},g=v=>{u()&&(Y(e.shouldSelectOnPressUp)&&!Y(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},h=v=>{!u()||!["Enter"," "].includes(v.key)||(Zp(v)?n().toggleSelection(r()):i(v))},p=v=>{a()&&v.preventDefault()},b=v=>{const x=t();o()||a()||!x||v.target===x&&n().setFocusedKey(r())},m=ue(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=ue(()=>Y(e.virtualized)?void 0:r());return Q(dt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,E,k,S])=>{v&&x===k&&S&&!E&&document.activeElement!==v&&(e.focus?e.focus():gt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:m,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:g,onKeyDown:h,onMouseDown:p,onFocus:b}}var b2=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 Fn(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 Fn(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 Fn([t],t,t):new Fn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Fn;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 Fn)}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}},id=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 y2(e){const t=f2(e),r=u2({dataSource:()=>Y(e.dataSource),getKey:()=>Y(e.getKey),getTextValue:()=>Y(e.getTextValue),getDisabled:()=>Y(e.getDisabled),getSectionChildren:()=>Y(e.getSectionChildren),factory:i=>e.filter?new id(e.filter(i)):new id(i)},[()=>e.filter]),o=new b2(r,t);return yu(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var v2=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 x2(e,t,n){const r=s_({usage:"search",sensitivity:"base"}),o=ue(()=>{const i=Y(e.keyboardDelegate);return i||new v2(e.collection,t,r)});return m2({selectionManager:()=>Y(e.selectionManager),keyboardDelegate:o,autoFocus:()=>Y(e.autoFocus),deferAutoFocus:()=>Y(e.deferAutoFocus),shouldFocusWrap:()=>Y(e.shouldFocusWrap),disallowEmptySelection:()=>Y(e.disallowEmptySelection),selectOnFocus:()=>Y(e.selectOnFocus),disallowTypeAhead:()=>Y(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Y(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Y(e.allowsTabNavigation),isVirtualized:()=>Y(e.isVirtualized),scrollToKey:i=>Y(e.scrollToKey)?.(i),orientation:()=>Y(e.orientation)},t)}var Qp=it();function Jp(){return Je(Qp)}function w2(){const e=Jp();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function e0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function _2(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&&e0(o,n))return r+1}return 0}function E2(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:e0(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function t0(e,t){const n=E2(e);e!==n&&t(n)}function k2(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 Mt(r).body}function C2(e,t){Q(()=>{const n=setTimeout(()=>{t0(e(),t)});ee(()=>clearTimeout(n))})}function S2(e,t){if(typeof IntersectionObserver!="function"){C2(e,t);return}let n=[];Q(()=>{const r=()=>{const s=!!n.length;n=e(),s&&t0(e(),t)},o=k2(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ee(()=>i.disconnect())})}function A2(e={}){const[t,n]=c2({value:()=>Y(e.items),onChange:i=>e.onItemsChange?.(i)});S2(t,n);const r=i=>(n(s=>{const a=_2(s,i);return Ew(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>f(Qp.Provider,{value:{registerItem:r},get children(){return i.children}})}}function T2(e){const t=w2(),n=Se({shouldRegisterItem:!0},e);Q(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ee(r)})}var ii="data-kb-top-layer",n0,Pu=!1,En=[];function si(e){return En.findIndex(t=>t.node===e)}function D2(e){return En[si(e)]}function O2(e){return En.length>0&&En[En.length-1].node===e}function r0(){return En.filter(e=>e.isPointerBlocking)}function R2(){return[...r0()].slice(-1)[0]}function pc(){return r0().length>0}function o0(e){const t=si(R2()?.node);return si(e)<t}function I2(e){En.push(e)}function N2(e){const t=si(e);t<0||En.splice(t,1)}function M2(){for(const{node:e}of En)e.style.pointerEvents=o0(e)?"none":"auto"}function L2(e){if(pc()&&!Pu){const t=Mt(e);n0=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Pu=!0}}function $2(e){if(pc())return;const t=Mt(e);t.body.style.pointerEvents=n0,t.body.style.length===0&&t.body.removeAttribute("style"),Pu=!1}var zt={layers:En,isTopMostLayer:O2,hasPointerBlockingLayer:pc,isBelowPointerBlockingLayer:o0,addLayer:I2,removeLayer:N2,indexOf:si,find:D2,assignPointerEventToLayers:M2,disableBodyPointerEvents:L2,restoreBodyPointerEvents:$2},da="focusScope.autoFocusOnMount",fa="focusScope.autoFocusOnUnmount",sd={bubbles:!1,cancelable:!0},ad={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Ou(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Ou(this.stack,e),this.active()?.resume()}};function hc(e,t){const[n,r]=$(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),u=()=>Mt(t()),c=()=>{const p=u().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,sc),p},l=()=>{const p=t();return p?Ap(p,!0).filter(b=>!b.hasAttribute("data-focus-trap")):[]},d=()=>{const p=l();return p.length>0?p[0]:null},g=()=>{const p=l();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const b=jo(p);return!b||vt(p,b)?!1:Tp(b)};Q(()=>{const p=t();if(!p)return;ad.add(o);const b=jo(p);if(!vt(p,b)){const y=new CustomEvent(da,sd);p.addEventListener(da,s),p.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{gt(d()),jo(p)===b&&gt(p)},0)}ee(()=>{p.removeEventListener(da,s),setTimeout(()=>{const y=new CustomEvent(fa,sd);h()&&y.preventDefault(),p.addEventListener(fa,a),p.dispatchEvent(y),y.defaultPrevented||gt(b??u().body),p.removeEventListener(fa,a),ad.remove(o)},0)})}),Q(()=>{const p=t();if(!p||!Y(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${ii}]`)||(vt(p,v)?i=v:gt(i))},m=y=>{const x=y.relatedTarget??jo(p);x?.closest(`[${ii}]`)||vt(p,x)||gt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",m),ee(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",m)})}),Q(()=>{const p=t();if(!p||!Y(e.trapFocus)||n())return;const b=c();p.insertAdjacentElement("afterbegin",b);const m=c();p.insertAdjacentElement("beforeend",m);function y(x){const E=d(),k=g();x.relatedTarget===E?gt(k):gt(E)}b.addEventListener("focusin",y),m.addEventListener("focusin",y);const v=new MutationObserver(x=>{for(const E of x)E.previousSibling===m&&(m.remove(),p.insertAdjacentElement("beforeend",m)),E.nextSibling===b&&(b.remove(),p.insertAdjacentElement("afterbegin",b))});v.observe(p,{childList:!0,subtree:!1}),ee(()=>{b.removeEventListener("focusin",y),m.removeEventListener("focusin",y),b.remove(),m.remove(),v.disconnect()})})}var P2="data-live-announcer";function mc(e){Q(()=>{Y(e.isDisabled)||ee(F2(Y(e.targets),Y(e.root)))})}var Bo=new WeakMap,Yt=[];function F2(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const g of u.querySelectorAll(`[${P2}], [${ii}]`))n.add(g);const c=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(g.contains(h))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 g=l.nextNode();for(;g!=null;)i(g),g=l.nextNode()}},i=u=>{const c=Bo.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),Bo.set(u,c+1))};Yt.length&&Yt[Yt.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 Yt.push(a),()=>{s.disconnect();for(const u of r){const c=Bo.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),Bo.delete(u)):Bo.set(u,c-1)}a===Yt[Yt.length-1]?(Yt.pop(),Yt.length&&Yt[Yt.length-1].observe()):Yt.splice(Yt.indexOf(a),1)}}function B2(e){const t=n=>{n.key===Rs.Escape&&e.onEscapeKeyDown?.(n)};Q(()=>{if(Y(e.isDisabled))return;const n=e.ownerDocument?.()??Mt();n.addEventListener("keydown",t),ee(()=>{n.removeEventListener("keydown",t)})})}var ud="interactOutside.pointerDownOutside",cd="interactOutside.focusOutside";function z2(e,t){let n,r=zw;const o=()=>Mt(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const g=d.target;return!(g instanceof Element)||g.closest(`[${ii}]`)||!vt(o(),g)||vt(t(),g)?!1:!e.shouldExcludeElement?.(g)},c=d=>{function g(){const h=t(),p=d.target;if(!h||!p||!u(d))return;const b=_t([i,a]);p.addEventListener(ud,b,{once:!0});const m=new CustomEvent(ud,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Dw(d)&&d.button===0}});p.dispatchEvent(m)}d.pointerType==="touch"?(o().removeEventListener("click",g),r=g,o().addEventListener("click",g,{once:!0})):g()},l=d=>{const g=t(),h=d.target;if(!g||!h||!u(d))return;const p=_t([s,a]);h.addEventListener(cd,p,{once:!0});const b=new CustomEvent(cd,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(b)};Q(()=>{Y(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ee(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var i0=it();function U2(){return Je(i0)}function Bs(e){let t;const n=U2(),[r,o]=le(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const g=n?.registerNestedLayer(d);return()=>{i.delete(d),g?.()}};z2({shouldExcludeElement:d=>t?r.excludedElements?.some(g=>vt(g(),d))||[...i].some(g=>vt(g,d)):!1,onPointerDownOutside:d=>{!t||zt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!zt.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),B2({ownerDocument:()=>Mt(t),onEscapeKeyDown:d=>{!t||!zt.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Xt(()=>{if(!t)return;zt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);zt.assignPointerEventToLayers(),zt.disableBodyPointerEvents(t),ee(()=>{t&&(zt.removeLayer(t),d?.(),zt.assignPointerEventToLayers(),zt.restoreBodyPointerEvents(t))})}),Q(dt([()=>t,()=>r.disableOutsidePointerEvents],([d,g])=>{if(!d)return;const h=zt.find(d);h&&h.isPointerBlocking!==g&&(h.isPointerBlocking=g,zt.assignPointerEventToLayers()),g&&zt.disableBodyPointerEvents(d),ee(()=>{zt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return f(i0.Provider,{value:l,get children(){return f(Pe,q({as:"div",ref(d){var g=Xe(h=>t=h,r.ref);typeof g=="function"&&g(d)}},o))}})}function Oo(e={}){const[t,n]=Wp({value:()=>Y(e.open),defaultValue:()=>!!Y(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 s0(e={}){const[t,n]=Wp({value:()=>Y(e.isSelected),defaultValue:()=>!!Y(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!Y(e.isReadOnly)&&!Y(e.isDisabled)&&n(i)},toggle:()=>{!Y(e.isReadOnly)&&!Y(e.isDisabled)&&n(!t())}}}function ft(e){return t=>(e(t),()=>e(void 0))}var Ot=e=>typeof e=="function"?e():e,Fu=(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},zi=new Map,K2=e=>{Q(()=>{const t=Ot(e.style)??{},n=Ot(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=zi.get(e.key);o?o.activeCount++:zi.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);ee(()=>{const i=zi.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}zi.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?.()}})})},ld=K2,q2=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},H2=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},j2=(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]=q2(o,t),d=l-u-r*c;(c!==0||d!==0)&&H2(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[dd,fd]=$([]),G2=e=>dd().indexOf(e)===dd().length-1,V2=e=>{const t=q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=kt();let r=[0,0],o=null,i=null;Q(()=>{Ot(t.enabled)&&(fd(c=>[...c,n]),ee(()=>{fd(c=>c.filter(l=>l!==n))}))}),Q(()=>{if(!Ot(t.enabled)||!Ot(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Ot(t.preventScrollbarShift)){const d={overflow:"hidden"},g=[];l>0&&(Ot(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,g.push({key:"--scrollbar-width",value:`${l}px`}));const h=window.scrollY,p=window.scrollX;ld({key:"prevent-scroll",element:c,style:d,properties:g,cleanup:()=>{Ot(t.restoreScrollPosition)&&l>0&&window.scrollTo(p,h)}})}else ld({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),Q(()=>{!G2(n)||!Ot(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ee(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=gd(c),o=null,i=null},a=c=>{const l=c.target,d=Ot(t.element),g=W2(c),h=Math.abs(g[0])>Math.abs(g[1])?"x":"y",p=h==="x"?g[0]:g[1],b=pd(l,h,p,d);let m;d&&Fu(d,l)?m=!b:m=!0,m&&c.cancelable&&c.preventDefault()},u=c=>{const l=Ot(t.element),d=c.target;let g;if(c.touches.length===2)g=!Ot(t.allowPinchZoom);else{if(o==null||i===null){const h=gd(c).map((b,m)=>r[m]-b),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=p,i=p==="x"?h[0]:h[1]}if(d.type==="range")g=!1;else{const h=pd(d,o,i,l);l&&Fu(l,d)?g=!h:g=!0}}g&&c.cancelable&&c.preventDefault()}},W2=e=>[e.deltaX,e.deltaY],gd=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],pd=(e,t,n,r)=>{const o=r!==null&&Fu(r,e),[i,s]=j2(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Y2=V2,bc=Y2,Z2=e=>{const t=ue(()=>{const s=Ot(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=$(Ot(e.show)?"present":"hidden");let i="none";return Q(s=>{const a=Ot(e.show);return ht(()=>{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}),Q(()=>{const s=Ot(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),ee(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},X2=Z2,Kn=X2,Q2=it();function zs(){return Je(Q2)}var J2=it();function a0(){return Je(J2)}var u0=it();function c0(){return Je(u0)}function Gn(){const e=c0();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var l0=it();function yc(){const e=Je(l0);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var d0=it();function Tn(){const e=Je(d0);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function vc(e){let t;const n=Tn(),r=Gn(),o=Se({id:n.generateId(`item-${kt()}`)},e),[i,s]=le(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=$(),[c,l]=$(),[d,g]=$(),h=()=>r.listState().selectionManager(),p=()=>s.id,b=()=>h().focusedKey()===p(),m=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};T2({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=Xp({key:p,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=D=>{Te(D,i.onPointerMove),D.pointerType==="mouse"&&(i.disabled?r.onItemLeave(D):(r.onItemEnter(D),D.defaultPrevented||(gt(D.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},x=D=>{Te(D,i.onPointerLeave),D.pointerType==="mouse"&&r.onItemLeave(D)},E=D=>{Te(D,i.onPointerUp),!i.disabled&&D.button===0&&m()},k=D=>{if(Te(D,i.onKeyDown),!D.repeat&&!i.disabled)switch(D.key){case"Enter":case" ":m();break}},S=ue(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),I=ue(()=>({"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})),C={isChecked:()=>i.checked,dataset:I,setLabelRef:g,generateId:tn(()=>s.id),registerLabel:ft(u),registerDescription:ft(l)};return f(l0.Provider,{value:C,get children(){return f(Pe,q({as:"div",ref(D){var T=Xe(A=>t=A,i.ref);typeof T=="function"&&T(D)},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 _t([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return _t([E,y.onPointerUp])},get onClick(){return _t([i.onClick,y.onClick])},get onKeyDown(){return _t([k,y.onKeyDown])},get onMouseDown(){return _t([i.onMouseDown,y.onMouseDown])},get onFocus(){return _t([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},I,s))}})}function f0(e){const t=Se({closeOnSelect:!1},e),[n,r]=le(t,["checked","defaultChecked","onChange","onSelect"]),o=s0({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return f(vc,q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var ai={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>ai.next(e==="ltr"?"rtl":"ltr",t)},hd={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function g0(e){const t=Tn(),n=Gn(),r=zs(),{direction:o}=mr(),i=Se({id:t.generateId("trigger")},e),[s,a]=le(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=Ns(()=>n.triggerRef(),()=>"button"),l=ue(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);Q(dt(()=>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)},g=y=>{Te(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},h=y=>{Te(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},p=y=>{if(Te(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case hd.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Kw(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case hd.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case ai.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case ai.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{Te(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},m=y=>{Te(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return Q(()=>ee(n.registerTriggerId(s.id))),f(Hn,q({ref(y){var v=Xe(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 J(()=>!!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:g,onMouseOver:b,onClick:h,onKeyDown:p,onFocus:m,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function p0(e){let t;const n=Tn(),r=Gn(),o=zs(),i=a0(),{direction:s}=mr(),a=Se({id:n.generateId(`content-${kt()}`)},e),[u,c]=le(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(),g=x2({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);hc({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const h=x=>{if(vt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case ai.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case ai.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},b=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},m=x=>{Te(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(Te(x,u.onPointerMove),x.pointerType!=="mouse")return;const E=x.target,k=l!==x.clientX;vt(x.currentTarget,E)&&k&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};Q(()=>ee(r.registerContentId(u.id))),ee(()=>r.setContentRef(void 0));const v={ref:Xe(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return g.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:_t([u.onKeyDown,g.onKeyDown,h]),onMouseDown:_t([u.onMouseDown,g.onMouseDown]),onFocusIn:_t([u.onFocusIn,g.onFocusIn]),onFocusOut:_t([u.onFocusOut,g.onFocusOut]),onPointerEnter:m,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return f(V,{get when(){return r.contentPresent()},get children(){return f(V,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return f(Pe,q({as:"div"},()=>r.dataset(),v,c))},get children(){return f(Do.Positioner,{get children(){return f(Bs,q({get disableOutsidePointerEvents(){return J(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return en({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:p,onFocusOutside:b,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function eE(e){let t;const n=Tn(),r=Gn(),[o,i]=le(e,["ref"]);return bc({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),f(p0,q({ref(s){var a=Xe(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var h0=it();function tE(){const e=Je(h0);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function xc(e){const t=Tn(),n=Se({id:t.generateId(`group-${kt()}`)},e),[r,o]=$(),i={generateId:tn(()=>n.id),registerLabelId:ft(o)};return f(h0.Provider,{value:i,get children(){return f(Pe,q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function m0(e){const t=tE(),n=Se({id:t.generateId("label")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerLabelId(r.id))),f(Pe,q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function b0(e){const t=Gn(),n=Se({children:"▼"},e);return f(Pe,q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function y0(e){return f(vc,q({role:"menuitem",closeOnSelect:!0},e))}function v0(e){const t=yc(),n=Se({id:t.generateId("description")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerDescription(r.id))),f(Pe,q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function x0(e){const t=yc(),n=Se({id:t.generateId("indicator")},e),[r,o]=le(n,["forceMount"]);return f(V,{get when(){return r.forceMount||t.isChecked()},get children(){return f(Pe,q({as:"div"},()=>t.dataset(),o))}})}function w0(e){const t=yc(),n=Se({id:t.generateId("label")},e),[r,o]=le(n,["ref","id"]);return Q(()=>ee(t.registerLabel(r.id))),f(Pe,q({as:"div",ref(i){var s=Xe(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function _0(e){const t=Gn();return f(V,{get when(){return t.contentPresent()},get children(){return f(Es,e)}})}var E0=it();function nE(){const e=Je(E0);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function k0(e){const n=Tn().generateId(`radiogroup-${kt()}`),r=Se({id:n},e),[o,i]=le(r,["value","defaultValue","onChange","disabled"]),[s,a]=vi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return f(E0.Provider,{value:u,get children(){return f(xc,i)}})}function C0(e){const t=nE(),n=Se({closeOnSelect:!1},e),[r,o]=le(n,["value","onSelect"]);return f(vc,q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function rE(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 oE(e,t){return t?Dp([e.clientX,e.clientY],t):!1}function S0(e){const t=Tn(),n=Jp(),r=c0(),o=zs(),i=a0(),s=Se({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=le(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[g,h]=$(),[p,b]=$(),[m,y]=$(),[v,x]=$(),[E,k]=$(!0),[S,I]=$(u.placement),[C,D]=$([]),[T,A]=$([]),{DomCollectionProvider:P}=A2({items:T,onItemsChange:A}),L=Oo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:ae=>a.onOpenChange?.(ae)}),{present:R}=Kn({show:()=>t.forceMount()||L.isOpen(),element:()=>v()??null}),O=y2({selectionMode:"none",dataSource:T}),N=ae=>{k(ae),L.open()},z=(ae=!1)=>{L.close(),ae&&r&&r.close(!0)},B=ae=>{k(ae),L.toggle()},F=()=>{const ae=v();ae&&(gt(ae),O.selectionManager().setFocused(!0),O.selectionManager().setFocusedKey(void 0))},K=()=>{i!=null?setTimeout(()=>F()):F()},re=ae=>{D(X=>[...X,ae]);const we=r?.registerNestedMenu(ae);return()=>{D(X=>Ou(X,ae)),we?.()}},j=ae=>d===l?.side&&oE(ae,l?.area),se=ae=>{j(ae)&&ae.preventDefault()},Z=ae=>{j(ae)||K()},G=ae=>{j(ae)&&ae.preventDefault()};mc({isDisabled:()=>!(r==null&&L.isOpen()&&t.isModal()),targets:()=>[v(),...C()].filter(Boolean)}),Q(()=>{const ae=v();if(!ae||!r)return;const we=r.registerNestedMenu(ae);ee(()=>{we()})}),Q(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),...C()])}),Q(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(m()?.focus(),o.autoFocusMenu()&&N(!0)):z())}),Q(()=>{r!==void 0||o===void 0||L.isOpen()&&o.setValue(t.value())}),ee(()=>{r===void 0&&o?.unregisterMenu(t.value())});const me={dataset:ue(()=>({"data-expanded":L.isOpen()?"":void 0,"data-closed":L.isOpen()?void 0:""})),isOpen:L.isOpen,contentPresent:R,nestedMenus:C,currentPlacement:S,pointerGraceTimeoutId:()=>c,autoFocus:E,listState:()=>O,parentMenuContext:()=>r,triggerRef:m,contentRef:v,triggerId:g,contentId:p,setTriggerRef:y,setContentRef:x,open:N,close:z,toggle:B,focusContent:K,onItemEnter:se,onItemLeave:Z,onTriggerLeave:G,setPointerDir:ae=>d=ae,setPointerGraceTimeoutId:ae=>c=ae,setPointerGraceIntent:ae=>l=ae,registerNestedMenu:re,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:ft(h),registerContentId:ft(b)};return f(P,{get children(){return f(u0.Provider,{value:me,get children(){return f(V,{when:i===void 0,get fallback(){return u.children},get children(){return f(Do,q({anchorRef:m,contentRef:v,onCurrentPlacementChange:I},u))}})}})}})}function A0(e){const{direction:t}=mr();return f(S0,q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var iE={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function T0(e){const t=Gn(),n=Tn(),[r,o]=le(e,["onFocusOutside","onKeyDown"]),{direction:i}=mr();return f(p0,q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;vt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Te(l,r.onKeyDown);const d=vt(l.currentTarget,l.target),g=iE.close(i(),n.orientation()).includes(l.key),h=t.parentMenuContext()!=null;d&&g&&h&&(t.close(),gt(t.triggerRef()))}},o))}var md=["Enter"," "],sE={open:(e,t)=>e==="ltr"?[...md,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...md,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function D0(e){let t;const n=Tn(),r=Gn(),o=Se({id:n.generateId(`sub-trigger-${kt()}`)},e),[i,s]=le(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}=mr(),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()},g=()=>r.listState().collection(),h=()=>d().focusedKey()===l(),p=Xp({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=x=>{Te(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},m=x=>{if(Te(x,i.onPointerMove),x.pointerType!=="mouse")return;const E=r.parentMenuContext();if(E?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){E?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),E?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),gt(x.currentTarget),E?.listState().selectionManager().setFocused(!0),E?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(Te(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const E=r.parentMenuContext(),k=r.contentRef();if(k){E?.setPointerGraceIntent({area:rE(r.currentPlacement(),x,k),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(E?.pointerGraceTimeoutId());const S=window.setTimeout(()=>{E?.setPointerGraceIntent(null)},300);E?.setPointerGraceTimeoutId(S)}else{if(E?.onTriggerLeave(x),x.defaultPrevented)return;E?.setPointerGraceIntent(null)}E?.onItemLeave(x)},v=x=>{Te(x,i.onKeyDown),!x.repeat&&(i.disabled||sE.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(g().getFirstKey())))};return Q(()=>{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});ee(x)}),Q(dt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ee(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),Q(()=>ee(r.registerTriggerId(i.id))),ee(()=>{u()}),f(Pe,q({as:"div",ref(x){var E=Xe(k=>{r.setTriggerRef(k),t=k},i.ref);typeof E=="function"&&E(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return J(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return _t([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return _t([i.onPointerUp,p.onPointerUp])},get onClick(){return _t([b,p.onClick])},get onKeyDown(){return _t([v,p.onKeyDown])},get onMouseDown(){return _t([i.onMouseDown,p.onMouseDown])},get onFocus(){return _t([i.onFocus,p.onFocus])},onPointerMove:m,onPointerLeave:y},()=>r.dataset(),s))}function aE(e){const t=zs(),n=`menu-${kt()}`,r=Se({id:n,modal:!0},e),[o,i]=le(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Oo({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:tn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return f(d0.Provider,{value:a,get children(){return f(S0,q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var uE={};Sn(uE,{Root:()=>Us,Separator:()=>cE});function Us(e){let t;const n=Se({orientation:"horizontal"},e),[r,o]=le(n,["ref","orientation"]),i=Ns(()=>t,()=>"hr");return f(Pe,q({as:"hr",ref(s){var a=Xe(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 cE=Us,lE={};Sn(lE,{Arrow:()=>Hr,CheckboxItem:()=>f0,Content:()=>O0,DropdownMenu:()=>Gt,Group:()=>xc,GroupLabel:()=>m0,Icon:()=>b0,Item:()=>y0,ItemDescription:()=>v0,ItemIndicator:()=>x0,ItemLabel:()=>w0,Portal:()=>_0,RadioGroup:()=>k0,RadioItem:()=>C0,Root:()=>R0,Separator:()=>Us,Sub:()=>A0,SubContent:()=>T0,SubTrigger:()=>D0,Trigger:()=>g0});function O0(e){const t=Tn(),n=Gn(),[r,o]=le(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return f(eE,q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||gt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function R0(e){const t=`dropdownmenu-${kt()}`,n=Se({id:t},e);return f(aE,n)}var Gt=Object.assign(R0,{Arrow:Hr,CheckboxItem:f0,Content:O0,Group:xc,GroupLabel:m0,Icon:b0,Item:y0,ItemDescription:v0,ItemIndicator:x0,ItemLabel:w0,Portal:_0,RadioGroup:k0,RadioItem:C0,Separator:Us,Sub:A0,SubContent:T0,SubTrigger:D0,Trigger:g0});const wc=Gt.Trigger;Gt.Group;const bd=Gt.Sub;Gt.RadioGroup;const _c=e=>{const t=q({gutter:4,flip:!1},e);return f(Gt,t)},Ec=e=>{const[t,n]=le(e,["class"]);return f(Gt.Portal,{get children(){return f(Gt.Content,q({get class(){return ot("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))}})},rr=e=>{const[t,n]=le(e,["class","inset"]);return f(Gt.Item,q({get class(){return ot("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))},yd=e=>{const[t,n]=le(e,["class","children"]);return f(Gt.SubTrigger,q({get class(){return ot("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-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[J(()=>t.children),f(Xg,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},vd=e=>{const[t,n]=le(e,["class"]);return f(Gt.Portal,{get children(){return f(Gt.SubContent,q({get class(){return ot("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible: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",t.class)}},n))}})},Bu=e=>{const[t,n]=le(e,["class"]);return f(Gt.Separator,q({get class(){return ot("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var dE={};Sn(dE,{CloseButton:()=>N0,Content:()=>M0,Description:()=>L0,Dialog:()=>Un,Overlay:()=>$0,Portal:()=>P0,Root:()=>F0,Title:()=>B0,Trigger:()=>z0,useDialogContext:()=>br});var I0=it();function br(){const e=Je(I0);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function N0(e){const t=br(),[n,r]=le(e,["aria-label","onClick"]);return f(Hn,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Te(i,n.onClick),t.close()}},r))}function M0(e){let t;const n=br(),r=Se({id:n.generateId("content")},e),[o,i]=le(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=g=>{o.onPointerDownOutside?.(g),n.modal()&&g.detail.isContextMenu&&g.preventDefault()},c=g=>{o.onFocusOutside?.(g),n.modal()&&g.preventDefault()},l=g=>{o.onInteractOutside?.(g),!n.modal()&&(g.defaultPrevented||(s=!0,g.detail.originalEvent.type==="pointerdown"&&(a=!0)),vt(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&a&&g.preventDefault())},d=g=>{o.onCloseAutoFocus?.(g),n.modal()?(g.preventDefault(),gt(n.triggerRef())):(g.defaultPrevented||(s||gt(n.triggerRef()),g.preventDefault()),s=!1,a=!1)};return mc({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),bc({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hc({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),Q(()=>ee(n.registerContentId(i.id))),f(V,{get when(){return n.contentPresent()},get children(){return f(Bs,q({ref(g){var h=Xe(p=>{n.setContentRef(p),t=p},o.ref);typeof h=="function"&&h(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!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 L0(e){const t=br(),n=Se({id:t.generateId("description")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerDescriptionId(r.id))),f(Pe,q({as:"p",get id(){return r.id}},o))}function $0(e){const t=br(),[n,r]=le(e,["ref","style","onPointerDown"]),o=i=>{Te(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return f(V,{get when(){return t.overlayPresent()},get children(){return f(Pe,q({as:"div",ref(i){var s=Xe(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return en({"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 P0(e){const t=br();return f(V,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return f(Es,e)}})}var xd={dismiss:"Dismiss"};function F0(e){const t=`dialog-${kt()}`,n=Se({id:t,modal:!0,translations:xd},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,g]=$(),[h,p]=$(),b=Oo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),m=()=>n.forceMount||b.isOpen(),{present:y}=Kn({show:m,element:()=>c()??null}),{present:v}=Kn({show:m,element:()=>d()??null}),x={translations:()=>n.translations??xd,isOpen:b.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:h,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:g,overlayPresent:y,contentPresent:v,close:b.close,toggle:b.toggle,setTriggerRef:p,generateId:tn(()=>n.id),registerContentId:ft(o),registerTitleId:ft(s),registerDescriptionId:ft(u)};return f(I0.Provider,{value:x,get children(){return n.children}})}function B0(e){const t=br(),n=Se({id:t.generateId("title")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerTitleId(r.id))),f(Pe,q({as:"h2",get id(){return r.id}},o))}function z0(e){const t=br(),[n,r]=le(e,["ref","onClick"]);return f(Hn,q({ref(i){var s=Xe(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Te(i,n.onClick),t.toggle()}},r))}var Un=Object.assign(F0,{CloseButton:N0,Content:M0,Description:L0,Overlay:$0,Portal:P0,Title:B0,Trigger:z0}),fE=U('<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'),U0=U("<div>");const Zt=Un;Un.Trigger;const Lr=e=>{const[t,n]=le(e,["class","children"]);return f(Un.Portal,{get children(){return[f(Un.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"}),f(Un.Content,{get class(){return ot("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[J(()=>t.children),f(Un.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 fE()}})]}})]}})},$r=e=>{const[t,n]=le(e,["class"]);return f(Un.Title,q({get class(){return ot("text-lg font-semibold text-foreground",t.class)}},n))},kc=e=>{const[t,n]=le(e,["class"]);return f(Un.Description,q({get class(){return ot(" text-muted-foreground",t.class)}},n))},Pr=e=>{const[t,n]=le(e,["class"]);return(()=>{var r=U0();return qn(r,q({get class(){return ot("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Fr=e=>{const[t,n]=le(e,["class"]);return(()=>{var r=U0();return qn(r,q({get class(){return ot("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var gE={};Sn(gE,{CloseButton:()=>q0,Description:()=>H0,List:()=>G0,ProgressFill:()=>V0,ProgressTrack:()=>W0,Region:()=>Y0,Root:()=>Z0,Title:()=>X0,Toast:()=>Tr,toaster:()=>ui,useToastContext:()=>xi});var K0=it();function xi(){const e=Je(K0);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function q0(e){const t=xi(),[n,r]=le(e,["aria-label","onClick"]);return f(Hn,q({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Te(i,n.onClick),t.close()}},r))}function H0(e){const t=xi(),n=Se({id:t.generateId("description")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerDescriptionId(r.id))),f(Pe,q({as:"div",get id(){return r.id}},o))}var j0=it();function Cc(){const e=Je(j0);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function G0(e){let t;const n=Cc(),[r,o]=le(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{Te(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{Te(c,r.onFocusOut),vt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{Te(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{Te(c,r.onPointerLeave),vt(t,Mt(t).activeElement)||n.resumeAllTimer()};return Q(dt([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const d=Mt(c),g=h=>{l.every(b=>h[b]||h.code===b)&&gt(c)};d.addEventListener("keydown",g),ee(()=>d.removeEventListener("keydown",g))})),Q(()=>{if(!n.pauseOnPageIdle())return;const c=nc(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),ee(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),f(Pe,q({as:"ol",ref(c){var l=Xe(d=>t=d,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return f(nt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function V0(e){const t=Cc(),n=xi(),[r,o]=le(e,["style"]),[i,s]=$(100);let a=0;return Q(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});ee(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),f(Pe,q({as:"div",get style(){return en({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function W0(e){return f(Pe,q({as:"div","aria-hidden":"true",role:"presentation"},e))}var[Sc,wi]=w1({toasts:[]});function pE(e){wi("toasts",t=>[...t,e])}function hE(e){return Sc.toasts.find(t=>t.id===e)}function mE(e,t){const n=Sc.toasts.findIndex(r=>r.id===e);n!==-1&&wi("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function bE(e){wi("toasts",t=>t.id===e,"dismiss",!0)}function yE(e){wi("toasts",t=>t.filter(n=>n.id!==e))}function vE(){wi("toasts",[])}var Br={toasts:()=>Sc.toasts,add:pE,get:hE,update:mE,dismiss:bE,remove:yE,clear:vE},wd="{hotkey}",xE={close:"Close"},wE={notifications:e=>`Notifications (${e})`};function Y0(e){const t=Se({id:`toast-region-${kt()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:wE},e),[n,r]=le(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ue(()=>Br.toasts().filter(g=>g.region===n.regionId&&g.dismiss===!1).slice(0,n.limit)),[i,s]=$(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(wd)).replace(wd,u()),l=()=>({[ii]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:tn(()=>r.id)};return f(j0.Provider,{value:d,get children(){return f(Pe,q({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return en({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var _E="toast.swipeStart",EE="toast.swipeMove",kE="toast.swipeCancel",CE="toast.swipeEnd";function Z0(e){const t=Cc(),n=Se({id:`toast-${kt()}`,priority:"high",translations:xE},e),[r,o]=le(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=$(!0),[a,u]=$(),[c,l]=$(),[d,g]=$(!0),[h,p]=$(),{present:b}=Kn({show:i,element:()=>h()??null}),m=ue(()=>r.duration||t.duration());let y,v=0,x=m(),E=null,k=null;const S=()=>{s(!1),g(!0)},I=()=>{Br.remove(r.toastId)},C=N=>{!N||r.persistent||(window.clearTimeout(y),v=new Date().getTime(),y=window.setTimeout(S,N))},D=()=>{C(x),r.onResume?.()},T=()=>{const N=new Date().getTime()-v;x=x-N,window.clearTimeout(y),r.onPause?.()},A=N=>{Te(N,r.onKeyDown),N.key==="Escape"&&(r.onEscapeKeyDown?.(N),N.defaultPrevented||S())},P=N=>{Te(N,r.onPointerDown),N.button===0&&(E={x:N.clientX,y:N.clientY})},L=N=>{if(Te(N,r.onPointerMove),!E)return;const z=N.clientX-E.x,B=N.clientY-E.y,F=!!k,K=["left","right"].includes(t.swipeDirection()),re=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,j=K?re(0,z):0,se=K?0:re(0,B),Z=N.pointerType==="touch"?10:2,G={x:j,y:se},ce={originalEvent:N,delta:G};if(F){k=G,Ui(EE,r.onSwipeMove,ce);const{x:me,y:ae}=G;N.currentTarget.setAttribute("data-swipe","move"),N.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${me}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${ae}px`)}else _d(G,t.swipeDirection(),Z)?(k=G,Ui(_E,r.onSwipeStart,ce),N.currentTarget.setAttribute("data-swipe","start"),N.target.setPointerCapture(N.pointerId)):(Math.abs(z)>Z||Math.abs(B)>Z)&&(E=null)},R=N=>{Te(N,r.onPointerUp);const z=k,B=N.target;if(B.hasPointerCapture(N.pointerId)&&B.releasePointerCapture(N.pointerId),k=null,E=null,z){const F=N.currentTarget,K={originalEvent:N,delta:z};if(_d(z,t.swipeDirection(),t.swipeThreshold())){Ui(CE,r.onSwipeEnd,K);const{x:re,y:j}=z;N.currentTarget.setAttribute("data-swipe","end"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${re}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${j}px`),S()}else Ui(kE,r.onSwipeCancel,K),N.currentTarget.setAttribute("data-swipe","cancel"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");F.addEventListener("click",re=>re.preventDefault(),{once:!0})}};Xt(()=>{t.toasts().find(N=>N.id===r.toastId&&N.update)&&g(!1)}),Q(dt(()=>t.isPaused(),N=>{N?T():D()},{defer:!0})),Q(dt([i,m],([N,z])=>{N&&!t.isPaused()&&C(z)})),Q(dt(()=>Br.get(r.toastId)?.dismiss,N=>N&&S())),Q(dt(()=>b(),N=>!N&&I()));const O={translations:()=>r.translations,close:S,duration:m,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>v,generateId:tn(()=>o.id),registerTitleId:ft(u),registerDescriptionId:ft(l)};return f(V,{get when(){return b()},get children(){return f(K0.Provider,{value:O,get children(){return f(Pe,q({as:"li",ref(N){var z=Xe(p,r.ref);typeof z=="function"&&z(N)},role:"status",tabIndex:0,get style(){return en({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:A,onPointerDown:P,onPointerMove:L,onPointerUp:R},o))}})}})}function _d(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function Ui(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function X0(e){const t=xi(),n=Se({id:t.generateId("title")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerTitleId(r.id))),f(Pe,q({as:"div",get id(){return r.id}},o))}var SE=0;function Q0(e,t){const n=SE++;return Br.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function zu(e,t){Br.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function AE(e,t,n){const r=Q0(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(tc(e)?e():e).then(o=>zu(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>zu(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function TE(e){return Br.dismiss(e),e}function DE(){Br.clear()}var ui={show:Q0,update:zu,promise:AE,dismiss:TE,clear:DE},Tr=Object.assign(Z0,{CloseButton:q0,Description:H0,List:G0,ProgressFill:V0,ProgressTrack:W0,Region:Y0,Title:X0,toaster:ui}),OE={};Sn(OE,{Arrow:()=>Hr,Content:()=>eh,Portal:()=>th,Root:()=>nh,Tooltip:()=>ci,Trigger:()=>rh,useTooltipContext:()=>Ks});var J0=it();function Ks(){const e=Je(J0);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function eh(e){const t=Ks(),n=Se({id:t.generateId("content")},e),[r,o]=le(n,["ref","style"]);return Q(()=>ee(t.registerContentId(o.id))),f(V,{get when(){return t.contentPresent()},get children(){return f(Do.Positioner,{get children(){return f(Bs,q({ref(i){var s=Xe(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return en({"--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 th(e){const t=Ks();return f(V,{get when(){return t.contentPresent()},get children(){return f(Es,e)}})}function RE(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={},IE=0,no=!1,$n,zo,ro;function nh(e){const t=`tooltip-${kt()}`,n=`${++IE}`,r=Se({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=le(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=$(),[c,l]=$(),[d,g]=$(),[h,p]=$(i.placement),b=Oo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:R=>o.onOpenChange?.(R)}),{present:m}=Kn({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{Cr[n]=x},v=()=>{for(const R in Cr)R!==n&&(Cr[R](!0),delete Cr[R])},x=(R=!1)=>{R||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($n),$n=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(ro=window.setTimeout(()=>{window.clearTimeout(ro),ro=void 0},o.skipDelayDuration)),no&&(window.clearTimeout(zo),zo=window.setTimeout(()=>{delete Cr[n],zo=void 0,no=!1},o.closeDelay))},E=()=>{clearTimeout(s),s=void 0,v(),y(),no=!0,b.open(),window.clearTimeout($n),$n=void 0,window.clearTimeout(zo),zo=void 0,window.clearTimeout(ro),ro=void 0},k=()=>{v(),y(),!b.isOpen()&&!$n&&!no?$n=window.setTimeout(()=>{$n=void 0,no=!0,E()},o.openDelay):b.isOpen()||E()},S=(R=!1)=>{!R&&o.openDelay&&o.openDelay>0&&!s&&!ro?k():E()},I=()=>{window.clearTimeout($n),$n=void 0,no=!1},C=()=>{window.clearTimeout(s),s=void 0},D=R=>vt(c(),R)||vt(d(),R),T=R=>{const O=c(),N=d();if(!(!O||!N))return RE(R,O,N)},A=R=>{const O=R.target;if(D(O)){C();return}if(!o.ignoreSafeArea){const N=T(h());if(N&&Dp(Uw(R),N)){C();return}}s||x()};Q(()=>{if(!b.isOpen())return;const R=Mt();R.addEventListener("pointermove",A,!0),ee(()=>{R.removeEventListener("pointermove",A,!0)})}),Q(()=>{const R=c();if(!R||!b.isOpen())return;const O=z=>{const B=z.target;vt(B,R)&&x(!0)},N=nc();N.addEventListener("scroll",O,{capture:!0}),ee(()=>{N.removeEventListener("scroll",O,{capture:!0})})}),ee(()=>{clearTimeout(s),Cr[n]&&delete Cr[n]});const L={dataset:ue(()=>({"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:m,openTooltip:S,hideTooltip:x,cancelOpening:I,generateId:tn(()=>r.id),registerContentId:ft(u),isTargetOnTooltip:D,setTriggerRef:l,setContentRef:g};return f(J0.Provider,{value:L,get children(){return f(Do,q({anchorRef:c,contentRef:d,onCurrentPlacementChange:R=>{p(R),o.onCurrentPlacementChange?.(R)}},i))}})}function rh(e){let t;const n=Ks(),[r,o]=le(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=>{Te(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},g=y=>{Te(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},h=y=>{Te(y,r.onPointerDown),i=!0,Mt(t).addEventListener("pointerup",u,{once:!0})},p=y=>{Te(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{Te(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},m=y=>{Te(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ee(()=>{Mt(t).removeEventListener("pointerup",u)}),f(Pe,q({as:"button",ref(y){var v=Xe(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return J(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:h,onClick:p,onFocus:b,onBlur:m},()=>n.dataset(),o))}var ci=Object.assign(nh,{Arrow:Hr,Content:eh,Portal:th,Trigger:rh}),oh=["id","name","validationState","required","disabled","readOnly"];function ih(e){const t=`form-control-${kt()}`,n=Se({id:t},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),d=(b,m,y)=>{const v=y!=null||r()!=null;return[y,r(),v&&m!=null?b:void 0].filter(Boolean).join(" ")||void 0},g=b=>[a(),c(),b].filter(Boolean).join(" ")||void 0,h=ue(()=>({"data-valid":Y(n.validationState)==="valid"?"":void 0,"data-invalid":Y(n.validationState)==="invalid"?"":void 0,"data-required":Y(n.required)?"":void 0,"data-disabled":Y(n.disabled)?"":void 0,"data-readonly":Y(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>Y(n.name)??Y(n.id),dataset:h,validationState:()=>Y(n.validationState),isRequired:()=>Y(n.required),isDisabled:()=>Y(n.disabled),isReadOnly:()=>Y(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:g,generateId:tn(()=>Y(n.id)),registerLabel:ft(o),registerField:ft(s),registerDescription:ft(u),registerErrorMessage:ft(l)}}}var Ac=it();function Vn(){const e=Je(Ac);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Tc(e){const t=Vn(),n=Se({id:t.generateId("description")},e);return Q(()=>ee(t.registerDescription(n.id))),f(Pe,q({as:"div"},()=>t.dataset(),n))}var NE=["id","aria-label","aria-labelledby","aria-describedby"];function ME(e){const t=Vn(),n=Se({id:t.generateId("field")},e);return Q(()=>ee(t.registerField(Y(n.id)))),{fieldProps:{id:()=>Y(n.id),ariaLabel:()=>Y(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(Y(n.id),Y(n["aria-label"]),Y(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(Y(n["aria-describedby"]))}}}function sh(e){let t;const n=Vn(),r=Se({id:n.generateId("label")},e),[o,i]=le(r,["ref"]),s=Ns(()=>t,()=>"label");return Q(()=>ee(n.registerLabel(i.id))),f(Pe,q({as:"label",ref(a){var u=Xe(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return J(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function ah(e,t){Q(dt(e,n=>{if(n==null)return;const r=LE(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ee(()=>{r.removeEventListener("reset",t)}))}))}function LE(e){return $E(e)?e.form:e.closest("form")}function $E(e){return e.matches("textarea, input, select, button")}function Dc(e){const t=Vn(),n=Se({id:t.generateId("error-message")},e),[r,o]=le(n,["forceMount"]),i=()=>t.validationState()==="invalid";return Q(()=>{i()&&ee(t.registerErrorMessage(o.id))}),f(V,{get when(){return r.forceMount||i()},get children(){return f(Pe,q({as:"div"},()=>t.dataset(),o))}})}var PE={};Sn(PE,{Anchor:()=>ch,Arrow:()=>Hr,CloseButton:()=>lh,Content:()=>dh,Description:()=>fh,Popover:()=>ar,Portal:()=>gh,Root:()=>ph,Title:()=>hh,Trigger:()=>mh,usePopoverContext:()=>yr});var uh=it();function yr(){const e=Je(uh);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function ch(e){const t=yr(),[n,r]=le(e,["ref"]);return f(Pe,q({as:"div",ref(o){var i=Xe(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function lh(e){const t=yr(),[n,r]=le(e,["aria-label","onClick"]);return f(Hn,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Te(i,n.onClick),t.close()}},()=>t.dataset(),r))}function dh(e){let t;const n=yr(),r=Se({id:n.generateId("content")},e),[o,i]=le(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=h=>{o.onCloseAutoFocus?.(h),n.isModal()?(h.preventDefault(),s||gt(n.triggerRef())):(h.defaultPrevented||(a||gt(n.triggerRef()),h.preventDefault()),a=!1,u=!1)},l=h=>{o.onPointerDownOutside?.(h),n.isModal()&&(s=h.detail.isContextMenu)},d=h=>{o.onFocusOutside?.(h),n.isOpen()&&n.isModal()&&h.preventDefault()},g=h=>{o.onInteractOutside?.(h),!n.isModal()&&(h.defaultPrevented||(a=!0,h.detail.originalEvent.type==="pointerdown"&&(u=!0)),vt(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&u&&h.preventDefault())};return mc({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),bc({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),hc({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),Q(()=>ee(n.registerContentId(i.id))),f(V,{get when(){return n.contentPresent()},get children(){return f(Do.Positioner,{get children(){return f(Bs,q({ref(h){var p=Xe(b=>{n.setContentRef(b),t=b},o.ref);typeof p=="function"&&p(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return en({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:g,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function fh(e){const t=yr(),n=Se({id:t.generateId("description")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerDescriptionId(r.id))),f(Pe,q({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function gh(e){const t=yr();return f(V,{get when(){return t.contentPresent()},get children(){return f(Es,e)}})}var Ed={dismiss:"Dismiss"};function ph(e){const t=`popover-${kt()}`,n=Se({id:t,modal:!1,translations:Ed},e),[r,o]=le(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,g]=$(),[h,p]=$(),[b,m]=$(),y=Oo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:S=>r.onOpenChange?.(S)}),v=()=>r.anchorRef?.()??i()??a(),{present:x}=Kn({show:()=>r.forceMount||y.isOpen(),element:()=>c()??null}),E=ue(()=>({"data-expanded":y.isOpen()?"":void 0,"data-closed":y.isOpen()?void 0:""})),k={translations:()=>r.translations??Ed,dataset:E,isOpen:y.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??k.isModal(),contentPresent:x,triggerRef:a,contentId:d,titleId:h,descriptionId:b,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:y.close,toggle:y.toggle,generateId:tn(()=>r.id),registerContentId:ft(g),registerTitleId:ft(p),registerDescriptionId:ft(m)};return f(uh.Provider,{value:k,get children(){return f(Do,q({anchorRef:v,contentRef:c},o))}})}function hh(e){const t=yr(),n=Se({id:t.generateId("title")},e),[r,o]=le(n,["id"]);return Q(()=>ee(t.registerTitleId(r.id))),f(Pe,q({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function mh(e){const t=yr(),[n,r]=le(e,["ref","onClick","onPointerDown"]);return f(Hn,q({ref(s){var a=Xe(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Te(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Te(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var ar=Object.assign(ph,{Anchor:ch,Arrow:Hr,CloseButton:lh,Content:dh,Description:fh,Portal:gh,Title:hh,Trigger:mh}),FE={};Sn(FE,{Description:()=>Tc,ErrorMessage:()=>Dc,Item:()=>vh,ItemControl:()=>xh,ItemDescription:()=>wh,ItemIndicator:()=>_h,ItemInput:()=>Eh,ItemLabel:()=>kh,Label:()=>Ch,RadioGroup:()=>fn,Root:()=>Sh,useRadioGroupContext:()=>Oc});var bh=it();function Oc(){const e=Je(bh);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var yh=it();function _i(){const e=Je(yh);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function vh(e){const t=Vn(),n=Oc(),r=`${t.generateId("item")}-${kt()}`,o=Se({id:r},e),[i,s]=le(o,["value","disabled","onPointerDown"]),[a,u]=$(),[c,l]=$(),[d,g]=$(),[h,p]=$(),[b,m]=$(!1),y=ue(()=>n.isDefaultValue(i.value)),v=ue(()=>n.isSelectedValue(i.value)),x=ue(()=>i.disabled||t.isDisabled()||!1),E=I=>{Te(I,i.onPointerDown),b()&&I.preventDefault()},k=ue(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":v()?"":void 0})),S={value:()=>i.value,dataset:k,isDefault:y,isSelected:v,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(i.value),generateId:tn(()=>s.id),registerInput:ft(u),registerLabel:ft(l),registerDescription:ft(g),setIsFocused:m,setInputRef:p};return f(yh.Provider,{value:S,get children(){return f(Pe,q({as:"div",role:"group",onPointerDown:E},k,s))}})}function xh(e){const t=_i(),n=Se({id:t.generateId("control")},e),[r,o]=le(n,["onClick","onKeyDown"]);return f(Pe,q({as:"div",onClick:a=>{Te(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Te(a,r.onKeyDown),a.key===Rs.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function wh(e){const t=_i(),n=Se({id:t.generateId("description")},e);return Q(()=>ee(t.registerDescription(n.id))),f(Pe,q({as:"div"},()=>t.dataset(),n))}function _h(e){const t=_i(),n=Se({id:t.generateId("indicator")},e),[r,o]=le(n,["ref","forceMount"]),[i,s]=$(),{present:a}=Kn({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return f(V,{get when(){return a()},get children(){return f(Pe,q({as:"div",ref(u){var c=Xe(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function Eh(e){const t=Vn(),n=Oc(),r=_i(),o=Se({id:r.generateId("input")},e),[i,s]=le(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=p=>{if(Te(p,i.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const b=p.target;b.checked=r.isSelected()}l(!1)},g=p=>{Te(p,i.onFocus),r.setIsFocused(!0)},h=p=>{Te(p,i.onBlur),r.setIsFocused(!1)};return Q(dt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[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})),Q(()=>ee(r.registerInput(s.id))),f(Pe,q({as:"input",ref(p){var b=Xe(r.setInputRef,i.ref);typeof b=="function"&&b(p)},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 en({...sc},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:g,onBlur:h},()=>r.dataset(),s))}function kh(e){const t=_i(),n=Se({id:t.generateId("label")},e);return Q(()=>ee(t.registerLabel(n.id))),f(Pe,q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function Ch(e){return f(sh,q({as:"span"},e))}function Sh(e){let t;const n=`radiogroup-${kt()}`,r=Se({id:n,orientation:"vertical"},e),[o,i,s]=le(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],oh),[a,u]=vi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:m=>o.onChange?.(m)}),{formControlContext:c}=ih(i);ah(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(Y(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),g=m=>m===e.defaultValue,h=m=>m===a(),b={ariaDescribedBy:d,isDefaultValue:g,isSelectedValue:h,setSelectedValue:m=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(m),t))for(const y of t.querySelectorAll("[type='radio']")){const v=y;v.checked=h(v.value)}}};return f(Ac.Provider,{value:c,get children(){return f(bh.Provider,{value:b,get children(){return f(Pe,q({as:"div",ref(m){var y=Xe(v=>t=v,o.ref);typeof y=="function"&&y(m)},role:"radiogroup",get id(){return Y(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 fn=Object.assign(Sh,{Description:Tc,ErrorMessage:Dc,Item:vh,ItemControl:xh,ItemDescription:wh,ItemIndicator:_h,ItemInput:Eh,ItemLabel:kh,Label:Ch}),BE={};Sn(BE,{Collapsible:()=>qs,Content:()=>Th,Root:()=>Dh,Trigger:()=>Oh,useCollapsibleContext:()=>Rc});var Ah=it();function Rc(){const e=Je(Ah);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Th(e){const[t,n]=$(),r=Rc(),o=Se({id:r.generateId("content")},e),[i,s]=le(o,["ref","id","style"]),{present:a}=Kn({show:r.shouldMount,element:()=>t()??null}),[u,c]=$(0),[l,d]=$(0);let h=r.isOpen()||a();return Xt(()=>{const p=requestAnimationFrame(()=>{h=!1});ee(()=>{cancelAnimationFrame(p)})}),Q(dt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),h||(t().style.transitionDuration="",t().style.animationName="")})),Q(dt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),Q(()=>ee(r.registerContentId(i.id))),f(V,{get when(){return a()},get children(){return f(Pe,q({as:"div",ref(p){var b=Xe(n,i.ref);typeof b=="function"&&b(p)},get id(){return i.id},get style(){return en({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function Dh(e){const t=`collapsible-${kt()}`,n=Se({id:t},e),[r,o]=le(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=$(),a=Oo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ue(()=>({"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:tn(()=>o.id),registerContentId:ft(s)};return f(Ah.Provider,{value:c,get children(){return f(Pe,q({as:"div"},u,o))}})}function Oh(e){const t=Rc(),[n,r]=le(e,["onClick"]);return f(Hn,q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Te(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var qs=Object.assign(Dh,{Content:Th,Trigger:Oh}),zE={};Sn(zE,{Checkbox:()=>ur,Control:()=>Ih,Description:()=>Nh,ErrorMessage:()=>Mh,Indicator:()=>Lh,Input:()=>$h,Label:()=>Ph,Root:()=>Fh,useCheckboxContext:()=>jr});var Rh=it();function jr(){const e=Je(Rh);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function Ih(e){const t=Vn(),n=jr(),r=Se({id:n.generateId("control")},e),[o,i]=le(r,["onClick","onKeyDown"]);return f(Pe,q({as:"div",onClick:u=>{Te(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Te(u,o.onKeyDown),u.key===Rs.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function Nh(e){const t=jr();return f(Tc,q(()=>t.dataset(),e))}function Mh(e){const t=jr();return f(Dc,q(()=>t.dataset(),e))}function Lh(e){const t=Vn(),n=jr(),[r,o]=$(),i=Se({id:n.generateId("indicator")},e),[s,a]=le(i,["ref","forceMount"]),{present:u}=Kn({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return f(V,{get when(){return u()},get children(){return f(Pe,q({as:"div",ref(c){var l=Xe(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function $h(e){let t;const n=Vn(),r=jr(),o=Se({id:r.generateId("input")},e),[i,s,a]=le(o,["ref","style","onChange","onFocus","onBlur"],NE),{fieldProps:u}=ME(s),[c,l]=$(!1),d=p=>{if(Te(p,i.onChange),p.stopPropagation(),!c()){const b=p.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},g=p=>{Te(p,i.onFocus),r.setIsFocused(!0)},h=p=>{Te(p,i.onBlur),r.setIsFocused(!1)};return Q(dt([()=>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})),Q(dt([()=>t,()=>r.indeterminate(),()=>r.checked()],([p,b])=>{p&&(p.indeterminate=b)})),f(Pe,q({as:"input",ref(p){var b=Xe(m=>{r.setInputRef(m),t=m},i.ref);typeof b=="function"&&b(p)},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 en(sc,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:g,onBlur:h},()=>n.dataset(),()=>r.dataset(),a))}function Ph(e){const t=jr();return f(sh,q(()=>t.dataset(),e))}function Fh(e){let t;const n=`checkbox-${kt()}`,r=Se({value:"on",id:n},e),[o,i,s]=le(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],oh),[a,u]=$(),[c,l]=$(!1),{formControlContext:d}=ih(i),g=s0({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:m=>o.onChange?.(m),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});ah(()=>t,()=>g.setIsSelected(o.defaultChecked??!1));const h=m=>{Te(m,o.onPointerDown),c()&&m.preventDefault()},p=ue(()=>({"data-checked":g.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),b={value:()=>o.value,dataset:p,checked:()=>g.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:tn(()=>Y(i.id)),toggle:()=>g.toggle(),setIsChecked:m=>g.setIsSelected(m),setIsFocused:l,setInputRef:u};return f(Ac.Provider,{value:d,get children(){return f(Rh.Provider,{value:b,get children(){return f(Pe,q({as:"div",ref(m){var y=Xe(v=>t=v,o.ref);typeof y=="function"&&y(m)},role:"group",get id(){return Y(i.id)},onPointerDown:h},()=>d.dataset(),p,s,{get children(){return f(UE,{state:b,get children(){return o.children}})}}))}})}})}function UE(e){const t=vs(()=>{const n=e.children;return tc(n)?n(e.state):n});return J(t)}var ur=Object.assign(Fh,{Control:Ih,Description:Nh,ErrorMessage:Mh,Indicator:Lh,Input:$h,Label:Ph}),KE=U("<div>"),qE=U("<div class=min-w-0>");const HE={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},jE={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function GE(e){switch(e.type){case"success":return f(zy,{class:"h-4 w-4"});case"info":return f(ov,{class:"h-4 w-4"});case"warning":case"error":return f(ix,{class:"h-4 w-4"});case"loading":return f(ir,{class:"h-4 w-4 animate-spin"});default:return null}}function VE(e){return f(Tr,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return ot("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=KE();return w(t,f(GE,{get type(){return e.type}})),Le(()=>St(t,ot("shrink-0 self-center",jE[e.type]))),t})(),(()=>{var t=qE();return w(t,f(Tr.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),w(t,(()=>{var n=J(()=>!!e.description);return()=>n()?f(Tr.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),f(Tr.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return _("common.close")},get children(){return f(Ur,{class:"h-4 w-4"})}})]}})}function oo(e,t,n={}){return ui.show(r=>f(VE,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const xt=Object.assign((e,t)=>oo("default",e,t),{success:(e,t)=>oo("success",e,t),info:(e,t)=>oo("info",e,t),warning:(e,t)=>oo("warning",e,t),error:(e,t)=>oo("error",e,t),loading:(e,t)=>oo("loading",e,t),dismiss:e=>{if(typeof e=="number")return ui.dismiss(e);ui.clear()}}),WE=e=>{const[t,n]=le(e,["position","duration","visibleToasts","class"]);return f(Tr.Region,q({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return ot("!pointer-events-none fixed z-50 flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",HE[t.position??"bottom-right"],t.class)}},n,{get children(){return f(Tr.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};var YE=U('<p class="m-0 text-destructive">'),ZE=U('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),XE=U('<div class="flex items-center">'),QE=U('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),JE=U('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),ek=U('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const tk=e=>{const t=Co(),[n,{refetch:r}]=jt(e.projectId,y=>y?xe.listCommands(y):Promise.resolve([])),[o,i]=$(!1),[s,a]=$(""),[u,c]=$(""),[l,d]=$(!1),[g,h]=$(null);async function p(y){const v=e.projectId();if(v)try{const x=await xe.runCommand(v,y.id);xt.success(_("commands.started")),e.onRunStarted?.(),t(At(`commands/${encodeURIComponent(x.runId)}`))}catch(x){xt.error(x.message)}}async function b(y){const v=e.projectId();if(v)try{await xe.deleteCommand(v,y.id),await r()}catch(x){xt.error(x.message)}}async function m(y){y.preventDefault();const v=e.projectId();if(!v)return;const x=s().trim(),E=u().trim();if(!(!x||!E)){d(!0),h(null);try{await xe.createCommand(v,{name:x,cli:E}),a(""),c(""),i(!1),await r()}catch(k){h(k.message)}finally{d(!1)}}}return(()=>{var y=XE();return w(y,f(_c,{placement:"bottom-start",get children(){return[f(wc,{as:ke,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("commands.menuTitle")},get children(){return f(ex,{class:"h-4 w-4"})}}),f(Ec,{class:"min-w-56",get children(){return[f(V,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var v=QE();return w(v,()=>_("commands.empty")),v})()},get children(){return f(nt,{get each(){return n()??[]},children:v=>f(rr,{class:"group flex items-center justify-between gap-2",onSelect:()=>void p(v),get children(){return[(()=>{var x=JE(),E=x.firstChild,k=E.nextSibling;return w(E,()=>v.name),w(k,()=>v.cli),x})(),(()=>{var x=ek();return x.$$click=E=>{E.stopPropagation(),E.preventDefault(),b(v)},w(x,f(tp,{class:"h-3.5 w-3.5 text-destructive"})),Le(()=>We(x,"title",_("commands.deleteDef"))),x})()]}})})}}),f(Bu,{}),f(rr,{onSelect:()=>i(!0),get children(){return[f(Ss,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.add"))]}})]}})]}}),null),w(y,f(Zt,{get open(){return o()},onOpenChange:v=>{i(v),v||h(null)},get children(){return f(Lr,{class:"max-w-md",get children(){return[f(Pr,{get children(){return f($r,{get children(){return _("commands.addTitle")}})}}),(()=>{var v=ZE(),x=v.firstChild,E=x.nextSibling;return v.addEventListener("submit",k=>void m(k)),w(x,()=>_("commands.name"),null),w(x,f(Rr,{id:"command-name",get value(){return s()},get placeholder(){return _("commands.namePlaceholder")},onInput:k=>a(k.currentTarget.value),get disabled(){return l()}}),null),w(E,()=>_("commands.cli"),null),w(E,f(Rr,{id:"command-cli",get value(){return u()},get placeholder(){return _("commands.cliPlaceholder")},onInput:k=>c(k.currentTarget.value),get disabled(){return l()}}),null),w(v,f(V,{get when(){return g()},get children(){var k=YE();return w(k,g),k}}),null),w(v,f(Fr,{get children(){return[f(ke,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return _("common.cancel")}}),f(ke,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return J(()=>!!l())()?_("common.submitting"):_("commands.submit")}})]}}),null),v})()]}})}}),null),y})()};Jt(["click"]);var nk=U("<span>");const rk={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},Bh=e=>(()=>{var t=nk();return w(t,()=>_(`commands.status.${e.status}`)),Le(()=>St(t,`shrink-0 text-xs font-medium ${rk[e.status]} ${e.class??""}`)),t})();var ok=U('<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');const zh=ar.Trigger,ik=ar.Title;ar.Description;const Uh=e=>{const t=q({gutter:4,flip:!1},e);return f(ar,t)},Kh=e=>{const[t,n]=le(e,["class","children"]);return f(ar.Portal,{get children(){return f(ar.Content,q({get class(){return ot("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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",t.class)}},n,{get children(){return[J(()=>t.children),f(ar.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 ok()}})]}}))}})};var sk=U('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),ak=U('<span class="truncate font-medium">'),uk=U('<span class="truncate font-mono text-xs text-muted-foreground">'),ck=U('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),lk=U('<p class="m-0 text-sm font-medium">'),dk=U('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),fk=U('<div class="flex justify-end">'),gk=U('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');function qh(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}const pk=e=>{const[t,{refetch:n,mutate:r}]=jt(e.projectId,h=>h?xe.listCommandRuns(h):Promise.resolve([])),[o,i]=$(Date.now()),[s,a]=$(null),[u,c]=$(null),l=setInterval(()=>i(Date.now()),1e3);ee(()=>clearInterval(l)),Q(()=>{e.revision?.(),n()}),Q(()=>{const h=e.projectId();if(!h)return;const p=Ex(h,b=>r(b));ee(p)});async function d(h){const p=e.projectId();if(p){a(h.runId);try{await xe.clearCommandRun(p,h.runId),await n()}catch(b){xt.error(b.message)}finally{a(null)}}}async function g(h){const p=e.projectId();if(p){c(h.runId);try{await xe.clearCommandRun(p,h.runId),await xe.runCommand(p,h.commandId),xt.success(_("commands.restarted")),await n()}catch(b){xt.error(b.message)}finally{c(null)}}}return f(V,{get when(){return(t()??[]).length>0},get children(){var h=sk(),p=h.firstChild,b=p.nextSibling;return w(p,()=>_("commands.running")),w(b,f(nt,{get each(){return t()??[]},children:m=>(()=>{var y=gk(),v=y.firstChild;return w(y,f(kn,{get href(){return At(`commands/${encodeURIComponent(m.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[f(Bh,{get status(){return m.status}}),(()=>{var x=ak();return w(x,()=>m.name),x})(),(()=>{var x=uk();return w(x,()=>m.cli),x})(),(()=>{var x=ck();return w(x,()=>qh(m.startedAt,m.endedAt,o())),x})()]}}),v),w(v,f(ke,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.restart")},get disabled(){return u()===m.runId||s()===m.runId},onClick:()=>void g(m),get children(){return f(Fv,{class:"h-4 w-4"})}}),null),w(v,f(Uh,{get children(){return[f(zh,{as:ke,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.clear")},get disabled(){return u()===m.runId},get children(){return f(Ur,{class:"h-4 w-4"})}}),f(Kh,{class:"w-72",get children(){return[(()=>{var x=lk();return w(x,()=>_("commands.clearTitle")),x})(),(()=>{var x=dk();return w(x,()=>_("commands.clearDescription")),x})(),(()=>{var x=fk();return w(x,f(ke,{variant:"destructive",size:"sm",get disabled(){return s()===m.runId},onClick:()=>void d(m),get children(){return J(()=>s()===m.runId)()?_("common.deleting"):_("commands.clear")}})),x})()]}})]}}),null),y})()})),h}})};var hk=U('<span class=" text-muted-foreground">'),mk=U('<span class=" text-destructive">'),bk=U('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),yk=U('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),kd=U('<p class=" text-destructive">'),vk=U('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),xk=U('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="m-0 text-xl">'),wk=U('<p class=" text-muted-foreground">'),_k=U('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),Ek=U('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),kk=U('<h2 class="my-1.5 text-base font-semibold">'),Ck=U('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),Sk=U('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),Ak=U('<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">'),Cd=U("<span>."),Tk=U("<span>");const Dk={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},Ok={feat:"text-success",refct:"text-info",fix:"text-destructive"};function Rk(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const Ik=()=>{const e=Co(),t=So(),[n,{refetch:r}]=jt(t,L=>L?xe.listSpecs(L):Promise.resolve([])),[o,{refetch:i}]=jt(()=>xe.listProjects()),s=ue(()=>(o()??[]).find(L=>L.id===t())),a=ue(()=>{const L=s();return L?.worktree?(o()??[]).some(R=>R.id===L.worktree.mainProjectId):!0}),u=ue(()=>{const L=s();return L?.worktree?`feat(${L.worktree.branch}): merge from worktree`:""}),[c,l]=$(!1),[d,g]=$(null),[h,p]=$(!1),[b,m]=$(""),[y,v]=$(null),[x,E]=$(0),[k,S]=$(!1),[I,C]=$(null);Ts(()=>h()||y()!==null),op(Qu);let D=null;Q(()=>{const L=t();D?.(),D=null,L&&(D=sp(L,()=>{r()}))}),Xt(()=>{const L=ap(()=>{(async()=>{const R=s()?.worktree?.mainProjectId??null;await i();const O=t();!O||(o()??[]).some(z=>z.id===O)||R&&e(`/${encodeURIComponent(R)}`)})()});ee(L)}),ee(()=>{D?.(),D=null});function T(){s()?.worktree&&a()&&(m(u()),g(null),p(!0))}async function A(){const L=s();if(!L?.worktree||!a())return;const R=b().trim()||u();l(!0),g(null);try{const O=await xe.mergeWorktreeToMain(L.id,{commitMessage:R});p(!1),O.status==="merged"?(xt.success(_("home.merged")),await i(),e(`/${encodeURIComponent(O.mainProjectId)}`)):(xt.info(_("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(O.mainProjectId)}/specs/${encodeURIComponent(O.conflictSpecId)}`))}catch(O){g(O.message)}finally{l(!1)}}async function P(L){const R=t();if(R){S(!0),C(null);try{await xe.deleteSpec(R,L),v(null),await r()}catch(O){C(O.message)}finally{S(!1)}}}return(()=>{var L=xk(),R=L.firstChild,O=R.firstChild,N=O.firstChild;return w(N,()=>_("home.specList")),w(O,f(tk,{projectId:t,onRunStarted:()=>E(z=>z+1)}),null),w(R,f(Ms,{}),null),w(L,f(pk,{projectId:t,revision:x}),null),w(L,f(V,{get when(){return s()?.worktree},get children(){var z=bk(),B=z.firstChild,F=B.firstChild;return w(F,()=>_("home.mainProject"),null),w(F,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(z,f(ke,{variant:"default",size:"sm",onClick:T,get disabled(){return c()||!a()},get title(){return J(()=>!!a())()?_("home.mergeHint"):_("home.mainUnreachable")},get children(){return[f(tv,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!c())()?_("home.merging"):_("home.mergeToMain"))]}}),null),w(z,f(V,{get when(){return!a()},get children(){var K=hk();return w(K,()=>_("home.mainUnreachable")),K}}),null),w(z,f(V,{get when(){return d()},get children(){var K=mk();return w(K,d),K}}),null),z}}),null),w(L,f(ws,{get fallback(){return(()=>{var z=wk();return w(z,()=>_("common.loading")),z})()},get children(){return f(V,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var z=_k(),B=z.firstChild;return w(B,()=>_("home.noSpecs")),w(z,f(ke,{as:kn,get href(){return At("specs/new")},variant:"default",size:"sm",get children(){return[f(Ss,{class:"mr-1 h-4 w-4"}),J(()=>_("home.createFirst"))]}}),null),z})()},get children(){var z=yk();return w(z,f(nt,{get each(){return n()??[]},children:B=>{const F=Rk(B.id);return(()=>{var K=Ak(),re=K.firstChild;return w(K,f(kn,{get href(){return At(`specs/${encodeURIComponent(B.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var j=Ek(),se=j.firstChild;return w(j,f(Ip,{variant:"outline",get class(){return`font-mono ${Dk[B.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return B.stage}}),se),w(se,()=>up(B.updated_at)),j})(),(()=>{var j=kk();return w(j,()=>B.title||_("common.pendingAgent")),j})(),(()=>{var j=Ck();return w(j,()=>B.summary||_("common.pendingAgent")),j})(),(()=>{var j=Sk();return w(j,f(V,{when:F,get fallback(){return B.id},children:se=>[(()=>{var Z=Cd(),G=Z.firstChild;return w(Z,()=>se().prefix,G),Z})(),(()=>{var Z=Tk();return w(Z,()=>se().type),Le(()=>St(Z,`font-semibold ${Ok[se().type]??"text-foreground"}`)),Z})(),(()=>{var Z=Cd();return Z.firstChild,w(Z,()=>se().suffix,null),Z})()]})),j})()]}}),re),w(re,f(_c,{placement:"bottom-end",get children(){return[f(wc,{as:ke,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return _("home.moreActions")},get children(){return f(Yy,{class:"h-4 w-4"})}}),f(Ec,{get children(){return f(rr,{class:"text-destructive focus:text-destructive",onSelect:()=>v(B.id),get children(){return _("common.delete")}})}})]}})),K})()}})),z}})}}),null),w(L,f(Zt,{get open(){return h()},onOpenChange:z=>{p(z),z||g(null)},get children(){return f(Lr,{class:"max-w-md",get children(){return[f(Pr,{get children(){return[f($r,{get children(){return _("home.mergeDialogTitle")}}),f(kc,{get children(){return _("home.mergeDialogDescription")}})]}}),(()=>{var z=vk(),B=z.firstChild;return z.addEventListener("submit",F=>{F.preventDefault(),A()}),w(B,()=>_("home.mergeCommitMessage"),null),w(B,f(Rr,{id:"merge-commit-message",get value(){return b()},onInput:F=>m(F.currentTarget.value),get disabled(){return c()}}),null),w(z,f(V,{get when(){return d()},get children(){var F=kd();return w(F,d),F}}),null),w(z,f(Fr,{get children(){return[f(ke,{type:"button",variant:"outline",onClick:()=>p(!1),get disabled(){return c()},get children(){return _("common.cancel")}}),f(ke,{type:"submit",get disabled(){return c()||!a()},get children(){return J(()=>!!c())()?_("home.merging"):_("home.mergeToMain")}})]}}),null),z})()]}})}}),null),w(L,f(Zt,{get open(){return y()!==null},onOpenChange:z=>{z||(v(null),C(null))},get children(){return f(Lr,{class:"max-w-sm",get children(){return[f(Pr,{get children(){return f($r,{get children(){return _("home.confirmDeleteSpec")}})}}),f(V,{get when(){return I()},get children(){var z=kd();return w(z,I),z}}),f(Fr,{get children(){return[f(ke,{variant:"outline",onClick:()=>v(null),get disabled(){return k()},get children(){return _("common.cancel")}}),f(ke,{variant:"destructive",onClick:()=>y()&&void P(y()),get disabled(){return k()},get children(){return J(()=>!!k())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),L})()},Hh="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",Nk=5*1024*1024,ho=10,Mk=new Set(["application/pdf","text/plain","text/markdown"]);function Lk(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 $k(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 Sd(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function Pk(){return Math.random().toString(36).slice(2,8)}function jh(e){const[t,n]=$([]),[r,o]=$(null),[i,s]=$(null),[a,u]=$(null),[c,l]=$(""),d=ue(()=>t().length),g=ue(()=>t().some(T=>T.status==="pending")),h=ue(()=>t().some(T=>T.status==="failed"));ee(()=>{for(const T of t())T.previewUrl&&URL.revokeObjectURL(T.previewUrl)});async function p(){const T=r();if(T)return T;const{draftId:A}=await xe.createDraft(e.projectId());return o(A),A}function b(T){n(A=>[...A,T])}function m(T,A){n(P=>P.map(L=>L.id===T?{...L,...A}:L))}function y(T){n(A=>{const P=[];for(const L of A){if(L.id===T){L.previewUrl&&URL.revokeObjectURL(L.previewUrl);continue}P.push(L)}return P})}async function v(T){s(null);const A=t(),P=ho-A.length;if(P<=0){s(_("newSpec.attachmentLimit",{max:ho}));return}const L=[];for(const R of T.slice(0,P)){const O=$k(R),N=Lk(O);if(!N){s(_("newSpec.unsupportedType",{name:O.name}));continue}if(N!=="image"&&!Mk.has(O.type)){s(_("newSpec.unsupportedMime",{mime:O.type||"(unknown)"}));continue}if(O.size>Nk){s(_("newSpec.fileTooLarge",{name:O.name}));continue}const z=`att-${Date.now()}-${Pk()}`,B=N==="image"?URL.createObjectURL(O):void 0;L.push({id:z,file:O,name:O.name,kind:N,previewUrl:B,status:"pending"})}if(L.length!==0){T.length>P&&s(_("newSpec.attachmentRoomLimit",{room:P,current:A.length,max:ho}));for(const R of L)b(R);try{const R=await p();for(const O of L)try{const N=await xe.uploadAttachment(e.projectId(),R,O.file);m(O.id,{storedName:N.storedName,name:N.storedName,status:"uploaded"})}catch(N){m(O.id,{status:"failed",error:N.message})}}catch(R){s(R.message);for(const O of L)m(O.id,{status:"failed",error:R.message})}}}async function x(T){const A=T.currentTarget;if(!A.files)return;const P=Array.from(A.files);A.value="",await v(P)}async function E(T){const A=T.clipboardData?.items;if(!A)return;const P=[];for(const L of Array.from(A))if(L.kind==="file"&&L.type.startsWith("image/")){const R=L.getAsFile();R&&P.push(R)}P.length!==0&&(T.preventDefault(),await v(P))}async function k(T){const A=t().find(P=>P.id===T);if(A){if(A.storedName&&r())try{await xe.deleteAttachment(e.projectId(),r(),A.storedName)}catch(P){s(P.message)}y(T)}}function S(T){l(Sd(T.name)),u(T.id)}async function I(T){const A=c().trim();if(u(null),!(!A||!T.storedName||!r())&&A!==Sd(T.name))try{const P=await xe.renameAttachment(e.projectId(),r(),T.storedName,A);m(T.id,{storedName:P.storedName,name:P.storedName})}catch(P){s(P.message)}}function C(){u(null)}function D(){const T=ht(t);for(const A of T)A.previewUrl&&URL.revokeObjectURL(A.previewUrl);T.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:g,hasFailed:h,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:v,onFileInputChange:x,onPaste:E,removeAttachment:k,beginRename:S,commitRename:I,cancelRename:C,reset:D}}var Fk=U("<textarea>");const yo=e=>{const[t,n]=le(e,["class"]);return(()=>{var r=Fk();return qn(r,q({get class(){return ot("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 Bk=U('<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">'),zk=U('<div class="relative w-full">'),Uk=U("<span>"),Kk=U('<li><button type=button><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const qk=150,Hk=150,jk=2,Gk=10,Ad=1.5,Gh=e=>{const[t,n]=$(!1),[r,o]=$([]),[i,s]=$(0);let a,u=[],c=-1,l="",d="",g=null,h=null;const p=()=>e.autosize!==!1,b=()=>e.minRows??jk,m=()=>e.maxRows??Gk;ee(()=>{g&&clearTimeout(g),h&&clearTimeout(h)});function y(){if(!a||!p())return;const T=getComputedStyle(a),A=parseFloat(T.fontSize)||14,P=T.lineHeight==="normal"?A*Ad:parseFloat(T.lineHeight)||A*Ad,L=parseFloat(T.paddingTop)+parseFloat(T.paddingBottom)+parseFloat(T.borderTopWidth)+parseFloat(T.borderBottomWidth),R=P*b()+L,O=P*m()+L;a.style.height="auto";const N=Math.min(Math.max(a.scrollHeight,R),O);a.style.height=`${N}px`,a.style.overflowY=a.scrollHeight>O?"auto":"hidden"}Xt(y),Q(dt(()=>e.value,y));function v(){n(!1),o([]),s(0),c=-1,l="",d="",u=[],g&&(clearTimeout(g),g=null)}function x(T){g&&clearTimeout(g),g=setTimeout(async()=>{const A=e.projectId;if(A)try{const P=await xe.listFiles(A,T);u=[],o(P.items.map(L=>({kind:"mention",value:L}))),s(0)}catch{o([])}},qk)}function E(T){const A=e.slashCommands??[];if(A.length===0)return!1;const P=T.selectionStart,L=T.value.slice(0,P);if(!/^\/[\w-]*$/.test(L))return!1;c=-1,l="",d=L.slice(1);const R=d.toLowerCase(),O=A.filter(N=>N.value.toLowerCase().startsWith(`/${R}`)).map(N=>({kind:"slash",value:N.value,label:N.label??N.value,description:N.description}));return u=[],o(O),s(0),O.length>0?n(!0):v(),!0}function k(T){const A=T.selectionStart,P=T.value.slice(0,A),L=P.lastIndexOf("@");if(L===-1){v();return}if(L>0&&!/\s/.test(P[L-1])){v();return}const R=P.slice(L+1);if(!/^[\w./@-]*$/.test(R)){v();return}c=L,l=R,t()||n(!0),x(R)}function S(T){E(T)||k(T)}function I(T){const A=e.value,P=T.kind==="slash",L=P?0:c,R=P?d.length:l.length,O=A.slice(0,L),N=A.slice(L+1+R),z=P?`${T.value} `:`@${T.value}`;e.onValueChange(O+z+N),v();const B=O.length+z.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(B,B),y())})}function C(){u[i()]?.scrollIntoView({block:"nearest"})}function D(T){const A=r();if(t()&&A.length>0){if(T.key==="ArrowDown"){T.preventDefault(),s(P=>(P+1)%A.length),requestAnimationFrame(C);return}if(T.key==="ArrowUp"){T.preventDefault(),s(P=>(P-1+A.length)%A.length),requestAnimationFrame(C);return}if(T.key==="Enter"||T.key==="Tab"){if(!T.isComposing){T.preventDefault(),I(A[i()]);return}}else if(T.key==="Escape"){T.preventDefault(),v();return}}e.onKeyDown?.(T)}return(()=>{var T=zk();return w(T,f(yo,{ref(A){var P=a;typeof P=="function"?P(A):a=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 ot(p()&&"resize-none",e.class)},onInput:A=>{e.onValueChange(A.currentTarget.value),S(A.currentTarget),y()},onKeyDown:D,onPaste:A=>e.onPaste?.(A),onBlur:()=>{h&&clearTimeout(h),h=setTimeout(v,Hk)}}),null),w(T,f(V,{get when(){return J(()=>!!t())()&&r().length>0},get children(){var A=Bk();return w(A,f(nt,{get each(){return r()},children:(P,L)=>(()=>{var R=Kk(),O=R.firstChild,N=O.firstChild;return lr(z=>u[L()]=z,R),O.$$mousedown=z=>{z.preventDefault(),I(P)},O.addEventListener("mouseenter",()=>s(L())),w(N,(()=>{var z=J(()=>P.kind==="slash");return()=>z()?P.label:P.value})()),w(O,f(V,{get when(){return J(()=>P.kind==="slash")()&&P.description},get children(){var z=Uk();return w(z,(()=>{var B=J(()=>P.kind==="slash");return()=>B()?P.description:""})()),Le(()=>St(z,ot("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",i()===L()?"text-primary-foreground/80":"text-muted-foreground"))),z}}),null),Le(z=>{var B=P.kind==="slash"&&P.description?P.description:P.value,F=ot("block w-full overflow-hidden 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");return B!==z.e&&We(O,"title",z.e=B),F!==z.t&&St(O,z.t=F),z},{e:void 0,t:void 0}),R})()})),A}}),null),T})()};Jt(["mousedown"]);const Vh=ci.Trigger,Wh=e=>{const t=q({gutter:4,flip:!1},e);return f(ci,t)},Yh=e=>{const[t,n]=le(e,["class"]);return f(ci.Portal,{get children(){return f(ci.Content,q({get class(){return ot("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 Vk=U('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const Wk=e=>f(Zt,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(Zt.Portal,{get children(){return[f(Zt.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"}),f(Zt.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[f(V,{get when(){return e.src},get children(){var t=Vk();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}}),f(Zt.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 f(Ur,{class:"h-4 w-4"})}})]}})]}})}});var Yk=U('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),Zh=U('<img class="h-full w-full object-cover">'),Zk=U('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),Xk=U('<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">'),Qk=U('<span class="text-xs font-bold text-muted-foreground">'),Jk=U('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),eC=U('<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">'),tC=U('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),nC=U('<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 rC(e){return e.status==="pending"?`${e.name} · ${_("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${_("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const Xh=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 f(V,{get when(){return e.compact},get fallback(){return f(oC,e)},get children(){return[(()=>{var c=Yk();return w(c,f(nt,{get each(){return t.attachments()},children:l=>(()=>{var d=Xk(),g=d.firstChild;return w(d,f(Wh,{openDelay:150,closeDelay:0,get children(){return[f(Vh,{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[f(V,{get when(){return J(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var h=Qk();return w(h,()=>l.kind==="pdf"?"PDF":"TXT"),h})()},get children(){var h=Zh();return Le(p=>{var b=l.previewUrl,m=l.name;return b!==p.e&&We(h,"src",p.e=b),m!==p.t&&We(h,"alt",p.t=m),p},{e:void 0,t:void 0}),h}}),f(V,{get when(){return l.status==="pending"},get children(){var h=Zk();return w(h,f(ir,{class:"h-4 w-4 animate-spin text-muted-foreground"})),h}})]}}),f(Yh,{get children(){return rC(l)}})]}}),g),g.$$click=()=>void t.removeAttachment(l.id),w(g,f(Ur,{class:"h-3 w-3"})),Le(h=>{var p=e.busy,b=_("newSpec.deleteAttachment",{name:l.name});return p!==h.e&&(g.disabled=h.e=p),b!==h.t&&We(g,"aria-label",h.t=b),h},{e:void 0,t:void 0}),d})()})),c})(),f(Wk,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},oC=e=>{const t=e.ctrl;return(()=>{var n=Jk();return w(n,f(nt,{get each(){return t.attachments()},children:r=>(()=>{var o=eC(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,f(V,{get when(){return J(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=tC();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=Zh();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,f(V,{get when(){return J(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=nC();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?_("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 f(Rr,{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,f(V,{get when(){return r.status==="pending"},get children(){return[f(ir,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),J(()=>_("newSpec.uploading"))]}}),null),w(a,f(V,{get when(){return r.status==="failed"},get children(){return _("newSpec.uploadFailed",{error:r.error})}}),null),w(a,f(V,{get when(){return r.status==="uploaded"},get children(){return[J(()=>Math.round(r.file.size/1024))," KB · ",J(()=>r.kind)]}}),null),w(o,f(ke,{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 _("newSpec.deleteAttachment",{name:r.name})},get children(){return f(Ur,{class:"h-3.5 w-3.5"})}}),null),Le(()=>St(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})()};Jt(["click"]);var iC=U('<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 vo=ur.Label,xo=ur;ur.ErrorMessage;ur.Description;const wo=e=>{const[t,n]=le(e,["class","children"]);return[f(ur.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"}),f(ur.Control,q({get class(){return ot("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 f(ur.Indicator,{class:"flex items-center justify-center text-current",get children(){return iC()}})}}))]};fn.Description;fn.ErrorMessage;fn.ItemDescription;const Lt=fn.ItemInput,$t=fn.ItemLabel,li=fn.Label,an=fn,Pt=fn.Item,Kt=e=>{const[t,n]=le(e,["class"]);return f(fn.ItemControl,q({get class(){return ot("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 f(fn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var sC=U('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),aC=U('<span class="truncate font-medium text-foreground">');const Hs=e=>(()=>{var t=sC();return w(t,f(nt,{get each(){return e.items},children:(n,r)=>[f(V,{get when(){return r()>0},get children(){return f(Xg,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),f(V,{get when(){return n.href},get fallback(){return(()=>{var o=aC();return w(o,()=>n.label),o})()},get children(){return f(kn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var Td=U('<span class="text-sm text-muted-foreground">'),uC=U('<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"><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>'),cC=U('<strong class=" ">'),lC=U('<p class=" text-destructive">'),dC=U('<p class=" text-muted-foreground">');const fC=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],gC=()=>{const e=Co(),t=So(),[n,r]=$(""),[o,i]=$("feat"),[s,a]=$("idle"),[u,c]=$(!1),l=()=>s()==="creating",d=jh({projectId:t}),g=d.error,h=d.setError;let p=null,b=null,m=new Set,y="",v="",x=!1,E;ee(()=>{p?.(),b?.()});async function k(){if(x)return;const I=y||t();try{const D=(await xe.listSpecs(I)).find(T=>!m.has(T.id));if(D){x=!0,p?.(),p=null,b?.(),b=null;const T=I?`/${I}/specs/${encodeURIComponent(D.id)}`:At(`specs/${encodeURIComponent(D.id)}`);e(T),v&&(co(v),v="")}}catch{}}async function S(I){if(I.preventDefault(),s()==="creating")return;h(null);const C=n().trim();if(C.length<5){h(_("newSpec.descTooShort"));return}const D=d.attachments().filter(T=>T.status==="failed");if(D.length>0){h(_("newSpec.attachmentFailedCount",{count:D.length}));return}if(d.hasPending()){h(_("newSpec.attachmentUploading"));return}a("creating"),x=!1;try{const T=t();let A=T;if(u()){const N=pC(C);A=(await xe.createWorktree(T,{specSlug:N})).id}y=A;const P=await xe.listSpecs(A);m=new Set(P.map(N=>N.id));const L={type:o(),requirement:C},R=d.draftId();R&&(L.draftId=R);const O=await xe.createSpec(A,L);"draft"in O&&O.draft?(v=O.sessionId,b=Os(A,O.sessionId,{onEvent:N=>{N.type==="error"&&(a("failed"),h(N.message||_("newSpec.agentRunFailed")),b?.(),b=null)}}),p=sp(A,()=>{k()}),k()):"id"in O&&e(`/${A}/specs/${encodeURIComponent(O.id)}`)}catch(T){h(T.message),a("failed")}}return(()=>{var I=uC(),C=I.firstChild,D=C.nextSibling,T=D.nextSibling,A=T.firstChild,P=A.firstChild,L=A.nextSibling,R=L.firstChild,O=R.firstChild,N=O.nextSibling,z=N.nextSibling;w(C,f(Hs,{get items(){return[{label:_("breadcrumb.specList"),href:At("")},{label:_("breadcrumb.newSpec")}]}})),w(D,()=>_("newSpec.description")),T.addEventListener("submit",S),w(T,f(an,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:F=>i(F),get disabled(){return l()},get children(){return[f(li,{class:"mb-1.5 w-full font-medium",get children(){return _("newSpec.type")}}),J(()=>fC.map(F=>f(Pt,{get value(){return F.value},class:"flex min-h-[44px] flex-1",get children(){return[f(Lt,{class:"sr-only"}),f($t,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===F.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var K=cC();return w(K,()=>_(F.labelKey)),K})(),(()=>{var K=Td();return w(K,()=>_(F.hintKey)),K})()]}})]}})))]}}),A),w(T,f(xo,{get checked(){return u()},onChange:F=>c(F),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[f(wo,{}),f(vo,{class:"cursor-pointer font-medium",get children(){return _("newSpec.parallelWorktree")}}),(()=>{var F=Td();return w(F,()=>_("newSpec.parallelWorktreeDesc")),F})()]}}),A),w(P,()=>_("newSpec.requirement")),w(A,f(Gh,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return _("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),ts(L,"paste",d.onPaste),w(O,()=>_("newSpec.attachments")),w(N,()=>_("newSpec.attachmentsHint",{count:d.count(),max:ho})),w(R,f(ke,{variant:"outline",size:"sm",type:"button",onClick:()=>E?.click(),get disabled(){return l()||d.count()>=ho},get children(){return[f(ux,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("newSpec.importAttachment"))]}}),z),ts(z,"change",d.onFileInputChange);var B=E;return typeof B=="function"?lr(B,z):E=z,We(z,"accept",Hh),w(L,f(V,{get when(){return d.count()>0},get children(){return f(Xh,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(T,(()=>{var F=J(()=>!!g());return()=>F()&&(()=>{var K=lC();return w(K,g),K})()})(),null),w(T,f(ke,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[J(()=>J(()=>!!l())()?f(ir,{class:"mr-1 h-4 w-4 animate-spin"}):f(As,{class:"mr-1 h-4 w-4"})),J(()=>J(()=>!!l())()?_("newSpec.creating"):_("newSpec.createAndStart"))]}}),null),w(T,(()=>{var F=J(()=>!!l());return()=>F()&&(()=>{var K=dC();return w(K,()=>_("newSpec.creatingHint")),K})()})(),null),I})()};function pC(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 Dd=11;function hC(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Dd||e.nodeType===Dd)){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 Ki,mC="http://www.w3.org/1999/xhtml",Nt=typeof document>"u"?void 0:document,bC=!!Nt&&"content"in Nt.createElement("template"),yC=!!Nt&&Nt.createRange&&"createContextualFragment"in Nt.createRange();function vC(e){var t=Nt.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function xC(e){Ki||(Ki=Nt.createRange(),Ki.selectNode(Nt.body));var t=Ki.createContextualFragment(e);return t.childNodes[0]}function wC(e){var t=Nt.createElement("body");return t.innerHTML=e,t.childNodes[0]}function _C(e){return e=e.trim(),bC?vC(e):yC?xC(e):wC(e)}function qi(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 EC(e,t){return!t||t===mC?Nt.createElement(e):Nt.createElementNS(t,e)}function kC(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function ga(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Od={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)}ga(e,t,"selected")},INPUT:function(e,t){ga(e,t,"checked"),ga(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}}},Uo=1,Rd=11,Id=3,Nd=8;function er(){}function CC(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function SC(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=Nt.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=Nt.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=_C(r);else r.nodeType===Rd&&(r=r.firstElementChild);var u=o.getNodeKey||CC,c=o.onBeforeNodeAdded||er,l=o.onNodeAdded||er,d=o.onBeforeElUpdated||er,g=o.onElUpdated||er,h=o.onBeforeNodeDiscarded||er,p=o.onNodeDiscarded||er,b=o.onBeforeElChildrenUpdated||er,m=o.skipFromChildren||er,y=o.addChild||function(F,K){return F.appendChild(K)},v=o.childrenOnly===!0,x=Object.create(null),E=[];function k(F){E.push(F)}function S(F,K){if(F.nodeType===Uo)for(var re=F.firstChild;re;){var j=void 0;K&&(j=u(re))?k(j):(p(re),re.firstChild&&S(re,K)),re=re.nextSibling}}function I(F,K,re){h(F)!==!1&&(K&&K.removeChild(F),p(F),S(F,re))}function C(F){if(F.nodeType===Uo||F.nodeType===Rd)for(var K=F.firstChild;K;){var re=u(K);re&&(x[re]=K),C(K),K=K.nextSibling}}C(n);function D(F){l(F);for(var K=F.firstChild;K;){var re=K.nextSibling,j=u(K);if(j){var se=x[j];se&&qi(K,se)?(K.parentNode.replaceChild(se,K),A(se,K)):D(K)}else D(K);K=re}}function T(F,K,re){for(;K;){var j=K.nextSibling;(re=u(K))?k(re):I(K,F,!0),K=j}}function A(F,K,re){var j=u(K);if(j&&delete x[j],!re){var se=d(F,K);if(se===!1||(se instanceof HTMLElement&&(F=se,C(F)),e(F,K),g(F),b(F,K)===!1))return}F.nodeName!=="TEXTAREA"?P(F,K):Od.TEXTAREA(F,K)}function P(F,K){var re=m(F,K),j=K.firstChild,se=F.firstChild,Z,G,ce,me,ae;e:for(;j;){for(me=j.nextSibling,Z=u(j);!re&&se;){if(ce=se.nextSibling,j.isSameNode&&j.isSameNode(se)){j=me,se=ce;continue e}G=u(se);var we=se.nodeType,X=void 0;if(we===j.nodeType&&(we===Uo?(Z?Z!==G&&((ae=x[Z])?ce===ae?X=!1:(F.insertBefore(ae,se),G?k(G):I(se,F,!0),se=ae,G=u(se)):X=!1):G&&(X=!1),X=X!==!1&&qi(se,j),X&&A(se,j)):(we===Id||we==Nd)&&(X=!0,se.nodeValue!==j.nodeValue&&(se.nodeValue=j.nodeValue))),X){j=me,se=ce;continue e}G?k(G):I(se,F,!0),se=ce}if(Z&&(ae=x[Z])&&qi(ae,j))re||y(F,ae),A(ae,j);else{var fe=c(j);fe!==!1&&(fe&&(j=fe),j.actualize&&(j=j.actualize(F.ownerDocument||Nt)),y(F,j),D(j))}j=me,se=ce}T(F,se,G);var _e=Od[F.nodeName];_e&&_e(F,K)}var L=n,R=L.nodeType,O=r.nodeType;if(!v){if(R===Uo)O===Uo?qi(n,r)||(p(n),L=kC(n,EC(r.nodeName,r.namespaceURI))):L=r;else if(R===Id||R===Nd){if(O===R)return L.nodeValue!==r.nodeValue&&(L.nodeValue=r.nodeValue),L;L=r}}if(L===r)p(n);else{if(r.isSameNode&&r.isSameNode(L))return;if(A(L,r,v),E)for(var N=0,z=E.length;N<z;N++){var B=x[E[N]];B&&I(B,B.parentNode,!1)}}return!v&&L!==n&&n.parentNode&&(L.actualize&&(L=L.actualize(n.ownerDocument||Nt)),n.parentNode.replaceChild(L,n)),L}}var AC=SC(hC);const Md={};function TC(e){let t=Md[e];if(t)return t;t=Md[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 _o(e,t){typeof t!="string"&&(t=_o.defaultChars);const n=TC(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})}_o.defaultChars=";/?:@&=+$,#";_o.componentChars="";const Ld={};function DC(e){let t=Ld[e];if(t)return t;t=Ld[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 Ei(e,t,n){typeof t!="string"&&(n=t,t=Ei.defaultChars),typeof n>"u"&&(n=!0);const r=DC(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}Ei.defaultChars=";/?:@&=+$,-_.!~*'()#";Ei.componentChars="-_.!~*'()";function Ic(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 gs(){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 OC=/^([a-z0-9.+-]+:)/i,RC=/:[0-9]*$/,IC=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,NC=["<",">",'"',"`"," ","\r",`
7
+ `," "],MC=["{","}","|","\\","^","`"].concat(NC),LC=["'"].concat(MC),$d=["%","/","?",";","#"].concat(LC),Pd=["/","?","#"],$C=255,Fd=/^[+a-z0-9A-Z_-]{0,63}$/,PC=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bd={javascript:!0,"javascript:":!0},zd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Nc(e,t){if(e&&e instanceof gs)return e;const n=new gs;return n.parse(e,t),n}gs.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=IC.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=OC.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&&Bd[s])&&(i=i.substr(2),this.slashes=!0)),!Bd[s]&&(o||s&&!zd[s])){let c=-1;for(let p=0;p<Pd.length;p++)r=i.indexOf(Pd[p]),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 p=0;p<$d.length;p++)r=i.indexOf($d[p]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const g=i.slice(0,c);i=i.slice(c),this.parseHost(g),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let b=0,m=p.length;b<m;b++){const y=p[b];if(y&&!y.match(Fd)){let v="";for(let x=0,E=y.length;x<E;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(Fd)){const x=p.slice(0,b),E=p.slice(b+1),k=y.match(PC);k&&(x.push(k[1]),E.unshift(k[2])),E.length&&(i=E.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>$C&&(this.hostname=""),h&&(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),zd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};gs.prototype.parseHost=function(e){let t=RC.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 FC=Object.freeze(Object.defineProperty({__proto__:null,decode:_o,encode:Ei,format:Ic,parse:Nc},Symbol.toStringTag,{value:"Module"})),Qh=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Jh=/[\0-\x1F\x7F-\x9F]/,BC=/[\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]/,Mc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,em=/[\$\+<->\^`\|~\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]/,tm=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,zC=Object.freeze(Object.defineProperty({__proto__:null,Any:Qh,Cc:Jh,Cf:BC,P:Mc,S:em,Z:tm},Symbol.toStringTag,{value:"Module"})),UC=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))),KC=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var pa;const qC=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]]),HC=(pa=String.fromCodePoint)!==null&&pa!==void 0?pa: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 jC(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=qC.get(e))!==null&&t!==void 0?t:e}var Et;(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"})(Et||(Et={}));const GC=32;var or;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(or||(or={}));function Uu(e){return e>=Et.ZERO&&e<=Et.NINE}function VC(e){return e>=Et.UPPER_A&&e<=Et.UPPER_F||e>=Et.LOWER_A&&e<=Et.LOWER_F}function WC(e){return e>=Et.UPPER_A&&e<=Et.UPPER_Z||e>=Et.LOWER_A&&e<=Et.LOWER_Z||Uu(e)}function YC(e){return e===Et.EQUALS||WC(e)}var wt;(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"})(wt||(wt={}));var Bn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bn||(Bn={}));class ZC{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bn.Strict}startEntity(t){this.decodeMode=t,this.state=wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case wt.EntityStart:return t.charCodeAt(n)===Et.NUM?(this.state=wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=wt.NamedEntity,this.stateNamedEntity(t,n));case wt.NumericStart:return this.stateNumericStart(t,n);case wt.NumericDecimal:return this.stateNumericDecimal(t,n);case wt.NumericHex:return this.stateNumericHex(t,n);case wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|GC)===Et.LOWER_X?(this.state=wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=wt.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(Uu(o)||VC(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(Uu(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===Et.SEMI)this.consumed+=1;else if(this.decodeMode===Bn.Strict)return 0;return this.emitCodePoint(jC(this.result),this.consumed),this.errors&&(t!==Et.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&or.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=XC(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Bn.Attribute&&(i===0||YC(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&or.VALUE_LENGTH)>>14,i!==0){if(s===Et.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Bn.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]&or.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]&~or.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case wt.NamedEntity:return this.result!==0&&(this.decodeMode!==Bn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case wt.NumericDecimal:return this.emitNumericEntity(0,2);case wt.NumericHex:return this.emitNumericEntity(0,3);case wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wt.EntityStart:return 0}}}function nm(e){let t="";const n=new ZC(e,r=>t+=HC(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 XC(e,t,n,r){const o=(t&or.BRANCH_LENGTH)>>7,i=t&or.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 rm=nm(UC);nm(KC);function QC(e,t=Bn.Legacy){return rm(e,t)}function JC(e){return rm(e,Bn.Strict)}function eS(e){return Object.prototype.toString.call(e)}function Lc(e){return eS(e)==="[object String]"}const tS=Object.prototype.hasOwnProperty;function nS(e,t){return tS.call(e,t)}function js(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 om(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function $c(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 di(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 im=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,rS=/&([a-z#][a-z0-9]{1,31});/gi,oS=new RegExp(im.source+"|"+rS.source,"gi"),iS=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function sS(e,t){if(t.charCodeAt(0)===35&&iS.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return $c(r)?di(r):e}const n=QC(e);return n!==e?n:e}function aS(e){return e.indexOf("\\")<0?e:e.replace(im,"$1")}function Eo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(oS,function(t,n,r){return n||sS(t,r)})}const uS=/[&<>"]/,cS=/[&<>"]/g,lS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function dS(e){return lS[e]}function pr(e){return uS.test(e)?e.replace(cS,dS):e}const fS=/[.?*+^$[\]\\(){}|-]/g;function gS(e){return e.replace(fS,"\\$&")}function rt(e){switch(e){case 9:case 32:return!0}return!1}function fi(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 sm(e){return Mc.test(e)||em.test(e)}function gi(e){return sm(di(e))}function pi(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 Gs(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Ud(e){return e===32||e===9||e===10||e===13}function Vs(e){let t=0;for(;t<e.length&&Ud(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Ud(e.charCodeAt(n));n--);return e.slice(t,n+1)}const pS={mdurl:FC,ucmicro:zC},hS=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:om,asciiTrim:Vs,assign:js,escapeHtml:pr,escapeRE:gS,fromCodePoint:di,has:nS,isMdAsciiPunct:pi,isPunctChar:sm,isPunctCharCode:gi,isSpace:rt,isString:Lc,isValidEntityCode:$c,isWhiteSpace:fi,lib:pS,normalizeReference:Gs,unescapeAll:Eo,unescapeMd:aS},Symbol.toStringTag,{value:"Module"}));function mS(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 bS(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=Eo(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=Eo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function yS(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+=Eo(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+=Eo(e.slice(t,i)),s}const vS=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:bS,parseLinkLabel:mS,parseLinkTitle:yS},Symbol.toStringTag,{value:"Module"})),Dn={};Dn.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+pr(i.content)+"</code>"};Dn.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+pr(e[t].content)+`</code></pre>
8
+ `};Dn.fence=function(e,t,n,r,o){const i=e[t],s=i.info?Eo(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)||pr(i.content):c=pr(i.content),c.indexOf("<pre")===0)return c+`
9
+ `;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 g={attrs:d};return`<pre><code${o.renderAttrs(g)}>${c}</code></pre>
10
+ `}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
11
+ `};Dn.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)};Dn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
12
+ `:`<br>
13
+ `};Dn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
14
+ `:`<br>
15
+ `:`
16
+ `};Dn.text=function(e,t){return pr(e[t].content)};Dn.html_block=function(e,t){return e[t].content};Dn.html_inline=function(e,t){return e[t].content};function Ro(){this.rules=js({},Dn)}Ro.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+pr(t.attrs[n][0])+'="'+pr(t.attrs[n][1])+'"';return o};Ro.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+=`
17
+ `),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?`>
18
+ `:">",i};Ro.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};Ro.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+=`
19
+ `;break}return r};Ro.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 Ft(){this.__rules__=[],this.__cache__=null}Ft.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Ft.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))})})};Ft.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};Ft.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};Ft.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};Ft.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Ft.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};Ft.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Ft.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};Ft.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function gn(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}gn.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};gn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};gn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};gn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};gn.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 am(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}am.prototype.Token=gn;const xS=/\r\n?|\n/g,wS=/\0/g;function _S(e){let t;t=e.src.replace(xS,`
20
+ `),t=t.replace(wS,"�"),e.src=t}function ES(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 kS(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 CS(e){return/^<a[>\s]/i.test(e)}function SS(e){return/^<\/a\s*>/i.test(e)}function AS(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"&&(CS(a.content)&&i>0&&i--,SS(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,g=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let h=0;h<c.length;h++){const p=c[h].url,b=e.md.normalizeLink(p);if(!e.md.validateLink(b))continue;let m=c[h].text;c[h].schema?c[h].schema==="mailto:"&&!/^mailto:/i.test(m)?m=e.md.normalizeLinkText("mailto:"+m).replace(/^mailto:/,""):m=e.md.normalizeLinkText(m):m=e.md.normalizeLinkText("http://"+m).replace(/^http:\/\//,"");const y=c[h].index;if(y>g){const k=new e.Token("text","",0);k.content=u.slice(g,y),k.level=d,l.push(k)}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=m,x.level=d,l.push(x);const E=new e.Token("link_close","a",-1);E.level=--d,E.markup="linkify",E.info="auto",l.push(E),g=c[h].lastIndex}if(g<u.length){const h=new e.Token("text","",0);h.content=u.slice(g),h.level=d,l.push(h)}t[n].children=o=om(o,s,l)}}}}const um=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,TS=/\((c|tm|r)\)/i,DS=/\((c|tm|r)\)/ig,OS={c:"©",r:"®",tm:"™"};function RS(e,t){return OS[t.toLowerCase()]}function IS(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(DS,RS)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function NS(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&um.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 MS(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(TS.test(e.tokens[t].content)&&IS(e.tokens[t].children),um.test(e.tokens[t].content)&&NS(e.tokens[t].children))}const LS=/['"]/,Kd=/['"]/g,qd="’";function Hi(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function $S(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 PS(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;){Kd.lastIndex=c;const d=Kd.exec(u);if(!d)break;let g=!0,h=!0;c=d.index+1;const p=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 m=32;if(c<l)m=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}const y=pi(b)||gi(b),v=pi(m)||gi(m),x=fi(b),E=fi(m);if(E?g=!1:v&&(x||y||(g=!1)),x?h=!1:y&&(E||v||(h=!1)),m===34&&d[0]==='"'&&b>=48&&b<=57&&(h=g=!1),g&&h&&(g=y,h=v),!g&&!h){p&&Hi(o,i,d.index,qd);continue}if(h)for(n=r.length-1;n>=0;n--){let k=r[n];if(r[n].level<a)break;if(k.single===p&&r[n].level===a){k=r[n];let S,I;p?(S=t.md.options.quotes[2],I=t.md.options.quotes[3]):(S=t.md.options.quotes[0],I=t.md.options.quotes[1]),Hi(o,i,d.index,I),Hi(o,k.token,k.pos,S),r.length=n;continue e}}g?r.push({token:i,pos:d.index,single:p,level:a}):h&&p&&Hi(o,i,d.index,qd)}}Object.keys(o).forEach(function(i){e[i].content=$S(e[i].content,o[i])})}function FS(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!LS.test(e.tokens[t].content)||PS(e.tokens[t].children,e)}function BS(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 ha=[["normalize",_S],["block",ES],["inline",kS],["linkify",AS],["replacements",MS],["smartquotes",FS],["text_join",BS]];function Pc(){this.ruler=new Ft;for(let e=0;e<ha.length;e++)this.ruler.push(ha[e][0],ha[e][1])}Pc.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Pc.prototype.State=am;function On(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(rt(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}On.prototype.push=function(e,t,n){const r=new gn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};On.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};On.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};On.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!rt(r))break}return t};On.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!rt(this.src.charCodeAt(--t)))return t+1;return t};On.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};On.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};On.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 g=this.src.charCodeAt(l);if(rt(g))g===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("")};On.prototype.Token=gn;const zS=65536;function ma(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Hd(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 US(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&&!rt(a)||s===45&&rt(a))return!1;for(;i<e.eMarks[o];){const E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!rt(E))return!1;i++}let u=ma(e,t+1),c=u.split("|");const l=[];for(let E=0;E<c.length;E++){const k=c[E].trim();if(!k){if(E===0||E===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?l.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=ma(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Hd(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 g=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),b=[t,0];p.map=b;const m=e.push("thead_open","thead",1);m.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let E=0;E<c.length;E++){const k=e.push("th_open","th",1);l[E]&&(k.attrs=[["style","text-align:"+l[E]]]);const S=e.push("inline","",0);S.content=c[E].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 E=!1;for(let S=0,I=h.length;S<I;S++)if(h[S](e,o,n,!0)){E=!0;break}if(E||(u=ma(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Hd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>zS))break;if(o===t+2){const S=e.push("tbody_open","tbody",1);S.map=v=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let S=0;S<d;S++){const I=e.push("td_open","td",1);l[S]&&(I.attrs=[["style","text-align:"+l[S]]]);const C=e.push("inline","",0);C.content=c[S]?c[S].trim():"",C.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=g,e.line=o,!0}function KS(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)+`
21
+ `,i.map=[t,e.line],!0}function qS(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,g=!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)))){g=!0;break}u=e.sCount[t],e.line=d+(g?1:0);const h=e.push("fence","code",0);return h.info=l,h.content=e.getLines(t+1,d,u,!0),h.markup=c,h.map=[t,e.line],!0}function HS(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"),g=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const x=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let k=e.sCount[p]+1,S,I;e.src.charCodeAt(o)===32?(o++,k++,I=!1,S=!0):e.src.charCodeAt(o)===9?(S=!0,(e.bsCount[p]+k)%4===3?(o++,k++,I=!1):I=!0):S=!1;let C=k;for(a.push(e.bMarks[p]),e.bMarks[p]=o;o<i;){const D=e.src.charCodeAt(o);if(rt(D))D===9?C+=4-(C+e.bsCount[p]+(I?1:0))%4:C++;else break;o++}h=o>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(S?1:0),c.push(e.sCount[p]),e.sCount[p]=C-k,l.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(h)break;let E=!1;for(let k=0,S=d.length;k<S;k++)if(d[k](e,p,n,!0)){E=!0;break}if(E){e.lineMax=p,e.blkIndent!==0&&(a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const b=e.blkIndent;e.blkIndent=0;const m=e.push("blockquote_open","blockquote",1);m.markup=">";const y=[t,0];m.map=y,e.md.block.tokenize(e,t,p);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=g,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 jS(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&&!rt(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 jd(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(!rt(i))return-1}return r}function Gd(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),!rt(i))?-1:o}function GS(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 VS(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,g,h;if((h=Gd(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],g=Number(e.src.slice(s,h-1)),l&&g!==1)return!1}else if((h=jd(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(h)>=e.eMarks[u])return!1;if(r)return!0;const p=e.src.charCodeAt(h-1),b=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),g!==1&&(a.attrs=[["start",g]])):a=e.push("bullet_list_open","ul",1);const m=[u,0];a.map=m,a.markup=String.fromCharCode(p);let y=!1;const v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=h,o=e.eMarks[u];const E=e.sCount[u]+h-(e.bMarks[u]+e.tShift[u]);let k=E;for(;i<o;){const O=e.src.charCodeAt(i);if(O===9)k+=4-(k+e.bsCount[u])%4;else if(O===32)k++;else break;i++}const S=i;let I;S>=o?I=1:I=k-E,I>4&&(I=1);const C=E+I;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const D=[u,0];a.map=D,d&&(a.info=e.src.slice(s,h-1));const T=e.tight,A=e.tShift[u],P=e.sCount[u],L=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=C,e.tight=!0,e.tShift[u]=S-e.bMarks[u],e.sCount[u]=k,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=L,e.tShift[u]=A,e.sCount[u]=P,e.tight=T,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),u=e.line,D[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let R=!1;for(let O=0,N=v.length;O<N;O++)if(v[O](e,u,n,!0)){R=!0;break}if(R)break;if(d){if(h=Gd(e,u),h<0)break;s=e.bMarks[u]+e.tShift[u]}else if(h=jd(e,u),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),m[1]=u,e.line=u,e.parentType=x,c&&GS(e,b),!0}function WS(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 E=!1;if(e.sCount[v]-e.blkIndent>3&&(E=!0),e.sCount[v]<0&&(E=!0),!E){const I=e.md.block.ruler.getRules("reference"),C=e.parentType;e.parentType="reference";let D=!1;for(let T=0,A=I.length;T<A;T++)if(I[T](e,v,x,!0)){D=!0;break}if(e.parentType=C,D)return null}const k=e.bMarks[v]+e.tShift[v],S=e.eMarks[v];return e.src.slice(k,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(!rt(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 g=o,h=s,p=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(!rt(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 m;for(o<i&&p!==o&&b.ok?(m=b.str,o=b.pos):(m="",o=g,s=h);o<i;){const v=u.charCodeAt(o);if(!rt(v))break;o++}if(o<i&&u.charCodeAt(o)!==10&&m)for(m="",o=g,s=h;o<i;){const v=u.charCodeAt(o);if(!rt(v))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=Gs(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:m,href:d}),e.line=s),!0):!1}const YS=["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"],ZS="[a-zA-Z_:][a-zA-Z0-9:._-]*",XS="[^\"'=<>`\\x00-\\x20]+",QS="'[^']*'",JS='"[^"]*"',e3="(?:"+XS+"|"+QS+"|"+JS+")",t3="(?:\\s+"+ZS+"(?:\\s*=\\s*"+e3+")?)",cm="<[A-Za-z][A-Za-z0-9\\-]*"+t3+"*\\s*\\/?>",lm="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n3="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",r3="<[?][\\s\\S]*?[?]>",o3="<![A-Za-z][^>]*>",i3="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",s3=new RegExp("^(?:"+cm+"|"+lm+"|"+n3+"|"+r3+"|"+o3+"|"+i3+")"),a3=new RegExp("^(?:"+cm+"|"+lm+")"),Sr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+YS.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a3.source+"\\s*$"),/^$/,!1]];function u3(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<Sr.length&&!Sr[a][0].test(s);a++);if(a===Sr.length)return!1;if(r)return Sr[a][2];let u=t+1;const c=Sr[a][1].test("");if(!Sr[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),Sr[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 c3(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&&!rt(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&rt(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=Vs(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 l3(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 h=e.bMarks[a]+e.tShift[a];const p=e.eMarks[a];if(h<p&&(s=e.src.charCodeAt(h),(s===45||s===61)&&(h=e.skipChars(h,s),h=e.skipSpaces(h),h>=p))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let g=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](e,a,n,!0)){g=!0;break}if(g)break}if(!i)return e.parentType=o,!1;const u=Vs(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 d3(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=Vs(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 ji=[["table",US,["paragraph","reference"]],["code",KS],["fence",qS,["paragraph","reference","blockquote","list"]],["blockquote",HS,["paragraph","reference","blockquote","list"]],["hr",jS,["paragraph","reference","blockquote","list"]],["list",VS,["paragraph","reference","blockquote"]],["reference",WS],["html_block",u3,["paragraph","reference","blockquote"]],["heading",c3,["paragraph","reference","blockquote"]],["lheading",l3],["paragraph",d3]];function Ws(){this.ruler=new Ft;for(let e=0;e<ji.length;e++)this.ruler.push(ji[e][0],ji[e][1],{alt:(ji[e][2]||[]).slice()})}Ws.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)}};Ws.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)};Ws.prototype.State=On;function ki(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}ki.prototype.pushPending=function(){const e=new gn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ki.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new gn(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};ki.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 m=this.src.charCodeAt(e-2);o=(m&64512)===55296?65536+(m-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 m=this.src.charCodeAt(i+1);a=(m&64512)===56320?65536+(a-55296<<10)+(m-56320):65533}else(a&64512)===56320&&(a=65533);const u=pi(o)||gi(o),c=pi(a)||gi(a),l=fi(o),d=fi(a),g=!d&&(!c||l||u),h=!l&&(!u||d||c);return{can_open:g&&(t||!h||u),can_close:h&&(t||!g||c),length:s}};ki.prototype.Token=gn;function f3(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 g3(e,t){let n=e.pos;for(;n<e.posMax&&!f3(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const p3=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function h3(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(p3);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 g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=a.length-i.length,!0}function m3(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&&rt(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Fc=[];for(let e=0;e<256;e++)Fc.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Fc[e.charCodeAt(0)]=1});function b3(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),!!rt(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&&Fc[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function y3(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 v3(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 Vd(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 x3(e){const t=e.tokens_meta,n=e.tokens_meta.length;Vd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Vd(e,t[r].delimiters)}const dm={tokenize:v3,postProcess:x3};function w3(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 Wd(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 _3(e){const t=e.tokens_meta,n=e.tokens_meta.length;Wd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Wd(e,t[r].delimiters)}const fm={tokenize:w3,postProcess:_3};function E3(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,g=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&e.src.charCodeAt(p)===40){for(c=!1,p++;p<d&&(n=e.src.charCodeAt(p),!(!rt(n)&&n!==10));p++);if(p>=d)return!1;if(u=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?p=o.pos:s="",u=p;p<d&&(n=e.src.charCodeAt(p),!(!rt(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&u!==p&&o.ok)for(a=o.str,p=o.pos;p<d&&(n=e.src.charCodeAt(p),!(!rt(n)&&n!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=h+1):p=h+1,r||(r=e.src.slice(g,h)),i=e.env.references[Gs(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=g,e.posMax=h;const b=e.push("link_open","a",1),m=[["href",s]];b.attrs=m,a&&m.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function k3(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(n=e.src.charCodeAt(i),!(!rt(n)&&n!==10));i++);if(i>=g)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<g&&(n=e.src.charCodeAt(i),!(!rt(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<g&&(n=e.src.charCodeAt(i),!(!rt(n)&&n!==10));i++);else u="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=p+1):i=p+1,o||(o=e.src.slice(h,p)),s=e.env.references[Gs(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(h,p);const b=[];e.md.inline.parse(r,e.md,e.env,b);const m=e.push("image","img",0),y=[["src",l],["alt",""]];m.attrs=y,m.children=b,m.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=g,!0}const C3=/^([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])?)*)$/,S3=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function A3(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(S3.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(C3.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 T3(e){return/^<a[>\s]/i.test(e)}function D3(e){return/^<\/a\s*>/i.test(e)}function O3(e){const t=e|32;return t>=97&&t<=122}function R3(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&&!O3(o))return!1;const i=e.src.slice(r).match(s3);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],T3(s.content)&&e.linkLevel++,D3(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const I3=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,N3=/^&([a-z][a-z0-9]{1,31});/i;function M3(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(I3);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=$c(s)?di(s):di(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(N3);if(i){const s=JC(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 Yd(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 g=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(g=!0),!g){const h=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+h,i[c]=h,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 L3(e){const t=e.tokens_meta,n=e.tokens_meta.length;Yd(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Yd(t[r].delimiters)}function $3(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 ba=[["text",g3],["linkify",h3],["newline",m3],["escape",b3],["backticks",y3],["strikethrough",dm.tokenize],["emphasis",fm.tokenize],["link",E3],["image",k3],["autolink",A3],["html_inline",R3],["entity",M3]],ya=[["balance_pairs",L3],["strikethrough",dm.postProcess],["emphasis",fm.postProcess],["fragments_join",$3]];function Ci(){this.ruler=new Ft;for(let e=0;e<ba.length;e++)this.ruler.push(ba[e][0],ba[e][1]);this.ruler2=new Ft;for(let e=0;e<ya.length;e++)this.ruler2.push(ya[e][0],ya[e][1])}Ci.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};Ci.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()};Ci.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)};Ci.prototype.State=ki;function P3(e){const t={};e=e||{},t.src_Any=Qh.source,t.src_Cc=Jh.source,t.src_Z=tm.source,t.src_P=Mc.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 Ku(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ys(e){return Object.prototype.toString.call(e)}function F3(e){return Ys(e)==="[object String]"}function B3(e){return Ys(e)==="[object Object]"}function z3(e){return Ys(e)==="[object RegExp]"}function Zd(e){return Ys(e)==="[object Function]"}function U3(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const gm={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function K3(e){return Object.keys(e||{}).reduce(function(t,n){return t||gm.hasOwnProperty(n)},!1)}const q3={"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}}},H3="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]",j3="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function G3(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Xd(){return function(e,t){t.normalize(e)}}function ps(e){const t=e.re=P3(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(H3),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,B3(u)){z3(u.validate)?c.validate=G3(u.validate):Zd(u.validate)?c.validate=u.validate:i(a,u),Zd(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=Xd();return}if(F3(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:Xd()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(U3).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 pm(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 Vt(e,t){if(!(this instanceof Vt))return new Vt(e,t);t||K3(e)&&(t=e,e={}),this.__opts__=Ku({},gm,t),this.__schemas__=Ku({},q3,e),this.__compiled__={},this.__tlds__=j3,this.__tlds_replaced__=!1,this.re={},ps(this)}Vt.prototype.add=function(t,n){return this.__schemas__[t]=n,ps(this),this};Vt.prototype.set=function(t){return this.__opts__=Ku(this.__opts__,t),this};Vt.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)};Vt.prototype.pretest=function(t){return this.re.pretest.test(t)};Vt.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Vt.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(g,h){return g?h?g.index!==h.index?g.index<h.index?g:h:g.lastIndex>=h.lastIndex?g:h:g:h}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 g=[r[l[0]],i[l[1]],o[l[2]]],h=c(c(g[0],g[1]),g[2]);if(!h)break;if(h===g[0]?l[0]++:h===g[1]?l[1]++:l[2]++,h.index<d)continue;const p=new pm(t,h.schema,h.index,h.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),d=h.lastIndex}return n.length?n:null};Vt.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 pm(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};Vt.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(),ps(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ps(this),this)};Vt.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Vt.prototype.onCompile=function(){};const mo=2147483647,xn=36,Bc=1,hi=26,V3=38,W3=700,hm=72,mm=128,bm="-",Y3=/^xn--/,Z3=/[^\0-\x7F]/,X3=/[\x2E\u3002\uFF0E\uFF61]/g,Q3={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},va=xn-Bc,wn=Math.floor,xa=String.fromCharCode;function nr(e){throw new RangeError(Q3[e])}function J3(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ym(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(X3,".");const o=e.split("."),i=J3(o,t).join(".");return r+i}function vm(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 eA=e=>String.fromCodePoint(...e),tA=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:xn},Qd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},xm=function(e,t,n){let r=0;for(e=n?wn(e/W3):e>>1,e+=wn(e/t);e>va*hi>>1;r+=xn)e=wn(e/va);return wn(r+(va+1)*e/(e+V3))},wm=function(e){const t=[],n=e.length;let r=0,o=mm,i=hm,s=e.lastIndexOf(bm);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&nr("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=xn;;d+=xn){a>=n&&nr("invalid-input");const g=tA(e.charCodeAt(a++));g>=xn&&nr("invalid-input"),g>wn((mo-r)/l)&&nr("overflow"),r+=g*l;const h=d<=i?Bc:d>=i+hi?hi:d-i;if(g<h)break;const p=xn-h;l>wn(mo/p)&&nr("overflow"),l*=p}const c=t.length+1;i=xm(r-u,c,u==0),wn(r/c)>mo-o&&nr("overflow"),o+=wn(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},_m=function(e){const t=[];e=vm(e);const n=e.length;let r=mm,o=0,i=hm;for(const u of e)u<128&&t.push(xa(u));const s=t.length;let a=s;for(s&&t.push(bm);a<n;){let u=mo;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>wn((mo-o)/c)&&nr("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>mo&&nr("overflow"),l===r){let d=o;for(let g=xn;;g+=xn){const h=g<=i?Bc:g>=i+hi?hi:g-i;if(d<h)break;const p=d-h,b=xn-h;t.push(xa(Qd(h+p%b,0))),d=wn(p/b)}t.push(xa(Qd(d,0))),i=xm(o,c,a===s),o=0,++a}++o,++r}return t.join("")},nA=function(e){return ym(e,function(t){return Y3.test(t)?wm(t.slice(4).toLowerCase()):t})},rA=function(e){return ym(e,function(t){return Z3.test(t)?"xn--"+_m(t):t})},Em={version:"2.3.1",ucs2:{decode:vm,encode:eA},decode:wm,encode:_m,toASCII:rA,toUnicode:nA},oA={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},iA={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"]}}},sA={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"]}}},aA={default:oA,zero:iA,commonmark:sA},uA=/^(vbscript|javascript|file|data):/,cA=/^data:image\/(gif|png|jpeg|webp);/;function lA(e){const t=e.trim().toLowerCase();return uA.test(t)?cA.test(t):!0}const km=["http:","https:","mailto:"];function dA(e){const t=Nc(e,!0);if(t.hostname&&(!t.protocol||km.indexOf(t.protocol)>=0))try{t.hostname=Em.toASCII(t.hostname)}catch{}return Ei(Ic(t))}function fA(e){const t=Nc(e,!0);if(t.hostname&&(!t.protocol||km.indexOf(t.protocol)>=0))try{t.hostname=Em.toUnicode(t.hostname)}catch{}return _o(Ic(t),_o.defaultChars+"%")}function Qt(e,t){if(!(this instanceof Qt))return new Qt(e,t);t||Lc(e)||(t=e||{},e="default"),this.inline=new Ci,this.block=new Ws,this.core=new Pc,this.renderer=new Ro,this.linkify=new Vt,this.validateLink=lA,this.normalizeLink=dA,this.normalizeLinkText=fA,this.utils=hS,this.helpers=js({},vS),this.options={},this.configure(e),t&&this.set(t)}Qt.prototype.set=function(e){return js(this.options,e),this};Qt.prototype.configure=function(e){const t=this;if(Lc(e)){const n=e;if(e=aA[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};Qt.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};Qt.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};Qt.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qt.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};Qt.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qt.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Qt.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wa,Jd;function gA(){if(Jd)return wa;Jd=1;var e=!0,t=!1,n=!1;wa=function(b,m){m&&(e=!m.enabled,t=!!m.label,n=!!m.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,m,y){var v=b.attrIndex(m),x=[m,y];v<0?b.attrPush(x):b.attrs[v]=x}function o(b,m){for(var y=b[m].level-1,v=m-1;v>=0;v--)if(b[v].level===y)return v;return-1}function i(b,m){return d(b[m])&&g(b[m-1])&&h(b[m-2])&&p(b[m])}function s(b,m){if(b.children.unshift(a(b,m)),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,m))}else b.children.unshift(u(m)),b.children.push(c(m))}function a(b,m){var y=new m("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 m=new b("html_inline","",0);return m.content="<label>",m}function c(b){var m=new b("html_inline","",0);return m.content="</label>",m}function l(b,m,y){var v=new y("html_inline","",0);return v.content='<label class="task-list-item-label" for="'+m+'">'+b+"</label>",v.attrs=[{for:m}],v}function d(b){return b.type==="inline"}function g(b){return b.type==="paragraph_open"}function h(b){return b.type==="list_item_open"}function p(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return wa}var pA=gA();const hA=zc(pA);var _a,ef;function mA(){if(ef)return _a;ef=1;function e(M){return M instanceof Map?M.clear=M.delete=M.set=function(){throw new Error("map is read-only")}:M instanceof Set&&(M.add=M.clear=M.delete=function(){throw new Error("set is read-only")}),Object.freeze(M),Object.getOwnPropertyNames(M).forEach(W=>{const de=M[W],Oe=typeof de;(Oe==="object"||Oe==="function")&&!Object.isFrozen(de)&&e(de)}),M}class t{constructor(W){W.data===void 0&&(W.data={}),this.data=W.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(M){return M.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(M,...W){const de=Object.create(null);for(const Oe in M)de[Oe]=M[Oe];return W.forEach(function(Oe){for(const $e in Oe)de[$e]=Oe[$e]}),de}const o="</span>",i=M=>!!M.scope,s=(M,{prefix:W})=>{if(M.startsWith("language:"))return M.replace("language:","language-");if(M.includes(".")){const de=M.split(".");return[`${W}${de.shift()}`,...de.map((Oe,$e)=>`${Oe}${"_".repeat($e+1)}`)].join(" ")}return`${W}${M}`};class a{constructor(W,de){this.buffer="",this.classPrefix=de.classPrefix,W.walk(this)}addText(W){this.buffer+=n(W)}openNode(W){if(!i(W))return;const de=s(W.scope,{prefix:this.classPrefix});this.span(de)}closeNode(W){i(W)&&(this.buffer+=o)}value(){return this.buffer}span(W){this.buffer+=`<span class="${W}">`}}const u=(M={})=>{const W={children:[]};return Object.assign(W,M),W};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(W){this.top.children.push(W)}openNode(W){const de=u({scope:W});this.add(de),this.stack.push(de)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(W){return this.constructor._walk(W,this.rootNode)}static _walk(W,de){return typeof de=="string"?W.addText(de):de.children&&(W.openNode(de),de.children.forEach(Oe=>this._walk(W,Oe)),W.closeNode(de)),W}static _collapse(W){typeof W!="string"&&W.children&&(W.children.every(de=>typeof de=="string")?W.children=[W.children.join("")]:W.children.forEach(de=>{c._collapse(de)}))}}class l extends c{constructor(W){super(),this.options=W}addText(W){W!==""&&this.add(W)}startScope(W){this.openNode(W)}endScope(){this.closeNode()}__addSublanguage(W,de){const Oe=W.root;de&&(Oe.scope=`language:${de}`),this.add(Oe)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(M){return M?typeof M=="string"?M:M.source:null}function g(M){return b("(?=",M,")")}function h(M){return b("(?:",M,")*")}function p(M){return b("(?:",M,")?")}function b(...M){return M.map(de=>d(de)).join("")}function m(M){const W=M[M.length-1];return typeof W=="object"&&W.constructor===Object?(M.splice(M.length-1,1),W):{}}function y(...M){return"("+(m(M).capture?"":"?:")+M.map(Oe=>d(Oe)).join("|")+")"}function v(M){return new RegExp(M.toString()+"|").exec("").length-1}function x(M,W){const de=M&&M.exec(W);return de&&de.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function k(M,{joinWith:W}){let de=0;return M.map(Oe=>{de+=1;const $e=de;let Ae=d(Oe),he="";for(;Ae.length>0;){const ne=E.exec(Ae);if(!ne){he+=Ae;break}he+=Ae.substring(0,ne.index),Ae=Ae.substring(ne.index+ne[0].length),ne[0][0]==="\\"&&ne[1]?he+="\\"+String(Number(ne[1])+$e):(he+=ne[0],ne[0]==="("&&de++)}return he}).map(Oe=>`(${Oe})`).join(W)}const S=/\b\B/,I="[a-zA-Z]\\w*",C="[a-zA-Z_]\\w*",D="\\b\\d+(\\.\\d+)?",T="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",A="\\b(0b[01]+)",P="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",L=(M={})=>{const W=/^#![ ]*\//;return M.binary&&(M.begin=b(W,/.*\b/,M.binary,/\b.*/)),r({scope:"meta",begin:W,end:/$/,relevance:0,"on:begin":(de,Oe)=>{de.index!==0&&Oe.ignoreMatch()}},M)},R={begin:"\\\\[\\s\\S]",relevance:0},O={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[R]},N={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[R]},z={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/},B=function(M,W,de={}){const Oe=r({scope:"comment",begin:M,end:W,contains:[]},de);Oe.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 $e=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 Oe.contains.push({begin:b(/[ ]+/,"(",$e,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Oe},F=B("//","$"),K=B("/\\*","\\*/"),re=B("#","$"),j={scope:"number",begin:D,relevance:0},se={scope:"number",begin:T,relevance:0},Z={scope:"number",begin:A,relevance:0},G={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[R,{begin:/\[/,end:/\]/,relevance:0,contains:[R]}]},ce={scope:"title",begin:I,relevance:0},me={scope:"title",begin:C,relevance:0},ae={begin:"\\.\\s*"+C,relevance:0};var X=Object.freeze({__proto__:null,APOS_STRING_MODE:O,BACKSLASH_ESCAPE:R,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:A,COMMENT:B,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:F,C_NUMBER_MODE:se,C_NUMBER_RE:T,END_SAME_AS_BEGIN:function(M){return Object.assign(M,{"on:begin":(W,de)=>{de.data._beginMatch=W[1]},"on:end":(W,de)=>{de.data._beginMatch!==W[1]&&de.ignoreMatch()}})},HASH_COMMENT_MODE:re,IDENT_RE:I,MATCH_NOTHING_RE:S,METHOD_GUARD:ae,NUMBER_MODE:j,NUMBER_RE:D,PHRASAL_WORDS_MODE:z,QUOTE_STRING_MODE:N,REGEXP_MODE:G,RE_STARTERS_RE:P,SHEBANG:L,TITLE_MODE:ce,UNDERSCORE_IDENT_RE:C,UNDERSCORE_TITLE_MODE:me});function fe(M,W){M.input[M.index-1]==="."&&W.ignoreMatch()}function _e(M,W){M.className!==void 0&&(M.scope=M.className,delete M.className)}function Be(M,W){W&&M.beginKeywords&&(M.begin="\\b("+M.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",M.__beforeBegin=fe,M.keywords=M.keywords||M.beginKeywords,delete M.beginKeywords,M.relevance===void 0&&(M.relevance=0))}function De(M,W){Array.isArray(M.illegal)&&(M.illegal=y(...M.illegal))}function st(M,W){if(M.match){if(M.begin||M.end)throw new Error("begin & end are not supported with match");M.begin=M.match,delete M.match}}function Qe(M,W){M.relevance===void 0&&(M.relevance=1)}const ut=(M,W)=>{if(!M.beforeMatch)return;if(M.starts)throw new Error("beforeMatch cannot be used with starts");const de=Object.assign({},M);Object.keys(M).forEach(Oe=>{delete M[Oe]}),M.keywords=de.keywords,M.begin=b(de.beforeMatch,g(de.begin)),M.starts={relevance:0,contains:[Object.assign(de,{endsParent:!0})]},M.relevance=0,delete de.beforeMatch},Tt=["of","and","for","in","not","or","if","then","parent","list","value"],Wn="keyword";function Gr(M,W,de=Wn){const Oe=Object.create(null);return typeof M=="string"?$e(de,M.split(" ")):Array.isArray(M)?$e(de,M):Object.keys(M).forEach(function(Ae){Object.assign(Oe,Gr(M[Ae],W,Ae))}),Oe;function $e(Ae,he){W&&(he=he.map(ne=>ne.toLowerCase())),he.forEach(function(ne){const ve=ne.split("|");Oe[ve[0]]=[Ae,vr(ve[0],ve[1])]})}}function vr(M,W){return W?Number(W):Vr(M)?0:1}function Vr(M){return Tt.includes(M.toLowerCase())}const Wr={},nn=M=>{console.error(M)},Wt=(M,...W)=>{console.log(`WARN: ${M}`,...W)},at=(M,W)=>{Wr[`${M}/${W}`]||(console.log(`Deprecated as of ${M}. ${W}`),Wr[`${M}/${W}`]=!0)},Rn=new Error;function In(M,W,{key:de}){let Oe=0;const $e=M[de],Ae={},he={};for(let ne=1;ne<=W.length;ne++)he[ne+Oe]=$e[ne],Ae[ne+Oe]=!0,Oe+=v(W[ne-1]);M[de]=he,M[de]._emit=Ae,M[de]._multi=!0}function Yr(M){if(Array.isArray(M.begin)){if(M.skip||M.excludeBegin||M.returnBegin)throw nn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Rn;if(typeof M.beginScope!="object"||M.beginScope===null)throw nn("beginScope must be object"),Rn;In(M,M.begin,{key:"beginScope"}),M.begin=k(M.begin,{joinWith:""})}}function hn(M){if(Array.isArray(M.end)){if(M.skip||M.excludeEnd||M.returnEnd)throw nn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Rn;if(typeof M.endScope!="object"||M.endScope===null)throw nn("endScope must be object"),Rn;In(M,M.end,{key:"endScope"}),M.end=k(M.end,{joinWith:""})}}function xr(M){M.scope&&typeof M.scope=="object"&&M.scope!==null&&(M.beginScope=M.scope,delete M.scope)}function rn(M){xr(M),typeof M.beginScope=="string"&&(M.beginScope={_wrap:M.beginScope}),typeof M.endScope=="string"&&(M.endScope={_wrap:M.endScope}),Yr(M),hn(M)}function Io(M){function W(he,ne){return new RegExp(d(he),"m"+(M.case_insensitive?"i":"")+(M.unicodeRegex?"u":"")+(ne?"g":""))}class de{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ne,ve){ve.position=this.position++,this.matchIndexes[this.matchAt]=ve,this.regexes.push([ve,ne]),this.matchAt+=v(ne)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ne=this.regexes.map(ve=>ve[1]);this.matcherRe=W(k(ne,{joinWith:"|"}),!0),this.lastIndex=0}exec(ne){this.matcherRe.lastIndex=this.lastIndex;const ve=this.matcherRe.exec(ne);if(!ve)return null;const ct=ve.findIndex((Yn,Zr)=>Zr>0&&Yn!==void 0),lt=this.matchIndexes[ct];return ve.splice(0,ct),Object.assign(ve,lt)}}class Oe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ne){if(this.multiRegexes[ne])return this.multiRegexes[ne];const ve=new de;return this.rules.slice(ne).forEach(([ct,lt])=>ve.addRule(ct,lt)),ve.compile(),this.multiRegexes[ne]=ve,ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ne,ve){this.rules.push([ne,ve]),ve.type==="begin"&&this.count++}exec(ne){const ve=this.getMatcher(this.regexIndex);ve.lastIndex=this.lastIndex;let ct=ve.exec(ne);if(this.resumingScanAtSamePosition()&&!(ct&&ct.index===this.lastIndex)){const lt=this.getMatcher(0);lt.lastIndex=this.lastIndex+1,ct=lt.exec(ne)}return ct&&(this.regexIndex+=ct.position+1,this.regexIndex===this.count&&this.considerAll()),ct}}function $e(he){const ne=new Oe;return he.contains.forEach(ve=>ne.addRule(ve.begin,{rule:ve,type:"begin"})),he.terminatorEnd&&ne.addRule(he.terminatorEnd,{type:"end"}),he.illegal&&ne.addRule(he.illegal,{type:"illegal"}),ne}function Ae(he,ne){const ve=he;if(he.isCompiled)return ve;[_e,st,rn,ut].forEach(lt=>lt(he,ne)),M.compilerExtensions.forEach(lt=>lt(he,ne)),he.__beforeBegin=null,[Be,De,Qe].forEach(lt=>lt(he,ne)),he.isCompiled=!0;let ct=null;return typeof he.keywords=="object"&&he.keywords.$pattern&&(he.keywords=Object.assign({},he.keywords),ct=he.keywords.$pattern,delete he.keywords.$pattern),ct=ct||/\w+/,he.keywords&&(he.keywords=Gr(he.keywords,M.case_insensitive)),ve.keywordPatternRe=W(ct,!0),ne&&(he.begin||(he.begin=/\B|\b/),ve.beginRe=W(ve.begin),!he.end&&!he.endsWithParent&&(he.end=/\B|\b/),he.end&&(ve.endRe=W(ve.end)),ve.terminatorEnd=d(ve.end)||"",he.endsWithParent&&ne.terminatorEnd&&(ve.terminatorEnd+=(he.end?"|":"")+ne.terminatorEnd)),he.illegal&&(ve.illegalRe=W(he.illegal)),he.contains||(he.contains=[]),he.contains=[].concat(...he.contains.map(function(lt){return No(lt==="self"?he:lt)})),he.contains.forEach(function(lt){Ae(lt,ve)}),he.starts&&Ae(he.starts,ne),ve.matcher=$e(ve),ve}if(M.compilerExtensions||(M.compilerExtensions=[]),M.contains&&M.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return M.classNameAliases=r(M.classNameAliases||{}),Ae(M)}function wr(M){return M?M.endsWithParent||wr(M.starts):!1}function No(M){return M.variants&&!M.cachedVariants&&(M.cachedVariants=M.variants.map(function(W){return r(M,{variants:null},W)})),M.cachedVariants?M.cachedVariants:wr(M)?r(M,{starts:M.starts?r(M.starts):null}):Object.isFrozen(M)?r(M):M}var Mo="11.11.1";class Lo extends Error{constructor(W,de){super(W),this.name="HTMLInjectionError",this.html=de}}const H=n,oe=r,te=Symbol("nomatch"),je=7,Ne=function(M){const W=Object.create(null),de=Object.create(null),Oe=[];let $e=!0;const Ae="Could not find the language '{}', did you forget to load/include a language module?",he={disableAutodetect:!0,name:"Plain text",contains:[]};let ne={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function ve(ie){return ne.noHighlightRe.test(ie)}function ct(ie){let Ce=ie.className+" ";Ce+=ie.parentNode?ie.parentNode.className:"";const Ve=ne.languageDetectRe.exec(Ce);if(Ve){const et=Zn(Ve[1]);return et||(Wt(Ae.replace("{}",Ve[1])),Wt("Falling back to no-highlight mode for this block.",ie)),et?Ve[1]:"no-highlight"}return Ce.split(/\s+/).find(et=>ve(et)||Zn(et))}function lt(ie,Ce,Ve){let et="",mt="";typeof Ce=="object"?(et=ie,Ve=Ce.ignoreIllegals,mt=Ce.language):(at("10.7.0","highlight(lang, code, ...args) has been deprecated."),at("10.7.0",`Please use highlight(code, options) instead.
22
+ https://github.com/highlightjs/highlight.js/issues/2277`),mt=ie,et=Ce),Ve===void 0&&(Ve=!0);const sn={code:et,language:mt};Di("before:highlight",sn);const Xn=sn.result?sn.result:Yn(sn.language,sn.code,Ve);return Xn.code=sn.code,Di("after:highlight",Xn),Xn}function Yn(ie,Ce,Ve,et){const mt=Object.create(null);function sn(ge,Ee){return ge.keywords[Ee]}function Xn(){if(!Fe.keywords){Ct.addText(tt);return}let ge=0;Fe.keywordPatternRe.lastIndex=0;let Ee=Fe.keywordPatternRe.exec(tt),ze="";for(;Ee;){ze+=tt.substring(ge,Ee.index);const Ze=bn.case_insensitive?Ee[0].toLowerCase():Ee[0],Dt=sn(Fe,Ze);if(Dt){const[Nn,nb]=Dt;if(Ct.addText(ze),ze="",mt[Ze]=(mt[Ze]||0)+1,mt[Ze]<=je&&(Ii+=nb),Nn.startsWith("_"))ze+=Ee[0];else{const rb=bn.classNameAliases[Nn]||Nn;mn(Ee[0],rb)}}else ze+=Ee[0];ge=Fe.keywordPatternRe.lastIndex,Ee=Fe.keywordPatternRe.exec(tt)}ze+=tt.substring(ge),Ct.addText(ze)}function Oi(){if(tt==="")return;let ge=null;if(typeof Fe.subLanguage=="string"){if(!W[Fe.subLanguage]){Ct.addText(tt);return}ge=Yn(Fe.subLanguage,tt,!0,el[Fe.subLanguage]),el[Fe.subLanguage]=ge._top}else ge=on(tt,Fe.subLanguage.length?Fe.subLanguage:null);Fe.relevance>0&&(Ii+=ge.relevance),Ct.__addSublanguage(ge._emitter,ge.language)}function Bt(){Fe.subLanguage!=null?Oi():Xn(),tt=""}function mn(ge,Ee){ge!==""&&(Ct.startScope(Ee),Ct.addText(ge),Ct.endScope())}function Zc(ge,Ee){let ze=1;const Ze=Ee.length-1;for(;ze<=Ze;){if(!ge._emit[ze]){ze++;continue}const Dt=bn.classNameAliases[ge[ze]]||ge[ze],Nn=Ee[ze];Dt?mn(Nn,Dt):(tt=Nn,Xn(),tt=""),ze++}}function Xc(ge,Ee){return ge.scope&&typeof ge.scope=="string"&&Ct.openNode(bn.classNameAliases[ge.scope]||ge.scope),ge.beginScope&&(ge.beginScope._wrap?(mn(tt,bn.classNameAliases[ge.beginScope._wrap]||ge.beginScope._wrap),tt=""):ge.beginScope._multi&&(Zc(ge.beginScope,Ee),tt="")),Fe=Object.create(ge,{parent:{value:Fe}}),Fe}function Qc(ge,Ee,ze){let Ze=x(ge.endRe,ze);if(Ze){if(ge["on:end"]){const Dt=new t(ge);ge["on:end"](Ee,Dt),Dt.isMatchIgnored&&(Ze=!1)}if(Ze){for(;ge.endsParent&&ge.parent;)ge=ge.parent;return ge}}if(ge.endsWithParent)return Qc(ge.parent,Ee,ze)}function Xm(ge){return Fe.matcher.regexIndex===0?(tt+=ge[0],1):(ea=!0,0)}function Qm(ge){const Ee=ge[0],ze=ge.rule,Ze=new t(ze),Dt=[ze.__beforeBegin,ze["on:begin"]];for(const Nn of Dt)if(Nn&&(Nn(ge,Ze),Ze.isMatchIgnored))return Xm(Ee);return ze.skip?tt+=Ee:(ze.excludeBegin&&(tt+=Ee),Bt(),!ze.returnBegin&&!ze.excludeBegin&&(tt=Ee)),Xc(ze,ge),ze.returnBegin?0:Ee.length}function Jm(ge){const Ee=ge[0],ze=Ce.substring(ge.index),Ze=Qc(Fe,ge,ze);if(!Ze)return te;const Dt=Fe;Fe.endScope&&Fe.endScope._wrap?(Bt(),mn(Ee,Fe.endScope._wrap)):Fe.endScope&&Fe.endScope._multi?(Bt(),Zc(Fe.endScope,ge)):Dt.skip?tt+=Ee:(Dt.returnEnd||Dt.excludeEnd||(tt+=Ee),Bt(),Dt.excludeEnd&&(tt=Ee));do Fe.scope&&Ct.closeNode(),!Fe.skip&&!Fe.subLanguage&&(Ii+=Fe.relevance),Fe=Fe.parent;while(Fe!==Ze.parent);return Ze.starts&&Xc(Ze.starts,ge),Dt.returnEnd?0:Ee.length}function eb(){const ge=[];for(let Ee=Fe;Ee!==bn;Ee=Ee.parent)Ee.scope&&ge.unshift(Ee.scope);ge.forEach(Ee=>Ct.openNode(Ee))}let Ri={};function Jc(ge,Ee){const ze=Ee&&Ee[0];if(tt+=ge,ze==null)return Bt(),0;if(Ri.type==="begin"&&Ee.type==="end"&&Ri.index===Ee.index&&ze===""){if(tt+=Ce.slice(Ee.index,Ee.index+1),!$e){const Ze=new Error(`0 width match regex (${ie})`);throw Ze.languageName=ie,Ze.badRule=Ri.rule,Ze}return 1}if(Ri=Ee,Ee.type==="begin")return Qm(Ee);if(Ee.type==="illegal"&&!Ve){const Ze=new Error('Illegal lexeme "'+ze+'" for mode "'+(Fe.scope||"<unnamed>")+'"');throw Ze.mode=Fe,Ze}else if(Ee.type==="end"){const Ze=Jm(Ee);if(Ze!==te)return Ze}if(Ee.type==="illegal"&&ze==="")return tt+=`
23
+ `,1;if(Js>1e5&&Js>Ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return tt+=ze,ze.length}const bn=Zn(ie);if(!bn)throw nn(Ae.replace("{}",ie)),new Error('Unknown language: "'+ie+'"');const tb=Io(bn);let Qs="",Fe=et||tb;const el={},Ct=new ne.__emitter(ne);eb();let tt="",Ii=0,_r=0,Js=0,ea=!1;try{if(bn.__emitTokens)bn.__emitTokens(Ce,Ct);else{for(Fe.matcher.considerAll();;){Js++,ea?ea=!1:Fe.matcher.considerAll(),Fe.matcher.lastIndex=_r;const ge=Fe.matcher.exec(Ce);if(!ge)break;const Ee=Ce.substring(_r,ge.index),ze=Jc(Ee,ge);_r=ge.index+ze}Jc(Ce.substring(_r))}return Ct.finalize(),Qs=Ct.toHTML(),{language:ie,value:Qs,relevance:Ii,illegal:!1,_emitter:Ct,_top:Fe}}catch(ge){if(ge.message&&ge.message.includes("Illegal"))return{language:ie,value:H(Ce),illegal:!0,relevance:0,_illegalBy:{message:ge.message,index:_r,context:Ce.slice(_r-100,_r+100),mode:ge.mode,resultSoFar:Qs},_emitter:Ct};if($e)return{language:ie,value:H(Ce),illegal:!1,relevance:0,errorRaised:ge,_emitter:Ct,_top:Fe};throw ge}}function Zr(ie){const Ce={value:H(ie),illegal:!1,relevance:0,_top:he,_emitter:new ne.__emitter(ne)};return Ce._emitter.addText(ie),Ce}function on(ie,Ce){Ce=Ce||ne.languages||Object.keys(W);const Ve=Zr(ie),et=Ce.filter(Zn).filter(Yc).map(Bt=>Yn(Bt,ie,!1));et.unshift(Ve);const mt=et.sort((Bt,mn)=>{if(Bt.relevance!==mn.relevance)return mn.relevance-Bt.relevance;if(Bt.language&&mn.language){if(Zn(Bt.language).supersetOf===mn.language)return 1;if(Zn(mn.language).supersetOf===Bt.language)return-1}return 0}),[sn,Xn]=mt,Oi=sn;return Oi.secondBest=Xn,Oi}function Si(ie,Ce,Ve){const et=Ce&&de[Ce]||Ve;ie.classList.add("hljs"),ie.classList.add(`language-${et}`)}function Xr(ie){let Ce=null;const Ve=ct(ie);if(ve(Ve))return;if(Di("before:highlightElement",{el:ie,language:Ve}),ie.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ie);return}if(ie.children.length>0&&(ne.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(ie)),ne.throwUnescapedHTML))throw new Lo("One of your code blocks includes unescaped HTML.",ie.innerHTML);Ce=ie;const et=Ce.textContent,mt=Ve?lt(et,{language:Ve,ignoreIllegals:!0}):on(et);ie.innerHTML=mt.value,ie.dataset.highlighted="yes",Si(ie,Ve,mt.language),ie.result={language:mt.language,re:mt.relevance,relevance:mt.relevance},mt.secondBest&&(ie.secondBest={language:mt.secondBest.language,relevance:mt.secondBest.relevance}),Di("after:highlightElement",{el:ie,result:mt,text:et})}function Ai(ie){ne=oe(ne,ie)}const Km=()=>{Ti(),at("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function qm(){Ti(),at("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Vc=!1;function Ti(){function ie(){Ti()}if(document.readyState==="loading"){Vc||window.addEventListener("DOMContentLoaded",ie,!1),Vc=!0;return}document.querySelectorAll(ne.cssSelector).forEach(Xr)}function Hm(ie,Ce){let Ve=null;try{Ve=Ce(M)}catch(et){if(nn("Language definition for '{}' could not be registered.".replace("{}",ie)),$e)nn(et);else throw et;Ve=he}Ve.name||(Ve.name=ie),W[ie]=Ve,Ve.rawDefinition=Ce.bind(null,M),Ve.aliases&&Wc(Ve.aliases,{languageName:ie})}function jm(ie){delete W[ie];for(const Ce of Object.keys(de))de[Ce]===ie&&delete de[Ce]}function Gm(){return Object.keys(W)}function Zn(ie){return ie=(ie||"").toLowerCase(),W[ie]||W[de[ie]]}function Wc(ie,{languageName:Ce}){typeof ie=="string"&&(ie=[ie]),ie.forEach(Ve=>{de[Ve.toLowerCase()]=Ce})}function Yc(ie){const Ce=Zn(ie);return Ce&&!Ce.disableAutodetect}function Vm(ie){ie["before:highlightBlock"]&&!ie["before:highlightElement"]&&(ie["before:highlightElement"]=Ce=>{ie["before:highlightBlock"](Object.assign({block:Ce.el},Ce))}),ie["after:highlightBlock"]&&!ie["after:highlightElement"]&&(ie["after:highlightElement"]=Ce=>{ie["after:highlightBlock"](Object.assign({block:Ce.el},Ce))})}function Wm(ie){Vm(ie),Oe.push(ie)}function Ym(ie){const Ce=Oe.indexOf(ie);Ce!==-1&&Oe.splice(Ce,1)}function Di(ie,Ce){const Ve=ie;Oe.forEach(function(et){et[Ve]&&et[Ve](Ce)})}function Zm(ie){return at("10.7.0","highlightBlock will be removed entirely in v12.0"),at("10.7.0","Please use highlightElement now."),Xr(ie)}Object.assign(M,{highlight:lt,highlightAuto:on,highlightAll:Ti,highlightElement:Xr,highlightBlock:Zm,configure:Ai,initHighlighting:Km,initHighlightingOnLoad:qm,registerLanguage:Hm,unregisterLanguage:jm,listLanguages:Gm,getLanguage:Zn,registerAliases:Wc,autoDetection:Yc,inherit:oe,addPlugin:Wm,removePlugin:Ym}),M.debugMode=function(){$e=!1},M.safeMode=function(){$e=!0},M.versionString=Mo,M.regex={concat:b,lookahead:g,either:y,optional:p,anyNumberOfTimes:h};for(const ie in X)typeof X[ie]=="object"&&e(X[ie]);return Object.assign(M,X),M},Ge=Ne({});return Ge.newInstance=()=>Ne({}),_a=Ge,Ge.HighlightJS=Ge,Ge.default=Ge,_a}var Ea,tf;function bA(){if(tf)return Ea;tf=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 Ea=e,Ea}var ka,nf;function yA(){if(nf)return ka;nf=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:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=t.SHEBANG({binary:`(${h.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},m=["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"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["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:m,literal:y,built_in:[...x,...E,"set","shopt",...k,...S]},contains:[p,t.SHEBANG(),b,g,s,a,v,u,c,l,d,r]}}return ka=e,ka}var Ca,rf;function vA(){if(rf)return Ca;rf=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},g={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]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=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=[g,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},E={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(h,{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,g]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(x,E,v,[g,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:g,strings:l,keywords:y}}}return Ca=e,Ca}var Sa,of;function xA(){if(of)return Sa;of=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},g={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]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=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"],m=["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"],k={type:m,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*\(/))},I=[S,g,u,r,t.C_BLOCK_COMMENT_MODE,d,l],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:I.concat([{begin:/\(/,end:/\)/,keywords:k,contains:I.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:k,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,D,S,I,[g,{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:k,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return Sa=e,Sa}var Aa,sf;function wA(){if(sf)return Aa;sf=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:'""'}]},g=t.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=t.inherit(h,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},y=t.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[m,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],p.contains=[y,b,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[l,m,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",k={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:"("+E+"\\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]},k]}}return Aa=e,Aa}var Ta,af;function _A(){if(af)return Ta;af=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),g={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},h="and or not only",p=/@-?\w[\w]*(-\w+)*/,b="[a-zA-Z-][a-zA-Z0-9_-]*",m=[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,g,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,...m,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...m,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...m,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return Ta=u,Ta}var Da,uf;function EA(){if(uf)return Da;uf=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}]},g=t.inherit(l,{contains:[]}),h=t.inherit(d,{contains:[]});l.contains.push(h),d.contains.push(g);let p=[r,c];return[l,d,g,h].forEach(v=>{v.contains=v.contains.concat(p)}),p=p.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Da=e,Da}var Oa,cf;function kA(){if(cf)return Oa;cf=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 Oa=e,Oa}var Ra,lf;function CA(){if(lf)return Ra;lf=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},g={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]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${p}))?([eE][+-]?(${p})|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"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},I=[g,{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:[m]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{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=I,m.contains=I;const A=[{begin:/^\s*=>/,starts:{end:"$",contains:I}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:I}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(A).concat(l).concat(I)}}return Ra=e,Ra}var Ia,df;function SA(){if(df)return Ia;df=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 Ia=e,Ia}var Na,ff;function AA(){if(ff)return Na;ff=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 Na=e,Na}var Ma,gf;function TA(){if(gf)return Ma;gf=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=/'[^']*'/,g=n.either(c,l,d),h=n.concat(g,"(\\s*\\.\\s*",g,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Ma=e,Ma}var La,pf;function DA(){if(pf)return La;pf=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),p={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"]}]},m={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,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:[m,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:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,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 La=i,La}var $a,hf;function OA(){if(hf)return $a;hf=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=(me,{after:ae})=>{const we="</"+me[0].slice(1);return me.input.indexOf(we,ae)!==-1},g=e,h={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(me,ae)=>{const we=me[0].length+me.index,X=me.input[we];if(X==="<"||X===","){ae.ignoreMatch();return}X===">"&&(d(me,{after:we})||ae.ignoreMatch());let fe;const _e=me.input.substring(we);if(fe=_e.match(/^\s*=/)){ae.ignoreMatch();return}if((fe=_e.match(/^\s+extends\s+/))&&fe.index===0){ae.ignoreMatch();return}}},m={$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]*",E={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},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},I={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,k],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,k]},A={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:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},P=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,I,C,D,{match:/\$\d+/},E];k.contains=P.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(P)});const L=[].concat(A,k.contains),R=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(L)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:R},N={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,l.concat(g,"(",l.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},z={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]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function re(me){return l.concat("(?!",me.join("|"),")")}const j={match:l.concat(/\b/,re([...i,"super","import"].map(me=>`${me}\\s*\\(`)),g,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:l.concat(/\./,l.lookahead(l.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,I,C,D,A,{match:/\$\d+/},E,z,{scope:"attr",match:g+l.lookahead(":"),relevance:0},ce,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,c.REGEXP_MODE,{className:"function",begin:G,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:m,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:h.begin,end:h.end},{match:p},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,c.inherit(c.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},j,K,N,Z,{match:/\$[(.]/}]}}return $a=u,$a}var Pa,mf;function RA(){if(mf)return Pa;mf=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 Pa=e,Pa}var Fa,bf;function IA(){if(bf)return Fa;bf=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 g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},p=r,b=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=m;return y.variants[1].contains=[m],m.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,g,h,{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:[m,i.C_LINE_COMMENT_MODE,b],relevance:0},i.C_LINE_COMMENT_MODE,b,g,h,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},g,h]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
24
+ `},p]}}return Fa=o,Fa}var Ba,yf;function NA(){if(yf)return Ba;yf=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),g=u,h="and or not only",p="[\\w-]+",b="("+p+"|@\\{"+p+"\\})",m=[],y=[],v=function(L){return{className:"string",begin:"~?"+L+".*?"+L}},x=function(L,R,O){return{className:L,begin:R,relevance:O}},E={$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},k={begin:"\\(",end:"\\)",contains:y,keywords:E,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,k,x("variable","@@?"+p,10),x("variable","@\\{"+p+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const S=y.concat({begin:/\{/,end:/\}/,contains:m}),I={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},C={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}}]},D={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:y,relevance:0}},T={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:S}},A={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,I,x("keyword","all\\b"),x("variable","@\\{"+p+"\\}"),{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]},P={begin:p+`:(:)?(${g.join("|")})`,returnBegin:!0,contains:[A]};return m.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,D,T,P,C,A,I,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:m}}return Ba=c,Ba}var za,vf;function MA(){if(vf)return za;vf=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 za=e,za}var Ua,xf;function LA(){if(xf)return Ua;xf=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 Ua=e,Ua}var Ka,wf;function $A(){if(wf)return Ka;wf=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],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(m,y,v="\\1")=>{const x=v==="\\1"?v:n.concat(v,y);return n.concat(n.concat("(?:",m,")"),y,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,v,o)},p=(m,y,v)=>n.concat(n.concat("(?:",m,")"),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:h("s|tr|y",n.either(...g,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("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 Ka=e,Ka}var qa,_f;function PA(){if(_f)return qa;_f=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 qa=e,qa}var Ha,Ef;function FA(){if(Ef)return Ha;Ef=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)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(O,N)=>{N.data._beginMatch=O[1]||O[2]},"on:end":(O,N)=>{N.data._beginMatch!==O[1]&&N.ignoreMatch()}},h=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
25
+ ]`,b={scope:"string",variants:[d,l,g,h]},m={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"],k={keyword:v,literal:(O=>{const N=[];return O.forEach(z=>{N.push(z),z.toLowerCase()===z?N.push(z.toUpperCase()):N.push(z.toLowerCase())}),N})(y),built_in:x},S=O=>O.map(N=>N.replace(/\|\d+$/,"")),I={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",S(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},C=n.concat(o,"\\b(?!\\()"),D={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),C],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"}}]},T={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},A={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[T,a,D,t.C_BLOCK_COMMENT_MODE,b,m,I]},P={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",S(v).join("\\b|"),"|",S(x).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[A]};A.contains.push(P);const L=[T,D,t.C_BLOCK_COMMENT_MODE,b,m,I],R={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",...L]},...L,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:k,contains:[R,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,P,D,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},I,{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:k,contains:["self",R,a,D,t.C_BLOCK_COMMENT_MODE,b,m]}]},{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,m]}}return Ha=e,Ha}var ja,kf;function BA(){if(kf)return ja;kf=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 ja=e,ja}var Ga,Cf;function zA(){if(Cf)return Ga;Cf=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Ga=e,Ga}var Va,Sf;function UA(){if(Sf)return Va;Sf=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},g={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]},h="[0-9](_?[0-9])*",p=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,b=`\\b|${o.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${p}))[eE][+-]?(${h})[jJ]?(?=${b})`},{begin:`(${p})[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(${h})[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,m,g,t.HASH_COMMENT_MODE]}]};return l.contains=[g,m,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,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:[m,v,g]}]}}return Va=e,Va}var Wa,Af;function KA(){if(Af)return Wa;Af=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Wa=e,Wa}var Ya,Tf;function qA(){if(Tf)return Ya;Tf=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 Ya=e,Ya}var Za,Df;function HA(){if(Df)return Za;Df=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 Za=e,Za}var Xa,Of;function jA(){if(Of)return Xa;Of=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,g=i,h="@[a-z-]+",p="and or not only",m={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:":("+g.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},m,{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,m,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:h,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:h,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},m,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return Xa=u,Xa}var Qa,Rf;function GA(){if(Rf)return Qa;Rf=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 Qa=e,Qa}var Ja,If;function VA(){if(If)return Ja;If=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"],g=["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"],h=["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"],p=d,b=[...l,...c].filter(S=>!d.includes(S)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:n.concat(/\b/,n.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(S){return n.concat(/\b/,n.either(...S.map(I=>I.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:x(h),relevance:0};function k(S,{exceptions:I,when:C}={}){const D=C;return I=I||[],S.map(T=>T.match(/\|\d+$/)||I.includes(T)?T:D(T)?`${T}|0`:T)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(b,{when:S=>S.length<3}),literal:s,type:u,built_in:g},contains:[{scope:"type",match:x(a)},E,v,m,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return Ja=e,Ja}var eu,Nf;function WA(){if(Nf)return eu;Nf=1;function e(C){return C?typeof C=="string"?C:C.source:null}function t(C){return n("(?=",C,")")}function n(...C){return C.map(T=>e(T)).join("")}function r(C){const D=C[C.length-1];return typeof D=="object"&&D.constructor===Object?(C.splice(C.length-1,1),D):{}}function o(...C){return"("+(r(C).capture?"":"?:")+C.map(A=>e(A)).join("|")+")"}const i=C=>n(/\b/,C,/\w$/.test(C)?/\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"],g=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],h=["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"],p=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(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),m=n(p,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,"*"),E=n(/[A-Z]/,v,"*"),k=["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 I(C){const D={match:/\s+/,relevance:0},T=C.COMMENT("/\\*","\\*/",{contains:["self"]}),A=[C.C_LINE_COMMENT_MODE,T],P={match:[/\./,o(...s,...a)],className:{2:"keyword"}},L={match:n(/\./,o(...c)),relevance:0},R=c.filter(te=>typeof te=="string").concat(["_|0"]),O=c.filter(te=>typeof te!="string").concat(u).map(i),N={variants:[{className:"keyword",match:o(...O,...a)}]},z={$pattern:o(/\b\w+/,/#\w+/),keyword:R.concat(g),literal:l},B=[P,L,N],F={match:n(/\./,o(...h)),relevance:0},K={className:"built_in",match:n(/\b/,o(...h),/(?=\()/)},re=[F,K],j={match:/->/,relevance:0},se={className:"operator",relevance:0,variants:[{match:m},{match:`\\.(\\.|${b})+`}]},Z=[j,se],G="([0-9]_*)+",ce="([0-9a-fA-F]_*)+",me={className:"number",relevance:0,variants:[{match:`\\b(${G})(\\.(${G}))?([eE][+-]?(${G}))?\\b`},{match:`\\b0x(${ce})(\\.(${ce}))?([pP][+-]?(${G}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ae=(te="")=>({className:"subst",variants:[{match:n(/\\/,te,/[0\\tnr"']/)},{match:n(/\\/,te,/u\{[0-9a-fA-F]{1,8}\}/)}]}),we=(te="")=>({className:"subst",match:n(/\\/,te,/[\t ]*(?:[\r\n]|\r\n)/)}),X=(te="")=>({className:"subst",label:"interpol",begin:n(/\\/,te,/\(/),end:/\)/}),fe=(te="")=>({begin:n(te,/"""/),end:n(/"""/,te),contains:[ae(te),we(te),X(te)]}),_e=(te="")=>({begin:n(te,/"/),end:n(/"/,te),contains:[ae(te),X(te)]}),Be={className:"string",variants:[fe(),fe("#"),fe("##"),fe("###"),_e(),_e("#"),_e("##"),_e("###")]},De=[C.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[C.BACKSLASH_ESCAPE]}],st={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:De},Qe=te=>{const je=n(te,/\//),Ne=n(/\//,te);return{begin:je,end:Ne,contains:[...De,{scope:"comment",begin:`#(?!.*${Ne})`,end:/$/}]}},ut={scope:"regexp",variants:[Qe("###"),Qe("##"),Qe("#"),st]},Tt={match:n(/`/,x,/`/)},Wn={className:"variable",match:/\$\d+/},Gr={className:"variable",match:`\\$${v}+`},vr=[Tt,Wn,Gr],Vr={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:S,contains:[...Z,me,Be]}]}},Wr={scope:"keyword",match:n(/@/,o(...k),t(o(/\(/,/\s+/)))},nn={scope:"meta",match:n(/@/,x)},Wt=[Vr,Wr,nn],at={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:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(E)),relevance:0}]},Rn={begin:/</,end:/>/,keywords:z,contains:[...A,...B,...Wt,j,at]};at.contains.push(Rn);const In={match:n(x,/\s*:/),keywords:"_|0",relevance:0},Yr={begin:/\(/,end:/\)/,relevance:0,keywords:z,contains:["self",In,...A,ut,...B,...re,...Z,me,Be,...vr,...Wt,at]},hn={begin:/</,end:/>/,keywords:"repeat each",contains:[...A,at]},xr={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}]},rn={begin:/\(/,end:/\)/,keywords:z,contains:[xr,...A,...B,...Z,me,Be,...Wt,at,Yr],endsParent:!0,illegal:/["']/},Io={match:[/(func|macro)/,/\s+/,o(Tt.match,x,m)],className:{1:"keyword",3:"title.function"},contains:[hn,rn,D],illegal:[/\[/,/%/]},wr={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[hn,rn,D],illegal:/\[|%/},No={match:[/operator/,/\s+/,m],className:{1:"keyword",3:"title"}},Mo={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[at],keywords:[...d,...l],end:/}/},Lo={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},H={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:z,contains:[hn,...B,{begin:/:/,end:/\{/,keywords:z,contains:[{scope:"title.class.inherited",match:E},...B],relevance:0}]};for(const te of Be.variants){const je=te.contains.find(Ge=>Ge.label==="interpol");je.keywords=z;const Ne=[...B,...re,...Z,me,Be,...vr];je.contains=[...Ne,{begin:/\(/,end:/\)/,contains:["self",...Ne]}]}return{name:"Swift",keywords:z,contains:[...A,Io,wr,Lo,H,oe,No,Mo,{beginKeywords:"import",end:/$/,contains:[...A],relevance:0},ut,...B,...re,...Z,me,Be,...vr,...Wt,at,Yr]}}return eu=I,eu}var tu,Mf;function YA(){if(Mf)return tu;Mf=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,{}[\]]+/}]}),h={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"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},b={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],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}},h,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,m,s,a],v=[...y];return v.pop(),v.push(u),p.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return tu=e,tu}var nu,Lf;function ZA(){if(Lf)return nu;Lf=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,g=(ae,{after:we})=>{const X="</"+ae[0].slice(1);return ae.input.indexOf(X,we)!==-1},h=e,p={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,we)=>{const X=ae[0].length+ae.index,fe=ae.input[X];if(fe==="<"||fe===","){we.ignoreMatch();return}fe===">"&&(g(ae,{after:X})||we.ignoreMatch());let _e;const Be=ae.input.substring(X);if(_e=Be.match(/^\s*=/)){we.ignoreMatch();return}if((_e=Be.match(/^\s+extends\s+/))&&_e.index===0){we.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",x=`\\.(${v})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",k={className:"number",variants:[{begin:`(\\b(${E})((${x})|\\.)?|(${x}))[eE][+-]?(${v})\\b`},{begin:`\\b(${E})\\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:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},C={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"css"}},D={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,S]},P={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:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},L=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,I,C,D,T,{match:/\$\d+/},k];S.contains=L.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(L)});const R=[].concat(P,S.contains),O=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(R)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:O},z={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,d.concat(h,"(",d.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},B={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]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},re={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function j(ae){return d.concat("(?!",ae.join("|"),")")}const se={match:d.concat(/\b/,j([...i,"super","import"].map(ae=>`${ae}\\s*\\(`)),h,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:d.concat(/\./,d.lookahead(d.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},G={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},ce="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ce)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,I,C,D,T,P,{match:/\$\d+/},k,B,{scope:"attr",match:h+d.lookahead(":"),relevance:0},me,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[P,l.REGEXP_MODE,{className:"function",begin:ce,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:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:b},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,l.inherit(l.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},se,re,z,G,{match:/\$[(.]/}]}}function c(l){const d=l.regex,g=u(l),h=e,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},m={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[g.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(p),"variable.language":s},E={className:"meta",begin:"@"+h},k=(D,T,A)=>{const P=D.contains.findIndex(L=>L.label===T);if(P===-1)throw new Error("can not find mode to replace");D.contains.splice(P,1,A)};Object.assign(g.keywords,x),g.exports.PARAMS_CONTAINS.push(E);const S=g.contains.find(D=>D.scope==="attr"),I=Object.assign({},S,{match:d.concat(h,d.lookahead(/\s*\?:/))});g.exports.PARAMS_CONTAINS.push([g.exports.CLASS_REFERENCE,S,I]),g.contains=g.contains.concat([E,b,m,I]),k(g,"shebang",l.SHEBANG()),k(g,"use_strict",y);const C=g.contains.find(D=>D.label==="func.def");return C.relevance=0,Object.assign(g,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),g}return nu=c,nu}var ru,$f;function XA(){if($f)return ru;$f=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+:/},g=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=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,g,h,{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:[h]}]}}return ru=e,ru}var ou,Pf;function QA(){if(Pf)return ou;Pf=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 ou=e,ou}var iu,Ff;function JA(){if(Ff)return iu;Ff=1;var e=mA();return e.registerLanguage("xml",bA()),e.registerLanguage("bash",yA()),e.registerLanguage("c",vA()),e.registerLanguage("cpp",xA()),e.registerLanguage("csharp",wA()),e.registerLanguage("css",_A()),e.registerLanguage("markdown",EA()),e.registerLanguage("diff",kA()),e.registerLanguage("ruby",CA()),e.registerLanguage("go",SA()),e.registerLanguage("graphql",AA()),e.registerLanguage("ini",TA()),e.registerLanguage("java",DA()),e.registerLanguage("javascript",OA()),e.registerLanguage("json",RA()),e.registerLanguage("kotlin",IA()),e.registerLanguage("less",NA()),e.registerLanguage("lua",MA()),e.registerLanguage("makefile",LA()),e.registerLanguage("perl",$A()),e.registerLanguage("objectivec",PA()),e.registerLanguage("php",FA()),e.registerLanguage("php-template",BA()),e.registerLanguage("plaintext",zA()),e.registerLanguage("python",UA()),e.registerLanguage("python-repl",KA()),e.registerLanguage("r",qA()),e.registerLanguage("rust",HA()),e.registerLanguage("scss",jA()),e.registerLanguage("shell",GA()),e.registerLanguage("sql",VA()),e.registerLanguage("swift",WA()),e.registerLanguage("yaml",YA()),e.registerLanguage("typescript",ZA()),e.registerLanguage("vbnet",XA()),e.registerLanguage("wasm",QA()),e.HighlightJS=e,e.default=e,iu=e,iu}var eT=JA();const Bf=zc(eT),pn=new Qt({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&Bf.getLanguage(t))try{const n=Bf.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),tT=/^<\/?(?:details|summary)>$/i,nT=/^<details\s+open\s*>$/i,rT=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function oT(e){return tT.test(e)||nT.test(e)||rT.test(e)}function Cm(e){const t=pn.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+=oT(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}pn.renderer.rules.html_block=(e,t)=>Cm(e[t].content);pn.renderer.rules.html_inline=(e,t)=>Cm(e[t].content);const iT=pn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),zf=pn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),sT=pn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Sm(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 aT(e){return e.replace(/:\d+(?::\d+)?$/,"")}function uT(e){const n=aT(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function cT(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))&&uT(e)}function su(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function io(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}pn.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]=Sm(u[1],s,i?.projectId))}return iT(e,t,n,r,o)};pn.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&&cT(a[1])){const c=a[1];return su(s,"href"),su(s,"target"),su(s,"rel"),io(s,"role","button"),io(s,"tabindex","0"),io(s,"data-file-link","true"),io(s,"data-file-path",c),i.fileLinkTitle&&(io(s,"title",i.fileLinkTitle),io(s,"aria-label",i.fileLinkTitle)),zf(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Sm(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 zf(e,t,n,r,o)};pn.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 sT(e,t,n,r,o)};pn.use(hA,{enabled:!1,label:!1});function Uc(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),pn.render(e,n)}function lT(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const dT="modulepreload",fT=function(e){return"/"+e},Uf={},gT=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=fT(c),c in Uf)return;Uf[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":dT,l||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),l)return new Promise((h,p)=>{g.addEventListener("load",h),g.addEventListener("error",()=>p(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 au=null,Kf=Promise.resolve();const qu=new WeakMap,Gi=new WeakMap;let lo=null;const qf=96,Am=.25,pT=8,hT=2.5;async function mT(){return au||(au=gT(()=>import("./mermaid.core-bsNbTKFB.js").then(e=>e.bp),[]).then(e=>e.default)),au}function bT(){return Yg()==="dark"?"dark":"default"}function uu(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function yT(e){const t=(qu.get(e)??0)+1;return qu.set(e,t),t}function cu(e,t){return qu.get(e)===t}async function vT(e){const t=Kf.then(e,e);Kf=t.catch(()=>{}),await t}function Tm(e,t,n){return Math.min(n,Math.max(t,e))}function Vi(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Hf(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function xT(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Hf(e.getAttribute("width"))??0,height:Hf(e.getAttribute("height"))??0}}function wT(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-qf,n.width*.5),o=Math.max(n.height-qf,n.height*.5),i=Math.min(r/e.width,o/e.height);return Tm(i,Am,hT)}function Vo(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function Dm(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function _T(e,t){if(Dm(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function ET(e,t){lo?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",_("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=Vo("mermaid-overlay__button",_("mermaid.zoomOut"),"-"),c=Vo("mermaid-overlay__button",_("mermaid.zoomIn"),"+"),l=Vo("mermaid-overlay__button",_("mermaid.reset"),"1:1"),d=Vo("mermaid-overlay__button",_("mermaid.close"),"x");a.append(u,c,l,d);const g=document.createElement("div");g.className="mermaid-overlay__viewport";const h=document.createElement("div");h.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),h.appendChild(t),g.appendChild(h),s.append(a,g),document.body.appendChild(s);const p=xT(t),b=wT(p,g);let m=b,y=0,v=0,x=!1,E=0,k=0,S=0,I=0;const C=()=>{h.style.transform=`translate(${Vi(y)}px, ${Vi(v)}px)`},D=()=>{p.width<=0||p.height<=0||(t.style.width=`${Vi(p.width*m)}px`,t.style.height=`${Vi(p.height*m)}px`)},T=()=>{D(),C()},A=(F,K,re)=>{const j=g.getBoundingClientRect(),se=K===void 0?j.width/2:K-j.left,Z=re===void 0?j.height/2:re-j.top,G=j.width/2,ce=j.height/2,me=m;m=Tm(F,Am,pT),y=se-G-(se-G-y)/me*m,v=Z-ce-(Z-ce-v)/me*m,T()},P=()=>{m=b,y=p.width>0?-(p.width*m)/2:0,v=p.height>0?-(p.height*m)/2:0,T()},L=()=>{if(document.removeEventListener("keydown",B),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const F=r?.parentNode===n?r:null;n.insertBefore(t,F)}s.remove(),lo?.close===L&&(lo=null)},R=F=>{F.preventDefault();const K=F.deltaY>0?.9:1.1;A(m*K,F.clientX,F.clientY)},O=F=>{F.button===0&&(x=!0,E=F.clientX,k=F.clientY,S=y,I=v,g.setPointerCapture(F.pointerId),g.classList.add("is-dragging"))},N=F=>{x&&(y=S+F.clientX-E,v=I+F.clientY-k,C())},z=F=>{x&&(x=!1,g.classList.remove("is-dragging"),g.hasPointerCapture(F.pointerId)&&g.releasePointerCapture(F.pointerId))},B=F=>{F.key==="Escape"&&L()};return u.addEventListener("click",()=>A(m/1.2)),c.addEventListener("click",()=>A(m*1.2)),l.addEventListener("click",P),d.addEventListener("click",L),g.addEventListener("wheel",R,{passive:!1}),g.addEventListener("pointerdown",O),g.addEventListener("pointermove",N),g.addEventListener("pointerup",z),g.addEventListener("pointercancel",z),document.addEventListener("keydown",B),lo={host:e,sourceSvg:t,close:L},P(),d.focus(),L}function kT(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=_T(n,e);if(!r)return;const{host:o}=r,i=Gi.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=Vo("mermaid-fullscreen-button",_("mermaid.maximize"),"⤢"),a=()=>{const c=Dm(n)&&n.isConnected?n:o.querySelector("svg");c&&ET(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{lo?.host===o&&lo.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),Gi.get(o)?.button===s&&Gi.delete(o)};Gi.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function CT(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=yT(e),n=await mT();if(!cu(e,t))return()=>{};if(await uu(),!cu(e,t))return()=>{};let r=()=>{};function o(){r(),r=kT(e)}async function i(c){const l=c.filter(d=>d.isConnected&&e.contains(d));l.length!==0&&await vT(async()=>{if(!cu(e,t))return;const d=l.filter(h=>h.isConnected&&e.contains(h));if(d.length===0)return;const g=bT();n.initialize({startOnLoad:!1,theme:g}),r(),r=()=>{},d.forEach(h=>{const p=h.getAttribute("data-mermaid-source");p&&(h.removeAttribute("data-processed"),h.textContent=p)});try{await n.run({nodes:d}),await uu(),o()}catch(h){console.error("[mermaid] render error:",h)}})}const s=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await i(s),await uu(),o();const a=()=>void i(Array.from(e.querySelectorAll(".mermaid"))),u=new window.MutationObserver(a);return u.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{r(),u.disconnect()}}function ST(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 AT(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function TT(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(!AT(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=ST(u.startContainer,e),g=_("selection.noSection"),h=d&&d.textContent?.trim()||g;i=c,t({text:c,rect:l,sectionPath:h})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const DT=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,OT=/^##\s+/,RT=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,IT=/^\d+\.\s+(.*\S)\s*$/,NT=/^\s*$/,jf=/\s*[((]推荐[))]\s*$/,Gf=/\s*(自由文本)\s*$/,MT=/^\[(choice|confirm)\]\s*/i,LT=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,$T=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function PT(e){const t=e.split(`
26
+ `);let n=0;for(;n<t.length&&!DT.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(OT.test(i))break;const s=UT(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>FT(i,s))}function FT(e,t){const n=MT.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Gf.test(o),s=i?o.replace(Gf,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=BT(e.bodyLines);return{id:Vf(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=zT(e.bodyLines,t,s),u=i||a.length===0;return{id:Vf(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function BT(e){let t,n;for(const r of e){const o=r.trim(),i=LT.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=$T.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function zT(e,t,n){const r=[];let o=0;for(const i of e){if(NT.test(i))continue;const s=KT(i);if(s===null)continue;const a=jf.test(s),u=a?s.replace(jf,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:qT(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function UT(e){const t=RT.exec(e);return t?t[1]:null}function KT(e){const t=IT.exec(e);return t?t[1]:null}function Vf(e,t){return`q-${e}-${Om(t)}`}function qT(e,t,n){return`q-${e}-o-${t}-${Om(n)}`}function Om(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 HT=U('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const jT=36,GT=140,VT=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-jT-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-GT-8);return{top:i,left:s,visible:!0}};return f(V,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=HT();return o.$$mousedown=i=>i.preventDefault(),w(o,f(ke,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return _("selectionMenu.annotate")}}),null),w(o,f(ke,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return _("selectionMenu.explain")}}),null),Le(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Jo(o,"top",i.e=s),a!==i.t&&Jo(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};Jt(["mousedown"]);var WT=U('<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">'),YT=U('<p class="text-destructive ">');const ZT=500,tr=8,XT=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 g=a()||260,h=window.innerHeight,p=d.rect.bottom+tr,b=d.rect.top-tr-g;let m;p+g<=h-tr?m=p:b>=tr?m=b:m=Math.max(tr,h-g-tr);const y=Math.min(Math.max(tr,d.rect.left),window.innerWidth-ZT-tr);return{top:m,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(g){s(g.message)}finally{o(!1)}}}return f(V,{get when(){return J(()=>!!e.open)()&&e.snap},get children(){var d=WT(),g=d.firstChild,h=g.firstChild,p=g.nextSibling,b=p.firstChild,m=b.nextSibling,y=m.nextSibling,v=y.nextSibling,x=v.nextSibling;x.nextSibling;var E=p.nextSibling,k=E.firstChild;return d.$$mousedown=S=>S.stopPropagation(),lr(S=>{queueMicrotask(()=>{S.offsetHeight!==a()&&u(S.offsetHeight)})},d),w(h,()=>_("annotate.title")),w(b,()=>e.snap?.sectionPath),w(p,()=>_("annotate.inSection"),y),w(p,()=>(e.snap?.text??"").slice(0,200),x),E.addEventListener("submit",l),w(E,f(yo,{rows:3,get value(){return t()},onInput:S=>n(S.currentTarget.value),get placeholder(){return _("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),k),w(E,(()=>{var S=J(()=>!!i());return()=>S()&&(()=>{var I=YT();return w(I,i),I})()})(),k),w(k,f(ke,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return _("common.cancel")}}),null),w(k,f(ke,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return J(()=>!!r())()?_("common.submitting"):_("annotate.submit")}}),null),Le(S=>{var I=`${c().top}px`,C=`${c().left}px`;return I!==S.e&&Jo(d,"top",S.e=I),C!==S.t&&Jo(d,"left",S.t=C),S},{e:void 0,t:void 0}),d}})};Jt(["mousedown"]);var QT=U("<span class=font-medium>"),JT=U('<span class="text-sm text-muted-foreground">'),e6=U("<div><span class=text-muted-foreground></span><code class=font-mono>"),t6=U('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),n6=U('<div class="flex flex-col gap-1 text-sm">'),r6=U('<p class="text-destructive ">'),o6=U('<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"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const i6={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},s6=e=>{const[t,n]=$("fix"),[r,o]=$(!1),[i,s]=$(""),[a,u]=$(!1),[c,l]=$(null),[d,g]=$(null);Q(()=>{if(!e.open){g(null);return}const m=e.anchorEl;if(!m)return;const y=m.getBoundingClientRect(),x=Math.max(16,Math.min(y.left,window.innerWidth-384-16));g({top:y.bottom+8,left:x})}),Q(()=>{if(!e.open)return;const m=y=>{y.key==="Escape"&&(y.preventDefault(),b())};window.addEventListener("keydown",m),ee(()=>window.removeEventListener("keydown",m))});function h(){n("fix"),o(!1),s(""),l(null)}async function p(m){m.preventDefault();const y=i().trim();if(!y){l(_("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}),h(),e.onCancel()}catch(v){l(v.message)}finally{u(!1)}}function b(){e.onCancel()}return f(V,{get when(){return e.open},get children(){var m=o6(),y=m.firstChild,v=y.firstChild,x=v.firstChild,E=x.nextSibling,k=v.nextSibling,S=k.firstChild,I=S.firstChild,C=S.nextSibling;return m.$$mousedown=b,y.$$mousedown=D=>D.stopPropagation(),w(x,()=>_("appendTask.title")),w(E,()=>_("appendTask.hint")),k.addEventListener("submit",p),w(k,f(an,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:D=>n(D),get disabled(){return a()},get children(){return[f(li,{class:"mb-1 font-medium",get children(){return _("appendTask.type")}}),J(()=>["feat","refct","fix"].map(D=>f(Pt,{value:D,class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return _(i6[D])}})]}})))]}}),S),w(k,f(V,{get when(){return t()==="fix"},get children(){return f(xo,{class:"ml-5 flex items-start gap-1.5",get checked(){return r()},onChange:o,get disabled(){return a()},get children(){return[f(wo,{class:"mt-1"}),f(vo,{class:"flex cursor-pointer flex-col",get children(){return[(()=>{var D=QT();return w(D,()=>_("appendTask.debugMode")),D})(),(()=>{var D=JT();return w(D,()=>_("appendTask.debugModeHint")),D})()]}})]}})}}),S),w(I,()=>_("appendTask.description")),w(S,f(yo,{rows:5,get value(){return i()},onInput:D=>s(D.currentTarget.value),get placeholder(){return _("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(k,f(V,{get when(){return e.sectionPath||e.quote},get children(){var D=n6();return w(D,f(V,{get when(){return e.sectionPath},get children(){var T=e6(),A=T.firstChild,P=A.nextSibling;return w(A,()=>_("appendTask.refSection")),w(P,()=>e.sectionPath),T}}),null),w(D,f(V,{get when(){return e.quote},get children(){var T=t6();return w(T,()=>e.quote?.slice(0,200)),T}}),null),D}}),C),w(k,f(V,{get when(){return c()},get children(){var D=r6();return w(D,c),D}}),C),w(C,f(ke,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return _("common.cancel")}}),null),w(C,f(ke,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[f(As,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!a())()?_("common.submitting"):_("appendTask.submit"))]}}),null),Le(D=>{var T=_("appendTask.title"),A=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0;return T!==D.e&&We(y,"aria-label",D.e=T),D.t=_s(y,A,D.t),D},{e:void 0,t:void 0}),m}})};Jt(["mousedown"]);const Xi="__freeform__",a6={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},u6="accept";function c6(e){return e!==u6}function l6(e,t,n){const r=a6[t],o=(n??"").trim();if(c6(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function d6(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===Xi?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var f6=U('<p class="text-destructive mx-3 mt-1 ">'),g6=U('<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-warning"></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">'),Wf=U('<p class="m-0 break-words"><strong></strong>:'),p6=U("<div>"),h6=U('<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">'),m6=U('<em class="text-sm not-italic text-primary"> '),b6=U('<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 Rm(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 y6(e){const t=Rm(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function v6(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}const x6=e=>{const t=()=>{const m={};for(const y of e.questions){if(y.kind==="confirm"){m[y.id]={note:"",confirmTop:"accept"};continue}const v=y.options.find(x=>x.recommended);m[y.id]={selectedOptionLabel:v?.label??y.options[0]?.label,note:""}}return m},[n,r]=$(t()),[o,i]=$(!1),[s,a]=$(null);function u(m,y){r(v=>({...v,[m]:{...v[m],...y}}))}function c(m,y){u(m,{selectedOptionLabel:y})}function l(m,y){u(m,{note:y})}function d(m,y){y==="accept"?u(m,{confirmTop:y,confirmIntent:void 0,confirmDrop:void 0}):u(m,{confirmTop:y})}function g(m,y){y==="dropGoal"?u(m,{confirmIntent:y}):u(m,{confirmIntent:y,confirmDrop:void 0})}function h(m,y){u(m,{confirmDrop:y})}const p=ue(()=>{const m=n();let y=0;for(const v of e.questions){const x=m[v.id];if(!x){y+=1;continue}if(v.kind==="confirm"){y6(x)||(y+=1);continue}const E=x.note??"";v.isFreeform||x.selectedOptionLabel===Xi?E.trim()||(y+=1):x.selectedOptionLabel||(y+=1)}return y});async function b(){i(!0),a(null);try{const m=n(),y=[];for(const x of e.questions){const E=m[x.id]??{note:""};if(x.kind==="confirm"){const S=Rm(E);if(!S)continue;const I=l6(x,S,E.note);if(!I){a(_("questionConfirm.reasonRequired"));return}y.push(I);continue}const k=d6(x,E);k&&y.push(k)}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(_("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(m){a(m.message)}finally{i(!1)}}return(()=>{var m=g6(),y=m.firstChild,v=y.firstChild,x=v.firstChild,E=x.nextSibling,k=E.firstChild,S=k.nextSibling;S.nextSibling;var I=y.nextSibling;return w(x,()=>_("questionConfirm.title")),w(E,()=>_("questionConfirm.unanswered"),k),w(S,p),w(E,()=>e.questions.length,null),w(y,f(ke,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[f(As,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!o())()?_("common.submitting"):J(()=>!!e.running)()?_("questionConfirm.running"):_("questionConfirm.submitAll"))]}}),null),w(m,f(V,{get when(){return s()},get children(){var C=f6();return w(C,s),C}}),I),w(I,f(nt,{get each(){return e.questions},children:C=>{const D=()=>n()[C.id]??{note:""},T=()=>C.kind!=="confirm"&&(C.isFreeform||D().selectedOptionLabel===Xi),A=()=>C.kind==="confirm"&&D().confirmTop==="reject";return(()=>{var P=h6(),L=P.firstChild;return w(L,()=>C.text),w(P,f(V,{get when(){return C.kind==="choice"},get children(){return f(an,{class:"m-0 flex flex-col gap-1 p-0",get value(){return D().selectedOptionLabel??""},onChange:R=>c(C.id,R),get children(){return[f(nt,{get each(){return C.options},children:R=>f(Pt,{get value(){return R.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"min-w-0 cursor-pointer break-words",get children(){return[J(()=>R.label),f(V,{get when(){return R.recommended},get children(){var O=m6();return O.firstChild,w(O,()=>_("questionConfirm.recommended"),null),O}})]}})]}})}),f(Pt,{value:Xi,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"qcp-option-freeform cursor-pointer",get children(){return _("questionConfirm.freeformLabel")}})]}})]}})}}),null),w(P,f(V,{get when(){return C.kind==="confirm"},get children(){return[(()=>{var R=p6();return w(R,f(V,{get when(){return C.plan},get children(){var O=Wf(),N=O.firstChild;return N.nextSibling,w(N,()=>_("questionConfirm.confirmPlanLabel")),w(O,()=>C.plan,null),O}}),null),w(R,f(V,{get when(){return C.impact},get children(){var O=Wf(),N=O.firstChild;return N.nextSibling,w(N,()=>_("questionConfirm.confirmImpactLabel")),w(O,()=>C.impact,null),O}}),null),Le(()=>St(R,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${v6(C.impact)}`)),R})(),f(an,{class:"m-0 flex flex-col gap-1 p-0",get value(){return D().confirmTop??""},onChange:R=>d(C.id,R),get children(){return[f(Pt,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"qcp-confirm-accept cursor-pointer",get children(){return _("questionConfirm.decisionAccept")}})]}}),f(Pt,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return _("questionConfirm.decisionReject")}})]}})]}}),f(V,{get when(){return D().confirmTop==="reject"},get children(){return f(an,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return D().confirmIntent??""},onChange:R=>g(C.id,R),get children(){return[f(nt,{get each(){return[["alternative",_("questionConfirm.intentAlternative")],["constraint",_("questionConfirm.intentConstraint")],["dropGoal",_("questionConfirm.intentDropGoal")]]},children:([R,O])=>f(Pt,{value:R,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"min-w-0 cursor-pointer break-words",children:O})]}})}),f(V,{get when(){return D().confirmIntent==="dropGoal"},get children(){return f(an,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return D().confirmDrop??""},onChange:R=>h(C.id,R),get children(){return f(nt,{get each(){return[["current",_("questionConfirm.dropGoalCurrent")],["spec",_("questionConfirm.dropGoalSpec")]]},children:([R,O])=>f(Pt,{value:R,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"min-w-0 cursor-pointer break-words",children:O})]}})})}})}})]}})}})]}}),null),w(P,f(V,{get when(){return T()},get children(){return f(yo,{class:"qcp-note",rows:2,get placeholder(){return _("questionConfirm.notePlaceholder")},get value(){return D().note},onInput:R=>l(C.id,R.currentTarget.value)})}}),null),w(P,f(V,{get when(){return A()},get children(){return f(yo,{class:"qcp-reject-reason",rows:2,get placeholder(){return _("questionConfirm.reasonPlaceholder")},get value(){return D().note},onInput:R=>l(C.id,R.currentTarget.value)})}}),null),P})()}}),null),w(I,f(nt,{get each(){return e.freeforms},children:C=>(()=>{var D=b6(),T=D.firstChild,A=T.firstChild,P=T.nextSibling,L=P.firstChild,R=L.nextSibling,O=R.nextSibling,N=O.nextSibling,z=N.nextSibling;z.nextSibling;var B=P.nextSibling;return B.firstChild,w(A,()=>_("questionConfirm.selectionAnnotation")),w(T,f(ke,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(C.id),"aria-label":"remove",get children(){return f(Ur,{class:"h-4 w-4"})}}),null),w(L,()=>C.sectionPath),w(P,()=>_("questionConfirm.quoteConnector"),O),w(P,()=>C.quote.slice(0,200),z),w(B,()=>C.note,null),D})()}),null),Le(()=>We(x,"title",_("questionConfirm.title"))),m})()};var w6=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),Yf=U("<p class=text-muted-foreground>"),_6=U('<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"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),E6=U('<p class="text-destructive ">'),k6=U('<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 C6={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},S6=120,Zf=3,A6=150,T6=e=>new Promise(t=>setTimeout(t,e));async function D6(e,t,n){for(let r=0;r<=Zf;r+=1)try{return await xe.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<Zf&&await T6(A6)}return n??null}const O6=()=>{const e=bi(),t=So(),[n,r]=$(0),[o,i]=$(!1),[s,a]=$(""),[u]=jt(()=>[t(),e.id,n()],async([Z,G],ce)=>D6(Z,G,ce.value)),[c]=jt(()=>[t(),e.id,n()],async([Z,G])=>{try{return await xe.getDebug(Z,G)}catch{return{exists:!1,text:""}}}),[l,d]=$(null),[g,h]=$(!1),[p,b]=$(null),[m,y]=$(null),[v,x]=$(null),[E,k]=$([]),[S,I]=$(!1),[C,D]=$(null);let T;const A=ue(()=>{const Z=u();return Z?PT(Z.body):[]}),P=ue(()=>`@.yorz/specs/${e.id}/spec.md`),L=ue(()=>!u()||o()?!1:A().length>0||E().length>0);Q(()=>{const Z=e.id,G=t();if(!Z||!G)return;let ce;const me=wx(G,Z,{onUpdated:()=>{ce&&clearTimeout(ce),ce=setTimeout(()=>void pg(()=>r(ae=>ae+1)),S6)}});ee(()=>{ce&&clearTimeout(ce),me()})}),Q(()=>{const Z=e.id,G=t();!Z||!G||xe.getSpecSession(G,Z).then(({sessionId:ce,running:me})=>{ce&&(a(ce),i(me),co(ce))}).catch(()=>{})}),Q(()=>{const Z=t(),G=s();if(!Z||!G)return;const ce=ip(Z,{onStatus:me=>{me.sessionId===G&&i(me.running)}});ee(ce)}),Q(()=>{const Z=t(),G=s();if(!Z||!G)return;const ce=Os(Z,G,{onEvent:me=>{(me.type==="turn-completed"||me.type==="error")&&i(!1)}});ee(ce)}),Q(()=>{const Z=v();if(!Z)return;const G=TT(Z,d);ee(G)}),Ts(()=>S()||g()),op(Qu),Q(()=>{const Z=v(),G=u();if(!Z||!G)return;const ce=t();let me=!0,ae;const we=Uc(G.body,{specId:G.id,projectId:ce||void 0});AC(Z,`<article>${we}</article>`,{childrenOnly:!0,onBeforeElUpdated:(X,fe)=>!(X.classList?.contains("mermaid")&&X.getAttribute("data-mermaid-source")===fe.getAttribute?.("data-mermaid-source"))}),CT(Z).then(X=>{if(!me){X();return}ae=X}),ee(()=>{me=!1,ae?.()})});async function R(){y(null),i(!0);try{const Z=t(),{sessionId:G}=await xe.runAgent(Z,e.id);a(G),co(G)}catch(Z){i(!1),y(Z.message)}}async function O(Z){y(null);try{await xe.setStage(t(),e.id,Z),r(G=>G+1)}catch(G){y(G.message)}}async function N(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(P()),xt.success(_("specDetail.specPathCopied"))}catch{xt.error(_("specDetail.specPathCopyFailed"))}}function z(Z){b(Z),h(!0)}async function B(Z){const G=p();G&&k(ce=>[...ce,{id:`f-${Date.now()}-${ce.length}`,sectionPath:G.sectionPath,quote:G.text,note:Z}])}function F(Z){k(G=>G.filter(ce=>ce.id!==Z))}async function K(Z){await xe.submitQuestionAnswers(t(),e.id,Z),k([]),await R()}function re(){D(l()),I(!0)}async function j(Z){const G=t(),ce=await xe.appendItem(G,e.id,Z);ce.sessionId&&(i(!0),a(ce.sessionId),co(ce.sessionId))}async function se(Z){i(!0);try{const G=t(),{sessionId:ce}=await xe.explain(G,e.id,Z.text);a(ce),co(ce)}catch(G){i(!1),y(G.message)}}return(()=>{var Z=w6();return w(Z,f(ws,{get fallback(){return(()=>{var G=Yf();return w(G,()=>_("common.loading")),G})()},get children(){return f(V,{get when(){return u()},get fallback(){return(()=>{var G=Yf();return w(G,()=>_("specDetail.notFound")),G})()},children:G=>[(()=>{var ce=_6(),me=ce.firstChild,ae=me.firstChild,we=me.nextSibling,X=we.firstChild,fe=we.nextSibling,_e=fe.firstChild,Be=_e.firstChild,De=Be.nextSibling,st=_e.nextSibling;return w(ae,f(Hs,{get items(){return[{label:_("breadcrumb.specList"),href:At("")},{label:G().id}]}}),null),w(ae,f(ke,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("specDetail.copySpecPath")},get"aria-label"(){return _("specDetail.copySpecPath")},onClick:()=>void N(),get children(){return f(Gy,{class:"h-3.5 w-3.5"})}}),null),w(me,f(Ms,{}),null),w(X,()=>G().frontmatter.summary||_("common.pendingAgent")),w(Be,()=>G().frontmatter.stage),De.addEventListener("change",Qe=>O(Qe.currentTarget.value)),w(st,()=>up(G().frontmatter.updated_at)),w(fe,f(ke,{variant:"outline",size:"sm",class:"append-btn",ref(Qe){var ut=T;typeof ut=="function"?ut(Qe):T=Qe},onClick:re,get children(){return _("specDetail.appendTask")}}),null),w(fe,f(kn,{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 At(`specs/${G().id}/review`)},get children(){return _("specDetail.review")}}),null),w(fe,f(V,{get when(){return c()?.exists},get children(){return f(kn,{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 At(`specs/${G().id}/debug`)},get children(){return _("specDetail.debug")}})}}),null),w(fe,f(V,{get when(){return o()},get children(){return f(Ip,{variant:"secondary",get children(){return _("specDetail.running")}})}}),null),Le(Qe=>{var ut=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${C6[G().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,Tt=_("specDetail.forceStage"),Wn=_("specDetail.forceStage");return ut!==Qe.e&&St(Be,Qe.e=ut),Tt!==Qe.t&&We(De,"title",Qe.t=Tt),Wn!==Qe.a&&We(De,"aria-label",Qe.a=Wn),Qe},{e:void 0,t:void 0,a:void 0}),Le(()=>De.value=G().frontmatter.stage),ce})(),f(V,{get when(){return m()},get children(){var ce=E6();return w(ce,m),ce}}),(()=>{var ce=k6(),me=ce.firstChild;return w(ce,f(V,{get when(){return L()},get children(){return f(x6,{get questions(){return A()},get freeforms(){return E()},get running(){return o()},onRemoveFreeform:F,onSubmit:K})}}),me),lr(x,me),ce})(),f(VT,{get snap(){return J(()=>!!g())()?null:l()},onAnnotate:z,onExplain:se}),f(XT,{get open(){return g()},get snap(){return p()},onCancel:()=>h(!1),onSubmit:B}),f(s6,{get open(){return S()},get sectionPath(){return C()?.sectionPath},get quote(){return C()?.text},anchorEl:T,onCancel:()=>I(!1),onSubmit:j})]})}})),Z})()};var R6=U('<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">'),I6=U('<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">'),N6=U('<p class=" text-muted-foreground">'),M6=U('<p class="text-destructive ">'),L6=U('<p class=" text-muted-foreground">(runId: <code></code>)'),$6=U('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2">'),P6=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),F6=U("<p class=text-muted-foreground>"),B6=U("<span>"),z6=U('<span class="truncate font-mono text-sm">');const U6={commit:"review.commit",discard:"review.discard",stash:"review.stash"},lu={commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},du={commit:"review.commit",discard:"review.discard",stash:"review.stash"},K6={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"},q6=()=>{const e=bi(),t=So(),[n]=jt(()=>[t(),e.id],([X,fe])=>xe.getSpec(X,fe)),[r,o]=$([]),[i,s]=$("manual"),[a,u]=$(new Set),[c,l]=$(""),[d,g]=$(!1),[h,p]=$(null),[b,m]=$(null),[y,v]=$(null),[x,E]=$(null),[k,S]=$(null),[I,C]=$(""),[D,T]=$(null);function A(X){return C(X),new Promise(fe=>T(()=>fe))}function P(X){const fe=D();fe&&(T(null),fe(X))}let L,R=null;ee(()=>R?.()),ee(()=>P(!1)),Ts();function O(X){X&&(X.style.height="auto",X.style.height=`${X.scrollHeight}px`)}const N=ue(()=>{const X=e.id.split("."),fe=X.length>=2?X[1]:"feat",_e=n()?.frontmatter.summary??"";return _e?`${fe}: ${_e}`:`${fe}: update`});Q(()=>{const X=N();X&&!d()&&l(X)}),Q(dt(c,()=>{O(L)})),Xt(()=>O(L)),Q(()=>{const X=t(),fe=e.id;if(!X||!fe)return;const _e=Cx(X,fe,Be=>{o(Be),u(De=>{const st=new Set(Be.map(ut=>ut.path)),Qe=new Set;for(const ut of De)st.has(ut)&&Qe.add(ut);return Qe})});ee(()=>_e())});function z(X){return k()===X}const B=ue(()=>k()),F=ue(()=>b()!==null||B()!==null||h()!==null);function K(X,fe){R?.(),S(X),R=Os(t(),fe,{onEvent:_e=>{(_e.type==="turn-completed"||_e.type==="error")&&(S(null),R?.(),R=null)}})}function re(){return i()==="agent"?r().map(X=>X.path):[...a()]}async function j(X){if(F())return;v(null);const fe=re();if(fe.length===0){v(_("review.selectAtLeastOne"));return}if(!(X==="discard"&&!await A(_("review.confirmDiscard")))){p(X);try{if(X==="commit"){const _e=c().trim();if(!_e){v(_("review.enterCommitMsg"));return}await xe.directCommit(t(),e.id,{message:_e,paths:fe})}else X==="discard"?await xe.directDiscard(t(),e.id,{paths:fe}):X==="stash"&&await xe.directStash(t(),e.id,{message:c().trim()||`yorz:${e.id}`,paths:fe})}catch(_e){v(_e.message)}finally{p(null)}}}async function se(X){if(!F()&&(v(null),!(X==="discard"&&!await A(_("review.confirmDiscardAll"))))){m(X);try{const fe=await xe.gitOp(t(),e.id,X);E({kind:X,runId:fe.runId}),co(fe.sessionId),K(X,fe.sessionId)}catch(fe){v(fe.message)}finally{m(null)}}}async function Z(X){i()==="manual"?await j(X):await se(X)}function G(X){return z(X)||b()===X||h()===X}function ce(X){u(fe=>{const _e=new Set(fe);return _e.has(X)?_e.delete(X):_e.add(X),_e})}function me(){r().every(X=>a().has(X.path))?u(new Set):u(new Set(r().map(X=>X.path)))}const ae=ue(()=>r().length>0&&r().every(X=>a().has(X.path))),we=ue(()=>i()==="manual"&&a().size===0);return(()=>{var X=P6();return w(X,f(ws,{get fallback(){return(()=>{var fe=F6();return w(fe,()=>_("common.loading")),fe})()},get children(){return[(()=>{var fe=R6(),_e=fe.firstChild,Be=_e.firstChild,De=_e.nextSibling;return w(_e,f(Hs,{get items(){return[{label:_("breadcrumb.specList"),href:At("")},{label:e.id,href:At(`specs/${e.id}`)},{label:_("specDetail.review")}]}}),Be),w(Be,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(De,f(Ms,{})),fe})(),(()=>{var fe=$6(),_e=fe.firstChild,Be=_e.firstChild;return w(Be,f(ke,{variant:"default",size:"sm",get disabled(){return F()||we()},onClick:()=>Z("commit"),get children(){return[f(V,{get when(){return G("commit")},get children(){return f(ir,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!G("commit"))()?_(lu.commit):_(du.commit))]}}),null),w(Be,f(ke,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return F()||we()},onClick:()=>Z("discard"),get children(){return[f(V,{get when(){return G("discard")},get children(){return f(ir,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!G("discard"))()?_(lu.discard):_(du.discard))]}}),null),w(Be,f(ke,{variant:"ghost",size:"sm",get disabled(){return F()||we()},onClick:()=>Z("stash"),get children(){return[f(V,{get when(){return G("stash")},get children(){return f(ir,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!G("stash"))()?_(lu.stash):_(du.stash))]}}),null),w(_e,f(yo,{ref(De){var st=L;typeof st=="function"?st(De):L=De},get placeholder(){return _("review.commitPlaceholder")},get value(){return c()},onInput:De=>{g(!0),l(De.currentTarget.value),O(L)},get disabled(){return F()},rows:2,class:"resize-none"}),null),w(_e,f(an,{class:"flex gap-4",get value(){return i()},onChange:De=>s(De),get disabled(){return F()},get children(){return[f(Pt,{value:"manual",class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return _("review.manualSelect")}})]}}),f(Pt,{value:"agent",class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return _("review.agentSelect")}})]}})]}}),null),w(_e,f(V,{get when(){return J(()=>i()==="manual")()&&r().length>0},get children(){var De=I6(),st=De.firstChild,Qe=st.firstChild;return w(st,f(ke,{variant:"ghost",size:"sm",onClick:me,get disabled(){return F()},get children(){return J(()=>!!ae())()?_("review.deselectAll"):_("review.selectAll")}}),Qe),w(Qe,()=>_("review.fileCount",{selected:a().size,total:r().length})),w(De,f(nt,{get each(){return r()},children:ut=>f(xo,{class:"flex items-center gap-2 px-2 py-0.5",get checked(){return a().has(ut.path)},onChange:()=>ce(ut.path),get disabled(){return F()},get children(){return[f(wo,{}),f(vo,{class:"flex min-w-0 cursor-pointer items-center gap-2",get children(){return[(()=>{var Tt=B6();return w(Tt,()=>ut.status),Le(()=>St(Tt,`inline-block w-6 text-center text-sm font-bold ${K6[ut.status]??""}`)),Tt})(),(()=>{var Tt=z6();return w(Tt,()=>ut.path),Tt})()]}})]}})}),null),De}}),null),w(_e,f(V,{get when(){return J(()=>i()==="manual")()&&r().length===0},get children(){var De=N6();return w(De,()=>_("review.noChanges")),De}}),null),w(_e,f(V,{get when(){return y()},get children(){var De=M6();return w(De,y),De}}),null),w(_e,f(V,{get when(){return x()},get children(){var De=L6(),st=De.firstChild,Qe=st.nextSibling;return w(De,()=>_("review.dispatched"),st),w(De,()=>_(U6[x().kind]),st),w(Qe,()=>x().runId.slice(0,8)),De}}),null),fe})()]}}),null),w(X,f(Zt,{get open(){return D()!==null},onOpenChange:fe=>{fe||P(!1)},get children(){return f(Lr,{class:"max-w-sm",get children(){return[f(Pr,{get children(){return[f($r,{get children(){return _("review.discardTitle")}}),f(kc,{get children(){return I()}})]}}),f(Fr,{get children(){return[f(ke,{variant:"outline",onClick:()=>P(!1),get children(){return _("common.cancel")}}),f(ke,{variant:"destructive",onClick:()=>P(!0),get children(){return _("review.confirmDiscardAction")}})]}})]}})}}),null),X})()};var H6=U('<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">'),Xf=U("<p class=text-muted-foreground>"),j6=U('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),G6=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),V6=U('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),W6=U('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const Y6=()=>{const e=bi(),t=So();Ts();const[n]=jt(()=>[t(),e.id],([i,s])=>xe.getSpec(i,s)),[r]=jt(()=>[t(),e.id],([i,s])=>xe.getDebug(i,s)),o=ue(()=>{const i=lT(r()?.text??"");return i.trim()?Uc(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=G6();return w(i,f(ws,{get fallback(){return(()=>{var s=Xf();return w(s,()=>_("common.loading")),s})()},get children(){return[(()=>{var s=H6(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,f(Hs,{get items(){return[{label:_("breadcrumb.specList"),href:At("")},{label:e.id,href:At(`specs/${e.id}`)},{label:_("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(c,f(Ms,{})),s})(),(()=>{var s=j6();return w(s,f(V,{get when(){return r.loading},get fallback(){return f(V,{get when(){return o()},get fallback(){return(()=>{var a=W6();return w(a,()=>_("specDebug.empty")),a})()},get children(){var a=V6();return Le(()=>a.innerHTML=o()),a}})},get children(){var a=Xf();return w(a,()=>_("common.loading")),a}})),s})()]}})),i})()};function Qf(){return{text:"",nextOffset:0,truncated:!1}}function Z6(e){return{text:e.text,nextOffset:e.offset+Hu(e.text),truncated:e.truncated}}function X6(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+Hu(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+Hu(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function Jf(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function Hu(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}var Q6=U('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),J6=U("<p class=text-muted-foreground>"),eD=U('<span class="text-xs text-muted-foreground">: '),tD=U('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),nD=U('<p class="m-0 mt-2 text-xs text-muted-foreground">'),rD=U('<p class="m-0 mt-2 text-xs text-destructive">'),oD=U('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const iD=80,sD=96,eg=4e5,aD=()=>{const e=bi(),t=So(),[n,{mutate:r}]=jt(()=>[t(),e.runId],async([S,I])=>S&&I?xe.getCommandRun(S,I):null),[o,i]=$(Qf()),[s,a]=$(null),[u,c]=$(!1),[l,d]=$(Date.now());let g,h=!0,p=null,b=null,m=!1;const y=setInterval(()=>d(Date.now()),1e3);ee(()=>clearInterval(y));function v(S){p=Jf(S,eg),b===null&&(b=window.setTimeout(()=>{b=null,p&&(i(p),p=null,h&&g&&(g.scrollTop=g.scrollHeight))},iD))}ee(()=>{b!==null&&window.clearTimeout(b)});async function x(S,I){if(!m){m=!0;try{const C=await xe.readCommandOutput(S,I),D=Jf(Z6(C),eg);p=null,i(D),a(null),g&&(g.scrollTop=g.scrollHeight)}catch(C){a(C.message)}finally{m=!1}}}Q(()=>{const S=t(),I=e.runId;if(!S||!I)return;i(Qf()),x(S,I);const C=kx(S,I,{onOutput:D=>{const T=p??o(),A=X6(T,D);A.needsRefetch?x(S,I):v(A.state)},onRun:D=>r(D),onError:D=>a(D)});ee(C)});function E(){g&&(h=g.scrollHeight-g.scrollTop-g.clientHeight<=sD)}async function k(){const S=t(),I=n();if(!(!S||!I)){c(!0);try{const C=await xe.stopCommandRun(S,I.runId);r(C.run),xt.success(_("commands.stopped"))}catch(C){xt.error(C.message)}finally{c(!1)}}}return(()=>{var S=Q6(),I=S.firstChild,C=I.firstChild;return w(I,f(ke,{as:kn,get href(){return At("")},variant:"ghost",size:"sm",get children(){return[f(ky,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.back"))]}}),C),w(C,()=>_("commands.detailTitle")),w(S,f(V,{get when(){return n()},get fallback(){return(()=>{var D=J6();return w(D,()=>s()??_("common.loading")),D})()},children:D=>[(()=>{var T=tD(),A=T.firstChild,P=A.nextSibling,L=P.nextSibling,R=L.firstChild,O=L.nextSibling,N=O.firstChild;return w(T,f(V,{get when(){return D().status==="running"},get children(){return f(ke,{variant:"destructive",size:"sm",get disabled(){return u()},onClick:()=>void k(),get children(){return[f(ep,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!u())()?_("commands.stopping"):_("commands.stop"))]}})}}),A),w(T,f(Bh,{get status(){return D().status}}),A),w(A,()=>D().name),w(P,()=>D().cli),w(L,()=>_("commands.duration"),R),w(L,()=>qh(D().startedAt,D().endedAt,l()),null),w(T,f(V,{get when(){return D().status!=="running"},get children(){var z=eD(),B=z.firstChild;return w(z,()=>_("commands.exitCode"),B),w(z,()=>D().exitCode??D().signal??"—",null),z}}),O),w(O,()=>_("commands.logFile"),N),w(O,()=>D().logFile,null),T})(),f(V,{get when(){return o().truncated},get children(){var T=nD();return w(T,()=>_("commands.outputTruncated")),T}}),f(V,{get when(){return s()},get children(){var T=rD();return w(T,s),T}}),(()=>{var T=oD();T.addEventListener("scroll",E);var A=g;return typeof A=="function"?lr(A,T):g=T,w(T,()=>o().text||_("commands.outputEmpty")),T})()]}),null),S})()};var uD=U('<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 Im=()=>(()=>{var e=uD(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>_("welcome.title")),w(r,()=>_("welcome.description")),w(o,()=>_("welcome.addHint"),i),e})();var cD=U('<p class="p-8 text-muted-foreground">');const lD=()=>{const[e]=jt(()=>xe.listProjects());return f(V,{get when(){return!e.loading},get fallback(){return(()=>{var t=cD();return w(t,()=>_("common.loading")),t})()},get children(){return f(V,{get when(){return(e()??[]).length>0},get fallback(){return f(Im,{})},get children(){return(()=>{const n=(e()??[])[0];return n?f(m1,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var tg=U('<label class="flex flex-col gap-1 font-medium"><span>'),dD=U('<form class="flex flex-col gap-4"><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),fD=U('<p class=" text-muted-foreground">'),gD=U('<p class=" text-destructive">');const Ko=".yorz/specs",pD=e=>{const[t,n]=$("inherit"),[r,o]=$(""),[i,s]=$(""),[a,u]=$(Ko),[c,l]=$(Ko),[d,g]=$(!1),[h,p]=$(!1),[b,m]=$(null);Q(()=>{e.open&&(m(null),g(!0),(async()=>{try{const S=await xe.getProjectConfig(e.projectId);y(S)}catch(S){m(S.message)}finally{g(!1)}})())});function y(S){n(S.agent.kind),S.agent.kind==="custom"?(o(S.agent.cmd),s(S.agent.args.join(" "))):(o(""),s(""));const I=S.specsDir||Ko;u(I),l(I)}function v(S){return S.split(/\s+/).map(I=>I.trim()).filter(Boolean)}function x(){const S=t();if(S==="inherit")return{kind:"inherit"};if(S==="claude")return{kind:"claude"};if(S==="opencode")return{kind:"opencode"};if(S==="codex")return{kind:"codex"};const I=r().trim();return I?{kind:"custom",cmd:I,args:v(i())}:{error:_("projectConfig.cmdRequired")}}function E(S){return _(S==="inherit"?"projectConfig.inheritGlobal":S==="custom"?"projectConfig.custom":S==="codex"?"projectConfig.agentCodex":S==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function k(S){S.preventDefault(),m(null);const I=x();if("error"in I){m(I.error);return}const C=a().trim()||Ko;if(C.split(/[\\/]/).some(D=>D==="..")){m(_("projectConfig.invalidPath"));return}p(!0);try{await xe.updateProjectConfig(e.projectId,{agent:I,specsDir:C});let D=_("projectConfig.saved");C!==c()&&(D+=_("projectConfig.oldSpecsHint")),e.onSaved?.(D),e.onClose()}catch(D){m(D.message)}finally{p(!1)}}return f(Zt,{get open(){return e.open},onOpenChange:S=>!S&&e.onClose(),get children(){return f(Lr,{class:"max-w-[480px]",get children(){return[f(Pr,{get children(){return f($r,{get children(){return[J(()=>_("projectConfig.title"))," · ",J(()=>e.projectName)]}})}}),f(V,{get when(){return!d()},get fallback(){return(()=>{var S=fD();return w(S,()=>_("common.loading")),S})()},get children(){var S=dD(),I=S.firstChild,C=I.firstChild,D=C.nextSibling;return S.addEventListener("submit",k),w(S,f(an,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:T=>n(T),get disabled(){return h()},get children(){return[f(li,{class:"mb-1.5 w-full font-medium",get children(){return _("projectConfig.agent")}}),J(()=>["inherit","claude","opencode","codex","custom"].map(T=>f(Pt,{value:T,class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return E(T)}})]}})))]}}),I),w(S,f(V,{get when(){return t()==="custom"},get children(){return[(()=>{var T=tg(),A=T.firstChild;return w(A,()=>_("projectConfig.cmd")),w(T,f(Rr,{type:"text",get value(){return r()},onInput:P=>o(P.currentTarget.value),get placeholder(){return _("projectConfig.cmdPlaceholder")},get disabled(){return h()}}),null),T})(),(()=>{var T=tg(),A=T.firstChild;return w(A,()=>_("projectConfig.args")),w(T,f(Rr,{type:"text",get value(){return i()},onInput:P=>s(P.currentTarget.value),placeholder:"--flag value",get disabled(){return h()}}),null),T})()]}}),I),w(C,()=>_("projectConfig.specsDir")),w(I,f(Rr,{type:"text",get value(){return a()},onInput:T=>u(T.currentTarget.value),placeholder:Ko,get disabled(){return h()}}),D),w(D,()=>_("projectConfig.specsDirHint")),w(S,(()=>{var T=J(()=>!!b());return()=>T()&&(()=>{var A=gD();return w(A,b),A})()})(),null),w(S,f(Fr,{get children(){return[f(ke,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return h()},get children(){return _("common.cancel")}}),f(ke,{type:"submit",get disabled(){return h()},get children(){return J(()=>!!h())()?_("common.saving"):_("projectConfig.save")}})]}}),null),S}})]}})}})};var hD=U('<span class=" font-semibold tracking-wide">'),mD=U('<div class="flex items-center gap-1">'),bD=U('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),yD=U('<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">'),vD=U('<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>'),xD=U("<aside><header></header><footer>"),wD=U('<p class="px-2.5 py-2 text-muted-foreground">'),_D=U('<span class="block truncate">'),ED=U('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),kD=U('<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">'),CD=U('<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">'),SD=U('<li class="group relative flex items-center">'),AD=U('<span class="inline-block font-semibold">'),TD=U('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),DD=U('<p class="mt-1 text-sm text-destructive break-words">'),OD=U('<p class="break-all font-semibold">');const Nm="yorz.projectsSidebar.collapsed",Mm="yorz.projectsSidebar.width",Kc=220,RD=.2,ID=160,ND=640;function MD(){try{return typeof window<"u"&&window.localStorage.getItem(Nm)==="1"}catch{return!1}}function LD(e){try{typeof window<"u"&&window.localStorage.setItem(Nm,e?"1":"0")}catch{}}function Zs(e){return Number.isFinite(e)?Math.min(ND,Math.max(ID,Math.round(e))):Kc}function fu(){return typeof window>"u"?Kc:Zs(window.innerWidth*RD)}function $D(){try{if(typeof window>"u")return Kc;const e=window.localStorage.getItem(Mm);if(!e)return fu();const t=Number(e);return Number.isFinite(t)?Zs(t):fu()}catch{return fu()}}function PD(e){try{typeof window<"u"&&window.localStorage.setItem(Mm,String(Zs(e)))}catch{}}function ng(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 FD=()=>{const[e,t]=$(MD()),[n,r]=$($D()),[o,{refetch:i}]=jt(()=>xe.listProjects()),[s,a]=$(null),[u,c]=$(null),[l,d]=$(null),[g,h]=$(!1),[p,b]=$(!1),m=Co(),y=ks(),v=ue(()=>{const O=y.pathname.match(/^\/([^/]+)/);return O&&O[1]!=="api"?O[1]:""}),x=()=>e()||sr();function E(){if(sr()){us();return}const O=!e();t(O),LD(O)}let k=null,S=null,I=null;Xt(()=>{const O=ap(()=>{i()});ee(O)});let C=0;Q(()=>{const O=hx();if(O===0||O===C)return;const N=ht(v),z=(o()??[]).find(B=>B.id===N);z&&(C=O,c(z))});function D(O){x()||(O.preventDefault(),k={startX:O.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),S=N=>{if(!k)return;const z=N.clientX-k.startX,B=Zs(k.startW+z);k.raf==null&&(k.raf=requestAnimationFrame(()=>{k&&(k.raf=null,r(B))}))},I=()=>{k?.raf!=null&&cancelAnimationFrame(k.raf),k=null,document.body.classList.remove("is-resizing"),S&&document.removeEventListener("mousemove",S),I&&document.removeEventListener("mouseup",I),S=null,I=null,PD(n())},document.addEventListener("mousemove",S),document.addEventListener("mouseup",I))}ee(()=>{S&&document.removeEventListener("mousemove",S),I&&document.removeEventListener("mouseup",I),document.body.classList.remove("is-resizing")});function T(O,N){N.preventDefault(),N.stopPropagation(),c(O)}function A(O,N="success"){N==="error"?xt.error(O):xt.success(O)}function P(O,N){N.preventDefault(),N.stopPropagation(),h(!1),d(O)}async function L(){const O=l();if(O){b(!0);try{g()&&O.worktree?await xe.removeProjectWithFiles(O.id):await xe.removeProject(O.id),await i(),v()===O.id&&m("/"),d(null)}catch(N){const z=N.message;z.includes("409")?(xt.error(_("sidebar.uncommittedChanges")),d(null)):(a(z),xt.error(z))}finally{b(!1)}}}const R=()=>x()?void 0:{width:`${n()}px`};return(()=>{var O=xD(),N=O.firstChild,z=N.nextSibling;return w(N,f(V,{get when(){return!x()},get fallback(){return f(ke,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:E,get title(){return _("sidebar.expand")},get children(){return f(Jg,{class:"h-4 w-4"})}})},get children(){return[(()=>{var B=hD();return w(B,()=>_("sidebar.title")),B})(),(()=>{var B=mD();return w(B,f(ke,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:E,get title(){return _("sidebar.collapse")},get children(){return f(Qg,{class:"h-4 w-4"})}})),B})()]}})),w(O,f(V,{get when(){return o()!==void 0},get fallback(){return(()=>{var B=wD();return w(B,()=>_("common.loading")),B})()},get children(){var B=bD();return w(B,f(nt,{get each(){return o()??[]},children:F=>{const K=()=>v()===F.id;return(()=>{var re=SD();return w(re,f(kn,{get href(){return`/${encodeURIComponent(F.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${K()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${x()?"px-0 text-center":""}`},get title(){return F.path},get children(){return f(V,{get when(){return!x()},get fallback(){return(()=>{var j=AD();return w(j,()=>(F.name[0]??"?").toUpperCase()),j})()},get children(){return[(()=>{var j=_D();return w(j,()=>ng(F)),j})(),f(V,{get when(){return F.worktree},get children(){var j=ED();return w(j,f(Qy,{class:"h-3 w-3"}),null),w(j,()=>_("sidebar.worktreeBadge"),null),Le(()=>We(j,"title",`worktree of ${F.worktree.mainPath}`)),j}})]}})}}),null),w(re,f(V,{get when(){return!x()},get children(){return[(()=>{var j=kD();return j.$$click=se=>T(F,se),w(j,f(Nv,{class:"h-3.5 w-3.5"})),Le(se=>{var Z=_("sidebar.configure",{name:F.name}),G=_("sidebar.projectConfig");return Z!==se.e&&We(j,"aria-label",se.e=Z),G!==se.t&&We(j,"title",se.t=G),se},{e:void 0,t:void 0}),j})(),(()=>{var j=CD();return j.$$click=se=>void P(F,se),w(j,f(Ur,{class:"h-3.5 w-3.5"})),Le(se=>{var Z=_("sidebar.removeProject",{name:F.name}),G=_("sidebar.deleteProject");return Z!==se.e&&We(j,"aria-label",se.e=Z),G!==se.t&&We(j,"title",se.t=G),se},{e:void 0,t:void 0}),j})()]}}),null),re})()}})),B}}),z),w(z,f(V,{get when(){return!x()},get fallback(){return(()=>{var B=TD();return w(B,f(qy,{class:"h-3.5 w-3.5"})),Le(()=>We(B,"title",`${_("sidebar.addHint")}${_("sidebar.addCmd")}`)),B})()},get children(){var B=yD(),F=B.firstChild;return w(B,()=>_("sidebar.addHint"),F),w(F,()=>_("sidebar.addCmd")),B}}),null),w(z,(()=>{var B=J(()=>!!s());return()=>B()&&(()=>{var F=DD();return w(F,s),Le(()=>We(F,"title",s())),F})()})(),null),w(O,f(V,{get when(){return!x()},get children(){var B=vD();return B.$$mousedown=D,Le(()=>We(B,"aria-label",_("sidebar.resizeHint"))),B}}),null),w(O,f(V,{get when(){return u()},children:B=>f(pD,{open:!0,get projectId(){return B().id},get projectName(){return B().name},onClose:()=>c(null),onSaved:F=>A(F)})}),null),w(O,f(Zt,{get open(){return l()!==null},onOpenChange:B=>!B&&!p()&&d(null),get children(){return f(Lr,{class:"max-w-sm",get children(){return[f(Pr,{get children(){return[f($r,{get children(){return _("sidebar.deleteProject")}}),f(kc,{get children(){return _("sidebar.deleteDesc")}})]}}),f(V,{get when(){return l()},children:B=>[(()=>{var F=OD();return w(F,()=>ng(B())),F})(),f(V,{get when(){return B().worktree},get children(){return f(xo,{get checked(){return g()},onChange:F=>h(F),class:"flex items-center gap-2 text-destructive",get children(){return[f(wo,{}),f(vo,{get children(){return _("sidebar.deleteFiles")}})]}})}})]}),f(Fr,{get children(){return[f(ke,{variant:"outline",onClick:()=>d(null),get disabled(){return p()},get children(){return _("common.cancel")}}),f(ke,{variant:"destructive",onClick:()=>void L(),get disabled(){return p()},get children(){return J(()=>!!p())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Le(B=>{var F=`relative flex flex-col border-r bg-background shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,K=R(),re=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,j=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return F!==B.e&&St(O,B.e=F),B.t=_s(O,K,B.t),re!==B.a&&St(N,B.a=re),j!==B.o&&St(z,B.o=j),B},{e:void 0,t:void 0,a:void 0,o:void 0}),O})()};Jt(["mousedown","click"]);var BD=["second","minute","hour","day","week","month","year"];function zD(e,t){if(t===0)return["just now","right now"];var n=BD[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var UD=["秒","分钟","小时","天","周","个月","年"];function KD(e,t){if(t===0)return["刚刚","片刻后"];var n=UD[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var ju={},Xs=function(e,t){ju[e]=t},qD=function(e){return ju[e]||ju.en_US},gu=[60,60,24,7,365/7/12,12];function HD(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 jD(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=gu[o]&&o<gu.length;o++)e/=gu[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 GD(e,t){var n=new Date;return(+n-+HD(e))/1e3}var VD=function(e,t,n){var r=GD(e);return jD(r,qD(t))};Xs("en_US",zD);Xs("zh_CN",KD);var Wi={},rg;function WD(){if(rg)return Wi;rg=1,Object.defineProperty(Wi,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Wi.default=t,Wi}var YD=WD();const ZD=zc(YD),og=[["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 XD(e,t){return og[t]??og[0]}const QD=`
27
+
28
+ `;function JD(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 eO(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=JD(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:QD+i.text}:i),r=!0}else t.push(i)}}return t}function tO(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 nO(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?tO(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 rO=U("<div>");const oO=e=>{const[t,n]=le(e,["class"]);return(()=>{var r=rO();return qn(r,q({get class(){return ot("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},qc=qs;qs.Trigger;const Hc=e=>{const[t,n]=le(e,["class"]);return f(qs.Content,q({get class(){return ot("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var iO=U('<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>'),sO=U('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),aO=U('<div class="font-mono text-xs font-semibold">'),uO=U('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),cO=U('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),lO=U("<div class=space-y-1>");const dO=e=>{const[t,n]=$(!1);return f(qc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=iO(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Xu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.toolCollapsed",{count:e.tools.length})),r})(),f(Hc,{get children(){var r=sO();return w(r,f(nt,{get each(){return e.tools},children:o=>(()=>{var i=lO();return w(i,f(V,{get when(){return o.name},get children(){var s=aO();return w(s,()=>o.name),s}}),null),w(i,f(V,{get when(){return o.input!==void 0},get children(){var s=uO();return w(s,()=>fO(o.input)),s}}),null),w(i,f(V,{get when(){return o.result!==void 0},get children(){var s=cO();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function fO(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}Jt(["click"]);var gO=U('<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>'),pO=U('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),hO=U('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const mO=e=>{const[t,n]=$(!1);return f(qc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=gO(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Xu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.agentContextCollapsed",{count:e.contexts.length})),Le(()=>We(r,"title",_("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),f(Hc,{get children(){var r=pO();return w(r,f(nt,{get each(){return e.contexts},children:o=>(()=>{var i=hO();return w(i,()=>o.text),i})()})),r}})]}})};Jt(["click"]);var bO=U('<span class="font-semibold tracking-wide">'),ig=U("<span>"),yO=U('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),vO=U('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),xO=U("<div class=mb-1.5>"),wO=U('<p class="mb-1 text-xs text-destructive">'),_O=U('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto m-2 mt-0"></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">'),EO=U('<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>'),kO=U("<aside><header>"),CO=U('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),SO=U('<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">'),AO=U("<p class=text-muted-foreground>"),TO=U('<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 font-medium text-foreground [overflow-wrap:anywhere]">'),DO=U('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),OO=U('<div class="markdown chat-md">');const pu="yorz.layout.col2.collapsed",Gu="yorz.layout.col2.width",sg="yorz.chat.sessionList.collapsed",Lm="yorz.chat.sessionList.rows",RO="yorz.chat.sessionList.limit",IO="yorz.chat.sessionList.showHistory",$m=[3,5,10],NO=28,jc=340,MO=.4,Pm=260,LO=960,$O=.8,PO=96,FO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,BO=1500,zO=80;function UO(e){return new Promise(t=>setTimeout(t,e))}Xs("en",XD);Xs("zh-CN",ZD);function KO(){return typeof window>"u"?LO:Math.max(Pm,Math.round(window.innerWidth*$O))}function hs(e){return Number.isFinite(e)?Math.min(KO(),Math.max(Pm,Math.round(e))):jc}function hu(){return typeof window>"u"?jc:hs(window.innerWidth*MO)}function ag(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function qO(){try{if(typeof window>"u")return jc;const e=window.localStorage.getItem(Gu);if(!e)return hu();const t=Number(e);return Number.isFinite(t)?hs(t):hu()}catch{return hu()}}function Zo(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function so(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Vu(e){return $m.includes(e)}function HO(){const e=Number(Zo(Lm,""));if(Vu(e))return e;const t=Number(Zo(RO,""));return Vu(t)?t:Zo(IO,"0")==="1"?10:3}const jO=()=>{let e,t;const{lng:n}=Mp(),r=jh({projectId:()=>yt()||""}),o=ue(()=>(n(),[{value:"/yorz-debug",description:_("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:_("chat.slashCommandYorzSpec")}])),[i,s]=$(Zo(pu,"0")==="1"),[a,u]=$(qO()),[c,l]=$(Zo(sg,"0")!=="1"),[d,g]=$(HO()),[h,p]=$(""),[b,m]=$([]),y=ue(()=>nO(b())),[v,x]=$(""),[E,k]=$(!0),[S,I]=$(Date.now()),[C,D]=$(!1),[T,A]=$({}),P=new Set,[L,R]=$(0);let O="";const N=new Map;function z(H){let oe=N.get(H);if(!oe){let te=()=>{};oe={promise:new Promise(Ne=>{te=Ne}),resolve:te},N.set(H,oe)}return oe.promise}function B(H){z(H),N.get(H)?.resolve()}function F(H){P.delete(H)&&R(oe=>oe+1)}const[K,{refetch:re}]=jt(()=>yt()||void 0,H=>xe.listSessions(H));Q(()=>{const H=K();if(!H)return;const oe=h();let te=!1;for(const je of H)!je.running&&P.delete(je.id)&&je.id===oe&&(te=!0);te&&R(je=>je+1),A(je=>{const Ne={};for(const Ge of H)Ne[Ge.id]=!!Ge.running;return oe&&!(oe in Ne)&&je[oe]===!0&&(Ne[oe]=!0),Ne})}),Q(dt(yt,()=>{p(""),A({}),rn(),O="",D(!1),P.clear(),R(H=>H+1),N.clear(),r.reset()})),Q(()=>{const H=yt();if(!H)return;const oe=ip(H,{onStatus:te=>{A(je=>({...je,[te.sessionId]:te.running})),te.running||re()}});ee(oe)});const j=H=>T()[H]===!0,se=ue(()=>{const H=h();return H?j(H):!1}),Z=ue(()=>(K()??[]).filter(H=>j(H.id)).length),G=ue(()=>K()??[]);function ce(H){!H||H===h()||(p(H),re())}Q(()=>{const H=dx();H&&(fx(),ce(H),i()&&(s(!1),so(pu,"0")))});const me=()=>i()||sr();function ae(){if(sr()){us();return}const H=!i();s(H),so(pu,H?"1":"0")}function we(H){l(H),so(sg,H?"0":"1")}function X(H){const oe=Number(H);Vu(oe)&&(g(oe),so(Lm,String(oe)))}function fe(H){return _(H===3?"chat.sessionListRows3":H===5?"chat.sessionListRows5":"chat.sessionListRows10")}function _e(H){const oe=H.title.trim();return oe&&oe!==H.id&&!FO.test(oe)?oe:H.id}Xt(()=>{const H=()=>{const oe=hs(a());oe!==a()&&(u(oe),so(Gu,String(oe)))};window.addEventListener("resize",H),ee(()=>window.removeEventListener("resize",H))}),Xt(()=>{const H=window.setInterval(()=>I(Date.now()),6e4);ee(()=>window.clearInterval(H))});let Be=null,De=null,st=null;function Qe(H){me()||(H.preventDefault(),Be={startX:H.clientX,startW:a(),raf:null},document.body.classList.add("is-resizing"),De=oe=>{if(!Be)return;const te=hs(Be.startW+(oe.clientX-Be.startX));Be.raf==null&&(Be.raf=requestAnimationFrame(()=>{Be&&(Be.raf=null,u(te))}))},st=()=>{Be?.raf!=null&&cancelAnimationFrame(Be.raf),Be=null,document.body.classList.remove("is-resizing"),De&&document.removeEventListener("mousemove",De),st&&document.removeEventListener("mouseup",st),De=null,st=null,so(Gu,String(a()))},document.addEventListener("mousemove",De),document.addEventListener("mouseup",st))}ee(()=>{De&&document.removeEventListener("mousemove",De),st&&document.removeEventListener("mouseup",st),document.body.classList.remove("is-resizing")}),Q(()=>{const H=yt(),oe=h();if(L(),!H||!oe)return;let te=!1;k(!0),P.has(oe)?O!==oe&&(rn(),O=oe):(O=oe,rn(),xe.getSessionMessages(H,oe).then(Ne=>{te||rn(eO(Ne))}).catch(()=>{}));const je=Os(H,oe,{onReady:()=>B(oe),onEvent:Ne=>{Ne.type==="text"?Yr(Ne.delta):Ne.type==="tool-use"?xr({kind:"tool",name:Ne.name,input:Ne.input}):Ne.type==="tool-result"?xr({kind:"tool",result:Ne.text}):Ne.type==="turn-completed"?(In(),F(oe),A(Ge=>({...Ge,[oe]:!1}))):Ne.type==="error"?(hn(`
29
+ ${_("chat.errorMessage",{message:Ne.message})}
30
+ `),A(Ge=>({...Ge,[oe]:!1}))):Ne.type==="session-started"&&Ne.sessionId!==oe&&(P.has(oe)&&P.add(Ne.sessionId),O===oe&&(O=Ne.sessionId),A(Ge=>({...Ge,[oe]:!1,[Ne.sessionId]:!0})),p(Ne.sessionId),re())}});ee(()=>{te=!0,N.delete(oe),je()})}),Q(()=>{b(),E()&&requestAnimationFrame(Tt)});function ut(H){return H.scrollHeight-H.scrollTop-H.clientHeight<=PO}function Tt(){e&&(e.scrollTop=e.scrollHeight)}function Wn(){e&&k(ut(e))}function Gr(H){return S(),!Number.isFinite(H)||H<=0?"":VD(H,n())}function vr(H){return!Number.isFinite(H)||H<=0?"":new Date(H).toLocaleString(n())}async function Vr(H){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(H),xt.success(_("chat.filePathCopied"))}catch{xt.error(_("chat.filePathCopyFailed"))}}function Wr(H){const oe=ag(H.target);if(!oe||e&&!e.contains(oe))return;const te=oe.dataset.filePath;te&&(H.preventDefault(),Vr(te))}function nn(H){if(H.key!=="Enter"&&H.key!==" ")return;const oe=ag(H.target);if(!oe||e&&!e.contains(oe))return;const te=oe.dataset.filePath;te&&(H.preventDefault(),Vr(te))}let Wt="",at=null;function Rn(H,oe){const te=H[H.length-1];return te&&te.kind==="text"&&te.role==="assistant"?[...H.slice(0,-1),{...te,text:te.text+oe}]:[...H,{kind:"text",role:"assistant",text:oe}]}function In(){at!=null&&(clearTimeout(at),at=null);const H=Wt;Wt="",H&&m(oe=>Rn(oe,H))}function Yr(H){Wt+=H,at==null&&(at=window.setTimeout(In,zO))}function hn(H){In(),m(oe=>Rn(oe,H))}function xr(H){In(),m(oe=>[...oe,H])}function rn(H=[]){at!=null&&(clearTimeout(at),at=null),Wt="",m(oe=>H.length===0&&oe.length===0?oe:H)}ee(()=>{at!=null&&clearTimeout(at)});function Io(){!yt()||!h()||(p(""),rn(),O="",k(!0),r.reset())}async function wr(){const H=yt(),oe=h(),te=v().trim();if(!H||!te||C()||se()||r.hasPending())return;if(x(""),k(!0),!oe){await No(H,te);return}const je=r.draftId()??void 0;xr({kind:"text",role:"user",text:te}),A(Ne=>({...Ne,[oe]:!0}));try{await xe.sendSessionMessage(H,oe,te,je),r.reset()}catch(Ne){hn(`
31
+ ${_("chat.errorMessage",{message:Ne.message})}
32
+ `),A(Ge=>({...Ge,[oe]:!1}))}}async function No(H,oe){D(!0);try{let te;try{te=(await xe.createSession(H,{})).sessionId}catch(Ge){x(oe),hn(`
33
+ ${_("chat.errorMessage",{message:Ge.message})}
34
+ `);return}P.add(te);const je=r.draftId()??void 0,Ne=z(te);rn([{kind:"text",role:"user",text:oe}]),O=te,A(Ge=>({...Ge,[te]:!0})),p(te),await Promise.race([Ne,UO(BO)]);try{await xe.sendSessionMessage(H,te,oe,je),r.reset()}catch(Ge){hn(`
35
+ ${_("chat.errorMessage",{message:Ge.message})}
36
+ `),A(M=>({...M,[te]:!1}))}re()}finally{D(!1)}}async function Mo(){const H=yt(),oe=h();!H||!oe||(await xe.abortSession(H,oe).catch(()=>{}),A(te=>({...te,[oe]:!1})))}function Lo(H){H.defaultPrevented||H.isComposing||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),wr())}return(()=>{var H=kO(),oe=H.firstChild;return w(oe,f(V,{get when(){return!me()},get fallback(){return f(ke,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:ae,get title(){return _("chat.expand")},get children(){return f(Jg,{class:"h-4 w-4"})}})},get children(){return[(()=>{var te=bO();return w(te,()=>_("chat.title")),te})(),f(ke,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:ae,get title(){return _("chat.collapse")},get children(){return f(Qg,{class:"h-4 w-4"})}})]}})),w(H,f(V,{get when(){return!me()},get children(){var te=_O(),je=te.firstChild,Ne=je.nextSibling,Ge=Ne.firstChild,M=Ge.firstChild,W=Ge.nextSibling;w(te,f(V,{get when(){return yt()},get children(){return f(oO,{class:"m-2 rounded-lg shadow-none",get children(){return f(qc,{get open(){return c()},onOpenChange:we,get children(){return[(()=>{var $e=yO(),Ae=$e.firstChild,he=Ae.nextSibling;return Ae.$$click=()=>we(!c()),w(Ae,f(V,{get when(){return Z()>0},get fallback(){return(()=>{var ne=ig();return w(ne,()=>_("chat.sessionsLabelPlain")),ne})()},get children(){var ne=ig();return w(ne,()=>_("chat.sessionsLabel",{count:Z()})),ne}})),w($e,f(an,{class:"flex shrink-0 items-center gap-2",get value(){return String(d())},onChange:X,get"aria-label"(){return _("chat.sessionListRows")},get children(){return f(nt,{each:$m,children:ne=>f(Pt,{get value(){return String(ne)},class:"flex items-center gap-1",get children(){return[f(Lt,{}),f(Kt,{class:"h-3 w-3"}),f($t,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return fe(ne)}})]}})})}}),he),he.$$click=()=>we(!c()),w(he,f(Xu,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${c()?"":"-rotate-90"}`}})),Le(ne=>{var ve=c()?_("chat.collapseSessions"):_("chat.expandSessions"),ct=c()?_("chat.collapseSessions"):_("chat.expandSessions");return ve!==ne.e&&We(Ae,"title",ne.e=ve),ct!==ne.t&&We(he,"title",ne.t=ct),ne},{e:void 0,t:void 0}),$e})(),f(Hc,{get children(){var $e=vO();return w($e,f(V,{get when(){return G().length>0},get fallback(){return(()=>{var Ae=CO();return w(Ae,()=>_("chat.noRunningSessions")),Ae})()},get children(){return f(nt,{get each(){return G()},children:Ae=>(()=>{var he=SO(),ne=he.firstChild,ve=ne.firstChild,ct=ve.firstChild,lt=ct.nextSibling;lt.nextSibling;var Yn=ve.nextSibling,Zr=Yn.nextSibling;return ne.$$click=()=>ce(Ae.id),w(ne,f(V,{get when(){return j(Ae.id)},get children(){return f(ir,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),ve),w(ve,()=>Ae.kind,lt),w(Yn,()=>_e(Ae)),w(Zr,()=>Gr(Ae.updatedAt)),Le(on=>{var Si=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${h()===Ae.id?"bg-primary-soft font-semibold":"hover:bg-accent"}`,Xr=j(Ae.id)?_("chat.sessionTitleRunning",{kind:Ae.kind,id:Ae.id}):_("chat.sessionTitle",{kind:Ae.kind,id:Ae.id}),Ai=vr(Ae.updatedAt);return Si!==on.e&&St(ne,on.e=Si),Xr!==on.t&&We(ne,"title",on.t=Xr),Ai!==on.a&&We(Zr,"title",on.a=Ai),on},{e:void 0,t:void 0,a:void 0}),he})()})}})),Le(Ae=>Jo($e,"max-height",`${d()*NO+4}px`)),$e}})]}})}})}}),je),je.addEventListener("scroll",Wn),je.$$keydown=nn,je.$$click=Wr;var de=e;typeof de=="function"?lr(de,je):e=je,w(je,f(V,{get when(){return y().length>0},get fallback(){return(()=>{var $e=AO();return w($e,(()=>{var Ae=J(()=>!!h());return()=>Ae()?_("chat.empty"):_("chat.draftEmpty")})()),$e})()},get children(){return f(nt,{get each(){return y()},children:$e=>f(V,{get when(){return $e.kind==="context"?$e:null},get fallback(){return f(V,{get when(){return $e.kind==="assistant"?$e:null},get fallback(){return(()=>{var Ae=TO();return w(Ae,()=>$e.text),Ae})()},children:Ae=>(()=>{var he=DO();return w(he,f(nt,{get each(){return Ae().segments},children:ne=>f(V,{get when(){return ne.kind==="tools"?ne:null},get fallback(){return(()=>{var ve=OO();return Le(()=>ve.innerHTML=Uc(ne.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:_("chat.copyFilePath")})),ve})()},children:ve=>f(dO,{get tools(){return ve().tools}})})})),he})()})},children:Ae=>f(mO,{get contexts(){return Ae().contexts}})})})}})),w(Ne,f(V,{get when(){return r.count()>0},get children(){var $e=xO();return w($e,f(Xh,{ctrl:r,compact:!0})),$e}}),Ge),w(Ne,f(V,{get when(){return r.error()},get children(){var $e=wO();return w($e,()=>r.error()),$e}}),Ge),w(Ge,f(Gh,{get projectId(){return yt()||""},get value(){return v()},onValueChange:x,get slashCommands(){return o()},onKeyDown:Lo,get onPaste(){return r.onPaste},get placeholder(){return J(()=>!yt())()?_("chat.noSessionPlaceholder"):J(()=>!!h())()?_("chat.inputPlaceholder"):_("chat.draftPlaceholder")},get disabled(){return!yt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),M),w(Ge,f(ke,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!yt()||r.count()>=ho},get title(){return _("newSpec.importAttachment")},get children(){return f(Ov,{class:"h-4 w-4"})}}),M),ts(M,"change",r.onFileInputChange);var Oe=t;return typeof Oe=="function"?lr(Oe,M):t=M,We(M,"accept",Hh),w(W,f(ke,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:Io,get disabled(){return!yt()||!h()},get title(){return _("chat.newSession")},get children(){return f(Ss,{class:"h-4 w-4"})}}),null),w(W,f(V,{get when(){return se()},get fallback(){return f(ke,{size:"sm",onClick:()=>void wr(),get disabled(){return!yt()||!v().trim()||C()||r.hasPending()},get children(){return[f(As,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.send"))]}})},get children(){return f(ke,{variant:"outline",size:"sm",onClick:()=>void Mo(),get title(){return _("chat.abort")},get children(){return[f(ep,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.abort"))]}})}}),null),te}}),null),w(H,f(V,{get when(){return!me()},get children(){var te=EO();return te.$$mousedown=Qe,te}}),null),Le(te=>{var je=`relative flex flex-col border-r bg-background text-base shrink-0 ${me()?"w-9 transition-[width] duration-150":""}`,Ne=me()?void 0:{width:`${a()}px`},Ge=`flex items-center border-b ${me()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return je!==te.e&&St(H,te.e=je),te.t=_s(H,Ne,te.t),Ge!==te.a&&St(oe,te.a=Ge),te},{e:void 0,t:void 0,a:void 0}),H})()};Jt(["click","keydown","mousedown"]);const Fm=["newSpec","toggleSpecDetailFullscreen","projectSettings"],Ir={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S"},GO=new Set(["Control","Shift","Alt","Meta"]);function mu(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=Gc(r)}return n.key?zm(n):null}function Bm(e){if(GO.has(e.key))return null;const t=Gc(e.key);return t?zm({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function ms(e){return{newSpec:mu(e?.newSpec)??Ir.newSpec,toggleSpecDetailFullscreen:mu(e?.toggleSpecDetailFullscreen)??Ir.toggleSpecDetailFullscreen,projectSettings:mu(e?.projectSettings)??Ir.projectSettings}}function VO(e){const t=ms(e),n=new Map,r=new Set;for(const o of Fm){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function WO(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function zm(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(Gc(e.key)),t.join("+")}function Gc(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var YO=U('<p class="m-0 text-sm text-destructive">'),ZO=U('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),XO=U("<p class=text-muted-foreground>"),QO=U('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),JO=U("<p class=text-destructive>");const eR={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"}},tR=e=>{const[t,n]=$("claude"),[r,o]=$(!1),[i,s]=$(!1),[a,u]=$("system-default"),[c,l]=$({}),[d,g]=$(null),[h,p]=$(!1),[b,m]=$(!1),[y,v]=$(null),x=ue(()=>new Set(VO(c())));Q(()=>{e.open&&(v(null),p(!0),(async()=>{try{E(await xe.getGlobalConfig())}catch(A){v(A.message),E(eR)}finally{p(!1)}})())});function E(A){n(A.agent.defaultKind),o(!!A.notifications.sessionEnd.banner),s(!!A.notifications.sessionEnd.sound),u(A.power?.inhibitWhenRunning??"system-default"),l(A.shortcuts??{}),g(null)}Q(()=>{const A=d();if(!A)return;const P=L=>{if(L.preventDefault(),L.stopPropagation(),L.key==="Escape"){g(null);return}if(L.key==="Backspace"||L.key==="Delete"){l(O=>({...O,[A]:null})),g(null);return}const R=Bm(L);R&&(l(O=>({...O,[A]:R})),g(null))};window.addEventListener("keydown",P,!0),ee(()=>window.removeEventListener("keydown",P,!0))});async function k(A){if(A.preventDefault(),v(null),x().size>0){v(_("globalConfig.shortcutConflict"));return}m(!0);try{await xe.updateGlobalConfig({agent:{defaultKind:t()},notifications:{sessionEnd:{banner:r(),sound:i()}},shortcuts:c(),power:{inhibitWhenRunning:a()}}),e.onSaved?.(_("globalConfig.saved")),e.onClose()}catch(P){v(P.message)}finally{m(!1)}}function S(A){return _(A==="codex"?"projectConfig.agentCodex":A==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}function I(A){return _(`globalConfig.shortcuts.${A}`)}function C(A){return _(A==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":A==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function D(A){return d()===A?_("globalConfig.shortcutRecording"):ms(c())[A]}function T(A){l(P=>({...P,[A]:null}))}return f(Zt,{get open(){return e.open},onOpenChange:A=>!A&&e.onClose(),get children(){return f(Lr,{class:"max-w-[560px]",get children(){return[f(Pr,{get children(){return f($r,{get children(){return _("globalConfig.title")}})}}),f(V,{get when(){return!h()},get fallback(){return(()=>{var A=XO();return w(A,()=>_("common.loading")),A})()},get children(){var A=ZO(),P=A.firstChild,L=P.firstChild,R=L.nextSibling,O=P.nextSibling,N=O.firstChild,z=N.nextSibling;return A.addEventListener("submit",B=>void k(B)),w(A,f(an,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:B=>n(B),get disabled(){return b()},get children(){return[f(li,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.agentDefault")}}),J(()=>["claude","opencode","codex"].map(B=>f(Pt,{value:B,class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return S(B)}})]}})))]}}),P),w(L,()=>_("globalConfig.sessionEnd")),w(R,f(xo,{get checked(){return r()},onChange:B=>o(B),get disabled(){return b()},class:"flex items-center gap-2",get children(){return[f(wo,{}),f(vo,{get children(){return _("globalConfig.banner")}})]}}),null),w(R,f(xo,{get checked(){return i()},onChange:B=>s(B),get disabled(){return b()},class:"flex items-center gap-2",get children(){return[f(wo,{}),f(vo,{get children(){return _("globalConfig.sound")}})]}}),null),w(A,f(an,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return a()},onChange:B=>u(B),get disabled(){return b()},get children(){return[f(li,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.powerTitle")}}),J(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(B=>f(Pt,{value:B,class:"flex items-center gap-1.5",get children(){return[f(Lt,{}),f(Kt,{}),f($t,{class:"cursor-pointer",get children(){return C(B)}})]}})))]}}),O),w(N,()=>_("globalConfig.shortcutsTitle")),w(z,f(nt,{each:Fm,children:B=>(()=>{var F=QO(),K=F.firstChild,re=K.firstChild,j=re.nextSibling;return w(re,()=>I(B)),w(j,()=>D(B)),w(F,f(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>g(B),get disabled(){return b()},get children(){return J(()=>d()===B)()?_("globalConfig.shortcutRecordingButton"):_("globalConfig.shortcutRecord")}}),null),w(F,f(ke,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(B),get disabled(){return b()||D(B)===Ir[B]},get children(){return _("globalConfig.shortcutReset")}}),null),Le(()=>St(j,`m-0 font-mono text-sm ${x().has(B)?"text-destructive":"text-muted-foreground"}`)),F})()})),w(O,f(V,{get when(){return x().size>0},get children(){var B=YO();return w(B,()=>_("globalConfig.shortcutConflict")),B}}),null),w(A,(()=>{var B=J(()=>!!y());return()=>B()&&(()=>{var F=JO();return w(F,y),F})()})(),null),w(A,f(Fr,{get children(){return[f(ke,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return b()},get children(){return _("common.cancel")}}),f(ke,{type:"submit",get disabled(){return b()||x().size>0},get children(){return J(()=>!!b())()?_("common.saving"):_("globalConfig.save")}})]}}),null),A}})]}})}})};var nR=U('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),rR=U('<div class="border-b px-3 py-2">'),oR=U('<div class="max-h-96 overflow-auto p-2">'),iR=U('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function sR(){const[e,t]=$([]),[n,r]=$(null);async function o(){try{t(await xe.listSystemNotifications())}catch{}}Q(()=>{o();const u=_x(()=>void o());ee(u)});async function i(u){r(u);try{await xe.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await xe.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await xe.restartSystemNotification(u),t(c=>c.filter(l=>l.id!==u)),window.location.reload()}finally{r(null)}}return f(V,{get when(){return e().length>0},get children(){return f(Uh,{placement:"bottom-start",get children(){return[f(zh,{as:ke,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return _("systemNotifications.title")},get children(){return[f(Ay,{class:"h-4 w-4"}),nR()]}}),f(Kh,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=rR();return w(u,f(ik,{class:"text-sm font-semibold",get children(){return _("systemNotifications.title")}})),u})(),(()=>{var u=oR();return w(u,f(nt,{get each(){return e()},children:c=>(()=>{var l=iR(),d=l.firstChild,g=d.firstChild,h=g.firstChild,p=h.nextSibling,b=g.nextSibling;return w(h,()=>aR(c)),w(p,()=>uR(c)),w(b,f(V,{get when(){return c.kind==="version-update"},get children(){return f(V,{get when(){return c.action==="restart-ready"},get fallback(){return f(ke,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id||c.action==="updating"},onClick:()=>void s(c.id),get children(){return f(V,{get when(){return n()===c.id||c.action==="updating"},get fallback(){return _("systemNotifications.update")},get children(){return[f(Uv,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),J(()=>_("systemNotifications.updating"))]}})}})},get children(){return f(Wh,{openDelay:150,closeDelay:0,get children(){return[f(Vh,{as:ke,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id},onClick:()=>void a(c.id),get children(){return _("systemNotifications.restart")}}),f(Yh,{get children(){return _("systemNotifications.restartTooltip")}})]}})}})}}),null),w(b,f(ke,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return _("systemNotifications.delete")},get disabled(){return n()===c.id},onClick:()=>void i(c.id),get children(){return f(tp,{class:"h-4 w-4"})}}),null),l})()})),u})()]}})]}})}})}function aR(e){return e.kind==="version-update"?_("systemNotifications.versionTitle"):e.title}function uR(e){return e.kind!=="version-update"?e.message:_("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}var ug=U('<div class="px-2 py-1 text-xs text-muted-foreground">'),cR=U('<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 lR=[{mode:"system",labelKey:"shell.themeSystem",icon:wv},{mode:"light",labelKey:"shell.themeLight",icon:Xv},{mode:"dark",labelKey:"shell.themeDark",icon:kv}],dR=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],cg={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"}},fR=e=>{const t=ks(),n=Co(),{lng:r,changeLanguage:o}=Mp(),[i,s]=$(!1),[a,u]=$(cg),c=ue(()=>t.pathname===At("specs/new"));function l(b){b!==r()&&(o(b),window.location.reload())}async function d(){try{u(await xe.getGlobalConfig())}catch{u(cg)}}function g(){if(!yt())return;const b=At("specs/new");c()?window.open(b,"_blank","noopener"):n(b)}function h(b){const m=ms(a().shortcuts);if(b===m.newSpec)return g(),!0;if(b===m.projectSettings)return yx(),!0;if(b===m.toggleSpecDetailFullscreen){const y=bx();return y?(y(),!0):!1}return!1}const p=b=>{if(b.defaultPrevented)return;const m=Bm(b);if(!m)return;const y=ms(a().shortcuts),v=m===y.toggleSpecDetailFullscreen;WO(b.target)&&!v||m!==Ir.newSpec&&m!==Ir.projectSettings&&m!==Ir.toggleSpecDetailFullscreen&&!Object.values(a().shortcuts).includes(m)||h(m)&&b.preventDefault()};return Xt(()=>{d(),window.addEventListener("keydown",p)}),ee(()=>window.removeEventListener("keydown",p)),Q(()=>{const b=t.pathname.match(/^\/([^/]+)/);gx(b&&b[1]!=="api"?b[1]:"")}),(()=>{var b=cR(),m=b.firstChild,y=m.firstChild,v=m.nextSibling,x=v.firstChild;return w(m,f(kn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),y),w(m,f(sR,{}),y),w(y,f(V,{get when(){return yt()},get children(){return f(ke,{as:kn,get href(){return At("specs/new")},get target(){return c()?"_blank":void 0},get rel(){return c()?"noopener":void 0},variant:"default",size:"sm",get children(){return[f(Ss,{class:"mr-1 h-4 w-4"}),J(()=>_("shell.newSpec"))]}})}}),null),w(y,f(_c,{placement:"bottom-end",get children(){return[f(wc,{as:ke,variant:"ghost",size:"icon",get title(){return _("shell.settingsMenu")},get children(){return f(hv,{class:"h-4 w-4"})}}),f(Ec,{get children(){return[f(bd,{get children(){return[f(yd,{"data-submenu":"language",get children(){return[f(av,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.languageSwitch"))]}}),f(vd,{get children(){return[f(rr,{onSelect:()=>l("zh-CN"),get children(){return[f(Li,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langZh"))]}}),f(rr,{onSelect:()=>l("en"),get children(){return[f(Li,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langEn"))]}})]}})]}}),f(bd,{get children(){return[f(yd,{"data-submenu":"theme",get children(){return[f(Av,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.themeSwitch"))]}}),f(vd,{get children(){return[(()=>{var E=ug();return w(E,()=>_("shell.themeModeGroup")),E})(),f(nt,{each:lR,children:E=>f(rr,{get"data-theme-option"(){return E.mode},onSelect:()=>dy(E.mode),get children(){return[f(Li,{get class(){return`mr-2 h-4 w-4 ${Su()===E.mode?"opacity-100":"opacity-0"}`}}),f(E.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),J(()=>_(E.labelKey))]}})}),f(Bu,{}),(()=>{var E=ug();return w(E,()=>_("shell.themeNameGroup")),E})(),f(nt,{each:dR,children:E=>f(rr,{get"data-theme-name-option"(){return E.name},onSelect:()=>fy(E.name),get children(){return[f(Li,{get class(){return`mr-2 h-4 w-4 ${Wg()===E.name?"opacity-100":"opacity-0"}`}}),J(()=>_(E.labelKey))]}})})]}})]}}),f(Bu,{}),f(rr,{onSelect:()=>s(!0),get children(){return[f(Gv,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.globalConfig"))]}})]}})]}}),null),w(v,f(FD,{}),x),w(v,f(jO,{}),x),w(x,()=>e.children),w(b,f(WE,{position:"top-center"}),null),w(b,f(tR,{get open(){return i()},onClose:()=>s(!1),onSaved:E=>{xt.success(E),d()}}),null),b})()};gy();const Um=document.getElementById("app");if(!Um)throw new Error("missing #app root");Db(()=>f(p1,{root:fR,get children(){return[f(Qn,{path:"/",component:lD}),f(Qn,{path:"/:projectId",component:Ik}),f(Qn,{path:"/:projectId/commands/:runId",component:aD}),f(Qn,{path:"/:projectId/specs/new",component:gC}),f(Qn,{path:"/:projectId/specs/:id",component:O6}),f(Qn,{path:"/:projectId/specs/:id/review",component:q6}),f(Qn,{path:"/:projectId/specs/:id/debug",component:Y6}),f(Qn,{path:"*",component:Im})]}}),Um);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{gT as _,zc as g};