@yorz/cli 0.1.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -11
- package/dist/cli/index.js +1225 -989
- package/dist/gui/assets/{abnfDiagram-VRR7QNED-Dk823f-p.js → abnfDiagram-VRR7QNED-Dvg_gtwF.js} +1 -1
- package/dist/gui/assets/{arc-CsAcQvy9.js → arc-DPHbXQf3.js} +1 -1
- package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-9d29EB_v.js → architectureDiagram-ZJ3FMSHR-d6PCjJn6.js} +1 -1
- package/dist/gui/assets/{blockDiagram-677ZJIJ3-C_BdniYG.js → blockDiagram-677ZJIJ3-BC2I0xtq.js} +1 -1
- package/dist/gui/assets/{c4Diagram-LMCZKHZV-COHS5O60.js → c4Diagram-LMCZKHZV-B-KrLqya.js} +1 -1
- package/dist/gui/assets/channel-q4TDwCwL.js +1 -0
- package/dist/gui/assets/{chunk-2Q5K7J3B-CdpNMJAI.js → chunk-2Q5K7J3B-D_6tE8D9.js} +1 -1
- package/dist/gui/assets/{chunk-32BRIVSS-C-5zZ7Xl.js → chunk-32BRIVSS-Bjgyu8pc.js} +1 -1
- package/dist/gui/assets/{chunk-5VM5RSS4-DNMuZJaP.js → chunk-5VM5RSS4-D2ExKDZn.js} +1 -1
- package/dist/gui/assets/{chunk-EX3LRPZG-BGPzkMUB.js → chunk-EX3LRPZG-CAgqmiG1.js} +1 -1
- package/dist/gui/assets/{chunk-JWPE2WC7-DKHh8QvM.js → chunk-JWPE2WC7-32xYgKDA.js} +1 -1
- package/dist/gui/assets/{chunk-MOJQB5TN-DjfrUCo1.js → chunk-MOJQB5TN-DmF1hIRM.js} +1 -1
- package/dist/gui/assets/{chunk-RYQCIY6F-CAOzG_fF.js → chunk-RYQCIY6F-BpygaLmn.js} +1 -1
- package/dist/gui/assets/{chunk-V7JOEXUC-CiYl0Zr6.js → chunk-V7JOEXUC-CL5xjYjs.js} +1 -1
- package/dist/gui/assets/{chunk-VR4S4FIN-C9R15N13.js → chunk-VR4S4FIN-CUKOpnGv.js} +1 -1
- package/dist/gui/assets/{chunk-XXDRQBXY-D08V--b4.js → chunk-XXDRQBXY-rH7GWHx4.js} +1 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-TaYrCNs6.js +1 -0
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-TaYrCNs6.js +1 -0
- package/dist/gui/assets/{cose-bilkent-JH36ORCC-h3WvWy31.js → cose-bilkent-JH36ORCC-Cq80riEI.js} +1 -1
- package/dist/gui/assets/{cynefin-VYW2F7L2-BJJROAhw.js → cynefin-VYW2F7L2-DhvCHInV.js} +1 -1
- package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-Cowr6YON.js → cynefinDiagram-TSTJHNR4-U9_xrCTX.js} +1 -1
- package/dist/gui/assets/{dagre-VKFMJZFB-CHQSayFl.js → dagre-VKFMJZFB-D39LwJ1s.js} +1 -1
- package/dist/gui/assets/{diagram-FQU43EPY-Dkjm-gpD.js → diagram-FQU43EPY-DyZSy6Y2.js} +1 -1
- package/dist/gui/assets/{diagram-G47NLZAW-CWzLjtMq.js → diagram-G47NLZAW-CWTyg-w3.js} +1 -1
- package/dist/gui/assets/{diagram-NH7WQ7WH-CJEfCmpn.js → diagram-NH7WQ7WH-Cfmxj_yc.js} +1 -1
- package/dist/gui/assets/{diagram-OA4YK3LP-DKXL4ZCg.js → diagram-OA4YK3LP-BWR9rLtc.js} +1 -1
- package/dist/gui/assets/{diagram-WEI45ONY-CLvc8CSB.js → diagram-WEI45ONY-BtqMg5zg.js} +1 -1
- package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-D6NViEZ2.js → ebnfDiagram-CCIWWBDH-GFU4rZWL.js} +1 -1
- package/dist/gui/assets/{erDiagram-Q63AITRT-B2mRc5jq.js → erDiagram-Q63AITRT-ByNYUzxd.js} +1 -1
- package/dist/gui/assets/{flowDiagram-23GEKE2U-Bu2CgXeG.js → flowDiagram-23GEKE2U-GIo3zItT.js} +1 -1
- package/dist/gui/assets/{ganttDiagram-NO4QXBWP-CLqVFiRj.js → ganttDiagram-NO4QXBWP-BfDrggvI.js} +1 -1
- package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-BCeVlEhg.js → gitGraphDiagram-IHSO6WYX-wZAUbbfD.js} +1 -1
- package/dist/gui/assets/index-5bFeMSvk.css +1 -0
- package/dist/gui/assets/index-TN_K4jQM.js +673 -0
- package/dist/gui/assets/{infoDiagram-FWYZ7A6U-CaGDhrD8.js → infoDiagram-FWYZ7A6U-CbVgWslR.js} +1 -1
- package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-D-IBVo_N.js → ishikawaDiagram-FXEZZL3T-DiZGLvml.js} +1 -1
- package/dist/gui/assets/{journeyDiagram-5HDEW3XC-lxFR0Z8q.js → journeyDiagram-5HDEW3XC-Bto56knB.js} +1 -1
- package/dist/gui/assets/{kanban-definition-HUTT4EX6-C1Quf86J.js → kanban-definition-HUTT4EX6-CyuHCEsI.js} +1 -1
- package/dist/gui/assets/{linear-BmiZLs2L.js → linear-B9sLmbPn.js} +1 -1
- package/dist/gui/assets/{mermaid.core-Qqp0pI8e.js → mermaid.core-bOetDHeS.js} +4 -4
- package/dist/gui/assets/{mindmap-definition-LN4V7U3C-CiuAQSSr.js → mindmap-definition-LN4V7U3C-BUliAfjd.js} +1 -1
- package/dist/gui/assets/{pegDiagram-2B236MQR-BWjeZxVp.js → pegDiagram-2B236MQR-DFWc28Wx.js} +1 -1
- package/dist/gui/assets/{pieDiagram-ENE6RG2P-C2aubU3s.js → pieDiagram-ENE6RG2P-DBqrT9tz.js} +1 -1
- package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-l-nU_0aa.js → quadrantDiagram-ABIIQ3AL-CrPtmaKy.js} +1 -1
- package/dist/gui/assets/{railroadDiagram-RFXS5EU6-CLs3ePNd.js → railroadDiagram-RFXS5EU6-CQhfd0gh.js} +1 -1
- package/dist/gui/assets/{requirementDiagram-TGXJPOKE-noC5_aOI.js → requirementDiagram-TGXJPOKE-BaZ77i_q.js} +1 -1
- package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-CrVWROCY.js → sankeyDiagram-HTMAVEWB-DC3Exphe.js} +1 -1
- package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-rrdT6eIu.js → sequenceDiagram-DBY2YBRQ-Bw7wZpQ8.js} +1 -1
- package/dist/gui/assets/{sizeCapture-X5ZJPWSS-DvpoOhEJ.js → sizeCapture-X5ZJPWSS-opzemt6R.js} +1 -1
- package/dist/gui/assets/{stateDiagram-2N3HPSRC-B2ui4ZZN.js → stateDiagram-2N3HPSRC--RB2GGES.js} +1 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CvRHcdjg.js +1 -0
- package/dist/gui/assets/{swimlanes-5IMT3BWC-DRhf5jKL.js → swimlanes-5IMT3BWC-Bf3o_9Jk.js} +2 -2
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-D30sOFxA.js +8 -0
- package/dist/gui/assets/{timeline-definition-FHXFAJF6-rm68zqM2.js → timeline-definition-FHXFAJF6-CT2bRE0k.js} +1 -1
- package/dist/gui/assets/{vennDiagram-L72KCM5P-BKVMfPvL.js → vennDiagram-L72KCM5P-BYzZHPMG.js} +1 -1
- package/dist/gui/assets/{wardleyDiagram-EHGQE667-eXN3NRZ7.js → wardleyDiagram-EHGQE667-C0QK5-46.js} +1 -1
- package/dist/gui/assets/{xychartDiagram-FW5EYKEG-3VtYytF2.js → xychartDiagram-FW5EYKEG-CD_Qgw-N.js} +1 -1
- package/dist/gui/index.html +2 -2
- package/package.json +7 -1
- package/dist/gui/assets/channel-Cdj31qNd.js +0 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-BiCCYKL9.js +0 -1
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-BiCCYKL9.js +0 -1
- package/dist/gui/assets/index-BCf1jTQa.css +0 -1
- package/dist/gui/assets/index-BYq7_4Z-.js +0 -663
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-B_Wcpq2b.js +0 -1
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-C2fsQgny.js +0 -8
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Le={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return pc(this.context.count)},getNextContextId(){return pc(this.context.count++)}};function pc(e){const t=String(e),n=t.length-1;return Le.context.id+(n?String.fromCharCode(96+n):"")+t}function yo(e){Le.context=e}const fh=!1,gh=(e,t)=>e===t,un=Symbol("solid-proxy"),ff=typeof Proxy=="function",_i=Symbol("solid-track"),Ei={equals:gh};let gf=vf;const fn=1,Co=2,pf={owned:null,cleanups:null,context:null,owner:null},Ns={};var qe=null;let de=null,ph=null,tt=null,Ut=null,Bt=null,qi=0;function Er(e,t){const n=tt,r=qe,o=e.length===0,i=t===void 0?r:t,s=o?pf:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>Ct(()=>sr(s)));qe=s,tt=null;try{return Jt(a,!0)}finally{tt=n,qe=r}}function $(e,t){t=t?Object.assign({},Ei,t):Ei;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(de&&de.running&&de.sources.has(n)?o=o(n.tValue):o=o(n.value)),yf(n,o));return[bf.bind(n),r]}function qa(e,t,n){const r=Vi(e,t,!0,fn);oo(r)}function ue(e,t,n){const r=Vi(e,t,!1,fn);oo(r)}function oe(e,t,n){gf=vh;const r=Vi(e,t,!1,fn),o=Cr&&pt(Cr);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Bt?Bt.push(r):oo(r)}function ne(e,t,n){n=n?Object.assign({},Ei,n):Ei;const r=Vi(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,oo(r),bf.bind(r)}function hh(e){return e&&typeof e=="object"&&"then"in e}function gn(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=Ns,u=null,c=!1,l=!1,d="initialValue"in i,f=typeof r=="function"&&ne(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 C(A,N,M,S){return s===A&&(s=null,S!==void 0&&(d=!0),(A===a||N===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(S,{value:N})),a=Ns,de&&A&&c?(de.promises.delete(A),c=!1,Jt(()=>{de.running=!0,D(N,M)},!1)):D(N,M)),N}function D(A,N){Jt(()=>{N===void 0&&b(()=>A),E(N!==void 0?"errored":d?"ready":"unresolved"),y(N);for(const M of p.keys())M.decrement();p.clear()},!1)}function _(){const A=Cr&&pt(Cr),N=g(),M=h();if(M!==void 0&&!s)throw M;return tt&&!tt.user&&A&&qa(()=>{v(),s&&(A.resolved&&de&&c?de.promises.add(s):p.has(A)||(A.increment(),p.add(A)))}),N}function I(A=!0){if(A!==!1&&l)return;l=!1;const N=f?f():r;if(c=de&&de.running,N==null||N===!1){C(s,Ct(g));return}de&&s&&de.promises.delete(s);let M;const S=a!==Ns?a:Ct(()=>{try{return o(N,{value:g(),refetching:A})}catch(R){M=R}});if(M!==void 0){C(s,void 0,xi(M),N);return}else if(!hh(S))return C(s,S,void 0,N),S;return s=S,"v"in S?(S.s===1?C(s,S.v,void 0,N):C(s,void 0,xi(S.v),N),S):(l=!0,queueMicrotask(()=>l=!1),Jt(()=>{E(d?"refreshing":"pending"),x()},!1),S.then(R=>C(S,R,void 0,N),R=>C(S,void 0,xi(R),N)))}Object.defineProperties(_,{state:{get:()=>k()},error:{get:()=>h()},loading:{get(){const A=k();return A==="pending"||A==="refreshing"}},latest:{get(){if(!d)return _();const A=h();if(A&&!s)throw A;return g()}}});let L=qe;return f?qa(()=>(L=qe,I(!1))):I(!1),[_,{refetch:A=>ji(L,()=>I(A)),mutate:b}]}function hf(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 Mt(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 ie(e){return qe===null||(qe.cleanups===null?qe.cleanups=[e]:qe.cleanups.push(e)),e}function ja(){return tt}function Ao(){return qe}function ji(e,t){const n=qe,r=tt;qe=e,tt=null;try{return Jt(t,!0)}catch(o){yu(o)}finally{qe=n,tt=r}}function mf(e){if(de&&de.running)return e(),de.done;const t=tt,n=qe;return Promise.resolve().then(()=>{tt=t,qe=n;let r;return Cr&&(r=de||(de={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=qe=null,r?r.done:void 0})}const[z6,hc]=$(!1);function mh(e){Bt.push.apply(Bt,e),e.length=0}function bt(e,t){const n=Symbol("context");return{id:n,Provider:xh(n),defaultValue:e}}function pt(e){let t;return qe&&qe.context&&(t=qe.context[e.id])!==void 0?t:e.defaultValue}function Gi(e){const t=ne(e),n=ne(()=>Ga(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Cr;function bh(){return Cr||(Cr=bt())}function bf(){const e=de&&de.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===fn)oo(this);else{const t=Ut;Ut=null,Jt(()=>Si(this),!1),Ut=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&&de.sources.has(this)?this.tValue:this.value}function yf(e,t,n){let r=de&&de.running&&de.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(de){const o=de.running;(o||!n&&de.sources.has(e))&&(de.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=de&&de.running;s&&de.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Ut.push(i):Bt.push(i),i.observers&&xf(i)),s?i.tState=fn:i.state=fn)}if(Ut.length>1e6)throw Ut=[],new Error},!1)}return t}function oo(e){if(!e.fn)return;sr(e);const t=qi;mc(e,de&&de.running&&de.sources.has(e)?e.tValue:e.value,t),de&&!de.running&&de.sources.has(e)&&queueMicrotask(()=>{Jt(()=>{de&&(de.running=!0),tt=qe=e,mc(e,e.tValue,t),tt=qe=null},!1)})}function mc(e,t,n){let r;const o=qe,i=tt;tt=qe=e;try{r=e.fn(t)}catch(s){return e.pure&&(de&&de.running?(e.tState=fn,e.tOwned&&e.tOwned.forEach(sr),e.tOwned=void 0):(e.state=fn,e.owned&&e.owned.forEach(sr),e.owned=null)),e.updatedAt=n+1,yu(s)}finally{tt=i,qe=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?yf(e,r,!0):de&&de.running&&e.pure?(de.sources.has(e)||(e.value=r),de.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Vi(e,t,n,r=fn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:qe,context:qe?qe.context:null,pure:n};return de&&de.running&&(i.state=0,i.tState=r),qe===null||qe!==pf&&(de&&de.running&&qe.pure?qe.tOwned?qe.tOwned.push(i):qe.tOwned=[i]:qe.owned?qe.owned.push(i):qe.owned=[i]),i}function ki(e){const t=de&&de.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Co)return Si(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<qi);){if(t&&de.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(de.disposed.has(o))return}if((t?e.tState:e.state)===fn)oo(e);else if((t?e.tState:e.state)===Co){const o=Ut;Ut=null,Jt(()=>Si(e,n[0]),!1),Ut=o}}}function Jt(e,t){if(Ut)return e();let n=!1;t||(Ut=[]),Bt?n=!0:Bt=[],qi++;try{const r=e();return yh(n),r}catch(r){n||(Bt=null),Ut=null,yu(r)}}function yh(e){if(Ut&&(vf(Ut),Ut=null),e)return;let t;if(de){if(!de.promises.size&&!de.queue.size){const r=de.sources,o=de.disposed;Bt.push.apply(Bt,de.effects),t=de.resolve;for(const i of Bt)"tState"in i&&(i.state=i.tState),delete i.tState;de=null,Jt(()=>{for(const i of o)sr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)sr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}hc(!1)},!1)}else if(de.running){de.running=!1,de.effects.push.apply(de.effects,Bt),Bt=null,hc(!0);return}}const n=Bt;Bt=null,n.length&&Jt(()=>gf(n),!1),t&&t()}function vf(e){for(let t=0;t<e.length;t++)ki(e[t])}function vh(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:ki(r)}if(Le.context){if(Le.count){Le.effects||(Le.effects=[]),Le.effects.push(...e.slice(0,n));return}yo()}for(Le.effects&&(Le.done||!Le.count)&&(e=[...Le.effects,...e],n+=Le.effects.length,delete Le.effects),t=0;t<n;t++)ki(e[t])}function Si(e,t){const n=de&&de.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===fn?o!==t&&(!o.updatedAt||o.updatedAt<qi)&&ki(o):i===Co&&Si(o,t)}}}function xf(e){const t=de&&de.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Co:r.state=Co,r.pure?Ut.push(r):Bt.push(r),r.observers&&xf(r))}}function sr(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--)sr(e.tOwned[t]);delete e.tOwned}if(de&&de.running&&e.pure)wf(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)sr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}de&&de.running?e.tState=0:e.state=0}function wf(e,t){if(t||(e.tState=0,de.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)wf(e.owned[n])}function xi(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function yu(e,t=qe){throw xi(e)}function Ga(e){if(typeof e=="function"&&!e.length)return Ga(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Ga(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 xh(e,t){return function(r){let o;return ue(()=>o=Ct(()=>(qe.context={...qe.context,[e]:r.value},Gi(()=>r.children))),void 0),o}}const wh=Symbol("fallback");function bc(e){for(let t=0;t<e.length;t++)e[t]()}function _h(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ie(()=>bc(i)),()=>{let u=e()||[],c=u.length,l,d;return u[_i],Ct(()=>{let p,g,b,h,y,v,x,k,E;if(c===0)s!==0&&(bc(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[wh],o[0]=Er(C=>(i[0]=C,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Er(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]=Er(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 oi(){return!0}const Va={get(e,t,n){return t===un?n:e.get(t)},has(e,t){return t===un?!0:e.has(t)},set:oi,deleteProperty:oi,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:oi,deleteProperty:oi}},ownKeys(e){return e.keys()}};function Rs(e){return(e=typeof e=="function"?e():e)?e:{}}function Eh(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function ee(...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,ne(a)):a}if(ff&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Rs(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Rs(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Rs(e[a])));return[...new Set(s)]}},Va);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:Eh.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 Ee(e,...t){const n=t.length;if(ff&&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)}},Va));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))}},Va)),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 kh=0;function on(){return Le.context?Le.getNextContextId():`cl-${kh++}`}const Sh=e=>`Stale read from <${e}>.`;function mt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ne(_h(()=>e.each,e.children,t||void 0))}function Y(e){const t=e.keyed,n=ne(()=>e.when,void 0,void 0),r=t?n:ne(n,void 0,{equals:(o,i)=>!o==!i});return ne(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?Ct(()=>i(t?o:()=>{if(!Ct(r))throw Sh("Show");return n()})):i}return e.fallback},void 0,void 0)}const Ch=bt();function Wi(e){let t=0,n,r,o,i,s;const[a,u]=$(!1),c=bh(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Ao();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),yo(r),y(),yo()},v=>{s=v,y()})}}const f=pt(Ch);f&&(n=f.register(l.inFallback));let p;return ie(()=>p&&p()),m(c.Provider,{value:l,get children(){return ne(()=>{if(s)throw s;if(r=Le.context,i)return i(),i=void 0;r&&o==="$$f"&&yo();const g=ne(()=>e.children);return ne(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,mh(l.effects),g();if(v)return p?b:Er(x=>(p=x,r&&(yo({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Ah=["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"],Th=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Ah]),Dh=new Set(["innerHTML","textContent","innerText","children"]),Oh=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Nh=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 Rh(e,t){const n=Nh[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Ih=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Mh=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"]),Lh={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},ce=e=>ne(()=>e());function $h(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 yc="_$DX_DELEGATE";function Ph(e,t,n,r={}){let o;return Er(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function U(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function ln(e,t=window.document){const n=t[yc]||(t[yc]=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,qh))}}function ye(e,t,n){Dr(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Fh(e,t,n,r){Dr(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Bh(e,t,n){Dr(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function gt(e,t){Dr(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ci(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 zh(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]||(vc(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||(vc(e,a,!0),n[a]=u)}return n}function rr(e,t,n){if(!t)return n?ye(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 Ai(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Gn(e,t={},n,r){const o={};return r||ue(()=>o.children=To(e,t.children,o.children)),ue(()=>typeof t.ref=="function"&&qn(t.ref,e)),ue(()=>Uh(e,t,n,!0,o,!0)),o}function qn(e,t,n){return Ct(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return To(e,t,r,n);ue(o=>To(e,t(),o,n),r)}function Uh(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=xc(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=xc(e,s,a,o[s],n,i,t)}}function Kh(e){let t,n;return!Dr()||!(t=Le.registry.get(n=jh()))?e():(Le.completed&&Le.completed.add(t),Le.registry.delete(n),t)}function Dr(e){return!!Le.context&&!Le.done&&(!e||e.isConnected)}function Hh(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function vc(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 xc(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return rr(e,n,r);if(t==="classList")return zh(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=Ih.has(f);if(!p&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(p||n)&&(Ci(e,f,n,p),p&&ln([f]))}else if(t.slice(0,5)==="attr:")ye(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Bh(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Dh.has(t))||!o&&((l=Rh(t,e.tagName))||(u=Th.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(Dr(e))return n;t==="class"||t==="className"?gt(e,n):a&&!u&&!c?e[Hh(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&Lh[t.split(":")[0]];f?Fh(e,f,t,n):ye(e,Oh[t]||t,n)}return n}function qh(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 To(e,t,n,r,o){const i=Dr(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=Pr(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=Pr(e,n,r)}else{if(s==="function")return ue(()=>{let u=t();for(;typeof u=="function";)u=u();n=To(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(Wa(u,t,n,o))return ue(()=>n=To(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=Pr(e,n,r),a)return n}else c?n.length===0?wc(e,u,r):$h(e,n,u):(n&&Pr(e),wc(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=Pr(e,n,r,t);Pr(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Wa(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=Wa(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Wa(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 wc(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Pr(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 jh(){return Le.getNextContextId()}const Gh=!1,Vh="http://www.w3.org/2000/svg";function _f(e,t=!1,n=void 0){return t?document.createElementNS(Vh,e):document.createElement(e,{is:n})}function vu(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Ao();let i,s=!!Le.context;return oe(()=>{s&&(Ao().user=s=!1),i||(i=ji(o,()=>ne(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=$(!1),l=()=>c(!0);Er(d=>w(a,()=>u()?d():i(),null)),ie(l)}else{const u=_f(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),ie(()=>a.removeChild(u))}},void 0,{render:!s}),n}function Wh(e,t){const n=ne(e);return ne(()=>{const r=n();switch(typeof r){case"function":return Ct(()=>r(t));case"string":const o=Mh.has(r),i=Le.context?Kh():_f(r,o,Ct(()=>t.is));return Gn(i,t,o),i}})}function Ef(e){const[,t]=Ee(e,["component"]);return Wh(()=>e.component,t)}function kf(){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 Ya;function xu(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ya=window.history.state._depth}xu();function Yh(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Zh(e,t){let n=!1;return()=>{const r=Ya;xu();const o=r==null?null:Ya-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Xh=/^(?:[a-z0-9]+:)?\/\//i,Qh=/^\/+|(\/)\/+$/g,Sf="http://sr";function kr(e,t=!1){const n=e.replace(Qh,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function wi(e,t,n){if(Xh.test(t))return;const r=kr(e),o=n&&kr(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+kr(t,!i)}function Jh(e,t){if(e==null)throw new Error(t);return e}function em(e,t){return kr(e).replace(/\/*(\*.*)?$/g,"")+kr(t)}function Cf(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 tm(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&&Is(b,d(h)))l.params[h]=b;else if(g||!Is(b,h))return null;l.path+=`/${b}`}if(o){const f=c?u.slice(-c).join("/"):"";if(Is(f,d(o)))l.params[o]=f;else return null}return l}}function Is(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 nm(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 Af(e){const t=new Map,n=Ao();return new Proxy({},{get(r,o){return t.has(o)||ji(n,()=>t.set(o,ne(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Tf(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 Tf(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const rm=100,Df=bt(),wu=bt(),qo=()=>Jh(pt(Df),"<A> and 'use' router primitives can be only used inside a Route."),om=()=>pt(wu)||qo().base,im=e=>{const t=om();return ne(()=>t.resolvePath(e()))},sm=e=>{const t=qo();return ne(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Yi=()=>qo().navigatorFactory(),Zi=()=>qo().location,Xi=()=>qo().params;function am(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 Of(e.path).reduce((c,l)=>{for(const d of Tf(l)){const f=em(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:tm(p,!a,e.matchFilters)})}return c},[])}function um(e,t=0){return{routes:e,score:nm(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 Of(e){return Array.isArray(e)?e:[e]}function Nf(e,t="",n=[],r=[]){const o=Of(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=am(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)Nf(a.children,c.pattern,n,r);else{const d=um([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Ms(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function cm(e,t,n){const r=new URL(Sf),o=ne(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=ne(()=>o().pathname),s=ne(()=>o().search,!0),a=ne(()=>o().hash),u=()=>"",c=Mt(s,()=>Cf(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):Af(c)}}let _r;function lm(){return _r}function dm(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(S=>S),u=s.renderPath||(S=>S),c=s.beforeLeave||kf(),l=wi("",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=(S,R)=>{R.value===b()&&R.state===y()||(p===void 0&&f(!0),_r=S,p=R,mf(()=>{p===R&&(h(p.value),v(p.state),E[1](F=>F.filter(j=>j.pending)))}).finally(()=>{p===R&&hf(()=>{_r=void 0,S==="navigate"&&N(p),f(!1),p=void 0})}))},[b,h]=$(o().value),[y,v]=$(o().state),x=cm(b,y,s.queryWrapper),k=[],E=$([]),C=ne(()=>typeof r.transformUrl=="function"?Ms(t(),r.transformUrl(x.pathname)):Ms(t(),x.pathname)),D=()=>{const S=C(),R={};for(let F=0;F<S.length;F++)Object.assign(R,S[F].params);return R},_=s.paramsWrapper?s.paramsWrapper(D,t):Af(D),I={pattern:l,path:()=>l,outlet:()=>null,resolvePath(S){return wi(l,S)}};return ue(Mt(o,S=>g("native",S),{defer:!0})),{base:I,location:x,params:_,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:A,matches:C,beforeLeave:c,preloadRoute:M,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:E};function L(S,R,F){Ct(()=>{if(typeof R=="number"){R&&(s.go?s.go(R):console.warn("Router integration does not support relative routing"));return}const j=!R||R[0]==="?",{replace:z,resolve:H,scroll:P,state:J}={replace:!1,resolve:!j,scroll:!0,...F},B=H?S.resolvePath(R):wi(j&&x.pathname||"",R);if(B===void 0)throw new Error(`Path '${R}' is not a routable path`);if(k.length>=rm)throw new Error("Too many redirects");const K=b();(B!==K||J!==y())&&(Gh||c.confirm(B,F)&&(k.push({value:K,replace:z,scroll:P,state:y()}),g("navigate",{value:B,state:J})))})}function A(S){return S=S||pt(wu)||I,(R,F)=>L(S,R,F)}function N(S){const R=k[0];R&&(i({...S,replace:R.replace,scroll:R.scroll}),k.length=0)}function M(S,R){const F=Ms(t(),S.pathname),j=_r;_r="preload";for(let z in F){const{route:H,params:P}=F[z];H.component&&H.component.preload&&H.component.preload();const{preload:J}=H;R&&J&&ji(n(),()=>J({params:P,location:{pathname:S.pathname,search:S.search,hash:S.hash,query:Cf(S),state:null,key:""},intent:"preload"}))}_r=j}}function fm(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ne(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:_r||"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 wi(o.path(),p,l())}}}const gm=e=>t=>{const{base:n}=t,r=Gi(()=>t.children),o=ne(()=>Nf(r(),t.base||""));let i;const s=dm(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),m(Df.Provider,{value:s,get children(){return m(pm,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[ce(()=>(i=Ao())&&null),m(hm,{routerState:s,get branches(){return o()}})]}})}})};function pm(e){const t=e.routerState.location,n=e.routerState.params,r=ne(()=>e.preload&&Ct(()=>{e.preload({params:n,location:t,intent:lm()||"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 hm(e){const t=[];let n;const r=ne(Mt(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](),Er(p=>{t[c]=p,u[c]=fm(e.routerState,u[c-1]||e.routerState.base,_c(()=>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 _c(()=>r()&&n)()}const _c=e=>()=>m(Y,{get when(){return e()},keyed:!0,children:t=>m(wu.Provider,{value:t,get children(){return t.outlet()}})}),br=e=>{const t=Gi(()=>e.children);return ee(e,{get children(){return t()}})};function mm([e,t],n,r){return[e,r?o=>t(r(o)):t]}function bm(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=mm($(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&&ie(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),gm({signal:r,create:e.create,utils:e.utils})}function ym(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function vm(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const xm=new Map;function wm({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(C=>C instanceof Node&&C.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,Sf);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=xm.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),ie(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",p),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",g)})}}function _m(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=kf();return bm({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Yh(s),"",r):window.history.pushState(s,"",r),vm(decodeURIComponent(window.location.hash.slice(1)),i),xu()},init:r=>ym(window,"popstate",Zh(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:wm({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Em=U("<a>");function ar(e){e=ee({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=Ee(e,["href","state","class","activeClass","inactiveClass","end"]),n=im(()=>e.href),r=sm(n),o=Zi(),i=ne(()=>{const s=n();if(s===void 0)return[!1,!1];const a=kr(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(kr(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Em();return Gn(s,ee(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 km(e){const t=Yi(),n=Zi(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const Ti=Symbol("store-raw"),Sr=Symbol("store-node"),_n=Symbol("store-has"),Rf=Symbol("store-self");function If(e){let t=e[un];if(!t&&(Object.defineProperty(e,un,{value:t=new Proxy(e,Am)}),!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 Dn(e){let t;return e!=null&&typeof e=="object"&&(e[un]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ar(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Ti])return n;if(!Dn(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=Ar(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=Ar(o,t))!==o&&(e[i]=r))}return e}function Di(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Do(e,t,n){if(e[t])return e[t];const[r,o]=$(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Sm(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===un||t===Sr||(delete n.value,delete n.writable,n.get=()=>e[un][t]),n}function Mf(e){ja()&&Do(Di(e,Sr),Rf)()}function Cm(e){return Mf(e),Reflect.ownKeys(e)}const Am={get(e,t,n){if(t===Ti)return e;if(t===un)return n;if(t===_i)return Mf(e),n;const r=Di(e,Sr),o=r[t];let i=o?o():e[t];if(t===Sr||t===_n||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);ja()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Do(r,t,i)())}return Dn(i)?If(i):i},has(e,t){return t===Ti||t===un||t===_i||t===Sr||t===_n||t==="__proto__"?!0:(ja()&&Do(Di(e,_n),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Cm,getOwnPropertyDescriptor:Sm};function jt(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[_n]&&e[_n][t]&&o!==void 0&&e[_n][t].$()):(e[t]=n,e[_n]&&e[_n][t]&&o===void 0&&e[_n][t].$());let s=Di(e,Sr),a;if((a=Do(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Do(s,"length",i))&&a.$(e.length)}(a=s[Rf])&&a.$()}function Lf(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];$f(o)||jt(e,o,t[o])}}function $f(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Tm(e,t){if(typeof t=="function"&&(t=t(e)),t=Ar(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&&jt(e,n,o)}jt(e,"length",r)}else Lf(e,t)}function vo(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&&$f(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)vo(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&vo(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)vo(e,[d].concat(t),n);return}else if(t.length>1){vo(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=Ar(i),r===void 0||Dn(o)&&Dn(i)&&!Array.isArray(i)?Lf(o,i):jt(e,r,i))}function Dm(...[e,t]){const n=Ar(e||{}),r=Array.isArray(n),o=If(n);function i(...s){hf(()=>{r&&s.length===1?Tm(n,s[0]):vo(n,s)})}return[o,i]}const Za=Symbol("store-root");function Ec(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function qr(e,t,n,r,o){if(Ec(n))return;const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==Za&&(!Dn(e)||!Dn(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){jt(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++)qr(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++)jt(i,l,e[l]);for(;l<e.length;l++)jt(i,l,y[l]),qr(e[l],i,l,r,o);i.length>e.length&&jt(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?(jt(i,l,y[l]),qr(e[l],i,l,r,o)):jt(i,l,e[l])}else for(let c=0,l=e.length;c<l;c++)qr(e[c],i,c,r,o);i.length>e.length&&jt(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)Ec(a[c])||qr(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&&jt(i,u[c],void 0)}function Om(e,t={}){const{merge:n,key:r="id"}=t,o=Ar(e);return i=>{if(!Dn(i)||!Dn(o))return o;const s=qr(o,{[Za]:i},Za,n,r);return s===void 0?i:s}}const Oi=new WeakMap,Pf={get(e,t){if(t===Ti)return e;const n=e[t];if(t===un||t===_i||t===Sr||t===_n||t==="__proto__")return n;let r;return Dn(n)?Oi.get(n)||(Oi.set(n,r=new Proxy(n,Pf)),r):n},set(e,t,n){return jt(e,t,Ar(n)),!0},deleteProperty(e,t){return jt(e,t,void 0,!0),!0}};function kc(e){return t=>{if(Dn(t)){let n;(n=Oi.get(t))||Oi.set(t,n=new Proxy(t,Pf)),e(n)}return t}}const Re=e=>typeof e=="string",lo=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Sc=e=>e==null?"":String(e),Nm=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Rm=/###/g,Cc=e=>e&&e.includes("###")?e.replace(Rm,"."):e,Ac=e=>!e||Re(e),Eo=(e,t,n)=>{const r=Re(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Ac(e))return{};const i=Cc(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return Ac(e)?{}:{obj:e,k:Cc(r[o])}},Tc=(e,t,n)=>{const{obj:r,k:o}=Eo(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=Eo(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=Eo(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Im=(e,t,n,r)=>{const{obj:o,k:i}=Eo(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Ni=(e,t)=>{const{obj:n,k:r}=Eo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Mm=(e,t,n)=>{const r=Ni(e,n);return r!==void 0?r:Ni(t,n)},Ff=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Re(e[r])||e[r]instanceof String||Re(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ff(e[r],t[r],n):e[r]=t[r]);return e},Pn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Lm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},$m=e=>Re(e)?e.replace(/[&<>"'\/]/g,t=>Lm[t]):e;class Pm{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 Fm=[" ",",","?","!",";"],Bm=new Pm(20),zm=(e,t,n)=>{t=t||"",n=n||"";const r=Fm.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=Bm.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},Xa=(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},Oo=e=>e?.replace(/_/g,"-"),Um={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 Ri{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Um,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=>Re(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Re(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ri(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ri(this.logger,t)}}var kn=new Ri;class Qi{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 Dc extends Qi{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):Re(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Ni(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Re(r)?u:Xa(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),Tc(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)(Re(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=Ni(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Ff(u,r,i):u={...u,...r},Tc(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 Bf={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 zf=Symbol("i18next/PATH_KEY");function Km(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===zf?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Yr(e,t){const{[zf]:n}=e(Km()),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 Ls=e=>!Re(e)&&typeof e!="boolean"&&typeof e!="number";class Ii extends Qi{constructor(t,n={}){super(),Nm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=kn.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=Ls(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&&!zm(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Re(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:Re(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=Yr(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(M=>typeof M=="function"?Yr(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&&!Re(o.count),E=Ii.hasDefaultValue(o),C=k?this.pluralResolver.getSuffix(d,o.count,o):"",D=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${C}`]||o[`defaultValue${D}`]||o.defaultValue;let L=g;x&&!g&&E&&(L=I);const A=Ls(L),N=Object.prototype.toString.apply(L);if(x&&L&&A&&!y.includes(N)&&!(Re(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),S=M?[]:{},R=M?h:b;for(const F in L)if(Object.prototype.hasOwnProperty.call(L,F)){const j=`${R}${s}${F}`;E&&!g?S[F]=this.translate(j,{...o,defaultValue:Ls(I)?I[F]:void 0,joinArrays:!1,ns:u}):S[F]=this.translate(j,{...o,joinArrays:!1,ns:u}),S[F]===j&&(S[F]=L[F])}g=S}}else if(x&&Re(v)&&Array.isArray(g))g=g.join(v),g&&(g=this.extendTranslation(g,t,o,r));else{let M=!1,S=!1;!this.isValidLookup(g)&&E&&(M=!0,g=I),this.isValidLookup(g)||(S=!0,g=a);const F=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:g,j=E&&I!==g&&this.options.updateMissing;if(S||M||j){if(this.logger.log(j?"updateKey":"missingKey",d,c,k&&!j?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,j?I:g),s){const J=this.resolve(a,{...o,keySeparator:!1});J&&J.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 z=[];const H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&H&&H[0])for(let J=0;J<H.length;J++)z.push(H[J]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(o.lng||this.language):z.push(o.lng||this.language);const P=(J,B,K)=>{const W=E&&K!==g?K:F;this.options.missingKeyHandler?this.options.missingKeyHandler(J,c,B,W,j,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(J,c,B,W,j,o),this.emit("missingKey",J,c,B,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?z.forEach(J=>{const B=this.pluralResolver.getSuffixes(J,o);_&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!B.includes(`${this.options.pluralSeparator}zero`)&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(K=>{P([J],a+K,o[`defaultValue${K}`]||I)})}):P(z,a,I))}g=this.extendTranslation(g,t,o,p,r),S&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}${l}${a}`),(S||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=Re(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&&!Re(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=Re(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Bf.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 Re(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Yr(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&&!Re(n.count),p=f&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Re(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`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&k.startsWith(C)&&v.push(l+k.replace(C,this.options.pluralSeparator)),v.push(l+k),p&&v.push(l+E)),g){const D=`${l}${this.options.contextSeparator||"_"}${n.context}`;v.push(D),f&&(n.ordinal&&k.startsWith(C)&&v.push(D+k.replace(C,this.options.pluralSeparator)),v.push(D+k),p&&v.push(D+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&&!Re(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 Oc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kn.create("languageUtils")}getScriptPartFromCode(t){if(t=Oo(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=Oo(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Re(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)),Re(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 Re(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))):Re(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const Nc={zero:0,one:1,two:2,few:3,many:4,other:5},Rc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Hm{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=kn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Oo(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!"),Rc;if(!t.match(/-|_/))return Rc;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)=>Nc[o]-Nc[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 Ic=(e,t,n,r=".",o=!0)=>{let i=Mm(e,t,n);return!i&&o&&Re(n)&&(i=Xa(e,n,r),i===void 0&&(i=Xa(t,n,r))),i},qm=e=>e.replace(/\$/g,"$$$$");class Mc{constructor(t={}){this.logger=kn.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:$m,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Pn(i):s||"{{",this.suffix=a?Pn(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?Pn(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?Pn(l):"",this.nestingPrefix=f?Pn(f):p||Pn("$t("),this.nestingSuffix=g?Pn(g):b||Pn(")"),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=Ic(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(Ic(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=Re(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!Re(s)&&!this.useRawValueToEscape&&(s=Sc(s));const b=p.safeValue(s);if(t=t.replace(i[0],qm(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(`${Pn(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&&!Re(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&&!Re(i))return i;Re(i)||(i=Sc(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 jm=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}},Lc=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(Oo(r),o),t[s]=a),a(n)}},Gm=e=>(t,n,r)=>e(Oo(n),r)(t);class Vm{constructor(t={}){this.logger=kn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Lc:Gm;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()]=Lc(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}=jm(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 Wm=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Ym extends Qi{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=kn.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=>{Im(u.loaded,[i],s),Wm(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();Re(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Re(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 $s=()=>({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]),Re(e[1])&&(t.defaultValue=e[1]),Re(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}),$c=e=>(Re(e.ns)&&(e.ns=[e.ns]),Re(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Re(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ii=()=>{},Zm=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ko extends Qi{constructor(t={},n){if(super(),this.options=$c(t),this.services={},this.logger=kn,this.modules={external:[]},Zm(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&&(Re(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=$s();this.options={...r,...this.options,...$c(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?kn.init(o(this.modules.logger),this.options):kn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Vm;const l=new Oc(this.options);this.store=new Dc(this.options.resources,this.options);const d=this.services;d.logger=kn,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new Hm(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 Mc(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Ym(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 Ii(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=ii),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=lo(),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=ii){let r=n;const o=Re(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=lo();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=ii),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"&&Bf.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=lo();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=Re(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Re(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=Yr(l.keyPrefix,f));const p=this.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>(typeof b=="function"&&(b=Yr(b,f)),`${l.keyPrefix}${p}${b}`)):(typeof a=="function"&&(a=Yr(a,f)),g=l.keyPrefix?`${l.keyPrefix}${p}${a}`:a),this.t(g,l)};return Re(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=lo();return this.options.ns?(Re(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=lo();Re(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 Oc($s());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 ko(t,n);return r.createInstance=ko.createInstance,r}cloneInstance(t={},n=ii){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new ko(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 Dc(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...$s().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new Mc(c)}return i.translator=new Ii(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 yt=ko.createInstance();yt.createInstance;yt.dir;yt.init;yt.loadResources;yt.reloadResources;yt.use;yt.changeLanguage;yt.getFixedT;yt.t;yt.exists;yt.setDefaultNamespace;yt.hasLoadedNamespace;yt.loadNamespaces;yt.loadLanguages;const{slice:Xm,forEach:Qm}=[];function Jm(e){return Qm.call(Xm.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function eb(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 Pc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,tb=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(!Pc.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!Pc.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},Fc={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=tb(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 nb={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Fc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&Fc.create(n,e,r,o,i)}},rb={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 Fr=null;const Bc=()=>{if(Fr!==null)return Fr;try{if(Fr=typeof window<"u"&&window.localStorage!==null,!Fr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Fr=!1}return Fr};var ib={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Bc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Bc()&&window.localStorage.setItem(n,e)}};let Br=null;const zc=()=>{if(Br!==null)return Br;try{if(Br=typeof window<"u"&&window.sessionStorage!==null,!Br)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Br=!1}return Br};var sb={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)}},ab={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}},ub={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}},cb={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}},lb={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 Uf=!1;try{document.cookie,Uf=!0}catch{}const Kf=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Uf||Kf.splice(1,1);const db=()=>({order:Kf,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Hf{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=Jm(n,this.options||{},db()),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(nb),this.addDetector(rb),this.addDetector(ib),this.addDetector(sb),this.addDetector(ab),this.addDetector(ub),this.addDetector(cb),this.addDetector(lb),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&&!eb(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)}))}}Hf.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:"显示历史",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}"},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)"},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:"(无章节)"}},gb={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",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}"},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)"},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)"}},qf=yt.use(Hf).init({resources:{"zh-CN":{translation:fb},en:{translation:gb}},fallbackLng:"zh-CN",detection:{order:["localStorage","navigator"],lookupLocalStorage:"yorz.lang",caches:["localStorage"]},interpolation:{escapeValue:!1}});qf.then(()=>{});/**
|
|
2
|
+
* @license lucide-solid v1.24.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var pb={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"},zr=pb,hb=bt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),mb=U("<svg>"),bb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},yb=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),vb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Uc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xb=e=>{const t=vb(e);return t.charAt(0).toUpperCase()+t.slice(1)},wb=e=>{const[t,n]=Ee(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=pt(hb);return(()=>{var o=mb();return Gn(o,ee(zr,{get width(){return t.size??r.size??zr.width},get height(){return t.size??r.size??zr.height},get stroke(){return t.color??r.color??zr.stroke},get"stroke-width"(){return ce(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??zr["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??zr["stroke-width"])},get class(){return yb("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Uc(xb(t.name))}`,`lucide-${Uc(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!bb(n)?"true":void 0}},n),!0,!0),w(o,m(mt,{get each(){return t.iconNode},children:([i,s])=>m(Ef,ee({component:i},s))})),o})()},vt=wb,_b=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Eb=e=>m(vt,ee(e,{iconNode:_b,name:"check"})),Kc=Eb,kb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sb=e=>m(vt,ee(e,{iconNode:kb,name:"chevron-down"})),_u=Sb,Cb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ab=e=>m(vt,ee(e,{iconNode:Cb,name:"chevron-right"})),Tb=Ab,Db=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Ob=e=>m(vt,ee(e,{iconNode:Db,name:"chevrons-left"})),jf=Ob,Nb=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Rb=e=>m(vt,ee(e,{iconNode:Nb,name:"chevrons-right"})),Gf=Rb,Ib=[["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"}]],Mb=e=>m(vt,ee(e,{iconNode:Ib,name:"circle-question-mark"})),Lb=Mb,$b=[["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"}]],Pb=e=>m(vt,ee(e,{iconNode:$b,name:"ellipsis"})),Fb=Pb,Bb=[["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"}]],zb=e=>m(vt,ee(e,{iconNode:Bb,name:"git-branch"})),Ub=zb,Kb=[["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"}]],Hb=e=>m(vt,ee(e,{iconNode:Kb,name:"git-merge"})),qb=Hb,jb=[["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"}]],Gb=e=>m(vt,ee(e,{iconNode:jb,name:"languages"})),Vb=Gb,Wb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yb=e=>m(vt,ee(e,{iconNode:Wb,name:"loader-circle"})),tr=Yb,Zb=[["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"}]],Xb=e=>m(vt,ee(e,{iconNode:Zb,name:"maximize-2"})),Qb=Xb,Jb=[["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"}]],e1=e=>m(vt,ee(e,{iconNode:Jb,name:"minimize-2"})),t1=e1,n1=[["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"}]],r1=e=>m(vt,ee(e,{iconNode:n1,name:"paperclip"})),o1=r1,i1=[["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"}]],s1=e=>m(vt,ee(e,{iconNode:i1,name:"pencil"})),a1=s1,u1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c1=e=>m(vt,ee(e,{iconNode:u1,name:"plus"})),Eu=c1,l1=[["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"}]],d1=e=>m(vt,ee(e,{iconNode:l1,name:"refresh-cw"})),f1=d1,g1=[["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"}]],p1=e=>m(vt,ee(e,{iconNode:g1,name:"send"})),Ji=p1,h1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],m1=e=>m(vt,ee(e,{iconNode:h1,name:"square"})),b1=m1,y1=[["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"}]],v1=e=>m(vt,ee(e,{iconNode:y1,name:"upload"})),x1=v1,w1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_1=e=>m(vt,ee(e,{iconNode:w1,name:"x"})),jo=_1;function rt(e){return`/api/projects/${encodeURIComponent(e)}`}async function Qa(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Xe(e,t){const n=await fetch(e,t);if(!n.ok){const r=await Qa(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const ze={listSpecs:e=>Xe(`${rt(e)}/specs`),getSpec:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Xe(`${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 Qa(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),triggerReview:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/review`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),gitOp:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getChanges:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/changes`),directCommit:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directDiscard:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),directStash:(e,t,n)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/stash`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),getReview:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/review`),getDebug:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Xe("/api/projects"),removeProject:e=>Xe(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Xe(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Xe(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Xe(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Xe(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Xe(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),createDraft:e=>Xe(`${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 Qa(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Xe(`${rt(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Xe(`${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)=>Xe(`${rt(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Xe(`${rt(e)}/sessions`),createSession:(e,t={})=>Xe(`${rt(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Xe(`${rt(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Xe(`${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)=>Xe(`${rt(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Xe(`${rt(e)}/specs/${encodeURIComponent(t)}/session`)},[E1,Vf]=$("");function Vr(e){e&&Vf(e)}function k1(){Vf("")}const[Ot,S1]=$(C1());function C1(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function Go(){const e=Xi();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[or,Wf]=$(!1);function A1(){Wf(e=>!e)}function Mi(){Wf(!1)}function es(e){ie(Mi),oe(()=>{if(!or())return;const t=n=>{n.key!=="Escape"||e?.()||Mi()};window.addEventListener("keydown",t),ie(()=>window.removeEventListener("keydown",t))})}function T1(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class D1{clientId=T1();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 Or=new D1;function ts(e){const t=e;return t.readyState=()=>Or.readyState(),t}function O1(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Or.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ts(o)}function ns(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Or.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ts(o)}function Yf(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Or.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ts(r)}function Zf(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Or.subscribe(n,r=>{r==="list-updated"&&t()})}function Xf(e){return Or.subscribe("projects",t=>{t==="projects-changed"&&e()})}function N1(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}:changes`,o=Or.subscribe(r,(i,s)=>{i==="changes-updated"&&n(s.changes)});return ts(o)}function Qf(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 Jf(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=Jf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function e0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Jf(e))&&(r&&(r+=" "),r+=t);return r}const R1=(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},I1=(e,t)=>({classGroupId:e,validator:t}),t0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Li="-",Hc=[],M1="arbitrary..",L1=e=>{const t=P1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return $1(s);const a=s.split(Li),u=a[0]===""&&a.length>1?1:0;return n0(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?R1(c,u):u:c||Hc}return n[s]||Hc}}},n0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=n0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Li):e.slice(t).join(Li),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},$1=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?M1+r:void 0})(),P1=e=>{const{theme:t,classGroups:n}=e;return F1(n,t)},F1=(e,t)=>{const n=t0();for(const r in e){const o=e[r];ku(o,n,r,t)}return n},ku=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];B1(s,t,n,r)}},B1=(e,t,n,r)=>{if(typeof e=="string"){z1(e,t,n);return}if(typeof e=="function"){U1(e,t,n,r);return}K1(e,t,n,r)},z1=(e,t,n)=>{const r=e===""?t:r0(t,e);r.classGroupId=n},U1=(e,t,n,r)=>{if(H1(e)){ku(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(I1(n,e))},K1=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];ku(u,r0(t,a),n,r)}},r0=(e,t)=>{let n=e;const r=t.split(Li),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=t0(),n.nextPart.set(s,a)),n=a}return n},H1=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,q1=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)}}},Ja="!",qc=":",j1=[],jc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),G1=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===qc){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(Ja)?(f=d.slice(0,-1),p=!0):d.startsWith(Ja)&&(f=d.slice(1),p=!0);const g=c&&c>u?c-u:void 0;return jc(i,p,f,g)};if(t){const o=t+qc,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):jc(j1,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},V1=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}},W1=e=>({cache:q1(e.cacheSize),parseClassName:G1(e),sortModifiers:V1(e),postfixLookupClassGroupIds:Y1(e),...L1(e)}),Y1=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},Z1=/\s+/,X1=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Z1);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 D=b.substring(0,h);v=r(D);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+Ja:x,E=k+v;if(a.indexOf(E)>-1)continue;a.push(E);const C=o(v,y);for(let D=0;D<C.length;++D){const _=C[D];a.push(k+_)}c=d+(c.length>0?" "+c:c)}return c},Q1=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=o0(n))&&(o&&(o+=" "),o+=r);return o},o0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=o0(e[r]))&&(n&&(n+=" "),n+=t);return n},J1=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=W1(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=X1(u,n);return o(u,l),l};return i=s,(...u)=>i(Q1(...u))},ey=[],St=e=>{const t=n=>n[e]||ey;return t.isThemeGetter=!0,t},i0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,s0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ty=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ny=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ry=/\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$/,oy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xn=e=>ty.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),xn=e=>!!e&&Number.isInteger(Number(e)),Ps=e=>e.endsWith("%")&&He(e.slice(0,-1)),Fn=e=>ny.test(e),a0=()=>!0,ay=e=>ry.test(e)&&!oy.test(e),Su=()=>!1,uy=e=>iy.test(e),cy=e=>sy.test(e),ly=e=>!me(e)&&!be(e),dy=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)),fy=e=>fr(e,l0,Su),me=e=>i0.test(e),yr=e=>fr(e,d0,ay),Gc=e=>fr(e,xy,He),gy=e=>fr(e,g0,a0),py=e=>fr(e,f0,Su),Vc=e=>fr(e,u0,Su),hy=e=>fr(e,c0,cy),si=e=>fr(e,p0,uy),be=e=>s0.test(e),fo=e=>Nr(e,d0),my=e=>Nr(e,f0),Wc=e=>Nr(e,u0),by=e=>Nr(e,l0),yy=e=>Nr(e,c0),ai=e=>Nr(e,p0,!0),vy=e=>Nr(e,g0,!0),fr=(e,t,n)=>{const r=i0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nr=(e,t,n=!1)=>{const r=s0.exec(e);return r?r[1]?t(r[1]):n:!1},u0=e=>e==="position"||e==="percentage",c0=e=>e==="image"||e==="url",l0=e=>e==="length"||e==="size"||e==="bg-size",d0=e=>e==="length",xy=e=>e==="number",f0=e=>e==="family-name",g0=e=>e==="number"||e==="weight",p0=e=>e==="shadow",wy=()=>{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(),be,me],C=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],_=()=>[be,me,u],I=()=>[Xn,"full","auto",..._()],L=()=>[xn,"none","subgrid",be,me],A=()=>["auto",{span:["full",xn,be,me]},xn,be,me],N=()=>[xn,"auto",be,me],M=()=>["auto","min","max","fr",be,me],S=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",..._()],j=()=>[Xn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],z=()=>[Xn,"screen","full","dvw","lvw","svw","min","max","fit",..._()],H=()=>[Xn,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],P=()=>[e,be,me],J=()=>[...k(),Wc,Vc,{position:[be,me]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",by,fy,{size:[be,me]}],W=()=>[Ps,fo,yr],re=()=>["","none","full",c,be,me],ve=()=>["",He,fo,yr],_e=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[He,Ps,Wc,Vc],Te=()=>["","none",g,be,me],Ie=()=>["none",He,be,me],Je=()=>["none",He,be,me],lt=()=>[He,be,me],pe=()=>[Xn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[a0],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[ly],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",He],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xn,me,be,h]}],container:["container"],"container-type":[{"@container":["","normal","size",be,me]}],"container-named":[dy],columns:[{columns:[He,me,be,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:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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:[xn,"auto",be,me]}],basis:[{basis:[Xn,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Xn,"auto","initial","none",me]}],grow:[{grow:["",He,be,me]}],shrink:[{shrink:["",He,be,me]}],order:[{order:[xn,"first","last","none",be,me]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:A()}],"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:[...S(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...S()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":S()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...H()]}],"min-block-size":[{"min-block":["auto",...H()]}],"max-block-size":[{"max-block":["none",...H()]}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,fo,yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,vy,gy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ps,me]}],"font-family":[{font:[my,py,t]}],"font-features":[{"font-features":[me]}],"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,be,me]}],"line-clamp":[{"line-clamp":[He,"none",be,Gc]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",be,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,me]}],"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:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",be,yr]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[He,"auto",be,me]}],"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:[xn,be,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,me]}],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",be,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xn,be,me],radial:["",be,me],conic:[xn,be,me]},yy,hy]}],"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:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"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:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,be,me]}],"outline-w":[{outline:["",He,fo,yr]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",l,ai,si]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,ai,si]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[He,yr]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,ai,si]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[He,be,me]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"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":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"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":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"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":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"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":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"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":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"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":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[be,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"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":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"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:J()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,me]}],filter:[{filter:["","none",be,me]}],blur:[{blur:Te()}],brightness:[{brightness:[He,be,me]}],contrast:[{contrast:[He,be,me]}],"drop-shadow":[{"drop-shadow":["","none",p,ai,si]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",He,be,me]}],"hue-rotate":[{"hue-rotate":[He,be,me]}],invert:[{invert:["",He,be,me]}],saturate:[{saturate:[He,be,me]}],sepia:[{sepia:["",He,be,me]}],"backdrop-filter":[{"backdrop-filter":["","none",be,me]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[He,be,me]}],"backdrop-contrast":[{"backdrop-contrast":[He,be,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,be,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,be,me]}],"backdrop-invert":[{"backdrop-invert":["",He,be,me]}],"backdrop-opacity":[{"backdrop-opacity":[He,be,me]}],"backdrop-saturate":[{"backdrop-saturate":[He,be,me]}],"backdrop-sepia":[{"backdrop-sepia":["",He,be,me]}],"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",be,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",be,me]}],ease:[{ease:["linear","initial",y,be,me]}],delay:[{delay:[He,be,me]}],animate:[{animate:["none",v,be,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,be,me]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:lt()}],"skew-x":[{"skew-x":lt()}],"skew-y":[{"skew-y":lt()}],transform:[{transform:[be,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],zoom:[{zoom:[xn,be,me]}],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",be,me]}],"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",be,me]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[He,fo,yr,Gc]}],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"]}},_y=J1(wy);function Lt(...e){return _y(e0(e))}function Ey(e){return(...t)=>{for(const n of e)n&&n(...t)}}const Z=e=>typeof e=="function"&&!e.length?e():e,Yc=e=>Array.isArray(e)?e:e?[e]:[];function ky(e,...t){return typeof e=="function"?e(...t):e}const Sy=ie;function Cy(e,t,n,r){return e.addEventListener(t,n,r),Sy(e.removeEventListener.bind(e,t,n,r))}function Ay(e,t,n,r){const o=()=>{Yc(Z(e)).forEach(i=>{i&&Yc(Z(t)).forEach(s=>Cy(i,s,n,r))})};typeof e=="function"?oe(o):ue(o)}const Ty=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Zc(e){const t={};let n;for(;n=Ty.exec(e);)t[n[1]]=n[2];return t}function Rr(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Zc(e)}else typeof t=="string"&&(t=Zc(t));return{...e,...t}}function xt(...e){return Ey(e)}function Dy(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function eu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oy(e){return typeof e=="number"}function jr(e){return Object.prototype.toString.call(e)==="[object String]"}function h0(e){return typeof e=="function"}function gr(e){return t=>`${e()}-${t}`}function zt(e,t){return e?e===t||e.contains(t):!1}function xo(e,t=!1){const{activeElement:n}=nn(e);if(!n?.nodeName)return null;if(b0(n)&&n.contentDocument)return xo(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 m0(e){return nn(e).defaultView||window}function nn(e){return e?e.ownerDocument||e:document}function b0(e){return e.tagName==="IFRAME"}var Cu=(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))(Cu||{});function Au(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function rs(){return Au(/^Mac/i)}function Ny(){return Au(/^iPhone/i)}function Ry(){return Au(/^iPad/i)||rs()&&navigator.maxTouchPoints>1}function Iy(){return Ny()||Ry()}function My(){return rs()||Iy()}function Qe(e,t){return t&&(h0(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Rt(e){return t=>{for(const n of e)Qe(t,n)}}function Ly(e){return rs()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Nt(e){if(e)if($y())e.focus({preventScroll:!0});else{const t=Py(e);e.focus(),Fy(t)}}var ui=null;function $y(){if(ui==null){ui=!1;try{document.createElement("div").focus({get preventScroll(){return ui=!0,!0}})}catch{}}return ui}function Py(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 Fy(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var y0=["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'])"],By=[...y0,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Tu=`${y0.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,zy=By.join(':not([hidden]):not([tabindex="-1"]),');function v0(e,t){const r=Array.from(e.querySelectorAll(Tu)).filter(Xc);return t&&Xc(e)&&r.unshift(e),r.forEach((o,i)=>{if(b0(o)&&o.contentDocument){const s=o.contentDocument.body,a=v0(s,!1);r.splice(i,1,...a)}}),r}function Xc(e){return x0(e)&&!Uy(e)}function x0(e){return e.matches(Tu)&&Du(e)}function Uy(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Du(e,t){return e.nodeName!=="#comment"&&Ky(e)&&Hy(e,t)&&(!e.parentElement||Du(e.parentElement,e))}function Ky(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 Hy(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function qy(e,t,n){const r=t?.tabbable?zy:Tu,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Du(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Qc(e){let t=e;for(;t&&!jy(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function jy(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Gy(){}function Vy(e){return[e.clientX,e.clientY]}function w0(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 je(e,t){return ee(e,t)}var go=new Map,Jc=new Set;function el(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=go.get(n.target);r||(r=new Set,go.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=go.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),go.delete(n.target)),go.size===0)){for(const o of Jc)o();Jc.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?el():document.addEventListener("DOMContentLoaded",el));function tu(e,t){const n=tl(e,t,"left"),r=tl(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 tl(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 Wy(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Qc(e);for(;e&&o&&e!==n&&o!==n;)tu(o,e),e=o,o=Qc(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 _0={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 os(e,t){const[n,r]=$(nl(t?.()));return oe(()=>{r(e()?.tagName.toLowerCase()||nl(t?.()))}),n}function nl(e){return jr(e)?e:void 0}function st(e){const[t,n]=Ee(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return m(Ef,ee(n,{get component(){return t.as}}))}var Yy=Object.defineProperty,Ir=(e,t)=>{for(var n in t)Yy(e,n,{get:t[n],enumerable:!0})},Zy={};Ir(Zy,{Button:()=>E0,Root:()=>io});var Xy=["button","color","file","image","reset","submit"];function Qy(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Xy.indexOf(e.type)!==-1:!1}function io(e){let t;const n=je({type:"button"},e),[r,o]=Ee(n,["ref","type","disabled"]),i=os(()=>t,()=>"button"),s=ne(()=>{const c=i();return c==null?!1:Qy({tagName:c,type:r.type})}),a=ne(()=>i()==="input"),u=ne(()=>i()==="a"&&t?.getAttribute("href")!=null);return m(st,ee({as:"button",ref(c){var l=xt(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return ce(()=>!!(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 ce(()=>!!(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 E0=io;const rl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ol=e0,k0=(e,t)=>n=>{var r;if(t?.variants==null)return ol(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=rl(l)||rl(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 ol(e,s,u,n?.class,n?.className)},Jy=k0("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"}}),Ue=e=>{const[t,n]=Ee(e,["class","variant","size"]);return m(E0,ee({get class(){return Lt(Jy({size:t.size,variant:t.variant}),t.class)}},n))};var ev=U("<div>");const tv=k0("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"}}),S0=e=>{const[t,n]=Ee(e,["class","variant"]);return(()=>{var r=ev();return Gn(r,ee({get class(){return Lt(tv({variant:t.variant}),t.class)}},n),!1,!1),r})()},[nv,C0]=$(yt.language||"zh-CN"),[rv,ov]=$(yt.isInitialized);qf.then(()=>{C0(yt.language||"zh-CN"),ov(!0)});yt.on("languageChanged",e=>C0(e));function T(e,t){return yt.t(e,t)}function A0(){return{t:T,lng:ne(()=>nv()),ready:ne(()=>rv()),changeLanguage:e=>yt.changeLanguage(e)}}const is=()=>{const e=()=>or()?T("specDetail.exitFullscreen"):T("specDetail.fullscreen");return m(Ue,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:A1,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return or()},get children(){return m(Y,{get when(){return or()},get fallback(){return m(Qb,{class:"h-3 w-3"})},get children(){return m(t1,{class:"h-3 w-3"})}})}})};var iv=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),sv=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function av(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return iv.has(n)}const t=e.split("-")[0];return sv.has(t)}function uv(e){return av(e)?"rtl":"ltr"}function T0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:uv(e)}}var nu=T0(),wo=new Set;function il(){nu=T0();for(const e of wo)e(nu)}function cv(){const[e,t]=$(nu),n=ne(()=>e());return Vt(()=>{wo.size===0&&window.addEventListener("languagechange",il),wo.add(t),ie(()=>{wo.delete(t),wo.size===0&&window.removeEventListener("languagechange",il)})}),{locale:()=>n().locale,direction:()=>n().direction}}var lv=bt();function pr(){const e=cv();return pt(lv)||e}var Fs=new Map;function dv(e){const{locale:t}=pr(),n=ne(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ne(()=>{const r=n();let o;return Fs.has(r)&&(o=Fs.get(r)),o||(o=new Intl.Collator(t(),e),Fs.set(r,o)),o})}const fv=["top","right","bottom","left"],ur=Math.min,Qt=Math.max,$i=Math.round,ci=Math.floor,An=e=>({x:e,y:e}),gv={left:"right",right:"left",bottom:"top",top:"bottom"};function ru(e,t,n){return Qt(e,ur(t,n))}function Mr(e,t){return typeof e=="function"?e(t):e}function cr(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function D0(e){return e==="x"?"y":"x"}function Ou(e){return e==="y"?"height":"width"}function Kn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Nu(e){return D0(Kn(e))}function pv(e,t,n){n===void 0&&(n=!1);const r=so(e),o=Nu(e),i=Ou(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Pi(s)),[s,Pi(s)]}function hv(e){const t=Pi(e);return[ou(e),t,ou(t)]}function ou(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const sl=["left","right"],al=["right","left"],mv=["top","bottom"],bv=["bottom","top"];function yv(e,t,n){switch(e){case"top":case"bottom":return n?t?al:sl:t?sl:al;case"left":case"right":return t?mv:bv;default:return[]}}function vv(e,t,n,r){const o=so(e);let i=yv(cr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ou)))),i}function Pi(e){const t=cr(e);return gv[t]+e.slice(t.length)}function xv(e){return{top:0,right:0,bottom:0,left:0,...e}}function O0(e){return typeof e!="number"?xv(e):{top:e,right:e,bottom:e,left:e}}function Fi(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 ul(e,t,n){let{reference:r,floating:o}=e;const i=Kn(t),s=Nu(t),a=Ou(s),u=cr(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(so(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 wv(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}=Mr(t,e),g=O0(p),h=a[f?d==="floating"?"reference":"floating":d],y=Fi(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=Fi(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 _v=50,Ev=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:wv},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}=ul(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:C}=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},C&&p<_v&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:l,y:d}=ul(c,f,u)),b=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:g}},kv=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}=Mr(e,t)||{};if(c==null)return{};const d=O0(l),f={x:n,y:r},p=Nu(o),g=Ou(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],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let D=C?C[x]:0;(!D||!await(s.isElement==null?void 0:s.isElement(C)))&&(D=a.floating[x]||i.floating[g]);const _=k/2-E/2,I=D/2-b[g]/2-1,L=ur(d[y],I),A=ur(d[v],I),N=L,M=D-b[g]-A,S=D/2-b[g]/2+_,R=ru(N,S,M),F=!u.arrow&&so(o)!=null&&S!==R&&i.reference[g]/2-(S<N?L:A)-b[g]/2<0,j=F?S<N?S-N:S-M:0;return{[p]:f[p]+j,data:{[p]:R,centerOffset:S-R-j,...F&&{alignmentOffset:j}},reset:F}}}),Sv=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}=Mr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=cr(o),v=Kn(a),x=cr(a)===a,k=await(u.isRTL==null?void 0:u.isRTL(c.floating)),E=f||(x||!b?[Pi(a)]:hv(a)),C=g!=="none";!f&&C&&E.push(...vv(a,b,g,k));const D=[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 S=pv(o,s,k);I.push(_[S[0]],_[S[1]])}if(L=[...L,{placement:o,overflows:I}],!I.every(S=>S<=0)){var A,N;const S=(((A=i.flip)==null?void 0:A.index)||0)+1,R=D[S];if(R&&(!(d==="alignment"?v!==Kn(R):!1)||L.every(z=>Kn(z.placement)===v?z.overflows[0]>0:!0)))return{data:{index:S,overflows:L},reset:{placement:R}};let F=(N=L.filter(j=>j.overflows[0]<=0).sort((j,z)=>j.overflows[1]-z.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(p){case"bestFit":{var M;const j=(M=L.filter(z=>{if(C){const H=Kn(z.placement);return H===v||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,P)=>H+P,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:M[0];j&&(F=j);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function cl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ll(e){return fv.some(t=>e[t]>=0)}const Cv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Mr(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=cl(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ll(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=cl(s,n.floating);return{data:{escapedOffsets:a,escaped:ll(a)}}}default:return{}}}}},Av=new Set(["left","top"]);async function Tv(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=cr(n),a=so(n),u=Kn(n)==="y",c=Av.has(s)?-1:1,l=i&&u?-1:1,d=Mr(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 Dv=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 Tv(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}}}}},Ov=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}=Mr(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),f=Kn(cr(o)),p=D0(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=ru(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=ru(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}}}}}},Nv=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}=Mr(e,t),l=await s.detectOverflow(t,c),d=cr(o),f=so(o),p=Kn(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=ur(b-l[h],v),E=ur(g-l[y],x),C=!t.middlewareData.shift;let D=k,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=v),C&&!f){const L=Qt(l.left,0),A=Qt(l.right,0),N=Qt(l.top,0),M=Qt(l.bottom,0);p?_=g-2*(L!==0||A!==0?L+A:Qt(l.left,l.right)):D=b-2*(N!==0||M!==0?N+M:Qt(l.top,l.bottom))}await u({...t,availableWidth:_,availableHeight:D});const I=await s.getDimensions(a.floating);return g!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function ss(){return typeof window<"u"}function ao(e){return N0(e)?(e.nodeName||"").toLowerCase():"#document"}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function On(e){var t;return(t=(N0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N0(e){return ss()?e instanceof Node||e instanceof tn(e).Node:!1}function pn(e){return ss()?e instanceof Element||e instanceof tn(e).Element:!1}function Vn(e){return ss()?e instanceof HTMLElement||e instanceof tn(e).HTMLElement:!1}function dl(e){return!ss()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function Vo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Rv(e){return/^(table|td|th)$/.test(ao(e))}function as(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Iv=/transform|translate|scale|rotate|perspective|filter/,Mv=/paint|layout|strict|content/,vr=e=>!!e&&e!=="none";let Bs;function Ru(e){const t=pn(e)?hn(e):e;return vr(t.transform)||vr(t.translate)||vr(t.scale)||vr(t.rotate)||vr(t.perspective)||!Iu()&&(vr(t.backdropFilter)||vr(t.filter))||Iv.test(t.willChange||"")||Mv.test(t.contain||"")}function Lv(e){let t=lr(e);for(;Vn(t)&&!Jr(t);){if(Ru(t))return t;if(as(t))return null;t=lr(t)}return null}function Iu(){return Bs==null&&(Bs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Bs}function Jr(e){return/^(html|body|#document)$/.test(ao(e))}function hn(e){return tn(e).getComputedStyle(e)}function us(e){return pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lr(e){if(ao(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dl(e)&&e.host||On(e);return dl(t)?t.host:t}function R0(e){const t=lr(e);return Jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&Vo(t)?t:R0(t)}function No(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=R0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=tn(o);if(i){const a=iu(s);return t.concat(s,s.visualViewport||[],Vo(o)?o:[],a&&n?No(a):[])}else return t.concat(o,No(o,[],n))}function iu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function I0(e){const t=hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=$i(n)!==i||$i(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Mu(e){return pn(e)?e:e.contextElement}function Zr(e){const t=Mu(e);if(!Vn(t))return An(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=I0(t);let s=(i?$i(n.width):n.width)/r,a=(i?$i(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $v=An(0);function M0(e){const t=tn(e);return!Iu()||!t.visualViewport?$v:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tn(e)?!1:t}function Tr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Mu(e);let s=An(1);t&&(r?pn(r)&&(s=Zr(r)):s=Zr(e));const a=Pv(i,n,r)?M0(i):An(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&&pn(r)?tn(r):r;let g=f,b=iu(g);for(;b&&r&&p!==g;){const h=Zr(b),y=b.getBoundingClientRect(),v=hn(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=iu(g)}}return Fi({width:l,height:d,x:u,y:c})}function cs(e,t){const n=us(e).scrollLeft;return t?t.left+n:Tr(On(e)).left+n}function L0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Fv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=On(r),a=t?as(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=An(1);const l=An(0),d=Vn(r);if((d||!d&&!i)&&((ao(r)!=="body"||Vo(s))&&(u=us(r)),d)){const p=Tr(r);c=Zr(r),l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}const f=s&&!d&&!i?L0(s,u):An(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 Bv(e){return Array.from(e.getClientRects())}function zv(e){const t=On(e),n=us(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+cs(e);const a=-n.scrollTop;return hn(r).direction==="rtl"&&(s+=Qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const fl=25;function Uv(e,t){const n=tn(e),r=On(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=Iu();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=cs(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<=fl&&(i-=g)}else c<=fl&&(i+=c);return{width:i,height:s,x:a,y:u}}function Kv(e,t){const n=Tr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?Zr(e):An(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 gl(e,t,n){let r;if(t==="viewport")r=Uv(e,n);else if(t==="document")r=zv(On(e));else if(pn(t))r=Kv(t,n);else{const o=M0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fi(r)}function $0(e,t){const n=lr(e);return n===t||!pn(n)||Jr(n)?!1:hn(n).position==="fixed"||$0(n,t)}function Hv(e,t){const n=t.get(e);if(n)return n;let r=No(e,[],!1).filter(a=>pn(a)&&ao(a)!=="body"),o=null;const i=hn(e).position==="fixed";let s=i?lr(e):e;for(;pn(s)&&!Jr(s);){const a=hn(s),u=Ru(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Vo(s)&&!u&&$0(e,s))?r=r.filter(l=>l!==s):o=a,s=lr(s)}return t.set(e,r),r}function qv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?as(t)?[]:Hv(t,this._c):[].concat(n),r],a=gl(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=gl(t,s[f],o);u=Qt(p.top,u),c=ur(p.right,c),l=ur(p.bottom,l),d=Qt(p.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function jv(e){const{width:t,height:n}=I0(e);return{width:t,height:n}}function Gv(e,t,n){const r=Vn(t),o=On(t),i=n==="fixed",s=Tr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=An(0);function c(){u.x=cs(o)}if(r||!r&&!i)if((ao(t)!=="body"||Vo(o))&&(a=us(t)),r){const p=Tr(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?L0(o,a):An(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 zs(e){return hn(e).position==="static"}function pl(e,t){if(!Vn(e)||hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return On(e)===n&&(n=n.ownerDocument.body),n}function P0(e,t){const n=tn(e);if(as(e))return n;if(!Vn(e)){let o=lr(e);for(;o&&!Jr(o);){if(pn(o)&&!zs(o))return o;o=lr(o)}return n}let r=pl(e,t);for(;r&&Rv(r)&&zs(r);)r=pl(r,t);return r&&Jr(r)&&zs(r)&&!Ru(r)?n:r||Lv(e)||n}const Vv=async function(e){const t=this.getOffsetParent||P0,n=this.getDimensions,r=await n(e.floating);return{reference:Gv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wv(e){return hn(e).direction==="rtl"}const F0={convertOffsetParentRelativeRectToViewportRelativeRect:Fv,getDocumentElement:On,getClippingRect:qv,getOffsetParent:P0,getElementRects:Vv,getClientRects:Bv,getDimensions:jv,getScale:Zr,isElement:pn,isRTL:Wv};function B0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yv(e,t){let n=null,r;const o=On(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=ci(d),b=ci(o.clientWidth-(l+f)),h=ci(o.clientHeight-(d+p)),y=ci(l),x={rootMargin:-g+"px "+-b+"px "+-h+"px "+-y+"px",threshold:Qt(0,ur(1,u))||1};let k=!0;function E(C){const D=C[0].intersectionRatio;if(D!==u){if(!k)return s();D?s(!1,D):r=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!B0(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 Zv(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=Mu(e),l=o||i?[...c?No(c):[],...t?No(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?Yv(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?Tr(e):null;u&&h();function h(){const y=Tr(e);b&&!B0(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 Xv=Dv,Qv=Ov,Jv=Sv,ex=Nv,tx=Cv,nx=kv,rx=(e,t,n)=>{const r=new Map,o={platform:F0,...n},i={...o.platform,_c:r};return Ev(e,t,{...o,platform:i})};var ox=U('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Lu=bt();function $u(){const e=pt(Lu);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var su=30,hl=su/2,ix={top:180,right:-90,bottom:0,left:90};function Wo(e){const t=$u(),n=je({size:su},e),[r,o]=Ee(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=sx(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*(su/r.size),d=()=>`rotate(${ix[i()]} ${hl} ${hl}) translate(0 2)`;return m(st,ee({as:"div",ref(f){var p=xt(t.setArrowRef,r.ref);typeof p=="function"&&p(f)},"aria-hidden":"true",get style(){return Rr({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=ox(),p=f.firstChild,g=p.firstChild;return g.nextSibling,ue(()=>ye(p,"transform",d())),f}}))}function sx(e){const[t,n]=$();return oe(()=>{const r=e();r&&n(m0(r).getComputedStyle(r))}),t}function ax(e){const t=$u(),[n,r]=Ee(e,["ref","style"]);return m(st,ee({as:"div",ref(o){var i=xt(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return Rr({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function ml(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 ux(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?ml(r):e?e.getBoundingClientRect():ml()}}}function cx(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var lx={top:"bottom",right:"left",bottom:"top",left:"right"};function dx(e,t){const[n,r]=e.split("-"),o=lx[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 fx(e){const t=je({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=()=>ux(t.anchorRef?.(),t.getAnchorRect),{direction:c}=pr();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=[Xv(({placement:C})=>{const D=!!C.split("-")[1];return{mainAxis:h,crossAxis:D?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const C=typeof t.flip=="string"?t.flip.split(" "):void 0;if(C!==void 0&&!C.every(cx))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(Jv({padding:t.overflowPadding,fallbackPlacements:C}))}(t.slide||t.overlap)&&y.push(Qv({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(ex({padding:t.overflowPadding,apply({availableWidth:C,availableHeight:D,rects:_}){const I=Math.round(_.reference.width);C=Math.floor(C),D=Math.floor(D),p.style.setProperty("--kb-popper-anchor-width",`${I}px`),p.style.setProperty("--kb-popper-content-available-width",`${C}px`),p.style.setProperty("--kb-popper-content-available-height",`${D}px`),t.sameWidth&&(p.style.width=`${I}px`),t.fitViewport&&(p.style.maxWidth=`${C}px`,p.style.maxHeight=`${D}px`)}})),t.hideWhenDetached&&y.push(tx({padding:t.detachedPadding})),g&&y.push(nx({element:g,padding:t.arrowPadding}));const v=await rx(f,p,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...F0,isRTL:()=>c()==="rtl"}});if(a(v.placement),t.onCurrentPlacementChange?.(v.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",dx(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:C,y:D}=v.middlewareData.arrow,_=v.placement.split("-")[0];Object.assign(g.style,{left:C!=null?`${C}px`:"",top:D!=null?`${D}px`:"",[_]:"100%"})}}oe(()=>{const f=u(),p=n();if(!f||!p)return;const g=Zv(f,p,l,{elementResize:typeof ResizeObserver=="function"});ie(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(Lu.Provider,{value:d,get children(){return t.children}})}var ls=Object.assign(fx,{Arrow:Wo,Context:Lu,usePopperContext:$u,Positioner:ax});function z0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=jr(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=jr(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(jr(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return jr(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(jr(u)||Oy(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=z0({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 gx(e,t=[]){return ne(()=>{const n=z0({dataSource:Z(e.dataSource),getKey:Z(e.getKey),getTextValue:Z(e.getTextValue),getDisabled:Z(e.getDisabled),getSectionChildren:Z(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function ds(e){const[t,n]=$(e.defaultValue?.()),r=ne(()=>e.value?.()!==void 0),o=ne(()=>r()?e.value?.():t());return[o,s=>{Ct(()=>{const a=ky(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function U0(e){const[t,n]=ds(e);return[()=>t()??!1,n]}function px(e){const[t,n]=ds(e);return[()=>t()??[],n]}var zn=class K0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof K0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function hx(e){const[t,n]=ds(e);return[()=>t()??new zn,n]}function H0(e){return My()?e.altKey:e.ctrlKey}function Gr(e){return rs()?e.metaKey:e.ctrlKey}function bl(e){return new zn(e)}function mx(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function bx(e){const t=je({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=$(!1),[o,i]=$(),s=ne(()=>{const b=Z(t.selectedKeys);return b!=null?bl(b):b}),a=ne(()=>{const b=Z(t.defaultSelectedKeys);return b!=null?bl(b):new zn}),[u,c]=hx({value:s,defaultValue:a,onChange:b=>t.onSelectionChange?.(b)}),[l,d]=$(Z(t.selectionBehavior)),f=()=>Z(t.selectionMode),p=()=>Z(t.disallowEmptySelection)??!1,g=b=>{(Z(t.allowDuplicateSelectionEvents)||!mx(b,u()))&&c(b)};return oe(()=>{const b=u();Z(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),oe(()=>{d(Z(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:p,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:g}}function yx(e){const[t,n]=$(""),[r,o]=$(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(Z(e.isDisabled))return;const a=Z(e.keyboardDelegate),u=Z(e.selectionManager);if(!a.getKeyForSearch)return;const c=vx(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&&xx(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 vx(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function xx(e){return e.split("").every(t=>t===e[0])}function wx(e,t,n){const o=ee({selectOnFocus:()=>Z(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=pr();let a={top:0,left:0};Ay(()=>Z(o.isVirtualized)?void 0:i(),"scroll",()=>{const h=i();h&&(a={top:h.scrollTop,left:h.scrollLeft})});const{typeSelectHandlers:u}=yx({isDisabled:()=>Z(o.disallowTypeAhead),keyboardDelegate:()=>Z(o.keyboardDelegate),selectionManager:()=>Z(o.selectionManager)}),c=()=>Z(o.orientation)??"vertical",l=h=>{Qe(h,u.onKeyDown),h.altKey&&h.key==="Tab"&&h.preventDefault();const y=t();if(!y?.contains(h.target))return;const v=Z(o.selectionManager),x=Z(o.selectOnFocus),k=_=>{_!=null&&(v.setFocusedKey(_),h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&!H0(h)&&v.replaceSelection(_))},E=Z(o.keyboardDelegate),C=Z(o.shouldFocusWrap),D=v.focusedKey();switch(h.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(E.getKeyBelow){h.preventDefault();let _;D!=null?_=E.getKeyBelow(D):_=E.getFirstKey?.(),_==null&&C&&(_=E.getFirstKey?.(D)),k(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(E.getKeyAbove){h.preventDefault();let _;D!=null?_=E.getKeyAbove(D):_=E.getLastKey?.(),_==null&&C&&(_=E.getLastKey?.(D)),k(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(E.getKeyLeftOf){h.preventDefault();const _=s()==="rtl";let I;D!=null?I=E.getKeyLeftOf(D):I=_?E.getFirstKey?.():E.getLastKey?.(),k(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(E.getKeyRightOf){h.preventDefault();const _=s()==="rtl";let I;D!=null?I=E.getKeyRightOf(D):I=_?E.getLastKey?.():E.getFirstKey?.(),k(I)}break}case"Home":if(E.getFirstKey){h.preventDefault();const _=E.getFirstKey(D,Gr(h));_!=null&&(v.setFocusedKey(_),Gr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"End":if(E.getLastKey){h.preventDefault();const _=E.getLastKey(D,Gr(h));_!=null&&(v.setFocusedKey(_),Gr(h)&&h.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(_):x&&v.replaceSelection(_))}break;case"PageDown":if(E.getKeyPageBelow&&D!=null){h.preventDefault();const _=E.getKeyPageBelow(D);k(_)}break;case"PageUp":if(E.getKeyPageAbove&&D!=null){h.preventDefault();const _=E.getKeyPageAbove(D);k(_)}break;case"a":Gr(h)&&v.selectionMode()==="multiple"&&Z(o.disallowSelectAll)!==!0&&(h.preventDefault(),v.selectAll());break;case"Escape":h.defaultPrevented||(h.preventDefault(),Z(o.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!Z(o.allowsTabNavigation)){if(h.shiftKey)y.focus();else{const _=qy(y,{tabbable:!0});let I,L;do L=_.lastChild(),L&&(I=L);while(L);I&&!I.contains(document.activeElement)&&Nt(I)}break}}},d=h=>{const y=Z(o.selectionManager),v=Z(o.keyboardDelegate),x=Z(o.selectOnFocus);if(y.isFocused()){h.currentTarget.contains(h.target)||y.setFocused(!1);return}if(h.currentTarget.contains(h.target)){if(y.setFocused(!0),y.focusedKey()==null){const k=C=>{C!=null&&(y.setFocusedKey(C),x&&y.replaceSelection(C))},E=h.relatedTarget;E&&h.currentTarget.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_FOLLOWING?k(y.lastSelectedKey()??v.getLastKey?.()):k(y.firstSelectedKey()??v.getFirstKey?.())}else if(!Z(o.isVirtualized)){const k=i();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const E=k.querySelector(`[data-key="${y.focusedKey()}"]`);E&&(Nt(E),tu(k,E))}}}},f=h=>{const y=Z(o.selectionManager);h.currentTarget.contains(h.relatedTarget)||y.setFocused(!1)},p=h=>{i()===h.target&&h.preventDefault()},g=()=>{const h=Z(o.autoFocus);if(!h)return;const y=Z(o.selectionManager),v=Z(o.keyboardDelegate);let x;h==="first"&&(x=v.getFirstKey?.()),h==="last"&&(x=v.getLastKey?.());const k=y.selectedKeys();k.size&&(x=k.values().next().value),y.setFocused(!0),y.setFocusedKey(x);const E=t();E&&x==null&&!Z(o.shouldUseVirtualFocus)&&Nt(E)};return Vt(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),oe(Mt([i,()=>Z(o.isVirtualized),()=>Z(o.selectionManager).focusedKey()],h=>{const[y,v,x]=h;if(v)x&&o.scrollToKey?.(x);else if(x&&y){const k=y.querySelector(`[data-key="${x}"]`);k&&tu(y,k)}})),{tabIndex:ne(()=>{if(!Z(o.shouldUseVirtualFocus))return Z(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:p,onFocusIn:d,onFocusOut:f}}function q0(e,t){const n=()=>Z(e.selectionManager),r=()=>Z(e.key),o=()=>Z(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Gr(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>Z(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=v=>{u()&&(c=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!Z(e.shouldSelectOnPressUp)&&i(v))},d=v=>{u()&&v.pointerType==="mouse"&&v.button===0&&Z(e.shouldSelectOnPressUp)&&Z(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{u()&&(Z(e.shouldSelectOnPressUp)&&!Z(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(v)},p=v=>{!u()||!["Enter"," "].includes(v.key)||(H0(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=ne(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),y=ne(()=>Z(e.virtualized)?void 0:r());return oe(Mt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,x,k,E,C])=>{v&&x===E&&C&&!k&&document.activeElement!==v&&(e.focus?e.focus():Nt(v))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:h,dataKey:y,onPointerDown:l,onPointerUp:d,onClick:f,onKeyDown:p,onMouseDown:g,onFocus:b}}var _x=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 zn(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 zn(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 zn([t],t,t):new zn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new zn;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 zn)}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}},yl=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 Ex(e){const t=bx(e),r=gx({dataSource:()=>Z(e.dataSource),getKey:()=>Z(e.getKey),getTextValue:()=>Z(e.getTextValue),getDisabled:()=>Z(e.getDisabled),getSectionChildren:()=>Z(e.getSectionChildren),factory:i=>e.filter?new yl(e.filter(i)):new yl(i)},[()=>e.filter]),o=new _x(r,t);return qa(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var kx=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 Sx(e,t,n){const r=dv({usage:"search",sensitivity:"base"}),o=ne(()=>{const i=Z(e.keyboardDelegate);return i||new kx(e.collection,t,r)});return wx({selectionManager:()=>Z(e.selectionManager),keyboardDelegate:o,autoFocus:()=>Z(e.autoFocus),deferAutoFocus:()=>Z(e.deferAutoFocus),shouldFocusWrap:()=>Z(e.shouldFocusWrap),disallowEmptySelection:()=>Z(e.disallowEmptySelection),selectOnFocus:()=>Z(e.selectOnFocus),disallowTypeAhead:()=>Z(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Z(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Z(e.allowsTabNavigation),isVirtualized:()=>Z(e.isVirtualized),scrollToKey:i=>Z(e.scrollToKey)?.(i),orientation:()=>Z(e.orientation)},t)}var j0=bt();function G0(){return pt(j0)}function Cx(){const e=G0();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function V0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ax(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&&V0(o,n))return r+1}return 0}function Tx(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:V0(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function W0(e,t){const n=Tx(e);e!==n&&t(n)}function Dx(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 Ox(e,t){oe(()=>{const n=setTimeout(()=>{W0(e(),t)});ie(()=>clearTimeout(n))})}function Nx(e,t){if(typeof IntersectionObserver!="function"){Ox(e,t);return}let n=[];oe(()=>{const r=()=>{const s=!!n.length;n=e(),s&&W0(e(),t)},o=Dx(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ie(()=>i.disconnect())})}function Rx(e={}){const[t,n]=px({value:()=>Z(e.items),onChange:i=>e.onItemsChange?.(i)});Nx(t,n);const r=i=>(n(s=>{const a=Ax(s,i);return Dy(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 Ix(e){const t=Cx(),n=je({shouldRegisterItem:!0},e);oe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ie(r)})}var Bi="data-kb-top-layer",Y0,au=!1,Tn=[];function Ro(e){return Tn.findIndex(t=>t.node===e)}function Mx(e){return Tn[Ro(e)]}function Lx(e){return Tn.length>0&&Tn[Tn.length-1].node===e}function Z0(){return Tn.filter(e=>e.isPointerBlocking)}function $x(){return[...Z0()].slice(-1)[0]}function Pu(){return Z0().length>0}function X0(e){const t=Ro($x()?.node);return Ro(e)<t}function Px(e){Tn.push(e)}function Fx(e){const t=Ro(e);t<0||Tn.splice(t,1)}function Bx(){for(const{node:e}of Tn)e.style.pointerEvents=X0(e)?"none":"auto"}function zx(e){if(Pu()&&!au){const t=nn(e);Y0=document.body.style.pointerEvents,t.body.style.pointerEvents="none",au=!0}}function Ux(e){if(Pu())return;const t=nn(e);t.body.style.pointerEvents=Y0,t.body.style.length===0&&t.body.removeAttribute("style"),au=!1}var Xt={layers:Tn,isTopMostLayer:Lx,hasPointerBlockingLayer:Pu,isBelowPointerBlockingLayer:X0,addLayer:Px,removeLayer:Fx,indexOf:Ro,find:Mx,assignPointerEventToLayers:Bx,disableBodyPointerEvents:zx,restoreBodyPointerEvents:Ux},Us="focusScope.autoFocusOnMount",Ks="focusScope.autoFocusOnUnmount",vl={bubbles:!1,cancelable:!0},xl={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=eu(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=eu(this.stack,e),this.active()?.resume()}};function Q0(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,_0),g},l=()=>{const g=t();return g?v0(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=xo(g);return!b||zt(g,b)?!1:x0(b)};oe(()=>{const g=t();if(!g)return;xl.add(o);const b=xo(g);if(!zt(g,b)){const y=new CustomEvent(Us,vl);g.addEventListener(Us,s),g.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{Nt(d()),xo(g)===b&&Nt(g)},0)}ie(()=>{g.removeEventListener(Us,s),setTimeout(()=>{const y=new CustomEvent(Ks,vl);p()&&y.preventDefault(),g.addEventListener(Ks,a),g.dispatchEvent(y),y.defaultPrevented||Nt(b??u().body),g.removeEventListener(Ks,a),xl.remove(o)},0)})}),oe(()=>{const g=t();if(!g||!Z(e.trapFocus)||n())return;const b=y=>{const v=y.target;v?.closest(`[${Bi}]`)||(zt(g,v)?i=v:Nt(i))},h=y=>{const x=y.relatedTarget??xo(g);x?.closest(`[${Bi}]`)||zt(g,x)||Nt(i)};u().addEventListener("focusin",b),u().addEventListener("focusout",h),ie(()=>{u().removeEventListener("focusin",b),u().removeEventListener("focusout",h)})}),oe(()=>{const g=t();if(!g||!Z(e.trapFocus)||n())return;const b=c();g.insertAdjacentElement("afterbegin",b);const h=c();g.insertAdjacentElement("beforeend",h);function y(x){const k=d(),E=f();x.relatedTarget===k?Nt(E):Nt(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}),ie(()=>{b.removeEventListener("focusin",y),h.removeEventListener("focusin",y),b.remove(),h.remove(),v.disconnect()})})}var Kx="data-live-announcer";function J0(e){oe(()=>{Z(e.isDisabled)||ie(Hx(Z(e.targets),Z(e.root)))})}var po=new WeakMap,an=[];function Hx(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const f of u.querySelectorAll(`[${Kx}], [${Bi}]`))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=po.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),po.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=po.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),po.delete(u)):po.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 qx(e){const t=n=>{n.key===Cu.Escape&&e.onEscapeKeyDown?.(n)};oe(()=>{if(Z(e.isDisabled))return;const n=e.ownerDocument?.()??nn();n.addEventListener("keydown",t),ie(()=>{n.removeEventListener("keydown",t)})})}var wl="interactOutside.pointerDownOutside",_l="interactOutside.focusOutside";function jx(e,t){let n,r=Gy;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(`[${Bi}]`)||!zt(o(),f)||zt(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=d=>{function f(){const p=t(),g=d.target;if(!p||!g||!u(d))return;const b=Rt([i,a]);g.addEventListener(wl,b,{once:!0});const h=new CustomEvent(wl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Ly(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=Rt([s,a]);p.addEventListener(_l,g,{once:!0});const b=new CustomEvent(_l,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});p.dispatchEvent(b)};oe(()=>{Z(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ie(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var eg=bt();function Gx(){return pt(eg)}function Fu(e){let t;const n=Gx(),[r,o]=Ee(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?.()}};jx({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>zt(f(),d))||[...i].some(f=>zt(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),qx({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),ie(()=>{t&&(Xt.removeLayer(t),d?.(),Xt.assignPointerEventToLayers(),Xt.restoreBodyPointerEvents(t))})}),oe(Mt([()=>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),ie(()=>{Xt.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return m(eg.Provider,{value:l,get children(){return m(st,ee({as:"div",ref(d){var f=xt(p=>t=p,r.ref);typeof f=="function"&&f(d)}},o))}})}function Yo(e={}){const[t,n]=U0({value:()=>Z(e.open),defaultValue:()=>!!Z(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function tg(e={}){const[t,n]=U0({value:()=>Z(e.isSelected),defaultValue:()=>!!Z(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(i)},toggle:()=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(!t())}}}function Gt(e){return t=>(e(t),()=>e(void 0))}var Ft=e=>typeof e=="function"?e():e,uu=(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},li=new Map,Vx=e=>{oe(()=>{const t=Ft(e.style)??{},n=Ft(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=li.get(e.key);o?o.activeCount++:li.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);ie(()=>{const i=li.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}li.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?.()}})})},El=Vx,Wx=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Yx=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Zx=(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]=Wx(o,t),d=l-u-r*c;(c!==0||d!==0)&&Yx(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[kl,Sl]=$([]),Xx=e=>kl().indexOf(e)===kl().length-1,Qx=e=>{const t=ee({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=on();let r=[0,0],o=null,i=null;oe(()=>{Ft(t.enabled)&&(Sl(c=>[...c,n]),ie(()=>{Sl(c=>c.filter(l=>l!==n))}))}),oe(()=>{if(!Ft(t.enabled)||!Ft(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Ft(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];l>0&&(Ft(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;El({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Ft(t.restoreScrollPosition)&&l>0&&window.scrollTo(g,p)}})}else El({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),oe(()=>{!Xx(n)||!Ft(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ie(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=Cl(c),o=null,i=null},a=c=>{const l=c.target,d=Ft(t.element),f=Jx(c),p=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=p==="x"?f[0]:f[1],b=Al(l,p,g,d);let h;d&&uu(d,l)?h=!b:h=!0,h&&c.cancelable&&c.preventDefault()},u=c=>{const l=Ft(t.element),d=c.target;let f;if(c.touches.length===2)f=!Ft(t.allowPinchZoom);else{if(o==null||i===null){const p=Cl(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=Al(d,o,i,l);l&&uu(l,d)?f=!p:f=!0}}f&&c.cancelable&&c.preventDefault()}},Jx=e=>[e.deltaX,e.deltaY],Cl=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Al=(e,t,n,r)=>{const o=r!==null&&uu(r,e),[i,s]=Zx(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},ew=Qx,ng=ew,tw=e=>{const t=ne(()=>{const s=Ft(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=$(Ft(e.show)?"present":"hidden");let i="none";return oe(s=>{const a=Ft(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=Ft(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),ie(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},nw=tw,eo=nw,rw=bt();function fs(){return pt(rw)}var ow=bt();function rg(){return pt(ow)}var og=bt();function ig(){return pt(og)}function Wn(){const e=ig();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var sg=bt();function Bu(){const e=pt(sg);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var ag=bt();function Nn(){const e=pt(ag);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function zu(e){let t;const n=Nn(),r=Wn(),o=je({id:n.generateId(`item-${on()}`)},e),[i,s]=Ee(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)};Ix({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=>{Qe(I,i.onPointerMove),I.pointerType==="mouse"&&(i.disabled?r.onItemLeave(I):(r.onItemEnter(I),I.defaultPrevented||(Nt(I.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=I=>{Qe(I,i.onPointerLeave),I.pointerType==="mouse"&&r.onItemLeave(I)},k=I=>{Qe(I,i.onPointerUp),!i.disabled&&I.button===0&&h()},E=I=>{if(Qe(I,i.onKeyDown),!I.repeat&&!i.disabled)switch(I.key){case"Enter":case" ":h();break}},C=ne(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),D=ne(()=>({"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:D,setLabelRef:f,generateId:gr(()=>s.id),registerLabel:Gt(u),registerDescription:Gt(l)};return m(sg.Provider,{value:_,get children(){return m(st,ee({as:"div",ref(I){var L=xt(A=>t=A,i.ref);typeof L=="function"&&L(I)},get tabIndex(){return y.tabIndex()},get"aria-checked"(){return C()},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 Rt([i.onPointerDown,y.onPointerDown])},get onPointerUp(){return Rt([k,y.onPointerUp])},get onClick(){return Rt([i.onClick,y.onClick])},get onKeyDown(){return Rt([E,y.onKeyDown])},get onMouseDown(){return Rt([i.onMouseDown,y.onMouseDown])},get onFocus(){return Rt([i.onFocus,y.onFocus])},onPointerMove:v,onPointerLeave:x},D,s))}})}function ug(e){const t=je({closeOnSelect:!1},e),[n,r]=Ee(t,["checked","defaultChecked","onChange","onSelect"]),o=tg({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return m(zu,ee({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Io={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Io.next(e==="ltr"?"rtl":"ltr",t)},Tl={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function cg(e){const t=Nn(),n=Wn(),r=fs(),{direction:o}=pr(),i=je({id:t.generateId("trigger")},e),[s,a]=Ee(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=os(()=>n.triggerRef(),()=>"button"),l=ne(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);oe(Mt(()=>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=>{Qe(y,s.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!s.disabled&&y.pointerType!=="touch"&&y.button===0&&d()},p=y=>{Qe(y,s.onClick),s.disabled||y.currentTarget.dataset.pointerType==="touch"&&d()},g=y=>{if(Qe(y,s.onKeyDown),!s.disabled){if(l())switch(y.key){case"Enter":case" ":return}switch(y.key){case"Enter":case" ":case Tl.first(t.orientation()):y.stopPropagation(),y.preventDefault(),Wy(y.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case Tl.last(t.orientation()):y.stopPropagation(),y.preventDefault(),n.open("last");break;case Io.next(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.nextMenu();break;case Io.previous(o(),t.orientation()):if(r===void 0)break;y.stopPropagation(),y.preventDefault(),r.previousMenu();break}}},b=y=>{Qe(y,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},h=y=>{Qe(y,s.onFocus),r!==void 0&&y.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return oe(()=>ie(n.registerTriggerId(s.id))),m(io,ee({ref(y){var v=xt(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 ce(()=>!!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 lg(e){let t;const n=Nn(),r=Wn(),o=fs(),i=rg(),{direction:s}=pr(),a=je({id:n.generateId(`content-${on()}`)},e),[u,c]=Ee(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=Sx({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);Q0({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const p=x=>{if(zt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Io.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Io.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=>{Qe(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},y=x=>{if(Qe(x,u.onPointerMove),x.pointerType!=="mouse")return;const k=x.target,E=l!==x.clientX;zt(x.currentTarget,k)&&E&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};oe(()=>ie(r.registerContentId(u.id))),ie(()=>r.setContentRef(void 0));const v={ref:xt(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:Rt([u.onKeyDown,f.onKeyDown,p]),onMouseDown:Rt([u.onMouseDown,f.onMouseDown]),onFocusIn:Rt([u.onFocusIn,f.onFocusIn]),onFocusOut:Rt([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(st,ee({as:"div"},()=>r.dataset(),v,c))},get children(){return m(ls.Positioner,{get children(){return m(Fu,ee({get disableOutsidePointerEvents(){return ce(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return Rr({"--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 iw(e){let t;const n=Nn(),r=Wn(),[o,i]=Ee(e,["ref"]);return ng({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),m(lg,ee({ref(s){var a=xt(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var dg=bt();function sw(){const e=pt(dg);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Uu(e){const t=Nn(),n=je({id:t.generateId(`group-${on()}`)},e),[r,o]=$(),i={generateId:gr(()=>n.id),registerLabelId:Gt(o)};return m(dg.Provider,{value:i,get children(){return m(st,ee({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function fg(e){const t=sw(),n=je({id:t.generateId("label")},e),[r,o]=Ee(n,["id"]);return oe(()=>ie(t.registerLabelId(r.id))),m(st,ee({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function gg(e){const t=Wn(),n=je({children:"▼"},e);return m(st,ee({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function pg(e){return m(zu,ee({role:"menuitem",closeOnSelect:!0},e))}function hg(e){const t=Bu(),n=je({id:t.generateId("description")},e),[r,o]=Ee(n,["id"]);return oe(()=>ie(t.registerDescription(r.id))),m(st,ee({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function mg(e){const t=Bu(),n=je({id:t.generateId("indicator")},e),[r,o]=Ee(n,["forceMount"]);return m(Y,{get when(){return r.forceMount||t.isChecked()},get children(){return m(st,ee({as:"div"},()=>t.dataset(),o))}})}function bg(e){const t=Bu(),n=je({id:t.generateId("label")},e),[r,o]=Ee(n,["ref","id"]);return oe(()=>ie(t.registerLabel(r.id))),m(st,ee({as:"div",ref(i){var s=xt(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function yg(e){const t=Wn();return m(Y,{get when(){return t.contentPresent()},get children(){return m(vu,e)}})}var vg=bt();function aw(){const e=pt(vg);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function xg(e){const n=Nn().generateId(`radiogroup-${on()}`),r=je({id:n},e),[o,i]=Ee(r,["value","defaultValue","onChange","disabled"]),[s,a]=ds({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(vg.Provider,{value:u,get children(){return m(Uu,i)}})}function wg(e){const t=aw(),n=je({closeOnSelect:!1},e),[r,o]=Ee(n,["value","onSelect"]);return m(zu,ee({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function uw(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 cw(e,t){return t?w0([e.clientX,e.clientY],t):!1}function _g(e){const t=Nn(),n=G0(),r=ig(),o=fs(),i=rg(),s=je({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=Ee(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[f,p]=$(),[g,b]=$(),[h,y]=$(),[v,x]=$(),[k,E]=$(!0),[C,D]=$(u.placement),[_,I]=$([]),[L,A]=$([]),{DomCollectionProvider:N}=Rx({items:L,onItemsChange:A}),M=Yo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:X=>a.onOpenChange?.(X)}),{present:S}=eo({show:()=>t.forceMount()||M.isOpen(),element:()=>v()??null}),R=Ex({selectionMode:"none",dataSource:L}),F=X=>{E(X),M.open()},j=(X=!1)=>{M.close(),X&&r&&r.close(!0)},z=X=>{E(X),M.toggle()},H=()=>{const X=v();X&&(Nt(X),R.selectionManager().setFocused(!0),R.selectionManager().setFocusedKey(void 0))},P=()=>{i!=null?setTimeout(()=>H()):H()},J=X=>{I(Te=>[...Te,X]);const ge=r?.registerNestedMenu(X);return()=>{I(Te=>eu(Te,X)),ge?.()}},B=X=>d===l?.side&&cw(X,l?.area),K=X=>{B(X)&&X.preventDefault()},W=X=>{B(X)||P()},re=X=>{B(X)&&X.preventDefault()};J0({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[v(),..._()].filter(Boolean)}),oe(()=>{const X=v();if(!X||!r)return;const ge=r.registerNestedMenu(X);ie(()=>{ge()})}),oe(()=>{r===void 0&&o?.registerMenu(t.value(),[v(),..._()])}),oe(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(h()?.focus(),o.autoFocusMenu()&&F(!0)):j())}),oe(()=>{r!==void 0||o===void 0||M.isOpen()&&o.setValue(t.value())}),ie(()=>{r===void 0&&o?.unregisterMenu(t.value())});const _e={dataset:ne(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresent:S,nestedMenus:_,currentPlacement:C,pointerGraceTimeoutId:()=>c,autoFocus:k,listState:()=>R,parentMenuContext:()=>r,triggerRef:h,contentRef:v,triggerId:f,contentId:g,setTriggerRef:y,setContentRef:x,open:F,close:j,toggle:z,focusContent:P,onItemEnter:K,onItemLeave:W,onTriggerLeave:re,setPointerDir:X=>d=X,setPointerGraceTimeoutId:X=>c=X,setPointerGraceIntent:X=>l=X,registerNestedMenu:J,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:Gt(p),registerContentId:Gt(b)};return m(N,{get children(){return m(og.Provider,{value:_e,get children(){return m(Y,{when:i===void 0,get fallback(){return u.children},get children(){return m(ls,ee({anchorRef:h,contentRef:v,onCurrentPlacementChange:D},u))}})}})}})}function Eg(e){const{direction:t}=pr();return m(_g,ee({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var lw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function kg(e){const t=Wn(),n=Nn(),[r,o]=Ee(e,["onFocusOutside","onKeyDown"]),{direction:i}=pr();return m(lg,ee({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;zt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Qe(l,r.onKeyDown);const d=zt(l.currentTarget,l.target),f=lw.close(i(),n.orientation()).includes(l.key),p=t.parentMenuContext()!=null;d&&f&&p&&(t.close(),Nt(t.triggerRef()))}},o))}var Dl=["Enter"," "],dw={open:(e,t)=>e==="ltr"?[...Dl,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Dl,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Sg(e){let t;const n=Nn(),r=Wn(),o=je({id:n.generateId(`sub-trigger-${on()}`)},e),[i,s]=Ee(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}=pr(),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=>{Qe(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},h=x=>{if(Qe(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)),Nt(x.currentTarget),k?.listState().selectionManager().setFocused(!0),k?.listState().selectionManager().setFocusedKey(l()))}},y=x=>{if(Qe(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const k=r.parentMenuContext(),E=r.contentRef();if(E){k?.setPointerGraceIntent({area:uw(r.currentPlacement(),x,E),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(k?.pointerGraceTimeoutId());const C=window.setTimeout(()=>{k?.setPointerGraceIntent(null)},300);k?.setPointerGraceTimeoutId(C)}else{if(k?.onTriggerLeave(x),x.defaultPrevented)return;k?.setPointerGraceIntent(null)}k?.onItemLeave(x)},v=x=>{Qe(x,i.onKeyDown),!x.repeat&&(i.disabled||dw.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});ie(x)}),oe(Mt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ie(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),oe(()=>ie(r.registerTriggerId(i.id))),ie(()=>{u()}),m(st,ee({as:"div",ref(x){var k=xt(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 ce(()=>!!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 Rt([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return Rt([i.onPointerUp,g.onPointerUp])},get onClick(){return Rt([b,g.onClick])},get onKeyDown(){return Rt([v,g.onKeyDown])},get onMouseDown(){return Rt([i.onMouseDown,g.onMouseDown])},get onFocus(){return Rt([i.onFocus,g.onFocus])},onPointerMove:h,onPointerLeave:y},()=>r.dataset(),s))}function fw(e){const t=fs(),n=`menu-${on()}`,r=je({id:n,modal:!0},e),[o,i]=Ee(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Yo({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:gr(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return m(ag.Provider,{value:a,get children(){return m(_g,ee({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var gw={};Ir(gw,{Root:()=>gs,Separator:()=>Cg});function gs(e){let t;const n=je({orientation:"horizontal"},e),[r,o]=Ee(n,["ref","orientation"]),i=os(()=>t,()=>"hr");return m(st,ee({as:"hr",ref(s){var a=xt(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 Cg=gs,pw={};Ir(pw,{Arrow:()=>Wo,CheckboxItem:()=>ug,Content:()=>Ag,DropdownMenu:()=>jn,Group:()=>Uu,GroupLabel:()=>fg,Icon:()=>gg,Item:()=>pg,ItemDescription:()=>hg,ItemIndicator:()=>mg,ItemLabel:()=>bg,Portal:()=>yg,RadioGroup:()=>xg,RadioItem:()=>wg,Root:()=>Tg,Separator:()=>gs,Sub:()=>Eg,SubContent:()=>kg,SubTrigger:()=>Sg,Trigger:()=>cg});function Ag(e){const t=Nn(),n=Wn(),[r,o]=Ee(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return m(iw,ee({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||Nt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function Tg(e){const t=`dropdownmenu-${on()}`,n=je({id:t},e);return m(fw,n)}var jn=Object.assign(Tg,{Arrow:Wo,CheckboxItem:ug,Content:Ag,Group:Uu,GroupLabel:fg,Icon:gg,Item:pg,ItemDescription:hg,ItemIndicator:mg,ItemLabel:bg,Portal:yg,RadioGroup:xg,RadioItem:wg,Separator:gs,Sub:Eg,SubContent:kg,SubTrigger:Sg,Trigger:cg});const Dg=jn.Trigger;jn.Group;jn.Sub;jn.RadioGroup;const Og=e=>{const t=ee({gutter:4,flip:!1},e);return m(jn,t)},Ng=e=>{const[t,n]=Ee(e,["class"]);return m(jn.Portal,{get children(){return m(jn.Content,ee({get class(){return Lt("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))}})},cu=e=>{const[t,n]=Ee(e,["class","inset"]);return m(jn.Item,ee({get class(){return Lt("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 hw={};Ir(hw,{CloseButton:()=>Ig,Content:()=>Mg,Description:()=>Lg,Dialog:()=>Hn,Overlay:()=>$g,Portal:()=>Pg,Root:()=>Fg,Title:()=>Bg,Trigger:()=>zg,useDialogContext:()=>hr});var Rg=bt();function hr(){const e=pt(Rg);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Ig(e){const t=hr(),[n,r]=Ee(e,["aria-label","onClick"]);return m(io,ee({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Qe(i,n.onClick),t.close()}},r))}function Mg(e){let t;const n=hr(),r=je({id:n.generateId("content")},e),[o,i]=Ee(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)),zt(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{o.onCloseAutoFocus?.(f),n.modal()?(f.preventDefault(),Nt(n.triggerRef())):(f.defaultPrevented||(s||Nt(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return J0({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),ng({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Q0({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),oe(()=>ie(n.registerContentId(i.id))),m(Y,{get when(){return n.contentPresent()},get children(){return m(Fu,ee({ref(f){var p=xt(g=>{n.setContentRef(g),t=g},o.ref);typeof p=="function"&&p(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return ce(()=>!!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 Lg(e){const t=hr(),n=je({id:t.generateId("description")},e),[r,o]=Ee(n,["id"]);return oe(()=>ie(t.registerDescriptionId(r.id))),m(st,ee({as:"p",get id(){return r.id}},o))}function $g(e){const t=hr(),[n,r]=Ee(e,["ref","style","onPointerDown"]),o=i=>{Qe(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return m(Y,{get when(){return t.overlayPresent()},get children(){return m(st,ee({as:"div",ref(i){var s=xt(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return Rr({"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 Pg(e){const t=hr();return m(Y,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return m(vu,e)}})}var Ol={dismiss:"Dismiss"};function Fg(e){const t=`dialog-${on()}`,n=je({id:t,modal:!0,translations:Ol},e),[r,o]=$(),[i,s]=$(),[a,u]=$(),[c,l]=$(),[d,f]=$(),[p,g]=$(),b=Yo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:k=>n.onOpenChange?.(k)}),h=()=>n.forceMount||b.isOpen(),{present:y}=eo({show:h,element:()=>c()??null}),{present:v}=eo({show:h,element:()=>d()??null}),x={translations:()=>n.translations??Ol,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:gr(()=>n.id),registerContentId:Gt(o),registerTitleId:Gt(s),registerDescriptionId:Gt(u)};return m(Rg.Provider,{value:x,get children(){return n.children}})}function Bg(e){const t=hr(),n=je({id:t.generateId("title")},e),[r,o]=Ee(n,["id"]);return oe(()=>ie(t.registerTitleId(r.id))),m(st,ee({as:"h2",get id(){return r.id}},o))}function zg(e){const t=hr(),[n,r]=Ee(e,["ref","onClick"]);return m(io,ee({ref(i){var s=xt(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return ce(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Qe(i,n.onClick),t.toggle()}},r))}var Hn=Object.assign(Fg,{CloseButton:Ig,Content:Mg,Description:Lg,Overlay:$g,Portal:Pg,Title:Bg,Trigger:zg}),mw=U('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),Ug=U("<div>");const En=Hn;Hn.Trigger;const Mo=e=>{const[t,n]=Ee(e,["class","children"]);return m(Hn.Portal,{get children(){return[m(Hn.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(Hn.Content,{get class(){return Lt("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[ce(()=>t.children),m(Hn.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 mw()}})]}})]}})},Lo=e=>{const[t,n]=Ee(e,["class"]);return m(Hn.Title,ee({get class(){return Lt("text-lg font-semibold text-foreground",t.class)}},n))},Ku=e=>{const[t,n]=Ee(e,["class"]);return m(Hn.Description,ee({get class(){return Lt(" text-muted-foreground",t.class)}},n))},$o=e=>{const[t,n]=Ee(e,["class"]);return(()=>{var r=Ug();return Gn(r,ee({get class(){return Lt("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Po=e=>{const[t,n]=Ee(e,["class"]);return(()=>{var r=Ug();return Gn(r,ee({get class(){return Lt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var bw=U("<input>");const So=e=>{const[t,n]=Ee(e,["class"]);return(()=>{var r=bw();return Gn(r,ee({get class(){return Lt("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 yw=U("<div><div class=sonner-spinner>"),vw=U("<div class=sonner-loading-bar>"),xw=U('<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>'),ww=U('<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>'),_w=U('<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>'),Ew=U('<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>'),kw=U('<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>'),Sw=U("<div>"),Cw=U("<button data-close-button>"),Aw=U("<div data-icon>"),Tw=U("<div data-description>"),Dw=U("<li tabindex=0 data-sonner-toast><div data-content><div data-title>"),Ow=U("<button data-button data-cancel>"),Nw=U("<button data-button data-action>"),Rw=U('<section tabindex=-1 aria-live=polite aria-relevant="additions text"aria-atomic=false data-react-aria-top-layer>'),Iw=U("<ol tabindex=-1 data-sonner-toaster style=--width:356px>");function Mw(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))}Mw(`html[dir=ltr],
|
|
7
|
+
[data-sonner-toaster][dir=ltr] {
|
|
8
|
+
--toast-icon-margin-start: -3px;
|
|
9
|
+
--toast-icon-margin-end: 4px;
|
|
10
|
+
--toast-svg-margin-start: -1px;
|
|
11
|
+
--toast-svg-margin-end: 0px;
|
|
12
|
+
--toast-button-margin-start: auto;
|
|
13
|
+
--toast-button-margin-end: 0;
|
|
14
|
+
--toast-close-button-start: 0;
|
|
15
|
+
--toast-close-button-end: unset;
|
|
16
|
+
--toast-close-button-transform: translate(-35%, -35%);
|
|
17
|
+
}
|
|
18
|
+
html[dir=rtl],
|
|
19
|
+
[data-sonner-toaster][dir=rtl] {
|
|
20
|
+
--toast-icon-margin-start: 4px;
|
|
21
|
+
--toast-icon-margin-end: -3px;
|
|
22
|
+
--toast-svg-margin-start: 0px;
|
|
23
|
+
--toast-svg-margin-end: -1px;
|
|
24
|
+
--toast-button-margin-start: 0;
|
|
25
|
+
--toast-button-margin-end: auto;
|
|
26
|
+
--toast-close-button-start: unset;
|
|
27
|
+
--toast-close-button-end: 0;
|
|
28
|
+
--toast-close-button-transform: translate(35%, -35%);
|
|
29
|
+
}
|
|
30
|
+
[data-sonner-toaster] {
|
|
31
|
+
position: fixed;
|
|
32
|
+
width: var(--width);
|
|
33
|
+
font-family:
|
|
34
|
+
ui-sans-serif,
|
|
35
|
+
system-ui,
|
|
36
|
+
-apple-system,
|
|
37
|
+
BlinkMacSystemFont,
|
|
38
|
+
Segoe UI,
|
|
39
|
+
Roboto,
|
|
40
|
+
Helvetica Neue,
|
|
41
|
+
Arial,
|
|
42
|
+
Noto Sans,
|
|
43
|
+
sans-serif,
|
|
44
|
+
Apple Color Emoji,
|
|
45
|
+
Segoe UI Emoji,
|
|
46
|
+
Segoe UI Symbol,
|
|
47
|
+
Noto Color Emoji;
|
|
48
|
+
--gray1: hsl(0, 0%, 99%);
|
|
49
|
+
--gray2: hsl(0, 0%, 97.3%);
|
|
50
|
+
--gray3: hsl(0, 0%, 95.1%);
|
|
51
|
+
--gray4: hsl(0, 0%, 93%);
|
|
52
|
+
--gray5: hsl(0, 0%, 90.9%);
|
|
53
|
+
--gray6: hsl(0, 0%, 88.7%);
|
|
54
|
+
--gray7: hsl(0, 0%, 85.8%);
|
|
55
|
+
--gray8: hsl(0, 0%, 78%);
|
|
56
|
+
--gray9: hsl(0, 0%, 56.1%);
|
|
57
|
+
--gray10: hsl(0, 0%, 52.3%);
|
|
58
|
+
--gray11: hsl(0, 0%, 43.5%);
|
|
59
|
+
--gray12: hsl(0, 0%, 9%);
|
|
60
|
+
--border-radius: 8px;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
padding: 0;
|
|
63
|
+
margin: 0;
|
|
64
|
+
list-style: none;
|
|
65
|
+
outline: none;
|
|
66
|
+
z-index: 999999999;
|
|
67
|
+
transition: transform 400ms ease;
|
|
68
|
+
}
|
|
69
|
+
@media (hover: none) and (pointer: coarse) {
|
|
70
|
+
[data-sonner-toaster][data-lifted=true] {
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
[data-sonner-toaster][data-x-position=right] {
|
|
75
|
+
right: var(--offset-right);
|
|
76
|
+
}
|
|
77
|
+
[data-sonner-toaster][data-x-position=left] {
|
|
78
|
+
left: var(--offset-left);
|
|
79
|
+
}
|
|
80
|
+
[data-sonner-toaster][data-x-position=center] {
|
|
81
|
+
left: 50%;
|
|
82
|
+
transform: translateX(-50%);
|
|
83
|
+
}
|
|
84
|
+
[data-sonner-toaster][data-y-position=top] {
|
|
85
|
+
top: var(--offset-top);
|
|
86
|
+
}
|
|
87
|
+
[data-sonner-toaster][data-y-position=bottom] {
|
|
88
|
+
bottom: var(--offset-bottom);
|
|
89
|
+
}
|
|
90
|
+
[data-sonner-toast] {
|
|
91
|
+
--y: translateY(100%);
|
|
92
|
+
--lift-amount: calc(var(--lift) * var(--gap));
|
|
93
|
+
z-index: var(--z-index);
|
|
94
|
+
position: absolute;
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform: var(--y);
|
|
97
|
+
touch-action: none;
|
|
98
|
+
transition:
|
|
99
|
+
transform 400ms,
|
|
100
|
+
opacity 400ms,
|
|
101
|
+
height 400ms,
|
|
102
|
+
box-shadow 200ms;
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
outline: none;
|
|
105
|
+
overflow-wrap: anywhere;
|
|
106
|
+
}
|
|
107
|
+
[data-sonner-toast][data-styled=true] {
|
|
108
|
+
padding: 16px;
|
|
109
|
+
background: var(--normal-bg);
|
|
110
|
+
border: 1px solid var(--normal-border);
|
|
111
|
+
color: var(--normal-text);
|
|
112
|
+
border-radius: var(--border-radius);
|
|
113
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
|
|
114
|
+
width: var(--width);
|
|
115
|
+
font-size: 13px;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 6px;
|
|
119
|
+
}
|
|
120
|
+
[data-sonner-toast]:focus-visible {
|
|
121
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
|
|
122
|
+
}
|
|
123
|
+
[data-sonner-toast][data-y-position=top] {
|
|
124
|
+
top: 0;
|
|
125
|
+
--y: translateY(-100%);
|
|
126
|
+
--lift: 1;
|
|
127
|
+
--lift-amount: calc(1 * var(--gap));
|
|
128
|
+
}
|
|
129
|
+
[data-sonner-toast][data-y-position=bottom] {
|
|
130
|
+
bottom: 0;
|
|
131
|
+
--y: translateY(100%);
|
|
132
|
+
--lift: -1;
|
|
133
|
+
--lift-amount: calc(var(--lift) * var(--gap));
|
|
134
|
+
}
|
|
135
|
+
[data-sonner-toast][data-styled=true] [data-description] {
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
line-height: 1.4;
|
|
138
|
+
color: #3f3f3f;
|
|
139
|
+
}
|
|
140
|
+
[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description] {
|
|
141
|
+
color: inherit;
|
|
142
|
+
}
|
|
143
|
+
[data-sonner-toaster][data-sonner-theme=dark] [data-description] {
|
|
144
|
+
color: hsl(0, 0%, 91%);
|
|
145
|
+
}
|
|
146
|
+
[data-sonner-toast][data-styled=true] [data-title] {
|
|
147
|
+
font-weight: 500;
|
|
148
|
+
line-height: 1.5;
|
|
149
|
+
color: inherit;
|
|
150
|
+
}
|
|
151
|
+
[data-sonner-toast][data-styled=true] [data-icon] {
|
|
152
|
+
display: flex;
|
|
153
|
+
height: 16px;
|
|
154
|
+
width: 16px;
|
|
155
|
+
position: relative;
|
|
156
|
+
justify-content: flex-start;
|
|
157
|
+
align-items: center;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
margin-left: var(--toast-icon-margin-start);
|
|
160
|
+
margin-right: var(--toast-icon-margin-end);
|
|
161
|
+
}
|
|
162
|
+
[data-sonner-toast][data-promise=true] [data-icon] > svg {
|
|
163
|
+
opacity: 0;
|
|
164
|
+
transform: scale(0.8);
|
|
165
|
+
transform-origin: center;
|
|
166
|
+
animation: sonner-fade-in 300ms ease forwards;
|
|
167
|
+
}
|
|
168
|
+
[data-sonner-toast][data-styled=true] [data-icon] > * {
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
}
|
|
171
|
+
[data-sonner-toast][data-styled=true] [data-icon] svg {
|
|
172
|
+
margin-left: var(--toast-svg-margin-start);
|
|
173
|
+
margin-right: var(--toast-svg-margin-end);
|
|
174
|
+
}
|
|
175
|
+
[data-sonner-toast][data-styled=true] [data-content] {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
gap: 2px;
|
|
179
|
+
}
|
|
180
|
+
[data-sonner-toast][data-styled=true] [data-button] {
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
padding-left: 8px;
|
|
183
|
+
padding-right: 8px;
|
|
184
|
+
height: 24px;
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
color: var(--normal-bg);
|
|
187
|
+
background: var(--normal-text);
|
|
188
|
+
margin-left: var(--toast-button-margin-start);
|
|
189
|
+
margin-right: var(--toast-button-margin-end);
|
|
190
|
+
border: none;
|
|
191
|
+
font-weight: 500;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
outline: none;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
flex-shrink: 0;
|
|
197
|
+
transition: opacity 400ms, box-shadow 200ms;
|
|
198
|
+
}
|
|
199
|
+
[data-sonner-toast][data-styled=true] [data-button]:focus-visible {
|
|
200
|
+
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
|
|
201
|
+
}
|
|
202
|
+
[data-sonner-toast][data-styled=true] [data-button]:first-of-type {
|
|
203
|
+
margin-left: var(--toast-button-margin-start);
|
|
204
|
+
margin-right: var(--toast-button-margin-end);
|
|
205
|
+
}
|
|
206
|
+
[data-sonner-toast][data-styled=true] [data-cancel] {
|
|
207
|
+
color: var(--normal-text);
|
|
208
|
+
background: rgba(0, 0, 0, 0.08);
|
|
209
|
+
}
|
|
210
|
+
[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel] {
|
|
211
|
+
background: rgba(255, 255, 255, 0.3);
|
|
212
|
+
}
|
|
213
|
+
[data-sonner-toast][data-styled=true] [data-close-button] {
|
|
214
|
+
position: absolute;
|
|
215
|
+
left: var(--toast-close-button-start);
|
|
216
|
+
right: var(--toast-close-button-end);
|
|
217
|
+
top: 0;
|
|
218
|
+
height: 20px;
|
|
219
|
+
width: 20px;
|
|
220
|
+
display: flex;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
align-items: center;
|
|
223
|
+
padding: 0;
|
|
224
|
+
color: var(--normal-text);
|
|
225
|
+
background: var(--normal-bg);
|
|
226
|
+
border: 1px solid var(--normal-border);
|
|
227
|
+
transform: var(--toast-close-button-transform);
|
|
228
|
+
border-radius: 50%;
|
|
229
|
+
cursor: pointer;
|
|
230
|
+
z-index: 1;
|
|
231
|
+
transition:
|
|
232
|
+
opacity 100ms,
|
|
233
|
+
background 200ms,
|
|
234
|
+
border-color 200ms;
|
|
235
|
+
}
|
|
236
|
+
[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible {
|
|
237
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
|
|
238
|
+
}
|
|
239
|
+
[data-sonner-toast][data-styled=true] [data-disabled=true] {
|
|
240
|
+
cursor: not-allowed;
|
|
241
|
+
}
|
|
242
|
+
[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover {
|
|
243
|
+
background: var(--gray2);
|
|
244
|
+
border-color: var(--gray5);
|
|
245
|
+
}
|
|
246
|
+
[data-sonner-toast][data-swiping=true]::before {
|
|
247
|
+
content: "";
|
|
248
|
+
position: absolute;
|
|
249
|
+
left: -100%;
|
|
250
|
+
right: -100%;
|
|
251
|
+
height: 100%;
|
|
252
|
+
z-index: -1;
|
|
253
|
+
}
|
|
254
|
+
[data-sonner-toast][data-y-position=top][data-swiping=true]::before {
|
|
255
|
+
bottom: 50%;
|
|
256
|
+
transform: scaleY(3) translateY(50%);
|
|
257
|
+
}
|
|
258
|
+
[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before {
|
|
259
|
+
top: 50%;
|
|
260
|
+
transform: scaleY(3) translateY(-50%);
|
|
261
|
+
}
|
|
262
|
+
[data-sonner-toast][data-swiping=false][data-removed=true]::before {
|
|
263
|
+
content: "";
|
|
264
|
+
position: absolute;
|
|
265
|
+
inset: 0;
|
|
266
|
+
transform: scaleY(2);
|
|
267
|
+
}
|
|
268
|
+
[data-sonner-toast][data-expanded=true]::after {
|
|
269
|
+
content: "";
|
|
270
|
+
position: absolute;
|
|
271
|
+
left: 0;
|
|
272
|
+
height: calc(var(--gap) + 1px);
|
|
273
|
+
bottom: 100%;
|
|
274
|
+
width: 100%;
|
|
275
|
+
}
|
|
276
|
+
[data-sonner-toast][data-mounted=true] {
|
|
277
|
+
--y: translateY(0);
|
|
278
|
+
opacity: 1;
|
|
279
|
+
}
|
|
280
|
+
[data-sonner-toast][data-expanded=false][data-front=false] {
|
|
281
|
+
--scale: var(--toasts-before) * 0.05 + 1;
|
|
282
|
+
--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
|
|
283
|
+
height: var(--front-toast-height);
|
|
284
|
+
}
|
|
285
|
+
[data-sonner-toast] > * {
|
|
286
|
+
transition: opacity 400ms;
|
|
287
|
+
}
|
|
288
|
+
[data-sonner-toast][data-x-position=right] {
|
|
289
|
+
right: 0;
|
|
290
|
+
}
|
|
291
|
+
[data-sonner-toast][data-x-position=left] {
|
|
292
|
+
left: 0;
|
|
293
|
+
}
|
|
294
|
+
[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true] > * {
|
|
295
|
+
opacity: 0;
|
|
296
|
+
}
|
|
297
|
+
[data-sonner-toast][data-visible=false] {
|
|
298
|
+
opacity: 0;
|
|
299
|
+
pointer-events: none;
|
|
300
|
+
}
|
|
301
|
+
[data-sonner-toast][data-mounted=true][data-expanded=true] {
|
|
302
|
+
--y: translateY(calc(var(--lift) * var(--offset)));
|
|
303
|
+
height: var(--initial-height);
|
|
304
|
+
}
|
|
305
|
+
[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false] {
|
|
306
|
+
--y: translateY(calc(var(--lift) * -100%));
|
|
307
|
+
opacity: 0;
|
|
308
|
+
}
|
|
309
|
+
[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true] {
|
|
310
|
+
--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
|
|
311
|
+
opacity: 0;
|
|
312
|
+
}
|
|
313
|
+
[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false] {
|
|
314
|
+
--y: translateY(40%);
|
|
315
|
+
opacity: 0;
|
|
316
|
+
transition: transform 500ms, opacity 200ms;
|
|
317
|
+
}
|
|
318
|
+
[data-sonner-toast][data-removed=true][data-front=false]::before {
|
|
319
|
+
height: calc(var(--initial-height) + 20%);
|
|
320
|
+
}
|
|
321
|
+
[data-sonner-toast][data-swiping=true] {
|
|
322
|
+
transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
|
|
323
|
+
transition: none;
|
|
324
|
+
}
|
|
325
|
+
[data-sonner-toast][data-swiped=true] {
|
|
326
|
+
-webkit-user-select: none;
|
|
327
|
+
user-select: none;
|
|
328
|
+
}
|
|
329
|
+
[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],
|
|
330
|
+
[data-sonner-toast][data-swipe-out=true][data-y-position=top] {
|
|
331
|
+
animation-duration: 200ms;
|
|
332
|
+
animation-timing-function: ease-out;
|
|
333
|
+
animation-fill-mode: forwards;
|
|
334
|
+
}
|
|
335
|
+
[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left] {
|
|
336
|
+
animation-name: swipe-out-left;
|
|
337
|
+
}
|
|
338
|
+
[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right] {
|
|
339
|
+
animation-name: swipe-out-right;
|
|
340
|
+
}
|
|
341
|
+
[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up] {
|
|
342
|
+
animation-name: swipe-out-up;
|
|
343
|
+
}
|
|
344
|
+
[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down] {
|
|
345
|
+
animation-name: swipe-out-down;
|
|
346
|
+
}
|
|
347
|
+
@keyframes swipe-out-left {
|
|
348
|
+
from {
|
|
349
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
350
|
+
opacity: 1;
|
|
351
|
+
}
|
|
352
|
+
to {
|
|
353
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
|
|
354
|
+
opacity: 0;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
@keyframes swipe-out-right {
|
|
358
|
+
from {
|
|
359
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
360
|
+
opacity: 1;
|
|
361
|
+
}
|
|
362
|
+
to {
|
|
363
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
|
|
364
|
+
opacity: 0;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
@keyframes swipe-out-up {
|
|
368
|
+
from {
|
|
369
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
370
|
+
opacity: 1;
|
|
371
|
+
}
|
|
372
|
+
to {
|
|
373
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
|
|
374
|
+
opacity: 0;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
@keyframes swipe-out-down {
|
|
378
|
+
from {
|
|
379
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
380
|
+
opacity: 1;
|
|
381
|
+
}
|
|
382
|
+
to {
|
|
383
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
|
|
384
|
+
opacity: 0;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
@media (max-width: 600px) {
|
|
388
|
+
[data-sonner-toaster] {
|
|
389
|
+
position: fixed;
|
|
390
|
+
right: var(--mobile-offset-right);
|
|
391
|
+
left: var(--mobile-offset-left);
|
|
392
|
+
width: 100%;
|
|
393
|
+
}
|
|
394
|
+
[data-sonner-toaster][dir=rtl] {
|
|
395
|
+
left: calc(var(--mobile-offset-left) * -1);
|
|
396
|
+
}
|
|
397
|
+
[data-sonner-toaster] [data-sonner-toast] {
|
|
398
|
+
left: 0;
|
|
399
|
+
right: 0;
|
|
400
|
+
width: calc(100% - var(--mobile-offset-left) * 2);
|
|
401
|
+
}
|
|
402
|
+
[data-sonner-toaster][data-x-position=left] {
|
|
403
|
+
left: var(--mobile-offset-left);
|
|
404
|
+
}
|
|
405
|
+
[data-sonner-toaster][data-y-position=bottom] {
|
|
406
|
+
bottom: var(--mobile-offset-bottom);
|
|
407
|
+
}
|
|
408
|
+
[data-sonner-toaster][data-y-position=top] {
|
|
409
|
+
top: var(--mobile-offset-top);
|
|
410
|
+
}
|
|
411
|
+
[data-sonner-toaster][data-x-position=center] {
|
|
412
|
+
left: var(--mobile-offset-left);
|
|
413
|
+
right: var(--mobile-offset-right);
|
|
414
|
+
transform: none;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
[data-sonner-toaster][data-sonner-theme=light] {
|
|
418
|
+
--normal-bg: #fff;
|
|
419
|
+
--normal-border: var(--gray4);
|
|
420
|
+
--normal-text: var(--gray12);
|
|
421
|
+
--success-bg: hsl(143, 85%, 96%);
|
|
422
|
+
--success-border: hsl(145, 92%, 87%);
|
|
423
|
+
--success-text: hsl(140, 100%, 27%);
|
|
424
|
+
--info-bg: hsl(208, 100%, 97%);
|
|
425
|
+
--info-border: hsl(221, 91%, 93%);
|
|
426
|
+
--info-text: hsl(210, 92%, 45%);
|
|
427
|
+
--warning-bg: hsl(49, 100%, 97%);
|
|
428
|
+
--warning-border: hsl(49, 91%, 84%);
|
|
429
|
+
--warning-text: hsl(31, 92%, 45%);
|
|
430
|
+
--error-bg: hsl(359, 100%, 97%);
|
|
431
|
+
--error-border: hsl(359, 100%, 94%);
|
|
432
|
+
--error-text: hsl(360, 100%, 45%);
|
|
433
|
+
}
|
|
434
|
+
[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true] {
|
|
435
|
+
--normal-bg: #000;
|
|
436
|
+
--normal-border: hsl(0, 0%, 20%);
|
|
437
|
+
--normal-text: var(--gray1);
|
|
438
|
+
}
|
|
439
|
+
[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true] {
|
|
440
|
+
--normal-bg: #fff;
|
|
441
|
+
--normal-border: var(--gray3);
|
|
442
|
+
--normal-text: var(--gray12);
|
|
443
|
+
}
|
|
444
|
+
[data-sonner-toaster][data-sonner-theme=dark] {
|
|
445
|
+
--normal-bg: #000;
|
|
446
|
+
--normal-bg-hover: hsl(0, 0%, 12%);
|
|
447
|
+
--normal-border: hsl(0, 0%, 20%);
|
|
448
|
+
--normal-border-hover: hsl(0, 0%, 25%);
|
|
449
|
+
--normal-text: var(--gray1);
|
|
450
|
+
--success-bg: hsl(150, 100%, 6%);
|
|
451
|
+
--success-border: hsl(147, 100%, 12%);
|
|
452
|
+
--success-text: hsl(150, 86%, 65%);
|
|
453
|
+
--info-bg: hsl(215, 100%, 6%);
|
|
454
|
+
--info-border: hsl(223, 43%, 17%);
|
|
455
|
+
--info-text: hsl(216, 87%, 65%);
|
|
456
|
+
--warning-bg: hsl(64, 100%, 6%);
|
|
457
|
+
--warning-border: hsl(60, 100%, 9%);
|
|
458
|
+
--warning-text: hsl(46, 87%, 65%);
|
|
459
|
+
--error-bg: hsl(358, 76%, 10%);
|
|
460
|
+
--error-border: hsl(357, 89%, 16%);
|
|
461
|
+
--error-text: hsl(358, 100%, 81%);
|
|
462
|
+
}
|
|
463
|
+
[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button] {
|
|
464
|
+
background: var(--normal-bg);
|
|
465
|
+
border-color: var(--normal-border);
|
|
466
|
+
color: var(--normal-text);
|
|
467
|
+
}
|
|
468
|
+
[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover {
|
|
469
|
+
background: var(--normal-bg-hover);
|
|
470
|
+
border-color: var(--normal-border-hover);
|
|
471
|
+
}
|
|
472
|
+
[data-rich-colors=true][data-sonner-toast][data-type=success] {
|
|
473
|
+
background: var(--success-bg);
|
|
474
|
+
border-color: var(--success-border);
|
|
475
|
+
color: var(--success-text);
|
|
476
|
+
}
|
|
477
|
+
[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button] {
|
|
478
|
+
background: var(--success-bg);
|
|
479
|
+
border-color: var(--success-border);
|
|
480
|
+
color: var(--success-text);
|
|
481
|
+
}
|
|
482
|
+
[data-rich-colors=true][data-sonner-toast][data-type=info] {
|
|
483
|
+
background: var(--info-bg);
|
|
484
|
+
border-color: var(--info-border);
|
|
485
|
+
color: var(--info-text);
|
|
486
|
+
}
|
|
487
|
+
[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button] {
|
|
488
|
+
background: var(--info-bg);
|
|
489
|
+
border-color: var(--info-border);
|
|
490
|
+
color: var(--info-text);
|
|
491
|
+
}
|
|
492
|
+
[data-rich-colors=true][data-sonner-toast][data-type=warning] {
|
|
493
|
+
background: var(--warning-bg);
|
|
494
|
+
border-color: var(--warning-border);
|
|
495
|
+
color: var(--warning-text);
|
|
496
|
+
}
|
|
497
|
+
[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button] {
|
|
498
|
+
background: var(--warning-bg);
|
|
499
|
+
border-color: var(--warning-border);
|
|
500
|
+
color: var(--warning-text);
|
|
501
|
+
}
|
|
502
|
+
[data-rich-colors=true][data-sonner-toast][data-type=error] {
|
|
503
|
+
background: var(--error-bg);
|
|
504
|
+
border-color: var(--error-border);
|
|
505
|
+
color: var(--error-text);
|
|
506
|
+
}
|
|
507
|
+
[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button] {
|
|
508
|
+
background: var(--error-bg);
|
|
509
|
+
border-color: var(--error-border);
|
|
510
|
+
color: var(--error-text);
|
|
511
|
+
}
|
|
512
|
+
.sonner-loading-wrapper {
|
|
513
|
+
--size: 16px;
|
|
514
|
+
height: var(--size);
|
|
515
|
+
width: var(--size);
|
|
516
|
+
position: absolute;
|
|
517
|
+
inset: 0;
|
|
518
|
+
z-index: 10;
|
|
519
|
+
}
|
|
520
|
+
.sonner-loading-wrapper[data-visible=false] {
|
|
521
|
+
transform-origin: center;
|
|
522
|
+
animation: sonner-fade-out 0.2s ease forwards;
|
|
523
|
+
}
|
|
524
|
+
.sonner-spinner {
|
|
525
|
+
position: relative;
|
|
526
|
+
top: 50%;
|
|
527
|
+
left: 50%;
|
|
528
|
+
height: var(--size);
|
|
529
|
+
width: var(--size);
|
|
530
|
+
}
|
|
531
|
+
.sonner-loading-bar {
|
|
532
|
+
animation: sonner-spin 1.2s linear infinite;
|
|
533
|
+
background: var(--gray11);
|
|
534
|
+
border-radius: 6px;
|
|
535
|
+
height: 8%;
|
|
536
|
+
left: -10%;
|
|
537
|
+
position: absolute;
|
|
538
|
+
top: -3.9%;
|
|
539
|
+
width: 24%;
|
|
540
|
+
}
|
|
541
|
+
.sonner-loading-bar:nth-child(1) {
|
|
542
|
+
animation-delay: -1.2s;
|
|
543
|
+
transform: rotate(0.0001deg) translate(146%);
|
|
544
|
+
}
|
|
545
|
+
.sonner-loading-bar:nth-child(2) {
|
|
546
|
+
animation-delay: -1.1s;
|
|
547
|
+
transform: rotate(30deg) translate(146%);
|
|
548
|
+
}
|
|
549
|
+
.sonner-loading-bar:nth-child(3) {
|
|
550
|
+
animation-delay: -1s;
|
|
551
|
+
transform: rotate(60deg) translate(146%);
|
|
552
|
+
}
|
|
553
|
+
.sonner-loading-bar:nth-child(4) {
|
|
554
|
+
animation-delay: -0.9s;
|
|
555
|
+
transform: rotate(90deg) translate(146%);
|
|
556
|
+
}
|
|
557
|
+
.sonner-loading-bar:nth-child(5) {
|
|
558
|
+
animation-delay: -0.8s;
|
|
559
|
+
transform: rotate(120deg) translate(146%);
|
|
560
|
+
}
|
|
561
|
+
.sonner-loading-bar:nth-child(6) {
|
|
562
|
+
animation-delay: -0.7s;
|
|
563
|
+
transform: rotate(150deg) translate(146%);
|
|
564
|
+
}
|
|
565
|
+
.sonner-loading-bar:nth-child(7) {
|
|
566
|
+
animation-delay: -0.6s;
|
|
567
|
+
transform: rotate(180deg) translate(146%);
|
|
568
|
+
}
|
|
569
|
+
.sonner-loading-bar:nth-child(8) {
|
|
570
|
+
animation-delay: -0.5s;
|
|
571
|
+
transform: rotate(210deg) translate(146%);
|
|
572
|
+
}
|
|
573
|
+
.sonner-loading-bar:nth-child(9) {
|
|
574
|
+
animation-delay: -0.4s;
|
|
575
|
+
transform: rotate(240deg) translate(146%);
|
|
576
|
+
}
|
|
577
|
+
.sonner-loading-bar:nth-child(10) {
|
|
578
|
+
animation-delay: -0.3s;
|
|
579
|
+
transform: rotate(270deg) translate(146%);
|
|
580
|
+
}
|
|
581
|
+
.sonner-loading-bar:nth-child(11) {
|
|
582
|
+
animation-delay: -0.2s;
|
|
583
|
+
transform: rotate(300deg) translate(146%);
|
|
584
|
+
}
|
|
585
|
+
.sonner-loading-bar:nth-child(12) {
|
|
586
|
+
animation-delay: -0.1s;
|
|
587
|
+
transform: rotate(330deg) translate(146%);
|
|
588
|
+
}
|
|
589
|
+
@keyframes sonner-fade-in {
|
|
590
|
+
0% {
|
|
591
|
+
opacity: 0;
|
|
592
|
+
transform: scale(0.8);
|
|
593
|
+
}
|
|
594
|
+
100% {
|
|
595
|
+
opacity: 1;
|
|
596
|
+
transform: scale(1);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
@keyframes sonner-fade-out {
|
|
600
|
+
0% {
|
|
601
|
+
opacity: 1;
|
|
602
|
+
transform: scale(1);
|
|
603
|
+
}
|
|
604
|
+
100% {
|
|
605
|
+
opacity: 0;
|
|
606
|
+
transform: scale(0.8);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
@keyframes sonner-spin {
|
|
610
|
+
0% {
|
|
611
|
+
opacity: 1;
|
|
612
|
+
}
|
|
613
|
+
100% {
|
|
614
|
+
opacity: 0.15;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
@media (prefers-reduced-motion) {
|
|
618
|
+
[data-sonner-toast],
|
|
619
|
+
[data-sonner-toast] > *,
|
|
620
|
+
.sonner-loading-bar {
|
|
621
|
+
transition: none !important;
|
|
622
|
+
animation: none !important;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
.sonner-loader {
|
|
626
|
+
position: absolute;
|
|
627
|
+
top: 50%;
|
|
628
|
+
left: 50%;
|
|
629
|
+
transform: translate(-50%, -50%);
|
|
630
|
+
transform-origin: center;
|
|
631
|
+
transition: opacity 200ms, transform 200ms;
|
|
632
|
+
}
|
|
633
|
+
.sonner-loader[data-visible=false] {
|
|
634
|
+
opacity: 0;
|
|
635
|
+
transform: scale(0.8) translate(-50%, -50%);
|
|
636
|
+
}
|
|
637
|
+
`);var Lw=Array(12).fill(0);function $w(e){return(()=>{var t=yw(),n=t.firstChild;return w(n,m(mt,{each:Lw,children:(r,o)=>(()=>{var i=vw();return ue(()=>ye(i,"data-index",o())),i})()})),ue(r=>{var o=["sonner-loading-wrapper",e.class??e.className].filter(Boolean).join(" "),i=e.visible;return o!==r.e&>(t,r.e=o),i!==r.t&&ye(t,"data-visible",r.t=i),r},{e:void 0,t:void 0}),t})()}function Pw(){return xw()}function Fw(){return ww()}function Bw(){return _w()}function zw(){return Ew()}function Uw(e){switch(e){case"success":return m(Pw,{});case"info":return m(Bw,{});case"warning":return m(Fw,{});case"error":return m(zw,{});default:return null}}function Kw(){return kw()}function Hw(){const[e,t]=$(typeof document<"u"?document.hidden:!1);return Vt(()=>{const n=()=>{t(document.hidden)};document.addEventListener("visibilitychange",n),ie(()=>{document.removeEventListener("visibilitychange",n)})}),e}var lu=1,qw=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:lu++,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],Gw(u))o=!1,this.create({id:n,type:"default",message:u});else if(jw(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=di(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=di(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=di(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=di(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||lu++;return this.create({jsx:e(n),...t,id:n}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function jw(e){return e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number"}function di(e){return typeof e=="object"&&e!==null&&"message"in e}function Gw(e){return typeof Node<"u"&&e instanceof Node}var qt=new qw;function Vw(e,t){const n=t?.id||lu++;return qt.addToast({title:e,...t,id:n}),n}var Ww=Vw,Yw=()=>qt.toasts,Zw=()=>qt.getActiveToasts(),Wr=Object.assign(Ww,{success:qt.success,info:qt.info,warning:qt.warning,error:qt.error,custom:qt.custom,message:qt.message,promise:qt.promise,dismiss:qt.dismiss,loading:qt.loading},{getHistory:Yw,getToasts:Zw});function Nl(e){return typeof e=="object"&&e!==null&&"label"in e}var Xw=3,Qw="24px",Jw="16px",Rl=4e3,Kg=14,e_=45,t_=200;function wn(...e){return e.filter(Boolean).join(" ")}function fi(e){return typeof e=="function"?e():e}function n_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function Il(){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 r_(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,s=i?"--mobile-offset":"--offset",a=i?Jw:Qw,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 du(e,t){return e??t}function fu(e,t){return e??t??""}function zi(e,t){return e??t??""}function o_(e){return e!=="system"?e:typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function i_(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,C=0,D=Rl;const[_,I]=$(null),L=()=>e.index===0,A=()=>e.index+1<=e.visibleToasts,N=()=>e.toast.type,M=()=>e.toast.dismissible!==!1,S=()=>du(e.classNames,e.classes),R=()=>zi(e.className,e.class),F=()=>fu(e.descriptionClassName,e.descriptionClass),j=()=>zi(e.toast.className,e.toast.class),z=()=>fu(e.toast.descriptionClassName,e.toast.descriptionClass),H=()=>du(e.toast.classNames,e.toast.classes),P=()=>e.toast.closeButton??e.closeButton,J=()=>e.toast.duration??e.duration??Rl,B=()=>e.toast.invert??e.invert,K=()=>N()==="loading",W=()=>e.swipeDirections??n_(e.position),re=ne(()=>e.position.split("-")[0]),ve=ne(()=>e.position.split("-")[1]),_e=ne(()=>Math.max(0,e.heights.findIndex(pe=>pe.toastId===e.toast.id))),X=ne(()=>e.heights.reduce((pe,Q,ae)=>ae>=_e()?pe:pe+Q.height,0)),ge=ne(()=>_e()*(e.gap??Kg)+X()),Te=Hw();oe(()=>{D=J()});function Ie(){o(!0),h(ge()),e.setHeights(pe=>pe.filter(Q=>Q.toastId!==e.toast.id)),window.setTimeout(()=>{e.removeToast(e.toast)},t_)}function Je(){return e.icons?.loading?(()=>{var pe=Sw();return w(pe,()=>e.icons.loading),ue(Q=>{var ae=wn(S()?.loader,H()?.loader,"sonner-loader"),Oe=N()==="loading";return ae!==Q.e&>(pe,Q.e=ae),Oe!==Q.t&&ye(pe,"data-visible",Q.t=Oe),Q},{e:void 0,t:void 0}),pe})():m($w,{get class(){return wn(S()?.loader,H()?.loader)},get visible(){return N()==="loading"}})}const lt=()=>e.toast.icon??e.icons?.[N()]??Uw(N());return Vt(()=>{if(n(!0),!x)return;const pe=x.getBoundingClientRect().height;v(pe),e.setHeights(Q=>[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:pe,position:e.toast.position},...Q]),ie(()=>{e.setHeights(Q=>Q.filter(ae=>ae.toastId!==e.toast.id))})}),oe(()=>{if(!t()||!x)return;fi(e.toast.title),fi(e.toast.description);const pe=x.style.height;x.style.height="auto";const Q=x.getBoundingClientRect().height;x.style.height=pe,v(Q),e.setHeights(ae=>ae.find(q=>q.toastId===e.toast.id)?ae.map(q=>q.toastId===e.toast.id?{...q,height:Q}:q):[{toastId:e.toast.id,toasterId:e.toast.toasterId,height:Q,position:e.toast.position},...ae])}),oe(Mt(()=>[e.expanded,e.interacting,e.toast,N(),Te(),J()],([pe,Q,ae,Oe])=>{if(ae.promise&&Oe==="loading"||ae.duration===Number.POSITIVE_INFINITY||Oe==="loading")return;let q;const ke=()=>{if(C<E){const We=new Date().getTime()-E;D-=We}C=new Date().getTime()},Ae=()=>{D!==Number.POSITIVE_INFINITY&&(E=new Date().getTime(),q=setTimeout(()=>{ae.onAutoClose?.(ae),Ie()},D))};pe||Q||(e.pauseWhenPageIsHidden??!0)&&Te()?ke():Ae(),ie(()=>{q&&clearTimeout(q)})})),oe(Mt(()=>e.toast.delete,pe=>{pe&&(Ie(),e.toast.onDismiss?.(e.toast))})),(()=>{var pe=Dw(),Q=pe.firstChild,ae=Q.firstChild;pe.$$pointermove=q=>{if(!_()||!M()||(window.getSelection()?.toString().length??0)>0)return;const ke=q.clientY-_().y,Ae=q.clientX-_().x;!d()&&(Math.abs(Ae)>1||Math.abs(ke)>1)&&f(Math.abs(Ae)>Math.abs(ke)?"x":"y");const Be={x:0,y:0},We=Kt=>1/(1.5+Math.abs(Kt)/20);d()==="y"?(W().includes("top")||W().includes("bottom"))&&(W().includes("top")&&ke<0||W().includes("bottom")&&ke>0?Be.y=ke:Be.y=ke*We(ke)):d()==="x"&&(W().includes("left")||W().includes("right"))&&(W().includes("left")&&Ae<0||W().includes("right")&&Ae>0?Be.x=Ae:Be.x=Ae*We(Ae)),(Math.abs(Be.x)>0||Math.abs(Be.y)>0)&&l(!0),x?.style.setProperty("--swipe-amount-x",`${Be.x}px`),x?.style.setProperty("--swipe-amount-y",`${Be.y}px`)},pe.$$pointerup=()=>{if(a()||!M())return;I(null);const q=Number(x?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),ke=Number(x?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),Ae=Math.max(1,new Date().getTime()-(k?.getTime()??0)),Be=d()==="x"?q:ke,We=Math.abs(Be)/Ae;if(Math.abs(Be)>=e_||We>.11){h(ge()),e.toast.onDismiss?.(e.toast),d()==="x"?g(q>0?"right":"left"):g(ke>0?"down":"up"),Ie(),u(!0);return}x?.style.setProperty("--swipe-amount-x","0px"),x?.style.setProperty("--swipe-amount-y","0px"),l(!1),s(!1),f(null)},pe.$$pointerdown=q=>{q.button!==2&&(K()||!M()||q.target.closest("button")||(k=new Date,h(ge()),q.currentTarget.setPointerCapture(q.pointerId),s(!0),I({x:q.clientX,y:q.clientY})))},pe.addEventListener("dragend",()=>{s(!1),f(null),I(null)});var Oe=x;return typeof Oe=="function"?qn(Oe,pe):x=pe,w(pe,m(Y,{get when(){return ce(()=>!!(P()&&!e.toast.jsx))()&&N()!=="loading"},get children(){var q=Cw();return q.$$click=()=>{K()||!M()||(Ie(),e.toast.onDismiss?.(e.toast))},q.$$pointerup=ke=>ke.stopPropagation(),q.$$pointerdown=ke=>ke.stopPropagation(),w(q,()=>e.icons?.close??m(Kw,{})),ue(ke=>{var Ae=e.closeButtonAriaLabel??"Close toast",Be=K(),We=wn(S()?.closeButton,H()?.closeButton);return Ae!==ke.e&&ye(q,"aria-label",ke.e=Ae),Be!==ke.t&&ye(q,"data-disabled",ke.t=Be),We!==ke.a&>(q,ke.a=We),ke},{e:void 0,t:void 0,a:void 0}),q}}),Q),w(pe,m(Y,{get when(){return ce(()=>!!((N()||e.toast.icon||e.toast.promise)&&e.toast.icon!==null))()&&(e.icons?.[N()]!==null||e.toast.icon)},get children(){var q=Aw();return w(q,(()=>{var ke=ce(()=>!!(e.toast.promise||e.toast.type==="loading"&&!e.toast.icon));return()=>ke()?e.toast.icon||Je():null})(),null),w(q,(()=>{var ke=ce(()=>e.toast.type!=="loading");return()=>ke()?lt():null})(),null),ue(()=>gt(q,wn(S()?.icon,H()?.icon))),q}}),Q),w(ae,(()=>{var q=ce(()=>!!e.toast.jsx);return()=>q()?e.toast.jsx:fi(e.toast.title)})()),w(Q,m(Y,{get when(){return e.toast.description},get children(){var q=Tw();return w(q,()=>fi(e.toast.description)),ue(()=>gt(q,wn(F(),z(),S()?.description,H()?.description))),q}}),null),w(pe,m(Y,{get when(){return e.toast.cancel},children:q=>m(Y,{get when(){return!Nl(q())},get fallback(){return(()=>{var ke=Ow();return ke.$$click=Ae=>{const Be=q();M()&&(Be.onClick?.(Ae),Ie())},w(ke,()=>q().label),ue(Ae=>{var Be=e.toast.cancelButtonStyle??e.cancelButtonStyle,We=wn(S()?.cancelButton,H()?.cancelButton);return Ae.e=rr(ke,Be,Ae.e),We!==Ae.t&>(ke,Ae.t=We),Ae},{e:void 0,t:void 0}),ke})()},get children(){return q()}})}),null),w(pe,m(Y,{get when(){return e.toast.action},children:q=>m(Y,{get when(){return!Nl(q())},get fallback(){return(()=>{var ke=Nw();return ke.$$click=Ae=>{q().onClick?.(Ae),!Ae.defaultPrevented&&Ie()},w(ke,()=>q().label),ue(Ae=>{var Be=e.toast.actionButtonStyle??e.actionButtonStyle,We=wn(S()?.actionButton,H()?.actionButton);return Ae.e=rr(ke,Be,Ae.e),We!==Ae.t&>(ke,Ae.t=We),Ae},{e:void 0,t:void 0}),ke})()},get children(){return q()}})}),null),ue(q=>{var ke=wn(R(),j(),S()?.toast,H()?.toast,S()?.default,S()?.[N()],H()?.[N()]),Ae=e.toast.richColors??e.defaultRichColors,Be=!(e.toast.jsx||e.toast.unstyled||e.unstyled),We=t(),Kt=!!e.toast.promise,At=c(),Ne=r(),et=A(),_t=re(),G=ve(),he=e.index,fe=L(),Ge=i(),$e=M(),Ye=N(),Et=B(),sn=a(),Mn=p(),Ln=!!(e.expanded||e.expandByDefault&&t()),ot=e.toast.testId,Ve={"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${r()?b():ge()}px`,"--initial-height":e.expandByDefault?"auto":`${y()}px`,...e.style,...e.toast.style},Pe=wn(S()?.content,H()?.content),nt=wn(S()?.title,H()?.title);return ke!==q.e&>(pe,q.e=ke),Ae!==q.t&&ye(pe,"data-rich-colors",q.t=Ae),Be!==q.a&&ye(pe,"data-styled",q.a=Be),We!==q.o&&ye(pe,"data-mounted",q.o=We),Kt!==q.i&&ye(pe,"data-promise",q.i=Kt),At!==q.n&&ye(pe,"data-swiped",q.n=At),Ne!==q.s&&ye(pe,"data-removed",q.s=Ne),et!==q.h&&ye(pe,"data-visible",q.h=et),_t!==q.r&&ye(pe,"data-y-position",q.r=_t),G!==q.d&&ye(pe,"data-x-position",q.d=G),he!==q.l&&ye(pe,"data-index",q.l=he),fe!==q.u&&ye(pe,"data-front",q.u=fe),Ge!==q.c&&ye(pe,"data-swiping",q.c=Ge),$e!==q.w&&ye(pe,"data-dismissible",q.w=$e),Ye!==q.m&&ye(pe,"data-type",q.m=Ye),Et!==q.f&&ye(pe,"data-invert",q.f=Et),sn!==q.y&&ye(pe,"data-swipe-out",q.y=sn),Mn!==q.g&&ye(pe,"data-swipe-direction",q.g=Mn),Ln!==q.p&&ye(pe,"data-expanded",q.p=Ln),ot!==q.b&&ye(pe,"data-testid",q.b=ot),q.T=rr(pe,Ve,q.T),Pe!==q.A&>(Q,q.A=Pe),nt!==q.O&>(ae,q.O=nt),q},{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}),pe})()}function s_(e){const t=ee({position:"bottom-right",hotkey:["altKey","KeyT"],theme:"light",gap:Kg,visibleToasts:Xw,dir:Il(),containerAriaLabel:"Notifications"},e),n=o_(t.theme),[r,o]=Dm({toasts:[]}),i=ne(()=>{const A=r.toasts;return t.id?A.filter(N=>N.toasterId===t.id):A.filter(N=>!N.toasterId)}),s=ne(()=>Array.from(new Set([t.position,...i().filter(A=>A.position).map(A=>A.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=()=>zi(t.className,t.class),C=()=>t.toastOptions,D=()=>du(C()?.classNames,C()?.classes),_=()=>fu(C()?.descriptionClassName,C()?.descriptionClass),I=()=>zi(C()?.className,C()?.class),L=A=>{o("toasts",N=>(N.find(M=>M.id===A.id)?.delete||qt.dismiss(A.id),N.filter(({id:M})=>M!==A.id)))};return Vt(()=>{const A=qt.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{o("toasts",kc(R=>{R.forEach(F=>{F.id===N.id&&(F.delete=!0)})}))});return}const M=N,S=r.toasts.findIndex(R=>R.id===M.id);if(S!==-1){o("toasts",S,Om(M));return}o("toasts",kc(R=>{R.unshift(M)}))});ie(A)}),oe(()=>{const A=t.theme;if(A!=="system"){g(A);return}if(typeof window>"u")return;const N=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:S})=>{g(S?"dark":"light")};M(N);try{N.addEventListener("change",M),ie(()=>N.removeEventListener("change",M))}catch{N.addListener(M),ie(()=>N.removeListener(M))}}),oe(()=>{i().length<=1&&l(!1)}),Vt(()=>{const A=N=>{t.hotkey.length>0&&t.hotkey.every(S=>N[S]||N.code===S)&&(l(!0),x?.focus()),N.code==="Escape"&&(document.activeElement===x||x?.contains(document.activeElement))&&l(!1)};document.addEventListener("keydown",A),ie(()=>document.removeEventListener("keydown",A))}),ie(()=>{b()&&(b()?.focus({preventScroll:!0}),h(null),v(!1))}),(()=>{var A=Rw();return w(A,m(mt,{get each(){return s()},children:(N,M)=>{const[S,R]=N.split("-"),F=ne(()=>i().filter(z=>!z.position&&M()===0||z.position===N)),j=ne(()=>a().filter(z=>M()===0&&!z.position||z.position===N));return m(Y,{get when(){return i().length>0},get children(){var z=Iw();z.$$pointerup=()=>f(!1),z.$$pointerdown=P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||f(!0)},z.addEventListener("dragend",()=>l(!1)),z.addEventListener("mouseleave",()=>{d()||l(!1)}),z.$$mousemove=()=>l(!0),z.addEventListener("mouseenter",()=>l(!0)),z.addEventListener("focus",P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||y()||(v(!0),h(P.relatedTarget))}),z.addEventListener("blur",P=>{y()&&!P.currentTarget.contains(P.relatedTarget)&&(v(!1),b()&&(b()?.focus({preventScroll:!0}),h(null)))});var H=x;return typeof H=="function"?qn(H,z):x=z,ye(z,"data-y-position",S),ye(z,"data-x-position",R),w(z,m(mt,{get each(){return F()},children:(P,J)=>m(i_,{get icons(){return t.icons},get index(){return J()},toast:P,get defaultRichColors(){return t.richColors},get duration(){return C()?.duration??t.duration},get class(){return I()},get descriptionClassName(){return _()},get invert(){return!!t.invert},get visibleToasts(){return t.visibleToasts},get closeButton(){return C()?.closeButton??t.closeButton??!1},get interacting(){return d()},position:N,get style(){return C()?.style},get unstyled(){return C()?.unstyled},get classNames(){return D()},get cancelButtonStyle(){return C()?.cancelButtonStyle},get actionButtonStyle(){return C()?.actionButtonStyle},get closeButtonAriaLabel(){return C()?.closeButtonAriaLabel},removeToast:L,get toasts(){return F()},get heights(){return j()},setHeights:u,get expandByDefault(){return!!t.expand},get gap(){return t.gap},get expanded(){return c()},get swipeDirections(){return t.swipeDirections},get pauseWhenPageIsHidden(){return t.pauseWhenPageIsHidden}})})),ue(P=>{var J=t.dir==="auto"?Il():t.dir,B=E(),K=p(),W={"--front-toast-height":`${j()[0]?.height??0}px`,"--gap":`${t.gap}px`,...t.style,...r_(t.offset,t.mobileOffset)};return J!==P.e&&ye(z,"dir",P.e=J),B!==P.t&>(z,P.t=B),K!==P.a&&ye(z,"data-sonner-theme",P.a=K),P.o=rr(z,W,P.o),P},{e:void 0,t:void 0,a:void 0,o:void 0}),z}})}})),ue(()=>ye(A,"aria-label",t.customAriaLabel??`${t.containerAriaLabel} ${k()}`)),A})()}/*!
|
|
638
|
+
* Original code by Emil Kowalski
|
|
639
|
+
* MIT Licensed, Copyright 2023 Emil Kowalski, see https://github.com/emilkowalski/sonner/blob/main/LICENSE.md for details
|
|
640
|
+
*
|
|
641
|
+
* Credits:
|
|
642
|
+
* https://github.com/emilkowalski/sonner/blob/main/src/index.tsx
|
|
643
|
+
*/ln(["pointerdown","pointerup","pointermove","click","mousemove"]);const a_=e=>m(s_,ee({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 u_=U('<span class=" text-muted-foreground">'),c_=U('<span class=" text-destructive">'),l_=U('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),d_=U('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),Ml=U('<p class=" text-destructive">'),f_=U('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),g_=U('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><h1 class="m-0 text-xl">'),p_=U('<p class=" text-muted-foreground">'),h_=U('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),m_=U('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),b_=U('<h2 class="my-1.5 text-base font-semibold">'),y_=U('<p class="m-0 mb-2 text-muted-foreground">'),v_=U('<code class="font-mono text-sm text-muted-foreground">'),x_=U('<li class="group relative 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">');const w_={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},__=()=>{const e=Yi(),t=Go(),[n,{refetch:r}]=gn(t,A=>A?ze.listSpecs(A):Promise.resolve([])),[o,{refetch:i}]=gn(()=>ze.listProjects()),s=ne(()=>(o()??[]).find(A=>A.id===t())),a=ne(()=>{const A=s();return A?.worktree?(o()??[]).some(N=>N.id===A.worktree.mainProjectId):!0}),u=ne(()=>{const A=s();return A?.worktree?`feat(${A.worktree.branch}): merge from worktree`:""}),[c,l]=$(!1),[d,f]=$(null),[p,g]=$(!1),[b,h]=$(""),[y,v]=$(null),[x,k]=$(!1),[E,C]=$(null);es(()=>p()||y()!==null);let D=null;oe(()=>{const A=t();D?.(),D=null,A&&(D=Zf(A,()=>{r()}))}),Vt(()=>{const A=Xf(()=>{(async()=>{const N=s()?.worktree?.mainProjectId??null;await i();const M=t();!M||(o()??[]).some(R=>R.id===M)||N&&e(`/${encodeURIComponent(N)}`)})()});ie(A)}),ie(()=>{D?.(),D=null});function _(){s()?.worktree&&a()&&(h(u()),f(null),g(!0))}async function I(){const A=s();if(!A?.worktree||!a())return;const N=b().trim()||u();l(!0),f(null);try{const M=await ze.mergeWorktreeToMain(A.id,{commitMessage:N});g(!1),M.status==="merged"?(Wr.success(T("home.merged")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}`)):(Wr.info(T("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(M.mainProjectId)}/specs/${encodeURIComponent(M.conflictSpecId)}`))}catch(M){f(M.message)}finally{l(!1)}}async function L(A){const N=t();if(N){k(!0),C(null);try{await ze.deleteSpec(N,A),v(null),await r()}catch(M){C(M.message)}finally{k(!1)}}}return(()=>{var A=g_(),N=A.firstChild,M=N.firstChild;return w(M,()=>T("home.specList")),w(N,m(is,{}),null),w(A,m(Y,{get when(){return s()?.worktree},get children(){var S=l_(),R=S.firstChild,F=R.firstChild;return w(F,()=>T("home.mainProject"),null),w(F,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(S,m(Ue,{variant:"default",size:"sm",onClick:_,get disabled(){return c()||!a()},get title(){return ce(()=>!!a())()?T("home.mergeHint"):T("home.mainUnreachable")},get children(){return[m(qb,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>ce(()=>!!c())()?T("home.merging"):T("home.mergeToMain"))]}}),null),w(S,m(Y,{get when(){return!a()},get children(){var j=u_();return w(j,()=>T("home.mainUnreachable")),j}}),null),w(S,m(Y,{get when(){return d()},get children(){var j=c_();return w(j,d),j}}),null),S}}),null),w(A,m(Wi,{get fallback(){return(()=>{var S=p_();return w(S,()=>T("common.loading")),S})()},get children(){return m(Y,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var S=h_(),R=S.firstChild;return w(R,()=>T("home.noSpecs")),w(S,m(Ue,{as:ar,get href(){return en("specs/new")},variant:"default",size:"sm",get children(){return[m(Eu,{class:"mr-1 h-4 w-4"}),ce(()=>T("home.createFirst"))]}}),null),S})()},get children(){var S=d_();return w(S,m(mt,{get each(){return n()??[]},children:R=>(()=>{var F=x_(),j=F.firstChild;return w(F,m(ar,{get href(){return en(`specs/${encodeURIComponent(R.id)}`)},class:"block p-4",get children(){return[(()=>{var z=m_(),H=z.firstChild;return w(z,m(S0,{get class(){return`border-transparent ${w_[R.stage]??"bg-muted"} text-white uppercase`},get children(){return R.stage}}),H),w(H,()=>Qf(R.updated_at)),z})(),(()=>{var z=b_();return w(z,()=>R.title||T("common.pendingAgent")),z})(),(()=>{var z=y_();return w(z,()=>R.summary||T("common.pendingAgent")),z})(),(()=>{var z=v_();return w(z,()=>R.id),z})()]}}),j),w(j,m(Og,{placement:"bottom-end",get children(){return[m(Dg,{as:Ue,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return T("home.moreActions")},get children(){return m(Fb,{class:"h-4 w-4"})}}),m(Ng,{get children(){return m(cu,{class:"text-destructive focus:text-destructive",onSelect:()=>v(R.id),get children(){return T("common.delete")}})}})]}})),F})()})),S}})}}),null),w(A,m(En,{get open(){return p()},onOpenChange:S=>{g(S),S||f(null)},get children(){return m(Mo,{class:"max-w-md",get children(){return[m($o,{get children(){return[m(Lo,{get children(){return T("home.mergeDialogTitle")}}),m(Ku,{get children(){return T("home.mergeDialogDescription")}})]}}),(()=>{var S=f_(),R=S.firstChild;return S.addEventListener("submit",F=>{F.preventDefault(),I()}),w(R,()=>T("home.mergeCommitMessage"),null),w(R,m(So,{id:"merge-commit-message",get value(){return b()},onInput:F=>h(F.currentTarget.value),get disabled(){return c()}}),null),w(S,m(Y,{get when(){return d()},get children(){var F=Ml();return w(F,d),F}}),null),w(S,m(Po,{get children(){return[m(Ue,{type:"button",variant:"outline",onClick:()=>g(!1),get disabled(){return c()},get children(){return T("common.cancel")}}),m(Ue,{type:"submit",get disabled(){return c()||!a()},get children(){return ce(()=>!!c())()?T("home.merging"):T("home.mergeToMain")}})]}}),null),S})()]}})}}),null),w(A,m(En,{get open(){return y()!==null},onOpenChange:S=>{S||(v(null),C(null))},get children(){return m(Mo,{class:"max-w-sm",get children(){return[m($o,{get children(){return m(Lo,{get children(){return T("home.confirmDeleteSpec")}})}}),m(Y,{get when(){return E()},get children(){var S=Ml();return w(S,E),S}}),m(Po,{get children(){return[m(Ue,{variant:"outline",onClick:()=>v(null),get disabled(){return x()},get children(){return T("common.cancel")}}),m(Ue,{variant:"destructive",onClick:()=>y()&&void L(y()),get disabled(){return x()},get children(){return ce(()=>!!x())()?T("common.deleting"):T("common.confirmDelete")}})]}})]}})}}),null),A})()},Hg="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",E_=5*1024*1024,Xr=10,k_=new Set(["application/pdf","text/plain","text/markdown"]);function S_(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 C_(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 Ll(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function A_(){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=ne(()=>t().length),f=ne(()=>t().some(L=>L.status==="pending")),p=ne(()=>t().some(L=>L.status==="failed"));ie(()=>{for(const L of t())L.previewUrl&&URL.revokeObjectURL(L.previewUrl)});async function g(){const L=r();if(L)return L;const{draftId:A}=await ze.createDraft(e.projectId());return o(A),A}function b(L){n(A=>[...A,L])}function h(L,A){n(N=>N.map(M=>M.id===L?{...M,...A}:M))}function y(L){n(A=>{const N=[];for(const M of A){if(M.id===L){M.previewUrl&&URL.revokeObjectURL(M.previewUrl);continue}N.push(M)}return N})}async function v(L){s(null);const A=t(),N=Xr-A.length;if(N<=0){s(T("newSpec.attachmentLimit",{max:Xr}));return}const M=[];for(const S of L.slice(0,N)){const R=C_(S),F=S_(R);if(!F){s(T("newSpec.unsupportedType",{name:R.name}));continue}if(F!=="image"&&!k_.has(R.type)){s(T("newSpec.unsupportedMime",{mime:R.type||"(unknown)"}));continue}if(R.size>E_){s(T("newSpec.fileTooLarge",{name:R.name}));continue}const j=`att-${Date.now()}-${A_()}`,z=F==="image"?URL.createObjectURL(R):void 0;M.push({id:j,file:R,name:R.name,kind:F,previewUrl:z,status:"pending"})}if(M.length!==0){L.length>N&&s(T("newSpec.attachmentRoomLimit",{room:N,current:A.length,max:Xr}));for(const S of M)b(S);try{const S=await g();for(const R of M)try{const F=await ze.uploadAttachment(e.projectId(),S,R.file);h(R.id,{storedName:F.storedName,name:F.storedName,status:"uploaded"})}catch(F){h(R.id,{status:"failed",error:F.message})}}catch(S){s(S.message);for(const R of M)h(R.id,{status:"failed",error:S.message})}}}async function x(L){const A=L.currentTarget;if(!A.files)return;const N=Array.from(A.files);A.value="",await v(N)}async function k(L){const A=L.clipboardData?.items;if(!A)return;const N=[];for(const M of Array.from(A))if(M.kind==="file"&&M.type.startsWith("image/")){const S=M.getAsFile();S&&N.push(S)}N.length!==0&&(L.preventDefault(),await v(N))}async function E(L){const A=t().find(N=>N.id===L);if(A){if(A.storedName&&r())try{await ze.deleteAttachment(e.projectId(),r(),A.storedName)}catch(N){s(N.message)}y(L)}}function C(L){l(Ll(L.name)),u(L.id)}async function D(L){const A=c().trim();if(u(null),!(!A||!L.storedName||!r())&&A!==Ll(L.name))try{const N=await ze.renameAttachment(e.projectId(),r(),L.storedName,A);h(L.id,{storedName:N.storedName,name:N.storedName})}catch(N){s(N.message)}}function _(){u(null)}function I(){const L=Ct(t);for(const A of L)A.previewUrl&&URL.revokeObjectURL(A.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:C,commitRename:D,cancelRename:_,reset:I}}var T_=U("<textarea>");const to=e=>{const[t,n]=Ee(e,["class"]);return(()=>{var r=T_();return Gn(r,ee({get class(){return Lt("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 D_=U('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),O_=U('<div class="relative w-full">'),N_=U("<li><button type=button>");const R_=150,I_=150,M_=2,L_=10,$l=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??M_,b=()=>e.maxRows??L_;ie(()=>{d&&clearTimeout(d),f&&clearTimeout(f)});function h(){if(!a||!p())return;const D=getComputedStyle(a),_=parseFloat(D.fontSize)||14,I=D.lineHeight==="normal"?_*$l:parseFloat(D.lineHeight)||_*$l,L=parseFloat(D.paddingTop)+parseFloat(D.paddingBottom)+parseFloat(D.borderTopWidth)+parseFloat(D.borderBottomWidth),A=I*g()+L,N=I*b()+L;a.style.height="auto";const M=Math.min(Math.max(a.scrollHeight,A),N);a.style.height=`${M}px`,a.style.overflowY=a.scrollHeight>N?"auto":"hidden"}Vt(h),oe(Mt(()=>e.value,h));function y(){n(!1),o([]),s(0),c=-1,l="",u=[],d&&(clearTimeout(d),d=null)}function v(D){d&&clearTimeout(d),d=setTimeout(async()=>{const _=e.projectId;if(_)try{const I=await ze.listFiles(_,D);u=[],o(I.items),s(0)}catch{o([])}},R_)}function x(D){const _=D.selectionStart,I=D.value.slice(0,_),L=I.lastIndexOf("@");if(L===-1){y();return}if(L>0&&!/\s/.test(I[L-1])){y();return}const A=I.slice(L+1);if(!/^[\w./@-]*$/.test(A)){y();return}c=L,l=A,t()||n(!0),v(A)}function k(D){const _=e.value,I=_.slice(0,c),L=_.slice(c+1+l.length),A=`@${D}`;e.onValueChange(I+A+L),y();const N=I.length+A.length;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(N,N),h())})}function E(){u[i()]?.scrollIntoView({block:"nearest"})}function C(D){const _=r();if(t()&&_.length>0){if(D.key==="ArrowDown"){D.preventDefault(),s(I=>(I+1)%_.length),requestAnimationFrame(E);return}if(D.key==="ArrowUp"){D.preventDefault(),s(I=>(I-1+_.length)%_.length),requestAnimationFrame(E);return}if(D.key==="Enter"||D.key==="Tab"){if(!D.isComposing){D.preventDefault(),k(_[i()]);return}}else if(D.key==="Escape"){D.preventDefault(),y();return}}e.onKeyDown?.(D)}return(()=>{var D=O_();return w(D,m(to,{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 Lt(p()&&"resize-none",e.class)},onInput:_=>{e.onValueChange(_.currentTarget.value),x(_.currentTarget),h()},onKeyDown:C,onPaste:_=>e.onPaste?.(_),onBlur:()=>{f&&clearTimeout(f),f=setTimeout(y,I_)}}),null),w(D,m(Y,{get when(){return ce(()=>!!t())()&&r().length>0},get children(){var _=D_();return w(_,m(mt,{get each(){return r()},children:(I,L)=>(()=>{var A=N_(),N=A.firstChild;return qn(M=>u[L()]=M,A),N.$$mousedown=M=>{M.preventDefault(),k(I)},N.addEventListener("mouseenter",()=>s(L())),ye(N,"title",I),w(N,I),ue(()=>gt(N,Lt("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"))),A})()})),_}}),null),D})()};ln(["mousedown"]);var $_={};Ir($_,{Arrow:()=>Wo,Content:()=>Vg,Portal:()=>Wg,Root:()=>Yg,Tooltip:()=>Fo,Trigger:()=>Zg,useTooltipContext:()=>ps});var Gg=bt();function ps(){const e=pt(Gg);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Vg(e){const t=ps(),n=je({id:t.generateId("content")},e),[r,o]=Ee(n,["ref","style"]);return oe(()=>ie(t.registerContentId(o.id))),m(Y,{get when(){return t.contentPresent()},get children(){return m(ls.Positioner,{get children(){return m(Fu,ee({ref(i){var s=xt(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return Rr({"--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 Wg(e){const t=ps();return m(Y,{get when(){return t.contentPresent()},get children(){return m(vu,e)}})}function P_(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 xr={},F_=0,Ur=!1,Bn,ho,Kr;function Yg(e){const t=`tooltip-${on()}`,n=`${++F_}`,r=je({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=Ee(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=Yo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:S=>o.onOpenChange?.(S)}),{present:h}=eo({show:()=>o.forceMount||b.isOpen(),element:()=>d()??null}),y=()=>{xr[n]=x},v=()=>{for(const S in xr)S!==n&&(xr[S](!0),delete xr[S])},x=(S=!1)=>{S||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(Bn),Bn=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Kr=window.setTimeout(()=>{window.clearTimeout(Kr),Kr=void 0},o.skipDelayDuration)),Ur&&(window.clearTimeout(ho),ho=window.setTimeout(()=>{delete xr[n],ho=void 0,Ur=!1},o.closeDelay))},k=()=>{clearTimeout(s),s=void 0,v(),y(),Ur=!0,b.open(),window.clearTimeout(Bn),Bn=void 0,window.clearTimeout(ho),ho=void 0,window.clearTimeout(Kr),Kr=void 0},E=()=>{v(),y(),!b.isOpen()&&!Bn&&!Ur?Bn=window.setTimeout(()=>{Bn=void 0,Ur=!0,k()},o.openDelay):b.isOpen()||k()},C=(S=!1)=>{!S&&o.openDelay&&o.openDelay>0&&!s&&!Kr?E():k()},D=()=>{window.clearTimeout(Bn),Bn=void 0,Ur=!1},_=()=>{window.clearTimeout(s),s=void 0},I=S=>zt(c(),S)||zt(d(),S),L=S=>{const R=c(),F=d();if(!(!R||!F))return P_(S,R,F)},A=S=>{const R=S.target;if(I(R)){_();return}if(!o.ignoreSafeArea){const F=L(p());if(F&&w0(Vy(S),F)){_();return}}s||x()};oe(()=>{if(!b.isOpen())return;const S=nn();S.addEventListener("pointermove",A,!0),ie(()=>{S.removeEventListener("pointermove",A,!0)})}),oe(()=>{const S=c();if(!S||!b.isOpen())return;const R=j=>{const z=j.target;zt(z,S)&&x(!0)},F=m0();F.addEventListener("scroll",R,{capture:!0}),ie(()=>{F.removeEventListener("scroll",R,{capture:!0})})}),ie(()=>{clearTimeout(s),xr[n]&&delete xr[n]});const M={dataset:ne(()=>({"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:C,hideTooltip:x,cancelOpening:D,generateId:gr(()=>r.id),registerContentId:Gt(u),isTargetOnTooltip:I,setTriggerRef:l,setContentRef:f};return m(Gg.Provider,{value:M,get children(){return m(ls,ee({anchorRef:c,contentRef:d,onCurrentPlacementChange:S=>{g(S),o.onCurrentPlacementChange?.(S)}},i))}})}function Zg(e){let t;const n=ps(),[r,o]=Ee(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=>{Qe(y,r.onPointerEnter),!(y.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||y.defaultPrevented)&&(s=!0,c())},f=y=>{Qe(y,r.onPointerLeave),y.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},p=y=>{Qe(y,r.onPointerDown),i=!0,nn(t).addEventListener("pointerup",u,{once:!0})},g=y=>{Qe(y,r.onClick),s=!1,a=!1,l(!0)},b=y=>{Qe(y,r.onFocus),!(n.isDisabled()||y.defaultPrevented||i)&&(a=!0,c())},h=y=>{Qe(y,r.onBlur);const v=y.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,a=!1,l(!0))};return ie(()=>{nn(t).removeEventListener("pointerup",u)}),m(st,ee({as:"button",ref(y){var v=xt(x=>{n.setTriggerRef(x),t=x},r.ref);typeof v=="function"&&v(y)},get"aria-describedby"(){return ce(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:p,onClick:g,onFocus:b,onBlur:h},()=>n.dataset(),o))}var Fo=Object.assign(Yg,{Arrow:Wo,Content:Vg,Portal:Wg,Trigger:Zg});const B_=Fo.Trigger,z_=e=>{const t=ee({gutter:4,flip:!1},e);return m(Fo,t)},U_=e=>{const[t,n]=Ee(e,["class"]);return m(Fo.Portal,{get children(){return m(Fo.Content,ee({get class(){return Lt("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 K_=U('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const H_=e=>m(En,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return m(En.Portal,{get children(){return[m(En.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(En.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=K_();return ue(n=>{var r=e.src,o=e.alt;return r!==n.e&&ye(t,"src",n.e=r),o!==n.t&&ye(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),m(En.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(jo,{class:"h-4 w-4"})}})]}})]}})}});var q_=U('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),Xg=U('<img class="h-full w-full object-cover">'),j_=U('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),G_=U('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),V_=U('<span class="text-xs font-bold text-muted-foreground">'),W_=U('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),Y_=U('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),Z_=U('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),X_=U('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function Q_(e){return e.status==="pending"?`${e.name} · ${T("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${T("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const Qg=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(J_,e)},get children(){return[(()=>{var c=q_();return w(c,m(mt,{get each(){return t.attachments()},children:l=>(()=>{var d=G_(),f=d.firstChild;return w(d,m(z_,{openDelay:150,closeDelay:0,get children(){return[m(B_,{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 ce(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var p=V_();return w(p,()=>l.kind==="pdf"?"PDF":"TXT"),p})()},get children(){var p=Xg();return ue(g=>{var b=l.previewUrl,h=l.name;return b!==g.e&&ye(p,"src",g.e=b),h!==g.t&&ye(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=j_();return w(p,m(tr,{class:"h-4 w-4 animate-spin text-muted-foreground"})),p}})]}}),m(U_,{get children(){return Q_(l)}})]}}),f),f.$$click=()=>void t.removeAttachment(l.id),w(f,m(jo,{class:"h-3 w-3"})),ue(p=>{var g=e.busy,b=T("newSpec.deleteAttachment",{name:l.name});return g!==p.e&&(f.disabled=p.e=g),b!==p.t&&ye(f,"aria-label",p.t=b),p},{e:void 0,t:void 0}),d})()})),c})(),m(H_,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},J_=e=>{const t=e.ctrl;return(()=>{var n=W_();return w(n,m(mt,{get each(){return t.attachments()},children:r=>(()=>{var o=Y_(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,m(Y,{get when(){return ce(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=Z_();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=Xg();return ue(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&ye(u,"src",c.e=l),d!==c.t&&ye(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,m(Y,{get when(){return ce(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=X_();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),ue(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?T("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&ye(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return m(So,{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(tr,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),ce(()=>T("newSpec.uploading"))]}}),null),w(a,m(Y,{get when(){return r.status==="failed"},get children(){return T("newSpec.uploadFailed",{error:r.error})}}),null),w(a,m(Y,{get when(){return r.status==="uploaded"},get children(){return[ce(()=>Math.round(r.file.size/1024))," KB · ",ce(()=>r.kind)]}}),null),w(o,m(Ue,{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 T("newSpec.deleteAttachment",{name:r.name})},get children(){return m(jo,{class:"h-3.5 w-3.5"})}}),null),ue(()=>gt(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 e2=["id","name","validationState","required","disabled","readOnly"];function t2(e){const t=`form-control-${on()}`,n=je({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=ne(()=>({"data-valid":Z(n.validationState)==="valid"?"":void 0,"data-invalid":Z(n.validationState)==="invalid"?"":void 0,"data-required":Z(n.required)?"":void 0,"data-disabled":Z(n.disabled)?"":void 0,"data-readonly":Z(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>Z(n.name)??Z(n.id),dataset:p,validationState:()=>Z(n.validationState),isRequired:()=>Z(n.required),isDisabled:()=>Z(n.disabled),isReadOnly:()=>Z(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:gr(()=>Z(n.id)),registerLabel:Gt(o),registerField:Gt(s),registerDescription:Gt(u),registerErrorMessage:Gt(l)}}}var Jg=bt();function Lr(){const e=pt(Jg);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function n2(e){const t=Lr(),n=je({id:t.generateId("description")},e);return oe(()=>ie(t.registerDescription(n.id))),m(st,ee({as:"div"},()=>t.dataset(),n))}var r2=["id","aria-label","aria-labelledby","aria-describedby"];function o2(e){const t=Lr(),n=je({id:t.generateId("field")},e);return oe(()=>ie(t.registerField(Z(n.id)))),{fieldProps:{id:()=>Z(n.id),ariaLabel:()=>Z(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(Z(n.id),Z(n["aria-label"]),Z(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(Z(n["aria-describedby"]))}}}function i2(e){let t;const n=Lr(),r=je({id:n.generateId("label")},e),[o,i]=Ee(r,["ref"]),s=os(()=>t,()=>"label");return oe(()=>ie(n.registerLabel(i.id))),m(st,ee({as:"label",ref(a){var u=xt(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return ce(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function s2(e,t){oe(Mt(e,n=>{if(n==null)return;const r=a2(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ie(()=>{r.removeEventListener("reset",t)}))}))}function a2(e){return u2(e)?e.form:e.closest("form")}function u2(e){return e.matches("textarea, input, select, button")}function c2(e){const t=Lr(),n=je({id:t.generateId("error-message")},e),[r,o]=Ee(n,["forceMount"]),i=()=>t.validationState()==="invalid";return oe(()=>{i()&&ie(t.registerErrorMessage(o.id))}),m(Y,{get when(){return r.forceMount||i()},get children(){return m(st,ee({as:"div"},()=>t.dataset(),o))}})}var l2={};Ir(l2,{Checkbox:()=>ir,Control:()=>tp,Description:()=>np,ErrorMessage:()=>rp,Indicator:()=>op,Input:()=>ip,Label:()=>sp,Root:()=>ap,useCheckboxContext:()=>$r});var ep=bt();function $r(){const e=pt(ep);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function tp(e){const t=Lr(),n=$r(),r=je({id:n.generateId("control")},e),[o,i]=Ee(r,["onClick","onKeyDown"]);return m(st,ee({as:"div",onClick:u=>{Qe(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Qe(u,o.onKeyDown),u.key===Cu.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function np(e){const t=$r();return m(n2,ee(()=>t.dataset(),e))}function rp(e){const t=$r();return m(c2,ee(()=>t.dataset(),e))}function op(e){const t=Lr(),n=$r(),[r,o]=$(),i=je({id:n.generateId("indicator")},e),[s,a]=Ee(i,["ref","forceMount"]),{present:u}=eo({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return m(Y,{get when(){return u()},get children(){return m(st,ee({as:"div",ref(c){var l=xt(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function ip(e){let t;const n=Lr(),r=$r(),o=je({id:r.generateId("input")},e),[i,s,a]=Ee(o,["ref","style","onChange","onFocus","onBlur"],r2),{fieldProps:u}=o2(s),[c,l]=$(!1),d=g=>{if(Qe(g,i.onChange),g.stopPropagation(),!c()){const b=g.target;r.setIsChecked(b.checked),b.checked=r.checked()}l(!1)},f=g=>{Qe(g,i.onFocus),r.setIsFocused(!0)},p=g=>{Qe(g,i.onBlur),r.setIsFocused(!1)};return oe(Mt([()=>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(Mt([()=>t,()=>r.indeterminate(),()=>r.checked()],([g,b])=>{g&&(g.indeterminate=b)})),m(st,ee({as:"input",ref(g){var b=xt(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 Rr(_0,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 sp(e){const t=$r();return m(i2,ee(()=>t.dataset(),e))}function ap(e){let t;const n=`checkbox-${on()}`,r=je({value:"on",id:n},e),[o,i,s]=Ee(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],e2),[a,u]=$(),[c,l]=$(!1),{formControlContext:d}=t2(i),f=tg({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:h=>o.onChange?.(h),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});s2(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const p=h=>{Qe(h,o.onPointerDown),c()&&h.preventDefault()},g=ne(()=>({"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:gr(()=>Z(i.id)),toggle:()=>f.toggle(),setIsChecked:h=>f.setIsSelected(h),setIsFocused:l,setInputRef:u};return m(Jg.Provider,{value:d,get children(){return m(ep.Provider,{value:b,get children(){return m(st,ee({as:"div",ref(h){var y=xt(v=>t=v,o.ref);typeof y=="function"&&y(h)},role:"group",get id(){return Z(i.id)},onPointerDown:p},()=>d.dataset(),g,s,{get children(){return m(d2,{state:b,get children(){return o.children}})}}))}})}})}function d2(e){const t=Gi(()=>{const n=e.children;return h0(n)?n(e.state):n});return ce(t)}var ir=Object.assign(ap,{Control:tp,Description:np,ErrorMessage:rp,Indicator:op,Input:ip,Label:sp}),f2=U('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Hu=ir.Label,qu=ir;ir.ErrorMessage;ir.Description;const ju=e=>{const[t,n]=Ee(e,["class","children"]);return[m(ir.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(ir.Control,ee({get class(){return Lt("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(ir.Indicator,{class:"flex items-center justify-center text-current",get children(){return f2()}})}}))]};var g2=U('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),p2=U('<span class="truncate font-medium text-foreground">');const hs=e=>(()=>{var t=g2();return w(t,m(mt,{get each(){return e.items},children:(n,r)=>[m(Y,{get when(){return r()>0},get children(){return m(Tb,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),m(Y,{get when(){return n.href},get fallback(){return(()=>{var o=p2();return w(o,()=>n.label),o})()},get children(){return m(ar,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var h2=U('<span class="text-sm text-muted-foreground">'),m2=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><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>'),b2=U('<label><input type=radio name=type class=hidden><strong class=" "></strong><span class="text-sm text-muted-foreground">'),y2=U('<p class=" text-destructive">'),v2=U('<p class=" text-muted-foreground">');const x2=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],w2=()=>{const e=Yi(),t=Go(),[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;ie(()=>{g?.(),b?.()});async function k(){if(v)return;const C=y||t();try{const _=(await ze.listSpecs(C)).find(I=>!h.has(I.id));if(_){v=!0,g?.(),g=null,b?.(),b=null;const I=C?`/${C}/specs/${encodeURIComponent(_.id)}`:en(`specs/${encodeURIComponent(_.id)}`);e(I)}}catch{}}async function E(C){if(C.preventDefault(),s()==="creating")return;p(null);const D=n().trim();if(D.length<5){p(T("newSpec.descTooShort"));return}const _=d.attachments().filter(I=>I.status==="failed");if(_.length>0){p(T("newSpec.attachmentFailedCount",{count:_.length}));return}if(d.hasPending()){p(T("newSpec.attachmentUploading"));return}a("creating"),v=!1;try{const I=t();let L=I;if(u()){const R=_2(D);L=(await ze.createWorktree(I,{specSlug:R})).id}y=L;const A=await ze.listSpecs(L);h=new Set(A.map(R=>R.id));const N={type:o(),requirement:D},M=d.draftId();M&&(N.draftId=M);const S=await ze.createSpec(L,N);"draft"in S&&S.draft?(Vr(S.sessionId),b=ns(L,S.sessionId,{onEvent:R=>{R.type==="error"&&(a("failed"),p(R.message||T("newSpec.agentRunFailed")),b?.(),b=null)}}),g=Zf(L,()=>{k()}),k()):"id"in S&&e(`/${L}/specs/${encodeURIComponent(S.id)}`)}catch(I){p(I.message),a("failed")}}return(()=>{var C=m2(),D=C.firstChild,_=D.nextSibling,I=_.nextSibling,L=I.firstChild,A=L.firstChild,N=L.nextSibling,M=N.firstChild,S=N.nextSibling,R=S.firstChild,F=R.firstChild,j=F.nextSibling,z=j.nextSibling;w(D,m(hs,{get items(){return[{label:T("breadcrumb.specList"),href:en("")},{label:T("breadcrumb.newSpec")}]}})),w(_,()=>T("newSpec.description")),I.addEventListener("submit",E),w(A,()=>T("newSpec.type")),w(L,()=>x2.map(P=>(()=>{var J=b2(),B=J.firstChild,K=B.nextSibling,W=K.nextSibling;return B.addEventListener("change",()=>i(P.value)),w(K,()=>T(P.labelKey)),w(W,()=>T(P.hintKey)),ue(re=>{var ve=`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"}`,_e=l();return ve!==re.e&>(J,re.e=ve),_e!==re.t&&(B.disabled=re.t=_e),re},{e:void 0,t:void 0}),ue(()=>B.value=P.value),ue(()=>B.checked=o()===P.value),J})()),null),w(I,m(qu,{get checked(){return u()},onChange:P=>c(P),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[m(ju,{}),m(Hu,{class:"cursor-pointer font-medium",get children(){return T("newSpec.parallelWorktree")}}),(()=>{var P=h2();return w(P,()=>T("newSpec.parallelWorktreeDesc")),P})()]}}),N),w(M,()=>T("newSpec.requirement")),w(N,m(jg,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return T("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Ci(S,"paste",d.onPaste),w(F,()=>T("newSpec.attachments")),w(j,()=>T("newSpec.attachmentsHint",{count:d.count(),max:Xr})),w(R,m(Ue,{variant:"outline",size:"sm",type:"button",onClick:()=>x?.click(),get disabled(){return l()||d.count()>=Xr},get children(){return[m(x1,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>T("newSpec.importAttachment"))]}}),z),Ci(z,"change",d.onFileInputChange);var H=x;return typeof H=="function"?qn(H,z):x=z,ye(z,"accept",Hg),w(S,m(Y,{get when(){return d.count()>0},get children(){return m(Qg,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(I,(()=>{var P=ce(()=>!!f());return()=>P()&&(()=>{var J=y2();return w(J,f),J})()})(),null),w(I,m(Ue,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[ce(()=>ce(()=>!!l())()?m(tr,{class:"mr-1 h-4 w-4 animate-spin"}):m(Ji,{class:"mr-1 h-4 w-4"})),ce(()=>ce(()=>!!l())()?T("newSpec.creating"):T("newSpec.createAndStart"))]}}),null),w(I,(()=>{var P=ce(()=>!!l());return()=>P()&&(()=>{var J=v2();return w(J,()=>T("newSpec.creatingHint")),J})()})(),null),ue(()=>L.disabled=l()),C})()};function _2(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 Pl=11;function E2(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Pl||e.nodeType===Pl)){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 gi,k2="http://www.w3.org/1999/xhtml",Ht=typeof document>"u"?void 0:document,S2=!!Ht&&"content"in Ht.createElement("template"),C2=!!Ht&&Ht.createRange&&"createContextualFragment"in Ht.createRange();function A2(e){var t=Ht.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function T2(e){gi||(gi=Ht.createRange(),gi.selectNode(Ht.body));var t=gi.createContextualFragment(e);return t.childNodes[0]}function D2(e){var t=Ht.createElement("body");return t.innerHTML=e,t.childNodes[0]}function O2(e){return e=e.trim(),S2?A2(e):C2?T2(e):D2(e)}function pi(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 N2(e,t){return!t||t===k2?Ht.createElement(e):Ht.createElementNS(t,e)}function R2(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Hs(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Fl={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)}Hs(e,t,"selected")},INPUT:function(e,t){Hs(e,t,"checked"),Hs(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}}},mo=1,Bl=11,zl=3,Ul=8;function Qn(){}function I2(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function M2(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=O2(r);else r.nodeType===Bl&&(r=r.firstElementChild);var u=o.getNodeKey||I2,c=o.onBeforeNodeAdded||Qn,l=o.onNodeAdded||Qn,d=o.onBeforeElUpdated||Qn,f=o.onElUpdated||Qn,p=o.onBeforeNodeDiscarded||Qn,g=o.onNodeDiscarded||Qn,b=o.onBeforeElChildrenUpdated||Qn,h=o.skipFromChildren||Qn,y=o.addChild||function(H,P){return H.appendChild(P)},v=o.childrenOnly===!0,x=Object.create(null),k=[];function E(H){k.push(H)}function C(H,P){if(H.nodeType===mo)for(var J=H.firstChild;J;){var B=void 0;P&&(B=u(J))?E(B):(g(J),J.firstChild&&C(J,P)),J=J.nextSibling}}function D(H,P,J){p(H)!==!1&&(P&&P.removeChild(H),g(H),C(H,J))}function _(H){if(H.nodeType===mo||H.nodeType===Bl)for(var P=H.firstChild;P;){var J=u(P);J&&(x[J]=P),_(P),P=P.nextSibling}}_(n);function I(H){l(H);for(var P=H.firstChild;P;){var J=P.nextSibling,B=u(P);if(B){var K=x[B];K&&pi(P,K)?(P.parentNode.replaceChild(K,P),A(K,P)):I(P)}else I(P);P=J}}function L(H,P,J){for(;P;){var B=P.nextSibling;(J=u(P))?E(J):D(P,H,!0),P=B}}function A(H,P,J){var B=u(P);if(B&&delete x[B],!J){var K=d(H,P);if(K===!1||(K instanceof HTMLElement&&(H=K,_(H)),e(H,P),f(H),b(H,P)===!1))return}H.nodeName!=="TEXTAREA"?N(H,P):Fl.TEXTAREA(H,P)}function N(H,P){var J=h(H,P),B=P.firstChild,K=H.firstChild,W,re,ve,_e,X;e:for(;B;){for(_e=B.nextSibling,W=u(B);!J&&K;){if(ve=K.nextSibling,B.isSameNode&&B.isSameNode(K)){B=_e,K=ve;continue e}re=u(K);var ge=K.nodeType,Te=void 0;if(ge===B.nodeType&&(ge===mo?(W?W!==re&&((X=x[W])?ve===X?Te=!1:(H.insertBefore(X,K),re?E(re):D(K,H,!0),K=X,re=u(K)):Te=!1):re&&(Te=!1),Te=Te!==!1&&pi(K,B),Te&&A(K,B)):(ge===zl||ge==Ul)&&(Te=!0,K.nodeValue!==B.nodeValue&&(K.nodeValue=B.nodeValue))),Te){B=_e,K=ve;continue e}re?E(re):D(K,H,!0),K=ve}if(W&&(X=x[W])&&pi(X,B))J||y(H,X),A(X,B);else{var Ie=c(B);Ie!==!1&&(Ie&&(B=Ie),B.actualize&&(B=B.actualize(H.ownerDocument||Ht)),y(H,B),I(B))}B=_e,K=ve}L(H,K,re);var Je=Fl[H.nodeName];Je&&Je(H,P)}var M=n,S=M.nodeType,R=r.nodeType;if(!v){if(S===mo)R===mo?pi(n,r)||(g(n),M=R2(n,N2(r.nodeName,r.namespaceURI))):M=r;else if(S===zl||S===Ul){if(R===S)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(A(M,r,v),k)for(var F=0,j=k.length;F<j;F++){var z=x[k[F]];z&&D(z,z.parentNode,!1)}}return!v&&M!==n&&n.parentNode&&(M.actualize&&(M=M.actualize(n.ownerDocument||Ht)),n.parentNode.replaceChild(M,n)),M}}var L2=M2(E2);const Kl={};function $2(e){let t=Kl[e];if(t)return t;t=Kl[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 no(e,t){typeof t!="string"&&(t=no.defaultChars);const n=$2(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})}no.defaultChars=";/?:@&=+$,#";no.componentChars="";const Hl={};function P2(e){let t=Hl[e];if(t)return t;t=Hl[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 Zo(e,t,n){typeof t!="string"&&(n=t,t=Zo.defaultChars),typeof n>"u"&&(n=!0);const r=P2(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}Zo.defaultChars=";/?:@&=+$,-_.!~*'()#";Zo.componentChars="-_.!~*'()";function Gu(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 Ui(){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 F2=/^([a-z0-9.+-]+:)/i,B2=/:[0-9]*$/,z2=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,U2=["<",">",'"',"`"," ","\r",`
|
|
644
|
+
`," "],K2=["{","}","|","\\","^","`"].concat(U2),H2=["'"].concat(K2),ql=["%","/","?",";","#"].concat(H2),jl=["/","?","#"],q2=255,Gl=/^[+a-z0-9A-Z_-]{0,63}$/,j2=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Vl={javascript:!0,"javascript:":!0},Wl={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Vu(e,t){if(e&&e instanceof Ui)return e;const n=new Ui;return n.parse(e,t),n}Ui.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=z2.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=F2.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&&Vl[s])&&(i=i.substr(2),this.slashes=!0)),!Vl[s]&&(o||s&&!Wl[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(Gl)){let v="";for(let x=0,k=y.length;x<k;x++)y.charCodeAt(x)>127?v+="x":v+=y[x];if(!v.match(Gl)){const x=g.slice(0,b),k=g.slice(b+1),E=y.match(j2);E&&(x.push(E[1]),k.unshift(E[2])),k.length&&(i=k.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>q2&&(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),Wl[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ui.prototype.parseHost=function(e){let t=B2.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 G2=Object.freeze(Object.defineProperty({__proto__:null,decode:no,encode:Zo,format:Gu,parse:Vu},Symbol.toStringTag,{value:"Module"})),up=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cp=/[\0-\x1F\x7F-\x9F]/,V2=/[\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]/,Wu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,lp=/[\$\+<->\^`\|~\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]/,dp=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,W2=Object.freeze(Object.defineProperty({__proto__:null,Any:up,Cc:cp,Cf:V2,P:Wu,S:lp,Z:dp},Symbol.toStringTag,{value:"Module"})),Y2=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))),Z2=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var qs;const X2=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]]),Q2=(qs=String.fromCodePoint)!==null&&qs!==void 0?qs: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 J2(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=X2.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 eE=32;var nr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(nr||(nr={}));function gu(e){return e>=It.ZERO&&e<=It.NINE}function tE(e){return e>=It.UPPER_A&&e<=It.UPPER_F||e>=It.LOWER_A&&e<=It.LOWER_F}function nE(e){return e>=It.UPPER_A&&e<=It.UPPER_Z||e>=It.LOWER_A&&e<=It.LOWER_Z||gu(e)}function rE(e){return e===It.EQUALS||nE(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 Un;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Un||(Un={}));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=Un.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)|eE)===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(gu(o)||tE(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(gu(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===Un.Strict)return 0;return this.emitCodePoint(J2(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&nr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=iE(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Un.Attribute&&(i===0||rE(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&nr.VALUE_LENGTH)>>14,i!==0){if(s===It.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Un.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]&nr.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]&~nr.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!==Un.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 fp(e){let t="";const n=new oE(e,r=>t+=Q2(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 iE(e,t,n,r){const o=(t&nr.BRANCH_LENGTH)>>7,i=t&nr.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 gp=fp(Y2);fp(Z2);function sE(e,t=Un.Legacy){return gp(e,t)}function aE(e){return gp(e,Un.Strict)}function uE(e){return Object.prototype.toString.call(e)}function Yu(e){return uE(e)==="[object String]"}const cE=Object.prototype.hasOwnProperty;function lE(e,t){return cE.call(e,t)}function ms(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 pp(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Zu(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 Bo(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 hp=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,dE=/&([a-z#][a-z0-9]{1,31});/gi,fE=new RegExp(hp.source+"|"+dE.source,"gi"),gE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function pE(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 Zu(r)?Bo(r):e}const n=sE(e);return n!==e?n:e}function hE(e){return e.indexOf("\\")<0?e:e.replace(hp,"$1")}function ro(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(fE,function(t,n,r){return n||pE(t,r)})}const mE=/[&<>"]/,bE=/[&<>"]/g,yE={"&":"&","<":"<",">":">",'"':"""};function vE(e){return yE[e]}function dr(e){return mE.test(e)?e.replace(bE,vE):e}const xE=/[.?*+^$[\]\\(){}|-]/g;function wE(e){return e.replace(xE,"\\$&")}function ct(e){switch(e){case 9:case 32:return!0}return!1}function zo(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 mp(e){return Wu.test(e)||lp.test(e)}function Uo(e){return mp(Bo(e))}function Ko(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 bs(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Yl(e){return e===32||e===9||e===10||e===13}function ys(e){let t=0;for(;t<e.length&&Yl(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Yl(e.charCodeAt(n));n--);return e.slice(t,n+1)}const _E={mdurl:G2,ucmicro:W2},EE=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:pp,asciiTrim:ys,assign:ms,escapeHtml:dr,escapeRE:wE,fromCodePoint:Bo,has:lE,isMdAsciiPunct:Ko,isPunctChar:mp,isPunctCharCode:Uo,isSpace:ct,isString:Yu,isValidEntityCode:Zu,isWhiteSpace:zo,lib:_E,normalizeReference:bs,unescapeAll:ro,unescapeMd:hE},Symbol.toStringTag,{value:"Module"}));function kE(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 SE(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=ro(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=ro(e.slice(t,o)),i.pos=o,i.ok=!0),i}function CE(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+=ro(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+=ro(e.slice(t,i)),s}const AE=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:SE,parseLinkLabel:kE,parseLinkTitle:CE},Symbol.toStringTag,{value:"Module"})),Rn={};Rn.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+dr(i.content)+"</code>"};Rn.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+dr(e[t].content)+`</code></pre>
|
|
645
|
+
`};Rn.fence=function(e,t,n,r,o){const i=e[t],s=i.info?ro(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)||dr(i.content):c=dr(i.content),c.indexOf("<pre")===0)return c+`
|
|
646
|
+
`;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const f={attrs:d};return`<pre><code${o.renderAttrs(f)}>${c}</code></pre>
|
|
647
|
+
`}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
|
|
648
|
+
`};Rn.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)};Rn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
649
|
+
`:`<br>
|
|
650
|
+
`};Rn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
651
|
+
`:`<br>
|
|
652
|
+
`:`
|
|
653
|
+
`};Rn.text=function(e,t){return dr(e[t].content)};Rn.html_block=function(e,t){return e[t].content};Rn.html_inline=function(e,t){return e[t].content};function uo(){this.rules=ms({},Rn)}uo.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+dr(t.attrs[n][0])+'="'+dr(t.attrs[n][1])+'"';return o};uo.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
|
|
654
|
+
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
655
|
+
`:">",i};uo.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};uo.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};uo.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 mn(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}mn.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};mn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};mn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};mn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};mn.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 bp(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}bp.prototype.Token=mn;const TE=/\r\n?|\n/g,DE=/\0/g;function OE(e){let t;t=e.src.replace(TE,`
|
|
657
|
+
`),t=t.replace(DE,"�"),e.src=t}function NE(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 RE(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 IE(e){return/^<a[>\s]/i.test(e)}function ME(e){return/^<\/a\s*>/i.test(e)}function LE(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"&&(IE(a.content)&&i>0&&i--,ME(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=pp(o,s,l)}}}}const yp=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$E=/\((c|tm|r)\)/i,PE=/\((c|tm|r)\)/ig,FE={c:"©",r:"®",tm:"™"};function BE(e,t){return FE[t.toLowerCase()]}function zE(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(PE,BE)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function UE(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&yp.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 KE(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&($E.test(e.tokens[t].content)&&zE(e.tokens[t].children),yp.test(e.tokens[t].content)&&UE(e.tokens[t].children))}const HE=/['"]/,Zl=/['"]/g,Xl="’";function hi(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function qE(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 jE(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;){Zl.lastIndex=c;const d=Zl.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=Ko(b)||Uo(b),v=Ko(h)||Uo(h),x=zo(b),k=zo(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&&hi(o,i,d.index,Xl);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 C,D;g?(C=t.md.options.quotes[2],D=t.md.options.quotes[3]):(C=t.md.options.quotes[0],D=t.md.options.quotes[1]),hi(o,i,d.index,D),hi(o,E.token,E.pos,C),r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:g,level:a}):p&&g&&hi(o,i,d.index,Xl)}}Object.keys(o).forEach(function(i){e[i].content=qE(e[i].content,o[i])})}function GE(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!HE.test(e.tokens[t].content)||jE(e.tokens[t].children,e)}function VE(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 js=[["normalize",OE],["block",NE],["inline",RE],["linkify",LE],["replacements",KE],["smartquotes",GE],["text_join",VE]];function Xu(){this.ruler=new Wt;for(let e=0;e<js.length;e++)this.ruler.push(js[e][0],js[e][1])}Xu.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Xu.prototype.State=bp;function In(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}In.prototype.push=function(e,t,n){const r=new mn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};In.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};In.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};In.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};In.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ct(this.src.charCodeAt(--t)))return t+1;return t};In.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};In.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};In.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("")};In.prototype.Token=mn;const WE=65536;function Gs(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Ql(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 YE(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=Gs(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=Gs(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Ql(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 C=e.push("inline","",0);C.content=c[k].trim(),C.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 C=0,D=p.length;C<D;C++)if(p[C](e,o,n,!0)){k=!0;break}if(k||(u=Gs(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Ql(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>WE))break;if(o===t+2){const C=e.push("tbody_open","tbody",1);C.map=v=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[o,o+1];for(let C=0;C<d;C++){const D=e.push("td_open","td",1);l[C]&&(D.attrs=[["style","text-align:"+l[C]]]);const _=e.push("inline","",0);_.content=c[C]?c[C].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 ZE(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 XE(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 QE(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,C,D;e.src.charCodeAt(o)===32?(o++,E++,D=!1,C=!0):e.src.charCodeAt(o)===9?(C=!0,(e.bsCount[g]+E)%4===3?(o++,E++,D=!1):D=!0):C=!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]+(D?1:0))%4:_++;else break;o++}p=o>=i,u.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?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,C=d.length;E<C;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 JE(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 Jl(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 ed(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 ek(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 tk(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=ed(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=Jl(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 R=e.src.charCodeAt(i);if(R===9)E+=4-(E+e.bsCount[u])%4;else if(R===32)E++;else break;i++}const C=i;let D;C>=o?D=1:D=E-k,D>4&&(D=1);const _=k+D;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,A=e.tShift[u],N=e.sCount[u],M=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=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]=A,e.sCount[u]=N,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 S=!1;for(let R=0,F=v.length;R<F;R++)if(v[R](e,u,n,!0)){S=!0;break}if(S)break;if(d){if(p=ed(e,u),p<0)break;s=e.bMarks[u]+e.tShift[u]}else if(p=Jl(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&&ek(e,b),!0}function nk(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 D=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let I=!1;for(let L=0,A=D.length;L<A;L++)if(D[L](e,v,x,!0)){I=!0;break}if(e.parentType=_,I)return null}const E=e.bMarks[v]+e.tShift[v],C=e.eMarks[v];return e.src.slice(E,C+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=bs(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 rk=["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:._-]*",ik="[^\"'=<>`\\x00-\\x20]+",sk="'[^']*'",ak='"[^"]*"',uk="(?:"+ik+"|"+sk+"|"+ak+")",ck="(?:\\s+"+ok+"(?:\\s*=\\s*"+uk+")?)",vp="<[A-Za-z][A-Za-z0-9\\-]*"+ck+"*\\s*\\/?>",xp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lk="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",dk="<[?][\\s\\S]*?[?]>",fk="<![A-Za-z][^>]*>",gk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",pk=new RegExp("^(?:"+vp+"|"+xp+"|"+lk+"|"+dk+"|"+fk+"|"+gk+")"),hk=new RegExp("^(?:"+vp+"|"+xp+")"),wr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+rk.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(hk.source+"\\s*$"),/^$/,!1]];function mk(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<wr.length&&!wr[a][0].test(s);a++);if(a===wr.length)return!1;if(r)return wr[a][2];let u=t+1;const c=wr[a][1].test("");if(!wr[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),wr[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 bk(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=ys(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 yk(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=ys(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 vk(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=ys(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 mi=[["table",YE,["paragraph","reference"]],["code",ZE],["fence",XE,["paragraph","reference","blockquote","list"]],["blockquote",QE,["paragraph","reference","blockquote","list"]],["hr",JE,["paragraph","reference","blockquote","list"]],["list",tk,["paragraph","reference","blockquote"]],["reference",nk],["html_block",mk,["paragraph","reference","blockquote"]],["heading",bk,["paragraph","reference","blockquote"]],["lheading",yk],["paragraph",vk]];function vs(){this.ruler=new Wt;for(let e=0;e<mi.length;e++)this.ruler.push(mi[e][0],mi[e][1],{alt:(mi[e][2]||[]).slice()})}vs.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)}};vs.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)};vs.prototype.State=In;function Xo(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}Xo.prototype.pushPending=function(){const e=new mn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Xo.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new mn(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};Xo.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=Ko(o)||Uo(o),c=Ko(a)||Uo(a),l=zo(o),d=zo(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}};Xo.prototype.Token=mn;function xk(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 wk(e,t){let n=e.pos;for(;n<e.posMax&&!xk(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const _k=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Ek(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(_k);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 kk(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 Qu=[];for(let e=0;e<256;e++)Qu.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Qu[e.charCodeAt(0)]=1});function Sk(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&&Qu[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function Ck(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 Ak(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 td(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 Tk(e){const t=e.tokens_meta,n=e.tokens_meta.length;td(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&td(e,t[r].delimiters)}const wp={tokenize:Ak,postProcess:Tk};function Dk(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 nd(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 Ok(e){const t=e.tokens_meta,n=e.tokens_meta.length;nd(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&nd(e,t[r].delimiters)}const _p={tokenize:Dk,postProcess:Ok};function Nk(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[bs(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 Rk(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[bs(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 Ik=/^([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])?)*)$/,Mk=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Lk(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(Mk.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(Ik.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 $k(e){return/^<a[>\s]/i.test(e)}function Pk(e){return/^<\/a\s*>/i.test(e)}function Fk(e){const t=e|32;return t>=97&&t<=122}function Bk(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&&!Fk(o))return!1;const i=e.src.slice(r).match(pk);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],$k(s.content)&&e.linkLevel++,Pk(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const zk=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Uk=/^&([a-z][a-z0-9]{1,31});/i;function Kk(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(zk);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=Zu(s)?Bo(s):Bo(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(Uk);if(i){const s=aE(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 rd(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 Hk(e){const t=e.tokens_meta,n=e.tokens_meta.length;rd(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&rd(t[r].delimiters)}function qk(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 Vs=[["text",wk],["linkify",Ek],["newline",kk],["escape",Sk],["backticks",Ck],["strikethrough",wp.tokenize],["emphasis",_p.tokenize],["link",Nk],["image",Rk],["autolink",Lk],["html_inline",Bk],["entity",Kk]],Ws=[["balance_pairs",Hk],["strikethrough",wp.postProcess],["emphasis",_p.postProcess],["fragments_join",qk]];function Qo(){this.ruler=new Wt;for(let e=0;e<Vs.length;e++)this.ruler.push(Vs[e][0],Vs[e][1]);this.ruler2=new Wt;for(let e=0;e<Ws.length;e++)this.ruler2.push(Ws[e][0],Ws[e][1])}Qo.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};Qo.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()};Qo.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)};Qo.prototype.State=Xo;function jk(e){const t={};e=e||{},t.src_Any=up.source,t.src_Cc=cp.source,t.src_Z=dp.source,t.src_P=Wu.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 pu(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function xs(e){return Object.prototype.toString.call(e)}function Gk(e){return xs(e)==="[object String]"}function Vk(e){return xs(e)==="[object Object]"}function Wk(e){return xs(e)==="[object RegExp]"}function od(e){return xs(e)==="[object Function]"}function Yk(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Ep={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Zk(e){return Object.keys(e||{}).reduce(function(t,n){return t||Ep.hasOwnProperty(n)},!1)}const Xk={"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}}},Qk="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]",Jk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function eS(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function id(){return function(e,t){t.normalize(e)}}function Ki(e){const t=e.re=jk(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Qk),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,Vk(u)){Wk(u.validate)?c.validate=eS(u.validate):od(u.validate)?c.validate=u.validate:i(a,u),od(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=id();return}if(Gk(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:id()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(Yk).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 kp(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||Zk(e)&&(t=e,e={}),this.__opts__=pu({},Ep,t),this.__schemas__=pu({},Xk,e),this.__compiled__={},this.__tlds__=Jk,this.__tlds_replaced__=!1,this.re={},Ki(this)}rn.prototype.add=function(t,n){return this.__schemas__[t]=n,Ki(this),this};rn.prototype.set=function(t){return this.__opts__=pu(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 kp(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 kp(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(),Ki(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ki(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 Qr=2147483647,Sn=36,Ju=1,Ho=26,tS=38,nS=700,Sp=72,Cp=128,Ap="-",rS=/^xn--/,oS=/[^\0-\x7F]/,iS=/[\x2E\u3002\uFF0E\uFF61]/g,sS={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ys=Sn-Ju,Cn=Math.floor,Zs=String.fromCharCode;function er(e){throw new RangeError(sS[e])}function aS(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Tp(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(iS,".");const o=e.split("."),i=aS(o,t).join(".");return r+i}function Dp(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 uS=e=>String.fromCodePoint(...e),cS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Sn},sd=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Op=function(e,t,n){let r=0;for(e=n?Cn(e/nS):e>>1,e+=Cn(e/t);e>Ys*Ho>>1;r+=Sn)e=Cn(e/Ys);return Cn(r+(Ys+1)*e/(e+tS))},Np=function(e){const t=[],n=e.length;let r=0,o=Cp,i=Sp,s=e.lastIndexOf(Ap);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&er("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=Sn;;d+=Sn){a>=n&&er("invalid-input");const f=cS(e.charCodeAt(a++));f>=Sn&&er("invalid-input"),f>Cn((Qr-r)/l)&&er("overflow"),r+=f*l;const p=d<=i?Ju:d>=i+Ho?Ho:d-i;if(f<p)break;const g=Sn-p;l>Cn(Qr/g)&&er("overflow"),l*=g}const c=t.length+1;i=Op(r-u,c,u==0),Cn(r/c)>Qr-o&&er("overflow"),o+=Cn(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Rp=function(e){const t=[];e=Dp(e);const n=e.length;let r=Cp,o=0,i=Sp;for(const u of e)u<128&&t.push(Zs(u));const s=t.length;let a=s;for(s&&t.push(Ap);a<n;){let u=Qr;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>Cn((Qr-o)/c)&&er("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>Qr&&er("overflow"),l===r){let d=o;for(let f=Sn;;f+=Sn){const p=f<=i?Ju:f>=i+Ho?Ho:f-i;if(d<p)break;const g=d-p,b=Sn-p;t.push(Zs(sd(p+g%b,0))),d=Cn(g/b)}t.push(Zs(sd(d,0))),i=Op(o,c,a===s),o=0,++a}++o,++r}return t.join("")},lS=function(e){return Tp(e,function(t){return rS.test(t)?Np(t.slice(4).toLowerCase()):t})},dS=function(e){return Tp(e,function(t){return oS.test(t)?"xn--"+Rp(t):t})},Ip={version:"2.3.1",ucs2:{decode:Dp,encode:uS},decode:Np,encode:Rp,toASCII:dS,toUnicode:lS},fS={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},gS={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"]}}},pS={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"]}}},hS={default:fS,zero:gS,commonmark:pS},mS=/^(vbscript|javascript|file|data):/,bS=/^data:image\/(gif|png|jpeg|webp);/;function yS(e){const t=e.trim().toLowerCase();return mS.test(t)?bS.test(t):!0}const Mp=["http:","https:","mailto:"];function vS(e){const t=Vu(e,!0);if(t.hostname&&(!t.protocol||Mp.indexOf(t.protocol)>=0))try{t.hostname=Ip.toASCII(t.hostname)}catch{}return Zo(Gu(t))}function xS(e){const t=Vu(e,!0);if(t.hostname&&(!t.protocol||Mp.indexOf(t.protocol)>=0))try{t.hostname=Ip.toUnicode(t.hostname)}catch{}return no(Gu(t),no.defaultChars+"%")}function cn(e,t){if(!(this instanceof cn))return new cn(e,t);t||Yu(e)||(t=e||{},e="default"),this.inline=new Qo,this.block=new vs,this.core=new Xu,this.renderer=new uo,this.linkify=new rn,this.validateLink=yS,this.normalizeLink=vS,this.normalizeLinkText=xS,this.utils=EE,this.helpers=ms({},AE),this.options={},this.configure(e),t&&this.set(t)}cn.prototype.set=function(e){return ms(this.options,e),this};cn.prototype.configure=function(e){const t=this;if(Yu(e)){const n=e;if(e=hS[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 ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xs,ad;function wS(){if(ad)return Xs;ad=1;var e=!0,t=!1,n=!1;Xs=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 Xs}var _S=wS();const ES=ec(_S);var Qs,ud;function kS(){if(ud)return Qs;ud=1;function e(O){return O instanceof Map?O.clear=O.delete=O.set=function(){throw new Error("map is read-only")}:O instanceof Set&&(O.add=O.clear=O.delete=function(){throw new Error("set is read-only")}),Object.freeze(O),Object.getOwnPropertyNames(O).forEach(V=>{const se=O[V],De=typeof se;(De==="object"||De==="function")&&!Object.isFrozen(se)&&e(se)}),O}class t{constructor(V){V.data===void 0&&(V.data={}),this.data=V.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(O){return O.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(O,...V){const se=Object.create(null);for(const De in O)se[De]=O[De];return V.forEach(function(De){for(const dt in De)se[dt]=De[dt]}),se}const o="</span>",i=O=>!!O.scope,s=(O,{prefix:V})=>{if(O.startsWith("language:"))return O.replace("language:","language-");if(O.includes(".")){const se=O.split(".");return[`${V}${se.shift()}`,...se.map((De,dt)=>`${De}${"_".repeat(dt+1)}`)].join(" ")}return`${V}${O}`};class a{constructor(V,se){this.buffer="",this.classPrefix=se.classPrefix,V.walk(this)}addText(V){this.buffer+=n(V)}openNode(V){if(!i(V))return;const se=s(V.scope,{prefix:this.classPrefix});this.span(se)}closeNode(V){i(V)&&(this.buffer+=o)}value(){return this.buffer}span(V){this.buffer+=`<span class="${V}">`}}const u=(O={})=>{const V={children:[]};return Object.assign(V,O),V};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(V){this.top.children.push(V)}openNode(V){const se=u({scope:V});this.add(se),this.stack.push(se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(V){return this.constructor._walk(V,this.rootNode)}static _walk(V,se){return typeof se=="string"?V.addText(se):se.children&&(V.openNode(se),se.children.forEach(De=>this._walk(V,De)),V.closeNode(se)),V}static _collapse(V){typeof V!="string"&&V.children&&(V.children.every(se=>typeof se=="string")?V.children=[V.children.join("")]:V.children.forEach(se=>{c._collapse(se)}))}}class l extends c{constructor(V){super(),this.options=V}addText(V){V!==""&&this.add(V)}startScope(V){this.openNode(V)}endScope(){this.closeNode()}__addSublanguage(V,se){const De=V.root;se&&(De.scope=`language:${se}`),this.add(De)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(O){return O?typeof O=="string"?O:O.source:null}function f(O){return b("(?=",O,")")}function p(O){return b("(?:",O,")*")}function g(O){return b("(?:",O,")?")}function b(...O){return O.map(se=>d(se)).join("")}function h(O){const V=O[O.length-1];return typeof V=="object"&&V.constructor===Object?(O.splice(O.length-1,1),V):{}}function y(...O){return"("+(h(O).capture?"":"?:")+O.map(De=>d(De)).join("|")+")"}function v(O){return new RegExp(O.toString()+"|").exec("").length-1}function x(O,V){const se=O&&O.exec(V);return se&&se.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function E(O,{joinWith:V}){let se=0;return O.map(De=>{se+=1;const dt=se;let ft=d(De),we="";for(;ft.length>0;){const xe=k.exec(ft);if(!xe){we+=ft;break}we+=ft.substring(0,xe.index),ft=ft.substring(xe.index+xe[0].length),xe[0][0]==="\\"&&xe[1]?we+="\\"+String(Number(xe[1])+dt):(we+=xe[0],xe[0]==="("&&se++)}return we}).map(De=>`(${De})`).join(V)}const C=/\b\B/,D="[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+)?)",A="\\b(0b[01]+)",N="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",M=(O={})=>{const V=/^#![ ]*\//;return O.binary&&(O.begin=b(V,/.*\b/,O.binary,/\b.*/)),r({scope:"meta",begin:V,end:/$/,relevance:0,"on:begin":(se,De)=>{se.index!==0&&De.ignoreMatch()}},O)},S={begin:"\\\\[\\s\\S]",relevance:0},R={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[S]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[S]},j={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},z=function(O,V,se={}){const De=r({scope:"comment",begin:O,end:V,contains:[]},se);De.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 dt=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 De.contains.push({begin:b(/[ ]+/,"(",dt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),De},H=z("//","$"),P=z("/\\*","\\*/"),J=z("#","$"),B={scope:"number",begin:I,relevance:0},K={scope:"number",begin:L,relevance:0},W={scope:"number",begin:A,relevance:0},re={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[S,{begin:/\[/,end:/\]/,relevance:0,contains:[S]}]},ve={scope:"title",begin:D,relevance:0},_e={scope:"title",begin:_,relevance:0},X={begin:"\\.\\s*"+_,relevance:0};var Te=Object.freeze({__proto__:null,APOS_STRING_MODE:R,BACKSLASH_ESCAPE:S,BINARY_NUMBER_MODE:W,BINARY_NUMBER_RE:A,COMMENT:z,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:H,C_NUMBER_MODE:K,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(O){return Object.assign(O,{"on:begin":(V,se)=>{se.data._beginMatch=V[1]},"on:end":(V,se)=>{se.data._beginMatch!==V[1]&&se.ignoreMatch()}})},HASH_COMMENT_MODE:J,IDENT_RE:D,MATCH_NOTHING_RE:C,METHOD_GUARD:X,NUMBER_MODE:B,NUMBER_RE:I,PHRASAL_WORDS_MODE:j,QUOTE_STRING_MODE:F,REGEXP_MODE:re,RE_STARTERS_RE:N,SHEBANG:M,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:_e});function Ie(O,V){O.input[O.index-1]==="."&&V.ignoreMatch()}function Je(O,V){O.className!==void 0&&(O.scope=O.className,delete O.className)}function lt(O,V){V&&O.beginKeywords&&(O.begin="\\b("+O.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",O.__beforeBegin=Ie,O.keywords=O.keywords||O.beginKeywords,delete O.beginKeywords,O.relevance===void 0&&(O.relevance=0))}function pe(O,V){Array.isArray(O.illegal)&&(O.illegal=y(...O.illegal))}function Q(O,V){if(O.match){if(O.begin||O.end)throw new Error("begin & end are not supported with match");O.begin=O.match,delete O.match}}function ae(O,V){O.relevance===void 0&&(O.relevance=1)}const Oe=(O,V)=>{if(!O.beforeMatch)return;if(O.starts)throw new Error("beforeMatch cannot be used with starts");const se=Object.assign({},O);Object.keys(O).forEach(De=>{delete O[De]}),O.keywords=se.keywords,O.begin=b(se.beforeMatch,f(se.begin)),O.starts={relevance:0,contains:[Object.assign(se,{endsParent:!0})]},O.relevance=0,delete se.beforeMatch},q=["of","and","for","in","not","or","if","then","parent","list","value"],ke="keyword";function Ae(O,V,se=ke){const De=Object.create(null);return typeof O=="string"?dt(se,O.split(" ")):Array.isArray(O)?dt(se,O):Object.keys(O).forEach(function(ft){Object.assign(De,Ae(O[ft],V,ft))}),De;function dt(ft,we){V&&(we=we.map(xe=>xe.toLowerCase())),we.forEach(function(xe){const Me=xe.split("|");De[Me[0]]=[ft,Be(Me[0],Me[1])]})}}function Be(O,V){return V?Number(V):We(O)?0:1}function We(O){return q.includes(O.toLowerCase())}const Kt={},At=O=>{console.error(O)},Ne=(O,...V)=>{console.log(`WARN: ${O}`,...V)},et=(O,V)=>{Kt[`${O}/${V}`]||(console.log(`Deprecated as of ${O}. ${V}`),Kt[`${O}/${V}`]=!0)},_t=new Error;function G(O,V,{key:se}){let De=0;const dt=O[se],ft={},we={};for(let xe=1;xe<=V.length;xe++)we[xe+De]=dt[xe],ft[xe+De]=!0,De+=v(V[xe-1]);O[se]=we,O[se]._emit=ft,O[se]._multi=!0}function he(O){if(Array.isArray(O.begin)){if(O.skip||O.excludeBegin||O.returnBegin)throw At("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),_t;if(typeof O.beginScope!="object"||O.beginScope===null)throw At("beginScope must be object"),_t;G(O,O.begin,{key:"beginScope"}),O.begin=E(O.begin,{joinWith:""})}}function fe(O){if(Array.isArray(O.end)){if(O.skip||O.excludeEnd||O.returnEnd)throw At("skip, excludeEnd, returnEnd not compatible with endScope: {}"),_t;if(typeof O.endScope!="object"||O.endScope===null)throw At("endScope must be object"),_t;G(O,O.end,{key:"endScope"}),O.end=E(O.end,{joinWith:""})}}function Ge(O){O.scope&&typeof O.scope=="object"&&O.scope!==null&&(O.beginScope=O.scope,delete O.scope)}function $e(O){Ge(O),typeof O.beginScope=="string"&&(O.beginScope={_wrap:O.beginScope}),typeof O.endScope=="string"&&(O.endScope={_wrap:O.endScope}),he(O),fe(O)}function Ye(O){function V(we,xe){return new RegExp(d(we),"m"+(O.case_insensitive?"i":"")+(O.unicodeRegex?"u":"")+(xe?"g":""))}class se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(xe,Me){Me.position=this.position++,this.matchIndexes[this.matchAt]=Me,this.regexes.push([Me,xe]),this.matchAt+=v(xe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const xe=this.regexes.map(Me=>Me[1]);this.matcherRe=V(E(xe,{joinWith:"|"}),!0),this.lastIndex=0}exec(xe){this.matcherRe.lastIndex=this.lastIndex;const Me=this.matcherRe.exec(xe);if(!Me)return null;const Tt=Me.findIndex((co,Ss)=>Ss>0&&co!==void 0),wt=this.matchIndexes[Tt];return Me.splice(0,Tt),Object.assign(Me,wt)}}class De{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(xe){if(this.multiRegexes[xe])return this.multiRegexes[xe];const Me=new se;return this.rules.slice(xe).forEach(([Tt,wt])=>Me.addRule(Tt,wt)),Me.compile(),this.multiRegexes[xe]=Me,Me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(xe,Me){this.rules.push([xe,Me]),Me.type==="begin"&&this.count++}exec(xe){const Me=this.getMatcher(this.regexIndex);Me.lastIndex=this.lastIndex;let Tt=Me.exec(xe);if(this.resumingScanAtSamePosition()&&!(Tt&&Tt.index===this.lastIndex)){const wt=this.getMatcher(0);wt.lastIndex=this.lastIndex+1,Tt=wt.exec(xe)}return Tt&&(this.regexIndex+=Tt.position+1,this.regexIndex===this.count&&this.considerAll()),Tt}}function dt(we){const xe=new De;return we.contains.forEach(Me=>xe.addRule(Me.begin,{rule:Me,type:"begin"})),we.terminatorEnd&&xe.addRule(we.terminatorEnd,{type:"end"}),we.illegal&&xe.addRule(we.illegal,{type:"illegal"}),xe}function ft(we,xe){const Me=we;if(we.isCompiled)return Me;[Je,Q,$e,Oe].forEach(wt=>wt(we,xe)),O.compilerExtensions.forEach(wt=>wt(we,xe)),we.__beforeBegin=null,[lt,pe,ae].forEach(wt=>wt(we,xe)),we.isCompiled=!0;let Tt=null;return typeof we.keywords=="object"&&we.keywords.$pattern&&(we.keywords=Object.assign({},we.keywords),Tt=we.keywords.$pattern,delete we.keywords.$pattern),Tt=Tt||/\w+/,we.keywords&&(we.keywords=Ae(we.keywords,O.case_insensitive)),Me.keywordPatternRe=V(Tt,!0),xe&&(we.begin||(we.begin=/\B|\b/),Me.beginRe=V(Me.begin),!we.end&&!we.endsWithParent&&(we.end=/\B|\b/),we.end&&(Me.endRe=V(Me.end)),Me.terminatorEnd=d(Me.end)||"",we.endsWithParent&&xe.terminatorEnd&&(Me.terminatorEnd+=(we.end?"|":"")+xe.terminatorEnd)),we.illegal&&(Me.illegalRe=V(we.illegal)),we.contains||(we.contains=[]),we.contains=[].concat(...we.contains.map(function(wt){return sn(wt==="self"?we:wt)})),we.contains.forEach(function(wt){ft(wt,Me)}),we.starts&&ft(we.starts,xe),Me.matcher=dt(Me),Me}if(O.compilerExtensions||(O.compilerExtensions=[]),O.contains&&O.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return O.classNameAliases=r(O.classNameAliases||{}),ft(O)}function Et(O){return O?O.endsWithParent||Et(O.starts):!1}function sn(O){return O.variants&&!O.cachedVariants&&(O.cachedVariants=O.variants.map(function(V){return r(O,{variants:null},V)})),O.cachedVariants?O.cachedVariants:Et(O)?r(O,{starts:O.starts?r(O.starts):null}):Object.isFrozen(O)?r(O):O}var Mn="11.11.1";class Ln extends Error{constructor(V,se){super(V),this.name="HTMLInjectionError",this.html=se}}const ot=n,Ve=r,Pe=Symbol("nomatch"),nt=7,ht=function(O){const V=Object.create(null),se=Object.create(null),De=[];let dt=!0;const ft="Could not find the language '{}', did you forget to load/include a language module?",we={disableAutodetect:!0,name:"Plain text",contains:[]};let xe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function Me(te){return xe.noHighlightRe.test(te)}function Tt(te){let Ce=te.className+" ";Ce+=te.parentNode?te.parentNode.className:"";const Ze=xe.languageDetectRe.exec(Ce);if(Ze){const at=Yn(Ze[1]);return at||(Ne(ft.replace("{}",Ze[1])),Ne("Falling back to no-highlight mode for this block.",te)),at?Ze[1]:"no-highlight"}return Ce.split(/\s+/).find(at=>Me(at)||Yn(at))}function wt(te,Ce,Ze){let at="",kt="";typeof Ce=="object"?(at=te,Ze=Ce.ignoreIllegals,kt=Ce.language):(et("10.7.0","highlight(lang, code, ...args) has been deprecated."),et("10.7.0",`Please use highlight(code, options) instead.
|
|
659
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),kt=te,at=Ce),Ze===void 0&&(Ze=!0);const dn={code:at,language:kt};ei("before:highlight",dn);const Zn=dn.result?dn.result:co(dn.language,dn.code,Ze);return Zn.code=dn.code,ei("after:highlight",Zn),Zn}function co(te,Ce,Ze,at){const kt=Object.create(null);function dn(le,Se){return le.keywords[Se]}function Zn(){if(!Fe.keywords){$t.addText(ut);return}let le=0;Fe.keywordPatternRe.lastIndex=0;let Se=Fe.keywordPatternRe.exec(ut),Ke="";for(;Se;){Ke+=ut.substring(le,Se.index);const it=vn.case_insensitive?Se[0].toLowerCase():Se[0],Pt=dn(Fe,it);if(Pt){const[$n,lh]=Pt;if($t.addText(Ke),Ke="",kt[it]=(kt[it]||0)+1,kt[it]<=nt&&(ri+=lh),$n.startsWith("_"))Ke+=Se[0];else{const dh=vn.classNameAliases[$n]||$n;yn(Se[0],dh)}}else Ke+=Se[0];le=Fe.keywordPatternRe.lastIndex,Se=Fe.keywordPatternRe.exec(ut)}Ke+=ut.substring(le),$t.addText(Ke)}function ti(){if(ut==="")return;let le=null;if(typeof Fe.subLanguage=="string"){if(!V[Fe.subLanguage]){$t.addText(ut);return}le=co(Fe.subLanguage,ut,!0,gc[Fe.subLanguage]),gc[Fe.subLanguage]=le._top}else le=Cs(ut,Fe.subLanguage.length?Fe.subLanguage:null);Fe.relevance>0&&(ri+=le.relevance),$t.__addSublanguage(le._emitter,le.language)}function Zt(){Fe.subLanguage!=null?ti():Zn(),ut=""}function yn(le,Se){le!==""&&($t.startScope(Se),$t.addText(le),$t.endScope())}function cc(le,Se){let Ke=1;const it=Se.length-1;for(;Ke<=it;){if(!le._emit[Ke]){Ke++;continue}const Pt=vn.classNameAliases[le[Ke]]||le[Ke],$n=Se[Ke];Pt?yn($n,Pt):(ut=$n,Zn(),ut=""),Ke++}}function lc(le,Se){return le.scope&&typeof le.scope=="string"&&$t.openNode(vn.classNameAliases[le.scope]||le.scope),le.beginScope&&(le.beginScope._wrap?(yn(ut,vn.classNameAliases[le.beginScope._wrap]||le.beginScope._wrap),ut=""):le.beginScope._multi&&(cc(le.beginScope,Se),ut="")),Fe=Object.create(le,{parent:{value:Fe}}),Fe}function dc(le,Se,Ke){let it=x(le.endRe,Ke);if(it){if(le["on:end"]){const Pt=new t(le);le["on:end"](Se,Pt),Pt.isMatchIgnored&&(it=!1)}if(it){for(;le.endsParent&&le.parent;)le=le.parent;return le}}if(le.endsWithParent)return dc(le.parent,Se,Ke)}function ih(le){return Fe.matcher.regexIndex===0?(ut+=le[0],1):(Os=!0,0)}function sh(le){const Se=le[0],Ke=le.rule,it=new t(Ke),Pt=[Ke.__beforeBegin,Ke["on:begin"]];for(const $n of Pt)if($n&&($n(le,it),it.isMatchIgnored))return ih(Se);return Ke.skip?ut+=Se:(Ke.excludeBegin&&(ut+=Se),Zt(),!Ke.returnBegin&&!Ke.excludeBegin&&(ut=Se)),lc(Ke,le),Ke.returnBegin?0:Se.length}function ah(le){const Se=le[0],Ke=Ce.substring(le.index),it=dc(Fe,le,Ke);if(!it)return Pe;const Pt=Fe;Fe.endScope&&Fe.endScope._wrap?(Zt(),yn(Se,Fe.endScope._wrap)):Fe.endScope&&Fe.endScope._multi?(Zt(),cc(Fe.endScope,le)):Pt.skip?ut+=Se:(Pt.returnEnd||Pt.excludeEnd||(ut+=Se),Zt(),Pt.excludeEnd&&(ut=Se));do Fe.scope&&$t.closeNode(),!Fe.skip&&!Fe.subLanguage&&(ri+=Fe.relevance),Fe=Fe.parent;while(Fe!==it.parent);return it.starts&&lc(it.starts,le),Pt.returnEnd?0:Se.length}function uh(){const le=[];for(let Se=Fe;Se!==vn;Se=Se.parent)Se.scope&&le.unshift(Se.scope);le.forEach(Se=>$t.openNode(Se))}let ni={};function fc(le,Se){const Ke=Se&&Se[0];if(ut+=le,Ke==null)return Zt(),0;if(ni.type==="begin"&&Se.type==="end"&&ni.index===Se.index&&Ke===""){if(ut+=Ce.slice(Se.index,Se.index+1),!dt){const it=new Error(`0 width match regex (${te})`);throw it.languageName=te,it.badRule=ni.rule,it}return 1}if(ni=Se,Se.type==="begin")return sh(Se);if(Se.type==="illegal"&&!Ze){const it=new Error('Illegal lexeme "'+Ke+'" for mode "'+(Fe.scope||"<unnamed>")+'"');throw it.mode=Fe,it}else if(Se.type==="end"){const it=ah(Se);if(it!==Pe)return it}if(Se.type==="illegal"&&Ke==="")return ut+=`
|
|
660
|
+
`,1;if(Ds>1e5&&Ds>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ut+=Ke,Ke.length}const vn=Yn(te);if(!vn)throw At(ft.replace("{}",te)),new Error('Unknown language: "'+te+'"');const ch=Ye(vn);let Ts="",Fe=at||ch;const gc={},$t=new xe.__emitter(xe);uh();let ut="",ri=0,mr=0,Ds=0,Os=!1;try{if(vn.__emitTokens)vn.__emitTokens(Ce,$t);else{for(Fe.matcher.considerAll();;){Ds++,Os?Os=!1:Fe.matcher.considerAll(),Fe.matcher.lastIndex=mr;const le=Fe.matcher.exec(Ce);if(!le)break;const Se=Ce.substring(mr,le.index),Ke=fc(Se,le);mr=le.index+Ke}fc(Ce.substring(mr))}return $t.finalize(),Ts=$t.toHTML(),{language:te,value:Ts,relevance:ri,illegal:!1,_emitter:$t,_top:Fe}}catch(le){if(le.message&&le.message.includes("Illegal"))return{language:te,value:ot(Ce),illegal:!0,relevance:0,_illegalBy:{message:le.message,index:mr,context:Ce.slice(mr-100,mr+100),mode:le.mode,resultSoFar:Ts},_emitter:$t};if(dt)return{language:te,value:ot(Ce),illegal:!1,relevance:0,errorRaised:le,_emitter:$t,_top:Fe};throw le}}function Ss(te){const Ce={value:ot(te),illegal:!1,relevance:0,_top:we,_emitter:new xe.__emitter(xe)};return Ce._emitter.addText(te),Ce}function Cs(te,Ce){Ce=Ce||xe.languages||Object.keys(V);const Ze=Ss(te),at=Ce.filter(Yn).filter(uc).map(Zt=>co(Zt,te,!1));at.unshift(Ze);const kt=at.sort((Zt,yn)=>{if(Zt.relevance!==yn.relevance)return yn.relevance-Zt.relevance;if(Zt.language&&yn.language){if(Yn(Zt.language).supersetOf===yn.language)return 1;if(Yn(yn.language).supersetOf===Zt.language)return-1}return 0}),[dn,Zn]=kt,ti=dn;return ti.secondBest=Zn,ti}function Wp(te,Ce,Ze){const at=Ce&&se[Ce]||Ze;te.classList.add("hljs"),te.classList.add(`language-${at}`)}function As(te){let Ce=null;const Ze=Tt(te);if(Me(Ze))return;if(ei("before:highlightElement",{el:te,language:Ze}),te.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",te);return}if(te.children.length>0&&(xe.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(te)),xe.throwUnescapedHTML))throw new Ln("One of your code blocks includes unescaped HTML.",te.innerHTML);Ce=te;const at=Ce.textContent,kt=Ze?wt(at,{language:Ze,ignoreIllegals:!0}):Cs(at);te.innerHTML=kt.value,te.dataset.highlighted="yes",Wp(te,Ze,kt.language),te.result={language:kt.language,re:kt.relevance,relevance:kt.relevance},kt.secondBest&&(te.secondBest={language:kt.secondBest.language,relevance:kt.secondBest.relevance}),ei("after:highlightElement",{el:te,result:kt,text:at})}function Yp(te){xe=Ve(xe,te)}const Zp=()=>{Jo(),et("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Xp(){Jo(),et("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let sc=!1;function Jo(){function te(){Jo()}if(document.readyState==="loading"){sc||window.addEventListener("DOMContentLoaded",te,!1),sc=!0;return}document.querySelectorAll(xe.cssSelector).forEach(As)}function Qp(te,Ce){let Ze=null;try{Ze=Ce(O)}catch(at){if(At("Language definition for '{}' could not be registered.".replace("{}",te)),dt)At(at);else throw at;Ze=we}Ze.name||(Ze.name=te),V[te]=Ze,Ze.rawDefinition=Ce.bind(null,O),Ze.aliases&&ac(Ze.aliases,{languageName:te})}function Jp(te){delete V[te];for(const Ce of Object.keys(se))se[Ce]===te&&delete se[Ce]}function eh(){return Object.keys(V)}function Yn(te){return te=(te||"").toLowerCase(),V[te]||V[se[te]]}function ac(te,{languageName:Ce}){typeof te=="string"&&(te=[te]),te.forEach(Ze=>{se[Ze.toLowerCase()]=Ce})}function uc(te){const Ce=Yn(te);return Ce&&!Ce.disableAutodetect}function th(te){te["before:highlightBlock"]&&!te["before:highlightElement"]&&(te["before:highlightElement"]=Ce=>{te["before:highlightBlock"](Object.assign({block:Ce.el},Ce))}),te["after:highlightBlock"]&&!te["after:highlightElement"]&&(te["after:highlightElement"]=Ce=>{te["after:highlightBlock"](Object.assign({block:Ce.el},Ce))})}function nh(te){th(te),De.push(te)}function rh(te){const Ce=De.indexOf(te);Ce!==-1&&De.splice(Ce,1)}function ei(te,Ce){const Ze=te;De.forEach(function(at){at[Ze]&&at[Ze](Ce)})}function oh(te){return et("10.7.0","highlightBlock will be removed entirely in v12.0"),et("10.7.0","Please use highlightElement now."),As(te)}Object.assign(O,{highlight:wt,highlightAuto:Cs,highlightAll:Jo,highlightElement:As,highlightBlock:oh,configure:Yp,initHighlighting:Zp,initHighlightingOnLoad:Xp,registerLanguage:Qp,unregisterLanguage:Jp,listLanguages:eh,getLanguage:Yn,registerAliases:ac,autoDetection:uc,inherit:Ve,addPlugin:nh,removePlugin:rh}),O.debugMode=function(){dt=!1},O.safeMode=function(){dt=!0},O.versionString=Mn,O.regex={concat:b,lookahead:f,either:y,optional:g,anyNumberOfTimes:p};for(const te in Te)typeof Te[te]=="object"&&e(Te[te]);return Object.assign(O,Te),O},Yt=ht({});return Yt.newInstance=()=>ht({}),Qs=Yt,Yt.HighlightJS=Yt,Yt.default=Yt,Qs}var Js,cd;function SS(){if(cd)return Js;cd=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 Js=e,Js}var ea,ld;function CS(){if(ld)return ea;ld=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"],C=["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,...C]},contains:[g,t.SHEBANG(),b,f,s,a,v,u,c,l,d,r]}}return ea=e,ea}var ta,dd;function AS(){if(dd)return ta;dd=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 ta=e,ta}var na,fd;function TS(){if(fd)return na;fd=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},C={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},D=[C,f,u,r,t.C_BLOCK_COMMENT_MODE,d,l],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:D.concat([{begin:/\(/,end:/\)/,keywords:E,contains:D.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,C,D,[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 na=e,na}var ra,gd;function DS(){if(gd)return ra;gd=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 ra=e,ra}var oa,pd;function OS(){if(pd)return oa;pd=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 oa=u,oa}var ia,hd;function NS(){if(hd)return ia;hd=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 ia=e,ia}var sa,md;function RS(){if(md)return sa;md=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 sa=e,sa}var aa,bd;function IS(){if(bd)return aa;bd=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}]},D=[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=D,h.contains=D;const A=[{begin:/^\s*=>/,starts:{end:"$",contains:D}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:D}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(A).concat(l).concat(D)}}return aa=e,aa}var ua,yd;function MS(){if(yd)return ua;yd=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 ua=e,ua}var ca,vd;function LS(){if(vd)return ca;vd=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 ca=e,ca}var la,xd;function $S(){if(xd)return la;xd=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 la=e,la}var da,wd;function PS(){if(wd)return da;wd=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 da=i,da}var fa,_d;function FS(){if(_d)return fa;_d=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=(_e,{after:X})=>{const ge="</"+_e[0].slice(1);return _e.input.indexOf(ge,X)!==-1},f=e,p={begin:"<>",end:"</>"},g=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(_e,X)=>{const ge=_e[0].length+_e.index,Te=_e.input[ge];if(Te==="<"||Te===","){X.ignoreMatch();return}Te===">"&&(d(_e,{after:ge})||X.ignoreMatch());let Ie;const Je=_e.input.substring(ge);if(Ie=Je.match(/^\s*=/)){X.ignoreMatch();return}if((Ie=Je.match(/^\s+extends\s+/))&&Ie.index===0){X.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:[]},C={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},D={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]},A={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin: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,C,D,_,I,{match:/\$\d+/},k];E.contains=N.concat({begin:/\{/,end:/\}/,keywords:h,contains:["self"].concat(N)});const M=[].concat(A,E.contains),S=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:h,contains:["self"].concat(M)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,contains:S},F={variants:[{match:[/class/,/\s+/,f,/\s+/,/extends/,/\s+/,l.concat(f,"(",l.concat(/\./,f),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,f],scope:{1:"keyword",3:"title.class"}}]},j={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},H={variants:[{match:[/function/,/\s+/,f,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(_e){return l.concat("(?!",_e.join("|"),")")}const B={match:l.concat(/\b/,J([...i,"super","import"].map(_e=>`${_e}\\s*\\(`)),f,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},K={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:/\(\)/},R]},re="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ve={match:[/const|var|let/,/\s+/,f,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(re)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:h,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:j},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,C,D,_,I,A,{match:/\$\d+/},k,j,{scope:"attr",match:f+l.lookahead(":"),relevance:0},ve,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,c.REGEXP_MODE,{className:"function",begin:re,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:S}]}]},{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"]}]}]},H,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,c.inherit(c.TITLE_MODE,{begin:f,className:"title.function"})]},{match:/\.\.\./,relevance:0},K,{match:"\\$"+f,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},B,P,F,W,{match:/\$[(.]/}]}}return fa=u,fa}var ga,Ed;function BS(){if(Ed)return ga;Ed=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 ga=e,ga}var pa,kd;function zS(){if(kd)return pa;kd=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 pa=o,pa}var ha,Sd;function US(){if(Sd)return ha;Sd=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,S,R){return{className:M,begin:S,relevance:R}},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 C=y.concat({begin:/\{/,end:/\}/,contains:h}),D={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:C}},A={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:b,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,D,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:C},{begin:"!important"},d.FUNCTION_DISPATCH]},N={begin:g+`:(:)?(${f.join("|")})`,returnBegin:!0,contains:[A]};return h.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,I,L,N,_,A,D,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:h}}return ha=c,ha}var ma,Cd;function KS(){if(Cd)return ma;Cd=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 ma=e,ma}var ba,Ad;function HS(){if(Ad)return ba;Ad=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 ba=e,ba}var ya,Td;function qS(){if(Td)return ya;Td=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 ya=e,ya}var va,Dd;function jS(){if(Dd)return va;Dd=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 va=e,va}var xa,Od;function GS(){if(Od)return xa;Od=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":(R,F)=>{F.data._beginMatch=R[1]||R[2]},"on:end":(R,F)=>{F.data._beginMatch!==R[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:(R=>{const F=[];return R.forEach(j=>{F.push(j),j.toLowerCase()===j?F.push(j.toUpperCase()):F.push(j.toLowerCase())}),F})(y),built_in:x},C=R=>R.map(F=>F.replace(/\|\d+$/,"")),D={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",C(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(/(?!::)/))},A={relevance:0,begin:/\(/,end:/\)/,keywords:E,contains:[L,a,I,t.C_BLOCK_COMMENT_MODE,b,h,D]},N={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",C(v).join("\\b|"),"|",C(x).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[A]};A.contains.push(N);const M=[L,I,t.C_BLOCK_COMMENT_MODE,b,h,D],S={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:[S,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,I,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},D,{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",S,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 xa=e,xa}var wa,Nd;function VS(){if(Nd)return wa;Nd=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 wa=e,wa}var _a,Rd;function WS(){if(Rd)return _a;Rd=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return _a=e,_a}var Ea,Id;function YS(){if(Id)return Ea;Id=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 Ea=e,Ea}var ka,Md;function ZS(){if(Md)return ka;Md=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return ka=e,ka}var Sa,Ld;function XS(){if(Ld)return Sa;Ld=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 Sa=e,Sa}var Ca,$d;function QS(){if($d)return Ca;$d=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 Ca=e,Ca}var Aa,Pd;function JS(){if(Pd)return Aa;Pd=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 Aa=u,Aa}var Ta,Fd;function eC(){if(Fd)return Ta;Fd=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 Ta=e,Ta}var Da,Bd;function tC(){if(Bd)return Da;Bd=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(C=>!d.includes(C)),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(C){return n.concat(/\b/,n.either(...C.map(D=>D.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:x(p),relevance:0};function E(C,{exceptions:D,when:_}={}){const I=_;return D=D||[],C.map(L=>L.match(/\|\d+$/)||D.includes(L)?L:I(L)?`${L}|0`:L)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(b,{when:C=>C.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 Da=e,Da}var Oa,zd;function nC(){if(zd)return Oa;zd=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(A=>e(A)).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"],C=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function D(_){const I={match:/\s+/,relevance:0},L=_.COMMENT("/\\*","\\*/",{contains:["self"]}),A=[_.C_LINE_COMMENT_MODE,L],N={match:[/\./,o(...s,...a)],className:{2:"keyword"}},M={match:n(/\./,o(...c)),relevance:0},S=c.filter(Pe=>typeof Pe=="string").concat(["_|0"]),R=c.filter(Pe=>typeof Pe!="string").concat(u).map(i),F={variants:[{className:"keyword",match:o(...R,...a)}]},j={$pattern:o(/\b\w+/,/#\w+/),keyword:S.concat(f),literal:l},z=[N,M,F],H={match:n(/\./,o(...p)),relevance:0},P={className:"built_in",match:n(/\b/,o(...p),/(?=\()/)},J=[H,P],B={match:/->/,relevance:0},K={className:"operator",relevance:0,variants:[{match:h},{match:`\\.(\\.|${b})+`}]},W=[B,K],re="([0-9]_*)+",ve="([0-9a-fA-F]_*)+",_e={className:"number",relevance:0,variants:[{match:`\\b(${re})(\\.(${re}))?([eE][+-]?(${re}))?\\b`},{match:`\\b0x(${ve})(\\.(${ve}))?([pP][+-]?(${re}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},X=(Pe="")=>({className:"subst",variants:[{match:n(/\\/,Pe,/[0\\tnr"']/)},{match:n(/\\/,Pe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ge=(Pe="")=>({className:"subst",match:n(/\\/,Pe,/[\t ]*(?:[\r\n]|\r\n)/)}),Te=(Pe="")=>({className:"subst",label:"interpol",begin:n(/\\/,Pe,/\(/),end:/\)/}),Ie=(Pe="")=>({begin:n(Pe,/"""/),end:n(/"""/,Pe),contains:[X(Pe),ge(Pe),Te(Pe)]}),Je=(Pe="")=>({begin:n(Pe,/"/),end:n(/"/,Pe),contains:[X(Pe),Te(Pe)]}),lt={className:"string",variants:[Ie(),Ie("#"),Ie("##"),Ie("###"),Je(),Je("#"),Je("##"),Je("###")]},pe=[_.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[_.BACKSLASH_ESCAPE]}],Q={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:pe},ae=Pe=>{const nt=n(Pe,/\//),ht=n(/\//,Pe);return{begin:nt,end:ht,contains:[...pe,{scope:"comment",begin:`#(?!.*${ht})`,end:/$/}]}},Oe={scope:"regexp",variants:[ae("###"),ae("##"),ae("#"),Q]},q={match:n(/`/,x,/`/)},ke={className:"variable",match:/\$\d+/},Ae={className:"variable",match:`\\$${v}+`},Be=[q,ke,Ae],We={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:C,contains:[...W,_e,lt]}]}},Kt={scope:"keyword",match:n(/@/,o(...E),t(o(/\(/,/\s+/)))},At={scope:"meta",match:n(/@/,x)},Ne=[We,Kt,At],et={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}]},_t={begin:/</,end:/>/,keywords:j,contains:[...A,...z,...Ne,B,et]};et.contains.push(_t);const G={match:n(x,/\s*:/),keywords:"_|0",relevance:0},he={begin:/\(/,end:/\)/,relevance:0,keywords:j,contains:["self",G,...A,Oe,...z,...J,...W,_e,lt,...Be,...Ne,et]},fe={begin:/</,end:/>/,keywords:"repeat each",contains:[...A,et]},Ge={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}]},$e={begin:/\(/,end:/\)/,keywords:j,contains:[Ge,...A,...z,...W,_e,lt,...Ne,et,he],endsParent:!0,illegal:/["']/},Ye={match:[/(func|macro)/,/\s+/,o(q.match,x,h)],className:{1:"keyword",3:"title.function"},contains:[fe,$e,I],illegal:[/\[/,/%/]},Et={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[fe,$e,I],illegal:/\[|%/},sn={match:[/operator/,/\s+/,h],className:{1:"keyword",3:"title"}},Mn={begin:[/precedencegroup/,/\s+/,k],className:{1:"keyword",3:"title"},contains:[et],keywords:[...d,...l],end:/}/},Ln={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},ot={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ve={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:j,contains:[fe,...z,{begin:/:/,end:/\{/,keywords:j,contains:[{scope:"title.class.inherited",match:k},...z],relevance:0}]};for(const Pe of lt.variants){const nt=Pe.contains.find(Yt=>Yt.label==="interpol");nt.keywords=j;const ht=[...z,...J,...W,_e,lt,...Be];nt.contains=[...ht,{begin:/\(/,end:/\)/,contains:["self",...ht]}]}return{name:"Swift",keywords:j,contains:[...A,Ye,Et,Ln,ot,Ve,sn,Mn,{beginKeywords:"import",end:/$/,contains:[...A],relevance:0},Oe,...z,...J,...W,_e,lt,...Be,...Ne,et,he]}}return Oa=D,Oa}var Na,Ud;function rC(){if(Ud)return Na;Ud=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 Na=e,Na}var Ra,Kd;function oC(){if(Kd)return Ra;Kd=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=(X,{after:ge})=>{const Te="</"+X[0].slice(1);return X.input.indexOf(Te,ge)!==-1},p=e,g={begin:"<>",end:"</>"},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,h={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,ge)=>{const Te=X[0].length+X.index,Ie=X.input[Te];if(Ie==="<"||Ie===","){ge.ignoreMatch();return}Ie===">"&&(f(X,{after:Te})||ge.ignoreMatch());let Je;const lt=X.input.substring(Te);if(Je=lt.match(/^\s*=/)){ge.ignoreMatch();return}if((Je=lt.match(/^\s+extends\s+/))&&Je.index===0){ge.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},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"css"}},I={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},L={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,C]},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,D,_,I,L,{match:/\$\d+/},E];C.contains=M.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(M)});const S=[].concat(N,C.contains),R=S.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(S)}]),F={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:R},j={variants:[{match:[/class/,/\s+/,p,/\s+/,/extends/,/\s+/,d.concat(p,"(",d.concat(/\./,p),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,p],scope:{1:"keyword",3:"title.class"}}]},z={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]}},H={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:/%/},J={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(X){return d.concat("(?!",X.join("|"),")")}const K={match:d.concat(/\b/,B([...i,"super","import"].map(X=>`${X}\\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},re={match:[/get|set/,/\s+/,p,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},F]},ve="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",_e={match:[/const|var|let/,/\s+/,p,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ve)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[F]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,D,_,I,L,N,{match:/\$\d+/},E,z,{scope:"attr",match:p+d.lookahead(":"),relevance:0},_e,{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:ve,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:R}]}]},{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]},K,J,j,re,{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,A)=>{const N=I.contains.findIndex(M=>M.label===L);if(N===-1)throw new Error("can not find mode to replace");I.contains.splice(N,1,A)};Object.assign(f.keywords,x),f.exports.PARAMS_CONTAINS.push(k);const C=f.contains.find(I=>I.scope==="attr"),D=Object.assign({},C,{match:d.concat(p,d.lookahead(/\s*\?:/))});f.exports.PARAMS_CONTAINS.push([f.exports.CLASS_REFERENCE,C,D]),f.contains=f.contains.concat([k,b,h,D]),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 Ra=c,Ra}var Ia,Hd;function iC(){if(Hd)return Ia;Hd=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 Ia=e,Ia}var Ma,qd;function sC(){if(qd)return Ma;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 Ma=e,Ma}var La,jd;function aC(){if(jd)return La;jd=1;var e=kS();return e.registerLanguage("xml",SS()),e.registerLanguage("bash",CS()),e.registerLanguage("c",AS()),e.registerLanguage("cpp",TS()),e.registerLanguage("csharp",DS()),e.registerLanguage("css",OS()),e.registerLanguage("markdown",NS()),e.registerLanguage("diff",RS()),e.registerLanguage("ruby",IS()),e.registerLanguage("go",MS()),e.registerLanguage("graphql",LS()),e.registerLanguage("ini",$S()),e.registerLanguage("java",PS()),e.registerLanguage("javascript",FS()),e.registerLanguage("json",BS()),e.registerLanguage("kotlin",zS()),e.registerLanguage("less",US()),e.registerLanguage("lua",KS()),e.registerLanguage("makefile",HS()),e.registerLanguage("perl",qS()),e.registerLanguage("objectivec",jS()),e.registerLanguage("php",GS()),e.registerLanguage("php-template",VS()),e.registerLanguage("plaintext",WS()),e.registerLanguage("python",YS()),e.registerLanguage("python-repl",ZS()),e.registerLanguage("r",XS()),e.registerLanguage("rust",QS()),e.registerLanguage("scss",JS()),e.registerLanguage("shell",eC()),e.registerLanguage("sql",tC()),e.registerLanguage("swift",nC()),e.registerLanguage("yaml",rC()),e.registerLanguage("typescript",oC()),e.registerLanguage("vbnet",iC()),e.registerLanguage("wasm",sC()),e.HighlightJS=e,e.default=e,La=e,La}var uC=aC();const Gd=ec(uC),bn=new cn({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&Gd.getLanguage(t))try{const n=Gd.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),cC=/^<\/?(?:details|summary)>$/i,lC=/^<details\s+open\s*>$/i,dC=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function fC(e){return cC.test(e)||lC.test(e)||dC.test(e)}function Lp(e){const t=bn.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}bn.renderer.rules.html_block=(e,t)=>Lp(e[t].content);bn.renderer.rules.html_inline=(e,t)=>Lp(e[t].content);const gC=bn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),pC=bn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),hC=bn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function $p(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])}`}bn.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]=$p(u[1],s,i?.projectId))}return gC(e,t,n,r,o)};bn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const a=e[t],u=a.attrs?.find(([c])=>c==="href");if(u){const c=$p(u[1],s,i?.projectId);if(c!==u[1]){u[1]=c;const l=a.attrs?.find(([d])=>d==="target");l?l[1]="_blank":a.attrs?.push(["target","_blank"]),a.attrs?.push(["rel","noopener noreferrer"])}}}return pC(e,t,n,r,o)};bn.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 hC(e,t,n,r,o)};bn.use(ES,{enabled:!1,label:!1});function ws(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),bn.render(e,n)}function mC(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const bC="modulepreload",yC=function(e){return"/"+e},Vd={},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=yC(c),c in Vd)return;Vd[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":bC,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 $a=null,Wd=Promise.resolve();const hu=new WeakMap;async function xC(){return $a||($a=vC(()=>import("./mermaid.core-bOetDHeS.js").then(e=>e.bp),[]).then(e=>e.default)),$a}function wC(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function _C(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function EC(e){const t=(hu.get(e)??0)+1;return hu.set(e,t),t}function Pa(e,t){return hu.get(e)===t}async function kC(e){const t=Wd.then(e,e);Wd=t.catch(()=>{}),await t}async function SC(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=EC(e),n=await xC();if(!Pa(e,t))return()=>{};if(await _C(),!Pa(e,t))return()=>{};async function r(a){const u=a.filter(c=>c.isConnected&&e.contains(c));u.length!==0&&await kC(async()=>{if(!Pa(e,t))return;const c=u.filter(d=>d.isConnected&&e.contains(d));if(c.length===0)return;const l=wC();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 CC(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 AC(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function TC(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(!AC(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=CC(u.startContainer,e),f=T("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 DC=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,OC=/^##\s+/,NC=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,RC=/^\d+\.\s+(.*\S)\s*$/,IC=/^\s*$/,Yd=/\s*[((]推荐[))]\s*$/,Zd=/\s*(自由文本)\s*$/,MC=/^\[(choice|confirm)\]\s*/i,LC=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,$C=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function PC(e){const t=e.split(`
|
|
663
|
+
`);let n=0;for(;n<t.length&&!DC.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(OC.test(i))break;const s=UC(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>FC(i,s))}function FC(e,t){const n=MC.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Zd.test(o),s=i?o.replace(Zd,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=BC(e.bodyLines);return{id:Xd(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=zC(e.bodyLines,t,s),u=i||a.length===0;return{id:Xd(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function BC(e){let t,n;for(const r of e){const o=r.trim(),i=LC.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=$C.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function zC(e,t,n){const r=[];let o=0;for(const i of e){if(IC.test(i))continue;const s=KC(i);if(s===null)continue;const a=Yd.test(s),u=a?s.replace(Yd,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:HC(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function UC(e){const t=NC.exec(e);return t?t[1]:null}function KC(e){const t=RC.exec(e);return t?t[1]:null}function Xd(e,t){return`q-${e}-${Pp(t)}`}function HC(e,t,n){return`q-${e}-o-${t}-${Pp(n)}`}function Pp(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 qC=U('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const jC=36,GC=140,VC=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-jC-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-GC-8);return{top:i,left:s,visible:!0}};return m(Y,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=qC();return o.$$mousedown=i=>i.preventDefault(),w(o,m(Ue,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return T("selectionMenu.annotate")}}),null),w(o,m(Ue,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return T("selectionMenu.explain")}}),null),ue(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Ai(o,"top",i.e=s),a!==i.t&&Ai(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};ln(["mousedown"]);var WC=U('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-auto rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),YC=U('<p class="text-destructive ">');const ZC=500,Jn=8,XC=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+Jn,b=d.rect.top-Jn-f;let h;g+f<=p-Jn?h=g:b>=Jn?h=b:h=Math.max(Jn,p-f-Jn);const y=Math.min(Math.max(Jn,d.rect.left),window.innerWidth-ZC-Jn);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 ce(()=>!!e.open)()&&e.snap},get children(){var d=WC(),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=C=>C.stopPropagation(),qn(C=>{queueMicrotask(()=>{C.offsetHeight!==a()&&u(C.offsetHeight)})},d),w(p,()=>T("annotate.title")),w(b,()=>e.snap?.sectionPath),w(g,()=>T("annotate.inSection"),y),w(g,()=>(e.snap?.text??"").slice(0,200),x),k.addEventListener("submit",l),w(k,m(to,{rows:3,get value(){return t()},onInput:C=>n(C.currentTarget.value),get placeholder(){return T("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),E),w(k,(()=>{var C=ce(()=>!!i());return()=>C()&&(()=>{var D=YC();return w(D,i),D})()})(),E),w(E,m(Ue,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return T("common.cancel")}}),null),w(E,m(Ue,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return ce(()=>!!r())()?T("common.submitting"):T("annotate.submit")}}),null),ue(C=>{var D=`${c().top}px`,_=`${c().left}px`;return D!==C.e&&Ai(d,"top",C.e=D),_!==C.t&&Ai(d,"left",C.t=_),C},{e:void 0,t:void 0}),d}})};ln(["mousedown"]);var QC=U('<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">'),JC=U("<div><span class=text-muted-foreground></span><code class=font-mono>"),e3=U('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),t3=U('<div class="flex flex-col gap-1 text-sm">'),n3=U('<p class="text-destructive ">'),r3=U('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><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">'),o3=U('<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"},s3=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),ie(()=>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(T("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,C=E.firstChild,D=C.firstChild,_=C.nextSibling,I=_.firstChild,L=_.nextSibling;return h.$$mousedown=b,y.$$mousedown=A=>A.stopPropagation(),w(x,()=>T("appendTask.title")),w(k,()=>T("appendTask.hint")),E.addEventListener("submit",g),w(D,()=>T("appendTask.type")),w(C,()=>["feat","refct","fix"].map(A=>(()=>{var N=o3(),M=N.firstChild,S=M.nextSibling;return M.addEventListener("change",()=>n(A)),M.value=A,w(S,()=>T(i3[A])),ue(()=>M.disabled=a()),ue(()=>M.checked=t()===A),N})()),null),w(E,m(Y,{get when(){return t()==="fix"},get children(){var A=QC(),N=A.firstChild,M=N.nextSibling,S=M.firstChild,R=S.nextSibling;return N.addEventListener("change",F=>o(F.currentTarget.checked)),w(S,()=>T("appendTask.debugMode")),w(R,()=>T("appendTask.debugModeHint")),ue(()=>N.disabled=a()),ue(()=>N.checked=r()),A}}),_),w(I,()=>T("appendTask.description")),w(_,m(to,{rows:5,get value(){return i()},onInput:A=>s(A.currentTarget.value),get placeholder(){return T("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()}}),null),w(E,m(Y,{get when(){return e.sectionPath||e.quote},get children(){var A=t3();return w(A,m(Y,{get when(){return e.sectionPath},get children(){var N=JC(),M=N.firstChild,S=M.nextSibling;return w(M,()=>T("appendTask.refSection")),w(S,()=>e.sectionPath),N}}),null),w(A,m(Y,{get when(){return e.quote},get children(){var N=e3();return w(N,()=>e.quote?.slice(0,200)),N}}),null),A}}),L),w(E,m(Y,{get when(){return c()},get children(){var A=n3();return w(A,c),A}}),L),w(L,m(Ue,{type:"button",variant:"ghost",size:"sm",onClick:b,get disabled(){return a()},get children(){return T("common.cancel")}}),null),w(L,m(Ue,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[m(Ji,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>ce(()=>!!a())()?T("common.submitting"):T("appendTask.submit"))]}}),null),ue(A=>{var N=T("appendTask.title"),M=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0,S=a();return N!==A.e&&ye(y,"aria-label",A.e=N),A.t=rr(y,M,A.t),S!==A.a&&(C.disabled=A.a=S),A},{e:void 0,t:void 0,a:void 0}),h}})};ln(["mousedown"]);const _o="__freeform__",a3={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},u3="accept";function c3(e){return e!==u3}function l3(e,t,n){const r=a3[t],o=(n??"").trim();if(c3(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function d3(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===_o?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var f3=U('<p class="text-destructive mx-3 mt-1 ">'),g3=U('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-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">'),p3=U('<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>'),Qd=U('<p class="m-0 break-words"><strong></strong>:'),h3=U("<div>"),Jd=U('<ul class="m-0 ml-5 flex list-none flex-col gap-1 border-l border-border pl-2">'),m3=U('<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">'),b3=U('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),y3=U('<em class="text-accent text-sm not-italic"> '),Fa=U('<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=U('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function Fp(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 x3(e){const t=Fp(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function w3(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 _3=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=ne(()=>{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"){x3(x)||(y+=1);continue}const k=x.note??"";v.isFreeform||x.selectedOptionLabel===_o?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 C=Fp(k);if(!C)continue;const D=l3(x,C,k.note);if(!D){a(T("questionConfirm.reasonRequired"));return}y.push(D);continue}const E=d3(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(T("questionConfirm.noAnswers"));return}await e.onSubmit(v)}catch(h){a(h.message)}finally{i(!1)}}return(()=>{var h=g3(),y=h.firstChild,v=y.firstChild,x=v.firstChild,k=x.nextSibling,E=k.firstChild,C=E.nextSibling;C.nextSibling;var D=y.nextSibling;return w(x,()=>T("questionConfirm.title")),w(k,()=>T("questionConfirm.unanswered"),E),w(C,g),w(k,()=>e.questions.length,null),w(y,m(Ue,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:b,get children(){return[m(Ji,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>ce(()=>!!o())()?T("common.submitting"):ce(()=>!!e.running)()?T("questionConfirm.running"):T("questionConfirm.submitAll"))]}}),null),w(h,m(Y,{get when(){return s()},get children(){var _=f3();return w(_,s),_}}),D),w(D,m(mt,{get each(){return e.questions},children:_=>{const I=()=>n()[_.id]??{note:""},L=()=>_.kind!=="confirm"&&(_.isFreeform||I().selectedOptionLabel===_o),A=()=>_.kind==="confirm"&&I().confirmTop==="reject";return(()=>{var N=b3(),M=N.firstChild;return w(M,()=>_.text),w(N,m(Y,{get when(){return _.kind==="choice"},get children(){var S=p3(),R=S.firstChild,F=R.firstChild,j=F.firstChild,z=j.nextSibling;return w(S,m(mt,{get each(){return _.options},children:H=>(()=>{var P=Fa(),J=P.firstChild,B=J.firstChild,K=B.nextSibling;return B.addEventListener("change",()=>c(_.id,H.label)),w(K,()=>H.label,null),w(K,m(Y,{get when(){return H.recommended},get children(){var W=y3();return W.firstChild,w(W,()=>T("questionConfirm.recommended"),null),W}}),null),ue(()=>ye(B,"name",`q-${_.id}`)),ue(()=>B.checked=I().selectedOptionLabel===H.label),P})()}),R),j.addEventListener("change",()=>c(_.id,_o)),w(z,()=>T("questionConfirm.freeformLabel")),ue(()=>ye(j,"name",`q-${_.id}`)),ue(()=>j.checked=I().selectedOptionLabel===_o),S}}),null),w(N,m(Y,{get when(){return _.kind==="confirm"},get children(){return[(()=>{var S=h3();return w(S,m(Y,{get when(){return _.plan},get children(){var R=Qd(),F=R.firstChild;return F.nextSibling,w(F,()=>T("questionConfirm.confirmPlanLabel")),w(R,()=>_.plan,null),R}}),null),w(S,m(Y,{get when(){return _.impact},get children(){var R=Qd(),F=R.firstChild;return F.nextSibling,w(F,()=>T("questionConfirm.confirmImpactLabel")),w(R,()=>_.impact,null),R}}),null),ue(()=>gt(S,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${w3(_.impact)}`)),S})(),(()=>{var S=m3(),R=S.firstChild,F=R.firstChild,j=F.firstChild,z=j.nextSibling,H=R.nextSibling,P=H.firstChild,J=P.firstChild,B=J.nextSibling;return j.addEventListener("change",()=>d(_.id,"accept")),w(z,()=>T("questionConfirm.decisionAccept")),J.addEventListener("change",()=>d(_.id,"reject")),w(B,()=>T("questionConfirm.decisionReject")),w(S,m(Y,{get when(){return I().confirmTop==="reject"},get children(){var K=Jd();return w(K,m(mt,{get each(){return[["alternative",T("questionConfirm.intentAlternative")],["constraint",T("questionConfirm.intentConstraint")],["dropGoal",T("questionConfirm.intentDropGoal")]]},children:([W,re])=>(()=>{var ve=Fa(),_e=ve.firstChild,X=_e.firstChild,ge=X.nextSibling;return X.addEventListener("change",()=>f(_.id,W)),w(ge,re),ue(()=>ye(X,"name",`q-${_.id}-intent`)),ue(()=>X.checked=I().confirmIntent===W),ve})()}),null),w(K,m(Y,{get when(){return I().confirmIntent==="dropGoal"},get children(){var W=Jd();return w(W,m(mt,{get each(){return[["current",T("questionConfirm.dropGoalCurrent")],["spec",T("questionConfirm.dropGoalSpec")]]},children:([re,ve])=>(()=>{var _e=Fa(),X=_e.firstChild,ge=X.firstChild,Te=ge.nextSibling;return ge.addEventListener("change",()=>p(_.id,re)),w(Te,ve),ue(()=>ye(ge,"name",`q-${_.id}-drop`)),ue(()=>ge.checked=I().confirmDrop===re),_e})()})),W}}),null),K}}),null),ue(K=>{var W=`q-${_.id}`,re=`q-${_.id}`;return W!==K.e&&ye(j,"name",K.e=W),re!==K.t&&ye(J,"name",K.t=re),K},{e:void 0,t:void 0}),ue(()=>j.checked=I().confirmTop==="accept"),ue(()=>J.checked=I().confirmTop==="reject"),S})()]}}),null),w(N,m(Y,{get when(){return L()},get children(){return m(to,{class:"qcp-note",rows:2,get placeholder(){return T("questionConfirm.notePlaceholder")},get value(){return I().note},onInput:S=>l(_.id,S.currentTarget.value)})}}),null),w(N,m(Y,{get when(){return A()},get children(){return m(to,{class:"qcp-reject-reason",rows:2,get placeholder(){return T("questionConfirm.reasonPlaceholder")},get value(){return I().note},onInput:S=>l(_.id,S.currentTarget.value)})}}),null),N})()}}),null),w(D,m(mt,{get each(){return e.freeforms},children:_=>(()=>{var I=v3(),L=I.firstChild,A=L.firstChild,N=L.nextSibling,M=N.firstChild,S=M.nextSibling,R=S.nextSibling,F=R.nextSibling,j=F.nextSibling;j.nextSibling;var z=N.nextSibling;return z.firstChild,w(A,()=>T("questionConfirm.selectionAnnotation")),w(L,m(Ue,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(_.id),"aria-label":"remove",get children(){return m(jo,{class:"h-4 w-4"})}}),null),w(M,()=>_.sectionPath),w(N,()=>T("questionConfirm.quoteConnector"),R),w(N,()=>_.quote.slice(0,200),j),w(z,()=>_.note,null),I})()}),null),ue(()=>ye(x,"title",T("questionConfirm.title"))),h})()};var E3=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),ef=U("<p class=text-muted-foreground>"),k3=U('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"></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>'),S3=U('<p class="text-destructive ">'),C3=U('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const A3={plan:"bg-stage-plan",tasks:"bg-stage-tasks",execute:"bg-stage-execute",done:"bg-stage-done"},T3=120,tf=3,D3=150,O3=e=>new Promise(t=>setTimeout(t,e));async function N3(e,t,n){for(let r=0;r<=tf;r+=1)try{return await ze.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<tf&&await O3(D3)}return n??null}const R3=()=>{const e=Xi(),t=Go(),[n,r]=$(0),[o,i]=$(!1),[s,a]=$(""),[u]=gn(()=>[t(),e.id,n()],async([B,K],W)=>N3(B,K,W.value)),[c]=gn(()=>[t(),e.id,n()],async([B,K])=>{try{return await ze.getDebug(B,K)}catch{return{exists:!1,text:""}}}),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(null),[h,y]=$(null),[v,x]=$(null),[k,E]=$([]),[C,D]=$(!1),[_,I]=$(null);let L;const A=ne(()=>{const B=u();return B?PC(B.body):[]}),N=ne(()=>!u()||o()?!1:A().length>0||k().length>0);oe(()=>{const B=e.id,K=t();if(!B||!K)return;let W;const re=O1(K,B,{onUpdated:()=>{W&&clearTimeout(W),W=setTimeout(()=>void mf(()=>r(ve=>ve+1)),T3)}});ie(()=>{W&&clearTimeout(W),re()})}),oe(()=>{const B=e.id,K=t();!B||!K||ze.getSpecSession(K,B).then(({sessionId:W,running:re})=>{W&&(a(W),i(re),Vr(W))}).catch(()=>{})}),oe(()=>{const B=t(),K=s();if(!B||!K)return;const W=Yf(B,{onStatus:re=>{re.sessionId===K&&i(re.running)}});ie(W)}),oe(()=>{const B=t(),K=s();if(!B||!K)return;const W=ns(B,K,{onEvent:re=>{(re.type==="turn-completed"||re.type==="error")&&i(!1)}});ie(W)}),oe(()=>{const B=v();if(!B)return;const K=TC(B,d);ie(K)}),es(()=>C()||f()),oe(()=>{const B=v(),K=u();if(!B||!K)return;const W=t();let re=!0,ve;const _e=ws(K.body,{specId:K.id,projectId:W||void 0});L2(B,`<article>${_e}</article>`,{childrenOnly:!0,onBeforeElUpdated:(X,ge)=>!(X.classList?.contains("mermaid")&&X.getAttribute("data-mermaid-source")===ge.getAttribute?.("data-mermaid-source"))}),SC(B).then(X=>{if(!re){X();return}ve=X}),ie(()=>{re=!1,ve?.()})});async function M(){y(null),i(!0);try{const B=t(),{sessionId:K}=await ze.runAgent(B,e.id);a(K),Vr(K)}catch(B){i(!1),y(B.message)}}async function S(B){y(null);try{await ze.setStage(t(),e.id,B),r(K=>K+1)}catch(K){y(K.message)}}function R(B){b(B),p(!0)}async function F(B){const K=g();K&&E(W=>[...W,{id:`f-${Date.now()}-${W.length}`,sectionPath:K.sectionPath,quote:K.text,note:B}])}function j(B){E(K=>K.filter(W=>W.id!==B))}async function z(B){await ze.submitQuestionAnswers(t(),e.id,B),E([]),await M()}function H(){I(l()),D(!0)}async function P(B){const K=t(),W=await ze.appendItem(K,e.id,B);W.sessionId&&(i(!0),a(W.sessionId),Vr(W.sessionId))}async function J(B){i(!0);try{const K=t(),{sessionId:W}=await ze.explain(K,e.id,B.text);a(W),Vr(W)}catch(K){i(!1),y(K.message)}}return(()=>{var B=E3();return w(B,m(Wi,{get fallback(){return(()=>{var K=ef();return w(K,()=>T("common.loading")),K})()},get children(){return m(Y,{get when(){return u()},get fallback(){return(()=>{var K=ef();return w(K,()=>T("specDetail.notFound")),K})()},children:K=>[(()=>{var W=k3(),re=W.firstChild,ve=re.nextSibling,_e=ve.firstChild,X=ve.nextSibling,ge=X.firstChild,Te=ge.nextSibling;return w(re,m(hs,{get items(){return[{label:T("breadcrumb.specList"),href:en("")},{label:K().id}]}}),null),w(re,m(is,{}),null),w(_e,()=>K().frontmatter.summary||T("common.pendingAgent")),ge.addEventListener("change",Ie=>S(Ie.currentTarget.value)),w(Te,()=>Qf(K().frontmatter.updated_at)),w(X,m(Ue,{variant:"outline",size:"sm",class:"append-btn",ref(Ie){var Je=L;typeof Je=="function"?Je(Ie):L=Ie},onClick:H,get children(){return T("specDetail.appendTask")}}),null),w(X,m(ar,{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/${K().id}/review`)},get children(){return T("specDetail.review")}}),null),w(X,m(Y,{get when(){return c()?.exists},get children(){return m(ar,{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/${K().id}/debug`)},get children(){return T("specDetail.debug")}})}}),null),w(X,m(Y,{get when(){return o()},get children(){return m(S0,{variant:"secondary",get children(){return T("specDetail.running")}})}}),null),ue(Ie=>{var Je=`cursor-pointer appearance-none rounded-full border-0 px-2.5 py-0.5 text-sm font-semibold uppercase text-white ${A3[K().frontmatter.stage]??"bg-muted"}`,lt=T("specDetail.forceStage");return Je!==Ie.e&>(ge,Ie.e=Je),lt!==Ie.t&&ye(ge,"title",Ie.t=lt),Ie},{e:void 0,t:void 0}),ue(()=>ge.value=K().frontmatter.stage),W})(),m(Y,{get when(){return h()},get children(){var W=S3();return w(W,h),W}}),(()=>{var W=C3(),re=W.firstChild;return w(W,m(Y,{get when(){return N()},get children(){return m(_3,{get questions(){return A()},get freeforms(){return k()},get running(){return o()},onRemoveFreeform:j,onSubmit:z})}}),re),qn(x,re),W})(),m(VC,{get snap(){return ce(()=>!!f())()?null:l()},onAnnotate:R,onExplain:J}),m(XC,{get open(){return f()},get snap(){return g()},onCancel:()=>p(!1),onSubmit:F}),m(s3,{get open(){return C()},get sectionPath(){return _()?.sectionPath},get quote(){return _()?.text},anchorEl:L,onCancel:()=>D(!1),onSubmit:P})]})}})),B})()},I3=e=>{const[t,n]=Ee(e,["class"]);return m(Cg,ee({get class(){return Lt("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 M3=U("<span>"),L3=U('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),$3=U('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),P3=U('<p class=" text-muted-foreground">'),F3=U('<p class="text-destructive ">'),B3=U('<p class=" text-muted-foreground">(runId: <code></code>)'),nf=U("<p class=text-muted-foreground>"),z3=U('<div class="flex min-h-0 flex-1 gap-4"><section class="flex min-h-0 flex-[4] min-w-0 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"></div><div class="flex gap-4"><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label><label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=fileMode></label></div></section><section class="flex min-h-0 min-w-0 flex-[6] flex-col gap-2">'),U3=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),K3=U('<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">'),H3=U('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),q3=U('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const j3={commit:"review.commit",discard:"review.discard",stash:"review.stash"},bi={review:"review.reviewing",commit:"review.committing",discard:"review.discarding",stash:"review.stashing"},yi={review:"review.reviewChanges",commit:"review.commit",discard:"review.discard",stash:"review.stash"},G3={M:"text-yellow-600",A:"text-green-600",D:"text-red-600","??":"text-blue-600",R:"text-purple-600"},V3=()=>{const e=Xi(),t=Go(),[n]=gn(()=>[t(),e.id],([Q,ae])=>ze.getSpec(Q,ae)),[r,o]=$(0),[i]=gn(()=>[t(),e.id,r()],async([Q,ae])=>ze.getReview(Q,ae)),[s,a]=$([]),[u,c]=$("manual"),[l,d]=$(new Set),[f,p]=$(""),[g,b]=$(!1),[h,y]=$(null),[v,x]=$(null),[k,E]=$(null),[C,D]=$(null),[_,I]=$(null),[L,A]=$(""),[N,M]=$(null);function S(Q){return A(Q),new Promise(ae=>M(()=>ae))}function R(Q){const ae=N();ae&&(M(null),ae(Q))}let F,j=null;ie(()=>j?.()),ie(()=>R(!1)),es();function z(Q){Q&&(Q.style.height="auto",Q.style.height=`${Q.scrollHeight}px`)}const H=ne(()=>{const Q=i()?.text??"";return Q.trim()?ws(Q,{specId:e.id,projectId:t()}):""}),P=ne(()=>W3(i()?.text??"")),J=ne(()=>{const Q=e.id.split("."),ae=Q.length>=2?Q[1]:"feat",Oe=n()?.frontmatter.summary??"";return Oe?`${ae}: ${Oe}`:`${ae}: update`});oe(()=>{const Q=J();Q&&!g()&&p(Q)}),oe(Mt(f,()=>{z(F)})),Vt(()=>z(F)),oe(()=>{const Q=t(),ae=e.id;if(!Q||!ae)return;const Oe=N1(Q,ae,q=>{a(q),d(ke=>{const Ae=new Set(q.map(We=>We.path)),Be=new Set;for(const We of ke)Ae.has(We)&&Be.add(We);return Be})});ie(()=>Oe())});function B(Q){return _()===Q}const K=ne(()=>_()),W=ne(()=>v()!==null||K()!==null||h()!==null);function re(Q,ae){j?.(),I(Q),j=ns(t(),ae,{onEvent:Oe=>{(Oe.type==="turn-completed"||Oe.type==="error")&&(I(null),Q==="review"&&o(q=>q+1),j?.(),j=null)}})}function ve(){return u()==="agent"?s().map(Q=>Q.path):[...l()]}async function _e(Q){if(W())return;E(null);const ae=ve();if(ae.length===0){E(T("review.selectAtLeastOne"));return}if(!(Q==="discard"&&!await S(T("review.confirmDiscard")))){y(Q);try{if(Q==="commit"){const Oe=f().trim();if(!Oe){E(T("review.enterCommitMsg"));return}await ze.directCommit(t(),e.id,{message:Oe,paths:ae})}else Q==="discard"?await ze.directDiscard(t(),e.id,{paths:ae}):Q==="stash"&&await ze.directStash(t(),e.id,{message:f().trim()||`yorz:${e.id}`,paths:ae})}catch(Oe){E(Oe.message)}finally{y(null)}}}async function X(Q){if(!W()&&(E(null),!(Q==="discard"&&!await S(T("review.confirmDiscardAll"))))){x(Q);try{const ae=Q==="review"?await ze.triggerReview(t(),e.id):await ze.gitOp(t(),e.id,Q);D({kind:Q,runId:ae.runId}),Vr(ae.sessionId),re(Q,ae.sessionId)}catch(ae){E(ae.message)}finally{x(null)}}}async function ge(Q){u()==="manual"?await _e(Q):await X(Q)}function Te(Q){return B(Q)||v()===Q||h()===Q}function Ie(Q){d(ae=>{const Oe=new Set(ae);return Oe.has(Q)?Oe.delete(Q):Oe.add(Q),Oe})}function Je(){s().every(Q=>l().has(Q.path))?d(new Set):d(new Set(s().map(Q=>Q.path)))}const lt=ne(()=>s().length>0&&s().every(Q=>l().has(Q.path))),pe=ne(()=>u()==="manual"&&l().size===0);return(()=>{var Q=U3();return w(Q,m(Wi,{get fallback(){return(()=>{var ae=nf();return w(ae,()=>T("common.loading")),ae})()},get children(){return[(()=>{var ae=L3(),Oe=ae.firstChild,q=Oe.firstChild,ke=Oe.nextSibling;return w(Oe,m(hs,{get items(){return[{label:T("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:T("specDetail.review")}]}}),q),w(q,()=>n()?.frontmatter.summary||T("common.pendingAgent")),w(ke,m(Y,{get when(){return P()},get children(){var Ae=M3();return w(Ae,()=>T("review.lastReview",{time:P()})),Ae}}),null),w(ke,m(is,{}),null),ae})(),(()=>{var ae=z3(),Oe=ae.firstChild,q=Oe.firstChild,ke=q.nextSibling,Ae=ke.firstChild,Be=Ae.firstChild,We=Ae.nextSibling,Kt=We.firstChild,At=Oe.nextSibling;return w(q,m(Ue,{variant:"default",size:"sm",get disabled(){return W()||pe()},onClick:()=>ge("commit"),get children(){return[m(Y,{get when(){return Te("commit")},get children(){return m(tr,{class:"mr-1 h-3 w-3 animate-spin"})}}),ce(()=>ce(()=>!!Te("commit"))()?T(bi.commit):T(yi.commit))]}}),null),w(q,m(Ue,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return W()||pe()},onClick:()=>ge("discard"),get children(){return[m(Y,{get when(){return Te("discard")},get children(){return m(tr,{class:"mr-1 h-3 w-3 animate-spin"})}}),ce(()=>ce(()=>!!Te("discard"))()?T(bi.discard):T(yi.discard))]}}),null),w(q,m(Ue,{variant:"ghost",size:"sm",get disabled(){return W()||pe()},onClick:()=>ge("stash"),get children(){return[m(Y,{get when(){return Te("stash")},get children(){return m(tr,{class:"mr-1 h-3 w-3 animate-spin"})}}),ce(()=>ce(()=>!!Te("stash"))()?T(bi.stash):T(yi.stash))]}}),null),w(q,m(I3,{orientation:"vertical",class:"h-6"}),null),w(q,m(Ue,{variant:"ghost",size:"sm",get title(){return T("review.reviewHint")},get disabled(){return W()||s().length===0},onClick:()=>X("review"),get children(){return[m(Y,{get when(){return Te("review")},get children(){return m(tr,{class:"mr-1 h-3 w-3 animate-spin"})}}),ce(()=>ce(()=>!!Te("review"))()?T(bi.review):T(yi.review))]}}),null),w(Oe,m(to,{ref(Ne){var et=F;typeof et=="function"?et(Ne):F=Ne},get placeholder(){return T("review.commitPlaceholder")},get value(){return f()},onInput:Ne=>{b(!0),p(Ne.currentTarget.value),z(F)},get disabled(){return W()},rows:2,class:"resize-none"}),ke),Be.addEventListener("change",()=>c("manual")),w(Ae,()=>T("review.manualSelect"),null),Kt.addEventListener("change",()=>c("agent")),w(We,()=>T("review.agentSelect"),null),w(Oe,m(Y,{get when(){return ce(()=>u()==="manual")()&&s().length>0},get children(){var Ne=$3(),et=Ne.firstChild,_t=et.firstChild;return w(et,m(Ue,{variant:"ghost",size:"sm",onClick:Je,get disabled(){return W()},get children(){return ce(()=>!!lt())()?T("review.deselectAll"):T("review.selectAll")}}),_t),w(_t,()=>T("review.fileCount",{selected:l().size,total:s().length})),w(Ne,m(mt,{get each(){return s()},children:G=>(()=>{var he=K3(),fe=he.firstChild,Ge=fe.nextSibling,$e=Ge.nextSibling;return fe.addEventListener("change",()=>Ie(G.path)),w(Ge,()=>G.status),w($e,()=>G.path),ue(Ye=>{var Et=W(),sn=`inline-block w-6 text-center text-sm font-bold ${G3[G.status]??""}`;return Et!==Ye.e&&(fe.disabled=Ye.e=Et),sn!==Ye.t&>(Ge,Ye.t=sn),Ye},{e:void 0,t:void 0}),ue(()=>fe.checked=l().has(G.path)),he})()}),null),Ne}}),null),w(Oe,m(Y,{get when(){return ce(()=>u()==="manual")()&&s().length===0},get children(){var Ne=P3();return w(Ne,()=>T("review.noChanges")),Ne}}),null),w(Oe,m(Y,{get when(){return k()},get children(){var Ne=F3();return w(Ne,k),Ne}}),null),w(Oe,m(Y,{get when(){return C()},get children(){var Ne=B3(),et=Ne.firstChild,_t=et.nextSibling;return w(Ne,()=>T("review.dispatched"),et),w(Ne,(()=>{var G=ce(()=>C().kind==="review");return()=>G()?T("review.reviewChanges"):T(j3[C().kind])})(),et),w(_t,()=>C().runId.slice(0,8)),Ne}}),null),w(At,m(Y,{get when(){return i.loading},get fallback(){return m(Y,{get when(){return H()},get fallback(){return(()=>{var Ne=q3();return w(Ne,()=>T("review.noReport")),Ne})()},get children(){var Ne=H3();return ue(()=>Ne.innerHTML=H()),Ne}})},get children(){var Ne=nf();return w(Ne,()=>T("common.loading")),Ne}})),ue(Ne=>{var et=W(),_t=W();return et!==Ne.e&&(Be.disabled=Ne.e=et),_t!==Ne.t&&(Kt.disabled=Ne.t=_t),Ne},{e:void 0,t:void 0}),ue(()=>Be.checked=u()==="manual"),ue(()=>Kt.checked=u()==="agent"),ae})()]}}),null),w(Q,m(En,{get open(){return N()!==null},onOpenChange:ae=>{ae||R(!1)},get children(){return m(Mo,{class:"max-w-sm",get children(){return[m($o,{get children(){return[m(Lo,{get children(){return T("review.discardTitle")}}),m(Ku,{get children(){return L()}})]}}),m(Po,{get children(){return[m(Ue,{variant:"outline",onClick:()=>R(!1),get children(){return T("common.cancel")}}),m(Ue,{variant:"destructive",onClick:()=>R(!0),get children(){return T("review.confirmDiscardAction")}})]}})]}})}}),null),Q})()};function W3(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 Y3=U('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),rf=U("<p class=text-muted-foreground>"),Z3=U('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),X3=U('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),Q3=U('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),J3=U('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const eA=()=>{const e=Xi(),t=Go();es();const[n]=gn(()=>[t(),e.id],([i,s])=>ze.getSpec(i,s)),[r]=gn(()=>[t(),e.id],([i,s])=>ze.getDebug(i,s)),o=ne(()=>{const i=mC(r()?.text??"");return i.trim()?ws(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=X3();return w(i,m(Wi,{get fallback(){return(()=>{var s=rf();return w(s,()=>T("common.loading")),s})()},get children(){return[(()=>{var s=Y3(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,m(hs,{get items(){return[{label:T("breadcrumb.specList"),href:en("")},{label:e.id,href:en(`specs/${e.id}`)},{label:T("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||T("common.pendingAgent")),w(c,m(is,{})),s})(),(()=>{var s=Z3();return w(s,m(Y,{get when(){return r.loading},get fallback(){return m(Y,{get when(){return o()},get fallback(){return(()=>{var a=J3();return w(a,()=>T("specDebug.empty")),a})()},get children(){var a=Q3();return ue(()=>a.innerHTML=o()),a}})},get children(){var a=rf();return w(a,()=>T("common.loading")),a}})),s})()]}})),i})()};var tA=U('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add <path>');const Bp=()=>(()=>{var e=tA(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>T("welcome.title")),w(r,()=>T("welcome.description")),w(o,()=>T("welcome.addHint"),i),e})();var nA=U('<p class="p-8 text-muted-foreground">');const rA=()=>{const[e]=gn(()=>ze.listProjects());return m(Y,{get when(){return!e.loading},get fallback(){return(()=>{var t=nA();return w(t,()=>T("common.loading")),t})()},get children(){return m(Y,{get when(){return(e()??[]).length>0},get fallback(){return m(Bp,{})},get children(){return(()=>{const n=(e()??[])[0];return n?m(km,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var of=U('<label class="flex flex-col gap-1 font-medium"><span>'),oA=U('<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=U('<p class=" text-muted-foreground">'),sA=U('<label class="flex cursor-pointer items-center gap-1.5 "><input type=radio name=project-config-agent><span>'),aA=U('<p class=" text-destructive">');const uA={claude:"ClaudeCode",opencode:"OpenCode",codex:"Codex",custom:T("projectConfig.custom")},bo=".yorz/specs",cA=e=>{const[t,n]=$("claude"),[r,o]=$(""),[i,s]=$(""),[a,u]=$(bo),[c,l]=$(bo),[d,f]=$(!1),[p,g]=$(!1),[b,h]=$(null);oe(()=>{e.open&&(h(null),f(!0),(async()=>{try{const E=await ze.getProjectConfig(e.projectId);y(E)}catch(E){h(E.message)}finally{f(!1)}})())});function y(E){n(E.agent.kind),E.agent.kind==="custom"?(o(E.agent.cmd),s(E.agent.args.join(" "))):(o(""),s(""));const C=E.specsDir||bo;u(C),l(C)}function v(E){return E.split(/\s+/).map(C=>C.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 C=r().trim();return C?{kind:"custom",cmd:C,args:v(i())}:{error:T("projectConfig.cmdRequired")}}async function k(E){E.preventDefault(),h(null);const C=x();if("error"in C){h(C.error);return}const D=a().trim()||bo;if(D.split(/[\\/]/).some(_=>_==="..")){h(T("projectConfig.invalidPath"));return}g(!0);try{await ze.updateProjectConfig(e.projectId,{agent:C,specsDir:D});let _=T("projectConfig.saved");D!==c()&&(_+=T("projectConfig.oldSpecsHint")),e.onSaved?.(_),e.onClose()}catch(_){h(_.message)}finally{g(!1)}}return m(En,{get open(){return e.open},onOpenChange:E=>!E&&e.onClose(),get children(){return m(Mo,{class:"max-w-[480px]",get children(){return[m($o,{get children(){return m(Lo,{get children(){return[ce(()=>T("projectConfig.title"))," · ",ce(()=>e.projectName)]}})}}),m(Y,{get when(){return!d()},get fallback(){return(()=>{var E=iA();return w(E,()=>T("common.loading")),E})()},get children(){var E=oA(),C=E.firstChild,D=C.firstChild,_=C.nextSibling,I=_.firstChild,L=I.nextSibling;return E.addEventListener("submit",k),w(D,()=>T("projectConfig.agent")),w(C,()=>["claude","opencode","codex","custom"].map(A=>(()=>{var N=sA(),M=N.firstChild,S=M.nextSibling;return M.addEventListener("change",()=>n(A)),M.value=A,w(S,()=>uA[A]),ue(()=>M.disabled=p()),ue(()=>M.checked=t()===A),N})()),null),w(E,m(Y,{get when(){return t()==="custom"},get children(){return[(()=>{var A=of(),N=A.firstChild;return w(N,()=>T("projectConfig.cmd")),w(A,m(So,{type:"text",get value(){return r()},onInput:M=>o(M.currentTarget.value),get placeholder(){return T("projectConfig.cmdPlaceholder")},get disabled(){return p()}}),null),A})(),(()=>{var A=of(),N=A.firstChild;return w(N,()=>T("projectConfig.args")),w(A,m(So,{type:"text",get value(){return i()},onInput:M=>s(M.currentTarget.value),placeholder:"--flag value",get disabled(){return p()}}),null),A})()]}}),_),w(I,()=>T("projectConfig.specsDir")),w(_,m(So,{type:"text",get value(){return a()},onInput:A=>u(A.currentTarget.value),placeholder:bo,get disabled(){return p()}}),L),w(L,()=>T("projectConfig.specsDirHint")),w(E,(()=>{var A=ce(()=>!!b());return()=>A()&&(()=>{var N=aA();return w(N,b),N})()})(),null),w(E,m(Po,{get children(){return[m(Ue,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return p()},get children(){return T("common.cancel")}}),m(Ue,{type:"submit",get disabled(){return p()},get children(){return ce(()=>!!p())()?T("common.saving"):T("projectConfig.save")}})]}}),null),E}})]}})}})};var lA=U('<span class=" font-semibold tracking-wide">'),dA=U('<div class="flex items-center gap-1">'),fA=U('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),gA=U('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),pA=U('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),hA=U("<aside><header></header><footer>"),mA=U('<p class="px-2.5 py-2 text-muted-foreground">'),bA=U('<span class="block truncate">'),yA=U('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),vA=U('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),xA=U('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),wA=U('<li class="group relative flex items-center">'),_A=U('<span class="inline-block font-semibold">'),EA=U('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),kA=U('<p class="mt-1 text-sm text-destructive break-words">'),SA=U('<p class="break-all font-semibold">');const zp="yorz.projectsSidebar.collapsed",Up="yorz.projectsSidebar.width",tc=220,CA=.2,AA=160,TA=640;function DA(){try{return typeof window<"u"&&window.localStorage.getItem(zp)==="1"}catch{return!1}}function OA(e){try{typeof window<"u"&&window.localStorage.setItem(zp,e?"1":"0")}catch{}}function _s(e){return Number.isFinite(e)?Math.min(TA,Math.max(AA,Math.round(e))):tc}function Ba(){return typeof window>"u"?tc:_s(window.innerWidth*CA)}function NA(){try{if(typeof window>"u")return tc;const e=window.localStorage.getItem(Up);if(!e)return Ba();const t=Number(e);return Number.isFinite(t)?_s(t):Ba()}catch{return Ba()}}function RA(e){try{typeof window<"u"&&window.localStorage.setItem(Up,String(_s(e)))}catch{}}function sf(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 IA=()=>{const[e,t]=$(DA()),[n,r]=$(NA()),[o,{refetch:i}]=gn(()=>ze.listProjects()),[s,a]=$(null),[u,c]=$(null),[l,d]=$(null),[f,p]=$(!1),[g,b]=$(!1),h=Yi(),y=Zi(),v=ne(()=>{const R=y.pathname.match(/^\/([^/]+)/);return R&&R[1]!=="api"?R[1]:""}),x=()=>e()||or();function k(){if(or()){Mi();return}const R=!e();t(R),OA(R)}let E=null,C=null,D=null;Vt(()=>{const R=Xf(()=>{i()});ie(R)});function _(R){x()||(R.preventDefault(),E={startX:R.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),C=F=>{if(!E)return;const j=F.clientX-E.startX,z=_s(E.startW+j);E.raf==null&&(E.raf=requestAnimationFrame(()=>{E&&(E.raf=null,r(z))}))},D=()=>{E?.raf!=null&&cancelAnimationFrame(E.raf),E=null,document.body.classList.remove("is-resizing"),C&&document.removeEventListener("mousemove",C),D&&document.removeEventListener("mouseup",D),C=null,D=null,RA(n())},document.addEventListener("mousemove",C),document.addEventListener("mouseup",D))}ie(()=>{C&&document.removeEventListener("mousemove",C),D&&document.removeEventListener("mouseup",D),document.body.classList.remove("is-resizing")});function I(R,F){F.preventDefault(),F.stopPropagation(),c(R)}function L(R,F="success"){F==="error"?Wr.error(R):Wr.success(R)}function A(R,F){F.preventDefault(),F.stopPropagation(),p(!1),d(R)}async function N(){const R=l();if(R){b(!0);try{f()&&R.worktree?await ze.removeProjectWithFiles(R.id):await ze.removeProject(R.id),await i(),v()===R.id&&h("/"),d(null)}catch(F){const j=F.message;j.includes("409")?(Wr.error(T("sidebar.uncommittedChanges")),d(null)):(a(j),Wr.error(j))}finally{b(!1)}}}function M(){i()}const S=()=>x()?void 0:{width:`${n()}px`};return(()=>{var R=hA(),F=R.firstChild,j=F.nextSibling;return w(F,m(Y,{get when(){return!x()},get fallback(){return m(Ue,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return T("sidebar.expand")},get children(){return m(Gf,{class:"h-4 w-4"})}})},get children(){return[(()=>{var z=lA();return w(z,()=>T("sidebar.title")),z})(),(()=>{var z=dA();return w(z,m(Ue,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:M,get disabled(){return o.loading},get title(){return T("sidebar.refreshList")},get children(){return m(f1,{get class(){return`h-3.5 w-3.5 ${o.loading?"animate-spin":""}`}})}}),null),w(z,m(Ue,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:k,get title(){return T("sidebar.collapse")},get children(){return m(jf,{class:"h-4 w-4"})}}),null),z})()]}})),w(R,m(Y,{get when(){return o()!==void 0},get fallback(){return(()=>{var z=mA();return w(z,()=>T("common.loading")),z})()},get children(){var z=fA();return w(z,m(mt,{get each(){return o()??[]},children:H=>{const P=()=>v()===H.id;return(()=>{var J=wA();return w(J,m(ar,{get href(){return`/${encodeURIComponent(H.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 H.path},get children(){return m(Y,{get when(){return!x()},get fallback(){return(()=>{var B=_A();return w(B,()=>(H.name[0]??"?").toUpperCase()),B})()},get children(){return[(()=>{var B=bA();return w(B,()=>sf(H)),B})(),m(Y,{get when(){return H.worktree},get children(){var B=yA();return w(B,m(Ub,{class:"h-3 w-3"}),null),w(B,()=>T("sidebar.worktreeBadge"),null),ue(()=>ye(B,"title",`worktree of ${H.worktree.mainPath}`)),B}})]}})}}),null),w(J,m(Y,{get when(){return!x()},get children(){return[(()=>{var B=vA();return B.$$click=K=>I(H,K),w(B,m(a1,{class:"h-3.5 w-3.5"})),ue(K=>{var W=T("sidebar.configure",{name:H.name}),re=T("sidebar.projectConfig");return W!==K.e&&ye(B,"aria-label",K.e=W),re!==K.t&&ye(B,"title",K.t=re),K},{e:void 0,t:void 0}),B})(),(()=>{var B=xA();return B.$$click=K=>void A(H,K),w(B,m(jo,{class:"h-3.5 w-3.5"})),ue(K=>{var W=T("sidebar.removeProject",{name:H.name}),re=T("sidebar.deleteProject");return W!==K.e&&ye(B,"aria-label",K.e=W),re!==K.t&&ye(B,"title",K.t=re),K},{e:void 0,t:void 0}),B})()]}}),null),J})()}})),z}}),j),w(j,m(Y,{get when(){return!x()},get fallback(){return(()=>{var z=EA();return w(z,m(Lb,{class:"h-3.5 w-3.5"})),ue(()=>ye(z,"title",`${T("sidebar.addHint")}${T("sidebar.addCmd")}`)),z})()},get children(){var z=gA(),H=z.firstChild;return w(z,()=>T("sidebar.addHint"),H),w(H,()=>T("sidebar.addCmd")),z}}),null),w(j,(()=>{var z=ce(()=>!!s());return()=>z()&&(()=>{var H=kA();return w(H,s),ue(()=>ye(H,"title",s())),H})()})(),null),w(R,m(Y,{get when(){return!x()},get children(){var z=pA();return z.$$mousedown=_,ue(()=>ye(z,"aria-label",T("sidebar.resizeHint"))),z}}),null),w(R,m(Y,{get when(){return u()},children:z=>m(cA,{open:!0,get projectId(){return z().id},get projectName(){return z().name},onClose:()=>c(null),onSaved:H=>L(H)})}),null),w(R,m(En,{get open(){return l()!==null},onOpenChange:z=>!z&&!g()&&d(null),get children(){return m(Mo,{class:"max-w-sm",get children(){return[m($o,{get children(){return[m(Lo,{get children(){return T("sidebar.deleteProject")}}),m(Ku,{get children(){return T("sidebar.deleteDesc")}})]}}),m(Y,{get when(){return l()},children:z=>[(()=>{var H=SA();return w(H,()=>sf(z())),H})(),m(Y,{get when(){return z().worktree},get children(){return m(qu,{get checked(){return f()},onChange:H=>p(H),class:"flex items-center gap-2 text-destructive",get children(){return[m(ju,{}),m(Hu,{get children(){return T("sidebar.deleteFiles")}})]}})}})]}),m(Po,{get children(){return[m(Ue,{variant:"outline",onClick:()=>d(null),get disabled(){return g()},get children(){return T("common.cancel")}}),m(Ue,{variant:"destructive",onClick:()=>void N(),get disabled(){return g()},get children(){return ce(()=>!!g())()?T("common.deleting"):T("common.confirmDelete")}})]}})]}})}}),null),ue(z=>{var H=`relative flex flex-col border-r bg-card shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,P=S(),J=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,B=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return H!==z.e&>(R,z.e=H),z.t=rr(R,P,z.t),J!==z.a&>(F,z.a=J),B!==z.o&>(j,z.o=B),z},{e:void 0,t:void 0,a:void 0,o:void 0}),R})()};ln(["mousedown","click"]);var MA=["second","minute","hour","day","week","month","year"];function LA(e,t){if(t===0)return["just now","right now"];var n=MA[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var $A=["秒","分钟","小时","天","周","个月","年"];function PA(e,t){if(t===0)return["刚刚","片刻后"];var n=$A[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var mu={},Es=function(e,t){mu[e]=t},FA=function(e){return mu[e]||mu.en_US},za=[60,60,24,7,365/7/12,12];function BA(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 zA(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 UA(e,t){var n=new Date;return(+n-+BA(e))/1e3}var KA=function(e,t,n){var r=UA(e);return zA(r,FA(t))};Es("en_US",LA);Es("zh_CN",PA);var vi={},af;function HA(){if(af)return vi;af=1,Object.defineProperty(vi,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return vi.default=t,vi}var qA=HA();const jA=ec(qA),uf=[["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 GA(e,t){return uf[t]??uf[0]}const VA=`
|
|
664
|
+
|
|
665
|
+
`;function WA(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 YA(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=WA(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:VA+i.text}:i),r=!0}else t.push(i)}}return t}function ZA(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 XA(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?ZA(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 QA=U("<div>");const JA=e=>{const[t,n]=Ee(e,["class"]);return(()=>{var r=QA();return Gn(r,ee({get class(){return Lt("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()};var e6={};Ir(e6,{Collapsible:()=>ks,Content:()=>Hp,Root:()=>qp,Trigger:()=>jp,useCollapsibleContext:()=>nc});var Kp=bt();function nc(){const e=pt(Kp);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Hp(e){const[t,n]=$(),r=nc(),o=je({id:r.generateId("content")},e),[i,s]=Ee(o,["ref","id","style"]),{present:a}=eo({show:r.shouldMount,element:()=>t()??null}),[u,c]=$(0),[l,d]=$(0);let p=r.isOpen()||a();return Vt(()=>{const g=requestAnimationFrame(()=>{p=!1});ie(()=>{cancelAnimationFrame(g)})}),oe(Mt(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(Mt(r.isOpen,g=>{!g&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),oe(()=>ie(r.registerContentId(i.id))),m(Y,{get when(){return a()},get children(){return m(st,ee({as:"div",ref(g){var b=xt(n,i.ref);typeof b=="function"&&b(g)},get id(){return i.id},get style(){return Rr({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function qp(e){const t=`collapsible-${on()}`,n=je({id:t},e),[r,o]=Ee(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=$(),a=Yo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ne(()=>({"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:gr(()=>o.id),registerContentId:Gt(s)};return m(Kp.Provider,{value:c,get children(){return m(st,ee({as:"div"},u,o))}})}function jp(e){const t=nc(),[n,r]=Ee(e,["onClick"]);return m(io,ee({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return ce(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Qe(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var ks=Object.assign(qp,{Content:Hp,Trigger:jp});const rc=ks;ks.Trigger;const oc=e=>{const[t,n]=Ee(e,["class"]);return m(ks.Content,ee({get class(){return Lt("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var t6=U('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),n6=U('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),r6=U('<div class="font-mono text-xs font-semibold">'),o6=U('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),i6=U('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),s6=U("<div class=space-y-1>");const a6=e=>{const[t,n]=$(!1);return m(rc,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=t6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(_u,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>T("chat.toolCollapsed",{count:e.tools.length})),r})(),m(oc,{get children(){var r=n6();return w(r,m(mt,{get each(){return e.tools},children:o=>(()=>{var i=s6();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=o6();return w(s,()=>u6(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 u6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}ln(["click"]);var c6=U('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),l6=U('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),d6=U('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const f6=e=>{const[t,n]=$(!1);return m(rc,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=c6(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,m(_u,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>T("chat.agentContextCollapsed",{count:e.contexts.length})),ue(()=>ye(r,"title",T("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),m(oc,{get children(){var r=l6();return w(r,m(mt,{get each(){return e.contexts},children:o=>(()=>{var i=d6();return w(i,()=>o.text),i})()})),r}})]}})};ln(["click"]);var g6=U('<span class="font-semibold tracking-wide">'),cf=U("<span>"),p6=U('<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>'),h6=U('<ul class="m-0 max-h-64 list-none overflow-y-auto border-t py-1">'),m6=U("<div class=mb-1.5>"),b6=U('<p class="mb-1 text-xs text-destructive">'),y6=U('<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">'),v6=U('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),x6=U("<aside><header>"),w6=U('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),_6=U('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),E6=U('<p class="text-sm text-muted-foreground">'),k6=U('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 text-sm font-medium text-foreground">'),S6=U('<div class="mb-2 rounded bg-muted px-2 py-1.5 text-sm">'),C6=U('<div class="markdown chat-md">');const Ua="yorz.layout.col2.collapsed",bu="yorz.layout.col2.width",lf="yorz.chat.sessionList.collapsed",df="yorz.chat.sessionList.showHistory",ic=340,A6=.4,Gp=260,T6=960,D6=.8,O6=96,N6=10080*60*1e3,R6=1500,I6=80;function M6(e){return new Promise(t=>setTimeout(t,e))}Es("en",GA);Es("zh-CN",jA);function L6(){return typeof window>"u"?T6:Math.max(Gp,Math.round(window.innerWidth*D6))}function Hi(e){return Number.isFinite(e)?Math.min(L6(),Math.max(Gp,Math.round(e))):ic}function Ka(){return typeof window>"u"?ic:Hi(window.innerWidth*A6)}function $6(){try{if(typeof window>"u")return ic;const e=window.localStorage.getItem(bu);if(!e)return Ka();const t=Number(e);return Number.isFinite(t)?Hi(t):Ka()}catch{return Ka()}}function Ha(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Hr(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}const P6=()=>{let e,t;const{lng:n}=A0(),r=qg({projectId:()=>Ot()||""}),[o,i]=$(Ha(Ua,"0")==="1"),[s,a]=$($6()),[u,c]=$(Ha(lf,"0")!=="1"),[l,d]=$(Ha(df,"0")==="1"),[f,p]=$(""),[g,b]=$([]),h=ne(()=>XA(g())),[y,v]=$(""),[x,k]=$(!0),[E,C]=$(Date.now()),[D,_]=$(!1),[I,L]=$({}),A=new Set,N=new Map;function M(G){let he=N.get(G);if(!he){let fe=()=>{};he={promise:new Promise($e=>{fe=$e}),resolve:fe},N.set(G,he)}return he.promise}function S(G){M(G),N.get(G)?.resolve()}const[R,{refetch:F}]=gn(()=>Ot()||void 0,G=>ze.listSessions(G));oe(()=>{const G=R();G&&L(he=>{const fe={};for(const $e of G)fe[$e.id]=!!$e.running;const Ge=f();return Ge&&!(Ge in fe)&&he[Ge]===!0&&(fe[Ge]=!0),fe})}),oe(Mt(Ot,()=>{p(""),L({}),We(),_(!1),A.clear(),N.clear(),r.reset()})),oe(()=>{const G=Ot();if(!G)return;const he=Yf(G,{onStatus:fe=>{L(Ge=>({...Ge,[fe.sessionId]:fe.running})),fe.running||F()}});ie(he)});const j=G=>I()[G]===!0,z=ne(()=>{const G=f();return G?j(G):!1}),H=ne(()=>(R()??[]).filter(G=>j(G.id)).length),P=ne(()=>{const G=R()??[],he=f(),fe=l()?E()-N6:Number.POSITIVE_INFINITY;return G.filter(Ge=>j(Ge.id)||Ge.id===he||Ge.updatedAt>=fe)});function J(G){!G||G===f()||(p(G),F())}oe(()=>{const G=E1();G&&(k1(),J(G),o()&&(i(!1),Hr(Ua,"0")))});const B=()=>o()||or();function K(){if(or()){Mi();return}const G=!o();i(G),Hr(Ua,G?"1":"0")}function W(G){c(G),Hr(lf,G?"0":"1")}function re(G){d(G),Hr(df,G?"1":"0")}Vt(()=>{const G=()=>{const he=Hi(s());he!==s()&&(a(he),Hr(bu,String(he)))};window.addEventListener("resize",G),ie(()=>window.removeEventListener("resize",G))}),Vt(()=>{const G=window.setInterval(()=>C(Date.now()),6e4);ie(()=>window.clearInterval(G))});let ve=null,_e=null,X=null;function ge(G){B()||(G.preventDefault(),ve={startX:G.clientX,startW:s(),raf:null},document.body.classList.add("is-resizing"),_e=he=>{if(!ve)return;const fe=Hi(ve.startW+(he.clientX-ve.startX));ve.raf==null&&(ve.raf=requestAnimationFrame(()=>{ve&&(ve.raf=null,a(fe))}))},X=()=>{ve?.raf!=null&&cancelAnimationFrame(ve.raf),ve=null,document.body.classList.remove("is-resizing"),_e&&document.removeEventListener("mousemove",_e),X&&document.removeEventListener("mouseup",X),_e=null,X=null,Hr(bu,String(s()))},document.addEventListener("mousemove",_e),document.addEventListener("mouseup",X))}ie(()=>{_e&&document.removeEventListener("mousemove",_e),X&&document.removeEventListener("mouseup",X),document.body.classList.remove("is-resizing")}),oe(()=>{const G=Ot(),he=f();if(!G||!he)return;let fe=!1;k(!0),A.has(he)||(We(),ze.getSessionMessages(G,he).then($e=>{fe||We(YA($e))}).catch(()=>{}));const Ge=ns(G,he,{onReady:()=>S(he),onEvent:$e=>{$e.type==="text"?ke($e.delta):$e.type==="tool-use"?Be({kind:"tool",name:$e.name,input:$e.input}):$e.type==="tool-result"?Be({kind:"tool",result:$e.text}):$e.type==="turn-completed"?(q(),A.delete(he),L(Ye=>({...Ye,[he]:!1}))):$e.type==="error"?(Ae(`
|
|
666
|
+
${T("chat.errorMessage",{message:$e.message})}
|
|
667
|
+
`),L(Ye=>({...Ye,[he]:!1}))):$e.type==="session-started"&&$e.sessionId!==he&&(A.has(he)&&A.add($e.sessionId),L(Ye=>({...Ye,[he]:!1,[$e.sessionId]:!0})),p($e.sessionId),F())}});ie(()=>{fe=!0,N.delete(he),Ge()})}),oe(()=>{g(),x()&&requestAnimationFrame(Ie)});function Te(G){return G.scrollHeight-G.scrollTop-G.clientHeight<=O6}function Ie(){e&&(e.scrollTop=e.scrollHeight)}function Je(){e&&k(Te(e))}function lt(G){return E(),!Number.isFinite(G)||G<=0?"":KA(G,n())}function pe(G){return!Number.isFinite(G)||G<=0?"":new Date(G).toLocaleString(n())}let Q="",ae=null;function Oe(G,he){const fe=G[G.length-1];return fe&&fe.kind==="text"&&fe.role==="assistant"?[...G.slice(0,-1),{...fe,text:fe.text+he}]:[...G,{kind:"text",role:"assistant",text:he}]}function q(){ae!=null&&(clearTimeout(ae),ae=null);const G=Q;Q="",G&&b(he=>Oe(he,G))}function ke(G){Q+=G,ae==null&&(ae=window.setTimeout(q,I6))}function Ae(G){q(),b(he=>Oe(he,G))}function Be(G){q(),b(he=>[...he,G])}function We(G=[]){ae!=null&&(clearTimeout(ae),ae=null),Q="",b(he=>G.length===0&&he.length===0?he:G)}ie(()=>{ae!=null&&clearTimeout(ae)});function Kt(){!Ot()||!f()||(p(""),We(),k(!0),r.reset())}async function At(){const G=Ot(),he=f(),fe=y().trim();if(!G||!fe||D()||z()||r.hasPending())return;if(v(""),k(!0),!he){await Ne(G,fe);return}const Ge=r.draftId()??void 0;Be({kind:"text",role:"user",text:fe}),L($e=>({...$e,[he]:!0}));try{await ze.sendSessionMessage(G,he,fe,Ge),r.reset()}catch($e){Ae(`
|
|
668
|
+
${T("chat.errorMessage",{message:$e.message})}
|
|
669
|
+
`),L(Ye=>({...Ye,[he]:!1}))}}async function Ne(G,he){_(!0);try{let fe;try{fe=(await ze.createSession(G,{})).sessionId}catch(Ye){v(he),Ae(`
|
|
670
|
+
${T("chat.errorMessage",{message:Ye.message})}
|
|
671
|
+
`);return}A.add(fe);const Ge=r.draftId()??void 0,$e=M(fe);We([{kind:"text",role:"user",text:he}]),L(Ye=>({...Ye,[fe]:!0})),p(fe),await Promise.race([$e,M6(R6)]);try{await ze.sendSessionMessage(G,fe,he,Ge),r.reset()}catch(Ye){Ae(`
|
|
672
|
+
${T("chat.errorMessage",{message:Ye.message})}
|
|
673
|
+
`),L(Et=>({...Et,[fe]:!1}))}F()}finally{_(!1)}}async function et(){const G=Ot(),he=f();!G||!he||(await ze.abortSession(G,he).catch(()=>{}),L(fe=>({...fe,[he]:!1})))}function _t(G){G.defaultPrevented||G.isComposing||G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),At())}return(()=>{var G=x6(),he=G.firstChild;return w(he,m(Y,{get when(){return!B()},get fallback(){return m(Ue,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:K,get title(){return T("chat.expand")},get children(){return m(Gf,{class:"h-4 w-4"})}})},get children(){return[(()=>{var fe=g6();return w(fe,()=>T("chat.title")),fe})(),m(Ue,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:K,get title(){return T("chat.collapse")},get children(){return m(jf,{class:"h-4 w-4"})}})]}})),w(G,m(Y,{get when(){return!B()},get children(){var fe=y6(),Ge=fe.firstChild,$e=Ge.nextSibling,Ye=$e.firstChild,Et=Ye.firstChild,sn=Ye.nextSibling;w(fe,m(Y,{get when(){return Ot()},get children(){return m(JA,{class:"m-2 rounded-lg shadow-none",get children(){return m(rc,{get open(){return u()},onOpenChange:W,get children(){return[(()=>{var ot=p6(),Ve=ot.firstChild,Pe=Ve.nextSibling;return Ve.$$click=()=>W(!u()),w(Ve,m(Y,{get when(){return H()>0},get fallback(){return(()=>{var nt=cf();return w(nt,()=>T("chat.sessionsLabelPlain")),nt})()},get children(){var nt=cf();return w(nt,()=>T("chat.sessionsLabel",{count:H()})),nt}})),w(ot,m(qu,{class:"flex shrink-0 items-center gap-1.5",get checked(){return l()},onChange:re,get children(){return[m(ju,{class:"h-3.5 w-3.5"}),m(Hu,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return T("chat.showHistory")}})]}}),Pe),Pe.$$click=()=>W(!u()),w(Pe,m(_u,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${u()?"":"-rotate-90"}`}})),ue(nt=>{var ht=u()?T("chat.collapseSessions"):T("chat.expandSessions"),Yt=u()?T("chat.collapseSessions"):T("chat.expandSessions");return ht!==nt.e&&ye(Ve,"title",nt.e=ht),Yt!==nt.t&&ye(Pe,"title",nt.t=Yt),nt},{e:void 0,t:void 0}),ot})(),m(oc,{get children(){var ot=h6();return w(ot,m(Y,{get when(){return P().length>0},get fallback(){return(()=>{var Ve=w6();return w(Ve,()=>T("chat.noRunningSessions")),Ve})()},get children(){return m(mt,{get each(){return P()},children:Ve=>(()=>{var Pe=_6(),nt=Pe.firstChild,ht=nt.firstChild,Yt=ht.firstChild,O=Yt.nextSibling;O.nextSibling;var V=ht.nextSibling,se=V.nextSibling;return nt.$$click=()=>J(Ve.id),w(nt,m(Y,{get when(){return j(Ve.id)},get children(){return m(tr,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),ht),w(ht,()=>Ve.kind,O),w(V,()=>Ve.title||Ve.id),w(se,()=>lt(Ve.updatedAt)),ue(De=>{var dt=`flex w-full items-center gap-1 px-2.5 py-1.5 text-left text-sm ${f()===Ve.id?"bg-background font-semibold":"hover:bg-background"}`,ft=j(Ve.id)?T("chat.sessionTitleRunning",{kind:Ve.kind,id:Ve.id}):T("chat.sessionTitle",{kind:Ve.kind,id:Ve.id}),we=pe(Ve.updatedAt);return dt!==De.e&>(nt,De.e=dt),ft!==De.t&&ye(nt,"title",De.t=ft),we!==De.a&&ye(se,"title",De.a=we),De},{e:void 0,t:void 0,a:void 0}),Pe})()})}})),ot}})]}})}})}}),Ge),Ge.addEventListener("scroll",Je);var Mn=e;typeof Mn=="function"?qn(Mn,Ge):e=Ge,w(Ge,m(Y,{get when(){return h().length>0},get fallback(){return(()=>{var ot=E6();return w(ot,(()=>{var Ve=ce(()=>!!f());return()=>Ve()?T("chat.empty"):T("chat.draftEmpty")})()),ot})()},get children(){return m(mt,{get each(){return h()},children:ot=>m(Y,{get when(){return ot.kind==="context"?ot:null},get fallback(){return m(Y,{get when(){return ot.kind==="assistant"?ot:null},get fallback(){return(()=>{var Ve=k6();return w(Ve,()=>ot.text),Ve})()},children:Ve=>(()=>{var Pe=S6();return w(Pe,m(mt,{get each(){return Ve().segments},children:nt=>m(Y,{get when(){return nt.kind==="tools"?nt:null},get fallback(){return(()=>{var ht=C6();return ue(()=>ht.innerHTML=ws(nt.text,{mermaid:"code"})),ht})()},children:ht=>m(a6,{get tools(){return ht().tools}})})})),Pe})()})},children:Ve=>m(f6,{get contexts(){return Ve().contexts}})})})}})),w($e,m(Y,{get when(){return r.count()>0},get children(){var ot=m6();return w(ot,m(Qg,{ctrl:r,compact:!0})),ot}}),Ye),w($e,m(Y,{get when(){return r.error()},get children(){var ot=b6();return w(ot,()=>r.error()),ot}}),Ye),w(Ye,m(jg,{get projectId(){return Ot()||""},get value(){return y()},onValueChange:v,onKeyDown:_t,get onPaste(){return r.onPaste},get placeholder(){return ce(()=>!Ot())()?T("chat.noSessionPlaceholder"):ce(()=>!!f())()?T("chat.inputPlaceholder"):T("chat.draftPlaceholder")},get disabled(){return!Ot()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1 text-sm"}),Et),w(Ye,m(Ue,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!Ot()||r.count()>=Xr},get title(){return T("newSpec.importAttachment")},get children(){return m(o1,{class:"h-4 w-4"})}}),Et),Ci(Et,"change",r.onFileInputChange);var Ln=t;return typeof Ln=="function"?qn(Ln,Et):t=Et,ye(Et,"accept",Hg),w(sn,m(Ue,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:Kt,get disabled(){return!Ot()||!f()},get title(){return T("chat.newSession")},get children(){return m(Eu,{class:"h-4 w-4"})}}),null),w(sn,m(Y,{get when(){return z()},get fallback(){return m(Ue,{size:"sm",onClick:()=>void At(),get disabled(){return!Ot()||!y().trim()||D()||r.hasPending()},get children(){return[m(Ji,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>T("chat.send"))]}})},get children(){return m(Ue,{variant:"outline",size:"sm",onClick:()=>void et(),get title(){return T("chat.abort")},get children(){return[m(b1,{class:"mr-1 h-3.5 w-3.5"}),ce(()=>T("chat.abort"))]}})}}),null),fe}}),null),w(G,m(Y,{get when(){return!B()},get children(){var fe=v6();return fe.$$mousedown=ge,fe}}),null),ue(fe=>{var Ge=`relative flex flex-col border-r bg-card shrink-0 ${B()?"w-9 transition-[width] duration-150":""}`,$e=B()?void 0:{width:`${s()}px`},Ye=`flex items-center border-b ${B()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Ge!==fe.e&>(G,fe.e=Ge),fe.t=rr(G,$e,fe.t),Ye!==fe.a&>(he,fe.a=Ye),fe},{e:void 0,t:void 0,a:void 0}),G})()};ln(["click","mousedown"]);var F6=U('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const B6=e=>{const t=Zi(),{lng:n,changeLanguage:r}=A0(),o=ne(()=>t.pathname===en("specs/new"));function i(s){s!==n()&&(r(s),window.location.reload())}return oe(()=>{const s=t.pathname.match(/^\/([^/]+)/);S1(s&&s[1]!=="api"?s[1]:"")}),(()=>{var s=F6(),a=s.firstChild,u=a.firstChild,c=a.nextSibling,l=c.firstChild;return w(a,m(ar,{href:"/",class:"text-lg font-bold",children:"YorZ"}),u),w(u,m(Y,{get when(){return Ot()},get children(){return m(Ue,{as:ar,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(Eu,{class:"mr-1 h-4 w-4"}),ce(()=>T("shell.newSpec"))]}})}}),null),w(u,m(Og,{placement:"bottom-end",get children(){return[m(Dg,{as:Ue,variant:"ghost",size:"icon",get title(){return T("shell.languageSwitch")},get children(){return m(Vb,{class:"h-4 w-4"})}}),m(Ng,{get children(){return[m(cu,{onSelect:()=>i("zh-CN"),get children(){return[m(Kc,{get class(){return`mr-2 h-4 w-4 ${n()==="zh-CN"?"opacity-100":"opacity-0"}`}}),ce(()=>T("shell.langZh"))]}}),m(cu,{onSelect:()=>i("en"),get children(){return[m(Kc,{get class(){return`mr-2 h-4 w-4 ${n()==="en"?"opacity-100":"opacity-0"}`}}),ce(()=>T("shell.langEn"))]}})]}})]}}),null),w(c,m(IA,{}),l),w(c,m(P6,{}),l),w(l,()=>e.children),w(s,m(a_,{position:"top-center"}),null),s})()},Vp=document.getElementById("app");if(!Vp)throw new Error("missing #app root");Ph(()=>m(_m,{root:B6,get children(){return[m(br,{path:"/",component:rA}),m(br,{path:"/:projectId",component:__}),m(br,{path:"/:projectId/specs/new",component:w2}),m(br,{path:"/:projectId/specs/:id",component:R3}),m(br,{path:"/:projectId/specs/:id/review",component:V3}),m(br,{path:"/:projectId/specs/:id/debug",component:eA}),m(br,{path:"*",component:Bp})]}}),Vp);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 _,ec as g};
|