@yorz/cli 0.3.5 → 0.3.6
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.
- package/README.md +17 -17
- package/dist/cli/index.js +657 -201
- package/dist/gui/assets/{abnfDiagram-VRR7QNED-DQM-IUdR.js → abnfDiagram-VRR7QNED-xc0C50rB.js} +1 -1
- package/dist/gui/assets/{arc-WoQS9inO.js → arc-BBPWDS5i.js} +1 -1
- package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-BSJfE6nY.js → architectureDiagram-ZJ3FMSHR-UfjPkiOc.js} +1 -1
- package/dist/gui/assets/{blockDiagram-677ZJIJ3-BXk0h_Na.js → blockDiagram-677ZJIJ3-D4-uGWRR.js} +1 -1
- package/dist/gui/assets/{c4Diagram-LMCZKHZV-Sgnopqnh.js → c4Diagram-LMCZKHZV-DOsjz28F.js} +1 -1
- package/dist/gui/assets/channel-BUjCRtd2.js +1 -0
- package/dist/gui/assets/{chunk-2Q5K7J3B-sWwRHI31.js → chunk-2Q5K7J3B-D8U1wDI8.js} +1 -1
- package/dist/gui/assets/{chunk-32BRIVSS-6HJXOWs9.js → chunk-32BRIVSS-B_fOO0A_.js} +1 -1
- package/dist/gui/assets/{chunk-5VM5RSS4-De_Y0Itz.js → chunk-5VM5RSS4-BEs0La2r.js} +1 -1
- package/dist/gui/assets/{chunk-EX3LRPZG-CTtRnKWx.js → chunk-EX3LRPZG-tp9GO_-e.js} +1 -1
- package/dist/gui/assets/{chunk-JWPE2WC7-Dp9usWZX.js → chunk-JWPE2WC7-CtyvW3SG.js} +1 -1
- package/dist/gui/assets/{chunk-MOJQB5TN-OoM3V1FE.js → chunk-MOJQB5TN-511Q-LZH.js} +1 -1
- package/dist/gui/assets/{chunk-RYQCIY6F-M8me5HDP.js → chunk-RYQCIY6F-tBbgfa0S.js} +1 -1
- package/dist/gui/assets/{chunk-V7JOEXUC-CLdvRo84.js → chunk-V7JOEXUC-BrxVSk_j.js} +1 -1
- package/dist/gui/assets/{chunk-VR4S4FIN-BMEciG-B.js → chunk-VR4S4FIN-D933YBYm.js} +1 -1
- package/dist/gui/assets/{chunk-XXDRQBXY-DT8b8q8Q.js → chunk-XXDRQBXY-BFQVCR7q.js} +1 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-CbHDPN3x.js +1 -0
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-CbHDPN3x.js +1 -0
- package/dist/gui/assets/{cose-bilkent-JH36ORCC-C1w9npQD.js → cose-bilkent-JH36ORCC-CvG96QUS.js} +1 -1
- package/dist/gui/assets/{cynefin-VYW2F7L2-buyB6Ypi.js → cynefin-VYW2F7L2-D1hO5-bj.js} +1 -1
- package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-DPQmwOX9.js → cynefinDiagram-TSTJHNR4-CGlQfxl6.js} +1 -1
- package/dist/gui/assets/{dagre-VKFMJZFB-DfbmQsg3.js → dagre-VKFMJZFB-DONzuwX_.js} +1 -1
- package/dist/gui/assets/{diagram-FQU43EPY-DZZkoYxF.js → diagram-FQU43EPY-HAAtgUO1.js} +1 -1
- package/dist/gui/assets/{diagram-G47NLZAW-DJyFDLgi.js → diagram-G47NLZAW-BXhu9UFM.js} +1 -1
- package/dist/gui/assets/{diagram-NH7WQ7WH-CeIoika9.js → diagram-NH7WQ7WH-C4ERZVd_.js} +1 -1
- package/dist/gui/assets/{diagram-OA4YK3LP-D3bJmzbA.js → diagram-OA4YK3LP-w9tIMMGB.js} +1 -1
- package/dist/gui/assets/{diagram-WEI45ONY-5whYnN6Z.js → diagram-WEI45ONY-CaAeYUbA.js} +1 -1
- package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-fRcOahPq.js → ebnfDiagram-CCIWWBDH-B6W0V0qu.js} +1 -1
- package/dist/gui/assets/{erDiagram-Q63AITRT-h22ShxWi.js → erDiagram-Q63AITRT-C3sskZRU.js} +1 -1
- package/dist/gui/assets/{flowDiagram-23GEKE2U-CImBEPKl.js → flowDiagram-23GEKE2U-C104zn-S.js} +1 -1
- package/dist/gui/assets/{ganttDiagram-NO4QXBWP-D7GfEoL1.js → ganttDiagram-NO4QXBWP-BTCssrDx.js} +1 -1
- package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-BQlPqwV3.js → gitGraphDiagram-IHSO6WYX-DjOOeH7D.js} +1 -1
- package/dist/gui/assets/{index-BnMXI8QL.js → index-DxqBnHJb.js} +27 -27
- package/dist/gui/assets/index-S1uf4yLT.css +1 -0
- package/dist/gui/assets/{infoDiagram-FWYZ7A6U-dQgAvdfE.js → infoDiagram-FWYZ7A6U-BmFWZBS4.js} +1 -1
- package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-Dsb8okiC.js → ishikawaDiagram-FXEZZL3T-CDxcUzdH.js} +1 -1
- package/dist/gui/assets/{journeyDiagram-5HDEW3XC-BVaJ8kFx.js → journeyDiagram-5HDEW3XC-D-6O7chT.js} +1 -1
- package/dist/gui/assets/{kanban-definition-HUTT4EX6-CtRRLwap.js → kanban-definition-HUTT4EX6-B8x7k6Fv.js} +1 -1
- package/dist/gui/assets/{linear-CtTzoPCE.js → linear-D5Ymya6M.js} +1 -1
- package/dist/gui/assets/{mermaid.core-BO-VJXe-.js → mermaid.core-DufPaTEv.js} +4 -4
- package/dist/gui/assets/{mindmap-definition-LN4V7U3C-Djl0w9Df.js → mindmap-definition-LN4V7U3C-DtvTXeH1.js} +1 -1
- package/dist/gui/assets/{pegDiagram-2B236MQR-D2VRUT1H.js → pegDiagram-2B236MQR-CC4Ckg2m.js} +1 -1
- package/dist/gui/assets/{pieDiagram-ENE6RG2P-Bp7Ytwe1.js → pieDiagram-ENE6RG2P-CbjSsDIy.js} +1 -1
- package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-Df4S5Uw8.js → quadrantDiagram-ABIIQ3AL-BxPwfoi7.js} +1 -1
- package/dist/gui/assets/{railroadDiagram-RFXS5EU6-1E9T3-eU.js → railroadDiagram-RFXS5EU6-YX-VS0Vh.js} +1 -1
- package/dist/gui/assets/{requirementDiagram-TGXJPOKE-ClWnTEWR.js → requirementDiagram-TGXJPOKE-BEtW3t1o.js} +1 -1
- package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-kV-szT-S.js → sankeyDiagram-HTMAVEWB-ChxRWgoD.js} +1 -1
- package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-C17izAQ5.js → sequenceDiagram-DBY2YBRQ-_fnT_6l0.js} +1 -1
- package/dist/gui/assets/{sizeCapture-X5ZJPWSS-Qa6aDRpG.js → sizeCapture-X5ZJPWSS-GrOKZWai.js} +1 -1
- package/dist/gui/assets/{stateDiagram-2N3HPSRC-C84qUVRJ.js → stateDiagram-2N3HPSRC-CXQbtXQA.js} +1 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-BvJQB9Ga.js +1 -0
- package/dist/gui/assets/{swimlanes-5IMT3BWC-BByVALRE.js → swimlanes-5IMT3BWC-CNBWQS8A.js} +2 -2
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CnSljsJi.js +8 -0
- package/dist/gui/assets/{timeline-definition-FHXFAJF6-BD9jOAZN.js → timeline-definition-FHXFAJF6-Kvxm3vNr.js} +1 -1
- package/dist/gui/assets/{vennDiagram-L72KCM5P-BqTRSqDu.js → vennDiagram-L72KCM5P-BzoVFyz9.js} +1 -1
- package/dist/gui/assets/{wardleyDiagram-EHGQE667-DqSSn_TX.js → wardleyDiagram-EHGQE667-BksgQ49c.js} +1 -1
- package/dist/gui/assets/{xychartDiagram-FW5EYKEG-B5GDvD8r.js → xychartDiagram-FW5EYKEG-C4FbK9Sx.js} +1 -1
- package/dist/gui/index.html +2 -2
- package/package.json +1 -1
- package/dist/gui/assets/channel-DAAPjLkv.js +0 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-DU6pj67q.js +0 -1
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DU6pj67q.js +0 -1
- package/dist/gui/assets/index-B_NGA1xd.css +0 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-Ct4b-n_-.js +0 -1
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-0XnzonY2.js +0 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Le={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return wc(this.context.count)},getNextContextId(){return wc(this.context.count++)}};function wc(e){const t=String(e),n=t.length-1;return Le.context.id+(n?String.fromCharCode(96+n):"")+t}function xo(e){Le.context=e}const Fh=!1,Bh=(e,t)=>e===t,un=Symbol("solid-proxy"),wf=typeof Proxy=="function",Ti=Symbol("solid-track"),Di={equals:Bh};let _f=Tf;const pn=1,Do=2,Ef={owned:null,cleanups:null,context:null,owner:null},$s={};var Ge=null;let ge=null,zh=null,tt=null,zt=null,Ft=null,Yi=0;function Dr(e,t){const n=tt,r=Ge,o=e.length===0,i=t===void 0?r:t,s=o?Ef:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>Ct(()=>dr(s)));Ge=s,tt=null;try{return Jt(a,!0)}finally{tt=n,Ge=r}}function $(e,t){t=t?Object.assign({},Di,t):Di;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(ge&&ge.running&&ge.sources.has(n)?o=o(n.tValue):o=o(n.value)),Af(n,o));return[Cf.bind(n),r]}function Ya(e,t,n){const r=Qi(e,t,!0,pn);ao(r)}function le(e,t,n){const r=Qi(e,t,!1,pn);ao(r)}function oe(e,t,n){_f=jh;const r=Qi(e,t,!1,pn),o=Nr&<(Nr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Ft?Ft.push(r):ao(r)}function re(e,t,n){n=n?Object.assign({},Di,n):Di;const r=Qi(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ao(r),Cf.bind(r)}function Uh(e){return e&&typeof e=="object"&&"then"in e}function hn(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=$s,u=null,c=!1,l=!1,d="initialValue"in i,f=typeof r=="function"&&re(r);const p=new Set,[g,b]=(i.storage||$)(i.initialValue),[h,y]=$(void 0),[v,x]=$(void 0,{equals:!1}),[k,E]=$(d?"ready":"unresolved");Le.context&&(u=Le.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Le.load&&Le.has(u)&&(a=Le.load(u)));function S(T,R,M,C){return s===T&&(s=null,C!==void 0&&(d=!0),(T===a||R===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(C,{value:R})),a=$s,ge&&T&&c?(ge.promises.delete(T),c=!1,Jt(()=>{ge.running=!0,O(R,M)},!1)):O(R,M)),R}function O(T,R){Jt(()=>{R===void 0&&b(()=>T),E(R!==void 0?"errored":d?"ready":"unresolved"),y(R);for(const M of p.keys())M.decrement();p.clear()},!1)}function _(){const T=Nr&<(Nr),R=g(),M=h();if(M!==void 0&&!s)throw M;return tt&&!tt.user&&T&&Ya(()=>{v(),s&&(T.resolved&&ge&&c?ge.promises.add(s):p.has(T)||(T.increment(),p.add(T)))}),R}function I(T=!0){if(T!==!1&&l)return;l=!1;const R=f?f():r;if(c=ge&&ge.running,R==null||R===!1){S(s,Ct(g));return}ge&&s&&ge.promises.delete(s);let M;const C=a!==$s?a:Ct(()=>{try{return o(R,{value:g(),refetching:T})}catch(N){M=N}});if(M!==void 0){S(s,void 0,Ci(M),R);return}else if(!Uh(C))return S(s,C,void 0,R),C;return s=C,"v"in C?(C.s===1?S(s,C.v,void 0,R):S(s,void 0,Ci(C.v),R),C):(l=!0,queueMicrotask(()=>l=!1),Jt(()=>{E(d?"refreshing":"pending"),x()},!1),C.then(N=>S(C,N,void 0,R),N=>S(C,void 0,Ci(N),R)))}Object.defineProperties(_,{state:{get:()=>k()},error:{get:()=>h()},loading:{get(){const T=k();return T==="pending"||T==="refreshing"}},latest:{get(){if(!d)return _();const T=h();if(T&&!s)throw T;return g()}}});let L=Ge;return f?Ya(()=>(L=Ge,I(!1))):I(!1),[_,{refetch:T=>Zi(L,()=>I(T)),mutate:b}]}function kf(e){return Jt(e,!1)}function Ct(e){if(tt===null)return e();const t=tt;tt=null;try{return e()}finally{tt=t}}function At(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=Ct(()=>t(a,o,s));return o=a,u}}function Vt(e){oe(()=>Ct(e))}function ae(e){return Ge===null||(Ge.cleanups===null?Ge.cleanups=[e]:Ge.cleanups.push(e)),e}function Za(){return tt}function Oo(){return Ge}function Zi(e,t){const n=Ge,r=tt;Ge=e,tt=null;try{return Jt(t,!0)}catch(o){ku(o)}finally{Ge=n,tt=r}}function Sf(e){if(ge&&ge.running)return e(),ge.done;const t=tt,n=Ge;return Promise.resolve().then(()=>{tt=t,Ge=n;let r;return Nr&&(r=ge||(ge={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Jt(e,!1),tt=Ge=null,r?r.done:void 0})}const[kT,_c]=$(!1);function Kh(e){Ft.push.apply(Ft,e),e.length=0}function mt(e,t){const n=Symbol("context");return{id:n,Provider:Gh(n),defaultValue:e}}function lt(e){let t;return Ge&&Ge.context&&(t=Ge.context[e.id])!==void 0?t:e.defaultValue}function Xi(e){const t=re(e),n=re(()=>Xa(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nr;function Hh(){return Nr||(Nr=mt())}function Cf(){const e=ge&&ge.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===pn)ao(this);else{const t=zt;zt=null,Jt(()=>Ri(this),!1),zt=t}if(tt){const t=this.observers;if(!t||t[t.length-1]!==tt){const n=t?t.length:0;tt.sources?(tt.sources.push(this),tt.sourceSlots.push(n)):(tt.sources=[this],tt.sourceSlots=[n]),t?(t.push(tt),this.observerSlots.push(tt.sources.length-1)):(this.observers=[tt],this.observerSlots=[tt.sources.length-1])}}return e&&ge.sources.has(this)?this.tValue:this.value}function Af(e,t,n){let r=ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(ge){const o=ge.running;(o||!n&&ge.sources.has(e))&&(ge.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Jt(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=ge&&ge.running;s&&ge.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?zt.push(i):Ft.push(i),i.observers&&Df(i)),s?i.tState=pn:i.state=pn)}if(zt.length>1e6)throw zt=[],new Error},!1)}return t}function ao(e){if(!e.fn)return;dr(e);const t=Yi;Ec(e,ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value,t),ge&&!ge.running&&ge.sources.has(e)&&queueMicrotask(()=>{Jt(()=>{ge&&(ge.running=!0),tt=Ge=e,Ec(e,e.tValue,t),tt=Ge=null},!1)})}function Ec(e,t,n){let r;const o=Ge,i=tt;tt=Ge=e;try{r=e.fn(t)}catch(s){return e.pure&&(ge&&ge.running?(e.tState=pn,e.tOwned&&e.tOwned.forEach(dr),e.tOwned=void 0):(e.state=pn,e.owned&&e.owned.forEach(dr),e.owned=null)),e.updatedAt=n+1,ku(s)}finally{tt=i,Ge=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Af(e,r,!0):ge&&ge.running&&e.pure?(ge.sources.has(e)||(e.value=r),ge.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Qi(e,t,n,r=pn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ge,context:Ge?Ge.context:null,pure:n};return ge&&ge.running&&(i.state=0,i.tState=r),Ge===null||Ge!==Ef&&(ge&&ge.running&&Ge.pure?Ge.tOwned?Ge.tOwned.push(i):Ge.tOwned=[i]:Ge.owned?Ge.owned.push(i):Ge.owned=[i]),i}function Oi(e){const t=ge&&ge.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Do)return Ri(e);if(e.suspense&&Ct(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Yi);){if(t&&ge.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(ge.disposed.has(o))return}if((t?e.tState:e.state)===pn)ao(e);else if((t?e.tState:e.state)===Do){const o=zt;zt=null,Jt(()=>Ri(e,n[0]),!1),zt=o}}}function Jt(e,t){if(zt)return e();let n=!1;t||(zt=[]),Ft?n=!0:Ft=[],Yi++;try{const r=e();return qh(n),r}catch(r){n||(Ft=null),zt=null,ku(r)}}function qh(e){if(zt&&(Tf(zt),zt=null),e)return;let t;if(ge){if(!ge.promises.size&&!ge.queue.size){const r=ge.sources,o=ge.disposed;Ft.push.apply(Ft,ge.effects),t=ge.resolve;for(const i of Ft)"tState"in i&&(i.state=i.tState),delete i.tState;ge=null,Jt(()=>{for(const i of o)dr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)dr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}_c(!1)},!1)}else if(ge.running){ge.running=!1,ge.effects.push.apply(ge.effects,Ft),Ft=null,_c(!0);return}}const n=Ft;Ft=null,n.length&&Jt(()=>_f(n),!1),t&&t()}function Tf(e){for(let t=0;t<e.length;t++)Oi(e[t])}function jh(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Oi(r)}if(Le.context){if(Le.count){Le.effects||(Le.effects=[]),Le.effects.push(...e.slice(0,n));return}xo()}for(Le.effects&&(Le.done||!Le.count)&&(e=[...Le.effects,...e],n+=Le.effects.length,delete Le.effects),t=0;t<n;t++)Oi(e[t])}function Ri(e,t){const n=ge&&ge.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===pn?o!==t&&(!o.updatedAt||o.updatedAt<Yi)&&Oi(o):i===Do&&Ri(o,t)}}}function Df(e){const t=ge&&ge.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Do:r.state=Do,r.pure?zt.push(r):Ft.push(r),r.observers&&Df(r))}}function dr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)dr(e.tOwned[t]);delete e.tOwned}if(ge&&ge.running&&e.pure)Of(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)dr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ge&&ge.running?e.tState=0:e.state=0}function Of(e,t){if(t||(e.tState=0,ge.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Of(e.owned[n])}function Ci(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ku(e,t=Ge){throw Ci(e)}function Xa(e){if(typeof e=="function"&&!e.length)return Xa(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Xa(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Gh(e,t){return function(r){let o;return le(()=>o=Ct(()=>(Ge.context={...Ge.context,[e]:r.value},Xi(()=>r.children))),void 0),o}}const Vh=Symbol("fallback");function kc(e){for(let t=0;t<e.length;t++)e[t]()}function Wh(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>kc(i)),()=>{let u=e()||[],c=u.length,l,d;return u[Ti],Ct(()=>{let p,g,b,h,y,v,x,k,E;if(c===0)s!==0&&(kc(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Vh],o[0]=Dr(S=>(i[0]=S,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Dr(f);s=c}else{for(b=new Array(c),h=new Array(c),a&&(y=new Array(c)),v=0,x=Math.min(s,c);v<x&&r[v]===u[v];v++);for(x=s-1,k=c-1;x>=v&&k>=v&&r[x]===u[k];x--,k--)b[k]=o[x],h[k]=i[x],a&&(y[k]=a[x]);for(p=new Map,g=new Array(k+1),d=k;d>=v;d--)E=u[d],l=p.get(E),g[d]=l===void 0?-1:l,p.set(E,d);for(l=v;l<=x;l++)E=r[l],d=p.get(E),d!==void 0&&d!==-1?(b[d]=o[l],h[d]=i[l],a&&(y[d]=a[l]),d=g[d],p.set(E,d)):i[l]();for(d=v;d<c;d++)d in b?(o[d]=b[d],i[d]=h[d],a&&(a[d]=y[d],a[d](d))):o[d]=Dr(f);o=o.slice(0,s=c),r=u.slice(0)}return o});function f(p){if(i[d]=p,a){const[g,b]=$(d);return a[d]=b,t(u[d],g)}return t(u[d])}}}function m(e,t){return Ct(()=>e(t||{}))}function li(){return!0}const Qa={get(e,t,n){return t===un?n:e.get(t)},has(e,t){return t===un?!0:e.has(t)},set:li,deleteProperty:li,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:li,deleteProperty:li}},ownKeys(e){return e.keys()}};function Ps(e){return(e=typeof e=="function"?e():e)?e:{}}function Yh(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Q(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&un in a,e[s]=typeof a=="function"?(t=!0,re(a)):a}if(wf&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Ps(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Ps(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Ps(e[a])));return[...new Set(s)]}},Qa);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:Yh.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[l];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function we(e,...t){const n=t.length;if(wf&&un in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Qa));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},Qa)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Zh=0;function qt(){return Le.context?Le.getNextContextId():`cl-${Zh++}`}const Xh=e=>`Stale read from <${e}>.`;function yt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return re(Wh(()=>e.each,e.children,t||void 0))}function Y(e){const t=e.keyed,n=re(()=>e.when,void 0,void 0),r=t?n:re(n,void 0,{equals:(o,i)=>!o==!i});return re(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?Ct(()=>i(t?o:()=>{if(!Ct(r))throw Xh("Show");return n()})):i}return e.fallback},void 0,void 0)}const Qh=mt();function Ji(e){let t=0,n,r,o,i,s;const[a,u]=$(!1),c=Hh(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Oo();if(Le.context&&Le.load){const g=Le.getContextId();let b=Le.load(g);if(b&&(typeof b!="object"||b.s!==1?o=b:Le.gather(g)),o&&o!=="$$f"){const[h,y]=$(void 0,{equals:!1});i=h,o.then(()=>{if(Le.done)return y();Le.gather(g),xo(r),y(),xo()},v=>{s=v,y()})}}const f=lt(Qh);f&&(n=f.register(l.inFallback));let p;return ae(()=>p&&p()),m(c.Provider,{value:l,get children(){return re(()=>{if(s)throw s;if(r=Le.context,i)return i(),i=void 0;r&&o==="$$f"&&xo();const g=re(()=>e.children);return re(b=>{const h=l.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!h||o&&o!=="$$f")&&y)return l.resolved=!0,p&&p(),p=r=o=void 0,Kh(l.effects),g();if(v)return p?b:Dr(x=>(p=x,r&&(xo({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Jh=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],em=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Jh]),tm=new Set(["innerHTML","textContent","innerText","children"]),nm=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),rm=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function om(e,t){const n=rm[e];return typeof n=="object"?n[t]?n.$:void 0:n}const im=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sm=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),am={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},de=e=>re(()=>e());function um(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,f=1,p;for(;++d<o&&d<i&&!((p=c.get(t[d]))==null||p!==l+f);)f++;if(f>l-a){const g=t[s];for(;a<l;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Sc="_$DX_DELEGATE";function cm(e,t,n,r={}){let o;return Dr(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function B(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function ln(e,t=window.document){const n=t[Sc]||(t[Sc]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,mm))}}function xe(e,t,n){$r(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function lm(e,t,n,r){$r(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function dm(e,t,n){$r(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ut(e,t){$r(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ni(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function fm(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Cc(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(Cc(e,a,!0),n[a]=u)}return n}function ur(e,t,n){if(!t)return n?xe(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Ro(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Wn(e,t={},n,r){const o={};return r||le(()=>o.children=No(e,t.children,o.children)),le(()=>typeof t.ref=="function"&&Gn(t.ref,e)),le(()=>gm(e,t,n,!0,o,!0)),o}function Gn(e,t,n){return Ct(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return No(e,t,r,n);le(o=>No(e,t(),o,n),r)}function gm(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Ac(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Ac(e,s,a,o[s],n,i,t)}}function pm(e){let t,n;return!$r()||!(t=Le.registry.get(n=bm()))?e():(Le.completed&&Le.completed.add(t),Le.registry.delete(n),t)}function $r(e){return!!Le.context&&!Le.done&&(!e||e.isConnected)}function hm(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Cc(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Ac(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return ur(e,n,r);if(t==="classList")return fm(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),p=im.has(f);if(!p&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(p||n)&&(Ni(e,f,n,p),p&&ln([f]))}else if(t.slice(0,5)==="attr:")xe(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")dm(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=tm.has(t))||!o&&((l=om(t,e.tagName))||(u=em.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if($r(e))return n;t==="class"||t==="className"?ut(e,n):a&&!u&&!c?e[hm(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&am[t.split(":")[0]];f?lm(e,f,t,n):xe(e,nm[t]||t,n)}return n}function mm(e){if(Le.registry&&Le.events&&Le.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Le.registry&&!Le.done&&(Le.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function No(e,t,n,r,o){const i=$r(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=Ur(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Ur(e,n,r)}else{if(s==="function")return le(()=>{let u=t();for(;typeof u=="function";)u=u();n=No(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(Ja(u,t,n,o))return le(()=>n=No(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=Ur(e,n,r),a)return n}else c?n.length===0?Tc(e,u,r):um(e,n,u):(n&&Ur(e),Tc(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Ur(e,n,r,t);Ur(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ja(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Ja(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Ja(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function Tc(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Ur(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function bm(){return Le.getNextContextId()}const ym=!1,vm="http://www.w3.org/2000/svg";function Rf(e,t=!1,n=void 0){return t?document.createElementNS(vm,e):document.createElement(e,{is:n})}function Su(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Oo();let i,s=!!Le.context;return oe(()=>{s&&(Oo().user=s=!1),i||(i=Zi(o,()=>re(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=$(!1),l=()=>c(!0);Dr(d=>w(a,()=>u()?d():i(),null)),ae(l)}else{const u=Rf(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ae(()=>a.removeChild(u))}},void 0,{render:!s}),n}function xm(e,t){const n=re(e);return re(()=>{const r=n();switch(typeof r){case"function":return Ct(()=>r(t));case"string":const o=sm.has(r),i=Le.context?pm():Rf(r,o,Ct(()=>t.is));return Wn(i,t,o),i}})}function Nf(e){const[,t]=we(e,["component"]);return xm(()=>e.component,t)}function If(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let eu;function Cu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),eu=window.history.state._depth}Cu();function wm(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function _m(e,t){let n=!1;return()=>{const r=eu;Cu();const o=r==null?null:eu-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Em=/^(?:[a-z0-9]+:)?\/\//i,km=/^\/+|(\/)\/+$/g,Mf="http://sr";function Or(e,t=!1){const n=e.replace(km,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ai(e,t,n){if(Em.test(t))return;const r=Or(e),o=n&&Or(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+Or(t,!i)}function Sm(e,t){if(e==null)throw new Error(t);return e}function Cm(e,t){return Or(e).replace(/\/*(\*.*)?$/g,"")+Or(t)}function Lf(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Am(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const p=i[f],g=p[0]===":",b=g?u[f]:u[f].toLowerCase(),h=g?p.slice(1):p.toLowerCase();if(g&&Fs(b,d(h)))l.params[h]=b;else if(g||!Fs(b,h))return null;l.path+=`/${b}`}if(o){const f=c?u.slice(-c).join("/"):"";if(Fs(f,d(o)))l.params[o]=f;else return null}return l}}function Fs(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Tm(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function $f(e){const t=new Map,n=Oo();return new Proxy({},{get(r,o){return t.has(o)||Zi(n,()=>t.set(o,re(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Pf(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return Pf(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Dm=100,Ff=mt(),Au=mt(),Wo=()=>Sm(lt(Ff),"<A> and 'use' router primitives can be only used inside a Route."),Om=()=>lt(Au)||Wo().base,Rm=e=>{const t=Om();return re(()=>t.resolvePath(e()))},Nm=e=>{const t=Wo();return re(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},es=()=>Wo().navigatorFactory(),ts=()=>Wo().location,ns=()=>Wo().params;function Im(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Bf(e.path).reduce((c,l)=>{for(const d of Pf(l)){const f=Cm(t,d);let p=a?f:f.split("/*",1)[0];p=p.split("/").map(g=>g.startsWith(":")||g.startsWith("*")?g:encodeURIComponent(g)).join("/"),c.push({...u,originalPath:l,pattern:p,matcher:Am(p,!a,e.matchFilters)})}return c},[])}function Mm(e,t=0){return{routes:e,score:Tm(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Bf(e){return Array.isArray(e)?e:[e]}function zf(e,t="",n=[],r=[]){const o=Bf(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=Im(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)zf(a.children,c.pattern,n,r);else{const d=Mm([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Bs(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Lm(e,t,n){const r=new URL(Mf),o=re(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=re(()=>o().pathname),s=re(()=>o().search,!0),a=re(()=>o().hash),u=()=>"",c=At(s,()=>Lf(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):$f(c)}}let Tr;function $m(){return Tr}function Pm(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(C=>C),u=s.renderPath||(C=>C),c=s.beforeLeave||If(),l=Ai("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,f]=$(!1);let p;const g=(C,N)=>{N.value===b()&&N.state===y()||(p===void 0&&f(!0),Tr=C,p=N,Sf(()=>{p===N&&(h(p.value),v(p.state),E[1](F=>F.filter(G=>G.pending)))}).finally(()=>{p===N&&kf(()=>{Tr=void 0,C==="navigate"&&R(p),f(!1),p=void 0})}))},[b,h]=$(o().value),[y,v]=$(o().state),x=Lm(b,y,s.queryWrapper),k=[],E=$([]),S=re(()=>typeof r.transformUrl=="function"?Bs(t(),r.transformUrl(x.pathname)):Bs(t(),x.pathname)),O=()=>{const C=S(),N={};for(let F=0;F<C.length;F++)Object.assign(N,C[F].params);return N},_=s.paramsWrapper?s.paramsWrapper(O,t):$f(O),I={pattern:l,path:()=>l,outlet:()=>null,resolvePath(C){return Ai(l,C)}};return le(At(o,C=>g("native",C),{defer:!0})),{base:I,location:x,params:_,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:T,matches:S,beforeLeave:c,preloadRoute:M,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:E};function L(C,N,F){Ct(()=>{if(typeof N=="number"){N&&(s.go?s.go(N):console.warn("Router integration does not support relative routing"));return}const G=!N||N[0]==="?",{replace:U,resolve:z,scroll:P,state:Z}={replace:!1,resolve:!G,scroll:!0,...F},V=z?C.resolvePath(N):Ai(G&&x.pathname||"",N);if(V===void 0)throw new Error(`Path '${N}' is not a routable path`);if(k.length>=Dm)throw new Error("Too many redirects");const te=b();(V!==te||Z!==y())&&(ym||c.confirm(V,F)&&(k.push({value:te,replace:U,scroll:P,state:y()}),g("navigate",{value:V,state:Z})))})}function T(C){return C=C||lt(Au)||I,(N,F)=>L(C,N,F)}function R(C){const N=k[0];N&&(i({...C,replace:N.replace,scroll:N.scroll}),k.length=0)}function M(C,N){const F=Bs(t(),C.pathname),G=Tr;Tr="preload";for(let U in F){const{route:z,params:P}=F[U];z.component&&z.component.preload&&z.component.preload();const{preload:Z}=z;N&&Z&&Zi(n(),()=>Z({params:P,location:{pathname:C.pathname,search:C.search,hash:C.hash,query:Lf(C),state:null,key:""},intent:"preload"}))}Tr=G}}function Fm(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=re(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:Tr||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?m(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(p){return Ai(o.path(),p,l())}}}const Bm=e=>t=>{const{base:n}=t,r=Xi(()=>t.children),o=re(()=>zf(r(),t.base||""));let i;const s=Pm(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),m(Ff.Provider,{value:s,get children(){return m(zm,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[de(()=>(i=Oo())&&null),m(Um,{routerState:s,get branches(){return o()}})]}})}})};function zm(e){const t=e.routerState.location,n=e.routerState.params,r=re(()=>e.preload&&Ct(()=>{e.preload({params:n,location:t,intent:$m()||"initial"})}));return m(Y,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>m(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Um(e){const t=[];let n;const r=re(At(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Dr(p=>{t[c]=p,u[c]=Fm(e.routerState,u[c-1]||e.routerState.base,Dc(()=>r()[c+1]),()=>{const g=e.routerState.matches();return g[c]??g[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return Dc(()=>r()&&n)()}const Dc=e=>()=>m(Y,{get when(){return e()},keyed:!0,children:t=>m(Au.Provider,{value:t,get children(){return t.outlet()}})}),Er=e=>{const t=Xi(()=>e.children);return Q(e,{get children(){return t()}})};function Km([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Hm(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Km($(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Le.registry&&!Le.done&&(Le.done=!0),o));return e.init&&ae(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Bm({signal:r,create:e.create,utils:e.utils})}function qm(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function jm(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Gm=new Map;function Vm({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(b){return b.namespaceURI==="http://www.w3.org/2000/svg"}function l(b){if(b.defaultPrevented||b.button!==0||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)return;const h=b.composedPath().find(S=>S instanceof Node&&S.nodeName.toUpperCase()==="A");if(!h||t&&!h.hasAttribute("link"))return;const y=c(h),v=y?h.href.baseVal:h.href;if((y?h.target.baseVal:h.target)||!v&&!h.hasAttribute("state"))return;const k=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||k&&k.includes("external"))return;const E=y?new URL(v,document.baseURI):new URL(v);if(!(E.origin!==window.location.origin||i&&E.pathname&&!E.pathname.toLowerCase().startsWith(i.toLowerCase())))return[h,E]}function d(b){const h=l(b);if(!h)return;const[y,v]=h,x=o.parsePath(v.pathname+v.search+v.hash),k=y.getAttribute("state");b.preventDefault(),s(x,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:k?JSON.parse(k):void 0})}function f(b){const h=l(b);if(!h)return;const[y,v]=h;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,y.getAttribute("preload")!=="false")}function p(b){clearTimeout(a);const h=l(b);if(!h)return u=null;const[y,v]=h;u!==y&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,y.getAttribute("preload")!=="false"),u=y},20))}function g(b){if(b.defaultPrevented)return;let h=b.submitter&&b.submitter.hasAttribute("formaction")?b.submitter.getAttribute("formaction"):b.target.getAttribute("action");if(!h)return;if(!h.startsWith("https://action/")){const v=new URL(h,Mf);if(h=o.parsePath(v.pathname+v.search),!h.startsWith(n))return}if(b.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=Gm.get(h);if(y){b.preventDefault();const v=new FormData(b.target,b.submitter);y.call({r:o,f:b.target},b.target.enctype==="multipart/form-data"?v:new URLSearchParams(v))}}ln(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",p,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",g),ae(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",g)})}}function Wm(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=If();return Hm({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(wm(s),"",r):window.history.pushState(s,"",r),jm(decodeURIComponent(window.location.hash.slice(1)),i),Cu()},init:r=>qm(window,"popstate",_m(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Vm({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Ym=B("<a>");function fr(e){e=Q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=we(e,["href","state","class","activeClass","inactiveClass","end"]),n=Rm(()=>e.href),r=Nm(n),o=ts(),i=re(()=>{const s=n();if(s===void 0)return[!1,!1];const a=Or(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(Or(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Ym();return Wn(s,Q(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Zm(e){const t=es(),n=ts(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const Ii=Symbol("store-raw"),Rr=Symbol("store-node"),Sn=Symbol("store-has"),Uf=Symbol("store-self");function Kf(e){let t=e[un];if(!t&&(Object.defineProperty(e,un,{value:t=new Proxy(e,Jm)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function In(e){let t;return e!=null&&typeof e=="object"&&(e[un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ir(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Ii])return n;if(!In(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Ir(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=Ir(o,t))!==o&&(e[i]=r))}return e}function Mi(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Io(e,t,n){if(e[t])return e[t];const[r,o]=$(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Xm(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===un||t===Rr||(delete n.value,delete n.writable,n.get=()=>e[un][t]),n}function Hf(e){Za()&&Io(Mi(e,Rr),Uf)()}function Qm(e){return Hf(e),Reflect.ownKeys(e)}const Jm={get(e,t,n){if(t===Ii)return e;if(t===un)return n;if(t===Ti)return Hf(e),n;const r=Mi(e,Rr),o=r[t];let i=o?o():e[t];if(t===Rr||t===Sn||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Za()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Io(r,t,i)())}return In(i)?Kf(i):i},has(e,t){return t===Ii||t===un||t===Ti||t===Rr||t===Sn||t==="__proto__"?!0:(Za()&&Io(Mi(e,Sn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Qm,getOwnPropertyDescriptor:Xm};function Gt(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Sn]&&e[Sn][t]&&o!==void 0&&e[Sn][t].$()):(e[t]=n,e[Sn]&&e[Sn][t]&&o===void 0&&e[Sn][t].$());let s=Mi(e,Rr),a;if((a=Io(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Io(s,"length",i))&&a.$(e.length)}(a=s[Uf])&&a.$()}function qf(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];jf(o)||Gt(e,o,t[o])}}function jf(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function eb(e,t){if(typeof t=="function"&&(t=t(e)),t=Ir(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Gt(e,n,o)}Gt(e,"length",r)}else qf(e,t)}function wo(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&jf(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)wo(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&wo(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let d=u;d<=c;d+=l)wo(e,[d].concat(t),n);return}else if(t.length>1){wo(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ir(i),r===void 0||In(o)&&In(i)&&!Array.isArray(i)?qf(o,i):Gt(e,r,i))}function tb(...[e,t]){const n=Ir(e||{}),r=Array.isArray(n),o=Kf(n);function i(...s){kf(()=>{r&&s.length===1?eb(n,s[0]):wo(n,s)})}return[o,i]}const tu=Symbol("store-root");function Oc(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Yr(e,t,n,r,o){if(Oc(n))return;const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==tu&&(!In(e)||!In(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){Gt(t,n,e);return}if(s){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let c,l,d,f,p,g,b,h;for(d=0,f=Math.min(i.length,e.length);d<f&&(i[d]===e[d]||o&&i[d]&&e[d]&&i[d][o]&&i[d][o]===e[d][o]);d++)Yr(e[d],i,d,r,o);const y=new Array(e.length),v=new Map;for(f=i.length-1,p=e.length-1;f>=d&&p>=d&&(i[f]===e[p]||o&&i[f]&&e[p]&&i[f][o]&&i[f][o]===e[p][o]);f--,p--)y[p]=i[f];if(d>p||d>f){for(l=d;l<=p;l++)Gt(i,l,e[l]);for(;l<e.length;l++)Gt(i,l,y[l]),Yr(e[l],i,l,r,o);i.length>e.length&&Gt(i,"length",e.length);return}for(b=new Array(p+1),l=p;l>=d;l--)g=e[l],h=o&&g?g[o]:g,c=v.get(h),b[l]=c===void 0?-1:c,v.set(h,l);for(c=d;c<=f;c++)g=i[c],h=o&&g?g[o]:g,l=v.get(h),l!==void 0&&l!==-1&&(y[l]=i[c],l=b[l],v.set(h,l));for(l=d;l<e.length;l++)l in y?(Gt(i,l,y[l]),Yr(e[l],i,l,r,o)):Gt(i,l,e[l])}else for(let c=0,l=e.length;c<l;c++)Yr(e[c],i,c,r,o);i.length>e.length&&Gt(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)Oc(a[c])||Yr(e[a[c]],i,a[c],r,o);const u=Object.keys(i);for(let c=0,l=u.length;c<l;c++)e[u[c]]===void 0&&Gt(i,u[c],void 0)}function nb(e,t={}){const{merge:n,key:r="id"}=t,o=Ir(e);return i=>{if(!In(i)||!In(o))return o;const s=Yr(o,{[tu]:i},tu,n,r);return s===void 0?i:s}}const Li=new WeakMap,Gf={get(e,t){if(t===Ii)return e;const n=e[t];if(t===un||t===Ti||t===Rr||t===Sn||t==="__proto__")return n;let r;return In(n)?Li.get(n)||(Li.set(n,r=new Proxy(n,Gf)),r):n},set(e,t,n){return Gt(e,t,Ir(n)),!0},deleteProperty(e,t){return Gt(e,t,void 0,!0),!0}};function Rc(e){return t=>{if(In(t)){let n;(n=Li.get(t))||Li.set(t,n=new Proxy(t,Gf)),e(n)}return t}}const Ie=e=>typeof e=="string",go=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Nc=e=>e==null?"":String(e),rb=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ob=/###/g,Ic=e=>e&&e.includes("###")?e.replace(ob,"."):e,Mc=e=>!e||Ie(e),So=(e,t,n)=>{const r=Ie(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Mc(e))return{};const i=Ic(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Mc(e)?{}:{obj:e,k:Ic(r[o])}},Lc=(e,t,n)=>{const{obj:r,k:o}=So(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=So(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=So(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ib=(e,t,n,r)=>{const{obj:o,k:i}=So(e,t,Object);o[i]=o[i]||[],o[i].push(n)},$i=(e,t)=>{const{obj:n,k:r}=So(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},sb=(e,t,n)=>{const r=$i(e,n);return r!==void 0?r:$i(t,n)},Vf=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Ie(e[r])||e[r]instanceof String||Ie(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Vf(e[r],t[r],n):e[r]=t[r]);return e},Bn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ab={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},ub=e=>Ie(e)?e.replace(/[&<>"'\/]/g,t=>ab[t]):e;class cb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const lb=[" ",",","?","!",";"],db=new cb(20),fb=(e,t,n)=>{t=t||"",n=n||"";const r=lb.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=db.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},nu=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Mo=e=>e?.replace(/_/g,"-"),gb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Pi{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||gb,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>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 Pi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Pi(this.logger,t)}}var An=new Pi;class rs{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class $c extends rs{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Ie(r)&&i?a.push(...r.split(i)):a.push(r)));const u=$i(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Ie(r)?u:nu(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Lc(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(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=$i(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Vf(u,r,i):u={...u,...r},Lc(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Wf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const Yf=Symbol("i18next/PATH_KEY");function pb(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Yf?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Jr(e,t){const{[Yf]:n}=e(pb()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const zs=e=>!Ie(e)&&typeof e!="boolean"&&typeof e!="number";class Fi extends rs{constructor(t,n={}){super(),rb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=An.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=zs(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fb(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces: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=Jr(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Jr(M,{...this.options,...o}):String(M));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,f=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const p=this.resolve(t,o);let g=p?.res;const b=p?.usedKey||a,h=p?.exactUsedKey||a,y=["[object Number]","[object Function]","[object RegExp]"],v=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,k=o.count!==void 0&&!Ie(o.count),E=Fi.hasDefaultValue(o),S=k?this.pluralResolver.getSuffix(d,o.count,o):"",O=o.ordinal&&k?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",_=k&&!o.ordinal&&o.count===0,I=_&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${S}`]||o[`defaultValue${O}`]||o.defaultValue;let L=g;x&&!g&&E&&(L=I);const T=zs(L),R=Object.prototype.toString.apply(L);if(x&&L&&T&&!y.includes(R)&&!(Ie(v)&&Array.isArray(L))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,L,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=M,p.usedParams=this.getUsedParamsDetails(o),p):M}if(s){const M=Array.isArray(L),C=M?[]:{},N=M?h:b;for(const F in L)if(Object.prototype.hasOwnProperty.call(L,F)){const G=`${N}${s}${F}`;E&&!g?C[F]=this.translate(G,{...o,defaultValue:zs(I)?I[F]:void 0,joinArrays:!1,ns:u}):C[F]=this.translate(G,{...o,joinArrays:!1,ns:u}),C[F]===G&&(C[F]=L[F])}g=C}}else if(x&&Ie(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,t,o,r));else{let M=!1,C=!1;!this.isValidLookup(g)&&E&&(M=!0,g=I),this.isValidLookup(g)||(C=!0,g=a);const F=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:g,G=E&&I!==g&&this.options.updateMissing;if(C||M||G){if(this.logger.log(G?"updateKey":"missingKey",d,c,k&&!G?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,G?I:g),s){const Z=this.resolve(a,{...o,keySeparator:!1});Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let Z=0;Z<z.length;Z++)U.push(z[Z]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(o.lng||this.language):U.push(o.lng||this.language);const P=(Z,V,te)=>{const W=E&&te!==g?te:F;this.options.missingKeyHandler?this.options.missingKeyHandler(Z,c,V,W,G,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Z,c,V,W,G,o),this.emit("missingKey",Z,c,V,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?U.forEach(Z=>{const V=this.pluralResolver.getSuffixes(Z,o);_&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(te=>{P([Z],a+te,o[`defaultValue${te}`]||I)})}):P(U,a,I))}g=this.extendTranslation(g,t,o,p,r),C&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}${l}${a}`),(C||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,M?g:void 0,o))}return i?(p.res=g,p.usedParams=this.getUsedParamsDetails(o),p):g}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=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),f=d&&d.length;c<f&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Ie(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Wf.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return Ie(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Jr(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Ie(n.count),p=f&&!n.ordinal&&n.count===0,g=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(h=>{this.isValidLookup(r)||(a=h,!this.checkedLoadedFor[`${b[0]}-${h}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${b[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(y=>{if(this.isValidLookup(r))return;s=y;const v=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(v,l,y,h,n);else{let k;f&&(k=this.pluralResolver.getSuffix(y,n.count,n));const E=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&k.startsWith(S)&&v.push(l+k.replace(S,this.options.pluralSeparator)),v.push(l+k),p&&v.push(l+E)),g){const O=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(O),f&&(n.ordinal&&k.startsWith(S)&&v.push(O+k.replace(S,this.options.pluralSeparator)),v.push(O+k),p&&v.push(O+E))}}let x;for(;x=v.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(y,h,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!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 Pc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=An.create("languageUtils")}getScriptPartFromCode(t){if(t=Mo(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Mo(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(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 Fc={zero:0,one:1,two:2,few:3,many:4,other:5},Bc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hb{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=An.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Mo(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Bc;if(!t.match(/-|_/))return Bc;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>Fc[o]-Fc[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const zc=(e,t,n,r=".",o=!0)=>{let i=sb(e,t,n);return!i&&o&&Ie(n)&&(i=nu(e,n,r),i===void 0&&(i=nu(t,n,r))),i},mb=e=>e.replace(/\$/g,"$$$$");class Uc{constructor(t={}){this.logger=An.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:h,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:ub,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Bn(i):s||"{{",this.suffix=a?Bn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?Bn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?Bn(l):"",this.nestingPrefix=f?Bn(f):p||Bn("$t("),this.nestingSuffix=g?Bn(g):b||Bn(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(!p.includes(this.formatSeparator)){const y=zc(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),b=g.shift().trim(),h=g.join(this.formatSeparator).trim();return this.format(zc(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...o,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>p},{regex:this.regexp,safeValue:p=>this.escapeValue?this.escape(p):p}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof l=="function"){const h=l(t,i,o);s=Ie(h)?h:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!Ie(s)&&!this.useRawValueToEscape&&(s=Nc(s));const b=p.safeValue(s);if(t=t.replace(i[0],mb(b)),d?(p.regex.lastIndex+=b.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${Bn(l)}[ ]*{`));let f=`{${d[1]}`;u=d[0],f=this.interpolate(f,s);const p=f.match(/'/g),g=f.match(/"/g);((p?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${l}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!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=Nc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const bb=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Kc=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Mo(r),o),t[s]=a),a(n)}},yb=e=>(t,n,r)=>e(Mo(n),r)(t);class vb{constructor(t={}){this.logger=An.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Kc:yb;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Kc(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=bb(c);if(this.formats[l]){let f=u;try{const p=o?.formatParams?.[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||r;f=this.formats[l](u,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const xb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wb extends rs{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=An.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{ib(u.loaded,[i],s),xb(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();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 Us=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),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}),Hc=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),di=()=>{},_b=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Co extends rs{constructor(t={},n){if(super(),this.options=Hc(t),this.services={},this.logger=An,this.modules={external:[]},_b(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Ie(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Us();this.options={...r,...this.options,...Hc(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?An.init(o(this.modules.logger),this.options):An.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=vb;const l=new Pc(this.options);this.store=new $c(this.options.resources,this.options);const d=this.services;d.logger=An,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new hb(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Uc(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new wb(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Fi(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=di),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=go(),u=()=>{const c=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(l,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=di){let r=n;const o=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=go();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=di),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Wf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=go();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=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 f={...this.options,...l};Array.isArray(i)&&!d&&(f.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Jr(l.keyPrefix,f));const p=this.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>(typeof b=="function"&&(b=Jr(b,f)),`${l.keyPrefix}${p}${b}`)):(typeof a=="function"&&(a=Jr(a,f)),g=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(g,l)};return 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=go();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=go();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 Pc(Us());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Co(t,n);return r.createInstance=Co.createInstance,r}cloneInstance(t={},n=di){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Co(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,d)=>(l[d]={...u[c][d]},l),u[c]),u),{});i.store=new $c(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...Us().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new Uc(c)}return i.translator=new Fi(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wt=Co.createInstance();wt.createInstance;wt.dir;wt.init;wt.loadResources;wt.reloadResources;wt.use;wt.changeLanguage;wt.getFixedT;wt.t;wt.exists;wt.setDefaultNamespace;wt.hasLoadedNamespace;wt.loadNamespaces;wt.loadLanguages;const{slice:Eb,forEach:kb}=[];function Sb(e){return kb.call(Eb.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Cb(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const qc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ab=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!qc.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!qc.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},jc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Ab(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Tb={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return jc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&jc.create(n,e,r,o,i)}},Db={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},Ob={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Kr=null;const Gc=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.localStorage!==null,!Kr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Kr=!1}return Kr};var Rb={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Gc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Gc()&&window.localStorage.setItem(n,e)}};let Hr=null;const Vc=()=>{if(Hr!==null)return Hr;try{if(Hr=typeof window<"u"&&window.sessionStorage!==null,!Hr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Hr=!1}return Hr};var Nb={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Vc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Vc()&&window.sessionStorage.setItem(n,e)}},Ib={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Mb={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Lb={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},$b={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Zf=!1;try{document.cookie,Zf=!0}catch{}const Xf=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Zf||Xf.splice(1,1);const Pb=()=>({order:Xf,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Qf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Sb(n,this.options||{},Pb()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Tb),this.addDetector(Db),this.addDetector(Rb),this.addDetector(Nb),this.addDetector(Ib),this.addDetector(Mb),this.addDetector(Lb),this.addDetector($b),this.addDetector(Ob)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Cb(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Qf.type="languageDetector";const Fb={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"需求列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",languageSwitch:"切换语言",langZh:"中文",langEn:"English"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",refreshList:"刷新项目列表",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",inputPlaceholder:"输入消息,Enter 发送…",draftPlaceholder:"输入消息,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败"},home:{specList:"需求列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Agent 创建中…",creatingHint:"Agent 正在创建 spec 文档…可在右下角 Agent 面板查看流式输出,文档落地后将自动跳转。",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",specPathCopyFailed:"复制 spec 文件路径失败"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",stash:"暂存",reviewChanges:"Review 变更",reviewing:"Review 中…",committing:"提交中…",discarding:"丢弃中…",stashing:"暂存中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:",noReport:"尚无 review 报告。点击「Review 变更」让 Agent 生成。",lastReview:"最近一次 review:{{time}}",reviewHint:"Review 下方变更文件,生成报告"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",debugMode:"debug 模式",debugModeHint:"深度分析调试,尝试解决疑难问题",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},Bb={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",languageSwitch:"Switch Language",langZh:"中文",langEn:"English"},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",refreshList:"Refresh project list",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",inputPlaceholder:"Type a message, Enter to send…",draftPlaceholder:"Type a message — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Agent creating…",creatingHint:"Agent is creating spec document… Watch streaming output in the Agent panel at bottom-right. Auto-navigate when ready.",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",specPathCopyFailed:"Failed to copy spec file path"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",stash:"Stash",reviewChanges:"Review Changes",reviewing:"Reviewing…",committing:"Committing…",discarding:"Discarding…",stashing:"Stashing…",commitPlaceholder:"commit message…",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: ",noReport:'No review report yet. Click "Review Changes" to generate.',lastReview:"Last review: {{time}}",reviewHint:"Review changed files below and generate report"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",debugMode:"debug mode",debugModeHint:"Deep analysis & debugging — tackle stubborn, hard-to-solve issues",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",custom:"Custom",agent:"Agent",cmd:"Command (cmd)",cmdPlaceholder:"e.g. /usr/local/bin/my-agent",args:"Arguments (args, space-separated)",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",cmdRequired:"Custom command cmd cannot be empty",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},Jf=wt.use(Qf).init({resources:{"zh-CN":{translation:Fb},en:{translation:Bb}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});Jf.then(()=>{});/**
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Le={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return kc(this.context.count)},getNextContextId(){return kc(this.context.count++)}};function kc(e){const t=String(e),n=t.length-1;return Le.context.id+(n?String.fromCharCode(96+n):"")+t}function ko(e){Le.context=e}const Fh=!1,Bh=(e,t)=>e===t,un=Symbol("solid-proxy"),kf=typeof Proxy=="function",Di=Symbol("solid-track"),Oi={equals:Bh};let Cf=Rf;const mn=1,Mo=2,Sf={owned:null,cleanups:null,context:null,owner:null},zs={};var Ge=null;let ge=null,zh=null,tt=null,zt=null,Ft=null,Ji=0;function Dr(e,t){const n=tt,r=Ge,o=e.length===0,i=t===void 0?r:t,s=o?Sf:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>At(()=>dr(s)));Ge=s,tt=null;try{return Jt(a,!0)}finally{tt=n,Ge=r}}function L(e,t){t=t?Object.assign({},Oi,t):Oi;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(ge&&ge.running&&ge.sources.has(n)?o=o(n.tValue):o=o(n.value)),Of(n,o));return[Df.bind(n),r]}function Ja(e,t,n){const r=ns(e,t,!0,mn);fo(r)}function le(e,t,n){const r=ns(e,t,!1,mn);fo(r)}function oe(e,t,n){Cf=jh;const r=ns(e,t,!1,mn),o=Nr&<(Nr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Ft?Ft.push(r):fo(r)}function re(e,t,n){n=n?Object.assign({},Oi,n):Oi;const r=ns(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,fo(r),Df.bind(r)}function Uh(e){return e&&typeof e=="object"&&"then"in e}function bn(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=zs,u=null,c=!1,l=!1,d="initialValue"in i,f=typeof r=="function"&&re(r);const p=new Set,[g,b]=(i.storage||L)(i.initialValue),[h,y]=L(void 0),[v,x]=L(void 0,{equals:!1}),[k,C]=L(d?"ready":"unresolved");Le.context&&(u=Le.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Le.load&&Le.has(u)&&(a=Le.load(u)));function E(O,N,M,A){return s===O&&(s=null,A!==void 0&&(d=!0),(O===a||N===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(A,{value:N})),a=zs,ge&&O&&c?(ge.promises.delete(O),c=!1,Jt(()=>{ge.running=!0,T(N,M)},!1)):T(N,M)),N}function T(O,N){Jt(()=>{N===void 0&&b(()=>O),C(N!==void 0?"errored":d?"ready":"unresolved"),y(N);for(const M of p.keys())M.decrement();p.clear()},!1)}function _(){const O=Nr&<(Nr),N=g(),M=h();if(M!==void 0&&!s)throw M;return tt&&!tt.user&&O&&Ja(()=>{v(),s&&(O.resolved&&ge&&c?ge.promises.add(s):p.has(O)||(O.increment(),p.add(O)))}),N}function R(O=!0){if(O!==!1&&l)return;l=!1;const N=f?f():r;if(c=ge&&ge.running,N==null||N===!1){E(s,At(g));return}ge&&s&&ge.promises.delete(s);let M;const A=a!==zs?a:At(()=>{try{return o(N,{value:g(),refetching:O})}catch(I){M=I}});if(M!==void 0){E(s,void 0,Ai(M),N);return}else if(!Uh(A))return E(s,A,void 0,N),A;return s=A,"v"in A?(A.s===1?E(s,A.v,void 0,N):E(s,void 0,Ai(A.v),N),A):(l=!0,queueMicrotask(()=>l=!1),Jt(()=>{C(d?"refreshing":"pending"),x()},!1),A.then(I=>E(A,I,void 0,N),I=>E(A,void 0,Ai(I),N)))}Object.defineProperties(_,{state:{get:()=>k()},error:{get:()=>h()},loading:{get(){const O=k();return O==="pending"||O==="refreshing"}},latest:{get(){if(!d)return _();const O=h();if(O&&!s)throw O;return g()}}});let $=Ge;return f?Ja(()=>($=Ge,R(!1))):R(!1),[_,{refetch:O=>es($,()=>R(O)),mutate:b}]}function Af(e){return Jt(e,!1)}function At(e){if(tt===null)return e();const t=tt;tt=null;try{return e()}finally{tt=t}}function Tt(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=At(()=>t(a,o,s));return o=a,u}}function Vt(e){oe(()=>At(e))}function ae(e){return Ge===null||(Ge.cleanups===null?Ge.cleanups=[e]:Ge.cleanups.push(e)),e}function eu(){return tt}function Lo(){return Ge}function es(e,t){const n=Ge,r=tt;Ge=e,tt=null;try{return Jt(t,!0)}catch(o){Au(o)}finally{Ge=n,tt=r}}function Tf(e){if(ge&&ge.running)return e(),ge.done;const t=tt,n=Ge;return Promise.resolve().then(()=>{tt=t,Ge=n;let r;return Nr&&(r=ge||(ge={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Jt(e,!1),tt=Ge=null,r?r.done:void 0})}const[$T,Cc]=L(!1);function Kh(e){Ft.push.apply(Ft,e),e.length=0}function bt(e,t){const n=Symbol("context");return{id:n,Provider:Gh(n),defaultValue:e}}function lt(e){let t;return Ge&&Ge.context&&(t=Ge.context[e.id])!==void 0?t:e.defaultValue}function ts(e){const t=re(e),n=re(()=>tu(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nr;function Hh(){return Nr||(Nr=bt())}function Df(){const e=ge&&ge.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===mn)fo(this);else{const t=zt;zt=null,Jt(()=>Ni(this),!1),zt=t}if(tt){const t=this.observers;if(!t||t[t.length-1]!==tt){const n=t?t.length:0;tt.sources?(tt.sources.push(this),tt.sourceSlots.push(n)):(tt.sources=[this],tt.sourceSlots=[n]),t?(t.push(tt),this.observerSlots.push(tt.sources.length-1)):(this.observers=[tt],this.observerSlots=[tt.sources.length-1])}}return e&&ge.sources.has(this)?this.tValue:this.value}function Of(e,t,n){let r=ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(ge){const o=ge.running;(o||!n&&ge.sources.has(e))&&(ge.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Jt(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=ge&&ge.running;s&&ge.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?zt.push(i):Ft.push(i),i.observers&&Nf(i)),s?i.tState=mn:i.state=mn)}if(zt.length>1e6)throw zt=[],new Error},!1)}return t}function fo(e){if(!e.fn)return;dr(e);const t=Ji;Sc(e,ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value,t),ge&&!ge.running&&ge.sources.has(e)&&queueMicrotask(()=>{Jt(()=>{ge&&(ge.running=!0),tt=Ge=e,Sc(e,e.tValue,t),tt=Ge=null},!1)})}function Sc(e,t,n){let r;const o=Ge,i=tt;tt=Ge=e;try{r=e.fn(t)}catch(s){return e.pure&&(ge&&ge.running?(e.tState=mn,e.tOwned&&e.tOwned.forEach(dr),e.tOwned=void 0):(e.state=mn,e.owned&&e.owned.forEach(dr),e.owned=null)),e.updatedAt=n+1,Au(s)}finally{tt=i,Ge=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Of(e,r,!0):ge&&ge.running&&e.pure?(ge.sources.has(e)||(e.value=r),ge.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ns(e,t,n,r=mn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ge,context:Ge?Ge.context:null,pure:n};return ge&&ge.running&&(i.state=0,i.tState=r),Ge===null||Ge!==Sf&&(ge&&ge.running&&Ge.pure?Ge.tOwned?Ge.tOwned.push(i):Ge.tOwned=[i]:Ge.owned?Ge.owned.push(i):Ge.owned=[i]),i}function Ri(e){const t=ge&&ge.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Mo)return Ni(e);if(e.suspense&&At(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ji);){if(t&&ge.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(ge.disposed.has(o))return}if((t?e.tState:e.state)===mn)fo(e);else if((t?e.tState:e.state)===Mo){const o=zt;zt=null,Jt(()=>Ni(e,n[0]),!1),zt=o}}}function Jt(e,t){if(zt)return e();let n=!1;t||(zt=[]),Ft?n=!0:Ft=[],Ji++;try{const r=e();return qh(n),r}catch(r){n||(Ft=null),zt=null,Au(r)}}function qh(e){if(zt&&(Rf(zt),zt=null),e)return;let t;if(ge){if(!ge.promises.size&&!ge.queue.size){const r=ge.sources,o=ge.disposed;Ft.push.apply(Ft,ge.effects),t=ge.resolve;for(const i of Ft)"tState"in i&&(i.state=i.tState),delete i.tState;ge=null,Jt(()=>{for(const i of o)dr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)dr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Cc(!1)},!1)}else if(ge.running){ge.running=!1,ge.effects.push.apply(ge.effects,Ft),Ft=null,Cc(!0);return}}const n=Ft;Ft=null,n.length&&Jt(()=>Cf(n),!1),t&&t()}function Rf(e){for(let t=0;t<e.length;t++)Ri(e[t])}function jh(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ri(r)}if(Le.context){if(Le.count){Le.effects||(Le.effects=[]),Le.effects.push(...e.slice(0,n));return}ko()}for(Le.effects&&(Le.done||!Le.count)&&(e=[...Le.effects,...e],n+=Le.effects.length,delete Le.effects),t=0;t<n;t++)Ri(e[t])}function Ni(e,t){const n=ge&&ge.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===mn?o!==t&&(!o.updatedAt||o.updatedAt<Ji)&&Ri(o):i===Mo&&Ni(o,t)}}}function Nf(e){const t=ge&&ge.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Mo:r.state=Mo,r.pure?zt.push(r):Ft.push(r),r.observers&&Nf(r))}}function dr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)dr(e.tOwned[t]);delete e.tOwned}if(ge&&ge.running&&e.pure)If(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)dr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ge&&ge.running?e.tState=0:e.state=0}function If(e,t){if(t||(e.tState=0,ge.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)If(e.owned[n])}function Ai(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Au(e,t=Ge){throw Ai(e)}function tu(e){if(typeof e=="function"&&!e.length)return tu(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=tu(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Gh(e,t){return function(r){let o;return le(()=>o=At(()=>(Ge.context={...Ge.context,[e]:r.value},ts(()=>r.children))),void 0),o}}const Vh=Symbol("fallback");function Ac(e){for(let t=0;t<e.length;t++)e[t]()}function Wh(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>Ac(i)),()=>{let u=e()||[],c=u.length,l,d;return u[Di],At(()=>{let p,g,b,h,y,v,x,k,C;if(c===0)s!==0&&(Ac(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Vh],o[0]=Dr(E=>(i[0]=E,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Dr(f);s=c}else{for(b=new Array(c),h=new Array(c),a&&(y=new Array(c)),v=0,x=Math.min(s,c);v<x&&r[v]===u[v];v++);for(x=s-1,k=c-1;x>=v&&k>=v&&r[x]===u[k];x--,k--)b[k]=o[x],h[k]=i[x],a&&(y[k]=a[x]);for(p=new Map,g=new Array(k+1),d=k;d>=v;d--)C=u[d],l=p.get(C),g[d]=l===void 0?-1:l,p.set(C,d);for(l=v;l<=x;l++)C=r[l],d=p.get(C),d!==void 0&&d!==-1?(b[d]=o[l],h[d]=i[l],a&&(y[d]=a[l]),d=g[d],p.set(C,d)):i[l]();for(d=v;d<c;d++)d in b?(o[d]=b[d],i[d]=h[d],a&&(a[d]=y[d],a[d](d))):o[d]=Dr(f);o=o.slice(0,s=c),r=u.slice(0)}return o});function f(p){if(i[d]=p,a){const[g,b]=L(d);return a[d]=b,t(u[d],g)}return t(u[d])}}}function m(e,t){return At(()=>e(t||{}))}function di(){return!0}const nu={get(e,t,n){return t===un?n:e.get(t)},has(e,t){return t===un?!0:e.has(t)},set:di,deleteProperty:di,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:di,deleteProperty:di}},ownKeys(e){return e.keys()}};function Us(e){return(e=typeof e=="function"?e():e)?e:{}}function Yh(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Q(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&un in a,e[s]=typeof a=="function"?(t=!0,re(a)):a}if(kf&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Us(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Us(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Us(e[a])));return[...new Set(s)]}},nu);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:Yh.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[l];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function we(e,...t){const n=t.length;if(kf&&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)}},nu));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))}},nu)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Zh=0;function qt(){return Le.context?Le.getNextContextId():`cl-${Zh++}`}const Xh=e=>`Stale read from <${e}>.`;function vt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return re(Wh(()=>e.each,e.children,t||void 0))}function W(e){const t=e.keyed,n=re(()=>e.when,void 0,void 0),r=t?n:re(n,void 0,{equals:(o,i)=>!o==!i});return re(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?At(()=>i(t?o:()=>{if(!At(r))throw Xh("Show");return n()})):i}return e.fallback},void 0,void 0)}const Qh=bt();function rs(e){let t=0,n,r,o,i,s;const[a,u]=L(!1),c=Hh(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Lo();if(Le.context&&Le.load){const g=Le.getContextId();let b=Le.load(g);if(b&&(typeof b!="object"||b.s!==1?o=b:Le.gather(g)),o&&o!=="$$f"){const[h,y]=L(void 0,{equals:!1});i=h,o.then(()=>{if(Le.done)return y();Le.gather(g),ko(r),y(),ko()},v=>{s=v,y()})}}const f=lt(Qh);f&&(n=f.register(l.inFallback));let p;return ae(()=>p&&p()),m(c.Provider,{value:l,get children(){return re(()=>{if(s)throw s;if(r=Le.context,i)return i(),i=void 0;r&&o==="$$f"&&ko();const g=re(()=>e.children);return re(b=>{const h=l.inFallback(),{showContent:y=!0,showFallback:v=!0}=n?n():{};if((!h||o&&o!=="$$f")&&y)return l.resolved=!0,p&&p(),p=r=o=void 0,Kh(l.effects),g();if(v)return p?b:Dr(x=>(p=x,r&&(ko({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Jh=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],em=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Jh]),tm=new Set(["innerHTML","textContent","innerText","children"]),nm=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),rm=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function om(e,t){const n=rm[e];return typeof n=="object"?n[t]?n.$:void 0:n}const im=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sm=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),am={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},de=e=>re(()=>e());function um(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,f=1,p;for(;++d<o&&d<i&&!((p=c.get(t[d]))==null||p!==l+f);)f++;if(f>l-a){const g=t[s];for(;a<l;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Tc="_$DX_DELEGATE";function cm(e,t,n,r={}){let o;return Dr(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function B(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function ln(e,t=window.document){const n=t[Tc]||(t[Tc]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,mm))}}function xe(e,t,n){$r(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function lm(e,t,n,r){$r(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function dm(e,t,n){$r(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ut(e,t){$r(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ii(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function fm(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Dc(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||(Dc(e,a,!0),n[a]=u)}return n}function ur(e,t,n){if(!t)return n?xe(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 $o(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Wn(e,t={},n,r){const o={};return r||le(()=>o.children=Po(e,t.children,o.children)),le(()=>typeof t.ref=="function"&&Vn(t.ref,e)),le(()=>gm(e,t,n,!0,o,!0)),o}function Vn(e,t,n){return At(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Po(e,t,r,n);le(o=>Po(e,t(),o,n),r)}function gm(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Oc(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Oc(e,s,a,o[s],n,i,t)}}function pm(e){let t,n;return!$r()||!(t=Le.registry.get(n=bm()))?e():(Le.completed&&Le.completed.add(t),Le.registry.delete(n),t)}function $r(e){return!!Le.context&&!Le.done&&(!e||e.isConnected)}function hm(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Dc(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 Oc(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return ur(e,n,r);if(t==="classList")return fm(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),p=im.has(f);if(!p&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(p||n)&&(Ii(e,f,n,p),p&&ln([f]))}else if(t.slice(0,5)==="attr:")xe(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")dm(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=tm.has(t))||!o&&((l=om(t,e.tagName))||(u=em.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if($r(e))return n;t==="class"||t==="className"?ut(e,n):a&&!u&&!c?e[hm(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&am[t.split(":")[0]];f?lm(e,f,t,n):xe(e,nm[t]||t,n)}return n}function mm(e){if(Le.registry&&Le.events&&Le.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Le.registry&&!Le.done&&(Le.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Po(e,t,n,r,o){const i=$r(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=Ur(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Ur(e,n,r)}else{if(s==="function")return le(()=>{let u=t();for(;typeof u=="function";)u=u();n=Po(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(ru(u,t,n,o))return le(()=>n=Po(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=Ur(e,n,r),a)return n}else c?n.length===0?Rc(e,u,r):um(e,n,u):(n&&Ur(e),Rc(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Ur(e,n,r,t);Ur(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ru(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=ru(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=ru(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 Rc(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Ur(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function bm(){return Le.getNextContextId()}const ym=!1,vm="http://www.w3.org/2000/svg";function Mf(e,t=!1,n=void 0){return t?document.createElementNS(vm,e):document.createElement(e,{is:n})}function Tu(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Lo();let i,s=!!Le.context;return oe(()=>{s&&(Lo().user=s=!1),i||(i=es(o,()=>re(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=L(!1),l=()=>c(!0);Dr(d=>w(a,()=>u()?d():i(),null)),ae(l)}else{const u=Mf(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ae(()=>a.removeChild(u))}},void 0,{render:!s}),n}function xm(e,t){const n=re(e);return re(()=>{const r=n();switch(typeof r){case"function":return At(()=>r(t));case"string":const o=sm.has(r),i=Le.context?pm():Mf(r,o,At(()=>t.is));return Wn(i,t,o),i}})}function Lf(e){const[,t]=we(e,["component"]);return xm(()=>e.component,t)}function $f(){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 ou;function Du(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),ou=window.history.state._depth}Du();function wm(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function _m(e,t){let n=!1;return()=>{const r=ou;Du();const o=r==null?null:ou-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Em=/^(?:[a-z0-9]+:)?\/\//i,km=/^\/+|(\/)\/+$/g,Pf="http://sr";function Or(e,t=!1){const n=e.replace(km,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ti(e,t,n){if(Em.test(t))return;const r=Or(e),o=n&&Or(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+Or(t,!i)}function Cm(e,t){if(e==null)throw new Error(t);return e}function Sm(e,t){return Or(e).replace(/\/*(\*.*)?$/g,"")+Or(t)}function Ff(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Am(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const p=i[f],g=p[0]===":",b=g?u[f]:u[f].toLowerCase(),h=g?p.slice(1):p.toLowerCase();if(g&&Ks(b,d(h)))l.params[h]=b;else if(g||!Ks(b,h))return null;l.path+=`/${b}`}if(o){const f=c?u.slice(-c).join("/"):"";if(Ks(f,d(o)))l.params[o]=f;else return null}return l}}function Ks(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Tm(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function Bf(e){const t=new Map,n=Lo();return new Proxy({},{get(r,o){return t.has(o)||es(n,()=>t.set(o,re(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function zf(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 zf(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Dm=100,Uf=bt(),Ou=bt(),Yo=()=>Cm(lt(Uf),"<A> and 'use' router primitives can be only used inside a Route."),Om=()=>lt(Ou)||Yo().base,Rm=e=>{const t=Om();return re(()=>t.resolvePath(e()))},Nm=e=>{const t=Yo();return re(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},os=()=>Yo().navigatorFactory(),is=()=>Yo().location,ss=()=>Yo().params;function Im(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Kf(e.path).reduce((c,l)=>{for(const d of zf(l)){const f=Sm(t,d);let p=a?f:f.split("/*",1)[0];p=p.split("/").map(g=>g.startsWith(":")||g.startsWith("*")?g:encodeURIComponent(g)).join("/"),c.push({...u,originalPath:l,pattern:p,matcher:Am(p,!a,e.matchFilters)})}return c},[])}function Mm(e,t=0){return{routes:e,score:Tm(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Kf(e){return Array.isArray(e)?e:[e]}function Hf(e,t="",n=[],r=[]){const o=Kf(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=Im(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)Hf(a.children,c.pattern,n,r);else{const d=Mm([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Hs(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Lm(e,t,n){const r=new URL(Pf),o=re(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=re(()=>o().pathname),s=re(()=>o().search,!0),a=re(()=>o().hash),u=()=>"",c=Tt(s,()=>Ff(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):Bf(c)}}let Tr;function $m(){return Tr}function Pm(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(A=>A),u=s.renderPath||(A=>A),c=s.beforeLeave||$f(),l=Ti("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,f]=L(!1);let p;const g=(A,I)=>{I.value===b()&&I.state===y()||(p===void 0&&f(!0),Tr=A,p=I,Tf(()=>{p===I&&(h(p.value),v(p.state),C[1](F=>F.filter(G=>G.pending)))}).finally(()=>{p===I&&Af(()=>{Tr=void 0,A==="navigate"&&N(p),f(!1),p=void 0})}))},[b,h]=L(o().value),[y,v]=L(o().state),x=Lm(b,y,s.queryWrapper),k=[],C=L([]),E=re(()=>typeof r.transformUrl=="function"?Hs(t(),r.transformUrl(x.pathname)):Hs(t(),x.pathname)),T=()=>{const A=E(),I={};for(let F=0;F<A.length;F++)Object.assign(I,A[F].params);return I},_=s.paramsWrapper?s.paramsWrapper(T,t):Bf(T),R={pattern:l,path:()=>l,outlet:()=>null,resolvePath(A){return Ti(l,A)}};return le(Tt(o,A=>g("native",A),{defer:!0})),{base:R,location:x,params:_,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:O,matches:E,beforeLeave:c,preloadRoute:M,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function $(A,I,F){At(()=>{if(typeof I=="number"){I&&(s.go?s.go(I):console.warn("Router integration does not support relative routing"));return}const G=!I||I[0]==="?",{replace:U,resolve:z,scroll:P,state:Z}={replace:!1,resolve:!G,scroll:!0,...F},V=z?A.resolvePath(I):Ti(G&&x.pathname||"",I);if(V===void 0)throw new Error(`Path '${I}' is not a routable path`);if(k.length>=Dm)throw new Error("Too many redirects");const te=b();(V!==te||Z!==y())&&(ym||c.confirm(V,F)&&(k.push({value:te,replace:U,scroll:P,state:y()}),g("navigate",{value:V,state:Z})))})}function O(A){return A=A||lt(Ou)||R,(I,F)=>$(A,I,F)}function N(A){const I=k[0];I&&(i({...A,replace:I.replace,scroll:I.scroll}),k.length=0)}function M(A,I){const F=Hs(t(),A.pathname),G=Tr;Tr="preload";for(let U in F){const{route:z,params:P}=F[U];z.component&&z.component.preload&&z.component.preload();const{preload:Z}=z;I&&Z&&es(n(),()=>Z({params:P,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:Ff(A),state:null,key:""},intent:"preload"}))}Tr=G}}function Fm(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=re(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:Tr||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?m(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(p){return Ti(o.path(),p,l())}}}const Bm=e=>t=>{const{base:n}=t,r=ts(()=>t.children),o=re(()=>Hf(r(),t.base||""));let i;const s=Pm(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),m(Uf.Provider,{value:s,get children(){return m(zm,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[de(()=>(i=Lo())&&null),m(Um,{routerState:s,get branches(){return o()}})]}})}})};function zm(e){const t=e.routerState.location,n=e.routerState.params,r=re(()=>e.preload&&At(()=>{e.preload({params:n,location:t,intent:$m()||"initial"})}));return m(W,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>m(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Um(e){const t=[];let n;const r=re(Tt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Dr(p=>{t[c]=p,u[c]=Fm(e.routerState,u[c-1]||e.routerState.base,Nc(()=>r()[c+1]),()=>{const g=e.routerState.matches();return g[c]??g[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return Nc(()=>r()&&n)()}const Nc=e=>()=>m(W,{get when(){return e()},keyed:!0,children:t=>m(Ou.Provider,{value:t,get children(){return t.outlet()}})}),Er=e=>{const t=ts(()=>e.children);return Q(e,{get children(){return t()}})};function Km([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Hm(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Km(L(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Le.registry&&!Le.done&&(Le.done=!0),o));return e.init&&ae(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Bm({signal:r,create:e.create,utils:e.utils})}function qm(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function jm(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Gm=new Map;function Vm({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(b){return b.namespaceURI==="http://www.w3.org/2000/svg"}function l(b){if(b.defaultPrevented||b.button!==0||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)return;const h=b.composedPath().find(E=>E instanceof Node&&E.nodeName.toUpperCase()==="A");if(!h||t&&!h.hasAttribute("link"))return;const y=c(h),v=y?h.href.baseVal:h.href;if((y?h.target.baseVal:h.target)||!v&&!h.hasAttribute("state"))return;const k=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||k&&k.includes("external"))return;const C=y?new URL(v,document.baseURI):new URL(v);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[h,C]}function d(b){const h=l(b);if(!h)return;const[y,v]=h,x=o.parsePath(v.pathname+v.search+v.hash),k=y.getAttribute("state");b.preventDefault(),s(x,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:k?JSON.parse(k):void 0})}function f(b){const h=l(b);if(!h)return;const[y,v]=h;r&&(v.pathname=r(v.pathname)),o.preloadRoute(v,y.getAttribute("preload")!=="false")}function p(b){clearTimeout(a);const h=l(b);if(!h)return u=null;const[y,v]=h;u!==y&&(r&&(v.pathname=r(v.pathname)),a=setTimeout(()=>{o.preloadRoute(v,y.getAttribute("preload")!=="false"),u=y},20))}function g(b){if(b.defaultPrevented)return;let h=b.submitter&&b.submitter.hasAttribute("formaction")?b.submitter.getAttribute("formaction"):b.target.getAttribute("action");if(!h)return;if(!h.startsWith("https://action/")){const v=new URL(h,Pf);if(h=o.parsePath(v.pathname+v.search),!h.startsWith(n))return}if(b.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=Gm.get(h);if(y){b.preventDefault();const v=new FormData(b.target,b.submitter);y.call({r:o,f:b.target},b.target.enctype==="multipart/form-data"?v:new URLSearchParams(v))}}ln(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",p,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",g),ae(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",g)})}}function Wm(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=$f();return Hm({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(wm(s),"",r):window.history.pushState(s,"",r),jm(decodeURIComponent(window.location.hash.slice(1)),i),Du()},init:r=>qm(window,"popstate",_m(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Vm({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Ym=B("<a>");function fr(e){e=Q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=we(e,["href","state","class","activeClass","inactiveClass","end"]),n=Rm(()=>e.href),r=Nm(n),o=is(),i=re(()=>{const s=n();if(s===void 0)return[!1,!1];const a=Or(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(Or(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Ym();return Wn(s,Q(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Zm(e){const t=os(),n=is(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const Mi=Symbol("store-raw"),Rr=Symbol("store-node"),An=Symbol("store-has"),qf=Symbol("store-self");function jf(e){let t=e[un];if(!t&&(Object.defineProperty(e,un,{value:t=new Proxy(e,Jm)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function In(e){let t;return e!=null&&typeof e=="object"&&(e[un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ir(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Mi])return n;if(!In(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Ir(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=Ir(o,t))!==o&&(e[i]=r))}return e}function Li(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Fo(e,t,n){if(e[t])return e[t];const[r,o]=L(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Xm(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===un||t===Rr||(delete n.value,delete n.writable,n.get=()=>e[un][t]),n}function Gf(e){eu()&&Fo(Li(e,Rr),qf)()}function Qm(e){return Gf(e),Reflect.ownKeys(e)}const Jm={get(e,t,n){if(t===Mi)return e;if(t===un)return n;if(t===Di)return Gf(e),n;const r=Li(e,Rr),o=r[t];let i=o?o():e[t];if(t===Rr||t===An||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);eu()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Fo(r,t,i)())}return In(i)?jf(i):i},has(e,t){return t===Mi||t===un||t===Di||t===Rr||t===An||t==="__proto__"?!0:(eu()&&Fo(Li(e,An),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Qm,getOwnPropertyDescriptor:Xm};function Gt(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[An]&&e[An][t]&&o!==void 0&&e[An][t].$()):(e[t]=n,e[An]&&e[An][t]&&o===void 0&&e[An][t].$());let s=Li(e,Rr),a;if((a=Fo(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Fo(s,"length",i))&&a.$(e.length)}(a=s[qf])&&a.$()}function Vf(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Wf(o)||Gt(e,o,t[o])}}function Wf(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function eb(e,t){if(typeof t=="function"&&(t=t(e)),t=Ir(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Gt(e,n,o)}Gt(e,"length",r)}else Vf(e,t)}function Co(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&&Wf(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)Co(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&Co(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)Co(e,[d].concat(t),n);return}else if(t.length>1){Co(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ir(i),r===void 0||In(o)&&In(i)&&!Array.isArray(i)?Vf(o,i):Gt(e,r,i))}function tb(...[e,t]){const n=Ir(e||{}),r=Array.isArray(n),o=jf(n);function i(...s){Af(()=>{r&&s.length===1?eb(n,s[0]):Co(n,s)})}return[o,i]}const iu=Symbol("store-root");function Ic(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Yr(e,t,n,r,o){if(Ic(n))return;const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==iu&&(!In(e)||!In(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){Gt(t,n,e);return}if(s){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let c,l,d,f,p,g,b,h;for(d=0,f=Math.min(i.length,e.length);d<f&&(i[d]===e[d]||o&&i[d]&&e[d]&&i[d][o]&&i[d][o]===e[d][o]);d++)Yr(e[d],i,d,r,o);const y=new Array(e.length),v=new Map;for(f=i.length-1,p=e.length-1;f>=d&&p>=d&&(i[f]===e[p]||o&&i[f]&&e[p]&&i[f][o]&&i[f][o]===e[p][o]);f--,p--)y[p]=i[f];if(d>p||d>f){for(l=d;l<=p;l++)Gt(i,l,e[l]);for(;l<e.length;l++)Gt(i,l,y[l]),Yr(e[l],i,l,r,o);i.length>e.length&&Gt(i,"length",e.length);return}for(b=new Array(p+1),l=p;l>=d;l--)g=e[l],h=o&&g?g[o]:g,c=v.get(h),b[l]=c===void 0?-1:c,v.set(h,l);for(c=d;c<=f;c++)g=i[c],h=o&&g?g[o]:g,l=v.get(h),l!==void 0&&l!==-1&&(y[l]=i[c],l=b[l],v.set(h,l));for(l=d;l<e.length;l++)l in y?(Gt(i,l,y[l]),Yr(e[l],i,l,r,o)):Gt(i,l,e[l])}else for(let c=0,l=e.length;c<l;c++)Yr(e[c],i,c,r,o);i.length>e.length&&Gt(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)Ic(a[c])||Yr(e[a[c]],i,a[c],r,o);const u=Object.keys(i);for(let c=0,l=u.length;c<l;c++)e[u[c]]===void 0&&Gt(i,u[c],void 0)}function nb(e,t={}){const{merge:n,key:r="id"}=t,o=Ir(e);return i=>{if(!In(i)||!In(o))return o;const s=Yr(o,{[iu]:i},iu,n,r);return s===void 0?i:s}}const $i=new WeakMap,Yf={get(e,t){if(t===Mi)return e;const n=e[t];if(t===un||t===Di||t===Rr||t===An||t==="__proto__")return n;let r;return In(n)?$i.get(n)||($i.set(n,r=new Proxy(n,Yf)),r):n},set(e,t,n){return Gt(e,t,Ir(n)),!0},deleteProperty(e,t){return Gt(e,t,void 0,!0),!0}};function Mc(e){return t=>{if(In(t)){let n;(n=$i.get(t))||$i.set(t,n=new Proxy(t,Yf)),e(n)}return t}}const Ie=e=>typeof e=="string",bo=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Lc=e=>e==null?"":String(e),rb=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},ob=/###/g,$c=e=>e&&e.includes("###")?e.replace(ob,"."):e,Pc=e=>!e||Ie(e),Oo=(e,t,n)=>{const r=Ie(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Pc(e))return{};const i=$c(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Pc(e)?{}:{obj:e,k:$c(r[o])}},Fc=(e,t,n)=>{const{obj:r,k:o}=Oo(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=Oo(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=Oo(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ib=(e,t,n,r)=>{const{obj:o,k:i}=Oo(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Pi=(e,t)=>{const{obj:n,k:r}=Oo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},sb=(e,t,n)=>{const r=Pi(e,n);return r!==void 0?r:Pi(t,n)},Zf=(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]):Zf(e[r],t[r],n):e[r]=t[r]);return e},zn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ab={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},ub=e=>Ie(e)?e.replace(/[&<>"'\/]/g,t=>ab[t]):e;class cb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const lb=[" ",",","?","!",";"],db=new cb(20),fb=(e,t,n)=>{t=t||"",n=n||"";const r=lb.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=db.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},su=(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},Bo=e=>e?.replace(/_/g,"-"),gb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Fi{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||gb,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>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 Fi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Fi(this.logger,t)}}var Tn=new Fi;class as{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 Bc extends as{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=Pi(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:su(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),Fc(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=Pi(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Zf(u,r,i):u={...u,...r},Fc(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 Xf={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 Qf=Symbol("i18next/PATH_KEY");function pb(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Qf?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Jr(e,t){const{[Qf]:n}=e(pb()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const qs=e=>!Ie(e)&&typeof e!="boolean"&&typeof e!="number";class Bi extends as{constructor(t,n={}){super(),rb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tn.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=qs(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fb(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces: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=Jr(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Jr(M,{...this.options,...o}):String(M));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,f=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const p=this.resolve(t,o);let g=p?.res;const b=p?.usedKey||a,h=p?.exactUsedKey||a,y=["[object Number]","[object Function]","[object RegExp]"],v=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,k=o.count!==void 0&&!Ie(o.count),C=Bi.hasDefaultValue(o),E=k?this.pluralResolver.getSuffix(d,o.count,o):"",T=o.ordinal&&k?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",_=k&&!o.ordinal&&o.count===0,R=_&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${E}`]||o[`defaultValue${T}`]||o.defaultValue;let $=g;x&&!g&&C&&($=R);const O=qs($),N=Object.prototype.toString.apply($);if(x&&$&&O&&!y.includes(N)&&!(Ie(v)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,$,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(p.res=M,p.usedParams=this.getUsedParamsDetails(o),p):M}if(s){const M=Array.isArray($),A=M?[]:{},I=M?h:b;for(const F in $)if(Object.prototype.hasOwnProperty.call($,F)){const G=`${I}${s}${F}`;C&&!g?A[F]=this.translate(G,{...o,defaultValue:qs(R)?R[F]:void 0,joinArrays:!1,ns:u}):A[F]=this.translate(G,{...o,joinArrays:!1,ns:u}),A[F]===G&&(A[F]=$[F])}g=A}}else if(x&&Ie(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,t,o,r));else{let M=!1,A=!1;!this.isValidLookup(g)&&C&&(M=!0,g=R),this.isValidLookup(g)||(A=!0,g=a);const F=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:g,G=C&&R!==g&&this.options.updateMissing;if(A||M||G){if(this.logger.log(G?"updateKey":"missingKey",d,c,k&&!G?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,G?R:g),s){const Z=this.resolve(a,{...o,keySeparator:!1});Z&&Z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let Z=0;Z<z.length;Z++)U.push(z[Z]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(o.lng||this.language):U.push(o.lng||this.language);const P=(Z,V,te)=>{const Y=C&&te!==g?te:F;this.options.missingKeyHandler?this.options.missingKeyHandler(Z,c,V,Y,G,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(Z,c,V,Y,G,o),this.emit("missingKey",Z,c,V,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?U.forEach(Z=>{const V=this.pluralResolver.getSuffixes(Z,o);_&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!V.includes(`${this.options.pluralSeparator}zero`)&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(te=>{P([Z],a+te,o[`defaultValue${te}`]||R)})}):P(U,a,R))}g=this.extendTranslation(g,t,o,p,r),A&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}${l}${a}`),(A||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,M?g:void 0,o))}return i?(p.res=g,p.usedParams=this.getUsedParamsDetails(o),p):g}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=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),f=d&&d.length;c<f&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Ie(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Xf.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"?Jr(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Ie(n.count),p=f&&!n.ordinal&&n.count===0,g=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(h=>{this.isValidLookup(r)||(a=h,!this.checkedLoadedFor[`${b[0]}-${h}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${b[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(y=>{if(this.isValidLookup(r))return;s=y;const v=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(v,l,y,h,n);else{let k;f&&(k=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&k.startsWith(E)&&v.push(l+k.replace(E,this.options.pluralSeparator)),v.push(l+k),p&&v.push(l+C)),g){const T=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(T),f&&(n.ordinal&&k.startsWith(E)&&v.push(T+k.replace(E,this.options.pluralSeparator)),v.push(T+k),p&&v.push(T+C))}}let x;for(;x=v.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(y,h,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!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 zc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tn.create("languageUtils")}getScriptPartFromCode(t){if(t=Bo(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=Bo(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 Uc={zero:0,one:1,two:2,few:3,many:4,other:5},Kc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hb{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Tn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Bo(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!"),Kc;if(!t.match(/-|_/))return Kc;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)=>Uc[o]-Uc[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 Hc=(e,t,n,r=".",o=!0)=>{let i=sb(e,t,n);return!i&&o&&Ie(n)&&(i=su(e,n,r),i===void 0&&(i=su(t,n,r))),i},mb=e=>e.replace(/\$/g,"$$$$");class qc{constructor(t={}){this.logger=Tn.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:h,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:ub,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?zn(i):s||"{{",this.suffix=a?zn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?zn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?zn(l):"",this.nestingPrefix=f?zn(f):p||zn("$t("),this.nestingSuffix=g?zn(g):b||zn(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(!p.includes(this.formatSeparator)){const y=Hc(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...o,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),b=g.shift().trim(),h=g.join(this.formatSeparator).trim();return this.format(Hc(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...o,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>p},{regex:this.regexp,safeValue:p=>this.escapeValue?this.escape(p):p}].forEach(p=>{for(a=0;i=p.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof l=="function"){const h=l(t,i,o);s=Ie(h)?h:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!Ie(s)&&!this.useRawValueToEscape&&(s=Lc(s));const b=p.safeValue(s);if(t=t.replace(i[0],mb(b)),d?(p.regex.lastIndex+=b.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${zn(l)}[ ]*{`));let f=`{${d[1]}`;u=d[0],f=this.interpolate(f,s);const p=f.match(/'/g),g=f.match(/"/g);((p?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${l}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!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=Lc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const bb=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},jc=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(Bo(r),o),t[s]=a),a(n)}},yb=e=>(t,n,r)=>e(Bo(n),r)(t);class vb{constructor(t={}){this.logger=Tn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?jc:yb;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=jc(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=bb(c);if(this.formats[l]){let f=u;try{const p=o?.formatParams?.[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||r;f=this.formats[l](u,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const xb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wb extends as{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Tn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{ib(u.loaded,[i],s),xb(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();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 js=()=>({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}),Gc=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),fi=()=>{},_b=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ro extends as{constructor(t={},n){if(super(),this.options=Gc(t),this.services={},this.logger=Tn,this.modules={external:[]},_b(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Ie(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=js();this.options={...r,...this.options,...Gc(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?Tn.init(o(this.modules.logger),this.options):Tn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=vb;const l=new zc(this.options);this.store=new Bc(this.options.resources,this.options);const d=this.services;d.logger=Tn,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new hb(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qc(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new wb(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Bi(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=fi),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=bo(),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=fi){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=bo();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=fi),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"&&Xf.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=bo();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 f={...this.options,...l};Array.isArray(i)&&!d&&(f.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Jr(l.keyPrefix,f));const p=this.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>(typeof b=="function"&&(b=Jr(b,f)),`${l.keyPrefix}${p}${b}`)):(typeof a=="function"&&(a=Jr(a,f)),g=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(g,l)};return 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=bo();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=bo();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 zc(js());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 Ro(t,n);return r.createInstance=Ro.createInstance,r}cloneInstance(t={},n=fi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Ro(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 Bc(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...js().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new qc(c)}return i.translator=new Bi(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 wt=Ro.createInstance();wt.createInstance;wt.dir;wt.init;wt.loadResources;wt.reloadResources;wt.use;wt.changeLanguage;wt.getFixedT;wt.t;wt.exists;wt.setDefaultNamespace;wt.hasLoadedNamespace;wt.loadNamespaces;wt.loadLanguages;const{slice:Eb,forEach:kb}=[];function Cb(e){return kb.call(Eb.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Sb(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 Vc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ab=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Vc.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!Vc.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},Wc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Ab(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Tb={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Wc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&Wc.create(n,e,r,o,i)}},Db={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},Ob={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Kr=null;const Yc=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.localStorage!==null,!Kr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Kr=!1}return Kr};var Rb={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Yc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Yc()&&window.localStorage.setItem(n,e)}};let Hr=null;const Zc=()=>{if(Hr!==null)return Hr;try{if(Hr=typeof window<"u"&&window.sessionStorage!==null,!Hr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Hr=!1}return Hr};var Nb={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Zc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Zc()&&window.sessionStorage.setItem(n,e)}},Ib={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Mb={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Lb={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},$b={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Jf=!1;try{document.cookie,Jf=!0}catch{}const e0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Jf||e0.splice(1,1);const Pb=()=>({order:e0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class t0{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=Cb(n,this.options||{},Pb()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Tb),this.addDetector(Db),this.addDetector(Rb),this.addDetector(Nb),this.addDetector(Ib),this.addDetector(Mb),this.addDetector(Lb),this.addDetector($b),this.addDetector(Ob)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Sb(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)}))}}t0.type="languageDetector";const Fb={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"需求列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",globalConfig:"全局配置"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",refreshList:"刷新项目列表",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",inputPlaceholder:"输入消息,Enter 发送…",draftPlaceholder:"输入消息,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败"},home:{specList:"需求列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Agent 创建中…",creatingHint:"Agent 正在创建 spec 文档…可在右下角 Agent 面板查看流式输出,文档落地后将自动跳转。",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",specPathCopyFailed:"复制 spec 文件路径失败"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",stash:"暂存",reviewChanges:"Review 变更",reviewing:"Review 中…",committing:"提交中…",discarding:"丢弃中…",stashing:"暂存中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:",noReport:"尚无 review 报告。点击「Review 变更」让 Agent 生成。",lastReview:"最近一次 review:{{time}}",reviewHint:"Review 下方变更文件,生成报告"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",debugMode:"debug 模式",debugModeHint:"深度分析调试,尝试解决疑难问题",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",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:"声音提示",saved:"全局配置已保存",save:"保存"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},Bb={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",globalConfig:"Global Settings"},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",refreshList:"Refresh project list",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",inputPlaceholder:"Type a message, Enter to send…",draftPlaceholder:"Type a message — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Agent creating…",creatingHint:"Agent is creating spec document… Watch streaming output in the Agent panel at bottom-right. Auto-navigate when ready.",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",specPathCopyFailed:"Failed to copy spec file path"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",stash:"Stash",reviewChanges:"Review Changes",reviewing:"Reviewing…",committing:"Committing…",discarding:"Discarding…",stashing:"Stashing…",commitPlaceholder:"commit message…",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: ",noReport:'No review report yet. Click "Review Changes" to generate.',lastReview:"Last review: {{time}}",reviewHint:"Review changed files below and generate report"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",debugMode:"debug mode",debugModeHint:"Deep analysis & debugging — tackle stubborn, hard-to-solve issues",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",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",saved:"Global settings saved",save:"Save"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},n0=wt.use(t0).init({resources:{"zh-CN":{translation:Fb},en:{translation:Bb}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});n0.then(()=>{});/**
|
|
2
2
|
* @license lucide-solid v1.24.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var zb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},qr=zb,Ub=mt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Kb=B("<svg>"),Hb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},qb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Wc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gb=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vb=e=>{const[t,n]=we(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=lt(Ub);return(()=>{var o=Kb();return Wn(o,Q(qr,{get width(){return t.size??r.size??qr.width},get height(){return t.size??r.size??qr.height},get stroke(){return t.color??r.color??qr.stroke},get"stroke-width"(){return de(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])},get class(){return qb("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Wc(Gb(t.name))}`,`lucide-${Wc(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Hb(n)?"true":void 0}},n),!0,!0),w(o,m(yt,{get each(){return t.iconNode},children:([i,s])=>m(Nf,Q({component:i},s))})),o})()},vt=Vb,Wb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yb=e=>m(vt,Q(e,{iconNode:Wb,name:"check"})),Yc=Yb,Zb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xb=e=>m(vt,Q(e,{iconNode:Zb,name:"chevron-down"})),Tu=Xb,Qb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jb=e=>m(vt,Q(e,{iconNode:Qb,name:"chevron-right"})),e1=Jb,t1=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],n1=e=>m(vt,Q(e,{iconNode:t1,name:"chevrons-left"})),e0=n1,r1=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],o1=e=>m(vt,Q(e,{iconNode:r1,name:"chevrons-right"})),t0=o1,i1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s1=e=>m(vt,Q(e,{iconNode:i1,name:"circle-question-mark"})),a1=s1,u1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c1=e=>m(vt,Q(e,{iconNode:u1,name:"copy"})),l1=c1,d1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],f1=e=>m(vt,Q(e,{iconNode:d1,name:"ellipsis"})),g1=f1,p1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],h1=e=>m(vt,Q(e,{iconNode:p1,name:"git-branch"})),m1=h1,b1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],y1=e=>m(vt,Q(e,{iconNode:b1,name:"git-merge"})),v1=y1,x1=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],w1=e=>m(vt,Q(e,{iconNode:x1,name:"languages"})),_1=w1,E1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k1=e=>m(vt,Q(e,{iconNode:E1,name:"loader-circle"})),sr=k1,S1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],C1=e=>m(vt,Q(e,{iconNode:S1,name:"maximize-2"})),A1=C1,T1=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],D1=e=>m(vt,Q(e,{iconNode:T1,name:"minimize-2"})),O1=D1,R1=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],N1=e=>m(vt,Q(e,{iconNode:R1,name:"paperclip"})),I1=N1,M1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],L1=e=>m(vt,Q(e,{iconNode:M1,name:"pencil"})),$1=L1,P1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],F1=e=>m(vt,Q(e,{iconNode:P1,name:"plus"})),Du=F1,B1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],z1=e=>m(vt,Q(e,{iconNode:B1,name:"refresh-cw"})),U1=z1,K1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],H1=e=>m(vt,Q(e,{iconNode:K1,name:"send"})),os=H1,q1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],j1=e=>m(vt,Q(e,{iconNode:q1,name:"square"})),G1=j1,V1=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],W1=e=>m(vt,Q(e,{iconNode:V1,name:"upload"})),Y1=W1,Z1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],X1=e=>m(vt,Q(e,{iconNode:Z1,name:"x"})),Yo=X1;function rt(e){return`/api/projects/${encodeURIComponent(e)}`}async function ru(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ye(e,t){const n=await fetch(e,t);if(!n.ok){const r=await ru(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const Be={listSpecs:e=>Ye(`${rt(e)}/specs`),getSpec:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${rt(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await ru(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),triggerReview:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/review`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),gitOp:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getReview:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/review`),getDebug:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ye("/api/projects"),removeProject:e=>Ye(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ye(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ye(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ye(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),createDraft:e=>Ye(`${rt(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await ru(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ye(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ye(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${rt(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ye(`${rt(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ye(`${rt(e)}/sessions`),createSession:(e,t={})=>Ye(`${rt(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Ye(`${rt(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ye(`${rt(e)}/specs/${encodeURIComponent(t)}/session`)},[Q1,n0]=$("");function Qr(e){e&&n0(e)}function J1(){n0("")}const[Ot,ey]=$(ty());function ty(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function Zo(){const e=ns();return()=>e.projectId??Ot()}function en(e="",t){const n=Ot();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[cr,r0]=$(!1);function ny(){r0(e=>!e)}function Bi(){r0(!1)}function is(e){ae(Bi),oe(()=>{if(!cr())return;const t=n=>{n.key!=="Escape"||e?.()||Bi()};window.addEventListener("keydown",t),ae(()=>window.removeEventListener("keydown",t))})}function ry(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class oy{clientId=ry();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let Pr=new oy;function ss(e){const t=e;return t.readyState=()=>Pr.readyState(),t}function iy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Pr.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ss(o)}function as(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Pr.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ss(o)}function o0(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Pr.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ss(r)}function i0(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Pr.subscribe(n,r=>{r==="list-updated"&&t()})}function s0(e){return Pr.subscribe("projects",t=>{t==="projects-changed"&&e()})}function sy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Pr.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return ss(o)}function a0(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}function u0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=u0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function c0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=u0(e))&&(r&&(r+=" "),r+=t);return r}const ay=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},uy=(e,t)=>({classGroupId:e,validator:t}),l0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zi="-",Zc=[],cy="arbitrary..",ly=e=>{const t=fy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return dy(s);const a=s.split(zi),u=a[0]===""&&a.length>1?1:0;return d0(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?ay(c,u):u:c||Zc}return n[s]||Zc}}},d0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=d0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(zi):e.slice(t).join(zi),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},dy=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?cy+r:void 0})(),fy=e=>{const{theme:t,classGroups:n}=e;return gy(n,t)},gy=(e,t)=>{const n=l0();for(const r in e){const o=e[r];Ou(o,n,r,t)}return n},Ou=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];py(s,t,n,r)}},py=(e,t,n,r)=>{if(typeof e=="string"){hy(e,t,n);return}if(typeof e=="function"){my(e,t,n,r);return}by(e,t,n,r)},hy=(e,t,n)=>{const r=e===""?t:f0(t,e);r.classGroupId=n},my=(e,t,n,r)=>{if(yy(e)){Ou(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(uy(n,e))},by=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Ou(u,f0(t,a),n,r)}},f0=(e,t)=>{let n=e;const r=t.split(zi),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=l0(),n.nextPart.set(s,a)),n=a}return n},yy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},ou="!",Xc=":",xy=[],Qc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),wy=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let b=0;b<l;b++){const h=o[b];if(s===0&&a===0){if(h===Xc){i.push(o.slice(u,b)),u=b+1;continue}if(h==="/"){c=b;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const d=i.length===0?o:o.slice(u);let f=d,p=!1;d.endsWith(ou)?(f=d.slice(0,-1),p=!0):d.startsWith(ou)&&(f=d.slice(1),p=!0);const g=c&&c>u?c-u:void 0;return Qc(i,p,f,g)};if(t){const o=t+Xc,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qc(xy,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},_y=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Ey=e=>({cache:vy(e.cacheSize),parseClassName:wy(e),sortModifiers:_y(e),postfixLookupClassGroupIds:ky(e),...ly(e)}),ky=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Sy=/\s+/,Cy=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Sy);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:f,modifiers:p,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:h}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!h,v;if(y){const O=b.substring(0,h);v=r(O);const _=v&&s[v]?r(b):void 0;_&&_!==v&&(v=_,y=!1)}else v=r(b);if(!v){if(!y){c=d+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),k=g?x+ou:x,E=k+v;if(a.indexOf(E)>-1)continue;a.push(E);const S=o(v,y);for(let O=0;O<S.length;++O){const _=S[O];a.push(k+_)}c=d+(c.length>0?" "+c:c)}return c},Ay=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=g0(n))&&(o&&(o+=" "),o+=r);return o},g0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=g0(e[r]))&&(n&&(n+=" "),n+=t);return n},Ty=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Ey(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=Cy(u,n);return o(u,l),l};return i=s,(...u)=>i(Ay(...u))},Dy=[],St=e=>{const t=n=>n[e]||Dy;return t.isThemeGetter=!0,t},p0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Oy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ry=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ny=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Iy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,My=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ly=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Oy.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),En=e=>!!e&&Number.isInteger(Number(e)),Ks=e=>e.endsWith("%")&&je(e.slice(0,-1)),zn=e=>Ry.test(e),m0=()=>!0,$y=e=>Ny.test(e)&&!Iy.test(e),Ru=()=>!1,Py=e=>My.test(e),Fy=e=>Ly.test(e),By=e=>!ye(e)&&!ve(e),zy=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Uy=e=>br(e,v0,Ru),ye=e=>p0.test(e),kr=e=>br(e,x0,$y),Jc=e=>br(e,Yy,je),Ky=e=>br(e,_0,m0),Hy=e=>br(e,w0,Ru),el=e=>br(e,b0,Ru),qy=e=>br(e,y0,Fy),fi=e=>br(e,E0,Py),ve=e=>h0.test(e),po=e=>Fr(e,x0),jy=e=>Fr(e,w0),tl=e=>Fr(e,b0),Gy=e=>Fr(e,v0),Vy=e=>Fr(e,y0),gi=e=>Fr(e,E0,!0),Wy=e=>Fr(e,_0,!0),br=(e,t,n)=>{const r=p0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fr=(e,t,n=!1)=>{const r=h0.exec(e);return r?r[1]?t(r[1]):n:!1},b0=e=>e==="position"||e==="percentage",y0=e=>e==="image"||e==="url",v0=e=>e==="length"||e==="size"||e==="bg-size",x0=e=>e==="length",Yy=e=>e==="number",w0=e=>e==="family-name",_0=e=>e==="number"||e==="weight",E0=e=>e==="shadow",Zy=()=>{const e=St("color"),t=St("font"),n=St("text"),r=St("font-weight"),o=St("tracking"),i=St("leading"),s=St("breakpoint"),a=St("container"),u=St("spacing"),c=St("radius"),l=St("shadow"),d=St("inset-shadow"),f=St("text-shadow"),p=St("drop-shadow"),g=St("blur"),b=St("perspective"),h=St("aspect"),y=St("ease"),v=St("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...k(),ve,ye],S=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],_=()=>[ve,ye,u],I=()=>[nr,"full","auto",..._()],L=()=>[En,"none","subgrid",ve,ye],T=()=>["auto",{span:["full",En,ve,ye]},En,ve,ye],R=()=>[En,"auto",ve,ye],M=()=>["auto","min","max","fr",ve,ye],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",..._()],G=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],U=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",..._()],z=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],P=()=>[e,ve,ye],Z=()=>[...k(),tl,el,{position:[ve,ye]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",Gy,Uy,{size:[ve,ye]}],W=()=>[Ks,po,kr],H=()=>["","none","full",c,ve,ye],ie=()=>["",je,po,kr],me=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[je,Ks,tl,el],Se=()=>["","none",g,ve,ye],Ne=()=>["none",je,ve,ye],Xe=()=>["none",je,ve,ye],gt=()=>[je,ve,ye],ce=()=>[nr,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zn],breakpoint:[zn],color:[m0],container:[zn],"drop-shadow":[zn],ease:["in","out","in-out"],font:[By],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zn],shadow:[zn],spacing:["px",je],text:[zn],"text-shadow":[zn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,ye,ve,h]}],container:["container"],"container-type":[{"@container":["","normal","size",ve,ye]}],"container-named":[zy],columns:[{columns:[je,ye,ve,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[En,"auto",ve,ye]}],basis:[{basis:[nr,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,nr,"auto","initial","none",ye]}],grow:[{grow:["",je,ve,ye]}],shrink:[{shrink:["",je,ve,ye]}],order:[{order:[En,"first","last","none",ve,ye]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,po,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Wy,Ky]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ks,ye]}],"font-family":[{font:[jy,Hy,t]}],"font-features":[{"font-features":[ye]}],"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,ve,ye]}],"line-clamp":[{"line-clamp":[je,"none",ve,Jc]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",ve,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ve,kr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[je,"auto",ve,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[En,ve,ye]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ye]}],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",ve,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},En,ve,ye],radial:["",ve,ye],conic:[En,ve,ye]},Vy,qy]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ve,ye]}],"outline-w":[{outline:["",je,po,kr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",l,gi,fi]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,gi,fi]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[je,kr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,gi,fi]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[je,ve,ye]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ve,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ye]}],filter:[{filter:["","none",ve,ye]}],blur:[{blur:Se()}],brightness:[{brightness:[je,ve,ye]}],contrast:[{contrast:[je,ve,ye]}],"drop-shadow":[{"drop-shadow":["","none",p,gi,fi]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",je,ve,ye]}],"hue-rotate":[{"hue-rotate":[je,ve,ye]}],invert:[{invert:["",je,ve,ye]}],saturate:[{saturate:[je,ve,ye]}],sepia:[{sepia:["",je,ve,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ye]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[je,ve,ye]}],"backdrop-contrast":[{"backdrop-contrast":[je,ve,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ve,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ve,ye]}],"backdrop-invert":[{"backdrop-invert":["",je,ve,ye]}],"backdrop-opacity":[{"backdrop-opacity":[je,ve,ye]}],"backdrop-saturate":[{"backdrop-saturate":[je,ve,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ve,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ve,ye]}],ease:[{ease:["linear","initial",y,ve,ye]}],delay:[{delay:[je,ve,ye]}],animate:[{animate:["none",v,ve,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,ye]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Xe()}],"scale-x":[{"scale-x":Xe()}],"scale-y":[{"scale-y":Xe()}],"scale-z":[{"scale-z":Xe()}],"scale-3d":["scale-3d"],skew:[{skew:gt()}],"skew-x":[{"skew-x":gt()}],"skew-y":[{"skew-y":gt()}],transform:[{transform:[ve,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],zoom:[{zoom:[En,ve,ye]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ye]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[je,po,kr,Jc]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Xy=Ty(Zy);function Tt(...e){return Xy(c0(e))}function Qy(e){return(...t)=>{for(const n of e)n&&n(...t)}}const X=e=>typeof e=="function"&&!e.length?e():e,nl=e=>Array.isArray(e)?e:e?[e]:[];function Jy(e,...t){return typeof e=="function"?e(...t):e}const ev=ae;function tv(e,t,n,r){return e.addEventListener(t,n,r),ev(e.removeEventListener.bind(e,t,n,r))}function nv(e,t,n,r){const o=()=>{nl(X(e)).forEach(i=>{i&&nl(X(t)).forEach(s=>tv(i,s,n,r))})};typeof e=="function"?oe(o):le(o)}const rv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function rl(e){const t={};let n;for(;n=rv.exec(e);)t[n[1]]=n[2];return t}function yr(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=rl(e)}else typeof t=="string"&&(t=rl(t));return{...e,...t}}function ft(...e){return Qy(e)}function ov(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function iu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iv(e){return typeof e=="number"}function Zr(e){return Object.prototype.toString.call(e)==="[object String]"}function k0(e){return typeof e=="function"}function Yn(e){return t=>`${e()}-${t}`}function Bt(e,t){return e?e===t||e.contains(t):!1}function _o(e,t=!1){const{activeElement:n}=nn(e);if(!n?.nodeName)return null;if(C0(n)&&n.contentDocument)return _o(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=nn(n).getElementById(r);if(o)return o}}return n}function S0(e){return nn(e).defaultView||window}function nn(e){return e?e.ownerDocument||e:document}function C0(e){return e.tagName==="IFRAME"}var us=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(us||{});function Nu(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function cs(){return Nu(/^Mac/i)}function sv(){return Nu(/^iPhone/i)}function av(){return Nu(/^iPad/i)||cs()&&navigator.maxTouchPoints>1}function uv(){return sv()||av()}function cv(){return cs()||uv()}function He(e,t){return t&&(k0(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Nt(e){return t=>{for(const n of e)He(t,n)}}function lv(e){return cs()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Rt(e){if(e)if(dv())e.focus({preventScroll:!0});else{const t=fv(e);e.focus(),gv(t)}}var pi=null;function dv(){if(pi==null){pi=!1;try{document.createElement("div").focus({get preventScroll(){return pi=!0,!0}})}catch{}}return pi}function fv(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function gv(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var A0=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],pv=[...A0,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Iu=`${A0.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,hv=pv.join(':not([hidden]):not([tabindex="-1"]),');function T0(e,t){const r=Array.from(e.querySelectorAll(Iu)).filter(ol);return t&&ol(e)&&r.unshift(e),r.forEach((o,i)=>{if(C0(o)&&o.contentDocument){const s=o.contentDocument.body,a=T0(s,!1);r.splice(i,1,...a)}}),r}function ol(e){return D0(e)&&!mv(e)}function D0(e){return e.matches(Iu)&&Mu(e)}function mv(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Mu(e,t){return e.nodeName!=="#comment"&&bv(e)&&yv(e,t)&&(!e.parentElement||Mu(e.parentElement,e))}function bv(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function yv(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function vv(e,t,n){const r=t?.tabbable?hv:Iu,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Mu(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function il(e){let t=e;for(;t&&!xv(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function xv(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function wv(){}function _v(e){return[e.clientX,e.clientY]}function O0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,f]=t[u],[,p]=t[u===0?s-1:u-1]||[0,0],g=(l-f)*(n-c)-(c-d)*(r-l);if(f<l){if(r>=f&&r<l){if(g===0)return!0;g>0&&(r===f?r>p&&(o=!o):o=!o)}}else if(l<f){if(r>l&&r<=f){if(g===0)return!0;g<0&&(r===f?r<p&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function $e(e,t){return Q(e,t)}var ho=new Map,sl=new Set;function al(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=ho.get(n.target);r||(r=new Set,ho.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=ho.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ho.delete(n.target)),ho.size===0)){for(const o of sl)o();sl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?al():document.addEventListener("DOMContentLoaded",al));function su(e,t){const n=ul(e,t,"left"),r=ul(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function ul(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Ev(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=il(e);for(;e&&o&&e!==n&&o!==n;)su(o,e),e=o,o=il(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Lu={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ls(e,t){const[n,r]=$(cl(t?.()));return oe(()=>{r(e()?.tagName.toLowerCase()||cl(t?.()))}),n}function cl(e){return Zr(e)?e:void 0}function Ze(e){const[t,n]=we(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return m(Nf,Q(n,{get component(){return t.as}}))}var kv=Object.defineProperty,vr=(e,t)=>{for(var n in t)kv(e,n,{get:t[n],enumerable:!0})},Sv={};vr(Sv,{Button:()=>R0,Root:()=>uo});var Cv=["button","color","file","image","reset","submit"];function Av(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Cv.indexOf(e.type)!==-1:!1}function uo(e){let t;const n=$e({type:"button"},e),[r,o]=we(n,["ref","type","disabled"]),i=ls(()=>t,()=>"button"),s=re(()=>{const c=i();return c==null?!1:Av({tagName:c,type:r.type})}),a=re(()=>i()==="input"),u=re(()=>i()==="a"&&t?.getAttribute("href")!=null);return m(Ze,Q({as:"button",ref(c){var l=ft(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return de(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return de(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var R0=uo;const ll=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dl=c0,N0=(e,t)=>n=>{var r;if(t?.variants==null)return dl(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const f=ll(l)||ll(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,f]=l;return f===void 0||(c[d]=f),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:f,...p}=l;return Object.entries(p).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...a}[b]):{...i,...a}[b]===h})?[...c,d,f]:c},[]);return dl(e,s,u,n?.class,n?.className)},Tv=N0("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Fe=e=>{const[t,n]=we(e,["class","variant","size"]);return m(R0,Q({get class(){return Tt(Tv({size:t.size,variant:t.variant}),t.class)}},n))};var Dv=B("<div>");const Ov=N0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),I0=e=>{const[t,n]=we(e,["class","variant"]);return(()=>{var r=Dv();return Wn(r,Q({get class(){return Tt(Ov({variant:t.variant}),t.class)}},n),!1,!1),r})()},[Rv,M0]=$(wt.language||"zh-CN"),[Nv,Iv]=$(wt.isInitialized);Jf.then(()=>{M0(wt.language||"zh-CN"),Iv(!0)});wt.on("languageChanged",e=>M0(e));function D(e,t){return wt.t(e,t)}function L0(){return{t:D,lng:re(()=>Rv()),ready:re(()=>Nv()),changeLanguage:e=>wt.changeLanguage(e)}}const ds=()=>{const e=()=>cr()?D("specDetail.exitFullscreen"):D("specDetail.fullscreen");return m(Fe,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:ny,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return cr()},get children(){return m(Y,{get when(){return cr()},get fallback(){return m(A1,{class:"h-3 w-3"})},get children(){return m(O1,{class:"h-3 w-3"})}})}})};var Mv=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Lv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $v(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Mv.has(n)}const t=e.split("-")[0];return Lv.has(t)}function Pv(e){return $v(e)?"rtl":"ltr"}function $0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Pv(e)}}var au=$0(),Eo=new Set;function fl(){au=$0();for(const e of Eo)e(au)}function Fv(){const[e,t]=$(au),n=re(()=>e());return Vt(()=>{Eo.size===0&&window.addEventListener("languagechange",fl),Eo.add(t),ae(()=>{Eo.delete(t),Eo.size===0&&window.removeEventListener("languagechange",fl)})}),{locale:()=>n().locale,direction:()=>n().direction}}var Bv=mt();function xr(){const e=Fv();return lt(Bv)||e}var Hs=new Map;function zv(e){const{locale:t}=xr(),n=re(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return re(()=>{const r=n();let o;return Hs.has(r)&&(o=Hs.get(r)),o||(o=new Intl.Collator(t(),e),Hs.set(r,o)),o})}const Uv=["top","right","bottom","left"],gr=Math.min,Qt=Math.max,Ui=Math.round,hi=Math.floor,Rn=e=>({x:e,y:e}),Kv={left:"right",right:"left",bottom:"top",top:"bottom"};function uu(e,t,n){return Qt(e,gr(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function P0(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function qn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Pu(e){return P0(qn(e))}function Hv(e,t,n){n===void 0&&(n=!1);const r=co(e),o=Pu(e),i=$u(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ki(s)),[s,Ki(s)]}function qv(e){const t=Ki(e);return[cu(e),t,cu(t)]}function cu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gl=["left","right"],pl=["right","left"],jv=["top","bottom"],Gv=["bottom","top"];function Vv(e,t,n){switch(e){case"top":case"bottom":return n?t?pl:gl:t?gl:pl;case"left":case"right":return t?jv:Gv;default:return[]}}function Wv(e,t,n,r){const o=co(e);let i=Vv(pr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(cu)))),i}function Ki(e){const t=pr(e);return Kv[t]+e.slice(t.length)}function Yv(e){return{top:0,right:0,bottom:0,left:0,...e}}function F0(e){return typeof e!="number"?Yv(e):{top:e,right:e,bottom:e,left:e}}function Hi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function hl(e,t,n){let{reference:r,floating:o}=e;const i=qn(t),s=Pu(t),a=$u(s),u=pr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(co(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function Zv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Br(t,e),g=F0(p),h=a[f?d==="floating"?"reference":"floating":d],y=Hi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Hi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(y.top-E.top+g.top)/k.y,bottom:(E.bottom-y.bottom+g.bottom)/k.y,left:(y.left-E.left+g.left)/k.x,right:(E.right-y.right+g.right)/k.x}}const Xv=50,Qv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Zv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=hl(c,r,u),f=r,p=0;const g={};for(let b=0;b<i.length;b++){const h=i[b];if(!h)continue;const{name:y,fn:v}=h,{x,y:k,data:E,reset:S}=await v({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=k??d,g[y]={...g[y],...E},S&&p<Xv&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:l,y:d}=hl(c,f,u)),b=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:g}},Jv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=Br(e,t)||{};if(c==null)return{};const d=F0(l),f={x:n,y:r},p=Pu(o),g=$u(p),b=await s.getDimensions(c),h=p==="y",y=h?"top":"left",v=h?"bottom":"right",x=h?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[p]-f[p]-i.floating[g],E=f[p]-i.reference[p],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let O=S?S[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(S)))&&(O=a.floating[x]||i.floating[g]);const _=k/2-E/2,I=O/2-b[g]/2-1,L=gr(d[y],I),T=gr(d[v],I),R=L,M=O-b[g]-T,C=O/2-b[g]/2+_,N=uu(R,C,M),F=!u.arrow&&co(o)!=null&&C!==N&&i.reference[g]/2-(C<R?L:T)-b[g]/2<0,G=F?C<R?C-R:C-M:0;return{[p]:f[p]+G,data:{[p]:N,centerOffset:C-N-G,...F&&{alignmentOffset:G}},reset:F}}}),ex=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...h}=Br(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=pr(o),v=qn(a),x=pr(a)===a,k=await(u.isRTL==null?void 0:u.isRTL(c.floating)),E=f||(x||!b?[Ki(a)]:qv(a)),S=g!=="none";!f&&S&&E.push(...Wv(a,b,g,k));const O=[a,...E],_=await u.detectOverflow(t,h),I=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&I.push(_[y]),d){const C=Hv(o,s,k);I.push(_[C[0]],_[C[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(C=>C<=0)){var T,R;const C=(((T=i.flip)==null?void 0:T.index)||0)+1,N=O[C];if(N&&(!(d==="alignment"?v!==qn(N):!1)||L.every(U=>qn(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:C,overflows:L},reset:{placement:N}};let F=(R=L.filter(G=>G.overflows[0]<=0).sort((G,U)=>G.overflows[1]-U.overflows[1])[0])==null?void 0:R.placement;if(!F)switch(p){case"bestFit":{var M;const G=(M=L.filter(U=>{if(S){const z=qn(U.placement);return z===v||z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(z=>z>0).reduce((z,P)=>z+P,0)]).sort((U,z)=>U[1]-z[1])[0])==null?void 0:M[0];G&&(F=G);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bl(e){return Uv.some(t=>e[t]>=0)}const tx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Br(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=ml(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:bl(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=ml(s,n.floating);return{data:{escapedOffsets:a,escaped:bl(a)}}}default:return{}}}}},nx=new Set(["left","top"]);async function rx(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pr(n),a=co(n),u=qn(n)==="y",c=nx.has(s)?-1:1,l=i&&u?-1:1,d=Br(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*l,y:f*c}:{x:f*c,y:p*l}}const ox=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await rx(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},ix=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...c}=Br(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),f=qn(pr(o)),p=P0(f);let g=l[p],b=l[f];if(s){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=g+d[y],k=g-d[v];g=uu(x,g,k)}if(a){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=b+d[y],k=b-d[v];b=uu(x,b,k)}const h=u.fn({...t,[p]:g,[f]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[f]:a}}}}}},sx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Br(e,t),l=await s.detectOverflow(t,c),d=pr(o),f=co(o),p=qn(o)==="y",{width:g,height:b}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const v=b-l.top-l.bottom,x=g-l.left-l.right,k=gr(b-l[h],v),E=gr(g-l[y],x),S=!t.middlewareData.shift;let O=k,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=v),S&&!f){const L=Qt(l.left,0),T=Qt(l.right,0),R=Qt(l.top,0),M=Qt(l.bottom,0);p?_=g-2*(L!==0||T!==0?L+T:Qt(l.left,l.right)):O=b-2*(R!==0||M!==0?R+M:Qt(l.top,l.bottom))}await u({...t,availableWidth:_,availableHeight:O});const I=await s.getDimensions(a.floating);return g!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function fs(){return typeof window<"u"}function lo(e){return B0(e)?(e.nodeName||"").toLowerCase():"#document"}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(B0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B0(e){return fs()?e instanceof Node||e instanceof tn(e).Node:!1}function mn(e){return fs()?e instanceof Element||e instanceof tn(e).Element:!1}function Zn(e){return fs()?e instanceof HTMLElement||e instanceof tn(e).HTMLElement:!1}function yl(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function Xo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ax(e){return/^(table|td|th)$/.test(lo(e))}function gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ux=/transform|translate|scale|rotate|perspective|filter/,cx=/paint|layout|strict|content/,Sr=e=>!!e&&e!=="none";let qs;function Fu(e){const t=mn(e)?bn(e):e;return Sr(t.transform)||Sr(t.translate)||Sr(t.scale)||Sr(t.rotate)||Sr(t.perspective)||!Bu()&&(Sr(t.backdropFilter)||Sr(t.filter))||ux.test(t.willChange||"")||cx.test(t.contain||"")}function lx(e){let t=hr(e);for(;Zn(t)&&!ro(t);){if(Fu(t))return t;if(gs(t))return null;t=hr(t)}return null}function Bu(){return qs==null&&(qs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qs}function ro(e){return/^(html|body|#document)$/.test(lo(e))}function bn(e){return tn(e).getComputedStyle(e)}function ps(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yl(e)&&e.host||Mn(e);return yl(t)?t.host:t}function z0(e){const t=hr(e);return ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&Xo(t)?t:z0(t)}function Lo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=z0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=tn(o);if(i){const a=lu(s);return t.concat(s,s.visualViewport||[],Xo(o)?o:[],a&&n?Lo(a):[])}else return t.concat(o,Lo(o,[],n))}function lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U0(e){const t=bn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ui(n)!==i||Ui(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function zu(e){return mn(e)?e:e.contextElement}function eo(e){const t=zu(e);if(!Zn(t))return Rn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=U0(t);let s=(i?Ui(n.width):n.width)/r,a=(i?Ui(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const dx=Rn(0);function K0(e){const t=tn(e);return!Bu()||!t.visualViewport?dx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let s=Rn(1);t&&(r?mn(r)&&(s=eo(r)):s=eo(e));const a=fx(i,n,r)?K0(i):Rn(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const f=tn(i),p=r&&mn(r)?tn(r):r;let g=f,b=lu(g);for(;b&&r&&p!==g;){const h=eo(b),y=b.getBoundingClientRect(),v=bn(b),x=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*h.x,k=y.top+(b.clientTop+parseFloat(v.paddingTop))*h.y;u*=h.x,c*=h.y,l*=h.x,d*=h.y,u+=x,c+=k,g=tn(b),b=lu(g)}}return Hi({width:l,height:d,x:u,y:c})}function hs(e,t){const n=ps(e).scrollLeft;return t?t.left+n:Mr(Mn(e)).left+n}function H0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function gx(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Mn(r),a=t?gs(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Rn(1);const l=Rn(0),d=Zn(r);if((d||!d&&!i)&&((lo(r)!=="body"||Xo(s))&&(u=ps(r)),d)){const p=Mr(r);c=eo(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const f=s&&!d&&!i?H0(s,u):Rn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+f.x,y:n.y*c.y-u.scrollTop*c.y+l.y+f.y}}function px(e){return Array.from(e.getClientRects())}function hx(e){const t=Mn(e),n=ps(e),r=e.ownerDocument.body,o=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+hs(e);const a=-n.scrollTop;return bn(r).direction==="rtl"&&(s+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const vl=25;function mx(e,t){const n=tn(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Bu();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=hs(r);if(c<=0){const l=r.ownerDocument,d=l.body,f=getComputedStyle(d),p=l.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=vl&&(i-=g)}else c<=vl&&(i+=c);return{width:i,height:s,x:a,y:u}}function bx(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zn(e)?eo(e):Rn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function xl(e,t,n){let r;if(t==="viewport")r=mx(e,n);else if(t==="document")r=hx(Mn(e));else if(mn(t))r=bx(t,n);else{const o=K0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Hi(r)}function q0(e,t){const n=hr(e);return n===t||!mn(n)||ro(n)?!1:bn(n).position==="fixed"||q0(n,t)}function yx(e,t){const n=t.get(e);if(n)return n;let r=Lo(e,[],!1).filter(a=>mn(a)&&lo(a)!=="body"),o=null;const i=bn(e).position==="fixed";let s=i?hr(e):e;for(;mn(s)&&!ro(s);){const a=bn(s),u=Fu(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Xo(s)&&!u&&q0(e,s))?r=r.filter(l=>l!==s):o=a,s=hr(s)}return t.set(e,r),r}function vx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?gs(t)?[]:yx(t,this._c):[].concat(n),r],a=xl(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let f=1;f<s.length;f++){const p=xl(t,s[f],o);u=Qt(p.top,u),c=gr(p.right,c),l=gr(p.bottom,l),d=Qt(p.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function xx(e){const{width:t,height:n}=U0(e);return{width:t,height:n}}function wx(e,t,n){const r=Zn(t),o=Mn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Rn(0);function c(){u.x=hs(o)}if(r||!r&&!i)if((lo(t)!=="body"||Xo(o))&&(a=ps(t)),r){const p=Mr(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?H0(o,a):Rn(0),d=s.left+a.scrollLeft-u.x-l.x,f=s.top+a.scrollTop-u.y-l.y;return{x:d,y:f,width:s.width,height:s.height}}function js(e){return bn(e).position==="static"}function wl(e,t){if(!Zn(e)||bn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function j0(e,t){const n=tn(e);if(gs(e))return n;if(!Zn(e)){let o=hr(e);for(;o&&!ro(o);){if(mn(o)&&!js(o))return o;o=hr(o)}return n}let r=wl(e,t);for(;r&&ax(r)&&js(r);)r=wl(r,t);return r&&ro(r)&&js(r)&&!Fu(r)?n:r||lx(e)||n}const _x=async function(e){const t=this.getOffsetParent||j0,n=this.getDimensions,r=await n(e.floating);return{reference:wx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ex(e){return bn(e).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:gx,getDocumentElement:Mn,getClippingRect:vx,getOffsetParent:j0,getElementRects:_x,getClientRects:px,getDimensions:xx,getScale:eo,isElement:mn,isRTL:Ex};function V0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kx(e,t){let n=null,r;const o=Mn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=hi(d),b=hi(o.clientWidth-(l+f)),h=hi(o.clientHeight-(d+p)),y=hi(l),x={rootMargin:-g+"px "+-b+"px "+-h+"px "+-y+"px",threshold:Qt(0,gr(1,u))||1};let k=!0;function E(S){const O=S[0].intersectionRatio;if(O!==u){if(!k)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!V0(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function Sx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=zu(e),l=o||i?[...c?Lo(c):[],...t?Lo(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?kx(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!u&&p.observe(c),t&&p.observe(t));let g,b=u?Mr(e):null;u&&h();function h(){const y=Mr(e);b&&!V0(b,y)&&n(),b=y,g=requestAnimationFrame(h)}return n(),()=>{var y;l.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const Cx=ox,Ax=ix,Tx=ex,Dx=sx,Ox=tx,Rx=Jv,Nx=(e,t,n)=>{const r=new Map,o={platform:G0,...n},i={...o.platform,_c:r};return Qv(e,t,{...o,platform:i})};var Ix=B('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Uu=mt();function Ku(){const e=lt(Uu);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var du=30,_l=du/2,Mx={top:180,right:-90,bottom:0,left:90};function Qo(e){const t=Ku(),n=$e({size:du},e),[r,o]=we(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Lx(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*(du/r.size),d=()=>`rotate(${Mx[i()]} ${_l} ${_l}) translate(0 2)`;return m(Ze,Q({as:"div",ref(f){var p=ft(t.setArrowRef,r.ref);typeof p=="function"&&p(f)},"aria-hidden":"true",get style(){return yr({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var f=Ix(),p=f.firstChild,g=p.firstChild;return g.nextSibling,le(()=>xe(p,"transform",d())),f}}))}function Lx(e){const[t,n]=$();return oe(()=>{const r=e();r&&n(S0(r).getComputedStyle(r))}),t}function $x(e){const t=Ku(),[n,r]=we(e,["ref","style"]);return m(Ze,Q({as:"div",ref(o){var i=ft(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return yr({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function El(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Px(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?El(r):e?e.getBoundingClientRect():El()}}}function Fx(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Bx={top:"bottom",right:"left",bottom:"top",left:"right"};function zx(e,t){const[n,r]=e.split("-"),o=Bx[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Ux(e){const t=$e({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=$(),[o,i]=$(),[s,a]=$(t.placement),u=()=>Px(t.anchorRef?.(),t.getAnchorRect),{direction:c}=xr();async function l(){const f=u(),p=n(),g=o();if(!f||!p)return;const b=(g?.clientHeight||0)/2,h=typeof t.gutter=="number"?t.gutter+b:t.gutter??b;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const y=[Cx(({placement:S})=>{const O=!!S.split("-")[1];return{mainAxis:h,crossAxis:O?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const S=typeof t.flip=="string"?t.flip.split(" "):void 0;if(S!==void 0&&!S.every(Fx))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(Tx({padding:t.overflowPadding,fallbackPlacements:S}))}(t.slide||t.overlap)&&y.push(Ax({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(Dx({padding:t.overflowPadding,apply({availableWidth:S,availableHeight:O,rects:_}){const I=Math.round(_.reference.width);S=Math.floor(S),O=Math.floor(O),p.style.setProperty("--kb-popper-anchor-width",`${I}px`),p.style.setProperty("--kb-popper-content-available-width",`${S}px`),p.style.setProperty("--kb-popper-content-available-height",`${O}px`),t.sameWidth&&(p.style.width=`${I}px`),t.fitViewport&&(p.style.maxWidth=`${S}px`,p.style.maxHeight=`${O}px`)}})),t.hideWhenDetached&&y.push(Ox({padding:t.detachedPadding})),g&&y.push(Rx({element:g,padding:t.arrowPadding}));const v=await Nx(f,p,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...G0,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",zx(v.placement,c()));const x=Math.round(v.x),k=Math.round(v.y);let E;if(t.hideWhenDetached&&(E=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${k}px, 0)`,visibility:E}),g&&v.middlewareData.arrow){const{x:S,y:O}=v.middlewareData.arrow,_=v.placement.split("-")[0];Object.assign(g.style,{left:S!=null?`${S}px`:"",top:O!=null?`${O}px`:"",[_]:"100%"})}}oe(()=>{const f=u(),p=n();if(!f||!p)return;const g=Sx(f,p,l,{elementResize:typeof ResizeObserver=="function"});ae(g)}),oe(()=>{const f=n(),p=t.contentRef?.();!f||!p||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(p).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return m(Uu.Provider,{value:d,get children(){return t.children}})}var ms=Object.assign(Ux,{Arrow:Qo,Context:Uu,usePopperContext:Ku,Positioner:$x});function W0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Zr(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Zr(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Zr(u)||iv(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=W0({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function Kx(e,t=[]){return re(()=>{const n=W0({dataSource:X(e.dataSource),getKey:X(e.getKey),getTextValue:X(e.getTextValue),getDisabled:X(e.getDisabled),getSectionChildren:X(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function Jo(e){const[t,n]=$(e.defaultValue?.()),r=re(()=>e.value?.()!==void 0),o=re(()=>r()?e.value?.():t());return[o,s=>{Ct(()=>{const a=Jy(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Y0(e){const[t,n]=Jo(e);return[()=>t()??!1,n]}function Hx(e){const[t,n]=Jo(e);return[()=>t()??[],n]}var Kn=class Z0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Z0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function qx(e){const[t,n]=Jo(e);return[()=>t()??new Kn,n]}function X0(e){return cv()?e.altKey:e.ctrlKey}function Xr(e){return cs()?e.metaKey:e.ctrlKey}function kl(e){return new Kn(e)}function jx(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Gx(e){const t=$e({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=$(!1),[o,i]=$(),s=re(()=>{const b=X(t.selectedKeys);return b!=null?kl(b):b}),a=re(()=>{const b=X(t.defaultSelectedKeys);return b!=null?kl(b):new Kn}),[u,c]=qx({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=$(X(t.selectionBehavior)),f=()=>X(t.selectionMode),p=()=>X(t.disallowEmptySelection)??!1,g=b=>{(X(t.allowDuplicateSelectionEvents)||!jx(b,u()))&&c(b)};return oe(()=>{const b=u();X(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),oe(()=>{d(X(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:g}}function Vx(e){const[t,n]=$(""),[r,o]=$(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(X(e.isDisabled))return;const a=X(e.keyboardDelegate),u=X(e.selectionManager);if(!a.getKeyForSearch)return;const c=Wx(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(f=>f+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&Yx(l)&&(l=l[0],d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Wx(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Yx(e){return e.split("").every(t=>t===e[0])}function Zx(e,t,n){const o=Q({selectOnFocus:()=>X(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=xr();let a={top:0,left:0};nv(()=>X(o.isVirtualized)?void 0:i(),"scroll",()=>{const h=i();h&&(a={top:h.scrollTop,left:h.scrollLeft})});const{typeSelectHandlers:u}=Vx({isDisabled:()=>X(o.disallowTypeAhead),keyboardDelegate:()=>X(o.keyboardDelegate),selectionManager:()=>X(o.selectionManager)}),c=()=>X(o.orientation)??"vertical",l=h=>{He(h,u.onKeyDown),h.altKey&&h.key==="Tab"&&h.preventDefault();const y=t();if(!y?.contains(h.target))return;const v=X(o.selectionManager),x=X(o.selectOnFocus),k=_=>{_!=null&&(v.setFocusedKey(_),h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&!X0(h)&&v.replaceSelection(_))},E=X(o.keyboardDelegate),S=X(o.shouldFocusWrap),O=v.focusedKey();switch(h.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(E.getKeyBelow){h.preventDefault();let _;O!=null?_=E.getKeyBelow(O):_=E.getFirstKey?.(),_==null&&S&&(_=E.getFirstKey?.(O)),k(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(E.getKeyAbove){h.preventDefault();let _;O!=null?_=E.getKeyAbove(O):_=E.getLastKey?.(),_==null&&S&&(_=E.getLastKey?.(O)),k(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(E.getKeyLeftOf){h.preventDefault();const _=s()==="rtl";let I;O!=null?I=E.getKeyLeftOf(O):I=_?E.getFirstKey?.():E.getLastKey?.(),k(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(E.getKeyRightOf){h.preventDefault();const _=s()==="rtl";let I;O!=null?I=E.getKeyRightOf(O):I=_?E.getLastKey?.():E.getFirstKey?.(),k(I)}break}case"Home":if(E.getFirstKey){h.preventDefault();const _=E.getFirstKey(O,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"End":if(E.getLastKey){h.preventDefault();const _=E.getLastKey(O,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"PageDown":if(E.getKeyPageBelow&&O!=null){h.preventDefault();const _=E.getKeyPageBelow(O);k(_)}break;case"PageUp":if(E.getKeyPageAbove&&O!=null){h.preventDefault();const _=E.getKeyPageAbove(O);k(_)}break;case"a":Xr(h)&&v.selectionMode()==="multiple"&&X(o.disallowSelectAll)!==!0&&(h.preventDefault(),v.selectAll());break;case"Escape":h.defaultPrevented||(h.preventDefault(),X(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!X(o.allowsTabNavigation)){if(h.shiftKey)y.focus();else{const _=vv(y,{tabbable:!0});let I,L;do L=_.lastChild(),L&&(I=L);while(L);I&&!I.contains(document.activeElement)&&Rt(I)}break}}},d=h=>{const y=X(o.selectionManager),v=X(o.keyboardDelegate),x=X(o.selectOnFocus);if(y.isFocused()){h.currentTarget.contains(h.target)||y.setFocused(!1);return}if(h.currentTarget.contains(h.target)){if(y.setFocused(!0),y.focusedKey()==null){const k=S=>{S!=null&&(y.setFocusedKey(S),x&&y.replaceSelection(S))},E=h.relatedTarget;E&&h.currentTarget.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_FOLLOWING?k(y.lastSelectedKey()??v.getLastKey?.()):k(y.firstSelectedKey()??v.getFirstKey?.())}else if(!X(o.isVirtualized)){const k=i();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const E=k.querySelector(`[data-key="${y.focusedKey()}"]`);E&&(Rt(E),su(k,E))}}}},f=h=>{const y=X(o.selectionManager);h.currentTarget.contains(h.relatedTarget)||y.setFocused(!1)},p=h=>{i()===h.target&&h.preventDefault()},g=()=>{const h=X(o.autoFocus);if(!h)return;const y=X(o.selectionManager),v=X(o.keyboardDelegate);let x;h==="first"&&(x=v.getFirstKey?.()),h==="last"&&(x=v.getLastKey?.());const k=y.selectedKeys();k.size&&(x=k.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const E=t();E&&x==null&&!X(o.shouldUseVirtualFocus)&&Rt(E)};return Vt(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),oe(At([i,()=>X(o.isVirtualized),()=>X(o.selectionManager).focusedKey()],h=>{const[y,v,x]=h;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const k=y.querySelector(`[data-key="${x}"]`);k&&su(y,k)}})),{tabIndex:re(()=>{if(!X(o.shouldUseVirtualFocus))return X(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:d,onFocusOut:f}}function Q0(e,t){const n=()=>X(e.selectionManager),r=()=>X(e.key),o=()=>X(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Xr(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>X(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&&!X(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&X(e.shouldSelectOnPressUp)&&X(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{u()&&(X(e.shouldSelectOnPressUp)&&!X(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},p=v=>{!u()||!["Enter"," "].includes(v.key)||(X0(v)?n().toggleSelection(r()):i(v))},g=v=>{a()&&v.preventDefault()},b=v=>{const x=t();o()||a()||!x||v.target===x&&n().setFocusedKey(r())},h=re(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=re(()=>X(e.virtualized)?void 0:r());return oe(At([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,k,E,S])=>{v&&x===E&&S&&!k&&document.activeElement!==v&&(e.focus?e.focus():Rt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:h,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:f,onKeyDown:p,onMouseDown:g,onFocus:b}}var Xx=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Kn(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Kn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Kn([t],t,t):new Kn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Kn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Kn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Sl=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Qx(e){const t=Gx(e),r=Kx({dataSource:()=>X(e.dataSource),getKey:()=>X(e.getKey),getTextValue:()=>X(e.getTextValue),getDisabled:()=>X(e.getDisabled),getSectionChildren:()=>X(e.getSectionChildren),factory:i=>e.filter?new Sl(e.filter(i)):new Sl(i)},[()=>e.filter]),o=new Xx(r,t);return Ya(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var Jx=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function ew(e,t,n){const r=zv({usage:"search",sensitivity:"base"}),o=re(()=>{const i=X(e.keyboardDelegate);return i||new Jx(e.collection,t,r)});return Zx({selectionManager:()=>X(e.selectionManager),keyboardDelegate:o,autoFocus:()=>X(e.autoFocus),deferAutoFocus:()=>X(e.deferAutoFocus),shouldFocusWrap:()=>X(e.shouldFocusWrap),disallowEmptySelection:()=>X(e.disallowEmptySelection),selectOnFocus:()=>X(e.selectOnFocus),disallowTypeAhead:()=>X(e.disallowTypeAhead),shouldUseVirtualFocus:()=>X(e.shouldUseVirtualFocus),allowsTabNavigation:()=>X(e.allowsTabNavigation),isVirtualized:()=>X(e.isVirtualized),scrollToKey:i=>X(e.scrollToKey)?.(i),orientation:()=>X(e.orientation)},t)}var J0=mt();function eg(){return lt(J0)}function tw(){const e=eg();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function tg(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function nw(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&tg(o,n))return r+1}return 0}function rw(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:tg(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function ng(e,t){const n=rw(e);e!==n&&t(n)}function ow(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return nn(r).body}function iw(e,t){oe(()=>{const n=setTimeout(()=>{ng(e(),t)});ae(()=>clearTimeout(n))})}function sw(e,t){if(typeof IntersectionObserver!="function"){iw(e,t);return}let n=[];oe(()=>{const r=()=>{const s=!!n.length;n=e(),s&&ng(e(),t)},o=ow(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ae(()=>i.disconnect())})}function aw(e={}){const[t,n]=Hx({value:()=>X(e.items),onChange:i=>e.onItemsChange?.(i)});sw(t,n);const r=i=>(n(s=>{const a=nw(s,i);return ov(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>m(J0.Provider,{value:{registerItem:r},get children(){return i.children}})}}function uw(e){const t=tw(),n=$e({shouldRegisterItem:!0},e);oe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ae(r)})}var qi="data-kb-top-layer",rg,fu=!1,Nn=[];function $o(e){return Nn.findIndex(t=>t.node===e)}function cw(e){return Nn[$o(e)]}function lw(e){return Nn.length>0&&Nn[Nn.length-1].node===e}function og(){return Nn.filter(e=>e.isPointerBlocking)}function dw(){return[...og()].slice(-1)[0]}function Hu(){return og().length>0}function ig(e){const t=$o(dw()?.node);return $o(e)<t}function fw(e){Nn.push(e)}function gw(e){const t=$o(e);t<0||Nn.splice(t,1)}function pw(){for(const{node:e}of Nn)e.style.pointerEvents=ig(e)?"none":"auto"}function hw(e){if(Hu()&&!fu){const t=nn(e);rg=document.body.style.pointerEvents,t.body.style.pointerEvents="none",fu=!0}}function mw(e){if(Hu())return;const t=nn(e);t.body.style.pointerEvents=rg,t.body.style.length===0&&t.body.removeAttribute("style"),fu=!1}var Xt={layers:Nn,isTopMostLayer:lw,hasPointerBlockingLayer:Hu,isBelowPointerBlockingLayer:ig,addLayer:fw,removeLayer:gw,indexOf:$o,find:cw,assignPointerEventToLayers:pw,disableBodyPointerEvents:hw,restoreBodyPointerEvents:mw},Gs="focusScope.autoFocusOnMount",Vs="focusScope.autoFocusOnUnmount",Cl={bubbles:!1,cancelable:!0},Al={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=iu(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=iu(this.stack,e),this.active()?.resume()}};function sg(e,t){const[n,r]=$(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=g=>e.onMountAutoFocus?.(g),a=g=>e.onUnmountAutoFocus?.(g),u=()=>nn(t()),c=()=>{const g=u().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Lu),g},l=()=>{const g=t();return g?T0(g,!0).filter(b=>!b.hasAttribute("data-focus-trap")):[]},d=()=>{const g=l();return g.length>0?g[0]:null},f=()=>{const g=l();return g.length>0?g[g.length-1]:null},p=()=>{const g=t();if(!g)return!1;const b=_o(g);return!b||Bt(g,b)?!1:D0(b)};oe(()=>{const g=t();if(!g)return;Al.add(o);const b=_o(g);if(!Bt(g,b)){const y=new CustomEvent(Gs,Cl);g.addEventListener(Gs,s),g.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{Rt(d()),_o(g)===b&&Rt(g)},0)}ae(()=>{g.removeEventListener(Gs,s),setTimeout(()=>{const y=new CustomEvent(Vs,Cl);p()&&y.preventDefault(),g.addEventListener(Vs,a),g.dispatchEvent(y),y.defaultPrevented||Rt(b??u().body),g.removeEventListener(Vs,a),Al.remove(o)},0)})}),oe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${qi}]`)||(Bt(g,v)?i=v:Rt(i))},h=y=>{const x=y.relatedTarget??_o(g);x?.closest(`[${qi}]`)||Bt(g,x)||Rt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",h),ae(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",h)})}),oe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const b=c();g.insertAdjacentElement("afterbegin",b);const h=c();g.insertAdjacentElement("beforeend",h);function y(x){const k=d(),E=f();x.relatedTarget===k?Rt(E):Rt(k)}b.addEventListener("focusin",y),h.addEventListener("focusin",y);const v=new MutationObserver(x=>{for(const k of x)k.previousSibling===h&&(h.remove(),g.insertAdjacentElement("beforeend",h)),k.nextSibling===b&&(b.remove(),g.insertAdjacentElement("afterbegin",b))});v.observe(g,{childList:!0,subtree:!1}),ae(()=>{b.removeEventListener("focusin",y),h.removeEventListener("focusin",y),b.remove(),h.remove(),v.disconnect()})})}var bw="data-live-announcer";function ag(e){oe(()=>{X(e.isDisabled)||ae(yw(X(e.targets),X(e.root)))})}var mo=new WeakMap,an=[];function yw(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const f of u.querySelectorAll(`[${bw}], [${qi}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const p of n)if(f.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let f=l.nextNode();for(;f!=null;)i(f),f=l.nextNode()}},i=u=>{const c=mo.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),mo.set(u,c+1))};an.length&&an[an.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return an.push(a),()=>{s.disconnect();for(const u of r){const c=mo.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),mo.delete(u)):mo.set(u,c-1)}a===an[an.length-1]?(an.pop(),an.length&&an[an.length-1].observe()):an.splice(an.indexOf(a),1)}}function vw(e){const t=n=>{n.key===us.Escape&&e.onEscapeKeyDown?.(n)};oe(()=>{if(X(e.isDisabled))return;const n=e.ownerDocument?.()??nn();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}var Tl="interactOutside.pointerDownOutside",Dl="interactOutside.focusOutside";function xw(e,t){let n,r=wv;const o=()=>nn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${qi}]`)||!Bt(o(),f)||Bt(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const p=t(),g=d.target;if(!p||!g||!u(d))return;const b=Nt([i,a]);g.addEventListener(Tl,b,{once:!0});const h=new CustomEvent(Tl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||lv(d)&&d.button===0}});g.dispatchEvent(h)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},l=d=>{const f=t(),p=d.target;if(!f||!p||!u(d))return;const g=Nt([s,a]);p.addEventListener(Dl,g,{once:!0});const b=new CustomEvent(Dl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});p.dispatchEvent(b)};oe(()=>{X(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ae(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var ug=mt();function ww(){return lt(ug)}function qu(e){let t;const n=ww(),[r,o]=we(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n?.registerNestedLayer(d);return()=>{i.delete(d),f?.()}};xw({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>Bt(f(),d))||[...i].some(f=>Bt(f,d)):!1,onPointerDownOutside:d=>{!t||Xt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Xt.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),vw({ownerDocument:()=>nn(t),onEscapeKeyDown:d=>{!t||!Xt.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Vt(()=>{if(!t)return;Xt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Xt.assignPointerEventToLayers(),Xt.disableBodyPointerEvents(t),ae(()=>{t&&(Xt.removeLayer(t),d?.(),Xt.assignPointerEventToLayers(),Xt.restoreBodyPointerEvents(t))})}),oe(At([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const p=Xt.find(d);p&&p.isPointerBlocking!==f&&(p.isPointerBlocking=f,Xt.assignPointerEventToLayers()),f&&Xt.disableBodyPointerEvents(d),ae(()=>{Xt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return m(ug.Provider,{value:l,get children(){return m(Ze,Q({as:"div",ref(d){var f=ft(p=>t=p,r.ref);typeof f=="function"&&f(d)}},o))}})}function ei(e={}){const[t,n]=Y0({value:()=>X(e.open),defaultValue:()=>!!X(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function cg(e={}){const[t,n]=Y0({value:()=>X(e.isSelected),defaultValue:()=>!!X(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(i)},toggle:()=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(!t())}}}function Lt(e){return t=>(e(t),()=>e(void 0))}var Pt=e=>typeof e=="function"?e():e,gu=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},mi=new Map,_w=e=>{oe(()=>{const t=Pt(e.style)??{},n=Pt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=mi.get(e.key);o?o.activeCount++:mi.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ae(()=>{const i=mi.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}mi.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Ol=_w,Ew=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},kw=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Sw=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=Ew(o,t),d=l-u-r*c;(c!==0||d!==0)&&kw(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Rl,Nl]=$([]),Cw=e=>Rl().indexOf(e)===Rl().length-1,Aw=e=>{const t=Q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=qt();let r=[0,0],o=null,i=null;oe(()=>{Pt(t.enabled)&&(Nl(c=>[...c,n]),ae(()=>{Nl(c=>c.filter(l=>l!==n))}))}),oe(()=>{if(!Pt(t.enabled)||!Pt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Pt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];l>0&&(Pt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,f.push({key:"--scrollbar-width",value:`${l}px`}));const p=window.scrollY,g=window.scrollX;Ol({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Pt(t.restoreScrollPosition)&&l>0&&window.scrollTo(g,p)}})}else Ol({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),oe(()=>{!Cw(n)||!Pt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=Il(c),o=null,i=null},a=c=>{const l=c.target,d=Pt(t.element),f=Tw(c),p=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=p==="x"?f[0]:f[1],b=Ml(l,p,g,d);let h;d&&gu(d,l)?h=!b:h=!0,h&&c.cancelable&&c.preventDefault()},u=c=>{const l=Pt(t.element),d=c.target;let f;if(c.touches.length===2)f=!Pt(t.allowPinchZoom);else{if(o==null||i===null){const p=Il(c).map((b,h)=>r[h]-b),g=Math.abs(p[0])>Math.abs(p[1])?"x":"y";o=g,i=g==="x"?p[0]:p[1]}if(d.type==="range")f=!1;else{const p=Ml(d,o,i,l);l&&gu(l,d)?f=!p:f=!0}}f&&c.cancelable&&c.preventDefault()}},Tw=e=>[e.deltaX,e.deltaY],Il=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Ml=(e,t,n,r)=>{const o=r!==null&&gu(r,e),[i,s]=Sw(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Dw=Aw,lg=Dw,Ow=e=>{const t=re(()=>{const s=Pt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=$(Pt(e.show)?"present":"hidden");let i="none";return oe(s=>{const a=Pt(e.show);return Ct(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),oe(()=>{const s=Pt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ae(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},Rw=Ow,Lr=Rw,Nw=mt();function bs(){return lt(Nw)}var Iw=mt();function dg(){return lt(Iw)}var fg=mt();function gg(){return lt(fg)}function Xn(){const e=gg();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var pg=mt();function ju(){const e=lt(pg);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var hg=mt();function Ln(){const e=lt(hg);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Gu(e){let t;const n=Ln(),r=Xn(),o=$e({id:n.generateId(`item-${qt()}`)},e),[i,s]=we(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),p=()=>r.listState().selectionManager(),g=()=>s.id,b=()=>p().focusedKey()===g(),h=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};uw({getItem:()=>({ref:()=>t,type:"item",key:g(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=Q0({key:g,selectionManager:p,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=I=>{He(I,i.onPointerMove),I.pointerType==="mouse"&&(i.disabled?r.onItemLeave(I):(r.onItemEnter(I),I.defaultPrevented||(Rt(I.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=I=>{He(I,i.onPointerLeave),I.pointerType==="mouse"&&r.onItemLeave(I)},k=I=>{He(I,i.onPointerUp),!i.disabled&&I.button===0&&h()},E=I=>{if(He(I,i.onKeyDown),!I.repeat&&!i.disabled)switch(I.key){case"Enter":case" ":h();break}},S=re(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),O=re(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":b()?"":void 0})),_={isChecked:()=>i.checked,dataset:O,setLabelRef:f,generateId:Yn(()=>s.id),registerLabel:Lt(u),registerDescription:Lt(l)};return m(pg.Provider,{value:_,get children(){return m(Ze,Q({as:"div",ref(I){var L=ft(T=>t=T,i.ref);typeof L=="function"&&L(I)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return S()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return y.dataKey()},get onPointerDown(){return Nt([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return Nt([k,y.onPointerUp])},get onClick(){return Nt([i.onClick,y.onClick])},get onKeyDown(){return Nt([E,y.onKeyDown])},get onMouseDown(){return Nt([i.onMouseDown,y.onMouseDown])},get onFocus(){return Nt([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},O,s))}})}function mg(e){const t=$e({closeOnSelect:!1},e),[n,r]=we(t,["checked","defaultChecked","onChange","onSelect"]),o=cg({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return m(Gu,Q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Po={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Po.next(e==="ltr"?"rtl":"ltr",t)},Ll={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function bg(e){const t=Ln(),n=Xn(),r=bs(),{direction:o}=xr(),i=$e({id:t.generateId("trigger")},e),[s,a]=we(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=ls(()=>n.triggerRef(),()=>"button"),l=re(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);oe(At(()=>r?.value(),y=>{l()&&y===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=y=>{He(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},p=y=>{He(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},g=y=>{if(He(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Ll.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Ev(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Ll.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Po.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Po.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{He(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},h=y=>{He(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return oe(()=>ae(n.registerTriggerId(s.id))),m(uo,Q({ref(y){var v=ft(n.setTriggerRef,s.ref);typeof v=="function"&&v(y)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:f,onMouseOver:b,onClick:p,onKeyDown:g,onFocus:h,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function yg(e){let t;const n=Ln(),r=Xn(),o=bs(),i=dg(),{direction:s}=xr(),a=$e({id:n.generateId(`content-${qt()}`)},e),[u,c]=we(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=ew({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);sg({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=x=>{if(Bt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Po.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Po.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},g=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},b=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},h=x=>{He(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(He(x,u.onPointerMove),x.pointerType!=="mouse")return;const k=x.target,E=l!==x.clientX;Bt(x.currentTarget,k)&&E&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};oe(()=>ae(r.registerContentId(u.id))),ae(()=>r.setContentRef(void 0));const v={ref:ft(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Nt([u.onKeyDown,f.onKeyDown,p]),onMouseDown:Nt([u.onMouseDown,f.onMouseDown]),onFocusIn:Nt([u.onFocusIn,f.onFocusIn]),onFocusOut:Nt([u.onFocusOut,f.onFocusOut]),onPointerEnter:h,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return m(Y,{get when(){return r.contentPresent()},get children(){return m(Y,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return m(Ze,Q({as:"div"},()=>r.dataset(),v,c))},get children(){return m(ms.Positioner,{get children(){return m(qu,Q({get disableOutsidePointerEvents(){return de(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return yr({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:g,onFocusOutside:b,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function Mw(e){let t;const n=Ln(),r=Xn(),[o,i]=we(e,["ref"]);return lg({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),m(yg,Q({ref(s){var a=ft(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var vg=mt();function Lw(){const e=lt(vg);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Vu(e){const t=Ln(),n=$e({id:t.generateId(`group-${qt()}`)},e),[r,o]=$(),i={generateId:Yn(()=>n.id),registerLabelId:Lt(o)};return m(vg.Provider,{value:i,get children(){return m(Ze,Q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function xg(e){const t=Lw(),n=$e({id:t.generateId("label")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerLabelId(r.id))),m(Ze,Q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function wg(e){const t=Xn(),n=$e({children:"▼"},e);return m(Ze,Q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function _g(e){return m(Gu,Q({role:"menuitem",closeOnSelect:!0},e))}function Eg(e){const t=ju(),n=$e({id:t.generateId("description")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerDescription(r.id))),m(Ze,Q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function kg(e){const t=ju(),n=$e({id:t.generateId("indicator")},e),[r,o]=we(n,["forceMount"]);return m(Y,{get when(){return r.forceMount||t.isChecked()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}function Sg(e){const t=ju(),n=$e({id:t.generateId("label")},e),[r,o]=we(n,["ref","id"]);return oe(()=>ae(t.registerLabel(r.id))),m(Ze,Q({as:"div",ref(i){var s=ft(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Cg(e){const t=Xn();return m(Y,{get when(){return t.contentPresent()},get children(){return m(Su,e)}})}var Ag=mt();function $w(){const e=lt(Ag);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Tg(e){const n=Ln().generateId(`radiogroup-${qt()}`),r=$e({id:n},e),[o,i]=we(r,["value","defaultValue","onChange","disabled"]),[s,a]=Jo({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return m(Ag.Provider,{value:u,get children(){return m(Vu,i)}})}function Dg(e){const t=$w(),n=$e({closeOnSelect:!1},e),[r,o]=we(n,["value","onSelect"]);return m(Gu,Q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function Pw(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function Fw(e,t){return t?O0([e.clientX,e.clientY],t):!1}function Og(e){const t=Ln(),n=eg(),r=gg(),o=bs(),i=dg(),s=$e({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=we(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[f,p]=$(),[g,b]=$(),[h,y]=$(),[v,x]=$(),[k,E]=$(!0),[S,O]=$(u.placement),[_,I]=$([]),[L,T]=$([]),{DomCollectionProvider:R}=aw({items:L,onItemsChange:T}),M=ei({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>a.onOpenChange?.(J)}),{present:C}=Lr({show:()=>t.forceMount()||M.isOpen(),element:()=>v()??null}),N=Qx({selectionMode:"none",dataSource:L}),F=J=>{E(J),M.open()},G=(J=!1)=>{M.close(),J&&r&&r.close(!0)},U=J=>{E(J),M.toggle()},z=()=>{const J=v();J&&(Rt(J),N.selectionManager().setFocused(!0),N.selectionManager().setFocusedKey(void 0))},P=()=>{i!=null?setTimeout(()=>z()):z()},Z=J=>{I(Se=>[...Se,J]);const pe=r?.registerNestedMenu(J);return()=>{I(Se=>iu(Se,J)),pe?.()}},V=J=>d===l?.side&&Fw(J,l?.area),te=J=>{V(J)&&J.preventDefault()},W=J=>{V(J)||P()},H=J=>{V(J)&&J.preventDefault()};ag({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[v(),..._()].filter(Boolean)}),oe(()=>{const J=v();if(!J||!r)return;const pe=r.registerNestedMenu(J);ae(()=>{pe()})}),oe(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),..._()])}),oe(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(h()?.focus(),o.autoFocusMenu()&&F(!0)):G())}),oe(()=>{r!==void 0||o===void 0||M.isOpen()&&o.setValue(t.value())}),ae(()=>{r===void 0&&o?.unregisterMenu(t.value())});const me={dataset:re(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresent:C,nestedMenus:_,currentPlacement:S,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>N,parentMenuContext:()=>r,triggerRef:h,contentRef:v,triggerId:f,contentId:g,setTriggerRef:y,setContentRef:x,open:F,close:G,toggle:U,focusContent:P,onItemEnter:te,onItemLeave:W,onTriggerLeave:H,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>c=J,setPointerGraceIntent:J=>l=J,registerNestedMenu:Z,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:Lt(p),registerContentId:Lt(b)};return m(R,{get children(){return m(fg.Provider,{value:me,get children(){return m(Y,{when:i===void 0,get fallback(){return u.children},get children(){return m(ms,Q({anchorRef:h,contentRef:v,onCurrentPlacementChange:O},u))}})}})}})}function Rg(e){const{direction:t}=xr();return m(Og,Q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Bw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Ng(e){const t=Xn(),n=Ln(),[r,o]=we(e,["onFocusOutside","onKeyDown"]),{direction:i}=xr();return m(yg,Q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Bt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{He(l,r.onKeyDown);const d=Bt(l.currentTarget,l.target),f=Bw.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;d&&f&&p&&(t.close(),Rt(t.triggerRef()))}},o))}var $l=["Enter"," "],zw={open:(e,t)=>e==="ltr"?[...$l,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...$l,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Ig(e){let t;const n=Ln(),r=Xn(),o=$e({id:n.generateId(`sub-trigger-${qt()}`)},e),[i,s]=we(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=xr(),l=()=>i.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},f=()=>r.listState().collection(),p=()=>d().focusedKey()===l(),g=Q0({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=x=>{He(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},h=x=>{if(He(x,i.onPointerMove),x.pointerType!=="mouse")return;const k=r.parentMenuContext();if(k?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){k?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),k?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),Rt(x.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(He(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const k=r.parentMenuContext(),E=r.contentRef();if(E){k?.setPointerGraceIntent({area:Pw(r.currentPlacement(),x,E),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(k?.pointerGraceTimeoutId());const S=window.setTimeout(()=>{k?.setPointerGraceIntent(null)},300);k?.setPointerGraceTimeoutId(S)}else{if(k?.onTriggerLeave(x),x.defaultPrevented)return;k?.setPointerGraceIntent(null)}k?.onItemLeave(x)},v=x=>{He(x,i.onKeyDown),!x.repeat&&(i.disabled||zw.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return oe(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ae(x)}),oe(At(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ae(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),oe(()=>ae(r.registerTriggerId(i.id))),ae(()=>{u()}),m(Ze,Q({as:"div",ref(x){var k=ft(E=>{r.setTriggerRef(E),t=E},i.ref);typeof k=="function"&&k(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return de(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return p()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Nt([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return Nt([i.onPointerUp,g.onPointerUp])},get onClick(){return Nt([b,g.onClick])},get onKeyDown(){return Nt([v,g.onKeyDown])},get onMouseDown(){return Nt([i.onMouseDown,g.onMouseDown])},get onFocus(){return Nt([i.onFocus,g.onFocus])},onPointerMove:h,onPointerLeave:y},()=>r.dataset(),s))}function Uw(e){const t=bs(),n=`menu-${qt()}`,r=$e({id:n,modal:!0},e),[o,i]=we(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:Yn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return m(hg.Provider,{value:a,get children(){return m(Og,Q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var Kw={};vr(Kw,{Root:()=>ys,Separator:()=>Mg});function ys(e){let t;const n=$e({orientation:"horizontal"},e),[r,o]=we(n,["ref","orientation"]),i=ls(()=>t,()=>"hr");return m(Ze,Q({as:"hr",ref(s){var a=ft(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Mg=ys,Hw={};vr(Hw,{Arrow:()=>Qo,CheckboxItem:()=>mg,Content:()=>Lg,DropdownMenu:()=>Vn,Group:()=>Vu,GroupLabel:()=>xg,Icon:()=>wg,Item:()=>_g,ItemDescription:()=>Eg,ItemIndicator:()=>kg,ItemLabel:()=>Sg,Portal:()=>Cg,RadioGroup:()=>Tg,RadioItem:()=>Dg,Root:()=>$g,Separator:()=>ys,Sub:()=>Rg,SubContent:()=>Ng,SubTrigger:()=>Ig,Trigger:()=>bg});function Lg(e){const t=Ln(),n=Xn(),[r,o]=we(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return m(Mw,Q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||Rt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function $g(e){const t=`dropdownmenu-${qt()}`,n=$e({id:t},e);return m(Uw,n)}var Vn=Object.assign($g,{Arrow:Qo,CheckboxItem:mg,Content:Lg,Group:Vu,GroupLabel:xg,Icon:wg,Item:_g,ItemDescription:Eg,ItemIndicator:kg,ItemLabel:Sg,Portal:Cg,RadioGroup:Tg,RadioItem:Dg,Separator:ys,Sub:Rg,SubContent:Ng,SubTrigger:Ig,Trigger:bg});const Pg=Vn.Trigger;Vn.Group;Vn.Sub;Vn.RadioGroup;const Fg=e=>{const t=Q({gutter:4,flip:!1},e);return m(Vn,t)},Bg=e=>{const[t,n]=we(e,["class"]);return m(Vn.Portal,{get children(){return m(Vn.Content,Q({get class(){return Tt("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},pu=e=>{const[t,n]=we(e,["class","inset"]);return m(Vn.Item,Q({get class(){return Tt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))};var qw={};vr(qw,{CloseButton:()=>Ug,Content:()=>Kg,Description:()=>Hg,Dialog:()=>jn,Overlay:()=>qg,Portal:()=>jg,Root:()=>Gg,Title:()=>Vg,Trigger:()=>Wg,useDialogContext:()=>wr});var zg=mt();function wr(){const e=lt(zg);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Ug(e){const t=wr(),[n,r]=we(e,["aria-label","onClick"]);return m(uo,Q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{He(i,n.onClick),t.close()}},r))}function Kg(e){let t;const n=wr(),r=$e({id:n.generateId("content")},e),[o,i]=we(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=f=>{o.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{o.onFocusOutside?.(f),n.modal()&&f.preventDefault()},l=f=>{o.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Bt(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{o.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),Rt(n.triggerRef())):(f.defaultPrevented||(s||Rt(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return ag({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),lg({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),sg({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),oe(()=>ae(n.registerContentId(i.id))),m(Y,{get when(){return n.contentPresent()},get children(){return m(qu,Q({ref(f){var p=ft(g=>{n.setContentRef(g),t=g},o.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return de(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function Hg(e){const t=wr(),n=$e({id:t.generateId("description")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerDescriptionId(r.id))),m(Ze,Q({as:"p",get id(){return r.id}},o))}function qg(e){const t=wr(),[n,r]=we(e,["ref","style","onPointerDown"]),o=i=>{He(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return m(Y,{get when(){return t.overlayPresent()},get children(){return m(Ze,Q({as:"div",ref(i){var s=ft(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return yr({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function jg(e){const t=wr();return m(Y,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return m(Su,e)}})}var Pl={dismiss:"Dismiss"};function Gg(e){const t=`dialog-${qt()}`,n=$e({id:t,modal:!0,translations:Pl},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(),b=ei({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),h=()=>n.forceMount||b.isOpen(),{present:y}=Lr({show:h,element:()=>c()??null}),{present:v}=Lr({show:h,element:()=>d()??null}),x={translations:()=>n.translations??Pl,isOpen:b.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:p,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:f,overlayPresent:y,contentPresent:v,close:b.close,toggle:b.toggle,setTriggerRef:g,generateId:Yn(()=>n.id),registerContentId:Lt(o),registerTitleId:Lt(s),registerDescriptionId:Lt(u)};return m(zg.Provider,{value:x,get children(){return n.children}})}function Vg(e){const t=wr(),n=$e({id:t.generateId("title")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerTitleId(r.id))),m(Ze,Q({as:"h2",get id(){return r.id}},o))}function Wg(e){const t=wr(),[n,r]=we(e,["ref","onClick"]);return m(uo,Q({ref(i){var s=ft(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{He(i,n.onClick),t.toggle()}},r))}var jn=Object.assign(Gg,{CloseButton:Ug,Content:Kg,Description:Hg,Overlay:qg,Portal:jg,Title:Vg,Trigger:Wg}),jw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),Yg=B("<div>");const Cn=jn;jn.Trigger;const Fo=e=>{const[t,n]=we(e,["class","children"]);return m(jn.Portal,{get children(){return[m(jn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(jn.Content,{get class(){return Tt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[de(()=>t.children),m(jn.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return jw()}})]}})]}})},Bo=e=>{const[t,n]=we(e,["class"]);return m(jn.Title,Q({get class(){return Tt("text-lg font-semibold text-foreground",t.class)}},n))},Wu=e=>{const[t,n]=we(e,["class"]);return m(jn.Description,Q({get class(){return Tt(" text-muted-foreground",t.class)}},n))},zo=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Yg();return Wn(r,Q({get class(){return Tt("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Uo=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Yg();return Wn(r,Q({get class(){return Tt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var Gw=B("<input>");const Ao=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Gw();return Wn(r,Q({get class(){return Tt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var Vw=B("<div><div class=sonner-spinner>"),Ww=B("<div class=sonner-loading-bar>"),Yw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>'),Zw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"clip-rule=evenodd>'),Xw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"clip-rule=evenodd>'),Qw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"clip-rule=evenodd>'),Jw=B('<svg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),e_=B("<div>"),t_=B("<button data-close-button>"),n_=B("<div data-icon>"),r_=B("<div data-description>"),o_=B("<li tabindex=0 data-sonner-toast><div data-content><div data-title>"),i_=B("<button data-button data-cancel>"),s_=B("<button data-button data-action>"),a_=B('<section tabindex=-1 aria-live=polite aria-relevant="additions text"aria-atomic=false data-react-aria-top-layer>'),u_=B("<ol tabindex=-1 data-sonner-toaster style=--width:356px>");function c_(e,{insertAt:t}={}){if(typeof document>"u")return;const n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}c_(`html[dir=ltr],
|
|
6
|
+
*/var zb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},qr=zb,Ub=bt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Kb=B("<svg>"),Hb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},qb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Xc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gb=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vb=e=>{const[t,n]=we(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=lt(Ub);return(()=>{var o=Kb();return Wn(o,Q(qr,{get width(){return t.size??r.size??qr.width},get height(){return t.size??r.size??qr.height},get stroke(){return t.color??r.color??qr.stroke},get"stroke-width"(){return de(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??qr["stroke-width"])},get class(){return qb("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Xc(Gb(t.name))}`,`lucide-${Xc(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Hb(n)?"true":void 0}},n),!0,!0),w(o,m(vt,{get each(){return t.iconNode},children:([i,s])=>m(Lf,Q({component:i},s))})),o})()},ft=Vb,Wb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yb=e=>m(ft,Q(e,{iconNode:Wb,name:"check"})),Qc=Yb,Zb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xb=e=>m(ft,Q(e,{iconNode:Zb,name:"chevron-down"})),Ru=Xb,Qb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jb=e=>m(ft,Q(e,{iconNode:Qb,name:"chevron-right"})),e1=Jb,t1=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],n1=e=>m(ft,Q(e,{iconNode:t1,name:"chevrons-left"})),r0=n1,r1=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],o1=e=>m(ft,Q(e,{iconNode:r1,name:"chevrons-right"})),o0=o1,i1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],s1=e=>m(ft,Q(e,{iconNode:i1,name:"circle-question-mark"})),a1=s1,u1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c1=e=>m(ft,Q(e,{iconNode:u1,name:"copy"})),l1=c1,d1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],f1=e=>m(ft,Q(e,{iconNode:d1,name:"ellipsis"})),g1=f1,p1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],h1=e=>m(ft,Q(e,{iconNode:p1,name:"git-branch"})),m1=h1,b1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],y1=e=>m(ft,Q(e,{iconNode:b1,name:"git-merge"})),v1=y1,x1=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],w1=e=>m(ft,Q(e,{iconNode:x1,name:"languages"})),_1=w1,E1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k1=e=>m(ft,Q(e,{iconNode:E1,name:"loader-circle"})),sr=k1,C1=[["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"}]],S1=e=>m(ft,Q(e,{iconNode:C1,name:"maximize-2"})),A1=S1,T1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],D1=e=>m(ft,Q(e,{iconNode:T1,name:"menu"})),O1=D1,R1=[["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"}]],N1=e=>m(ft,Q(e,{iconNode:R1,name:"minimize-2"})),I1=N1,M1=[["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"}]],L1=e=>m(ft,Q(e,{iconNode:M1,name:"paperclip"})),$1=L1,P1=[["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"}]],F1=e=>m(ft,Q(e,{iconNode:P1,name:"pencil"})),B1=F1,z1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],U1=e=>m(ft,Q(e,{iconNode:z1,name:"plus"})),Nu=U1,K1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],H1=e=>m(ft,Q(e,{iconNode:K1,name:"refresh-cw"})),q1=H1,j1=[["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"}]],G1=e=>m(ft,Q(e,{iconNode:j1,name:"send"})),us=G1,V1=[["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"}]],W1=e=>m(ft,Q(e,{iconNode:V1,name:"settings"})),Y1=W1,Z1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],X1=e=>m(ft,Q(e,{iconNode:Z1,name:"square"})),Q1=X1,J1=[["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"}]],ey=e=>m(ft,Q(e,{iconNode:J1,name:"upload"})),ty=ey,ny=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ry=e=>m(ft,Q(e,{iconNode:ny,name:"x"})),Zo=ry;function rt(e){return`/api/projects/${encodeURIComponent(e)}`}async function au(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ve(e,t){const n=await fetch(e,t);if(!n.ok){const r=await au(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const Fe={listSpecs:e=>Ve(`${rt(e)}/specs`),getSpec:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${rt(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await au(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),triggerReview:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/review`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),gitOp:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getReview:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/review`),getDebug:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ve("/api/projects"),removeProject:e=>Ve(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ve(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ve(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ve(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ve(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ve(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getGlobalConfig:()=>Ve("/api/global-config"),updateGlobalConfig:e=>Ve("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Ve(`${rt(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await au(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ve(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ve(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${rt(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ve(`${rt(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ve(`${rt(e)}/sessions`),createSession:(e,t={})=>Ve(`${rt(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ve(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ve(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Ve(`${rt(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ve(`${rt(e)}/specs/${encodeURIComponent(t)}/session`)},[oy,i0]=L("");function Qr(e){e&&i0(e)}function iy(){i0("")}const[Ot,sy]=L(ay());function ay(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function Xo(){const e=ss();return()=>e.projectId??Ot()}function en(e="",t){const n=Ot();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[cr,s0]=L(!1);function uy(){s0(e=>!e)}function zi(){s0(!1)}function cs(e){ae(zi),oe(()=>{if(!cr())return;const t=n=>{n.key!=="Escape"||e?.()||zi()};window.addEventListener("keydown",t),ae(()=>window.removeEventListener("keydown",t))})}function cy(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class ly{clientId=cy();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let Pr=new ly;function ls(e){const t=e;return t.readyState=()=>Pr.readyState(),t}function dy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Pr.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ls(o)}function ds(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Pr.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ls(o)}function a0(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Pr.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ls(r)}function u0(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Pr.subscribe(n,r=>{r==="list-updated"&&t()})}function c0(e){return Pr.subscribe("projects",t=>{t==="projects-changed"&&e()})}function fy(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Pr.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return ls(o)}function l0(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 d0(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=d0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function f0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=d0(e))&&(r&&(r+=" "),r+=t);return r}const gy=(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},py=(e,t)=>({classGroupId:e,validator:t}),g0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ui="-",Jc=[],hy="arbitrary..",my=e=>{const t=yy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return by(s);const a=s.split(Ui),u=a[0]===""&&a.length>1?1:0;return p0(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?gy(c,u):u:c||Jc}return n[s]||Jc}}},p0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=p0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Ui):e.slice(t).join(Ui),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},by=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?hy+r:void 0})(),yy=e=>{const{theme:t,classGroups:n}=e;return vy(n,t)},vy=(e,t)=>{const n=g0();for(const r in e){const o=e[r];Iu(o,n,r,t)}return n},Iu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];xy(s,t,n,r)}},xy=(e,t,n,r)=>{if(typeof e=="string"){wy(e,t,n);return}if(typeof e=="function"){_y(e,t,n,r);return}Ey(e,t,n,r)},wy=(e,t,n)=>{const r=e===""?t:h0(t,e);r.classGroupId=n},_y=(e,t,n,r)=>{if(ky(e)){Iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(py(n,e))},Ey=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Iu(u,h0(t,a),n,r)}},h0=(e,t)=>{let n=e;const r=t.split(Ui),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=g0(),n.nextPart.set(s,a)),n=a}return n},ky=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Cy=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)}}},uu="!",el=":",Sy=[],tl=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ay=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let b=0;b<l;b++){const h=o[b];if(s===0&&a===0){if(h===el){i.push(o.slice(u,b)),u=b+1;continue}if(h==="/"){c=b;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const d=i.length===0?o:o.slice(u);let f=d,p=!1;d.endsWith(uu)?(f=d.slice(0,-1),p=!0):d.startsWith(uu)&&(f=d.slice(1),p=!0);const g=c&&c>u?c-u:void 0;return tl(i,p,f,g)};if(t){const o=t+el,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):tl(Sy,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Ty=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}},Dy=e=>({cache:Cy(e.cacheSize),parseClassName:Ay(e),sortModifiers:Ty(e),postfixLookupClassGroupIds:Oy(e),...my(e)}),Oy=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},Ry=/\s+/,Ny=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Ry);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:f,modifiers:p,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:h}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!h,v;if(y){const T=b.substring(0,h);v=r(T);const _=v&&s[v]?r(b):void 0;_&&_!==v&&(v=_,y=!1)}else v=r(b);if(!v){if(!y){c=d+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),k=g?x+uu:x,C=k+v;if(a.indexOf(C)>-1)continue;a.push(C);const E=o(v,y);for(let T=0;T<E.length;++T){const _=E[T];a.push(k+_)}c=d+(c.length>0?" "+c:c)}return c},Iy=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=m0(n))&&(o&&(o+=" "),o+=r);return o},m0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=m0(e[r]))&&(n&&(n+=" "),n+=t);return n},My=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Dy(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=Ny(u,n);return o(u,l),l};return i=s,(...u)=>i(Iy(...u))},Ly=[],St=e=>{const t=n=>n[e]||Ly;return t.isThemeGetter=!0,t},b0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,y0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$y=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Py=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fy=/\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$/,By=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Uy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>$y.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),Cn=e=>!!e&&Number.isInteger(Number(e)),Gs=e=>e.endsWith("%")&&je(e.slice(0,-1)),Un=e=>Py.test(e),v0=()=>!0,Ky=e=>Fy.test(e)&&!By.test(e),Mu=()=>!1,Hy=e=>zy.test(e),qy=e=>Uy.test(e),jy=e=>!ye(e)&&!ve(e),Gy=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)),Vy=e=>br(e,_0,Mu),ye=e=>b0.test(e),kr=e=>br(e,E0,Ky),nl=e=>br(e,tv,je),Wy=e=>br(e,C0,v0),Yy=e=>br(e,k0,Mu),rl=e=>br(e,x0,Mu),Zy=e=>br(e,w0,qy),gi=e=>br(e,S0,Hy),ve=e=>y0.test(e),yo=e=>Fr(e,E0),Xy=e=>Fr(e,k0),ol=e=>Fr(e,x0),Qy=e=>Fr(e,_0),Jy=e=>Fr(e,w0),pi=e=>Fr(e,S0,!0),ev=e=>Fr(e,C0,!0),br=(e,t,n)=>{const r=b0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fr=(e,t,n=!1)=>{const r=y0.exec(e);return r?r[1]?t(r[1]):n:!1},x0=e=>e==="position"||e==="percentage",w0=e=>e==="image"||e==="url",_0=e=>e==="length"||e==="size"||e==="bg-size",E0=e=>e==="length",tv=e=>e==="number",k0=e=>e==="family-name",C0=e=>e==="number"||e==="weight",S0=e=>e==="shadow",nv=()=>{const e=St("color"),t=St("font"),n=St("text"),r=St("font-weight"),o=St("tracking"),i=St("leading"),s=St("breakpoint"),a=St("container"),u=St("spacing"),c=St("radius"),l=St("shadow"),d=St("inset-shadow"),f=St("text-shadow"),p=St("drop-shadow"),g=St("blur"),b=St("perspective"),h=St("aspect"),y=St("ease"),v=St("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),ve,ye],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],_=()=>[ve,ye,u],R=()=>[nr,"full","auto",..._()],$=()=>[Cn,"none","subgrid",ve,ye],O=()=>["auto",{span:["full",Cn,ve,ye]},Cn,ve,ye],N=()=>[Cn,"auto",ve,ye],M=()=>["auto","min","max","fr",ve,ye],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",..._()],G=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],U=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",..._()],z=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],P=()=>[e,ve,ye],Z=()=>[...k(),ol,rl,{position:[ve,ye]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",Qy,Vy,{size:[ve,ye]}],Y=()=>[Gs,yo,kr],H=()=>["","none","full",c,ve,ye],ie=()=>["",je,yo,kr],me=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[je,Gs,ol,rl],Ce=()=>["","none",g,ve,ye],Ne=()=>["none",je,ve,ye],Xe=()=>["none",je,ve,ye],pt=()=>[je,ve,ye],ce=()=>[nr,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[v0],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[jy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",je],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,ye,ve,h]}],container:["container"],"container-type":[{"@container":["","normal","size",ve,ye]}],"container-named":[Gy],columns:[{columns:[je,ye,ve,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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Cn,"auto",ve,ye]}],basis:[{basis:[nr,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,nr,"auto","initial","none",ye]}],grow:[{grow:["",je,ve,ye]}],shrink:[{shrink:["",je,ve,ye]}],order:[{order:[Cn,"first","last","none",ve,ye]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,yo,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ev,Wy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gs,ye]}],"font-family":[{font:[Xy,Yy,t]}],"font-features":[{"font-features":[ye]}],"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,ve,ye]}],"line-clamp":[{"line-clamp":[je,"none",ve,nl]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",ve,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ve,kr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[je,"auto",ve,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[Cn,ve,ye]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ye]}],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",ve,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cn,ve,ye],radial:["",ve,ye],conic:[Cn,ve,ye]},Jy,Zy]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ve,ye]}],"outline-w":[{outline:["",je,yo,kr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",l,pi,gi]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,pi,gi]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[je,kr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,pi,gi]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[je,ve,ye]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ve,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ye]}],filter:[{filter:["","none",ve,ye]}],blur:[{blur:Ce()}],brightness:[{brightness:[je,ve,ye]}],contrast:[{contrast:[je,ve,ye]}],"drop-shadow":[{"drop-shadow":["","none",p,pi,gi]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",je,ve,ye]}],"hue-rotate":[{"hue-rotate":[je,ve,ye]}],invert:[{invert:["",je,ve,ye]}],saturate:[{saturate:[je,ve,ye]}],sepia:[{sepia:["",je,ve,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ye]}],"backdrop-blur":[{"backdrop-blur":Ce()}],"backdrop-brightness":[{"backdrop-brightness":[je,ve,ye]}],"backdrop-contrast":[{"backdrop-contrast":[je,ve,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ve,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ve,ye]}],"backdrop-invert":[{"backdrop-invert":["",je,ve,ye]}],"backdrop-opacity":[{"backdrop-opacity":[je,ve,ye]}],"backdrop-saturate":[{"backdrop-saturate":[je,ve,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ve,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ve,ye]}],ease:[{ease:["linear","initial",y,ve,ye]}],delay:[{delay:[je,ve,ye]}],animate:[{animate:["none",v,ve,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,ye]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Xe()}],"scale-x":[{"scale-x":Xe()}],"scale-y":[{"scale-y":Xe()}],"scale-z":[{"scale-z":Xe()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[ve,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],zoom:[{zoom:[Cn,ve,ye]}],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ye]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[je,yo,kr,nl]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rv=My(nv);function Et(...e){return rv(f0(e))}function ov(e){return(...t)=>{for(const n of e)n&&n(...t)}}const X=e=>typeof e=="function"&&!e.length?e():e,il=e=>Array.isArray(e)?e:e?[e]:[];function iv(e,...t){return typeof e=="function"?e(...t):e}const sv=ae;function av(e,t,n,r){return e.addEventListener(t,n,r),sv(e.removeEventListener.bind(e,t,n,r))}function uv(e,t,n,r){const o=()=>{il(X(e)).forEach(i=>{i&&il(X(t)).forEach(s=>av(i,s,n,r))})};typeof e=="function"?oe(o):le(o)}const cv=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function sl(e){const t={};let n;for(;n=cv.exec(e);)t[n[1]]=n[2];return t}function yr(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=sl(e)}else typeof t=="string"&&(t=sl(t));return{...e,...t}}function gt(...e){return ov(e)}function lv(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function cu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dv(e){return typeof e=="number"}function Zr(e){return Object.prototype.toString.call(e)==="[object String]"}function A0(e){return typeof e=="function"}function Yn(e){return t=>`${e()}-${t}`}function Bt(e,t){return e?e===t||e.contains(t):!1}function So(e,t=!1){const{activeElement:n}=nn(e);if(!n?.nodeName)return null;if(D0(n)&&n.contentDocument)return So(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=nn(n).getElementById(r);if(o)return o}}return n}function T0(e){return nn(e).defaultView||window}function nn(e){return e?e.ownerDocument||e:document}function D0(e){return e.tagName==="IFRAME"}var fs=(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))(fs||{});function Lu(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function gs(){return Lu(/^Mac/i)}function fv(){return Lu(/^iPhone/i)}function gv(){return Lu(/^iPad/i)||gs()&&navigator.maxTouchPoints>1}function pv(){return fv()||gv()}function hv(){return gs()||pv()}function He(e,t){return t&&(A0(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Nt(e){return t=>{for(const n of e)He(t,n)}}function mv(e){return gs()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Rt(e){if(e)if(bv())e.focus({preventScroll:!0});else{const t=yv(e);e.focus(),vv(t)}}var hi=null;function bv(){if(hi==null){hi=!1;try{document.createElement("div").focus({get preventScroll(){return hi=!0,!0}})}catch{}}return hi}function yv(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 vv(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var O0=["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'])"],xv=[...O0,'[tabindex]:not([tabindex="-1"]):not([disabled])'],$u=`${O0.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,wv=xv.join(':not([hidden]):not([tabindex="-1"]),');function R0(e,t){const r=Array.from(e.querySelectorAll($u)).filter(al);return t&&al(e)&&r.unshift(e),r.forEach((o,i)=>{if(D0(o)&&o.contentDocument){const s=o.contentDocument.body,a=R0(s,!1);r.splice(i,1,...a)}}),r}function al(e){return N0(e)&&!_v(e)}function N0(e){return e.matches($u)&&Pu(e)}function _v(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Pu(e,t){return e.nodeName!=="#comment"&&Ev(e)&&kv(e,t)&&(!e.parentElement||Pu(e.parentElement,e))}function Ev(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 kv(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Cv(e,t,n){const r=t?.tabbable?wv:$u,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Pu(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function ul(e){let t=e;for(;t&&!Sv(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Sv(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Av(){}function Tv(e){return[e.clientX,e.clientY]}function I0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,f]=t[u],[,p]=t[u===0?s-1:u-1]||[0,0],g=(l-f)*(n-c)-(c-d)*(r-l);if(f<l){if(r>=f&&r<l){if(g===0)return!0;g>0&&(r===f?r>p&&(o=!o):o=!o)}}else if(l<f){if(r>l&&r<=f){if(g===0)return!0;g<0&&(r===f?r<p&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function $e(e,t){return Q(e,t)}var vo=new Map,cl=new Set;function ll(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=vo.get(n.target);r||(r=new Set,vo.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=vo.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),vo.delete(n.target)),vo.size===0)){for(const o of cl)o();cl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?ll():document.addEventListener("DOMContentLoaded",ll));function lu(e,t){const n=dl(e,t,"left"),r=dl(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 dl(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 Dv(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=ul(e);for(;e&&o&&e!==n&&o!==n;)lu(o,e),e=o,o=ul(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 Fu={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 ps(e,t){const[n,r]=L(fl(t?.()));return oe(()=>{r(e()?.tagName.toLowerCase()||fl(t?.()))}),n}function fl(e){return Zr(e)?e:void 0}function Ze(e){const[t,n]=we(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return m(Lf,Q(n,{get component(){return t.as}}))}var Ov=Object.defineProperty,vr=(e,t)=>{for(var n in t)Ov(e,n,{get:t[n],enumerable:!0})},Rv={};vr(Rv,{Button:()=>M0,Root:()=>go});var Nv=["button","color","file","image","reset","submit"];function Iv(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Nv.indexOf(e.type)!==-1:!1}function go(e){let t;const n=$e({type:"button"},e),[r,o]=we(n,["ref","type","disabled"]),i=ps(()=>t,()=>"button"),s=re(()=>{const c=i();return c==null?!1:Iv({tagName:c,type:r.type})}),a=re(()=>i()==="input"),u=re(()=>i()==="a"&&t?.getAttribute("href")!=null);return m(Ze,Q({as:"button",ref(c){var l=gt(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return de(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return de(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var M0=go;const gl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pl=f0,L0=(e,t)=>n=>{var r;if(t?.variants==null)return pl(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const f=gl(l)||gl(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,f]=l;return f===void 0||(c[d]=f),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:f,...p}=l;return Object.entries(p).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...a}[b]):{...i,...a}[b]===h})?[...c,d,f]:c},[]);return pl(e,s,u,n?.class,n?.className)},Mv=L0("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"}}),Pe=e=>{const[t,n]=we(e,["class","variant","size"]);return m(M0,Q({get class(){return Et(Mv({size:t.size,variant:t.variant}),t.class)}},n))};var Lv=B("<div>");const $v=L0("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"}}),$0=e=>{const[t,n]=we(e,["class","variant"]);return(()=>{var r=Lv();return Wn(r,Q({get class(){return Et($v({variant:t.variant}),t.class)}},n),!1,!1),r})()},[Pv,P0]=L(wt.language||"zh-CN"),[Fv,Bv]=L(wt.isInitialized);n0.then(()=>{P0(wt.language||"zh-CN"),Bv(!0)});wt.on("languageChanged",e=>P0(e));function S(e,t){return wt.t(e,t)}function F0(){return{t:S,lng:re(()=>Pv()),ready:re(()=>Fv()),changeLanguage:e=>wt.changeLanguage(e)}}const hs=()=>{const e=()=>cr()?S("specDetail.exitFullscreen"):S("specDetail.fullscreen");return m(Pe,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:uy,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return cr()},get children(){return m(W,{get when(){return cr()},get fallback(){return m(A1,{class:"h-3 w-3"})},get children(){return m(I1,{class:"h-3 w-3"})}})}})};var zv=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Uv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Kv(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return zv.has(n)}const t=e.split("-")[0];return Uv.has(t)}function Hv(e){return Kv(e)?"rtl":"ltr"}function B0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Hv(e)}}var du=B0(),Ao=new Set;function hl(){du=B0();for(const e of Ao)e(du)}function qv(){const[e,t]=L(du),n=re(()=>e());return Vt(()=>{Ao.size===0&&window.addEventListener("languagechange",hl),Ao.add(t),ae(()=>{Ao.delete(t),Ao.size===0&&window.removeEventListener("languagechange",hl)})}),{locale:()=>n().locale,direction:()=>n().direction}}var jv=bt();function xr(){const e=qv();return lt(jv)||e}var Vs=new Map;function Gv(e){const{locale:t}=xr(),n=re(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return re(()=>{const r=n();let o;return Vs.has(r)&&(o=Vs.get(r)),o||(o=new Intl.Collator(t(),e),Vs.set(r,o)),o})}const Vv=["top","right","bottom","left"],gr=Math.min,Qt=Math.max,Ki=Math.round,mi=Math.floor,Rn=e=>({x:e,y:e}),Wv={left:"right",right:"left",bottom:"top",top:"bottom"};function fu(e,t,n){return Qt(e,gr(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function pr(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function z0(e){return e==="x"?"y":"x"}function Bu(e){return e==="y"?"height":"width"}function jn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zu(e){return z0(jn(e))}function Yv(e,t,n){n===void 0&&(n=!1);const r=po(e),o=zu(e),i=Bu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Hi(s)),[s,Hi(s)]}function Zv(e){const t=Hi(e);return[gu(e),t,gu(t)]}function gu(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ml=["left","right"],bl=["right","left"],Xv=["top","bottom"],Qv=["bottom","top"];function Jv(e,t,n){switch(e){case"top":case"bottom":return n?t?bl:ml:t?ml:bl;case"left":case"right":return t?Xv:Qv;default:return[]}}function ex(e,t,n,r){const o=po(e);let i=Jv(pr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(gu)))),i}function Hi(e){const t=pr(e);return Wv[t]+e.slice(t.length)}function tx(e){return{top:0,right:0,bottom:0,left:0,...e}}function U0(e){return typeof e!="number"?tx(e):{top:e,right:e,bottom:e,left:e}}function qi(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=jn(t),s=zu(t),a=Bu(s),u=pr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(po(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function nx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Br(t,e),g=U0(p),h=a[f?d==="floating"?"reference":"floating":d],y=qi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=qi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:u}):v);return{top:(y.top-C.top+g.top)/k.y,bottom:(C.bottom-y.bottom+g.bottom)/k.y,left:(y.left-C.left+g.left)/k.x,right:(C.right-y.right+g.right)/k.x}}const rx=50,ox=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:nx},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),f=r,p=0;const g={};for(let b=0;b<i.length;b++){const h=i[b];if(!h)continue;const{name:y,fn:v}=h,{x,y:k,data:C,reset:E}=await v({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=k??d,g[y]={...g[y],...C},E&&p<rx&&(p++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:d}=yl(c,f,u)),b=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:g}},ix=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=Br(e,t)||{};if(c==null)return{};const d=U0(l),f={x:n,y:r},p=zu(o),g=Bu(p),b=await s.getDimensions(c),h=p==="y",y=h?"top":"left",v=h?"bottom":"right",x=h?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[p]-f[p]-i.floating[g],C=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=E?E[x]:0;(!T||!await(s.isElement==null?void 0:s.isElement(E)))&&(T=a.floating[x]||i.floating[g]);const _=k/2-C/2,R=T/2-b[g]/2-1,$=gr(d[y],R),O=gr(d[v],R),N=$,M=T-b[g]-O,A=T/2-b[g]/2+_,I=fu(N,A,M),F=!u.arrow&&po(o)!=null&&A!==I&&i.reference[g]/2-(A<N?$:O)-b[g]/2<0,G=F?A<N?A-N:A-M:0;return{[p]:f[p]+G,data:{[p]:I,centerOffset:A-I-G,...F&&{alignmentOffset:G}},reset:F}}}),sx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...h}=Br(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=pr(o),v=jn(a),x=pr(a)===a,k=await(u.isRTL==null?void 0:u.isRTL(c.floating)),C=f||(x||!b?[Hi(a)]:Zv(a)),E=g!=="none";!f&&E&&C.push(...ex(a,b,g,k));const T=[a,...C],_=await u.detectOverflow(t,h),R=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&R.push(_[y]),d){const A=Yv(o,s,k);R.push(_[A[0]],_[A[1]])}if($=[...$,{placement:o,overflows:R}],!R.every(A=>A<=0)){var O,N;const A=(((O=i.flip)==null?void 0:O.index)||0)+1,I=T[A];if(I&&(!(d==="alignment"?v!==jn(I):!1)||$.every(U=>jn(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:A,overflows:$},reset:{placement:I}};let F=(N=$.filter(G=>G.overflows[0]<=0).sort((G,U)=>G.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(p){case"bestFit":{var M;const G=(M=$.filter(U=>{if(E){const z=jn(U.placement);return z===v||z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(z=>z>0).reduce((z,P)=>z+P,0)]).sort((U,z)=>U[1]-z[1])[0])==null?void 0:M[0];G&&(F=G);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function vl(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 Vv.some(t=>e[t]>=0)}const ax=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Br(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=vl(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:xl(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=vl(s,n.floating);return{data:{escapedOffsets:a,escaped:xl(a)}}}default:return{}}}}},ux=new Set(["left","top"]);async function cx(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pr(n),a=po(n),u=jn(n)==="y",c=ux.has(s)?-1:1,l=i&&u?-1:1,d=Br(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*l,y:f*c}:{x:f*c,y:p*l}}const lx=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 cx(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}}}}},dx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...c}=Br(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),f=jn(pr(o)),p=z0(f);let g=l[p],b=l[f];if(s){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",x=g+d[y],k=g-d[v];g=fu(x,g,k)}if(a){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=b+d[y],k=b-d[v];b=fu(x,b,k)}const h=u.fn({...t,[p]:g,[f]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[f]:a}}}}}},fx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Br(e,t),l=await s.detectOverflow(t,c),d=pr(o),f=po(o),p=jn(o)==="y",{width:g,height:b}=i.floating;let h,y;d==="top"||d==="bottom"?(h=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,h=f==="end"?"top":"bottom");const v=b-l.top-l.bottom,x=g-l.left-l.right,k=gr(b-l[h],v),C=gr(g-l[y],x),E=!t.middlewareData.shift;let T=k,_=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=v),E&&!f){const $=Qt(l.left,0),O=Qt(l.right,0),N=Qt(l.top,0),M=Qt(l.bottom,0);p?_=g-2*($!==0||O!==0?$+O:Qt(l.left,l.right)):T=b-2*(N!==0||M!==0?N+M:Qt(l.top,l.bottom))}await u({...t,availableWidth:_,availableHeight:T});const R=await s.getDimensions(a.floating);return g!==R.width||b!==R.height?{reset:{rects:!0}}:{}}}};function ms(){return typeof window<"u"}function ho(e){return K0(e)?(e.nodeName||"").toLowerCase():"#document"}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ln(e){var t;return(t=(K0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function K0(e){return ms()?e instanceof Node||e instanceof tn(e).Node:!1}function yn(e){return ms()?e instanceof Element||e instanceof tn(e).Element:!1}function Zn(e){return ms()?e instanceof HTMLElement||e instanceof tn(e).HTMLElement:!1}function wl(e){return!ms()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function Qo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function gx(e){return/^(table|td|th)$/.test(ho(e))}function bs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const px=/transform|translate|scale|rotate|perspective|filter/,hx=/paint|layout|strict|content/,Cr=e=>!!e&&e!=="none";let Ws;function Uu(e){const t=yn(e)?vn(e):e;return Cr(t.transform)||Cr(t.translate)||Cr(t.scale)||Cr(t.rotate)||Cr(t.perspective)||!Ku()&&(Cr(t.backdropFilter)||Cr(t.filter))||px.test(t.willChange||"")||hx.test(t.contain||"")}function mx(e){let t=hr(e);for(;Zn(t)&&!ro(t);){if(Uu(t))return t;if(bs(t))return null;t=hr(t)}return null}function Ku(){return Ws==null&&(Ws=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ws}function ro(e){return/^(html|body|#document)$/.test(ho(e))}function vn(e){return tn(e).getComputedStyle(e)}function ys(e){return yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wl(e)&&e.host||Ln(e);return wl(t)?t.host:t}function H0(e){const t=hr(e);return ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&Qo(t)?t:H0(t)}function zo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=tn(o);if(i){const a=pu(s);return t.concat(s,s.visualViewport||[],Qo(o)?o:[],a&&n?zo(a):[])}else return t.concat(o,zo(o,[],n))}function pu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function q0(e){const t=vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ki(n)!==i||Ki(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Hu(e){return yn(e)?e:e.contextElement}function eo(e){const t=Hu(e);if(!Zn(t))return Rn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=q0(t);let s=(i?Ki(n.width):n.width)/r,a=(i?Ki(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const bx=Rn(0);function j0(e){const t=tn(e);return!Ku()||!t.visualViewport?bx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Hu(e);let s=Rn(1);t&&(r?yn(r)&&(s=eo(r)):s=eo(e));const a=yx(i,n,r)?j0(i):Rn(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const f=tn(i),p=r&&yn(r)?tn(r):r;let g=f,b=pu(g);for(;b&&r&&p!==g;){const h=eo(b),y=b.getBoundingClientRect(),v=vn(b),x=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*h.x,k=y.top+(b.clientTop+parseFloat(v.paddingTop))*h.y;u*=h.x,c*=h.y,l*=h.x,d*=h.y,u+=x,c+=k,g=tn(b),b=pu(g)}}return qi({width:l,height:d,x:u,y:c})}function vs(e,t){const n=ys(e).scrollLeft;return t?t.left+n:Mr(Ln(e)).left+n}function G0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function vx(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ln(r),a=t?bs(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Rn(1);const l=Rn(0),d=Zn(r);if((d||!d&&!i)&&((ho(r)!=="body"||Qo(s))&&(u=ys(r)),d)){const p=Mr(r);c=eo(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const f=s&&!d&&!i?G0(s,u):Rn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+f.x,y:n.y*c.y-u.scrollTop*c.y+l.y+f.y}}function xx(e){return Array.from(e.getClientRects())}function wx(e){const t=Ln(e),n=ys(e),r=e.ownerDocument.body,o=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vs(e);const a=-n.scrollTop;return vn(r).direction==="rtl"&&(s+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const _l=25;function _x(e,t){const n=tn(e),r=Ln(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=Ku();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=vs(r);if(c<=0){const l=r.ownerDocument,d=l.body,f=getComputedStyle(d),p=l.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=_l&&(i-=g)}else c<=_l&&(i+=c);return{width:i,height:s,x:a,y:u}}function Ex(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zn(e)?eo(e):Rn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function El(e,t,n){let r;if(t==="viewport")r=_x(e,n);else if(t==="document")r=wx(Ln(e));else if(yn(t))r=Ex(t,n);else{const o=j0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qi(r)}function V0(e,t){const n=hr(e);return n===t||!yn(n)||ro(n)?!1:vn(n).position==="fixed"||V0(n,t)}function kx(e,t){const n=t.get(e);if(n)return n;let r=zo(e,[],!1).filter(a=>yn(a)&&ho(a)!=="body"),o=null;const i=vn(e).position==="fixed";let s=i?hr(e):e;for(;yn(s)&&!ro(s);){const a=vn(s),u=Uu(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Qo(s)&&!u&&V0(e,s))?r=r.filter(l=>l!==s):o=a,s=hr(s)}return t.set(e,r),r}function Cx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?bs(t)?[]:kx(t,this._c):[].concat(n),r],a=El(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let f=1;f<s.length;f++){const p=El(t,s[f],o);u=Qt(p.top,u),c=gr(p.right,c),l=gr(p.bottom,l),d=Qt(p.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function Sx(e){const{width:t,height:n}=q0(e);return{width:t,height:n}}function Ax(e,t,n){const r=Zn(t),o=Ln(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Rn(0);function c(){u.x=vs(o)}if(r||!r&&!i)if((ho(t)!=="body"||Qo(o))&&(a=ys(t)),r){const p=Mr(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?G0(o,a):Rn(0),d=s.left+a.scrollLeft-u.x-l.x,f=s.top+a.scrollTop-u.y-l.y;return{x:d,y:f,width:s.width,height:s.height}}function Ys(e){return vn(e).position==="static"}function kl(e,t){if(!Zn(e)||vn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ln(e)===n&&(n=n.ownerDocument.body),n}function W0(e,t){const n=tn(e);if(bs(e))return n;if(!Zn(e)){let o=hr(e);for(;o&&!ro(o);){if(yn(o)&&!Ys(o))return o;o=hr(o)}return n}let r=kl(e,t);for(;r&&gx(r)&&Ys(r);)r=kl(r,t);return r&&ro(r)&&Ys(r)&&!Uu(r)?n:r||mx(e)||n}const Tx=async function(e){const t=this.getOffsetParent||W0,n=this.getDimensions,r=await n(e.floating);return{reference:Ax(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dx(e){return vn(e).direction==="rtl"}const Y0={convertOffsetParentRelativeRectToViewportRelativeRect:vx,getDocumentElement:Ln,getClippingRect:Cx,getOffsetParent:W0,getElementRects:Tx,getClientRects:xx,getDimensions:Sx,getScale:eo,isElement:yn,isRTL:Dx};function Z0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ox(e,t){let n=null,r;const o=Ln(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=mi(d),b=mi(o.clientWidth-(l+f)),h=mi(o.clientHeight-(d+p)),y=mi(l),x={rootMargin:-g+"px "+-b+"px "+-h+"px "+-y+"px",threshold:Qt(0,gr(1,u))||1};let k=!0;function C(E){const T=E[0].intersectionRatio;if(T!==u){if(!k)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Z0(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function Rx(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=Hu(e),l=o||i?[...c?zo(c):[],...t?zo(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?Ox(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!u&&p.observe(c),t&&p.observe(t));let g,b=u?Mr(e):null;u&&h();function h(){const y=Mr(e);b&&!Z0(b,y)&&n(),b=y,g=requestAnimationFrame(h)}return n(),()=>{var y;l.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const Nx=lx,Ix=dx,Mx=sx,Lx=fx,$x=ax,Px=ix,Fx=(e,t,n)=>{const r=new Map,o={platform:Y0,...n},i={...o.platform,_c:r};return ox(e,t,{...o,platform:i})};var Bx=B('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),qu=bt();function ju(){const e=lt(qu);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var hu=30,Cl=hu/2,zx={top:180,right:-90,bottom:0,left:90};function Jo(e){const t=ju(),n=$e({size:hu},e),[r,o]=we(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Ux(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*(hu/r.size),d=()=>`rotate(${zx[i()]} ${Cl} ${Cl}) translate(0 2)`;return m(Ze,Q({as:"div",ref(f){var p=gt(t.setArrowRef,r.ref);typeof p=="function"&&p(f)},"aria-hidden":"true",get style(){return yr({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var f=Bx(),p=f.firstChild,g=p.firstChild;return g.nextSibling,le(()=>xe(p,"transform",d())),f}}))}function Ux(e){const[t,n]=L();return oe(()=>{const r=e();r&&n(T0(r).getComputedStyle(r))}),t}function Kx(e){const t=ju(),[n,r]=we(e,["ref","style"]);return m(Ze,Q({as:"div",ref(o){var i=gt(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return yr({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Sl(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 Hx(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Sl(r):e?e.getBoundingClientRect():Sl()}}}function qx(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var jx={top:"bottom",right:"left",bottom:"top",left:"right"};function Gx(e,t){const[n,r]=e.split("-"),o=jx[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 Vx(e){const t=$e({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=L(),[o,i]=L(),[s,a]=L(t.placement),u=()=>Hx(t.anchorRef?.(),t.getAnchorRect),{direction:c}=xr();async function l(){const f=u(),p=n(),g=o();if(!f||!p)return;const b=(g?.clientHeight||0)/2,h=typeof t.gutter=="number"?t.gutter+b:t.gutter??b;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const y=[Nx(({placement:E})=>{const T=!!E.split("-")[1];return{mainAxis:h,crossAxis:T?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const E=typeof t.flip=="string"?t.flip.split(" "):void 0;if(E!==void 0&&!E.every(qx))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(Mx({padding:t.overflowPadding,fallbackPlacements:E}))}(t.slide||t.overlap)&&y.push(Ix({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(Lx({padding:t.overflowPadding,apply({availableWidth:E,availableHeight:T,rects:_}){const R=Math.round(_.reference.width);E=Math.floor(E),T=Math.floor(T),p.style.setProperty("--kb-popper-anchor-width",`${R}px`),p.style.setProperty("--kb-popper-content-available-width",`${E}px`),p.style.setProperty("--kb-popper-content-available-height",`${T}px`),t.sameWidth&&(p.style.width=`${R}px`),t.fitViewport&&(p.style.maxWidth=`${E}px`,p.style.maxHeight=`${T}px`)}})),t.hideWhenDetached&&y.push($x({padding:t.detachedPadding})),g&&y.push(Px({element:g,padding:t.arrowPadding}));const v=await Fx(f,p,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...Y0,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",Gx(v.placement,c()));const x=Math.round(v.x),k=Math.round(v.y);let C;if(t.hideWhenDetached&&(C=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${k}px, 0)`,visibility:C}),g&&v.middlewareData.arrow){const{x:E,y:T}=v.middlewareData.arrow,_=v.placement.split("-")[0];Object.assign(g.style,{left:E!=null?`${E}px`:"",top:T!=null?`${T}px`:"",[_]:"100%"})}}oe(()=>{const f=u(),p=n();if(!f||!p)return;const g=Rx(f,p,l,{elementResize:typeof ResizeObserver=="function"});ae(g)}),oe(()=>{const f=n(),p=t.contentRef?.();!f||!p||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(p).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return m(qu.Provider,{value:d,get children(){return t.children}})}var xs=Object.assign(Vx,{Arrow:Jo,Context:qu,usePopperContext:ju,Positioner:Kx});function X0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Zr(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Zr(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Zr(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Zr(u)||dv(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=X0({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 Wx(e,t=[]){return re(()=>{const n=X0({dataSource:X(e.dataSource),getKey:X(e.getKey),getTextValue:X(e.getTextValue),getDisabled:X(e.getDisabled),getSectionChildren:X(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function ei(e){const[t,n]=L(e.defaultValue?.()),r=re(()=>e.value?.()!==void 0),o=re(()=>r()?e.value?.():t());return[o,s=>{At(()=>{const a=iv(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Q0(e){const[t,n]=ei(e);return[()=>t()??!1,n]}function Yx(e){const[t,n]=ei(e);return[()=>t()??[],n]}var Hn=class J0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof J0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function Zx(e){const[t,n]=ei(e);return[()=>t()??new Hn,n]}function eg(e){return hv()?e.altKey:e.ctrlKey}function Xr(e){return gs()?e.metaKey:e.ctrlKey}function Al(e){return new Hn(e)}function Xx(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Qx(e){const t=$e({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=L(!1),[o,i]=L(),s=re(()=>{const b=X(t.selectedKeys);return b!=null?Al(b):b}),a=re(()=>{const b=X(t.defaultSelectedKeys);return b!=null?Al(b):new Hn}),[u,c]=Zx({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=L(X(t.selectionBehavior)),f=()=>X(t.selectionMode),p=()=>X(t.disallowEmptySelection)??!1,g=b=>{(X(t.allowDuplicateSelectionEvents)||!Xx(b,u()))&&c(b)};return oe(()=>{const b=u();X(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),oe(()=>{d(X(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:g}}function Jx(e){const[t,n]=L(""),[r,o]=L(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(X(e.isDisabled))return;const a=X(e.keyboardDelegate),u=X(e.selectionManager);if(!a.getKeyForSearch)return;const c=ew(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(f=>f+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&tw(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 ew(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function tw(e){return e.split("").every(t=>t===e[0])}function nw(e,t,n){const o=Q({selectOnFocus:()=>X(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=xr();let a={top:0,left:0};uv(()=>X(o.isVirtualized)?void 0:i(),"scroll",()=>{const h=i();h&&(a={top:h.scrollTop,left:h.scrollLeft})});const{typeSelectHandlers:u}=Jx({isDisabled:()=>X(o.disallowTypeAhead),keyboardDelegate:()=>X(o.keyboardDelegate),selectionManager:()=>X(o.selectionManager)}),c=()=>X(o.orientation)??"vertical",l=h=>{He(h,u.onKeyDown),h.altKey&&h.key==="Tab"&&h.preventDefault();const y=t();if(!y?.contains(h.target))return;const v=X(o.selectionManager),x=X(o.selectOnFocus),k=_=>{_!=null&&(v.setFocusedKey(_),h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&!eg(h)&&v.replaceSelection(_))},C=X(o.keyboardDelegate),E=X(o.shouldFocusWrap),T=v.focusedKey();switch(h.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){h.preventDefault();let _;T!=null?_=C.getKeyBelow(T):_=C.getFirstKey?.(),_==null&&E&&(_=C.getFirstKey?.(T)),k(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){h.preventDefault();let _;T!=null?_=C.getKeyAbove(T):_=C.getLastKey?.(),_==null&&E&&(_=C.getLastKey?.(T)),k(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){h.preventDefault();const _=s()==="rtl";let R;T!=null?R=C.getKeyLeftOf(T):R=_?C.getFirstKey?.():C.getLastKey?.(),k(R)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){h.preventDefault();const _=s()==="rtl";let R;T!=null?R=C.getKeyRightOf(T):R=_?C.getLastKey?.():C.getFirstKey?.(),k(R)}break}case"Home":if(C.getFirstKey){h.preventDefault();const _=C.getFirstKey(T,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"End":if(C.getLastKey){h.preventDefault();const _=C.getLastKey(T,Xr(h));_!=null&&(v.setFocusedKey(_),Xr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"PageDown":if(C.getKeyPageBelow&&T!=null){h.preventDefault();const _=C.getKeyPageBelow(T);k(_)}break;case"PageUp":if(C.getKeyPageAbove&&T!=null){h.preventDefault();const _=C.getKeyPageAbove(T);k(_)}break;case"a":Xr(h)&&v.selectionMode()==="multiple"&&X(o.disallowSelectAll)!==!0&&(h.preventDefault(),v.selectAll());break;case"Escape":h.defaultPrevented||(h.preventDefault(),X(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!X(o.allowsTabNavigation)){if(h.shiftKey)y.focus();else{const _=Cv(y,{tabbable:!0});let R,$;do $=_.lastChild(),$&&(R=$);while($);R&&!R.contains(document.activeElement)&&Rt(R)}break}}},d=h=>{const y=X(o.selectionManager),v=X(o.keyboardDelegate),x=X(o.selectOnFocus);if(y.isFocused()){h.currentTarget.contains(h.target)||y.setFocused(!1);return}if(h.currentTarget.contains(h.target)){if(y.setFocused(!0),y.focusedKey()==null){const k=E=>{E!=null&&(y.setFocusedKey(E),x&&y.replaceSelection(E))},C=h.relatedTarget;C&&h.currentTarget.compareDocumentPosition(C)&Node.DOCUMENT_POSITION_FOLLOWING?k(y.lastSelectedKey()??v.getLastKey?.()):k(y.firstSelectedKey()??v.getFirstKey?.())}else if(!X(o.isVirtualized)){const k=i();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const C=k.querySelector(`[data-key="${y.focusedKey()}"]`);C&&(Rt(C),lu(k,C))}}}},f=h=>{const y=X(o.selectionManager);h.currentTarget.contains(h.relatedTarget)||y.setFocused(!1)},p=h=>{i()===h.target&&h.preventDefault()},g=()=>{const h=X(o.autoFocus);if(!h)return;const y=X(o.selectionManager),v=X(o.keyboardDelegate);let x;h==="first"&&(x=v.getFirstKey?.()),h==="last"&&(x=v.getLastKey?.());const k=y.selectedKeys();k.size&&(x=k.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const C=t();C&&x==null&&!X(o.shouldUseVirtualFocus)&&Rt(C)};return Vt(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),oe(Tt([i,()=>X(o.isVirtualized),()=>X(o.selectionManager).focusedKey()],h=>{const[y,v,x]=h;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const k=y.querySelector(`[data-key="${x}"]`);k&&lu(y,k)}})),{tabIndex:re(()=>{if(!X(o.shouldUseVirtualFocus))return X(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:d,onFocusOut:f}}function tg(e,t){const n=()=>X(e.selectionManager),r=()=>X(e.key),o=()=>X(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Xr(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>X(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&&!X(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&X(e.shouldSelectOnPressUp)&&X(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{u()&&(X(e.shouldSelectOnPressUp)&&!X(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},p=v=>{!u()||!["Enter"," "].includes(v.key)||(eg(v)?n().toggleSelection(r()):i(v))},g=v=>{a()&&v.preventDefault()},b=v=>{const x=t();o()||a()||!x||v.target===x&&n().setFocusedKey(r())},h=re(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=re(()=>X(e.virtualized)?void 0:r());return oe(Tt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,k,C,E])=>{v&&x===C&&E&&!k&&document.activeElement!==v&&(e.focus?e.focus():Rt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:h,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:f,onKeyDown:p,onMouseDown:g,onFocus:b}}var rw=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 Hn(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 Hn(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 Hn([t],t,t):new Hn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Hn;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 Hn)}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}},Tl=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 ow(e){const t=Qx(e),r=Wx({dataSource:()=>X(e.dataSource),getKey:()=>X(e.getKey),getTextValue:()=>X(e.getTextValue),getDisabled:()=>X(e.getDisabled),getSectionChildren:()=>X(e.getSectionChildren),factory:i=>e.filter?new Tl(e.filter(i)):new Tl(i)},[()=>e.filter]),o=new rw(r,t);return Ja(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var iw=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 sw(e,t,n){const r=Gv({usage:"search",sensitivity:"base"}),o=re(()=>{const i=X(e.keyboardDelegate);return i||new iw(e.collection,t,r)});return nw({selectionManager:()=>X(e.selectionManager),keyboardDelegate:o,autoFocus:()=>X(e.autoFocus),deferAutoFocus:()=>X(e.deferAutoFocus),shouldFocusWrap:()=>X(e.shouldFocusWrap),disallowEmptySelection:()=>X(e.disallowEmptySelection),selectOnFocus:()=>X(e.selectOnFocus),disallowTypeAhead:()=>X(e.disallowTypeAhead),shouldUseVirtualFocus:()=>X(e.shouldUseVirtualFocus),allowsTabNavigation:()=>X(e.allowsTabNavigation),isVirtualized:()=>X(e.isVirtualized),scrollToKey:i=>X(e.scrollToKey)?.(i),orientation:()=>X(e.orientation)},t)}var ng=bt();function rg(){return lt(ng)}function aw(){const e=rg();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function og(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function uw(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&&og(o,n))return r+1}return 0}function cw(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:og(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function ig(e,t){const n=cw(e);e!==n&&t(n)}function lw(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return nn(r).body}function dw(e,t){oe(()=>{const n=setTimeout(()=>{ig(e(),t)});ae(()=>clearTimeout(n))})}function fw(e,t){if(typeof IntersectionObserver!="function"){dw(e,t);return}let n=[];oe(()=>{const r=()=>{const s=!!n.length;n=e(),s&&ig(e(),t)},o=lw(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ae(()=>i.disconnect())})}function gw(e={}){const[t,n]=Yx({value:()=>X(e.items),onChange:i=>e.onItemsChange?.(i)});fw(t,n);const r=i=>(n(s=>{const a=uw(s,i);return lv(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>m(ng.Provider,{value:{registerItem:r},get children(){return i.children}})}}function pw(e){const t=aw(),n=$e({shouldRegisterItem:!0},e);oe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ae(r)})}var ji="data-kb-top-layer",sg,mu=!1,Nn=[];function Uo(e){return Nn.findIndex(t=>t.node===e)}function hw(e){return Nn[Uo(e)]}function mw(e){return Nn.length>0&&Nn[Nn.length-1].node===e}function ag(){return Nn.filter(e=>e.isPointerBlocking)}function bw(){return[...ag()].slice(-1)[0]}function Gu(){return ag().length>0}function ug(e){const t=Uo(bw()?.node);return Uo(e)<t}function yw(e){Nn.push(e)}function vw(e){const t=Uo(e);t<0||Nn.splice(t,1)}function xw(){for(const{node:e}of Nn)e.style.pointerEvents=ug(e)?"none":"auto"}function ww(e){if(Gu()&&!mu){const t=nn(e);sg=document.body.style.pointerEvents,t.body.style.pointerEvents="none",mu=!0}}function _w(e){if(Gu())return;const t=nn(e);t.body.style.pointerEvents=sg,t.body.style.length===0&&t.body.removeAttribute("style"),mu=!1}var Xt={layers:Nn,isTopMostLayer:mw,hasPointerBlockingLayer:Gu,isBelowPointerBlockingLayer:ug,addLayer:yw,removeLayer:vw,indexOf:Uo,find:hw,assignPointerEventToLayers:xw,disableBodyPointerEvents:ww,restoreBodyPointerEvents:_w},Zs="focusScope.autoFocusOnMount",Xs="focusScope.autoFocusOnUnmount",Dl={bubbles:!1,cancelable:!0},Ol={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=cu(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=cu(this.stack,e),this.active()?.resume()}};function cg(e,t){const[n,r]=L(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=g=>e.onMountAutoFocus?.(g),a=g=>e.onUnmountAutoFocus?.(g),u=()=>nn(t()),c=()=>{const g=u().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Fu),g},l=()=>{const g=t();return g?R0(g,!0).filter(b=>!b.hasAttribute("data-focus-trap")):[]},d=()=>{const g=l();return g.length>0?g[0]:null},f=()=>{const g=l();return g.length>0?g[g.length-1]:null},p=()=>{const g=t();if(!g)return!1;const b=So(g);return!b||Bt(g,b)?!1:N0(b)};oe(()=>{const g=t();if(!g)return;Ol.add(o);const b=So(g);if(!Bt(g,b)){const y=new CustomEvent(Zs,Dl);g.addEventListener(Zs,s),g.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{Rt(d()),So(g)===b&&Rt(g)},0)}ae(()=>{g.removeEventListener(Zs,s),setTimeout(()=>{const y=new CustomEvent(Xs,Dl);p()&&y.preventDefault(),g.addEventListener(Xs,a),g.dispatchEvent(y),y.defaultPrevented||Rt(b??u().body),g.removeEventListener(Xs,a),Ol.remove(o)},0)})}),oe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${ji}]`)||(Bt(g,v)?i=v:Rt(i))},h=y=>{const x=y.relatedTarget??So(g);x?.closest(`[${ji}]`)||Bt(g,x)||Rt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",h),ae(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",h)})}),oe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const b=c();g.insertAdjacentElement("afterbegin",b);const h=c();g.insertAdjacentElement("beforeend",h);function y(x){const k=d(),C=f();x.relatedTarget===k?Rt(C):Rt(k)}b.addEventListener("focusin",y),h.addEventListener("focusin",y);const v=new MutationObserver(x=>{for(const k of x)k.previousSibling===h&&(h.remove(),g.insertAdjacentElement("beforeend",h)),k.nextSibling===b&&(b.remove(),g.insertAdjacentElement("afterbegin",b))});v.observe(g,{childList:!0,subtree:!1}),ae(()=>{b.removeEventListener("focusin",y),h.removeEventListener("focusin",y),b.remove(),h.remove(),v.disconnect()})})}var Ew="data-live-announcer";function lg(e){oe(()=>{X(e.isDisabled)||ae(kw(X(e.targets),X(e.root)))})}var xo=new WeakMap,an=[];function kw(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const f of u.querySelectorAll(`[${Ew}], [${ji}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const p of n)if(f.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let f=l.nextNode();for(;f!=null;)i(f),f=l.nextNode()}},i=u=>{const c=xo.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),xo.set(u,c+1))};an.length&&an[an.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return an.push(a),()=>{s.disconnect();for(const u of r){const c=xo.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),xo.delete(u)):xo.set(u,c-1)}a===an[an.length-1]?(an.pop(),an.length&&an[an.length-1].observe()):an.splice(an.indexOf(a),1)}}function Cw(e){const t=n=>{n.key===fs.Escape&&e.onEscapeKeyDown?.(n)};oe(()=>{if(X(e.isDisabled))return;const n=e.ownerDocument?.()??nn();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}var Rl="interactOutside.pointerDownOutside",Nl="interactOutside.focusOutside";function Sw(e,t){let n,r=Av;const o=()=>nn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const f=d.target;return!(f instanceof Element)||f.closest(`[${ji}]`)||!Bt(o(),f)||Bt(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const p=t(),g=d.target;if(!p||!g||!u(d))return;const b=Nt([i,a]);g.addEventListener(Rl,b,{once:!0});const h=new CustomEvent(Rl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||mv(d)&&d.button===0}});g.dispatchEvent(h)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},l=d=>{const f=t(),p=d.target;if(!f||!p||!u(d))return;const g=Nt([s,a]);p.addEventListener(Nl,g,{once:!0});const b=new CustomEvent(Nl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});p.dispatchEvent(b)};oe(()=>{X(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ae(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var dg=bt();function Aw(){return lt(dg)}function Vu(e){let t;const n=Aw(),[r,o]=we(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n?.registerNestedLayer(d);return()=>{i.delete(d),f?.()}};Sw({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>Bt(f(),d))||[...i].some(f=>Bt(f,d)):!1,onPointerDownOutside:d=>{!t||Xt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Xt.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),Cw({ownerDocument:()=>nn(t),onEscapeKeyDown:d=>{!t||!Xt.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Vt(()=>{if(!t)return;Xt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Xt.assignPointerEventToLayers(),Xt.disableBodyPointerEvents(t),ae(()=>{t&&(Xt.removeLayer(t),d?.(),Xt.assignPointerEventToLayers(),Xt.restoreBodyPointerEvents(t))})}),oe(Tt([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const p=Xt.find(d);p&&p.isPointerBlocking!==f&&(p.isPointerBlocking=f,Xt.assignPointerEventToLayers()),f&&Xt.disableBodyPointerEvents(d),ae(()=>{Xt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return m(dg.Provider,{value:l,get children(){return m(Ze,Q({as:"div",ref(d){var f=gt(p=>t=p,r.ref);typeof f=="function"&&f(d)}},o))}})}function ti(e={}){const[t,n]=Q0({value:()=>X(e.open),defaultValue:()=>!!X(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 fg(e={}){const[t,n]=Q0({value:()=>X(e.isSelected),defaultValue:()=>!!X(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(i)},toggle:()=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(!t())}}}function Lt(e){return t=>(e(t),()=>e(void 0))}var Pt=e=>typeof e=="function"?e():e,bu=(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},bi=new Map,Tw=e=>{oe(()=>{const t=Pt(e.style)??{},n=Pt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=bi.get(e.key);o?o.activeCount++:bi.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ae(()=>{const i=bi.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}bi.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?.()}})})},Il=Tw,Dw=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Ow=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Rw=(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]=Dw(o,t),d=l-u-r*c;(c!==0||d!==0)&&Ow(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Ml,Ll]=L([]),Nw=e=>Ml().indexOf(e)===Ml().length-1,Iw=e=>{const t=Q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=qt();let r=[0,0],o=null,i=null;oe(()=>{Pt(t.enabled)&&(Ll(c=>[...c,n]),ae(()=>{Ll(c=>c.filter(l=>l!==n))}))}),oe(()=>{if(!Pt(t.enabled)||!Pt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Pt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];l>0&&(Pt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,f.push({key:"--scrollbar-width",value:`${l}px`}));const p=window.scrollY,g=window.scrollX;Il({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Pt(t.restoreScrollPosition)&&l>0&&window.scrollTo(g,p)}})}else Il({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),oe(()=>{!Nw(n)||!Pt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=$l(c),o=null,i=null},a=c=>{const l=c.target,d=Pt(t.element),f=Mw(c),p=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=p==="x"?f[0]:f[1],b=Pl(l,p,g,d);let h;d&&bu(d,l)?h=!b:h=!0,h&&c.cancelable&&c.preventDefault()},u=c=>{const l=Pt(t.element),d=c.target;let f;if(c.touches.length===2)f=!Pt(t.allowPinchZoom);else{if(o==null||i===null){const p=$l(c).map((b,h)=>r[h]-b),g=Math.abs(p[0])>Math.abs(p[1])?"x":"y";o=g,i=g==="x"?p[0]:p[1]}if(d.type==="range")f=!1;else{const p=Pl(d,o,i,l);l&&bu(l,d)?f=!p:f=!0}}f&&c.cancelable&&c.preventDefault()}},Mw=e=>[e.deltaX,e.deltaY],$l=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Pl=(e,t,n,r)=>{const o=r!==null&&bu(r,e),[i,s]=Rw(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Lw=Iw,gg=Lw,$w=e=>{const t=re(()=>{const s=Pt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=L(Pt(e.show)?"present":"hidden");let i="none";return oe(s=>{const a=Pt(e.show);return At(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),oe(()=>{const s=Pt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ae(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},Pw=$w,Lr=Pw,Fw=bt();function ws(){return lt(Fw)}var Bw=bt();function pg(){return lt(Bw)}var hg=bt();function mg(){return lt(hg)}function Xn(){const e=mg();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var bg=bt();function Wu(){const e=lt(bg);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var yg=bt();function $n(){const e=lt(yg);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Yu(e){let t;const n=$n(),r=Xn(),o=$e({id:n.generateId(`item-${qt()}`)},e),[i,s]=we(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=L(),[c,l]=L(),[d,f]=L(),p=()=>r.listState().selectionManager(),g=()=>s.id,b=()=>p().focusedKey()===g(),h=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};pw({getItem:()=>({ref:()=>t,type:"item",key:g(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const y=tg({key:g,selectionManager:p,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),v=R=>{He(R,i.onPointerMove),R.pointerType==="mouse"&&(i.disabled?r.onItemLeave(R):(r.onItemEnter(R),R.defaultPrevented||(Rt(R.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=R=>{He(R,i.onPointerLeave),R.pointerType==="mouse"&&r.onItemLeave(R)},k=R=>{He(R,i.onPointerUp),!i.disabled&&R.button===0&&h()},C=R=>{if(He(R,i.onKeyDown),!R.repeat&&!i.disabled)switch(R.key){case"Enter":case" ":h();break}},E=re(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),T=re(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":b()?"":void 0})),_={isChecked:()=>i.checked,dataset:T,setLabelRef:f,generateId:Yn(()=>s.id),registerLabel:Lt(u),registerDescription:Lt(l)};return m(bg.Provider,{value:_,get children(){return m(Ze,Q({as:"div",ref(R){var $=gt(O=>t=O,i.ref);typeof $=="function"&&$(R)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return E()},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 Nt([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return Nt([k,y.onPointerUp])},get onClick(){return Nt([i.onClick,y.onClick])},get onKeyDown(){return Nt([C,y.onKeyDown])},get onMouseDown(){return Nt([i.onMouseDown,y.onMouseDown])},get onFocus(){return Nt([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},T,s))}})}function vg(e){const t=$e({closeOnSelect:!1},e),[n,r]=we(t,["checked","defaultChecked","onChange","onSelect"]),o=fg({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return m(Yu,Q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Ko={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Ko.next(e==="ltr"?"rtl":"ltr",t)},Fl={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function xg(e){const t=$n(),n=Xn(),r=ws(),{direction:o}=xr(),i=$e({id:t.generateId("trigger")},e),[s,a]=we(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=ps(()=>n.triggerRef(),()=>"button"),l=re(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);oe(Tt(()=>r?.value(),y=>{l()&&y===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=y=>{He(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},p=y=>{He(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},g=y=>{if(He(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Fl.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Dv(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Fl.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Ko.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Ko.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{He(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},h=y=>{He(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return oe(()=>ae(n.registerTriggerId(s.id))),m(go,Q({ref(y){var v=gt(n.setTriggerRef,s.ref);typeof v=="function"&&v(y)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:f,onMouseOver:b,onClick:p,onKeyDown:g,onFocus:h,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function wg(e){let t;const n=$n(),r=Xn(),o=ws(),i=pg(),{direction:s}=xr(),a=$e({id:n.generateId(`content-${qt()}`)},e),[u,c]=we(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=sw({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);cg({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=x=>{if(Bt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Ko.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Ko.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},g=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},b=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},h=x=>{He(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(He(x,u.onPointerMove),x.pointerType!=="mouse")return;const k=x.target,C=l!==x.clientX;Bt(x.currentTarget,k)&&C&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};oe(()=>ae(r.registerContentId(u.id))),ae(()=>r.setContentRef(void 0));const v={ref:gt(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Nt([u.onKeyDown,f.onKeyDown,p]),onMouseDown:Nt([u.onMouseDown,f.onMouseDown]),onFocusIn:Nt([u.onFocusIn,f.onFocusIn]),onFocusOut:Nt([u.onFocusOut,f.onFocusOut]),onPointerEnter:h,onPointerMove:y,get"data-orientation"(){return n.orientation()}};return m(W,{get when(){return r.contentPresent()},get children(){return m(W,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return m(Ze,Q({as:"div"},()=>r.dataset(),v,c))},get children(){return m(xs.Positioner,{get children(){return m(Vu,Q({get disableOutsidePointerEvents(){return de(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return yr({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:g,onFocusOutside:b,get onDismiss(){return r.close}},()=>r.dataset(),v,c))}})}})}})}function zw(e){let t;const n=$n(),r=Xn(),[o,i]=we(e,["ref"]);return gg({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),m(wg,Q({ref(s){var a=gt(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var _g=bt();function Uw(){const e=lt(_g);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Zu(e){const t=$n(),n=$e({id:t.generateId(`group-${qt()}`)},e),[r,o]=L(),i={generateId:Yn(()=>n.id),registerLabelId:Lt(o)};return m(_g.Provider,{value:i,get children(){return m(Ze,Q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function Eg(e){const t=Uw(),n=$e({id:t.generateId("label")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerLabelId(r.id))),m(Ze,Q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function kg(e){const t=Xn(),n=$e({children:"▼"},e);return m(Ze,Q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Cg(e){return m(Yu,Q({role:"menuitem",closeOnSelect:!0},e))}function Sg(e){const t=Wu(),n=$e({id:t.generateId("description")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerDescription(r.id))),m(Ze,Q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function Ag(e){const t=Wu(),n=$e({id:t.generateId("indicator")},e),[r,o]=we(n,["forceMount"]);return m(W,{get when(){return r.forceMount||t.isChecked()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}function Tg(e){const t=Wu(),n=$e({id:t.generateId("label")},e),[r,o]=we(n,["ref","id"]);return oe(()=>ae(t.registerLabel(r.id))),m(Ze,Q({as:"div",ref(i){var s=gt(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Dg(e){const t=Xn();return m(W,{get when(){return t.contentPresent()},get children(){return m(Tu,e)}})}var Og=bt();function Kw(){const e=lt(Og);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Rg(e){const n=$n().generateId(`radiogroup-${qt()}`),r=$e({id:n},e),[o,i]=we(r,["value","defaultValue","onChange","disabled"]),[s,a]=ei({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return m(Og.Provider,{value:u,get children(){return m(Zu,i)}})}function Ng(e){const t=Kw(),n=$e({closeOnSelect:!1},e),[r,o]=we(n,["value","onSelect"]);return m(Yu,Q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function Hw(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 qw(e,t){return t?I0([e.clientX,e.clientY],t):!1}function Ig(e){const t=$n(),n=rg(),r=mg(),o=ws(),i=pg(),s=$e({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=we(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[f,p]=L(),[g,b]=L(),[h,y]=L(),[v,x]=L(),[k,C]=L(!0),[E,T]=L(u.placement),[_,R]=L([]),[$,O]=L([]),{DomCollectionProvider:N}=gw({items:$,onItemsChange:O}),M=ti({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>a.onOpenChange?.(J)}),{present:A}=Lr({show:()=>t.forceMount()||M.isOpen(),element:()=>v()??null}),I=ow({selectionMode:"none",dataSource:$}),F=J=>{C(J),M.open()},G=(J=!1)=>{M.close(),J&&r&&r.close(!0)},U=J=>{C(J),M.toggle()},z=()=>{const J=v();J&&(Rt(J),I.selectionManager().setFocused(!0),I.selectionManager().setFocusedKey(void 0))},P=()=>{i!=null?setTimeout(()=>z()):z()},Z=J=>{R(Ce=>[...Ce,J]);const pe=r?.registerNestedMenu(J);return()=>{R(Ce=>cu(Ce,J)),pe?.()}},V=J=>d===l?.side&&qw(J,l?.area),te=J=>{V(J)&&J.preventDefault()},Y=J=>{V(J)||P()},H=J=>{V(J)&&J.preventDefault()};lg({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[v(),..._()].filter(Boolean)}),oe(()=>{const J=v();if(!J||!r)return;const pe=r.registerNestedMenu(J);ae(()=>{pe()})}),oe(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),..._()])}),oe(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(h()?.focus(),o.autoFocusMenu()&&F(!0)):G())}),oe(()=>{r!==void 0||o===void 0||M.isOpen()&&o.setValue(t.value())}),ae(()=>{r===void 0&&o?.unregisterMenu(t.value())});const me={dataset:re(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresent:A,nestedMenus:_,currentPlacement:E,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>I,parentMenuContext:()=>r,triggerRef:h,contentRef:v,triggerId:f,contentId:g,setTriggerRef:y,setContentRef:x,open:F,close:G,toggle:U,focusContent:P,onItemEnter:te,onItemLeave:Y,onTriggerLeave:H,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>c=J,setPointerGraceIntent:J=>l=J,registerNestedMenu:Z,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:Lt(p),registerContentId:Lt(b)};return m(N,{get children(){return m(hg.Provider,{value:me,get children(){return m(W,{when:i===void 0,get fallback(){return u.children},get children(){return m(xs,Q({anchorRef:h,contentRef:v,onCurrentPlacementChange:T},u))}})}})}})}function Mg(e){const{direction:t}=xr();return m(Ig,Q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var jw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Lg(e){const t=Xn(),n=$n(),[r,o]=we(e,["onFocusOutside","onKeyDown"]),{direction:i}=xr();return m(wg,Q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Bt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{He(l,r.onKeyDown);const d=Bt(l.currentTarget,l.target),f=jw.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;d&&f&&p&&(t.close(),Rt(t.triggerRef()))}},o))}var Bl=["Enter"," "],Gw={open:(e,t)=>e==="ltr"?[...Bl,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Bl,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function $g(e){let t;const n=$n(),r=Xn(),o=$e({id:n.generateId(`sub-trigger-${qt()}`)},e),[i,s]=we(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=xr(),l=()=>i.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},f=()=>r.listState().collection(),p=()=>d().focusedKey()===l(),g=tg({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=x=>{He(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},h=x=>{if(He(x,i.onPointerMove),x.pointerType!=="mouse")return;const k=r.parentMenuContext();if(k?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){k?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),k?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),Rt(x.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(He(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const k=r.parentMenuContext(),C=r.contentRef();if(C){k?.setPointerGraceIntent({area:Hw(r.currentPlacement(),x,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(k?.pointerGraceTimeoutId());const E=window.setTimeout(()=>{k?.setPointerGraceIntent(null)},300);k?.setPointerGraceTimeoutId(E)}else{if(k?.onTriggerLeave(x),x.defaultPrevented)return;k?.setPointerGraceIntent(null)}k?.onItemLeave(x)},v=x=>{He(x,i.onKeyDown),!x.repeat&&(i.disabled||Gw.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return oe(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ae(x)}),oe(Tt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ae(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),oe(()=>ae(r.registerTriggerId(i.id))),ae(()=>{u()}),m(Ze,Q({as:"div",ref(x){var k=gt(C=>{r.setTriggerRef(C),t=C},i.ref);typeof k=="function"&&k(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return de(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return p()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Nt([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return Nt([i.onPointerUp,g.onPointerUp])},get onClick(){return Nt([b,g.onClick])},get onKeyDown(){return Nt([v,g.onKeyDown])},get onMouseDown(){return Nt([i.onMouseDown,g.onMouseDown])},get onFocus(){return Nt([i.onFocus,g.onFocus])},onPointerMove:h,onPointerLeave:y},()=>r.dataset(),s))}function Vw(e){const t=ws(),n=`menu-${qt()}`,r=$e({id:n,modal:!0},e),[o,i]=we(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=ti({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:Yn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return m(yg.Provider,{value:a,get children(){return m(Ig,Q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var Ww={};vr(Ww,{Root:()=>_s,Separator:()=>Pg});function _s(e){let t;const n=$e({orientation:"horizontal"},e),[r,o]=we(n,["ref","orientation"]),i=ps(()=>t,()=>"hr");return m(Ze,Q({as:"hr",ref(s){var a=gt(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 Pg=_s,Yw={};vr(Yw,{Arrow:()=>Jo,CheckboxItem:()=>vg,Content:()=>Fg,DropdownMenu:()=>Mn,Group:()=>Zu,GroupLabel:()=>Eg,Icon:()=>kg,Item:()=>Cg,ItemDescription:()=>Sg,ItemIndicator:()=>Ag,ItemLabel:()=>Tg,Portal:()=>Dg,RadioGroup:()=>Rg,RadioItem:()=>Ng,Root:()=>Bg,Separator:()=>_s,Sub:()=>Mg,SubContent:()=>Lg,SubTrigger:()=>$g,Trigger:()=>xg});function Fg(e){const t=$n(),n=Xn(),[r,o]=we(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return m(zw,Q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||Rt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function Bg(e){const t=`dropdownmenu-${qt()}`,n=$e({id:t},e);return m(Vw,n)}var Mn=Object.assign(Bg,{Arrow:Jo,CheckboxItem:vg,Content:Fg,Group:Zu,GroupLabel:Eg,Icon:kg,Item:Cg,ItemDescription:Sg,ItemIndicator:Ag,ItemLabel:Tg,Portal:Dg,RadioGroup:Rg,RadioItem:Ng,Separator:_s,Sub:Mg,SubContent:Lg,SubTrigger:$g,Trigger:xg});const zg=Mn.Trigger;Mn.Group;Mn.Sub;Mn.RadioGroup;const Ug=e=>{const t=Q({gutter:4,flip:!1},e);return m(Mn,t)},Kg=e=>{const[t,n]=we(e,["class"]);return m(Mn.Portal,{get children(){return m(Mn.Content,Q({get class(){return Et("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))}})},To=e=>{const[t,n]=we(e,["class","inset"]);return m(Mn.Item,Q({get class(){return Et("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))},Zw=e=>{const[t,n]=we(e,["class"]);return m(Mn.Separator,Q({get class(){return Et("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var Xw={};vr(Xw,{CloseButton:()=>qg,Content:()=>jg,Description:()=>Gg,Dialog:()=>Gn,Overlay:()=>Vg,Portal:()=>Wg,Root:()=>Yg,Title:()=>Zg,Trigger:()=>Xg,useDialogContext:()=>wr});var Hg=bt();function wr(){const e=lt(Hg);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function qg(e){const t=wr(),[n,r]=we(e,["aria-label","onClick"]);return m(go,Q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{He(i,n.onClick),t.close()}},r))}function jg(e){let t;const n=wr(),r=$e({id:n.generateId("content")},e),[o,i]=we(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=f=>{o.onPointerDownOutside?.(f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{o.onFocusOutside?.(f),n.modal()&&f.preventDefault()},l=f=>{o.onInteractOutside?.(f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Bt(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{o.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),Rt(n.triggerRef())):(f.defaultPrevented||(s||Rt(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return lg({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),gg({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),cg({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),oe(()=>ae(n.registerContentId(i.id))),m(W,{get when(){return n.contentPresent()},get children(){return m(Vu,Q({ref(f){var p=gt(g=>{n.setContentRef(g),t=g},o.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return de(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function Gg(e){const t=wr(),n=$e({id:t.generateId("description")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerDescriptionId(r.id))),m(Ze,Q({as:"p",get id(){return r.id}},o))}function Vg(e){const t=wr(),[n,r]=we(e,["ref","style","onPointerDown"]),o=i=>{He(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return m(W,{get when(){return t.overlayPresent()},get children(){return m(Ze,Q({as:"div",ref(i){var s=gt(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return yr({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function Wg(e){const t=wr();return m(W,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return m(Tu,e)}})}var zl={dismiss:"Dismiss"};function Yg(e){const t=`dialog-${qt()}`,n=$e({id:t,modal:!0,translations:zl},e),[r,o]=L(),[i,s]=L(),[a,u]=L(),[c,l]=L(),[d,f]=L(),[p,g]=L(),b=ti({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),h=()=>n.forceMount||b.isOpen(),{present:y}=Lr({show:h,element:()=>c()??null}),{present:v}=Lr({show:h,element:()=>d()??null}),x={translations:()=>n.translations??zl,isOpen:b.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:p,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:f,overlayPresent:y,contentPresent:v,close:b.close,toggle:b.toggle,setTriggerRef:g,generateId:Yn(()=>n.id),registerContentId:Lt(o),registerTitleId:Lt(s),registerDescriptionId:Lt(u)};return m(Hg.Provider,{value:x,get children(){return n.children}})}function Zg(e){const t=wr(),n=$e({id:t.generateId("title")},e),[r,o]=we(n,["id"]);return oe(()=>ae(t.registerTitleId(r.id))),m(Ze,Q({as:"h2",get id(){return r.id}},o))}function Xg(e){const t=wr(),[n,r]=we(e,["ref","onClick"]);return m(go,Q({ref(i){var s=gt(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{He(i,n.onClick),t.toggle()}},r))}var Gn=Object.assign(Yg,{CloseButton:qg,Content:jg,Description:Gg,Overlay:Vg,Portal:Wg,Title:Zg,Trigger:Xg}),Qw=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),Qg=B("<div>");const pn=Gn;Gn.Trigger;const oo=e=>{const[t,n]=we(e,["class","children"]);return m(Gn.Portal,{get children(){return[m(Gn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(Gn.Content,{get class(){return Et("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[de(()=>t.children),m(Gn.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 Qw()}})]}})]}})},io=e=>{const[t,n]=we(e,["class"]);return m(Gn.Title,Q({get class(){return Et("text-lg font-semibold text-foreground",t.class)}},n))},Xu=e=>{const[t,n]=we(e,["class"]);return m(Gn.Description,Q({get class(){return Et(" text-muted-foreground",t.class)}},n))},so=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Qg();return Wn(r,Q({get class(){return Et("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},ao=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Qg();return Wn(r,Q({get class(){return Et("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var Jw=B("<input>");const No=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=Jw();return Wn(r,Q({get class(){return Et("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_=B("<div><div class=sonner-spinner>"),t_=B("<div class=sonner-loading-bar>"),n_=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"clip-rule=evenodd>'),r_=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"clip-rule=evenodd>'),o_=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"clip-rule=evenodd>'),i_=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 20 20"fill=currentColor height=20 width=20><path fill-rule=evenodd d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z"clip-rule=evenodd>'),s_=B('<svg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),a_=B("<div>"),u_=B("<button data-close-button>"),c_=B("<div data-icon>"),l_=B("<div data-description>"),d_=B("<li tabindex=0 data-sonner-toast><div data-content><div data-title>"),f_=B("<button data-button data-cancel>"),g_=B("<button data-button data-action>"),p_=B('<section tabindex=-1 aria-live=polite aria-relevant="additions text"aria-atomic=false data-react-aria-top-layer>'),h_=B("<ol tabindex=-1 data-sonner-toaster style=--width:356px>");function m_(e,{insertAt:t}={}){if(typeof document>"u")return;const n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}m_(`html[dir=ltr],
|
|
7
7
|
[data-sonner-toaster][dir=ltr] {
|
|
8
8
|
--toast-icon-margin-start: -3px;
|
|
9
9
|
--toast-icon-margin-end: 4px;
|
|
@@ -634,40 +634,40 @@ html[dir=rtl],
|
|
|
634
634
|
opacity: 0;
|
|
635
635
|
transform: scale(0.8) translate(-50%, -50%);
|
|
636
636
|
}
|
|
637
|
-
`);var l_=Array(12).fill(0);function d_(e){return(()=>{var t=Vw(),n=t.firstChild;return w(n,m(yt,{each:l_,children:(r,o)=>(()=>{var i=Ww();return le(()=>xe(i,"data-index",o())),i})()})),le(r=>{var o=["sonner-loading-wrapper",e.class??e.className].filter(Boolean).join(" "),i=e.visible;return o!==r.e&&ut(t,r.e=o),i!==r.t&&xe(t,"data-visible",r.t=i),r},{e:void 0,t:void 0}),t})()}function f_(){return Yw()}function g_(){return Zw()}function p_(){return Xw()}function h_(){return Qw()}function m_(e){switch(e){case"success":return m(f_,{});case"info":return m(p_,{});case"warning":return m(g_,{});case"error":return m(h_,{});default:return null}}function b_(){return Jw()}function y_(){const[e,t]=$(typeof document<"u"?document.hidden:!1);return Vt(()=>{const n=()=>{t(document.hidden)};document.addEventListener("visibilitychange",n),ae(()=>{document.removeEventListener("visibilitychange",n)})}),e}var hu=1,v_=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r=typeof e.id=="string"&&e.id.length>0,o=typeof e.id=="number"||r?e.id:hu++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t,dismissible:s}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>{this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})):this.toasts.forEach(t=>{this.dismissedToasts.add(t.id),this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e});error=(e,t)=>this.create({...t,message:e,type:"error"});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(typeof e=="function"?e():e);let o=n!==void 0,i;const s=r.then(async u=>{if(i=["resolve",u],w_(u))o=!1,this.create({id:n,type:"default",message:u});else if(x_(u)&&!u.ok){o=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(u instanceof Error){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(t.success!==void 0){o=!1;const c=typeof t.success=="function"?await t.success(u):t.success,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"success",description:l,...d})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=bi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally?.()}),a=()=>new Promise((u,c)=>{s.then(()=>{i[0]==="reject"?c(i[1]):u(i[1])}).catch(c)});return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})};custom=(e,t)=>{const n=t?.id||hu++;return this.create({jsx:e(n),...t,id:n}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function x_(e){return e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number"}function bi(e){return typeof e=="object"&&e!==null&&"message"in e}function w_(e){return typeof Node<"u"&&e instanceof Node}var jt=new v_;function __(e,t){const n=t?.id||hu++;return jt.addToast({title:e,...t,id:n}),n}var E_=__,k_=()=>jt.toasts,S_=()=>jt.getActiveToasts(),Tn=Object.assign(E_,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:k_,getToasts:S_});function Fl(e){return typeof e=="object"&&e!==null&&"label"in e}var C_=3,A_="24px",T_="16px",Bl=4e3,Zg=14,D_=45,O_=200;function kn(...e){return e.filter(Boolean).join(" ")}function yi(e){return typeof e=="function"?e():e}function R_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function zl(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function N_(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,s=i?"--mobile-offset":"--offset",a=i?T_:A_,u=c=>{for(const l of["top","right","bottom","left"])n[`${s}-${l}`]=typeof c=="number"?`${c}px`:c};if(typeof r=="number"||typeof r=="string"){u(r);return}if(typeof r=="object"&&r!==null){for(const c of["top","right","bottom","left"]){const l=r[c];n[`${s}-${c}`]=l===void 0?a:typeof l=="number"?`${l}px`:l}return}u(a)}),n}function mu(e,t){return e??t}function bu(e,t){return e??t??""}function ji(e,t){return e??t??""}function I_(e){return e!=="system"?e:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function M_(e){const[t,n]=$(!1),[r,o]=$(!1),[i,s]=$(!1),[a,u]=$(!1),[c,l]=$(!1),[d,f]=$(null),[p,g]=$(null),[b,h]=$(0),[y,v]=$(0);let x,k=null,E=0,S=0,O=Bl;const[_,I]=$(null),L=()=>e.index===0,T=()=>e.index+1<=e.visibleToasts,R=()=>e.toast.type,M=()=>e.toast.dismissible!==!1,C=()=>mu(e.classNames,e.classes),N=()=>ji(e.className,e.class),F=()=>bu(e.descriptionClassName,e.descriptionClass),G=()=>ji(e.toast.className,e.toast.class),U=()=>bu(e.toast.descriptionClassName,e.toast.descriptionClass),z=()=>mu(e.toast.classNames,e.toast.classes),P=()=>e.toast.closeButton??e.closeButton,Z=()=>e.toast.duration??e.duration??Bl,V=()=>e.toast.invert??e.invert,te=()=>R()==="loading",W=()=>e.swipeDirections??R_(e.position),H=re(()=>e.position.split("-")[0]),ie=re(()=>e.position.split("-")[1]),me=re(()=>Math.max(0,e.heights.findIndex(ce=>ce.toastId===e.toast.id))),J=re(()=>e.heights.reduce((ce,ze,ne)=>ne>=me()?ce:ce+ze.height,0)),pe=re(()=>me()*(e.gap??Zg)+J()),Se=y_();oe(()=>{O=Z()});function Ne(){o(!0),h(pe()),e.setHeights(ce=>ce.filter(ze=>ze.toastId!==e.toast.id)),window.setTimeout(()=>{e.removeToast(e.toast)},O_)}function Xe(){return e.icons?.loading?(()=>{var ce=e_();return w(ce,()=>e.icons.loading),le(ze=>{var ne=kn(C()?.loader,z()?.loader,"sonner-loader"),ke=R()==="loading";return ne!==ze.e&&ut(ce,ze.e=ne),ke!==ze.t&&xe(ce,"data-visible",ze.t=ke),ze},{e:void 0,t:void 0}),ce})():m(d_,{get class(){return kn(C()?.loader,z()?.loader)},get visible(){return R()==="loading"}})}const gt=()=>e.toast.icon??e.icons?.[R()]??m_(R());return Vt(()=>{if(n(!0),!x)return;const ce=x.getBoundingClientRect().height;v(ce),e.setHeights(ze=>[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:ce,position:e.toast.position},...ze]),ae(()=>{e.setHeights(ze=>ze.filter(ne=>ne.toastId!==e.toast.id))})}),oe(()=>{if(!t()||!x)return;yi(e.toast.title),yi(e.toast.description);const ce=x.style.height;x.style.height="auto";const ze=x.getBoundingClientRect().height;x.style.height=ce,v(ze),e.setHeights(ne=>ne.find(K=>K.toastId===e.toast.id)?ne.map(K=>K.toastId===e.toast.id?{...K,height:ze}:K):[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:ze,position:e.toast.position},...ne])}),oe(At(()=>[e.expanded,e.interacting,e.toast,R(),Se(),Z()],([ce,ze,ne,ke])=>{if(ne.promise&&ke==="loading"||ne.duration===Number.POSITIVE_INFINITY||ke==="loading")return;let K;const _e=()=>{if(S<E){const Qe=new Date().getTime()-E;O-=Qe}S=new Date().getTime()},Oe=()=>{O!==Number.POSITIVE_INFINITY&&(E=new Date().getTime(),K=setTimeout(()=>{ne.onAutoClose?.(ne),Ne()},O))};ce||ze||(e.pauseWhenPageIsHidden??!0)&&Se()?_e():Oe(),ae(()=>{K&&clearTimeout(K)})})),oe(At(()=>e.toast.delete,ce=>{ce&&(Ne(),e.toast.onDismiss?.(e.toast))})),(()=>{var ce=o_(),ze=ce.firstChild,ne=ze.firstChild;ce.$$pointermove=K=>{if(!_()||!M()||(window.getSelection()?.toString().length??0)>0)return;const _e=K.clientY-_().y,Oe=K.clientX-_().x;!d()&&(Math.abs(Oe)>1||Math.abs(_e)>1)&&f(Math.abs(Oe)>Math.abs(_e)?"x":"y");const Re={x:0,y:0},Qe=bt=>1/(1.5+Math.abs(bt)/20);d()==="y"?(W().includes("top")||W().includes("bottom"))&&(W().includes("top")&&_e<0||W().includes("bottom")&&_e>0?Re.y=_e:Re.y=_e*Qe(_e)):d()==="x"&&(W().includes("left")||W().includes("right"))&&(W().includes("left")&&Oe<0||W().includes("right")&&Oe>0?Re.x=Oe:Re.x=Oe*Qe(Oe)),(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&l(!0),x?.style.setProperty("--swipe-amount-x",`${Re.x}px`),x?.style.setProperty("--swipe-amount-y",`${Re.y}px`)},ce.$$pointerup=()=>{if(a()||!M())return;I(null);const K=Number(x?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),_e=Number(x?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Oe=Math.max(1,new Date().getTime()-(k?.getTime()??0)),Re=d()==="x"?K:_e,Qe=Math.abs(Re)/Oe;if(Math.abs(Re)>=D_||Qe>.11){h(pe()),e.toast.onDismiss?.(e.toast),d()==="x"?g(K>0?"right":"left"):g(_e>0?"down":"up"),Ne(),u(!0);return}x?.style.setProperty("--swipe-amount-x","0px"),x?.style.setProperty("--swipe-amount-y","0px"),l(!1),s(!1),f(null)},ce.$$pointerdown=K=>{K.button!==2&&(te()||!M()||K.target.closest("button")||(k=new Date,h(pe()),K.currentTarget.setPointerCapture(K.pointerId),s(!0),I({x:K.clientX,y:K.clientY})))},ce.addEventListener("dragend",()=>{s(!1),f(null),I(null)});var ke=x;return typeof ke=="function"?Gn(ke,ce):x=ce,w(ce,m(Y,{get when(){return de(()=>!!(P()&&!e.toast.jsx))()&&R()!=="loading"},get children(){var K=t_();return K.$$click=()=>{te()||!M()||(Ne(),e.toast.onDismiss?.(e.toast))},K.$$pointerup=_e=>_e.stopPropagation(),K.$$pointerdown=_e=>_e.stopPropagation(),w(K,()=>e.icons?.close??m(b_,{})),le(_e=>{var Oe=e.closeButtonAriaLabel??"Close toast",Re=te(),Qe=kn(C()?.closeButton,z()?.closeButton);return Oe!==_e.e&&xe(K,"aria-label",_e.e=Oe),Re!==_e.t&&xe(K,"data-disabled",_e.t=Re),Qe!==_e.a&&ut(K,_e.a=Qe),_e},{e:void 0,t:void 0,a:void 0}),K}}),ze),w(ce,m(Y,{get when(){return de(()=>!!((R()||e.toast.icon||e.toast.promise)&&e.toast.icon!==null))()&&(e.icons?.[R()]!==null||e.toast.icon)},get children(){var K=n_();return w(K,(()=>{var _e=de(()=>!!(e.toast.promise||e.toast.type==="loading"&&!e.toast.icon));return()=>_e()?e.toast.icon||Xe():null})(),null),w(K,(()=>{var _e=de(()=>e.toast.type!=="loading");return()=>_e()?gt():null})(),null),le(()=>ut(K,kn(C()?.icon,z()?.icon))),K}}),ze),w(ne,(()=>{var K=de(()=>!!e.toast.jsx);return()=>K()?e.toast.jsx:yi(e.toast.title)})()),w(ze,m(Y,{get when(){return e.toast.description},get children(){var K=r_();return w(K,()=>yi(e.toast.description)),le(()=>ut(K,kn(F(),U(),C()?.description,z()?.description))),K}}),null),w(ce,m(Y,{get when(){return e.toast.cancel},children:K=>m(Y,{get when(){return!Fl(K())},get fallback(){return(()=>{var _e=i_();return _e.$$click=Oe=>{const Re=K();M()&&(Re.onClick?.(Oe),Ne())},w(_e,()=>K().label),le(Oe=>{var Re=e.toast.cancelButtonStyle??e.cancelButtonStyle,Qe=kn(C()?.cancelButton,z()?.cancelButton);return Oe.e=ur(_e,Re,Oe.e),Qe!==Oe.t&&ut(_e,Oe.t=Qe),Oe},{e:void 0,t:void 0}),_e})()},get children(){return K()}})}),null),w(ce,m(Y,{get when(){return e.toast.action},children:K=>m(Y,{get when(){return!Fl(K())},get fallback(){return(()=>{var _e=s_();return _e.$$click=Oe=>{K().onClick?.(Oe),!Oe.defaultPrevented&&Ne()},w(_e,()=>K().label),le(Oe=>{var Re=e.toast.actionButtonStyle??e.actionButtonStyle,Qe=kn(C()?.actionButton,z()?.actionButton);return Oe.e=ur(_e,Re,Oe.e),Qe!==Oe.t&&ut(_e,Oe.t=Qe),Oe},{e:void 0,t:void 0}),_e})()},get children(){return K()}})}),null),le(K=>{var _e=kn(N(),G(),C()?.toast,z()?.toast,C()?.default,C()?.[R()],z()?.[R()]),Oe=e.toast.richColors??e.defaultRichColors,Re=!(e.toast.jsx||e.toast.unstyled||e.unstyled),Qe=t(),bt=!!e.toast.promise,Et=c(),Me=r(),Ke=T(),pt=H(),_t=ie(),Yt=e.index,Ut=L(),on=i(),dn=M(),q=R(),ue=V(),he=a(),Je=p(),Ue=!!(e.expanded||e.expandByDefault&&t()),et=e.toast.testId,Kt={"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${r()?b():pe()}px`,"--initial-height":e.expandByDefault?"auto":`${y()}px`,...e.style,...e.toast.style},Ve=kn(C()?.content,z()?.content),sn=kn(C()?.title,z()?.title);return _e!==K.e&&ut(ce,K.e=_e),Oe!==K.t&&xe(ce,"data-rich-colors",K.t=Oe),Re!==K.a&&xe(ce,"data-styled",K.a=Re),Qe!==K.o&&xe(ce,"data-mounted",K.o=Qe),bt!==K.i&&xe(ce,"data-promise",K.i=bt),Et!==K.n&&xe(ce,"data-swiped",K.n=Et),Me!==K.s&&xe(ce,"data-removed",K.s=Me),Ke!==K.h&&xe(ce,"data-visible",K.h=Ke),pt!==K.r&&xe(ce,"data-y-position",K.r=pt),_t!==K.d&&xe(ce,"data-x-position",K.d=_t),Yt!==K.l&&xe(ce,"data-index",K.l=Yt),Ut!==K.u&&xe(ce,"data-front",K.u=Ut),on!==K.c&&xe(ce,"data-swiping",K.c=on),dn!==K.w&&xe(ce,"data-dismissible",K.w=dn),q!==K.m&&xe(ce,"data-type",K.m=q),ue!==K.f&&xe(ce,"data-invert",K.f=ue),he!==K.y&&xe(ce,"data-swipe-out",K.y=he),Je!==K.g&&xe(ce,"data-swipe-direction",K.g=Je),Ue!==K.p&&xe(ce,"data-expanded",K.p=Ue),et!==K.b&&xe(ce,"data-testid",K.b=et),K.T=ur(ce,Kt,K.T),Ve!==K.A&&ut(ze,K.A=Ve),sn!==K.O&&ut(ne,K.O=sn),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0}),ce})()}function L_(e){const t=Q({position:"bottom-right",hotkey:["altKey","KeyT"],theme:"light",gap:Zg,visibleToasts:C_,dir:zl(),containerAriaLabel:"Notifications"},e),n=I_(t.theme),[r,o]=tb({toasts:[]}),i=re(()=>{const T=r.toasts;return t.id?T.filter(R=>R.toasterId===t.id):T.filter(R=>!R.toasterId)}),s=re(()=>Array.from(new Set([t.position,...i().filter(T=>T.position).map(T=>T.position)]))),[a,u]=$([]),[c,l]=$(!1),[d,f]=$(!1),[p,g]=$(n),[b,h]=$(null),[y,v]=$(!1);let x;const k=()=>t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=()=>ji(t.className,t.class),S=()=>t.toastOptions,O=()=>mu(S()?.classNames,S()?.classes),_=()=>bu(S()?.descriptionClassName,S()?.descriptionClass),I=()=>ji(S()?.className,S()?.class),L=T=>{o("toasts",R=>(R.find(M=>M.id===T.id)?.delete||jt.dismiss(T.id),R.filter(({id:M})=>M!==T.id)))};return Vt(()=>{const T=jt.subscribe(R=>{if(R.dismiss){requestAnimationFrame(()=>{o("toasts",Rc(N=>{N.forEach(F=>{F.id===R.id&&(F.delete=!0)})}))});return}const M=R,C=r.toasts.findIndex(N=>N.id===M.id);if(C!==-1){o("toasts",C,nb(M));return}o("toasts",Rc(N=>{N.unshift(M)}))});ae(T)}),oe(()=>{const T=t.theme;if(T!=="system"){g(T);return}if(typeof window>"u")return;const R=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:C})=>{g(C?"dark":"light")};M(R);try{R.addEventListener("change",M),ae(()=>R.removeEventListener("change",M))}catch{R.addListener(M),ae(()=>R.removeListener(M))}}),oe(()=>{i().length<=1&&l(!1)}),Vt(()=>{const T=R=>{t.hotkey.length>0&&t.hotkey.every(C=>R[C]||R.code===C)&&(l(!0),x?.focus()),R.code==="Escape"&&(document.activeElement===x||x?.contains(document.activeElement))&&l(!1)};document.addEventListener("keydown",T),ae(()=>document.removeEventListener("keydown",T))}),ae(()=>{b()&&(b()?.focus({preventScroll:!0}),h(null),v(!1))}),(()=>{var T=a_();return w(T,m(yt,{get each(){return s()},children:(R,M)=>{const[C,N]=R.split("-"),F=re(()=>i().filter(U=>!U.position&&M()===0||U.position===R)),G=re(()=>a().filter(U=>M()===0&&!U.position||U.position===R));return m(Y,{get when(){return i().length>0},get children(){var U=u_();U.$$pointerup=()=>f(!1),U.$$pointerdown=P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||f(!0)},U.addEventListener("dragend",()=>l(!1)),U.addEventListener("mouseleave",()=>{d()||l(!1)}),U.$$mousemove=()=>l(!0),U.addEventListener("mouseenter",()=>l(!0)),U.addEventListener("focus",P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||y()||(v(!0),h(P.relatedTarget))}),U.addEventListener("blur",P=>{y()&&!P.currentTarget.contains(P.relatedTarget)&&(v(!1),b()&&(b()?.focus({preventScroll:!0}),h(null)))});var z=x;return typeof z=="function"?Gn(z,U):x=U,xe(U,"data-y-position",C),xe(U,"data-x-position",N),w(U,m(yt,{get each(){return F()},children:(P,Z)=>m(M_,{get icons(){return t.icons},get index(){return Z()},toast:P,get defaultRichColors(){return t.richColors},get duration(){return S()?.duration??t.duration},get class(){return I()},get descriptionClassName(){return _()},get invert(){return!!t.invert},get visibleToasts(){return t.visibleToasts},get closeButton(){return S()?.closeButton??t.closeButton??!1},get interacting(){return d()},position:R,get style(){return S()?.style},get unstyled(){return S()?.unstyled},get classNames(){return O()},get cancelButtonStyle(){return S()?.cancelButtonStyle},get actionButtonStyle(){return S()?.actionButtonStyle},get closeButtonAriaLabel(){return S()?.closeButtonAriaLabel},removeToast:L,get toasts(){return F()},get heights(){return G()},setHeights:u,get expandByDefault(){return!!t.expand},get gap(){return t.gap},get expanded(){return c()},get swipeDirections(){return t.swipeDirections},get pauseWhenPageIsHidden(){return t.pauseWhenPageIsHidden}})})),le(P=>{var Z=t.dir==="auto"?zl():t.dir,V=E(),te=p(),W={"--front-toast-height":`${G()[0]?.height??0}px`,"--gap":`${t.gap}px`,...t.style,...N_(t.offset,t.mobileOffset)};return Z!==P.e&&xe(U,"dir",P.e=Z),V!==P.t&&ut(U,P.t=V),te!==P.a&&xe(U,"data-sonner-theme",P.a=te),P.o=ur(U,W,P.o),P},{e:void 0,t:void 0,a:void 0,o:void 0}),U}})}})),le(()=>xe(T,"aria-label",t.customAriaLabel??`${t.containerAriaLabel} ${k()}`)),T})()}/*!
|
|
637
|
+
`);var b_=Array(12).fill(0);function y_(e){return(()=>{var t=e_(),n=t.firstChild;return w(n,m(vt,{each:b_,children:(r,o)=>(()=>{var i=t_();return le(()=>xe(i,"data-index",o())),i})()})),le(r=>{var o=["sonner-loading-wrapper",e.class??e.className].filter(Boolean).join(" "),i=e.visible;return o!==r.e&&ut(t,r.e=o),i!==r.t&&xe(t,"data-visible",r.t=i),r},{e:void 0,t:void 0}),t})()}function v_(){return n_()}function x_(){return r_()}function w_(){return o_()}function __(){return i_()}function E_(e){switch(e){case"success":return m(v_,{});case"info":return m(w_,{});case"warning":return m(x_,{});case"error":return m(__,{});default:return null}}function k_(){return s_()}function C_(){const[e,t]=L(typeof document<"u"?document.hidden:!1);return Vt(()=>{const n=()=>{t(document.hidden)};document.addEventListener("visibilitychange",n),ae(()=>{document.removeEventListener("visibilitychange",n)})}),e}var yu=1,S_=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r=typeof e.id=="string"&&e.id.length>0,o=typeof e.id=="number"||r?e.id:yu++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t,dismissible:s}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>{this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})):this.toasts.forEach(t=>{this.dismissedToasts.add(t.id),this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e});error=(e,t)=>this.create({...t,message:e,type:"error"});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(typeof e=="function"?e():e);let o=n!==void 0,i;const s=r.then(async u=>{if(i=["resolve",u],T_(u))o=!1,this.create({id:n,type:"default",message:u});else if(A_(u)&&!u.ok){o=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,l=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,d=yi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(u instanceof Error){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=yi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}else if(t.success!==void 0){o=!1;const c=typeof t.success=="function"?await t.success(u):t.success,l=typeof t.description=="function"?await t.description(u):t.description,d=yi(c)?c:{message:c};this.create({id:n,type:"success",description:l,...d})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;const c=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,d=yi(c)?c:{message:c};this.create({id:n,type:"error",description:l,...d})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),t.finally?.()}),a=()=>new Promise((u,c)=>{s.then(()=>{i[0]==="reject"?c(i[1]):u(i[1])}).catch(c)});return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})};custom=(e,t)=>{const n=t?.id||yu++;return this.create({jsx:e(n),...t,id:n}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function A_(e){return e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number"}function yi(e){return typeof e=="object"&&e!==null&&"message"in e}function T_(e){return typeof Node<"u"&&e instanceof Node}var jt=new S_;function D_(e,t){const n=t?.id||yu++;return jt.addToast({title:e,...t,id:n}),n}var O_=D_,R_=()=>jt.toasts,N_=()=>jt.getActiveToasts(),hn=Object.assign(O_,{success:jt.success,info:jt.info,warning:jt.warning,error:jt.error,custom:jt.custom,message:jt.message,promise:jt.promise,dismiss:jt.dismiss,loading:jt.loading},{getHistory:R_,getToasts:N_});function Ul(e){return typeof e=="object"&&e!==null&&"label"in e}var I_=3,M_="24px",L_="16px",Kl=4e3,Jg=14,$_=45,P_=200;function Sn(...e){return e.filter(Boolean).join(" ")}function vi(e){return typeof e=="function"?e():e}function F_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function Hl(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function B_(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,s=i?"--mobile-offset":"--offset",a=i?L_:M_,u=c=>{for(const l of["top","right","bottom","left"])n[`${s}-${l}`]=typeof c=="number"?`${c}px`:c};if(typeof r=="number"||typeof r=="string"){u(r);return}if(typeof r=="object"&&r!==null){for(const c of["top","right","bottom","left"]){const l=r[c];n[`${s}-${c}`]=l===void 0?a:typeof l=="number"?`${l}px`:l}return}u(a)}),n}function vu(e,t){return e??t}function xu(e,t){return e??t??""}function Gi(e,t){return e??t??""}function z_(e){return e!=="system"?e:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function U_(e){const[t,n]=L(!1),[r,o]=L(!1),[i,s]=L(!1),[a,u]=L(!1),[c,l]=L(!1),[d,f]=L(null),[p,g]=L(null),[b,h]=L(0),[y,v]=L(0);let x,k=null,C=0,E=0,T=Kl;const[_,R]=L(null),$=()=>e.index===0,O=()=>e.index+1<=e.visibleToasts,N=()=>e.toast.type,M=()=>e.toast.dismissible!==!1,A=()=>vu(e.classNames,e.classes),I=()=>Gi(e.className,e.class),F=()=>xu(e.descriptionClassName,e.descriptionClass),G=()=>Gi(e.toast.className,e.toast.class),U=()=>xu(e.toast.descriptionClassName,e.toast.descriptionClass),z=()=>vu(e.toast.classNames,e.toast.classes),P=()=>e.toast.closeButton??e.closeButton,Z=()=>e.toast.duration??e.duration??Kl,V=()=>e.toast.invert??e.invert,te=()=>N()==="loading",Y=()=>e.swipeDirections??F_(e.position),H=re(()=>e.position.split("-")[0]),ie=re(()=>e.position.split("-")[1]),me=re(()=>Math.max(0,e.heights.findIndex(ce=>ce.toastId===e.toast.id))),J=re(()=>e.heights.reduce((ce,ze,ne)=>ne>=me()?ce:ce+ze.height,0)),pe=re(()=>me()*(e.gap??Jg)+J()),Ce=C_();oe(()=>{T=Z()});function Ne(){o(!0),h(pe()),e.setHeights(ce=>ce.filter(ze=>ze.toastId!==e.toast.id)),window.setTimeout(()=>{e.removeToast(e.toast)},P_)}function Xe(){return e.icons?.loading?(()=>{var ce=a_();return w(ce,()=>e.icons.loading),le(ze=>{var ne=Sn(A()?.loader,z()?.loader,"sonner-loader"),ke=N()==="loading";return ne!==ze.e&&ut(ce,ze.e=ne),ke!==ze.t&&xe(ce,"data-visible",ze.t=ke),ze},{e:void 0,t:void 0}),ce})():m(y_,{get class(){return Sn(A()?.loader,z()?.loader)},get visible(){return N()==="loading"}})}const pt=()=>e.toast.icon??e.icons?.[N()]??E_(N());return Vt(()=>{if(n(!0),!x)return;const ce=x.getBoundingClientRect().height;v(ce),e.setHeights(ze=>[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:ce,position:e.toast.position},...ze]),ae(()=>{e.setHeights(ze=>ze.filter(ne=>ne.toastId!==e.toast.id))})}),oe(()=>{if(!t()||!x)return;vi(e.toast.title),vi(e.toast.description);const ce=x.style.height;x.style.height="auto";const ze=x.getBoundingClientRect().height;x.style.height=ce,v(ze),e.setHeights(ne=>ne.find(K=>K.toastId===e.toast.id)?ne.map(K=>K.toastId===e.toast.id?{...K,height:ze}:K):[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:ze,position:e.toast.position},...ne])}),oe(Tt(()=>[e.expanded,e.interacting,e.toast,N(),Ce(),Z()],([ce,ze,ne,ke])=>{if(ne.promise&&ke==="loading"||ne.duration===Number.POSITIVE_INFINITY||ke==="loading")return;let K;const _e=()=>{if(E<C){const Qe=new Date().getTime()-C;T-=Qe}E=new Date().getTime()},Oe=()=>{T!==Number.POSITIVE_INFINITY&&(C=new Date().getTime(),K=setTimeout(()=>{ne.onAutoClose?.(ne),Ne()},T))};ce||ze||(e.pauseWhenPageIsHidden??!0)&&Ce()?_e():Oe(),ae(()=>{K&&clearTimeout(K)})})),oe(Tt(()=>e.toast.delete,ce=>{ce&&(Ne(),e.toast.onDismiss?.(e.toast))})),(()=>{var ce=d_(),ze=ce.firstChild,ne=ze.firstChild;ce.$$pointermove=K=>{if(!_()||!M()||(window.getSelection()?.toString().length??0)>0)return;const _e=K.clientY-_().y,Oe=K.clientX-_().x;!d()&&(Math.abs(Oe)>1||Math.abs(_e)>1)&&f(Math.abs(Oe)>Math.abs(_e)?"x":"y");const Re={x:0,y:0},Qe=yt=>1/(1.5+Math.abs(yt)/20);d()==="y"?(Y().includes("top")||Y().includes("bottom"))&&(Y().includes("top")&&_e<0||Y().includes("bottom")&&_e>0?Re.y=_e:Re.y=_e*Qe(_e)):d()==="x"&&(Y().includes("left")||Y().includes("right"))&&(Y().includes("left")&&Oe<0||Y().includes("right")&&Oe>0?Re.x=Oe:Re.x=Oe*Qe(Oe)),(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&l(!0),x?.style.setProperty("--swipe-amount-x",`${Re.x}px`),x?.style.setProperty("--swipe-amount-y",`${Re.y}px`)},ce.$$pointerup=()=>{if(a()||!M())return;R(null);const K=Number(x?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),_e=Number(x?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Oe=Math.max(1,new Date().getTime()-(k?.getTime()??0)),Re=d()==="x"?K:_e,Qe=Math.abs(Re)/Oe;if(Math.abs(Re)>=$_||Qe>.11){h(pe()),e.toast.onDismiss?.(e.toast),d()==="x"?g(K>0?"right":"left"):g(_e>0?"down":"up"),Ne(),u(!0);return}x?.style.setProperty("--swipe-amount-x","0px"),x?.style.setProperty("--swipe-amount-y","0px"),l(!1),s(!1),f(null)},ce.$$pointerdown=K=>{K.button!==2&&(te()||!M()||K.target.closest("button")||(k=new Date,h(pe()),K.currentTarget.setPointerCapture(K.pointerId),s(!0),R({x:K.clientX,y:K.clientY})))},ce.addEventListener("dragend",()=>{s(!1),f(null),R(null)});var ke=x;return typeof ke=="function"?Vn(ke,ce):x=ce,w(ce,m(W,{get when(){return de(()=>!!(P()&&!e.toast.jsx))()&&N()!=="loading"},get children(){var K=u_();return K.$$click=()=>{te()||!M()||(Ne(),e.toast.onDismiss?.(e.toast))},K.$$pointerup=_e=>_e.stopPropagation(),K.$$pointerdown=_e=>_e.stopPropagation(),w(K,()=>e.icons?.close??m(k_,{})),le(_e=>{var Oe=e.closeButtonAriaLabel??"Close toast",Re=te(),Qe=Sn(A()?.closeButton,z()?.closeButton);return Oe!==_e.e&&xe(K,"aria-label",_e.e=Oe),Re!==_e.t&&xe(K,"data-disabled",_e.t=Re),Qe!==_e.a&&ut(K,_e.a=Qe),_e},{e:void 0,t:void 0,a:void 0}),K}}),ze),w(ce,m(W,{get when(){return de(()=>!!((N()||e.toast.icon||e.toast.promise)&&e.toast.icon!==null))()&&(e.icons?.[N()]!==null||e.toast.icon)},get children(){var K=c_();return w(K,(()=>{var _e=de(()=>!!(e.toast.promise||e.toast.type==="loading"&&!e.toast.icon));return()=>_e()?e.toast.icon||Xe():null})(),null),w(K,(()=>{var _e=de(()=>e.toast.type!=="loading");return()=>_e()?pt():null})(),null),le(()=>ut(K,Sn(A()?.icon,z()?.icon))),K}}),ze),w(ne,(()=>{var K=de(()=>!!e.toast.jsx);return()=>K()?e.toast.jsx:vi(e.toast.title)})()),w(ze,m(W,{get when(){return e.toast.description},get children(){var K=l_();return w(K,()=>vi(e.toast.description)),le(()=>ut(K,Sn(F(),U(),A()?.description,z()?.description))),K}}),null),w(ce,m(W,{get when(){return e.toast.cancel},children:K=>m(W,{get when(){return!Ul(K())},get fallback(){return(()=>{var _e=f_();return _e.$$click=Oe=>{const Re=K();M()&&(Re.onClick?.(Oe),Ne())},w(_e,()=>K().label),le(Oe=>{var Re=e.toast.cancelButtonStyle??e.cancelButtonStyle,Qe=Sn(A()?.cancelButton,z()?.cancelButton);return Oe.e=ur(_e,Re,Oe.e),Qe!==Oe.t&&ut(_e,Oe.t=Qe),Oe},{e:void 0,t:void 0}),_e})()},get children(){return K()}})}),null),w(ce,m(W,{get when(){return e.toast.action},children:K=>m(W,{get when(){return!Ul(K())},get fallback(){return(()=>{var _e=g_();return _e.$$click=Oe=>{K().onClick?.(Oe),!Oe.defaultPrevented&&Ne()},w(_e,()=>K().label),le(Oe=>{var Re=e.toast.actionButtonStyle??e.actionButtonStyle,Qe=Sn(A()?.actionButton,z()?.actionButton);return Oe.e=ur(_e,Re,Oe.e),Qe!==Oe.t&&ut(_e,Oe.t=Qe),Oe},{e:void 0,t:void 0}),_e})()},get children(){return K()}})}),null),le(K=>{var _e=Sn(I(),G(),A()?.toast,z()?.toast,A()?.default,A()?.[N()],z()?.[N()]),Oe=e.toast.richColors??e.defaultRichColors,Re=!(e.toast.jsx||e.toast.unstyled||e.unstyled),Qe=t(),yt=!!e.toast.promise,kt=c(),Me=r(),Ke=O(),ht=H(),_t=ie(),Yt=e.index,Ut=$(),on=i(),dn=M(),q=N(),ue=V(),he=a(),Je=p(),Ue=!!(e.expanded||e.expandByDefault&&t()),et=e.toast.testId,Kt={"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${r()?b():pe()}px`,"--initial-height":e.expandByDefault?"auto":`${y()}px`,...e.style,...e.toast.style},We=Sn(A()?.content,z()?.content),sn=Sn(A()?.title,z()?.title);return _e!==K.e&&ut(ce,K.e=_e),Oe!==K.t&&xe(ce,"data-rich-colors",K.t=Oe),Re!==K.a&&xe(ce,"data-styled",K.a=Re),Qe!==K.o&&xe(ce,"data-mounted",K.o=Qe),yt!==K.i&&xe(ce,"data-promise",K.i=yt),kt!==K.n&&xe(ce,"data-swiped",K.n=kt),Me!==K.s&&xe(ce,"data-removed",K.s=Me),Ke!==K.h&&xe(ce,"data-visible",K.h=Ke),ht!==K.r&&xe(ce,"data-y-position",K.r=ht),_t!==K.d&&xe(ce,"data-x-position",K.d=_t),Yt!==K.l&&xe(ce,"data-index",K.l=Yt),Ut!==K.u&&xe(ce,"data-front",K.u=Ut),on!==K.c&&xe(ce,"data-swiping",K.c=on),dn!==K.w&&xe(ce,"data-dismissible",K.w=dn),q!==K.m&&xe(ce,"data-type",K.m=q),ue!==K.f&&xe(ce,"data-invert",K.f=ue),he!==K.y&&xe(ce,"data-swipe-out",K.y=he),Je!==K.g&&xe(ce,"data-swipe-direction",K.g=Je),Ue!==K.p&&xe(ce,"data-expanded",K.p=Ue),et!==K.b&&xe(ce,"data-testid",K.b=et),K.T=ur(ce,Kt,K.T),We!==K.A&&ut(ze,K.A=We),sn!==K.O&&ut(ne,K.O=sn),K},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0}),ce})()}function K_(e){const t=Q({position:"bottom-right",hotkey:["altKey","KeyT"],theme:"light",gap:Jg,visibleToasts:I_,dir:Hl(),containerAriaLabel:"Notifications"},e),n=z_(t.theme),[r,o]=tb({toasts:[]}),i=re(()=>{const O=r.toasts;return t.id?O.filter(N=>N.toasterId===t.id):O.filter(N=>!N.toasterId)}),s=re(()=>Array.from(new Set([t.position,...i().filter(O=>O.position).map(O=>O.position)]))),[a,u]=L([]),[c,l]=L(!1),[d,f]=L(!1),[p,g]=L(n),[b,h]=L(null),[y,v]=L(!1);let x;const k=()=>t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=()=>Gi(t.className,t.class),E=()=>t.toastOptions,T=()=>vu(E()?.classNames,E()?.classes),_=()=>xu(E()?.descriptionClassName,E()?.descriptionClass),R=()=>Gi(E()?.className,E()?.class),$=O=>{o("toasts",N=>(N.find(M=>M.id===O.id)?.delete||jt.dismiss(O.id),N.filter(({id:M})=>M!==O.id)))};return Vt(()=>{const O=jt.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{o("toasts",Mc(I=>{I.forEach(F=>{F.id===N.id&&(F.delete=!0)})}))});return}const M=N,A=r.toasts.findIndex(I=>I.id===M.id);if(A!==-1){o("toasts",A,nb(M));return}o("toasts",Mc(I=>{I.unshift(M)}))});ae(O)}),oe(()=>{const O=t.theme;if(O!=="system"){g(O);return}if(typeof window>"u")return;const N=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:A})=>{g(A?"dark":"light")};M(N);try{N.addEventListener("change",M),ae(()=>N.removeEventListener("change",M))}catch{N.addListener(M),ae(()=>N.removeListener(M))}}),oe(()=>{i().length<=1&&l(!1)}),Vt(()=>{const O=N=>{t.hotkey.length>0&&t.hotkey.every(A=>N[A]||N.code===A)&&(l(!0),x?.focus()),N.code==="Escape"&&(document.activeElement===x||x?.contains(document.activeElement))&&l(!1)};document.addEventListener("keydown",O),ae(()=>document.removeEventListener("keydown",O))}),ae(()=>{b()&&(b()?.focus({preventScroll:!0}),h(null),v(!1))}),(()=>{var O=p_();return w(O,m(vt,{get each(){return s()},children:(N,M)=>{const[A,I]=N.split("-"),F=re(()=>i().filter(U=>!U.position&&M()===0||U.position===N)),G=re(()=>a().filter(U=>M()===0&&!U.position||U.position===N));return m(W,{get when(){return i().length>0},get children(){var U=h_();U.$$pointerup=()=>f(!1),U.$$pointerdown=P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||f(!0)},U.addEventListener("dragend",()=>l(!1)),U.addEventListener("mouseleave",()=>{d()||l(!1)}),U.$$mousemove=()=>l(!0),U.addEventListener("mouseenter",()=>l(!0)),U.addEventListener("focus",P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||y()||(v(!0),h(P.relatedTarget))}),U.addEventListener("blur",P=>{y()&&!P.currentTarget.contains(P.relatedTarget)&&(v(!1),b()&&(b()?.focus({preventScroll:!0}),h(null)))});var z=x;return typeof z=="function"?Vn(z,U):x=U,xe(U,"data-y-position",A),xe(U,"data-x-position",I),w(U,m(vt,{get each(){return F()},children:(P,Z)=>m(U_,{get icons(){return t.icons},get index(){return Z()},toast:P,get defaultRichColors(){return t.richColors},get duration(){return E()?.duration??t.duration},get class(){return R()},get descriptionClassName(){return _()},get invert(){return!!t.invert},get visibleToasts(){return t.visibleToasts},get closeButton(){return E()?.closeButton??t.closeButton??!1},get interacting(){return d()},position:N,get style(){return E()?.style},get unstyled(){return E()?.unstyled},get classNames(){return T()},get cancelButtonStyle(){return E()?.cancelButtonStyle},get actionButtonStyle(){return E()?.actionButtonStyle},get closeButtonAriaLabel(){return E()?.closeButtonAriaLabel},removeToast:$,get toasts(){return F()},get heights(){return G()},setHeights:u,get expandByDefault(){return!!t.expand},get gap(){return t.gap},get expanded(){return c()},get swipeDirections(){return t.swipeDirections},get pauseWhenPageIsHidden(){return t.pauseWhenPageIsHidden}})})),le(P=>{var Z=t.dir==="auto"?Hl():t.dir,V=C(),te=p(),Y={"--front-toast-height":`${G()[0]?.height??0}px`,"--gap":`${t.gap}px`,...t.style,...B_(t.offset,t.mobileOffset)};return Z!==P.e&&xe(U,"dir",P.e=Z),V!==P.t&&ut(U,P.t=V),te!==P.a&&xe(U,"data-sonner-theme",P.a=te),P.o=ur(U,Y,P.o),P},{e:void 0,t:void 0,a:void 0,o:void 0}),U}})}})),le(()=>xe(O,"aria-label",t.customAriaLabel??`${t.containerAriaLabel} ${k()}`)),O})()}/*!
|
|
638
638
|
* Original code by Emil Kowalski
|
|
639
639
|
* MIT Licensed, Copyright 2023 Emil Kowalski, see https://github.com/emilkowalski/sonner/blob/main/LICENSE.md for details
|
|
640
640
|
*
|
|
641
641
|
* Credits:
|
|
642
642
|
* https://github.com/emilkowalski/sonner/blob/main/src/index.tsx
|
|
643
|
-
*/ln(["pointerdown","pointerup","pointermove","click","mousemove"]);const $_=e=>m(L_,Q({class:"toaster group",toastOptions:{classes:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},e));var P_=B('<span class=" text-muted-foreground">'),F_=B('<span class=" text-destructive">'),B_=B('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),z_=B('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),Ul=B('<p class=" text-destructive">'),U_=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),K_=B('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><h1 class="m-0 text-xl">'),H_=B('<p class=" text-muted-foreground">'),q_=B('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),j_=B('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),G_=B('<h2 class="my-1.5 text-base font-semibold">'),V_=B('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),W_=B('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),Y_=B('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),Kl=B("<span>."),Z_=B("<span>");const X_={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},Q_={feat:"text-emerald-600 dark:text-emerald-400",refct:"text-sky-600 dark:text-sky-400",fix:"text-rose-600 dark:text-rose-400"};function J_(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const e2=()=>{const e=es(),t=Zo(),[n,{refetch:r}]=hn(t,T=>T?Be.listSpecs(T):Promise.resolve([])),[o,{refetch:i}]=hn(()=>Be.listProjects()),s=re(()=>(o()??[]).find(T=>T.id===t())),a=re(()=>{const T=s();return T?.worktree?(o()??[]).some(R=>R.id===T.worktree.mainProjectId):!0}),u=re(()=>{const T=s();return T?.worktree?`feat(${T.worktree.branch}): merge from worktree`:""}),[c,l]=$(!1),[d,f]=$(null),[p,g]=$(!1),[b,h]=$(""),[y,v]=$(null),[x,k]=$(!1),[E,S]=$(null);is(()=>p()||y()!==null);let O=null;oe(()=>{const T=t();O?.(),O=null,T&&(O=i0(T,()=>{r()}))}),Vt(()=>{const T=s0(()=>{(async()=>{const R=s()?.worktree?.mainProjectId??null;await i();const M=t();!M||(o()??[]).some(N=>N.id===M)||R&&e(`/${encodeURIComponent(R)}`)})()});ae(T)}),ae(()=>{O?.(),O=null});function _(){s()?.worktree&&a()&&(h(u()),f(null),g(!0))}async function I(){const T=s();if(!T?.worktree||!a())return;const R=b().trim()||u();l(!0),f(null);try{const M=await Be.mergeWorktreeToMain(T.id,{commitMessage:R});g(!1),M.status==="merged"?(Tn.success(D("home.merged")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}`)):(Tn.info(D("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}/specs/${encodeURIComponent(M.conflictSpecId)}`))}catch(M){f(M.message)}finally{l(!1)}}async function L(T){const R=t();if(R){k(!0),S(null);try{await Be.deleteSpec(R,T),v(null),await r()}catch(M){S(M.message)}finally{k(!1)}}}return(()=>{var T=K_(),R=T.firstChild,M=R.firstChild;return w(M,()=>D("home.specList")),w(R,m(ds,{}),null),w(T,m(Y,{get when(){return s()?.worktree},get children(){var C=B_(),N=C.firstChild,F=N.firstChild;return w(F,()=>D("home.mainProject"),null),w(F,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(C,m(Fe,{variant:"default",size:"sm",onClick:_,get disabled(){return c()||!a()},get title(){return de(()=>!!a())()?D("home.mergeHint"):D("home.mainUnreachable")},get children(){return[m(v1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!c())()?D("home.merging"):D("home.mergeToMain"))]}}),null),w(C,m(Y,{get when(){return!a()},get children(){var G=P_();return w(G,()=>D("home.mainUnreachable")),G}}),null),w(C,m(Y,{get when(){return d()},get children(){var G=F_();return w(G,d),G}}),null),C}}),null),w(T,m(Ji,{get fallback(){return(()=>{var C=H_();return w(C,()=>D("common.loading")),C})()},get children(){return m(Y,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var C=q_(),N=C.firstChild;return w(N,()=>D("home.noSpecs")),w(C,m(Fe,{as:fr,get href(){return en("specs/new")},variant:"default",size:"sm",get children(){return[m(Du,{class:"mr-1 h-4 w-4"}),de(()=>D("home.createFirst"))]}}),null),C})()},get children(){var C=z_();return w(C,m(yt,{get each(){return n()??[]},children:N=>{const F=J_(N.id);return(()=>{var G=Y_(),U=G.firstChild;return w(G,m(fr,{get href(){return en(`specs/${encodeURIComponent(N.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var z=j_(),P=z.firstChild;return w(z,m(I0,{get class(){return`border-transparent ${X_[N.stage]??"bg-muted"} text-white uppercase`},get children(){return N.stage}}),P),w(P,()=>a0(N.updated_at)),z})(),(()=>{var z=G_();return w(z,()=>N.title||D("common.pendingAgent")),z})(),(()=>{var z=V_();return w(z,()=>N.summary||D("common.pendingAgent")),z})(),(()=>{var z=W_();return w(z,m(Y,{when:F,get fallback(){return N.id},children:P=>[(()=>{var Z=Kl(),V=Z.firstChild;return w(Z,()=>P().prefix,V),Z})(),(()=>{var Z=Z_();return w(Z,()=>P().type),le(()=>ut(Z,`font-semibold ${Q_[P().type]??"text-foreground"}`)),Z})(),(()=>{var Z=Kl();return Z.firstChild,w(Z,()=>P().suffix,null),Z})()]})),z})()]}}),U),w(U,m(Fg,{placement:"bottom-end",get children(){return[m(Pg,{as:Fe,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return D("home.moreActions")},get children(){return m(g1,{class:"h-4 w-4"})}}),m(Bg,{get children(){return m(pu,{class:"text-destructive focus:text-destructive",onSelect:()=>v(N.id),get children(){return D("common.delete")}})}})]}})),G})()}})),C}})}}),null),w(T,m(Cn,{get open(){return p()},onOpenChange:C=>{g(C),C||f(null)},get children(){return m(Fo,{class:"max-w-md",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("home.mergeDialogTitle")}}),m(Wu,{get children(){return D("home.mergeDialogDescription")}})]}}),(()=>{var C=U_(),N=C.firstChild;return C.addEventListener("submit",F=>{F.preventDefault(),I()}),w(N,()=>D("home.mergeCommitMessage"),null),w(N,m(Ao,{id:"merge-commit-message",get value(){return b()},onInput:F=>h(F.currentTarget.value),get disabled(){return c()}}),null),w(C,m(Y,{get when(){return d()},get children(){var F=Ul();return w(F,d),F}}),null),w(C,m(Uo,{get children(){return[m(Fe,{type:"button",variant:"outline",onClick:()=>g(!1),get disabled(){return c()},get children(){return D("common.cancel")}}),m(Fe,{type:"submit",get disabled(){return c()||!a()},get children(){return de(()=>!!c())()?D("home.merging"):D("home.mergeToMain")}})]}}),null),C})()]}})}}),null),w(T,m(Cn,{get open(){return y()!==null},onOpenChange:C=>{C||(v(null),S(null))},get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return m(Bo,{get children(){return D("home.confirmDeleteSpec")}})}}),m(Y,{get when(){return E()},get children(){var C=Ul();return w(C,E),C}}),m(Uo,{get children(){return[m(Fe,{variant:"outline",onClick:()=>v(null),get disabled(){return x()},get children(){return D("common.cancel")}}),m(Fe,{variant:"destructive",onClick:()=>y()&&void L(y()),get disabled(){return x()},get children(){return de(()=>!!x())()?D("common.deleting"):D("common.confirmDelete")}})]}})]}})}}),null),T})()},Xg="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",t2=5*1024*1024,to=10,n2=new Set(["application/pdf","text/plain","text/markdown"]);function r2(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":null}function o2(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function Hl(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function i2(){return Math.random().toString(36).slice(2,8)}function Qg(e){const[t,n]=$([]),[r,o]=$(null),[i,s]=$(null),[a,u]=$(null),[c,l]=$(""),d=re(()=>t().length),f=re(()=>t().some(L=>L.status==="pending")),p=re(()=>t().some(L=>L.status==="failed"));ae(()=>{for(const L of t())L.previewUrl&&URL.revokeObjectURL(L.previewUrl)});async function g(){const L=r();if(L)return L;const{draftId:T}=await Be.createDraft(e.projectId());return o(T),T}function b(L){n(T=>[...T,L])}function h(L,T){n(R=>R.map(M=>M.id===L?{...M,...T}:M))}function y(L){n(T=>{const R=[];for(const M of T){if(M.id===L){M.previewUrl&&URL.revokeObjectURL(M.previewUrl);continue}R.push(M)}return R})}async function v(L){s(null);const T=t(),R=to-T.length;if(R<=0){s(D("newSpec.attachmentLimit",{max:to}));return}const M=[];for(const C of L.slice(0,R)){const N=o2(C),F=r2(N);if(!F){s(D("newSpec.unsupportedType",{name:N.name}));continue}if(F!=="image"&&!n2.has(N.type)){s(D("newSpec.unsupportedMime",{mime:N.type||"(unknown)"}));continue}if(N.size>t2){s(D("newSpec.fileTooLarge",{name:N.name}));continue}const G=`att-${Date.now()}-${i2()}`,U=F==="image"?URL.createObjectURL(N):void 0;M.push({id:G,file:N,name:N.name,kind:F,previewUrl:U,status:"pending"})}if(M.length!==0){L.length>R&&s(D("newSpec.attachmentRoomLimit",{room:R,current:T.length,max:to}));for(const C of M)b(C);try{const C=await g();for(const N of M)try{const F=await Be.uploadAttachment(e.projectId(),C,N.file);h(N.id,{storedName:F.storedName,name:F.storedName,status:"uploaded"})}catch(F){h(N.id,{status:"failed",error:F.message})}}catch(C){s(C.message);for(const N of M)h(N.id,{status:"failed",error:C.message})}}}async function x(L){const T=L.currentTarget;if(!T.files)return;const R=Array.from(T.files);T.value="",await v(R)}async function k(L){const T=L.clipboardData?.items;if(!T)return;const R=[];for(const M of Array.from(T))if(M.kind==="file"&&M.type.startsWith("image/")){const C=M.getAsFile();C&&R.push(C)}R.length!==0&&(L.preventDefault(),await v(R))}async function E(L){const T=t().find(R=>R.id===L);if(T){if(T.storedName&&r())try{await Be.deleteAttachment(e.projectId(),r(),T.storedName)}catch(R){s(R.message)}y(L)}}function S(L){l(Hl(L.name)),u(L.id)}async function O(L){const T=c().trim();if(u(null),!(!T||!L.storedName||!r())&&T!==Hl(L.name))try{const R=await Be.renameAttachment(e.projectId(),r(),L.storedName,T);h(L.id,{storedName:R.storedName,name:R.storedName})}catch(R){s(R.message)}}function _(){u(null)}function I(){const L=Ct(t);for(const T of L)T.previewUrl&&URL.revokeObjectURL(T.previewUrl);L.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:f,hasFailed:p,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:v,onFileInputChange:x,onPaste:k,removeAttachment:E,beginRename:S,commitRename:O,cancelRename:_,reset:I}}var s2=B("<textarea>");const oo=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=s2();return Wn(r,Q({get class(){return Tt("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var a2=B('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),u2=B('<div class="relative w-full">'),c2=B("<li><button type=button>");const l2=150,d2=150,f2=2,g2=10,ql=1.5,Jg=e=>{const[t,n]=$(!1),[r,o]=$([]),[i,s]=$(0);let a,u=[],c=-1,l="",d=null,f=null;const p=()=>e.autosize!==!1,g=()=>e.minRows??f2,b=()=>e.maxRows??g2;ae(()=>{d&&clearTimeout(d),f&&clearTimeout(f)});function h(){if(!a||!p())return;const O=getComputedStyle(a),_=parseFloat(O.fontSize)||14,I=O.lineHeight==="normal"?_*ql:parseFloat(O.lineHeight)||_*ql,L=parseFloat(O.paddingTop)+parseFloat(O.paddingBottom)+parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth),T=I*g()+L,R=I*b()+L;a.style.height="auto";const M=Math.min(Math.max(a.scrollHeight,T),R);a.style.height=`${M}px`,a.style.overflowY=a.scrollHeight>R?"auto":"hidden"}Vt(h),oe(At(()=>e.value,h));function y(){n(!1),o([]),s(0),c=-1,l="",u=[],d&&(clearTimeout(d),d=null)}function v(O){d&&clearTimeout(d),d=setTimeout(async()=>{const _=e.projectId;if(_)try{const I=await Be.listFiles(_,O);u=[],o(I.items),s(0)}catch{o([])}},l2)}function x(O){const _=O.selectionStart,I=O.value.slice(0,_),L=I.lastIndexOf("@");if(L===-1){y();return}if(L>0&&!/\s/.test(I[L-1])){y();return}const T=I.slice(L+1);if(!/^[\w./@-]*$/.test(T)){y();return}c=L,l=T,t()||n(!0),v(T)}function k(O){const _=e.value,I=_.slice(0,c),L=_.slice(c+1+l.length),T=`@${O}`;e.onValueChange(I+T+L),y();const R=I.length+T.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(R,R),h())})}function E(){u[i()]?.scrollIntoView({block:"nearest"})}function S(O){const _=r();if(t()&&_.length>0){if(O.key==="ArrowDown"){O.preventDefault(),s(I=>(I+1)%_.length),requestAnimationFrame(E);return}if(O.key==="ArrowUp"){O.preventDefault(),s(I=>(I-1+_.length)%_.length),requestAnimationFrame(E);return}if(O.key==="Enter"||O.key==="Tab"){if(!O.isComposing){O.preventDefault(),k(_[i()]);return}}else if(O.key==="Escape"){O.preventDefault(),y();return}}e.onKeyDown?.(O)}return(()=>{var O=u2();return w(O,m(oo,{ref(_){var I=a;typeof I=="function"?I(_):a=_},get rows(){return e.rows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return Tt(p()&&"resize-none",e.class)},onInput:_=>{e.onValueChange(_.currentTarget.value),x(_.currentTarget),h()},onKeyDown:S,onPaste:_=>e.onPaste?.(_),onBlur:()=>{f&&clearTimeout(f),f=setTimeout(y,d2)}}),null),w(O,m(Y,{get when(){return de(()=>!!t())()&&r().length>0},get children(){var _=a2();return w(_,m(yt,{get each(){return r()},children:(I,L)=>(()=>{var T=c2(),R=T.firstChild;return Gn(M=>u[L()]=M,T),R.$$mousedown=M=>{M.preventDefault(),k(I)},R.addEventListener("mouseenter",()=>s(L())),xe(R,"title",I),w(R,I),le(()=>ut(R,Tt("block w-full overflow-hidden text-ellipsis whitespace-nowrap border-0 px-3 py-1.5 text-left text-sm",i()===L()?"bg-primary text-primary-foreground":"bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"))),T})()})),_}}),null),O})()};ln(["mousedown"]);var p2={};vr(p2,{Arrow:()=>Qo,Content:()=>tp,Portal:()=>np,Root:()=>rp,Tooltip:()=>Ko,Trigger:()=>op,useTooltipContext:()=>vs});var ep=mt();function vs(){const e=lt(ep);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function tp(e){const t=vs(),n=$e({id:t.generateId("content")},e),[r,o]=we(n,["ref","style"]);return oe(()=>ae(t.registerContentId(o.id))),m(Y,{get when(){return t.contentPresent()},get children(){return m(ms.Positioner,{get children(){return m(qu,Q({ref(i){var s=ft(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return yr({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function np(e){const t=vs();return m(Y,{get when(){return t.contentPresent()},get children(){return m(Su,e)}})}function h2(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var Cr={},m2=0,jr=!1,Un,bo,Gr;function rp(e){const t=`tooltip-${qt()}`,n=`${++m2}`,r=$e({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=we(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(i.placement),b=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:C=>o.onOpenChange?.(C)}),{present:h}=Lr({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{Cr[n]=x},v=()=>{for(const C in Cr)C!==n&&(Cr[C](!0),delete Cr[C])},x=(C=!1)=>{C||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,b.close()):s||(s=window.setTimeout(()=>{s=void 0,b.close()},o.closeDelay)),window.clearTimeout(Un),Un=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Gr=window.setTimeout(()=>{window.clearTimeout(Gr),Gr=void 0},o.skipDelayDuration)),jr&&(window.clearTimeout(bo),bo=window.setTimeout(()=>{delete Cr[n],bo=void 0,jr=!1},o.closeDelay))},k=()=>{clearTimeout(s),s=void 0,v(),y(),jr=!0,b.open(),window.clearTimeout(Un),Un=void 0,window.clearTimeout(bo),bo=void 0,window.clearTimeout(Gr),Gr=void 0},E=()=>{v(),y(),!b.isOpen()&&!Un&&!jr?Un=window.setTimeout(()=>{Un=void 0,jr=!0,k()},o.openDelay):b.isOpen()||k()},S=(C=!1)=>{!C&&o.openDelay&&o.openDelay>0&&!s&&!Gr?E():k()},O=()=>{window.clearTimeout(Un),Un=void 0,jr=!1},_=()=>{window.clearTimeout(s),s=void 0},I=C=>Bt(c(),C)||Bt(d(),C),L=C=>{const N=c(),F=d();if(!(!N||!F))return h2(C,N,F)},T=C=>{const N=C.target;if(I(N)){_();return}if(!o.ignoreSafeArea){const F=L(p());if(F&&O0(_v(C),F)){_();return}}s||x()};oe(()=>{if(!b.isOpen())return;const C=nn();C.addEventListener("pointermove",T,!0),ae(()=>{C.removeEventListener("pointermove",T,!0)})}),oe(()=>{const C=c();if(!C||!b.isOpen())return;const N=G=>{const U=G.target;Bt(U,C)&&x(!0)},F=S0();F.addEventListener("scroll",N,{capture:!0}),ae(()=>{F.removeEventListener("scroll",N,{capture:!0})})}),ae(()=>{clearTimeout(s),Cr[n]&&delete Cr[n]});const M={dataset:re(()=>({"data-expanded":b.isOpen()?"":void 0,"data-closed":b.isOpen()?void 0:""})),isOpen:b.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:h,openTooltip:S,hideTooltip:x,cancelOpening:O,generateId:Yn(()=>r.id),registerContentId:Lt(u),isTargetOnTooltip:I,setTriggerRef:l,setContentRef:f};return m(ep.Provider,{value:M,get children(){return m(ms,Q({anchorRef:c,contentRef:d,onCurrentPlacementChange:C=>{g(C),o.onCurrentPlacementChange?.(C)}},i))}})}function op(e){let t;const n=vs(),[r,o]=we(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=>{He(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},f=y=>{He(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=y=>{He(y,r.onPointerDown),i=!0,nn(t).addEventListener("pointerup",u,{once:!0})},g=y=>{He(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{He(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},h=y=>{He(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ae(()=>{nn(t).removeEventListener("pointerup",u)}),m(Ze,Q({as:"button",ref(y){var v=ft(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:p,onClick:g,onFocus:b,onBlur:h},()=>n.dataset(),o))}var Ko=Object.assign(rp,{Arrow:Qo,Content:tp,Portal:np,Trigger:op});const b2=Ko.Trigger,y2=e=>{const t=Q({gutter:4,flip:!1},e);return m(Ko,t)},v2=e=>{const[t,n]=we(e,["class"]);return m(Ko.Portal,{get children(){return m(Ko.Content,Q({get class(){return Tt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var x2=B('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const w2=e=>m(Cn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return m(Cn.Portal,{get children(){return[m(Cn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(Cn.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[m(Y,{get when(){return e.src},get children(){var t=x2();return le(n=>{var r=e.src,o=e.alt;return r!==n.e&&xe(t,"src",n.e=r),o!==n.t&&xe(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),m(Cn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return m(Yo,{class:"h-4 w-4"})}})]}})]}})}});var _2=B('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),ip=B('<img class="h-full w-full object-cover">'),E2=B('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),k2=B('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),S2=B('<span class="text-xs font-bold text-muted-foreground">'),C2=B('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),A2=B('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),T2=B('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),D2=B('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function O2(e){return e.status==="pending"?`${e.name} · ${D("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${D("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const sp=e=>{const t=e.ctrl,[n,r]=$(),[o,i]=$(),[s,a]=$(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return m(Y,{get when(){return e.compact},get fallback(){return m(R2,e)},get children(){return[(()=>{var c=_2();return w(c,m(yt,{get each(){return t.attachments()},children:l=>(()=>{var d=k2(),f=d.firstChild;return w(d,m(y2,{openDelay:150,closeDelay:0,get children(){return[m(b2,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[m(Y,{get when(){return de(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=S2();return w(p,()=>l.kind==="pdf"?"PDF":"TXT"),p})()},get children(){var p=ip();return le(g=>{var b=l.previewUrl,h=l.name;return b!==g.e&&xe(p,"src",g.e=b),h!==g.t&&xe(p,"alt",g.t=h),g},{e:void 0,t:void 0}),p}}),m(Y,{get when(){return l.status==="pending"},get children(){var p=E2();return w(p,m(sr,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),m(v2,{get children(){return O2(l)}})]}}),f),f.$$click=()=>void t.removeAttachment(l.id),w(f,m(Yo,{class:"h-3 w-3"})),le(p=>{var g=e.busy,b=D("newSpec.deleteAttachment",{name:l.name});return g!==p.e&&(f.disabled=p.e=g),b!==p.t&&xe(f,"aria-label",p.t=b),p},{e:void 0,t:void 0}),d})()})),c})(),m(w2,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},R2=e=>{const t=e.ctrl;return(()=>{var n=C2();return w(n,m(yt,{get each(){return t.attachments()},children:r=>(()=>{var o=A2(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,m(Y,{get when(){return de(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=T2();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=ip();return le(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&xe(u,"src",c.e=l),d!==c.t&&xe(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,m(Y,{get when(){return de(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=D2();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),le(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?D("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&xe(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return m(Ao,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,m(Y,{get when(){return r.status==="pending"},get children(){return[m(sr,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),de(()=>D("newSpec.uploading"))]}}),null),w(a,m(Y,{get when(){return r.status==="failed"},get children(){return D("newSpec.uploadFailed",{error:r.error})}}),null),w(a,m(Y,{get when(){return r.status==="uploaded"},get children(){return[de(()=>Math.round(r.file.size/1024))," KB · ",de(()=>r.kind)]}}),null),w(o,m(Fe,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return D("newSpec.deleteAttachment",{name:r.name})},get children(){return m(Yo,{class:"h-3.5 w-3.5"})}}),null),le(()=>ut(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};ln(["click"]);var ap=["id","name","validationState","required","disabled","readOnly"];function up(e){const t=`form-control-${qt()}`,n=$e({id:t},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),d=(b,h,y)=>{const v=y!=null||r()!=null;return[y,r(),v&&h!=null?b:void 0].filter(Boolean).join(" ")||void 0},f=b=>[a(),c(),b].filter(Boolean).join(" ")||void 0,p=re(()=>({"data-valid":X(n.validationState)==="valid"?"":void 0,"data-invalid":X(n.validationState)==="invalid"?"":void 0,"data-required":X(n.required)?"":void 0,"data-disabled":X(n.disabled)?"":void 0,"data-readonly":X(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>X(n.name)??X(n.id),dataset:p,validationState:()=>X(n.validationState),isRequired:()=>X(n.required),isDisabled:()=>X(n.disabled),isReadOnly:()=>X(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Yn(()=>X(n.id)),registerLabel:Lt(o),registerField:Lt(s),registerDescription:Lt(u),registerErrorMessage:Lt(l)}}}var Yu=mt();function Qn(){const e=lt(Yu);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Zu(e){const t=Qn(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}var N2=["id","aria-label","aria-labelledby","aria-describedby"];function I2(e){const t=Qn(),n=$e({id:t.generateId("field")},e);return oe(()=>ae(t.registerField(X(n.id)))),{fieldProps:{id:()=>X(n.id),ariaLabel:()=>X(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(X(n.id),X(n["aria-label"]),X(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(X(n["aria-describedby"]))}}}function cp(e){let t;const n=Qn(),r=$e({id:n.generateId("label")},e),[o,i]=we(r,["ref"]),s=ls(()=>t,()=>"label");return oe(()=>ae(n.registerLabel(i.id))),m(Ze,Q({as:"label",ref(a){var u=ft(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return de(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function lp(e,t){oe(At(e,n=>{if(n==null)return;const r=M2(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ae(()=>{r.removeEventListener("reset",t)}))}))}function M2(e){return L2(e)?e.form:e.closest("form")}function L2(e){return e.matches("textarea, input, select, button")}function Xu(e){const t=Qn(),n=$e({id:t.generateId("error-message")},e),[r,o]=we(n,["forceMount"]),i=()=>t.validationState()==="invalid";return oe(()=>{i()&&ae(t.registerErrorMessage(o.id))}),m(Y,{get when(){return r.forceMount||i()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}var $2={};vr($2,{Checkbox:()=>lr,Control:()=>fp,Description:()=>gp,ErrorMessage:()=>pp,Indicator:()=>hp,Input:()=>mp,Label:()=>bp,Root:()=>yp,useCheckboxContext:()=>zr});var dp=mt();function zr(){const e=lt(dp);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function fp(e){const t=Qn(),n=zr(),r=$e({id:n.generateId("control")},e),[o,i]=we(r,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:u=>{He(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{He(u,o.onKeyDown),u.key===us.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function gp(e){const t=zr();return m(Zu,Q(()=>t.dataset(),e))}function pp(e){const t=zr();return m(Xu,Q(()=>t.dataset(),e))}function hp(e){const t=Qn(),n=zr(),[r,o]=$(),i=$e({id:n.generateId("indicator")},e),[s,a]=we(i,["ref","forceMount"]),{present:u}=Lr({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return m(Y,{get when(){return u()},get children(){return m(Ze,Q({as:"div",ref(c){var l=ft(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function mp(e){let t;const n=Qn(),r=zr(),o=$e({id:r.generateId("input")},e),[i,s,a]=we(o,["ref","style","onChange","onFocus","onBlur"],N2),{fieldProps:u}=I2(s),[c,l]=$(!1),d=g=>{if(He(g,i.onChange),g.stopPropagation(),!c()){const b=g.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},f=g=>{He(g,i.onFocus),r.setIsFocused(!0)},p=g=>{He(g,i.onBlur),r.setIsFocused(!1)};return oe(At([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(At([()=>t,()=>r.indeterminate(),()=>r.checked()],([g,b])=>{g&&(g.indeterminate=b)})),m(Ze,Q({as:"input",ref(g){var b=ft(h=>{r.setInputRef(h),t=h},i.ref);typeof b=="function"&&b(g)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return yr(Lu,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:f,onBlur:p},()=>n.dataset(),()=>r.dataset(),a))}function bp(e){const t=zr();return m(cp,Q(()=>t.dataset(),e))}function yp(e){let t;const n=`checkbox-${qt()}`,r=$e({value:"on",id:n},e),[o,i,s]=we(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],ap),[a,u]=$(),[c,l]=$(!1),{formControlContext:d}=up(i),f=cg({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:h=>o.onChange?.(h),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});lp(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const p=h=>{He(h,o.onPointerDown),c()&&h.preventDefault()},g=re(()=>({"data-checked":f.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),b={value:()=>o.value,dataset:g,checked:()=>f.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:Yn(()=>X(i.id)),toggle:()=>f.toggle(),setIsChecked:h=>f.setIsSelected(h),setIsFocused:l,setInputRef:u};return m(Yu.Provider,{value:d,get children(){return m(dp.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=ft(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"group",get id(){return X(i.id)},onPointerDown:p},()=>d.dataset(),g,s,{get children(){return m(P2,{state:b,get children(){return o.children}})}}))}})}})}function P2(e){const t=Xi(()=>{const n=e.children;return k0(n)?n(e.state):n});return de(t)}var lr=Object.assign(yp,{Control:fp,Description:gp,ErrorMessage:pp,Indicator:hp,Input:mp,Label:bp}),F2=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const vp=lr.Label,xp=lr;lr.ErrorMessage;lr.Description;const wp=e=>{const[t,n]=we(e,["class","children"]);return[m(lr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),m(lr.Control,Q({get class(){return Tt("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return m(lr.Indicator,{class:"flex items-center justify-center text-current",get children(){return F2()}})}}))]};var B2=B('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),z2=B('<span class="truncate font-medium text-foreground">');const xs=e=>(()=>{var t=B2();return w(t,m(yt,{get each(){return e.items},children:(n,r)=>[m(Y,{get when(){return r()>0},get children(){return m(e1,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),m(Y,{get when(){return n.href},get fallback(){return(()=>{var o=z2();return w(o,()=>n.label),o})()},get children(){return m(fr,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var U2=B('<span class="text-sm text-muted-foreground">'),K2=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),H2=B('<label><input type=radio name=type class=hidden><strong class=" "></strong><span class="text-sm text-muted-foreground">'),q2=B('<p class=" text-destructive">'),j2=B('<p class=" text-muted-foreground">');const G2=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],V2=()=>{const e=es(),t=Zo(),[n,r]=$(""),[o,i]=$("feat"),[s,a]=$("idle"),[u,c]=$(!1),l=()=>s()==="creating",d=Qg({projectId:t}),f=d.error,p=d.setError;let g=null,b=null,h=new Set,y="",v=!1,x;ae(()=>{g?.(),b?.()});async function k(){if(v)return;const S=y||t();try{const _=(await Be.listSpecs(S)).find(I=>!h.has(I.id));if(_){v=!0,g?.(),g=null,b?.(),b=null;const I=S?`/${S}/specs/${encodeURIComponent(_.id)}`:en(`specs/${encodeURIComponent(_.id)}`);e(I)}}catch{}}async function E(S){if(S.preventDefault(),s()==="creating")return;p(null);const O=n().trim();if(O.length<5){p(D("newSpec.descTooShort"));return}const _=d.attachments().filter(I=>I.status==="failed");if(_.length>0){p(D("newSpec.attachmentFailedCount",{count:_.length}));return}if(d.hasPending()){p(D("newSpec.attachmentUploading"));return}a("creating"),v=!1;try{const I=t();let L=I;if(u()){const N=W2(O);L=(await Be.createWorktree(I,{specSlug:N})).id}y=L;const T=await Be.listSpecs(L);h=new Set(T.map(N=>N.id));const R={type:o(),requirement:O},M=d.draftId();M&&(R.draftId=M);const C=await Be.createSpec(L,R);"draft"in C&&C.draft?(Qr(C.sessionId),b=as(L,C.sessionId,{onEvent:N=>{N.type==="error"&&(a("failed"),p(N.message||D("newSpec.agentRunFailed")),b?.(),b=null)}}),g=i0(L,()=>{k()}),k()):"id"in C&&e(`/${L}/specs/${encodeURIComponent(C.id)}`)}catch(I){p(I.message),a("failed")}}return(()=>{var S=K2(),O=S.firstChild,_=O.nextSibling,I=_.nextSibling,L=I.firstChild,T=L.firstChild,R=L.nextSibling,M=R.firstChild,C=R.nextSibling,N=C.firstChild,F=N.firstChild,G=F.nextSibling,U=G.nextSibling;w(O,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:D("breadcrumb.newSpec")}]}})),w(_,()=>D("newSpec.description")),I.addEventListener("submit",E),w(T,()=>D("newSpec.type")),w(L,()=>G2.map(P=>(()=>{var Z=H2(),V=Z.firstChild,te=V.nextSibling,W=te.nextSibling;return V.addEventListener("change",()=>i(P.value)),w(te,()=>D(P.labelKey)),w(W,()=>D(P.hintKey)),le(H=>{var ie=`flex min-h-[44px] flex-1 cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===P.value?"border-primary bg-primary/10":"border-border bg-background"}`,me=l();return ie!==H.e&&ut(Z,H.e=ie),me!==H.t&&(V.disabled=H.t=me),H},{e:void 0,t:void 0}),le(()=>V.value=P.value),le(()=>V.checked=o()===P.value),Z})()),null),w(I,m(xp,{get checked(){return u()},onChange:P=>c(P),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[m(wp,{}),m(vp,{class:"cursor-pointer font-medium",get children(){return D("newSpec.parallelWorktree")}}),(()=>{var P=U2();return w(P,()=>D("newSpec.parallelWorktreeDesc")),P})()]}}),R),w(M,()=>D("newSpec.requirement")),w(R,m(Jg,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return D("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Ni(C,"paste",d.onPaste),w(F,()=>D("newSpec.attachments")),w(G,()=>D("newSpec.attachmentsHint",{count:d.count(),max:to})),w(N,m(Fe,{variant:"outline",size:"sm",type:"button",onClick:()=>x?.click(),get disabled(){return l()||d.count()>=to},get children(){return[m(Y1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("newSpec.importAttachment"))]}}),U),Ni(U,"change",d.onFileInputChange);var z=x;return typeof z=="function"?Gn(z,U):x=U,xe(U,"accept",Xg),w(C,m(Y,{get when(){return d.count()>0},get children(){return m(sp,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(I,(()=>{var P=de(()=>!!f());return()=>P()&&(()=>{var Z=q2();return w(Z,f),Z})()})(),null),w(I,m(Fe,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[de(()=>de(()=>!!l())()?m(sr,{class:"mr-1 h-4 w-4 animate-spin"}):m(os,{class:"mr-1 h-4 w-4"})),de(()=>de(()=>!!l())()?D("newSpec.creating"):D("newSpec.createAndStart"))]}}),null),w(I,(()=>{var P=de(()=>!!l());return()=>P()&&(()=>{var Z=j2();return w(Z,()=>D("newSpec.creatingHint")),Z})()})(),null),le(()=>L.disabled=l()),S})()};function W2(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}var jl=11;function Y2(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===jl||e.nodeType===jl)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var vi,Z2="http://www.w3.org/1999/xhtml",Ht=typeof document>"u"?void 0:document,X2=!!Ht&&"content"in Ht.createElement("template"),Q2=!!Ht&&Ht.createRange&&"createContextualFragment"in Ht.createRange();function J2(e){var t=Ht.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function eE(e){vi||(vi=Ht.createRange(),vi.selectNode(Ht.body));var t=vi.createContextualFragment(e);return t.childNodes[0]}function tE(e){var t=Ht.createElement("body");return t.innerHTML=e,t.childNodes[0]}function nE(e){return e=e.trim(),X2?J2(e):Q2?eE(e):tE(e)}function xi(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function rE(e,t){return!t||t===Z2?Ht.createElement(e):Ht.createElementNS(t,e)}function oE(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Ws(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Gl={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Ws(e,t,"selected")},INPUT:function(e,t){Ws(e,t,"checked"),Ws(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},yo=1,Vl=11,Wl=3,Yl=8;function rr(){}function iE(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function sE(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=Ht.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=Ht.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=nE(r);else r.nodeType===Vl&&(r=r.firstElementChild);var u=o.getNodeKey||iE,c=o.onBeforeNodeAdded||rr,l=o.onNodeAdded||rr,d=o.onBeforeElUpdated||rr,f=o.onElUpdated||rr,p=o.onBeforeNodeDiscarded||rr,g=o.onNodeDiscarded||rr,b=o.onBeforeElChildrenUpdated||rr,h=o.skipFromChildren||rr,y=o.addChild||function(z,P){return z.appendChild(P)},v=o.childrenOnly===!0,x=Object.create(null),k=[];function E(z){k.push(z)}function S(z,P){if(z.nodeType===yo)for(var Z=z.firstChild;Z;){var V=void 0;P&&(V=u(Z))?E(V):(g(Z),Z.firstChild&&S(Z,P)),Z=Z.nextSibling}}function O(z,P,Z){p(z)!==!1&&(P&&P.removeChild(z),g(z),S(z,Z))}function _(z){if(z.nodeType===yo||z.nodeType===Vl)for(var P=z.firstChild;P;){var Z=u(P);Z&&(x[Z]=P),_(P),P=P.nextSibling}}_(n);function I(z){l(z);for(var P=z.firstChild;P;){var Z=P.nextSibling,V=u(P);if(V){var te=x[V];te&&xi(P,te)?(P.parentNode.replaceChild(te,P),T(te,P)):I(P)}else I(P);P=Z}}function L(z,P,Z){for(;P;){var V=P.nextSibling;(Z=u(P))?E(Z):O(P,z,!0),P=V}}function T(z,P,Z){var V=u(P);if(V&&delete x[V],!Z){var te=d(z,P);if(te===!1||(te instanceof HTMLElement&&(z=te,_(z)),e(z,P),f(z),b(z,P)===!1))return}z.nodeName!=="TEXTAREA"?R(z,P):Gl.TEXTAREA(z,P)}function R(z,P){var Z=h(z,P),V=P.firstChild,te=z.firstChild,W,H,ie,me,J;e:for(;V;){for(me=V.nextSibling,W=u(V);!Z&&te;){if(ie=te.nextSibling,V.isSameNode&&V.isSameNode(te)){V=me,te=ie;continue e}H=u(te);var pe=te.nodeType,Se=void 0;if(pe===V.nodeType&&(pe===yo?(W?W!==H&&((J=x[W])?ie===J?Se=!1:(z.insertBefore(J,te),H?E(H):O(te,z,!0),te=J,H=u(te)):Se=!1):H&&(Se=!1),Se=Se!==!1&&xi(te,V),Se&&T(te,V)):(pe===Wl||pe==Yl)&&(Se=!0,te.nodeValue!==V.nodeValue&&(te.nodeValue=V.nodeValue))),Se){V=me,te=ie;continue e}H?E(H):O(te,z,!0),te=ie}if(W&&(J=x[W])&&xi(J,V))Z||y(z,J),T(J,V);else{var Ne=c(V);Ne!==!1&&(Ne&&(V=Ne),V.actualize&&(V=V.actualize(z.ownerDocument||Ht)),y(z,V),I(V))}V=me,te=ie}L(z,te,H);var Xe=Gl[z.nodeName];Xe&&Xe(z,P)}var M=n,C=M.nodeType,N=r.nodeType;if(!v){if(C===yo)N===yo?xi(n,r)||(g(n),M=oE(n,rE(r.nodeName,r.namespaceURI))):M=r;else if(C===Wl||C===Yl){if(N===C)return M.nodeValue!==r.nodeValue&&(M.nodeValue=r.nodeValue),M;M=r}}if(M===r)g(n);else{if(r.isSameNode&&r.isSameNode(M))return;if(T(M,r,v),k)for(var F=0,G=k.length;F<G;F++){var U=x[k[F]];U&&O(U,U.parentNode,!1)}}return!v&&M!==n&&n.parentNode&&(M.actualize&&(M=M.actualize(n.ownerDocument||Ht)),n.parentNode.replaceChild(M,n)),M}}var aE=sE(Y2);const Zl={};function uE(e){let t=Zl[e];if(t)return t;t=Zl[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function io(e,t){typeof t!="string"&&(t=io.defaultChars);const n=uE(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let d=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}io.defaultChars=";/?:@&=+$,#";io.componentChars="";const Xl={};function cE(e){let t=Xl[e];if(t)return t;t=Xl[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function ti(e,t,n){typeof t!="string"&&(n=t,t=ti.defaultChars),typeof n>"u"&&(n=!0);const r=cE(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}ti.defaultChars=";/?:@&=+$,-_.!~*'()#";ti.componentChars="-_.!~*'()";function Qu(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Gi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const lE=/^([a-z0-9.+-]+:)/i,dE=/:[0-9]*$/,fE=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,gE=["<",">",'"',"`"," ","\r",`
|
|
644
|
-
`," "],pE=["{","}","|","\\","^","`"].concat(gE),hE=["'"].concat(pE),Ql=["%","/","?",";","#"].concat(hE),Jl=["/","?","#"],mE=255,ed=/^[+a-z0-9A-Z_-]{0,63}$/,bE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,td={javascript:!0,"javascript:":!0},nd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ju(e,t){if(e&&e instanceof Gi)return e;const n=new Gi;return n.parse(e,t),n}Gi.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=fE.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=lE.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&td[s])&&(i=i.substr(2),this.slashes=!0)),!td[s]&&(o||s&&!nd[s])){let c=-1;for(let g=0;g<Jl.length;g++)r=i.indexOf(Jl[g]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let g=0;g<Ql.length;g++)r=i.indexOf(Ql[g]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const f=i.slice(0,c);i=i.slice(c),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let b=0,h=g.length;b<h;b++){const y=g[b];if(y&&!y.match(ed)){let v="";for(let x=0,k=y.length;x<k;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(ed)){const x=g.slice(0,b),k=g.slice(b+1),E=y.match(bE);E&&(x.push(E[1]),k.unshift(E[2])),k.length&&(i=k.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>mE&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),nd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Gi.prototype.parseHost=function(e){let t=dE.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const yE=Object.freeze(Object.defineProperty({__proto__:null,decode:io,encode:ti,format:Qu,parse:Ju},Symbol.toStringTag,{value:"Module"})),_p=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ep=/[\0-\x1F\x7F-\x9F]/,vE=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,ec=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,kp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Sp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,xE=Object.freeze(Object.defineProperty({__proto__:null,Any:_p,Cc:Ep,Cf:vE,P:ec,S:kp,Z:Sp},Symbol.toStringTag,{value:"Module"})),wE=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),_E=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ys;const EE=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),kE=(Ys=String.fromCodePoint)!==null&&Ys!==void 0?Ys:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function SE(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=EE.get(e))!==null&&t!==void 0?t:e}var It;(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"})(It||(It={}));const CE=32;var ar;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ar||(ar={}));function yu(e){return e>=It.ZERO&&e<=It.NINE}function AE(e){return e>=It.UPPER_A&&e<=It.UPPER_F||e>=It.LOWER_A&&e<=It.LOWER_F}function TE(e){return e>=It.UPPER_A&&e<=It.UPPER_Z||e>=It.LOWER_A&&e<=It.LOWER_Z||yu(e)}function DE(e){return e===It.EQUALS||TE(e)}var Dt;(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"})(Dt||(Dt={}));var Hn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Hn||(Hn={}));class OE{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Hn.Strict}startEntity(t){this.decodeMode=t,this.state=Dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Dt.EntityStart:return t.charCodeAt(n)===It.NUM?(this.state=Dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Dt.NamedEntity,this.stateNamedEntity(t,n));case Dt.NumericStart:return this.stateNumericStart(t,n);case Dt.NumericDecimal:return this.stateNumericDecimal(t,n);case Dt.NumericHex:return this.stateNumericHex(t,n);case Dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|CE)===It.LOWER_X?(this.state=Dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Dt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yu(o)||AE(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yu(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===It.SEMI)this.consumed+=1;else if(this.decodeMode===Hn.Strict)return 0;return this.emitCodePoint(SE(this.result),this.consumed),this.errors&&(t!==It.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=RE(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Hn.Attribute&&(i===0||DE(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14,i!==0){if(s===It.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Hn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&ar.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~ar.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Dt.NamedEntity:return this.result!==0&&(this.decodeMode!==Hn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dt.NumericDecimal:return this.emitNumericEntity(0,2);case Dt.NumericHex:return this.emitNumericEntity(0,3);case Dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dt.EntityStart:return 0}}}function Cp(e){let t="";const n=new OE(e,r=>t+=kE(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function RE(e,t,n,r){const o=(t&ar.BRANCH_LENGTH)>>7,i=t&ar.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const Ap=Cp(wE);Cp(_E);function NE(e,t=Hn.Legacy){return Ap(e,t)}function IE(e){return Ap(e,Hn.Strict)}function ME(e){return Object.prototype.toString.call(e)}function tc(e){return ME(e)==="[object String]"}const LE=Object.prototype.hasOwnProperty;function $E(e,t){return LE.call(e,t)}function ws(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Tp(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function nc(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ho(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Dp=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,PE=/&([a-z#][a-z0-9]{1,31});/gi,FE=new RegExp(Dp.source+"|"+PE.source,"gi"),BE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function zE(e,t){if(t.charCodeAt(0)===35&&BE.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return nc(r)?Ho(r):e}const n=NE(e);return n!==e?n:e}function UE(e){return e.indexOf("\\")<0?e:e.replace(Dp,"$1")}function so(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(FE,function(t,n,r){return n||zE(t,r)})}const KE=/[&<>"]/,HE=/[&<>"]/g,qE={"&":"&","<":"<",">":">",'"':"""};function jE(e){return qE[e]}function mr(e){return KE.test(e)?e.replace(HE,jE):e}const GE=/[.?*+^$[\]\\(){}|-]/g;function VE(e){return e.replace(GE,"\\$&")}function ct(e){switch(e){case 9:case 32:return!0}return!1}function qo(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Op(e){return ec.test(e)||kp.test(e)}function jo(e){return Op(Ho(e))}function Go(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function _s(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function rd(e){return e===32||e===9||e===10||e===13}function Es(e){let t=0;for(;t<e.length&&rd(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&rd(e.charCodeAt(n));n--);return e.slice(t,n+1)}const WE={mdurl:yE,ucmicro:xE},YE=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Tp,asciiTrim:Es,assign:ws,escapeHtml:mr,escapeRE:VE,fromCodePoint:Ho,has:$E,isMdAsciiPunct:Go,isPunctChar:Op,isPunctCharCode:jo,isSpace:ct,isString:tc,isValidEntityCode:nc,isWhiteSpace:qo,lib:WE,normalizeReference:_s,unescapeAll:so,unescapeMd:UE},Symbol.toStringTag,{value:"Module"}));function ZE(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function XE(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=so(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=so(e.slice(t,o)),i.pos=o,i.ok=!0),i}function QE(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=so(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=so(e.slice(t,i)),s}const JE=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:XE,parseLinkLabel:ZE,parseLinkTitle:QE},Symbol.toStringTag,{value:"Module"})),$n={};$n.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+mr(i.content)+"</code>"};$n.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+mr(e[t].content)+`</code></pre>
|
|
645
|
-
`}
|
|
643
|
+
*/ln(["pointerdown","pointerup","pointermove","click","mousemove"]);const H_=e=>m(K_,Q({class:"toaster group",toastOptions:{classes:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},e));var q_=B('<span class=" text-muted-foreground">'),j_=B('<span class=" text-destructive">'),G_=B('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),V_=B('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),ql=B('<p class=" text-destructive">'),W_=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),Y_=B('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><h1 class="m-0 text-xl">'),Z_=B('<p class=" text-muted-foreground">'),X_=B('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),Q_=B('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),J_=B('<h2 class="my-1.5 text-base font-semibold">'),e2=B('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),t2=B('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),n2=B('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),jl=B("<span>."),r2=B("<span>");const o2={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},i2={feat:"text-emerald-600 dark:text-emerald-400",refct:"text-sky-600 dark:text-sky-400",fix:"text-rose-600 dark:text-rose-400"};function s2(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const a2=()=>{const e=os(),t=Xo(),[n,{refetch:r}]=bn(t,O=>O?Fe.listSpecs(O):Promise.resolve([])),[o,{refetch:i}]=bn(()=>Fe.listProjects()),s=re(()=>(o()??[]).find(O=>O.id===t())),a=re(()=>{const O=s();return O?.worktree?(o()??[]).some(N=>N.id===O.worktree.mainProjectId):!0}),u=re(()=>{const O=s();return O?.worktree?`feat(${O.worktree.branch}): merge from worktree`:""}),[c,l]=L(!1),[d,f]=L(null),[p,g]=L(!1),[b,h]=L(""),[y,v]=L(null),[x,k]=L(!1),[C,E]=L(null);cs(()=>p()||y()!==null);let T=null;oe(()=>{const O=t();T?.(),T=null,O&&(T=u0(O,()=>{r()}))}),Vt(()=>{const O=c0(()=>{(async()=>{const N=s()?.worktree?.mainProjectId??null;await i();const M=t();!M||(o()??[]).some(I=>I.id===M)||N&&e(`/${encodeURIComponent(N)}`)})()});ae(O)}),ae(()=>{T?.(),T=null});function _(){s()?.worktree&&a()&&(h(u()),f(null),g(!0))}async function R(){const O=s();if(!O?.worktree||!a())return;const N=b().trim()||u();l(!0),f(null);try{const M=await Fe.mergeWorktreeToMain(O.id,{commitMessage:N});g(!1),M.status==="merged"?(hn.success(S("home.merged")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}`)):(hn.info(S("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}/specs/${encodeURIComponent(M.conflictSpecId)}`))}catch(M){f(M.message)}finally{l(!1)}}async function $(O){const N=t();if(N){k(!0),E(null);try{await Fe.deleteSpec(N,O),v(null),await r()}catch(M){E(M.message)}finally{k(!1)}}}return(()=>{var O=Y_(),N=O.firstChild,M=N.firstChild;return w(M,()=>S("home.specList")),w(N,m(hs,{}),null),w(O,m(W,{get when(){return s()?.worktree},get children(){var A=G_(),I=A.firstChild,F=I.firstChild;return w(F,()=>S("home.mainProject"),null),w(F,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(A,m(Pe,{variant:"default",size:"sm",onClick:_,get disabled(){return c()||!a()},get title(){return de(()=>!!a())()?S("home.mergeHint"):S("home.mainUnreachable")},get children(){return[m(v1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!c())()?S("home.merging"):S("home.mergeToMain"))]}}),null),w(A,m(W,{get when(){return!a()},get children(){var G=q_();return w(G,()=>S("home.mainUnreachable")),G}}),null),w(A,m(W,{get when(){return d()},get children(){var G=j_();return w(G,d),G}}),null),A}}),null),w(O,m(rs,{get fallback(){return(()=>{var A=Z_();return w(A,()=>S("common.loading")),A})()},get children(){return m(W,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var A=X_(),I=A.firstChild;return w(I,()=>S("home.noSpecs")),w(A,m(Pe,{as:fr,get href(){return en("specs/new")},variant:"default",size:"sm",get children(){return[m(Nu,{class:"mr-1 h-4 w-4"}),de(()=>S("home.createFirst"))]}}),null),A})()},get children(){var A=V_();return w(A,m(vt,{get each(){return n()??[]},children:I=>{const F=s2(I.id);return(()=>{var G=n2(),U=G.firstChild;return w(G,m(fr,{get href(){return en(`specs/${encodeURIComponent(I.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var z=Q_(),P=z.firstChild;return w(z,m($0,{get class(){return`border-transparent ${o2[I.stage]??"bg-muted"} text-white uppercase`},get children(){return I.stage}}),P),w(P,()=>l0(I.updated_at)),z})(),(()=>{var z=J_();return w(z,()=>I.title||S("common.pendingAgent")),z})(),(()=>{var z=e2();return w(z,()=>I.summary||S("common.pendingAgent")),z})(),(()=>{var z=t2();return w(z,m(W,{when:F,get fallback(){return I.id},children:P=>[(()=>{var Z=jl(),V=Z.firstChild;return w(Z,()=>P().prefix,V),Z})(),(()=>{var Z=r2();return w(Z,()=>P().type),le(()=>ut(Z,`font-semibold ${i2[P().type]??"text-foreground"}`)),Z})(),(()=>{var Z=jl();return Z.firstChild,w(Z,()=>P().suffix,null),Z})()]})),z})()]}}),U),w(U,m(Ug,{placement:"bottom-end",get children(){return[m(zg,{as:Pe,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return S("home.moreActions")},get children(){return m(g1,{class:"h-4 w-4"})}}),m(Kg,{get children(){return m(To,{class:"text-destructive focus:text-destructive",onSelect:()=>v(I.id),get children(){return S("common.delete")}})}})]}})),G})()}})),A}})}}),null),w(O,m(pn,{get open(){return p()},onOpenChange:A=>{g(A),A||f(null)},get children(){return m(oo,{class:"max-w-md",get children(){return[m(so,{get children(){return[m(io,{get children(){return S("home.mergeDialogTitle")}}),m(Xu,{get children(){return S("home.mergeDialogDescription")}})]}}),(()=>{var A=W_(),I=A.firstChild;return A.addEventListener("submit",F=>{F.preventDefault(),R()}),w(I,()=>S("home.mergeCommitMessage"),null),w(I,m(No,{id:"merge-commit-message",get value(){return b()},onInput:F=>h(F.currentTarget.value),get disabled(){return c()}}),null),w(A,m(W,{get when(){return d()},get children(){var F=ql();return w(F,d),F}}),null),w(A,m(ao,{get children(){return[m(Pe,{type:"button",variant:"outline",onClick:()=>g(!1),get disabled(){return c()},get children(){return S("common.cancel")}}),m(Pe,{type:"submit",get disabled(){return c()||!a()},get children(){return de(()=>!!c())()?S("home.merging"):S("home.mergeToMain")}})]}}),null),A})()]}})}}),null),w(O,m(pn,{get open(){return y()!==null},onOpenChange:A=>{A||(v(null),E(null))},get children(){return m(oo,{class:"max-w-sm",get children(){return[m(so,{get children(){return m(io,{get children(){return S("home.confirmDeleteSpec")}})}}),m(W,{get when(){return C()},get children(){var A=ql();return w(A,C),A}}),m(ao,{get children(){return[m(Pe,{variant:"outline",onClick:()=>v(null),get disabled(){return x()},get children(){return S("common.cancel")}}),m(Pe,{variant:"destructive",onClick:()=>y()&&void $(y()),get disabled(){return x()},get children(){return de(()=>!!x())()?S("common.deleting"):S("common.confirmDelete")}})]}})]}})}}),null),O})()},ep="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",u2=5*1024*1024,to=10,c2=new Set(["application/pdf","text/plain","text/markdown"]);function l2(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 d2(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 Gl(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function f2(){return Math.random().toString(36).slice(2,8)}function tp(e){const[t,n]=L([]),[r,o]=L(null),[i,s]=L(null),[a,u]=L(null),[c,l]=L(""),d=re(()=>t().length),f=re(()=>t().some($=>$.status==="pending")),p=re(()=>t().some($=>$.status==="failed"));ae(()=>{for(const $ of t())$.previewUrl&&URL.revokeObjectURL($.previewUrl)});async function g(){const $=r();if($)return $;const{draftId:O}=await Fe.createDraft(e.projectId());return o(O),O}function b($){n(O=>[...O,$])}function h($,O){n(N=>N.map(M=>M.id===$?{...M,...O}:M))}function y($){n(O=>{const N=[];for(const M of O){if(M.id===$){M.previewUrl&&URL.revokeObjectURL(M.previewUrl);continue}N.push(M)}return N})}async function v($){s(null);const O=t(),N=to-O.length;if(N<=0){s(S("newSpec.attachmentLimit",{max:to}));return}const M=[];for(const A of $.slice(0,N)){const I=d2(A),F=l2(I);if(!F){s(S("newSpec.unsupportedType",{name:I.name}));continue}if(F!=="image"&&!c2.has(I.type)){s(S("newSpec.unsupportedMime",{mime:I.type||"(unknown)"}));continue}if(I.size>u2){s(S("newSpec.fileTooLarge",{name:I.name}));continue}const G=`att-${Date.now()}-${f2()}`,U=F==="image"?URL.createObjectURL(I):void 0;M.push({id:G,file:I,name:I.name,kind:F,previewUrl:U,status:"pending"})}if(M.length!==0){$.length>N&&s(S("newSpec.attachmentRoomLimit",{room:N,current:O.length,max:to}));for(const A of M)b(A);try{const A=await g();for(const I of M)try{const F=await Fe.uploadAttachment(e.projectId(),A,I.file);h(I.id,{storedName:F.storedName,name:F.storedName,status:"uploaded"})}catch(F){h(I.id,{status:"failed",error:F.message})}}catch(A){s(A.message);for(const I of M)h(I.id,{status:"failed",error:A.message})}}}async function x($){const O=$.currentTarget;if(!O.files)return;const N=Array.from(O.files);O.value="",await v(N)}async function k($){const O=$.clipboardData?.items;if(!O)return;const N=[];for(const M of Array.from(O))if(M.kind==="file"&&M.type.startsWith("image/")){const A=M.getAsFile();A&&N.push(A)}N.length!==0&&($.preventDefault(),await v(N))}async function C($){const O=t().find(N=>N.id===$);if(O){if(O.storedName&&r())try{await Fe.deleteAttachment(e.projectId(),r(),O.storedName)}catch(N){s(N.message)}y($)}}function E($){l(Gl($.name)),u($.id)}async function T($){const O=c().trim();if(u(null),!(!O||!$.storedName||!r())&&O!==Gl($.name))try{const N=await Fe.renameAttachment(e.projectId(),r(),$.storedName,O);h($.id,{storedName:N.storedName,name:N.storedName})}catch(N){s(N.message)}}function _(){u(null)}function R(){const $=At(t);for(const O of $)O.previewUrl&&URL.revokeObjectURL(O.previewUrl);$.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:f,hasFailed:p,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:v,onFileInputChange:x,onPaste:k,removeAttachment:C,beginRename:E,commitRename:T,cancelRename:_,reset:R}}var g2=B("<textarea>");const uo=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=g2();return Wn(r,Q({get class(){return Et("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 p2=B('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),h2=B('<div class="relative w-full">'),m2=B("<li><button type=button>");const b2=150,y2=150,v2=2,x2=10,Vl=1.5,np=e=>{const[t,n]=L(!1),[r,o]=L([]),[i,s]=L(0);let a,u=[],c=-1,l="",d=null,f=null;const p=()=>e.autosize!==!1,g=()=>e.minRows??v2,b=()=>e.maxRows??x2;ae(()=>{d&&clearTimeout(d),f&&clearTimeout(f)});function h(){if(!a||!p())return;const T=getComputedStyle(a),_=parseFloat(T.fontSize)||14,R=T.lineHeight==="normal"?_*Vl:parseFloat(T.lineHeight)||_*Vl,$=parseFloat(T.paddingTop)+parseFloat(T.paddingBottom)+parseFloat(T.borderTopWidth)+parseFloat(T.borderBottomWidth),O=R*g()+$,N=R*b()+$;a.style.height="auto";const M=Math.min(Math.max(a.scrollHeight,O),N);a.style.height=`${M}px`,a.style.overflowY=a.scrollHeight>N?"auto":"hidden"}Vt(h),oe(Tt(()=>e.value,h));function y(){n(!1),o([]),s(0),c=-1,l="",u=[],d&&(clearTimeout(d),d=null)}function v(T){d&&clearTimeout(d),d=setTimeout(async()=>{const _=e.projectId;if(_)try{const R=await Fe.listFiles(_,T);u=[],o(R.items),s(0)}catch{o([])}},b2)}function x(T){const _=T.selectionStart,R=T.value.slice(0,_),$=R.lastIndexOf("@");if($===-1){y();return}if($>0&&!/\s/.test(R[$-1])){y();return}const O=R.slice($+1);if(!/^[\w./@-]*$/.test(O)){y();return}c=$,l=O,t()||n(!0),v(O)}function k(T){const _=e.value,R=_.slice(0,c),$=_.slice(c+1+l.length),O=`@${T}`;e.onValueChange(R+O+$),y();const N=R.length+O.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(N,N),h())})}function C(){u[i()]?.scrollIntoView({block:"nearest"})}function E(T){const _=r();if(t()&&_.length>0){if(T.key==="ArrowDown"){T.preventDefault(),s(R=>(R+1)%_.length),requestAnimationFrame(C);return}if(T.key==="ArrowUp"){T.preventDefault(),s(R=>(R-1+_.length)%_.length),requestAnimationFrame(C);return}if(T.key==="Enter"||T.key==="Tab"){if(!T.isComposing){T.preventDefault(),k(_[i()]);return}}else if(T.key==="Escape"){T.preventDefault(),y();return}}e.onKeyDown?.(T)}return(()=>{var T=h2();return w(T,m(uo,{ref(_){var R=a;typeof R=="function"?R(_):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 Et(p()&&"resize-none",e.class)},onInput:_=>{e.onValueChange(_.currentTarget.value),x(_.currentTarget),h()},onKeyDown:E,onPaste:_=>e.onPaste?.(_),onBlur:()=>{f&&clearTimeout(f),f=setTimeout(y,y2)}}),null),w(T,m(W,{get when(){return de(()=>!!t())()&&r().length>0},get children(){var _=p2();return w(_,m(vt,{get each(){return r()},children:(R,$)=>(()=>{var O=m2(),N=O.firstChild;return Vn(M=>u[$()]=M,O),N.$$mousedown=M=>{M.preventDefault(),k(R)},N.addEventListener("mouseenter",()=>s($())),xe(N,"title",R),w(N,R),le(()=>ut(N,Et("block w-full overflow-hidden text-ellipsis whitespace-nowrap border-0 px-3 py-1.5 text-left text-sm",i()===$()?"bg-primary text-primary-foreground":"bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"))),O})()})),_}}),null),T})()};ln(["mousedown"]);var w2={};vr(w2,{Arrow:()=>Jo,Content:()=>op,Portal:()=>ip,Root:()=>sp,Tooltip:()=>Ho,Trigger:()=>ap,useTooltipContext:()=>Es});var rp=bt();function Es(){const e=lt(rp);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function op(e){const t=Es(),n=$e({id:t.generateId("content")},e),[r,o]=we(n,["ref","style"]);return oe(()=>ae(t.registerContentId(o.id))),m(W,{get when(){return t.contentPresent()},get children(){return m(xs.Positioner,{get children(){return m(Vu,Q({ref(i){var s=gt(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return yr({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function ip(e){const t=Es();return m(W,{get when(){return t.contentPresent()},get children(){return m(Tu,e)}})}function _2(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 Sr={},E2=0,jr=!1,Kn,wo,Gr;function sp(e){const t=`tooltip-${qt()}`,n=`${++E2}`,r=$e({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=we(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=L(),[c,l]=L(),[d,f]=L(),[p,g]=L(i.placement),b=ti({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:A=>o.onOpenChange?.(A)}),{present:h}=Lr({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{Sr[n]=x},v=()=>{for(const A in Sr)A!==n&&(Sr[A](!0),delete Sr[A])},x=(A=!1)=>{A||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(Kn),Kn=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Gr=window.setTimeout(()=>{window.clearTimeout(Gr),Gr=void 0},o.skipDelayDuration)),jr&&(window.clearTimeout(wo),wo=window.setTimeout(()=>{delete Sr[n],wo=void 0,jr=!1},o.closeDelay))},k=()=>{clearTimeout(s),s=void 0,v(),y(),jr=!0,b.open(),window.clearTimeout(Kn),Kn=void 0,window.clearTimeout(wo),wo=void 0,window.clearTimeout(Gr),Gr=void 0},C=()=>{v(),y(),!b.isOpen()&&!Kn&&!jr?Kn=window.setTimeout(()=>{Kn=void 0,jr=!0,k()},o.openDelay):b.isOpen()||k()},E=(A=!1)=>{!A&&o.openDelay&&o.openDelay>0&&!s&&!Gr?C():k()},T=()=>{window.clearTimeout(Kn),Kn=void 0,jr=!1},_=()=>{window.clearTimeout(s),s=void 0},R=A=>Bt(c(),A)||Bt(d(),A),$=A=>{const I=c(),F=d();if(!(!I||!F))return _2(A,I,F)},O=A=>{const I=A.target;if(R(I)){_();return}if(!o.ignoreSafeArea){const F=$(p());if(F&&I0(Tv(A),F)){_();return}}s||x()};oe(()=>{if(!b.isOpen())return;const A=nn();A.addEventListener("pointermove",O,!0),ae(()=>{A.removeEventListener("pointermove",O,!0)})}),oe(()=>{const A=c();if(!A||!b.isOpen())return;const I=G=>{const U=G.target;Bt(U,A)&&x(!0)},F=T0();F.addEventListener("scroll",I,{capture:!0}),ae(()=>{F.removeEventListener("scroll",I,{capture:!0})})}),ae(()=>{clearTimeout(s),Sr[n]&&delete Sr[n]});const M={dataset:re(()=>({"data-expanded":b.isOpen()?"":void 0,"data-closed":b.isOpen()?void 0:""})),isOpen:b.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:h,openTooltip:E,hideTooltip:x,cancelOpening:T,generateId:Yn(()=>r.id),registerContentId:Lt(u),isTargetOnTooltip:R,setTriggerRef:l,setContentRef:f};return m(rp.Provider,{value:M,get children(){return m(xs,Q({anchorRef:c,contentRef:d,onCurrentPlacementChange:A=>{g(A),o.onCurrentPlacementChange?.(A)}},i))}})}function ap(e){let t;const n=Es(),[r,o]=we(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=>{He(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},f=y=>{He(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=y=>{He(y,r.onPointerDown),i=!0,nn(t).addEventListener("pointerup",u,{once:!0})},g=y=>{He(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{He(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},h=y=>{He(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ae(()=>{nn(t).removeEventListener("pointerup",u)}),m(Ze,Q({as:"button",ref(y){var v=gt(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return de(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:p,onClick:g,onFocus:b,onBlur:h},()=>n.dataset(),o))}var Ho=Object.assign(sp,{Arrow:Jo,Content:op,Portal:ip,Trigger:ap});const k2=Ho.Trigger,C2=e=>{const t=Q({gutter:4,flip:!1},e);return m(Ho,t)},S2=e=>{const[t,n]=we(e,["class"]);return m(Ho.Portal,{get children(){return m(Ho.Content,Q({get class(){return Et("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 A2=B('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const T2=e=>m(pn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return m(pn.Portal,{get children(){return[m(pn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),m(pn.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[m(W,{get when(){return e.src},get children(){var t=A2();return le(n=>{var r=e.src,o=e.alt;return r!==n.e&&xe(t,"src",n.e=r),o!==n.t&&xe(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),m(pn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return m(Zo,{class:"h-4 w-4"})}})]}})]}})}});var D2=B('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),up=B('<img class="h-full w-full object-cover">'),O2=B('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),R2=B('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),N2=B('<span class="text-xs font-bold text-muted-foreground">'),I2=B('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),M2=B('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),L2=B('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),$2=B('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function P2(e){return e.status==="pending"?`${e.name} · ${S("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${S("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const cp=e=>{const t=e.ctrl,[n,r]=L(),[o,i]=L(),[s,a]=L(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return m(W,{get when(){return e.compact},get fallback(){return m(F2,e)},get children(){return[(()=>{var c=D2();return w(c,m(vt,{get each(){return t.attachments()},children:l=>(()=>{var d=R2(),f=d.firstChild;return w(d,m(C2,{openDelay:150,closeDelay:0,get children(){return[m(k2,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[m(W,{get when(){return de(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=N2();return w(p,()=>l.kind==="pdf"?"PDF":"TXT"),p})()},get children(){var p=up();return le(g=>{var b=l.previewUrl,h=l.name;return b!==g.e&&xe(p,"src",g.e=b),h!==g.t&&xe(p,"alt",g.t=h),g},{e:void 0,t:void 0}),p}}),m(W,{get when(){return l.status==="pending"},get children(){var p=O2();return w(p,m(sr,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),m(S2,{get children(){return P2(l)}})]}}),f),f.$$click=()=>void t.removeAttachment(l.id),w(f,m(Zo,{class:"h-3 w-3"})),le(p=>{var g=e.busy,b=S("newSpec.deleteAttachment",{name:l.name});return g!==p.e&&(f.disabled=p.e=g),b!==p.t&&xe(f,"aria-label",p.t=b),p},{e:void 0,t:void 0}),d})()})),c})(),m(T2,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},F2=e=>{const t=e.ctrl;return(()=>{var n=I2();return w(n,m(vt,{get each(){return t.attachments()},children:r=>(()=>{var o=M2(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,m(W,{get when(){return de(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=L2();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=up();return le(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&xe(u,"src",c.e=l),d!==c.t&&xe(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,m(W,{get when(){return de(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=$2();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?S("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&xe(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return m(No,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,m(W,{get when(){return r.status==="pending"},get children(){return[m(sr,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),de(()=>S("newSpec.uploading"))]}}),null),w(a,m(W,{get when(){return r.status==="failed"},get children(){return S("newSpec.uploadFailed",{error:r.error})}}),null),w(a,m(W,{get when(){return r.status==="uploaded"},get children(){return[de(()=>Math.round(r.file.size/1024))," KB · ",de(()=>r.kind)]}}),null),w(o,m(Pe,{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 S("newSpec.deleteAttachment",{name:r.name})},get children(){return m(Zo,{class:"h-3.5 w-3.5"})}}),null),le(()=>ut(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};ln(["click"]);var lp=["id","name","validationState","required","disabled","readOnly"];function dp(e){const t=`form-control-${qt()}`,n=$e({id:t},e),[r,o]=L(),[i,s]=L(),[a,u]=L(),[c,l]=L(),d=(b,h,y)=>{const v=y!=null||r()!=null;return[y,r(),v&&h!=null?b:void 0].filter(Boolean).join(" ")||void 0},f=b=>[a(),c(),b].filter(Boolean).join(" ")||void 0,p=re(()=>({"data-valid":X(n.validationState)==="valid"?"":void 0,"data-invalid":X(n.validationState)==="invalid"?"":void 0,"data-required":X(n.required)?"":void 0,"data-disabled":X(n.disabled)?"":void 0,"data-readonly":X(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>X(n.name)??X(n.id),dataset:p,validationState:()=>X(n.validationState),isRequired:()=>X(n.required),isDisabled:()=>X(n.disabled),isReadOnly:()=>X(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Yn(()=>X(n.id)),registerLabel:Lt(o),registerField:Lt(s),registerDescription:Lt(u),registerErrorMessage:Lt(l)}}}var Qu=bt();function Qn(){const e=lt(Qu);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Ju(e){const t=Qn(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}var B2=["id","aria-label","aria-labelledby","aria-describedby"];function z2(e){const t=Qn(),n=$e({id:t.generateId("field")},e);return oe(()=>ae(t.registerField(X(n.id)))),{fieldProps:{id:()=>X(n.id),ariaLabel:()=>X(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(X(n.id),X(n["aria-label"]),X(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(X(n["aria-describedby"]))}}}function fp(e){let t;const n=Qn(),r=$e({id:n.generateId("label")},e),[o,i]=we(r,["ref"]),s=ps(()=>t,()=>"label");return oe(()=>ae(n.registerLabel(i.id))),m(Ze,Q({as:"label",ref(a){var u=gt(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return de(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function gp(e,t){oe(Tt(e,n=>{if(n==null)return;const r=U2(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ae(()=>{r.removeEventListener("reset",t)}))}))}function U2(e){return K2(e)?e.form:e.closest("form")}function K2(e){return e.matches("textarea, input, select, button")}function ec(e){const t=Qn(),n=$e({id:t.generateId("error-message")},e),[r,o]=we(n,["forceMount"]),i=()=>t.validationState()==="invalid";return oe(()=>{i()&&ae(t.registerErrorMessage(o.id))}),m(W,{get when(){return r.forceMount||i()},get children(){return m(Ze,Q({as:"div"},()=>t.dataset(),o))}})}var H2={};vr(H2,{Checkbox:()=>lr,Control:()=>hp,Description:()=>mp,ErrorMessage:()=>bp,Indicator:()=>yp,Input:()=>vp,Label:()=>xp,Root:()=>wp,useCheckboxContext:()=>zr});var pp=bt();function zr(){const e=lt(pp);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function hp(e){const t=Qn(),n=zr(),r=$e({id:n.generateId("control")},e),[o,i]=we(r,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:u=>{He(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{He(u,o.onKeyDown),u.key===fs.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function mp(e){const t=zr();return m(Ju,Q(()=>t.dataset(),e))}function bp(e){const t=zr();return m(ec,Q(()=>t.dataset(),e))}function yp(e){const t=Qn(),n=zr(),[r,o]=L(),i=$e({id:n.generateId("indicator")},e),[s,a]=we(i,["ref","forceMount"]),{present:u}=Lr({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return m(W,{get when(){return u()},get children(){return m(Ze,Q({as:"div",ref(c){var l=gt(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function vp(e){let t;const n=Qn(),r=zr(),o=$e({id:r.generateId("input")},e),[i,s,a]=we(o,["ref","style","onChange","onFocus","onBlur"],B2),{fieldProps:u}=z2(s),[c,l]=L(!1),d=g=>{if(He(g,i.onChange),g.stopPropagation(),!c()){const b=g.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},f=g=>{He(g,i.onFocus),r.setIsFocused(!0)},p=g=>{He(g,i.onBlur),r.setIsFocused(!1)};return oe(Tt([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(Tt([()=>t,()=>r.indeterminate(),()=>r.checked()],([g,b])=>{g&&(g.indeterminate=b)})),m(Ze,Q({as:"input",ref(g){var b=gt(h=>{r.setInputRef(h),t=h},i.ref);typeof b=="function"&&b(g)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return yr(Fu,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:f,onBlur:p},()=>n.dataset(),()=>r.dataset(),a))}function xp(e){const t=zr();return m(fp,Q(()=>t.dataset(),e))}function wp(e){let t;const n=`checkbox-${qt()}`,r=$e({value:"on",id:n},e),[o,i,s]=we(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],lp),[a,u]=L(),[c,l]=L(!1),{formControlContext:d}=dp(i),f=fg({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:h=>o.onChange?.(h),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});gp(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const p=h=>{He(h,o.onPointerDown),c()&&h.preventDefault()},g=re(()=>({"data-checked":f.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),b={value:()=>o.value,dataset:g,checked:()=>f.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:Yn(()=>X(i.id)),toggle:()=>f.toggle(),setIsChecked:h=>f.setIsSelected(h),setIsFocused:l,setInputRef:u};return m(Qu.Provider,{value:d,get children(){return m(pp.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=gt(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"group",get id(){return X(i.id)},onPointerDown:p},()=>d.dataset(),g,s,{get children(){return m(q2,{state:b,get children(){return o.children}})}}))}})}})}function q2(e){const t=ts(()=>{const n=e.children;return A0(n)?n(e.state):n});return de(t)}var lr=Object.assign(wp,{Control:hp,Description:mp,ErrorMessage:bp,Indicator:yp,Input:vp,Label:xp}),j2=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Vi=lr.Label,Wi=lr;lr.ErrorMessage;lr.Description;const Yi=e=>{const[t,n]=we(e,["class","children"]);return[m(lr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),m(lr.Control,Q({get class(){return Et("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return m(lr.Indicator,{class:"flex items-center justify-center text-current",get children(){return j2()}})}}))]};var G2=B('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),V2=B('<span class="truncate font-medium text-foreground">');const ks=e=>(()=>{var t=G2();return w(t,m(vt,{get each(){return e.items},children:(n,r)=>[m(W,{get when(){return r()>0},get children(){return m(e1,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),m(W,{get when(){return n.href},get fallback(){return(()=>{var o=V2();return w(o,()=>n.label),o})()},get children(){return m(fr,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var W2=B('<span class="text-sm text-muted-foreground">'),Y2=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),Z2=B('<label><input type=radio name=type class=hidden><strong class=" "></strong><span class="text-sm text-muted-foreground">'),X2=B('<p class=" text-destructive">'),Q2=B('<p class=" text-muted-foreground">');const J2=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],eE=()=>{const e=os(),t=Xo(),[n,r]=L(""),[o,i]=L("feat"),[s,a]=L("idle"),[u,c]=L(!1),l=()=>s()==="creating",d=tp({projectId:t}),f=d.error,p=d.setError;let g=null,b=null,h=new Set,y="",v=!1,x;ae(()=>{g?.(),b?.()});async function k(){if(v)return;const E=y||t();try{const _=(await Fe.listSpecs(E)).find(R=>!h.has(R.id));if(_){v=!0,g?.(),g=null,b?.(),b=null;const R=E?`/${E}/specs/${encodeURIComponent(_.id)}`:en(`specs/${encodeURIComponent(_.id)}`);e(R)}}catch{}}async function C(E){if(E.preventDefault(),s()==="creating")return;p(null);const T=n().trim();if(T.length<5){p(S("newSpec.descTooShort"));return}const _=d.attachments().filter(R=>R.status==="failed");if(_.length>0){p(S("newSpec.attachmentFailedCount",{count:_.length}));return}if(d.hasPending()){p(S("newSpec.attachmentUploading"));return}a("creating"),v=!1;try{const R=t();let $=R;if(u()){const I=tE(T);$=(await Fe.createWorktree(R,{specSlug:I})).id}y=$;const O=await Fe.listSpecs($);h=new Set(O.map(I=>I.id));const N={type:o(),requirement:T},M=d.draftId();M&&(N.draftId=M);const A=await Fe.createSpec($,N);"draft"in A&&A.draft?(Qr(A.sessionId),b=ds($,A.sessionId,{onEvent:I=>{I.type==="error"&&(a("failed"),p(I.message||S("newSpec.agentRunFailed")),b?.(),b=null)}}),g=u0($,()=>{k()}),k()):"id"in A&&e(`/${$}/specs/${encodeURIComponent(A.id)}`)}catch(R){p(R.message),a("failed")}}return(()=>{var E=Y2(),T=E.firstChild,_=T.nextSibling,R=_.nextSibling,$=R.firstChild,O=$.firstChild,N=$.nextSibling,M=N.firstChild,A=N.nextSibling,I=A.firstChild,F=I.firstChild,G=F.nextSibling,U=G.nextSibling;w(T,m(ks,{get items(){return[{label:S("breadcrumb.specList"),href:en("")},{label:S("breadcrumb.newSpec")}]}})),w(_,()=>S("newSpec.description")),R.addEventListener("submit",C),w(O,()=>S("newSpec.type")),w($,()=>J2.map(P=>(()=>{var Z=Z2(),V=Z.firstChild,te=V.nextSibling,Y=te.nextSibling;return V.addEventListener("change",()=>i(P.value)),w(te,()=>S(P.labelKey)),w(Y,()=>S(P.hintKey)),le(H=>{var ie=`flex min-h-[44px] flex-1 cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===P.value?"border-primary bg-primary/10":"border-border bg-background"}`,me=l();return ie!==H.e&&ut(Z,H.e=ie),me!==H.t&&(V.disabled=H.t=me),H},{e:void 0,t:void 0}),le(()=>V.value=P.value),le(()=>V.checked=o()===P.value),Z})()),null),w(R,m(Wi,{get checked(){return u()},onChange:P=>c(P),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[m(Yi,{}),m(Vi,{class:"cursor-pointer font-medium",get children(){return S("newSpec.parallelWorktree")}}),(()=>{var P=W2();return w(P,()=>S("newSpec.parallelWorktreeDesc")),P})()]}}),N),w(M,()=>S("newSpec.requirement")),w(N,m(np,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return S("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Ii(A,"paste",d.onPaste),w(F,()=>S("newSpec.attachments")),w(G,()=>S("newSpec.attachmentsHint",{count:d.count(),max:to})),w(I,m(Pe,{variant:"outline",size:"sm",type:"button",onClick:()=>x?.click(),get disabled(){return l()||d.count()>=to},get children(){return[m(ty,{class:"mr-1 h-3.5 w-3.5"}),de(()=>S("newSpec.importAttachment"))]}}),U),Ii(U,"change",d.onFileInputChange);var z=x;return typeof z=="function"?Vn(z,U):x=U,xe(U,"accept",ep),w(A,m(W,{get when(){return d.count()>0},get children(){return m(cp,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(R,(()=>{var P=de(()=>!!f());return()=>P()&&(()=>{var Z=X2();return w(Z,f),Z})()})(),null),w(R,m(Pe,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[de(()=>de(()=>!!l())()?m(sr,{class:"mr-1 h-4 w-4 animate-spin"}):m(us,{class:"mr-1 h-4 w-4"})),de(()=>de(()=>!!l())()?S("newSpec.creating"):S("newSpec.createAndStart"))]}}),null),w(R,(()=>{var P=de(()=>!!l());return()=>P()&&(()=>{var Z=Q2();return w(Z,()=>S("newSpec.creatingHint")),Z})()})(),null),le(()=>$.disabled=l()),E})()};function tE(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 Wl=11;function nE(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Wl||e.nodeType===Wl)){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 xi,rE="http://www.w3.org/1999/xhtml",Ht=typeof document>"u"?void 0:document,oE=!!Ht&&"content"in Ht.createElement("template"),iE=!!Ht&&Ht.createRange&&"createContextualFragment"in Ht.createRange();function sE(e){var t=Ht.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function aE(e){xi||(xi=Ht.createRange(),xi.selectNode(Ht.body));var t=xi.createContextualFragment(e);return t.childNodes[0]}function uE(e){var t=Ht.createElement("body");return t.innerHTML=e,t.childNodes[0]}function cE(e){return e=e.trim(),oE?sE(e):iE?aE(e):uE(e)}function wi(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 lE(e,t){return!t||t===rE?Ht.createElement(e):Ht.createElementNS(t,e)}function dE(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Qs(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Yl={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)}Qs(e,t,"selected")},INPUT:function(e,t){Qs(e,t,"checked"),Qs(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}}},_o=1,Zl=11,Xl=3,Ql=8;function rr(){}function fE(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function gE(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=Ht.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=Ht.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=cE(r);else r.nodeType===Zl&&(r=r.firstElementChild);var u=o.getNodeKey||fE,c=o.onBeforeNodeAdded||rr,l=o.onNodeAdded||rr,d=o.onBeforeElUpdated||rr,f=o.onElUpdated||rr,p=o.onBeforeNodeDiscarded||rr,g=o.onNodeDiscarded||rr,b=o.onBeforeElChildrenUpdated||rr,h=o.skipFromChildren||rr,y=o.addChild||function(z,P){return z.appendChild(P)},v=o.childrenOnly===!0,x=Object.create(null),k=[];function C(z){k.push(z)}function E(z,P){if(z.nodeType===_o)for(var Z=z.firstChild;Z;){var V=void 0;P&&(V=u(Z))?C(V):(g(Z),Z.firstChild&&E(Z,P)),Z=Z.nextSibling}}function T(z,P,Z){p(z)!==!1&&(P&&P.removeChild(z),g(z),E(z,Z))}function _(z){if(z.nodeType===_o||z.nodeType===Zl)for(var P=z.firstChild;P;){var Z=u(P);Z&&(x[Z]=P),_(P),P=P.nextSibling}}_(n);function R(z){l(z);for(var P=z.firstChild;P;){var Z=P.nextSibling,V=u(P);if(V){var te=x[V];te&&wi(P,te)?(P.parentNode.replaceChild(te,P),O(te,P)):R(P)}else R(P);P=Z}}function $(z,P,Z){for(;P;){var V=P.nextSibling;(Z=u(P))?C(Z):T(P,z,!0),P=V}}function O(z,P,Z){var V=u(P);if(V&&delete x[V],!Z){var te=d(z,P);if(te===!1||(te instanceof HTMLElement&&(z=te,_(z)),e(z,P),f(z),b(z,P)===!1))return}z.nodeName!=="TEXTAREA"?N(z,P):Yl.TEXTAREA(z,P)}function N(z,P){var Z=h(z,P),V=P.firstChild,te=z.firstChild,Y,H,ie,me,J;e:for(;V;){for(me=V.nextSibling,Y=u(V);!Z&&te;){if(ie=te.nextSibling,V.isSameNode&&V.isSameNode(te)){V=me,te=ie;continue e}H=u(te);var pe=te.nodeType,Ce=void 0;if(pe===V.nodeType&&(pe===_o?(Y?Y!==H&&((J=x[Y])?ie===J?Ce=!1:(z.insertBefore(J,te),H?C(H):T(te,z,!0),te=J,H=u(te)):Ce=!1):H&&(Ce=!1),Ce=Ce!==!1&&wi(te,V),Ce&&O(te,V)):(pe===Xl||pe==Ql)&&(Ce=!0,te.nodeValue!==V.nodeValue&&(te.nodeValue=V.nodeValue))),Ce){V=me,te=ie;continue e}H?C(H):T(te,z,!0),te=ie}if(Y&&(J=x[Y])&&wi(J,V))Z||y(z,J),O(J,V);else{var Ne=c(V);Ne!==!1&&(Ne&&(V=Ne),V.actualize&&(V=V.actualize(z.ownerDocument||Ht)),y(z,V),R(V))}V=me,te=ie}$(z,te,H);var Xe=Yl[z.nodeName];Xe&&Xe(z,P)}var M=n,A=M.nodeType,I=r.nodeType;if(!v){if(A===_o)I===_o?wi(n,r)||(g(n),M=dE(n,lE(r.nodeName,r.namespaceURI))):M=r;else if(A===Xl||A===Ql){if(I===A)return M.nodeValue!==r.nodeValue&&(M.nodeValue=r.nodeValue),M;M=r}}if(M===r)g(n);else{if(r.isSameNode&&r.isSameNode(M))return;if(O(M,r,v),k)for(var F=0,G=k.length;F<G;F++){var U=x[k[F]];U&&T(U,U.parentNode,!1)}}return!v&&M!==n&&n.parentNode&&(M.actualize&&(M=M.actualize(n.ownerDocument||Ht)),n.parentNode.replaceChild(M,n)),M}}var pE=gE(nE);const Jl={};function hE(e){let t=Jl[e];if(t)return t;t=Jl[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 co(e,t){typeof t!="string"&&(t=co.defaultChars);const n=hE(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})}co.defaultChars=";/?:@&=+$,#";co.componentChars="";const ed={};function mE(e){let t=ed[e];if(t)return t;t=ed[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 ni(e,t,n){typeof t!="string"&&(n=t,t=ni.defaultChars),typeof n>"u"&&(n=!0);const r=mE(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}ni.defaultChars=";/?:@&=+$,-_.!~*'()#";ni.componentChars="-_.!~*'()";function tc(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 Zi(){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 bE=/^([a-z0-9.+-]+:)/i,yE=/:[0-9]*$/,vE=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xE=["<",">",'"',"`"," ","\r",`
|
|
644
|
+
`," "],wE=["{","}","|","\\","^","`"].concat(xE),_E=["'"].concat(wE),td=["%","/","?",";","#"].concat(_E),nd=["/","?","#"],EE=255,rd=/^[+a-z0-9A-Z_-]{0,63}$/,kE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,od={javascript:!0,"javascript:":!0},id={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 Zi)return e;const n=new Zi;return n.parse(e,t),n}Zi.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=vE.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=bE.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&&od[s])&&(i=i.substr(2),this.slashes=!0)),!od[s]&&(o||s&&!id[s])){let c=-1;for(let g=0;g<nd.length;g++)r=i.indexOf(nd[g]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let g=0;g<td.length;g++)r=i.indexOf(td[g]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const f=i.slice(0,c);i=i.slice(c),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let b=0,h=g.length;b<h;b++){const y=g[b];if(y&&!y.match(rd)){let v="";for(let x=0,k=y.length;x<k;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(rd)){const x=g.slice(0,b),k=g.slice(b+1),C=y.match(kE);C&&(x.push(C[1]),k.unshift(C[2])),k.length&&(i=k.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>EE&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),id[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Zi.prototype.parseHost=function(e){let t=yE.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 CE=Object.freeze(Object.defineProperty({__proto__:null,decode:co,encode:ni,format:tc,parse:nc},Symbol.toStringTag,{value:"Module"})),_p=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ep=/[\0-\x1F\x7F-\x9F]/,SE=/[\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]/,rc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,kp=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Cp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,AE=Object.freeze(Object.defineProperty({__proto__:null,Any:_p,Cc:Ep,Cf:SE,P:rc,S:kp,Z:Cp},Symbol.toStringTag,{value:"Module"})),TE=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),DE=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Js;const OE=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]]),RE=(Js=String.fromCodePoint)!==null&&Js!==void 0?Js: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 NE(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=OE.get(e))!==null&&t!==void 0?t:e}var It;(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"})(It||(It={}));const IE=32;var ar;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ar||(ar={}));function wu(e){return e>=It.ZERO&&e<=It.NINE}function ME(e){return e>=It.UPPER_A&&e<=It.UPPER_F||e>=It.LOWER_A&&e<=It.LOWER_F}function LE(e){return e>=It.UPPER_A&&e<=It.UPPER_Z||e>=It.LOWER_A&&e<=It.LOWER_Z||wu(e)}function $E(e){return e===It.EQUALS||LE(e)}var Dt;(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"})(Dt||(Dt={}));var qn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qn||(qn={}));class PE{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qn.Strict}startEntity(t){this.decodeMode=t,this.state=Dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Dt.EntityStart:return t.charCodeAt(n)===It.NUM?(this.state=Dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Dt.NamedEntity,this.stateNamedEntity(t,n));case Dt.NumericStart:return this.stateNumericStart(t,n);case Dt.NumericDecimal:return this.stateNumericDecimal(t,n);case Dt.NumericHex:return this.stateNumericHex(t,n);case Dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|IE)===It.LOWER_X?(this.state=Dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Dt.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(wu(o)||ME(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(wu(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===It.SEMI)this.consumed+=1;else if(this.decodeMode===qn.Strict)return 0;return this.emitCodePoint(NE(this.result),this.consumed),this.errors&&(t!==It.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=FE(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===qn.Attribute&&(i===0||$E(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&ar.VALUE_LENGTH)>>14,i!==0){if(s===It.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==qn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&ar.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~ar.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Dt.NamedEntity:return this.result!==0&&(this.decodeMode!==qn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Dt.NumericDecimal:return this.emitNumericEntity(0,2);case Dt.NumericHex:return this.emitNumericEntity(0,3);case Dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Dt.EntityStart:return 0}}}function Sp(e){let t="";const n=new PE(e,r=>t+=RE(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 FE(e,t,n,r){const o=(t&ar.BRANCH_LENGTH)>>7,i=t&ar.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const Ap=Sp(TE);Sp(DE);function BE(e,t=qn.Legacy){return Ap(e,t)}function zE(e){return Ap(e,qn.Strict)}function UE(e){return Object.prototype.toString.call(e)}function oc(e){return UE(e)==="[object String]"}const KE=Object.prototype.hasOwnProperty;function HE(e,t){return KE.call(e,t)}function Cs(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Tp(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function ic(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 qo(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Dp=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,qE=/&([a-z#][a-z0-9]{1,31});/gi,jE=new RegExp(Dp.source+"|"+qE.source,"gi"),GE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function VE(e,t){if(t.charCodeAt(0)===35&&GE.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return ic(r)?qo(r):e}const n=BE(e);return n!==e?n:e}function WE(e){return e.indexOf("\\")<0?e:e.replace(Dp,"$1")}function lo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(jE,function(t,n,r){return n||VE(t,r)})}const YE=/[&<>"]/,ZE=/[&<>"]/g,XE={"&":"&","<":"<",">":">",'"':"""};function QE(e){return XE[e]}function mr(e){return YE.test(e)?e.replace(ZE,QE):e}const JE=/[.?*+^$[\]\\(){}|-]/g;function ek(e){return e.replace(JE,"\\$&")}function ct(e){switch(e){case 9:case 32:return!0}return!1}function jo(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Op(e){return rc.test(e)||kp.test(e)}function Go(e){return Op(qo(e))}function Vo(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 Ss(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function sd(e){return e===32||e===9||e===10||e===13}function As(e){let t=0;for(;t<e.length&&sd(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&sd(e.charCodeAt(n));n--);return e.slice(t,n+1)}const tk={mdurl:CE,ucmicro:AE},nk=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Tp,asciiTrim:As,assign:Cs,escapeHtml:mr,escapeRE:ek,fromCodePoint:qo,has:HE,isMdAsciiPunct:Vo,isPunctChar:Op,isPunctCharCode:Go,isSpace:ct,isString:oc,isValidEntityCode:ic,isWhiteSpace:jo,lib:tk,normalizeReference:Ss,unescapeAll:lo,unescapeMd:WE},Symbol.toStringTag,{value:"Module"}));function rk(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 ok(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=lo(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=lo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function ik(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+=lo(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+=lo(e.slice(t,i)),s}const sk=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:ok,parseLinkLabel:rk,parseLinkTitle:ik},Symbol.toStringTag,{value:"Module"})),Pn={};Pn.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+mr(i.content)+"</code>"};Pn.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+mr(e[t].content)+`</code></pre>
|
|
645
|
+
`};Pn.fence=function(e,t,n,r,o){const i=e[t],s=i.info?lo(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||mr(i.content):c=mr(i.content),c.indexOf("<pre")===0)return c+`
|
|
646
646
|
`;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const f={attrs:d};return`<pre><code${o.renderAttrs(f)}>${c}</code></pre>
|
|
647
647
|
`}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
|
|
648
|
-
`}
|
|
648
|
+
`};Pn.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)};Pn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
649
649
|
`:`<br>
|
|
650
|
-
`}
|
|
650
|
+
`};Pn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
651
651
|
`:`<br>
|
|
652
652
|
`:`
|
|
653
|
-
`}
|
|
653
|
+
`};Pn.text=function(e,t){return mr(e[t].content)};Pn.html_block=function(e,t){return e[t].content};Pn.html_inline=function(e,t){return e[t].content};function mo(){this.rules=Cs({},Pn)}mo.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+mr(t.attrs[n][0])+'="'+mr(t.attrs[n][1])+'"';return o};mo.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
|
|
654
654
|
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
655
|
-
`:">",i};
|
|
656
|
-
`;break}return r};
|
|
657
|
-
`),t=t.replace(tk,"�"),e.src=t}function rk(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function ok(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function ik(e){return/^<a[>\s]/i.test(e)}function sk(e){return/^<\/a\s*>/i.test(e)}function ak(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(ik(a.content)&&i>0&&i--,sk(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,f=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const g=c[p].url,b=e.md.normalizeLink(g);if(!e.md.validateLink(b))continue;let h=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(h)?h=e.md.normalizeLinkText("mailto:"+h).replace(/^mailto:/,""):h=e.md.normalizeLinkText(h):h=e.md.normalizeLinkText("http://"+h).replace(/^http:\/\//,"");const y=c[p].index;if(y>f){const E=new e.Token("text","",0);E.content=u.slice(f,y),E.level=d,l.push(E)}const v=new e.Token("link_open","a",1);v.attrs=[["href",b]],v.level=d++,v.markup="linkify",v.info="auto",l.push(v);const x=new e.Token("text","",0);x.content=h,x.level=d,l.push(x);const k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",l.push(k),f=c[p].lastIndex}if(f<u.length){const p=new e.Token("text","",0);p.content=u.slice(f),p.level=d,l.push(p)}t[n].children=o=Tp(o,s,l)}}}}const Np=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,uk=/\((c|tm|r)\)/i,ck=/\((c|tm|r)\)/ig,lk={c:"©",r:"®",tm:"™"};function dk(e,t){return lk[t.toLowerCase()]}function fk(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(ck,dk)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function gk(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Np.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function pk(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(uk.test(e.tokens[t].content)&&fk(e.tokens[t].children),Np.test(e.tokens[t].content)&&gk(e.tokens[t].children))}const hk=/['"]/,od=/['"]/g,id="’";function wi(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function mk(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function bk(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){od.lastIndex=c;const d=od.exec(u);if(!d)break;let f=!0,p=!0;c=d.index+1;const g=d[0]==="'";let b=32;if(d.index-1>=0)b=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){b=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(c<l)h=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}const y=Go(b)||jo(b),v=Go(h)||jo(h),x=qo(b),k=qo(h);if(k?f=!1:v&&(x||y||(f=!1)),x?p=!1:y&&(k||v||(p=!1)),h===34&&d[0]==='"'&&b>=48&&b<=57&&(p=f=!1),f&&p&&(f=y,p=v),!f&&!p){g&&wi(o,i,d.index,id);continue}if(p)for(n=r.length-1;n>=0;n--){let E=r[n];if(r[n].level<a)break;if(E.single===g&&r[n].level===a){E=r[n];let S,O;g?(S=t.md.options.quotes[2],O=t.md.options.quotes[3]):(S=t.md.options.quotes[0],O=t.md.options.quotes[1]),wi(o,i,d.index,O),wi(o,E.token,E.pos,S),r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:g,level:a}):p&&g&&wi(o,i,d.index,id)}}Object.keys(o).forEach(function(i){e[i].content=mk(e[i].content,o[i])})}function yk(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!hk.test(e.tokens[t].content)||bk(e.tokens[t].children,e)}function vk(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const Zs=[["normalize",nk],["block",rk],["inline",ok],["linkify",ak],["replacements",pk],["smartquotes",yk],["text_join",vk]];function rc(){this.ruler=new Wt;for(let e=0;e<Zs.length;e++)this.ruler.push(Zs[e][0],Zs[e][1])}rc.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};rc.prototype.State=Rp;function Pn(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const d=o.charCodeAt(s);if(!l)if(ct(d)){a++,d===9?u+=4-u%4:u++;continue}else l=!0;(d===10||s===c-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Pn.prototype.push=function(e,t,n){const r=new vn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Pn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Pn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Pn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!ct(r))break}return t};Pn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ct(this.src.charCodeAt(--t)))return t+1;return t};Pn.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};Pn.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Pn.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const f=this.src.charCodeAt(l);if(ct(f))f===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};Pn.prototype.Token=vn;const xk=65536;function Xs(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function sd(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function wk(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!ct(a)||s===45&&ct(a))return!1;for(;i<e.eMarks[o];){const k=e.src.charCodeAt(i);if(k!==124&&k!==45&&k!==58&&!ct(k))return!1;i++}let u=Xs(e,t+1),c=u.split("|");const l=[];for(let k=0;k<c.length;k++){const E=c[k].trim();if(!E){if(k===0||k===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(E))return!1;E.charCodeAt(E.length-1)===58?l.push(E.charCodeAt(0)===58?"center":"right"):E.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=Xs(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=sd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),b=[t,0];g.map=b;const h=e.push("thead_open","thead",1);h.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let k=0;k<c.length;k++){const E=e.push("th_open","th",1);l[k]&&(E.attrs=[["style","text-align:"+l[k]]]);const S=e.push("inline","",0);S.content=c[k].trim(),S.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let k=!1;for(let S=0,O=p.length;S<O;S++)if(p[S](e,o,n,!0)){k=!0;break}if(k||(u=Xs(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=sd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>xk))break;if(o===t+2){const S=e.push("tbody_open","tbody",1);S.map=v=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[o,o+1];for(let S=0;S<d;S++){const O=e.push("td_open","td",1);l[S]&&(O.attrs=[["style","text-align:"+l[S]]]);const _=e.push("inline","",0);_.content=c[S]?c[S].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=o),e.push("table_close","table",-1),b[1]=o,e.parentType=f,e.line=o,!0}function _k(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
658
|
-
`,i.map=[t,e.line],!0}function Ek(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){f=!0;break}u=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=l,p.content=e.getLines(t+1,d,u,!0),p.markup=c,p.map=[t,e.line],!0}function kk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<n;g++){const x=e.sCount[g]<e.blkIndent;if(o=e.bMarks[g]+e.tShift[g],i=e.eMarks[g],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let E=e.sCount[g]+1,S,O;e.src.charCodeAt(o)===32?(o++,E++,O=!1,S=!0):e.src.charCodeAt(o)===9?(S=!0,(e.bsCount[g]+E)%4===3?(o++,E++,O=!1):O=!0):S=!1;let _=E;for(a.push(e.bMarks[g]),e.bMarks[g]=o;o<i;){const I=e.src.charCodeAt(o);if(ct(I))I===9?_+=4-(_+e.bsCount[g]+(O?1:0))%4:_++;else break;o++}p=o>=i,u.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(S?1:0),c.push(e.sCount[g]),e.sCount[g]=_-E,l.push(e.tShift[g]),e.tShift[g]=o-e.bMarks[g];continue}if(p)break;let k=!1;for(let E=0,S=d.length;E<S;E++)if(d[E](e,g,n,!0)){k=!0;break}if(k){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]=-1}const b=e.blkIndent;e.blkIndent=0;const h=e.push("blockquote_open","blockquote",1);h.markup=">";const y=[t,0];h.map=y,e.md.block.tokenize(e,t,g);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,y[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=b,!0}function Sk(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!ct(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function ad(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!ct(i))return-1}return r}function ud(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!ct(i))?-1:o}function Ck(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Ak(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,f,p;if((p=ud(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],f=Number(e.src.slice(s,p-1)),l&&f!==1)return!1}else if((p=ad(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const g=e.src.charCodeAt(p-1),b=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);const h=[u,0];a.map=h,a.markup=String.fromCharCode(g);let y=!1;const v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=p,o=e.eMarks[u];const k=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let E=k;for(;i<o;){const N=e.src.charCodeAt(i);if(N===9)E+=4-(E+e.bsCount[u])%4;else if(N===32)E++;else break;i++}const S=i;let O;S>=o?O=1:O=E-k,O>4&&(O=1);const _=k+O;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const I=[u,0];a.map=I,d&&(a.info=e.src.slice(s,p-1));const L=e.tight,T=e.tShift[u],R=e.sCount[u],M=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[u]=S-e.bMarks[u],e.sCount[u]=E,S>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=M,e.tShift[u]=T,e.sCount[u]=R,e.tight=L,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),u=e.line,I[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let N=0,F=v.length;N<F;N++)if(v[N](e,u,n,!0)){C=!0;break}if(C)break;if(d){if(p=ud(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=ad(e,u),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),h[1]=u,e.line=u,e.parentType=x,c&&Ck(e,b),!0}function Tk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(v){const x=e.lineMax;if(v>=x||e.isEmpty(v))return null;let k=!1;if(e.sCount[v]-e.blkIndent>3&&(k=!0),e.sCount[v]<0&&(k=!0),!k){const O=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let I=!1;for(let L=0,T=O.length;L<T;L++)if(O[L](e,v,x,!0)){I=!0;break}if(e.parentType=_,I)return null}const E=e.bMarks[v]+e.tShift[v],S=e.eMarks[v];return e.src.slice(E,S+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const v=u.charCodeAt(o);if(v===91)return!1;if(v===93){c=o;break}else if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(v===92&&(o++,o<i&&u.charCodeAt(o)===10)){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ct(v))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const f=o,p=s,g=o;for(;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ct(v))break}let b=e.md.helpers.parseLinkTitle(u,o,i);for(;b.can_continue;){const v=a(s);if(v===null)break;u+=v,o=i,i=u.length,s++,b=e.md.helpers.parseLinkTitle(u,o,i,b)}let h;for(o<i&&g!==o&&b.ok?(h=b.str,o=b.pos):(h="",o=f,s=p);o<i;){const v=u.charCodeAt(o);if(!ct(v))break;o++}if(o<i&&u.charCodeAt(o)!==10&&h)for(h="",o=f,s=p;o<i;){const v=u.charCodeAt(o);if(!ct(v))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=_s(u.slice(1,c));return y?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:h,href:d}),e.line=s),!0):!1}const Dk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ok="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rk="[^\"'=<>`\\x00-\\x20]+",Nk="'[^']*'",Ik='"[^"]*"',Mk="(?:"+Rk+"|"+Nk+"|"+Ik+")",Lk="(?:\\s+"+Ok+"(?:\\s*=\\s*"+Mk+")?)",Ip="<[A-Za-z][A-Za-z0-9\\-]*"+Lk+"*\\s*\\/?>",Mp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",$k="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Pk="<[?][\\s\\S]*?[?]>",Fk="<![A-Za-z][^>]*>",Bk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",zk=new RegExp("^(?:"+Ip+"|"+Mp+"|"+$k+"|"+Pk+"|"+Fk+"|"+Bk+")"),Uk=new RegExp("^(?:"+Ip+"|"+Mp+")"),Ar=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Dk.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Uk.source+"\\s*$"),/^$/,!1]];function Kk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<Ar.length&&!Ar[a][0].test(s);a++);if(a===Ar.length)return!1;if(r)return Ar[a][2];let u=t+1;const c=Ar[a][1].test("");if(!Ar[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),Ar[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function Hk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!ct(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&ct(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Es(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function qk(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,g=r.length;p<g;p++)if(r[p](e,a,n,!0)){f=!0;break}if(f)break}if(!i)return e.parentType=o,!1;const u=Es(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function jk(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Es(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const _i=[["table",wk,["paragraph","reference"]],["code",_k],["fence",Ek,["paragraph","reference","blockquote","list"]],["blockquote",kk,["paragraph","reference","blockquote","list"]],["hr",Sk,["paragraph","reference","blockquote","list"]],["list",Ak,["paragraph","reference","blockquote"]],["reference",Tk],["html_block",Kk,["paragraph","reference","blockquote"]],["heading",Hk,["paragraph","reference","blockquote"]],["lheading",qk],["paragraph",jk]];function ks(){this.ruler=new Wt;for(let e=0;e<_i.length;e++)this.ruler.push(_i[e][0],_i[e][1],{alt:(_i[e][2]||[]).slice()})}ks.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};ks.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};ks.prototype.State=Pn;function ni(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}ni.prototype.pushPending=function(){const e=new vn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ni.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new vn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};ni.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const h=this.src.charCodeAt(e-2);o=(h&64512)===55296?65536+(h-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const h=this.src.charCodeAt(i+1);a=(h&64512)===56320?65536+(a-55296<<10)+(h-56320):65533}else(a&64512)===56320&&(a=65533);const u=Go(o)||jo(o),c=Go(a)||jo(a),l=qo(o),d=qo(a),f=!d&&(!c||l||u),p=!l&&(!u||d||c);return{can_open:f&&(t||!p||u),can_close:p&&(t||!f||c),length:s}};ni.prototype.Token=vn;function Gk(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Vk(e,t){let n=e.pos;for(;n<e.posMax&&!Gk(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const Wk=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Yk(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(Wk);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=a.length-i.length,!0}function Zk(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&ct(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const oc=[];for(let e=0;e<256;e++)oc.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){oc[e.charCodeAt(0)]=1});function Xk(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!ct(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&oc[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function Qk(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function Jk(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function cd(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function eS(e){const t=e.tokens_meta,n=e.tokens_meta.length;cd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&cd(e,t[r].delimiters)}const Lp={tokenize:Jk,postProcess:eS};function tS(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function ld(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function nS(e){const t=e.tokens_meta,n=e.tokens_meta.length;ld(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ld(e,t[r].delimiters)}const $p={tokenize:tS,postProcess:nS};function rS(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let g=p+1;if(g<d&&e.src.charCodeAt(g)===40){for(c=!1,g++;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);if(g>=d)return!1;if(u=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?g=o.pos:s="",u=g;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);if(o=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<d&&u!==g&&o.ok)for(a=o.str,g=o.pos;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);}(g>=d||e.src.charCodeAt(g)!==41)&&(c=!0),g++}if(c){if(typeof e.env.references>"u")return!1;if(g<d&&e.src.charCodeAt(g)===91?(u=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?r=e.src.slice(u,g++):g=p+1):g=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[_s(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=p;const b=e.push("link_open","a",1),h=[["href",s]];b.attrs=h,a&&h.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function oS(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<f&&e.src.charCodeAt(i)===40){for(i++;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);if(i>=f)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<f&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);else u="";if(i>=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<f&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=g+1):i=g+1,o||(o=e.src.slice(p,g)),s=e.env.references[_s(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(p,g);const b=[];e.md.inline.parse(r,e.md,e.env,b);const h=e.push("image","img",0),y=[["src",l],["alt",""]];h.attrs=y,h.children=b,h.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=f,!0}const iS=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,sS=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function aS(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(sS.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(iS.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function uS(e){return/^<a[>\s]/i.test(e)}function cS(e){return/^<\/a\s*>/i.test(e)}function lS(e){const t=e|32;return t>=97&&t<=122}function dS(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!lS(o))return!1;const i=e.src.slice(r).match(zk);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],uS(s.content)&&e.linkLevel++,cS(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const fS=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,gS=/^&([a-z][a-z0-9]{1,31});/i;function pS(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(fS);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=nc(s)?Ho(s):Ho(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(gS);if(i){const s=IE(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function dd(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+p,i[c]=p,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function hS(e){const t=e.tokens_meta,n=e.tokens_meta.length;dd(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&dd(t[r].delimiters)}function mS(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const Qs=[["text",Vk],["linkify",Yk],["newline",Zk],["escape",Xk],["backticks",Qk],["strikethrough",Lp.tokenize],["emphasis",$p.tokenize],["link",rS],["image",oS],["autolink",aS],["html_inline",dS],["entity",pS]],Js=[["balance_pairs",hS],["strikethrough",Lp.postProcess],["emphasis",$p.postProcess],["fragments_join",mS]];function ri(){this.ruler=new Wt;for(let e=0;e<Qs.length;e++)this.ruler.push(Qs[e][0],Qs[e][1]);this.ruler2=new Wt;for(let e=0;e<Js.length;e++)this.ruler2.push(Js[e][0],Js[e][1])}ri.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};ri.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ri.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};ri.prototype.State=ni;function bS(e){const t={};e=e||{},t.src_Any=_p.source,t.src_Cc=Ep.source,t.src_Z=Sp.source,t.src_P=ec.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function vu(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ss(e){return Object.prototype.toString.call(e)}function yS(e){return Ss(e)==="[object String]"}function vS(e){return Ss(e)==="[object Object]"}function xS(e){return Ss(e)==="[object RegExp]"}function fd(e){return Ss(e)==="[object Function]"}function wS(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Pp={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function _S(e){return Object.keys(e||{}).reduce(function(t,n){return t||Pp.hasOwnProperty(n)},!1)}const ES={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},kS="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",SS="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function CS(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function gd(){return function(e,t){t.normalize(e)}}function Vi(e){const t=e.re=bS(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(kS),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,vS(u)){xS(u.validate)?c.validate=CS(u.validate):fd(u.validate)?c.validate=u.validate:i(a,u),fd(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=gd();return}if(yS(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:gd()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(wS).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Fp(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function rn(e,t){if(!(this instanceof rn))return new rn(e,t);t||_S(e)&&(t=e,e={}),this.__opts__=vu({},Pp,t),this.__schemas__=vu({},ES,e),this.__compiled__={},this.__tlds__=SS,this.__tlds_replaced__=!1,this.re={},Vi(this)}rn.prototype.add=function(t,n){return this.__schemas__[t]=n,Vi(this),this};rn.prototype.set=function(t){return this.__opts__=vu(this.__opts__,t),this};rn.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};rn.prototype.pretest=function(t){return this.re.pretest.test(t)};rn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};rn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(f,p){return f?p?f.index!==p.index?f.index<p.index?f:p:f.lastIndex>=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const f=[r[l[0]],i[l[1]],o[l[2]]],p=c(c(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?l[0]++:p===f[1]?l[1]++:l[2]++,p.index<d)continue;const g=new Fp(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),n.push(g),d=p.lastIndex}return n.length?n:null};rn.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new Fp(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};rn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Vi(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Vi(this),this)};rn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};rn.prototype.onCompile=function(){};const no=2147483647,Dn=36,ic=1,Vo=26,AS=38,TS=700,Bp=72,zp=128,Up="-",DS=/^xn--/,OS=/[^\0-\x7F]/,RS=/[\x2E\u3002\uFF0E\uFF61]/g,NS={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ea=Dn-ic,On=Math.floor,ta=String.fromCharCode;function ir(e){throw new RangeError(NS[e])}function IS(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Kp(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(RS,".");const o=e.split("."),i=IS(o,t).join(".");return r+i}function Hp(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const MS=e=>String.fromCodePoint(...e),LS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Dn},pd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},qp=function(e,t,n){let r=0;for(e=n?On(e/TS):e>>1,e+=On(e/t);e>ea*Vo>>1;r+=Dn)e=On(e/ea);return On(r+(ea+1)*e/(e+AS))},jp=function(e){const t=[],n=e.length;let r=0,o=zp,i=Bp,s=e.lastIndexOf(Up);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&ir("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=Dn;;d+=Dn){a>=n&&ir("invalid-input");const f=LS(e.charCodeAt(a++));f>=Dn&&ir("invalid-input"),f>On((no-r)/l)&&ir("overflow"),r+=f*l;const p=d<=i?ic:d>=i+Vo?Vo:d-i;if(f<p)break;const g=Dn-p;l>On(no/g)&&ir("overflow"),l*=g}const c=t.length+1;i=qp(r-u,c,u==0),On(r/c)>no-o&&ir("overflow"),o+=On(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Gp=function(e){const t=[];e=Hp(e);const n=e.length;let r=zp,o=0,i=Bp;for(const u of e)u<128&&t.push(ta(u));const s=t.length;let a=s;for(s&&t.push(Up);a<n;){let u=no;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>On((no-o)/c)&&ir("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>no&&ir("overflow"),l===r){let d=o;for(let f=Dn;;f+=Dn){const p=f<=i?ic:f>=i+Vo?Vo:f-i;if(d<p)break;const g=d-p,b=Dn-p;t.push(ta(pd(p+g%b,0))),d=On(g/b)}t.push(ta(pd(d,0))),i=qp(o,c,a===s),o=0,++a}++o,++r}return t.join("")},$S=function(e){return Kp(e,function(t){return DS.test(t)?jp(t.slice(4).toLowerCase()):t})},PS=function(e){return Kp(e,function(t){return OS.test(t)?"xn--"+Gp(t):t})},Vp={version:"2.3.1",ucs2:{decode:Hp,encode:MS},decode:jp,encode:Gp,toASCII:PS,toUnicode:$S},FS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},BS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},zS={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},US={default:FS,zero:BS,commonmark:zS},KS=/^(vbscript|javascript|file|data):/,HS=/^data:image\/(gif|png|jpeg|webp);/;function qS(e){const t=e.trim().toLowerCase();return KS.test(t)?HS.test(t):!0}const Wp=["http:","https:","mailto:"];function jS(e){const t=Ju(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toASCII(t.hostname)}catch{}return ti(Qu(t))}function GS(e){const t=Ju(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toUnicode(t.hostname)}catch{}return io(Qu(t),io.defaultChars+"%")}function cn(e,t){if(!(this instanceof cn))return new cn(e,t);t||tc(e)||(t=e||{},e="default"),this.inline=new ri,this.block=new ks,this.core=new rc,this.renderer=new fo,this.linkify=new rn,this.validateLink=qS,this.normalizeLink=jS,this.normalizeLinkText=GS,this.utils=YE,this.helpers=ws({},JE),this.options={},this.configure(e),t&&this.set(t)}cn.prototype.set=function(e){return ws(this.options,e),this};cn.prototype.configure=function(e){const t=this;if(tc(e)){const n=e;if(e=US[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};cn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};cn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};cn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};cn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};cn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};cn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};cn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function sc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var na,hd;function VS(){if(hd)return na;hd=1;var e=!0,t=!1,n=!1;na=function(b,h){h&&(e=!h.enabled,t=!!h.label,n=!!h.labelAfter),b.core.ruler.after("inline","github-task-lists",function(y){for(var v=y.tokens,x=2;x<v.length;x++)i(v,x)&&(s(v[x],y.Token),r(v[x-2],"class","task-list-item"+(e?"":" enabled")),r(v[o(v,x-2)],"class","contains-task-list"))})};function r(b,h,y){var v=b.attrIndex(h),x=[h,y];v<0?b.attrPush(x):b.attrs[v]=x}function o(b,h){for(var y=b[h].level-1,v=h-1;v>=0;v--)if(b[v].level===y)return v;return-1}function i(b,h){return d(b[h])&&f(b[h-1])&&p(b[h-2])&&g(b[h])}function s(b,h){if(b.children.unshift(a(b,h)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),t)if(n){b.children.pop();var y="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+y+'">',b.children.push(l(b.content,y,h))}else b.children.unshift(u(h)),b.children.push(c(h))}function a(b,h){var y=new h("html_inline","",0),v=e?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?y.content='<input class="task-list-item-checkbox"'+v+'type="checkbox">':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(y.content='<input class="task-list-item-checkbox" checked=""'+v+'type="checkbox">'),y}function u(b){var h=new b("html_inline","",0);return h.content="<label>",h}function c(b){var h=new b("html_inline","",0);return h.content="</label>",h}function l(b,h,y){var v=new y("html_inline","",0);return v.content='<label class="task-list-item-label" for="'+h+'">'+b+"</label>",v.attrs=[{for:h}],v}function d(b){return b.type==="inline"}function f(b){return b.type==="paragraph_open"}function p(b){return b.type==="list_item_open"}function g(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return na}var WS=VS();const YS=sc(WS);var ra,md;function ZS(){if(md)return ra;md=1;function e(A){return A instanceof Map?A.clear=A.delete=A.set=function(){throw new Error("map is read-only")}:A instanceof Set&&(A.add=A.clear=A.delete=function(){throw new Error("set is read-only")}),Object.freeze(A),Object.getOwnPropertyNames(A).forEach(j=>{const ee=A[j],Ce=typeof ee;(Ce==="object"||Ce==="function")&&!Object.isFrozen(ee)&&e(ee)}),A}class t{constructor(j){j.data===void 0&&(j.data={}),this.data=j.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(A,...j){const ee=Object.create(null);for(const Ce in A)ee[Ce]=A[Ce];return j.forEach(function(Ce){for(const it in Ce)ee[it]=Ce[it]}),ee}const o="</span>",i=A=>!!A.scope,s=(A,{prefix:j})=>{if(A.startsWith("language:"))return A.replace("language:","language-");if(A.includes(".")){const ee=A.split(".");return[`${j}${ee.shift()}`,...ee.map((Ce,it)=>`${Ce}${"_".repeat(it+1)}`)].join(" ")}return`${j}${A}`};class a{constructor(j,ee){this.buffer="",this.classPrefix=ee.classPrefix,j.walk(this)}addText(j){this.buffer+=n(j)}openNode(j){if(!i(j))return;const ee=s(j.scope,{prefix:this.classPrefix});this.span(ee)}closeNode(j){i(j)&&(this.buffer+=o)}value(){return this.buffer}span(j){this.buffer+=`<span class="${j}">`}}const u=(A={})=>{const j={children:[]};return Object.assign(j,A),j};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(j){this.top.children.push(j)}openNode(j){const ee=u({scope:j});this.add(ee),this.stack.push(ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(j){return this.constructor._walk(j,this.rootNode)}static _walk(j,ee){return typeof ee=="string"?j.addText(ee):ee.children&&(j.openNode(ee),ee.children.forEach(Ce=>this._walk(j,Ce)),j.closeNode(ee)),j}static _collapse(j){typeof j!="string"&&j.children&&(j.children.every(ee=>typeof ee=="string")?j.children=[j.children.join("")]:j.children.forEach(ee=>{c._collapse(ee)}))}}class l extends c{constructor(j){super(),this.options=j}addText(j){j!==""&&this.add(j)}startScope(j){this.openNode(j)}endScope(){this.closeNode()}__addSublanguage(j,ee){const Ce=j.root;ee&&(Ce.scope=`language:${ee}`),this.add(Ce)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(A){return A?typeof A=="string"?A:A.source:null}function f(A){return b("(?=",A,")")}function p(A){return b("(?:",A,")*")}function g(A){return b("(?:",A,")?")}function b(...A){return A.map(ee=>d(ee)).join("")}function h(A){const j=A[A.length-1];return typeof j=="object"&&j.constructor===Object?(A.splice(A.length-1,1),j):{}}function y(...A){return"("+(h(A).capture?"":"?:")+A.map(Ce=>d(Ce)).join("|")+")"}function v(A){return new RegExp(A.toString()+"|").exec("").length-1}function x(A,j){const ee=A&&A.exec(j);return ee&&ee.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function E(A,{joinWith:j}){let ee=0;return A.map(Ce=>{ee+=1;const it=ee;let dt=d(Ce),Ee="";for(;dt.length>0;){const be=k.exec(dt);if(!be){Ee+=dt;break}Ee+=dt.substring(0,be.index),dt=dt.substring(be.index+be[0].length),be[0][0]==="\\"&&be[1]?Ee+="\\"+String(Number(be[1])+it):(Ee+=be[0],be[0]==="("&&ee++)}return Ee}).map(Ce=>`(${Ce})`).join(j)}const S=/\b\B/,O="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",T="\\b(0b[01]+)",R="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(A={})=>{const j=/^#![ ]*\//;return A.binary&&(A.begin=b(j,/.*\b/,A.binary,/\b.*/)),r({scope:"meta",begin:j,end:/$/,relevance:0,"on:begin":(ee,Ce)=>{ee.index!==0&&Ce.ignoreMatch()}},A)},C={begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[C]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[C]},G={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(A,j,ee={}){const Ce=r({scope:"comment",begin:A,end:j,contains:[]},ee);Ce.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const it=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ce.contains.push({begin:b(/[ ]+/,"(",it,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ce},z=U("//","$"),P=U("/\\*","\\*/"),Z=U("#","$"),V={scope:"number",begin:I,relevance:0},te={scope:"number",begin:L,relevance:0},W={scope:"number",begin:T,relevance:0},H={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[C,{begin:/\[/,end:/\]/,relevance:0,contains:[C]}]},ie={scope:"title",begin:O,relevance:0},me={scope:"title",begin:_,relevance:0},J={begin:"\\.\\s*"+_,relevance:0};var Se=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:C,BINARY_NUMBER_MODE:W,BINARY_NUMBER_RE:T,COMMENT:U,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:z,C_NUMBER_MODE:te,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(A){return Object.assign(A,{"on:begin":(j,ee)=>{ee.data._beginMatch=j[1]},"on:end":(j,ee)=>{ee.data._beginMatch!==j[1]&&ee.ignoreMatch()}})},HASH_COMMENT_MODE:Z,IDENT_RE:O,MATCH_NOTHING_RE:S,METHOD_GUARD:J,NUMBER_MODE:V,NUMBER_RE:I,PHRASAL_WORDS_MODE:G,QUOTE_STRING_MODE:F,REGEXP_MODE:H,RE_STARTERS_RE:R,SHEBANG:M,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:me});function Ne(A,j){A.input[A.index-1]==="."&&j.ignoreMatch()}function Xe(A,j){A.className!==void 0&&(A.scope=A.className,delete A.className)}function gt(A,j){j&&A.beginKeywords&&(A.begin="\\b("+A.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",A.__beforeBegin=Ne,A.keywords=A.keywords||A.beginKeywords,delete A.beginKeywords,A.relevance===void 0&&(A.relevance=0))}function ce(A,j){Array.isArray(A.illegal)&&(A.illegal=y(...A.illegal))}function ze(A,j){if(A.match){if(A.begin||A.end)throw new Error("begin & end are not supported with match");A.begin=A.match,delete A.match}}function ne(A,j){A.relevance===void 0&&(A.relevance=1)}const ke=(A,j)=>{if(!A.beforeMatch)return;if(A.starts)throw new Error("beforeMatch cannot be used with starts");const ee=Object.assign({},A);Object.keys(A).forEach(Ce=>{delete A[Ce]}),A.keywords=ee.keywords,A.begin=b(ee.beforeMatch,f(ee.begin)),A.starts={relevance:0,contains:[Object.assign(ee,{endsParent:!0})]},A.relevance=0,delete ee.beforeMatch},K=["of","and","for","in","not","or","if","then","parent","list","value"],_e="keyword";function Oe(A,j,ee=_e){const Ce=Object.create(null);return typeof A=="string"?it(ee,A.split(" ")):Array.isArray(A)?it(ee,A):Object.keys(A).forEach(function(dt){Object.assign(Ce,Oe(A[dt],j,dt))}),Ce;function it(dt,Ee){j&&(Ee=Ee.map(be=>be.toLowerCase())),Ee.forEach(function(be){const Te=be.split("|");Ce[Te[0]]=[dt,Re(Te[0],Te[1])]})}}function Re(A,j){return j?Number(j):Qe(A)?0:1}function Qe(A){return K.includes(A.toLowerCase())}const bt={},Et=A=>{console.error(A)},Me=(A,...j)=>{console.log(`WARN: ${A}`,...j)},Ke=(A,j)=>{bt[`${A}/${j}`]||(console.log(`Deprecated as of ${A}. ${j}`),bt[`${A}/${j}`]=!0)},pt=new Error;function _t(A,j,{key:ee}){let Ce=0;const it=A[ee],dt={},Ee={};for(let be=1;be<=j.length;be++)Ee[be+Ce]=it[be],dt[be+Ce]=!0,Ce+=v(j[be-1]);A[ee]=Ee,A[ee]._emit=dt,A[ee]._multi=!0}function Yt(A){if(Array.isArray(A.begin)){if(A.skip||A.excludeBegin||A.returnBegin)throw Et("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),pt;if(typeof A.beginScope!="object"||A.beginScope===null)throw Et("beginScope must be object"),pt;_t(A,A.begin,{key:"beginScope"}),A.begin=E(A.begin,{joinWith:""})}}function Ut(A){if(Array.isArray(A.end)){if(A.skip||A.excludeEnd||A.returnEnd)throw Et("skip, excludeEnd, returnEnd not compatible with endScope: {}"),pt;if(typeof A.endScope!="object"||A.endScope===null)throw Et("endScope must be object"),pt;_t(A,A.end,{key:"endScope"}),A.end=E(A.end,{joinWith:""})}}function on(A){A.scope&&typeof A.scope=="object"&&A.scope!==null&&(A.beginScope=A.scope,delete A.scope)}function dn(A){on(A),typeof A.beginScope=="string"&&(A.beginScope={_wrap:A.beginScope}),typeof A.endScope=="string"&&(A.endScope={_wrap:A.endScope}),Yt(A),Ut(A)}function q(A){function j(Ee,be){return new RegExp(d(Ee),"m"+(A.case_insensitive?"i":"")+(A.unicodeRegex?"u":"")+(be?"g":""))}class ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Te){Te.position=this.position++,this.matchIndexes[this.matchAt]=Te,this.regexes.push([Te,be]),this.matchAt+=v(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Te=>Te[1]);this.matcherRe=j(E(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Te=this.matcherRe.exec(be);if(!Te)return null;const xt=Te.findIndex((Jn,Os)=>Os>0&&Jn!==void 0),ht=this.matchIndexes[xt];return Te.splice(0,xt),Object.assign(Te,ht)}}class Ce{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Te=new ee;return this.rules.slice(be).forEach(([xt,ht])=>Te.addRule(xt,ht)),Te.compile(),this.multiRegexes[be]=Te,Te}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Te){this.rules.push([be,Te]),Te.type==="begin"&&this.count++}exec(be){const Te=this.getMatcher(this.regexIndex);Te.lastIndex=this.lastIndex;let xt=Te.exec(be);if(this.resumingScanAtSamePosition()&&!(xt&&xt.index===this.lastIndex)){const ht=this.getMatcher(0);ht.lastIndex=this.lastIndex+1,xt=ht.exec(be)}return xt&&(this.regexIndex+=xt.position+1,this.regexIndex===this.count&&this.considerAll()),xt}}function it(Ee){const be=new Ce;return Ee.contains.forEach(Te=>be.addRule(Te.begin,{rule:Te,type:"begin"})),Ee.terminatorEnd&&be.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&be.addRule(Ee.illegal,{type:"illegal"}),be}function dt(Ee,be){const Te=Ee;if(Ee.isCompiled)return Te;[Xe,ze,dn,ke].forEach(ht=>ht(Ee,be)),A.compilerExtensions.forEach(ht=>ht(Ee,be)),Ee.__beforeBegin=null,[gt,ce,ne].forEach(ht=>ht(Ee,be)),Ee.isCompiled=!0;let xt=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),xt=Ee.keywords.$pattern,delete Ee.keywords.$pattern),xt=xt||/\w+/,Ee.keywords&&(Ee.keywords=Oe(Ee.keywords,A.case_insensitive)),Te.keywordPatternRe=j(xt,!0),be&&(Ee.begin||(Ee.begin=/\B|\b/),Te.beginRe=j(Te.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(Te.endRe=j(Te.end)),Te.terminatorEnd=d(Te.end)||"",Ee.endsWithParent&&be.terminatorEnd&&(Te.terminatorEnd+=(Ee.end?"|":"")+be.terminatorEnd)),Ee.illegal&&(Te.illegalRe=j(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(ht){return he(ht==="self"?Ee:ht)})),Ee.contains.forEach(function(ht){dt(ht,Te)}),Ee.starts&&dt(Ee.starts,be),Te.matcher=it(Te),Te}if(A.compilerExtensions||(A.compilerExtensions=[]),A.contains&&A.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return A.classNameAliases=r(A.classNameAliases||{}),dt(A)}function ue(A){return A?A.endsWithParent||ue(A.starts):!1}function he(A){return A.variants&&!A.cachedVariants&&(A.cachedVariants=A.variants.map(function(j){return r(A,{variants:null},j)})),A.cachedVariants?A.cachedVariants:ue(A)?r(A,{starts:A.starts?r(A.starts):null}):Object.isFrozen(A)?r(A):A}var Je="11.11.1";class Ue extends Error{constructor(j,ee){super(j),this.name="HTMLInjectionError",this.html=ee}}const et=n,Kt=r,Ve=Symbol("nomatch"),sn=7,fn=function(A){const j=Object.create(null),ee=Object.create(null),Ce=[];let it=!0;const dt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let be={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function Te(se){return be.noHighlightRe.test(se)}function xt(se){let De=se.className+" ";De+=se.parentNode?se.parentNode.className:"";const We=be.languageDetectRe.exec(De);if(We){const st=er(We[1]);return st||(Me(dt.replace("{}",We[1])),Me("Falling back to no-highlight mode for this block.",se)),st?We[1]:"no-highlight"}return De.split(/\s+/).find(st=>Te(st)||er(st))}function ht(se,De,We){let st="",kt="";typeof De=="object"?(st=se,We=De.ignoreIllegals,kt=De.language):(Ke("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ke("10.7.0",`Please use highlight(code, options) instead.
|
|
659
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
660
|
-
`,1;if(Ms>1e5&&Ms>Ae.index*3)throw new Error("potential infinite loop, way more iterations than matches");return at+=qe,qe.length}const _n=er(se);if(!_n)throw Et(dt.replace("{}",se)),new Error('Unknown language: "'+se+'"');const Lh=q(_n);let Is="",Pe=st||Lh;const xc={},Mt=new be.__emitter(be);Mh();let at="",ci=0,_r=0,Ms=0,Ls=!1;try{if(_n.__emitTokens)_n.__emitTokens(De,Mt);else{for(Pe.matcher.considerAll();;){Ms++,Ls?Ls=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=_r;const fe=Pe.matcher.exec(De);if(!fe)break;const Ae=De.substring(_r,fe.index),qe=vc(Ae,fe);_r=fe.index+qe}vc(De.substring(_r))}return Mt.finalize(),Is=Mt.toHTML(),{language:se,value:Is,relevance:ci,illegal:!1,_emitter:Mt,_top:Pe}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:se,value:et(De),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:_r,context:De.slice(_r-100,_r+100),mode:fe.mode,resultSoFar:Is},_emitter:Mt};if(it)return{language:se,value:et(De),illegal:!1,relevance:0,errorRaised:fe,_emitter:Mt,_top:Pe};throw fe}}function Os(se){const De={value:et(se),illegal:!1,relevance:0,_top:Ee,_emitter:new be.__emitter(be)};return De._emitter.addText(se),De}function Rs(se,De){De=De||be.languages||Object.keys(j);const We=Os(se),st=De.filter(er).filter(hc).map(Zt=>Jn(Zt,se,!1));st.unshift(We);const kt=st.sort((Zt,wn)=>{if(Zt.relevance!==wn.relevance)return wn.relevance-Zt.relevance;if(Zt.language&&wn.language){if(er(Zt.language).supersetOf===wn.language)return 1;if(er(wn.language).supersetOf===Zt.language)return-1}return 0}),[gn,tr]=kt,ai=gn;return ai.secondBest=tr,ai}function xh(se,De,We){const st=De&&ee[De]||We;se.classList.add("hljs"),se.classList.add(`language-${st}`)}function Ns(se){let De=null;const We=xt(se);if(Te(We))return;if(si("before:highlightElement",{el:se,language:We}),se.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",se);return}if(se.children.length>0&&(be.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(se)),be.throwUnescapedHTML))throw new Ue("One of your code blocks includes unescaped HTML.",se.innerHTML);De=se;const st=De.textContent,kt=We?ht(st,{language:We,ignoreIllegals:!0}):Rs(st);se.innerHTML=kt.value,se.dataset.highlighted="yes",xh(se,We,kt.language),se.result={language:kt.language,re:kt.relevance,relevance:kt.relevance},kt.secondBest&&(se.secondBest={language:kt.secondBest.language,relevance:kt.secondBest.relevance}),si("after:highlightElement",{el:se,result:kt,text:st})}function wh(se){be=Kt(be,se)}const _h=()=>{ii(),Ke("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Eh(){ii(),Ke("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let gc=!1;function ii(){function se(){ii()}if(document.readyState==="loading"){gc||window.addEventListener("DOMContentLoaded",se,!1),gc=!0;return}document.querySelectorAll(be.cssSelector).forEach(Ns)}function kh(se,De){let We=null;try{We=De(A)}catch(st){if(Et("Language definition for '{}' could not be registered.".replace("{}",se)),it)Et(st);else throw st;We=Ee}We.name||(We.name=se),j[se]=We,We.rawDefinition=De.bind(null,A),We.aliases&&pc(We.aliases,{languageName:se})}function Sh(se){delete j[se];for(const De of Object.keys(ee))ee[De]===se&&delete ee[De]}function Ch(){return Object.keys(j)}function er(se){return se=(se||"").toLowerCase(),j[se]||j[ee[se]]}function pc(se,{languageName:De}){typeof se=="string"&&(se=[se]),se.forEach(We=>{ee[We.toLowerCase()]=De})}function hc(se){const De=er(se);return De&&!De.disableAutodetect}function Ah(se){se["before:highlightBlock"]&&!se["before:highlightElement"]&&(se["before:highlightElement"]=De=>{se["before:highlightBlock"](Object.assign({block:De.el},De))}),se["after:highlightBlock"]&&!se["after:highlightElement"]&&(se["after:highlightElement"]=De=>{se["after:highlightBlock"](Object.assign({block:De.el},De))})}function Th(se){Ah(se),Ce.push(se)}function Dh(se){const De=Ce.indexOf(se);De!==-1&&Ce.splice(De,1)}function si(se,De){const We=se;Ce.forEach(function(st){st[We]&&st[We](De)})}function Oh(se){return Ke("10.7.0","highlightBlock will be removed entirely in v12.0"),Ke("10.7.0","Please use highlightElement now."),Ns(se)}Object.assign(A,{highlight:ht,highlightAuto:Rs,highlightAll:ii,highlightElement:Ns,highlightBlock:Oh,configure:wh,initHighlighting:_h,initHighlightingOnLoad:Eh,registerLanguage:kh,unregisterLanguage:Sh,listLanguages:Ch,getLanguage:er,registerAliases:pc,autoDetection:hc,inherit:Kt,addPlugin:Th,removePlugin:Dh}),A.debugMode=function(){it=!1},A.safeMode=function(){it=!0},A.versionString=Je,A.regex={concat:b,lookahead:f,either:y,optional:g,anyNumberOfTimes:p};for(const se in Se)typeof Se[se]=="object"&&e(Se[se]);return Object.assign(A,Se),A},nt=fn({});return nt.newInstance=()=>fn({}),ra=nt,nt.HighlightJS=nt,nt.default=nt,ra}var oa,bd;function XS(){if(bd)return oa;bd=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return oa=e,oa}var ia,yd;function QS(){if(yd)return ia;yd=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=t.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],v={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],E=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:y,built_in:[...x,...k,"set","shopt",...E,...S]},contains:[g,t.SHEBANG(),b,f,s,a,v,u,c,l,d,r]}}return ia=e,ia}var sa,vd;function JS(){if(vd)return sa;vd=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:v.concat([{begin:/\(/,end:/\)/,keywords:y,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:g,returnBegin:!0,contains:[t.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(x,k,v,[f,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:l,keywords:y}}}return sa=e,sa}var aa,xd;function eC(){if(xd)return aa;xd=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],E={type:h,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},S={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},O=[S,f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:O.concat([{begin:/\(/,end:/\)/,keywords:E,contains:O.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:E,relevance:0},{begin:g,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:E,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(_,I,S,O,[f,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:E,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:E},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return aa=e,aa}var ua,wd;function tC(){if(wd)return ua;wd=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=t.inherit(d,{illegal:/\n/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=t.inherit(p,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,g]},h={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},y=t.inherit(h,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});p.contains=[h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],g.contains=[y,b,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[l,h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},k=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",E={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[v,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},E]}}return ua=e,ua}var ca,_d;function nC(){if(_d)return ca;_d=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),f={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},p="and or not only",g=/@-?\w[\w]*(-\w+)*/,b="[a-zA-Z-][a-zA-Z0-9_-]*",h=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,f,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+b,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...h,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...h,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...h,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return ca=u,ca}var la,Ed;function rC(){if(Ed)return la;Ed=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(l,{contains:[]}),p=t.inherit(d,{contains:[]});l.contains.push(p),d.contains.push(f);let g=[r,c];return[l,d,f,p].forEach(v=>{v.contains=v.contains.concat(g)}),g=g.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return la=e,la}var da,kd;function oC(){if(kd)return da;kd=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return da=e,da}var fa,Sd;function iC(){if(Sd)return fa;Sd=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},p="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},O=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:r}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=O,h.contains=O;const T=[{begin:/^\s*=>/,starts:{end:"$",contains:O}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:O}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(T).concat(l).concat(O)}}return fa=e,fa}var ga,Cd;function sC(){if(Cd)return ga;Cd=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return ga=e,ga}var pa,Ad;function aC(){if(Ad)return pa;Ad=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return pa=e,pa}var ha,Td;function uC(){if(Td)return ha;Td=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,f=n.either(c,l,d),p=n.concat(f,"(\\s*\\.\\s*",f,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return ha=e,ha}var ma,Dd;function cC(){if(Dd)return ma;Dd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),g={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},b={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:g,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[h,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:g,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[b,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,b]}}return ma=i,ma}var ba,Od;function lC(){if(Od)return ba;Od=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,d=(me,{after:J})=>{const pe="</"+me[0].slice(1);return me.input.indexOf(pe,J)!==-1},f=e,p={begin:"<>",end:"</>"},g=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(me,J)=>{const pe=me[0].length+me.index,Se=me.input[pe];if(Se==="<"||Se===","){J.ignoreMatch();return}Se===">"&&(d(me,{after:pe})||J.ignoreMatch());let Ne;const Xe=me.input.substring(pe);if(Ne=Xe.match(/^\s*=/)){J.ignoreMatch();return}if((Ne=Xe.match(/^\s+extends\s+/))&&Ne.index===0){J.ignoreMatch();return}}},h={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",v=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",k={className:"number",variants:[{begin:`(\\b(${x})((${v})|\\.)?|(${v}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${v})\\b|\\.)?|(${v})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:h,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},O={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},I={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,E]},T={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:f+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},R=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,O,_,I,{match:/\$\d+/},k];E.contains=R.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(R)});const M=[].concat(T,E.contains),C=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(M)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:C},F={variants:[{match:[/class/,/\s+/,f,/\s+/,/extends/,/\s+/,l.concat(f,"(",l.concat(/\./,f),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,f],scope:{1:"keyword",3:"title.class"}}]},G={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},U={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},z={variants:[{match:[/function/,/\s+/,f,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(me){return l.concat("(?!",me.join("|"),")")}const V={match:l.concat(/\b/,Z([...i,"super","import"].map(me=>`${me}\\s*\\(`)),f,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:l.concat(/\./,l.lookahead(l.concat(f,/(?![0-9A-Za-z$_(])/))),end:f,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,f,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,f,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:G},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),U,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,S,O,_,I,T,{match:/\$\d+/},k,G,{scope:"attr",match:f+l.lookahead(":"),relevance:0},ie,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,c.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:g},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,c.inherit(c.TITLE_MODE,{begin:f,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+f,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},V,P,F,W,{match:/\$[(.]/}]}}return ba=u,ba}var ya,Rd;function dC(){if(Rd)return ya;Rd=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return ya=e,ya}var va,Nd;function fC(){if(Nd)return va;Nd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},g=r,b=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=h;return y.variants[1].contains=[h],h.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,b,a,u,f,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,i.C_LINE_COMMENT_MODE,b],relevance:0},i.C_LINE_COMMENT_MODE,b,f,p,d,i.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,p]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
661
|
-
`},g]}}return va=o,va}var xa,Id;function gC(){if(Id)return xa;Id=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),f=u,p="and or not only",g="[\\w-]+",b="("+g+"|@\\{"+g+"\\})",h=[],y=[],v=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},x=function(M,C,N){return{className:M,begin:C,relevance:N}},k={$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},E={begin:"\\(",end:"\\)",contains:y,keywords:k,relevance:0};y.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,v("'"),v('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,E,x("variable","@@?"+g,10),x("variable","@\\{"+g+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:g+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const S=y.concat({begin:/\{/,end:/\}/,contains:h}),O={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},_={begin:b+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:y}}]},I={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:k,returnEnd:!0,contains:y,relevance:0}},L={className:"variable",variants:[{begin:"@"+g+"\\s*:",relevance:15},{begin:"@"+g}],starts:{end:"[;}]",returnEnd:!0,contains:S}},T={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,O,x("keyword","all\\b"),x("variable","@\\{"+g+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",b,0),x("selector-id","#"+b),x("selector-class","\\."+b,0),x("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:S},{begin:"!important"},d.FUNCTION_DISPATCH]},R={begin:g+`:(:)?(${f.join("|")})`,returnBegin:!0,contains:[T]};return h.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,I,L,R,_,T,O,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:h}}return xa=c,xa}var wa,Md;function pC(){if(Md)return wa;Md=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return wa=e,wa}var _a,Ld;function hC(){if(Ld)return _a;Ld=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return _a=e,_a}var Ea,$d;function mC(){if($d)return Ea;$d=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(h,y,v="\\1")=>{const x=v==="\\1"?v:n.concat(v,y);return n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,v,o)},g=(h,y,v)=>n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,v,o),b=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",n.either(...f,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",n.either(...f,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}return Ea=e,Ea}var ka,Pd;function bC(){if(Pd)return ka;Pd=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return ka=e,ka}var Sa,Fd;function yC(){if(Fd)return Sa;Fd=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(N,F)=>{F.data._beginMatch=N[1]||N[2]},"on:end":(N,F)=>{F.data._beginMatch!==N[1]&&F.ignoreMatch()}},p=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[
|
|
662
|
-
]`,b={scope:"string",variants:[d,l,f,p]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],E={keyword:v,literal:(N=>{const F=[];return N.forEach(G=>{F.push(G),G.toLowerCase()===G?F.push(G.toUpperCase()):F.push(G.toLowerCase())}),F})(y),built_in:x},S=N=>N.map(F=>F.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",S(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},_=n.concat(o,"\\b(?!\\()"),I={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},L={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:E,contains:[L,a,I,t.C_BLOCK_COMMENT_MODE,b,h,O]},R={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",S(v).join("\\b|"),"|",S(x).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(R);const M=[L,I,t.C_BLOCK_COMMENT_MODE,b,h,O],C={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:E,contains:[C,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,R,I,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:E,contains:["self",C,a,I,t.C_BLOCK_COMMENT_MODE,b,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},b,h]}}return Sa=e,Sa}var Ca,Bd;function vC(){if(Bd)return Ca;Bd=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Ca=e,Ca}var Aa,zd;function xC(){if(zd)return Aa;zd=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Aa=e,Aa}var Ta,Ud;function wC(){if(Ud)return Ta;Ud=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,b=`\\b|${o.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${p})[jJ](?=${b})`}]},y={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,h,f,t.HASH_COMMENT_MODE]}]};return l.contains=[f,h,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,v,f]}]}}return Ta=e,Ta}var Da,Kd;function _C(){if(Kd)return Da;Kd=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Da=e,Da}var Oa,Hd;function EC(){if(Hd)return Oa;Hd=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Oa=e,Oa}var Ra,qd;function kC(){if(qd)return Ra;qd=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:d}},{className:"punctuation",begin:"->"},s]}}return Ra=e,Ra}var Na,jd;function SC(){if(jd)return Na;jd=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,f=i,p="@[a-z-]+",g="and or not only",h={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+f.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},h,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,h,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:p,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:p,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},h,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return Na=u,Na}var Ia,Gd;function CC(){if(Gd)return Ia;Gd=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Ia=e,Ia}var Ma,Vd;function AC(){if(Vd)return Ma;Vd=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=d,b=[...l,...c].filter(S=>!d.includes(S)),h={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:n.concat(/\b/,n.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function x(S){return n.concat(/\b/,n.either(...S.map(O=>O.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:x(p),relevance:0};function E(S,{exceptions:O,when:_}={}){const I=_;return O=O||[],S.map(L=>L.match(/\|\d+$/)||O.includes(L)?L:I(L)?`${L}|0`:L)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(b,{when:S=>S.length<3}),literal:s,type:u,built_in:f},contains:[{scope:"type",match:x(a)},k,v,h,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return Ma=e,Ma}var La,Wd;function TC(){if(Wd)return La;Wd=1;function e(_){return _?typeof _=="string"?_:_.source:null}function t(_){return n("(?=",_,")")}function n(..._){return _.map(L=>e(L)).join("")}function r(_){const I=_[_.length-1];return typeof I=="object"&&I.constructor===Object?(_.splice(_.length-1,1),I):{}}function o(..._){return"("+(r(_).capture?"":"?:")+_.map(T=>e(T)).join("|")+")"}const i=_=>n(/\b/,_,/\w$/.test(_)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],f=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),b=o(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),h=n(g,b,"*"),y=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=o(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(y,v,"*"),k=n(/[A-Z]/,v,"*"),E=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],S=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function O(_){const I={match:/\s+/,relevance:0},L=_.COMMENT("/\\*","\\*/",{contains:["self"]}),T=[_.C_LINE_COMMENT_MODE,L],R={match:[/\./,o(...s,...a)],className:{2:"keyword"}},M={match:n(/\./,o(...c)),relevance:0},C=c.filter(Ve=>typeof Ve=="string").concat(["_|0"]),N=c.filter(Ve=>typeof Ve!="string").concat(u).map(i),F={variants:[{className:"keyword",match:o(...N,...a)}]},G={$pattern:o(/\b\w+/,/#\w+/),keyword:C.concat(f),literal:l},U=[R,M,F],z={match:n(/\./,o(...p)),relevance:0},P={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},Z=[z,P],V={match:/->/,relevance:0},te={className:"operator",relevance:0,variants:[{match:h},{match:`\\.(\\.|${b})+`}]},W=[V,te],H="([0-9]_*)+",ie="([0-9a-fA-F]_*)+",me={className:"number",relevance:0,variants:[{match:`\\b(${H})(\\.(${H}))?([eE][+-]?(${H}))?\\b`},{match:`\\b0x(${ie})(\\.(${ie}))?([pP][+-]?(${H}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},J=(Ve="")=>({className:"subst",variants:[{match:n(/\\/,Ve,/[0\\tnr"']/)},{match:n(/\\/,Ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),pe=(Ve="")=>({className:"subst",match:n(/\\/,Ve,/[\t ]*(?:[\r\n]|\r\n)/)}),Se=(Ve="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ve,/\(/),end:/\)/}),Ne=(Ve="")=>({begin:n(Ve,/"""/),end:n(/"""/,Ve),contains:[J(Ve),pe(Ve),Se(Ve)]}),Xe=(Ve="")=>({begin:n(Ve,/"/),end:n(/"/,Ve),contains:[J(Ve),Se(Ve)]}),gt={className:"string",variants:[Ne(),Ne("#"),Ne("##"),Ne("###"),Xe(),Xe("#"),Xe("##"),Xe("###")]},ce=[_.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[_.BACKSLASH_ESCAPE]}],ze={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ce},ne=Ve=>{const sn=n(Ve,/\//),fn=n(/\//,Ve);return{begin:sn,end:fn,contains:[...ce,{scope:"comment",begin:`#(?!.*${fn})`,end:/$/}]}},ke={scope:"regexp",variants:[ne("###"),ne("##"),ne("#"),ze]},K={match:n(/`/,x,/`/)},_e={className:"variable",match:/\$\d+/},Oe={className:"variable",match:`\\$${v}+`},Re=[K,_e,Oe],Qe={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:S,contains:[...W,me,gt]}]}},bt={scope:"keyword",match:n(/@/,o(...E),t(o(/\(/,/\s+/)))},Et={scope:"meta",match:n(/@/,x)},Me=[Qe,bt,Et],Ke={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:k,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(k)),relevance:0}]},pt={begin:/</,end:/>/,keywords:G,contains:[...T,...U,...Me,V,Ke]};Ke.contains.push(pt);const _t={match:n(x,/\s*:/),keywords:"_|0",relevance:0},Yt={begin:/\(/,end:/\)/,relevance:0,keywords:G,contains:["self",_t,...T,ke,...U,...Z,...W,me,gt,...Re,...Me,Ke]},Ut={begin:/</,end:/>/,keywords:"repeat each",contains:[...T,Ke]},on={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},dn={begin:/\(/,end:/\)/,keywords:G,contains:[on,...T,...U,...W,me,gt,...Me,Ke,Yt],endsParent:!0,illegal:/["']/},q={match:[/(func|macro)/,/\s+/,o(K.match,x,h)],className:{1:"keyword",3:"title.function"},contains:[Ut,dn,I],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ut,dn,I],illegal:/\[|%/},he={match:[/operator/,/\s+/,h],className:{1:"keyword",3:"title"}},Je={begin:[/precedencegroup/,/\s+/,k],className:{1:"keyword",3:"title"},contains:[Ke],keywords:[...d,...l],end:/}/},Ue={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},et={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Kt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:G,contains:[Ut,...U,{begin:/:/,end:/\{/,keywords:G,contains:[{scope:"title.class.inherited",match:k},...U],relevance:0}]};for(const Ve of gt.variants){const sn=Ve.contains.find(nt=>nt.label==="interpol");sn.keywords=G;const fn=[...U,...Z,...W,me,gt,...Re];sn.contains=[...fn,{begin:/\(/,end:/\)/,contains:["self",...fn]}]}return{name:"Swift",keywords:G,contains:[...T,q,ue,Ue,et,Kt,he,Je,{beginKeywords:"import",end:/$/,contains:[...T],relevance:0},ke,...U,...Z,...W,me,gt,...Re,...Me,Ke,Yt]}}return La=O,La}var $a,Yd;function DC(){if(Yd)return $a;Yd=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,h,s,a],v=[...y];return v.pop(),v.push(u),g.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return $a=e,$a}var Pa,Zd;function OC(){if(Zd)return Pa;Zd=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,f=(J,{after:pe})=>{const Se="</"+J[0].slice(1);return J.input.indexOf(Se,pe)!==-1},p=e,g={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,h={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(J,pe)=>{const Se=J[0].length+J.index,Ne=J.input[Se];if(Ne==="<"||Ne===","){pe.ignoreMatch();return}Ne===">"&&(f(J,{after:Se})||pe.ignoreMatch());let Xe;const gt=J.input.substring(Se);if(Xe=gt.match(/^\s*=/)){pe.ignoreMatch();return}if((Xe=gt.match(/^\s+extends\s+/))&&Xe.index===0){pe.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",x=`\\.(${v})`,k="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${k})((${x})|\\.)?|(${x}))[eE][+-]?(${v})\\b`},{begin:`\\b(${k})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},L={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,S]},R={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:p+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},M=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,_,I,L,{match:/\$\d+/},E];S.contains=M.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(M)});const C=[].concat(R,S.contains),N=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(C)}]),F={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:N},G={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,d.concat(p,"(",d.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,p,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(J){return d.concat("(?!",J.join("|"),")")}const te={match:d.concat(/\b/,V([...i,"super","import"].map(J=>`${J}\\s*\\(`)),p,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},W={begin:d.concat(/\./,d.lookahead(d.concat(p,/(?![0-9A-Za-z$_(])/))),end:p,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:N,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,_,I,L,R,{match:/\$\d+/},E,U,{scope:"attr",match:p+d.lookahead(":"),relevance:0},me,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,l.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:N}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:b},{begin:h.begin,"on:begin":h.isTrulyOpeningTag,end:h.end}],subLanguage:"xml",contains:[{begin:h.begin,end:h.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,l.inherit(l.TITLE_MODE,{begin:p,className:"title.function"})]},{match:/\.\.\./,relevance:0},W,{match:"\\$"+p,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},te,Z,G,H,{match:/\$[(.]/}]}}function c(l){const d=l.regex,f=u(l),p=e,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},h={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},v=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(v),literal:n,built_in:a.concat(g),"variable.language":s},k={className:"meta",begin:"@"+p},E=(I,L,T)=>{const R=I.contains.findIndex(M=>M.label===L);if(R===-1)throw new Error("can not find mode to replace");I.contains.splice(R,1,T)};Object.assign(f.keywords,x),f.exports.PARAMS_CONTAINS.push(k);const S=f.contains.find(I=>I.scope==="attr"),O=Object.assign({},S,{match:d.concat(p,d.lookahead(/\s*\?:/))});f.exports.PARAMS_CONTAINS.push([f.exports.CLASS_REFERENCE,S,O]),f.contains=f.contains.concat([k,b,h,O]),E(f,"shebang",l.SHEBANG()),E(f,"use_strict",y);const _=f.contains.find(I=>I.label==="func.def");return _.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return Pa=c,Pa}var Fa,Xd;function RC(){if(Xd)return Fa;Xd=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,f,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}return Fa=e,Fa}var Ba,Qd;function NC(){if(Qd)return Ba;Qd=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return Ba=e,Ba}var za,Jd;function IC(){if(Jd)return za;Jd=1;var e=ZS();return e.registerLanguage("xml",XS()),e.registerLanguage("bash",QS()),e.registerLanguage("c",JS()),e.registerLanguage("cpp",eC()),e.registerLanguage("csharp",tC()),e.registerLanguage("css",nC()),e.registerLanguage("markdown",rC()),e.registerLanguage("diff",oC()),e.registerLanguage("ruby",iC()),e.registerLanguage("go",sC()),e.registerLanguage("graphql",aC()),e.registerLanguage("ini",uC()),e.registerLanguage("java",cC()),e.registerLanguage("javascript",lC()),e.registerLanguage("json",dC()),e.registerLanguage("kotlin",fC()),e.registerLanguage("less",gC()),e.registerLanguage("lua",pC()),e.registerLanguage("makefile",hC()),e.registerLanguage("perl",mC()),e.registerLanguage("objectivec",bC()),e.registerLanguage("php",yC()),e.registerLanguage("php-template",vC()),e.registerLanguage("plaintext",xC()),e.registerLanguage("python",wC()),e.registerLanguage("python-repl",_C()),e.registerLanguage("r",EC()),e.registerLanguage("rust",kC()),e.registerLanguage("scss",SC()),e.registerLanguage("shell",CC()),e.registerLanguage("sql",AC()),e.registerLanguage("swift",TC()),e.registerLanguage("yaml",DC()),e.registerLanguage("typescript",OC()),e.registerLanguage("vbnet",RC()),e.registerLanguage("wasm",NC()),e.HighlightJS=e,e.default=e,za=e,za}var MC=IC();const ef=sc(MC),xn=new cn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&ef.getLanguage(t))try{const n=ef.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),LC=/^<\/?(?:details|summary)>$/i,$C=/^<details\s+open\s*>$/i,PC=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function FC(e){return LC.test(e)||$C.test(e)||PC.test(e)}function Yp(e){const t=xn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=FC(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}xn.renderer.rules.html_block=(e,t)=>Yp(e[t].content);xn.renderer.rules.html_inline=(e,t)=>Yp(e[t].content);const BC=xn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),tf=xn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),zC=xn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Zp(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function UC(e){return e.replace(/:\d+(?::\d+)?$/,"")}function KC(e){const n=UC(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function HC(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&KC(e)}function Ua(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function Vr(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}xn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=Zp(u[1],s,i?.projectId))}return BC(e,t,n,r,o)};xn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&HC(a[1])){const c=a[1];return Ua(s,"href"),Ua(s,"target"),Ua(s,"rel"),Vr(s,"role","button"),Vr(s,"tabindex","0"),Vr(s,"data-file-link","true"),Vr(s,"data-file-path",c),i.fileLinkTitle&&(Vr(s,"title",i.fileLinkTitle),Vr(s,"aria-label",i.fileLinkTitle)),tf(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Zp(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return tf(e,t,n,r,o)};xn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}">${u}</div>`}return zC(e,t,n,r,o)};xn.use(YS,{enabled:!1,label:!1});function Cs(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),xn.render(e,n)}function qC(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const jC="modulepreload",GC=function(e){return"/"+e},nf={},VC=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=GC(c),c in nf)return;nf[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":jC,l||(f.as="script"),f.crossOrigin="",f.href=c,u&&f.setAttribute("nonce",u),document.head.appendChild(f),l)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Ka=null,rf=Promise.resolve();const xu=new WeakMap;async function WC(){return Ka||(Ka=VC(()=>import("./mermaid.core-BO-VJXe-.js").then(e=>e.bp),[]).then(e=>e.default)),Ka}function YC(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function ZC(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function XC(e){const t=(xu.get(e)??0)+1;return xu.set(e,t),t}function Ha(e,t){return xu.get(e)===t}async function QC(e){const t=rf.then(e,e);rf=t.catch(()=>{}),await t}async function JC(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=XC(e),n=await WC();if(!Ha(e,t))return()=>{};if(await ZC(),!Ha(e,t))return()=>{};async function r(a){const u=a.filter(c=>c.isConnected&&e.contains(c));u.length!==0&&await QC(async()=>{if(!Ha(e,t))return;const c=u.filter(d=>d.isConnected&&e.contains(d));if(c.length===0)return;const l=YC();n.initialize({startOnLoad:!1,theme:l}),c.forEach(d=>{const f=d.getAttribute("data-mermaid-source");f&&(d.removeAttribute("data-processed"),d.textContent=f)});try{await n.run({nodes:c})}catch(d){console.error("[mermaid] render error:",d)}})}const o=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await r(o);const i=()=>void r(Array.from(e.querySelectorAll(".mermaid"))),s=window.matchMedia("(prefers-color-scheme: dark)");return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}}function e3(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function t3(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function n3(e,t,n={}){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!t3(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=e3(u.startContainer,e),f=D("selection.noSection"),p=d&&d.textContent?.trim()||f;i=c,t({text:c,rect:l,sectionPath:p})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const r3=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,o3=/^##\s+/,i3=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,s3=/^\d+\.\s+(.*\S)\s*$/,a3=/^\s*$/,of=/\s*[((]推荐[))]\s*$/,sf=/\s*(自由文本)\s*$/,u3=/^\[(choice|confirm)\]\s*/i,c3=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,l3=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function d3(e){const t=e.split(`
|
|
663
|
-
`);let n=0;for(;n<t.length&&!r3.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(o3.test(i))break;const s=h3(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>f3(i,s))}function f3(e,t){const n=u3.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=sf.test(o),s=i?o.replace(sf,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=g3(e.bodyLines);return{id:af(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=p3(e.bodyLines,t,s),u=i||a.length===0;return{id:af(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function g3(e){let t,n;for(const r of e){const o=r.trim(),i=c3.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=l3.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function p3(e,t,n){const r=[];let o=0;for(const i of e){if(a3.test(i))continue;const s=m3(i);if(s===null)continue;const a=of.test(s),u=a?s.replace(of,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:b3(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function h3(e){const t=i3.exec(e);return t?t[1]:null}function m3(e){const t=s3.exec(e);return t?t[1]:null}function af(e,t){return`q-${e}-${Xp(t)}`}function b3(e,t,n){return`q-${e}-o-${t}-${Xp(n)}`}function Xp(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var y3=B('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const v3=36,x3=140,w3=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-v3-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-x3-8);return{top:i,left:s,visible:!0}};return m(Y,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=y3();return o.$$mousedown=i=>i.preventDefault(),w(o,m(Fe,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return D("selectionMenu.annotate")}}),null),w(o,m(Fe,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return D("selectionMenu.explain")}}),null),le(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Ro(o,"top",i.e=s),a!==i.t&&Ro(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};ln(["mousedown"]);var _3=B('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-auto rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),E3=B('<p class="text-destructive ">');const k3=500,or=8,S3=e=>{const[t,n]=$(""),[r,o]=$(!1),[i,s]=$(null),[a,u]=$(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const f=a()||260,p=window.innerHeight,g=d.rect.bottom+or,b=d.rect.top-or-f;let h;g+f<=p-or?h=g:b>=or?h=b:h=Math.max(or,p-f-or);const y=Math.min(Math.max(or,d.rect.left),window.innerWidth-k3-or);return{top:h,left:y}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(f){s(f.message)}finally{o(!1)}}}return m(Y,{get when(){return de(()=>!!e.open)()&&e.snap},get children(){var d=_3(),f=d.firstChild,p=f.firstChild,g=f.nextSibling,b=g.firstChild,h=b.nextSibling,y=h.nextSibling,v=y.nextSibling,x=v.nextSibling;x.nextSibling;var k=g.nextSibling,E=k.firstChild;return d.$$mousedown=S=>S.stopPropagation(),Gn(S=>{queueMicrotask(()=>{S.offsetHeight!==a()&&u(S.offsetHeight)})},d),w(p,()=>D("annotate.title")),w(b,()=>e.snap?.sectionPath),w(g,()=>D("annotate.inSection"),y),w(g,()=>(e.snap?.text??"").slice(0,200),x),k.addEventListener("submit",l),w(k,m(oo,{rows:3,get value(){return t()},onInput:S=>n(S.currentTarget.value),get placeholder(){return D("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),E),w(k,(()=>{var S=de(()=>!!i());return()=>S()&&(()=>{var O=E3();return w(O,i),O})()})(),E),w(E,m(Fe,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return D("common.cancel")}}),null),w(E,m(Fe,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return de(()=>!!r())()?D("common.submitting"):D("annotate.submit")}}),null),le(S=>{var O=`${c().top}px`,_=`${c().left}px`;return O!==S.e&&Ro(d,"top",S.e=O),_!==S.t&&Ro(d,"left",S.t=_),S},{e:void 0,t:void 0}),d}})};ln(["mousedown"]);var C3=B('<label class="flex cursor-pointer items-start gap-1.5 ml-5"><input type=checkbox class=mt-1><span class="flex flex-col"><span class=font-medium></span><span class="text-sm text-muted-foreground">'),A3=B("<div><span class=text-muted-foreground></span><code class=font-mono>"),T3=B('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),D3=B('<div class="flex flex-col gap-1 text-sm">'),O3=B('<p class="text-destructive ">'),R3=B('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><fieldset class="m-0 flex flex-col gap-1.5 border-0 p-0"><legend class="mb-1 font-medium"></legend></fieldset><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">'),N3=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=append-kind><span>');const I3={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},M3=e=>{const[t,n]=$("fix"),[r,o]=$(!1),[i,s]=$(""),[a,u]=$(!1),[c,l]=$(null),[d,f]=$(null);oe(()=>{if(!e.open){f(null);return}const h=e.anchorEl;if(!h)return;const y=h.getBoundingClientRect(),x=Math.max(16,Math.min(y.left,window.innerWidth-384-16));f({top:y.bottom+8,left:x})}),oe(()=>{if(!e.open)return;const h=y=>{y.key==="Escape"&&(y.preventDefault(),b())};window.addEventListener("keydown",h),ae(()=>window.removeEventListener("keydown",h))});function p(){n("fix"),o(!1),s(""),l(null)}async function g(h){h.preventDefault();const y=i().trim();if(!y){l(D("appendTask.descRequired"));return}u(!0),l(null);try{await e.onSubmit({kind:t(),description:y,sectionPath:e.sectionPath,quote:e.quote,debug:t()==="fix"?r():void 0}),p(),e.onCancel()}catch(v){l(v.message)}finally{u(!1)}}function b(){e.onCancel()}return m(Y,{get when(){return e.open},get children(){var h=R3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,E=v.nextSibling,S=E.firstChild,O=S.firstChild,_=S.nextSibling,I=_.firstChild,L=_.nextSibling;return h.$$mousedown=b,y.$$mousedown=T=>T.stopPropagation(),w(x,()=>D("appendTask.title")),w(k,()=>D("appendTask.hint")),E.addEventListener("submit",g),w(O,()=>D("appendTask.type")),w(S,()=>["feat","refct","fix"].map(T=>(()=>{var R=N3(),M=R.firstChild,C=M.nextSibling;return M.addEventListener("change",()=>n(T)),M.value=T,w(C,()=>D(I3[T])),le(()=>M.disabled=a()),le(()=>M.checked=t()===T),R})()),null),w(E,m(Y,{get when(){return t()==="fix"},get children(){var T=C3(),R=T.firstChild,M=R.nextSibling,C=M.firstChild,N=C.nextSibling;return R.addEventListener("change",F=>o(F.currentTarget.checked)),w(C,()=>D("appendTask.debugMode")),w(N,()=>D("appendTask.debugModeHint")),le(()=>R.disabled=a()),le(()=>R.checked=r()),T}}),_),w(I,()=>D("appendTask.description")),w(_,m(oo,{rows:5,get value(){return i()},onInput:T=>s(T.currentTarget.value),get placeholder(){return D("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(E,m(Y,{get when(){return e.sectionPath||e.quote},get children(){var T=D3();return w(T,m(Y,{get when(){return e.sectionPath},get children(){var R=A3(),M=R.firstChild,C=M.nextSibling;return w(M,()=>D("appendTask.refSection")),w(C,()=>e.sectionPath),R}}),null),w(T,m(Y,{get when(){return e.quote},get children(){var R=T3();return w(R,()=>e.quote?.slice(0,200)),R}}),null),T}}),L),w(E,m(Y,{get when(){return c()},get children(){var T=O3();return w(T,c),T}}),L),w(L,m(Fe,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return D("common.cancel")}}),null),w(L,m(Fe,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!a())()?D("common.submitting"):D("appendTask.submit"))]}}),null),le(T=>{var R=D("appendTask.title"),M=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0,C=a();return R!==T.e&&xe(y,"aria-label",T.e=R),T.t=ur(y,M,T.t),C!==T.a&&(S.disabled=T.a=C),T},{e:void 0,t:void 0,a:void 0}),h}})};ln(["mousedown"]);const ko="__freeform__",L3={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},$3="accept";function P3(e){return e!==$3}function F3(e,t,n){const r=L3[t],o=(n??"").trim();if(P3(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function B3(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===ko?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var z3=B('<p class="text-destructive mx-3 mt-1 ">'),U3=B('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-accent"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),K3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-option-freeform flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span>'),uf=B('<p class="m-0 break-words"><strong></strong>:'),H3=B("<div>"),cf=B('<ul class="m-0 ml-5 flex list-none flex-col gap-1 border-l border-border pl-2">'),q3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-confirm-accept flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span></span></label></li><li><label class="qcp-confirm-reject flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="font-medium text-destructive">'),j3=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),G3=B('<em class="text-accent text-sm not-italic"> '),qa=B('<li><label class="flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="min-w-0 break-words">'),V3=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function Qp(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function W3(e){const t=Qp(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function Y3(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-amber-500":"border-border":"border-border"}const Z3=e=>{const t=()=>{const h={};for(const y of e.questions){if(y.kind==="confirm"){h[y.id]={note:"",confirmTop:"accept"};continue}const v=y.options.find(x=>x.recommended);h[y.id]={selectedOptionLabel:v?.label??y.options[0]?.label,note:""}}return h},[n,r]=$(t()),[o,i]=$(!1),[s,a]=$(null);function u(h,y){r(v=>({...v,[h]:{...v[h],...y}}))}function c(h,y){u(h,{selectedOptionLabel:y})}function l(h,y){u(h,{note:y})}function d(h,y){y==="accept"?u(h,{confirmTop:y,confirmIntent:void 0,confirmDrop:void 0}):u(h,{confirmTop:y})}function f(h,y){y==="dropGoal"?u(h,{confirmIntent:y}):u(h,{confirmIntent:y,confirmDrop:void 0})}function p(h,y){u(h,{confirmDrop:y})}const g=re(()=>{const h=n();let y=0;for(const v of e.questions){const x=h[v.id];if(!x){y+=1;continue}if(v.kind==="confirm"){W3(x)||(y+=1);continue}const k=x.note??"";v.isFreeform||x.selectedOptionLabel===ko?k.trim()||(y+=1):x.selectedOptionLabel||(y+=1)}return y});async function b(){i(!0),a(null);try{const h=n(),y=[];for(const x of e.questions){const k=h[x.id]??{note:""};if(x.kind==="confirm"){const S=Qp(k);if(!S)continue;const O=F3(x,S,k.note);if(!O){a(D("questionConfirm.reasonRequired"));return}y.push(O);continue}const E=B3(x,k);E&&y.push(E)}const v={answers:y,freeformAnnotations:e.freeforms.map(x=>({sectionPath:x.sectionPath,quote:x.quote,note:x.note}))};if(v.answers.length===0&&v.freeformAnnotations.length===0){a(D("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(h){a(h.message)}finally{i(!1)}}return(()=>{var h=U3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,E=k.firstChild,S=E.nextSibling;S.nextSibling;var O=y.nextSibling;return w(x,()=>D("questionConfirm.title")),w(k,()=>D("questionConfirm.unanswered"),E),w(S,g),w(k,()=>e.questions.length,null),w(y,m(Fe,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!o())()?D("common.submitting"):de(()=>!!e.running)()?D("questionConfirm.running"):D("questionConfirm.submitAll"))]}}),null),w(h,m(Y,{get when(){return s()},get children(){var _=z3();return w(_,s),_}}),O),w(O,m(yt,{get each(){return e.questions},children:_=>{const I=()=>n()[_.id]??{note:""},L=()=>_.kind!=="confirm"&&(_.isFreeform||I().selectedOptionLabel===ko),T=()=>_.kind==="confirm"&&I().confirmTop==="reject";return(()=>{var R=j3(),M=R.firstChild;return w(M,()=>_.text),w(R,m(Y,{get when(){return _.kind==="choice"},get children(){var C=K3(),N=C.firstChild,F=N.firstChild,G=F.firstChild,U=G.nextSibling;return w(C,m(yt,{get each(){return _.options},children:z=>(()=>{var P=qa(),Z=P.firstChild,V=Z.firstChild,te=V.nextSibling;return V.addEventListener("change",()=>c(_.id,z.label)),w(te,()=>z.label,null),w(te,m(Y,{get when(){return z.recommended},get children(){var W=G3();return W.firstChild,w(W,()=>D("questionConfirm.recommended"),null),W}}),null),le(()=>xe(V,"name",`q-${_.id}`)),le(()=>V.checked=I().selectedOptionLabel===z.label),P})()}),N),G.addEventListener("change",()=>c(_.id,ko)),w(U,()=>D("questionConfirm.freeformLabel")),le(()=>xe(G,"name",`q-${_.id}`)),le(()=>G.checked=I().selectedOptionLabel===ko),C}}),null),w(R,m(Y,{get when(){return _.kind==="confirm"},get children(){return[(()=>{var C=H3();return w(C,m(Y,{get when(){return _.plan},get children(){var N=uf(),F=N.firstChild;return F.nextSibling,w(F,()=>D("questionConfirm.confirmPlanLabel")),w(N,()=>_.plan,null),N}}),null),w(C,m(Y,{get when(){return _.impact},get children(){var N=uf(),F=N.firstChild;return F.nextSibling,w(F,()=>D("questionConfirm.confirmImpactLabel")),w(N,()=>_.impact,null),N}}),null),le(()=>ut(C,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${Y3(_.impact)}`)),C})(),(()=>{var C=q3(),N=C.firstChild,F=N.firstChild,G=F.firstChild,U=G.nextSibling,z=N.nextSibling,P=z.firstChild,Z=P.firstChild,V=Z.nextSibling;return G.addEventListener("change",()=>d(_.id,"accept")),w(U,()=>D("questionConfirm.decisionAccept")),Z.addEventListener("change",()=>d(_.id,"reject")),w(V,()=>D("questionConfirm.decisionReject")),w(C,m(Y,{get when(){return I().confirmTop==="reject"},get children(){var te=cf();return w(te,m(yt,{get each(){return[["alternative",D("questionConfirm.intentAlternative")],["constraint",D("questionConfirm.intentConstraint")],["dropGoal",D("questionConfirm.intentDropGoal")]]},children:([W,H])=>(()=>{var ie=qa(),me=ie.firstChild,J=me.firstChild,pe=J.nextSibling;return J.addEventListener("change",()=>f(_.id,W)),w(pe,H),le(()=>xe(J,"name",`q-${_.id}-intent`)),le(()=>J.checked=I().confirmIntent===W),ie})()}),null),w(te,m(Y,{get when(){return I().confirmIntent==="dropGoal"},get children(){var W=cf();return w(W,m(yt,{get each(){return[["current",D("questionConfirm.dropGoalCurrent")],["spec",D("questionConfirm.dropGoalSpec")]]},children:([H,ie])=>(()=>{var me=qa(),J=me.firstChild,pe=J.firstChild,Se=pe.nextSibling;return pe.addEventListener("change",()=>p(_.id,H)),w(Se,ie),le(()=>xe(pe,"name",`q-${_.id}-drop`)),le(()=>pe.checked=I().confirmDrop===H),me})()})),W}}),null),te}}),null),le(te=>{var W=`q-${_.id}`,H=`q-${_.id}`;return W!==te.e&&xe(G,"name",te.e=W),H!==te.t&&xe(Z,"name",te.t=H),te},{e:void 0,t:void 0}),le(()=>G.checked=I().confirmTop==="accept"),le(()=>Z.checked=I().confirmTop==="reject"),C})()]}}),null),w(R,m(Y,{get when(){return L()},get children(){return m(oo,{class:"qcp-note",rows:2,get placeholder(){return D("questionConfirm.notePlaceholder")},get value(){return I().note},onInput:C=>l(_.id,C.currentTarget.value)})}}),null),w(R,m(Y,{get when(){return T()},get children(){return m(oo,{class:"qcp-reject-reason",rows:2,get placeholder(){return D("questionConfirm.reasonPlaceholder")},get value(){return I().note},onInput:C=>l(_.id,C.currentTarget.value)})}}),null),R})()}}),null),w(O,m(yt,{get each(){return e.freeforms},children:_=>(()=>{var I=V3(),L=I.firstChild,T=L.firstChild,R=L.nextSibling,M=R.firstChild,C=M.nextSibling,N=C.nextSibling,F=N.nextSibling,G=F.nextSibling;G.nextSibling;var U=R.nextSibling;return U.firstChild,w(T,()=>D("questionConfirm.selectionAnnotation")),w(L,m(Fe,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(_.id),"aria-label":"remove",get children(){return m(Yo,{class:"h-4 w-4"})}}),null),w(M,()=>_.sectionPath),w(R,()=>D("questionConfirm.quoteConnector"),N),w(R,()=>_.quote.slice(0,200),G),w(U,()=>_.note,null),I})()}),null),le(()=>xe(x,"title",D("questionConfirm.title"))),h})()};var X3=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),lf=B("<p class=text-muted-foreground>"),Q3=B('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><select><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select><time>'),J3=B('<p class="text-destructive ">'),eA=B('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const tA={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},nA=120,df=3,rA=150,oA=e=>new Promise(t=>setTimeout(t,e));async function iA(e,t,n){for(let r=0;r<=df;r+=1)try{return await Be.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<df&&await oA(rA)}return n??null}const sA=()=>{const e=ns(),t=Zo(),[n,r]=$(0),[o,i]=$(!1),[s,a]=$(""),[u]=hn(()=>[t(),e.id,n()],async([W,H],ie)=>iA(W,H,ie.value)),[c]=hn(()=>[t(),e.id,n()],async([W,H])=>{try{return await Be.getDebug(W,H)}catch{return{exists:!1,text:""}}}),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(null),[h,y]=$(null),[v,x]=$(null),[k,E]=$([]),[S,O]=$(!1),[_,I]=$(null);let L;const T=re(()=>{const W=u();return W?d3(W.body):[]}),R=re(()=>`@.yorz/specs/${e.id}/spec.md`),M=re(()=>!u()||o()?!1:T().length>0||k().length>0);oe(()=>{const W=e.id,H=t();if(!W||!H)return;let ie;const me=iy(H,W,{onUpdated:()=>{ie&&clearTimeout(ie),ie=setTimeout(()=>void Sf(()=>r(J=>J+1)),nA)}});ae(()=>{ie&&clearTimeout(ie),me()})}),oe(()=>{const W=e.id,H=t();!W||!H||Be.getSpecSession(H,W).then(({sessionId:ie,running:me})=>{ie&&(a(ie),i(me),Qr(ie))}).catch(()=>{})}),oe(()=>{const W=t(),H=s();if(!W||!H)return;const ie=o0(W,{onStatus:me=>{me.sessionId===H&&i(me.running)}});ae(ie)}),oe(()=>{const W=t(),H=s();if(!W||!H)return;const ie=as(W,H,{onEvent:me=>{(me.type==="turn-completed"||me.type==="error")&&i(!1)}});ae(ie)}),oe(()=>{const W=v();if(!W)return;const H=n3(W,d);ae(H)}),is(()=>S()||f()),oe(()=>{const W=v(),H=u();if(!W||!H)return;const ie=t();let me=!0,J;const pe=Cs(H.body,{specId:H.id,projectId:ie||void 0});aE(W,`<article>${pe}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Se,Ne)=>!(Se.classList?.contains("mermaid")&&Se.getAttribute("data-mermaid-source")===Ne.getAttribute?.("data-mermaid-source"))}),JC(W).then(Se=>{if(!me){Se();return}J=Se}),ae(()=>{me=!1,J?.()})});async function C(){y(null),i(!0);try{const W=t(),{sessionId:H}=await Be.runAgent(W,e.id);a(H),Qr(H)}catch(W){i(!1),y(W.message)}}async function N(W){y(null);try{await Be.setStage(t(),e.id,W),r(H=>H+1)}catch(H){y(H.message)}}async function F(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(R()),Tn.success(D("specDetail.specPathCopied"))}catch{Tn.error(D("specDetail.specPathCopyFailed"))}}function G(W){b(W),p(!0)}async function U(W){const H=g();H&&E(ie=>[...ie,{id:`f-${Date.now()}-${ie.length}`,sectionPath:H.sectionPath,quote:H.text,note:W}])}function z(W){E(H=>H.filter(ie=>ie.id!==W))}async function P(W){await Be.submitQuestionAnswers(t(),e.id,W),E([]),await C()}function Z(){I(l()),O(!0)}async function V(W){const H=t(),ie=await Be.appendItem(H,e.id,W);ie.sessionId&&(i(!0),a(ie.sessionId),Qr(ie.sessionId))}async function te(W){i(!0);try{const H=t(),{sessionId:ie}=await Be.explain(H,e.id,W.text);a(ie),Qr(ie)}catch(H){i(!1),y(H.message)}}return(()=>{var W=X3();return w(W,m(Ji,{get fallback(){return(()=>{var H=lf();return w(H,()=>D("common.loading")),H})()},get children(){return m(Y,{get when(){return u()},get fallback(){return(()=>{var H=lf();return w(H,()=>D("specDetail.notFound")),H})()},children:H=>[(()=>{var ie=Q3(),me=ie.firstChild,J=me.firstChild,pe=me.nextSibling,Se=pe.firstChild,Ne=pe.nextSibling,Xe=Ne.firstChild,gt=Xe.nextSibling;return w(J,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:H().id}]}}),null),w(J,m(Fe,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return D("specDetail.copySpecPath")},get"aria-label"(){return D("specDetail.copySpecPath")},onClick:()=>void F(),get children(){return m(l1,{class:"h-3.5 w-3.5"})}}),null),w(me,m(ds,{}),null),w(Se,()=>H().frontmatter.summary||D("common.pendingAgent")),Xe.addEventListener("change",ce=>N(ce.currentTarget.value)),w(gt,()=>a0(H().frontmatter.updated_at)),w(Ne,m(Fe,{variant:"outline",size:"sm",class:"append-btn",ref(ce){var ze=L;typeof ze=="function"?ze(ce):L=ce},onClick:Z,get children(){return D("specDetail.appendTask")}}),null),w(Ne,m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${H().id}/review`)},get children(){return D("specDetail.review")}}),null),w(Ne,m(Y,{get when(){return c()?.exists},get children(){return m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${H().id}/debug`)},get children(){return D("specDetail.debug")}})}}),null),w(Ne,m(Y,{get when(){return o()},get children(){return m(I0,{variant:"secondary",get children(){return D("specDetail.running")}})}}),null),le(ce=>{var ze=`cursor-pointer appearance-none rounded-full border-0 px-2.5 py-0.5 text-sm font-semibold uppercase text-white ${tA[H().frontmatter.stage]??"bg-muted"}`,ne=D("specDetail.forceStage");return ze!==ce.e&&ut(Xe,ce.e=ze),ne!==ce.t&&xe(Xe,"title",ce.t=ne),ce},{e:void 0,t:void 0}),le(()=>Xe.value=H().frontmatter.stage),ie})(),m(Y,{get when(){return h()},get children(){var ie=J3();return w(ie,h),ie}}),(()=>{var ie=eA(),me=ie.firstChild;return w(ie,m(Y,{get when(){return M()},get children(){return m(Z3,{get questions(){return T()},get freeforms(){return k()},get running(){return o()},onRemoveFreeform:z,onSubmit:P})}}),me),Gn(x,me),ie})(),m(w3,{get snap(){return de(()=>!!f())()?null:l()},onAnnotate:G,onExplain:te}),m(S3,{get open(){return f()},get snap(){return g()},onCancel:()=>p(!1),onSubmit:U}),m(M3,{get open(){return S()},get sectionPath(){return _()?.sectionPath},get quote(){return _()?.text},anchorEl:L,onCancel:()=>O(!1),onSubmit:V})]})}})),W})()},aA=e=>{const[t,n]=we(e,["class"]);return m(Mg,Q({get class(){return Tt("shrink-0 bg-border data-[orientation=horizontal]:h-[1px] data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-[1px]",t.class)}},n))};var uA=B("<span>"),cA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),lA=B('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),dA=B('<p class=" text-muted-foreground">'),fA=B('<p class="text-destructive ">'),gA=B('<p class=" text-muted-foreground">(runId: <code></code>)'),ff=B("<p class=text-muted-foreground>"),pA=B('<section data-testid=review-report-pane class="flex min-h-0 min-w-0 flex-[6] flex-col gap-2">'),hA=B('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane><div class="flex flex-wrap items-center gap-2"></div><div class="flex gap-4"><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode>'),mA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),bA=B('<label class="flex cursor-pointer items-center gap-2 px-2 py-0.5 "><input type=checkbox><span></span><span class="truncate font-mono text-sm">'),yA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">');const vA={commit:"review.commit",discard:"review.discard",stash:"review.stash"},Ei={review:"review.reviewing",commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},ki={review:"review.reviewChanges",commit:"review.commit",discard:"review.discard",stash:"review.stash"},xA={M:"text-yellow-600",A:"text-green-600",D:"text-red-600","??":"text-blue-600",R:"text-purple-600"},wA=()=>{const e=ns(),t=Zo(),[n]=hn(()=>[t(),e.id],([ne,ke])=>Be.getSpec(ne,ke)),[r,o]=$(0),[i]=hn(()=>[t(),e.id,r()],async([ne,ke])=>Be.getReview(ne,ke)),[s,a]=$([]),[u,c]=$("manual"),[l,d]=$(new Set),[f,p]=$(""),[g,b]=$(!1),[h,y]=$(null),[v,x]=$(null),[k,E]=$(null),[S,O]=$(null),[_,I]=$(null),[L,T]=$(""),[R,M]=$(null);function C(ne){return T(ne),new Promise(ke=>M(()=>ke))}function N(ne){const ke=R();ke&&(M(null),ke(ne))}let F,G=null;ae(()=>G?.()),ae(()=>N(!1)),is();function U(ne){ne&&(ne.style.height="auto",ne.style.height=`${ne.scrollHeight}px`)}const z=re(()=>{const ne=i()?.text??"";return ne.trim()?Cs(ne,{specId:e.id,projectId:t()}):""}),P=re(()=>i.loading||!!z()),Z=re(()=>_A(i()?.text??"")),V=re(()=>{const ne=e.id.split("."),ke=ne.length>=2?ne[1]:"feat",K=n()?.frontmatter.summary??"";return K?`${ke}: ${K}`:`${ke}: update`});oe(()=>{const ne=V();ne&&!g()&&p(ne)}),oe(At(f,()=>{U(F)})),Vt(()=>U(F)),oe(()=>{const ne=t(),ke=e.id;if(!ne||!ke)return;const K=sy(ne,ke,_e=>{a(_e),d(Oe=>{const Re=new Set(_e.map(bt=>bt.path)),Qe=new Set;for(const bt of Oe)Re.has(bt)&&Qe.add(bt);return Qe})});ae(()=>K())});function te(ne){return _()===ne}const W=re(()=>_()),H=re(()=>v()!==null||W()!==null||h()!==null);function ie(ne,ke){G?.(),I(ne),G=as(t(),ke,{onEvent:K=>{(K.type==="turn-completed"||K.type==="error")&&(I(null),ne==="review"&&o(_e=>_e+1),G?.(),G=null)}})}function me(){return u()==="agent"?s().map(ne=>ne.path):[...l()]}async function J(ne){if(H())return;E(null);const ke=me();if(ke.length===0){E(D("review.selectAtLeastOne"));return}if(!(ne==="discard"&&!await C(D("review.confirmDiscard")))){y(ne);try{if(ne==="commit"){const K=f().trim();if(!K){E(D("review.enterCommitMsg"));return}await Be.directCommit(t(),e.id,{message:K,paths:ke})}else ne==="discard"?await Be.directDiscard(t(),e.id,{paths:ke}):ne==="stash"&&await Be.directStash(t(),e.id,{message:f().trim()||`yorz:${e.id}`,paths:ke})}catch(K){E(K.message)}finally{y(null)}}}async function pe(ne){if(!H()&&(E(null),!(ne==="discard"&&!await C(D("review.confirmDiscardAll"))))){x(ne);try{const ke=ne==="review"?await Be.triggerReview(t(),e.id):await Be.gitOp(t(),e.id,ne);O({kind:ne,runId:ke.runId}),Qr(ke.sessionId),ie(ne,ke.sessionId)}catch(ke){E(ke.message)}finally{x(null)}}}async function Se(ne){u()==="manual"?await J(ne):await pe(ne)}function Ne(ne){return te(ne)||v()===ne||h()===ne}function Xe(ne){d(ke=>{const K=new Set(ke);return K.has(ne)?K.delete(ne):K.add(ne),K})}function gt(){s().every(ne=>l().has(ne.path))?d(new Set):d(new Set(s().map(ne=>ne.path)))}const ce=re(()=>s().length>0&&s().every(ne=>l().has(ne.path))),ze=re(()=>u()==="manual"&&l().size===0);return(()=>{var ne=mA();return w(ne,m(Ji,{get fallback(){return(()=>{var ke=ff();return w(ke,()=>D("common.loading")),ke})()},get children(){return[(()=>{var ke=cA(),K=ke.firstChild,_e=K.firstChild,Oe=K.nextSibling;return w(K,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:D("specDetail.review")}]}}),_e),w(_e,()=>n()?.frontmatter.summary||D("common.pendingAgent")),w(Oe,m(Y,{get when(){return Z()},get children(){var Re=uA();return w(Re,()=>D("review.lastReview",{time:Z()})),Re}}),null),w(Oe,m(ds,{}),null),ke})(),(()=>{var ke=hA(),K=ke.firstChild,_e=K.firstChild,Oe=_e.nextSibling,Re=Oe.firstChild,Qe=Re.firstChild,bt=Re.nextSibling,Et=bt.firstChild;return w(_e,m(Fe,{variant:"default",size:"sm",get disabled(){return H()||ze()},onClick:()=>Se("commit"),get children(){return[m(Y,{get when(){return Ne("commit")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("commit"))()?D(Ei.commit):D(ki.commit))]}}),null),w(_e,m(Fe,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return H()||ze()},onClick:()=>Se("discard"),get children(){return[m(Y,{get when(){return Ne("discard")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("discard"))()?D(Ei.discard):D(ki.discard))]}}),null),w(_e,m(Fe,{variant:"ghost",size:"sm",get disabled(){return H()||ze()},onClick:()=>Se("stash"),get children(){return[m(Y,{get when(){return Ne("stash")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("stash"))()?D(Ei.stash):D(ki.stash))]}}),null),w(_e,m(aA,{orientation:"vertical",class:"h-6"}),null),w(_e,m(Fe,{variant:"ghost",size:"sm",get title(){return D("review.reviewHint")},get disabled(){return H()||s().length===0},onClick:()=>pe("review"),get children(){return[m(Y,{get when(){return Ne("review")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("review"))()?D(Ei.review):D(ki.review))]}}),null),w(K,m(oo,{ref(Me){var Ke=F;typeof Ke=="function"?Ke(Me):F=Me},get placeholder(){return D("review.commitPlaceholder")},get value(){return f()},onInput:Me=>{b(!0),p(Me.currentTarget.value),U(F)},get disabled(){return H()},rows:2,class:"resize-none"}),Oe),Qe.addEventListener("change",()=>c("manual")),w(Re,()=>D("review.manualSelect"),null),Et.addEventListener("change",()=>c("agent")),w(bt,()=>D("review.agentSelect"),null),w(K,m(Y,{get when(){return de(()=>u()==="manual")()&&s().length>0},get children(){var Me=lA(),Ke=Me.firstChild,pt=Ke.firstChild;return w(Ke,m(Fe,{variant:"ghost",size:"sm",onClick:gt,get disabled(){return H()},get children(){return de(()=>!!ce())()?D("review.deselectAll"):D("review.selectAll")}}),pt),w(pt,()=>D("review.fileCount",{selected:l().size,total:s().length})),w(Me,m(yt,{get each(){return s()},children:_t=>(()=>{var Yt=bA(),Ut=Yt.firstChild,on=Ut.nextSibling,dn=on.nextSibling;return Ut.addEventListener("change",()=>Xe(_t.path)),w(on,()=>_t.status),w(dn,()=>_t.path),le(q=>{var ue=H(),he=`inline-block w-6 text-center text-sm font-bold ${xA[_t.status]??""}`;return ue!==q.e&&(Ut.disabled=q.e=ue),he!==q.t&&ut(on,q.t=he),q},{e:void 0,t:void 0}),le(()=>Ut.checked=l().has(_t.path)),Yt})()}),null),Me}}),null),w(K,m(Y,{get when(){return de(()=>u()==="manual")()&&s().length===0},get children(){var Me=dA();return w(Me,()=>D("review.noChanges")),Me}}),null),w(K,m(Y,{get when(){return k()},get children(){var Me=fA();return w(Me,k),Me}}),null),w(K,m(Y,{get when(){return S()},get children(){var Me=gA(),Ke=Me.firstChild,pt=Ke.nextSibling;return w(Me,()=>D("review.dispatched"),Ke),w(Me,(()=>{var _t=de(()=>S().kind==="review");return()=>_t()?D("review.reviewChanges"):D(vA[S().kind])})(),Ke),w(pt,()=>S().runId.slice(0,8)),Me}}),null),w(ke,m(Y,{get when(){return P()},get children(){var Me=pA();return w(Me,m(Y,{get when(){return i.loading},get fallback(){return(()=>{var Ke=yA();return le(()=>Ke.innerHTML=z()),Ke})()},get children(){var Ke=ff();return w(Ke,()=>D("common.loading")),Ke}})),Me}}),null),le(Me=>{var Ke=`flex min-h-0 min-w-0 flex-col gap-3 ${P()?"flex-[4]":"flex-1"}`,pt=H(),_t=H();return Ke!==Me.e&&ut(K,Me.e=Ke),pt!==Me.t&&(Qe.disabled=Me.t=pt),_t!==Me.a&&(Et.disabled=Me.a=_t),Me},{e:void 0,t:void 0,a:void 0}),le(()=>Qe.checked=u()==="manual"),le(()=>Et.checked=u()==="agent"),ke})()]}}),null),w(ne,m(Cn,{get open(){return R()!==null},onOpenChange:ke=>{ke||N(!1)},get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("review.discardTitle")}}),m(Wu,{get children(){return L()}})]}}),m(Uo,{get children(){return[m(Fe,{variant:"outline",onClick:()=>N(!1),get children(){return D("common.cancel")}}),m(Fe,{variant:"destructive",onClick:()=>N(!0),get children(){return D("review.confirmDiscardAction")}})]}})]}})}}),null),ne})()};function _A(e){if(!e)return"";const t=e.split(/\r?\n/);for(let n=0;n<t.length;n++){const r=/^##\s+(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s*$/.exec(t[n]??"");if(r)return r[1]??""}return""}var EA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),gf=B("<p class=text-muted-foreground>"),kA=B('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),SA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),CA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),AA=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const TA=()=>{const e=ns(),t=Zo();is();const[n]=hn(()=>[t(),e.id],([i,s])=>Be.getSpec(i,s)),[r]=hn(()=>[t(),e.id],([i,s])=>Be.getDebug(i,s)),o=re(()=>{const i=qC(r()?.text??"");return i.trim()?Cs(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=SA();return w(i,m(Ji,{get fallback(){return(()=>{var s=gf();return w(s,()=>D("common.loading")),s})()},get children(){return[(()=>{var s=EA(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,m(xs,{get items(){return[{label:D("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:D("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||D("common.pendingAgent")),w(c,m(ds,{})),s})(),(()=>{var s=kA();return w(s,m(Y,{get when(){return r.loading},get fallback(){return m(Y,{get when(){return o()},get fallback(){return(()=>{var a=AA();return w(a,()=>D("specDebug.empty")),a})()},get children(){var a=CA();return le(()=>a.innerHTML=o()),a}})},get children(){var a=gf();return w(a,()=>D("common.loading")),a}})),s})()]}})),i})()};var DA=B('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add <path>');const Jp=()=>(()=>{var e=DA(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>D("welcome.title")),w(r,()=>D("welcome.description")),w(o,()=>D("welcome.addHint"),i),e})();var OA=B('<p class="p-8 text-muted-foreground">');const RA=()=>{const[e]=hn(()=>Be.listProjects());return m(Y,{get when(){return!e.loading},get fallback(){return(()=>{var t=OA();return w(t,()=>D("common.loading")),t})()},get children(){return m(Y,{get when(){return(e()??[]).length>0},get fallback(){return m(Jp,{})},get children(){return(()=>{const n=(e()??[])[0];return n?m(Zm,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var pf=B('<label class="flex flex-col gap-1 font-medium"><span>'),NA=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),IA=B('<p class=" text-muted-foreground">'),MA=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=project-config-agent><span>'),LA=B('<p class=" text-destructive">');const $A={claude:"ClaudeCode",opencode:"OpenCode",codex:"Codex",custom:D("projectConfig.custom")},vo=".yorz/specs",PA=e=>{const[t,n]=$("claude"),[r,o]=$(""),[i,s]=$(""),[a,u]=$(vo),[c,l]=$(vo),[d,f]=$(!1),[p,g]=$(!1),[b,h]=$(null);oe(()=>{e.open&&(h(null),f(!0),(async()=>{try{const E=await Be.getProjectConfig(e.projectId);y(E)}catch(E){h(E.message)}finally{f(!1)}})())});function y(E){n(E.agent.kind),E.agent.kind==="custom"?(o(E.agent.cmd),s(E.agent.args.join(" "))):(o(""),s(""));const S=E.specsDir||vo;u(S),l(S)}function v(E){return E.split(/\s+/).map(S=>S.trim()).filter(Boolean)}function x(){const E=t();if(E==="claude")return{kind:"claude"};if(E==="opencode")return{kind:"opencode"};if(E==="codex")return{kind:"codex"};const S=r().trim();return S?{kind:"custom",cmd:S,args:v(i())}:{error:D("projectConfig.cmdRequired")}}async function k(E){E.preventDefault(),h(null);const S=x();if("error"in S){h(S.error);return}const O=a().trim()||vo;if(O.split(/[\\/]/).some(_=>_==="..")){h(D("projectConfig.invalidPath"));return}g(!0);try{await Be.updateProjectConfig(e.projectId,{agent:S,specsDir:O});let _=D("projectConfig.saved");O!==c()&&(_+=D("projectConfig.oldSpecsHint")),e.onSaved?.(_),e.onClose()}catch(_){h(_.message)}finally{g(!1)}}return m(Cn,{get open(){return e.open},onOpenChange:E=>!E&&e.onClose(),get children(){return m(Fo,{class:"max-w-[480px]",get children(){return[m(zo,{get children(){return m(Bo,{get children(){return[de(()=>D("projectConfig.title"))," · ",de(()=>e.projectName)]}})}}),m(Y,{get when(){return!d()},get fallback(){return(()=>{var E=IA();return w(E,()=>D("common.loading")),E})()},get children(){var E=NA(),S=E.firstChild,O=S.firstChild,_=S.nextSibling,I=_.firstChild,L=I.nextSibling;return E.addEventListener("submit",k),w(O,()=>D("projectConfig.agent")),w(S,()=>["claude","opencode","codex","custom"].map(T=>(()=>{var R=MA(),M=R.firstChild,C=M.nextSibling;return M.addEventListener("change",()=>n(T)),M.value=T,w(C,()=>$A[T]),le(()=>M.disabled=p()),le(()=>M.checked=t()===T),R})()),null),w(E,m(Y,{get when(){return t()==="custom"},get children(){return[(()=>{var T=pf(),R=T.firstChild;return w(R,()=>D("projectConfig.cmd")),w(T,m(Ao,{type:"text",get value(){return r()},onInput:M=>o(M.currentTarget.value),get placeholder(){return D("projectConfig.cmdPlaceholder")},get disabled(){return p()}}),null),T})(),(()=>{var T=pf(),R=T.firstChild;return w(R,()=>D("projectConfig.args")),w(T,m(Ao,{type:"text",get value(){return i()},onInput:M=>s(M.currentTarget.value),placeholder:"--flag value",get disabled(){return p()}}),null),T})()]}}),_),w(I,()=>D("projectConfig.specsDir")),w(_,m(Ao,{type:"text",get value(){return a()},onInput:T=>u(T.currentTarget.value),placeholder:vo,get disabled(){return p()}}),L),w(L,()=>D("projectConfig.specsDirHint")),w(E,(()=>{var T=de(()=>!!b());return()=>T()&&(()=>{var R=LA();return w(R,b),R})()})(),null),w(E,m(Uo,{get children(){return[m(Fe,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return p()},get children(){return D("common.cancel")}}),m(Fe,{type:"submit",get disabled(){return p()},get children(){return de(()=>!!p())()?D("common.saving"):D("projectConfig.save")}})]}}),null),E}})]}})}})};var FA=B('<span class=" font-semibold tracking-wide">'),BA=B('<div class="flex items-center gap-1">'),zA=B('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),UA=B('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),KA=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),HA=B("<aside><header></header><footer>"),qA=B('<p class="px-2.5 py-2 text-muted-foreground">'),jA=B('<span class="block truncate">'),GA=B('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),VA=B('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),WA=B('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),YA=B('<li class="group relative flex items-center">'),ZA=B('<span class="inline-block font-semibold">'),XA=B('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),QA=B('<p class="mt-1 text-sm text-destructive break-words">'),JA=B('<p class="break-all font-semibold">');const eh="yorz.projectsSidebar.collapsed",th="yorz.projectsSidebar.width",ac=220,e6=.2,t6=160,n6=640;function r6(){try{return typeof window<"u"&&window.localStorage.getItem(eh)==="1"}catch{return!1}}function o6(e){try{typeof window<"u"&&window.localStorage.setItem(eh,e?"1":"0")}catch{}}function As(e){return Number.isFinite(e)?Math.min(n6,Math.max(t6,Math.round(e))):ac}function ja(){return typeof window>"u"?ac:As(window.innerWidth*e6)}function i6(){try{if(typeof window>"u")return ac;const e=window.localStorage.getItem(th);if(!e)return ja();const t=Number(e);return Number.isFinite(t)?As(t):ja()}catch{return ja()}}function s6(e){try{typeof window<"u"&&window.localStorage.setItem(th,String(As(e)))}catch{}}function hf(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}const a6=()=>{const[e,t]=$(r6()),[n,r]=$(i6()),[o,{refetch:i}]=hn(()=>Be.listProjects()),[s,a]=$(null),[u,c]=$(null),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(!1),h=es(),y=ts(),v=re(()=>{const N=y.pathname.match(/^\/([^/]+)/);return N&&N[1]!=="api"?N[1]:""}),x=()=>e()||cr();function k(){if(cr()){Bi();return}const N=!e();t(N),o6(N)}let E=null,S=null,O=null;Vt(()=>{const N=s0(()=>{i()});ae(N)});function _(N){x()||(N.preventDefault(),E={startX:N.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),S=F=>{if(!E)return;const G=F.clientX-E.startX,U=As(E.startW+G);E.raf==null&&(E.raf=requestAnimationFrame(()=>{E&&(E.raf=null,r(U))}))},O=()=>{E?.raf!=null&&cancelAnimationFrame(E.raf),E=null,document.body.classList.remove("is-resizing"),S&&document.removeEventListener("mousemove",S),O&&document.removeEventListener("mouseup",O),S=null,O=null,s6(n())},document.addEventListener("mousemove",S),document.addEventListener("mouseup",O))}ae(()=>{S&&document.removeEventListener("mousemove",S),O&&document.removeEventListener("mouseup",O),document.body.classList.remove("is-resizing")});function I(N,F){F.preventDefault(),F.stopPropagation(),c(N)}function L(N,F="success"){F==="error"?Tn.error(N):Tn.success(N)}function T(N,F){F.preventDefault(),F.stopPropagation(),p(!1),d(N)}async function R(){const N=l();if(N){b(!0);try{f()&&N.worktree?await Be.removeProjectWithFiles(N.id):await Be.removeProject(N.id),await i(),v()===N.id&&h("/"),d(null)}catch(F){const G=F.message;G.includes("409")?(Tn.error(D("sidebar.uncommittedChanges")),d(null)):(a(G),Tn.error(G))}finally{b(!1)}}}function M(){i()}const C=()=>x()?void 0:{width:`${n()}px`};return(()=>{var N=HA(),F=N.firstChild,G=F.nextSibling;return w(F,m(Y,{get when(){return!x()},get fallback(){return m(Fe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return D("sidebar.expand")},get children(){return m(t0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var U=FA();return w(U,()=>D("sidebar.title")),U})(),(()=>{var U=BA();return w(U,m(Fe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:M,get disabled(){return o.loading},get title(){return D("sidebar.refreshList")},get children(){return m(U1,{get class(){return`h-3.5 w-3.5 ${o.loading?"animate-spin":""}`}})}}),null),w(U,m(Fe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return D("sidebar.collapse")},get children(){return m(e0,{class:"h-4 w-4"})}}),null),U})()]}})),w(N,m(Y,{get when(){return o()!==void 0},get fallback(){return(()=>{var U=qA();return w(U,()=>D("common.loading")),U})()},get children(){var U=zA();return w(U,m(yt,{get each(){return o()??[]},children:z=>{const P=()=>v()===z.id;return(()=>{var Z=YA();return w(Z,m(fr,{get href(){return`/${encodeURIComponent(z.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${P()?"bg-accent text-accent-foreground font-semibold":"hover:bg-muted"} ${x()?"px-0 text-center":""}`},get title(){return z.path},get children(){return m(Y,{get when(){return!x()},get fallback(){return(()=>{var V=ZA();return w(V,()=>(z.name[0]??"?").toUpperCase()),V})()},get children(){return[(()=>{var V=jA();return w(V,()=>hf(z)),V})(),m(Y,{get when(){return z.worktree},get children(){var V=GA();return w(V,m(m1,{class:"h-3 w-3"}),null),w(V,()=>D("sidebar.worktreeBadge"),null),le(()=>xe(V,"title",`worktree of ${z.worktree.mainPath}`)),V}})]}})}}),null),w(Z,m(Y,{get when(){return!x()},get children(){return[(()=>{var V=VA();return V.$$click=te=>I(z,te),w(V,m($1,{class:"h-3.5 w-3.5"})),le(te=>{var W=D("sidebar.configure",{name:z.name}),H=D("sidebar.projectConfig");return W!==te.e&&xe(V,"aria-label",te.e=W),H!==te.t&&xe(V,"title",te.t=H),te},{e:void 0,t:void 0}),V})(),(()=>{var V=WA();return V.$$click=te=>void T(z,te),w(V,m(Yo,{class:"h-3.5 w-3.5"})),le(te=>{var W=D("sidebar.removeProject",{name:z.name}),H=D("sidebar.deleteProject");return W!==te.e&&xe(V,"aria-label",te.e=W),H!==te.t&&xe(V,"title",te.t=H),te},{e:void 0,t:void 0}),V})()]}}),null),Z})()}})),U}}),G),w(G,m(Y,{get when(){return!x()},get fallback(){return(()=>{var U=XA();return w(U,m(a1,{class:"h-3.5 w-3.5"})),le(()=>xe(U,"title",`${D("sidebar.addHint")}${D("sidebar.addCmd")}`)),U})()},get children(){var U=UA(),z=U.firstChild;return w(U,()=>D("sidebar.addHint"),z),w(z,()=>D("sidebar.addCmd")),U}}),null),w(G,(()=>{var U=de(()=>!!s());return()=>U()&&(()=>{var z=QA();return w(z,s),le(()=>xe(z,"title",s())),z})()})(),null),w(N,m(Y,{get when(){return!x()},get children(){var U=KA();return U.$$mousedown=_,le(()=>xe(U,"aria-label",D("sidebar.resizeHint"))),U}}),null),w(N,m(Y,{get when(){return u()},children:U=>m(PA,{open:!0,get projectId(){return U().id},get projectName(){return U().name},onClose:()=>c(null),onSaved:z=>L(z)})}),null),w(N,m(Cn,{get open(){return l()!==null},onOpenChange:U=>!U&&!g()&&d(null),get children(){return m(Fo,{class:"max-w-sm",get children(){return[m(zo,{get children(){return[m(Bo,{get children(){return D("sidebar.deleteProject")}}),m(Wu,{get children(){return D("sidebar.deleteDesc")}})]}}),m(Y,{get when(){return l()},children:U=>[(()=>{var z=JA();return w(z,()=>hf(U())),z})(),m(Y,{get when(){return U().worktree},get children(){return m(xp,{get checked(){return f()},onChange:z=>p(z),class:"flex items-center gap-2 text-destructive",get children(){return[m(wp,{}),m(vp,{get children(){return D("sidebar.deleteFiles")}})]}})}})]}),m(Uo,{get children(){return[m(Fe,{variant:"outline",onClick:()=>d(null),get disabled(){return g()},get children(){return D("common.cancel")}}),m(Fe,{variant:"destructive",onClick:()=>void R(),get disabled(){return g()},get children(){return de(()=>!!g())()?D("common.deleting"):D("common.confirmDelete")}})]}})]}})}}),null),le(U=>{var z=`relative flex flex-col border-r bg-card shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,P=C(),Z=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,V=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return z!==U.e&&ut(N,U.e=z),U.t=ur(N,P,U.t),Z!==U.a&&ut(F,U.a=Z),V!==U.o&&ut(G,U.o=V),U},{e:void 0,t:void 0,a:void 0,o:void 0}),N})()};ln(["mousedown","click"]);var u6=["second","minute","hour","day","week","month","year"];function c6(e,t){if(t===0)return["just now","right now"];var n=u6[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var l6=["秒","分钟","小时","天","周","个月","年"];function d6(e,t){if(t===0)return["刚刚","片刻后"];var n=l6[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var wu={},Ts=function(e,t){wu[e]=t},f6=function(e){return wu[e]||wu.en_US},Ga=[60,60,24,7,365/7/12,12];function g6(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function p6(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Ga[o]&&o<Ga.length;o++)e/=Ga[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function h6(e,t){var n=new Date;return(+n-+g6(e))/1e3}var m6=function(e,t,n){var r=h6(e);return p6(r,f6(t))};Ts("en_US",c6);Ts("zh_CN",d6);var Si={},mf;function b6(){if(mf)return Si;mf=1,Object.defineProperty(Si,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Si.default=t,Si}var y6=b6();const v6=sc(y6),bf=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function x6(e,t){return bf[t]??bf[0]}const w6=`
|
|
655
|
+
`:">",i};mo.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};mo.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
656
|
+
`;break}return r};mo.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function Wt(){this.__rules__=[],this.__cache__=null}Wt.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Wt.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};Wt.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};Wt.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Wt.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Wt.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Wt.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};Wt.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Wt.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};Wt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function wn(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}wn.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};wn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};wn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};wn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};wn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function Rp(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Rp.prototype.Token=wn;const ak=/\r\n?|\n/g,uk=/\0/g;function ck(e){let t;t=e.src.replace(ak,`
|
|
657
|
+
`),t=t.replace(uk,"�"),e.src=t}function lk(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 dk(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 fk(e){return/^<a[>\s]/i.test(e)}function gk(e){return/^<\/a\s*>/i.test(e)}function pk(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"&&(fk(a.content)&&i>0&&i--,gk(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,f=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const g=c[p].url,b=e.md.normalizeLink(g);if(!e.md.validateLink(b))continue;let h=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(h)?h=e.md.normalizeLinkText("mailto:"+h).replace(/^mailto:/,""):h=e.md.normalizeLinkText(h):h=e.md.normalizeLinkText("http://"+h).replace(/^http:\/\//,"");const y=c[p].index;if(y>f){const C=new e.Token("text","",0);C.content=u.slice(f,y),C.level=d,l.push(C)}const v=new e.Token("link_open","a",1);v.attrs=[["href",b]],v.level=d++,v.markup="linkify",v.info="auto",l.push(v);const x=new e.Token("text","",0);x.content=h,x.level=d,l.push(x);const k=new e.Token("link_close","a",-1);k.level=--d,k.markup="linkify",k.info="auto",l.push(k),f=c[p].lastIndex}if(f<u.length){const p=new e.Token("text","",0);p.content=u.slice(f),p.level=d,l.push(p)}t[n].children=o=Tp(o,s,l)}}}}const Np=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,hk=/\((c|tm|r)\)/i,mk=/\((c|tm|r)\)/ig,bk={c:"©",r:"®",tm:"™"};function yk(e,t){return bk[t.toLowerCase()]}function vk(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(mk,yk)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function xk(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Np.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function wk(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(hk.test(e.tokens[t].content)&&vk(e.tokens[t].children),Np.test(e.tokens[t].content)&&xk(e.tokens[t].children))}const _k=/['"]/,ad=/['"]/g,ud="’";function _i(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function Ek(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 kk(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;){ad.lastIndex=c;const d=ad.exec(u);if(!d)break;let f=!0,p=!0;c=d.index+1;const g=d[0]==="'";let b=32;if(d.index-1>=0)b=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){b=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(c<l)h=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}const y=Vo(b)||Go(b),v=Vo(h)||Go(h),x=jo(b),k=jo(h);if(k?f=!1:v&&(x||y||(f=!1)),x?p=!1:y&&(k||v||(p=!1)),h===34&&d[0]==='"'&&b>=48&&b<=57&&(p=f=!1),f&&p&&(f=y,p=v),!f&&!p){g&&_i(o,i,d.index,ud);continue}if(p)for(n=r.length-1;n>=0;n--){let C=r[n];if(r[n].level<a)break;if(C.single===g&&r[n].level===a){C=r[n];let E,T;g?(E=t.md.options.quotes[2],T=t.md.options.quotes[3]):(E=t.md.options.quotes[0],T=t.md.options.quotes[1]),_i(o,i,d.index,T),_i(o,C.token,C.pos,E),r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:g,level:a}):p&&g&&_i(o,i,d.index,ud)}}Object.keys(o).forEach(function(i){e[i].content=Ek(e[i].content,o[i])})}function Ck(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!_k.test(e.tokens[t].content)||kk(e.tokens[t].children,e)}function Sk(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 ea=[["normalize",ck],["block",lk],["inline",dk],["linkify",pk],["replacements",wk],["smartquotes",Ck],["text_join",Sk]];function sc(){this.ruler=new Wt;for(let e=0;e<ea.length;e++)this.ruler.push(ea[e][0],ea[e][1])}sc.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};sc.prototype.State=Rp;function Fn(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(ct(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}Fn.prototype.push=function(e,t,n){const r=new wn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Fn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Fn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Fn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!ct(r))break}return t};Fn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ct(this.src.charCodeAt(--t)))return t+1;return t};Fn.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};Fn.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};Fn.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const f=this.src.charCodeAt(l);if(ct(f))f===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};Fn.prototype.Token=wn;const Ak=65536;function ta(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function cd(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 Tk(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&&!ct(a)||s===45&&ct(a))return!1;for(;i<e.eMarks[o];){const k=e.src.charCodeAt(i);if(k!==124&&k!==45&&k!==58&&!ct(k))return!1;i++}let u=ta(e,t+1),c=u.split("|");const l=[];for(let k=0;k<c.length;k++){const C=c[k].trim();if(!C){if(k===0||k===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?l.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=ta(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=cd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),b=[t,0];g.map=b;const h=e.push("thead_open","thead",1);h.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let k=0;k<c.length;k++){const C=e.push("th_open","th",1);l[k]&&(C.attrs=[["style","text-align:"+l[k]]]);const E=e.push("inline","",0);E.content=c[k].trim(),E.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let k=!1;for(let E=0,T=p.length;E<T;E++)if(p[E](e,o,n,!0)){k=!0;break}if(k||(u=ta(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=cd(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>Ak))break;if(o===t+2){const E=e.push("tbody_open","tbody",1);E.map=v=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[o,o+1];for(let E=0;E<d;E++){const T=e.push("td_open","td",1);l[E]&&(T.attrs=[["style","text-align:"+l[E]]]);const _=e.push("inline","",0);_.content=c[E]?c[E].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=o),e.push("table_close","table",-1),b[1]=o,e.parentType=f,e.line=o,!0}function Dk(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
658
|
+
`,i.map=[t,e.line],!0}function Ok(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){f=!0;break}u=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=l,p.content=e.getLines(t+1,d,u,!0),p.markup=c,p.map=[t,e.line],!0}function Rk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<n;g++){const x=e.sCount[g]<e.blkIndent;if(o=e.bMarks[g]+e.tShift[g],i=e.eMarks[g],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let C=e.sCount[g]+1,E,T;e.src.charCodeAt(o)===32?(o++,C++,T=!1,E=!0):e.src.charCodeAt(o)===9?(E=!0,(e.bsCount[g]+C)%4===3?(o++,C++,T=!1):T=!0):E=!1;let _=C;for(a.push(e.bMarks[g]),e.bMarks[g]=o;o<i;){const R=e.src.charCodeAt(o);if(ct(R))R===9?_+=4-(_+e.bsCount[g]+(T?1:0))%4:_++;else break;o++}p=o>=i,u.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(E?1:0),c.push(e.sCount[g]),e.sCount[g]=_-C,l.push(e.tShift[g]),e.tShift[g]=o-e.bMarks[g];continue}if(p)break;let k=!1;for(let C=0,E=d.length;C<E;C++)if(d[C](e,g,n,!0)){k=!0;break}if(k){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),u.push(e.bsCount[g]),l.push(e.tShift[g]),c.push(e.sCount[g]),e.sCount[g]=-1}const b=e.blkIndent;e.blkIndent=0;const h=e.push("blockquote_open","blockquote",1);h.markup=">";const y=[t,0];h.map=y,e.md.block.tokenize(e,t,g);const v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,y[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=b,!0}function Nk(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&&!ct(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 ld(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(!ct(i))return-1}return r}function dd(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),!ct(i))?-1:o}function Ik(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 Mk(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,f,p;if((p=dd(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],f=Number(e.src.slice(s,p-1)),l&&f!==1)return!1}else if((p=ld(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const g=e.src.charCodeAt(p-1),b=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);const h=[u,0];a.map=h,a.markup=String.fromCharCode(g);let y=!1;const v=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=p,o=e.eMarks[u];const k=e.sCount[u]+p-(e.bMarks[u]+e.tShift[u]);let C=k;for(;i<o;){const I=e.src.charCodeAt(i);if(I===9)C+=4-(C+e.bsCount[u])%4;else if(I===32)C++;else break;i++}const E=i;let T;E>=o?T=1:T=C-k,T>4&&(T=1);const _=k+T;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const R=[u,0];a.map=R,d&&(a.info=e.src.slice(s,p-1));const $=e.tight,O=e.tShift[u],N=e.sCount[u],M=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[u]=E-e.bMarks[u],e.sCount[u]=C,E>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=M,e.tShift[u]=O,e.sCount[u]=N,e.tight=$,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),u=e.line,R[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let A=!1;for(let I=0,F=v.length;I<F;I++)if(v[I](e,u,n,!0)){A=!0;break}if(A)break;if(d){if(p=dd(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=ld(e,u),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),h[1]=u,e.line=u,e.parentType=x,c&&Ik(e,b),!0}function Lk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(v){const x=e.lineMax;if(v>=x||e.isEmpty(v))return null;let k=!1;if(e.sCount[v]-e.blkIndent>3&&(k=!0),e.sCount[v]<0&&(k=!0),!k){const T=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let R=!1;for(let $=0,O=T.length;$<O;$++)if(T[$](e,v,x,!0)){R=!0;break}if(e.parentType=_,R)return null}const C=e.bMarks[v]+e.tShift[v],E=e.eMarks[v];return e.src.slice(C,E+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(!ct(v))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const f=o,p=s,g=o;for(;o<i;o++){const v=u.charCodeAt(o);if(v===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ct(v))break}let b=e.md.helpers.parseLinkTitle(u,o,i);for(;b.can_continue;){const v=a(s);if(v===null)break;u+=v,o=i,i=u.length,s++,b=e.md.helpers.parseLinkTitle(u,o,i,b)}let h;for(o<i&&g!==o&&b.ok?(h=b.str,o=b.pos):(h="",o=f,s=p);o<i;){const v=u.charCodeAt(o);if(!ct(v))break;o++}if(o<i&&u.charCodeAt(o)!==10&&h)for(h="",o=f,s=p;o<i;){const v=u.charCodeAt(o);if(!ct(v))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const y=Ss(u.slice(1,c));return y?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:h,href:d}),e.line=s),!0):!1}const $k=["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"],Pk="[a-zA-Z_:][a-zA-Z0-9:._-]*",Fk="[^\"'=<>`\\x00-\\x20]+",Bk="'[^']*'",zk='"[^"]*"',Uk="(?:"+Fk+"|"+Bk+"|"+zk+")",Kk="(?:\\s+"+Pk+"(?:\\s*=\\s*"+Uk+")?)",Ip="<[A-Za-z][A-Za-z0-9\\-]*"+Kk+"*\\s*\\/?>",Mp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Hk="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",qk="<[?][\\s\\S]*?[?]>",jk="<![A-Za-z][^>]*>",Gk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Vk=new RegExp("^(?:"+Ip+"|"+Mp+"|"+Hk+"|"+qk+"|"+jk+"|"+Gk+")"),Wk=new RegExp("^(?:"+Ip+"|"+Mp+")"),Ar=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+$k.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Wk.source+"\\s*$"),/^$/,!1]];function Yk(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<Ar.length&&!Ar[a][0].test(s);a++);if(a===Ar.length)return!1;if(r)return Ar[a][2];let u=t+1;const c=Ar[a][1].test("");if(!Ar[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),Ar[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function Zk(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&&!ct(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&ct(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=As(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 Xk(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,g=r.length;p<g;p++)if(r[p](e,a,n,!0)){f=!0;break}if(f)break}if(!i)return e.parentType=o,!1;const u=As(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 Qk(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=As(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 Ei=[["table",Tk,["paragraph","reference"]],["code",Dk],["fence",Ok,["paragraph","reference","blockquote","list"]],["blockquote",Rk,["paragraph","reference","blockquote","list"]],["hr",Nk,["paragraph","reference","blockquote","list"]],["list",Mk,["paragraph","reference","blockquote"]],["reference",Lk],["html_block",Yk,["paragraph","reference","blockquote"]],["heading",Zk,["paragraph","reference","blockquote"]],["lheading",Xk],["paragraph",Qk]];function Ts(){this.ruler=new Wt;for(let e=0;e<Ei.length;e++)this.ruler.push(Ei[e][0],Ei[e][1],{alt:(Ei[e][2]||[]).slice()})}Ts.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)}};Ts.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)};Ts.prototype.State=Fn;function ri(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}ri.prototype.pushPending=function(){const e=new wn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ri.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new wn(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};ri.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const h=this.src.charCodeAt(e-2);o=(h&64512)===55296?65536+(h-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const h=this.src.charCodeAt(i+1);a=(h&64512)===56320?65536+(a-55296<<10)+(h-56320):65533}else(a&64512)===56320&&(a=65533);const u=Vo(o)||Go(o),c=Vo(a)||Go(a),l=jo(o),d=jo(a),f=!d&&(!c||l||u),p=!l&&(!u||d||c);return{can_open:f&&(t||!p||u),can_close:p&&(t||!f||c),length:s}};ri.prototype.Token=wn;function Jk(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 eC(e,t){let n=e.pos;for(;n<e.posMax&&!Jk(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const tC=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function nC(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(tC);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=a.length-i.length,!0}function rC(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&&ct(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const ac=[];for(let e=0;e<256;e++)ac.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ac[e.charCodeAt(0)]=1});function oC(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),!!ct(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&&ac[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function iC(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 sC(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 fd(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 aC(e){const t=e.tokens_meta,n=e.tokens_meta.length;fd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&fd(e,t[r].delimiters)}const Lp={tokenize:sC,postProcess:aC};function uC(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 gd(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 cC(e){const t=e.tokens_meta,n=e.tokens_meta.length;gd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&gd(e,t[r].delimiters)}const $p={tokenize:uC,postProcess:cC};function lC(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let g=p+1;if(g<d&&e.src.charCodeAt(g)===40){for(c=!1,g++;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);if(g>=d)return!1;if(u=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?g=o.pos:s="",u=g;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);if(o=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<d&&u!==g&&o.ok)for(a=o.str,g=o.pos;g<d&&(n=e.src.charCodeAt(g),!(!ct(n)&&n!==10));g++);}(g>=d||e.src.charCodeAt(g)!==41)&&(c=!0),g++}if(c){if(typeof e.env.references>"u")return!1;if(g<d&&e.src.charCodeAt(g)===91?(u=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?r=e.src.slice(u,g++):g=p+1):g=p+1,r||(r=e.src.slice(f,p)),i=e.env.references[Ss(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=f,e.posMax=p;const b=e.push("link_open","a",1),h=[["href",s]];b.attrs=h,a&&h.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=d,!0}function dC(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<f&&e.src.charCodeAt(i)===40){for(i++;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);if(i>=f)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<f&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<f&&(n=e.src.charCodeAt(i),!(!ct(n)&&n!==10));i++);else u="";if(i>=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<f&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=g+1):i=g+1,o||(o=e.src.slice(p,g)),s=e.env.references[Ss(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(p,g);const b=[];e.md.inline.parse(r,e.md,e.env,b);const h=e.push("image","img",0),y=[["src",l],["alt",""]];h.attrs=y,h.children=b,h.content=r,u&&y.push(["title",u])}return e.pos=i,e.posMax=f,!0}const fC=/^([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])?)*)$/,gC=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function pC(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(gC.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(fC.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 hC(e){return/^<a[>\s]/i.test(e)}function mC(e){return/^<\/a\s*>/i.test(e)}function bC(e){const t=e|32;return t>=97&&t<=122}function yC(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&&!bC(o))return!1;const i=e.src.slice(r).match(Vk);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],hC(s.content)&&e.linkLevel++,mC(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const vC=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,xC=/^&([a-z][a-z0-9]{1,31});/i;function wC(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(vC);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=ic(s)?qo(s):qo(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(xC);if(i){const s=zE(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 pd(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){const p=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+p,i[c]=p,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function _C(e){const t=e.tokens_meta,n=e.tokens_meta.length;pd(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&pd(t[r].delimiters)}function EC(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 na=[["text",eC],["linkify",nC],["newline",rC],["escape",oC],["backticks",iC],["strikethrough",Lp.tokenize],["emphasis",$p.tokenize],["link",lC],["image",dC],["autolink",pC],["html_inline",yC],["entity",wC]],ra=[["balance_pairs",_C],["strikethrough",Lp.postProcess],["emphasis",$p.postProcess],["fragments_join",EC]];function oi(){this.ruler=new Wt;for(let e=0;e<na.length;e++)this.ruler.push(na[e][0],na[e][1]);this.ruler2=new Wt;for(let e=0;e<ra.length;e++)this.ruler2.push(ra[e][0],ra[e][1])}oi.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};oi.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()};oi.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)};oi.prototype.State=ri;function kC(e){const t={};e=e||{},t.src_Any=_p.source,t.src_Cc=Ep.source,t.src_Z=Cp.source,t.src_P=rc.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 _u(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ds(e){return Object.prototype.toString.call(e)}function CC(e){return Ds(e)==="[object String]"}function SC(e){return Ds(e)==="[object Object]"}function AC(e){return Ds(e)==="[object RegExp]"}function hd(e){return Ds(e)==="[object Function]"}function TC(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Pp={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function DC(e){return Object.keys(e||{}).reduce(function(t,n){return t||Pp.hasOwnProperty(n)},!1)}const OC={"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}}},RC="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]",NC="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function IC(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function md(){return function(e,t){t.normalize(e)}}function Xi(e){const t=e.re=kC(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(RC),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,SC(u)){AC(u.validate)?c.validate=IC(u.validate):hd(u.validate)?c.validate=u.validate:i(a,u),hd(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=md();return}if(CC(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:md()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(TC).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Fp(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function rn(e,t){if(!(this instanceof rn))return new rn(e,t);t||DC(e)&&(t=e,e={}),this.__opts__=_u({},Pp,t),this.__schemas__=_u({},OC,e),this.__compiled__={},this.__tlds__=NC,this.__tlds_replaced__=!1,this.re={},Xi(this)}rn.prototype.add=function(t,n){return this.__schemas__[t]=n,Xi(this),this};rn.prototype.set=function(t){return this.__opts__=_u(this.__opts__,t),this};rn.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};rn.prototype.pretest=function(t){return this.re.pretest.test(t)};rn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};rn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(f,p){return f?p?f.index!==p.index?f.index<p.index?f:p:f.lastIndex>=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const f=[r[l[0]],i[l[1]],o[l[2]]],p=c(c(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?l[0]++:p===f[1]?l[1]++:l[2]++,p.index<d)continue;const g=new Fp(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),n.push(g),d=p.lastIndex}return n.length?n:null};rn.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new Fp(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};rn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Xi(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Xi(this),this)};rn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};rn.prototype.onCompile=function(){};const no=2147483647,Dn=36,uc=1,Wo=26,MC=38,LC=700,Bp=72,zp=128,Up="-",$C=/^xn--/,PC=/[^\0-\x7F]/,FC=/[\x2E\u3002\uFF0E\uFF61]/g,BC={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},oa=Dn-uc,On=Math.floor,ia=String.fromCharCode;function ir(e){throw new RangeError(BC[e])}function zC(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Kp(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(FC,".");const o=e.split("."),i=zC(o,t).join(".");return r+i}function Hp(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const UC=e=>String.fromCodePoint(...e),KC=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Dn},bd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},qp=function(e,t,n){let r=0;for(e=n?On(e/LC):e>>1,e+=On(e/t);e>oa*Wo>>1;r+=Dn)e=On(e/oa);return On(r+(oa+1)*e/(e+MC))},jp=function(e){const t=[],n=e.length;let r=0,o=zp,i=Bp,s=e.lastIndexOf(Up);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&ir("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=Dn;;d+=Dn){a>=n&&ir("invalid-input");const f=KC(e.charCodeAt(a++));f>=Dn&&ir("invalid-input"),f>On((no-r)/l)&&ir("overflow"),r+=f*l;const p=d<=i?uc:d>=i+Wo?Wo:d-i;if(f<p)break;const g=Dn-p;l>On(no/g)&&ir("overflow"),l*=g}const c=t.length+1;i=qp(r-u,c,u==0),On(r/c)>no-o&&ir("overflow"),o+=On(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Gp=function(e){const t=[];e=Hp(e);const n=e.length;let r=zp,o=0,i=Bp;for(const u of e)u<128&&t.push(ia(u));const s=t.length;let a=s;for(s&&t.push(Up);a<n;){let u=no;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>On((no-o)/c)&&ir("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>no&&ir("overflow"),l===r){let d=o;for(let f=Dn;;f+=Dn){const p=f<=i?uc:f>=i+Wo?Wo:f-i;if(d<p)break;const g=d-p,b=Dn-p;t.push(ia(bd(p+g%b,0))),d=On(g/b)}t.push(ia(bd(d,0))),i=qp(o,c,a===s),o=0,++a}++o,++r}return t.join("")},HC=function(e){return Kp(e,function(t){return $C.test(t)?jp(t.slice(4).toLowerCase()):t})},qC=function(e){return Kp(e,function(t){return PC.test(t)?"xn--"+Gp(t):t})},Vp={version:"2.3.1",ucs2:{decode:Hp,encode:UC},decode:jp,encode:Gp,toASCII:qC,toUnicode:HC},jC={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},GC={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"]}}},VC={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"]}}},WC={default:jC,zero:GC,commonmark:VC},YC=/^(vbscript|javascript|file|data):/,ZC=/^data:image\/(gif|png|jpeg|webp);/;function XC(e){const t=e.trim().toLowerCase();return YC.test(t)?ZC.test(t):!0}const Wp=["http:","https:","mailto:"];function QC(e){const t=nc(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toASCII(t.hostname)}catch{}return ni(tc(t))}function JC(e){const t=nc(e,!0);if(t.hostname&&(!t.protocol||Wp.indexOf(t.protocol)>=0))try{t.hostname=Vp.toUnicode(t.hostname)}catch{}return co(tc(t),co.defaultChars+"%")}function cn(e,t){if(!(this instanceof cn))return new cn(e,t);t||oc(e)||(t=e||{},e="default"),this.inline=new oi,this.block=new Ts,this.core=new sc,this.renderer=new mo,this.linkify=new rn,this.validateLink=XC,this.normalizeLink=QC,this.normalizeLinkText=JC,this.utils=nk,this.helpers=Cs({},sk),this.options={},this.configure(e),t&&this.set(t)}cn.prototype.set=function(e){return Cs(this.options,e),this};cn.prototype.configure=function(e){const t=this;if(oc(e)){const n=e;if(e=WC[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};cn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};cn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};cn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};cn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};cn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};cn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};cn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sa,yd;function eS(){if(yd)return sa;yd=1;var e=!0,t=!1,n=!1;sa=function(b,h){h&&(e=!h.enabled,t=!!h.label,n=!!h.labelAfter),b.core.ruler.after("inline","github-task-lists",function(y){for(var v=y.tokens,x=2;x<v.length;x++)i(v,x)&&(s(v[x],y.Token),r(v[x-2],"class","task-list-item"+(e?"":" enabled")),r(v[o(v,x-2)],"class","contains-task-list"))})};function r(b,h,y){var v=b.attrIndex(h),x=[h,y];v<0?b.attrPush(x):b.attrs[v]=x}function o(b,h){for(var y=b[h].level-1,v=h-1;v>=0;v--)if(b[v].level===y)return v;return-1}function i(b,h){return d(b[h])&&f(b[h-1])&&p(b[h-2])&&g(b[h])}function s(b,h){if(b.children.unshift(a(b,h)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),t)if(n){b.children.pop();var y="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+y+'">',b.children.push(l(b.content,y,h))}else b.children.unshift(u(h)),b.children.push(c(h))}function a(b,h){var y=new h("html_inline","",0),v=e?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?y.content='<input class="task-list-item-checkbox"'+v+'type="checkbox">':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(y.content='<input class="task-list-item-checkbox" checked=""'+v+'type="checkbox">'),y}function u(b){var h=new b("html_inline","",0);return h.content="<label>",h}function c(b){var h=new b("html_inline","",0);return h.content="</label>",h}function l(b,h,y){var v=new y("html_inline","",0);return v.content='<label class="task-list-item-label" for="'+h+'">'+b+"</label>",v.attrs=[{for:h}],v}function d(b){return b.type==="inline"}function f(b){return b.type==="paragraph_open"}function p(b){return b.type==="list_item_open"}function g(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return sa}var tS=eS();const nS=cc(tS);var aa,vd;function rS(){if(vd)return aa;vd=1;function e(D){return D instanceof Map?D.clear=D.delete=D.set=function(){throw new Error("map is read-only")}:D instanceof Set&&(D.add=D.clear=D.delete=function(){throw new Error("set is read-only")}),Object.freeze(D),Object.getOwnPropertyNames(D).forEach(j=>{const ee=D[j],Se=typeof ee;(Se==="object"||Se==="function")&&!Object.isFrozen(ee)&&e(ee)}),D}class t{constructor(j){j.data===void 0&&(j.data={}),this.data=j.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(D){return D.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(D,...j){const ee=Object.create(null);for(const Se in D)ee[Se]=D[Se];return j.forEach(function(Se){for(const it in Se)ee[it]=Se[it]}),ee}const o="</span>",i=D=>!!D.scope,s=(D,{prefix:j})=>{if(D.startsWith("language:"))return D.replace("language:","language-");if(D.includes(".")){const ee=D.split(".");return[`${j}${ee.shift()}`,...ee.map((Se,it)=>`${Se}${"_".repeat(it+1)}`)].join(" ")}return`${j}${D}`};class a{constructor(j,ee){this.buffer="",this.classPrefix=ee.classPrefix,j.walk(this)}addText(j){this.buffer+=n(j)}openNode(j){if(!i(j))return;const ee=s(j.scope,{prefix:this.classPrefix});this.span(ee)}closeNode(j){i(j)&&(this.buffer+=o)}value(){return this.buffer}span(j){this.buffer+=`<span class="${j}">`}}const u=(D={})=>{const j={children:[]};return Object.assign(j,D),j};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(j){this.top.children.push(j)}openNode(j){const ee=u({scope:j});this.add(ee),this.stack.push(ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(j){return this.constructor._walk(j,this.rootNode)}static _walk(j,ee){return typeof ee=="string"?j.addText(ee):ee.children&&(j.openNode(ee),ee.children.forEach(Se=>this._walk(j,Se)),j.closeNode(ee)),j}static _collapse(j){typeof j!="string"&&j.children&&(j.children.every(ee=>typeof ee=="string")?j.children=[j.children.join("")]:j.children.forEach(ee=>{c._collapse(ee)}))}}class l extends c{constructor(j){super(),this.options=j}addText(j){j!==""&&this.add(j)}startScope(j){this.openNode(j)}endScope(){this.closeNode()}__addSublanguage(j,ee){const Se=j.root;ee&&(Se.scope=`language:${ee}`),this.add(Se)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(D){return D?typeof D=="string"?D:D.source:null}function f(D){return b("(?=",D,")")}function p(D){return b("(?:",D,")*")}function g(D){return b("(?:",D,")?")}function b(...D){return D.map(ee=>d(ee)).join("")}function h(D){const j=D[D.length-1];return typeof j=="object"&&j.constructor===Object?(D.splice(D.length-1,1),j):{}}function y(...D){return"("+(h(D).capture?"":"?:")+D.map(Se=>d(Se)).join("|")+")"}function v(D){return new RegExp(D.toString()+"|").exec("").length-1}function x(D,j){const ee=D&&D.exec(j);return ee&&ee.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(D,{joinWith:j}){let ee=0;return D.map(Se=>{ee+=1;const it=ee;let dt=d(Se),Ee="";for(;dt.length>0;){const be=k.exec(dt);if(!be){Ee+=dt;break}Ee+=dt.substring(0,be.index),dt=dt.substring(be.index+be[0].length),be[0][0]==="\\"&&be[1]?Ee+="\\"+String(Number(be[1])+it):(Ee+=be[0],be[0]==="("&&ee++)}return Ee}).map(Se=>`(${Se})`).join(j)}const E=/\b\B/,T="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",R="\\b\\d+(\\.\\d+)?",$="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",N="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(D={})=>{const j=/^#![ ]*\//;return D.binary&&(D.begin=b(j,/.*\b/,D.binary,/\b.*/)),r({scope:"meta",begin:j,end:/$/,relevance:0,"on:begin":(ee,Se)=>{ee.index!==0&&Se.ignoreMatch()}},D)},A={begin:"\\\\[\\s\\S]",relevance:0},I={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[A]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[A]},G={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(D,j,ee={}){const Se=r({scope:"comment",begin:D,end:j,contains:[]},ee);Se.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const it=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Se.contains.push({begin:b(/[ ]+/,"(",it,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Se},z=U("//","$"),P=U("/\\*","\\*/"),Z=U("#","$"),V={scope:"number",begin:R,relevance:0},te={scope:"number",begin:$,relevance:0},Y={scope:"number",begin:O,relevance:0},H={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[A,{begin:/\[/,end:/\]/,relevance:0,contains:[A]}]},ie={scope:"title",begin:T,relevance:0},me={scope:"title",begin:_,relevance:0},J={begin:"\\.\\s*"+_,relevance:0};var Ce=Object.freeze({__proto__:null,APOS_STRING_MODE:I,BACKSLASH_ESCAPE:A,BINARY_NUMBER_MODE:Y,BINARY_NUMBER_RE:O,COMMENT:U,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:z,C_NUMBER_MODE:te,C_NUMBER_RE:$,END_SAME_AS_BEGIN:function(D){return Object.assign(D,{"on:begin":(j,ee)=>{ee.data._beginMatch=j[1]},"on:end":(j,ee)=>{ee.data._beginMatch!==j[1]&&ee.ignoreMatch()}})},HASH_COMMENT_MODE:Z,IDENT_RE:T,MATCH_NOTHING_RE:E,METHOD_GUARD:J,NUMBER_MODE:V,NUMBER_RE:R,PHRASAL_WORDS_MODE:G,QUOTE_STRING_MODE:F,REGEXP_MODE:H,RE_STARTERS_RE:N,SHEBANG:M,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:me});function Ne(D,j){D.input[D.index-1]==="."&&j.ignoreMatch()}function Xe(D,j){D.className!==void 0&&(D.scope=D.className,delete D.className)}function pt(D,j){j&&D.beginKeywords&&(D.begin="\\b("+D.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",D.__beforeBegin=Ne,D.keywords=D.keywords||D.beginKeywords,delete D.beginKeywords,D.relevance===void 0&&(D.relevance=0))}function ce(D,j){Array.isArray(D.illegal)&&(D.illegal=y(...D.illegal))}function ze(D,j){if(D.match){if(D.begin||D.end)throw new Error("begin & end are not supported with match");D.begin=D.match,delete D.match}}function ne(D,j){D.relevance===void 0&&(D.relevance=1)}const ke=(D,j)=>{if(!D.beforeMatch)return;if(D.starts)throw new Error("beforeMatch cannot be used with starts");const ee=Object.assign({},D);Object.keys(D).forEach(Se=>{delete D[Se]}),D.keywords=ee.keywords,D.begin=b(ee.beforeMatch,f(ee.begin)),D.starts={relevance:0,contains:[Object.assign(ee,{endsParent:!0})]},D.relevance=0,delete ee.beforeMatch},K=["of","and","for","in","not","or","if","then","parent","list","value"],_e="keyword";function Oe(D,j,ee=_e){const Se=Object.create(null);return typeof D=="string"?it(ee,D.split(" ")):Array.isArray(D)?it(ee,D):Object.keys(D).forEach(function(dt){Object.assign(Se,Oe(D[dt],j,dt))}),Se;function it(dt,Ee){j&&(Ee=Ee.map(be=>be.toLowerCase())),Ee.forEach(function(be){const Te=be.split("|");Se[Te[0]]=[dt,Re(Te[0],Te[1])]})}}function Re(D,j){return j?Number(j):Qe(D)?0:1}function Qe(D){return K.includes(D.toLowerCase())}const yt={},kt=D=>{console.error(D)},Me=(D,...j)=>{console.log(`WARN: ${D}`,...j)},Ke=(D,j)=>{yt[`${D}/${j}`]||(console.log(`Deprecated as of ${D}. ${j}`),yt[`${D}/${j}`]=!0)},ht=new Error;function _t(D,j,{key:ee}){let Se=0;const it=D[ee],dt={},Ee={};for(let be=1;be<=j.length;be++)Ee[be+Se]=it[be],dt[be+Se]=!0,Se+=v(j[be-1]);D[ee]=Ee,D[ee]._emit=dt,D[ee]._multi=!0}function Yt(D){if(Array.isArray(D.begin)){if(D.skip||D.excludeBegin||D.returnBegin)throw kt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ht;if(typeof D.beginScope!="object"||D.beginScope===null)throw kt("beginScope must be object"),ht;_t(D,D.begin,{key:"beginScope"}),D.begin=C(D.begin,{joinWith:""})}}function Ut(D){if(Array.isArray(D.end)){if(D.skip||D.excludeEnd||D.returnEnd)throw kt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ht;if(typeof D.endScope!="object"||D.endScope===null)throw kt("endScope must be object"),ht;_t(D,D.end,{key:"endScope"}),D.end=C(D.end,{joinWith:""})}}function on(D){D.scope&&typeof D.scope=="object"&&D.scope!==null&&(D.beginScope=D.scope,delete D.scope)}function dn(D){on(D),typeof D.beginScope=="string"&&(D.beginScope={_wrap:D.beginScope}),typeof D.endScope=="string"&&(D.endScope={_wrap:D.endScope}),Yt(D),Ut(D)}function q(D){function j(Ee,be){return new RegExp(d(Ee),"m"+(D.case_insensitive?"i":"")+(D.unicodeRegex?"u":"")+(be?"g":""))}class ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Te){Te.position=this.position++,this.matchIndexes[this.matchAt]=Te,this.regexes.push([Te,be]),this.matchAt+=v(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Te=>Te[1]);this.matcherRe=j(C(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Te=this.matcherRe.exec(be);if(!Te)return null;const xt=Te.findIndex((Jn,Ms)=>Ms>0&&Jn!==void 0),mt=this.matchIndexes[xt];return Te.splice(0,xt),Object.assign(Te,mt)}}class Se{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Te=new ee;return this.rules.slice(be).forEach(([xt,mt])=>Te.addRule(xt,mt)),Te.compile(),this.multiRegexes[be]=Te,Te}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Te){this.rules.push([be,Te]),Te.type==="begin"&&this.count++}exec(be){const Te=this.getMatcher(this.regexIndex);Te.lastIndex=this.lastIndex;let xt=Te.exec(be);if(this.resumingScanAtSamePosition()&&!(xt&&xt.index===this.lastIndex)){const mt=this.getMatcher(0);mt.lastIndex=this.lastIndex+1,xt=mt.exec(be)}return xt&&(this.regexIndex+=xt.position+1,this.regexIndex===this.count&&this.considerAll()),xt}}function it(Ee){const be=new Se;return Ee.contains.forEach(Te=>be.addRule(Te.begin,{rule:Te,type:"begin"})),Ee.terminatorEnd&&be.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&be.addRule(Ee.illegal,{type:"illegal"}),be}function dt(Ee,be){const Te=Ee;if(Ee.isCompiled)return Te;[Xe,ze,dn,ke].forEach(mt=>mt(Ee,be)),D.compilerExtensions.forEach(mt=>mt(Ee,be)),Ee.__beforeBegin=null,[pt,ce,ne].forEach(mt=>mt(Ee,be)),Ee.isCompiled=!0;let xt=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),xt=Ee.keywords.$pattern,delete Ee.keywords.$pattern),xt=xt||/\w+/,Ee.keywords&&(Ee.keywords=Oe(Ee.keywords,D.case_insensitive)),Te.keywordPatternRe=j(xt,!0),be&&(Ee.begin||(Ee.begin=/\B|\b/),Te.beginRe=j(Te.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(Te.endRe=j(Te.end)),Te.terminatorEnd=d(Te.end)||"",Ee.endsWithParent&&be.terminatorEnd&&(Te.terminatorEnd+=(Ee.end?"|":"")+be.terminatorEnd)),Ee.illegal&&(Te.illegalRe=j(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(mt){return he(mt==="self"?Ee:mt)})),Ee.contains.forEach(function(mt){dt(mt,Te)}),Ee.starts&&dt(Ee.starts,be),Te.matcher=it(Te),Te}if(D.compilerExtensions||(D.compilerExtensions=[]),D.contains&&D.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return D.classNameAliases=r(D.classNameAliases||{}),dt(D)}function ue(D){return D?D.endsWithParent||ue(D.starts):!1}function he(D){return D.variants&&!D.cachedVariants&&(D.cachedVariants=D.variants.map(function(j){return r(D,{variants:null},j)})),D.cachedVariants?D.cachedVariants:ue(D)?r(D,{starts:D.starts?r(D.starts):null}):Object.isFrozen(D)?r(D):D}var Je="11.11.1";class Ue extends Error{constructor(j,ee){super(j),this.name="HTMLInjectionError",this.html=ee}}const et=n,Kt=r,We=Symbol("nomatch"),sn=7,fn=function(D){const j=Object.create(null),ee=Object.create(null),Se=[];let it=!0;const dt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let be={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function Te(se){return be.noHighlightRe.test(se)}function xt(se){let De=se.className+" ";De+=se.parentNode?se.parentNode.className:"";const Ye=be.languageDetectRe.exec(De);if(Ye){const st=er(Ye[1]);return st||(Me(dt.replace("{}",Ye[1])),Me("Falling back to no-highlight mode for this block.",se)),st?Ye[1]:"no-highlight"}return De.split(/\s+/).find(st=>Te(st)||er(st))}function mt(se,De,Ye){let st="",Ct="";typeof De=="object"?(st=se,Ye=De.ignoreIllegals,Ct=De.language):(Ke("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ke("10.7.0",`Please use highlight(code, options) instead.
|
|
659
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Ct=se,st=De),Ye===void 0&&(Ye=!0);const gn={code:st,language:Ct};ai("before:highlight",gn);const tr=gn.result?gn.result:Jn(gn.language,gn.code,Ye);return tr.code=gn.code,ai("after:highlight",tr),tr}function Jn(se,De,Ye,st){const Ct=Object.create(null);function gn(fe,Ae){return fe.keywords[Ae]}function tr(){if(!Be.keywords){Mt.addText(at);return}let fe=0;Be.keywordPatternRe.lastIndex=0;let Ae=Be.keywordPatternRe.exec(at),qe="";for(;Ae;){qe+=at.substring(fe,Ae.index);const ot=kn.case_insensitive?Ae[0].toLowerCase():Ae[0],$t=gn(Be,ot);if($t){const[Bn,$h]=$t;if(Mt.addText(qe),qe="",Ct[ot]=(Ct[ot]||0)+1,Ct[ot]<=sn&&(li+=$h),Bn.startsWith("_"))qe+=Ae[0];else{const Ph=kn.classNameAliases[Bn]||Bn;En(Ae[0],Ph)}}else qe+=Ae[0];fe=Be.keywordPatternRe.lastIndex,Ae=Be.keywordPatternRe.exec(at)}qe+=at.substring(fe),Mt.addText(qe)}function ui(){if(at==="")return;let fe=null;if(typeof Be.subLanguage=="string"){if(!j[Be.subLanguage]){Mt.addText(at);return}fe=Jn(Be.subLanguage,at,!0,Ec[Be.subLanguage]),Ec[Be.subLanguage]=fe._top}else fe=Ls(at,Be.subLanguage.length?Be.subLanguage:null);Be.relevance>0&&(li+=fe.relevance),Mt.__addSublanguage(fe._emitter,fe.language)}function Zt(){Be.subLanguage!=null?ui():tr(),at=""}function En(fe,Ae){fe!==""&&(Mt.startScope(Ae),Mt.addText(fe),Mt.endScope())}function vc(fe,Ae){let qe=1;const ot=Ae.length-1;for(;qe<=ot;){if(!fe._emit[qe]){qe++;continue}const $t=kn.classNameAliases[fe[qe]]||fe[qe],Bn=Ae[qe];$t?En(Bn,$t):(at=Bn,tr(),at=""),qe++}}function xc(fe,Ae){return fe.scope&&typeof fe.scope=="string"&&Mt.openNode(kn.classNameAliases[fe.scope]||fe.scope),fe.beginScope&&(fe.beginScope._wrap?(En(at,kn.classNameAliases[fe.beginScope._wrap]||fe.beginScope._wrap),at=""):fe.beginScope._multi&&(vc(fe.beginScope,Ae),at="")),Be=Object.create(fe,{parent:{value:Be}}),Be}function wc(fe,Ae,qe){let ot=x(fe.endRe,qe);if(ot){if(fe["on:end"]){const $t=new t(fe);fe["on:end"](Ae,$t),$t.isMatchIgnored&&(ot=!1)}if(ot){for(;fe.endsParent&&fe.parent;)fe=fe.parent;return fe}}if(fe.endsWithParent)return wc(fe.parent,Ae,qe)}function Rh(fe){return Be.matcher.regexIndex===0?(at+=fe[0],1):(Bs=!0,0)}function Nh(fe){const Ae=fe[0],qe=fe.rule,ot=new t(qe),$t=[qe.__beforeBegin,qe["on:begin"]];for(const Bn of $t)if(Bn&&(Bn(fe,ot),ot.isMatchIgnored))return Rh(Ae);return qe.skip?at+=Ae:(qe.excludeBegin&&(at+=Ae),Zt(),!qe.returnBegin&&!qe.excludeBegin&&(at=Ae)),xc(qe,fe),qe.returnBegin?0:Ae.length}function Ih(fe){const Ae=fe[0],qe=De.substring(fe.index),ot=wc(Be,fe,qe);if(!ot)return We;const $t=Be;Be.endScope&&Be.endScope._wrap?(Zt(),En(Ae,Be.endScope._wrap)):Be.endScope&&Be.endScope._multi?(Zt(),vc(Be.endScope,fe)):$t.skip?at+=Ae:($t.returnEnd||$t.excludeEnd||(at+=Ae),Zt(),$t.excludeEnd&&(at=Ae));do Be.scope&&Mt.closeNode(),!Be.skip&&!Be.subLanguage&&(li+=Be.relevance),Be=Be.parent;while(Be!==ot.parent);return ot.starts&&xc(ot.starts,fe),$t.returnEnd?0:Ae.length}function Mh(){const fe=[];for(let Ae=Be;Ae!==kn;Ae=Ae.parent)Ae.scope&&fe.unshift(Ae.scope);fe.forEach(Ae=>Mt.openNode(Ae))}let ci={};function _c(fe,Ae){const qe=Ae&&Ae[0];if(at+=fe,qe==null)return Zt(),0;if(ci.type==="begin"&&Ae.type==="end"&&ci.index===Ae.index&&qe===""){if(at+=De.slice(Ae.index,Ae.index+1),!it){const ot=new Error(`0 width match regex (${se})`);throw ot.languageName=se,ot.badRule=ci.rule,ot}return 1}if(ci=Ae,Ae.type==="begin")return Nh(Ae);if(Ae.type==="illegal"&&!Ye){const ot=new Error('Illegal lexeme "'+qe+'" for mode "'+(Be.scope||"<unnamed>")+'"');throw ot.mode=Be,ot}else if(Ae.type==="end"){const ot=Ih(Ae);if(ot!==We)return ot}if(Ae.type==="illegal"&&qe==="")return at+=`
|
|
660
|
+
`,1;if(Fs>1e5&&Fs>Ae.index*3)throw new Error("potential infinite loop, way more iterations than matches");return at+=qe,qe.length}const kn=er(se);if(!kn)throw kt(dt.replace("{}",se)),new Error('Unknown language: "'+se+'"');const Lh=q(kn);let Ps="",Be=st||Lh;const Ec={},Mt=new be.__emitter(be);Mh();let at="",li=0,_r=0,Fs=0,Bs=!1;try{if(kn.__emitTokens)kn.__emitTokens(De,Mt);else{for(Be.matcher.considerAll();;){Fs++,Bs?Bs=!1:Be.matcher.considerAll(),Be.matcher.lastIndex=_r;const fe=Be.matcher.exec(De);if(!fe)break;const Ae=De.substring(_r,fe.index),qe=_c(Ae,fe);_r=fe.index+qe}_c(De.substring(_r))}return Mt.finalize(),Ps=Mt.toHTML(),{language:se,value:Ps,relevance:li,illegal:!1,_emitter:Mt,_top:Be}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:se,value:et(De),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:_r,context:De.slice(_r-100,_r+100),mode:fe.mode,resultSoFar:Ps},_emitter:Mt};if(it)return{language:se,value:et(De),illegal:!1,relevance:0,errorRaised:fe,_emitter:Mt,_top:Be};throw fe}}function Ms(se){const De={value:et(se),illegal:!1,relevance:0,_top:Ee,_emitter:new be.__emitter(be)};return De._emitter.addText(se),De}function Ls(se,De){De=De||be.languages||Object.keys(j);const Ye=Ms(se),st=De.filter(er).filter(yc).map(Zt=>Jn(Zt,se,!1));st.unshift(Ye);const Ct=st.sort((Zt,En)=>{if(Zt.relevance!==En.relevance)return En.relevance-Zt.relevance;if(Zt.language&&En.language){if(er(Zt.language).supersetOf===En.language)return 1;if(er(En.language).supersetOf===Zt.language)return-1}return 0}),[gn,tr]=Ct,ui=gn;return ui.secondBest=tr,ui}function xh(se,De,Ye){const st=De&&ee[De]||Ye;se.classList.add("hljs"),se.classList.add(`language-${st}`)}function $s(se){let De=null;const Ye=xt(se);if(Te(Ye))return;if(ai("before:highlightElement",{el:se,language:Ye}),se.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",se);return}if(se.children.length>0&&(be.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(se)),be.throwUnescapedHTML))throw new Ue("One of your code blocks includes unescaped HTML.",se.innerHTML);De=se;const st=De.textContent,Ct=Ye?mt(st,{language:Ye,ignoreIllegals:!0}):Ls(st);se.innerHTML=Ct.value,se.dataset.highlighted="yes",xh(se,Ye,Ct.language),se.result={language:Ct.language,re:Ct.relevance,relevance:Ct.relevance},Ct.secondBest&&(se.secondBest={language:Ct.secondBest.language,relevance:Ct.secondBest.relevance}),ai("after:highlightElement",{el:se,result:Ct,text:st})}function wh(se){be=Kt(be,se)}const _h=()=>{si(),Ke("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Eh(){si(),Ke("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let mc=!1;function si(){function se(){si()}if(document.readyState==="loading"){mc||window.addEventListener("DOMContentLoaded",se,!1),mc=!0;return}document.querySelectorAll(be.cssSelector).forEach($s)}function kh(se,De){let Ye=null;try{Ye=De(D)}catch(st){if(kt("Language definition for '{}' could not be registered.".replace("{}",se)),it)kt(st);else throw st;Ye=Ee}Ye.name||(Ye.name=se),j[se]=Ye,Ye.rawDefinition=De.bind(null,D),Ye.aliases&&bc(Ye.aliases,{languageName:se})}function Ch(se){delete j[se];for(const De of Object.keys(ee))ee[De]===se&&delete ee[De]}function Sh(){return Object.keys(j)}function er(se){return se=(se||"").toLowerCase(),j[se]||j[ee[se]]}function bc(se,{languageName:De}){typeof se=="string"&&(se=[se]),se.forEach(Ye=>{ee[Ye.toLowerCase()]=De})}function yc(se){const De=er(se);return De&&!De.disableAutodetect}function Ah(se){se["before:highlightBlock"]&&!se["before:highlightElement"]&&(se["before:highlightElement"]=De=>{se["before:highlightBlock"](Object.assign({block:De.el},De))}),se["after:highlightBlock"]&&!se["after:highlightElement"]&&(se["after:highlightElement"]=De=>{se["after:highlightBlock"](Object.assign({block:De.el},De))})}function Th(se){Ah(se),Se.push(se)}function Dh(se){const De=Se.indexOf(se);De!==-1&&Se.splice(De,1)}function ai(se,De){const Ye=se;Se.forEach(function(st){st[Ye]&&st[Ye](De)})}function Oh(se){return Ke("10.7.0","highlightBlock will be removed entirely in v12.0"),Ke("10.7.0","Please use highlightElement now."),$s(se)}Object.assign(D,{highlight:mt,highlightAuto:Ls,highlightAll:si,highlightElement:$s,highlightBlock:Oh,configure:wh,initHighlighting:_h,initHighlightingOnLoad:Eh,registerLanguage:kh,unregisterLanguage:Ch,listLanguages:Sh,getLanguage:er,registerAliases:bc,autoDetection:yc,inherit:Kt,addPlugin:Th,removePlugin:Dh}),D.debugMode=function(){it=!1},D.safeMode=function(){it=!0},D.versionString=Je,D.regex={concat:b,lookahead:f,either:y,optional:g,anyNumberOfTimes:p};for(const se in Ce)typeof Ce[se]=="object"&&e(Ce[se]);return Object.assign(D,Ce),D},nt=fn({});return nt.newInstance=()=>fn({}),aa=nt,nt.HighlightJS=nt,nt.default=nt,aa}var ua,xd;function oS(){if(xd)return ua;xd=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 ua=e,ua}var ca,wd;function iS(){if(wd)return ca;wd=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=t.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],v={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["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"],E=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:y,built_in:[...x,...k,"set","shopt",...C,...E]},contains:[g,t.SHEBANG(),b,f,s,a,v,u,c,l,d,r]}}return ca=e,ca}var la,_d;function sS(){if(_d)return la;_d=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:v.concat([{begin:/\(/,end:/\)/,keywords:y,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:y,relevance:0},{begin:g,returnBegin:!0,contains:[t.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(x,k,v,[f,{begin:t.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:l,keywords:y}}}return la=e,la}var da,Ed;function aS(){if(Ed)return da;Ed=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},g=n.optional(i)+t.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:h,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},E={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},T=[E,f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:T.concat([{begin:/\(/,end:/\)/,keywords:C,contains:T.concat(["self"]),relevance:0}]),relevance:0},R={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:C,relevance:0},{begin:g,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(_,R,E,T,[f,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return da=e,da}var fa,kd;function uS(){if(kd)return fa;kd=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=t.inherit(d,{illegal:/\n/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=t.inherit(p,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,g]},h={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},y=t.inherit(h,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});p.contains=[h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],g.contains=[y,b,f,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const v={variants:[l,h,b,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},k=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},v,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[v,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},C]}}return fa=e,fa}var ga,Cd;function cS(){if(Cd)return ga;Cd=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),f={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},p="and or not only",g=/@-?\w[\w]*(-\w+)*/,b="[a-zA-Z-][a-zA-Z0-9_-]*",h=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,f,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+b,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...h,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...h,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...h,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return ga=u,ga}var pa,Sd;function lS(){if(Sd)return pa;Sd=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(l,{contains:[]}),p=t.inherit(d,{contains:[]});l.contains.push(p),d.contains.push(f);let g=[r,c];return[l,d,f,p].forEach(v=>{v.contains=v.contains.concat(g)}),g=g.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return pa=e,pa}var ha,Ad;function dS(){if(Ad)return ha;Ad=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 ha=e,ha}var ma,Td;function fS(){if(Td)return ma;Td=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},p="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},T=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:r}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=T,h.contains=T;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:T}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(O).concat(l).concat(T)}}return ma=e,ma}var ba,Dd;function gS(){if(Dd)return ba;Dd=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 ba=e,ba}var ya,Od;function pS(){if(Od)return ya;Od=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 ya=e,ya}var va,Rd;function hS(){if(Rd)return va;Rd=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,f=n.either(c,l,d),p=n.concat(f,"(\\s*\\.\\s*",f,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:p,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return va=e,va}var xa,Nd;function mS(){if(Nd)return xa;Nd=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),g={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},b={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:g,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[h,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:g,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[b,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,b]}}return xa=i,xa}var wa,Id;function bS(){if(Id)return wa;Id=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:J})=>{const pe="</"+me[0].slice(1);return me.input.indexOf(pe,J)!==-1},f=e,p={begin:"<>",end:"</>"},g=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(me,J)=>{const pe=me[0].length+me.index,Ce=me.input[pe];if(Ce==="<"||Ce===","){J.ignoreMatch();return}Ce===">"&&(d(me,{after:pe})||J.ignoreMatch());let Ne;const Xe=me.input.substring(pe);if(Ne=Xe.match(/^\s*=/)){J.ignoreMatch();return}if((Ne=Xe.match(/^\s+extends\s+/))&&Ne.index===0){J.ignoreMatch();return}}},h={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",v=`\\.(${y})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",k={className:"number",variants:[{begin:`(\\b(${x})((${v})|\\.)?|(${v}))[eE][+-]?(${y})\\b`},{begin:`\\b(${x})\\b((${v})\\b|\\.)?|(${v})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:h,contains:[]},E={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},R={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,C]},O={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:f+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},N=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,_,R,{match:/\$\d+/},k];C.contains=N.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(N)});const M=[].concat(O,C.contains),A=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(M)}]),I={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:A},F={variants:[{match:[/class/,/\s+/,f,/\s+/,/extends/,/\s+/,l.concat(f,"(",l.concat(/\./,f),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,f],scope:{1:"keyword",3:"title.class"}}]},G={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},U={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},z={variants:[{match:[/function/,/\s+/,f,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(me){return l.concat("(?!",me.join("|"),")")}const V={match:l.concat(/\b/,Z([...i,"super","import"].map(me=>`${me}\\s*\\(`)),f,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:l.concat(/\./,l.lookahead(l.concat(f,/(?![0-9A-Za-z$_(])/))),end:f,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,f,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ie={match:[/const|var|let/,/\s+/,f,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:G},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),U,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,E,T,_,R,O,{match:/\$\d+/},k,G,{scope:"attr",match:f+l.lookahead(":"),relevance:0},ie,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[O,c.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:g},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},z,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,c.inherit(c.TITLE_MODE,{begin:f,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+f,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},V,P,F,Y,{match:/\$[(.]/}]}}return wa=u,wa}var _a,Md;function yS(){if(Md)return _a;Md=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 _a=e,_a}var Ea,Ld;function vS(){if(Ld)return Ea;Ld=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},g=r,b=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=h;return y.variants[1].contains=[h],h.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,b,a,u,f,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,i.C_LINE_COMMENT_MODE,b],relevance:0},i.C_LINE_COMMENT_MODE,b,f,p,d,i.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,p]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
661
|
+
`},g]}}return Ea=o,Ea}var ka,$d;function xS(){if($d)return ka;$d=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),f=u,p="and or not only",g="[\\w-]+",b="("+g+"|@\\{"+g+"\\})",h=[],y=[],v=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},x=function(M,A,I){return{className:M,begin:A,relevance:I}},k={$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},C={begin:"\\(",end:"\\)",contains:y,keywords:k,relevance:0};y.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,v("'"),v('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,C,x("variable","@@?"+g,10),x("variable","@\\{"+g+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:g+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const E=y.concat({begin:/\{/,end:/\}/,contains:h}),T={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(y)},_={begin:b+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:y}}]},R={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:k,returnEnd:!0,contains:y,relevance:0}},$={className:"variable",variants:[{begin:"@"+g+"\\s*:",relevance:15},{begin:"@"+g}],starts:{end:"[;}]",returnEnd:!0,contains:E}},O={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,T,x("keyword","all\\b"),x("variable","@\\{"+g+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",b,0),x("selector-id","#"+b),x("selector-class","\\."+b,0),x("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:E},{begin:"!important"},d.FUNCTION_DISPATCH]},N={begin:g+`:(:)?(${f.join("|")})`,returnBegin:!0,contains:[O]};return h.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,R,$,N,_,O,T,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:h}}return ka=c,ka}var Ca,Pd;function wS(){if(Pd)return Ca;Pd=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 Ca=e,Ca}var Sa,Fd;function _S(){if(Fd)return Sa;Fd=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 Sa=e,Sa}var Aa,Bd;function ES(){if(Bd)return Aa;Bd=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(h,y,v="\\1")=>{const x=v==="\\1"?v:n.concat(v,y);return n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,v,o)},g=(h,y,v)=>n.concat(n.concat("(?:",h,")"),y,/(?:\\.|[^\\\/])*?/,v,o),b=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:p("s|tr|y",n.either(...f,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",n.either(...f,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}return Aa=e,Aa}var Ta,zd;function kS(){if(zd)return Ta;zd=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 Ta=e,Ta}var Da,Ud;function CS(){if(Ud)return Da;Ud=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(I,F)=>{F.data._beginMatch=I[1]||I[2]},"on:end":(I,F)=>{F.data._beginMatch!==I[1]&&F.ignoreMatch()}},p=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[
|
|
662
|
+
]`,b={scope:"string",variants:[d,l,f,p]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},y=["false","null","true"],v=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:v,literal:(I=>{const F=[];return I.forEach(G=>{F.push(G),G.toLowerCase()===G?F.push(G.toUpperCase()):F.push(G.toLowerCase())}),F})(y),built_in:x},E=I=>I.map(F=>F.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",E(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},_=n.concat(o,"\\b(?!\\()"),R={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),_],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},$={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[$,a,R,t.C_BLOCK_COMMENT_MODE,b,h,T]},N={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",E(v).join("\\b|"),"|",E(x).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(N);const M=[$,R,t.C_BLOCK_COMMENT_MODE,b,h,T],A={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:C,contains:[A,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,N,R,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},T,{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:C,contains:["self",A,a,R,t.C_BLOCK_COMMENT_MODE,b,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},b,h]}}return Da=e,Da}var Oa,Kd;function SS(){if(Kd)return Oa;Kd=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 Oa=e,Oa}var Ra,Hd;function AS(){if(Hd)return Ra;Hd=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Ra=e,Ra}var Na,qd;function TS(){if(qd)return Na;qd=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,b=`\\b|${o.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${p})[jJ](?=${b})`}]},y={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,h,f,t.HASH_COMMENT_MODE]}]};return l.contains=[f,h,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,v,f]}]}}return Na=e,Na}var Ia,jd;function DS(){if(jd)return Ia;jd=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Ia=e,Ia}var Ma,Gd;function OS(){if(Gd)return Ma;Gd=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 Ma=e,Ma}var La,Vd;function RS(){if(Vd)return La;Vd=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 La=e,La}var $a,Wd;function NS(){if(Wd)return $a;Wd=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,f=i,p="@[a-z-]+",g="and or not only",h={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+f.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},h,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,h,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:p,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:p,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},h,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return $a=u,$a}var Pa,Yd;function IS(){if(Yd)return Pa;Yd=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 Pa=e,Pa}var Fa,Zd;function MS(){if(Zd)return Fa;Zd=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],p=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=d,b=[...l,...c].filter(E=>!d.includes(E)),h={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:n.concat(/\b/,n.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function x(E){return n.concat(/\b/,n.either(...E.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:x(p),relevance:0};function C(E,{exceptions:T,when:_}={}){const R=_;return T=T||[],E.map($=>$.match(/\|\d+$/)||T.includes($)?$:R($)?`${$}|0`:$)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(b,{when:E=>E.length<3}),literal:s,type:u,built_in:f},contains:[{scope:"type",match:x(a)},k,v,h,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}return Fa=e,Fa}var Ba,Xd;function LS(){if(Xd)return Ba;Xd=1;function e(_){return _?typeof _=="string"?_:_.source:null}function t(_){return n("(?=",_,")")}function n(..._){return _.map($=>e($)).join("")}function r(_){const R=_[_.length-1];return typeof R=="object"&&R.constructor===Object?(_.splice(_.length-1,1),R):{}}function o(..._){return"("+(r(_).capture?"":"?:")+_.map(O=>e(O)).join("|")+")"}const i=_=>n(/\b/,_,/\w$/.test(_)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],f=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],g=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),b=o(g,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),h=n(g,b,"*"),y=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),v=o(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(y,v,"*"),k=n(/[A-Z]/,v,"*"),C=["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"],E=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function T(_){const R={match:/\s+/,relevance:0},$=_.COMMENT("/\\*","\\*/",{contains:["self"]}),O=[_.C_LINE_COMMENT_MODE,$],N={match:[/\./,o(...s,...a)],className:{2:"keyword"}},M={match:n(/\./,o(...c)),relevance:0},A=c.filter(We=>typeof We=="string").concat(["_|0"]),I=c.filter(We=>typeof We!="string").concat(u).map(i),F={variants:[{className:"keyword",match:o(...I,...a)}]},G={$pattern:o(/\b\w+/,/#\w+/),keyword:A.concat(f),literal:l},U=[N,M,F],z={match:n(/\./,o(...p)),relevance:0},P={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},Z=[z,P],V={match:/->/,relevance:0},te={className:"operator",relevance:0,variants:[{match:h},{match:`\\.(\\.|${b})+`}]},Y=[V,te],H="([0-9]_*)+",ie="([0-9a-fA-F]_*)+",me={className:"number",relevance:0,variants:[{match:`\\b(${H})(\\.(${H}))?([eE][+-]?(${H}))?\\b`},{match:`\\b0x(${ie})(\\.(${ie}))?([pP][+-]?(${H}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},J=(We="")=>({className:"subst",variants:[{match:n(/\\/,We,/[0\\tnr"']/)},{match:n(/\\/,We,/u\{[0-9a-fA-F]{1,8}\}/)}]}),pe=(We="")=>({className:"subst",match:n(/\\/,We,/[\t ]*(?:[\r\n]|\r\n)/)}),Ce=(We="")=>({className:"subst",label:"interpol",begin:n(/\\/,We,/\(/),end:/\)/}),Ne=(We="")=>({begin:n(We,/"""/),end:n(/"""/,We),contains:[J(We),pe(We),Ce(We)]}),Xe=(We="")=>({begin:n(We,/"/),end:n(/"/,We),contains:[J(We),Ce(We)]}),pt={className:"string",variants:[Ne(),Ne("#"),Ne("##"),Ne("###"),Xe(),Xe("#"),Xe("##"),Xe("###")]},ce=[_.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[_.BACKSLASH_ESCAPE]}],ze={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ce},ne=We=>{const sn=n(We,/\//),fn=n(/\//,We);return{begin:sn,end:fn,contains:[...ce,{scope:"comment",begin:`#(?!.*${fn})`,end:/$/}]}},ke={scope:"regexp",variants:[ne("###"),ne("##"),ne("#"),ze]},K={match:n(/`/,x,/`/)},_e={className:"variable",match:/\$\d+/},Oe={className:"variable",match:`\\$${v}+`},Re=[K,_e,Oe],Qe={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:E,contains:[...Y,me,pt]}]}},yt={scope:"keyword",match:n(/@/,o(...C),t(o(/\(/,/\s+/)))},kt={scope:"meta",match:n(/@/,x)},Me=[Qe,yt,kt],Ke={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,v,"+")},{className:"type",match:k,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(k)),relevance:0}]},ht={begin:/</,end:/>/,keywords:G,contains:[...O,...U,...Me,V,Ke]};Ke.contains.push(ht);const _t={match:n(x,/\s*:/),keywords:"_|0",relevance:0},Yt={begin:/\(/,end:/\)/,relevance:0,keywords:G,contains:["self",_t,...O,ke,...U,...Z,...Y,me,pt,...Re,...Me,Ke]},Ut={begin:/</,end:/>/,keywords:"repeat each",contains:[...O,Ke]},on={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},dn={begin:/\(/,end:/\)/,keywords:G,contains:[on,...O,...U,...Y,me,pt,...Me,Ke,Yt],endsParent:!0,illegal:/["']/},q={match:[/(func|macro)/,/\s+/,o(K.match,x,h)],className:{1:"keyword",3:"title.function"},contains:[Ut,dn,R],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ut,dn,R],illegal:/\[|%/},he={match:[/operator/,/\s+/,h],className:{1:"keyword",3:"title"}},Je={begin:[/precedencegroup/,/\s+/,k],className:{1:"keyword",3:"title"},contains:[Ke],keywords:[...d,...l],end:/}/},Ue={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},et={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Kt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:G,contains:[Ut,...U,{begin:/:/,end:/\{/,keywords:G,contains:[{scope:"title.class.inherited",match:k},...U],relevance:0}]};for(const We of pt.variants){const sn=We.contains.find(nt=>nt.label==="interpol");sn.keywords=G;const fn=[...U,...Z,...Y,me,pt,...Re];sn.contains=[...fn,{begin:/\(/,end:/\)/,contains:["self",...fn]}]}return{name:"Swift",keywords:G,contains:[...O,q,ue,Ue,et,Kt,he,Je,{beginKeywords:"import",end:/$/,contains:[...O],relevance:0},ke,...U,...Z,...Y,me,pt,...Re,...Me,Ke,Yt]}}return Ba=T,Ba}var za,Qd;function $S(){if(Qd)return za;Qd=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,h,s,a],v=[...y];return v.pop(),v.push(u),g.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return za=e,za}var Ua,Jd;function PS(){if(Jd)return Ua;Jd=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,f=(J,{after:pe})=>{const Ce="</"+J[0].slice(1);return J.input.indexOf(Ce,pe)!==-1},p=e,g={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,h={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(J,pe)=>{const Ce=J[0].length+J.index,Ne=J.input[Ce];if(Ne==="<"||Ne===","){pe.ignoreMatch();return}Ne===">"&&(f(J,{after:Ce})||pe.ignoreMatch());let Xe;const pt=J.input.substring(Ce);if(Xe=pt.match(/^\s*=/)){pe.ignoreMatch();return}if((Xe=pt.match(/^\s+extends\s+/))&&Xe.index===0){pe.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",x=`\\.(${v})`,k="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${k})((${x})|\\.)?|(${x}))[eE][+-]?(${v})\\b`},{begin:`\\b(${k})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,E],subLanguage:"css"}},R={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,E],subLanguage:"graphql"}},$={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,E]},N={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:p+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},M=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,_,R,$,{match:/\$\d+/},C];E.contains=M.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(M)});const A=[].concat(N,E.contains),I=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(A)}]),F={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:I},G={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,d.concat(p,"(",d.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,p,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[F],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function V(J){return d.concat("(?!",J.join("|"),")")}const te={match:d.concat(/\b/,V([...i,"super","import"].map(J=>`${J}\\s*\\(`)),p,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},Y={begin:d.concat(/\./,d.lookahead(d.concat(p,/(?![0-9A-Za-z$_(])/))),end:p,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,T,_,R,$,N,{match:/\$\d+/},C,U,{scope:"attr",match:p+d.lookahead(":"),relevance:0},me,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[N,l.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:b},{begin:h.begin,"on:begin":h.isTrulyOpeningTag,end:h.end}],subLanguage:"xml",contains:[{begin:h.begin,end:h.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[F,l.inherit(l.TITLE_MODE,{begin:p,className:"title.function"})]},{match:/\.\.\./,relevance:0},Y,{match:"\\$"+p,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[F]},te,Z,G,H,{match:/\$[(.]/}]}}function c(l){const d=l.regex,f=u(l),p=e,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},h={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},v=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(v),literal:n,built_in:a.concat(g),"variable.language":s},k={className:"meta",begin:"@"+p},C=(R,$,O)=>{const N=R.contains.findIndex(M=>M.label===$);if(N===-1)throw new Error("can not find mode to replace");R.contains.splice(N,1,O)};Object.assign(f.keywords,x),f.exports.PARAMS_CONTAINS.push(k);const E=f.contains.find(R=>R.scope==="attr"),T=Object.assign({},E,{match:d.concat(p,d.lookahead(/\s*\?:/))});f.exports.PARAMS_CONTAINS.push([f.exports.CLASS_REFERENCE,E,T]),f.contains=f.contains.concat([k,b,h,T]),C(f,"shebang",l.SHEBANG()),C(f,"use_strict",y);const _=f.contains.find(R=>R.label==="func.def");return _.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return Ua=c,Ua}var Ka,ef;function FS(){if(ef)return Ka;ef=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),p=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,f,p,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[p]}]}}return Ka=e,Ka}var Ha,tf;function BS(){if(tf)return Ha;tf=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 Ha=e,Ha}var qa,nf;function zS(){if(nf)return qa;nf=1;var e=rS();return e.registerLanguage("xml",oS()),e.registerLanguage("bash",iS()),e.registerLanguage("c",sS()),e.registerLanguage("cpp",aS()),e.registerLanguage("csharp",uS()),e.registerLanguage("css",cS()),e.registerLanguage("markdown",lS()),e.registerLanguage("diff",dS()),e.registerLanguage("ruby",fS()),e.registerLanguage("go",gS()),e.registerLanguage("graphql",pS()),e.registerLanguage("ini",hS()),e.registerLanguage("java",mS()),e.registerLanguage("javascript",bS()),e.registerLanguage("json",yS()),e.registerLanguage("kotlin",vS()),e.registerLanguage("less",xS()),e.registerLanguage("lua",wS()),e.registerLanguage("makefile",_S()),e.registerLanguage("perl",ES()),e.registerLanguage("objectivec",kS()),e.registerLanguage("php",CS()),e.registerLanguage("php-template",SS()),e.registerLanguage("plaintext",AS()),e.registerLanguage("python",TS()),e.registerLanguage("python-repl",DS()),e.registerLanguage("r",OS()),e.registerLanguage("rust",RS()),e.registerLanguage("scss",NS()),e.registerLanguage("shell",IS()),e.registerLanguage("sql",MS()),e.registerLanguage("swift",LS()),e.registerLanguage("yaml",$S()),e.registerLanguage("typescript",PS()),e.registerLanguage("vbnet",FS()),e.registerLanguage("wasm",BS()),e.HighlightJS=e,e.default=e,qa=e,qa}var US=zS();const rf=cc(US),_n=new cn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&rf.getLanguage(t))try{const n=rf.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),KS=/^<\/?(?:details|summary)>$/i,HS=/^<details\s+open\s*>$/i,qS=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function jS(e){return KS.test(e)||HS.test(e)||qS.test(e)}function Yp(e){const t=_n.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+=jS(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}_n.renderer.rules.html_block=(e,t)=>Yp(e[t].content);_n.renderer.rules.html_inline=(e,t)=>Yp(e[t].content);const GS=_n.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),of=_n.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),VS=_n.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Zp(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function WS(e){return e.replace(/:\d+(?::\d+)?$/,"")}function YS(e){const n=WS(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function ZS(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))&&YS(e)}function ja(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function Vr(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}_n.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=Zp(u[1],s,i?.projectId))}return GS(e,t,n,r,o)};_n.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&&ZS(a[1])){const c=a[1];return ja(s,"href"),ja(s,"target"),ja(s,"rel"),Vr(s,"role","button"),Vr(s,"tabindex","0"),Vr(s,"data-file-link","true"),Vr(s,"data-file-path",c),i.fileLinkTitle&&(Vr(s,"title",i.fileLinkTitle),Vr(s,"aria-label",i.fileLinkTitle)),of(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Zp(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return of(e,t,n,r,o)};_n.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,""").replace(/</g,"<").replace(/>/g,">")}">${u}</div>`}return VS(e,t,n,r,o)};_n.use(nS,{enabled:!1,label:!1});function Os(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),_n.render(e,n)}function XS(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const QS="modulepreload",JS=function(e){return"/"+e},sf={},e3=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=JS(c),c in sf)return;sf[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":QS,l||(f.as="script"),f.crossOrigin="",f.href=c,u&&f.setAttribute("nonce",u),document.head.appendChild(f),l)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Ga=null,af=Promise.resolve();const Eu=new WeakMap;async function t3(){return Ga||(Ga=e3(()=>import("./mermaid.core-DufPaTEv.js").then(e=>e.bp),[]).then(e=>e.default)),Ga}function n3(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function r3(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function o3(e){const t=(Eu.get(e)??0)+1;return Eu.set(e,t),t}function Va(e,t){return Eu.get(e)===t}async function i3(e){const t=af.then(e,e);af=t.catch(()=>{}),await t}async function s3(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=o3(e),n=await t3();if(!Va(e,t))return()=>{};if(await r3(),!Va(e,t))return()=>{};async function r(a){const u=a.filter(c=>c.isConnected&&e.contains(c));u.length!==0&&await i3(async()=>{if(!Va(e,t))return;const c=u.filter(d=>d.isConnected&&e.contains(d));if(c.length===0)return;const l=n3();n.initialize({startOnLoad:!1,theme:l}),c.forEach(d=>{const f=d.getAttribute("data-mermaid-source");f&&(d.removeAttribute("data-processed"),d.textContent=f)});try{await n.run({nodes:c})}catch(d){console.error("[mermaid] render error:",d)}})}const o=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await r(o);const i=()=>void r(Array.from(e.querySelectorAll(".mermaid"))),s=window.matchMedia("(prefers-color-scheme: dark)");return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}}function a3(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 u3(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function c3(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(!u3(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=a3(u.startContainer,e),f=S("selection.noSection"),p=d&&d.textContent?.trim()||f;i=c,t({text:c,rect:l,sectionPath:p})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const l3=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,d3=/^##\s+/,f3=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,g3=/^\d+\.\s+(.*\S)\s*$/,p3=/^\s*$/,uf=/\s*[((]推荐[))]\s*$/,cf=/\s*(自由文本)\s*$/,h3=/^\[(choice|confirm)\]\s*/i,m3=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,b3=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function y3(e){const t=e.split(`
|
|
663
|
+
`);let n=0;for(;n<t.length&&!l3.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(d3.test(i))break;const s=_3(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>v3(i,s))}function v3(e,t){const n=h3.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=cf.test(o),s=i?o.replace(cf,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=x3(e.bodyLines);return{id:lf(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=w3(e.bodyLines,t,s),u=i||a.length===0;return{id:lf(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function x3(e){let t,n;for(const r of e){const o=r.trim(),i=m3.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=b3.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function w3(e,t,n){const r=[];let o=0;for(const i of e){if(p3.test(i))continue;const s=E3(i);if(s===null)continue;const a=uf.test(s),u=a?s.replace(uf,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:k3(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function _3(e){const t=f3.exec(e);return t?t[1]:null}function E3(e){const t=g3.exec(e);return t?t[1]:null}function lf(e,t){return`q-${e}-${Xp(t)}`}function k3(e,t,n){return`q-${e}-o-${t}-${Xp(n)}`}function Xp(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var C3=B('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const S3=36,A3=140,T3=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-S3-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-A3-8);return{top:i,left:s,visible:!0}};return m(W,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=C3();return o.$$mousedown=i=>i.preventDefault(),w(o,m(Pe,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return S("selectionMenu.annotate")}}),null),w(o,m(Pe,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return S("selectionMenu.explain")}}),null),le(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&$o(o,"top",i.e=s),a!==i.t&&$o(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};ln(["mousedown"]);var D3=B('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-auto rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),O3=B('<p class="text-destructive ">');const R3=500,or=8,N3=e=>{const[t,n]=L(""),[r,o]=L(!1),[i,s]=L(null),[a,u]=L(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const f=a()||260,p=window.innerHeight,g=d.rect.bottom+or,b=d.rect.top-or-f;let h;g+f<=p-or?h=g:b>=or?h=b:h=Math.max(or,p-f-or);const y=Math.min(Math.max(or,d.rect.left),window.innerWidth-R3-or);return{top:h,left:y}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(f){s(f.message)}finally{o(!1)}}}return m(W,{get when(){return de(()=>!!e.open)()&&e.snap},get children(){var d=D3(),f=d.firstChild,p=f.firstChild,g=f.nextSibling,b=g.firstChild,h=b.nextSibling,y=h.nextSibling,v=y.nextSibling,x=v.nextSibling;x.nextSibling;var k=g.nextSibling,C=k.firstChild;return d.$$mousedown=E=>E.stopPropagation(),Vn(E=>{queueMicrotask(()=>{E.offsetHeight!==a()&&u(E.offsetHeight)})},d),w(p,()=>S("annotate.title")),w(b,()=>e.snap?.sectionPath),w(g,()=>S("annotate.inSection"),y),w(g,()=>(e.snap?.text??"").slice(0,200),x),k.addEventListener("submit",l),w(k,m(uo,{rows:3,get value(){return t()},onInput:E=>n(E.currentTarget.value),get placeholder(){return S("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),C),w(k,(()=>{var E=de(()=>!!i());return()=>E()&&(()=>{var T=O3();return w(T,i),T})()})(),C),w(C,m(Pe,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return S("common.cancel")}}),null),w(C,m(Pe,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return de(()=>!!r())()?S("common.submitting"):S("annotate.submit")}}),null),le(E=>{var T=`${c().top}px`,_=`${c().left}px`;return T!==E.e&&$o(d,"top",E.e=T),_!==E.t&&$o(d,"left",E.t=_),E},{e:void 0,t:void 0}),d}})};ln(["mousedown"]);var I3=B('<label class="flex cursor-pointer items-start gap-1.5 ml-5"><input type=checkbox class=mt-1><span class="flex flex-col"><span class=font-medium></span><span class="text-sm text-muted-foreground">'),M3=B("<div><span class=text-muted-foreground></span><code class=font-mono>"),L3=B('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),$3=B('<div class="flex flex-col gap-1 text-sm">'),P3=B('<p class="text-destructive ">'),F3=B('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><fieldset class="m-0 flex flex-col gap-1.5 border-0 p-0"><legend class="mb-1 font-medium"></legend></fieldset><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">'),B3=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=append-kind><span>');const z3={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},U3=e=>{const[t,n]=L("fix"),[r,o]=L(!1),[i,s]=L(""),[a,u]=L(!1),[c,l]=L(null),[d,f]=L(null);oe(()=>{if(!e.open){f(null);return}const h=e.anchorEl;if(!h)return;const y=h.getBoundingClientRect(),x=Math.max(16,Math.min(y.left,window.innerWidth-384-16));f({top:y.bottom+8,left:x})}),oe(()=>{if(!e.open)return;const h=y=>{y.key==="Escape"&&(y.preventDefault(),b())};window.addEventListener("keydown",h),ae(()=>window.removeEventListener("keydown",h))});function p(){n("fix"),o(!1),s(""),l(null)}async function g(h){h.preventDefault();const y=i().trim();if(!y){l(S("appendTask.descRequired"));return}u(!0),l(null);try{await e.onSubmit({kind:t(),description:y,sectionPath:e.sectionPath,quote:e.quote,debug:t()==="fix"?r():void 0}),p(),e.onCancel()}catch(v){l(v.message)}finally{u(!1)}}function b(){e.onCancel()}return m(W,{get when(){return e.open},get children(){var h=F3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,C=v.nextSibling,E=C.firstChild,T=E.firstChild,_=E.nextSibling,R=_.firstChild,$=_.nextSibling;return h.$$mousedown=b,y.$$mousedown=O=>O.stopPropagation(),w(x,()=>S("appendTask.title")),w(k,()=>S("appendTask.hint")),C.addEventListener("submit",g),w(T,()=>S("appendTask.type")),w(E,()=>["feat","refct","fix"].map(O=>(()=>{var N=B3(),M=N.firstChild,A=M.nextSibling;return M.addEventListener("change",()=>n(O)),M.value=O,w(A,()=>S(z3[O])),le(()=>M.disabled=a()),le(()=>M.checked=t()===O),N})()),null),w(C,m(W,{get when(){return t()==="fix"},get children(){var O=I3(),N=O.firstChild,M=N.nextSibling,A=M.firstChild,I=A.nextSibling;return N.addEventListener("change",F=>o(F.currentTarget.checked)),w(A,()=>S("appendTask.debugMode")),w(I,()=>S("appendTask.debugModeHint")),le(()=>N.disabled=a()),le(()=>N.checked=r()),O}}),_),w(R,()=>S("appendTask.description")),w(_,m(uo,{rows:5,get value(){return i()},onInput:O=>s(O.currentTarget.value),get placeholder(){return S("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(C,m(W,{get when(){return e.sectionPath||e.quote},get children(){var O=$3();return w(O,m(W,{get when(){return e.sectionPath},get children(){var N=M3(),M=N.firstChild,A=M.nextSibling;return w(M,()=>S("appendTask.refSection")),w(A,()=>e.sectionPath),N}}),null),w(O,m(W,{get when(){return e.quote},get children(){var N=L3();return w(N,()=>e.quote?.slice(0,200)),N}}),null),O}}),$),w(C,m(W,{get when(){return c()},get children(){var O=P3();return w(O,c),O}}),$),w($,m(Pe,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return S("common.cancel")}}),null),w($,m(Pe,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[m(us,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!a())()?S("common.submitting"):S("appendTask.submit"))]}}),null),le(O=>{var N=S("appendTask.title"),M=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0,A=a();return N!==O.e&&xe(y,"aria-label",O.e=N),O.t=ur(y,M,O.t),A!==O.a&&(E.disabled=O.a=A),O},{e:void 0,t:void 0,a:void 0}),h}})};ln(["mousedown"]);const Do="__freeform__",K3={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},H3="accept";function q3(e){return e!==H3}function j3(e,t,n){const r=K3[t],o=(n??"").trim();if(q3(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function G3(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===Do?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var V3=B('<p class="text-destructive mx-3 mt-1 ">'),W3=B('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-accent"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),Y3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-option-freeform flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span>'),df=B('<p class="m-0 break-words"><strong></strong>:'),Z3=B("<div>"),ff=B('<ul class="m-0 ml-5 flex list-none flex-col gap-1 border-l border-border pl-2">'),X3=B('<ul class="m-0 flex list-none flex-col gap-1 p-0"><li><label class="qcp-confirm-accept flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span></span></label></li><li><label class="qcp-confirm-reject flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="font-medium text-destructive">'),Q3=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),J3=B('<em class="text-accent text-sm not-italic"> '),Wa=B('<li><label class="flex cursor-pointer items-center gap-1.5 px-1 py-0.5 rounded-md hover:bg-primary/5"><input type=radio><span class="min-w-0 break-words">'),eA=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function Qp(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function tA(e){const t=Qp(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function nA(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-amber-500":"border-border":"border-border"}const rA=e=>{const t=()=>{const h={};for(const y of e.questions){if(y.kind==="confirm"){h[y.id]={note:"",confirmTop:"accept"};continue}const v=y.options.find(x=>x.recommended);h[y.id]={selectedOptionLabel:v?.label??y.options[0]?.label,note:""}}return h},[n,r]=L(t()),[o,i]=L(!1),[s,a]=L(null);function u(h,y){r(v=>({...v,[h]:{...v[h],...y}}))}function c(h,y){u(h,{selectedOptionLabel:y})}function l(h,y){u(h,{note:y})}function d(h,y){y==="accept"?u(h,{confirmTop:y,confirmIntent:void 0,confirmDrop:void 0}):u(h,{confirmTop:y})}function f(h,y){y==="dropGoal"?u(h,{confirmIntent:y}):u(h,{confirmIntent:y,confirmDrop:void 0})}function p(h,y){u(h,{confirmDrop:y})}const g=re(()=>{const h=n();let y=0;for(const v of e.questions){const x=h[v.id];if(!x){y+=1;continue}if(v.kind==="confirm"){tA(x)||(y+=1);continue}const k=x.note??"";v.isFreeform||x.selectedOptionLabel===Do?k.trim()||(y+=1):x.selectedOptionLabel||(y+=1)}return y});async function b(){i(!0),a(null);try{const h=n(),y=[];for(const x of e.questions){const k=h[x.id]??{note:""};if(x.kind==="confirm"){const E=Qp(k);if(!E)continue;const T=j3(x,E,k.note);if(!T){a(S("questionConfirm.reasonRequired"));return}y.push(T);continue}const C=G3(x,k);C&&y.push(C)}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(S("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(h){a(h.message)}finally{i(!1)}}return(()=>{var h=W3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,C=k.firstChild,E=C.nextSibling;E.nextSibling;var T=y.nextSibling;return w(x,()=>S("questionConfirm.title")),w(k,()=>S("questionConfirm.unanswered"),C),w(E,g),w(k,()=>e.questions.length,null),w(y,m(Pe,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[m(us,{class:"mr-1 h-3.5 w-3.5"}),de(()=>de(()=>!!o())()?S("common.submitting"):de(()=>!!e.running)()?S("questionConfirm.running"):S("questionConfirm.submitAll"))]}}),null),w(h,m(W,{get when(){return s()},get children(){var _=V3();return w(_,s),_}}),T),w(T,m(vt,{get each(){return e.questions},children:_=>{const R=()=>n()[_.id]??{note:""},$=()=>_.kind!=="confirm"&&(_.isFreeform||R().selectedOptionLabel===Do),O=()=>_.kind==="confirm"&&R().confirmTop==="reject";return(()=>{var N=Q3(),M=N.firstChild;return w(M,()=>_.text),w(N,m(W,{get when(){return _.kind==="choice"},get children(){var A=Y3(),I=A.firstChild,F=I.firstChild,G=F.firstChild,U=G.nextSibling;return w(A,m(vt,{get each(){return _.options},children:z=>(()=>{var P=Wa(),Z=P.firstChild,V=Z.firstChild,te=V.nextSibling;return V.addEventListener("change",()=>c(_.id,z.label)),w(te,()=>z.label,null),w(te,m(W,{get when(){return z.recommended},get children(){var Y=J3();return Y.firstChild,w(Y,()=>S("questionConfirm.recommended"),null),Y}}),null),le(()=>xe(V,"name",`q-${_.id}`)),le(()=>V.checked=R().selectedOptionLabel===z.label),P})()}),I),G.addEventListener("change",()=>c(_.id,Do)),w(U,()=>S("questionConfirm.freeformLabel")),le(()=>xe(G,"name",`q-${_.id}`)),le(()=>G.checked=R().selectedOptionLabel===Do),A}}),null),w(N,m(W,{get when(){return _.kind==="confirm"},get children(){return[(()=>{var A=Z3();return w(A,m(W,{get when(){return _.plan},get children(){var I=df(),F=I.firstChild;return F.nextSibling,w(F,()=>S("questionConfirm.confirmPlanLabel")),w(I,()=>_.plan,null),I}}),null),w(A,m(W,{get when(){return _.impact},get children(){var I=df(),F=I.firstChild;return F.nextSibling,w(F,()=>S("questionConfirm.confirmImpactLabel")),w(I,()=>_.impact,null),I}}),null),le(()=>ut(A,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${nA(_.impact)}`)),A})(),(()=>{var A=X3(),I=A.firstChild,F=I.firstChild,G=F.firstChild,U=G.nextSibling,z=I.nextSibling,P=z.firstChild,Z=P.firstChild,V=Z.nextSibling;return G.addEventListener("change",()=>d(_.id,"accept")),w(U,()=>S("questionConfirm.decisionAccept")),Z.addEventListener("change",()=>d(_.id,"reject")),w(V,()=>S("questionConfirm.decisionReject")),w(A,m(W,{get when(){return R().confirmTop==="reject"},get children(){var te=ff();return w(te,m(vt,{get each(){return[["alternative",S("questionConfirm.intentAlternative")],["constraint",S("questionConfirm.intentConstraint")],["dropGoal",S("questionConfirm.intentDropGoal")]]},children:([Y,H])=>(()=>{var ie=Wa(),me=ie.firstChild,J=me.firstChild,pe=J.nextSibling;return J.addEventListener("change",()=>f(_.id,Y)),w(pe,H),le(()=>xe(J,"name",`q-${_.id}-intent`)),le(()=>J.checked=R().confirmIntent===Y),ie})()}),null),w(te,m(W,{get when(){return R().confirmIntent==="dropGoal"},get children(){var Y=ff();return w(Y,m(vt,{get each(){return[["current",S("questionConfirm.dropGoalCurrent")],["spec",S("questionConfirm.dropGoalSpec")]]},children:([H,ie])=>(()=>{var me=Wa(),J=me.firstChild,pe=J.firstChild,Ce=pe.nextSibling;return pe.addEventListener("change",()=>p(_.id,H)),w(Ce,ie),le(()=>xe(pe,"name",`q-${_.id}-drop`)),le(()=>pe.checked=R().confirmDrop===H),me})()})),Y}}),null),te}}),null),le(te=>{var Y=`q-${_.id}`,H=`q-${_.id}`;return Y!==te.e&&xe(G,"name",te.e=Y),H!==te.t&&xe(Z,"name",te.t=H),te},{e:void 0,t:void 0}),le(()=>G.checked=R().confirmTop==="accept"),le(()=>Z.checked=R().confirmTop==="reject"),A})()]}}),null),w(N,m(W,{get when(){return $()},get children(){return m(uo,{class:"qcp-note",rows:2,get placeholder(){return S("questionConfirm.notePlaceholder")},get value(){return R().note},onInput:A=>l(_.id,A.currentTarget.value)})}}),null),w(N,m(W,{get when(){return O()},get children(){return m(uo,{class:"qcp-reject-reason",rows:2,get placeholder(){return S("questionConfirm.reasonPlaceholder")},get value(){return R().note},onInput:A=>l(_.id,A.currentTarget.value)})}}),null),N})()}}),null),w(T,m(vt,{get each(){return e.freeforms},children:_=>(()=>{var R=eA(),$=R.firstChild,O=$.firstChild,N=$.nextSibling,M=N.firstChild,A=M.nextSibling,I=A.nextSibling,F=I.nextSibling,G=F.nextSibling;G.nextSibling;var U=N.nextSibling;return U.firstChild,w(O,()=>S("questionConfirm.selectionAnnotation")),w($,m(Pe,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(_.id),"aria-label":"remove",get children(){return m(Zo,{class:"h-4 w-4"})}}),null),w(M,()=>_.sectionPath),w(N,()=>S("questionConfirm.quoteConnector"),I),w(N,()=>_.quote.slice(0,200),G),w(U,()=>_.note,null),R})()}),null),le(()=>xe(x,"title",S("questionConfirm.title"))),h})()};var oA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),gf=B("<p class=text-muted-foreground>"),iA=B('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><select><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select><time>'),sA=B('<p class="text-destructive ">'),aA=B('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const uA={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},cA=120,pf=3,lA=150,dA=e=>new Promise(t=>setTimeout(t,e));async function fA(e,t,n){for(let r=0;r<=pf;r+=1)try{return await Fe.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<pf&&await dA(lA)}return n??null}const gA=()=>{const e=ss(),t=Xo(),[n,r]=L(0),[o,i]=L(!1),[s,a]=L(""),[u]=bn(()=>[t(),e.id,n()],async([Y,H],ie)=>fA(Y,H,ie.value)),[c]=bn(()=>[t(),e.id,n()],async([Y,H])=>{try{return await Fe.getDebug(Y,H)}catch{return{exists:!1,text:""}}}),[l,d]=L(null),[f,p]=L(!1),[g,b]=L(null),[h,y]=L(null),[v,x]=L(null),[k,C]=L([]),[E,T]=L(!1),[_,R]=L(null);let $;const O=re(()=>{const Y=u();return Y?y3(Y.body):[]}),N=re(()=>`@.yorz/specs/${e.id}/spec.md`),M=re(()=>!u()||o()?!1:O().length>0||k().length>0);oe(()=>{const Y=e.id,H=t();if(!Y||!H)return;let ie;const me=dy(H,Y,{onUpdated:()=>{ie&&clearTimeout(ie),ie=setTimeout(()=>void Tf(()=>r(J=>J+1)),cA)}});ae(()=>{ie&&clearTimeout(ie),me()})}),oe(()=>{const Y=e.id,H=t();!Y||!H||Fe.getSpecSession(H,Y).then(({sessionId:ie,running:me})=>{ie&&(a(ie),i(me),Qr(ie))}).catch(()=>{})}),oe(()=>{const Y=t(),H=s();if(!Y||!H)return;const ie=a0(Y,{onStatus:me=>{me.sessionId===H&&i(me.running)}});ae(ie)}),oe(()=>{const Y=t(),H=s();if(!Y||!H)return;const ie=ds(Y,H,{onEvent:me=>{(me.type==="turn-completed"||me.type==="error")&&i(!1)}});ae(ie)}),oe(()=>{const Y=v();if(!Y)return;const H=c3(Y,d);ae(H)}),cs(()=>E()||f()),oe(()=>{const Y=v(),H=u();if(!Y||!H)return;const ie=t();let me=!0,J;const pe=Os(H.body,{specId:H.id,projectId:ie||void 0});pE(Y,`<article>${pe}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Ce,Ne)=>!(Ce.classList?.contains("mermaid")&&Ce.getAttribute("data-mermaid-source")===Ne.getAttribute?.("data-mermaid-source"))}),s3(Y).then(Ce=>{if(!me){Ce();return}J=Ce}),ae(()=>{me=!1,J?.()})});async function A(){y(null),i(!0);try{const Y=t(),{sessionId:H}=await Fe.runAgent(Y,e.id);a(H),Qr(H)}catch(Y){i(!1),y(Y.message)}}async function I(Y){y(null);try{await Fe.setStage(t(),e.id,Y),r(H=>H+1)}catch(H){y(H.message)}}async function F(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(N()),hn.success(S("specDetail.specPathCopied"))}catch{hn.error(S("specDetail.specPathCopyFailed"))}}function G(Y){b(Y),p(!0)}async function U(Y){const H=g();H&&C(ie=>[...ie,{id:`f-${Date.now()}-${ie.length}`,sectionPath:H.sectionPath,quote:H.text,note:Y}])}function z(Y){C(H=>H.filter(ie=>ie.id!==Y))}async function P(Y){await Fe.submitQuestionAnswers(t(),e.id,Y),C([]),await A()}function Z(){R(l()),T(!0)}async function V(Y){const H=t(),ie=await Fe.appendItem(H,e.id,Y);ie.sessionId&&(i(!0),a(ie.sessionId),Qr(ie.sessionId))}async function te(Y){i(!0);try{const H=t(),{sessionId:ie}=await Fe.explain(H,e.id,Y.text);a(ie),Qr(ie)}catch(H){i(!1),y(H.message)}}return(()=>{var Y=oA();return w(Y,m(rs,{get fallback(){return(()=>{var H=gf();return w(H,()=>S("common.loading")),H})()},get children(){return m(W,{get when(){return u()},get fallback(){return(()=>{var H=gf();return w(H,()=>S("specDetail.notFound")),H})()},children:H=>[(()=>{var ie=iA(),me=ie.firstChild,J=me.firstChild,pe=me.nextSibling,Ce=pe.firstChild,Ne=pe.nextSibling,Xe=Ne.firstChild,pt=Xe.nextSibling;return w(J,m(ks,{get items(){return[{label:S("breadcrumb.specList"),href:en("")},{label:H().id}]}}),null),w(J,m(Pe,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return S("specDetail.copySpecPath")},get"aria-label"(){return S("specDetail.copySpecPath")},onClick:()=>void F(),get children(){return m(l1,{class:"h-3.5 w-3.5"})}}),null),w(me,m(hs,{}),null),w(Ce,()=>H().frontmatter.summary||S("common.pendingAgent")),Xe.addEventListener("change",ce=>I(ce.currentTarget.value)),w(pt,()=>l0(H().frontmatter.updated_at)),w(Ne,m(Pe,{variant:"outline",size:"sm",class:"append-btn",ref(ce){var ze=$;typeof ze=="function"?ze(ce):$=ce},onClick:Z,get children(){return S("specDetail.appendTask")}}),null),w(Ne,m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${H().id}/review`)},get children(){return S("specDetail.review")}}),null),w(Ne,m(W,{get when(){return c()?.exists},get children(){return m(fr,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return en(`specs/${H().id}/debug`)},get children(){return S("specDetail.debug")}})}}),null),w(Ne,m(W,{get when(){return o()},get children(){return m($0,{variant:"secondary",get children(){return S("specDetail.running")}})}}),null),le(ce=>{var ze=`cursor-pointer appearance-none rounded-full border-0 px-2.5 py-0.5 text-sm font-semibold uppercase text-white ${uA[H().frontmatter.stage]??"bg-muted"}`,ne=S("specDetail.forceStage");return ze!==ce.e&&ut(Xe,ce.e=ze),ne!==ce.t&&xe(Xe,"title",ce.t=ne),ce},{e:void 0,t:void 0}),le(()=>Xe.value=H().frontmatter.stage),ie})(),m(W,{get when(){return h()},get children(){var ie=sA();return w(ie,h),ie}}),(()=>{var ie=aA(),me=ie.firstChild;return w(ie,m(W,{get when(){return M()},get children(){return m(rA,{get questions(){return O()},get freeforms(){return k()},get running(){return o()},onRemoveFreeform:z,onSubmit:P})}}),me),Vn(x,me),ie})(),m(T3,{get snap(){return de(()=>!!f())()?null:l()},onAnnotate:G,onExplain:te}),m(N3,{get open(){return f()},get snap(){return g()},onCancel:()=>p(!1),onSubmit:U}),m(U3,{get open(){return E()},get sectionPath(){return _()?.sectionPath},get quote(){return _()?.text},anchorEl:$,onCancel:()=>T(!1),onSubmit:V})]})}})),Y})()},pA=e=>{const[t,n]=we(e,["class"]);return m(Pg,Q({get class(){return Et("shrink-0 bg-border data-[orientation=horizontal]:h-[1px] data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-[1px]",t.class)}},n))};var hA=B("<span>"),mA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),bA=B('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),yA=B('<p class=" text-muted-foreground">'),vA=B('<p class="text-destructive ">'),xA=B('<p class=" text-muted-foreground">(runId: <code></code>)'),hf=B("<p class=text-muted-foreground>"),wA=B('<section data-testid=review-report-pane class="flex min-h-0 min-w-0 flex-[6] flex-col gap-2">'),_A=B('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane><div class="flex flex-wrap items-center gap-2"></div><div class="flex gap-4"><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode>'),EA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),kA=B('<label class="flex cursor-pointer items-center gap-2 px-2 py-0.5 "><input type=checkbox><span></span><span class="truncate font-mono text-sm">'),CA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">');const SA={commit:"review.commit",discard:"review.discard",stash:"review.stash"},ki={review:"review.reviewing",commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},Ci={review:"review.reviewChanges",commit:"review.commit",discard:"review.discard",stash:"review.stash"},AA={M:"text-yellow-600",A:"text-green-600",D:"text-red-600","??":"text-blue-600",R:"text-purple-600"},TA=()=>{const e=ss(),t=Xo(),[n]=bn(()=>[t(),e.id],([ne,ke])=>Fe.getSpec(ne,ke)),[r,o]=L(0),[i]=bn(()=>[t(),e.id,r()],async([ne,ke])=>Fe.getReview(ne,ke)),[s,a]=L([]),[u,c]=L("manual"),[l,d]=L(new Set),[f,p]=L(""),[g,b]=L(!1),[h,y]=L(null),[v,x]=L(null),[k,C]=L(null),[E,T]=L(null),[_,R]=L(null),[$,O]=L(""),[N,M]=L(null);function A(ne){return O(ne),new Promise(ke=>M(()=>ke))}function I(ne){const ke=N();ke&&(M(null),ke(ne))}let F,G=null;ae(()=>G?.()),ae(()=>I(!1)),cs();function U(ne){ne&&(ne.style.height="auto",ne.style.height=`${ne.scrollHeight}px`)}const z=re(()=>{const ne=i()?.text??"";return ne.trim()?Os(ne,{specId:e.id,projectId:t()}):""}),P=re(()=>i.loading||!!z()),Z=re(()=>DA(i()?.text??"")),V=re(()=>{const ne=e.id.split("."),ke=ne.length>=2?ne[1]:"feat",K=n()?.frontmatter.summary??"";return K?`${ke}: ${K}`:`${ke}: update`});oe(()=>{const ne=V();ne&&!g()&&p(ne)}),oe(Tt(f,()=>{U(F)})),Vt(()=>U(F)),oe(()=>{const ne=t(),ke=e.id;if(!ne||!ke)return;const K=fy(ne,ke,_e=>{a(_e),d(Oe=>{const Re=new Set(_e.map(yt=>yt.path)),Qe=new Set;for(const yt of Oe)Re.has(yt)&&Qe.add(yt);return Qe})});ae(()=>K())});function te(ne){return _()===ne}const Y=re(()=>_()),H=re(()=>v()!==null||Y()!==null||h()!==null);function ie(ne,ke){G?.(),R(ne),G=ds(t(),ke,{onEvent:K=>{(K.type==="turn-completed"||K.type==="error")&&(R(null),ne==="review"&&o(_e=>_e+1),G?.(),G=null)}})}function me(){return u()==="agent"?s().map(ne=>ne.path):[...l()]}async function J(ne){if(H())return;C(null);const ke=me();if(ke.length===0){C(S("review.selectAtLeastOne"));return}if(!(ne==="discard"&&!await A(S("review.confirmDiscard")))){y(ne);try{if(ne==="commit"){const K=f().trim();if(!K){C(S("review.enterCommitMsg"));return}await Fe.directCommit(t(),e.id,{message:K,paths:ke})}else ne==="discard"?await Fe.directDiscard(t(),e.id,{paths:ke}):ne==="stash"&&await Fe.directStash(t(),e.id,{message:f().trim()||`yorz:${e.id}`,paths:ke})}catch(K){C(K.message)}finally{y(null)}}}async function pe(ne){if(!H()&&(C(null),!(ne==="discard"&&!await A(S("review.confirmDiscardAll"))))){x(ne);try{const ke=ne==="review"?await Fe.triggerReview(t(),e.id):await Fe.gitOp(t(),e.id,ne);T({kind:ne,runId:ke.runId}),Qr(ke.sessionId),ie(ne,ke.sessionId)}catch(ke){C(ke.message)}finally{x(null)}}}async function Ce(ne){u()==="manual"?await J(ne):await pe(ne)}function Ne(ne){return te(ne)||v()===ne||h()===ne}function Xe(ne){d(ke=>{const K=new Set(ke);return K.has(ne)?K.delete(ne):K.add(ne),K})}function pt(){s().every(ne=>l().has(ne.path))?d(new Set):d(new Set(s().map(ne=>ne.path)))}const ce=re(()=>s().length>0&&s().every(ne=>l().has(ne.path))),ze=re(()=>u()==="manual"&&l().size===0);return(()=>{var ne=EA();return w(ne,m(rs,{get fallback(){return(()=>{var ke=hf();return w(ke,()=>S("common.loading")),ke})()},get children(){return[(()=>{var ke=mA(),K=ke.firstChild,_e=K.firstChild,Oe=K.nextSibling;return w(K,m(ks,{get items(){return[{label:S("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:S("specDetail.review")}]}}),_e),w(_e,()=>n()?.frontmatter.summary||S("common.pendingAgent")),w(Oe,m(W,{get when(){return Z()},get children(){var Re=hA();return w(Re,()=>S("review.lastReview",{time:Z()})),Re}}),null),w(Oe,m(hs,{}),null),ke})(),(()=>{var ke=_A(),K=ke.firstChild,_e=K.firstChild,Oe=_e.nextSibling,Re=Oe.firstChild,Qe=Re.firstChild,yt=Re.nextSibling,kt=yt.firstChild;return w(_e,m(Pe,{variant:"default",size:"sm",get disabled(){return H()||ze()},onClick:()=>Ce("commit"),get children(){return[m(W,{get when(){return Ne("commit")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("commit"))()?S(ki.commit):S(Ci.commit))]}}),null),w(_e,m(Pe,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return H()||ze()},onClick:()=>Ce("discard"),get children(){return[m(W,{get when(){return Ne("discard")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("discard"))()?S(ki.discard):S(Ci.discard))]}}),null),w(_e,m(Pe,{variant:"ghost",size:"sm",get disabled(){return H()||ze()},onClick:()=>Ce("stash"),get children(){return[m(W,{get when(){return Ne("stash")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("stash"))()?S(ki.stash):S(Ci.stash))]}}),null),w(_e,m(pA,{orientation:"vertical",class:"h-6"}),null),w(_e,m(Pe,{variant:"ghost",size:"sm",get title(){return S("review.reviewHint")},get disabled(){return H()||s().length===0},onClick:()=>pe("review"),get children(){return[m(W,{get when(){return Ne("review")},get children(){return m(sr,{class:"mr-1 h-3 w-3 animate-spin"})}}),de(()=>de(()=>!!Ne("review"))()?S(ki.review):S(Ci.review))]}}),null),w(K,m(uo,{ref(Me){var Ke=F;typeof Ke=="function"?Ke(Me):F=Me},get placeholder(){return S("review.commitPlaceholder")},get value(){return f()},onInput:Me=>{b(!0),p(Me.currentTarget.value),U(F)},get disabled(){return H()},rows:2,class:"resize-none"}),Oe),Qe.addEventListener("change",()=>c("manual")),w(Re,()=>S("review.manualSelect"),null),kt.addEventListener("change",()=>c("agent")),w(yt,()=>S("review.agentSelect"),null),w(K,m(W,{get when(){return de(()=>u()==="manual")()&&s().length>0},get children(){var Me=bA(),Ke=Me.firstChild,ht=Ke.firstChild;return w(Ke,m(Pe,{variant:"ghost",size:"sm",onClick:pt,get disabled(){return H()},get children(){return de(()=>!!ce())()?S("review.deselectAll"):S("review.selectAll")}}),ht),w(ht,()=>S("review.fileCount",{selected:l().size,total:s().length})),w(Me,m(vt,{get each(){return s()},children:_t=>(()=>{var Yt=kA(),Ut=Yt.firstChild,on=Ut.nextSibling,dn=on.nextSibling;return Ut.addEventListener("change",()=>Xe(_t.path)),w(on,()=>_t.status),w(dn,()=>_t.path),le(q=>{var ue=H(),he=`inline-block w-6 text-center text-sm font-bold ${AA[_t.status]??""}`;return ue!==q.e&&(Ut.disabled=q.e=ue),he!==q.t&&ut(on,q.t=he),q},{e:void 0,t:void 0}),le(()=>Ut.checked=l().has(_t.path)),Yt})()}),null),Me}}),null),w(K,m(W,{get when(){return de(()=>u()==="manual")()&&s().length===0},get children(){var Me=yA();return w(Me,()=>S("review.noChanges")),Me}}),null),w(K,m(W,{get when(){return k()},get children(){var Me=vA();return w(Me,k),Me}}),null),w(K,m(W,{get when(){return E()},get children(){var Me=xA(),Ke=Me.firstChild,ht=Ke.nextSibling;return w(Me,()=>S("review.dispatched"),Ke),w(Me,(()=>{var _t=de(()=>E().kind==="review");return()=>_t()?S("review.reviewChanges"):S(SA[E().kind])})(),Ke),w(ht,()=>E().runId.slice(0,8)),Me}}),null),w(ke,m(W,{get when(){return P()},get children(){var Me=wA();return w(Me,m(W,{get when(){return i.loading},get fallback(){return(()=>{var Ke=CA();return le(()=>Ke.innerHTML=z()),Ke})()},get children(){var Ke=hf();return w(Ke,()=>S("common.loading")),Ke}})),Me}}),null),le(Me=>{var Ke=`flex min-h-0 min-w-0 flex-col gap-3 ${P()?"flex-[4]":"flex-1"}`,ht=H(),_t=H();return Ke!==Me.e&&ut(K,Me.e=Ke),ht!==Me.t&&(Qe.disabled=Me.t=ht),_t!==Me.a&&(kt.disabled=Me.a=_t),Me},{e:void 0,t:void 0,a:void 0}),le(()=>Qe.checked=u()==="manual"),le(()=>kt.checked=u()==="agent"),ke})()]}}),null),w(ne,m(pn,{get open(){return N()!==null},onOpenChange:ke=>{ke||I(!1)},get children(){return m(oo,{class:"max-w-sm",get children(){return[m(so,{get children(){return[m(io,{get children(){return S("review.discardTitle")}}),m(Xu,{get children(){return $()}})]}}),m(ao,{get children(){return[m(Pe,{variant:"outline",onClick:()=>I(!1),get children(){return S("common.cancel")}}),m(Pe,{variant:"destructive",onClick:()=>I(!0),get children(){return S("review.confirmDiscardAction")}})]}})]}})}}),null),ne})()};function DA(e){if(!e)return"";const t=e.split(/\r?\n/);for(let n=0;n<t.length;n++){const r=/^##\s+(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s*$/.exec(t[n]??"");if(r)return r[1]??""}return""}var OA=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),mf=B("<p class=text-muted-foreground>"),RA=B('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),NA=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),IA=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),MA=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const LA=()=>{const e=ss(),t=Xo();cs();const[n]=bn(()=>[t(),e.id],([i,s])=>Fe.getSpec(i,s)),[r]=bn(()=>[t(),e.id],([i,s])=>Fe.getDebug(i,s)),o=re(()=>{const i=XS(r()?.text??"");return i.trim()?Os(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=NA();return w(i,m(rs,{get fallback(){return(()=>{var s=mf();return w(s,()=>S("common.loading")),s})()},get children(){return[(()=>{var s=OA(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,m(ks,{get items(){return[{label:S("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:S("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||S("common.pendingAgent")),w(c,m(hs,{})),s})(),(()=>{var s=RA();return w(s,m(W,{get when(){return r.loading},get fallback(){return m(W,{get when(){return o()},get fallback(){return(()=>{var a=MA();return w(a,()=>S("specDebug.empty")),a})()},get children(){var a=IA();return le(()=>a.innerHTML=o()),a}})},get children(){var a=mf();return w(a,()=>S("common.loading")),a}})),s})()]}})),i})()};var $A=B('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add <path>');const Jp=()=>(()=>{var e=$A(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>S("welcome.title")),w(r,()=>S("welcome.description")),w(o,()=>S("welcome.addHint"),i),e})();var PA=B('<p class="p-8 text-muted-foreground">');const FA=()=>{const[e]=bn(()=>Fe.listProjects());return m(W,{get when(){return!e.loading},get fallback(){return(()=>{var t=PA();return w(t,()=>S("common.loading")),t})()},get children(){return m(W,{get when(){return(e()??[]).length>0},get fallback(){return m(Jp,{})},get children(){return(()=>{const n=(e()??[])[0];return n?m(Zm,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var bf=B('<label class="flex flex-col gap-1 font-medium"><span>'),BA=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),zA=B('<p class=" text-muted-foreground">'),UA=B('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=project-config-agent><span>'),KA=B('<p class=" text-destructive">');const Eo=".yorz/specs",HA=e=>{const[t,n]=L("inherit"),[r,o]=L(""),[i,s]=L(""),[a,u]=L(Eo),[c,l]=L(Eo),[d,f]=L(!1),[p,g]=L(!1),[b,h]=L(null);oe(()=>{e.open&&(h(null),f(!0),(async()=>{try{const E=await Fe.getProjectConfig(e.projectId);y(E)}catch(E){h(E.message)}finally{f(!1)}})())});function y(E){n(E.agent.kind),E.agent.kind==="custom"?(o(E.agent.cmd),s(E.agent.args.join(" "))):(o(""),s(""));const T=E.specsDir||Eo;u(T),l(T)}function v(E){return E.split(/\s+/).map(T=>T.trim()).filter(Boolean)}function x(){const E=t();if(E==="inherit")return{kind:"inherit"};if(E==="claude")return{kind:"claude"};if(E==="opencode")return{kind:"opencode"};if(E==="codex")return{kind:"codex"};const T=r().trim();return T?{kind:"custom",cmd:T,args:v(i())}:{error:S("projectConfig.cmdRequired")}}function k(E){return S(E==="inherit"?"projectConfig.inheritGlobal":E==="custom"?"projectConfig.custom":E==="codex"?"projectConfig.agentCodex":E==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function C(E){E.preventDefault(),h(null);const T=x();if("error"in T){h(T.error);return}const _=a().trim()||Eo;if(_.split(/[\\/]/).some(R=>R==="..")){h(S("projectConfig.invalidPath"));return}g(!0);try{await Fe.updateProjectConfig(e.projectId,{agent:T,specsDir:_});let R=S("projectConfig.saved");_!==c()&&(R+=S("projectConfig.oldSpecsHint")),e.onSaved?.(R),e.onClose()}catch(R){h(R.message)}finally{g(!1)}}return m(pn,{get open(){return e.open},onOpenChange:E=>!E&&e.onClose(),get children(){return m(oo,{class:"max-w-[480px]",get children(){return[m(so,{get children(){return m(io,{get children(){return[de(()=>S("projectConfig.title"))," · ",de(()=>e.projectName)]}})}}),m(W,{get when(){return!d()},get fallback(){return(()=>{var E=zA();return w(E,()=>S("common.loading")),E})()},get children(){var E=BA(),T=E.firstChild,_=T.firstChild,R=T.nextSibling,$=R.firstChild,O=$.nextSibling;return E.addEventListener("submit",C),w(_,()=>S("projectConfig.agent")),w(T,()=>["inherit","claude","opencode","codex","custom"].map(N=>(()=>{var M=UA(),A=M.firstChild,I=A.nextSibling;return A.addEventListener("change",()=>n(N)),A.value=N,w(I,()=>k(N)),le(()=>A.disabled=p()),le(()=>A.checked=t()===N),M})()),null),w(E,m(W,{get when(){return t()==="custom"},get children(){return[(()=>{var N=bf(),M=N.firstChild;return w(M,()=>S("projectConfig.cmd")),w(N,m(No,{type:"text",get value(){return r()},onInput:A=>o(A.currentTarget.value),get placeholder(){return S("projectConfig.cmdPlaceholder")},get disabled(){return p()}}),null),N})(),(()=>{var N=bf(),M=N.firstChild;return w(M,()=>S("projectConfig.args")),w(N,m(No,{type:"text",get value(){return i()},onInput:A=>s(A.currentTarget.value),placeholder:"--flag value",get disabled(){return p()}}),null),N})()]}}),R),w($,()=>S("projectConfig.specsDir")),w(R,m(No,{type:"text",get value(){return a()},onInput:N=>u(N.currentTarget.value),placeholder:Eo,get disabled(){return p()}}),O),w(O,()=>S("projectConfig.specsDirHint")),w(E,(()=>{var N=de(()=>!!b());return()=>N()&&(()=>{var M=KA();return w(M,b),M})()})(),null),w(E,m(ao,{get children(){return[m(Pe,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return p()},get children(){return S("common.cancel")}}),m(Pe,{type:"submit",get disabled(){return p()},get children(){return de(()=>!!p())()?S("common.saving"):S("projectConfig.save")}})]}}),null),E}})]}})}})};var qA=B('<span class=" font-semibold tracking-wide">'),jA=B('<div class="flex items-center gap-1">'),GA=B('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),VA=B('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),WA=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),YA=B("<aside><header></header><footer>"),ZA=B('<p class="px-2.5 py-2 text-muted-foreground">'),XA=B('<span class="block truncate">'),QA=B('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),JA=B('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),e6=B('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),t6=B('<li class="group relative flex items-center">'),n6=B('<span class="inline-block font-semibold">'),r6=B('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),o6=B('<p class="mt-1 text-sm text-destructive break-words">'),i6=B('<p class="break-all font-semibold">');const eh="yorz.projectsSidebar.collapsed",th="yorz.projectsSidebar.width",lc=220,s6=.2,a6=160,u6=640;function c6(){try{return typeof window<"u"&&window.localStorage.getItem(eh)==="1"}catch{return!1}}function l6(e){try{typeof window<"u"&&window.localStorage.setItem(eh,e?"1":"0")}catch{}}function Rs(e){return Number.isFinite(e)?Math.min(u6,Math.max(a6,Math.round(e))):lc}function Ya(){return typeof window>"u"?lc:Rs(window.innerWidth*s6)}function d6(){try{if(typeof window>"u")return lc;const e=window.localStorage.getItem(th);if(!e)return Ya();const t=Number(e);return Number.isFinite(t)?Rs(t):Ya()}catch{return Ya()}}function f6(e){try{typeof window<"u"&&window.localStorage.setItem(th,String(Rs(e)))}catch{}}function yf(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 g6=()=>{const[e,t]=L(c6()),[n,r]=L(d6()),[o,{refetch:i}]=bn(()=>Fe.listProjects()),[s,a]=L(null),[u,c]=L(null),[l,d]=L(null),[f,p]=L(!1),[g,b]=L(!1),h=os(),y=is(),v=re(()=>{const I=y.pathname.match(/^\/([^/]+)/);return I&&I[1]!=="api"?I[1]:""}),x=()=>e()||cr();function k(){if(cr()){zi();return}const I=!e();t(I),l6(I)}let C=null,E=null,T=null;Vt(()=>{const I=c0(()=>{i()});ae(I)});function _(I){x()||(I.preventDefault(),C={startX:I.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),E=F=>{if(!C)return;const G=F.clientX-C.startX,U=Rs(C.startW+G);C.raf==null&&(C.raf=requestAnimationFrame(()=>{C&&(C.raf=null,r(U))}))},T=()=>{C?.raf!=null&&cancelAnimationFrame(C.raf),C=null,document.body.classList.remove("is-resizing"),E&&document.removeEventListener("mousemove",E),T&&document.removeEventListener("mouseup",T),E=null,T=null,f6(n())},document.addEventListener("mousemove",E),document.addEventListener("mouseup",T))}ae(()=>{E&&document.removeEventListener("mousemove",E),T&&document.removeEventListener("mouseup",T),document.body.classList.remove("is-resizing")});function R(I,F){F.preventDefault(),F.stopPropagation(),c(I)}function $(I,F="success"){F==="error"?hn.error(I):hn.success(I)}function O(I,F){F.preventDefault(),F.stopPropagation(),p(!1),d(I)}async function N(){const I=l();if(I){b(!0);try{f()&&I.worktree?await Fe.removeProjectWithFiles(I.id):await Fe.removeProject(I.id),await i(),v()===I.id&&h("/"),d(null)}catch(F){const G=F.message;G.includes("409")?(hn.error(S("sidebar.uncommittedChanges")),d(null)):(a(G),hn.error(G))}finally{b(!1)}}}function M(){i()}const A=()=>x()?void 0:{width:`${n()}px`};return(()=>{var I=YA(),F=I.firstChild,G=F.nextSibling;return w(F,m(W,{get when(){return!x()},get fallback(){return m(Pe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return S("sidebar.expand")},get children(){return m(o0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var U=qA();return w(U,()=>S("sidebar.title")),U})(),(()=>{var U=jA();return w(U,m(Pe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:M,get disabled(){return o.loading},get title(){return S("sidebar.refreshList")},get children(){return m(q1,{get class(){return`h-3.5 w-3.5 ${o.loading?"animate-spin":""}`}})}}),null),w(U,m(Pe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return S("sidebar.collapse")},get children(){return m(r0,{class:"h-4 w-4"})}}),null),U})()]}})),w(I,m(W,{get when(){return o()!==void 0},get fallback(){return(()=>{var U=ZA();return w(U,()=>S("common.loading")),U})()},get children(){var U=GA();return w(U,m(vt,{get each(){return o()??[]},children:z=>{const P=()=>v()===z.id;return(()=>{var Z=t6();return w(Z,m(fr,{get href(){return`/${encodeURIComponent(z.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${P()?"bg-accent text-accent-foreground font-semibold":"hover:bg-muted"} ${x()?"px-0 text-center":""}`},get title(){return z.path},get children(){return m(W,{get when(){return!x()},get fallback(){return(()=>{var V=n6();return w(V,()=>(z.name[0]??"?").toUpperCase()),V})()},get children(){return[(()=>{var V=XA();return w(V,()=>yf(z)),V})(),m(W,{get when(){return z.worktree},get children(){var V=QA();return w(V,m(m1,{class:"h-3 w-3"}),null),w(V,()=>S("sidebar.worktreeBadge"),null),le(()=>xe(V,"title",`worktree of ${z.worktree.mainPath}`)),V}})]}})}}),null),w(Z,m(W,{get when(){return!x()},get children(){return[(()=>{var V=JA();return V.$$click=te=>R(z,te),w(V,m(B1,{class:"h-3.5 w-3.5"})),le(te=>{var Y=S("sidebar.configure",{name:z.name}),H=S("sidebar.projectConfig");return Y!==te.e&&xe(V,"aria-label",te.e=Y),H!==te.t&&xe(V,"title",te.t=H),te},{e:void 0,t:void 0}),V})(),(()=>{var V=e6();return V.$$click=te=>void O(z,te),w(V,m(Zo,{class:"h-3.5 w-3.5"})),le(te=>{var Y=S("sidebar.removeProject",{name:z.name}),H=S("sidebar.deleteProject");return Y!==te.e&&xe(V,"aria-label",te.e=Y),H!==te.t&&xe(V,"title",te.t=H),te},{e:void 0,t:void 0}),V})()]}}),null),Z})()}})),U}}),G),w(G,m(W,{get when(){return!x()},get fallback(){return(()=>{var U=r6();return w(U,m(a1,{class:"h-3.5 w-3.5"})),le(()=>xe(U,"title",`${S("sidebar.addHint")}${S("sidebar.addCmd")}`)),U})()},get children(){var U=VA(),z=U.firstChild;return w(U,()=>S("sidebar.addHint"),z),w(z,()=>S("sidebar.addCmd")),U}}),null),w(G,(()=>{var U=de(()=>!!s());return()=>U()&&(()=>{var z=o6();return w(z,s),le(()=>xe(z,"title",s())),z})()})(),null),w(I,m(W,{get when(){return!x()},get children(){var U=WA();return U.$$mousedown=_,le(()=>xe(U,"aria-label",S("sidebar.resizeHint"))),U}}),null),w(I,m(W,{get when(){return u()},children:U=>m(HA,{open:!0,get projectId(){return U().id},get projectName(){return U().name},onClose:()=>c(null),onSaved:z=>$(z)})}),null),w(I,m(pn,{get open(){return l()!==null},onOpenChange:U=>!U&&!g()&&d(null),get children(){return m(oo,{class:"max-w-sm",get children(){return[m(so,{get children(){return[m(io,{get children(){return S("sidebar.deleteProject")}}),m(Xu,{get children(){return S("sidebar.deleteDesc")}})]}}),m(W,{get when(){return l()},children:U=>[(()=>{var z=i6();return w(z,()=>yf(U())),z})(),m(W,{get when(){return U().worktree},get children(){return m(Wi,{get checked(){return f()},onChange:z=>p(z),class:"flex items-center gap-2 text-destructive",get children(){return[m(Yi,{}),m(Vi,{get children(){return S("sidebar.deleteFiles")}})]}})}})]}),m(ao,{get children(){return[m(Pe,{variant:"outline",onClick:()=>d(null),get disabled(){return g()},get children(){return S("common.cancel")}}),m(Pe,{variant:"destructive",onClick:()=>void N(),get disabled(){return g()},get children(){return de(()=>!!g())()?S("common.deleting"):S("common.confirmDelete")}})]}})]}})}}),null),le(U=>{var z=`relative flex flex-col border-r bg-card shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,P=A(),Z=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,V=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return z!==U.e&&ut(I,U.e=z),U.t=ur(I,P,U.t),Z!==U.a&&ut(F,U.a=Z),V!==U.o&&ut(G,U.o=V),U},{e:void 0,t:void 0,a:void 0,o:void 0}),I})()};ln(["mousedown","click"]);var p6=["second","minute","hour","day","week","month","year"];function h6(e,t){if(t===0)return["just now","right now"];var n=p6[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var m6=["秒","分钟","小时","天","周","个月","年"];function b6(e,t){if(t===0)return["刚刚","片刻后"];var n=m6[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var ku={},Ns=function(e,t){ku[e]=t},y6=function(e){return ku[e]||ku.en_US},Za=[60,60,24,7,365/7/12,12];function v6(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 x6(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Za[o]&&o<Za.length;o++)e/=Za[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 w6(e,t){var n=new Date;return(+n-+v6(e))/1e3}var _6=function(e,t,n){var r=w6(e);return x6(r,y6(t))};Ns("en_US",h6);Ns("zh_CN",b6);var Si={},vf;function E6(){if(vf)return Si;vf=1,Object.defineProperty(Si,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Si.default=t,Si}var k6=E6();const C6=cc(k6),xf=[["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 S6(e,t){return xf[t]??xf[0]}const A6=`
|
|
664
664
|
|
|
665
|
-
`;function _6(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function E6(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=_6(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:w6+i.text}:i),r=!0}else t.push(i)}}return t}function k6(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function S6(e){const t=[];let n=null;const r=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const o of e){if(o.kind==="context"){n=null;const a=t[t.length-1];a?.kind==="context"?a.contexts.push(o):t.push({kind:"context",contexts:[o]});continue}if(o.kind==="text"&&o.role==="user"){n=null;const a=t[t.length-1];a?.kind==="user"?a.text+=o.text:t.push({kind:"user",text:o.text});continue}const i=r(),s=i.segments[i.segments.length-1];if(o.kind==="text"){s?.kind==="text"?s.text+=o.text:i.segments.push({kind:"text",text:o.text});continue}s?.kind==="tools"?o.result!==void 0&&o.name===void 0?k6(s.tools,o.result):s.tools.push({...o}):i.segments.push({kind:"tools",tools:[{...o}]})}return t.filter(o=>o.kind!=="assistant"||o.segments.length>0)}var C6=B("<div>");const A6=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=C6();return Wn(r,Q({get class(){return Tt("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()};var T6={};vr(T6,{Collapsible:()=>Ds,Content:()=>rh,Root:()=>oh,Trigger:()=>ih,useCollapsibleContext:()=>uc});var nh=mt();function uc(){const e=lt(nh);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function rh(e){const[t,n]=$(),r=uc(),o=$e({id:r.generateId("content")},e),[i,s]=we(o,["ref","id","style"]),{present:a}=Lr({show:r.shouldMount,element:()=>t()??null}),[u,c]=$(0),[l,d]=$(0);let p=r.isOpen()||a();return Vt(()=>{const g=requestAnimationFrame(()=>{p=!1});ae(()=>{cancelAnimationFrame(g)})}),oe(At(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const g=t().getBoundingClientRect();c(g.height),d(g.width),p||(t().style.transitionDuration="",t().style.animationName="")})),oe(At(r.isOpen,g=>{!g&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>ae(r.registerContentId(i.id))),m(Y,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(g){var b=ft(n,i.ref);typeof b=="function"&&b(g)},get id(){return i.id},get style(){return yr({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function oh(e){const t=`collapsible-${qt()}`,n=$e({id:t},e),[r,o]=we(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=$(),a=ei({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=re(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:Yn(()=>o.id),registerContentId:Lt(s)};return m(nh.Provider,{value:c,get children(){return m(Ze,Q({as:"div"},u,o))}})}function ih(e){const t=uc(),[n,r]=we(e,["onClick"]);return m(uo,Q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{He(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Ds=Object.assign(oh,{Content:rh,Trigger:ih});const cc=Ds;Ds.Trigger;const lc=e=>{const[t,n]=we(e,["class"]);return m(Ds.Content,Q({get class(){return Tt("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var D6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),O6=B('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),R6=B('<div class="font-mono text-xs font-semibold">'),N6=B('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),I6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),M6=B("<div class=space-y-1>");const L6=e=>{const[t,n]=$(!1);return m(cc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=D6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Tu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>D("chat.toolCollapsed",{count:e.tools.length})),r})(),m(lc,{get children(){var r=O6();return w(r,m(yt,{get each(){return e.tools},children:o=>(()=>{var i=M6();return w(i,m(Y,{get when(){return o.name},get children(){var s=R6();return w(s,()=>o.name),s}}),null),w(i,m(Y,{get when(){return o.input!==void 0},get children(){var s=N6();return w(s,()=>$6(o.input)),s}}),null),w(i,m(Y,{get when(){return o.result!==void 0},get children(){var s=I6();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function $6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}ln(["click"]);var P6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),F6=B('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),B6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const z6=e=>{const[t,n]=$(!1);return m(cc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=P6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Tu,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>D("chat.agentContextCollapsed",{count:e.contexts.length})),le(()=>xe(r,"title",D("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),m(lc,{get children(){var r=F6();return w(r,m(yt,{get each(){return e.contexts},children:o=>(()=>{var i=B6();return w(i,()=>o.text),i})()})),r}})]}})};ln(["click"]);var U6={};vr(U6,{Description:()=>Zu,ErrorMessage:()=>Xu,Item:()=>uh,ItemControl:()=>ch,ItemDescription:()=>lh,ItemIndicator:()=>dh,ItemInput:()=>fh,ItemLabel:()=>gh,Label:()=>ph,RadioGroup:()=>yn,Root:()=>hh,useRadioGroupContext:()=>dc});var sh=mt();function dc(){const e=lt(sh);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var ah=mt();function oi(){const e=lt(ah);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function uh(e){const t=Qn(),n=dc(),r=`${t.generateId("item")}-${qt()}`,o=$e({id:r},e),[i,s]=we(o,["value","disabled","onPointerDown"]),[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(),[b,h]=$(!1),y=re(()=>n.isDefaultValue(i.value)),v=re(()=>n.isSelectedValue(i.value)),x=re(()=>i.disabled||t.isDisabled()||!1),k=O=>{He(O,i.onPointerDown),b()&&O.preventDefault()},E=re(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":v()?"":void 0})),S={value:()=>i.value,dataset:E,isDefault:y,isSelected:v,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:p,select:()=>n.setSelectedValue(i.value),generateId:Yn(()=>s.id),registerInput:Lt(u),registerLabel:Lt(l),registerDescription:Lt(f),setIsFocused:h,setInputRef:g};return m(ah.Provider,{value:S,get children(){return m(Ze,Q({as:"div",role:"group",onPointerDown:k},E,s))}})}function ch(e){const t=oi(),n=$e({id:t.generateId("control")},e),[r,o]=we(n,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:a=>{He(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{He(a,r.onKeyDown),a.key===us.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function lh(e){const t=oi(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}function dh(e){const t=oi(),n=$e({id:t.generateId("indicator")},e),[r,o]=we(n,["ref","forceMount"]),[i,s]=$(),{present:a}=Lr({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return m(Y,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(u){var c=ft(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function fh(e){const t=Qn(),n=dc(),r=oi(),o=$e({id:r.generateId("input")},e),[i,s]=we(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=$(!1),d=g=>{if(He(g,i.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const b=g.target;b.checked=r.isSelected()}l(!1)},f=g=>{He(g,i.onFocus),r.setIsFocused(!0)},p=g=>{He(g,i.onBlur),r.setIsFocused(!1)};return oe(At([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;l(!0);const b=r.inputRef();b?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),b?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(()=>ae(r.registerInput(s.id))),m(Ze,Q({as:"input",ref(g){var b=ft(r.setInputRef,i.ref);typeof b=="function"&&b(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return yr({...Lu},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:f,onBlur:p},()=>r.dataset(),s))}function gh(e){const t=oi(),n=$e({id:t.generateId("label")},e);return oe(()=>ae(t.registerLabel(n.id))),m(Ze,Q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function ph(e){return m(cp,Q({as:"span"},e))}function hh(e){let t;const n=`radiogroup-${qt()}`,r=$e({id:n,orientation:"vertical"},e),[o,i,s]=we(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ap),[a,u]=Jo({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:h=>o.onChange?.(h)}),{formControlContext:c}=up(i);lp(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(X(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),f=h=>h===e.defaultValue,p=h=>h===a(),b={ariaDescribedBy:d,isDefaultValue:f,isSelectedValue:p,setSelectedValue:h=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(h),t))for(const y of t.querySelectorAll("[type='radio']")){const v=y;v.checked=p(v.value)}}};return m(Yu.Provider,{value:c,get children(){return m(sh.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=ft(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"radiogroup",get id(){return X(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var yn=Object.assign(hh,{Description:Zu,ErrorMessage:Xu,Item:uh,ItemControl:ch,ItemDescription:lh,ItemIndicator:dh,ItemInput:fh,ItemLabel:gh,Label:ph});yn.Description;yn.ErrorMessage;yn.ItemDescription;const K6=yn.ItemInput,H6=yn.ItemLabel;yn.Label;const q6=yn,j6=yn.Item,G6=e=>{const[t,n]=we(e,["class"]);return m(yn.ItemControl,Q({get class(){return Tt("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return m(yn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var V6=B('<span class="font-semibold tracking-wide">'),yf=B("<span>"),W6=B('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),Y6=B('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),Z6=B("<div class=mb-1.5>"),X6=B('<p class="mb-1 text-xs text-destructive">'),Q6=B('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-y-auto px-2.5 py-2"></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),J6=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),eT=B("<aside><header>"),tT=B('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),nT=B('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),rT=B('<p class="text-sm text-muted-foreground">'),oT=B('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 text-sm font-medium text-foreground">'),iT=B('<div class="mb-2 rounded bg-muted px-2 py-1.5 text-sm">'),sT=B('<div class="markdown chat-md">');const Va="yorz.layout.col2.collapsed",_u="yorz.layout.col2.width",vf="yorz.chat.sessionList.collapsed",mh="yorz.chat.sessionList.rows",aT="yorz.chat.sessionList.limit",uT="yorz.chat.sessionList.showHistory",bh=[3,5,10],cT=34,fc=340,lT=.4,yh=260,dT=960,fT=.8,gT=96,pT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,hT=1500,mT=80;function bT(e){return new Promise(t=>setTimeout(t,e))}Ts("en",x6);Ts("zh-CN",v6);function yT(){return typeof window>"u"?dT:Math.max(yh,Math.round(window.innerWidth*fT))}function Wi(e){return Number.isFinite(e)?Math.min(yT(),Math.max(yh,Math.round(e))):fc}function Wa(){return typeof window>"u"?fc:Wi(window.innerWidth*lT)}function xf(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function vT(){try{if(typeof window>"u")return fc;const e=window.localStorage.getItem(_u);if(!e)return Wa();const t=Number(e);return Number.isFinite(t)?Wi(t):Wa()}catch{return Wa()}}function To(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Wr(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Eu(e){return bh.includes(e)}function xT(){const e=Number(To(mh,""));if(Eu(e))return e;const t=Number(To(aT,""));return Eu(t)?t:To(uT,"0")==="1"?10:3}const wT=()=>{let e,t;const{lng:n}=L0(),r=Qg({projectId:()=>Ot()||""}),[o,i]=$(To(Va,"0")==="1"),[s,a]=$(vT()),[u,c]=$(To(vf,"0")!=="1"),[l,d]=$(xT()),[f,p]=$(""),[g,b]=$([]),h=re(()=>S6(g())),[y,v]=$(""),[x,k]=$(!0),[E,S]=$(Date.now()),[O,_]=$(!1),[I,L]=$({}),T=new Set,R=new Map;function M(q){let ue=R.get(q);if(!ue){let he=()=>{};ue={promise:new Promise(Ue=>{he=Ue}),resolve:he},R.set(q,ue)}return ue.promise}function C(q){M(q),R.get(q)?.resolve()}const[N,{refetch:F}]=hn(()=>Ot()||void 0,q=>Be.listSessions(q));oe(()=>{const q=N();q&&L(ue=>{const he={};for(const Ue of q)he[Ue.id]=!!Ue.running;const Je=f();return Je&&!(Je in he)&&ue[Je]===!0&&(he[Je]=!0),he})}),oe(At(Ot,()=>{p(""),L({}),pt(),_(!1),T.clear(),R.clear(),r.reset()})),oe(()=>{const q=Ot();if(!q)return;const ue=o0(q,{onStatus:he=>{L(Je=>({...Je,[he.sessionId]:he.running})),he.running||F()}});ae(ue)});const G=q=>I()[q]===!0,U=re(()=>{const q=f();return q?G(q):!1}),z=re(()=>(N()??[]).filter(q=>G(q.id)).length),P=re(()=>N()??[]);function Z(q){!q||q===f()||(p(q),F())}oe(()=>{const q=Q1();q&&(J1(),Z(q),o()&&(i(!1),Wr(Va,"0")))});const V=()=>o()||cr();function te(){if(cr()){Bi();return}const q=!o();i(q),Wr(Va,q?"1":"0")}function W(q){c(q),Wr(vf,q?"0":"1")}function H(q){const ue=Number(q);Eu(ue)&&(d(ue),Wr(mh,String(ue)))}function ie(q){return D(q===3?"chat.sessionListRows3":q===5?"chat.sessionListRows5":"chat.sessionListRows10")}function me(q){const ue=q.title.trim();return ue&&ue!==q.id&&!pT.test(ue)?ue:q.id}Vt(()=>{const q=()=>{const ue=Wi(s());ue!==s()&&(a(ue),Wr(_u,String(ue)))};window.addEventListener("resize",q),ae(()=>window.removeEventListener("resize",q))}),Vt(()=>{const q=window.setInterval(()=>S(Date.now()),6e4);ae(()=>window.clearInterval(q))});let J=null,pe=null,Se=null;function Ne(q){V()||(q.preventDefault(),J={startX:q.clientX,startW:s(),raf:null},document.body.classList.add("is-resizing"),pe=ue=>{if(!J)return;const he=Wi(J.startW+(ue.clientX-J.startX));J.raf==null&&(J.raf=requestAnimationFrame(()=>{J&&(J.raf=null,a(he))}))},Se=()=>{J?.raf!=null&&cancelAnimationFrame(J.raf),J=null,document.body.classList.remove("is-resizing"),pe&&document.removeEventListener("mousemove",pe),Se&&document.removeEventListener("mouseup",Se),pe=null,Se=null,Wr(_u,String(s()))},document.addEventListener("mousemove",pe),document.addEventListener("mouseup",Se))}ae(()=>{pe&&document.removeEventListener("mousemove",pe),Se&&document.removeEventListener("mouseup",Se),document.body.classList.remove("is-resizing")}),oe(()=>{const q=Ot(),ue=f();if(!q||!ue)return;let he=!1;k(!0),T.has(ue)||(pt(),Be.getSessionMessages(q,ue).then(Ue=>{he||pt(E6(Ue))}).catch(()=>{}));const Je=as(q,ue,{onReady:()=>C(ue),onEvent:Ue=>{Ue.type==="text"?Et(Ue.delta):Ue.type==="tool-use"?Ke({kind:"tool",name:Ue.name,input:Ue.input}):Ue.type==="tool-result"?Ke({kind:"tool",result:Ue.text}):Ue.type==="turn-completed"?(bt(),T.delete(ue),L(et=>({...et,[ue]:!1}))):Ue.type==="error"?(Me(`
|
|
666
|
-
${
|
|
667
|
-
`)
|
|
668
|
-
${
|
|
669
|
-
`)
|
|
670
|
-
${
|
|
671
|
-
`);return}
|
|
672
|
-
${
|
|
673
|
-
`),L(Kt=>({...Kt,[he]:!1}))}F()}finally{_(!1)}}async function on(){const q=Ot(),ue=f();!q||!ue||(await Be.abortSession(q,ue).catch(()=>{}),L(he=>({...he,[ue]:!1})))}function dn(q){q.defaultPrevented||q.isComposing||q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),Yt())}return(()=>{var q=eT(),ue=q.firstChild;return w(ue,m(Y,{get when(){return!V()},get fallback(){return m(Fe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:te,get title(){return D("chat.expand")},get children(){return m(t0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var he=V6();return w(he,()=>D("chat.title")),he})(),m(Fe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:te,get title(){return D("chat.collapse")},get children(){return m(e0,{class:"h-4 w-4"})}})]}})),w(q,m(Y,{get when(){return!V()},get children(){var he=Q6(),Je=he.firstChild,Ue=Je.nextSibling,et=Ue.firstChild,Kt=et.firstChild,Ve=et.nextSibling;w(he,m(Y,{get when(){return Ot()},get children(){return m(A6,{class:"m-2 rounded-lg shadow-none",get children(){return m(cc,{get open(){return u()},onOpenChange:W,get children(){return[(()=>{var nt=W6(),A=nt.firstChild,j=A.nextSibling;return A.$$click=()=>W(!u()),w(A,m(Y,{get when(){return z()>0},get fallback(){return(()=>{var ee=yf();return w(ee,()=>D("chat.sessionsLabelPlain")),ee})()},get children(){var ee=yf();return w(ee,()=>D("chat.sessionsLabel",{count:z()})),ee}})),w(nt,m(q6,{class:"flex shrink-0 items-center gap-2",get value(){return String(l())},onChange:H,get"aria-label"(){return D("chat.sessionListRows")},get children(){return m(yt,{each:bh,children:ee=>m(j6,{get value(){return String(ee)},class:"flex items-center gap-1",get children(){return[m(K6,{}),m(G6,{class:"h-3 w-3"}),m(H6,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return ie(ee)}})]}})})}}),j),j.$$click=()=>W(!u()),w(j,m(Tu,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${u()?"":"-rotate-90"}`}})),le(ee=>{var Ce=u()?D("chat.collapseSessions"):D("chat.expandSessions"),it=u()?D("chat.collapseSessions"):D("chat.expandSessions");return Ce!==ee.e&&xe(A,"title",ee.e=Ce),it!==ee.t&&xe(j,"title",ee.t=it),ee},{e:void 0,t:void 0}),nt})(),m(lc,{get children(){var nt=Y6();return w(nt,m(Y,{get when(){return P().length>0},get fallback(){return(()=>{var A=tT();return w(A,()=>D("chat.noRunningSessions")),A})()},get children(){return m(yt,{get each(){return P()},children:A=>(()=>{var j=nT(),ee=j.firstChild,Ce=ee.firstChild,it=Ce.firstChild,dt=it.nextSibling;dt.nextSibling;var Ee=Ce.nextSibling,be=Ee.nextSibling;return ee.$$click=()=>Z(A.id),w(ee,m(Y,{get when(){return G(A.id)},get children(){return m(sr,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Ce),w(Ce,()=>A.kind,dt),w(Ee,()=>me(A)),w(be,()=>ze(A.updatedAt)),le(Te=>{var xt=`flex w-full items-center gap-1 px-2.5 py-1.5 text-left text-sm ${f()===A.id?"bg-background font-semibold":"hover:bg-background"}`,ht=G(A.id)?D("chat.sessionTitleRunning",{kind:A.kind,id:A.id}):D("chat.sessionTitle",{kind:A.kind,id:A.id}),Jn=ne(A.updatedAt);return xt!==Te.e&&ut(ee,Te.e=xt),ht!==Te.t&&xe(ee,"title",Te.t=ht),Jn!==Te.a&&xe(be,"title",Te.a=Jn),Te},{e:void 0,t:void 0,a:void 0}),j})()})}})),le(A=>Ro(nt,"max-height",`${l()*cT}px`)),nt}})]}})}})}}),Je),Je.addEventListener("scroll",ce),Je.$$keydown=_e,Je.$$click=K;var sn=e;typeof sn=="function"?Gn(sn,Je):e=Je,w(Je,m(Y,{get when(){return h().length>0},get fallback(){return(()=>{var nt=rT();return w(nt,(()=>{var A=de(()=>!!f());return()=>A()?D("chat.empty"):D("chat.draftEmpty")})()),nt})()},get children(){return m(yt,{get each(){return h()},children:nt=>m(Y,{get when(){return nt.kind==="context"?nt:null},get fallback(){return m(Y,{get when(){return nt.kind==="assistant"?nt:null},get fallback(){return(()=>{var A=oT();return w(A,()=>nt.text),A})()},children:A=>(()=>{var j=iT();return w(j,m(yt,{get each(){return A().segments},children:ee=>m(Y,{get when(){return ee.kind==="tools"?ee:null},get fallback(){return(()=>{var Ce=sT();return le(()=>Ce.innerHTML=Cs(ee.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:D("chat.copyFilePath")})),Ce})()},children:Ce=>m(L6,{get tools(){return Ce().tools}})})})),j})()})},children:A=>m(z6,{get contexts(){return A().contexts}})})})}})),w(Ue,m(Y,{get when(){return r.count()>0},get children(){var nt=Z6();return w(nt,m(sp,{ctrl:r,compact:!0})),nt}}),et),w(Ue,m(Y,{get when(){return r.error()},get children(){var nt=X6();return w(nt,()=>r.error()),nt}}),et),w(et,m(Jg,{get projectId(){return Ot()||""},get value(){return y()},onValueChange:v,onKeyDown:dn,get onPaste(){return r.onPaste},get placeholder(){return de(()=>!Ot())()?D("chat.noSessionPlaceholder"):de(()=>!!f())()?D("chat.inputPlaceholder"):D("chat.draftPlaceholder")},get disabled(){return!Ot()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1 text-sm"}),Kt),w(et,m(Fe,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!Ot()||r.count()>=to},get title(){return D("newSpec.importAttachment")},get children(){return m(I1,{class:"h-4 w-4"})}}),Kt),Ni(Kt,"change",r.onFileInputChange);var fn=t;return typeof fn=="function"?Gn(fn,Kt):t=Kt,xe(Kt,"accept",Xg),w(Ve,m(Fe,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:_t,get disabled(){return!Ot()||!f()},get title(){return D("chat.newSession")},get children(){return m(Du,{class:"h-4 w-4"})}}),null),w(Ve,m(Y,{get when(){return U()},get fallback(){return m(Fe,{size:"sm",onClick:()=>void Yt(),get disabled(){return!Ot()||!y().trim()||O()||r.hasPending()},get children(){return[m(os,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("chat.send"))]}})},get children(){return m(Fe,{variant:"outline",size:"sm",onClick:()=>void on(),get title(){return D("chat.abort")},get children(){return[m(G1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>D("chat.abort"))]}})}}),null),he}}),null),w(q,m(Y,{get when(){return!V()},get children(){var he=J6();return he.$$mousedown=Ne,he}}),null),le(he=>{var Je=`relative flex flex-col border-r bg-card shrink-0 ${V()?"w-9 transition-[width] duration-150":""}`,Ue=V()?void 0:{width:`${s()}px`},et=`flex items-center border-b ${V()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Je!==he.e&&ut(q,he.e=Je),he.t=ur(q,Ue,he.t),et!==he.a&&ut(ue,he.a=et),he},{e:void 0,t:void 0,a:void 0}),q})()};ln(["click","keydown","mousedown"]);var _T=B('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const ET=e=>{const t=ts(),{lng:n,changeLanguage:r}=L0(),o=re(()=>t.pathname===en("specs/new"));function i(s){s!==n()&&(r(s),window.location.reload())}return oe(()=>{const s=t.pathname.match(/^\/([^/]+)/);ey(s&&s[1]!=="api"?s[1]:"")}),(()=>{var s=_T(),a=s.firstChild,u=a.firstChild,c=a.nextSibling,l=c.firstChild;return w(a,m(fr,{href:"/",class:"text-lg font-bold",children:"YorZ"}),u),w(u,m(Y,{get when(){return Ot()},get children(){return m(Fe,{as:fr,get href(){return en("specs/new")},get target(){return o()?"_blank":void 0},get rel(){return o()?"noopener":void 0},variant:"default",size:"sm",get children(){return[m(Du,{class:"mr-1 h-4 w-4"}),de(()=>D("shell.newSpec"))]}})}}),null),w(u,m(Fg,{placement:"bottom-end",get children(){return[m(Pg,{as:Fe,variant:"ghost",size:"icon",get title(){return D("shell.languageSwitch")},get children(){return m(_1,{class:"h-4 w-4"})}}),m(Bg,{get children(){return[m(pu,{onSelect:()=>i("zh-CN"),get children(){return[m(Yc,{get class(){return`mr-2 h-4 w-4 ${n()==="zh-CN"?"opacity-100":"opacity-0"}`}}),de(()=>D("shell.langZh"))]}}),m(pu,{onSelect:()=>i("en"),get children(){return[m(Yc,{get class(){return`mr-2 h-4 w-4 ${n()==="en"?"opacity-100":"opacity-0"}`}}),de(()=>D("shell.langEn"))]}})]}})]}}),null),w(c,m(a6,{}),l),w(c,m(wT,{}),l),w(l,()=>e.children),w(s,m($_,{position:"top-center"}),null),s})()},vh=document.getElementById("app");if(!vh)throw new Error("missing #app root");cm(()=>m(Wm,{root:ET,get children(){return[m(Er,{path:"/",component:RA}),m(Er,{path:"/:projectId",component:e2}),m(Er,{path:"/:projectId/specs/new",component:V2}),m(Er,{path:"/:projectId/specs/:id",component:sA}),m(Er,{path:"/:projectId/specs/:id/review",component:wA}),m(Er,{path:"/:projectId/specs/:id/debug",component:TA}),m(Er,{path:"*",component:Jp})]}}),vh);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{VC as _,sc as g};
|
|
665
|
+
`;function T6(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 D6(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=T6(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:A6+i.text}:i),r=!0}else t.push(i)}}return t}function O6(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 R6(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?O6(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 N6=B("<div>");const I6=e=>{const[t,n]=we(e,["class"]);return(()=>{var r=N6();return Wn(r,Q({get class(){return Et("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()};var M6={};vr(M6,{Collapsible:()=>Is,Content:()=>rh,Root:()=>oh,Trigger:()=>ih,useCollapsibleContext:()=>dc});var nh=bt();function dc(){const e=lt(nh);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function rh(e){const[t,n]=L(),r=dc(),o=$e({id:r.generateId("content")},e),[i,s]=we(o,["ref","id","style"]),{present:a}=Lr({show:r.shouldMount,element:()=>t()??null}),[u,c]=L(0),[l,d]=L(0);let p=r.isOpen()||a();return Vt(()=>{const g=requestAnimationFrame(()=>{p=!1});ae(()=>{cancelAnimationFrame(g)})}),oe(Tt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const g=t().getBoundingClientRect();c(g.height),d(g.width),p||(t().style.transitionDuration="",t().style.animationName="")})),oe(Tt(r.isOpen,g=>{!g&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>ae(r.registerContentId(i.id))),m(W,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(g){var b=gt(n,i.ref);typeof b=="function"&&b(g)},get id(){return i.id},get style(){return yr({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function oh(e){const t=`collapsible-${qt()}`,n=$e({id:t},e),[r,o]=we(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=L(),a=ti({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=re(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:Yn(()=>o.id),registerContentId:Lt(s)};return m(nh.Provider,{value:c,get children(){return m(Ze,Q({as:"div"},u,o))}})}function ih(e){const t=dc(),[n,r]=we(e,["onClick"]);return m(go,Q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return de(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{He(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Is=Object.assign(oh,{Content:rh,Trigger:ih});const fc=Is;Is.Trigger;const gc=e=>{const[t,n]=we(e,["class"]);return m(Is.Content,Q({get class(){return Et("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var L6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),$6=B('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),P6=B('<div class="font-mono text-xs font-semibold">'),F6=B('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),B6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),z6=B("<div class=space-y-1>");const U6=e=>{const[t,n]=L(!1);return m(fc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=L6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Ru,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>S("chat.toolCollapsed",{count:e.tools.length})),r})(),m(gc,{get children(){var r=$6();return w(r,m(vt,{get each(){return e.tools},children:o=>(()=>{var i=z6();return w(i,m(W,{get when(){return o.name},get children(){var s=P6();return w(s,()=>o.name),s}}),null),w(i,m(W,{get when(){return o.input!==void 0},get children(){var s=F6();return w(s,()=>K6(o.input)),s}}),null),w(i,m(W,{get when(){return o.result!==void 0},get children(){var s=B6();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function K6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}ln(["click"]);var H6=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),q6=B('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),j6=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const G6=e=>{const[t,n]=L(!1);return m(fc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=H6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(Ru,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>S("chat.agentContextCollapsed",{count:e.contexts.length})),le(()=>xe(r,"title",S("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),m(gc,{get children(){var r=q6();return w(r,m(vt,{get each(){return e.contexts},children:o=>(()=>{var i=j6();return w(i,()=>o.text),i})()})),r}})]}})};ln(["click"]);var V6={};vr(V6,{Description:()=>Ju,ErrorMessage:()=>ec,Item:()=>uh,ItemControl:()=>ch,ItemDescription:()=>lh,ItemIndicator:()=>dh,ItemInput:()=>fh,ItemLabel:()=>gh,Label:()=>ph,RadioGroup:()=>xn,Root:()=>hh,useRadioGroupContext:()=>pc});var sh=bt();function pc(){const e=lt(sh);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var ah=bt();function ii(){const e=lt(ah);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function uh(e){const t=Qn(),n=pc(),r=`${t.generateId("item")}-${qt()}`,o=$e({id:r},e),[i,s]=we(o,["value","disabled","onPointerDown"]),[a,u]=L(),[c,l]=L(),[d,f]=L(),[p,g]=L(),[b,h]=L(!1),y=re(()=>n.isDefaultValue(i.value)),v=re(()=>n.isSelectedValue(i.value)),x=re(()=>i.disabled||t.isDisabled()||!1),k=T=>{He(T,i.onPointerDown),b()&&T.preventDefault()},C=re(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":v()?"":void 0})),E={value:()=>i.value,dataset:C,isDefault:y,isSelected:v,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:p,select:()=>n.setSelectedValue(i.value),generateId:Yn(()=>s.id),registerInput:Lt(u),registerLabel:Lt(l),registerDescription:Lt(f),setIsFocused:h,setInputRef:g};return m(ah.Provider,{value:E,get children(){return m(Ze,Q({as:"div",role:"group",onPointerDown:k},C,s))}})}function ch(e){const t=ii(),n=$e({id:t.generateId("control")},e),[r,o]=we(n,["onClick","onKeyDown"]);return m(Ze,Q({as:"div",onClick:a=>{He(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{He(a,r.onKeyDown),a.key===fs.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function lh(e){const t=ii(),n=$e({id:t.generateId("description")},e);return oe(()=>ae(t.registerDescription(n.id))),m(Ze,Q({as:"div"},()=>t.dataset(),n))}function dh(e){const t=ii(),n=$e({id:t.generateId("indicator")},e),[r,o]=we(n,["ref","forceMount"]),[i,s]=L(),{present:a}=Lr({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return m(W,{get when(){return a()},get children(){return m(Ze,Q({as:"div",ref(u){var c=gt(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function fh(e){const t=Qn(),n=pc(),r=ii(),o=$e({id:r.generateId("input")},e),[i,s]=we(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]=L(!1),d=g=>{if(He(g,i.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const b=g.target;b.checked=r.isSelected()}l(!1)},f=g=>{He(g,i.onFocus),r.setIsFocused(!0)},p=g=>{He(g,i.onBlur),r.setIsFocused(!1)};return oe(Tt([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;l(!0);const b=r.inputRef();b?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),b?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),oe(()=>ae(r.registerInput(s.id))),m(Ze,Q({as:"input",ref(g){var b=gt(r.setInputRef,i.ref);typeof b=="function"&&b(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return yr({...Fu},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:f,onBlur:p},()=>r.dataset(),s))}function gh(e){const t=ii(),n=$e({id:t.generateId("label")},e);return oe(()=>ae(t.registerLabel(n.id))),m(Ze,Q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function ph(e){return m(fp,Q({as:"span"},e))}function hh(e){let t;const n=`radiogroup-${qt()}`,r=$e({id:n,orientation:"vertical"},e),[o,i,s]=we(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],lp),[a,u]=ei({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:h=>o.onChange?.(h)}),{formControlContext:c}=dp(i);gp(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(X(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),f=h=>h===e.defaultValue,p=h=>h===a(),b={ariaDescribedBy:d,isDefaultValue:f,isSelectedValue:p,setSelectedValue:h=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(h),t))for(const y of t.querySelectorAll("[type='radio']")){const v=y;v.checked=p(v.value)}}};return m(Qu.Provider,{value:c,get children(){return m(sh.Provider,{value:b,get children(){return m(Ze,Q({as:"div",ref(h){var y=gt(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"radiogroup",get id(){return X(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 xn=Object.assign(hh,{Description:Ju,ErrorMessage:ec,Item:uh,ItemControl:ch,ItemDescription:lh,ItemIndicator:dh,ItemInput:fh,ItemLabel:gh,Label:ph});xn.Description;xn.ErrorMessage;xn.ItemDescription;const W6=xn.ItemInput,Y6=xn.ItemLabel;xn.Label;const Z6=xn,X6=xn.Item,Q6=e=>{const[t,n]=we(e,["class"]);return m(xn.ItemControl,Q({get class(){return Et("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return m(xn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var J6=B('<span class="font-semibold tracking-wide">'),wf=B("<span>"),eT=B('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),tT=B('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),nT=B("<div class=mb-1.5>"),rT=B('<p class="mb-1 text-xs text-destructive">'),oT=B('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-y-auto px-2.5 py-2"></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),iT=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),sT=B("<aside><header>"),aT=B('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),uT=B('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),cT=B('<p class="text-sm text-muted-foreground">'),lT=B('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 text-sm font-medium text-foreground">'),dT=B('<div class="mb-2 rounded bg-muted px-2 py-1.5 text-sm">'),fT=B('<div class="markdown chat-md">');const Xa="yorz.layout.col2.collapsed",Cu="yorz.layout.col2.width",_f="yorz.chat.sessionList.collapsed",mh="yorz.chat.sessionList.rows",gT="yorz.chat.sessionList.limit",pT="yorz.chat.sessionList.showHistory",bh=[3,5,10],hT=34,hc=340,mT=.4,yh=260,bT=960,yT=.8,vT=96,xT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,wT=1500,_T=80;function ET(e){return new Promise(t=>setTimeout(t,e))}Ns("en",S6);Ns("zh-CN",C6);function kT(){return typeof window>"u"?bT:Math.max(yh,Math.round(window.innerWidth*yT))}function Qi(e){return Number.isFinite(e)?Math.min(kT(),Math.max(yh,Math.round(e))):hc}function Qa(){return typeof window>"u"?hc:Qi(window.innerWidth*mT)}function Ef(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function CT(){try{if(typeof window>"u")return hc;const e=window.localStorage.getItem(Cu);if(!e)return Qa();const t=Number(e);return Number.isFinite(t)?Qi(t):Qa()}catch{return Qa()}}function Io(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Wr(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Su(e){return bh.includes(e)}function ST(){const e=Number(Io(mh,""));if(Su(e))return e;const t=Number(Io(gT,""));return Su(t)?t:Io(pT,"0")==="1"?10:3}const AT=()=>{let e,t;const{lng:n}=F0(),r=tp({projectId:()=>Ot()||""}),[o,i]=L(Io(Xa,"0")==="1"),[s,a]=L(CT()),[u,c]=L(Io(_f,"0")!=="1"),[l,d]=L(ST()),[f,p]=L(""),[g,b]=L([]),h=re(()=>R6(g())),[y,v]=L(""),[x,k]=L(!0),[C,E]=L(Date.now()),[T,_]=L(!1),[R,$]=L({}),O=new Set,N=new Map;function M(q){let ue=N.get(q);if(!ue){let he=()=>{};ue={promise:new Promise(Ue=>{he=Ue}),resolve:he},N.set(q,ue)}return ue.promise}function A(q){M(q),N.get(q)?.resolve()}const[I,{refetch:F}]=bn(()=>Ot()||void 0,q=>Fe.listSessions(q));oe(()=>{const q=I();q&&$(ue=>{const he={};for(const Ue of q)he[Ue.id]=!!Ue.running;const Je=f();return Je&&!(Je in he)&&ue[Je]===!0&&(he[Je]=!0),he})}),oe(Tt(Ot,()=>{p(""),$({}),ht(),_(!1),O.clear(),N.clear(),r.reset()})),oe(()=>{const q=Ot();if(!q)return;const ue=a0(q,{onStatus:he=>{$(Je=>({...Je,[he.sessionId]:he.running})),he.running||F()}});ae(ue)});const G=q=>R()[q]===!0,U=re(()=>{const q=f();return q?G(q):!1}),z=re(()=>(I()??[]).filter(q=>G(q.id)).length),P=re(()=>I()??[]);function Z(q){!q||q===f()||(p(q),F())}oe(()=>{const q=oy();q&&(iy(),Z(q),o()&&(i(!1),Wr(Xa,"0")))});const V=()=>o()||cr();function te(){if(cr()){zi();return}const q=!o();i(q),Wr(Xa,q?"1":"0")}function Y(q){c(q),Wr(_f,q?"0":"1")}function H(q){const ue=Number(q);Su(ue)&&(d(ue),Wr(mh,String(ue)))}function ie(q){return S(q===3?"chat.sessionListRows3":q===5?"chat.sessionListRows5":"chat.sessionListRows10")}function me(q){const ue=q.title.trim();return ue&&ue!==q.id&&!xT.test(ue)?ue:q.id}Vt(()=>{const q=()=>{const ue=Qi(s());ue!==s()&&(a(ue),Wr(Cu,String(ue)))};window.addEventListener("resize",q),ae(()=>window.removeEventListener("resize",q))}),Vt(()=>{const q=window.setInterval(()=>E(Date.now()),6e4);ae(()=>window.clearInterval(q))});let J=null,pe=null,Ce=null;function Ne(q){V()||(q.preventDefault(),J={startX:q.clientX,startW:s(),raf:null},document.body.classList.add("is-resizing"),pe=ue=>{if(!J)return;const he=Qi(J.startW+(ue.clientX-J.startX));J.raf==null&&(J.raf=requestAnimationFrame(()=>{J&&(J.raf=null,a(he))}))},Ce=()=>{J?.raf!=null&&cancelAnimationFrame(J.raf),J=null,document.body.classList.remove("is-resizing"),pe&&document.removeEventListener("mousemove",pe),Ce&&document.removeEventListener("mouseup",Ce),pe=null,Ce=null,Wr(Cu,String(s()))},document.addEventListener("mousemove",pe),document.addEventListener("mouseup",Ce))}ae(()=>{pe&&document.removeEventListener("mousemove",pe),Ce&&document.removeEventListener("mouseup",Ce),document.body.classList.remove("is-resizing")}),oe(()=>{const q=Ot(),ue=f();if(!q||!ue)return;let he=!1;k(!0),O.has(ue)||(ht(),Fe.getSessionMessages(q,ue).then(Ue=>{he||ht(D6(Ue))}).catch(()=>{}));const Je=ds(q,ue,{onReady:()=>A(ue),onEvent:Ue=>{Ue.type==="text"?kt(Ue.delta):Ue.type==="tool-use"?Ke({kind:"tool",name:Ue.name,input:Ue.input}):Ue.type==="tool-result"?Ke({kind:"tool",result:Ue.text}):Ue.type==="turn-completed"?(yt(),O.delete(ue),$(et=>({...et,[ue]:!1}))):Ue.type==="error"?(Me(`
|
|
666
|
+
${S("chat.errorMessage",{message:Ue.message})}
|
|
667
|
+
`),$(et=>({...et,[ue]:!1}))):Ue.type==="session-started"&&Ue.sessionId!==ue&&(O.has(ue)&&O.add(Ue.sessionId),$(et=>({...et,[ue]:!1,[Ue.sessionId]:!0})),p(Ue.sessionId),F())}});ae(()=>{he=!0,N.delete(ue),Je()})}),oe(()=>{g(),x()&&requestAnimationFrame(pt)});function Xe(q){return q.scrollHeight-q.scrollTop-q.clientHeight<=vT}function pt(){e&&(e.scrollTop=e.scrollHeight)}function ce(){e&&k(Xe(e))}function ze(q){return C(),!Number.isFinite(q)||q<=0?"":_6(q,n())}function ne(q){return!Number.isFinite(q)||q<=0?"":new Date(q).toLocaleString(n())}async function ke(q){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(q),hn.success(S("chat.filePathCopied"))}catch{hn.error(S("chat.filePathCopyFailed"))}}function K(q){const ue=Ef(q.target);if(!ue||e&&!e.contains(ue))return;const he=ue.dataset.filePath;he&&(q.preventDefault(),ke(he))}function _e(q){if(q.key!=="Enter"&&q.key!==" ")return;const ue=Ef(q.target);if(!ue||e&&!e.contains(ue))return;const he=ue.dataset.filePath;he&&(q.preventDefault(),ke(he))}let Oe="",Re=null;function Qe(q,ue){const he=q[q.length-1];return he&&he.kind==="text"&&he.role==="assistant"?[...q.slice(0,-1),{...he,text:he.text+ue}]:[...q,{kind:"text",role:"assistant",text:ue}]}function yt(){Re!=null&&(clearTimeout(Re),Re=null);const q=Oe;Oe="",q&&b(ue=>Qe(ue,q))}function kt(q){Oe+=q,Re==null&&(Re=window.setTimeout(yt,_T))}function Me(q){yt(),b(ue=>Qe(ue,q))}function Ke(q){yt(),b(ue=>[...ue,q])}function ht(q=[]){Re!=null&&(clearTimeout(Re),Re=null),Oe="",b(ue=>q.length===0&&ue.length===0?ue:q)}ae(()=>{Re!=null&&clearTimeout(Re)});function _t(){!Ot()||!f()||(p(""),ht(),k(!0),r.reset())}async function Yt(){const q=Ot(),ue=f(),he=y().trim();if(!q||!he||T()||U()||r.hasPending())return;if(v(""),k(!0),!ue){await Ut(q,he);return}const Je=r.draftId()??void 0;Ke({kind:"text",role:"user",text:he}),$(Ue=>({...Ue,[ue]:!0}));try{await Fe.sendSessionMessage(q,ue,he,Je),r.reset()}catch(Ue){Me(`
|
|
668
|
+
${S("chat.errorMessage",{message:Ue.message})}
|
|
669
|
+
`),$(et=>({...et,[ue]:!1}))}}async function Ut(q,ue){_(!0);try{let he;try{he=(await Fe.createSession(q,{})).sessionId}catch(et){v(ue),Me(`
|
|
670
|
+
${S("chat.errorMessage",{message:et.message})}
|
|
671
|
+
`);return}O.add(he);const Je=r.draftId()??void 0,Ue=M(he);ht([{kind:"text",role:"user",text:ue}]),$(et=>({...et,[he]:!0})),p(he),await Promise.race([Ue,ET(wT)]);try{await Fe.sendSessionMessage(q,he,ue,Je),r.reset()}catch(et){Me(`
|
|
672
|
+
${S("chat.errorMessage",{message:et.message})}
|
|
673
|
+
`),$(Kt=>({...Kt,[he]:!1}))}F()}finally{_(!1)}}async function on(){const q=Ot(),ue=f();!q||!ue||(await Fe.abortSession(q,ue).catch(()=>{}),$(he=>({...he,[ue]:!1})))}function dn(q){q.defaultPrevented||q.isComposing||q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),Yt())}return(()=>{var q=sT(),ue=q.firstChild;return w(ue,m(W,{get when(){return!V()},get fallback(){return m(Pe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:te,get title(){return S("chat.expand")},get children(){return m(o0,{class:"h-4 w-4"})}})},get children(){return[(()=>{var he=J6();return w(he,()=>S("chat.title")),he})(),m(Pe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:te,get title(){return S("chat.collapse")},get children(){return m(r0,{class:"h-4 w-4"})}})]}})),w(q,m(W,{get when(){return!V()},get children(){var he=oT(),Je=he.firstChild,Ue=Je.nextSibling,et=Ue.firstChild,Kt=et.firstChild,We=et.nextSibling;w(he,m(W,{get when(){return Ot()},get children(){return m(I6,{class:"m-2 rounded-lg shadow-none",get children(){return m(fc,{get open(){return u()},onOpenChange:Y,get children(){return[(()=>{var nt=eT(),D=nt.firstChild,j=D.nextSibling;return D.$$click=()=>Y(!u()),w(D,m(W,{get when(){return z()>0},get fallback(){return(()=>{var ee=wf();return w(ee,()=>S("chat.sessionsLabelPlain")),ee})()},get children(){var ee=wf();return w(ee,()=>S("chat.sessionsLabel",{count:z()})),ee}})),w(nt,m(Z6,{class:"flex shrink-0 items-center gap-2",get value(){return String(l())},onChange:H,get"aria-label"(){return S("chat.sessionListRows")},get children(){return m(vt,{each:bh,children:ee=>m(X6,{get value(){return String(ee)},class:"flex items-center gap-1",get children(){return[m(W6,{}),m(Q6,{class:"h-3 w-3"}),m(Y6,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return ie(ee)}})]}})})}}),j),j.$$click=()=>Y(!u()),w(j,m(Ru,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${u()?"":"-rotate-90"}`}})),le(ee=>{var Se=u()?S("chat.collapseSessions"):S("chat.expandSessions"),it=u()?S("chat.collapseSessions"):S("chat.expandSessions");return Se!==ee.e&&xe(D,"title",ee.e=Se),it!==ee.t&&xe(j,"title",ee.t=it),ee},{e:void 0,t:void 0}),nt})(),m(gc,{get children(){var nt=tT();return w(nt,m(W,{get when(){return P().length>0},get fallback(){return(()=>{var D=aT();return w(D,()=>S("chat.noRunningSessions")),D})()},get children(){return m(vt,{get each(){return P()},children:D=>(()=>{var j=uT(),ee=j.firstChild,Se=ee.firstChild,it=Se.firstChild,dt=it.nextSibling;dt.nextSibling;var Ee=Se.nextSibling,be=Ee.nextSibling;return ee.$$click=()=>Z(D.id),w(ee,m(W,{get when(){return G(D.id)},get children(){return m(sr,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Se),w(Se,()=>D.kind,dt),w(Ee,()=>me(D)),w(be,()=>ze(D.updatedAt)),le(Te=>{var xt=`flex w-full items-center gap-1 px-2.5 py-1.5 text-left text-sm ${f()===D.id?"bg-background font-semibold":"hover:bg-background"}`,mt=G(D.id)?S("chat.sessionTitleRunning",{kind:D.kind,id:D.id}):S("chat.sessionTitle",{kind:D.kind,id:D.id}),Jn=ne(D.updatedAt);return xt!==Te.e&&ut(ee,Te.e=xt),mt!==Te.t&&xe(ee,"title",Te.t=mt),Jn!==Te.a&&xe(be,"title",Te.a=Jn),Te},{e:void 0,t:void 0,a:void 0}),j})()})}})),le(D=>$o(nt,"max-height",`${l()*hT}px`)),nt}})]}})}})}}),Je),Je.addEventListener("scroll",ce),Je.$$keydown=_e,Je.$$click=K;var sn=e;typeof sn=="function"?Vn(sn,Je):e=Je,w(Je,m(W,{get when(){return h().length>0},get fallback(){return(()=>{var nt=cT();return w(nt,(()=>{var D=de(()=>!!f());return()=>D()?S("chat.empty"):S("chat.draftEmpty")})()),nt})()},get children(){return m(vt,{get each(){return h()},children:nt=>m(W,{get when(){return nt.kind==="context"?nt:null},get fallback(){return m(W,{get when(){return nt.kind==="assistant"?nt:null},get fallback(){return(()=>{var D=lT();return w(D,()=>nt.text),D})()},children:D=>(()=>{var j=dT();return w(j,m(vt,{get each(){return D().segments},children:ee=>m(W,{get when(){return ee.kind==="tools"?ee:null},get fallback(){return(()=>{var Se=fT();return le(()=>Se.innerHTML=Os(ee.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:S("chat.copyFilePath")})),Se})()},children:Se=>m(U6,{get tools(){return Se().tools}})})})),j})()})},children:D=>m(G6,{get contexts(){return D().contexts}})})})}})),w(Ue,m(W,{get when(){return r.count()>0},get children(){var nt=nT();return w(nt,m(cp,{ctrl:r,compact:!0})),nt}}),et),w(Ue,m(W,{get when(){return r.error()},get children(){var nt=rT();return w(nt,()=>r.error()),nt}}),et),w(et,m(np,{get projectId(){return Ot()||""},get value(){return y()},onValueChange:v,onKeyDown:dn,get onPaste(){return r.onPaste},get placeholder(){return de(()=>!Ot())()?S("chat.noSessionPlaceholder"):de(()=>!!f())()?S("chat.inputPlaceholder"):S("chat.draftPlaceholder")},get disabled(){return!Ot()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1 text-sm"}),Kt),w(et,m(Pe,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!Ot()||r.count()>=to},get title(){return S("newSpec.importAttachment")},get children(){return m($1,{class:"h-4 w-4"})}}),Kt),Ii(Kt,"change",r.onFileInputChange);var fn=t;return typeof fn=="function"?Vn(fn,Kt):t=Kt,xe(Kt,"accept",ep),w(We,m(Pe,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:_t,get disabled(){return!Ot()||!f()},get title(){return S("chat.newSession")},get children(){return m(Nu,{class:"h-4 w-4"})}}),null),w(We,m(W,{get when(){return U()},get fallback(){return m(Pe,{size:"sm",onClick:()=>void Yt(),get disabled(){return!Ot()||!y().trim()||T()||r.hasPending()},get children(){return[m(us,{class:"mr-1 h-3.5 w-3.5"}),de(()=>S("chat.send"))]}})},get children(){return m(Pe,{variant:"outline",size:"sm",onClick:()=>void on(),get title(){return S("chat.abort")},get children(){return[m(Q1,{class:"mr-1 h-3.5 w-3.5"}),de(()=>S("chat.abort"))]}})}}),null),he}}),null),w(q,m(W,{get when(){return!V()},get children(){var he=iT();return he.$$mousedown=Ne,he}}),null),le(he=>{var Je=`relative flex flex-col border-r bg-card shrink-0 ${V()?"w-9 transition-[width] duration-150":""}`,Ue=V()?void 0:{width:`${s()}px`},et=`flex items-center border-b ${V()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Je!==he.e&&ut(q,he.e=Je),he.t=ur(q,Ue,he.t),et!==he.a&&ut(ue,he.a=et),he},{e:void 0,t:void 0,a:void 0}),q})()};ln(["click","keydown","mousedown"]);var TT=B('<form class="flex flex-col gap-4"><fieldset class="m-0 flex flex-wrap gap-2 border-0 p-0"><legend class="mb-1.5 font-medium"></legend></fieldset><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">'),DT=B("<p class=text-muted-foreground>"),OT=B('<label class="flex cursor-pointer items-center gap-1.5"><input type=radio name=global-config-agent-default><span>'),RT=B("<p class=text-destructive>");const NT={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}}},IT=e=>{const[t,n]=L("claude"),[r,o]=L(!1),[i,s]=L(!1),[a,u]=L(!1),[c,l]=L(!1),[d,f]=L(null);oe(()=>{e.open&&(f(null),u(!0),(async()=>{try{p(await Fe.getGlobalConfig())}catch(h){f(h.message),p(NT)}finally{u(!1)}})())});function p(h){n(h.agent.defaultKind),o(!!h.notifications.sessionEnd.banner),s(!!h.notifications.sessionEnd.sound)}async function g(h){h.preventDefault(),f(null),l(!0);try{await Fe.updateGlobalConfig({agent:{defaultKind:t()},notifications:{sessionEnd:{banner:r(),sound:i()}}}),e.onSaved?.(S("globalConfig.saved")),e.onClose()}catch(y){f(y.message)}finally{l(!1)}}function b(h){return S(h==="codex"?"projectConfig.agentCodex":h==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}return m(pn,{get open(){return e.open},onOpenChange:h=>!h&&e.onClose(),get children(){return m(oo,{class:"max-w-[440px]",get children(){return[m(so,{get children(){return m(io,{get children(){return S("globalConfig.title")}})}}),m(W,{get when(){return!a()},get fallback(){return(()=>{var h=DT();return w(h,()=>S("common.loading")),h})()},get children(){var h=TT(),y=h.firstChild,v=y.firstChild,x=y.nextSibling,k=x.firstChild,C=k.nextSibling;return h.addEventListener("submit",E=>void g(E)),w(v,()=>S("globalConfig.agentDefault")),w(y,()=>["claude","opencode","codex"].map(E=>(()=>{var T=OT(),_=T.firstChild,R=_.nextSibling;return _.addEventListener("change",()=>n(E)),_.value=E,w(R,()=>b(E)),le(()=>_.disabled=c()),le(()=>_.checked=t()===E),T})()),null),w(k,()=>S("globalConfig.sessionEnd")),w(C,m(Wi,{get checked(){return r()},onChange:E=>o(E),get disabled(){return c()},class:"flex items-center gap-2",get children(){return[m(Yi,{}),m(Vi,{get children(){return S("globalConfig.banner")}})]}}),null),w(C,m(Wi,{get checked(){return i()},onChange:E=>s(E),get disabled(){return c()},class:"flex items-center gap-2",get children(){return[m(Yi,{}),m(Vi,{get children(){return S("globalConfig.sound")}})]}}),null),w(h,(()=>{var E=de(()=>!!d());return()=>E()&&(()=>{var T=RT();return w(T,d),T})()})(),null),w(h,m(ao,{get children(){return[m(Pe,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return c()},get children(){return S("common.cancel")}}),m(Pe,{type:"submit",get disabled(){return c()},get children(){return de(()=>!!c())()?S("common.saving"):S("globalConfig.save")}})]}}),null),h}})]}})}})};var MT=B('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const LT=e=>{const t=is(),{lng:n,changeLanguage:r}=F0(),[o,i]=L(!1),s=re(()=>t.pathname===en("specs/new"));function a(u){u!==n()&&(r(u),window.location.reload())}return oe(()=>{const u=t.pathname.match(/^\/([^/]+)/);sy(u&&u[1]!=="api"?u[1]:"")}),(()=>{var u=MT(),c=u.firstChild,l=c.firstChild,d=c.nextSibling,f=d.firstChild;return w(c,m(fr,{href:"/",class:"text-lg font-bold",children:"YorZ"}),l),w(l,m(W,{get when(){return Ot()},get children(){return m(Pe,{as:fr,get href(){return en("specs/new")},get target(){return s()?"_blank":void 0},get rel(){return s()?"noopener":void 0},variant:"default",size:"sm",get children(){return[m(Nu,{class:"mr-1 h-4 w-4"}),de(()=>S("shell.newSpec"))]}})}}),null),w(l,m(Ug,{placement:"bottom-end",get children(){return[m(zg,{as:Pe,variant:"ghost",size:"icon",get title(){return S("shell.settingsMenu")},get children(){return m(O1,{class:"h-4 w-4"})}}),m(Kg,{get children(){return[m(To,{class:"font-medium text-muted-foreground",disabled:!0,get children(){return[m(_1,{class:"mr-2 h-4 w-4"}),de(()=>S("shell.languageSwitch"))]}}),m(To,{onSelect:()=>a("zh-CN"),get children(){return[m(Qc,{get class(){return`mr-2 h-4 w-4 ${n()==="zh-CN"?"opacity-100":"opacity-0"}`}}),de(()=>S("shell.langZh"))]}}),m(To,{onSelect:()=>a("en"),get children(){return[m(Qc,{get class(){return`mr-2 h-4 w-4 ${n()==="en"?"opacity-100":"opacity-0"}`}}),de(()=>S("shell.langEn"))]}}),m(Zw,{}),m(To,{onSelect:()=>i(!0),get children(){return[m(Y1,{class:"mr-2 h-4 w-4"}),de(()=>S("shell.globalConfig"))]}})]}})]}}),null),w(d,m(g6,{}),f),w(d,m(AT,{}),f),w(f,()=>e.children),w(u,m(H_,{position:"top-center"}),null),w(u,m(IT,{get open(){return o()},onClose:()=>i(!1),onSaved:p=>hn.success(p)}),null),u})()},vh=document.getElementById("app");if(!vh)throw new Error("missing #app root");cm(()=>m(Wm,{root:LT,get children(){return[m(Er,{path:"/",component:FA}),m(Er,{path:"/:projectId",component:a2}),m(Er,{path:"/:projectId/specs/new",component:eE}),m(Er,{path:"/:projectId/specs/:id",component:gA}),m(Er,{path:"/:projectId/specs/:id/review",component:TA}),m(Er,{path:"/:projectId/specs/:id/debug",component:LA}),m(Er,{path:"*",component:Jp})]}}),vh);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{e3 as _,cc as g};
|