@yorz/cli 0.8.1 → 0.8.3
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/dist/cli/index.js +602 -274
- package/dist/gui/assets/{abnfDiagram-VRR7QNED-D-y0QKuD.js → abnfDiagram-VRR7QNED-D4D9enbi.js} +1 -1
- package/dist/gui/assets/{arc-B49ieWDx.js → arc-Uhg-Jaz0.js} +1 -1
- package/dist/gui/assets/{architectureDiagram-ZJ3FMSHR-CcOou6CY.js → architectureDiagram-ZJ3FMSHR-CCovxlgK.js} +1 -1
- package/dist/gui/assets/{blockDiagram-677ZJIJ3-DY8EHGpO.js → blockDiagram-677ZJIJ3-BVUdWBA7.js} +1 -1
- package/dist/gui/assets/{c4Diagram-LMCZKHZV-CV8mRhow.js → c4Diagram-LMCZKHZV-jKUs8qBl.js} +1 -1
- package/dist/gui/assets/channel-C2ymEZyD.js +1 -0
- package/dist/gui/assets/{chunk-2Q5K7J3B-BjplUf2p.js → chunk-2Q5K7J3B-BQ1pmtPO.js} +1 -1
- package/dist/gui/assets/{chunk-32BRIVSS-Dua0UKp_.js → chunk-32BRIVSS-CokJqC_m.js} +1 -1
- package/dist/gui/assets/{chunk-5VM5RSS4-Br-SORjV.js → chunk-5VM5RSS4-BsTyU26_.js} +1 -1
- package/dist/gui/assets/{chunk-EX3LRPZG-Dgb6iahE.js → chunk-EX3LRPZG-BtG1531e.js} +1 -1
- package/dist/gui/assets/{chunk-JWPE2WC7-BkOQaZRq.js → chunk-JWPE2WC7-CRJtNYf7.js} +1 -1
- package/dist/gui/assets/{chunk-MOJQB5TN-D1qUO9Uh.js → chunk-MOJQB5TN-CuSjoqFP.js} +1 -1
- package/dist/gui/assets/{chunk-RYQCIY6F-CwiUC3Pd.js → chunk-RYQCIY6F-Dvq5myJ5.js} +1 -1
- package/dist/gui/assets/{chunk-V7JOEXUC-O0VQnEjo.js → chunk-V7JOEXUC-2oWWymhr.js} +1 -1
- package/dist/gui/assets/{chunk-VR4S4FIN-C-iULcHx.js → chunk-VR4S4FIN-BufsuH8E.js} +1 -1
- package/dist/gui/assets/{chunk-XXDRQBXY-buihollE.js → chunk-XXDRQBXY-CZ-nS8L-.js} +1 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-BL75FVt0.js +1 -0
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-BL75FVt0.js +1 -0
- package/dist/gui/assets/{cose-bilkent-JH36ORCC-DJT3GZ0Y.js → cose-bilkent-JH36ORCC-Gr6ZaATw.js} +1 -1
- package/dist/gui/assets/{cynefin-VYW2F7L2-CUB4SFmD.js → cynefin-VYW2F7L2-C5199IEw.js} +1 -1
- package/dist/gui/assets/{cynefinDiagram-TSTJHNR4-Dt0_fxzu.js → cynefinDiagram-TSTJHNR4-D6fiPl1f.js} +1 -1
- package/dist/gui/assets/{dagre-VKFMJZFB-BU2VgIkF.js → dagre-VKFMJZFB-Bn8knEMn.js} +1 -1
- package/dist/gui/assets/{diagram-FQU43EPY-CpRyd1t3.js → diagram-FQU43EPY-DVBF68AQ.js} +1 -1
- package/dist/gui/assets/{diagram-G47NLZAW-CcJkOrvN.js → diagram-G47NLZAW-BZ5yrrkI.js} +1 -1
- package/dist/gui/assets/{diagram-NH7WQ7WH-BcWa9fg4.js → diagram-NH7WQ7WH-pzIgTU3E.js} +1 -1
- package/dist/gui/assets/{diagram-OA4YK3LP-Clu9LYE6.js → diagram-OA4YK3LP-CPaJk9pC.js} +1 -1
- package/dist/gui/assets/{diagram-WEI45ONY-BKt73qmr.js → diagram-WEI45ONY-B-6GmQvM.js} +1 -1
- package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-ycI3xDTZ.js → ebnfDiagram-CCIWWBDH-Bv1oxmeZ.js} +1 -1
- package/dist/gui/assets/{erDiagram-Q63AITRT-CJf0jIvL.js → erDiagram-Q63AITRT-W41uQrQk.js} +1 -1
- package/dist/gui/assets/{flowDiagram-23GEKE2U-8X7ZYojT.js → flowDiagram-23GEKE2U-CHxHJDVM.js} +1 -1
- package/dist/gui/assets/{ganttDiagram-NO4QXBWP-DsGJIvEc.js → ganttDiagram-NO4QXBWP-BUF9vvnT.js} +1 -1
- package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-Dg-PnhMR.js → gitGraphDiagram-IHSO6WYX-CdMyc006.js} +1 -1
- package/dist/gui/assets/index-Auit67b0.js +40 -0
- package/dist/gui/assets/index-bzRYB8_7.css +1 -0
- package/dist/gui/assets/{infoDiagram-FWYZ7A6U-CX-PGRjw.js → infoDiagram-FWYZ7A6U-tOoSyFtd.js} +1 -1
- package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-BGq-1WGF.js → ishikawaDiagram-FXEZZL3T-xzmSx4q7.js} +1 -1
- package/dist/gui/assets/{journeyDiagram-5HDEW3XC-CX7J6QLx.js → journeyDiagram-5HDEW3XC-DDNB6MLL.js} +1 -1
- package/dist/gui/assets/{kanban-definition-HUTT4EX6-XcUXgRy6.js → kanban-definition-HUTT4EX6-Bh-NqXAp.js} +1 -1
- package/dist/gui/assets/{linear-D-w3YyOR.js → linear-BJWCgfrh.js} +1 -1
- package/dist/gui/assets/{mermaid.core-BjB4Bulu.js → mermaid.core-DmUdNrWd.js} +4 -4
- package/dist/gui/assets/{mindmap-definition-LN4V7U3C-D2kDYOXu.js → mindmap-definition-LN4V7U3C-CcwHk-9p.js} +1 -1
- package/dist/gui/assets/{pegDiagram-2B236MQR-C79JhnNB.js → pegDiagram-2B236MQR-DrnMrY4L.js} +1 -1
- package/dist/gui/assets/{pieDiagram-ENE6RG2P-CbLYFwp4.js → pieDiagram-ENE6RG2P-B5fQVAQi.js} +1 -1
- package/dist/gui/assets/{quadrantDiagram-ABIIQ3AL-BXNa6Xix.js → quadrantDiagram-ABIIQ3AL-WcAQ7c3t.js} +1 -1
- package/dist/gui/assets/{railroadDiagram-RFXS5EU6-CG8ojk-9.js → railroadDiagram-RFXS5EU6-CvhuJF1y.js} +1 -1
- package/dist/gui/assets/{requirementDiagram-TGXJPOKE-Ddn0mejD.js → requirementDiagram-TGXJPOKE-DOsKohKX.js} +1 -1
- package/dist/gui/assets/{sankeyDiagram-HTMAVEWB-DXVSB34u.js → sankeyDiagram-HTMAVEWB-vLfbJPAx.js} +1 -1
- package/dist/gui/assets/{sequenceDiagram-DBY2YBRQ-B00FxwKQ.js → sequenceDiagram-DBY2YBRQ-DxKy0CAM.js} +1 -1
- package/dist/gui/assets/{sizeCapture-X5ZJPWSS-BUiEsqdO.js → sizeCapture-X5ZJPWSS-BE5SU9rY.js} +1 -1
- package/dist/gui/assets/{stateDiagram-2N3HPSRC-DflPz4MT.js → stateDiagram-2N3HPSRC-Ct8Gvq1y.js} +1 -1
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-BZ2lYeO3.js +1 -0
- package/dist/gui/assets/{swimlanes-5IMT3BWC-yL7Pms6k.js → swimlanes-5IMT3BWC-0c9e31Te.js} +2 -2
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BLfYiUPF.js +8 -0
- package/dist/gui/assets/{timeline-definition-FHXFAJF6--V8N1aYE.js → timeline-definition-FHXFAJF6-D0m2eIpy.js} +1 -1
- package/dist/gui/assets/{vennDiagram-L72KCM5P-CjlyPLPm.js → vennDiagram-L72KCM5P-BnM9fTPa.js} +1 -1
- package/dist/gui/assets/{wardleyDiagram-EHGQE667-C99qPu9U.js → wardleyDiagram-EHGQE667-BKyR-aXS.js} +1 -1
- package/dist/gui/assets/{xychartDiagram-FW5EYKEG-DeUNfALY.js → xychartDiagram-FW5EYKEG-Dr3zUp02.js} +1 -1
- package/dist/gui/index.html +5 -5
- package/package.json +1 -1
- package/dist/gui/assets/channel-BakWbuVQ.js +0 -1
- package/dist/gui/assets/classDiagram-OUVF2IWQ-DgfCpbC5.js +0 -1
- package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DgfCpbC5.js +0 -1
- package/dist/gui/assets/index-DGSN0uvJ.css +0 -1
- package/dist/gui/assets/index-DIKCFt79.js +0 -39
- package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-DQohEYjS.js +0 -1
- package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CUZb2EKw.js +0 -8
|
@@ -1,39 +0,0 @@
|
|
|
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 ze={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Gl(this.context.count)},getNextContextId(){return Gl(this.context.count++)}};function Gl(e){const t=String(e),n=t.length-1;return ze.context.id+(n?String.fromCharCode(96+n):"")+t}function si(e){ze.context=e}const d1=!1,f1=(e,t)=>e===t,kn=Symbol("solid-proxy"),dp=typeof Proxy=="function",Is=Symbol("solid-track"),Os={equals:f1};let fp=yp;const An=1,mi=2,gp={owned:null,cleanups:null,context:null,owner:null},Ha={};var Ve=null;let ge=null,g1=null,et=null,jt=null,Ht=null,Zs=0;function hr(e,t){const n=et,r=Ve,o=e.length===0,i=t===void 0?r:t,s=o?gp:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>bt(()=>Fr(s)));Ve=s,et=null;try{return fn(a,!0)}finally{et=n,Ve=r}}function N(e,t){t=t?Object.assign({},Os,t):Os;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(ge&&ge.running&&ge.sources.has(n)?o=o(n.tValue):o=o(n.value)),bp(n,o));return[mp.bind(n),r]}function cc(e,t,n){const r=Js(e,t,!0,An);Ho(r)}function Ie(e,t,n){const r=Js(e,t,!1,An);Ho(r)}function ie(e,t,n){fp=y1;const r=Js(e,t,!1,An),o=ao&&it(ao);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),Ht?Ht.push(r):Ho(r)}function se(e,t,n){n=n?Object.assign({},Os,n):Os;const r=Js(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ho(r),mp.bind(r)}function p1(e){return e&&typeof e=="object"&&"then"in e}function Gt(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=Ha,u=null,c=!1,l=!1,d="initialValue"in i,h=typeof r=="function"&&se(r);const g=new Set,[p,m]=(i.storage||N)(i.initialValue),[b,v]=N(void 0),[y,x]=N(void 0,{equals:!1}),[E,C]=N(d?"ready":"unresolved");ze.context&&(u=ze.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:ze.load&&ze.has(u)&&(a=ze.load(u)));function k(z,K,j,T){return s===z&&(s=null,T!==void 0&&(d=!0),(z===a||K===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(T,{value:K})),a=Ha,ge&&z&&c?(ge.promises.delete(z),c=!1,fn(()=>{ge.running=!0,O(K,j)},!1)):O(K,j)),K}function O(z,K){fn(()=>{K===void 0&&m(()=>z),C(K!==void 0?"errored":d?"ready":"unresolved"),v(K);for(const j of g.keys())j.decrement();g.clear()},!1)}function S(){const z=ao&&it(ao),K=p(),j=b();if(j!==void 0&&!s)throw j;return et&&!et.user&&z&&cc(()=>{y(),s&&(z.resolved&&ge&&c?ge.promises.add(s):g.has(z)||(z.increment(),g.add(z)))}),K}function D(z=!0){if(z!==!1&&l)return;l=!1;const K=h?h():r;if(c=ge&&ge.running,K==null||K===!1){k(s,bt(p));return}ge&&s&&ge.promises.delete(s);let j;const T=a!==Ha?a:bt(()=>{try{return o(K,{value:p(),refetching:z})}catch(R){j=R}});if(j!==void 0){k(s,void 0,As(j),K);return}else if(!p1(T))return k(s,T,void 0,K),T;return s=T,"v"in T?(T.s===1?k(s,T.v,void 0,K):k(s,void 0,As(T.v),K),T):(l=!0,queueMicrotask(()=>l=!1),fn(()=>{C(d?"refreshing":"pending"),x()},!1),T.then(R=>k(T,R,void 0,K),R=>k(T,void 0,As(R),K)))}Object.defineProperties(S,{state:{get:()=>E()},error:{get:()=>b()},loading:{get(){const z=E();return z==="pending"||z==="refreshing"}},latest:{get(){if(!d)return S();const z=b();if(z&&!s)throw z;return p()}}});let M=Ve;return h?cc(()=>(M=Ve,D(!1))):D(!1),[S,{refetch:z=>Xs(M,()=>D(z)),mutate:m}]}function pp(e){return fn(e,!1)}function bt(e){if(et===null)return e();const t=et;et=null;try{return e()}finally{et=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=bt(()=>t(a,o,s));return o=a,u}}function wn(e){ie(()=>bt(e))}function ae(e){return Ve===null||(Ve.cleanups===null?Ve.cleanups=[e]:Ve.cleanups.push(e)),e}function lc(){return et}function bi(){return Ve}function Xs(e,t){const n=Ve,r=et;Ve=e,et=null;try{return fn(t,!0)}catch(o){Hc(o)}finally{Ve=n,et=r}}function hp(e){if(ge&&ge.running)return e(),ge.done;const t=et,n=Ve;return Promise.resolve().then(()=>{et=t,Ve=n;let r;return ao&&(r=ge||(ge={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),fn(e,!1),et=Ve=null,r?r.done:void 0})}const[$N,Vl]=N(!1);function h1(e){Ht.push.apply(Ht,e),e.length=0}function ct(e,t){const n=Symbol("context");return{id:n,Provider:v1(n),defaultValue:e}}function it(e){let t;return Ve&&Ve.context&&(t=Ve.context[e.id])!==void 0?t:e.defaultValue}function Ko(e){const t=se(e),n=se(()=>dc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let ao;function m1(){return ao||(ao=ct())}function mp(){const e=ge&&ge.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===An)Ho(this);else{const t=jt;jt=null,fn(()=>Ns(this),!1),jt=t}if(et){const t=this.observers;if(!t||t[t.length-1]!==et){const n=t?t.length:0;et.sources?(et.sources.push(this),et.sourceSlots.push(n)):(et.sources=[this],et.sourceSlots=[n]),t?(t.push(et),this.observerSlots.push(et.sources.length-1)):(this.observers=[et],this.observerSlots=[et.sources.length-1])}}return e&&ge.sources.has(this)?this.tValue:this.value}function bp(e,t,n){let r=ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(ge){const o=ge.running;(o||!n&&ge.sources.has(e))&&(ge.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&fn(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=ge&&ge.running;s&&ge.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?jt.push(i):Ht.push(i),i.observers&&vp(i)),s?i.tState=An:i.state=An)}if(jt.length>1e6)throw jt=[],new Error},!1)}return t}function Ho(e){if(!e.fn)return;Fr(e);const t=Zs;Wl(e,ge&&ge.running&&ge.sources.has(e)?e.tValue:e.value,t),ge&&!ge.running&&ge.sources.has(e)&&queueMicrotask(()=>{fn(()=>{ge&&(ge.running=!0),et=Ve=e,Wl(e,e.tValue,t),et=Ve=null},!1)})}function Wl(e,t,n){let r;const o=Ve,i=et;et=Ve=e;try{r=e.fn(t)}catch(s){return e.pure&&(ge&&ge.running?(e.tState=An,e.tOwned&&e.tOwned.forEach(Fr),e.tOwned=void 0):(e.state=An,e.owned&&e.owned.forEach(Fr),e.owned=null)),e.updatedAt=n+1,Hc(s)}finally{et=i,Ve=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?bp(e,r,!0):ge&&ge.running&&e.pure?(ge.sources.has(e)||(e.value=r),ge.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Js(e,t,n,r=An,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ve,context:Ve?Ve.context:null,pure:n};return ge&&ge.running&&(i.state=0,i.tState=r),Ve===null||Ve!==gp&&(ge&&ge.running&&Ve.pure?Ve.tOwned?Ve.tOwned.push(i):Ve.tOwned=[i]:Ve.owned?Ve.owned.push(i):Ve.owned=[i]),i}function Rs(e){const t=ge&&ge.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===mi)return Ns(e);if(e.suspense&&bt(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Zs);){if(t&&ge.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(ge.disposed.has(o))return}if((t?e.tState:e.state)===An)Ho(e);else if((t?e.tState:e.state)===mi){const o=jt;jt=null,fn(()=>Ns(e,n[0]),!1),jt=o}}}function fn(e,t){if(jt)return e();let n=!1;t||(jt=[]),Ht?n=!0:Ht=[],Zs++;try{const r=e();return b1(n),r}catch(r){n||(Ht=null),jt=null,Hc(r)}}function b1(e){if(jt&&(yp(jt),jt=null),e)return;let t;if(ge){if(!ge.promises.size&&!ge.queue.size){const r=ge.sources,o=ge.disposed;Ht.push.apply(Ht,ge.effects),t=ge.resolve;for(const i of Ht)"tState"in i&&(i.state=i.tState),delete i.tState;ge=null,fn(()=>{for(const i of o)Fr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)Fr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Vl(!1)},!1)}else if(ge.running){ge.running=!1,ge.effects.push.apply(ge.effects,Ht),Ht=null,Vl(!0);return}}const n=Ht;Ht=null,n.length&&fn(()=>fp(n),!1),t&&t()}function yp(e){for(let t=0;t<e.length;t++)Rs(e[t])}function y1(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Rs(r)}if(ze.context){if(ze.count){ze.effects||(ze.effects=[]),ze.effects.push(...e.slice(0,n));return}si()}for(ze.effects&&(ze.done||!ze.count)&&(e=[...ze.effects,...e],n+=ze.effects.length,delete ze.effects),t=0;t<n;t++)Rs(e[t])}function Ns(e,t){const n=ge&&ge.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===An?o!==t&&(!o.updatedAt||o.updatedAt<Zs)&&Rs(o):i===mi&&Ns(o,t)}}}function vp(e){const t=ge&&ge.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=mi:r.state=mi,r.pure?jt.push(r):Ht.push(r),r.observers&&vp(r))}}function Fr(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--)Fr(e.tOwned[t]);delete e.tOwned}if(ge&&ge.running&&e.pure)xp(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Fr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ge&&ge.running?e.tState=0:e.state=0}function xp(e,t){if(t||(e.tState=0,ge.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)xp(e.owned[n])}function As(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Hc(e,t=Ve){throw As(e)}function dc(e){if(typeof e=="function"&&!e.length)return dc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=dc(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 v1(e,t){return function(r){let o;return Ie(()=>o=bt(()=>(Ve.context={...Ve.context,[e]:r.value},Ko(()=>r.children))),void 0),o}}const x1=Symbol("fallback");function Yl(e){for(let t=0;t<e.length;t++)e[t]()}function w1(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>Yl(i)),()=>{let u=e()||[],c=u.length,l,d;return u[Is],bt(()=>{let g,p,m,b,v,y,x,E,C;if(c===0)s!==0&&(Yl(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[x1],o[0]=hr(k=>(i[0]=k,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=hr(h);s=c}else{for(m=new Array(c),b=new Array(c),a&&(v=new Array(c)),y=0,x=Math.min(s,c);y<x&&r[y]===u[y];y++);for(x=s-1,E=c-1;x>=y&&E>=y&&r[x]===u[E];x--,E--)m[E]=o[x],b[E]=i[x],a&&(v[E]=a[x]);for(g=new Map,p=new Array(E+1),d=E;d>=y;d--)C=u[d],l=g.get(C),p[d]=l===void 0?-1:l,g.set(C,d);for(l=y;l<=x;l++)C=r[l],d=g.get(C),d!==void 0&&d!==-1?(m[d]=o[l],b[d]=i[l],a&&(v[d]=a[l]),d=p[d],g.set(C,d)):i[l]();for(d=y;d<c;d++)d in m?(o[d]=m[d],i[d]=b[d],a&&(a[d]=v[d],a[d](d))):o[d]=hr(h);o=o.slice(0,s=c),r=u.slice(0)}return o});function h(g){if(i[d]=g,a){const[p,m]=N(d);return a[d]=m,t(u[d],p)}return t(u[d])}}}function f(e,t){return bt(()=>e(t||{}))}function ds(){return!0}const fc={get(e,t,n){return t===kn?n:e.get(t)},has(e,t){return t===kn?!0:e.has(t)},set:ds,deleteProperty:ds,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ds,deleteProperty:ds}},ownKeys(e){return e.keys()}};function ja(e){return(e=typeof e=="function"?e():e)?e:{}}function _1(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function q(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&kn in a,e[s]=typeof a=="function"?(t=!0,se(a)):a}if(dp&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=ja(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in ja(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(ja(e[a])));return[...new Set(s)]}},fc);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:_1.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const h=n[l];h&&(d.get?h.push(d.get.bind(a)):d.value!==void 0&&h.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 ce(e,...t){const n=t.length;if(dp&&kn 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)}},fc));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))}},fc)),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 E1=0;function It(){return ze.context?ze.getNextContextId():`cl-${E1++}`}const wp=e=>`Stale read from <${e}>.`;function tt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return se(w1(()=>e.each,e.children,t||void 0))}function W(e){const t=e.keyed,n=se(()=>e.when,void 0,void 0),r=t?n:se(n,void 0,{equals:(o,i)=>!o==!i});return se(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?bt(()=>i(t?o:()=>{if(!bt(r))throw wp("Show");return n()})):i}return e.fallback},void 0,void 0)}function C1(e){const t=Ko(()=>e.children),n=se(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,u=o[s],c=i,l=se(()=>c()?void 0:u.when,void 0,void 0),d=u.keyed?l:se(l,void 0,{equals:(h,g)=>!h==!g});i=()=>c()||(d()?[a,l,u]:void 0)}return i});return se(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?bt(()=>a(s.keyed?i():()=>{if(bt(n)()?.[0]!==o)throw wp("Match");return i()})):a},void 0,void 0)}function Zl(e){return e}const S1=ct();function Qs(e){let t=0,n,r,o,i,s;const[a,u]=N(!1),c=m1(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=bi();if(ze.context&&ze.load){const p=ze.getContextId();let m=ze.load(p);if(m&&(typeof m!="object"||m.s!==1?o=m:ze.gather(p)),o&&o!=="$$f"){const[b,v]=N(void 0,{equals:!1});i=b,o.then(()=>{if(ze.done)return v();ze.gather(p),si(r),v(),si()},y=>{s=y,v()})}}const h=it(S1);h&&(n=h.register(l.inFallback));let g;return ae(()=>g&&g()),f(c.Provider,{value:l,get children(){return se(()=>{if(s)throw s;if(r=ze.context,i)return i(),i=void 0;r&&o==="$$f"&&si();const p=se(()=>e.children);return se(m=>{const b=l.inFallback(),{showContent:v=!0,showFallback:y=!0}=n?n():{};if((!b||o&&o!=="$$f")&&v)return l.resolved=!0,g&&g(),g=r=o=void 0,h1(l.effects),p();if(y)return g?m:hr(x=>(g=x,r&&(si({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const k1=["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"],A1=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...k1]),T1=new Set(["innerHTML","textContent","innerText","children"]),D1=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),I1=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 O1(e,t){const n=I1[e];return typeof n=="object"?n[t]?n.$:void 0:n}const R1=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),N1=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"]),M1={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},te=e=>se(()=>e());function L1(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,h=1,g;for(;++d<o&&d<i&&!((g=c.get(t[d]))==null||g!==l+h);)h++;if(h>l-a){const p=t[s];for(;a<l;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Xl="_$DX_DELEGATE";function $1(e,t,n,r={}){let o;return hr(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function B(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>bt(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function an(e,t=window.document){const n=t[Xl]||(t[Xl]=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,H1))}}function We(e,t,n){lo(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function P1(e,t,n,r){lo(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function F1(e,t,n){lo(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Ot(e,t){lo(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ms(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 B1(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]||(Jl(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||(Jl(e,a,!0),n[a]=u)}return n}function $i(e,t,n){if(!t)return n?We(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function yi(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function Yn(e,t={},n,r){const o={};return r||Ie(()=>o.children=vi(e,t.children,o.children)),Ie(()=>typeof t.ref=="function"&&br(t.ref,e)),Ie(()=>z1(e,t,n,!0,o,!0)),o}function br(e,t,n){return bt(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return vi(e,t,r,n);Ie(o=>vi(e,t(),o,n),r)}function z1(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Ql(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Ql(e,s,a,o[s],n,i,t)}}function U1(e){let t,n;return!lo()||!(t=ze.registry.get(n=j1()))?e():(ze.completed&&ze.completed.add(t),ze.registry.delete(n),t)}function lo(e){return!!ze.context&&!ze.done&&(!e||e.isConnected)}function K1(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Jl(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 Ql(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return $i(e,n,r);if(t==="classList")return B1(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r,typeof r!="function"&&r),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),g=R1.has(h);if(!g&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(h,p)}(g||n)&&(Ms(e,h,n,g),g&&an([h]))}else if(t.slice(0,5)==="attr:")We(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")F1(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=T1.has(t))||!o&&((l=O1(t,e.tagName))||(u=A1.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(lo(e))return n;t==="class"||t==="className"?Ot(e,n):a&&!u&&!c?e[K1(t)]=n:e[l||t]=n}else{const h=o&&t.indexOf(":")>-1&&M1[t.split(":")[0]];h?P1(e,h,t,n):We(e,D1[t]||t,n)}return n}function H1(e){if(ze.registry&&ze.events&&ze.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}}),ze.registry&&!ze.done&&(ze.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 vi(e,t,n,r,o){const i=lo(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=yo(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=yo(e,n,r)}else{if(s==="function")return Ie(()=>{let u=t();for(;typeof u=="function";)u=u();n=vi(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(gc(u,t,n,o))return Ie(()=>n=vi(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=yo(e,n,r),a)return n}else c?n.length===0?ed(e,u,r):L1(e,n,u):(n&&yo(e),ed(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=yo(e,n,r,t);yo(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function gc(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=gc(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=gc(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 ed(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function yo(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 j1(){return ze.getNextContextId()}const q1=!1,G1="http://www.w3.org/2000/svg";function _p(e,t=!1,n=void 0){return t?document.createElementNS(G1,e):document.createElement(e,{is:n})}function Pi(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=bi();let i,s=!!ze.context;return ie(()=>{s&&(bi().user=s=!1),i||(i=Xs(o,()=>se(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=N(!1),l=()=>c(!0);hr(d=>w(a,()=>u()?d():i(),null)),ae(l)}else{const u=_p(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),ae(()=>a.removeChild(u))}},void 0,{render:!s}),n}function V1(e,t){const n=se(e);return se(()=>{const r=n();switch(typeof r){case"function":return bt(()=>r(t));case"string":const o=N1.has(r),i=ze.context?U1():_p(r,o,bt(()=>t.is));return Yn(i,t,o),i}})}function Ep(e){const[,t]=ce(e,["component"]);return V1(()=>e.component,t)}function Cp(){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 pc;function jc(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),pc=window.history.state._depth}jc();function W1(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Y1(e,t){let n=!1;return()=>{const r=pc;jc();const o=r==null?null:pc-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Z1=/^(?:[a-z0-9]+:)?\/\//i,X1=/^\/+|(\/)\/+$/g,Sp="http://sr";function io(e,t=!1){const n=e.replace(X1,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Ts(e,t,n){if(Z1.test(t))return;const r=io(e),o=n&&io(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+io(t,!i)}function J1(e,t){if(e==null)throw new Error(t);return e}function Q1(e,t){return io(e).replace(/\/*(\*.*)?$/g,"")+io(t)}function kp(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 ey(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=h=>n===void 0?void 0:n[h];for(let h=0;h<s;h++){const g=i[h],p=g[0]===":",m=p?u[h]:u[h].toLowerCase(),b=p?g.slice(1):g.toLowerCase();if(p&&qa(m,d(b)))l.params[b]=m;else if(p||!qa(m,b))return null;l.path+=`/${m}`}if(o){const h=c?u.slice(-c).join("/"):"";if(qa(h,d(o)))l.params[o]=h;else return null}return l}}function qa(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 ty(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 Ap(e){const t=new Map,n=bi();return new Proxy({},{get(r,o){return t.has(o)||Xs(n,()=>t.set(o,se(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Tp(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 Tp(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const ny=100,Dp=ct(),qc=ct(),Fi=()=>J1(it(Dp),"<A> and 'use' router primitives can be only used inside a Route."),ry=()=>it(qc)||Fi().base,oy=e=>{const t=ry();return se(()=>t.resolvePath(e()))},iy=e=>{const t=Fi();return se(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},jo=()=>Fi().navigatorFactory(),ea=()=>Fi().location,Bi=()=>Fi().params;function sy(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 Ip(e.path).reduce((c,l)=>{for(const d of Tp(l)){const h=Q1(t,d);let g=a?h:h.split("/*",1)[0];g=g.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...u,originalPath:l,pattern:g,matcher:ey(g,!a,e.matchFilters)})}return c},[])}function ay(e,t=0){return{routes:e,score:ty(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 Ip(e){return Array.isArray(e)?e:[e]}function Op(e,t="",n=[],r=[]){const o=Ip(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=sy(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)Op(a.children,c.pattern,n,r);else{const d=ay([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function Ga(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function uy(e,t,n){const r=new URL(Sp),o=se(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=se(()=>o().pathname),s=se(()=>o().search,!0),a=se(()=>o().hash),u=()=>"",c=mt(s,()=>kp(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):Ap(c)}}let ro;function cy(){return ro}function ly(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(T=>T),u=s.renderPath||(T=>T),c=s.beforeLeave||Cp(),l=Ts("",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,h]=N(!1);let g;const p=(T,R)=>{R.value===m()&&R.state===v()||(g===void 0&&h(!0),ro=T,g=R,hp(()=>{g===R&&(b(g.value),y(g.state),C[1](A=>A.filter(I=>I.pending)))}).finally(()=>{g===R&&pp(()=>{ro=void 0,T==="navigate"&&K(g),h(!1),g=void 0})}))},[m,b]=N(o().value),[v,y]=N(o().state),x=uy(m,v,s.queryWrapper),E=[],C=N([]),k=se(()=>typeof r.transformUrl=="function"?Ga(t(),r.transformUrl(x.pathname)):Ga(t(),x.pathname)),O=()=>{const T=k(),R={};for(let A=0;A<T.length;A++)Object.assign(R,T[A].params);return R},S=s.paramsWrapper?s.paramsWrapper(O,t):Ap(O),D={pattern:l,path:()=>l,outlet:()=>null,resolvePath(T){return Ts(l,T)}};return Ie(mt(o,T=>p("native",T),{defer:!0})),{base:D,location:x,params:S,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:z,matches:k,beforeLeave:c,preloadRoute:j,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function M(T,R,A){bt(()=>{if(typeof R=="number"){R&&(s.go?s.go(R):console.warn("Router integration does not support relative routing"));return}const I=!R||R[0]==="?",{replace:F,resolve:$,scroll:U,state:G}={replace:!1,resolve:!I,scroll:!0,...A},P=$?T.resolvePath(R):Ts(I&&x.pathname||"",R);if(P===void 0)throw new Error(`Path '${R}' is not a routable path`);if(E.length>=ny)throw new Error("Too many redirects");const Z=m();(P!==Z||G!==v())&&(q1||c.confirm(P,A)&&(E.push({value:Z,replace:F,scroll:U,state:v()}),p("navigate",{value:P,state:G})))})}function z(T){return T=T||it(qc)||D,(R,A)=>M(T,R,A)}function K(T){const R=E[0];R&&(i({...T,replace:R.replace,scroll:R.scroll}),E.length=0)}function j(T,R){const A=Ga(t(),T.pathname),I=ro;ro="preload";for(let F in A){const{route:$,params:U}=A[F];$.component&&$.component.preload&&$.component.preload();const{preload:G}=$;R&&G&&Xs(n(),()=>G({params:U,location:{pathname:T.pathname,search:T.search,hash:T.hash,query:kp(T),state:null,key:""},intent:"preload"}))}ro=I}}function dy(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=se(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:ro||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?f(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(g){return Ts(o.path(),g,l())}}}const fy=e=>t=>{const{base:n}=t,r=Ko(()=>t.children),o=se(()=>Op(r(),t.base||""));let i;const s=ly(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),f(Dp.Provider,{value:s,get children(){return f(gy,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[te(()=>(i=bi())&&null),f(py,{routerState:s,get branches(){return o()}})]}})}})};function gy(e){const t=e.routerState.location,n=e.routerState.params,r=se(()=>e.preload&&bt(()=>{e.preload({params:n,location:t,intent:cy()||"initial"})}));return f(W,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>f(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function py(e){const t=[];let n;const r=se(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],h=o[c];s&&d&&h.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),hr(g=>{t[c]=g,u[c]=dy(e.routerState,u[c-1]||e.routerState.base,td(()=>r()[c+1]),()=>{const p=e.routerState.matches();return p[c]??p[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return td(()=>r()&&n)()}const td=e=>()=>f(W,{get when(){return e()},keyed:!0,children:t=>f(qc.Provider,{value:t,get children(){return t.outlet()}})}),ar=e=>{const t=Ko(()=>e.children);return q(e,{get children(){return t()}})};function hy([e,t],n,r){return[e,r?o=>t(r(o)):t]}function my(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=hy(N(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),ze.registry&&!ze.done&&(ze.done=!0),o));return e.init&&ae(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),fy({signal:r,create:e.create,utils:e.utils})}function by(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function yy(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const vy=new Map;function xy({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(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function l(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const b=m.composedPath().find(k=>k instanceof Node&&k.nodeName.toUpperCase()==="A");if(!b||t&&!b.hasAttribute("link"))return;const v=c(b),y=v?b.href.baseVal:b.href;if((v?b.target.baseVal:b.target)||!y&&!b.hasAttribute("state"))return;const E=(b.getAttribute("rel")||"").split(/\s+/);if(b.hasAttribute("download")||E&&E.includes("external"))return;const C=v?new URL(y,document.baseURI):new URL(y);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[b,C]}function d(m){const b=l(m);if(!b)return;const[v,y]=b,x=o.parsePath(y.pathname+y.search+y.hash),E=v.getAttribute("state");m.preventDefault(),s(x,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:E?JSON.parse(E):void 0})}function h(m){const b=l(m);if(!b)return;const[v,y]=b;r&&(y.pathname=r(y.pathname)),o.preloadRoute(y,v.getAttribute("preload")!=="false")}function g(m){clearTimeout(a);const b=l(m);if(!b)return u=null;const[v,y]=b;u!==v&&(r&&(y.pathname=r(y.pathname)),a=setTimeout(()=>{o.preloadRoute(y,v.getAttribute("preload")!=="false"),u=v},20))}function p(m){if(m.defaultPrevented)return;let b=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!b)return;if(!b.startsWith("https://action/")){const y=new URL(b,Sp);if(b=o.parsePath(y.pathname+y.search),!b.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=vy.get(b);if(v){m.preventDefault();const y=new FormData(m.target,m.submitter);v.call({r:o,f:m.target},m.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}an(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",g,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",p),ae(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",g),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",p)})}}function wy(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=Cp();return my({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(W1(s),"",r):window.history.pushState(s,"",r),yy(decodeURIComponent(window.location.hash.slice(1)),i),jc()},init:r=>by(window,"popstate",Y1(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:xy({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var _y=B("<a>");function Sn(e){e=q({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=ce(e,["href","state","class","activeClass","inactiveClass","end"]),n=oy(()=>e.href),r=iy(n),o=ea(),i=se(()=>{const s=n();if(s===void 0)return[!1,!1];const a=io(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(io(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=_y();return Yn(s,q(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Ey(e){const t=jo(),n=ea(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const hc=Symbol("store-raw"),Oo=Symbol("store-node"),dr=Symbol("store-has"),Rp=Symbol("store-self");function Np(e){let t=e[kn];if(!t&&(Object.defineProperty(e,kn,{value:t=new Proxy(e,ky)}),!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 Ls(e){let t;return e!=null&&typeof e=="object"&&(e[kn]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function xi(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[hc])return n;if(!Ls(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=xi(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=xi(o,t))!==o&&(e[i]=r))}return e}function $s(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function wi(e,t,n){if(e[t])return e[t];const[r,o]=N(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Cy(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===kn||t===Oo||(delete n.value,delete n.writable,n.get=()=>e[kn][t]),n}function Mp(e){lc()&&wi($s(e,Oo),Rp)()}function Sy(e){return Mp(e),Reflect.ownKeys(e)}const ky={get(e,t,n){if(t===hc)return e;if(t===kn)return n;if(t===Is)return Mp(e),n;const r=$s(e,Oo),o=r[t];let i=o?o():e[t];if(t===Oo||t===dr||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);lc()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=wi(r,t,i)())}return Ls(i)?Np(i):i},has(e,t){return t===hc||t===kn||t===Is||t===Oo||t===dr||t==="__proto__"?!0:(lc()&&wi($s(e,dr),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Sy,getOwnPropertyDescriptor:Cy};function Ps(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[dr]&&e[dr][t]&&o!==void 0&&e[dr][t].$()):(e[t]=n,e[dr]&&e[dr][t]&&o===void 0&&e[dr][t].$());let s=$s(e,Oo),a;if((a=wi(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=wi(s,"length",i))&&a.$(e.length)}(a=s[Rp])&&a.$()}function Lp(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];$p(o)||Ps(e,o,t[o])}}function $p(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Ay(e,t){if(typeof t=="function"&&(t=t(e)),t=xi(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&&Ps(e,n,o)}Ps(e,"length",r)}else Lp(e,t)}function ai(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&&$p(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)ai(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&ai(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)ai(e,[d].concat(t),n);return}else if(t.length>1){ai(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=xi(i),r===void 0||Ls(o)&&Ls(i)&&!Array.isArray(i)?Lp(o,i):Ps(e,r,i))}function Ty(...[e,t]){const n=xi(e||{}),r=Array.isArray(n),o=Np(n);function i(...s){pp(()=>{r&&s.length===1?Ay(n,s[0]):ai(n,s)})}return[o,i]}const Me=e=>typeof e=="string",Qo=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},nd=e=>e==null?"":String(e),Dy=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Iy=/###/g,rd=e=>e&&e.includes("###")?e.replace(Iy,"."):e,od=e=>!e||Me(e),di=(e,t,n)=>{const r=Me(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(od(e))return{};const i=rd(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return od(e)?{}:{obj:e,k:rd(r[o])}},id=(e,t,n)=>{const{obj:r,k:o}=di(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=di(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=di(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Oy=(e,t,n,r)=>{const{obj:o,k:i}=di(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Fs=(e,t)=>{const{obj:n,k:r}=di(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ry=(e,t,n)=>{const r=Fs(e,n);return r!==void 0?r:Fs(t,n)},Pp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?Me(e[r])||e[r]instanceof String||Me(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Pp(e[r],t[r],n):e[r]=t[r]);return e},ur=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ny={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},My=e=>Me(e)?e.replace(/[&<>"'\/]/g,t=>Ny[t]):e;class Ly{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 $y=[" ",",","?","!",";"],Py=new Ly(20),Fy=(e,t,n)=>{t=t||"",n=n||"";const r=$y.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=Py.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},mc=(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},_i=e=>e?.replace(/_/g,"-"),By={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 Bs{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||By,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>Me(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),Me(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Bs(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Bs(this.logger,t)}}var Kn=new Bs;class ta{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 sd extends ta{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Me(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Fs(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!Me(r)?u:mc(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),id(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(Me(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=Fs(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Pp(u,r,i):u={...u,...r},id(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 Fp={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 Bp=Symbol("i18next/PATH_KEY");function zy(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Bp?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ro(e,t){const{[Bp]:n}=e(zy()),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 Va=e=>!Me(e)&&typeof e!="boolean"&&typeof e!="number";class zs extends ta{constructor(t,n={}){super(),Dy(["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=Va(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&&!Fy(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Me(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:Me(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Ro(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(j=>typeof j=="function"?Ro(j,{...this.options,...o}):String(j));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,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return h?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 g=this.resolve(t,o);let p=g?.res;const m=g?.usedKey||a,b=g?.exactUsedKey||a,v=["[object Number]","[object Function]","[object RegExp]"],y=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,E=o.count!==void 0&&!Me(o.count),C=zs.hasDefaultValue(o),k=E?this.pluralResolver.getSuffix(d,o.count,o):"",O=o.ordinal&&E?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",S=E&&!o.ordinal&&o.count===0,D=S&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${O}`]||o.defaultValue;let M=p;x&&!p&&C&&(M=D);const z=Va(M),K=Object.prototype.toString.apply(M);if(x&&M&&z&&!v.includes(K)&&!(Me(y)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,M,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=j,g.usedParams=this.getUsedParamsDetails(o),g):j}if(s){const j=Array.isArray(M),T=j?[]:{},R=j?b:m;for(const A in M)if(Object.prototype.hasOwnProperty.call(M,A)){const I=`${R}${s}${A}`;C&&!p?T[A]=this.translate(I,{...o,defaultValue:Va(D)?D[A]:void 0,joinArrays:!1,ns:u}):T[A]=this.translate(I,{...o,joinArrays:!1,ns:u}),T[A]===I&&(T[A]=M[A])}p=T}}else if(x&&Me(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,o,r));else{let j=!1,T=!1;!this.isValidLookup(p)&&C&&(j=!0,p=D),this.isValidLookup(p)||(T=!0,p=a);const A=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:p,I=C&&D!==p&&this.options.updateMissing;if(T||j||I){if(this.logger.log(I?"updateKey":"missingKey",d,c,E&&!I?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,I?D:p),s){const G=this.resolve(a,{...o,keySeparator:!1});G&&G.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 F=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let G=0;G<$.length;G++)F.push($[G]);else this.options.saveMissingTo==="all"?F=this.languageUtils.toResolveHierarchy(o.lng||this.language):F.push(o.lng||this.language);const U=(G,P,Z)=>{const V=C&&Z!==p?Z:A;this.options.missingKeyHandler?this.options.missingKeyHandler(G,c,P,V,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(G,c,P,V,I,o),this.emit("missingKey",G,c,P,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?F.forEach(G=>{const P=this.pluralResolver.getSuffixes(G,o);S&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!P.includes(`${this.options.pluralSeparator}zero`)&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(Z=>{U([G],a+Z,o[`defaultValue${Z}`]||D)})}):U(F,a,D))}p=this.extendTranslation(p,t,o,g,r),T&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${l}${a}`),(T||j)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,j?p:void 0,o))}return i?(g.res=p,g.usedParams=this.getUsedParamsDetails(o),g):p}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=Me(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let l=r.replace&&!Me(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=Me(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Fp.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return Me(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Ro(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 h=n.count!==void 0&&!Me(n.count),g=h&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(Me(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{this.isValidLookup(r)||(a=b,!this.checkedLoadedFor[`${m[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${m[0]}-${b}`]=!0,this.logger.warn(`key "${o}" for languages "${m.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!!!")),m.forEach(v=>{if(this.isValidLookup(r))return;s=v;const y=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,l,v,b,n);else{let E;h&&(E=this.pluralResolver.getSuffix(v,n.count,n));const C=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&E.startsWith(k)&&y.push(l+E.replace(k,this.options.pluralSeparator)),y.push(l+E),g&&y.push(l+C)),p){const O=`${l}${this.options.contextSeparator||"_"}${n.context}`;y.push(O),h&&(n.ordinal&&E.startsWith(k)&&y.push(O+E.replace(k,this.options.pluralSeparator)),y.push(O+E),g&&y.push(O+C))}}let x;for(;x=y.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(v,b,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Me(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class ad{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kn.create("languageUtils")}getScriptPartFromCode(t){if(t=_i(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=_i(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Me(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Me(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Me(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Me(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const ud={zero:0,one:1,two:2,few:3,many:4,other:5},cd={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Uy{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Kn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=_i(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!"),cd;if(!t.match(/-|_/))return cd;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)=>ud[o]-ud[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 ld=(e,t,n,r=".",o=!0)=>{let i=Ry(e,t,n);return!i&&o&&Me(n)&&(i=mc(e,n,r),i===void 0&&(i=mc(t,n,r))),i},Ky=e=>e.replace(/\$/g,"$$$$");class dd{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:h,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:b,maxReplaces:v,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:My,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?ur(i):s||"{{",this.suffix=a?ur(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?ur(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?ur(l):"",this.nestingPrefix=h?ur(h):g||ur("$t("),this.nestingSuffix=p?ur(p):m||ur(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!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=g=>{if(!g.includes(this.formatSeparator)){const v=ld(n,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...o,...n,interpolationkey:g}):v}const p=g.split(this.formatSeparator),m=p.shift().trim(),b=p.join(this.formatSeparator).trim();return this.format(ld(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...o,...n,interpolationkey:m})};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:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(a=0;i=g.regex.exec(t);){const p=i[1].trim();if(s=c(p),s===void 0)if(typeof l=="function"){const b=l(t,i,o);s=Me(b)?b:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),s="";else!Me(s)&&!this.useRawValueToEscape&&(s=nd(s));const m=g.safeValue(s);if(t=t.replace(i[0],Ky(m)),d?(g.regex.lastIndex+=m.length,g.regex.lastIndex-=i[0].length):g.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(`${ur(l)}[ ]*{`));let h=`{${d[1]}`;u=d[0],h=this.interpolate(h,s);const g=h.match(/'/g),p=h.match(/"/g);((g?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${l}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!Me(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!Me(i))return i;Me(i)||(i=nd(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 Hy=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}},fd=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(_i(r),o),t[s]=a),a(n)}},jy=e=>(t,n,r)=>e(_i(n),r)(t);class qy{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?fd:jy;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()]=fd(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}=Hy(c);if(this.formats[l]){let h=u;try{const g=o?.formatParams?.[o.interpolationkey]||{},p=g.locale||g.lng||o.locale||o.lng||r;h=this.formats[l](u,p,{...d,...o,...g})}catch(g){this.logger.warn(g)}return h}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const Gy=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Vy extends ta{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 h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,l=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!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=>{Oy(u.loaded,[i],s),Gy(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Me(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Me(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Wa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Me(e[1])&&(t.defaultValue=e[1]),Me(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gd=e=>(Me(e.ns)&&(e.ns=[e.ns]),Me(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Me(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),fs=()=>{},Wy=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class fi extends ta{constructor(t={},n){if(super(),this.options=gd(t),this.services={},this.logger=Kn,this.modules={external:[]},Wy(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Me(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=Wa();this.options={...r,...this.options,...gd(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=qy;const l=new ad(this.options);this.store=new sd(this.options.resources,this.options);const d=this.services;d.logger=Kn,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new Uy(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 dd(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Vy(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...g)=>{this.emit(h,...g)}),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 zs(this.services,this.options),this.translator.on("*",(h,...g)=>{this.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=fs),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=Qo(),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=fs){let r=n;const o=Me(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=Qo();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=fs),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"&&Fp.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=Qo();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=Me(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Me(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const d=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const h={...this.options,...l};Array.isArray(i)&&!d&&(h.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Ro(l.keyPrefix,h));const g=this.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(a)?p=a.map(m=>(typeof m=="function"&&(m=Ro(m,h)),`${l.keyPrefix}${g}${m}`)):(typeof a=="function"&&(a=Ro(a,h)),p=l.keyPrefix?`${l.keyPrefix}${g}${a}`:a),this.t(p,l)};return Me(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Qo();return this.options.ns?(Me(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Qo();Me(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new ad(Wa());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 fi(t,n);return r.createInstance=fi.createInstance,r}cloneInstance(t={},n=fs){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new fi(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 sd(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...Wa().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new dd(c)}return i.translator=new zs(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 Ct=fi.createInstance();Ct.createInstance;Ct.dir;Ct.init;Ct.loadResources;Ct.reloadResources;Ct.use;Ct.changeLanguage;Ct.getFixedT;Ct.t;Ct.exists;Ct.setDefaultNamespace;Ct.hasLoadedNamespace;Ct.loadNamespaces;Ct.loadLanguages;const{slice:Yy,forEach:Zy}=[];function Xy(e){return Zy.call(Yy.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Jy(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 pd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Qy=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(!pd.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!pd.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},hd={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=Qy(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 ev={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return hd.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&hd.create(n,e,r,o,i)}},tv={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}},nv={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 vo=null;const md=()=>{if(vo!==null)return vo;try{if(vo=typeof window<"u"&&window.localStorage!==null,!vo)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vo=!1}return vo};var rv={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&md())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&md()&&window.localStorage.setItem(n,e)}};let xo=null;const bd=()=>{if(xo!==null)return xo;try{if(xo=typeof window<"u"&&window.sessionStorage!==null,!xo)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{xo=!1}return xo};var ov={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&bd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&bd()&&window.sessionStorage.setItem(n,e)}},iv={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}},sv={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}},av={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}},uv={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 zp=!1;try{document.cookie,zp=!0}catch{}const Up=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];zp||Up.splice(1,1);const cv=()=>({order:Up,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Kp{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=Xy(n,this.options||{},cv()),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(ev),this.addDetector(tv),this.addDetector(rv),this.addDetector(ov),this.addDetector(iv),this.addDetector(sv),this.addDetector(av),this.addDetector(uv),this.addDetector(nv)}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&&!Jy(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)}))}}Kp.type="languageDetector";const lv={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",usageLoading:"正在查询当前模型剩余用量…",usageUnavailable:"{{kind}} 暂不支持查询剩余用量。",usageInstallHint:"{{kind}} 需要安装 opencode-quota 后才能查询剩余用量:{{command}}",usageError:"{{kind}} 剩余用量查询失败。",usageAvailableNoDetails:"{{kind}} 已连接,但未返回可展示的剩余用量明细。",usageSummary:"{{kind}} 用量:{{details}}",usageWindow:"{{label}} 剩余约 {{remaining}}%(已用 {{used}}%,重置:{{reset}})",usageWindowUnknown:"{{label}} 剩余用量未知",usageResetUnknown:"未知",usageSeparator:" · ",inputPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,Enter 发送…",draftPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发",addSlashCommandOption:"新增指令",addSlashCommandOptionDescription:"创建一个自定义斜杠指令",addSlashCommandTitle:"新增指令",editSlashCommandTitle:"编辑指令",slashCommandNoMatch:"没有匹配的指令",deleteSlashCommandTitle:"删除指令",deleteSlashCommandConfirm:"确定删除自定义指令 /{{name}}?此操作不可撤销。",slashCommandScopeProject:"当前项目",slashCommandScopeGlobal:"全局",customSlashCommandScope:"保存位置",customSlashCommandScopeProjectHint:"项目指令仅在当前项目可用,同名指令项目优先,保存后不可切换",customSlashCommandScopeGlobalHint:"全局指令在所有项目可用,保存后不可切换",customSlashCommandName:"名称",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"说明",customSlashCommandDescriptionPlaceholder:"提交当前会话相关的变更文件",customSlashCommandHiddenPrompt:"隐藏提示词",customSlashCommandHiddenPromptPlaceholder:"使用 git 提交当前会话相关的变更文件",customSlashCommandHiddenPromptHint:"发送时自动附加给 Agent,不会出现在输入框和聊天记录中",customSlashCommandPrefill:"预输入内容",customSlashCommandPrefillPlaceholder:"选择该指令后回填到输入框的内容",customSlashCommandPrefillHint:"选择该指令后回填到输入框,会自动带上 /指令名 前缀,可继续编辑后再发送",customSlashCommandNameRequired:"请输入指令名称",customSlashCommandNameInvalid:"名称只能包含字母、数字、下划线和连字符",customSlashCommandNoDescription:"自定义指令",editCustomSlashCommand:"编辑 {{name}}",deleteCustomSlashCommand:"删除 {{name}}",saveCustomSlashCommand:"保存"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",runningTasksPreventMerge:"存在进行中的命令或 Agent 任务,请等待任务结束后再合并",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Agent 创建中…",creatingHint:"Agent 正在创建 spec 文档…可在右下角 Agent 面板查看流式输出,文档落地后将自动跳转。",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",committing:"提交中…",discarding:"丢弃中…",commitPlaceholder:"commit message…",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:"},git:{title:"Git 状态",branchSelect:"切换分支",branchPlaceholder:"选择分支",branchFilterPlaceholder:"过滤分支…",noBranches:"没有匹配的分支",push:"推送",pushing:"推送中…",pushed:"已推送到远端({{branch}})",pull:"拉取",pulling:"拉取中…",pulled:"已拉取最新提交({{branch}})",upToDate:"已是最新,无需拉取",binaryFile:"二进制文件,无法展示差异",diffTruncated:"差异过大,已截断展示",diffEmpty:"该文件暂无可展示的差异",diffLoading:"差异加载中…"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",debugMode:"debug 模式",debugModeHint:"深度分析调试,尝试解决疑难问题",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"自定义",agent:"Agent",cmd:"命令 (cmd)",cmdPlaceholder:"例如:/usr/local/bin/my-agent",args:"参数 (args,空格分隔)",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",cmdRequired:"自定义命令的 cmd 不能为空",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"会话结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",saveStatusSaving:"保存中...",saveStatusSaved:"已保存",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置"}},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",started:"命令已启动",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",restarted:"命令已重启",stop:"终止",stopping:"终止中…",stopped:"命令已终止",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},dv={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.'},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>",worktreeBadge:"main"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",usageLoading:"Checking current model usage…",usageUnavailable:"{{kind}} does not support remaining usage queries yet.",usageInstallHint:"{{kind}} requires opencode-quota before remaining usage can be queried: {{command}}",usageError:"Failed to query {{kind}} remaining usage.",usageAvailableNoDetails:"{{kind}} is connected, but returned no displayable usage details.",usageSummary:"{{kind}} usage: {{details}}",usageWindow:"{{label}} about {{remaining}}% remaining ({{used}}% used, resets: {{reset}})",usageWindowUnknown:"{{label}} remaining usage unknown",usageResetUnknown:"unknown",usageSeparator:" · ",inputPlaceholder:"Type a message, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context",addSlashCommandOption:"Add Command",addSlashCommandOptionDescription:"Create a custom slash command",addSlashCommandTitle:"Add Command",editSlashCommandTitle:"Edit Command",slashCommandNoMatch:"No matching command",deleteSlashCommandTitle:"Delete command",deleteSlashCommandConfirm:"Delete the custom command /{{name}}? This cannot be undone.",slashCommandScopeProject:"This project",slashCommandScopeGlobal:"Global",customSlashCommandScope:"Saved in",customSlashCommandScopeProjectHint:"Available only in this project, shadows a global command of the same name, and cannot be moved after saving",customSlashCommandScopeGlobalHint:"Available in every project, and cannot be moved after saving",customSlashCommandName:"Name",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"Description",customSlashCommandDescriptionPlaceholder:"Commit files related to the current session",customSlashCommandHiddenPrompt:"Hidden Prompt",customSlashCommandHiddenPromptPlaceholder:"Use git to commit files related to this session",customSlashCommandHiddenPromptHint:"Sent to the Agent automatically; never shown in the composer or the chat log",customSlashCommandPrefill:"Prefill Content",customSlashCommandPrefillPlaceholder:"Content inserted into the input when selected",customSlashCommandPrefillHint:"Inserted into the composer on select, prefixed with /command-name; you can edit before sending",customSlashCommandNameRequired:"Enter a command name",customSlashCommandNameInvalid:"Use only letters, numbers, underscores, and hyphens",customSlashCommandNoDescription:"Custom command",editCustomSlashCommand:"Edit {{name}}",deleteCustomSlashCommand:"Delete {{name}}",saveCustomSlashCommand:"Save"},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",runningTasksPreventMerge:"Wait for running commands or Agent tasks to finish before merging",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Agent creating…",creatingHint:"Agent is creating spec document… Watch streaming output in the Agent panel at bottom-right. Auto-navigate when ready.",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",committing:"Committing…",discarding:"Discarding…",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: "},git:{title:"Git status",branchSelect:"Switch branch",branchPlaceholder:"Select branch",branchFilterPlaceholder:"Filter branches…",noBranches:"No matching branches",push:"Push",pushing:"Pushing…",pushed:"Pushed to remote ({{branch}})",pull:"Pull",pulling:"Pulling…",pulled:"Pulled latest commits ({{branch}})",upToDate:"Already up to date",binaryFile:"Binary file — diff not shown",diffTruncated:"Diff too large, truncated",diffEmpty:"No diff to show for this file",diffLoading:"Loading diff…"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",debugMode:"debug mode",debugModeHint:"Deep analysis & debugging — tackle stubborn, hard-to-solve issues",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",custom:"Custom",agent:"Agent",cmd:"Command (cmd)",cmdPlaceholder:"e.g. /usr/local/bin/my-agent",args:"Arguments (args, space-separated)",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",cmdRequired:"Custom command cmd cannot be empty",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Session end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",saveStatusSaving:"Saving...",saveStatusSaved:"Saved",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings"}},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",started:"Command started",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",restarted:"Command restarted",stop:"Stop",stopping:"Stopping...",stopped:"Command stopped",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},Hp=Ct.use(Kp).init({resources:{"zh-CN":{translation:lv},en:{translation:dv}},fallbackLng:"zh-CN",detection:{order:["navigator"],caches:[]},interpolation:{escapeValue:!1}});Hp.then(()=>{});const jp="(prefers-color-scheme: dark)",qp="yorz.appearanceHint";function fv(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(qp);if(!e)return null;const t=JSON.parse(e);if(!t||typeof t!="object")return null;const{mode:n,name:r}=t;return!pv(n)||!hv(r)?null:{mode:n,name:r}}catch{return null}}function gv(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(qp,JSON.stringify({mode:e,name:t}))}catch{}}function pv(e){return e==="system"||e==="light"||e==="dark"}function hv(e){return e==="terminal"||e==="graphite"||e==="paper"}function Gp(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(jp).matches?"dark":"light"}function Vp(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const Gc=fv(),[bc,mv]=N(Gc?.mode??"system"),[Wp,Yp]=N(Gc?.name??"terminal"),[Zp,bv]=N(Vp(Gc?.mode??"system",Gp()==="dark"));function Xp(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function yc(e){const t=Vp(e,Gp()==="dark");bv(t),Xp(t,Wp())}function Jp(e){mv(e),yc(e)}function yv(e){Yp(e),Xp(Zp(),e)}function vv(e,t){Yp(t),Jp(e)}let yd=!1;function xv(){yd||(yd=!0,yc(bc()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(jp).addEventListener("change",()=>{bc()==="system"&&yc("system")}))}/**
|
|
2
|
-
* @license lucide-solid v1.24.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var wv={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"},wo=wv,_v=ct({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Ev=B("<svg>"),Cv=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Sv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),kv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),vd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Av=e=>{const t=kv(e);return t.charAt(0).toUpperCase()+t.slice(1)},Tv=e=>{const[t,n]=ce(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=it(_v);return(()=>{var o=Ev();return Yn(o,q(wo,{get width(){return t.size??r.size??wo.width},get height(){return t.size??r.size??wo.height},get stroke(){return t.color??r.color??wo.stroke},get"stroke-width"(){return te(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??wo["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??wo["stroke-width"])},get class(){return Sv("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${vd(Av(t.name))}`,`lucide-${vd(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!Cv(n)?"true":void 0}},n),!0,!0),w(o,f(tt,{get each(){return t.iconNode},children:([i,s])=>f(Ep,q({component:i},s))})),o})()},Xe=Tv,Dv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Iv=e=>f(Xe,q(e,{iconNode:Dv,name:"arrow-left"})),Ov=Iv,Rv=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Nv=e=>f(Xe,q(e,{iconNode:Rv,name:"bell"})),Mv=Nv,Lv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$v=e=>f(Xe,q(e,{iconNode:Lv,name:"check"})),gs=$v,Pv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fv=e=>f(Xe,q(e,{iconNode:Pv,name:"chevron-down"})),Vc=Fv,Bv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zv=e=>f(Xe,q(e,{iconNode:Bv,name:"chevron-right"})),Qp=zv,Uv=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Kv=e=>f(Xe,q(e,{iconNode:Uv,name:"chevrons-left"})),eh=Kv,Hv=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],jv=e=>f(Xe,q(e,{iconNode:Hv,name:"chevrons-right"})),th=jv,qv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Gv=e=>f(Xe,q(e,{iconNode:qv,name:"circle-check"})),Vv=Gv,Wv=[["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"}]],Yv=e=>f(Xe,q(e,{iconNode:Wv,name:"circle-question-mark"})),Zv=Yv,Xv=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Jv=e=>f(Xe,q(e,{iconNode:Xv,name:"copy"})),Qv=Jv,ex=[["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"}]],tx=e=>f(Xe,q(e,{iconNode:ex,name:"ellipsis"})),nx=tx,rx=[["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"}]],ox=e=>f(Xe,q(e,{iconNode:rx,name:"git-branch"})),na=ox,ix=[["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"}]],sx=e=>f(Xe,q(e,{iconNode:ix,name:"git-merge"})),ax=sx,ux=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cx=e=>f(Xe,q(e,{iconNode:ux,name:"info"})),lx=cx,dx=[["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"}]],fx=e=>f(Xe,q(e,{iconNode:dx,name:"languages"})),gx=fx,px=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],hx=e=>f(Xe,q(e,{iconNode:px,name:"loader-circle"})),Un=hx,mx=[["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"}]],bx=e=>f(Xe,q(e,{iconNode:mx,name:"maximize-2"})),yx=bx,vx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],xx=e=>f(Xe,q(e,{iconNode:vx,name:"menu"})),wx=xx,_x=[["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"}]],Ex=e=>f(Xe,q(e,{iconNode:_x,name:"minimize-2"})),Cx=Ex,Sx=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],kx=e=>f(Xe,q(e,{iconNode:Sx,name:"monitor"})),Ax=kx,Tx=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Dx=e=>f(Xe,q(e,{iconNode:Tx,name:"moon"})),Ix=Dx,Ox=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Rx=e=>f(Xe,q(e,{iconNode:Ox,name:"palette"})),Nx=Rx,Mx=[["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"}]],Lx=e=>f(Xe,q(e,{iconNode:Mx,name:"paperclip"})),$x=Lx,Px=[["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"}]],Fx=e=>f(Xe,q(e,{iconNode:Px,name:"pencil"})),nh=Fx,Bx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zx=e=>f(Xe,q(e,{iconNode:Bx,name:"plus"})),zi=zx,Ux=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Kx=e=>f(Xe,q(e,{iconNode:Ux,name:"rotate-ccw"})),Hx=Kx,jx=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],qx=e=>f(Xe,q(e,{iconNode:jx,name:"rotate-cw"})),Gx=qx,Vx=[["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"}]],Wx=e=>f(Xe,q(e,{iconNode:Vx,name:"send"})),ra=Wx,Yx=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Zx=e=>f(Xe,q(e,{iconNode:Yx,name:"settings"})),Xx=Zx,Jx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Qx=e=>f(Xe,q(e,{iconNode:Jx,name:"square"})),rh=Qx,ew=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],tw=e=>f(Xe,q(e,{iconNode:ew,name:"sun"})),nw=tw,rw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ow=e=>f(Xe,q(e,{iconNode:rw,name:"terminal"})),iw=ow,sw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aw=e=>f(Xe,q(e,{iconNode:sw,name:"trash-2"})),Wc=aw,uw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],cw=e=>f(Xe,q(e,{iconNode:uw,name:"triangle-alert"})),lw=cw,dw=[["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"}]],fw=e=>f(Xe,q(e,{iconNode:dw,name:"upload"})),gw=fw,pw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hw=e=>f(Xe,q(e,{iconNode:pw,name:"x"})),jr=hw;function Ke(e){return`/api/projects/${encodeURIComponent(e)}`}async function vc(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ae(e,t){const n=await fetch(e,t);if(!n.ok){const r=await vc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const he={listSpecs:e=>Ae(`${Ke(e)}/specs`),getSpec:(e,t)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${Ke(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await vc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getProjectChanges:e=>Ae(`${Ke(e)}/git/changes`),getFileDiff:(e,t)=>Ae(`${Ke(e)}/git/diff?path=${encodeURIComponent(t)}`),getGitBranches:e=>Ae(`${Ke(e)}/git/branches`),checkoutGitBranch:(e,t)=>Ae(`${Ke(e)}/git/checkout`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),projectCommit:(e,t)=>Ae(`${Ke(e)}/git/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectDiscard:(e,t)=>Ae(`${Ke(e)}/git/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectPush:e=>Ae(`${Ke(e)}/git/push`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),projectPull:e=>Ae(`${Ke(e)}/git/pull`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),getDebug:(e,t)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ae("/api/projects"),listSystemNotifications:()=>Ae("/api/system-notifications"),deleteSystemNotification:e=>Ae(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Ae(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Ae(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Ae(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ae(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ae(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ae(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ae(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ae(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectCustomInstructions:e=>Ae(`/api/projects/${encodeURIComponent(e)}/custom-instructions`),updateProjectCustomInstructions:(e,t)=>Ae(`/api/projects/${encodeURIComponent(e)}/custom-instructions`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({customInstructions:t})}),getGlobalConfig:()=>Ae("/api/global-config"),updateGlobalConfig:e=>Ae("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Ae(`${Ke(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(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await vc(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ae(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ae(`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${Ke(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${Ke(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ae(`${Ke(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ae(`${Ke(e)}/sessions`),getAgentUsageStatus:e=>Ae(`${Ke(e)}/agent-usage`),createSession:(e,t={})=>Ae(`${Ke(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ae(`${Ke(e)}/sessions/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ae(`${Ke(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)=>Ae(`${Ke(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ae(`${Ke(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Ae(`${Ke(e)}/commands`),createCommand:(e,t)=>Ae(`${Ke(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Ae(`${Ke(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Ae(`${Ke(e)}/command-runs`),getCommandRun:(e,t)=>Ae(`${Ke(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Ae(`${Ke(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Ae(`${Ke(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Ae(`${Ke(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Ae(`${Ke(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[mw,oh]=N("");function Do(e){e&&oh(e)}function bw(){oh("")}const[pt,yw]=N(vw());function vw(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function fo(){const e=Bi();return()=>e.projectId??pt()}function Mt(e="",t){const n=pt();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[xw,ww]=N(0),[_w,xd]=N(null);let wd=0;function Ew(){ww(e=>e+1)}function Cw(e){const t=++wd;xd(()=>e),ae(()=>{wd===t&&xd(null)})}const[Lr,Yc]=N(!1);function ih(){Yc(e=>!e)}function Zc(){Yc(!1)}let xc=0,Ya=!1;function Sw(){xc-=1,!Ya&&(Ya=!0,queueMicrotask(()=>{Ya=!1,xc<=0&&Yc(!1)}))}function Ui(e){xc+=1,ae(Sw),Cw(ih),ie(()=>{if(!Lr())return;const t=n=>{n.key!=="Escape"||e?.()||Zc()};window.addEventListener("keydown",t),ae(()=>window.removeEventListener("keydown",t))})}function kw(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class Aw{clientId=kw();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 Zn=new Aw;function oa(e){const t=e;return t.readyState=()=>Zn.readyState(),t}function Tw(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Zn.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return oa(o)}function ia(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Zn.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return oa(o)}function sh(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Zn.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return oa(r)}function ah(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Zn.subscribe(n,r=>{r==="list-updated"&&t()})}function uh(e){return Zn.subscribe("projects",t=>{t==="projects-changed"&&e()})}function Dw(e){return Zn.subscribe("system-notifications",t=>{t==="updated"&&e()})}function Iw(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return Zn.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function Ow(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return Zn.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function Rw(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:changes`,r=Zn.subscribe(n,(o,i)=>{o==="changes-updated"&&t(i.changes)});return oa(r)}function ch(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 Nw(e,t){return e.some(n=>n.status==="running")||t.some(n=>n.running)}async function _d(e,t){const[n,r]=await Promise.all([t.listCommandRuns(e),t.listSessions(e)]);return!Nw(n,r)}function Mw(e,t=()=>{}){let n=!1;async function r(o){if(!n){n=!0,t(!0);try{return await o()}finally{n=!1,t(!1)}}}return{async check(o){const i=await r(()=>_d(o,e));return i===void 0?"busy":i?"allowed":"running"},async merge(o,i){return await r(async()=>await _d(o,e)?{status:"merged",value:await i()}:{status:"blocked",reason:"running"})??{status:"blocked",reason:"busy"}}}}function lh(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=lh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=lh(e))&&(r&&(r+=" "),r+=t);return r}const Lw=(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},$w=(e,t)=>({classGroupId:e,validator:t}),fh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Us="-",Ed=[],Pw="arbitrary..",Fw=e=>{const t=zw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Bw(s);const a=s.split(Us),u=a[0]===""&&a.length>1?1:0;return gh(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?Lw(c,u):u:c||Ed}return n[s]||Ed}}},gh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=gh(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Us):e.slice(t).join(Us),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},Bw=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?Pw+r:void 0})(),zw=e=>{const{theme:t,classGroups:n}=e;return Uw(n,t)},Uw=(e,t)=>{const n=fh();for(const r in e){const o=e[r];Xc(o,n,r,t)}return n},Xc=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Kw(s,t,n,r)}},Kw=(e,t,n,r)=>{if(typeof e=="string"){Hw(e,t,n);return}if(typeof e=="function"){jw(e,t,n,r);return}qw(e,t,n,r)},Hw=(e,t,n)=>{const r=e===""?t:ph(t,e);r.classGroupId=n},jw=(e,t,n,r)=>{if(Gw(e)){Xc(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($w(n,e))},qw=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Xc(u,ph(t,a),n,r)}},ph=(e,t)=>{let n=e;const r=t.split(Us),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=fh(),n.nextPart.set(s,a)),n=a}return n},Gw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Vw=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)}}},wc="!",Cd=":",Ww=[],Sd=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Yw=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 m=0;m<l;m++){const b=o[m];if(s===0&&a===0){if(b===Cd){i.push(o.slice(u,m)),u=m+1;continue}if(b==="/"){c=m;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const d=i.length===0?o:o.slice(u);let h=d,g=!1;d.endsWith(wc)?(h=d.slice(0,-1),g=!0):d.startsWith(wc)&&(h=d.slice(1),g=!0);const p=c&&c>u?c-u:void 0;return Sd(i,g,h,p)};if(t){const o=t+Cd,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Sd(Ww,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Zw=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}},Xw=e=>({cache:Vw(e.cacheSize),parseClassName:Yw(e),sortModifiers:Zw(e),postfixLookupClassGroupIds:Jw(e),...Fw(e)}),Jw=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},Qw=/\s+/,e_=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(Qw);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:h,modifiers:g,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}=n(d);if(h){c=d+(c.length>0?" "+c:c);continue}let v=!!b,y;if(v){const O=m.substring(0,b);y=r(O);const S=y&&s[y]?r(m):void 0;S&&S!==y&&(y=S,v=!1)}else y=r(m);if(!y){if(!v){c=d+(c.length>0?" "+c:c);continue}if(y=r(m),!y){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=g.length===0?"":g.length===1?g[0]:i(g).join(":"),E=p?x+wc:x,C=E+y;if(a.indexOf(C)>-1)continue;a.push(C);const k=o(y,v);for(let O=0;O<k.length;++O){const S=k[O];a.push(E+S)}c=d+(c.length>0?" "+c:c)}return c},t_=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=hh(n))&&(o&&(o+=" "),o+=r);return o},hh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hh(e[r]))&&(n&&(n+=" "),n+=t);return n},n_=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=Xw(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=e_(u,n);return o(u,l),l};return i=s,(...u)=>i(t_(...u))},r_=[],Rt=e=>{const t=n=>n[e]||r_;return t.isThemeGetter=!0,t},mh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,o_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,i_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s_=/\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$/,a_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dr=e=>o_.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Bn=e=>!!e&&Number.isInteger(Number(e)),Za=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),cr=e=>i_.test(e),yh=()=>!0,l_=e=>s_.test(e)&&!a_.test(e),Jc=()=>!1,d_=e=>u_.test(e),f_=e=>c_.test(e),g_=e=>!be(e)&&!ye(e),p_=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)),h_=e=>qr(e,wh,Jc),be=e=>mh.test(e),Qr=e=>qr(e,_h,l_),kd=e=>qr(e,E_,Ge),m_=e=>qr(e,Ch,yh),b_=e=>qr(e,Eh,Jc),Ad=e=>qr(e,vh,Jc),y_=e=>qr(e,xh,f_),ps=e=>qr(e,Sh,d_),ye=e=>bh.test(e),ei=e=>go(e,_h),v_=e=>go(e,Eh),Td=e=>go(e,vh),x_=e=>go(e,wh),w_=e=>go(e,xh),hs=e=>go(e,Sh,!0),__=e=>go(e,Ch,!0),qr=(e,t,n)=>{const r=mh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=bh.exec(e);return r?r[1]?t(r[1]):n:!1},vh=e=>e==="position"||e==="percentage",xh=e=>e==="image"||e==="url",wh=e=>e==="length"||e==="size"||e==="bg-size",_h=e=>e==="length",E_=e=>e==="number",Eh=e=>e==="family-name",Ch=e=>e==="number"||e==="weight",Sh=e=>e==="shadow",C_=()=>{const e=Rt("color"),t=Rt("font"),n=Rt("text"),r=Rt("font-weight"),o=Rt("tracking"),i=Rt("leading"),s=Rt("breakpoint"),a=Rt("container"),u=Rt("spacing"),c=Rt("radius"),l=Rt("shadow"),d=Rt("inset-shadow"),h=Rt("text-shadow"),g=Rt("drop-shadow"),p=Rt("blur"),m=Rt("perspective"),b=Rt("aspect"),v=Rt("ease"),y=Rt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),ye,be],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],S=()=>[ye,be,u],D=()=>[Dr,"full","auto",...S()],M=()=>[Bn,"none","subgrid",ye,be],z=()=>["auto",{span:["full",Bn,ye,be]},Bn,ye,be],K=()=>[Bn,"auto",ye,be],j=()=>["auto","min","max","fr",ye,be],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...S()],I=()=>[Dr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],F=()=>[Dr,"screen","full","dvw","lvw","svw","min","max","fit",...S()],$=()=>[Dr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],U=()=>[e,ye,be],G=()=>[...E(),Td,Ad,{position:[ye,be]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",x_,h_,{size:[ye,be]}],V=()=>[Za,ei,Qr],Y=()=>["","none","full",c,ye,be],ee=()=>["",Ge,ei,Qr],re=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[Ge,Za,Td,Ad],Oe=()=>["","none",p,ye,be],Ye=()=>["none",Ge,ye,be],nt=()=>["none",Ge,ye,be],yt=()=>[Ge,ye,be],lt=()=>[Dr,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cr],breakpoint:[cr],color:[yh],container:[cr],"drop-shadow":[cr],ease:["in","out","in-out"],font:[g_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cr],shadow:[cr],spacing:["px",Ge],text:[cr],"text-shadow":[cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dr,be,ye,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,be]}],"container-named":[p_],columns:[{columns:[Ge,be,ye,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Bn,"auto",ye,be]}],basis:[{basis:[Dr,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,Dr,"auto","initial","none",be]}],grow:[{grow:["",Ge,ye,be]}],shrink:[{shrink:["",Ge,ye,be]}],order:[{order:[Bn,"first","last","none",ye,be]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,ei,Qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,__,m_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Za,be]}],"font-family":[{font:[v_,b_,t]}],"font-features":[{"font-features":[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ye,be]}],"line-clamp":[{"line-clamp":[Ge,"none",ye,kd]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ye,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",ye,Qr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Ge,"auto",ye,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Bn,ye,be]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bn,ye,be],radial:["",ye,be],conic:[Bn,ye,be]},w_,y_]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,ye,be]}],"outline-w":[{outline:["",Ge,ei,Qr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",l,hs,ps]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",d,hs,ps]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Ge,Qr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",h,hs,ps]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Ge,ye,be]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"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":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ye,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,be]}],filter:[{filter:["","none",ye,be]}],blur:[{blur:Oe()}],brightness:[{brightness:[Ge,ye,be]}],contrast:[{contrast:[Ge,ye,be]}],"drop-shadow":[{"drop-shadow":["","none",g,hs,ps]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Ge,ye,be]}],"hue-rotate":[{"hue-rotate":[Ge,ye,be]}],invert:[{invert:["",Ge,ye,be]}],saturate:[{saturate:[Ge,ye,be]}],sepia:[{sepia:["",Ge,ye,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,be]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,ye,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,ye,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,ye,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,ye,be]}],"backdrop-invert":[{"backdrop-invert":["",Ge,ye,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,ye,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,ye,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,ye,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",ye,be]}],ease:[{ease:["linear","initial",v,ye,be]}],delay:[{delay:[Ge,ye,be]}],animate:[{animate:["none",y,ye,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ye,be]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ye()}],"rotate-x":[{"rotate-x":Ye()}],"rotate-y":[{"rotate-y":Ye()}],"rotate-z":[{"rotate-z":Ye()}],scale:[{scale:nt()}],"scale-x":[{"scale-x":nt()}],"scale-y":[{"scale-y":nt()}],"scale-z":[{"scale-z":nt()}],"scale-3d":["scale-3d"],skew:[{skew:yt()}],"skew-x":[{"skew-x":yt()}],"skew-y":[{"skew-y":yt()}],transform:[{transform:[ye,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lt()}],"translate-x":[{"translate-x":lt()}],"translate-y":[{"translate-y":lt()}],"translate-z":[{"translate-z":lt()}],"translate-none":["translate-none"],zoom:[{zoom:[Bn,ye,be]}],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":U()}],"scrollbar-track-color":[{"scrollbar-track":U()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,be]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Ge,ei,Qr,kd]}],stroke:[{stroke:["none",...U()]}],"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"]}},S_=n_(C_);function ot(...e){return S_(dh(e))}function k_(e){return(...t)=>{for(const n of e)n&&n(...t)}}const X=e=>typeof e=="function"&&!e.length?e():e,Dd=e=>Array.isArray(e)?e:e?[e]:[];function A_(e,...t){return typeof e=="function"?e(...t):e}const T_=ae;function D_(e,t,n,r){return e.addEventListener(t,n,r),T_(e.removeEventListener.bind(e,t,n,r))}function I_(e,t,n,r){const o=()=>{Dd(X(e)).forEach(i=>{i&&Dd(X(t)).forEach(s=>D_(i,s,n,r))})};typeof e=="function"?ie(o):Ie(o)}const Xa=Symbol("fallback");function Id(e){for(const t of e)t.dispose()}function O_(e,t,n,r={}){const o=new Map;return ae(()=>Id(o.values())),()=>{const s=e()||[];return s[Is],bt(()=>{if(!s.length)return Id(o.values()),o.clear(),r.fallback?[hr(d=>(o.set(Xa,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),u=o.get(Xa);if(!o.size||u){u?.dispose(),o.delete(Xa);for(let l=0;l<s.length;l++){const d=s[l],h=t(d,l);i(a,d,l,h)}return a}const c=new Set(o.keys());for(let l=0;l<s.length;l++){const d=s[l],h=t(d,l);c.delete(h);const g=o.get(h);g?(a[l]=g.mapped,g.setIndex?.(l),g.setItem(()=>d)):i(a,d,l,h)}for(const l of c)o.get(l)?.dispose(),o.delete(l);return a})};function i(s,a,u,c){hr(l=>{const[d,h]=N(a),g={setItem:h,dispose:l};if(n.length>1){const[p,m]=N(u);g.setIndex=m,g.mapped=n(d,p)}else g.mapped=n(d);o.set(c,g),s[u]=g.mapped})}}function R_(e){const{by:t}=e;return se(O_(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}const N_=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Od(e){const t={};let n;for(;n=N_.exec(e);)t[n[1]]=n[2];return t}function mn(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Od(e)}else typeof t=="string"&&(t=Od(t));return{...e,...t}}function Je(...e){return k_(e)}function M_(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function _c(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function L_(e){return typeof e=="number"}function Ao(e){return Object.prototype.toString.call(e)==="[object String]"}function Ki(e){return typeof e=="function"}function nn(e){return t=>`${e()}-${t}`}function Nt(e,t){return e?e===t||e.contains(t):!1}function ui(e,t=!1){const{activeElement:n}=tn(e);if(!n?.nodeName)return null;if(kh(n)&&n.contentDocument)return ui(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=tn(n).getElementById(r);if(o)return o}}return n}function Qc(e){return tn(e).defaultView||window}function tn(e){return e?e.ownerDocument||e:document}function kh(e){return e.tagName==="IFRAME"}var sa=(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))(sa||{});function Ah(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function el(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Hi(){return el(/^Mac/i)}function $_(){return el(/^iPhone/i)}function P_(){return el(/^iPad/i)||Hi()&&navigator.maxTouchPoints>1}function F_(){return $_()||P_()}function B_(){return Hi()||F_()}function z_(){return Ah(/AppleWebKit/i)&&!U_()}function U_(){return Ah(/Chrome/i)}function Ee(e,t){return t&&(Ki(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function dt(e){return t=>{for(const n of e)Ee(t,n)}}function K_(e){return Hi()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function xt(e){if(e)if(H_())e.focus({preventScroll:!0});else{const t=j_(e);e.focus(),q_(t)}}var ms=null;function H_(){if(ms==null){ms=!1;try{document.createElement("div").focus({get preventScroll(){return ms=!0,!0}})}catch{}}return ms}function j_(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 q_(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Th=["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'])"],G_=[...Th,'[tabindex]:not([tabindex="-1"]):not([disabled])'],tl=`${Th.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,V_=G_.join(':not([hidden]):not([tabindex="-1"]),');function Dh(e,t){const r=Array.from(e.querySelectorAll(tl)).filter(Rd);return t&&Rd(e)&&r.unshift(e),r.forEach((o,i)=>{if(kh(o)&&o.contentDocument){const s=o.contentDocument.body,a=Dh(s,!1);r.splice(i,1,...a)}}),r}function Rd(e){return Ih(e)&&!W_(e)}function Ih(e){return e.matches(tl)&&nl(e)}function W_(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function nl(e,t){return e.nodeName!=="#comment"&&Y_(e)&&Z_(e,t)&&(!e.parentElement||nl(e.parentElement,e))}function Y_(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 Z_(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function X_(e,t,n){const r=t?.tabbable?V_:tl,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&nl(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Nd(e){let t=e;for(;t&&!J_(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function J_(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Q_(){}function e2(e){return[e.clientX,e.clientY]}function Oh(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,h]=t[u],[,g]=t[u===0?s-1:u-1]||[0,0],p=(l-h)*(n-c)-(c-d)*(r-l);if(h<l){if(r>=h&&r<l){if(p===0)return!0;p>0&&(r===h?r>g&&(o=!o):o=!o)}}else if(l<h){if(r>l&&r<=h){if(p===0)return!0;p<0&&(r===h?r<g&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function ve(e,t){return q(e,t)}var ti=new Map,Md=new Set;function Ld(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=ti.get(n.target);r||(r=new Set,ti.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=ti.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ti.delete(n.target)),ti.size===0)){for(const o of Md)o();Md.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Ld():document.addEventListener("DOMContentLoaded",Ld));function Ec(e,t){const n=$d(e,t,"left"),r=$d(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 $d(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 t2(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Nd(e);for(;e&&o&&e!==n&&o!==n;)Ec(o,e),e=o,o=Nd(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 aa={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 ua(e,t){const[n,r]=N(Pd(t?.()));return ie(()=>{r(e()?.tagName.toLowerCase()||Pd(t?.()))}),n}function Pd(e){return Ao(e)?e:void 0}function Te(e){const[t,n]=ce(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(Ep,q(n,{get component(){return t.as}}))}var n2=Object.defineProperty,En=(e,t)=>{for(var n in t)n2(e,n,{get:t[n],enumerable:!0})},r2={};En(r2,{Button:()=>Rh,Root:()=>Xn});var o2=["button","color","file","image","reset","submit"];function i2(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?o2.indexOf(e.type)!==-1:!1}function Xn(e){let t;const n=ve({type:"button"},e),[r,o]=ce(n,["ref","type","disabled"]),i=ua(()=>t,()=>"button"),s=se(()=>{const c=i();return c==null?!1:i2({tagName:c,type:r.type})}),a=se(()=>i()==="input"),u=se(()=>i()==="a"&&t?.getAttribute("href")!=null);return f(Te,q({as:"button",ref(c){var l=Je(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return te(()=>!!(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 te(()=>!!(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 Rh=Xn;const Fd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bd=dh,Nh=(e,t)=>n=>{var r;if(t?.variants==null)return Bd(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 h=Fd(l)||Fd(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,h]=l;return h===void 0||(c[d]=h),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:h,...g}=l;return Object.entries(g).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...c,d,h]:c},[]);return Bd(e,s,u,n?.class,n?.className)},s2=Nh("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"}}),xe=e=>{const[t,n]=ce(e,["class","variant","size"]);return f(Rh,q({get class(){return ot(s2({size:t.size,variant:t.variant}),t.class)}},n))};var a2=B("<div>");const u2=Nh("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"}}),Mh=e=>{const[t,n]=ce(e,["class","variant"]);return(()=>{var r=a2();return Yn(r,q({get class(){return ot(u2({variant:t.variant}),t.class)}},n),!1,!1),r})()},[c2,Lh]=N(Ct.language||"zh-CN"),[l2,d2]=N(Ct.isInitialized);Hp.then(()=>{Lh(Ct.language||"zh-CN"),d2(!0)});Ct.on("languageChanged",e=>Lh(e));function _(e,t){return Ct.t(e,t)}function $h(){return{t:_,lng:se(()=>c2()),ready:se(()=>l2()),changeLanguage:e=>Ct.changeLanguage(e)}}const ji=()=>{const e=()=>Lr()?_("specDetail.exitFullscreen"):_("specDetail.fullscreen");return f(xe,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:ih,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return Lr()},get children(){return f(W,{get when(){return Lr()},get fallback(){return f(yx,{class:"h-3 w-3"})},get children(){return f(Cx,{class:"h-3 w-3"})}})}})};var f2=B("<input>");const qn=e=>{const[t,n]=ce(e,["class"]);return(()=>{var r=f2();return Yn(r,q({get class(){return ot("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var g2=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),p2=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function h2(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return g2.has(n)}const t=e.split("-")[0];return p2.has(t)}function m2(e){return h2(e)?"rtl":"ltr"}function Ph(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:m2(e)}}var Cc=Ph(),ci=new Set;function zd(){Cc=Ph();for(const e of ci)e(Cc)}function b2(){const[e,t]=N(Cc),n=se(()=>e());return wn(()=>{ci.size===0&&window.addEventListener("languagechange",zd),ci.add(t),ae(()=>{ci.delete(t),ci.size===0&&window.removeEventListener("languagechange",zd)})}),{locale:()=>n().locale,direction:()=>n().direction}}var y2=ct();function Gr(){const e=b2();return it(y2)||e}var Ja=new Map;function Fh(e){const{locale:t}=Gr(),n=se(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return se(()=>{const r=n();let o;return Ja.has(r)&&(o=Ja.get(r)),o||(o=new Intl.Collator(t(),e),Ja.set(r,o)),o})}const v2=["top","right","bottom","left"],Br=Math.min,dn=Math.max,Ks=Math.round,bs=Math.floor,Gn=e=>({x:e,y:e}),x2={left:"right",right:"left",bottom:"top",top:"bottom"};function Sc(e,t,n){return dn(e,Br(t,n))}function po(e,t){return typeof e=="function"?e(t):e}function zr(e){return e.split("-")[0]}function qo(e){return e.split("-")[1]}function Bh(e){return e==="x"?"y":"x"}function rl(e){return e==="y"?"height":"width"}function gr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ol(e){return Bh(gr(e))}function w2(e,t,n){n===void 0&&(n=!1);const r=qo(e),o=ol(e),i=rl(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Hs(s)),[s,Hs(s)]}function _2(e){const t=Hs(e);return[kc(e),t,kc(t)]}function kc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ud=["left","right"],Kd=["right","left"],E2=["top","bottom"],C2=["bottom","top"];function S2(e,t,n){switch(e){case"top":case"bottom":return n?t?Kd:Ud:t?Ud:Kd;case"left":case"right":return t?E2:C2;default:return[]}}function k2(e,t,n,r){const o=qo(e);let i=S2(zr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(kc)))),i}function Hs(e){const t=zr(e);return x2[t]+e.slice(t.length)}function A2(e){return{top:0,right:0,bottom:0,left:0,...e}}function zh(e){return typeof e!="number"?A2(e):{top:e,right:e,bottom:e,left:e}}function js(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 Hd(e,t,n){let{reference:r,floating:o}=e;const i=gr(t),s=ol(t),a=rl(s),u=zr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let g;switch(u){case"top":g={x:l,y:r.y-o.height};break;case"bottom":g={x:l,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(qo(t)){case"start":g[s]-=h*(n&&c?-1:1);break;case"end":g[s]+=h*(n&&c?-1:1);break}return g}async function T2(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:h=!1,padding:g=0}=po(t,e),p=zh(g),b=a[h?d==="floating"?"reference":"floating":d],v=js(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),y=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=js(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:u}):y);return{top:(v.top-C.top+p.top)/E.y,bottom:(C.bottom-v.bottom+p.bottom)/E.y,left:(v.left-C.left+p.left)/E.x,right:(C.right-v.right+p.right)/E.x}}const D2=50,I2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:T2},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}=Hd(c,r,u),h=r,g=0;const p={};for(let m=0;m<i.length;m++){const b=i[m];if(!b)continue;const{name:v,fn:y}=b,{x,y:E,data:C,reset:k}=await y({x:l,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=E??d,p[v]={...p[v],...C},k&&g<D2&&(g++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:l,y:d}=Hd(c,h,u)),m=-1)}return{x:l,y:d,placement:h,strategy:o,middlewareData:p}},O2=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}=po(e,t)||{};if(c==null)return{};const d=zh(l),h={x:n,y:r},g=ol(o),p=rl(g),m=await s.getDimensions(c),b=g==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[g]-h[g]-i.floating[p],C=h[g]-i.reference[g],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let O=k?k[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(k)))&&(O=a.floating[x]||i.floating[p]);const S=E/2-C/2,D=O/2-m[p]/2-1,M=Br(d[v],D),z=Br(d[y],D),K=M,j=O-m[p]-z,T=O/2-m[p]/2+S,R=Sc(K,T,j),A=!u.arrow&&qo(o)!=null&&T!==R&&i.reference[p]/2-(T<K?M:z)-m[p]/2<0,I=A?T<K?T-K:T-j:0;return{[g]:h[g]+I,data:{[g]:R,centerOffset:T-R-I,...A&&{alignmentOffset:I}},reset:A}}}),R2=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:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=po(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=zr(o),y=gr(a),x=zr(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),C=h||(x||!m?[Hs(a)]:_2(a)),k=p!=="none";!h&&k&&C.push(...k2(a,m,p,E));const O=[a,...C],S=await u.detectOverflow(t,b),D=[];let M=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&D.push(S[v]),d){const T=w2(o,s,E);D.push(S[T[0]],S[T[1]])}if(M=[...M,{placement:o,overflows:D}],!D.every(T=>T<=0)){var z,K;const T=(((z=i.flip)==null?void 0:z.index)||0)+1,R=O[T];if(R&&(!(d==="alignment"?y!==gr(R):!1)||M.every(F=>gr(F.placement)===y?F.overflows[0]>0:!0)))return{data:{index:T,overflows:M},reset:{placement:R}};let A=(K=M.filter(I=>I.overflows[0]<=0).sort((I,F)=>I.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!A)switch(g){case"bestFit":{var j;const I=(j=M.filter(F=>{if(k){const $=gr(F.placement);return $===y||$==="y"}return!0}).map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,U)=>$+U,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:j[0];I&&(A=I);break}case"initialPlacement":A=a;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function jd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qd(e){return v2.some(t=>e[t]>=0)}const N2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=po(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=jd(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qd(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=jd(s,n.floating);return{data:{escapedOffsets:a,escaped:qd(a)}}}default:return{}}}}},M2=new Set(["left","top"]);async function L2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=zr(n),a=qo(n),u=gr(n)==="y",c=M2.has(s)?-1:1,l=i&&u?-1:1,d=po(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(g=a==="end"?p*-1:p),u?{x:g*l,y:h*c}:{x:h*c,y:g*l}}const $2=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 L2(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}}}}},P2=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:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=po(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),h=gr(zr(o)),g=Bh(h);let p=l[g],m=l[h];if(s){const v=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=p+d[v],E=p-d[y];p=Sc(x,p,E)}if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[v],E=m-d[y];m=Sc(x,m,E)}const b=u.fn({...t,[g]:p,[h]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:s,[h]:a}}}}}},F2=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}=po(e,t),l=await s.detectOverflow(t,c),d=zr(o),h=qo(o),g=gr(o)==="y",{width:p,height:m}=i.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,b=h==="end"?"top":"bottom");const y=m-l.top-l.bottom,x=p-l.left-l.right,E=Br(m-l[b],y),C=Br(p-l[v],x),k=!t.middlewareData.shift;let O=E,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=y),k&&!h){const M=dn(l.left,0),z=dn(l.right,0),K=dn(l.top,0),j=dn(l.bottom,0);g?S=p-2*(M!==0||z!==0?M+z:dn(l.left,l.right)):O=m-2*(K!==0||j!==0?K+j:dn(l.top,l.bottom))}await u({...t,availableWidth:S,availableHeight:O});const D=await s.getDimensions(a.floating);return p!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function ca(){return typeof window<"u"}function Go(e){return Uh(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(Uh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Uh(e){return ca()?e instanceof Node||e instanceof gn(e).Node:!1}function Tn(e){return ca()?e instanceof Element||e instanceof gn(e).Element:!1}function wr(e){return ca()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function Gd(e){return!ca()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function B2(e){return/^(table|td|th)$/.test(Go(e))}function la(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const z2=/transform|translate|scale|rotate|perspective|filter/,U2=/paint|layout|strict|content/,eo=e=>!!e&&e!=="none";let Qa;function il(e){const t=Tn(e)?Dn(e):e;return eo(t.transform)||eo(t.translate)||eo(t.scale)||eo(t.rotate)||eo(t.perspective)||!sl()&&(eo(t.backdropFilter)||eo(t.filter))||z2.test(t.willChange||"")||U2.test(t.contain||"")}function K2(e){let t=Ur(e);for(;wr(t)&&!$o(t);){if(il(t))return t;if(la(t))return null;t=Ur(t)}return null}function sl(){return Qa==null&&(Qa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qa}function $o(e){return/^(html|body|#document)$/.test(Go(e))}function Dn(e){return gn(e).getComputedStyle(e)}function da(e){return Tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ur(e){if(Go(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gd(e)&&e.host||Jn(e);return Gd(t)?t.host:t}function Kh(e){const t=Ur(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&qi(t)?t:Kh(t)}function Ei(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Kh(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=gn(o);if(i){const a=Ac(s);return t.concat(s,s.visualViewport||[],qi(o)?o:[],a&&n?Ei(a):[])}else return t.concat(o,Ei(o,[],n))}function Ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hh(e){const t=Dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wr(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ks(n)!==i||Ks(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function al(e){return Tn(e)?e:e.contextElement}function No(e){const t=al(e);if(!wr(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Hh(t);let s=(i?Ks(n.width):n.width)/r,a=(i?Ks(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const H2=Gn(0);function jh(e){const t=gn(e);return!sl()||!t.visualViewport?H2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function j2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function uo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=al(e);let s=Gn(1);t&&(r?Tn(r)&&(s=No(r)):s=No(e));const a=j2(i,n,r)?jh(i):Gn(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 h=gn(i),g=r&&Tn(r)?gn(r):r;let p=h,m=Ac(p);for(;m&&r&&g!==p;){const b=No(m),v=m.getBoundingClientRect(),y=Dn(m),x=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,E=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;u*=b.x,c*=b.y,l*=b.x,d*=b.y,u+=x,c+=E,p=gn(m),m=Ac(p)}}return js({width:l,height:d,x:u,y:c})}function fa(e,t){const n=da(e).scrollLeft;return t?t.left+n:uo(Jn(e)).left+n}function qh(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function q2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Jn(r),a=t?la(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Gn(1);const l=Gn(0),d=wr(r);if((d||!d&&!i)&&((Go(r)!=="body"||qi(s))&&(u=da(r)),d)){const g=uo(r);c=No(r),l.x=g.x+r.clientLeft,l.y=g.y+r.clientTop}const h=s&&!d&&!i?qh(s,u):Gn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+h.x,y:n.y*c.y-u.scrollTop*c.y+l.y+h.y}}function G2(e){return Array.from(e.getClientRects())}function V2(e){const t=Jn(e),n=da(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+fa(e);const a=-n.scrollTop;return Dn(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Vd=25;function W2(e,t){const n=gn(e),r=Jn(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=sl();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=fa(r);if(c<=0){const l=r.ownerDocument,d=l.body,h=getComputedStyle(d),g=l.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-g);p<=Vd&&(i-=p)}else c<=Vd&&(i+=c);return{width:i,height:s,x:a,y:u}}function Y2(e,t){const n=uo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wr(e)?No(e):Gn(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 Wd(e,t,n){let r;if(t==="viewport")r=W2(e,n);else if(t==="document")r=V2(Jn(e));else if(Tn(t))r=Y2(t,n);else{const o=jh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return js(r)}function Gh(e,t){const n=Ur(e);return n===t||!Tn(n)||$o(n)?!1:Dn(n).position==="fixed"||Gh(n,t)}function Z2(e,t){const n=t.get(e);if(n)return n;let r=Ei(e,[],!1).filter(a=>Tn(a)&&Go(a)!=="body"),o=null;const i=Dn(e).position==="fixed";let s=i?Ur(e):e;for(;Tn(s)&&!$o(s);){const a=Dn(s),u=il(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||qi(s)&&!u&&Gh(e,s))?r=r.filter(l=>l!==s):o=a,s=Ur(s)}return t.set(e,r),r}function X2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?la(t)?[]:Z2(t,this._c):[].concat(n),r],a=Wd(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let h=1;h<s.length;h++){const g=Wd(t,s[h],o);u=dn(g.top,u),c=Br(g.right,c),l=Br(g.bottom,l),d=dn(g.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function J2(e){const{width:t,height:n}=Hh(e);return{width:t,height:n}}function Q2(e,t,n){const r=wr(t),o=Jn(t),i=n==="fixed",s=uo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Gn(0);function c(){u.x=fa(o)}if(r||!r&&!i)if((Go(t)!=="body"||qi(o))&&(a=da(t)),r){const g=uo(t,!0,i,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?qh(o,a):Gn(0),d=s.left+a.scrollLeft-u.x-l.x,h=s.top+a.scrollTop-u.y-l.y;return{x:d,y:h,width:s.width,height:s.height}}function eu(e){return Dn(e).position==="static"}function Yd(e,t){if(!wr(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jn(e)===n&&(n=n.ownerDocument.body),n}function Vh(e,t){const n=gn(e);if(la(e))return n;if(!wr(e)){let o=Ur(e);for(;o&&!$o(o);){if(Tn(o)&&!eu(o))return o;o=Ur(o)}return n}let r=Yd(e,t);for(;r&&B2(r)&&eu(r);)r=Yd(r,t);return r&&$o(r)&&eu(r)&&!il(r)?n:r||K2(e)||n}const eE=async function(e){const t=this.getOffsetParent||Vh,n=this.getDimensions,r=await n(e.floating);return{reference:Q2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tE(e){return Dn(e).direction==="rtl"}const Wh={convertOffsetParentRelativeRectToViewportRelativeRect:q2,getDocumentElement:Jn,getClippingRect:X2,getOffsetParent:Vh,getElementRects:eE,getClientRects:G2,getDimensions:J2,getScale:No,isElement:Tn,isRTL:tE};function Yh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nE(e,t){let n=null,r;const o=Jn(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:h,height:g}=c;if(a||t(),!h||!g)return;const p=bs(d),m=bs(o.clientWidth-(l+h)),b=bs(o.clientHeight-(d+g)),v=bs(l),x={rootMargin:-p+"px "+-m+"px "+-b+"px "+-v+"px",threshold:dn(0,Br(1,u))||1};let E=!0;function C(k){const O=k[0].intersectionRatio;if(O!==u){if(!E)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!Yh(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function rE(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=al(e),l=o||i?[...c?Ei(c):[],...t?Ei(t):[]]:[];l.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?nE(c,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),c&&!u&&g.observe(c),t&&g.observe(t));let p,m=u?uo(e):null;u&&b();function b(){const v=uo(e);m&&!Yh(m,v)&&n(),m=v,p=requestAnimationFrame(b)}return n(),()=>{var v;l.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=g)==null||v.disconnect(),g=null,u&&cancelAnimationFrame(p)}}const oE=$2,iE=P2,sE=R2,aE=F2,uE=N2,cE=O2,lE=(e,t,n)=>{const r=new Map,o={platform:Wh,...n},i={...o.platform,_c:r};return I2(e,t,{...o,platform:i})};var dE=B('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),ul=ct();function cl(){const e=it(ul);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var Tc=30,Zd=Tc/2,fE={top:180,right:-90,bottom:0,left:90};function _r(e){const t=cl(),n=ve({size:Tc},e),[r,o]=ce(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=gE(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*(Tc/r.size),d=()=>`rotate(${fE[i()]} ${Zd} ${Zd}) translate(0 2)`;return f(Te,q({as:"div",ref(h){var g=Je(t.setArrowRef,r.ref);typeof g=="function"&&g(h)},"aria-hidden":"true",get style(){return mn({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 h=dE(),g=h.firstChild,p=g.firstChild;return p.nextSibling,Ie(()=>We(g,"transform",d())),h}}))}function gE(e){const[t,n]=N();return ie(()=>{const r=e();r&&n(Qc(r).getComputedStyle(r))}),t}function pE(e){const t=cl(),[n,r]=ce(e,["ref","style"]);return f(Te,q({as:"div",ref(o){var i=Je(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return mn({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Xd(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 hE(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Xd(r):e?e.getBoundingClientRect():Xd()}}}function mE(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var bE={top:"bottom",right:"left",bottom:"top",left:"right"};function yE(e,t){const[n,r]=e.split("-"),o=bE[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 vE(e){const t=ve({getAnchorRect:h=>h?.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]=N(),[o,i]=N(),[s,a]=N(t.placement),u=()=>hE(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Gr();async function l(){const h=u(),g=n(),p=o();if(!h||!g)return;const m=(p?.clientHeight||0)/2,b=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;g.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();const v=[oE(({placement:k})=>{const O=!!k.split("-")[1];return{mainAxis:b,crossAxis:O?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const k=typeof t.flip=="string"?t.flip.split(" "):void 0;if(k!==void 0&&!k.every(mE))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(sE({padding:t.overflowPadding,fallbackPlacements:k}))}(t.slide||t.overlap)&&v.push(iE({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(aE({padding:t.overflowPadding,apply({availableWidth:k,availableHeight:O,rects:S}){const D=Math.round(S.reference.width);k=Math.floor(k),O=Math.floor(O),g.style.setProperty("--kb-popper-anchor-width",`${D}px`),g.style.setProperty("--kb-popper-content-available-width",`${k}px`),g.style.setProperty("--kb-popper-content-available-height",`${O}px`),t.sameWidth&&(g.style.width=`${D}px`),t.fitViewport&&(g.style.maxWidth=`${k}px`,g.style.maxHeight=`${O}px`)}})),t.hideWhenDetached&&v.push(uE({padding:t.detachedPadding})),p&&v.push(cE({element:p,padding:t.arrowPadding}));const y=await lE(h,g,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...Wh,isRTL:()=>c()==="rtl"}});if(a(y.placement),t.onCurrentPlacementChange?.(y.placement),!g)return;g.style.setProperty("--kb-popper-content-transform-origin",yE(y.placement,c()));const x=Math.round(y.x),E=Math.round(y.y);let C;if(t.hideWhenDetached&&(C=y.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(g.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${E}px, 0)`,visibility:C}),p&&y.middlewareData.arrow){const{x:k,y:O}=y.middlewareData.arrow,S=y.placement.split("-")[0];Object.assign(p.style,{left:k!=null?`${k}px`:"",top:O!=null?`${O}px`:"",[S]:"100%"})}}ie(()=>{const h=u(),g=n();if(!h||!g)return;const p=rE(h,g,l,{elementResize:typeof ResizeObserver=="function"});ae(p)}),ie(()=>{const h=n(),g=t.contentRef?.();!h||!g||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(g).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return f(ul.Provider,{value:d,get children(){return t.children}})}var Vr=Object.assign(vE,{Arrow:_r,Context:ul,usePopperContext:cl,Positioner:pE});function Zh(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Ao(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Ao(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Ao(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Ao(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Ao(u)||L_(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=Zh({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 xE(e,t=[]){return se(()=>{const n=Zh({dataSource:X(e.dataSource),getKey:X(e.getKey),getTextValue:X(e.getTextValue),getDisabled:X(e.getDisabled),getSectionChildren:X(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}function Gi(e){const[t,n]=N(e.defaultValue?.()),r=se(()=>e.value?.()!==void 0),o=se(()=>r()?e.value?.():t());return[o,s=>{bt(()=>{const a=A_(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Xh(e){const[t,n]=Gi(e);return[()=>t()??!1,n]}function wE(e){const[t,n]=Gi(e);return[()=>t()??[],n]}var zn=class Jh extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Jh?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function _E(e){const[t,n]=Gi(e);return[()=>t()??new zn,n]}function Qh(e){return B_()?e.altKey:e.ctrlKey}function To(e){return Hi()?e.metaKey:e.ctrlKey}function Jd(e){return new zn(e)}function em(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function EE(e){const t=ve({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=N(!1),[o,i]=N(),s=se(()=>{const m=X(t.selectedKeys);return m!=null?Jd(m):m}),a=se(()=>{const m=X(t.defaultSelectedKeys);return m!=null?Jd(m):new zn}),[u,c]=_E({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[l,d]=N(X(t.selectionBehavior)),h=()=>X(t.selectionMode),g=()=>X(t.disallowEmptySelection)??!1,p=m=>{(X(t.allowDuplicateSelectionEvents)||!em(m,u()))&&c(m)};return ie(()=>{const m=u();X(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),ie(()=>{d(X(t.selectionBehavior)??"toggle")}),{selectionMode:h,disallowEmptySelection:g,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:p}}function tm(e){const[t,n]=N(""),[r,o]=N(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(X(e.isDisabled))return;const a=X(e.keyboardDelegate),u=X(e.selectionManager);if(!a.getKeyForSearch)return;const c=CE(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(h=>h+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&SE(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 CE(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function SE(e){return e.split("").every(t=>t===e[0])}function kE(e,t,n){const o=q({selectOnFocus:()=>X(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>n?.()??t(),{direction:s}=Gr();let a={top:0,left:0};I_(()=>X(o.isVirtualized)?void 0:i(),"scroll",()=>{const b=i();b&&(a={top:b.scrollTop,left:b.scrollLeft})});const{typeSelectHandlers:u}=tm({isDisabled:()=>X(o.disallowTypeAhead),keyboardDelegate:()=>X(o.keyboardDelegate),selectionManager:()=>X(o.selectionManager)}),c=()=>X(o.orientation)??"vertical",l=b=>{Ee(b,u.onKeyDown),b.altKey&&b.key==="Tab"&&b.preventDefault();const v=t();if(!v?.contains(b.target))return;const y=X(o.selectionManager),x=X(o.selectOnFocus),E=S=>{S!=null&&(y.setFocusedKey(S),b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&!Qh(b)&&y.replaceSelection(S))},C=X(o.keyboardDelegate),k=X(o.shouldFocusWrap),O=y.focusedKey();switch(b.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){b.preventDefault();let S;O!=null?S=C.getKeyBelow(O):S=C.getFirstKey?.(),S==null&&k&&(S=C.getFirstKey?.(O)),E(S)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){b.preventDefault();let S;O!=null?S=C.getKeyAbove(O):S=C.getLastKey?.(),S==null&&k&&(S=C.getLastKey?.(O)),E(S)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){b.preventDefault();const S=s()==="rtl";let D;O!=null?D=C.getKeyLeftOf(O):D=S?C.getFirstKey?.():C.getLastKey?.(),E(D)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){b.preventDefault();const S=s()==="rtl";let D;O!=null?D=C.getKeyRightOf(O):D=S?C.getLastKey?.():C.getFirstKey?.(),E(D)}break}case"Home":if(C.getFirstKey){b.preventDefault();const S=C.getFirstKey(O,To(b));S!=null&&(y.setFocusedKey(S),To(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&y.replaceSelection(S))}break;case"End":if(C.getLastKey){b.preventDefault();const S=C.getLastKey(O,To(b));S!=null&&(y.setFocusedKey(S),To(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(S):x&&y.replaceSelection(S))}break;case"PageDown":if(C.getKeyPageBelow&&O!=null){b.preventDefault();const S=C.getKeyPageBelow(O);E(S)}break;case"PageUp":if(C.getKeyPageAbove&&O!=null){b.preventDefault();const S=C.getKeyPageAbove(O);E(S)}break;case"a":To(b)&&y.selectionMode()==="multiple"&&X(o.disallowSelectAll)!==!0&&(b.preventDefault(),y.selectAll());break;case"Escape":b.defaultPrevented||(b.preventDefault(),X(o.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!X(o.allowsTabNavigation)){if(b.shiftKey)v.focus();else{const S=X_(v,{tabbable:!0});let D,M;do M=S.lastChild(),M&&(D=M);while(M);D&&!D.contains(document.activeElement)&&xt(D)}break}}},d=b=>{const v=X(o.selectionManager),y=X(o.keyboardDelegate),x=X(o.selectOnFocus);if(v.isFocused()){b.currentTarget.contains(b.target)||v.setFocused(!1);return}if(b.currentTarget.contains(b.target)){if(v.setFocused(!0),v.focusedKey()==null){const E=k=>{k!=null&&(v.setFocusedKey(k),x&&v.replaceSelection(k))},C=b.relatedTarget;C&&b.currentTarget.compareDocumentPosition(C)&Node.DOCUMENT_POSITION_FOLLOWING?E(v.lastSelectedKey()??y.getLastKey?.()):E(v.firstSelectedKey()??y.getFirstKey?.())}else if(!X(o.isVirtualized)){const E=i();if(E){E.scrollTop=a.top,E.scrollLeft=a.left;const C=E.querySelector(`[data-key="${v.focusedKey()}"]`);C&&(xt(C),Ec(E,C))}}}},h=b=>{const v=X(o.selectionManager);b.currentTarget.contains(b.relatedTarget)||v.setFocused(!1)},g=b=>{i()===b.target&&b.preventDefault()},p=()=>{const b=X(o.autoFocus);if(!b)return;const v=X(o.selectionManager),y=X(o.keyboardDelegate);let x;b==="first"&&(x=y.getFirstKey?.()),b==="last"&&(x=y.getLastKey?.());const E=v.selectedKeys();E.size&&(x=E.values().next().value),v.setFocused(!0),v.setFocusedKey(x);const C=t();C&&x==null&&!X(o.shouldUseVirtualFocus)&&xt(C)};return wn(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),ie(mt([i,()=>X(o.isVirtualized),()=>X(o.selectionManager).focusedKey()],b=>{const[v,y,x]=b;if(y)x&&o.scrollToKey?.(x);else if(x&&v){const E=v.querySelector(`[data-key="${x}"]`);E&&Ec(v,E)}})),{tabIndex:se(()=>{if(!X(o.shouldUseVirtualFocus))return X(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:g,onFocusIn:d,onFocusOut:h}}function ll(e,t){const n=()=>X(e.selectionManager),r=()=>X(e.key),o=()=>X(e.shouldUseVirtualFocus),i=y=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):y?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||To(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>X(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=y=>{u()&&(c=y.pointerType,y.pointerType==="mouse"&&y.button===0&&!X(e.shouldSelectOnPressUp)&&i(y))},d=y=>{u()&&y.pointerType==="mouse"&&y.button===0&&X(e.shouldSelectOnPressUp)&&X(e.allowsDifferentPressOrigin)&&i(y)},h=y=>{u()&&(X(e.shouldSelectOnPressUp)&&!X(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(y)},g=y=>{!u()||!["Enter"," "].includes(y.key)||(Qh(y)?n().toggleSelection(r()):i(y))},p=y=>{a()&&y.preventDefault()},m=y=>{const x=t();o()||a()||!x||y.target===x&&n().setFocusedKey(r())},b=se(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),v=se(()=>X(e.virtualized)?void 0:r());return ie(mt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([y,x,E,C,k])=>{y&&x===C&&k&&!E&&document.activeElement!==y&&(e.focus?e.focus():xt(y))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:b,dataKey:v,onPointerDown:l,onPointerUp:d,onClick:h,onKeyDown:g,onMouseDown:p,onFocus:m}}var AE=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}},Qd=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 dl(e){const t=EE(e),r=xE({dataSource:()=>X(e.dataSource),getKey:()=>X(e.getKey),getTextValue:()=>X(e.getTextValue),getDisabled:()=>X(e.getDisabled),getSectionChildren:()=>X(e.getSectionChildren),factory:i=>e.filter?new Qd(e.filter(i)):new Qd(i)},[()=>e.filter]),o=new AE(r,t);return cc(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var nm=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 rm(e,t,n){const r=Fh({usage:"search",sensitivity:"base"}),o=se(()=>{const i=X(e.keyboardDelegate);return i||new nm(e.collection,t,r)});return kE({selectionManager:()=>X(e.selectionManager),keyboardDelegate:o,autoFocus:()=>X(e.autoFocus),deferAutoFocus:()=>X(e.deferAutoFocus),shouldFocusWrap:()=>X(e.shouldFocusWrap),disallowEmptySelection:()=>X(e.disallowEmptySelection),selectOnFocus:()=>X(e.selectOnFocus),disallowTypeAhead:()=>X(e.disallowTypeAhead),shouldUseVirtualFocus:()=>X(e.shouldUseVirtualFocus),allowsTabNavigation:()=>X(e.allowsTabNavigation),isVirtualized:()=>X(e.isVirtualized),scrollToKey:i=>X(e.scrollToKey)?.(i),orientation:()=>X(e.orientation)},t,n)}var om=ct();function im(){return it(om)}function TE(){const e=im();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function sm(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function DE(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&&sm(o,n))return r+1}return 0}function IE(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:sm(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function am(e,t){const n=IE(e);e!==n&&t(n)}function OE(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 tn(r).body}function RE(e,t){ie(()=>{const n=setTimeout(()=>{am(e(),t)});ae(()=>clearTimeout(n))})}function NE(e,t){if(typeof IntersectionObserver!="function"){RE(e,t);return}let n=[];ie(()=>{const r=()=>{const s=!!n.length;n=e(),s&&am(e(),t)},o=OE(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ae(()=>i.disconnect())})}function ME(e={}){const[t,n]=wE({value:()=>X(e.items),onChange:i=>e.onItemsChange?.(i)});NE(t,n);const r=i=>(n(s=>{const a=DE(s,i);return M_(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>f(om.Provider,{value:{registerItem:r},get children(){return i.children}})}}function LE(e){const t=TE(),n=ve({shouldRegisterItem:!0},e);ie(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ae(r)})}var Ci="data-kb-top-layer",um,Dc=!1,Vn=[];function Si(e){return Vn.findIndex(t=>t.node===e)}function $E(e){return Vn[Si(e)]}function PE(e){return Vn.length>0&&Vn[Vn.length-1].node===e}function cm(){return Vn.filter(e=>e.isPointerBlocking)}function FE(){return[...cm()].slice(-1)[0]}function fl(){return cm().length>0}function lm(e){const t=Si(FE()?.node);return Si(e)<t}function BE(e){Vn.push(e)}function zE(e){const t=Si(e);t<0||Vn.splice(t,1)}function UE(){for(const{node:e}of Vn)e.style.pointerEvents=lm(e)?"none":"auto"}function KE(e){if(fl()&&!Dc){const t=tn(e);um=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Dc=!0}}function HE(e){if(fl())return;const t=tn(e);t.body.style.pointerEvents=um,t.body.style.length===0&&t.body.removeAttribute("style"),Dc=!1}var ln={layers:Vn,isTopMostLayer:PE,hasPointerBlockingLayer:fl,isBelowPointerBlockingLayer:lm,addLayer:BE,removeLayer:zE,indexOf:Si,find:$E,assignPointerEventToLayers:UE,disableBodyPointerEvents:KE,restoreBodyPointerEvents:HE},tu="focusScope.autoFocusOnMount",nu="focusScope.autoFocusOnUnmount",ef={bubbles:!1,cancelable:!0},tf={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=_c(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=_c(this.stack,e),this.active()?.resume()}};function ga(e,t){const[n,r]=N(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),u=()=>tn(t()),c=()=>{const p=u().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,aa),p},l=()=>{const p=t();return p?Dh(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const p=l();return p.length>0?p[0]:null},h=()=>{const p=l();return p.length>0?p[p.length-1]:null},g=()=>{const p=t();if(!p)return!1;const m=ui(p);return!m||Nt(p,m)?!1:Ih(m)};ie(()=>{const p=t();if(!p)return;tf.add(o);const m=ui(p);if(!Nt(p,m)){const v=new CustomEvent(tu,ef);p.addEventListener(tu,s),p.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{xt(d()),ui(p)===m&&xt(p)},0)}ae(()=>{p.removeEventListener(tu,s),setTimeout(()=>{const v=new CustomEvent(nu,ef);g()&&v.preventDefault(),p.addEventListener(nu,a),p.dispatchEvent(v),v.defaultPrevented||xt(m??u().body),p.removeEventListener(nu,a),tf.remove(o)},0)})}),ie(()=>{const p=t();if(!p||!X(e.trapFocus)||n())return;const m=v=>{const y=v.target;y?.closest(`[${Ci}]`)||(Nt(p,y)?i=y:xt(i))},b=v=>{const x=v.relatedTarget??ui(p);x?.closest(`[${Ci}]`)||Nt(p,x)||xt(i)};u().addEventListener("focusin",m),u().addEventListener("focusout",b),ae(()=>{u().removeEventListener("focusin",m),u().removeEventListener("focusout",b)})}),ie(()=>{const p=t();if(!p||!X(e.trapFocus)||n())return;const m=c();p.insertAdjacentElement("afterbegin",m);const b=c();p.insertAdjacentElement("beforeend",b);function v(x){const E=d(),C=h();x.relatedTarget===E?xt(C):xt(E)}m.addEventListener("focusin",v),b.addEventListener("focusin",v);const y=new MutationObserver(x=>{for(const E of x)E.previousSibling===b&&(b.remove(),p.insertAdjacentElement("beforeend",b)),E.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});y.observe(p,{childList:!0,subtree:!1}),ae(()=>{m.removeEventListener("focusin",v),b.removeEventListener("focusin",v),m.remove(),b.remove(),y.disconnect()})})}var jE="data-live-announcer";function pa(e){ie(()=>{X(e.isDisabled)||ae(qE(X(e.targets),X(e.root)))})}var ni=new WeakMap,vn=[];function qE(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const h of u.querySelectorAll(`[${jE}], [${Ci}]`))n.add(h);const c=h=>{if(n.has(h)||h.parentElement&&r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const g of n)if(h.contains(g))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 h=l.nextNode();for(;h!=null;)i(h),h=l.nextNode()}},i=u=>{const c=ni.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),ni.set(u,c+1))};vn.length&&vn[vn.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 vn.push(a),()=>{s.disconnect();for(const u of r){const c=ni.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),ni.delete(u)):ni.set(u,c-1)}a===vn[vn.length-1]?(vn.pop(),vn.length&&vn[vn.length-1].observe()):vn.splice(vn.indexOf(a),1)}}function GE(e){const t=n=>{n.key===sa.Escape&&e.onEscapeKeyDown?.(n)};ie(()=>{if(X(e.isDisabled))return;const n=e.ownerDocument?.()??tn();n.addEventListener("keydown",t),ae(()=>{n.removeEventListener("keydown",t)})})}var nf="interactOutside.pointerDownOutside",rf="interactOutside.focusOutside";function VE(e,t){let n,r=Q_;const o=()=>tn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const h=d.target;return!(h instanceof Element)||h.closest(`[${Ci}]`)||!Nt(o(),h)||Nt(t(),h)?!1:!e.shouldExcludeElement?.(h)},c=d=>{function h(){const g=t(),p=d.target;if(!g||!p||!u(d))return;const m=dt([i,a]);p.addEventListener(nf,m,{once:!0});const b=new CustomEvent(nf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||K_(d)&&d.button===0}});p.dispatchEvent(b)}d.pointerType==="touch"?(o().removeEventListener("click",h),r=h,o().addEventListener("click",h,{once:!0})):h()},l=d=>{const h=t(),g=d.target;if(!h||!g||!u(d))return;const p=dt([s,a]);g.addEventListener(rf,p,{once:!0});const m=new CustomEvent(rf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});g.dispatchEvent(m)};ie(()=>{X(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),ae(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var dm=ct();function WE(){return it(dm)}function Vi(e){let t;const n=WE(),[r,o]=ce(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const h=n?.registerNestedLayer(d);return()=>{i.delete(d),h?.()}};VE({shouldExcludeElement:d=>t?r.excludedElements?.some(h=>Nt(h(),d))||[...i].some(h=>Nt(h,d)):!1,onPointerDownOutside:d=>{!t||ln.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!ln.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),GE({ownerDocument:()=>tn(t),onEscapeKeyDown:d=>{!t||!ln.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),wn(()=>{if(!t)return;ln.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);ln.assignPointerEventToLayers(),ln.disableBodyPointerEvents(t),ae(()=>{t&&(ln.removeLayer(t),d?.(),ln.assignPointerEventToLayers(),ln.restoreBodyPointerEvents(t))})}),ie(mt([()=>t,()=>r.disableOutsidePointerEvents],([d,h])=>{if(!d)return;const g=ln.find(d);g&&g.isPointerBlocking!==h&&(g.isPointerBlocking=h,ln.assignPointerEventToLayers()),h&&ln.disableBodyPointerEvents(d),ae(()=>{ln.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return f(dm.Provider,{value:l,get children(){return f(Te,q({as:"div",ref(d){var h=Je(g=>t=g,r.ref);typeof h=="function"&&h(d)}},o))}})}function ho(e={}){const[t,n]=Xh({value:()=>X(e.open),defaultValue:()=>!!X(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function fm(e={}){const[t,n]=Xh({value:()=>X(e.isSelected),defaultValue:()=>!!X(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(i)},toggle:()=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(!t())}}}function ft(e){return t=>(e(t),()=>e(void 0))}var Kt=e=>typeof e=="function"?e():e,Ic=(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},ys=new Map,YE=e=>{ie(()=>{const t=Kt(e.style)??{},n=Kt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=ys.get(e.key);o?o.activeCount++:ys.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ae(()=>{const i=ys.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}ys.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?.()}})})},of=YE,ZE=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},XE=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},JE=(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]=ZE(o,t),d=l-u-r*c;(c!==0||d!==0)&&XE(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[sf,af]=N([]),QE=e=>sf().indexOf(e)===sf().length-1,eC=e=>{const t=q({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=It();let r=[0,0],o=null,i=null;ie(()=>{Kt(t.enabled)&&(af(c=>[...c,n]),ae(()=>{af(c=>c.filter(l=>l!==n))}))}),ie(()=>{if(!Kt(t.enabled)||!Kt(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Kt(t.preventScrollbarShift)){const d={overflow:"hidden"},h=[];l>0&&(Kt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,h.push({key:"--scrollbar-width",value:`${l}px`}));const g=window.scrollY,p=window.scrollX;of({key:"prevent-scroll",element:c,style:d,properties:h,cleanup:()=>{Kt(t.restoreScrollPosition)&&l>0&&window.scrollTo(p,g)}})}else of({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),ie(()=>{!QE(n)||!Kt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ae(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=uf(c),o=null,i=null},a=c=>{const l=c.target,d=Kt(t.element),h=tC(c),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y",p=g==="x"?h[0]:h[1],m=cf(l,g,p,d);let b;d&&Ic(d,l)?b=!m:b=!0,b&&c.cancelable&&c.preventDefault()},u=c=>{const l=Kt(t.element),d=c.target;let h;if(c.touches.length===2)h=!Kt(t.allowPinchZoom);else{if(o==null||i===null){const g=uf(c).map((m,b)=>r[b]-m),p=Math.abs(g[0])>Math.abs(g[1])?"x":"y";o=p,i=p==="x"?g[0]:g[1]}if(d.type==="range")h=!1;else{const g=cf(d,o,i,l);l&&Ic(l,d)?h=!g:h=!0}}h&&c.cancelable&&c.preventDefault()}},tC=e=>[e.deltaX,e.deltaY],uf=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],cf=(e,t,n,r)=>{const o=r!==null&&Ic(r,e),[i,s]=JE(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},nC=eC,ha=nC,rC=e=>{const t=se(()=>{const s=Kt(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=N(Kt(e.show)?"present":"hidden");let i="none";return ie(s=>{const a=Kt(e.show);return bt(()=>{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}),ie(()=>{const s=Kt(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ae(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},oC=rC,Wn=oC,iC=ct();function ma(){return it(iC)}var sC=ct();function gm(){return it(sC)}var pm=ct();function hm(){return it(pm)}function Er(){const e=hm();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var mm=ct();function gl(){const e=it(mm);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var bm=ct();function Qn(){const e=it(bm);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function pl(e){let t;const n=Qn(),r=Er(),o=ve({id:n.generateId(`item-${It()}`)},e),[i,s]=ce(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=N(),[c,l]=N(),[d,h]=N(),g=()=>r.listState().selectionManager(),p=()=>s.id,m=()=>g().focusedKey()===p(),b=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};LE({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const v=ll({key:p,selectionManager:g,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),y=D=>{Ee(D,i.onPointerMove),D.pointerType==="mouse"&&(i.disabled?r.onItemLeave(D):(r.onItemEnter(D),D.defaultPrevented||(xt(D.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},x=D=>{Ee(D,i.onPointerLeave),D.pointerType==="mouse"&&r.onItemLeave(D)},E=D=>{Ee(D,i.onPointerUp),!i.disabled&&D.button===0&&b()},C=D=>{if(Ee(D,i.onKeyDown),!D.repeat&&!i.disabled)switch(D.key){case"Enter":case" ":b();break}},k=se(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),O=se(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":m()?"":void 0})),S={isChecked:()=>i.checked,dataset:O,setLabelRef:h,generateId:nn(()=>s.id),registerLabel:ft(u),registerDescription:ft(l)};return f(mm.Provider,{value:S,get children(){return f(Te,q({as:"div",ref(D){var M=Je(z=>t=z,i.ref);typeof M=="function"&&M(D)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return dt([i.onPointerDown,v.onPointerDown])},get onPointerUp(){return dt([E,v.onPointerUp])},get onClick(){return dt([i.onClick,v.onClick])},get onKeyDown(){return dt([C,v.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,v.onMouseDown])},get onFocus(){return dt([i.onFocus,v.onFocus])},onPointerMove:y,onPointerLeave:x},O,s))}})}function ym(e){const t=ve({closeOnSelect:!1},e),[n,r]=ce(t,["checked","defaultChecked","onChange","onSelect"]),o=fm({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return f(pl,q({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var ki={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>ki.next(e==="ltr"?"rtl":"ltr",t)},lf={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function vm(e){const t=Qn(),n=Er(),r=ma(),{direction:o}=Gr(),i=ve({id:t.generateId("trigger")},e),[s,a]=ce(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=ua(()=>n.triggerRef(),()=>"button"),l=se(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);ie(mt(()=>r?.value(),v=>{l()&&v===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)},h=v=>{Ee(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},g=v=>{Ee(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},p=v=>{if(Ee(v,s.onKeyDown),!s.disabled){if(l())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case lf.first(t.orientation()):v.stopPropagation(),v.preventDefault(),t2(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case lf.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case ki.next(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case ki.previous(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{Ee(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},b=v=>{Ee(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return ie(()=>ae(n.registerTriggerId(s.id))),f(Xn,q({ref(v){var y=Je(n.setTriggerRef,s.ref);typeof y=="function"&&y(v)},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 te(()=>!!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:h,onMouseOver:m,onClick:g,onKeyDown:p,onFocus:b,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function xm(e){let t;const n=Qn(),r=Er(),o=ma(),i=gm(),{direction:s}=Gr(),a=ve({id:n.generateId(`content-${It()}`)},e),[u,c]=ce(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(),h=rm({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);ga({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const g=x=>{if(Nt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case ki.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case ki.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},m=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},b=x=>{Ee(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=x=>{if(Ee(x,u.onPointerMove),x.pointerType!=="mouse")return;const E=x.target,C=l!==x.clientX;Nt(x.currentTarget,E)&&C&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};ie(()=>ae(r.registerContentId(u.id))),ae(()=>r.setContentRef(void 0));const y={ref:Je(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return h.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:dt([u.onKeyDown,h.onKeyDown,g]),onMouseDown:dt([u.onMouseDown,h.onMouseDown]),onFocusIn:dt([u.onFocusIn,h.onFocusIn]),onFocusOut:dt([u.onFocusOut,h.onFocusOut]),onPointerEnter:b,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return f(W,{get when(){return r.contentPresent()},get children(){return f(W,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return f(Te,q({as:"div"},()=>r.dataset(),y,c))},get children(){return f(Vr.Positioner,{get children(){return f(Vi,q({get disableOutsidePointerEvents(){return te(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return mn({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:p,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function aC(e){let t;const n=Qn(),r=Er(),[o,i]=ce(e,["ref"]);return ha({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),f(xm,q({ref(s){var a=Je(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var wm=ct();function uC(){const e=it(wm);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function hl(e){const t=Qn(),n=ve({id:t.generateId(`group-${It()}`)},e),[r,o]=N(),i={generateId:nn(()=>n.id),registerLabelId:ft(o)};return f(wm.Provider,{value:i,get children(){return f(Te,q({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function _m(e){const t=uC(),n=ve({id:t.generateId("label")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerLabelId(r.id))),f(Te,q({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Em(e){const t=Er(),n=ve({children:"▼"},e);return f(Te,q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Cm(e){return f(pl,q({role:"menuitem",closeOnSelect:!0},e))}function Sm(e){const t=gl(),n=ve({id:t.generateId("description")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerDescription(r.id))),f(Te,q({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function km(e){const t=gl(),n=ve({id:t.generateId("indicator")},e),[r,o]=ce(n,["forceMount"]);return f(W,{get when(){return r.forceMount||t.isChecked()},get children(){return f(Te,q({as:"div"},()=>t.dataset(),o))}})}function Am(e){const t=gl(),n=ve({id:t.generateId("label")},e),[r,o]=ce(n,["ref","id"]);return ie(()=>ae(t.registerLabel(r.id))),f(Te,q({as:"div",ref(i){var s=Je(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function Tm(e){const t=Er();return f(W,{get when(){return t.contentPresent()},get children(){return f(Pi,e)}})}var Dm=ct();function cC(){const e=it(Dm);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Im(e){const n=Qn().generateId(`radiogroup-${It()}`),r=ve({id:n},e),[o,i]=ce(r,["value","defaultValue","onChange","disabled"]),[s,a]=Gi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return f(Dm.Provider,{value:u,get children(){return f(hl,i)}})}function Om(e){const t=cC(),n=ve({closeOnSelect:!1},e),[r,o]=ce(n,["value","onSelect"]);return f(pl,q({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function lC(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 dC(e,t){return t?Oh([e.clientX,e.clientY],t):!1}function Rm(e){const t=Qn(),n=im(),r=hm(),o=ma(),i=gm(),s=ve({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=ce(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[h,g]=N(),[p,m]=N(),[b,v]=N(),[y,x]=N(),[E,C]=N(!0),[k,O]=N(u.placement),[S,D]=N([]),[M,z]=N([]),{DomCollectionProvider:K}=ME({items:M,onItemsChange:z}),j=ho({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:Q=>a.onOpenChange?.(Q)}),{present:T}=Wn({show:()=>t.forceMount()||j.isOpen(),element:()=>y()??null}),R=dl({selectionMode:"none",dataSource:M}),A=Q=>{C(Q),j.open()},I=(Q=!1)=>{j.close(),Q&&r&&r.close(!0)},F=Q=>{C(Q),j.toggle()},$=()=>{const Q=y();Q&&(xt(Q),R.selectionManager().setFocused(!0),R.selectionManager().setFocusedKey(void 0))},U=()=>{i!=null?setTimeout(()=>$()):$()},G=Q=>{D(Oe=>[...Oe,Q]);const Ce=r?.registerNestedMenu(Q);return()=>{D(Oe=>_c(Oe,Q)),Ce?.()}},P=Q=>d===l?.side&&dC(Q,l?.area),Z=Q=>{P(Q)&&Q.preventDefault()},V=Q=>{P(Q)||U()},Y=Q=>{P(Q)&&Q.preventDefault()};pa({isDisabled:()=>!(r==null&&j.isOpen()&&t.isModal()),targets:()=>[y(),...S()].filter(Boolean)}),ie(()=>{const Q=y();if(!Q||!r)return;const Ce=r.registerNestedMenu(Q);ae(()=>{Ce()})}),ie(()=>{r===void 0&&o?.registerMenu(t.value(),[y(),...S()])}),ie(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(b()?.focus(),o.autoFocusMenu()&&A(!0)):I())}),ie(()=>{r!==void 0||o===void 0||j.isOpen()&&o.setValue(t.value())}),ae(()=>{r===void 0&&o?.unregisterMenu(t.value())});const re={dataset:se(()=>({"data-expanded":j.isOpen()?"":void 0,"data-closed":j.isOpen()?void 0:""})),isOpen:j.isOpen,contentPresent:T,nestedMenus:S,currentPlacement:k,pointerGraceTimeoutId:()=>c,autoFocus:E,listState:()=>R,parentMenuContext:()=>r,triggerRef:b,contentRef:y,triggerId:h,contentId:p,setTriggerRef:v,setContentRef:x,open:A,close:I,toggle:F,focusContent:U,onItemEnter:Z,onItemLeave:V,onTriggerLeave:Y,setPointerDir:Q=>d=Q,setPointerGraceTimeoutId:Q=>c=Q,setPointerGraceIntent:Q=>l=Q,registerNestedMenu:G,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:ft(g),registerContentId:ft(m)};return f(K,{get children(){return f(pm.Provider,{value:re,get children(){return f(W,{when:i===void 0,get fallback(){return u.children},get children(){return f(Vr,q({anchorRef:b,contentRef:y,onCurrentPlacementChange:O},u))}})}})}})}function Nm(e){const{direction:t}=Gr();return f(Rm,q({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var fC={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Mm(e){const t=Er(),n=Qn(),[r,o]=ce(e,["onFocusOutside","onKeyDown"]),{direction:i}=Gr();return f(xm,q({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Nt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{Ee(l,r.onKeyDown);const d=Nt(l.currentTarget,l.target),h=fC.close(i(),n.orientation()).includes(l.key),g=t.parentMenuContext()!=null;d&&h&&g&&(t.close(),xt(t.triggerRef()))}},o))}var df=["Enter"," "],gC={open:(e,t)=>e==="ltr"?[...df,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...df,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Lm(e){let t;const n=Qn(),r=Er(),o=ve({id:n.generateId(`sub-trigger-${It()}`)},e),[i,s]=ce(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}=Gr(),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()},h=()=>r.listState().collection(),g=()=>d().focusedKey()===l(),p=ll({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),m=x=>{Ee(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},b=x=>{if(Ee(x,i.onPointerMove),x.pointerType!=="mouse")return;const E=r.parentMenuContext();if(E?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){E?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),E?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),xt(x.currentTarget),E?.listState().selectionManager().setFocused(!0),E?.listState().selectionManager().setFocusedKey(l()))}},v=x=>{if(Ee(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const E=r.parentMenuContext(),C=r.contentRef();if(C){E?.setPointerGraceIntent({area:lC(r.currentPlacement(),x,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(E?.pointerGraceTimeoutId());const k=window.setTimeout(()=>{E?.setPointerGraceIntent(null)},300);E?.setPointerGraceTimeoutId(k)}else{if(E?.onTriggerLeave(x),x.defaultPrevented)return;E?.setPointerGraceIntent(null)}E?.onItemLeave(x)},y=x=>{Ee(x,i.onKeyDown),!x.repeat&&(i.disabled||gC.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(h().getFirstKey())))};return ie(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ae(x)}),ie(mt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{ae(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),ie(()=>ae(r.registerTriggerId(i.id))),ae(()=>{u()}),f(Te,q({as:"div",ref(x){var E=Je(C=>{r.setTriggerRef(C),t=C},i.ref);typeof E=="function"&&E(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return te(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return g()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return dt([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return dt([i.onPointerUp,p.onPointerUp])},get onClick(){return dt([m,p.onClick])},get onKeyDown(){return dt([y,p.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,p.onMouseDown])},get onFocus(){return dt([i.onFocus,p.onFocus])},onPointerMove:b,onPointerLeave:v},()=>r.dataset(),s))}function pC(e){const t=ma(),n=`menu-${It()}`,r=ve({id:n,modal:!0},e),[o,i]=ce(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=ho({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:nn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return f(bm.Provider,{value:a,get children(){return f(Rm,q({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var hC={};En(hC,{Root:()=>ba,Separator:()=>mC});function ba(e){let t;const n=ve({orientation:"horizontal"},e),[r,o]=ce(n,["ref","orientation"]),i=ua(()=>t,()=>"hr");return f(Te,q({as:"hr",ref(s){var a=Je(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 mC=ba,bC={};En(bC,{Arrow:()=>_r,CheckboxItem:()=>ym,Content:()=>$m,DropdownMenu:()=>pn,Group:()=>hl,GroupLabel:()=>_m,Icon:()=>Em,Item:()=>Cm,ItemDescription:()=>Sm,ItemIndicator:()=>km,ItemLabel:()=>Am,Portal:()=>Tm,RadioGroup:()=>Im,RadioItem:()=>Om,Root:()=>Pm,Separator:()=>ba,Sub:()=>Nm,SubContent:()=>Mm,SubTrigger:()=>Lm,Trigger:()=>vm});function $m(e){const t=Qn(),n=Er(),[r,o]=ce(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return f(aC,q({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||xt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function Pm(e){const t=`dropdownmenu-${It()}`,n=ve({id:t},e);return f(pC,n)}var pn=Object.assign(Pm,{Arrow:_r,CheckboxItem:ym,Content:$m,Group:hl,GroupLabel:_m,Icon:Em,Item:Cm,ItemDescription:Sm,ItemIndicator:km,ItemLabel:Am,Portal:Tm,RadioGroup:Im,RadioItem:Om,Separator:ba,Sub:Nm,SubContent:Mm,SubTrigger:Lm,Trigger:vm});const ml=pn.Trigger;pn.Group;const ff=pn.Sub;pn.RadioGroup;const bl=e=>{const t=q({gutter:4,flip:!1},e);return f(pn,t)},yl=e=>{const[t,n]=ce(e,["class"]);return f(pn.Portal,{get children(){return f(pn.Content,q({get class(){return ot("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Nr=e=>{const[t,n]=ce(e,["class","inset"]);return f(pn.Item,q({get class(){return ot("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},gf=e=>{const[t,n]=ce(e,["class","children"]);return f(pn.SubTrigger,q({get class(){return ot("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[te(()=>t.children),f(Qp,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},pf=e=>{const[t,n]=ce(e,["class"]);return f(pn.Portal,{get children(){return f(pn.SubContent,q({get class(){return ot("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible:outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Oc=e=>{const[t,n]=ce(e,["class"]);return f(pn.Separator,q({get class(){return ot("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var yC={};En(yC,{CloseButton:()=>Bm,Content:()=>zm,Description:()=>Um,Dialog:()=>pr,Overlay:()=>Km,Portal:()=>Hm,Root:()=>jm,Title:()=>qm,Trigger:()=>Gm,useDialogContext:()=>Wr});var Fm=ct();function Wr(){const e=it(Fm);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Bm(e){const t=Wr(),[n,r]=ce(e,["aria-label","onClick"]);return f(Xn,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ee(i,n.onClick),t.close()}},r))}function zm(e){let t;const n=Wr(),r=ve({id:n.generateId("content")},e),[o,i]=ce(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=h=>{o.onPointerDownOutside?.(h),n.modal()&&h.detail.isContextMenu&&h.preventDefault()},c=h=>{o.onFocusOutside?.(h),n.modal()&&h.preventDefault()},l=h=>{o.onInteractOutside?.(h),!n.modal()&&(h.defaultPrevented||(s=!0,h.detail.originalEvent.type==="pointerdown"&&(a=!0)),Nt(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&a&&h.preventDefault())},d=h=>{o.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),xt(n.triggerRef())):(h.defaultPrevented||(s||xt(n.triggerRef()),h.preventDefault()),s=!1,a=!1)};return pa({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),ha({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ga({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),ie(()=>ae(n.registerContentId(i.id))),f(W,{get when(){return n.contentPresent()},get children(){return f(Vi,q({ref(h){var g=Je(p=>{n.setContentRef(p),t=p},o.ref);typeof g=="function"&&g(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return te(()=>!!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 Um(e){const t=Wr(),n=ve({id:t.generateId("description")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerDescriptionId(r.id))),f(Te,q({as:"p",get id(){return r.id}},o))}function Km(e){const t=Wr(),[n,r]=ce(e,["ref","style","onPointerDown"]),o=i=>{Ee(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return f(W,{get when(){return t.overlayPresent()},get children(){return f(Te,q({as:"div",ref(i){var s=Je(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return mn({"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 Hm(e){const t=Wr();return f(W,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return f(Pi,e)}})}var hf={dismiss:"Dismiss"};function jm(e){const t=`dialog-${It()}`,n=ve({id:t,modal:!0,translations:hf},e),[r,o]=N(),[i,s]=N(),[a,u]=N(),[c,l]=N(),[d,h]=N(),[g,p]=N(),m=ho({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),b=()=>n.forceMount||m.isOpen(),{present:v}=Wn({show:b,element:()=>c()??null}),{present:y}=Wn({show:b,element:()=>d()??null}),x={translations:()=>n.translations??hf,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:g,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:h,overlayPresent:v,contentPresent:y,close:m.close,toggle:m.toggle,setTriggerRef:p,generateId:nn(()=>n.id),registerContentId:ft(o),registerTitleId:ft(s),registerDescriptionId:ft(u)};return f(Fm.Provider,{value:x,get children(){return n.children}})}function qm(e){const t=Wr(),n=ve({id:t.generateId("title")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerTitleId(r.id))),f(Te,q({as:"h2",get id(){return r.id}},o))}function Gm(e){const t=Wr(),[n,r]=ce(e,["ref","onClick"]);return f(Xn,q({ref(i){var s=Je(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return te(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Ee(i,n.onClick),t.toggle()}},r))}var pr=Object.assign(jm,{CloseButton:Bm,Content:zm,Description:Um,Overlay:Km,Portal:Hm,Title:qm,Trigger:Gm}),vC=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),Vm=B("<div>");const on=pr;pr.Trigger;const yr=e=>{const[t,n]=ce(e,["class","children"]);return f(pr.Portal,{get children(){return[f(pr.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(pr.Content,{get class(){return ot("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[te(()=>t.children),f(pr.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 vC()}})]}})]}})},vr=e=>{const[t,n]=ce(e,["class"]);return f(pr.Title,q({get class(){return ot("text-lg font-semibold text-foreground",t.class)}},n))},ya=e=>{const[t,n]=ce(e,["class"]);return f(pr.Description,q({get class(){return ot(" text-muted-foreground",t.class)}},n))},xr=e=>{const[t,n]=ce(e,["class"]);return(()=>{var r=Vm();return Yn(r,q({get class(){return ot("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Kr=e=>{const[t,n]=ce(e,["class"]);return(()=>{var r=Vm();return Yn(r,q({get class(){return ot("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var xC={};En(xC,{CloseButton:()=>Ym,Description:()=>Zm,List:()=>Jm,ProgressFill:()=>Qm,ProgressTrack:()=>e0,Region:()=>t0,Root:()=>n0,Title:()=>r0,Toast:()=>oo,toaster:()=>Ai,useToastContext:()=>Wi});var Wm=ct();function Wi(){const e=it(Wm);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function Ym(e){const t=Wi(),[n,r]=ce(e,["aria-label","onClick"]);return f(Xn,q({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Ee(i,n.onClick),t.close()}},r))}function Zm(e){const t=Wi(),n=ve({id:t.generateId("description")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerDescriptionId(r.id))),f(Te,q({as:"div",get id(){return r.id}},o))}var Xm=ct();function vl(){const e=it(Xm);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function Jm(e){let t;const n=vl(),[r,o]=ce(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{Ee(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{Ee(c,r.onFocusOut),Nt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{Ee(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{Ee(c,r.onPointerLeave),Nt(t,tn(t).activeElement)||n.resumeAllTimer()};return ie(mt([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const d=tn(c),h=g=>{l.every(m=>g[m]||g.code===m)&&xt(c)};d.addEventListener("keydown",h),ae(()=>d.removeEventListener("keydown",h))})),ie(()=>{if(!n.pauseOnPageIdle())return;const c=Qc(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),ae(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),f(Te,q({as:"ol",ref(c){var l=Je(d=>t=d,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return f(tt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function Qm(e){const t=vl(),n=Wi(),[r,o]=ce(e,["style"]),[i,s]=N(100);let a=0;return ie(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});ae(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),f(Te,q({as:"div",get style(){return mn({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function e0(e){return f(Te,q({as:"div","aria-hidden":"true",role:"presentation"},e))}var[xl,Yi]=Ty({toasts:[]});function wC(e){Yi("toasts",t=>[...t,e])}function _C(e){return xl.toasts.find(t=>t.id===e)}function EC(e,t){const n=xl.toasts.findIndex(r=>r.id===e);n!==-1&&Yi("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function CC(e){Yi("toasts",t=>t.id===e,"dismiss",!0)}function SC(e){Yi("toasts",t=>t.filter(n=>n.id!==e))}function kC(){Yi("toasts",[])}var co={toasts:()=>xl.toasts,add:wC,get:_C,update:EC,dismiss:CC,remove:SC,clear:kC},mf="{hotkey}",AC={close:"Close"},TC={notifications:e=>`Notifications (${e})`};function t0(e){const t=ve({id:`toast-region-${It()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:TC},e),[n,r]=ce(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=se(()=>co.toasts().filter(h=>h.region===n.regionId&&h.dismiss===!1).slice(0,n.limit)),[i,s]=N(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(mf)).replace(mf,u()),l=()=>({[Ci]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:nn(()=>r.id)};return f(Xm.Provider,{value:d,get children(){return f(Te,q({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return mn({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var DC="toast.swipeStart",IC="toast.swipeMove",OC="toast.swipeCancel",RC="toast.swipeEnd";function n0(e){const t=vl(),n=ve({id:`toast-${It()}`,priority:"high",translations:AC},e),[r,o]=ce(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=N(!0),[a,u]=N(),[c,l]=N(),[d,h]=N(!0),[g,p]=N(),{present:m}=Wn({show:i,element:()=>g()??null}),b=se(()=>r.duration||t.duration());let v,y=0,x=b(),E=null,C=null;const k=()=>{s(!1),h(!0)},O=()=>{co.remove(r.toastId)},S=A=>{!A||r.persistent||(window.clearTimeout(v),y=new Date().getTime(),v=window.setTimeout(k,A))},D=()=>{S(x),r.onResume?.()},M=()=>{const A=new Date().getTime()-y;x=x-A,window.clearTimeout(v),r.onPause?.()},z=A=>{Ee(A,r.onKeyDown),A.key==="Escape"&&(r.onEscapeKeyDown?.(A),A.defaultPrevented||k())},K=A=>{Ee(A,r.onPointerDown),A.button===0&&(E={x:A.clientX,y:A.clientY})},j=A=>{if(Ee(A,r.onPointerMove),!E)return;const I=A.clientX-E.x,F=A.clientY-E.y,$=!!C,U=["left","right"].includes(t.swipeDirection()),G=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,P=U?G(0,I):0,Z=U?0:G(0,F),V=A.pointerType==="touch"?10:2,Y={x:P,y:Z},ee={originalEvent:A,delta:Y};if($){C=Y,vs(IC,r.onSwipeMove,ee);const{x:re,y:Q}=Y;A.currentTarget.setAttribute("data-swipe","move"),A.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${re}px`),A.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${Q}px`)}else bf(Y,t.swipeDirection(),V)?(C=Y,vs(DC,r.onSwipeStart,ee),A.currentTarget.setAttribute("data-swipe","start"),A.target.setPointerCapture(A.pointerId)):(Math.abs(I)>V||Math.abs(F)>V)&&(E=null)},T=A=>{Ee(A,r.onPointerUp);const I=C,F=A.target;if(F.hasPointerCapture(A.pointerId)&&F.releasePointerCapture(A.pointerId),C=null,E=null,I){const $=A.currentTarget,U={originalEvent:A,delta:I};if(bf(I,t.swipeDirection(),t.swipeThreshold())){vs(RC,r.onSwipeEnd,U);const{x:G,y:P}=I;A.currentTarget.setAttribute("data-swipe","end"),A.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),A.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),A.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${G}px`),A.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${P}px`),k()}else vs(OC,r.onSwipeCancel,U),A.currentTarget.setAttribute("data-swipe","cancel"),A.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),A.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),A.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),A.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");$.addEventListener("click",G=>G.preventDefault(),{once:!0})}};wn(()=>{t.toasts().find(A=>A.id===r.toastId&&A.update)&&h(!1)}),ie(mt(()=>t.isPaused(),A=>{A?M():D()},{defer:!0})),ie(mt([i,b],([A,I])=>{A&&!t.isPaused()&&S(I)})),ie(mt(()=>co.get(r.toastId)?.dismiss,A=>A&&k())),ie(mt(()=>m(),A=>!A&&O()));const R={translations:()=>r.translations,close:k,duration:b,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:nn(()=>o.id),registerTitleId:ft(u),registerDescriptionId:ft(l)};return f(W,{get when(){return m()},get children(){return f(Wm.Provider,{value:R,get children(){return f(Te,q({as:"li",ref(A){var I=Je(p,r.ref);typeof I=="function"&&I(A)},role:"status",tabIndex:0,get style(){return mn({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:z,onPointerDown:K,onPointerMove:j,onPointerUp:T},o))}})}})}function bf(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function vs(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function r0(e){const t=Wi(),n=ve({id:t.generateId("title")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerTitleId(r.id))),f(Te,q({as:"div",get id(){return r.id}},o))}var NC=0;function o0(e,t){const n=NC++;return co.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function Rc(e,t){co.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function MC(e,t,n){const r=o0(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Ki(e)?e():e).then(o=>Rc(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Rc(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function LC(e){return co.dismiss(e),e}function $C(){co.clear()}var Ai={show:o0,update:Rc,promise:MC,dismiss:LC,clear:$C},oo=Object.assign(n0,{CloseButton:Ym,Description:Zm,List:Jm,ProgressFill:Qm,ProgressTrack:e0,Region:t0,Title:r0,toaster:Ai}),PC={};En(PC,{Arrow:()=>_r,Content:()=>s0,Portal:()=>a0,Root:()=>u0,Tooltip:()=>Ti,Trigger:()=>c0,useTooltipContext:()=>va});var i0=ct();function va(){const e=it(i0);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function s0(e){const t=va(),n=ve({id:t.generateId("content")},e),[r,o]=ce(n,["ref","style"]);return ie(()=>ae(t.registerContentId(o.id))),f(W,{get when(){return t.contentPresent()},get children(){return f(Vr.Positioner,{get children(){return f(Vi,q({ref(i){var s=Je(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return mn({"--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 a0(e){const t=va();return f(W,{get when(){return t.contentPresent()},get children(){return f(Pi,e)}})}function FC(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 to={},BC=0,_o=!1,lr,ri,Eo;function u0(e){const t=`tooltip-${It()}`,n=`${++BC}`,r=ve({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=ce(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=N(),[c,l]=N(),[d,h]=N(),[g,p]=N(i.placement),m=ho({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:T=>o.onOpenChange?.(T)}),{present:b}=Wn({show:()=>o.forceMount||m.isOpen(),element:()=>d()??null}),v=()=>{to[n]=x},y=()=>{for(const T in to)T!==n&&(to[T](!0),delete to[T])},x=(T=!1)=>{T||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},o.closeDelay)),window.clearTimeout(lr),lr=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Eo=window.setTimeout(()=>{window.clearTimeout(Eo),Eo=void 0},o.skipDelayDuration)),_o&&(window.clearTimeout(ri),ri=window.setTimeout(()=>{delete to[n],ri=void 0,_o=!1},o.closeDelay))},E=()=>{clearTimeout(s),s=void 0,y(),v(),_o=!0,m.open(),window.clearTimeout(lr),lr=void 0,window.clearTimeout(ri),ri=void 0,window.clearTimeout(Eo),Eo=void 0},C=()=>{y(),v(),!m.isOpen()&&!lr&&!_o?lr=window.setTimeout(()=>{lr=void 0,_o=!0,E()},o.openDelay):m.isOpen()||E()},k=(T=!1)=>{!T&&o.openDelay&&o.openDelay>0&&!s&&!Eo?C():E()},O=()=>{window.clearTimeout(lr),lr=void 0,_o=!1},S=()=>{window.clearTimeout(s),s=void 0},D=T=>Nt(c(),T)||Nt(d(),T),M=T=>{const R=c(),A=d();if(!(!R||!A))return FC(T,R,A)},z=T=>{const R=T.target;if(D(R)){S();return}if(!o.ignoreSafeArea){const A=M(g());if(A&&Oh(e2(T),A)){S();return}}s||x()};ie(()=>{if(!m.isOpen())return;const T=tn();T.addEventListener("pointermove",z,!0),ae(()=>{T.removeEventListener("pointermove",z,!0)})}),ie(()=>{const T=c();if(!T||!m.isOpen())return;const R=I=>{const F=I.target;Nt(F,T)&&x(!0)},A=Qc();A.addEventListener("scroll",R,{capture:!0}),ae(()=>{A.removeEventListener("scroll",R,{capture:!0})})}),ae(()=>{clearTimeout(s),to[n]&&delete to[n]});const j={dataset:se(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:b,openTooltip:k,hideTooltip:x,cancelOpening:O,generateId:nn(()=>r.id),registerContentId:ft(u),isTargetOnTooltip:D,setTriggerRef:l,setContentRef:h};return f(i0.Provider,{value:j,get children(){return f(Vr,q({anchorRef:c,contentRef:d,onCurrentPlacementChange:T=>{p(T),o.onCurrentPlacementChange?.(T)}},i))}})}function c0(e){let t;const n=va(),[r,o]=ce(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=v=>{n.isOpen()&&!s&&!a&&n.hideTooltip(v)},d=v=>{Ee(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,c())},h=v=>{Ee(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},g=v=>{Ee(v,r.onPointerDown),i=!0,tn(t).addEventListener("pointerup",u,{once:!0})},p=v=>{Ee(v,r.onClick),s=!1,a=!1,l(!0)},m=v=>{Ee(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||i)&&(a=!0,c())},b=v=>{Ee(v,r.onBlur);const y=v.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,l(!0))};return ae(()=>{tn(t).removeEventListener("pointerup",u)}),f(Te,q({as:"button",ref(v){var y=Je(x=>{n.setTriggerRef(x),t=x},r.ref);typeof y=="function"&&y(v)},get"aria-describedby"(){return te(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:h,onPointerDown:g,onClick:p,onFocus:m,onBlur:b},()=>n.dataset(),o))}var Ti=Object.assign(u0,{Arrow:_r,Content:s0,Portal:a0,Trigger:c0}),wl=["id","name","validationState","required","disabled","readOnly"];function _l(e){const t=`form-control-${It()}`,n=ve({id:t},e),[r,o]=N(),[i,s]=N(),[a,u]=N(),[c,l]=N(),d=(m,b,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&b!=null?m:void 0].filter(Boolean).join(" ")||void 0},h=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,g=se(()=>({"data-valid":X(n.validationState)==="valid"?"":void 0,"data-invalid":X(n.validationState)==="invalid"?"":void 0,"data-required":X(n.required)?"":void 0,"data-disabled":X(n.disabled)?"":void 0,"data-readonly":X(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>X(n.name)??X(n.id),dataset:g,validationState:()=>X(n.validationState),isRequired:()=>X(n.required),isDisabled:()=>X(n.disabled),isReadOnly:()=>X(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:h,generateId:nn(()=>X(n.id)),registerLabel:ft(o),registerField:ft(s),registerDescription:ft(u),registerErrorMessage:ft(l)}}}var xa=ct();function Cn(){const e=it(xa);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Zi(e){const t=Cn(),n=ve({id:t.generateId("description")},e);return ie(()=>ae(t.registerDescription(n.id))),f(Te,q({as:"div"},()=>t.dataset(),n))}var zC=B("<option>"),UC=B("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function KC(e){let t;const[n,r]=ce(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),o=Cn(),[i,s]=N(!1),a=u=>{const c=n.collection.getItem(u);return f(W,{get when(){return c?.type==="item"},get children(){var l=zC();return l.value=u,w(l,()=>c?.textValue),Ie(()=>l.selected=n.selectionManager.isSelected(u)),l}})};return ie(mt(()=>n.selectionManager.selectedKeys(),(u,c)=>{c&&em(u,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var u=UC(),c=u.firstChild,l=c.nextSibling;l.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),l.addEventListener("change",h=>{Ee(h,n.onChange),i()||n.selectionManager.setSelectedKeys(new Set([h.target.value])),s(!1)});var d=Je(h=>t=h,n.ref);return typeof d=="function"&&br(d,l),Yn(l,q({get multiple(){return n.isMultiple},get name(){return o.name()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),w(l,f(W,{get when(){return n.isVirtualized},get fallback(){return f(tt,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return f(tt,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Ie(h=>{var g=aa,p=n.selectionManager.isFocused()||n.isOpen?-1:0,m=o.isRequired(),b=o.isDisabled(),v=o.isReadOnly();return h.e=$i(u,g,h.e),p!==h.t&&We(c,"tabindex",h.t=p),m!==h.a&&(c.required=h.a=m),b!==h.o&&(c.disabled=h.o=b),v!==h.i&&(c.readOnly=h.i=v),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()}var yf=new WeakMap;function HC(e){let t=yf.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return yf.set(e,t),t}var jC={};En(jC,{Item:()=>wa,ItemDescription:()=>_a,ItemIndicator:()=>Ea,ItemLabel:()=>Ca,Listbox:()=>qC,Root:()=>Cl,Section:()=>Sa,useListboxContext:()=>d0});var l0=ct();function d0(){const e=it(l0);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var f0=ct();function El(){const e=it(f0);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function wa(e){let t;const n=d0(),r=`${n.generateId("item")}-${It()}`,o=ve({id:r},e),[i,s]=ce(o,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=N(),[c,l]=N(),d=()=>n.listState().selectionManager(),h=()=>d().focusedKey()===i.item.key,g=ll({key:()=>i.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>i.item.disabled},()=>t),p=()=>{if(d().selectionMode()!=="none")return g.isSelected()},m=se(()=>!(Hi()&&z_())),b=()=>m()?i["aria-label"]:void 0,v=()=>m()?a():void 0,y=()=>m()?c():void 0,x=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(i.item.key)?.index;return S!=null?S+1:void 0},E=()=>{if(n.isVirtualized())return HC(n.listState().collection())},C=S=>{Ee(S,i.onPointerMove),S.pointerType==="mouse"&&!g.isDisabled()&&n.shouldFocusOnHover()&&(xt(S.currentTarget),d().setFocused(!0),d().setFocusedKey(i.item.key))},k=se(()=>({"data-disabled":g.isDisabled()?"":void 0,"data-selected":g.isSelected()?"":void 0,"data-highlighted":h()?"":void 0})),O={isSelected:g.isSelected,dataset:k,generateId:nn(()=>s.id),registerLabelId:ft(u),registerDescriptionId:ft(l)};return f(f0.Provider,{value:O,get children(){return f(Te,q({as:"li",ref(S){var D=Je(M=>t=M,i.ref);typeof D=="function"&&D(S)},role:"option",get tabIndex(){return g.tabIndex()},get"aria-disabled"(){return g.isDisabled()},get"aria-selected"(){return p()},get"aria-label"(){return b()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return y()},get"aria-posinset"(){return x()},get"aria-setsize"(){return E()},get"data-key"(){return g.dataKey()},get onPointerDown(){return dt([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return dt([i.onPointerUp,g.onPointerUp])},get onClick(){return dt([i.onClick,g.onClick])},get onKeyDown(){return dt([i.onKeyDown,g.onKeyDown])},get onMouseDown(){return dt([i.onMouseDown,g.onMouseDown])},get onFocus(){return dt([i.onFocus,g.onFocus])},onPointerMove:C},k,s))}})}function _a(e){const t=El(),n=ve({id:t.generateId("description")},e);return ie(()=>ae(t.registerDescriptionId(n.id))),f(Te,q({as:"div"},()=>t.dataset(),n))}function Ea(e){const t=El(),n=ve({id:t.generateId("indicator")},e),[r,o]=ce(n,["forceMount"]);return f(W,{get when(){return r.forceMount||t.isSelected()},get children(){return f(Te,q({as:"div","aria-hidden":"true"},()=>t.dataset(),o))}})}function Ca(e){const t=El(),n=ve({id:t.generateId("label")},e);return ie(()=>ae(t.registerLabelId(n.id))),f(Te,q({as:"div"},()=>t.dataset(),n))}function Cl(e){let t;const n=`listbox-${It()}`,r=ve({id:n,selectionMode:"single",virtualized:!1},e),[o,i]=ce(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=se(()=>o.state?o.state:dl({selectedKeys:()=>o.value,defaultSelectedKeys:()=>o.defaultValue,onSelectionChange:o.onChange,allowDuplicateSelectionEvents:()=>X(o.allowDuplicateSelectionEvents),disallowEmptySelection:()=>X(o.disallowEmptySelection),selectionBehavior:()=>X(o.selectionBehavior),selectionMode:()=>X(o.selectionMode),dataSource:()=>o.options??[],getKey:()=>o.optionValue,getTextValue:()=>o.optionTextValue,getDisabled:()=>o.optionDisabled,getSectionChildren:()=>o.optionGroupChildren})),a=rm({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>X(o.autoFocus),shouldFocusWrap:()=>X(o.shouldFocusWrap),keyboardDelegate:()=>o.keyboardDelegate,disallowEmptySelection:()=>X(o.disallowEmptySelection),selectOnFocus:()=>X(o.selectOnFocus),disallowTypeAhead:()=>X(o.disallowTypeAhead),shouldUseVirtualFocus:()=>X(o.shouldUseVirtualFocus),allowsTabNavigation:()=>X(o.allowsTabNavigation),isVirtualized:()=>o.virtualized,scrollToKey:()=>o.scrollToItem},()=>t,()=>o.scrollRef?.()),u={listState:s,generateId:nn(()=>i.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>o.virtualized};return f(l0.Provider,{value:u,get children(){return f(Te,q({as:"ul",ref(c){var l=Je(d=>t=d,o.ref);typeof l=="function"&&l(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return dt([o.onKeyDown,a.onKeyDown])},get onMouseDown(){return dt([o.onMouseDown,a.onMouseDown])},get onFocusIn(){return dt([o.onFocusIn,a.onFocusIn])},get onFocusOut(){return dt([o.onFocusOut,a.onFocusOut])}},i,{get children(){return f(W,{get when(){return!o.virtualized},get fallback(){return o.children?.(s().collection)},get children(){return f(R_,{get each(){return[...s().collection()]},by:"key",children:c=>f(C1,{get children(){return[f(Zl,{get when(){return c().type==="section"},get children(){return o.renderSection?.(c())}}),f(Zl,{get when(){return c().type==="item"},get children(){return o.renderItem?.(c())}})]}})})}})}}))}})}function Sa(e){return f(Te,q({as:"li",role:"presentation"},e))}var qC=Object.assign(Cl,{Item:wa,ItemDescription:_a,ItemIndicator:Ea,ItemLabel:Ca,Section:Sa}),g0=["id","aria-label","aria-labelledby","aria-describedby"];function p0(e){const t=Cn(),n=ve({id:t.generateId("field")},e);return ie(()=>ae(t.registerField(X(n.id)))),{fieldProps:{id:()=>X(n.id),ariaLabel:()=>X(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(X(n.id),X(n["aria-label"]),X(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(X(n["aria-describedby"]))}}}function Sl(e){let t;const n=Cn(),r=ve({id:n.generateId("label")},e),[o,i]=ce(r,["ref"]),s=ua(()=>t,()=>"label");return ie(()=>ae(n.registerLabel(i.id))),f(Te,q({as:"label",ref(a){var u=Je(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return te(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function kl(e,t){ie(mt(e,n=>{if(n==null)return;const r=GC(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ae(()=>{r.removeEventListener("reset",t)}))}))}function GC(e){return VC(e)?e.form:e.closest("form")}function VC(e){return e.matches("textarea, input, select, button")}function Xi(e){const t=Cn(),n=ve({id:t.generateId("error-message")},e),[r,o]=ce(n,["forceMount"]),i=()=>t.validationState()==="invalid";return ie(()=>{i()&&ae(t.registerErrorMessage(o.id))}),f(W,{get when(){return r.forceMount||i()},get children(){return f(Te,q({as:"div"},()=>t.dataset(),o))}})}var WC={};En(WC,{Arrow:()=>_r,Content:()=>m0,Description:()=>Zi,ErrorMessage:()=>Xi,HiddenSelect:()=>b0,Icon:()=>y0,Item:()=>wa,ItemDescription:()=>_a,ItemIndicator:()=>Ea,ItemLabel:()=>Ca,Label:()=>v0,Listbox:()=>x0,Portal:()=>w0,Root:()=>_0,Section:()=>Sa,Select:()=>qt,Trigger:()=>E0,Value:()=>C0,useSelectContext:()=>Cr});var h0=ct();function Cr(){const e=it(h0);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function m0(e){let t;const n=Cr(),[r,o]=ce(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),i=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return pa({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),ha({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ga({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(xt(n.triggerRef()),a.preventDefault())}},()=>t),f(W,{get when(){return n.contentPresent()},get children(){return f(Vr.Positioner,{get children(){return f(Vi,q({ref(a){var u=Je(c=>{n.setContentRef(c),t=c},r.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return te(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return mn({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:i,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function b0(e){const t=Cr();return f(KC,q({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function y0(e){const t=Cr(),n=ve({children:"▼"},e);return f(Te,q({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function v0(e){const t=Cr(),[n,r]=ce(e,["onClick"]);return f(Sl,q({as:"span",onClick:i=>{Ee(i,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function x0(e){const t=Cr(),n=ve({id:t.generateId("listbox")},e),[r,o]=ce(n,["ref","id","onKeyDown"]);return ie(()=>ae(t.registerListboxId(r.id))),f(Cl,q({ref(s){var a=Je(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{Ee(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},o))}function w0(e){const t=Cr();return f(W,{get when(){return t.contentPresent()},get children(){return f(Pi,e)}})}function YC(e){const t=`select-${It()}`,n=ve({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,o,i,s]=ce(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],wl),[a,u]=N(),[c,l]=N(),[d,h]=N(),[g,p]=N(),[m,b]=N(),[v,y]=N(),[x,E]=N(),[C,k]=N(!0),O=re=>{const Q=r.optionValue;return Q==null?String(re):String(Ki(Q)?Q(re):re[Q])},S=se(()=>{const re=r.optionGroupChildren;return re==null?r.options:r.options.flatMap(Q=>Q[re]??Q)}),D=se(()=>S().map(re=>O(re))),M=re=>[...re].map(Q=>S().find(Ce=>O(Ce)===Q)).filter(Q=>Q!=null),z=ho({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:re=>r.onOpenChange?.(re)}),K=dl({selectedKeys:()=>r.value!=null?r.value.map(O):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(O):r.defaultValue,onSelectionChange:re=>{r.onChange?.(M(re)),r.closeOnSelection&&F()},allowDuplicateSelectionEvents:()=>X(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>X(r.disallowEmptySelection),selectionBehavior:()=>X(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),j=se(()=>M(K.selectionManager().selectedKeys())),T=re=>{K.selectionManager().toggleSelection(O(re))},{present:R}=Wn({show:()=>r.forceMount||z.isOpen(),element:()=>m()??null}),A=()=>{const re=v();re&&xt(re)},I=re=>{if(r.options.length<=0)return;k(re),z.open();let Q=K.selectionManager().firstSelectedKey();Q==null&&(re==="first"?Q=K.collection().getFirstKey():re==="last"&&(Q=K.collection().getLastKey())),A(),K.selectionManager().setFocused(!0),K.selectionManager().setFocusedKey(Q)},F=()=>{z.close(),K.selectionManager().setFocused(!1),K.selectionManager().setFocusedKey(void 0)},$=re=>{z.isOpen()?F():I(re)},{formControlContext:U}=_l(i);kl(g,()=>{const re=r.defaultValue?[...r.defaultValue].map(O):new zn;K.selectionManager().setSelectedKeys(re)});const G=Fh({usage:"search",sensitivity:"base"}),P=se(()=>{const re=X(r.keyboardDelegate);return re||new nm(K.collection,void 0,G)}),Z=re=>r.itemComponent?.({item:re}),V=re=>r.sectionComponent?.({section:re});ie(mt([D],([re])=>{const Ce=[...K.selectionManager().selectedKeys()].filter(Oe=>re.includes(Oe));K.selectionManager().setSelectedKeys(Ce)},{defer:!0}));const Y=se(()=>({"data-expanded":z.isOpen()?"":void 0,"data-closed":z.isOpen()?void 0:""})),ee={dataset:Y,isOpen:z.isOpen,isDisabled:()=>U.isDisabled()??!1,isMultiple:()=>X(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??ee.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:j,contentPresent:R,autoFocus:C,triggerRef:g,listState:()=>K,keyboardDelegate:P,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:x,setListboxAriaLabelledBy:E,setTriggerRef:p,setContentRef:b,setListboxRef:y,open:I,close:F,toggle:$,placeholder:()=>r.placeholder,renderItem:Z,renderSection:V,removeOptionFromSelection:T,generateId:nn(()=>X(i.id)),registerTriggerId:ft(u),registerValueId:ft(l),registerListboxId:ft(h)};return f(xa.Provider,{value:U,get children(){return f(h0.Provider,{value:ee,get children(){return f(Vr,q({anchorRef:g,contentRef:m},o,{get children(){return f(Te,q({as:"div",role:"group",get id(){return X(i.id)}},()=>U.dataset(),Y,s))}}))}})}})}function _0(e){const[t,n]=ce(e,["value","defaultValue","onChange","multiple"]),r=se(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),o=se(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return f(YC,q({get value(){return r()},get defaultValue(){return o()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function E0(e){const t=Cn(),n=Cr(),r=ve({id:n.generateId("trigger")},e),[o,i,s]=ce(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],g0),a=()=>n.listState().selectionManager(),u=()=>n.keyboardDelegate(),c=()=>o.disabled||n.isDisabled(),{fieldProps:l}=p0(i),{typeSelectHandlers:d}=tm({keyboardDelegate:u,selectionManager:a,onTypeSelect:y=>a().select(y)}),h=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,g=y=>{Ee(y,o.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},p=y=>{Ee(y,o.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=y=>{if(Ee(y,o.onKeyDown),!c())switch(Ee(y,d.onKeyDown),y.key){case"Enter":case" ":case"ArrowDown":y.stopPropagation(),y.preventDefault(),n.toggle("first");break;case"ArrowUp":y.stopPropagation(),y.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyAbove?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}case"ArrowRight":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyBelow?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}}},b=y=>{Ee(y,o.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{Ee(y,o.onBlur),!n.isOpen()&&a().setFocused(!1)};return ie(()=>ae(n.registerTriggerId(l.id()))),ie(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),f(Xn,q({ref(y){var x=Je(n.setTriggerRef,o.ref);typeof x=="function"&&x(y)},get id(){return l.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return te(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return h()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:g,onClick:p,onKeyDown:m,onFocus:b,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function C0(e){const t=Cn(),n=Cr(),r=ve({id:n.generateId("value")},e),[o,i]=ce(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const u=s().selectedKeys();return u.size===1&&u.has("")?!0:s().isEmpty()};return ie(()=>ae(n.registerValueId(o.id))),f(Te,q({as:"span",get id(){return o.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),i,{get children(){return f(W,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return f(ZC,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>s().clearSelection()},get children(){return o.children}})}})}}))}function ZC(e){const t=Ko(()=>{const n=e.children;return Ki(n)?n(e.state):n});return te(t)}var qt=Object.assign(_0,{Arrow:_r,Content:m0,Description:Zi,ErrorMessage:Xi,HiddenSelect:b0,Icon:y0,Item:wa,ItemDescription:_a,ItemIndicator:Ea,ItemLabel:Ca,Label:v0,Listbox:x0,Portal:w0,Section:Sa,Trigger:E0,Value:C0}),XC={};En(XC,{Anchor:()=>k0,Arrow:()=>_r,CloseButton:()=>A0,Content:()=>T0,Description:()=>D0,Popover:()=>$r,Portal:()=>I0,Root:()=>O0,Title:()=>R0,Trigger:()=>N0,usePopoverContext:()=>Yr});var S0=ct();function Yr(){const e=it(S0);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function k0(e){const t=Yr(),[n,r]=ce(e,["ref"]);return f(Te,q({as:"div",ref(o){var i=Je(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function A0(e){const t=Yr(),[n,r]=ce(e,["aria-label","onClick"]);return f(Xn,q({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Ee(i,n.onClick),t.close()}},()=>t.dataset(),r))}function T0(e){let t;const n=Yr(),r=ve({id:n.generateId("content")},e),[o,i]=ce(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=g=>{o.onCloseAutoFocus?.(g),n.isModal()?(g.preventDefault(),s||xt(n.triggerRef())):(g.defaultPrevented||(a||xt(n.triggerRef()),g.preventDefault()),a=!1,u=!1)},l=g=>{o.onPointerDownOutside?.(g),n.isModal()&&(s=g.detail.isContextMenu)},d=g=>{o.onFocusOutside?.(g),n.isOpen()&&n.isModal()&&g.preventDefault()},h=g=>{o.onInteractOutside?.(g),!n.isModal()&&(g.defaultPrevented||(a=!0,g.detail.originalEvent.type==="pointerdown"&&(u=!0)),Nt(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&u&&g.preventDefault())};return pa({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),ha({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ga({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),ie(()=>ae(n.registerContentId(i.id))),f(W,{get when(){return n.contentPresent()},get children(){return f(Vr.Positioner,{get children(){return f(Vi,q({ref(g){var p=Je(m=>{n.setContentRef(m),t=m},o.ref);typeof p=="function"&&p(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return te(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return mn({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function D0(e){const t=Yr(),n=ve({id:t.generateId("description")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerDescriptionId(r.id))),f(Te,q({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function I0(e){const t=Yr();return f(W,{get when(){return t.contentPresent()},get children(){return f(Pi,e)}})}var vf={dismiss:"Dismiss"};function O0(e){const t=`popover-${It()}`,n=ve({id:t,modal:!1,translations:vf},e),[r,o]=ce(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=N(),[a,u]=N(),[c,l]=N(),[d,h]=N(),[g,p]=N(),[m,b]=N(),v=ho({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:k=>r.onOpenChange?.(k)}),y=()=>r.anchorRef?.()??i()??a(),{present:x}=Wn({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),E=se(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),C={translations:()=>r.translations??vf,dataset:E,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??C.isModal(),contentPresent:x,triggerRef:a,contentId:d,titleId:g,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:v.close,toggle:v.toggle,generateId:nn(()=>r.id),registerContentId:ft(h),registerTitleId:ft(p),registerDescriptionId:ft(b)};return f(S0.Provider,{value:C,get children(){return f(Vr,q({anchorRef:y,contentRef:c},o))}})}function R0(e){const t=Yr(),n=ve({id:t.generateId("title")},e),[r,o]=ce(n,["id"]);return ie(()=>ae(t.registerTitleId(r.id))),f(Te,q({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function N0(e){const t=Yr(),[n,r]=ce(e,["ref","onClick","onPointerDown"]);return f(Xn,q({ref(s){var a=Je(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return te(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Ee(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Ee(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var $r=Object.assign(O0,{Anchor:k0,Arrow:_r,CloseButton:A0,Content:T0,Description:D0,Portal:I0,Title:R0,Trigger:N0}),JC={};En(JC,{Description:()=>Zi,ErrorMessage:()=>Xi,Item:()=>$0,ItemControl:()=>P0,ItemDescription:()=>F0,ItemIndicator:()=>B0,ItemInput:()=>z0,ItemLabel:()=>U0,Label:()=>K0,RadioGroup:()=>In,Root:()=>H0,useRadioGroupContext:()=>Al});var M0=ct();function Al(){const e=it(M0);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var L0=ct();function Ji(){const e=it(L0);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function $0(e){const t=Cn(),n=Al(),r=`${t.generateId("item")}-${It()}`,o=ve({id:r},e),[i,s]=ce(o,["value","disabled","onPointerDown"]),[a,u]=N(),[c,l]=N(),[d,h]=N(),[g,p]=N(),[m,b]=N(!1),v=se(()=>n.isDefaultValue(i.value)),y=se(()=>n.isSelectedValue(i.value)),x=se(()=>i.disabled||t.isDisabled()||!1),E=O=>{Ee(O,i.onPointerDown),m()&&O.preventDefault()},C=se(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":y()?"":void 0})),k={value:()=>i.value,dataset:C,isDefault:v,isSelected:y,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:g,select:()=>n.setSelectedValue(i.value),generateId:nn(()=>s.id),registerInput:ft(u),registerLabel:ft(l),registerDescription:ft(h),setIsFocused:b,setInputRef:p};return f(L0.Provider,{value:k,get children(){return f(Te,q({as:"div",role:"group",onPointerDown:E},C,s))}})}function P0(e){const t=Ji(),n=ve({id:t.generateId("control")},e),[r,o]=ce(n,["onClick","onKeyDown"]);return f(Te,q({as:"div",onClick:a=>{Ee(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Ee(a,r.onKeyDown),a.key===sa.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function F0(e){const t=Ji(),n=ve({id:t.generateId("description")},e);return ie(()=>ae(t.registerDescription(n.id))),f(Te,q({as:"div"},()=>t.dataset(),n))}function B0(e){const t=Ji(),n=ve({id:t.generateId("indicator")},e),[r,o]=ce(n,["ref","forceMount"]),[i,s]=N(),{present:a}=Wn({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return f(W,{get when(){return a()},get children(){return f(Te,q({as:"div",ref(u){var c=Je(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function z0(e){const t=Cn(),n=Al(),r=Ji(),o=ve({id:r.generateId("input")},e),[i,s]=ce(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=N(!1),d=p=>{if(Ee(p,i.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=p.target;m.checked=r.isSelected()}l(!1)},h=p=>{Ee(p,i.onFocus),r.setIsFocused(!0)},g=p=>{Ee(p,i.onBlur),r.setIsFocused(!1)};return ie(mt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;l(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),ie(()=>ae(r.registerInput(s.id))),f(Te,q({as:"input",ref(p){var m=Je(r.setInputRef,i.ref);typeof m=="function"&&m(p)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return mn({...aa},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:h,onBlur:g},()=>r.dataset(),s))}function U0(e){const t=Ji(),n=ve({id:t.generateId("label")},e);return ie(()=>ae(t.registerLabel(n.id))),f(Te,q({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function K0(e){return f(Sl,q({as:"span"},e))}function H0(e){let t;const n=`radiogroup-${It()}`,r=ve({id:n,orientation:"vertical"},e),[o,i,s]=ce(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],wl),[a,u]=Gi({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:b=>o.onChange?.(b)}),{formControlContext:c}=_l(i);kl(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(X(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),h=b=>b===e.defaultValue,g=b=>b===a(),m={ariaDescribedBy:d,isDefaultValue:h,isSelectedValue:g,setSelectedValue:b=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(b),t))for(const v of t.querySelectorAll("[type='radio']")){const y=v;y.checked=g(y.value)}}};return f(xa.Provider,{value:c,get children(){return f(M0.Provider,{value:m,get children(){return f(Te,q({as:"div",ref(b){var v=Je(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"radiogroup",get id(){return X(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var In=Object.assign(H0,{Description:Zi,ErrorMessage:Xi,Item:$0,ItemControl:P0,ItemDescription:F0,ItemIndicator:B0,ItemInput:z0,ItemLabel:U0,Label:K0}),QC={};En(QC,{Collapsible:()=>ka,Content:()=>q0,Root:()=>G0,Trigger:()=>V0,useCollapsibleContext:()=>Tl});var j0=ct();function Tl(){const e=it(j0);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function q0(e){const[t,n]=N(),r=Tl(),o=ve({id:r.generateId("content")},e),[i,s]=ce(o,["ref","id","style"]),{present:a}=Wn({show:r.shouldMount,element:()=>t()??null}),[u,c]=N(0),[l,d]=N(0);let g=r.isOpen()||a();return wn(()=>{const p=requestAnimationFrame(()=>{g=!1});ae(()=>{cancelAnimationFrame(p)})}),ie(mt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),g||(t().style.transitionDuration="",t().style.animationName="")})),ie(mt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),ie(()=>ae(r.registerContentId(i.id))),f(W,{get when(){return a()},get children(){return f(Te,q({as:"div",ref(p){var m=Je(n,i.ref);typeof m=="function"&&m(p)},get id(){return i.id},get style(){return mn({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function G0(e){const t=`collapsible-${It()}`,n=ve({id:t},e),[r,o]=ce(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=N(),a=ho({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=se(()=>({"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:nn(()=>o.id),registerContentId:ft(s)};return f(j0.Provider,{value:c,get children(){return f(Te,q({as:"div"},u,o))}})}function V0(e){const t=Tl(),[n,r]=ce(e,["onClick"]);return f(Xn,q({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return te(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Ee(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var ka=Object.assign(G0,{Content:q0,Trigger:V0}),eS={};En(eS,{Checkbox:()=>Pr,Control:()=>Y0,Description:()=>Z0,ErrorMessage:()=>X0,Indicator:()=>J0,Input:()=>Q0,Label:()=>eb,Root:()=>tb,useCheckboxContext:()=>mo});var W0=ct();function mo(){const e=it(W0);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function Y0(e){const t=Cn(),n=mo(),r=ve({id:n.generateId("control")},e),[o,i]=ce(r,["onClick","onKeyDown"]);return f(Te,q({as:"div",onClick:u=>{Ee(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Ee(u,o.onKeyDown),u.key===sa.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function Z0(e){const t=mo();return f(Zi,q(()=>t.dataset(),e))}function X0(e){const t=mo();return f(Xi,q(()=>t.dataset(),e))}function J0(e){const t=Cn(),n=mo(),[r,o]=N(),i=ve({id:n.generateId("indicator")},e),[s,a]=ce(i,["ref","forceMount"]),{present:u}=Wn({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return f(W,{get when(){return u()},get children(){return f(Te,q({as:"div",ref(c){var l=Je(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function Q0(e){let t;const n=Cn(),r=mo(),o=ve({id:r.generateId("input")},e),[i,s,a]=ce(o,["ref","style","onChange","onFocus","onBlur"],g0),{fieldProps:u}=p0(s),[c,l]=N(!1),d=p=>{if(Ee(p,i.onChange),p.stopPropagation(),!c()){const m=p.target;r.setIsChecked(m.checked),m.checked=r.checked()}l(!1)},h=p=>{Ee(p,i.onFocus),r.setIsFocused(!0)},g=p=>{Ee(p,i.onBlur),r.setIsFocused(!1)};return ie(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})),ie(mt([()=>t,()=>r.indeterminate(),()=>r.checked()],([p,m])=>{p&&(p.indeterminate=m)})),f(Te,q({as:"input",ref(p){var m=Je(b=>{r.setInputRef(b),t=b},i.ref);typeof m=="function"&&m(p)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return mn(aa,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:h,onBlur:g},()=>n.dataset(),()=>r.dataset(),a))}function eb(e){const t=mo();return f(Sl,q(()=>t.dataset(),e))}function tb(e){let t;const n=`checkbox-${It()}`,r=ve({value:"on",id:n},e),[o,i,s]=ce(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],wl),[a,u]=N(),[c,l]=N(!1),{formControlContext:d}=_l(i),h=fm({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:b=>o.onChange?.(b),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});kl(()=>t,()=>h.setIsSelected(o.defaultChecked??!1));const g=b=>{Ee(b,o.onPointerDown),c()&&b.preventDefault()},p=se(()=>({"data-checked":h.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),m={value:()=>o.value,dataset:p,checked:()=>h.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:nn(()=>X(i.id)),toggle:()=>h.toggle(),setIsChecked:b=>h.setIsSelected(b),setIsFocused:l,setInputRef:u};return f(xa.Provider,{value:d,get children(){return f(W0.Provider,{value:m,get children(){return f(Te,q({as:"div",ref(b){var v=Je(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"group",get id(){return X(i.id)},onPointerDown:g},()=>d.dataset(),p,s,{get children(){return f(tS,{state:m,get children(){return o.children}})}}))}})}})}function tS(e){const t=Ko(()=>{const n=e.children;return Ki(n)?n(e.state):n});return te(t)}var Pr=Object.assign(tb,{Control:Y0,Description:Z0,ErrorMessage:X0,Indicator:J0,Input:Q0,Label:eb}),nS=B("<div>"),rS=B("<div class=min-w-0>");const oS={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},iS={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function sS(e){switch(e.type){case"success":return f(Vv,{class:"h-4 w-4"});case"info":return f(lx,{class:"h-4 w-4"});case"warning":case"error":return f(lw,{class:"h-4 w-4"});case"loading":return f(Un,{class:"h-4 w-4 animate-spin"});default:return null}}function aS(e){return f(oo,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return ot("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=nS();return w(t,f(sS,{get type(){return e.type}})),Ie(()=>Ot(t,ot("shrink-0 self-center",iS[e.type]))),t})(),(()=>{var t=rS();return w(t,f(oo.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),w(t,(()=>{var n=te(()=>!!e.description);return()=>n()?f(oo.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),f(oo.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return _("common.close")},get children(){return f(jr,{class:"h-4 w-4"})}})]}})}function Co(e,t,n={}){return Ai.show(r=>f(aS,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const Dt=Object.assign((e,t)=>Co("default",e,t),{success:(e,t)=>Co("success",e,t),info:(e,t)=>Co("info",e,t),warning:(e,t)=>Co("warning",e,t),error:(e,t)=>Co("error",e,t),loading:(e,t)=>Co("loading",e,t),dismiss:e=>{if(typeof e=="number")return Ai.dismiss(e);Ai.clear()}}),uS=e=>{const[t,n]=ce(e,["position","duration","visibleToasts","class"]);return f(oo.Region,q({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return ot("!pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",oS[t.position??"bottom-right"],t.class)}},n,{get children(){return f(oo.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};var cS=B('<p class="m-0 text-destructive">'),lS=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),dS=B('<div class="flex items-center">'),fS=B('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),gS=B('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),pS=B('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const hS=e=>{const t=jo(),[n,{refetch:r}]=Gt(e.projectId,v=>v?he.listCommands(v):Promise.resolve([])),[o,i]=N(!1),[s,a]=N(""),[u,c]=N(""),[l,d]=N(!1),[h,g]=N(null);async function p(v){const y=e.projectId();if(y)try{const x=await he.runCommand(y,v.id);Dt.success(_("commands.started")),e.onRunStarted?.(),t(Mt(`commands/${encodeURIComponent(x.runId)}`))}catch(x){Dt.error(x.message)}}async function m(v){const y=e.projectId();if(y)try{await he.deleteCommand(y,v.id),await r()}catch(x){Dt.error(x.message)}}async function b(v){v.preventDefault();const y=e.projectId();if(!y)return;const x=s().trim(),E=u().trim();if(!(!x||!E)){d(!0),g(null);try{await he.createCommand(y,{name:x,cli:E}),a(""),c(""),i(!1),await r()}catch(C){g(C.message)}finally{d(!1)}}}return(()=>{var v=dS();return w(v,f(bl,{placement:"bottom-start",get children(){return[f(ml,{as:xe,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("commands.menuTitle")},get children(){return f(iw,{class:"h-4 w-4"})}}),f(yl,{class:"min-w-56",get children(){return[f(W,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var y=fS();return w(y,()=>_("commands.empty")),y})()},get children(){return f(tt,{get each(){return n()??[]},children:y=>f(Nr,{class:"group flex items-center justify-between gap-2",onSelect:()=>void p(y),get children(){return[(()=>{var x=gS(),E=x.firstChild,C=E.nextSibling;return w(E,()=>y.name),w(C,()=>y.cli),x})(),(()=>{var x=pS();return x.$$click=E=>{E.stopPropagation(),E.preventDefault(),m(y)},x.$$keydown=E=>E.stopPropagation(),x.$$pointerup=E=>E.stopPropagation(),x.$$pointerdown=E=>E.stopPropagation(),w(x,f(Wc,{class:"h-3.5 w-3.5 text-destructive"})),Ie(()=>We(x,"title",_("commands.deleteDef"))),x})()]}})})}}),f(Oc,{}),f(Nr,{onSelect:()=>i(!0),get children(){return[f(zi,{class:"mr-1 h-4 w-4"}),te(()=>_("commands.add"))]}})]}})]}}),null),w(v,f(on,{get open(){return o()},onOpenChange:y=>{i(y),y||g(null)},get children(){return f(yr,{class:"max-w-md",get children(){return[f(xr,{get children(){return f(vr,{get children(){return _("commands.addTitle")}})}}),(()=>{var y=lS(),x=y.firstChild,E=x.nextSibling;return y.addEventListener("submit",C=>void b(C)),w(x,()=>_("commands.name"),null),w(x,f(qn,{id:"command-name",get value(){return s()},get placeholder(){return _("commands.namePlaceholder")},onInput:C=>a(C.currentTarget.value),get disabled(){return l()}}),null),w(E,()=>_("commands.cli"),null),w(E,f(qn,{id:"command-cli",get value(){return u()},get placeholder(){return _("commands.cliPlaceholder")},onInput:C=>c(C.currentTarget.value),get disabled(){return l()}}),null),w(y,f(W,{get when(){return h()},get children(){var C=cS();return w(C,h),C}}),null),w(y,f(Kr,{get children(){return[f(xe,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return _("common.cancel")}}),f(xe,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return te(()=>!!l())()?_("common.submitting"):_("commands.submit")}})]}}),null),y})()]}})}}),null),v})()};an(["pointerdown","pointerup","keydown","click"]);var mS=B("<span>");const bS={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},nb=e=>(()=>{var t=mS();return w(t,()=>_(`commands.status.${e.status}`)),Ie(()=>Ot(t,`shrink-0 text-xs font-medium ${bS[e.status]} ${e.class??""}`)),t})();var yS=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const rb=$r.Trigger,vS=$r.Title;$r.Description;const ob=e=>{const t=q({gutter:4,flip:!1},e);return f($r,t)},ib=e=>{const[t,n]=ce(e,["class","children"]);return f($r.Portal,{get children(){return f($r.Content,q({get class(){return ot("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[te(()=>t.children),f($r.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 yS()}})]}}))}})};var xS=B('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),wS=B('<span class="truncate font-medium">'),_S=B('<span class="truncate font-mono text-xs text-muted-foreground">'),ES=B('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),CS=B('<p class="m-0 text-sm font-medium">'),SS=B('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),kS=B('<div class="flex justify-end">'),AS=B('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');function sb(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}const TS=e=>{const[t,{refetch:n,mutate:r}]=Gt(e.projectId,g=>g?he.listCommandRuns(g):Promise.resolve([])),[o,i]=N(Date.now()),[s,a]=N(null),[u,c]=N(null),l=setInterval(()=>i(Date.now()),1e3);ae(()=>clearInterval(l)),ie(()=>{e.revision?.(),n()}),ie(()=>{const g=e.projectId();if(!g)return;const p=Iw(g,m=>r(m));ae(p)});async function d(g){const p=e.projectId();if(p){a(g.runId);try{await he.clearCommandRun(p,g.runId),await n()}catch(m){Dt.error(m.message)}finally{a(null)}}}async function h(g){const p=e.projectId();if(p){c(g.runId);try{await he.clearCommandRun(p,g.runId),await he.runCommand(p,g.commandId),Dt.success(_("commands.restarted")),await n()}catch(m){Dt.error(m.message)}finally{c(null)}}}return f(W,{get when(){return(t()??[]).length>0},get children(){var g=xS(),p=g.firstChild,m=p.nextSibling;return w(p,()=>_("commands.running")),w(m,f(tt,{get each(){return t()??[]},children:b=>(()=>{var v=AS(),y=v.firstChild;return w(v,f(Sn,{get href(){return Mt(`commands/${encodeURIComponent(b.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[f(nb,{get status(){return b.status}}),(()=>{var x=wS();return w(x,()=>b.name),x})(),(()=>{var x=_S();return w(x,()=>b.cli),x})(),(()=>{var x=ES();return w(x,()=>sb(b.startedAt,b.endedAt,o())),x})()]}}),y),w(y,f(xe,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.restart")},get disabled(){return u()===b.runId||s()===b.runId},onClick:()=>void h(b),get children(){return f(Hx,{class:"h-4 w-4"})}}),null),w(y,f(ob,{get children(){return[f(rb,{as:xe,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.clear")},get disabled(){return u()===b.runId},get children(){return f(jr,{class:"h-4 w-4"})}}),f(ib,{class:"w-72",get children(){return[(()=>{var x=CS();return w(x,()=>_("commands.clearTitle")),x})(),(()=>{var x=SS();return w(x,()=>_("commands.clearDescription")),x})(),(()=>{var x=kS();return w(x,f(xe,{variant:"destructive",size:"sm",get disabled(){return s()===b.runId},onClick:()=>void d(b),get children(){return te(()=>s()===b.runId)()?_("common.deleting"):_("commands.clear")}})),x})()]}})]}}),null),v})()})),g}})};var DS=B('<span class=" text-muted-foreground">'),IS=B('<span class=" text-destructive">'),OS=B('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),RS=B('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),xf=B('<p class=" text-destructive">'),NS=B('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),MS=B('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="m-0 text-xl">'),LS=B('<p class=" text-muted-foreground">'),$S=B('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),PS=B('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),FS=B('<h2 class="my-1.5 text-base font-semibold">'),BS=B('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),zS=B('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),US=B('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),wf=B("<span>."),KS=B("<span>");const HS={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},jS={feat:"text-success",refct:"text-info",fix:"text-destructive"};function qS(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}const GS=()=>{const e=jo(),t=fo(),[n,{refetch:r}]=Gt(t,I=>I?he.listSpecs(I):Promise.resolve([])),[o,{refetch:i}]=Gt(()=>he.listProjects()),s=se(()=>(o()??[]).find(I=>I.id===t())),a=se(()=>{const I=s();return I?.worktree?(o()??[]).some(F=>F.id===I.worktree.mainProjectId):!0}),u=se(()=>{const I=s();return I?.worktree?`feat(${I.worktree.branch}): merge from worktree`:""}),[c,l]=N(!1),[d,h]=N(!1),[g,p]=N(null),[m,b]=N(!1),[v,y]=N(""),[x,E]=N(null),[C,k]=N(0),[O,S]=N(!1),[D,M]=N(null),z=Mw(he,h);Ui(()=>m()||x()!==null);let K=null;ie(()=>{const I=t();K?.(),K=null,I&&(K=ah(I,()=>{r()}))}),wn(()=>{const I=uh(()=>{(async()=>{const F=s()?.worktree?.mainProjectId??null;await i();const $=t();!$||(o()??[]).some(G=>G.id===$)||F&&e(`/${encodeURIComponent(F)}`)})()});ae(I)}),ae(()=>{K?.(),K=null});async function j(){const I=t();if(!I)return!1;p(null);try{const F=await z.check(I);return F==="running"?(p(_("home.runningTasksPreventMerge")),!1):F==="allowed"}catch(F){return p(F.message),!1}}async function T(){s()?.worktree&&a()&&await j()&&(y(u()),p(null),b(!0))}async function R(){const I=s();if(!I?.worktree||!a())return;const F=v().trim()||u();p(null);try{const $=await z.merge(I.id,async()=>{l(!0);try{return await he.mergeWorktreeToMain(I.id,{commitMessage:F})}finally{l(!1)}});if($.status==="blocked"){$.reason==="running"&&p(_("home.runningTasksPreventMerge"));return}const U=$.value;b(!1),U.status==="merged"?(Dt.success(_("home.merged")),await i(),e(`/${encodeURIComponent(U.mainProjectId)}`)):(Dt.info(_("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(U.mainProjectId)}/specs/${encodeURIComponent(U.conflictSpecId)}`))}catch($){p($.message)}}async function A(I){const F=t();if(F){S(!0),M(null);try{await he.deleteSpec(F,I),E(null),await r()}catch($){M($.message)}finally{S(!1)}}}return(()=>{var I=MS(),F=I.firstChild,$=F.firstChild,U=$.firstChild;return w(U,()=>_("home.specList")),w($,f(hS,{projectId:t,onRunStarted:()=>k(G=>G+1)}),null),w($,f(xe,{as:Sn,get href(){return Mt("git")},variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("git.title")},get children(){return f(na,{class:"h-4 w-4"})}}),null),w(F,f(ji,{}),null),w(I,f(TS,{projectId:t,revision:C}),null),w(I,f(W,{get when(){return s()?.worktree},get children(){var G=OS(),P=G.firstChild,Z=P.firstChild;return w(Z,()=>_("home.mainProject"),null),w(Z,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(G,f(xe,{variant:"default",size:"sm",onClick:()=>void T(),get disabled(){return c()||d()||!a()},get title(){return te(()=>!!a())()?_("home.mergeHint"):_("home.mainUnreachable")},get children(){return[f(ax,{class:"mr-1 h-3.5 w-3.5"}),te(()=>te(()=>!!c())()?_("home.merging"):_("home.mergeToMain"))]}}),null),w(G,f(W,{get when(){return!a()},get children(){var V=DS();return w(V,()=>_("home.mainUnreachable")),V}}),null),w(G,f(W,{get when(){return g()},get children(){var V=IS();return w(V,g),V}}),null),G}}),null),w(I,f(Qs,{get fallback(){return(()=>{var G=LS();return w(G,()=>_("common.loading")),G})()},get children(){return f(W,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var G=$S(),P=G.firstChild;return w(P,()=>_("home.noSpecs")),w(G,f(xe,{as:Sn,get href(){return Mt("specs/new")},variant:"default",size:"sm",get children(){return[f(zi,{class:"mr-1 h-4 w-4"}),te(()=>_("home.createFirst"))]}}),null),G})()},get children(){var G=RS();return w(G,f(tt,{get each(){return n()??[]},children:P=>{const Z=qS(P.id);return(()=>{var V=US(),Y=V.firstChild;return w(V,f(Sn,{get href(){return Mt(`specs/${encodeURIComponent(P.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var ee=PS(),re=ee.firstChild;return w(ee,f(Mh,{variant:"outline",get class(){return`font-mono ${HS[P.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return P.stage}}),re),w(re,()=>ch(P.updated_at)),ee})(),(()=>{var ee=FS();return w(ee,()=>P.title||_("common.pendingAgent")),ee})(),(()=>{var ee=BS();return w(ee,()=>P.summary||_("common.pendingAgent")),ee})(),(()=>{var ee=zS();return w(ee,f(W,{when:Z,get fallback(){return P.id},children:re=>[(()=>{var Q=wf(),Ce=Q.firstChild;return w(Q,()=>re().prefix,Ce),Q})(),(()=>{var Q=KS();return w(Q,()=>re().type),Ie(()=>Ot(Q,`font-semibold ${jS[re().type]??"text-foreground"}`)),Q})(),(()=>{var Q=wf();return Q.firstChild,w(Q,()=>re().suffix,null),Q})()]})),ee})()]}}),Y),w(Y,f(bl,{placement:"bottom-end",get children(){return[f(ml,{as:xe,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return _("home.moreActions")},get children(){return f(nx,{class:"h-4 w-4"})}}),f(yl,{get children(){return f(Nr,{class:"text-destructive focus:text-destructive",onSelect:()=>E(P.id),get children(){return _("common.delete")}})}})]}})),V})()}})),G}})}}),null),w(I,f(on,{get open(){return m()},onOpenChange:G=>{b(G),G||p(null)},get children(){return f(yr,{class:"max-w-md",get children(){return[f(xr,{get children(){return[f(vr,{get children(){return _("home.mergeDialogTitle")}}),f(ya,{get children(){return _("home.mergeDialogDescription")}})]}}),(()=>{var G=NS(),P=G.firstChild;return G.addEventListener("submit",Z=>{Z.preventDefault(),R()}),w(P,()=>_("home.mergeCommitMessage"),null),w(P,f(qn,{id:"merge-commit-message",get value(){return v()},onInput:Z=>y(Z.currentTarget.value),get disabled(){return c()}}),null),w(G,f(W,{get when(){return g()},get children(){var Z=xf();return w(Z,g),Z}}),null),w(G,f(Kr,{get children(){return[f(xe,{type:"button",variant:"outline",onClick:()=>b(!1),get disabled(){return c()},get children(){return _("common.cancel")}}),f(xe,{type:"submit",get disabled(){return c()||d()||!a()},get children(){return te(()=>!!c())()?_("home.merging"):_("home.mergeToMain")}})]}}),null),G})()]}})}}),null),w(I,f(on,{get open(){return x()!==null},onOpenChange:G=>{G||(E(null),M(null))},get children(){return f(yr,{class:"max-w-sm",get children(){return[f(xr,{get children(){return f(vr,{get children(){return _("home.confirmDeleteSpec")}})}}),f(W,{get when(){return D()},get children(){var G=xf();return w(G,D),G}}),f(Kr,{get children(){return[f(xe,{variant:"outline",onClick:()=>E(null),get disabled(){return O()},get children(){return _("common.cancel")}}),f(xe,{variant:"destructive",onClick:()=>x()&&void A(x()),get disabled(){return O()},get children(){return te(()=>!!O())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),I})()},ab="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",VS=5*1024*1024,Mo=10,WS=new Set(["application/pdf","text/plain","text/markdown"]);function YS(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 ZS(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 _f(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function XS(){return Math.random().toString(36).slice(2,8)}function ub(e){const[t,n]=N([]),[r,o]=N(null),[i,s]=N(null),[a,u]=N(null),[c,l]=N(""),d=se(()=>t().length),h=se(()=>t().some(M=>M.status==="pending")),g=se(()=>t().some(M=>M.status==="failed"));ae(()=>{for(const M of t())M.previewUrl&&URL.revokeObjectURL(M.previewUrl)});async function p(){const M=r();if(M)return M;const{draftId:z}=await he.createDraft(e.projectId());return o(z),z}function m(M){n(z=>[...z,M])}function b(M,z){n(K=>K.map(j=>j.id===M?{...j,...z}:j))}function v(M){n(z=>{const K=[];for(const j of z){if(j.id===M){j.previewUrl&&URL.revokeObjectURL(j.previewUrl);continue}K.push(j)}return K})}async function y(M){s(null);const z=t(),K=Mo-z.length;if(K<=0){s(_("newSpec.attachmentLimit",{max:Mo}));return}const j=[];for(const T of M.slice(0,K)){const R=ZS(T),A=YS(R);if(!A){s(_("newSpec.unsupportedType",{name:R.name}));continue}if(A!=="image"&&!WS.has(R.type)){s(_("newSpec.unsupportedMime",{mime:R.type||"(unknown)"}));continue}if(R.size>VS){s(_("newSpec.fileTooLarge",{name:R.name}));continue}const I=`att-${Date.now()}-${XS()}`,F=A==="image"?URL.createObjectURL(R):void 0;j.push({id:I,file:R,name:R.name,kind:A,previewUrl:F,status:"pending"})}if(j.length!==0){M.length>K&&s(_("newSpec.attachmentRoomLimit",{room:K,current:z.length,max:Mo}));for(const T of j)m(T);try{const T=await p();for(const R of j)try{const A=await he.uploadAttachment(e.projectId(),T,R.file);b(R.id,{storedName:A.storedName,name:A.storedName,status:"uploaded"})}catch(A){b(R.id,{status:"failed",error:A.message})}}catch(T){s(T.message);for(const R of j)b(R.id,{status:"failed",error:T.message})}}}async function x(M){const z=M.currentTarget;if(!z.files)return;const K=Array.from(z.files);z.value="",await y(K)}async function E(M){const z=M.clipboardData?.items;if(!z)return;const K=[];for(const j of Array.from(z))if(j.kind==="file"&&j.type.startsWith("image/")){const T=j.getAsFile();T&&K.push(T)}K.length!==0&&(M.preventDefault(),await y(K))}async function C(M){const z=t().find(K=>K.id===M);if(z){if(z.storedName&&r())try{await he.deleteAttachment(e.projectId(),r(),z.storedName)}catch(K){s(K.message)}v(M)}}function k(M){l(_f(M.name)),u(M.id)}async function O(M){const z=c().trim();if(u(null),!(!z||!M.storedName||!r())&&z!==_f(M.name))try{const K=await he.renameAttachment(e.projectId(),r(),M.storedName,z);b(M.id,{storedName:K.storedName,name:K.storedName})}catch(K){s(K.message)}}function S(){u(null)}function D(){const M=bt(t);for(const z of M)z.previewUrl&&URL.revokeObjectURL(z.previewUrl);M.length>0&&n([]),o(null),u(null),l(""),s(null)}return{attachments:t,draftId:r,error:i,setError:s,count:d,hasPending:h,hasFailed:g,renamingId:a,renameDraft:c,setRenameDraft:l,addFiles:y,onFileInputChange:x,onPaste:E,removeAttachment:C,beginRename:k,commitRename:O,cancelRename:S,reset:D}}var JS=B("<textarea>");const Po=e=>{const[t,n]=ce(e,["class"]);return(()=>{var r=JS();return Yn(r,q({get class(){return ot("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()};var QS=B('<li class="px-3 py-1.5 text-sm text-muted-foreground">'),ek=B('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),tk=B('<div class="relative w-full">'),nk=B("<span>"),rk=B('<div class="mr-1 flex shrink-0 items-center gap-0.5">'),ok=B('<li><button type=button class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden border-0 bg-transparent px-3 py-1.5 text-left text-sm text-inherit"><span class="min-w-0 flex-1"><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const ik=150,sk=150,ak=2,uk=10,Ef=1.5,ck=16,lk=48,dk=24,fk=8;function ru(e){return e.replace(/^\/+/,"")}function gk(e,t){return t===0?!0:/[\s/_.-]/.test(e[t-1]??"")}function Cf(e,t){if(!e)return 0;const n=e.toLowerCase(),r=t.toLowerCase();let o=0,i=-1;for(let s=0;s<n.length;s++){const a=r.indexOf(n[s],i+1);if(a===-1)return null;o+=ck,a===s&&(o+=lk),a===i+1&&(o+=dk),gk(t,a)&&(o+=fk),o-=Math.max(0,a-i-1),i=a}return o-t.length*.01}function pk(e,t){const n=ru(e.trim());if(!n)return 0;const r=Cf(n,ru(t.value)),o=t.label?Cf(n,ru(t.label)):null;return r==null?o:o==null?r:Math.max(r,o)}function hk(e,t){return t?e.map((n,r)=>{const o=pk(t,n);return o==null?null:{cmd:n,score:o,index:r}}).filter(n=>n!=null).sort((n,r)=>r.score-n.score||n.index-r.index).map(n=>n.cmd):e}const Aa=e=>{const[t,n]=N(!1),[r,o]=N([]),[i,s]=N(0),[a,u]=N(!1);let c,l=[],d=-1,h="",g="",p=null,m=null;const b=()=>e.autosize!==!1,v=()=>e.minRows??ak,y=()=>e.maxRows??uk;ae(()=>{p&&clearTimeout(p),m&&clearTimeout(m)});function x(){if(!c||!b())return;const T=getComputedStyle(c),R=parseFloat(T.fontSize)||14,A=T.lineHeight==="normal"?R*Ef:parseFloat(T.lineHeight)||R*Ef,I=parseFloat(T.paddingTop)+parseFloat(T.paddingBottom)+parseFloat(T.borderTopWidth)+parseFloat(T.borderBottomWidth),F=A*v()+I,$=A*y()+I;c.style.height="auto";const U=Math.min(Math.max(c.scrollHeight,F),$);c.style.height=`${U}px`,c.style.overflowY=c.scrollHeight>$?"auto":"hidden"}wn(x),ie(mt(()=>e.value,x));function E(){n(!1),u(!1),o([]),s(0),d=-1,h="",g="",l=[],p&&(clearTimeout(p),p=null)}function C(T){p&&clearTimeout(p),p=setTimeout(async()=>{const R=e.projectId;if(R)try{const A=await he.listFiles(R,T);l=[],o(A.items.map(I=>({kind:"mention",value:I}))),s(0)}catch{o([])}},ik)}function k(T){const R=e.slashCommands??[];if(R.length===0)return!1;const A=T.selectionStart,I=T.value.slice(0,A);if(!/^\/[\w-]*$/.test(I))return!1;d=-1,h="",g=I.slice(1);const F=hk(R,g).map($=>({kind:"slash",value:$.value,label:$.label??$.value,description:$.description,replacement:$.replacement,action:$.action,customId:$.customId,editable:$.editable,editLabel:$.editLabel,deletable:$.deletable,deleteLabel:$.deleteLabel,icon:$.icon,command:$}));return l=[],o(F),s(0),F.length>0?(u(!1),n(!0)):e.slashEmptyLabel?(u(!0),n(!0)):E(),!0}function O(T){const R=T.selectionStart,A=T.value.slice(0,R),I=A.lastIndexOf("@");if(I===-1){E();return}const F=A.slice(I+1);if(!/^[\w./@-]*$/.test(F)){E();return}d=I,h=F,t()||n(!0),C(F)}function S(T){k(T)||O(T)}function D(T){if(T.kind==="slash"&&T.action==="add"){const V=e.value.slice(1+g.length);e.onValueChange(V),E(),e.onSlashCommandAction?.(T.command),requestAnimationFrame(()=>c?.focus());return}const R=e.value,A=T.kind==="slash",I=A?0:d,F=A?g.length:h.length,$=R.slice(0,I),U=R.slice(I+1+F),G=A?T.replacement??`${T.value} `:`@${T.value}`;e.onValueChange($+G+U),E();const P=$.length+G.length;requestAnimationFrame(()=>{c&&(c.focus(),c.setSelectionRange(P,P),x())})}function M(T){if(T.kind!=="slash")return;e.onDeleteSlashCommand?.(T.command);let R=!1;o(A=>{const I=A.filter(F=>F.kind!=="slash"||!T.customId||F.customId!==T.customId);return s(F=>Math.min(F,Math.max(0,I.length-1))),R=I.length===0,I}),R&&E()}function z(T){T.kind==="slash"&&(e.onEditSlashCommand?.(T.command),E(),requestAnimationFrame(()=>c?.focus()))}function K(){l[i()]?.scrollIntoView({block:"nearest"})}function j(T){const R=r();if(t()&&R.length>0){if(T.key==="ArrowDown"){T.preventDefault(),s(A=>(A+1)%R.length),requestAnimationFrame(K);return}if(T.key==="ArrowUp"){T.preventDefault(),s(A=>(A-1+R.length)%R.length),requestAnimationFrame(K);return}if(T.key==="Enter"||T.key==="Tab"){if(!T.isComposing){T.preventDefault(),D(R[i()]);return}}else if(T.key==="Escape"){T.preventDefault(),E();return}}e.onKeyDown?.(T)}return(()=>{var T=tk();return w(T,f(Po,{ref(R){var A=c;typeof A=="function"?A(R):c=R},get rows(){return e.rows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return ot(b()&&"resize-none",e.class)},onInput:R=>{e.onValueChange(R.currentTarget.value),S(R.currentTarget),x()},onKeyDown:j,onPaste:R=>e.onPaste?.(R),onBlur:()=>{m&&clearTimeout(m),m=setTimeout(E,sk)}}),null),w(T,f(W,{get when(){return te(()=>!!t())()&&(r().length>0||a())},get children(){var R=ek();return w(R,f(W,{get when(){return a()},get children(){var A=QS();return w(A,()=>e.slashEmptyLabel),A}}),null),w(R,f(tt,{get each(){return r()},children:(A,I)=>(()=>{var F=ok(),$=F.firstChild,U=$.firstChild,G=U.firstChild;return F.addEventListener("mouseenter",()=>s(I())),br(P=>l[I()]=P,F),$.$$mousedown=P=>{P.preventDefault(),D(A)},w($,f(W,{get when(){return te(()=>A.kind==="slash")()&&A.icon==="plus"},get children(){return f(zi,{class:"h-3.5 w-3.5 shrink-0"})}}),U),w(G,(()=>{var P=te(()=>A.kind==="slash");return()=>P()?A.label:A.value})()),w(U,f(W,{get when(){return te(()=>A.kind==="slash")()&&A.description},get children(){var P=nk();return w(P,(()=>{var Z=te(()=>A.kind==="slash");return()=>Z()?A.description:""})()),Ie(()=>Ot(P,ot("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",i()===I()?"text-primary-foreground/80":"text-muted-foreground"))),P}}),null),w(F,f(W,{get when(){return te(()=>A.kind==="slash")()&&(A.editable||A.deletable)},get children(){var P=rk();return w(P,f(W,{get when(){return te(()=>A.kind==="slash")()&&A.editable},get children(){return f(xe,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return te(()=>A.kind==="slash")()?A.editLabel:void 0},get class(){return ot("h-7 w-7 p-0",i()===I()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation(),z(A)},get children(){return f(nh,{class:"h-3.5 w-3.5"})}})}}),null),w(P,f(W,{get when(){return te(()=>A.kind==="slash")()&&A.deletable},get children(){return f(xe,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return te(()=>A.kind==="slash")()?A.deleteLabel:void 0},get class(){return ot("h-7 w-7 p-0",i()===I()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-destructive hover:bg-destructive/10 hover:text-destructive")},onMouseDown:Z=>{Z.preventDefault(),Z.stopPropagation(),M(A)},get children(){return f(Wc,{class:"h-3.5 w-3.5"})}})}}),null),P}}),null),Ie(P=>{var Z=ot("flex items-center",i()===I()?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),V=A.kind==="slash"&&A.description?A.description:A.value;return Z!==P.e&&Ot(F,P.e=Z),V!==P.t&&We($,"title",P.t=V),P},{e:void 0,t:void 0}),F})()}),null),R}}),null),T})()};an(["mousedown"]);const cb=Ti.Trigger,lb=e=>{const t=q({gutter:4,flip:!1},e);return f(Ti,t)},db=e=>{const[t,n]=ce(e,["class"]);return f(Ti.Portal,{get children(){return f(Ti.Content,q({get class(){return ot("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var mk=B('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const bk=e=>f(on,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(on.Portal,{get children(){return[f(on.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(on.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[f(W,{get when(){return e.src},get children(){var t=mk();return Ie(n=>{var r=e.src,o=e.alt;return r!==n.e&&We(t,"src",n.e=r),o!==n.t&&We(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),f(on.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return f(jr,{class:"h-4 w-4"})}})]}})]}})}});var yk=B('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),fb=B('<img class="h-full w-full object-cover">'),vk=B('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),xk=B('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),wk=B('<span class="text-xs font-bold text-muted-foreground">'),_k=B('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),Ek=B('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),Ck=B('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),Sk=B('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function kk(e){return e.status==="pending"?`${e.name} · ${_("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${_("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const gb=e=>{const t=e.ctrl,[n,r]=N(),[o,i]=N(),[s,a]=N(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return f(W,{get when(){return e.compact},get fallback(){return f(Ak,e)},get children(){return[(()=>{var c=yk();return w(c,f(tt,{get each(){return t.attachments()},children:l=>(()=>{var d=xk(),h=d.firstChild;return w(d,f(lb,{openDelay:150,closeDelay:0,get children(){return[f(cb,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[f(W,{get when(){return te(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var g=wk();return w(g,()=>l.kind==="pdf"?"PDF":"TXT"),g})()},get children(){var g=fb();return Ie(p=>{var m=l.previewUrl,b=l.name;return m!==p.e&&We(g,"src",p.e=m),b!==p.t&&We(g,"alt",p.t=b),p},{e:void 0,t:void 0}),g}}),f(W,{get when(){return l.status==="pending"},get children(){var g=vk();return w(g,f(Un,{class:"h-4 w-4 animate-spin text-muted-foreground"})),g}})]}}),f(db,{get children(){return kk(l)}})]}}),h),h.$$click=()=>void t.removeAttachment(l.id),w(h,f(jr,{class:"h-3 w-3"})),Ie(g=>{var p=e.busy,m=_("newSpec.deleteAttachment",{name:l.name});return p!==g.e&&(h.disabled=g.e=p),m!==g.t&&We(h,"aria-label",g.t=m),g},{e:void 0,t:void 0}),d})()})),c})(),f(bk,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},Ak=e=>{const t=e.ctrl;return(()=>{var n=_k();return w(n,f(tt,{get each(){return t.attachments()},children:r=>(()=>{var o=Ek(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,f(W,{get when(){return te(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=Ck();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=fb();return Ie(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&We(u,"src",c.e=l),d!==c.t&&We(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,f(W,{get when(){return te(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=Sk();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),Ie(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?_("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&We(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return f(qn,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,f(W,{get when(){return r.status==="pending"},get children(){return[f(Un,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),te(()=>_("newSpec.uploading"))]}}),null),w(a,f(W,{get when(){return r.status==="failed"},get children(){return _("newSpec.uploadFailed",{error:r.error})}}),null),w(a,f(W,{get when(){return r.status==="uploaded"},get children(){return[te(()=>Math.round(r.file.size/1024))," KB · ",te(()=>r.kind)]}}),null),w(o,f(xe,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return _("newSpec.deleteAttachment",{name:r.name})},get children(){return f(jr,{class:"h-3.5 w-3.5"})}}),null),Ie(()=>Ot(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})()};an(["click"]);var Tk=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Di=Pr.Label,Fo=Pr;Pr.ErrorMessage;Pr.Description;const Bo=e=>{const[t,n]=ce(e,["class","children"]);return[f(Pr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),f(Pr.Control,q({get class(){return ot("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return f(Pr.Indicator,{class:"flex items-center justify-center text-current",get children(){return Tk()}})}}))]};In.Description;In.ErrorMessage;In.ItemDescription;const Xt=In.ItemInput,Jt=In.ItemLabel,Ii=In.Label,xn=In,Qt=In.Item,rn=e=>{const[t,n]=ce(e,["class"]);return f(In.ItemControl,q({get class(){return ot("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return f(In.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var Dk=B('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),Ik=B('<span class="truncate font-medium text-foreground">');const Qi=e=>(()=>{var t=Dk();return w(t,f(tt,{get each(){return e.items},children:(n,r)=>[f(W,{get when(){return r()>0},get children(){return f(Qp,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),f(W,{get when(){return n.href},get fallback(){return(()=>{var o=Ik();return w(o,()=>n.label),o})()},get children(){return f(Sn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})();var Sf=B('<span class="text-sm text-muted-foreground">'),Ok=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><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>'),Rk=B('<strong class=" ">'),Nk=B('<p class=" text-destructive">'),Mk=B('<p class=" text-muted-foreground">');const Lk=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],$k="yorz:new-spec-draft:";function Pk(e){return e==="feat"||e==="refct"||e==="fix"}function Dl(e){return`${$k}${e}`}function Fk(e){if(!e||typeof window>"u")return{};try{const t=window.localStorage.getItem(Dl(e));if(!t)return{};const n=JSON.parse(t);return{content:typeof n.content=="string"?n.content:void 0,type:Pk(n.type)?n.type:void 0,useWorktree:typeof n.useWorktree=="boolean"?n.useWorktree:void 0}}catch{return{}}}function Bk(e,t){if(!(!e||typeof window>"u"))try{const n=t.content.trim().length>0||t.type!=="feat"||t.useWorktree!==!1,r=Dl(e);if(!n){window.localStorage.removeItem(r);return}window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function kf(e){return JSON.stringify(e)}function Af(e){if(!(!e||typeof window>"u"))try{window.localStorage.removeItem(Dl(e))}catch{}}const zk=()=>{const e=jo(),t=fo(),[n,r]=N(""),[o,i]=N("feat"),[s,a]=N("idle"),[u,c]=N(!1),l=()=>s()==="creating",d=ub({projectId:t}),h=d.error,g=d.setError;let p=null,m=null,b=new Set,v="",y="",x=!1,E,C=!1,k="";ae(()=>{p?.(),m?.()}),ie(mt(t,D=>{C=!0;const M=Fk(D);r(M.content??""),i(M.type??"feat"),c(M.useWorktree??!1),C=!1})),ie(()=>{if(C||l())return;const D={content:n(),type:o(),useWorktree:u()};kf(D)!==k&&(k="",Bk(t(),D))});async function O(){if(x)return;const D=v||t();try{const z=(await he.listSpecs(D)).find(K=>!b.has(K.id));if(z){x=!0,p?.(),p=null,m?.(),m=null;const K=D?`/${D}/specs/${encodeURIComponent(z.id)}`:Mt(`specs/${encodeURIComponent(z.id)}`);e(K),y&&(Do(y),y="")}}catch{}}async function S(D){if(D.preventDefault(),s()==="creating")return;g(null);const M=n().trim();if(M.length<5){g(_("newSpec.descTooShort"));return}const z=d.attachments().filter(K=>K.status==="failed");if(z.length>0){g(_("newSpec.attachmentFailedCount",{count:z.length}));return}if(d.hasPending()){g(_("newSpec.attachmentUploading"));return}a("creating"),x=!1;try{const K=t();k=kf({content:n(),type:o(),useWorktree:u()}),Af(K);let j=K;if(u()){const F=Uk(M);j=(await he.createWorktree(K,{specSlug:F})).id,Af(j)}v=j;const T=await he.listSpecs(j);b=new Set(T.map(F=>F.id));const R={type:o(),requirement:M},A=d.draftId();A&&(R.draftId=A);const I=await he.createSpec(j,R);"draft"in I&&I.draft?(y=I.sessionId,m=ia(j,I.sessionId,{onEvent:F=>{F.type==="error"&&(a("failed"),g(F.message||_("newSpec.agentRunFailed")),m?.(),m=null)}}),p=ah(j,()=>{O()}),O()):"id"in I&&e(`/${j}/specs/${encodeURIComponent(I.id)}`)}catch(K){g(K.message),a("failed")}}return(()=>{var D=Ok(),M=D.firstChild,z=M.nextSibling,K=z.nextSibling,j=K.firstChild,T=j.firstChild,R=j.nextSibling,A=R.firstChild,I=A.firstChild,F=I.nextSibling,$=F.nextSibling;w(M,f(Qi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:_("breadcrumb.newSpec")}]}})),w(z,()=>_("newSpec.description")),K.addEventListener("submit",S),w(K,f(xn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:G=>i(G),get disabled(){return l()},get children(){return[f(Ii,{class:"mb-1.5 w-full font-medium",get children(){return _("newSpec.type")}}),te(()=>Lk.map(G=>f(Qt,{get value(){return G.value},class:"flex min-h-[44px] flex-1",get children(){return[f(Xt,{class:"sr-only"}),f(Jt,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===G.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var P=Rk();return w(P,()=>_(G.labelKey)),P})(),(()=>{var P=Sf();return w(P,()=>_(G.hintKey)),P})()]}})]}})))]}}),j),w(K,f(Fo,{get checked(){return u()},onChange:G=>c(G),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[f(Bo,{}),f(Di,{class:"cursor-pointer font-medium",get children(){return _("newSpec.parallelWorktree")}}),(()=>{var G=Sf();return w(G,()=>_("newSpec.parallelWorktreeDesc")),G})()]}}),j),w(T,()=>_("newSpec.requirement")),w(j,f(Aa,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return _("newSpec.requirementPlaceholder")},autosize:!1,rows:10,required:!0,autofocus:!0,get disabled(){return l()},class:"resize-y"}),null),Ms(R,"paste",d.onPaste),w(I,()=>_("newSpec.attachments")),w(F,()=>_("newSpec.attachmentsHint",{count:d.count(),max:Mo})),w(A,f(xe,{variant:"outline",size:"sm",type:"button",onClick:()=>E?.click(),get disabled(){return l()||d.count()>=Mo},get children(){return[f(gw,{class:"mr-1 h-3.5 w-3.5"}),te(()=>_("newSpec.importAttachment"))]}}),$),Ms($,"change",d.onFileInputChange);var U=E;return typeof U=="function"?br(U,$):E=$,We($,"accept",ab),w(R,f(W,{get when(){return d.count()>0},get children(){return f(gb,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(K,(()=>{var G=te(()=>!!h());return()=>G()&&(()=>{var P=Nk();return w(P,h),P})()})(),null),w(K,f(xe,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[te(()=>te(()=>!!l())()?f(Un,{class:"mr-1 h-4 w-4 animate-spin"}):f(ra,{class:"mr-1 h-4 w-4"})),te(()=>te(()=>!!l())()?_("newSpec.creating"):_("newSpec.createAndStart"))]}}),null),w(K,(()=>{var G=te(()=>!!l());return()=>G()&&(()=>{var P=Mk();return w(P,()=>_("newSpec.creatingHint")),P})()})(),null),D})()};function Uk(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 Tf=11;function Kk(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Tf||e.nodeType===Tf)){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 xs,Hk="http://www.w3.org/1999/xhtml",en=typeof document>"u"?void 0:document,jk=!!en&&"content"in en.createElement("template"),qk=!!en&&en.createRange&&"createContextualFragment"in en.createRange();function Gk(e){var t=en.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function Vk(e){xs||(xs=en.createRange(),xs.selectNode(en.body));var t=xs.createContextualFragment(e);return t.childNodes[0]}function Wk(e){var t=en.createElement("body");return t.innerHTML=e,t.childNodes[0]}function Yk(e){return e=e.trim(),jk?Gk(e):qk?Vk(e):Wk(e)}function ws(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 Zk(e,t){return!t||t===Hk?en.createElement(e):en.createElementNS(t,e)}function Xk(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function ou(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Df={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)}ou(e,t,"selected")},INPUT:function(e,t){ou(e,t,"checked"),ou(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}}},oi=1,If=11,Of=3,Rf=8;function Ir(){}function Jk(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function Qk(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=en.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=en.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=Yk(r);else r.nodeType===If&&(r=r.firstElementChild);var u=o.getNodeKey||Jk,c=o.onBeforeNodeAdded||Ir,l=o.onNodeAdded||Ir,d=o.onBeforeElUpdated||Ir,h=o.onElUpdated||Ir,g=o.onBeforeNodeDiscarded||Ir,p=o.onNodeDiscarded||Ir,m=o.onBeforeElChildrenUpdated||Ir,b=o.skipFromChildren||Ir,v=o.addChild||function($,U){return $.appendChild(U)},y=o.childrenOnly===!0,x=Object.create(null),E=[];function C($){E.push($)}function k($,U){if($.nodeType===oi)for(var G=$.firstChild;G;){var P=void 0;U&&(P=u(G))?C(P):(p(G),G.firstChild&&k(G,U)),G=G.nextSibling}}function O($,U,G){g($)!==!1&&(U&&U.removeChild($),p($),k($,G))}function S($){if($.nodeType===oi||$.nodeType===If)for(var U=$.firstChild;U;){var G=u(U);G&&(x[G]=U),S(U),U=U.nextSibling}}S(n);function D($){l($);for(var U=$.firstChild;U;){var G=U.nextSibling,P=u(U);if(P){var Z=x[P];Z&&ws(U,Z)?(U.parentNode.replaceChild(Z,U),z(Z,U)):D(U)}else D(U);U=G}}function M($,U,G){for(;U;){var P=U.nextSibling;(G=u(U))?C(G):O(U,$,!0),U=P}}function z($,U,G){var P=u(U);if(P&&delete x[P],!G){var Z=d($,U);if(Z===!1||(Z instanceof HTMLElement&&($=Z,S($)),e($,U),h($),m($,U)===!1))return}$.nodeName!=="TEXTAREA"?K($,U):Df.TEXTAREA($,U)}function K($,U){var G=b($,U),P=U.firstChild,Z=$.firstChild,V,Y,ee,re,Q;e:for(;P;){for(re=P.nextSibling,V=u(P);!G&&Z;){if(ee=Z.nextSibling,P.isSameNode&&P.isSameNode(Z)){P=re,Z=ee;continue e}Y=u(Z);var Ce=Z.nodeType,Oe=void 0;if(Ce===P.nodeType&&(Ce===oi?(V?V!==Y&&((Q=x[V])?ee===Q?Oe=!1:($.insertBefore(Q,Z),Y?C(Y):O(Z,$,!0),Z=Q,Y=u(Z)):Oe=!1):Y&&(Oe=!1),Oe=Oe!==!1&&ws(Z,P),Oe&&z(Z,P)):(Ce===Of||Ce==Rf)&&(Oe=!0,Z.nodeValue!==P.nodeValue&&(Z.nodeValue=P.nodeValue))),Oe){P=re,Z=ee;continue e}Y?C(Y):O(Z,$,!0),Z=ee}if(V&&(Q=x[V])&&ws(Q,P))G||v($,Q),z(Q,P);else{var Ye=c(P);Ye!==!1&&(Ye&&(P=Ye),P.actualize&&(P=P.actualize($.ownerDocument||en)),v($,P),D(P))}P=re,Z=ee}M($,Z,Y);var nt=Df[$.nodeName];nt&&nt($,U)}var j=n,T=j.nodeType,R=r.nodeType;if(!y){if(T===oi)R===oi?ws(n,r)||(p(n),j=Xk(n,Zk(r.nodeName,r.namespaceURI))):j=r;else if(T===Of||T===Rf){if(R===T)return j.nodeValue!==r.nodeValue&&(j.nodeValue=r.nodeValue),j;j=r}}if(j===r)p(n);else{if(r.isSameNode&&r.isSameNode(j))return;if(z(j,r,y),E)for(var A=0,I=E.length;A<I;A++){var F=x[E[A]];F&&O(F,F.parentNode,!1)}}return!y&&j!==n&&n.parentNode&&(j.actualize&&(j=j.actualize(n.ownerDocument||en)),n.parentNode.replaceChild(j,n)),j}}var e3=Qk(Kk);const Nf={};function t3(e){let t=Nf[e];if(t)return t;t=Nf[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 zo(e,t){typeof t!="string"&&(t=zo.defaultChars);const n=t3(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})}zo.defaultChars=";/?:@&=+$,#";zo.componentChars="";const Mf={};function n3(e){let t=Mf[e];if(t)return t;t=Mf[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 es(e,t,n){typeof t!="string"&&(n=t,t=es.defaultChars),typeof n>"u"&&(n=!0);const r=n3(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}es.defaultChars=";/?:@&=+$,-_.!~*'()#";es.componentChars="-_.!~*'()";function Il(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 qs(){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 r3=/^([a-z0-9.+-]+:)/i,o3=/:[0-9]*$/,i3=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s3=["<",">",'"',"`"," ","\r",`
|
|
7
|
-
`," "],a3=["{","}","|","\\","^","`"].concat(s3),u3=["'"].concat(a3),Lf=["%","/","?",";","#"].concat(u3),$f=["/","?","#"],c3=255,Pf=/^[+a-z0-9A-Z_-]{0,63}$/,l3=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ff={javascript:!0,"javascript:":!0},Bf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ol(e,t){if(e&&e instanceof qs)return e;const n=new qs;return n.parse(e,t),n}qs.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=i3.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=r3.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&&Ff[s])&&(i=i.substr(2),this.slashes=!0)),!Ff[s]&&(o||s&&!Bf[s])){let c=-1;for(let p=0;p<$f.length;p++)r=i.indexOf($f[p]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let p=0;p<Lf.length;p++)r=i.indexOf(Lf[p]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const h=i.slice(0,c);i=i.slice(c),this.parseHost(h),this.hostname=this.hostname||"";const g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){const p=this.hostname.split(/\./);for(let m=0,b=p.length;m<b;m++){const v=p[m];if(v&&!v.match(Pf)){let y="";for(let x=0,E=v.length;x<E;x++)v.charCodeAt(x)>127?y+="x":y+=v[x];if(!y.match(Pf)){const x=p.slice(0,m),E=p.slice(m+1),C=v.match(l3);C&&(x.push(C[1]),E.unshift(C[2])),E.length&&(i=E.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>c3&&(this.hostname=""),g&&(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),Bf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};qs.prototype.parseHost=function(e){let t=o3.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 d3=Object.freeze(Object.defineProperty({__proto__:null,decode:zo,encode:es,format:Il,parse:Ol},Symbol.toStringTag,{value:"Module"})),pb=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,hb=/[\0-\x1F\x7F-\x9F]/,f3=/[\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]/,Rl=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,mb=/[\$\+<->\^`\|~\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]/,bb=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,g3=Object.freeze(Object.defineProperty({__proto__:null,Any:pb,Cc:hb,Cf:f3,P:Rl,S:mb,Z:bb},Symbol.toStringTag,{value:"Module"})),p3=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))),h3=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var iu;const m3=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]]),b3=(iu=String.fromCodePoint)!==null&&iu!==void 0?iu: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 y3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=m3.get(e))!==null&&t!==void 0?t:e}var Pt;(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"})(Pt||(Pt={}));const v3=32;var Mr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mr||(Mr={}));function Nc(e){return e>=Pt.ZERO&&e<=Pt.NINE}function x3(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_F||e>=Pt.LOWER_A&&e<=Pt.LOWER_F}function w3(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_Z||e>=Pt.LOWER_A&&e<=Pt.LOWER_Z||Nc(e)}function _3(e){return e===Pt.EQUALS||w3(e)}var $t;(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"})($t||($t={}));var fr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(fr||(fr={}));class E3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=$t.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=fr.Strict}startEntity(t){this.decodeMode=t,this.state=$t.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case $t.EntityStart:return t.charCodeAt(n)===Pt.NUM?(this.state=$t.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=$t.NamedEntity,this.stateNamedEntity(t,n));case $t.NumericStart:return this.stateNumericStart(t,n);case $t.NumericDecimal:return this.stateNumericDecimal(t,n);case $t.NumericHex:return this.stateNumericHex(t,n);case $t.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|v3)===Pt.LOWER_X?(this.state=$t.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=$t.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(Nc(o)||x3(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(Nc(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===Pt.SEMI)this.consumed+=1;else if(this.decodeMode===fr.Strict)return 0;return this.emitCodePoint(y3(this.result),this.consumed),this.errors&&(t!==Pt.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&Mr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=C3(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===fr.Attribute&&(i===0||_3(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&Mr.VALUE_LENGTH)>>14,i!==0){if(s===Pt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==fr.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]&Mr.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]&~Mr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case $t.NamedEntity:return this.result!==0&&(this.decodeMode!==fr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $t.NumericDecimal:return this.emitNumericEntity(0,2);case $t.NumericHex:return this.emitNumericEntity(0,3);case $t.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $t.EntityStart:return 0}}}function yb(e){let t="";const n=new E3(e,r=>t+=b3(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 C3(e,t,n,r){const o=(t&Mr.BRANCH_LENGTH)>>7,i=t&Mr.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 vb=yb(p3);yb(h3);function S3(e,t=fr.Legacy){return vb(e,t)}function k3(e){return vb(e,fr.Strict)}function A3(e){return Object.prototype.toString.call(e)}function Nl(e){return A3(e)==="[object String]"}const T3=Object.prototype.hasOwnProperty;function D3(e,t){return T3.call(e,t)}function Ta(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 xb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Ml(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 Oi(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 wb=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,I3=/&([a-z#][a-z0-9]{1,31});/gi,O3=new RegExp(wb.source+"|"+I3.source,"gi"),R3=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function N3(e,t){if(t.charCodeAt(0)===35&&R3.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Ml(r)?Oi(r):e}const n=S3(e);return n!==e?n:e}function M3(e){return e.indexOf("\\")<0?e:e.replace(wb,"$1")}function Uo(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(O3,function(t,n,r){return n||N3(t,r)})}const L3=/[&<>"]/,$3=/[&<>"]/g,P3={"&":"&","<":"<",">":">",'"':"""};function F3(e){return P3[e]}function Hr(e){return L3.test(e)?e.replace($3,F3):e}const B3=/[.?*+^$[\]\\(){}|-]/g;function z3(e){return e.replace(B3,"\\$&")}function ht(e){switch(e){case 9:case 32:return!0}return!1}function Ri(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 _b(e){return Rl.test(e)||mb.test(e)}function Ni(e){return _b(Oi(e))}function Mi(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 Da(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function zf(e){return e===32||e===9||e===10||e===13}function Ia(e){let t=0;for(;t<e.length&&zf(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&zf(e.charCodeAt(n));n--);return e.slice(t,n+1)}const U3={mdurl:d3,ucmicro:g3},K3=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:xb,asciiTrim:Ia,assign:Ta,escapeHtml:Hr,escapeRE:z3,fromCodePoint:Oi,has:D3,isMdAsciiPunct:Mi,isPunctChar:_b,isPunctCharCode:Ni,isSpace:ht,isString:Nl,isValidEntityCode:Ml,isWhiteSpace:Ri,lib:U3,normalizeReference:Da,unescapeAll:Uo,unescapeMd:M3},Symbol.toStringTag,{value:"Module"}));function H3(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 j3(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=Uo(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=Uo(e.slice(t,o)),i.pos=o,i.ok=!0),i}function q3(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+=Uo(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+=Uo(e.slice(t,i)),s}const G3=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:j3,parseLinkLabel:H3,parseLinkTitle:q3},Symbol.toStringTag,{value:"Module"})),er={};er.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+Hr(i.content)+"</code>"};er.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+Hr(e[t].content)+`</code></pre>
|
|
8
|
-
`};er.fence=function(e,t,n,r,o){const i=e[t],s=i.info?Uo(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)||Hr(i.content):c=Hr(i.content),c.indexOf("<pre")===0)return c+`
|
|
9
|
-
`;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const h={attrs:d};return`<pre><code${o.renderAttrs(h)}>${c}</code></pre>
|
|
10
|
-
`}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
|
|
11
|
-
`};er.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)};er.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
12
|
-
`:`<br>
|
|
13
|
-
`};er.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
14
|
-
`:`<br>
|
|
15
|
-
`:`
|
|
16
|
-
`};er.text=function(e,t){return Hr(e[t].content)};er.html_block=function(e,t){return e[t].content};er.html_inline=function(e,t){return e[t].content};function Vo(){this.rules=Ta({},er)}Vo.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Hr(t.attrs[n][0])+'="'+Hr(t.attrs[n][1])+'"';return o};Vo.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
|
|
17
|
-
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
18
|
-
`:">",i};Vo.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};Vo.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
19
|
-
`;break}return r};Vo.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 sn(){this.__rules__=[],this.__cache__=null}sn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};sn.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))})})};sn.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};sn.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};sn.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};sn.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};sn.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};sn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};sn.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};sn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function On(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}On.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};On.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};On.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};On.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};On.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 Eb(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Eb.prototype.Token=On;const V3=/\r\n?|\n/g,W3=/\0/g;function Y3(e){let t;t=e.src.replace(V3,`
|
|
20
|
-
`),t=t.replace(W3,"�"),e.src=t}function Z3(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 X3(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 J3(e){return/^<a[>\s]/i.test(e)}function Q3(e){return/^<\/a\s*>/i.test(e)}function eA(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"&&(J3(a.content)&&i>0&&i--,Q3(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,h=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let g=0;g<c.length;g++){const p=c[g].url,m=e.md.normalizeLink(p);if(!e.md.validateLink(m))continue;let b=c[g].text;c[g].schema?c[g].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");const v=c[g].index;if(v>h){const C=new e.Token("text","",0);C.content=u.slice(h,v),C.level=d,l.push(C)}const y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",l.push(y);const x=new e.Token("text","",0);x.content=b,x.level=d,l.push(x);const E=new e.Token("link_close","a",-1);E.level=--d,E.markup="linkify",E.info="auto",l.push(E),h=c[g].lastIndex}if(h<u.length){const g=new e.Token("text","",0);g.content=u.slice(h),g.level=d,l.push(g)}t[n].children=o=xb(o,s,l)}}}}const Cb=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,tA=/\((c|tm|r)\)/i,nA=/\((c|tm|r)\)/ig,rA={c:"©",r:"®",tm:"™"};function oA(e,t){return rA[t.toLowerCase()]}function iA(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(nA,oA)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function sA(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Cb.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 aA(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(tA.test(e.tokens[t].content)&&iA(e.tokens[t].children),Cb.test(e.tokens[t].content)&&sA(e.tokens[t].children))}const uA=/['"]/,Uf=/['"]/g,Kf="’";function _s(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function cA(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 lA(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;){Uf.lastIndex=c;const d=Uf.exec(u);if(!d)break;let h=!0,g=!0;c=d.index+1;const p=d[0]==="'";let m=32;if(d.index-1>=0)m=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){m=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c<l)b=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}const v=Mi(m)||Ni(m),y=Mi(b)||Ni(b),x=Ri(m),E=Ri(b);if(E?h=!1:y&&(x||v||(h=!1)),x?g=!1:v&&(E||y||(g=!1)),b===34&&d[0]==='"'&&m>=48&&m<=57&&(g=h=!1),h&&g&&(h=v,g=y),!h&&!g){p&&_s(o,i,d.index,Kf);continue}if(g)for(n=r.length-1;n>=0;n--){let C=r[n];if(r[n].level<a)break;if(C.single===p&&r[n].level===a){C=r[n];let k,O;p?(k=t.md.options.quotes[2],O=t.md.options.quotes[3]):(k=t.md.options.quotes[0],O=t.md.options.quotes[1]),_s(o,i,d.index,O),_s(o,C.token,C.pos,k),r.length=n;continue e}}h?r.push({token:i,pos:d.index,single:p,level:a}):g&&p&&_s(o,i,d.index,Kf)}}Object.keys(o).forEach(function(i){e[i].content=cA(e[i].content,o[i])})}function dA(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!uA.test(e.tokens[t].content)||lA(e.tokens[t].children,e)}function fA(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 su=[["normalize",Y3],["block",Z3],["inline",X3],["linkify",eA],["replacements",aA],["smartquotes",dA],["text_join",fA]];function Ll(){this.ruler=new sn;for(let e=0;e<su.length;e++)this.ruler.push(su[e][0],su[e][1])}Ll.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Ll.prototype.State=Eb;function tr(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(ht(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}tr.prototype.push=function(e,t,n){const r=new On(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};tr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};tr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};tr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!ht(r))break}return t};tr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ht(this.src.charCodeAt(--t)))return t+1;return t};tr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};tr.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};tr.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 h=this.src.charCodeAt(l);if(ht(h))h===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("")};tr.prototype.Token=On;const gA=65536;function au(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Hf(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 pA(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&&!ht(a)||s===45&&ht(a))return!1;for(;i<e.eMarks[o];){const E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!ht(E))return!1;i++}let u=au(e,t+1),c=u.split("|");const l=[];for(let E=0;E<c.length;E++){const C=c[E].trim();if(!C){if(E===0||E===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?l.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=au(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Hf(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 h=e.parentType;e.parentType="table";const g=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),m=[t,0];p.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let E=0;E<c.length;E++){const C=e.push("th_open","th",1);l[E]&&(C.attrs=[["style","text-align:"+l[E]]]);const k=e.push("inline","",0);k.content=c[E].trim(),k.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let E=!1;for(let k=0,O=g.length;k<O;k++)if(g[k](e,o,n,!0)){E=!0;break}if(E||(u=au(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Hf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>gA))break;if(o===t+2){const k=e.push("tbody_open","tbody",1);k.map=y=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[o,o+1];for(let k=0;k<d;k++){const O=e.push("td_open","td",1);l[k]&&(O.attrs=[["style","text-align:"+l[k]]]);const S=e.push("inline","",0);S.content=c[k]?c[k].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=h,e.line=o,!0}function hA(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
21
|
-
`,i.map=[t,e.line],!0}function mA(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,h=!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)))){h=!0;break}u=e.sCount[t],e.line=d+(h?1:0);const g=e.push("fence","code",0);return g.info=l,g.content=e.getLines(t+1,d,u,!0),g.markup=c,g.map=[t,e.line],!0}function bA(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"),h=e.parentType;e.parentType="blockquote";let g=!1,p;for(p=t;p<n;p++){const x=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let C=e.sCount[p]+1,k,O;e.src.charCodeAt(o)===32?(o++,C++,O=!1,k=!0):e.src.charCodeAt(o)===9?(k=!0,(e.bsCount[p]+C)%4===3?(o++,C++,O=!1):O=!0):k=!1;let S=C;for(a.push(e.bMarks[p]),e.bMarks[p]=o;o<i;){const D=e.src.charCodeAt(o);if(ht(D))D===9?S+=4-(S+e.bsCount[p]+(O?1:0))%4:S++;else break;o++}g=o>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(k?1:0),c.push(e.sCount[p]),e.sCount[p]=S-C,l.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(g)break;let E=!1;for(let C=0,k=d.length;C<k;C++)if(d[C](e,p,n,!0)){E=!0;break}if(E){e.lineMax=p,e.blkIndent!==0&&(a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const v=[t,0];b.map=v,e.md.block.tokenize(e,t,p);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=h,v[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=m,!0}function yA(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&&!ht(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 jf(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(!ht(i))return-1}return r}function qf(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),!ht(i))?-1:o}function vA(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 xA(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,h,g;if((g=qf(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(s,g-1)),l&&h!==1)return!1}else if((g=jf(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(g)>=e.eMarks[u])return!1;if(r)return!0;const p=e.src.charCodeAt(g-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const b=[u,0];a.map=b,a.markup=String.fromCharCode(p);let v=!1;const y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=g,o=e.eMarks[u];const E=e.sCount[u]+g-(e.bMarks[u]+e.tShift[u]);let C=E;for(;i<o;){const R=e.src.charCodeAt(i);if(R===9)C+=4-(C+e.bsCount[u])%4;else if(R===32)C++;else break;i++}const k=i;let O;k>=o?O=1:O=C-E,O>4&&(O=1);const S=E+O;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const D=[u,0];a.map=D,d&&(a.info=e.src.slice(s,g-1));const M=e.tight,z=e.tShift[u],K=e.sCount[u],j=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[u]=k-e.bMarks[u],e.sCount[u]=C,k>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||v)&&(c=!1),v=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=j,e.tShift[u]=z,e.sCount[u]=K,e.tight=M,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),u=e.line,D[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let T=!1;for(let R=0,A=y.length;R<A;R++)if(y[R](e,u,n,!0)){T=!0;break}if(T)break;if(d){if(g=qf(e,u),g<0)break;s=e.bMarks[u]+e.tShift[u]}else if(g=jf(e,u),g<0)break;if(p!==e.src.charCodeAt(g-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),b[1]=u,e.line=u,e.parentType=x,c&&vA(e,m),!0}function wA(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(y){const x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let E=!1;if(e.sCount[y]-e.blkIndent>3&&(E=!0),e.sCount[y]<0&&(E=!0),!E){const O=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let D=!1;for(let M=0,z=O.length;M<z;M++)if(O[M](e,y,x,!0)){D=!0;break}if(e.parentType=S,D)return null}const C=e.bMarks[y]+e.tShift[y],k=e.eMarks[y];return e.src.slice(C,k+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const y=u.charCodeAt(o);if(y===91)return!1;if(y===93){c=o;break}else if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(y===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 y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ht(y))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 h=o,g=s,p=o;for(;o<i;o++){const y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!ht(y))break}let m=e.md.helpers.parseLinkTitle(u,o,i);for(;m.can_continue;){const y=a(s);if(y===null)break;u+=y,o=i,i=u.length,s++,m=e.md.helpers.parseLinkTitle(u,o,i,m)}let b;for(o<i&&p!==o&&m.ok?(b=m.str,o=m.pos):(b="",o=h,s=g);o<i;){const y=u.charCodeAt(o);if(!ht(y))break;o++}if(o<i&&u.charCodeAt(o)!==10&&b)for(b="",o=h,s=g;o<i;){const y=u.charCodeAt(o);if(!ht(y))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const v=Da(u.slice(1,c));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:b,href:d}),e.line=s),!0):!1}const _A=["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"],EA="[a-zA-Z_:][a-zA-Z0-9:._-]*",CA="[^\"'=<>`\\x00-\\x20]+",SA="'[^']*'",kA='"[^"]*"',AA="(?:"+CA+"|"+SA+"|"+kA+")",TA="(?:\\s+"+EA+"(?:\\s*=\\s*"+AA+")?)",Sb="<[A-Za-z][A-Za-z0-9\\-]*"+TA+"*\\s*\\/?>",kb="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DA="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",IA="<[?][\\s\\S]*?[?]>",OA="<![A-Za-z][^>]*>",RA="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",NA=new RegExp("^(?:"+Sb+"|"+kb+"|"+DA+"|"+IA+"|"+OA+"|"+RA+")"),MA=new RegExp("^(?:"+Sb+"|"+kb+")"),no=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+_A.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(MA.source+"\\s*$"),/^$/,!1]];function LA(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<no.length&&!no[a][0].test(s);a++);if(a===no.length)return!1;if(r)return no[a][2];let u=t+1;const c=no[a][1].test("");if(!no[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),no[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 $A(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&&!ht(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&ht(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=Ia(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 PA(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 g=e.bMarks[a]+e.tShift[a];const p=e.eMarks[a];if(g<p&&(s=e.src.charCodeAt(g),(s===45||s===61)&&(g=e.skipChars(g,s),g=e.skipSpaces(g),g>=p))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let h=!1;for(let g=0,p=r.length;g<p;g++)if(r[g](e,a,n,!0)){h=!0;break}if(h)break}if(!i)return e.parentType=o,!1;const u=Ia(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 FA(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=Ia(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 Es=[["table",pA,["paragraph","reference"]],["code",hA],["fence",mA,["paragraph","reference","blockquote","list"]],["blockquote",bA,["paragraph","reference","blockquote","list"]],["hr",yA,["paragraph","reference","blockquote","list"]],["list",xA,["paragraph","reference","blockquote"]],["reference",wA],["html_block",LA,["paragraph","reference","blockquote"]],["heading",$A,["paragraph","reference","blockquote"]],["lheading",PA],["paragraph",FA]];function Oa(){this.ruler=new sn;for(let e=0;e<Es.length;e++)this.ruler.push(Es[e][0],Es[e][1],{alt:(Es[e][2]||[]).slice()})}Oa.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)}};Oa.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)};Oa.prototype.State=tr;function ts(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}ts.prototype.pushPending=function(){const e=new On("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ts.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new On(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};ts.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 b=this.src.charCodeAt(e-2);o=(b&64512)===55296?65536+(b-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 b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else(a&64512)===56320&&(a=65533);const u=Mi(o)||Ni(o),c=Mi(a)||Ni(a),l=Ri(o),d=Ri(a),h=!d&&(!c||l||u),g=!l&&(!u||d||c);return{can_open:h&&(t||!g||u),can_close:g&&(t||!h||c),length:s}};ts.prototype.Token=On;function BA(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 zA(e,t){let n=e.pos;for(;n<e.posMax&&!BA(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const UA=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function KA(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(UA);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 h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=a.length-i.length,!0}function HA(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&&ht(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const $l=[];for(let e=0;e<256;e++)$l.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){$l[e.charCodeAt(0)]=1});function jA(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),!!ht(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&&$l[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function qA(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 GA(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 Gf(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 VA(e){const t=e.tokens_meta,n=e.tokens_meta.length;Gf(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Gf(e,t[r].delimiters)}const Ab={tokenize:GA,postProcess:VA};function WA(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 Vf(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 YA(e){const t=e.tokens_meta,n=e.tokens_meta.length;Vf(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Vf(e,t[r].delimiters)}const Tb={tokenize:WA,postProcess:YA};function ZA(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,h=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let p=g+1;if(p<d&&e.src.charCodeAt(p)===40){for(c=!1,p++;p<d&&(n=e.src.charCodeAt(p),!(!ht(n)&&n!==10));p++);if(p>=d)return!1;if(u=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?p=o.pos:s="",u=p;p<d&&(n=e.src.charCodeAt(p),!(!ht(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&u!==p&&o.ok)for(a=o.str,p=o.pos;p<d&&(n=e.src.charCodeAt(p),!(!ht(n)&&n!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=g+1):p=g+1,r||(r=e.src.slice(h,g)),i=e.env.references[Da(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=h,e.posMax=g;const m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function XA(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const g=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<h&&e.src.charCodeAt(i)===40){for(i++;i<h&&(n=e.src.charCodeAt(i),!(!ht(n)&&n!==10));i++);if(i>=h)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<h&&(n=e.src.charCodeAt(i),!(!ht(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<h&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<h&&(n=e.src.charCodeAt(i),!(!ht(n)&&n!==10));i++);else u="";if(i>=h||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<h&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=p+1):i=p+1,o||(o=e.src.slice(g,p)),s=e.env.references[Da(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(g,p);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),v=[["src",l],["alt",""]];b.attrs=v,b.children=m,b.content=r,u&&v.push(["title",u])}return e.pos=i,e.posMax=h,!0}const JA=/^([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])?)*)$/,QA=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function eT(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(QA.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(JA.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 tT(e){return/^<a[>\s]/i.test(e)}function nT(e){return/^<\/a\s*>/i.test(e)}function rT(e){const t=e|32;return t>=97&&t<=122}function oT(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&&!rT(o))return!1;const i=e.src.slice(r).match(NA);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],tT(s.content)&&e.linkLevel++,nT(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const iT=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,sT=/^&([a-z][a-z0-9]{1,31});/i;function aT(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(iT);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=Ml(s)?Oi(s):Oi(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(sT);if(i){const s=k3(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 Wf(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 h=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(h=!0),!h){const g=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+g,i[c]=g,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 uT(e){const t=e.tokens_meta,n=e.tokens_meta.length;Wf(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Wf(t[r].delimiters)}function cT(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 uu=[["text",zA],["linkify",KA],["newline",HA],["escape",jA],["backticks",qA],["strikethrough",Ab.tokenize],["emphasis",Tb.tokenize],["link",ZA],["image",XA],["autolink",eT],["html_inline",oT],["entity",aT]],cu=[["balance_pairs",uT],["strikethrough",Ab.postProcess],["emphasis",Tb.postProcess],["fragments_join",cT]];function ns(){this.ruler=new sn;for(let e=0;e<uu.length;e++)this.ruler.push(uu[e][0],uu[e][1]);this.ruler2=new sn;for(let e=0;e<cu.length;e++)this.ruler2.push(cu[e][0],cu[e][1])}ns.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};ns.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()};ns.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)};ns.prototype.State=ts;function lT(e){const t={};e=e||{},t.src_Any=pb.source,t.src_Cc=hb.source,t.src_Z=bb.source,t.src_P=Rl.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 Mc(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Ra(e){return Object.prototype.toString.call(e)}function dT(e){return Ra(e)==="[object String]"}function fT(e){return Ra(e)==="[object Object]"}function gT(e){return Ra(e)==="[object RegExp]"}function Yf(e){return Ra(e)==="[object Function]"}function pT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Db={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function hT(e){return Object.keys(e||{}).reduce(function(t,n){return t||Db.hasOwnProperty(n)},!1)}const mT={"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}}},bT="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]",yT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function vT(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Zf(){return function(e,t){t.normalize(e)}}function Gs(e){const t=e.re=lT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(bT),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,fT(u)){gT(u.validate)?c.validate=vT(u.validate):Yf(u.validate)?c.validate=u.validate:i(a,u),Yf(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=Zf();return}if(dT(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:Zf()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(pT).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 Ib(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 hn(e,t){if(!(this instanceof hn))return new hn(e,t);t||hT(e)&&(t=e,e={}),this.__opts__=Mc({},Db,t),this.__schemas__=Mc({},mT,e),this.__compiled__={},this.__tlds__=yT,this.__tlds_replaced__=!1,this.re={},Gs(this)}hn.prototype.add=function(t,n){return this.__schemas__[t]=n,Gs(this),this};hn.prototype.set=function(t){return this.__opts__=Mc(this.__opts__,t),this};hn.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)};hn.prototype.pretest=function(t){return this.re.pretest.test(t)};hn.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};hn.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(h,g){return h?g?h.index!==g.index?h.index<g.index?h:g:h.lastIndex>=g.lastIndex?h:g:h:g}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 h=[r[l[0]],i[l[1]],o[l[2]]],g=c(c(h[0],h[1]),h[2]);if(!g)break;if(g===h[0]?l[0]++:g===h[1]?l[1]++:l[2]++,g.index<d)continue;const p=new Ib(t,g.schema,g.index,g.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),d=g.lastIndex}return n.length?n:null};hn.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 Ib(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};hn.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(),Gs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Gs(this),this)};hn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};hn.prototype.onCompile=function(){};const Lo=2147483647,Hn=36,Pl=1,Li=26,xT=38,wT=700,Ob=72,Rb=128,Nb="-",_T=/^xn--/,ET=/[^\0-\x7F]/,CT=/[\x2E\u3002\uFF0E\uFF61]/g,ST={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lu=Hn-Pl,jn=Math.floor,du=String.fromCharCode;function Rr(e){throw new RangeError(ST[e])}function kT(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Mb(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(CT,".");const o=e.split("."),i=kT(o,t).join(".");return r+i}function Lb(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 AT=e=>String.fromCodePoint(...e),TT=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Hn},Xf=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},$b=function(e,t,n){let r=0;for(e=n?jn(e/wT):e>>1,e+=jn(e/t);e>lu*Li>>1;r+=Hn)e=jn(e/lu);return jn(r+(lu+1)*e/(e+xT))},Pb=function(e){const t=[],n=e.length;let r=0,o=Rb,i=Ob,s=e.lastIndexOf(Nb);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Rr("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=Hn;;d+=Hn){a>=n&&Rr("invalid-input");const h=TT(e.charCodeAt(a++));h>=Hn&&Rr("invalid-input"),h>jn((Lo-r)/l)&&Rr("overflow"),r+=h*l;const g=d<=i?Pl:d>=i+Li?Li:d-i;if(h<g)break;const p=Hn-g;l>jn(Lo/p)&&Rr("overflow"),l*=p}const c=t.length+1;i=$b(r-u,c,u==0),jn(r/c)>Lo-o&&Rr("overflow"),o+=jn(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Fb=function(e){const t=[];e=Lb(e);const n=e.length;let r=Rb,o=0,i=Ob;for(const u of e)u<128&&t.push(du(u));const s=t.length;let a=s;for(s&&t.push(Nb);a<n;){let u=Lo;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>jn((Lo-o)/c)&&Rr("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>Lo&&Rr("overflow"),l===r){let d=o;for(let h=Hn;;h+=Hn){const g=h<=i?Pl:h>=i+Li?Li:h-i;if(d<g)break;const p=d-g,m=Hn-g;t.push(du(Xf(g+p%m,0))),d=jn(p/m)}t.push(du(Xf(d,0))),i=$b(o,c,a===s),o=0,++a}++o,++r}return t.join("")},DT=function(e){return Mb(e,function(t){return _T.test(t)?Pb(t.slice(4).toLowerCase()):t})},IT=function(e){return Mb(e,function(t){return ET.test(t)?"xn--"+Fb(t):t})},Bb={version:"2.3.1",ucs2:{decode:Lb,encode:AT},decode:Pb,encode:Fb,toASCII:IT,toUnicode:DT},OT={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},RT={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"]}}},NT={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"]}}},MT={default:OT,zero:RT,commonmark:NT},LT=/^(vbscript|javascript|file|data):/,$T=/^data:image\/(gif|png|jpeg|webp);/;function PT(e){const t=e.trim().toLowerCase();return LT.test(t)?$T.test(t):!0}const zb=["http:","https:","mailto:"];function FT(e){const t=Ol(e,!0);if(t.hostname&&(!t.protocol||zb.indexOf(t.protocol)>=0))try{t.hostname=Bb.toASCII(t.hostname)}catch{}return es(Il(t))}function BT(e){const t=Ol(e,!0);if(t.hostname&&(!t.protocol||zb.indexOf(t.protocol)>=0))try{t.hostname=Bb.toUnicode(t.hostname)}catch{}return zo(Il(t),zo.defaultChars+"%")}function _n(e,t){if(!(this instanceof _n))return new _n(e,t);t||Nl(e)||(t=e||{},e="default"),this.inline=new ns,this.block=new Oa,this.core=new Ll,this.renderer=new Vo,this.linkify=new hn,this.validateLink=PT,this.normalizeLink=FT,this.normalizeLinkText=BT,this.utils=K3,this.helpers=Ta({},G3),this.options={},this.configure(e),t&&this.set(t)}_n.prototype.set=function(e){return Ta(this.options,e),this};_n.prototype.configure=function(e){const t=this;if(Nl(e)){const n=e;if(e=MT[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};_n.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};_n.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};_n.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};_n.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};_n.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};_n.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};_n.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fu,Jf;function zT(){if(Jf)return fu;Jf=1;var e=!0,t=!1,n=!1;fu=function(m,b){b&&(e=!b.enabled,t=!!b.label,n=!!b.labelAfter),m.core.ruler.after("inline","github-task-lists",function(v){for(var y=v.tokens,x=2;x<y.length;x++)i(y,x)&&(s(y[x],v.Token),r(y[x-2],"class","task-list-item"+(e?"":" enabled")),r(y[o(y,x-2)],"class","contains-task-list"))})};function r(m,b,v){var y=m.attrIndex(b),x=[b,v];y<0?m.attrPush(x):m.attrs[y]=x}function o(m,b){for(var v=m[b].level-1,y=b-1;y>=0;y--)if(m[y].level===v)return y;return-1}function i(m,b){return d(m[b])&&h(m[b-1])&&g(m[b-2])&&p(m[b])}function s(m,b){if(m.children.unshift(a(m,b)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),t)if(n){m.children.pop();var v="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+v+'">',m.children.push(l(m.content,v,b))}else m.children.unshift(u(b)),m.children.push(c(b))}function a(m,b){var v=new b("html_inline","",0),y=e?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?v.content='<input class="task-list-item-checkbox"'+y+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(v.content='<input class="task-list-item-checkbox" checked=""'+y+'type="checkbox">'),v}function u(m){var b=new m("html_inline","",0);return b.content="<label>",b}function c(m){var b=new m("html_inline","",0);return b.content="</label>",b}function l(m,b,v){var y=new v("html_inline","",0);return y.content='<label class="task-list-item-label" for="'+b+'">'+m+"</label>",y.attrs=[{for:b}],y}function d(m){return m.type==="inline"}function h(m){return m.type==="paragraph_open"}function g(m){return m.type==="list_item_open"}function p(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return fu}var UT=zT();const KT=Na(UT);var gu,Qf;function HT(){if(Qf)return gu;Qf=1;function e(L){return L instanceof Map?L.clear=L.delete=L.set=function(){throw new Error("map is read-only")}:L instanceof Set&&(L.add=L.clear=L.delete=function(){throw new Error("set is read-only")}),Object.freeze(L),Object.getOwnPropertyNames(L).forEach(ne=>{const de=L[ne],$e=typeof de;($e==="object"||$e==="function")&&!Object.isFrozen(de)&&e(de)}),L}class t{constructor(ne){ne.data===void 0&&(ne.data={}),this.data=ne.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(L){return L.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(L,...ne){const de=Object.create(null);for(const $e in L)de[$e]=L[$e];return ne.forEach(function($e){for(const wt in $e)de[wt]=$e[wt]}),de}const o="</span>",i=L=>!!L.scope,s=(L,{prefix:ne})=>{if(L.startsWith("language:"))return L.replace("language:","language-");if(L.includes(".")){const de=L.split(".");return[`${ne}${de.shift()}`,...de.map(($e,wt)=>`${$e}${"_".repeat(wt+1)}`)].join(" ")}return`${ne}${L}`};class a{constructor(ne,de){this.buffer="",this.classPrefix=de.classPrefix,ne.walk(this)}addText(ne){this.buffer+=n(ne)}openNode(ne){if(!i(ne))return;const de=s(ne.scope,{prefix:this.classPrefix});this.span(de)}closeNode(ne){i(ne)&&(this.buffer+=o)}value(){return this.buffer}span(ne){this.buffer+=`<span class="${ne}">`}}const u=(L={})=>{const ne={children:[]};return Object.assign(ne,L),ne};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(ne){this.top.children.push(ne)}openNode(ne){const de=u({scope:ne});this.add(de),this.stack.push(de)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ne){return this.constructor._walk(ne,this.rootNode)}static _walk(ne,de){return typeof de=="string"?ne.addText(de):de.children&&(ne.openNode(de),de.children.forEach($e=>this._walk(ne,$e)),ne.closeNode(de)),ne}static _collapse(ne){typeof ne!="string"&&ne.children&&(ne.children.every(de=>typeof de=="string")?ne.children=[ne.children.join("")]:ne.children.forEach(de=>{c._collapse(de)}))}}class l extends c{constructor(ne){super(),this.options=ne}addText(ne){ne!==""&&this.add(ne)}startScope(ne){this.openNode(ne)}endScope(){this.closeNode()}__addSublanguage(ne,de){const $e=ne.root;de&&($e.scope=`language:${de}`),this.add($e)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(L){return L?typeof L=="string"?L:L.source:null}function h(L){return m("(?=",L,")")}function g(L){return m("(?:",L,")*")}function p(L){return m("(?:",L,")?")}function m(...L){return L.map(de=>d(de)).join("")}function b(L){const ne=L[L.length-1];return typeof ne=="object"&&ne.constructor===Object?(L.splice(L.length-1,1),ne):{}}function v(...L){return"("+(b(L).capture?"":"?:")+L.map($e=>d($e)).join("|")+")"}function y(L){return new RegExp(L.toString()+"|").exec("").length-1}function x(L,ne){const de=L&&L.exec(ne);return de&&de.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(L,{joinWith:ne}){let de=0;return L.map($e=>{de+=1;const wt=de;let vt=d($e),we="";for(;vt.length>0;){const me=E.exec(vt);if(!me){we+=vt;break}we+=vt.substring(0,me.index),vt=vt.substring(me.index+me[0].length),me[0][0]==="\\"&&me[1]?we+="\\"+String(Number(me[1])+wt):(we+=me[0],me[0]==="("&&de++)}return we}).map($e=>`(${$e})`).join(ne)}const k=/\b\B/,O="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",D="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",K="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",j=(L={})=>{const ne=/^#![ ]*\//;return L.binary&&(L.begin=m(ne,/.*\b/,L.binary,/\b.*/)),r({scope:"meta",begin:ne,end:/$/,relevance:0,"on:begin":(de,$e)=>{de.index!==0&&$e.ignoreMatch()}},L)},T={begin:"\\\\[\\s\\S]",relevance:0},R={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[T]},A={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[T]},I={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/},F=function(L,ne,de={}){const $e=r({scope:"comment",begin:L,end:ne,contains:[]},de);$e.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 wt=v("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 $e.contains.push({begin:m(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),$e},$=F("//","$"),U=F("/\\*","\\*/"),G=F("#","$"),P={scope:"number",begin:D,relevance:0},Z={scope:"number",begin:M,relevance:0},V={scope:"number",begin:z,relevance:0},Y={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[T,{begin:/\[/,end:/\]/,relevance:0,contains:[T]}]},ee={scope:"title",begin:O,relevance:0},re={scope:"title",begin:S,relevance:0},Q={begin:"\\.\\s*"+S,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:R,BACKSLASH_ESCAPE:T,BINARY_NUMBER_MODE:V,BINARY_NUMBER_RE:z,COMMENT:F,C_BLOCK_COMMENT_MODE:U,C_LINE_COMMENT_MODE:$,C_NUMBER_MODE:Z,C_NUMBER_RE:M,END_SAME_AS_BEGIN:function(L){return Object.assign(L,{"on:begin":(ne,de)=>{de.data._beginMatch=ne[1]},"on:end":(ne,de)=>{de.data._beginMatch!==ne[1]&&de.ignoreMatch()}})},HASH_COMMENT_MODE:G,IDENT_RE:O,MATCH_NOTHING_RE:k,METHOD_GUARD:Q,NUMBER_MODE:P,NUMBER_RE:D,PHRASAL_WORDS_MODE:I,QUOTE_STRING_MODE:A,REGEXP_MODE:Y,RE_STARTERS_RE:K,SHEBANG:j,TITLE_MODE:ee,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:re});function Ye(L,ne){L.input[L.index-1]==="."&&ne.ignoreMatch()}function nt(L,ne){L.className!==void 0&&(L.scope=L.className,delete L.className)}function yt(L,ne){ne&&L.beginKeywords&&(L.begin="\\b("+L.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",L.__beforeBegin=Ye,L.keywords=L.keywords||L.beginKeywords,delete L.beginKeywords,L.relevance===void 0&&(L.relevance=0))}function lt(L,ne){Array.isArray(L.illegal)&&(L.illegal=v(...L.illegal))}function St(L,ne){if(L.match){if(L.begin||L.end)throw new Error("begin & end are not supported with match");L.begin=L.match,delete L.match}}function kt(L,ne){L.relevance===void 0&&(L.relevance=1)}const zt=(L,ne)=>{if(!L.beforeMatch)return;if(L.starts)throw new Error("beforeMatch cannot be used with starts");const de=Object.assign({},L);Object.keys(L).forEach($e=>{delete L[$e]}),L.keywords=de.keywords,L.begin=m(de.beforeMatch,h(de.begin)),L.starts={relevance:0,contains:[Object.assign(de,{endsParent:!0})]},L.relevance=0,delete de.beforeMatch},Lt=["of","and","for","in","not","or","if","then","parent","list","value"],Vt="keyword";function nr(L,ne,de=Vt){const $e=Object.create(null);return typeof L=="string"?wt(de,L.split(" ")):Array.isArray(L)?wt(de,L):Object.keys(L).forEach(function(vt){Object.assign($e,nr(L[vt],ne,vt))}),$e;function wt(vt,we){ne&&(we=we.map(me=>me.toLowerCase())),we.forEach(function(me){const De=me.split("|");$e[De[0]]=[vt,le(De[0],De[1])]})}}function le(L,ne){return ne?Number(ne):Re(L)?0:1}function Re(L){return Lt.includes(L.toLowerCase())}const Ne={},st=L=>{console.error(L)},Se=(L,...ne)=>{console.log(`WARN: ${L}`,...ne)},Le=(L,ne)=>{Ne[`${L}/${ne}`]||(console.log(`Deprecated as of ${L}. ${ne}`),Ne[`${L}/${ne}`]=!0)},Ft=new Error;function At(L,ne,{key:de}){let $e=0;const wt=L[de],vt={},we={};for(let me=1;me<=ne.length;me++)we[me+$e]=wt[me],vt[me+$e]=!0,$e+=y(ne[me-1]);L[de]=we,L[de]._emit=vt,L[de]._multi=!0}function bn(L){if(Array.isArray(L.begin)){if(L.skip||L.excludeBegin||L.returnBegin)throw st("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ft;if(typeof L.beginScope!="object"||L.beginScope===null)throw st("beginScope must be object"),Ft;At(L,L.begin,{key:"beginScope"}),L.begin=C(L.begin,{joinWith:""})}}function un(L){if(Array.isArray(L.end)){if(L.skip||L.excludeEnd||L.returnEnd)throw st("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ft;if(typeof L.endScope!="object"||L.endScope===null)throw st("endScope must be object"),Ft;At(L,L.end,{key:"endScope"}),L.end=C(L.end,{joinWith:""})}}function Wt(L){L.scope&&typeof L.scope=="object"&&L.scope!==null&&(L.beginScope=L.scope,delete L.scope)}function rr(L){Wt(L),typeof L.beginScope=="string"&&(L.beginScope={_wrap:L.beginScope}),typeof L.endScope=="string"&&(L.endScope={_wrap:L.endScope}),bn(L),un(L)}function Yt(L){function ne(we,me){return new RegExp(d(we),"m"+(L.case_insensitive?"i":"")+(L.unicodeRegex?"u":"")+(me?"g":""))}class de{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(me,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,me]),this.matchAt+=y(me)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const me=this.regexes.map(De=>De[1]);this.matcherRe=ne(C(me,{joinWith:"|"}),!0),this.lastIndex=0}exec(me){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(me);if(!De)return null;const at=De.findIndex((Ln,Wo)=>Wo>0&&Ln!==void 0),_t=this.matchIndexes[at];return De.splice(0,at),Object.assign(De,_t)}}class $e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(me){if(this.multiRegexes[me])return this.multiRegexes[me];const De=new de;return this.rules.slice(me).forEach(([at,_t])=>De.addRule(at,_t)),De.compile(),this.multiRegexes[me]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(me,De){this.rules.push([me,De]),De.type==="begin"&&this.count++}exec(me){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let at=De.exec(me);if(this.resumingScanAtSamePosition()&&!(at&&at.index===this.lastIndex)){const _t=this.getMatcher(0);_t.lastIndex=this.lastIndex+1,at=_t.exec(me)}return at&&(this.regexIndex+=at.position+1,this.regexIndex===this.count&&this.considerAll()),at}}function wt(we){const me=new $e;return we.contains.forEach(De=>me.addRule(De.begin,{rule:De,type:"begin"})),we.terminatorEnd&&me.addRule(we.terminatorEnd,{type:"end"}),we.illegal&&me.addRule(we.illegal,{type:"illegal"}),me}function vt(we,me){const De=we;if(we.isCompiled)return De;[nt,St,rr,zt].forEach(_t=>_t(we,me)),L.compilerExtensions.forEach(_t=>_t(we,me)),we.__beforeBegin=null,[yt,lt,kt].forEach(_t=>_t(we,me)),we.isCompiled=!0;let at=null;return typeof we.keywords=="object"&&we.keywords.$pattern&&(we.keywords=Object.assign({},we.keywords),at=we.keywords.$pattern,delete we.keywords.$pattern),at=at||/\w+/,we.keywords&&(we.keywords=nr(we.keywords,L.case_insensitive)),De.keywordPatternRe=ne(at,!0),me&&(we.begin||(we.begin=/\B|\b/),De.beginRe=ne(De.begin),!we.end&&!we.endsWithParent&&(we.end=/\B|\b/),we.end&&(De.endRe=ne(De.end)),De.terminatorEnd=d(De.end)||"",we.endsWithParent&&me.terminatorEnd&&(De.terminatorEnd+=(we.end?"|":"")+me.terminatorEnd)),we.illegal&&(De.illegalRe=ne(we.illegal)),we.contains||(we.contains=[]),we.contains=[].concat(...we.contains.map(function(_t){return Sr(_t==="self"?we:_t)})),we.contains.forEach(function(_t){vt(_t,De)}),we.starts&&vt(we.starts,me),De.matcher=wt(De),De}if(L.compilerExtensions||(L.compilerExtensions=[]),L.contains&&L.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return L.classNameAliases=r(L.classNameAliases||{}),vt(L)}function or(L){return L?L.endsWithParent||or(L.starts):!1}function Sr(L){return L.variants&&!L.cachedVariants&&(L.cachedVariants=L.variants.map(function(ne){return r(L,{variants:null},ne)})),L.cachedVariants?L.cachedVariants:or(L)?r(L,{starts:L.starts?r(L.starts):null}):Object.isFrozen(L)?r(L):L}var kr="11.11.1";class Zt extends Error{constructor(ne,de){super(ne),this.name="HTMLInjectionError",this.html=de}}const cn=n,yn=r,rt=Symbol("nomatch"),Ar=7,Nn=function(L){const ne=Object.create(null),de=Object.create(null),$e=[];let wt=!0;const vt="Could not find the language '{}', did you forget to load/include a language module?",we={disableAutodetect:!0,name:"Plain text",contains:[]};let me={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function De(J){return me.noHighlightRe.test(J)}function at(J){let pe=J.className+" ";pe+=J.parentNode?J.parentNode.className:"";const Be=me.languageDetectRe.exec(pe);if(Be){const Ze=Pn(Be[1]);return Ze||(Se(vt.replace("{}",Be[1])),Se("Falling back to no-highlight mode for this block.",J)),Ze?Be[1]:"no-highlight"}return pe.split(/\s+/).find(Ze=>De(Ze)||Pn(Ze))}function _t(J,pe,Be){let Ze="",Qe="";typeof pe=="object"?(Ze=J,Be=pe.ignoreIllegals,Qe=pe.language):(Le("10.7.0","highlight(lang, code, ...args) has been deprecated."),Le("10.7.0",`Please use highlight(code, options) instead.
|
|
22
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Qe=J,Ze=pe),Be===void 0&&(Be=!0);const je={code:Ze,language:Qe};Pe("before:highlight",je);const _e=je.result?je.result:Ln(je.language,je.code,Be);return _e.code=je.code,Pe("after:highlight",_e),_e}function Ln(J,pe,Be,Ze){const Qe=Object.create(null);function je(fe,ke){return fe.keywords[ke]}function _e(){if(!Ue.keywords){Bt.addText(gt);return}let fe=0;Ue.keywordPatternRe.lastIndex=0;let ke=Ue.keywordPatternRe.exec(gt),qe="";for(;ke;){qe+=gt.substring(fe,ke.index);const ut=Fn.case_insensitive?ke[0].toLowerCase():ke[0],Ut=je(Ue,ut);if(Ut){const[sr,c1]=Ut;if(Bt.addText(qe),qe="",Qe[ut]=(Qe[ut]||0)+1,Qe[ut]<=Ar&&(ls+=c1),sr.startsWith("_"))qe+=ke[0];else{const l1=Fn.classNameAliases[sr]||sr;Et(ke[0],l1)}}else qe+=ke[0];fe=Ue.keywordPatternRe.lastIndex,ke=Ue.keywordPatternRe.exec(gt)}qe+=gt.substring(fe),Bt.addText(qe)}function Tt(){if(gt==="")return;let fe=null;if(typeof Ue.subLanguage=="string"){if(!ne[Ue.subLanguage]){Bt.addText(gt);return}fe=Ln(Ue.subLanguage,gt,!0,ql[Ue.subLanguage]),ql[Ue.subLanguage]=fe._top}else fe=Tr(gt,Ue.subLanguage.length?Ue.subLanguage:null);Ue.relevance>0&&(ls+=fe.relevance),Bt.__addSublanguage(fe._emitter,fe.language)}function He(){Ue.subLanguage!=null?Tt():_e(),gt=""}function Et(fe,ke){fe!==""&&(Bt.startScope(ke),Bt.addText(fe),Bt.endScope())}function Zr(fe,ke){let qe=1;const ut=ke.length-1;for(;qe<=ut;){if(!fe._emit[qe]){qe++;continue}const Ut=Fn.classNameAliases[fe[qe]]||fe[qe],sr=ke[qe];Ut?Et(sr,Ut):(gt=sr,_e(),gt=""),qe++}}function Xo(fe,ke){return fe.scope&&typeof fe.scope=="string"&&Bt.openNode(Fn.classNameAliases[fe.scope]||fe.scope),fe.beginScope&&(fe.beginScope._wrap?(Et(gt,Fn.classNameAliases[fe.beginScope._wrap]||fe.beginScope._wrap),gt=""):fe.beginScope._multi&&(Zr(fe.beginScope,ke),gt="")),Ue=Object.create(fe,{parent:{value:Ue}}),Ue}function Jo(fe,ke,qe){let ut=x(fe.endRe,qe);if(ut){if(fe["on:end"]){const Ut=new t(fe);fe["on:end"](ke,Ut),Ut.isMatchIgnored&&(ut=!1)}if(ut){for(;fe.endsParent&&fe.parent;)fe=fe.parent;return fe}}if(fe.endsWithParent)return Jo(fe.parent,ke,qe)}function as(fe){return Ue.matcher.regexIndex===0?(gt+=fe[0],1):(Ka=!0,0)}function ir(fe){const ke=fe[0],qe=fe.rule,ut=new t(qe),Ut=[qe.__beforeBegin,qe["on:begin"]];for(const sr of Ut)if(sr&&(sr(fe,ut),ut.isMatchIgnored))return as(ke);return qe.skip?gt+=ke:(qe.excludeBegin&&(gt+=ke),He(),!qe.returnBegin&&!qe.excludeBegin&&(gt=ke)),Xo(qe,fe),qe.returnBegin?0:ke.length}function us(fe){const ke=fe[0],qe=pe.substring(fe.index),ut=Jo(Ue,fe,qe);if(!ut)return rt;const Ut=Ue;Ue.endScope&&Ue.endScope._wrap?(He(),Et(ke,Ue.endScope._wrap)):Ue.endScope&&Ue.endScope._multi?(He(),Zr(Ue.endScope,fe)):Ut.skip?gt+=ke:(Ut.returnEnd||Ut.excludeEnd||(gt+=ke),He(),Ut.excludeEnd&&(gt=ke));do Ue.scope&&Bt.closeNode(),!Ue.skip&&!Ue.subLanguage&&(ls+=Ue.relevance),Ue=Ue.parent;while(Ue!==ut.parent);return ut.starts&&Xo(ut.starts,fe),Ut.returnEnd?0:ke.length}function cs(){const fe=[];for(let ke=Ue;ke!==Fn;ke=ke.parent)ke.scope&&fe.unshift(ke.scope);fe.forEach(ke=>Bt.openNode(ke))}let Xr={};function jl(fe,ke){const qe=ke&&ke[0];if(gt+=fe,qe==null)return He(),0;if(Xr.type==="begin"&&ke.type==="end"&&Xr.index===ke.index&&qe===""){if(gt+=pe.slice(ke.index,ke.index+1),!wt){const ut=new Error(`0 width match regex (${J})`);throw ut.languageName=J,ut.badRule=Xr.rule,ut}return 1}if(Xr=ke,ke.type==="begin")return ir(ke);if(ke.type==="illegal"&&!Be){const ut=new Error('Illegal lexeme "'+qe+'" for mode "'+(Ue.scope||"<unnamed>")+'"');throw ut.mode=Ue,ut}else if(ke.type==="end"){const ut=us(ke);if(ut!==rt)return ut}if(ke.type==="illegal"&&qe==="")return gt+=`
|
|
23
|
-
`,1;if(Ua>1e5&&Ua>ke.index*3)throw new Error("potential infinite loop, way more iterations than matches");return gt+=qe,qe.length}const Fn=Pn(J);if(!Fn)throw st(vt.replace("{}",J)),new Error('Unknown language: "'+J+'"');const u1=Yt(Fn);let za="",Ue=Ze||u1;const ql={},Bt=new me.__emitter(me);cs();let gt="",ls=0,Jr=0,Ua=0,Ka=!1;try{if(Fn.__emitTokens)Fn.__emitTokens(pe,Bt);else{for(Ue.matcher.considerAll();;){Ua++,Ka?Ka=!1:Ue.matcher.considerAll(),Ue.matcher.lastIndex=Jr;const fe=Ue.matcher.exec(pe);if(!fe)break;const ke=pe.substring(Jr,fe.index),qe=jl(ke,fe);Jr=fe.index+qe}jl(pe.substring(Jr))}return Bt.finalize(),za=Bt.toHTML(),{language:J,value:za,relevance:ls,illegal:!1,_emitter:Bt,_top:Ue}}catch(fe){if(fe.message&&fe.message.includes("Illegal"))return{language:J,value:cn(pe),illegal:!0,relevance:0,_illegalBy:{message:fe.message,index:Jr,context:pe.slice(Jr-100,Jr+100),mode:fe.mode,resultSoFar:za},_emitter:Bt};if(wt)return{language:J,value:cn(pe),illegal:!1,relevance:0,errorRaised:fe,_emitter:Bt,_top:Ue};throw fe}}function Wo(J){const pe={value:cn(J),illegal:!1,relevance:0,_top:we,_emitter:new me.__emitter(me)};return pe._emitter.addText(J),pe}function Tr(J,pe){pe=pe||me.languages||Object.keys(ne);const Be=Wo(J),Ze=pe.filter(Pn).filter(ss).map(He=>Ln(He,J,!1));Ze.unshift(Be);const Qe=Ze.sort((He,Et)=>{if(He.relevance!==Et.relevance)return Et.relevance-He.relevance;if(He.language&&Et.language){if(Pn(He.language).supersetOf===Et.language)return 1;if(Pn(Et.language).supersetOf===He.language)return-1}return 0}),[je,_e]=Qe,Tt=je;return Tt.secondBest=_e,Tt}function Yo(J,pe,Be){const Ze=pe&&de[pe]||Be;J.classList.add("hljs"),J.classList.add(`language-${Ze}`)}function $n(J){let pe=null;const Be=at(J);if(De(Be))return;if(Pe("before:highlightElement",{el:J,language:Be}),J.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",J);return}if(J.children.length>0&&(me.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(J)),me.throwUnescapedHTML))throw new Zt("One of your code blocks includes unescaped HTML.",J.innerHTML);pe=J;const Ze=pe.textContent,Qe=Be?_t(Ze,{language:Be,ignoreIllegals:!0}):Tr(Ze);J.innerHTML=Qe.value,J.dataset.highlighted="yes",Yo(J,Be,Qe.language),J.result={language:Qe.language,re:Qe.relevance,relevance:Qe.relevance},Qe.secondBest&&(J.secondBest={language:Qe.secondBest.language,relevance:Qe.secondBest.relevance}),Pe("after:highlightElement",{el:J,result:Qe,text:Ze})}function $a(J){me=yn(me,J)}const rs=()=>{bo(),Le("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Pa(){bo(),Le("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let os=!1;function bo(){function J(){bo()}if(document.readyState==="loading"){os||window.addEventListener("DOMContentLoaded",J,!1),os=!0;return}document.querySelectorAll(me.cssSelector).forEach($n)}function Fa(J,pe){let Be=null;try{Be=pe(L)}catch(Ze){if(st("Language definition for '{}' could not be registered.".replace("{}",J)),wt)st(Ze);else throw Ze;Be=we}Be.name||(Be.name=J),ne[J]=Be,Be.rawDefinition=pe.bind(null,L),Be.aliases&&is(Be.aliases,{languageName:J})}function Zo(J){delete ne[J];for(const pe of Object.keys(de))de[pe]===J&&delete de[pe]}function Ba(){return Object.keys(ne)}function Pn(J){return J=(J||"").toLowerCase(),ne[J]||ne[de[J]]}function is(J,{languageName:pe}){typeof J=="string"&&(J=[J]),J.forEach(Be=>{de[Be.toLowerCase()]=pe})}function ss(J){const pe=Pn(J);return pe&&!pe.disableAutodetect}function H(J){J["before:highlightBlock"]&&!J["before:highlightElement"]&&(J["before:highlightElement"]=pe=>{J["before:highlightBlock"](Object.assign({block:pe.el},pe))}),J["after:highlightBlock"]&&!J["after:highlightElement"]&&(J["after:highlightElement"]=pe=>{J["after:highlightBlock"](Object.assign({block:pe.el},pe))})}function oe(J){H(J),$e.push(J)}function ue(J){const pe=$e.indexOf(J);pe!==-1&&$e.splice(pe,1)}function Pe(J,pe){const Be=J;$e.forEach(function(Ze){Ze[Be]&&Ze[Be](pe)})}function Fe(J){return Le("10.7.0","highlightBlock will be removed entirely in v12.0"),Le("10.7.0","Please use highlightElement now."),$n(J)}Object.assign(L,{highlight:_t,highlightAuto:Tr,highlightAll:bo,highlightElement:$n,highlightBlock:Fe,configure:$a,initHighlighting:rs,initHighlightingOnLoad:Pa,registerLanguage:Fa,unregisterLanguage:Zo,listLanguages:Ba,getLanguage:Pn,registerAliases:is,autoDetection:ss,inherit:yn,addPlugin:oe,removePlugin:ue}),L.debugMode=function(){wt=!1},L.safeMode=function(){wt=!0},L.versionString=kr,L.regex={concat:m,lookahead:h,either:v,optional:p,anyNumberOfTimes:g};for(const J in Oe)typeof Oe[J]=="object"&&e(Oe[J]);return Object.assign(L,Oe),L},Mn=Nn({});return Mn.newInstance=()=>Nn({}),gu=Mn,Mn.HighlightJS=Mn,Mn.default=Mn,gu}var pu,eg;function jT(){if(eg)return pu;eg=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 pu=e,pu}var hu,tg;function qT(){if(tg)return hu;tg=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:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},g=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=t.SHEBANG({binary:`(${g.join("|")})`,relevance:10}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],y={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["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:b,literal:v,built_in:[...x,...E,"set","shopt",...C,...k]},contains:[p,t.SHEBANG(),m,h,s,a,y,u,c,l,d,r]}}return hu=e,hu}var mu,ng;function GT(){if(ng)return mu;ng=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},h={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]},g={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",v={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"},y=[h,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"</",contains:[].concat(x,E,y,[h,{begin:t.IDENT_RE+"::",keywords:v},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:h,strings:l,keywords:v}}}return mu=e,mu}var bu,rg;function VT(){if(rg)return bu;rg=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},h={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]},g={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",m=["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"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["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"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:b,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},O=[k,h,u,r,t.C_BLOCK_COMMENT_MODE,d,l],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:O.concat([{begin:/\(/,end:/\)/,keywords:C,contains:O.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:C,relevance:0},{begin:p,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(S,D,k,O,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return bu=e,bu}var yu,og;function WT(){if(og)return yu;og=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:'""'}]},h=t.inherit(d,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=t.inherit(g,{illegal:/\n/}),m={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,p]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},v=t.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});g.contains=[b,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],p.contains=[v,m,h,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[l,b,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},C]}}return yu=e,yu}var vu,ig;function YT(){if(ig)return vu;ig=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),h={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},g="and or not only",p=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",b=[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,h,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,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,...b,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...b,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...b,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return vu=u,vu}var xu,sg;function ZT(){if(sg)return xu;sg=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}]},h=t.inherit(l,{contains:[]}),g=t.inherit(d,{contains:[]});l.contains.push(g),d.contains.push(h);let p=[r,c];return[l,d,h,g].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return xu=e,xu}var wu,ag;function XT(){if(ag)return wu;ag=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 wu=e,wu}var _u,ug;function JT(){if(ug)return _u;ug=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},h={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]})]}]},g="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${g})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},O=[h,{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:[b]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:r}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=O,b.contains=O;const z=[{begin:/^\s*=>/,starts:{end:"$",contains:O}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:O}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(z).concat(l).concat(O)}}return _u=e,_u}var Eu,cg;function QT(){if(cg)return Eu;cg=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 Eu=e,Eu}var Cu,lg;function eD(){if(lg)return Cu;lg=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 Cu=e,Cu}var Su,dg;function tD(){if(dg)return Su;dg=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=/'[^']*'/,h=n.either(c,l,d),g=n.concat(h,"(\\s*\\.\\s*",h,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:g,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Su=e,Su}var ku,fg;function nD(){if(fg)return ku;fg=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[b,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[m,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,m]}}return ku=i,ku}var Au,gg;function rD(){if(gg)return Au;gg=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=(re,{after:Q})=>{const Ce="</"+re[0].slice(1);return re.input.indexOf(Ce,Q)!==-1},h=e,g={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(re,Q)=>{const Ce=re[0].length+re.index,Oe=re.input[Ce];if(Oe==="<"||Oe===","){Q.ignoreMatch();return}Oe===">"&&(d(re,{after:Ce})||Q.ignoreMatch());let Ye;const nt=re.input.substring(Ce);if(Ye=nt.match(/^\s*=/)){Q.ignoreMatch();return}if((Ye=nt.match(/^\s+extends\s+/))&&Ye.index===0){Q.ignoreMatch();return}}},b={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",y=`\\.(${v})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${x})((${y})|\\.)?|(${y}))[eE][+-]?(${v})\\b`},{begin:`\\b(${x})\\b((${y})\\b|\\.)?|(${y})\\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:b,contains:[]},k={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},O={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,C]},z={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:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},K=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,O,S,D,{match:/\$\d+/},E];C.contains=K.concat({begin:/\{/,end:/\}/,keywords:b,contains:["self"].concat(K)});const j=[].concat(z,C.contains),T=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:b,contains:["self"].concat(j)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:T},A={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,l.concat(h,"(",l.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},I={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]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},$={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(re){return l.concat("(?!",re.join("|"),")")}const P={match:l.concat(/\b/,G([...i,"super","import"].map(re=>`${re}\\s*\\(`)),h,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:l.concat(/\./,l.lookahead(l.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},Y="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",ee={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(Y)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:b,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,k,O,S,D,z,{match:/\$\d+/},E,I,{scope:"attr",match:h+l.lookahead(":"),relevance:0},ee,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,c.REGEXP_MODE,{className:"function",begin:Y,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:b,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:p},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},$,{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:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},P,U,A,V,{match:/\$[(.]/}]}}return Au=u,Au}var Tu,pg;function oD(){if(pg)return Tu;pg=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 Tu=e,Tu}var Du,hg;function iD(){if(hg)return Du;hg=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 h={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},g={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},p=r,m=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),b={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=b;return v.variants[1].contains=[b],b.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,m,a,u,h,g,{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:[b,i.C_LINE_COMMENT_MODE,m],relevance:0},i.C_LINE_COMMENT_MODE,m,h,g,d,i.C_NUMBER_MODE]},m]},{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},h,g]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
24
|
-
`},p]}}return Du=o,Du}var Iu,mg;function sD(){if(mg)return Iu;mg=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),h=u,g="and or not only",p="[\\w-]+",m="("+p+"|@\\{"+p+"\\})",b=[],v=[],y=function(j){return{className:"string",begin:"~?"+j+".*?"+j}},x=function(j,T,R){return{className:j,begin:T,relevance:R}},E={$pattern:/[a-z-]+/,keyword:g,attribute:o.join(" ")},C={begin:"\\(",end:"\\)",contains:v,keywords:E,relevance:0};v.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,y("'"),y('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,C,x("variable","@@?"+p,10),x("variable","@\\{"+p+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const k=v.concat({begin:/\{/,end:/\}/,contains:b}),O={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(v)},S={begin:m+"\\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:v}}]},D={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:v,relevance:0}},M={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:k}},z={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:m,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,O,x("keyword","all\\b"),x("variable","@\\{"+p+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",m,0),x("selector-id","#"+m),x("selector-class","\\."+m,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:k},{begin:"!important"},d.FUNCTION_DISPATCH]},K={begin:p+`:(:)?(${h.join("|")})`,returnBegin:!0,contains:[z]};return b.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,D,M,K,S,z,O,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:b}}return Iu=c,Iu}var Ou,bg;function aD(){if(bg)return Ou;bg=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 Ou=e,Ou}var Ru,yg;function uD(){if(yg)return Ru;yg=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 Ru=e,Ru}var Nu,vg;function cD(){if(vg)return Nu;vg=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],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(b,v,y="\\1")=>{const x=y==="\\1"?y:n.concat(y,v);return n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,y,o)},p=(b,v,y)=>n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,y,o),m=[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:g("s|tr|y",n.either(...h,{capture:!0}))},{begin:g("s|tr|y","\\(","\\)")},{begin:g("s|tr|y","\\[","\\]")},{begin:g("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",n.either(...h,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=m,a.contains=m,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:m}}return Nu=e,Nu}var Mu,xg;function lD(){if(xg)return Mu;xg=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 Mu=e,Mu}var Lu,wg;function dD(){if(wg)return Lu;wg=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)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(R,A)=>{A.data._beginMatch=R[1]||R[2]},"on:end":(R,A)=>{A.data._beginMatch!==R[1]&&A.ignoreMatch()}},g=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
25
|
-
]`,m={scope:"string",variants:[d,l,h,g]},b={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},v=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:y,literal:(R=>{const A=[];return R.forEach(I=>{A.push(I),I.toLowerCase()===I?A.push(I.toUpperCase()):A.push(I.toLowerCase())}),A})(v),built_in:x},k=R=>R.map(A=>A.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",k(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},S=n.concat(o,"\\b(?!\\()"),D={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),S],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"}}]},M={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[M,a,D,t.C_BLOCK_COMMENT_MODE,m,b,O]},K={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",k(y).join("\\b|"),"|",k(x).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[z]};z.contains.push(K);const j=[M,D,t.C_BLOCK_COMMENT_MODE,m,b,O],T={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...j]},...j,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:C,contains:[T,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,K,D,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",T,a,D,t.C_BLOCK_COMMENT_MODE,m,b]}]},{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]},m,b]}}return Lu=e,Lu}var $u,_g;function fD(){if(_g)return $u;_g=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 $u=e,$u}var Pu,Eg;function gD(){if(Eg)return Pu;Eg=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Pu=e,Pu}var Fu,Cg;function pD(){if(Cg)return Fu;Cg=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},h={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]},g="[0-9](_?[0-9])*",p=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,m=`\\b|${o.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${p}))[eE][+-]?(${g})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${g})[jJ](?=${m})`}]},v={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,b,h,t.HASH_COMMENT_MODE]}]};return l.contains=[h,b,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,v,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[y]},{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:[b,y,h]}]}}return Fu=e,Fu}var Bu,Sg;function hD(){if(Sg)return Bu;Sg=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Bu=e,Bu}var zu,kg;function mD(){if(kg)return zu;kg=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 zu=e,zu}var Uu,Ag;function bD(){if(Ag)return Uu;Ag=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 Uu=e,Uu}var Ku,Tg;function yD(){if(Tg)return Ku;Tg=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,h=i,g="@[a-z-]+",p="and or not only",b={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:":("+h.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},b,{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,b,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:g,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:g,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},b,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return Ku=u,Ku}var Hu,Dg;function vD(){if(Dg)return Hu;Dg=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 Hu=e,Hu}var ju,Ig;function xD(){if(Ig)return ju;Ig=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"],h=["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"],g=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,m=[...l,...c].filter(k=>!d.includes(k)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:n.concat(/\b/,n.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(k){return n.concat(/\b/,n.either(...k.map(O=>O.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:x(g),relevance:0};function C(k,{exceptions:O,when:S}={}){const D=S;return O=O||[],k.map(M=>M.match(/\|\d+$/)||O.includes(M)?M:D(M)?`${M}|0`:M)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(m,{when:k=>k.length<3}),literal:s,type:u,built_in:h},contains:[{scope:"type",match:x(a)},E,y,b,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,v]}}return ju=e,ju}var qu,Og;function wD(){if(Og)return qu;Og=1;function e(S){return S?typeof S=="string"?S:S.source:null}function t(S){return n("(?=",S,")")}function n(...S){return S.map(M=>e(M)).join("")}function r(S){const D=S[S.length-1];return typeof D=="object"&&D.constructor===Object?(S.splice(S.length-1,1),D):{}}function o(...S){return"("+(r(S).capture?"":"?:")+S.map(z=>e(z)).join("|")+")"}const i=S=>n(/\b/,S,/\w$/.test(S)?/\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"],h=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),m=o(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=n(p,m,"*"),v=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]/),y=o(v,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(v,y,"*"),E=n(/[A-Z]/,y,"*"),C=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],k=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function O(S){const D={match:/\s+/,relevance:0},M=S.COMMENT("/\\*","\\*/",{contains:["self"]}),z=[S.C_LINE_COMMENT_MODE,M],K={match:[/\./,o(...s,...a)],className:{2:"keyword"}},j={match:n(/\./,o(...c)),relevance:0},T=c.filter(rt=>typeof rt=="string").concat(["_|0"]),R=c.filter(rt=>typeof rt!="string").concat(u).map(i),A={variants:[{className:"keyword",match:o(...R,...a)}]},I={$pattern:o(/\b\w+/,/#\w+/),keyword:T.concat(h),literal:l},F=[K,j,A],$={match:n(/\./,o(...g)),relevance:0},U={className:"built_in",match:n(/\b/,o(...g),/(?=\()/)},G=[$,U],P={match:/->/,relevance:0},Z={className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${m})+`}]},V=[P,Z],Y="([0-9]_*)+",ee="([0-9a-fA-F]_*)+",re={className:"number",relevance:0,variants:[{match:`\\b(${Y})(\\.(${Y}))?([eE][+-]?(${Y}))?\\b`},{match:`\\b0x(${ee})(\\.(${ee}))?([pP][+-]?(${Y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Q=(rt="")=>({className:"subst",variants:[{match:n(/\\/,rt,/[0\\tnr"']/)},{match:n(/\\/,rt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),Ce=(rt="")=>({className:"subst",match:n(/\\/,rt,/[\t ]*(?:[\r\n]|\r\n)/)}),Oe=(rt="")=>({className:"subst",label:"interpol",begin:n(/\\/,rt,/\(/),end:/\)/}),Ye=(rt="")=>({begin:n(rt,/"""/),end:n(/"""/,rt),contains:[Q(rt),Ce(rt),Oe(rt)]}),nt=(rt="")=>({begin:n(rt,/"/),end:n(/"/,rt),contains:[Q(rt),Oe(rt)]}),yt={className:"string",variants:[Ye(),Ye("#"),Ye("##"),Ye("###"),nt(),nt("#"),nt("##"),nt("###")]},lt=[S.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[S.BACKSLASH_ESCAPE]}],St={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:lt},kt=rt=>{const Ar=n(rt,/\//),Nn=n(/\//,rt);return{begin:Ar,end:Nn,contains:[...lt,{scope:"comment",begin:`#(?!.*${Nn})`,end:/$/}]}},zt={scope:"regexp",variants:[kt("###"),kt("##"),kt("#"),St]},Lt={match:n(/`/,x,/`/)},Vt={className:"variable",match:/\$\d+/},nr={className:"variable",match:`\\$${y}+`},le=[Lt,Vt,nr],Re={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:k,contains:[...V,re,yt]}]}},Ne={scope:"keyword",match:n(/@/,o(...C),t(o(/\(/,/\s+/)))},st={scope:"meta",match:n(/@/,x)},Se=[Re,Ne,st],Le={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)/,y,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(E)),relevance:0}]},Ft={begin:/</,end:/>/,keywords:I,contains:[...z,...F,...Se,P,Le]};Le.contains.push(Ft);const At={match:n(x,/\s*:/),keywords:"_|0",relevance:0},bn={begin:/\(/,end:/\)/,relevance:0,keywords:I,contains:["self",At,...z,zt,...F,...G,...V,re,yt,...le,...Se,Le]},un={begin:/</,end:/>/,keywords:"repeat each",contains:[...z,Le]},Wt={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}]},rr={begin:/\(/,end:/\)/,keywords:I,contains:[Wt,...z,...F,...V,re,yt,...Se,Le,bn],endsParent:!0,illegal:/["']/},Yt={match:[/(func|macro)/,/\s+/,o(Lt.match,x,b)],className:{1:"keyword",3:"title.function"},contains:[un,rr,D],illegal:[/\[/,/%/]},or={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[un,rr,D],illegal:/\[|%/},Sr={match:[/operator/,/\s+/,b],className:{1:"keyword",3:"title"}},kr={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Le],keywords:[...d,...l],end:/}/},Zt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},cn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},yn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:I,contains:[un,...F,{begin:/:/,end:/\{/,keywords:I,contains:[{scope:"title.class.inherited",match:E},...F],relevance:0}]};for(const rt of yt.variants){const Ar=rt.contains.find(Mn=>Mn.label==="interpol");Ar.keywords=I;const Nn=[...F,...G,...V,re,yt,...le];Ar.contains=[...Nn,{begin:/\(/,end:/\)/,contains:["self",...Nn]}]}return{name:"Swift",keywords:I,contains:[...z,Yt,or,Zt,cn,yn,Sr,kr,{beginKeywords:"import",end:/$/,contains:[...z],relevance:0},zt,...F,...G,...V,re,yt,...le,...Se,Le,bn]}}return qu=O,qu}var Gu,Rg;function _D(){if(Rg)return Gu;Rg=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,{}[\]]+/}]}),g={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},m={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},v=[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}},g,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,b,s,a],y=[...v];return y.pop(),y.push(u),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}return Gu=e,Gu}var Vu,Ng;function ED(){if(Ng)return Vu;Ng=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,h=(Q,{after:Ce})=>{const Oe="</"+Q[0].slice(1);return Q.input.indexOf(Oe,Ce)!==-1},g=e,p={begin:"<>",end:"</>"},m=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,Ce)=>{const Oe=Q[0].length+Q.index,Ye=Q.input[Oe];if(Ye==="<"||Ye===","){Ce.ignoreMatch();return}Ye===">"&&(h(Q,{after:Oe})||Ce.ignoreMatch());let nt;const yt=Q.input.substring(Oe);if(nt=yt.match(/^\s*=/)){Ce.ignoreMatch();return}if((nt=yt.match(/^\s+extends\s+/))&&nt.index===0){Ce.ignoreMatch();return}}},v={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",x=`\\.(${y})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${E})((${x})|\\.)?|(${x}))[eE][+-]?(${y})\\b`},{begin:`\\b(${E})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:v,contains:[]},O={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"css"}},D={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,k],subLanguage:"graphql"}},M={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,k]},K={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:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},j=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,S,D,M,{match:/\$\d+/},C];k.contains=j.concat({begin:/\{/,end:/\}/,keywords:v,contains:["self"].concat(j)});const T=[].concat(K,k.contains),R=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:v,contains:["self"].concat(T)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:R},I={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,d.concat(g,"(",d.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},F={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]}},$={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(Q){return d.concat("(?!",Q.join("|"),")")}const Z={match:d.concat(/\b/,P([...i,"super","import"].map(Q=>`${Q}\\s*\\(`)),g,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},V={begin:d.concat(/\./,d.lookahead(d.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ee="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",re={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ee)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:v,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,O,S,D,M,K,{match:/\$\d+/},C,F,{scope:"attr",match:g+d.lookahead(":"),relevance:0},re,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[K,l.REGEXP_MODE,{className:"function",begin:ee,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:v,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:m},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,l.inherit(l.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},V,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},Z,G,I,Y,{match:/\$[(.]/}]}}function c(l){const d=l.regex,h=u(l),g=e,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],m={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},b={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[h.exports.CLASS_REFERENCE]},v={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},y=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(y),literal:n,built_in:a.concat(p),"variable.language":s},E={className:"meta",begin:"@"+g},C=(D,M,z)=>{const K=D.contains.findIndex(j=>j.label===M);if(K===-1)throw new Error("can not find mode to replace");D.contains.splice(K,1,z)};Object.assign(h.keywords,x),h.exports.PARAMS_CONTAINS.push(E);const k=h.contains.find(D=>D.scope==="attr"),O=Object.assign({},k,{match:d.concat(g,d.lookahead(/\s*\?:/))});h.exports.PARAMS_CONTAINS.push([h.exports.CLASS_REFERENCE,k,O]),h.contains=h.contains.concat([E,m,b,O]),C(h,"shebang",l.SHEBANG()),C(h,"use_strict",v);const S=h.contains.find(D=>D.label==="func.def");return S.relevance=0,Object.assign(h,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),h}return Vu=c,Vu}var Wu,Mg;function CD(){if(Mg)return Wu;Mg=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+:/},h=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=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,h,g,{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:[g]}]}}return Wu=e,Wu}var Yu,Lg;function SD(){if(Lg)return Yu;Lg=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 Yu=e,Yu}var Zu,$g;function kD(){if($g)return Zu;$g=1;var e=HT();return e.registerLanguage("xml",jT()),e.registerLanguage("bash",qT()),e.registerLanguage("c",GT()),e.registerLanguage("cpp",VT()),e.registerLanguage("csharp",WT()),e.registerLanguage("css",YT()),e.registerLanguage("markdown",ZT()),e.registerLanguage("diff",XT()),e.registerLanguage("ruby",JT()),e.registerLanguage("go",QT()),e.registerLanguage("graphql",eD()),e.registerLanguage("ini",tD()),e.registerLanguage("java",nD()),e.registerLanguage("javascript",rD()),e.registerLanguage("json",oD()),e.registerLanguage("kotlin",iD()),e.registerLanguage("less",sD()),e.registerLanguage("lua",aD()),e.registerLanguage("makefile",uD()),e.registerLanguage("perl",cD()),e.registerLanguage("objectivec",lD()),e.registerLanguage("php",dD()),e.registerLanguage("php-template",fD()),e.registerLanguage("plaintext",gD()),e.registerLanguage("python",pD()),e.registerLanguage("python-repl",hD()),e.registerLanguage("r",mD()),e.registerLanguage("rust",bD()),e.registerLanguage("scss",yD()),e.registerLanguage("shell",vD()),e.registerLanguage("sql",xD()),e.registerLanguage("swift",wD()),e.registerLanguage("yaml",_D()),e.registerLanguage("typescript",ED()),e.registerLanguage("vbnet",CD()),e.registerLanguage("wasm",SD()),e.HighlightJS=e,e.default=e,Zu=e,Zu}var AD=kD();const Vs=Na(AD),Rn=new _n({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&Vs.getLanguage(t))try{const n=Vs.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),TD=/^<\/?(?:details|summary)>$/i,DD=/^<details\s+open\s*>$/i,ID=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function OD(e){return TD.test(e)||DD.test(e)||ID.test(e)}function Ub(e){const t=Rn.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+=OD(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}Rn.renderer.rules.html_block=(e,t)=>Ub(e[t].content);Rn.renderer.rules.html_inline=(e,t)=>Ub(e[t].content);const RD=Rn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),Pg=Rn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),ND=Rn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function Kb(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function MD(e){return e.replace(/:\d+(?::\d+)?$/,"")}function LD(e){const n=MD(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function $D(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&LD(e)}function Xu(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function So(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}Rn.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]=Kb(u[1],s,i?.projectId))}return RD(e,t,n,r,o)};Rn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&$D(a[1])){const c=a[1];return Xu(s,"href"),Xu(s,"target"),Xu(s,"rel"),So(s,"role","button"),So(s,"tabindex","0"),So(s,"data-file-link","true"),So(s,"data-file-path",c),i.fileLinkTitle&&(So(s,"title",i.fileLinkTitle),So(s,"aria-label",i.fileLinkTitle)),Pg(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=Kb(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return Pg(e,t,n,r,o)};Rn.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 ND(e,t,n,r,o)};Rn.use(KT,{enabled:!1,label:!1});function Fl(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),Rn.render(e,n)}function PD(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const FD="modulepreload",BD=function(e){return"/"+e},Fg={},zD=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=BD(c),c in Fg)return;Fg[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=l?"stylesheet":FD,l||(h.as="script"),h.crossOrigin="",h.href=c,u&&h.setAttribute("nonce",u),document.head.appendChild(h),l)return new Promise((g,p)=>{h.addEventListener("load",g),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Ju=null,Bg=Promise.resolve();const Lc=new WeakMap,Cs=new WeakMap;let Io=null;const zg=96,Hb=.25,UD=8,KD=2.5;async function HD(){return Ju||(Ju=zD(()=>import("./mermaid.core-BjB4Bulu.js").then(e=>e.bp),[]).then(e=>e.default)),Ju}function jD(){return Zp()==="dark"?"dark":"default"}function Qu(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function qD(e){const t=(Lc.get(e)??0)+1;return Lc.set(e,t),t}function ec(e,t){return Lc.get(e)===t}async function GD(e){const t=Bg.then(e,e);Bg=t.catch(()=>{}),await t}function jb(e,t,n){return Math.min(n,Math.max(t,e))}function Ss(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Ug(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function VD(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Ug(e.getAttribute("width"))??0,height:Ug(e.getAttribute("height"))??0}}function WD(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-zg,n.width*.5),o=Math.max(n.height-zg,n.height*.5),i=Math.min(r/e.width,o/e.height);return jb(i,Hb,KD)}function li(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function qb(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function YD(e,t){if(qb(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function ZD(e,t){Io?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",_("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=li("mermaid-overlay__button",_("mermaid.zoomOut"),"-"),c=li("mermaid-overlay__button",_("mermaid.zoomIn"),"+"),l=li("mermaid-overlay__button",_("mermaid.reset"),"1:1"),d=li("mermaid-overlay__button",_("mermaid.close"),"x");a.append(u,c,l,d);const h=document.createElement("div");h.className="mermaid-overlay__viewport";const g=document.createElement("div");g.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),g.appendChild(t),h.appendChild(g),s.append(a,h),document.body.appendChild(s);const p=VD(t),m=WD(p,h);let b=m,v=0,y=0,x=!1,E=0,C=0,k=0,O=0;const S=()=>{g.style.transform=`translate(${Ss(v)}px, ${Ss(y)}px)`},D=()=>{p.width<=0||p.height<=0||(t.style.width=`${Ss(p.width*b)}px`,t.style.height=`${Ss(p.height*b)}px`)},M=()=>{D(),S()},z=($,U,G)=>{const P=h.getBoundingClientRect(),Z=U===void 0?P.width/2:U-P.left,V=G===void 0?P.height/2:G-P.top,Y=P.width/2,ee=P.height/2,re=b;b=jb($,Hb,UD),v=Z-Y-(Z-Y-v)/re*b,y=V-ee-(V-ee-y)/re*b,M()},K=()=>{b=m,v=p.width>0?-(p.width*b)/2:0,y=p.height>0?-(p.height*b)/2:0,M()},j=()=>{if(document.removeEventListener("keydown",F),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const $=r?.parentNode===n?r:null;n.insertBefore(t,$)}s.remove(),Io?.close===j&&(Io=null)},T=$=>{$.preventDefault();const U=$.deltaY>0?.9:1.1;z(b*U,$.clientX,$.clientY)},R=$=>{$.button===0&&(x=!0,E=$.clientX,C=$.clientY,k=v,O=y,h.setPointerCapture($.pointerId),h.classList.add("is-dragging"))},A=$=>{x&&(v=k+$.clientX-E,y=O+$.clientY-C,S())},I=$=>{x&&(x=!1,h.classList.remove("is-dragging"),h.hasPointerCapture($.pointerId)&&h.releasePointerCapture($.pointerId))},F=$=>{$.key==="Escape"&&j()};return u.addEventListener("click",()=>z(b/1.2)),c.addEventListener("click",()=>z(b*1.2)),l.addEventListener("click",K),d.addEventListener("click",j),h.addEventListener("wheel",T,{passive:!1}),h.addEventListener("pointerdown",R),h.addEventListener("pointermove",A),h.addEventListener("pointerup",I),h.addEventListener("pointercancel",I),document.addEventListener("keydown",F),Io={host:e,sourceSvg:t,close:j},K(),d.focus(),j}function XD(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=YD(n,e);if(!r)return;const{host:o}=r,i=Cs.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=li("mermaid-fullscreen-button",_("mermaid.maximize"),"⤢"),a=()=>{const c=qb(n)&&n.isConnected?n:o.querySelector("svg");c&&ZD(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{Io?.host===o&&Io.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),Cs.get(o)?.button===s&&Cs.delete(o)};Cs.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function JD(e){if(e.querySelector(".mermaid")===null)return()=>{};const t=qD(e),n=await HD();if(!ec(e,t))return()=>{};if(await Qu(),!ec(e,t))return()=>{};let r=()=>{};function o(){r(),r=XD(e)}async function i(c){const l=c.filter(d=>d.isConnected&&e.contains(d));l.length!==0&&await GD(async()=>{if(!ec(e,t))return;const d=l.filter(g=>g.isConnected&&e.contains(g));if(d.length===0)return;const h=jD();n.initialize({startOnLoad:!1,theme:h}),r(),r=()=>{},d.forEach(g=>{const p=g.getAttribute("data-mermaid-source");p&&(g.removeAttribute("data-processed"),g.textContent=p)});try{await n.run({nodes:d}),await Qu(),o()}catch(g){console.error("[mermaid] render error:",g)}})}const s=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await i(s),await Qu(),o();const a=()=>void i(Array.from(e.querySelectorAll(".mermaid"))),u=new window.MutationObserver(a);return u.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{r(),u.disconnect()}}function QD(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 e6(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function t6(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(!e6(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=QD(u.startContainer,e),h=_("selection.noSection"),g=d&&d.textContent?.trim()||h;i=c,t({text:c,rect:l,sectionPath:g})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}const n6=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,r6=/^##\s+/,o6=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,i6=/^\d+\.\s+(.*\S)\s*$/,s6=/^\s*$/,Kg=/\s*[((]推荐[))]\s*$/,Hg=/\s*(自由文本)\s*$/,a6=/^\[(choice|confirm)\]\s*/i,u6=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,c6=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function l6(e){const t=e.split(`
|
|
26
|
-
`);let n=0;for(;n<t.length&&!n6.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(r6.test(i))break;const s=p6(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>d6(i,s))}function d6(e,t){const n=a6.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Hg.test(o),s=i?o.replace(Hg,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=f6(e.bodyLines);return{id:jg(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=g6(e.bodyLines,t,s),u=i||a.length===0;return{id:jg(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function f6(e){let t,n;for(const r of e){const o=r.trim(),i=u6.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=c6.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function g6(e,t,n){const r=[];let o=0;for(const i of e){if(s6.test(i))continue;const s=h6(i);if(s===null)continue;const a=Kg.test(s),u=a?s.replace(Kg,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:m6(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function p6(e){const t=o6.exec(e);return t?t[1]:null}function h6(e){const t=i6.exec(e);return t?t[1]:null}function jg(e,t){return`q-${e}-${Gb(t)}`}function m6(e,t,n){return`q-${e}-o-${t}-${Gb(n)}`}function Gb(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 b6=B('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const y6=36,v6=140,x6=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-y6-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-v6-8);return{top:i,left:s,visible:!0}};return f(W,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=b6();return o.$$mousedown=i=>i.preventDefault(),w(o,f(xe,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return _("selectionMenu.annotate")}}),null),w(o,f(xe,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return _("selectionMenu.explain")}}),null),Ie(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&yi(o,"top",i.e=s),a!==i.t&&yi(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};an(["mousedown"]);var w6=B('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-visible 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">'),_6=B('<p class="text-destructive ">');const E6=500,Or=8,C6=e=>{const[t,n]=N(""),[r,o]=N(!1),[i,s]=N(null),[a,u]=N(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const h=a()||260,g=window.innerHeight,p=d.rect.bottom+Or,m=d.rect.top-Or-h;let b;p+h<=g-Or?b=p:m>=Or?b=m:b=Math.max(Or,g-h-Or);const v=Math.min(Math.max(Or,d.rect.left),window.innerWidth-E6-Or);return{top:b,left:v}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(h){s(h.message)}finally{o(!1)}}}return f(W,{get when(){return te(()=>!!e.open)()&&e.snap},get children(){var d=w6(),h=d.firstChild,g=h.firstChild,p=h.nextSibling,m=p.firstChild,b=m.nextSibling,v=b.nextSibling,y=v.nextSibling,x=y.nextSibling;x.nextSibling;var E=p.nextSibling,C=E.firstChild;return d.$$mousedown=k=>k.stopPropagation(),br(k=>{queueMicrotask(()=>{k.offsetHeight!==a()&&u(k.offsetHeight)})},d),w(g,()=>_("annotate.title")),w(m,()=>e.snap?.sectionPath),w(p,()=>_("annotate.inSection"),v),w(p,()=>(e.snap?.text??"").slice(0,200),x),E.addEventListener("submit",l),w(E,f(Aa,{get projectId(){return e.projectId},rows:3,autosize:!1,get value(){return t()},onValueChange:n,get placeholder(){return _("annotate.placeholder")},class:"resize-y min-h-[64px]",autofocus:!0}),C),w(E,(()=>{var k=te(()=>!!i());return()=>k()&&(()=>{var O=_6();return w(O,i),O})()})(),C),w(C,f(xe,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return _("common.cancel")}}),null),w(C,f(xe,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return te(()=>!!r())()?_("common.submitting"):_("annotate.submit")}}),null),Ie(k=>{var O=`${c().top}px`,S=`${c().left}px`;return O!==k.e&&yi(d,"top",k.e=O),S!==k.t&&yi(d,"left",k.t=S),k},{e:void 0,t:void 0}),d}})};an(["mousedown"]);var S6=B("<span class=font-medium>"),k6=B('<span class="text-sm text-muted-foreground">'),A6=B("<div><span class=text-muted-foreground></span><code class=font-mono>"),T6=B('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),D6=B('<div class="flex flex-col gap-1 text-sm">'),I6=B('<p class="text-destructive ">'),O6=B('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const R6={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},N6=e=>{const[t,n]=N("fix"),[r,o]=N(!1),[i,s]=N(""),[a,u]=N(!1),[c,l]=N(null),[d,h]=N(null);ie(()=>{if(!e.open){h(null);return}const b=e.anchorEl;if(!b)return;const v=b.getBoundingClientRect(),x=Math.max(16,Math.min(v.left,window.innerWidth-384-16));h({top:v.bottom+8,left:x})}),ie(()=>{if(!e.open)return;const b=v=>{v.defaultPrevented||v.key==="Escape"&&(v.preventDefault(),m())};window.addEventListener("keydown",b),ae(()=>window.removeEventListener("keydown",b))});function g(){n("fix"),o(!1),s(""),l(null)}async function p(b){b.preventDefault();const v=i().trim();if(!v){l(_("appendTask.descRequired"));return}u(!0),l(null);try{await e.onSubmit({kind:t(),description:v,sectionPath:e.sectionPath,quote:e.quote,debug:t()==="fix"?r():void 0}),g(),e.onCancel()}catch(y){l(y.message)}finally{u(!1)}}function m(){e.onCancel()}return f(W,{get when(){return e.open},get children(){var b=O6(),v=b.firstChild,y=v.firstChild,x=y.firstChild,E=x.nextSibling,C=y.nextSibling,k=C.firstChild,O=k.firstChild,S=k.nextSibling;return b.$$mousedown=m,v.$$mousedown=D=>D.stopPropagation(),w(x,()=>_("appendTask.title")),w(E,()=>_("appendTask.hint")),C.addEventListener("submit",p),w(C,f(xn,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:D=>n(D),get disabled(){return a()},get children(){return[f(Ii,{class:"mb-1 font-medium",get children(){return _("appendTask.type")}}),te(()=>["feat","refct","fix"].map(D=>f(Qt,{value:D,class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return _(R6[D])}})]}})))]}}),k),w(C,f(W,{get when(){return t()==="fix"},get children(){return f(Fo,{class:"ml-5 flex items-start gap-1.5",get checked(){return r()},onChange:o,get disabled(){return a()},get children(){return[f(Bo,{class:"mt-1"}),f(Di,{class:"flex cursor-pointer flex-col",get children(){return[(()=>{var D=S6();return w(D,()=>_("appendTask.debugMode")),D})(),(()=>{var D=k6();return w(D,()=>_("appendTask.debugModeHint")),D})()]}})]}})}}),k),w(O,()=>_("appendTask.description")),w(k,f(Aa,{get projectId(){return e.projectId},rows:5,autosize:!1,get value(){return i()},onValueChange:s,get placeholder(){return _("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return a()},class:"resize-y"}),null),w(C,f(W,{get when(){return e.sectionPath||e.quote},get children(){var D=D6();return w(D,f(W,{get when(){return e.sectionPath},get children(){var M=A6(),z=M.firstChild,K=z.nextSibling;return w(z,()=>_("appendTask.refSection")),w(K,()=>e.sectionPath),M}}),null),w(D,f(W,{get when(){return e.quote},get children(){var M=T6();return w(M,()=>e.quote?.slice(0,200)),M}}),null),D}}),S),w(C,f(W,{get when(){return c()},get children(){var D=I6();return w(D,c),D}}),S),w(S,f(xe,{type:"button",variant:"ghost",size:"sm",onClick:m,get disabled(){return a()},get children(){return _("common.cancel")}}),null),w(S,f(xe,{type:"submit",variant:"default",size:"sm",get disabled(){return a()},get children(){return[f(ra,{class:"mr-1 h-3.5 w-3.5"}),te(()=>te(()=>!!a())()?_("common.submitting"):_("appendTask.submit"))]}}),null),Ie(D=>{var M=_("appendTask.title"),z=d()?{top:`${d().top}px`,left:`${d().left}px`}:void 0;return M!==D.e&&We(v,"aria-label",D.e=M),D.t=$i(v,z,D.t),D},{e:void 0,t:void 0}),b}})};an(["mousedown"]);const Ds="__freeform__",M6={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},L6="accept";function $6(e){return e!==L6}function P6(e,t,n){const r=M6[t],o=(n??"").trim();if($6(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function F6(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===Ds?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}var B6=B('<p class="text-destructive mx-3 mt-1 ">'),z6=B('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-warning"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),qg=B('<p class="m-0 break-words"><strong></strong>:'),U6=B("<div>"),K6=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),H6=B('<em class="text-sm not-italic text-primary"> '),j6=B('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');function Vb(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 q6(e){const t=Vb(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function G6(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}const V6=e=>{const t=()=>{const b={};for(const v of e.questions){if(v.kind==="confirm"){b[v.id]={note:"",confirmTop:"accept"};continue}const y=v.options.find(x=>x.recommended);b[v.id]={selectedOptionLabel:y?.label??v.options[0]?.label,note:""}}return b},[n,r]=N(t()),[o,i]=N(!1),[s,a]=N(null);function u(b,v){r(y=>({...y,[b]:{...y[b],...v}}))}function c(b,v){u(b,{selectedOptionLabel:v})}function l(b,v){u(b,{note:v})}function d(b,v){v==="accept"?u(b,{confirmTop:v,confirmIntent:void 0,confirmDrop:void 0}):u(b,{confirmTop:v})}function h(b,v){v==="dropGoal"?u(b,{confirmIntent:v}):u(b,{confirmIntent:v,confirmDrop:void 0})}function g(b,v){u(b,{confirmDrop:v})}const p=se(()=>{const b=n();let v=0;for(const y of e.questions){const x=b[y.id];if(!x){v+=1;continue}if(y.kind==="confirm"){q6(x)||(v+=1);continue}const E=x.note??"";y.isFreeform||x.selectedOptionLabel===Ds?E.trim()||(v+=1):x.selectedOptionLabel||(v+=1)}return v});async function m(){i(!0),a(null);try{const b=n(),v=[];for(const x of e.questions){const E=b[x.id]??{note:""};if(x.kind==="confirm"){const k=Vb(E);if(!k)continue;const O=P6(x,k,E.note);if(!O){a(_("questionConfirm.reasonRequired"));return}v.push(O);continue}const C=F6(x,E);C&&v.push(C)}const y={answers:v,freeformAnnotations:e.freeforms.map(x=>({sectionPath:x.sectionPath,quote:x.quote,note:x.note}))};if(y.answers.length===0&&y.freeformAnnotations.length===0){a(_("questionConfirm.noAnswers"));return}await e.onSubmit(y)}catch(b){a(b.message)}finally{i(!1)}}return(()=>{var b=z6(),v=b.firstChild,y=v.firstChild,x=y.firstChild,E=x.nextSibling,C=E.firstChild,k=C.nextSibling;k.nextSibling;var O=v.nextSibling;return w(x,()=>_("questionConfirm.title")),w(E,()=>_("questionConfirm.unanswered"),C),w(k,p),w(E,()=>e.questions.length,null),w(v,f(xe,{size:"sm",class:"shrink-0",get disabled(){return o()||e.running},onClick:m,get children(){return[f(ra,{class:"mr-1 h-3.5 w-3.5"}),te(()=>te(()=>!!o())()?_("common.submitting"):te(()=>!!e.running)()?_("questionConfirm.running"):_("questionConfirm.submitAll"))]}}),null),w(b,f(W,{get when(){return s()},get children(){var S=B6();return w(S,s),S}}),O),w(O,f(tt,{get each(){return e.questions},children:S=>{const D=()=>n()[S.id]??{note:""},M=()=>S.kind!=="confirm"&&(S.isFreeform||D().selectedOptionLabel===Ds),z=()=>S.kind==="confirm"&&D().confirmTop==="reject";return(()=>{var K=K6(),j=K.firstChild;return w(j,()=>S.text),w(K,f(W,{get when(){return S.kind==="choice"},get children(){return f(xn,{class:"m-0 flex flex-col gap-1 p-0",get value(){return D().selectedOptionLabel??""},onChange:T=>c(S.id,T),get children(){return[f(tt,{get each(){return S.options},children:T=>f(Qt,{get value(){return T.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"min-w-0 cursor-pointer break-words",get children(){return[te(()=>T.label),f(W,{get when(){return T.recommended},get children(){var R=H6();return R.firstChild,w(R,()=>_("questionConfirm.recommended"),null),R}})]}})]}})}),f(Qt,{value:Ds,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"qcp-option-freeform cursor-pointer",get children(){return _("questionConfirm.freeformLabel")}})]}})]}})}}),null),w(K,f(W,{get when(){return S.kind==="confirm"},get children(){return[(()=>{var T=U6();return w(T,f(W,{get when(){return S.plan},get children(){var R=qg(),A=R.firstChild;return A.nextSibling,w(A,()=>_("questionConfirm.confirmPlanLabel")),w(R,()=>S.plan,null),R}}),null),w(T,f(W,{get when(){return S.impact},get children(){var R=qg(),A=R.firstChild;return A.nextSibling,w(A,()=>_("questionConfirm.confirmImpactLabel")),w(R,()=>S.impact,null),R}}),null),Ie(()=>Ot(T,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${G6(S.impact)}`)),T})(),f(xn,{class:"m-0 flex flex-col gap-1 p-0",get value(){return D().confirmTop??""},onChange:T=>d(S.id,T),get children(){return[f(Qt,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"qcp-confirm-accept cursor-pointer",get children(){return _("questionConfirm.decisionAccept")}})]}}),f(Qt,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return _("questionConfirm.decisionReject")}})]}})]}}),f(W,{get when(){return D().confirmTop==="reject"},get children(){return f(xn,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return D().confirmIntent??""},onChange:T=>h(S.id,T),get children(){return[f(tt,{get each(){return[["alternative",_("questionConfirm.intentAlternative")],["constraint",_("questionConfirm.intentConstraint")],["dropGoal",_("questionConfirm.intentDropGoal")]]},children:([T,R])=>f(Qt,{value:T,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"min-w-0 cursor-pointer break-words",children:R})]}})}),f(W,{get when(){return D().confirmIntent==="dropGoal"},get children(){return f(xn,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return D().confirmDrop??""},onChange:T=>g(S.id,T),get children(){return f(tt,{get each(){return[["current",_("questionConfirm.dropGoalCurrent")],["spec",_("questionConfirm.dropGoalSpec")]]},children:([T,R])=>f(Qt,{value:T,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"min-w-0 cursor-pointer break-words",children:R})]}})})}})}})]}})}})]}}),null),w(K,f(W,{get when(){return M()},get children(){return f(Po,{class:"qcp-note",rows:2,get placeholder(){return _("questionConfirm.notePlaceholder")},get value(){return D().note},onInput:T=>l(S.id,T.currentTarget.value)})}}),null),w(K,f(W,{get when(){return z()},get children(){return f(Po,{class:"qcp-reject-reason",rows:2,get placeholder(){return _("questionConfirm.reasonPlaceholder")},get value(){return D().note},onInput:T=>l(S.id,T.currentTarget.value)})}}),null),K})()}}),null),w(O,f(tt,{get each(){return e.freeforms},children:S=>(()=>{var D=j6(),M=D.firstChild,z=M.firstChild,K=M.nextSibling,j=K.firstChild,T=j.nextSibling,R=T.nextSibling,A=R.nextSibling,I=A.nextSibling;I.nextSibling;var F=K.nextSibling;return F.firstChild,w(z,()=>_("questionConfirm.selectionAnnotation")),w(M,f(xe,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(S.id),"aria-label":"remove",get children(){return f(jr,{class:"h-4 w-4"})}}),null),w(j,()=>S.sectionPath),w(K,()=>_("questionConfirm.quoteConnector"),R),w(K,()=>S.quote.slice(0,200),I),w(F,()=>S.note,null),D})()}),null),Ie(()=>We(x,"title",_("questionConfirm.title"))),b})()};var W6=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),Gg=B("<p class=text-muted-foreground>"),Y6=B('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),Z6=B('<p class="text-destructive ">'),X6=B('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const J6={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},Q6=120,Vg=3,eI=150,tI=e=>new Promise(t=>setTimeout(t,e));async function nI(e,t,n){for(let r=0;r<=Vg;r+=1)try{return await he.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<Vg&&await tI(eI)}return n??null}const rI=()=>{const e=Bi(),t=fo(),[n,r]=N(0),[o,i]=N(!1),[s,a]=N(""),[u]=Gt(()=>[t(),e.id,n()],async([V,Y],ee)=>nI(V,Y,ee.value)),[c]=Gt(()=>[t(),e.id,n()],async([V,Y])=>{try{return await he.getDebug(V,Y)}catch{return{exists:!1,text:""}}}),[l,d]=N(null),[h,g]=N(!1),[p,m]=N(null),[b,v]=N(null),[y,x]=N(null),[E,C]=N([]),[k,O]=N(!1),[S,D]=N(null);let M;const z=se(()=>{const V=u();return V?l6(V.body):[]}),K=se(()=>`@.yorz/specs/${e.id}/spec.md`),j=se(()=>!u()||o()?!1:z().length>0||E().length>0);ie(()=>{const V=e.id,Y=t();if(!V||!Y)return;let ee;const re=Tw(Y,V,{onUpdated:()=>{ee&&clearTimeout(ee),ee=setTimeout(()=>void hp(()=>r(Q=>Q+1)),Q6)}});ae(()=>{ee&&clearTimeout(ee),re()})}),ie(()=>{const V=e.id,Y=t();!V||!Y||he.getSpecSession(Y,V).then(({sessionId:ee,running:re})=>{ee&&(a(ee),i(re),Do(ee))}).catch(()=>{})}),ie(()=>{const V=t(),Y=s();if(!V||!Y)return;const ee=sh(V,{onStatus:re=>{re.sessionId===Y&&i(re.running)}});ae(ee)}),ie(()=>{const V=t(),Y=s();if(!V||!Y)return;const ee=ia(V,Y,{onEvent:re=>{(re.type==="turn-completed"||re.type==="error")&&i(!1)}});ae(ee)}),ie(()=>{const V=y();if(!V)return;const Y=t6(V,d);ae(Y)}),Ui(()=>k()||h()),ie(()=>{const V=y(),Y=u();if(!V||!Y)return;const ee=t();let re=!0,Q;const Ce=Fl(Y.body,{specId:Y.id,projectId:ee||void 0});e3(V,`<article>${Ce}</article>`,{childrenOnly:!0,onBeforeElUpdated:(Oe,Ye)=>!(Oe.classList?.contains("mermaid")&&Oe.getAttribute("data-mermaid-source")===Ye.getAttribute?.("data-mermaid-source"))}),JD(V).then(Oe=>{if(!re){Oe();return}Q=Oe}),ae(()=>{re=!1,Q?.()})});async function T(){v(null),i(!0);try{const V=t(),{sessionId:Y}=await he.runAgent(V,e.id);a(Y),Do(Y)}catch(V){i(!1),v(V.message)}}async function R(V){v(null);try{await he.setStage(t(),e.id,V),r(Y=>Y+1)}catch(Y){v(Y.message)}}async function A(){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(K()),Dt.success(_("specDetail.specPathCopied"))}catch{Dt.error(_("specDetail.specPathCopyFailed"))}}function I(V){m(V),g(!0)}async function F(V){const Y=p();Y&&C(ee=>[...ee,{id:`f-${Date.now()}-${ee.length}`,sectionPath:Y.sectionPath,quote:Y.text,note:V}])}function $(V){C(Y=>Y.filter(ee=>ee.id!==V))}async function U(V){await he.submitQuestionAnswers(t(),e.id,V),C([]),await T()}function G(){D(l()),O(!0)}async function P(V){const Y=t(),ee=await he.appendItem(Y,e.id,V);ee.sessionId&&(i(!0),a(ee.sessionId),Do(ee.sessionId))}async function Z(V){i(!0);try{const Y=t(),{sessionId:ee}=await he.explain(Y,e.id,V.text);a(ee),Do(ee)}catch(Y){i(!1),v(Y.message)}}return(()=>{var V=W6();return w(V,f(Qs,{get fallback(){return(()=>{var Y=Gg();return w(Y,()=>_("common.loading")),Y})()},get children(){return f(W,{get when(){return u()},get fallback(){return(()=>{var Y=Gg();return w(Y,()=>_("specDetail.notFound")),Y})()},children:Y=>[(()=>{var ee=Y6(),re=ee.firstChild,Q=re.firstChild,Ce=re.nextSibling,Oe=Ce.firstChild,Ye=Ce.nextSibling,nt=Ye.firstChild,yt=nt.firstChild,lt=yt.nextSibling,St=nt.nextSibling;return w(Q,f(Qi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:Y().id}]}}),null),w(Q,f(xe,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("specDetail.copySpecPath")},get"aria-label"(){return _("specDetail.copySpecPath")},onClick:()=>void A(),get children(){return f(Qv,{class:"h-3.5 w-3.5"})}}),null),w(re,f(ji,{}),null),w(Oe,()=>Y().frontmatter.summary||_("common.pendingAgent")),w(yt,()=>Y().frontmatter.stage),lt.addEventListener("change",kt=>R(kt.currentTarget.value)),w(St,()=>ch(Y().frontmatter.updated_at)),w(Ye,f(xe,{variant:"outline",size:"sm",class:"append-btn",ref(kt){var zt=M;typeof zt=="function"?zt(kt):M=kt},onClick:G,get children(){return _("specDetail.appendTask")}}),null),w(Ye,f(Sn,{class:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground",get href(){return Mt(`specs/${Y().id}/review`)},get title(){return _("git.title")},get children(){return f(na,{class:"h-4 w-4"})}}),null),w(Ye,f(W,{get when(){return c()?.exists},get children(){return f(Sn,{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 Mt(`specs/${Y().id}/debug`)},get children(){return _("specDetail.debug")}})}}),null),w(Ye,f(W,{get when(){return o()},get children(){return f(Mh,{variant:"secondary",get children(){return _("specDetail.running")}})}}),null),Ie(kt=>{var zt=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${J6[Y().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,Lt=_("specDetail.forceStage"),Vt=_("specDetail.forceStage");return zt!==kt.e&&Ot(yt,kt.e=zt),Lt!==kt.t&&We(lt,"title",kt.t=Lt),Vt!==kt.a&&We(lt,"aria-label",kt.a=Vt),kt},{e:void 0,t:void 0,a:void 0}),Ie(()=>lt.value=Y().frontmatter.stage),ee})(),f(W,{get when(){return b()},get children(){var ee=Z6();return w(ee,b),ee}}),(()=>{var ee=X6(),re=ee.firstChild;return w(ee,f(W,{get when(){return j()},get children(){return f(V6,{get questions(){return z()},get freeforms(){return E()},get running(){return o()},onRemoveFreeform:$,onSubmit:U})}}),re),br(x,re),ee})(),f(x6,{get snap(){return te(()=>!!h())()?null:l()},onAnnotate:I,onExplain:Z}),f(C6,{get open(){return h()},get projectId(){return t()},get snap(){return p()},onCancel:()=>g(!1),onSubmit:F}),f(N6,{get open(){return k()},get projectId(){return t()},get sectionPath(){return S()?.sectionPath},get quote(){return S()?.text},anchorEl:M,onCancel:()=>O(!1),onSubmit:P})]})}})),V})()};var oI=B('<svg><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m8 9l4-4l4 4m0 6l-4 4l-4-4"></svg>',!1,!0,!1),iI=B('<svg xmlns=http://www.w3.org/2000/svg class="h-4 w-4"viewBox="0 0 24 24"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checked');const sI=qt,aI=qt.Value;qt.Description;qt.ErrorMessage;qt.ItemDescription;qt.HiddenSelect;qt.Section;const uI=e=>{const[t,n]=ce(e,["class","children"]);return f(qt.Trigger,q({get class(){return ot("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background transition-shadow placeholder:text-muted-foreground focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n,{get children(){return[te(()=>t.children),f(qt.Icon,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"flex size-4 items-center justify-center opacity-50",get children(){return oI()}})]}}))},cI=e=>{const[t,n]=ce(e,["class","children"]);return f(qt.Portal,{get children(){return f(qt.Content,q({get class(){return ot("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[te(()=>t.children),f(qt.Listbox,{class:"p-1 focus-visible:outline-none"})]}}))}})},lI=e=>{const[t,n]=ce(e,["class","children"]);return f(qt.Item,q({get class(){return ot("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[f(qt.ItemIndicator,{class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",get children(){return iI()}}),f(qt.ItemLabel,{get children(){return t.children}})]}}))};var tc,Wg;function dI(){if(Wg)return tc;Wg=1,tc=l=>{if(!l)return[];if(typeof l!="string"||l.match(/^\s+$/))return[];const d=l.split(`
|
|
27
|
-
`);if(d.length===0)return[];const h=[];let g=null,p=null,m=0,b=0,v=null;const y=P=>{p?.changes.push({type:"normal",normal:!0,ln1:m++,ln2:b++,content:P}),v.oldLines--,v.newLines--},x=P=>{const[Z,V]=n(P)??[];g={chunks:[],deletions:0,additions:0,from:Z,to:V},h.push(g)},E=()=>{(!g||g.chunks.length)&&x()},C=(P,Z)=>{E(),g.new=!0,g.newMode=Z[1],g.from="/dev/null"},k=(P,Z)=>{E(),g.deleted=!0,g.oldMode=Z[1],g.to="/dev/null"},O=(P,Z)=>{E(),g.oldMode=Z[1]},S=(P,Z)=>{E(),g.newMode=Z[1]},D=(P,Z)=>{E(),g.index=P.split(" ").slice(1),Z[1]&&(g.oldMode=g.newMode=Z[1].trim())},M=P=>{E(),g.from=o(P)},z=P=>{E(),g.to=o(P)},K=P=>+(P||1),j=(P,Z)=>{g||x(P);const[V,Y,ee,re]=Z.slice(1);m=+V,b=+ee,p={content:P,changes:[],oldStart:+V,oldLines:K(Y),newStart:+ee,newLines:K(re)},v={oldLines:K(Y),newLines:K(re)},g.chunks.push(p)},T=P=>{p&&(p.changes.push({type:"del",del:!0,ln:m++,content:P}),g.deletions++,v.oldLines--)},R=P=>{p&&(p.changes.push({type:"add",add:!0,ln:b++,content:P}),g.additions++,v.newLines--)},A=P=>{if(!p)return;const[Z]=p.changes.slice(-1);p.changes.push({type:Z.type,[Z.type]:!0,ln1:Z.ln1,ln2:Z.ln2,ln:Z.ln,content:P})},I=[[/^diff\s/,x],[/^new file mode (\d+)$/,C],[/^deleted file mode (\d+)$/,k],[/^old mode (\d+)$/,O],[/^new mode (\d+)$/,S],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,D],[/^---\s/,M],[/^\+\+\+\s/,z],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,j],[/^\$/,A]],F=[[/^\$/,A],[/^-/,T],[/^\+/,R],[/^\s*/,y]],$=P=>{for(const[Z,V]of F){const Y=P.match(Z);if(Y){V(P,Y);break}}v.oldLines===0&&v.newLines===0&&(v=null)},U=P=>{for(const[Z,V]of I){const Y=P.match(Z);if(Y){V(P,Y);break}}},G=P=>{v?$(P):U(P)};for(const P of d)G(P);return h};const e=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,t=/^(a|b|i|w|c|o|1|2)\//,n=l=>l?.match(e)?.map(d=>d.replace(t,"").replace(/("|')$/,"")),r=/^\\?['"]|\\?['"]$/g,o=l=>{let d=i(l,"-+").trim();return d=a(d),d.replace(r,"").replace(t,"")},i=(l,d)=>{l=c(l);const h=u(d);return l.replace(new RegExp(`^${h}+`),"")},s=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,a=l=>{const d=s.exec(l);return d&&(l=l.substring(0,d.index).trim()),l},u=l=>l instanceof RegExp?l.source:`[${c(l).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,c=l=>`${l??""}`;return tc}var fI=dI();const gI=Na(fI);var pI=B('<span class="shrink-0 text-sm text-warning">'),hI=B('<button type=button class="ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring">'),mI=B('<div data-testid=git-diff-pane class="code-highlight flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border bg-card"><div class="flex items-center gap-2 border-b px-2 py-1"><span class="min-w-0 flex-1 truncate font-mono text-sm"></span></div><div class="min-h-0 flex-1 overflow-auto">'),nc=B('<p class="p-3 text-muted-foreground">'),bI=B('<p class="p-3 text-destructive">'),yI=B('<div><div class="bg-muted px-2 py-0.5 font-mono text-sm text-muted-foreground">'),vI=B('<div><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><pre class="m-0 flex-1 whitespace-pre-wrap break-all px-2"><span>'),xI=B("<span>"),wI=B("<span class=hljs>");const _I={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",vue:"xml",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql"},EI=e=>{const t=se(()=>e.patch?gI(e.patch):[]),n=se(()=>t().some(i=>i.chunks.length>0)),r=se(()=>{const i=e.path.split(".").pop()?.toLowerCase()??"",s=_I[i];return s&&Vs.getLanguage(s)?s:null});function o(i){const s=r();if(!s||!i)return null;try{return Vs.highlight(i,{language:s,ignoreIllegals:!0}).value}catch{return null}}return(()=>{var i=mI(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return w(a,()=>e.path),w(s,f(W,{get when(){return e.truncated},get children(){var c=pI();return w(c,()=>_("git.diffTruncated")),c}}),null),w(s,f(W,{get when(){return e.onClose},get children(){var c=hI();return c.$$click=()=>e.onClose?.(),w(c,f(jr,{class:"h-4 w-4"})),Ie(l=>{var d=_("common.close"),h=_("common.close");return d!==l.e&&We(c,"aria-label",l.e=d),h!==l.t&&We(c,"title",l.t=h),l},{e:void 0,t:void 0}),c}}),null),w(u,f(W,{get when(){return!e.loading},get fallback(){return(()=>{var c=nc();return w(c,()=>_("git.diffLoading")),c})()},get children(){return f(W,{get when(){return!e.error},get fallback(){return(()=>{var c=bI();return w(c,()=>e.error),c})()},get children(){return f(W,{get when(){return!e.binary},get fallback(){return(()=>{var c=nc();return w(c,()=>_("git.binaryFile")),c})()},get children(){return f(W,{get when(){return n()},get fallback(){return(()=>{var c=nc();return w(c,()=>_("git.diffEmpty")),c})()},get children(){return f(tt,{get each(){return t()},children:c=>f(tt,{get each(){return c.chunks},children:l=>(()=>{var d=yI(),h=d.firstChild;return w(h,()=>l.content),w(d,f(tt,{get each(){return l.changes},children:g=>{const p=g.type==="add"?"":g.type==="del"?g.ln:g.ln1,m=g.type==="del"?"":g.type==="add"?g.ln:g.ln2,b=g.type==="add"?"bg-success/10":g.type==="del"?"bg-destructive/10":"",v=g.type==="add"?"text-success":g.type==="del"?"text-destructive":"text-muted-foreground",y=g.content.slice(0,1),x=g.content.slice(1),E=o(x);return(()=>{var C=vI(),k=C.firstChild,O=k.nextSibling,S=O.nextSibling,D=S.firstChild;return Ot(C,`flex font-mono text-sm ${b}`),w(k,p),w(O,m),Ot(D,`select-none ${v}`),w(D,y),w(S,f(W,{when:E,get fallback(){return(()=>{var M=xI();return w(M,x),M})()},children:M=>(()=>{var z=wI();return Ie(()=>z.innerHTML=M()),z})()}),null),C})()}}),null),d})()})})}})}})}})}})),Ie(()=>We(a,"title",e.path)),i})()};an(["click"]);var CI=B('<span class="min-w-0 flex-1 truncate text-left font-mono">'),SI=B('<div class="border-b p-1">'),kI=B('<div class="px-2 py-2 text-sm text-muted-foreground">'),AI=B('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),TI=B('<p class=" text-muted-foreground">'),DI=B('<p class="text-destructive ">'),II=B('<p class=" text-muted-foreground">(runId: <code></code>)'),OI=B('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><span aria-hidden=true class="select-none text-border">|'),RI=B('<span class="truncate font-mono text-sm">'),NI=B('<div><button type=button class="flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left"><span></span><span class="truncate font-mono text-sm">');const MI={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"},Wb=e=>{const[t,n]=N([]),[r,o]=N("manual"),[i,s]=N(new Set),[a,u]=N(null),[c,l]=N(""),[d,h]=N(!1),[g,p]=N(null),[m,b]=N(""),[v,y]=N(null),[x,E]=N(null),[C,k]=N(null),[O,S]=N(null),[D,M]=N(""),[z,K]=N(null);function j(le){return M(le),new Promise(Re=>K(()=>Re))}function T(le){const Re=z();Re&&(K(null),Re(le))}const R=()=>e.specId?.(),A=se(()=>!!R());let I,F=null;ae(()=>F?.()),ae(()=>T(!1));function $(le){le&&(le.style.height="auto",le.style.height=`${le.scrollHeight}px`)}ie(()=>{const le=e.initialMessage?.()??"";le&&!d()&&l(le)}),ie(mt(c,()=>{$(I)})),wn(()=>$(I));const[U,{refetch:G,mutate:P}]=Gt(e.projectId,le=>he.getGitBranches(le)),Z=se(()=>{const le=m().trim().toLowerCase(),Re=U()?.branches??[];return le?Re.filter(Ne=>Ne.toLowerCase().includes(le)):Re});ie(()=>{const le=e.projectId();if(!le)return;const Re=Rw(le,Ne=>{n(Ne);const st=new Set(Ne.map(Le=>Le.path));s(Le=>{const Ft=new Set;for(const At of Le)st.has(At)&&Ft.add(At);return Ft});const Se=a();Se&&!st.has(Se)&&u(null)});ae(()=>Re())});const[V]=Gt(()=>{const le=a(),Re=e.projectId();if(!le||!Re)return null;const Ne=t().find(st=>st.path===le);return{pid:Re,path:le,revision:`${Ne?.index??""}${Ne?.worktree??""}`}},le=>he.getFileDiff(le.pid,le.path));function Y(le){return O()===le}const ee=se(()=>v()!==null||O()!==null||g()!==null),re=se(()=>x()??(U.error?U.error.message:null));function Q(le,Re){F?.(),S(le),F=ia(e.projectId(),Re,{onEvent:Ne=>{(Ne.type==="turn-completed"||Ne.type==="error")&&(S(null),F?.(),F=null)}})}function Ce(){return r()==="agent"?t().map(le=>le.path):[...i()]}async function Oe(le){if(ee())return;E(null);const Re=Ce();if(Re.length===0){E(_("review.selectAtLeastOne"));return}if(!(le==="discard"&&!await j(_("review.confirmDiscard")))){p(le);try{if(le==="commit"){const Ne=c().trim();if(!Ne){E(_("review.enterCommitMsg"));return}await he.projectCommit(e.projectId(),{message:Ne,paths:Re})}else await he.projectDiscard(e.projectId(),{paths:Re})}catch(Ne){E(Ne.message)}finally{p(null)}}}async function Ye(le){const Re=R();if(!(!Re||ee())&&(E(null),!(le==="discard"&&!await j(_("review.confirmDiscardAll"))))){y(le);try{const Ne=await he.gitOp(e.projectId(),Re,le);k({kind:le,runId:Ne.runId}),Do(Ne.sessionId),Q(le,Ne.sessionId)}catch(Ne){E(Ne.message)}finally{y(null)}}}async function nt(le){r()==="manual"?await Oe(le):await Ye(le)}async function yt(le){if(!ee()){E(null),p(le);try{if(le==="push"){const Re=await he.projectPush(e.projectId());Dt.success(_("git.pushed",{branch:Re.branch}))}else{const Re=await he.projectPull(e.projectId());Dt.success(Re.updated?_("git.pulled",{branch:Re.branch}):_("git.upToDate"))}}catch(Re){E(Re.message)}finally{p(null)}}}async function lt(le){const Re=le?.trim(),Ne=e.projectId();if(!(!Re||!Ne||ee())&&Re!==U()?.current){E(null),p("checkout");try{const st=await he.checkoutGitBranch(Ne,Re);P(Le=>({current:st.current,branches:Le?.branches.includes(st.current)?Le.branches:[...Le?.branches??[],st.current].sort()})),s(new Set),u(null),b("");const Se=await he.getProjectChanges(Ne);n(Se.changes),await G()}catch(st){E(st.message)}finally{p(null)}}}function St(le){return g()===le||le!=="push"&&le!=="pull"&&le!=="checkout"&&(Y(le)||v()===le)}function kt(le){s(Re=>{const Ne=new Set(Re);return Ne.has(le)?Ne.delete(le):Ne.add(le),Ne})}function zt(){t().every(le=>i().has(le.path))?s(new Set):s(new Set(t().map(le=>le.path)))}const Lt=se(()=>t().length>0&&t().every(le=>i().has(le.path))),Vt=se(()=>r()==="manual"&&i().size===0),nr=se(()=>ee()||r()==="manual"&&(Vt()||c().trim()===""));return(()=>{var le=OI(),Re=le.firstChild,Ne=Re.firstChild,st=Ne.firstChild;return w(Ne,f(sI,{get options(){return Z()},get value(){return U()?.current??null},onChange:Se=>void lt(Se),optionValue:Se=>Se,optionTextValue:Se=>Se,get disabled(){return ee()||U.loading||!!U.error},get placeholder(){return _("git.branchPlaceholder")},itemComponent:Se=>f(lI,{get item(){return Se.item},get children(){var Le=RI();return w(Le,()=>Se.item.rawValue),Le}}),get children(){return[f(uI,{class:"h-8 w-56 max-w-full gap-2 px-2 text-sm",get title(){return _("git.branchSelect")},get"aria-label"(){return _("git.branchSelect")},get children(){return[f(W,{get when(){return te(()=>!U.loading)()&&g()!=="checkout"},get fallback(){return f(Un,{class:"h-3.5 w-3.5 shrink-0 animate-spin"})},get children(){return f(na,{class:"h-3.5 w-3.5 shrink-0"})}}),(()=>{var Se=CI();return w(Se,f(aI,{children:Le=>Le.selectedOption()??_("git.branchPlaceholder")})),Se})()]}}),f(cI,{class:"w-64",get children(){return[(()=>{var Se=SI();return w(Se,f(qn,{get value(){return m()},onInput:Le=>b(Le.currentTarget.value),onKeyDown:Le=>Le.stopPropagation(),get placeholder(){return _("git.branchFilterPlaceholder")},class:"h-8 text-sm"})),Se})(),f(W,{get when(){return te(()=>!U.loading)()&&Z().length===0},get children(){var Se=kI();return w(Se,()=>_("git.noBranches")),Se}})]}})]}}),st),w(Ne,f(xe,{variant:"default",size:"sm",get disabled(){return nr()},onClick:()=>nt("commit"),get children(){return[f(W,{get when(){return St("commit")},get children(){return f(Un,{class:"mr-1 h-3 w-3 animate-spin"})}}),te(()=>te(()=>!!St("commit"))()?_("review.committing"):_("review.commit"))]}}),st),w(Ne,f(xe,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return ee()||Vt()},onClick:()=>nt("discard"),get children(){return[f(W,{get when(){return St("discard")},get children(){return f(Un,{class:"mr-1 h-3 w-3 animate-spin"})}}),te(()=>te(()=>!!St("discard"))()?_("review.discarding"):_("review.discard"))]}}),st),w(Ne,f(xe,{variant:"ghost",size:"sm",get disabled(){return ee()},onClick:()=>void yt("push"),get children(){return[f(W,{get when(){return St("push")},get children(){return f(Un,{class:"mr-1 h-3 w-3 animate-spin"})}}),te(()=>te(()=>!!St("push"))()?_("git.pushing"):_("git.push"))]}}),null),w(Ne,f(xe,{variant:"ghost",size:"sm",get disabled(){return ee()},onClick:()=>void yt("pull"),get children(){return[f(W,{get when(){return St("pull")},get children(){return f(Un,{class:"mr-1 h-3 w-3 animate-spin"})}}),te(()=>te(()=>!!St("pull"))()?_("git.pulling"):_("git.pull"))]}}),null),w(Re,f(Po,{ref(Se){var Le=I;typeof Le=="function"?Le(Se):I=Se},get placeholder(){return _("review.commitPlaceholder")},get value(){return c()},onInput:Se=>{h(!0),l(Se.currentTarget.value),$(I)},get disabled(){return ee()},rows:2,class:"resize-none"}),null),w(Re,f(W,{get when(){return A()},get children(){return f(xn,{class:"flex gap-4",get value(){return r()},onChange:Se=>o(Se),get disabled(){return ee()},get children(){return[f(Qt,{value:"manual",class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return _("review.manualSelect")}})]}}),f(Qt,{value:"agent",class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return _("review.agentSelect")}})]}})]}})}}),null),w(Re,f(W,{get when(){return te(()=>r()==="manual")()&&t().length>0},get children(){var Se=AI(),Le=Se.firstChild,Ft=Le.firstChild;return w(Le,f(xe,{variant:"ghost",size:"sm",onClick:zt,get disabled(){return ee()},get children(){return te(()=>!!Lt())()?_("review.deselectAll"):_("review.selectAll")}}),Ft),w(Ft,()=>_("review.fileCount",{selected:i().size,total:t().length})),w(Se,f(tt,{get each(){return t()},children:At=>(()=>{var bn=NI(),un=bn.firstChild,Wt=un.firstChild,rr=Wt.nextSibling;return w(bn,f(Fo,{get checked(){return i().has(At.path)},onChange:()=>kt(At.path),get disabled(){return ee()},get children(){return f(Bo,{})}}),un),un.$$click=()=>u(At.path),w(Wt,()=>At.status),w(rr,()=>At.path),Ie(Yt=>{var or=`flex items-center gap-2 px-2 py-0.5 ${a()===At.path?"bg-accent":""}`,Sr=At.path,kr=`inline-block w-6 text-center text-sm font-bold ${MI[At.status]??""}`;return or!==Yt.e&&Ot(bn,Yt.e=or),Sr!==Yt.t&&We(un,"title",Yt.t=Sr),kr!==Yt.a&&Ot(Wt,Yt.a=kr),Yt},{e:void 0,t:void 0,a:void 0}),bn})()}),null),Se}}),null),w(Re,f(W,{get when(){return te(()=>r()==="manual")()&&t().length===0},get children(){var Se=TI();return w(Se,()=>_("review.noChanges")),Se}}),null),w(Re,f(W,{get when(){return re()},get children(){var Se=DI();return w(Se,re),Se}}),null),w(Re,f(W,{get when(){return C()},get children(){var Se=II(),Le=Se.firstChild,Ft=Le.nextSibling;return w(Se,()=>_("review.dispatched"),Le),w(Se,(()=>{var At=te(()=>C().kind==="commit");return()=>At()?_("review.commit"):_("review.discard")})(),Le),w(Ft,()=>C().runId.slice(0,8)),Se}}),null),w(le,f(W,{get when(){return a()},children:Se=>f(EI,{get path(){return Se()},get patch(){return V()?.patch??""},get binary(){return V()?.binary??!1},get truncated(){return V()?.truncated??!1},get loading(){return V.loading},get error(){return te(()=>!!V.error)()?V.error.message:null},onClose:()=>u(null)})}),null),w(le,f(on,{get open(){return z()!==null},onOpenChange:Se=>{Se||T(!1)},get children(){return f(yr,{class:"max-w-sm",get children(){return[f(xr,{get children(){return[f(vr,{get children(){return _("review.discardTitle")}}),f(ya,{get children(){return D()}})]}}),f(Kr,{get children(){return[f(xe,{variant:"outline",onClick:()=>T(!1),get children(){return _("common.cancel")}}),f(xe,{variant:"destructive",onClick:()=>T(!0),get children(){return _("review.confirmDiscardAction")}})]}})]}})}}),null),le})()};an(["click"]);var LI=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),$I=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),PI=B("<p class=text-muted-foreground>");const FI=()=>{const e=Bi(),t=fo(),[n]=Gt(()=>[t(),e.id],([o,i])=>he.getSpec(o,i));Ui();const r=se(()=>{const o=e.id.split("."),i=o.length>=2?o[1]:"feat",s=n()?.frontmatter.summary??"";return s?`${i}: ${s}`:`${i}: update`});return(()=>{var o=$I();return w(o,f(Qs,{get fallback(){return(()=>{var i=PI();return w(i,()=>_("common.loading")),i})()},get children(){return[(()=>{var i=LI(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return w(s,f(Qi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:e.id,href:Mt(`specs/${e.id}`)},{label:_("git.title")}]}}),a),w(a,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(u,f(ji,{})),i})(),f(Wb,{projectId:t,specId:()=>e.id,initialMessage:r})]}})),o})()};var BI=B('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),Yg=B("<p class=text-muted-foreground>"),zI=B('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),UI=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),KI=B('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),HI=B('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const jI=()=>{const e=Bi(),t=fo();Ui();const[n]=Gt(()=>[t(),e.id],([i,s])=>he.getSpec(i,s)),[r]=Gt(()=>[t(),e.id],([i,s])=>he.getDebug(i,s)),o=se(()=>{const i=PD(r()?.text??"");return i.trim()?Fl(i,{specId:e.id,projectId:t()}):""});return(()=>{var i=UI();return w(i,f(Qs,{get fallback(){return(()=>{var s=Yg();return w(s,()=>_("common.loading")),s})()},get children(){return[(()=>{var s=BI(),a=s.firstChild,u=a.firstChild,c=a.nextSibling;return w(a,f(Qi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:e.id,href:Mt(`specs/${e.id}`)},{label:_("specDetail.debug")}]}}),u),w(u,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(c,f(ji,{})),s})(),(()=>{var s=zI();return w(s,f(W,{get when(){return r.loading},get fallback(){return f(W,{get when(){return o()},get fallback(){return(()=>{var a=HI();return w(a,()=>_("specDebug.empty")),a})()},get children(){var a=KI();return Ie(()=>a.innerHTML=o()),a}})},get children(){var a=Yg();return w(a,()=>_("common.loading")),a}})),s})()]}})),i})()};var qI=B('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex items-start justify-between gap-2"><div class="flex shrink-0 items-center gap-2 text-muted-foreground">');const GI=()=>{const e=fo();return Ui(),(()=>{var t=qI(),n=t.firstChild,r=n.firstChild;return w(n,f(Qi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:_("git.title")}]}}),r),w(r,f(ji,{})),w(t,f(Wb,{projectId:e}),null),t})()};function Zg(){return{text:"",nextOffset:0,truncated:!1}}function VI(e){return{text:e.text,nextOffset:e.offset+$c(e.text),truncated:e.truncated}}function WI(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+$c(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+$c(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function Xg(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function $c(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}var YI=B('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),ZI=B("<p class=text-muted-foreground>"),XI=B('<span class="text-xs text-muted-foreground">: '),JI=B('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),QI=B('<p class="m-0 mt-2 text-xs text-muted-foreground">'),eO=B('<p class="m-0 mt-2 text-xs text-destructive">'),tO=B('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const nO=80,rO=96,Jg=4e5,oO=()=>{const e=Bi(),t=fo(),[n,{mutate:r}]=Gt(()=>[t(),e.runId],async([k,O])=>k&&O?he.getCommandRun(k,O):null),[o,i]=N(Zg()),[s,a]=N(null),[u,c]=N(!1),[l,d]=N(Date.now());let h,g=!0,p=null,m=null,b=!1;const v=setInterval(()=>d(Date.now()),1e3);ae(()=>clearInterval(v));function y(k){p=Xg(k,Jg),m===null&&(m=window.setTimeout(()=>{m=null,p&&(i(p),p=null,g&&h&&(h.scrollTop=h.scrollHeight))},nO))}ae(()=>{m!==null&&window.clearTimeout(m)});async function x(k,O){if(!b){b=!0;try{const S=await he.readCommandOutput(k,O),D=Xg(VI(S),Jg);p=null,i(D),a(null),h&&(h.scrollTop=h.scrollHeight)}catch(S){a(S.message)}finally{b=!1}}}ie(()=>{const k=t(),O=e.runId;if(!k||!O)return;i(Zg()),x(k,O);const S=Ow(k,O,{onOutput:D=>{const M=p??o(),z=WI(M,D);z.needsRefetch?x(k,O):y(z.state)},onRun:D=>r(D),onError:D=>a(D)});ae(S)});function E(){h&&(g=h.scrollHeight-h.scrollTop-h.clientHeight<=rO)}async function C(){const k=t(),O=n();if(!(!k||!O)){c(!0);try{const S=await he.stopCommandRun(k,O.runId);r(S.run),Dt.success(_("commands.stopped"))}catch(S){Dt.error(S.message)}finally{c(!1)}}}return(()=>{var k=YI(),O=k.firstChild,S=O.firstChild;return w(O,f(xe,{as:Sn,get href(){return Mt("")},variant:"ghost",size:"sm",get children(){return[f(Ov,{class:"mr-1 h-4 w-4"}),te(()=>_("commands.back"))]}}),S),w(S,()=>_("commands.detailTitle")),w(k,f(W,{get when(){return n()},get fallback(){return(()=>{var D=ZI();return w(D,()=>s()??_("common.loading")),D})()},children:D=>[(()=>{var M=JI(),z=M.firstChild,K=z.nextSibling,j=K.nextSibling,T=j.firstChild,R=j.nextSibling,A=R.firstChild;return w(M,f(W,{get when(){return D().status==="running"},get children(){return f(xe,{variant:"destructive",size:"sm",get disabled(){return u()},onClick:()=>void C(),get children(){return[f(rh,{class:"mr-1 h-3.5 w-3.5"}),te(()=>te(()=>!!u())()?_("commands.stopping"):_("commands.stop"))]}})}}),z),w(M,f(nb,{get status(){return D().status}}),z),w(z,()=>D().name),w(K,()=>D().cli),w(j,()=>_("commands.duration"),T),w(j,()=>sb(D().startedAt,D().endedAt,l()),null),w(M,f(W,{get when(){return D().status!=="running"},get children(){var I=XI(),F=I.firstChild;return w(I,()=>_("commands.exitCode"),F),w(I,()=>D().exitCode??D().signal??"—",null),I}}),R),w(R,()=>_("commands.logFile"),A),w(R,()=>D().logFile,null),M})(),f(W,{get when(){return o().truncated},get children(){var M=QI();return w(M,()=>_("commands.outputTruncated")),M}}),f(W,{get when(){return s()},get children(){var M=eO();return w(M,s),M}}),(()=>{var M=tO();M.addEventListener("scroll",E);var z=h;return typeof z=="function"?br(z,M):h=M,w(M,()=>o().text||_("commands.outputEmpty")),M})()]}),null),k})()};var iO=B('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add <path>');const Yb=()=>(()=>{var e=iO(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>_("welcome.title")),w(r,()=>_("welcome.description")),w(o,()=>_("welcome.addHint"),i),e})();var sO=B('<p class="p-8 text-muted-foreground">');const aO=()=>{const[e]=Gt(()=>he.listProjects());return f(W,{get when(){return!e.loading},get fallback(){return(()=>{var t=sO();return w(t,()=>_("common.loading")),t})()},get children(){return f(W,{get when(){return(e()??[]).length>0},get fallback(){return f(Yb,{})},get children(){return(()=>{const n=(e()??[])[0];return n?f(Ey,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})};var Qg=B('<label class="flex flex-col gap-1 font-medium"><span>'),uO=B('<form class="flex flex-col gap-4"><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),cO=B('<p class=" text-muted-foreground">'),lO=B('<p class=" text-destructive">');const ii=".yorz/specs",dO=e=>{const[t,n]=N("inherit"),[r,o]=N(""),[i,s]=N(""),[a,u]=N(ii),[c,l]=N(ii),[d,h]=N(!1),[g,p]=N(!1),[m,b]=N(null);ie(()=>{e.open&&(b(null),h(!0),(async()=>{try{const k=await he.getProjectConfig(e.projectId);v(k)}catch(k){b(k.message)}finally{h(!1)}})())});function v(k){n(k.agent.kind),k.agent.kind==="custom"?(o(k.agent.cmd),s(k.agent.args.join(" "))):(o(""),s(""));const O=k.specsDir||ii;u(O),l(O)}function y(k){return k.split(/\s+/).map(O=>O.trim()).filter(Boolean)}function x(){const k=t();if(k==="inherit")return{kind:"inherit"};if(k==="claude")return{kind:"claude"};if(k==="opencode")return{kind:"opencode"};if(k==="codex")return{kind:"codex"};const O=r().trim();return O?{kind:"custom",cmd:O,args:y(i())}:{error:_("projectConfig.cmdRequired")}}function E(k){return _(k==="inherit"?"projectConfig.inheritGlobal":k==="custom"?"projectConfig.custom":k==="codex"?"projectConfig.agentCodex":k==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function C(k){k.preventDefault(),b(null);const O=x();if("error"in O){b(O.error);return}const S=a().trim()||ii;if(S.split(/[\\/]/).some(D=>D==="..")){b(_("projectConfig.invalidPath"));return}p(!0);try{await he.updateProjectConfig(e.projectId,{agent:O,specsDir:S});let D=_("projectConfig.saved");S!==c()&&(D+=_("projectConfig.oldSpecsHint")),e.onSaved?.(D),e.onClose()}catch(D){b(D.message)}finally{p(!1)}}return f(on,{get open(){return e.open},onOpenChange:k=>!k&&e.onClose(),get children(){return f(yr,{class:"max-w-[480px]",get children(){return[f(xr,{get children(){return f(vr,{get children(){return[te(()=>_("projectConfig.title"))," · ",te(()=>e.projectName)]}})}}),f(W,{get when(){return!d()},get fallback(){return(()=>{var k=cO();return w(k,()=>_("common.loading")),k})()},get children(){var k=uO(),O=k.firstChild,S=O.firstChild,D=S.nextSibling;return k.addEventListener("submit",C),w(k,f(xn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:M=>n(M),get disabled(){return g()},get children(){return[f(Ii,{class:"mb-1.5 w-full font-medium",get children(){return _("projectConfig.agent")}}),te(()=>["inherit","claude","opencode","codex","custom"].map(M=>f(Qt,{value:M,class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return E(M)}})]}})))]}}),O),w(k,f(W,{get when(){return t()==="custom"},get children(){return[(()=>{var M=Qg(),z=M.firstChild;return w(z,()=>_("projectConfig.cmd")),w(M,f(qn,{type:"text",get value(){return r()},onInput:K=>o(K.currentTarget.value),get placeholder(){return _("projectConfig.cmdPlaceholder")},get disabled(){return g()}}),null),M})(),(()=>{var M=Qg(),z=M.firstChild;return w(z,()=>_("projectConfig.args")),w(M,f(qn,{type:"text",get value(){return i()},onInput:K=>s(K.currentTarget.value),placeholder:"--flag value",get disabled(){return g()}}),null),M})()]}}),O),w(S,()=>_("projectConfig.specsDir")),w(O,f(qn,{type:"text",get value(){return a()},onInput:M=>u(M.currentTarget.value),placeholder:ii,get disabled(){return g()}}),D),w(D,()=>_("projectConfig.specsDirHint")),w(k,(()=>{var M=te(()=>!!m());return()=>M()&&(()=>{var z=lO();return w(z,m),z})()})(),null),w(k,f(Kr,{get children(){return[f(xe,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return g()},get children(){return _("common.cancel")}}),f(xe,{type:"submit",get disabled(){return g()},get children(){return te(()=>!!g())()?_("common.saving"):_("projectConfig.save")}})]}}),null),k}})]}})}})};var fO=B('<span class=" font-semibold tracking-wide">'),gO=B('<div class="flex items-center gap-1">'),pO=B('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),hO=B('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),mO=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),bO=B("<aside><header></header><footer>"),yO=B('<p class="px-2.5 py-2 text-muted-foreground">'),vO=B('<span class="block truncate">'),xO=B('<span class="ml-1 inline-flex items-center gap-0.5 text-sm text-muted-foreground">'),wO=B('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),_O=B('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),EO=B('<li class="group relative flex items-center">'),CO=B('<span class="inline-block font-semibold">'),SO=B('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),kO=B('<p class="mt-1 text-sm text-destructive break-words">'),AO=B('<p class="break-all font-semibold">');const Zb="yorz.projectsSidebar.collapsed",Xb="yorz.projectsSidebar.width",Bl=220,TO=.2,DO=160,IO=640;function OO(){try{return typeof window<"u"&&window.localStorage.getItem(Zb)==="1"}catch{return!1}}function RO(e){try{typeof window<"u"&&window.localStorage.setItem(Zb,e?"1":"0")}catch{}}function Ma(e){return Number.isFinite(e)?Math.min(IO,Math.max(DO,Math.round(e))):Bl}function rc(){return typeof window>"u"?Bl:Ma(window.innerWidth*TO)}function NO(){try{if(typeof window>"u")return Bl;const e=window.localStorage.getItem(Xb);if(!e)return rc();const t=Number(e);return Number.isFinite(t)?Ma(t):rc()}catch{return rc()}}function MO(e){try{typeof window<"u"&&window.localStorage.setItem(Xb,String(Ma(e)))}catch{}}function ep(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 LO=()=>{const[e,t]=N(OO()),[n,r]=N(NO()),[o,{refetch:i}]=Gt(()=>he.listProjects()),[s,a]=N(null),[u,c]=N(null),[l,d]=N(null),[h,g]=N(!1),[p,m]=N(!1),b=jo(),v=ea(),y=se(()=>{const R=v.pathname.match(/^\/([^/]+)/);return R&&R[1]!=="api"?R[1]:""}),x=()=>e()||Lr();function E(){if(Lr()){Zc();return}const R=!e();t(R),RO(R)}let C=null,k=null,O=null;wn(()=>{const R=uh(()=>{i()});ae(R)});let S=0;ie(()=>{const R=xw();if(R===0||R===S)return;if(bt(u)){S=R,c(null);return}const A=bt(y),I=(o()??[]).find(F=>F.id===A);I&&(S=R,c(I))});function D(R){x()||(R.preventDefault(),C={startX:R.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),k=A=>{if(!C)return;const I=A.clientX-C.startX,F=Ma(C.startW+I);C.raf==null&&(C.raf=requestAnimationFrame(()=>{C&&(C.raf=null,r(F))}))},O=()=>{C?.raf!=null&&cancelAnimationFrame(C.raf),C=null,document.body.classList.remove("is-resizing"),k&&document.removeEventListener("mousemove",k),O&&document.removeEventListener("mouseup",O),k=null,O=null,MO(n())},document.addEventListener("mousemove",k),document.addEventListener("mouseup",O))}ae(()=>{k&&document.removeEventListener("mousemove",k),O&&document.removeEventListener("mouseup",O),document.body.classList.remove("is-resizing")});function M(R,A){A.preventDefault(),A.stopPropagation(),c(R)}function z(R,A="success"){A==="error"?Dt.error(R):Dt.success(R)}function K(R,A){A.preventDefault(),A.stopPropagation(),g(!1),d(R)}async function j(){const R=l();if(R){m(!0);try{h()&&R.worktree?await he.removeProjectWithFiles(R.id):await he.removeProject(R.id),await i(),y()===R.id&&b("/"),d(null)}catch(A){const I=A.message;I.includes("409")?(Dt.error(_("sidebar.uncommittedChanges")),d(null)):(a(I),Dt.error(I))}finally{m(!1)}}}const T=()=>x()?void 0:{width:`${n()}px`};return(()=>{var R=bO(),A=R.firstChild,I=A.nextSibling;return w(A,f(W,{get when(){return!x()},get fallback(){return f(xe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:E,get title(){return _("sidebar.expand")},get children(){return f(th,{class:"h-4 w-4"})}})},get children(){return[(()=>{var F=fO();return w(F,()=>_("sidebar.title")),F})(),(()=>{var F=gO();return w(F,f(xe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:E,get title(){return _("sidebar.collapse")},get children(){return f(eh,{class:"h-4 w-4"})}})),F})()]}})),w(R,f(W,{get when(){return o()!==void 0},get fallback(){return(()=>{var F=yO();return w(F,()=>_("common.loading")),F})()},get children(){var F=pO();return w(F,f(tt,{get each(){return o()??[]},children:$=>{const U=()=>y()===$.id;return(()=>{var G=EO();return w(G,f(Sn,{get href(){return`/${encodeURIComponent($.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${U()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${x()?"px-0 text-center":""}`},get title(){return $.path},get children(){return f(W,{get when(){return!x()},get fallback(){return(()=>{var P=CO();return w(P,()=>($.name[0]??"?").toUpperCase()),P})()},get children(){return[(()=>{var P=vO();return w(P,()=>ep($)),P})(),f(W,{get when(){return $.worktree},get children(){var P=xO();return w(P,f(na,{class:"h-3 w-3"}),null),w(P,()=>_("sidebar.worktreeBadge"),null),Ie(()=>We(P,"title",`worktree of ${$.worktree.mainPath}`)),P}})]}})}}),null),w(G,f(W,{get when(){return!x()},get children(){return[(()=>{var P=wO();return P.$$click=Z=>M($,Z),w(P,f(nh,{class:"h-3.5 w-3.5"})),Ie(Z=>{var V=_("sidebar.configure",{name:$.name}),Y=_("sidebar.projectConfig");return V!==Z.e&&We(P,"aria-label",Z.e=V),Y!==Z.t&&We(P,"title",Z.t=Y),Z},{e:void 0,t:void 0}),P})(),(()=>{var P=_O();return P.$$click=Z=>void K($,Z),w(P,f(jr,{class:"h-3.5 w-3.5"})),Ie(Z=>{var V=_("sidebar.removeProject",{name:$.name}),Y=_("sidebar.deleteProject");return V!==Z.e&&We(P,"aria-label",Z.e=V),Y!==Z.t&&We(P,"title",Z.t=Y),Z},{e:void 0,t:void 0}),P})()]}}),null),G})()}})),F}}),I),w(I,f(W,{get when(){return!x()},get fallback(){return(()=>{var F=SO();return w(F,f(Zv,{class:"h-3.5 w-3.5"})),Ie(()=>We(F,"title",`${_("sidebar.addHint")}${_("sidebar.addCmd")}`)),F})()},get children(){var F=hO(),$=F.firstChild;return w(F,()=>_("sidebar.addHint"),$),w($,()=>_("sidebar.addCmd")),F}}),null),w(I,(()=>{var F=te(()=>!!s());return()=>F()&&(()=>{var $=kO();return w($,s),Ie(()=>We($,"title",s())),$})()})(),null),w(R,f(W,{get when(){return!x()},get children(){var F=mO();return F.$$mousedown=D,Ie(()=>We(F,"aria-label",_("sidebar.resizeHint"))),F}}),null),w(R,f(W,{get when(){return u()},children:F=>f(dO,{open:!0,get projectId(){return F().id},get projectName(){return F().name},onClose:()=>c(null),onSaved:$=>z($)})}),null),w(R,f(on,{get open(){return l()!==null},onOpenChange:F=>!F&&!p()&&d(null),get children(){return f(yr,{class:"max-w-sm",get children(){return[f(xr,{get children(){return[f(vr,{get children(){return _("sidebar.deleteProject")}}),f(ya,{get children(){return _("sidebar.deleteDesc")}})]}}),f(W,{get when(){return l()},children:F=>[(()=>{var $=AO();return w($,()=>ep(F())),$})(),f(W,{get when(){return F().worktree},get children(){return f(Fo,{get checked(){return h()},onChange:$=>g($),class:"flex items-center gap-2 text-destructive",get children(){return[f(Bo,{}),f(Di,{get children(){return _("sidebar.deleteFiles")}})]}})}})]}),f(Kr,{get children(){return[f(xe,{variant:"outline",onClick:()=>d(null),get disabled(){return p()},get children(){return _("common.cancel")}}),f(xe,{variant:"destructive",onClick:()=>void j(),get disabled(){return p()},get children(){return te(()=>!!p())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Ie(F=>{var $=`relative flex flex-col border-r bg-background shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,U=T(),G=`flex items-center border-b ${x()?"justify-center py-2":"justify-between px-2.5 py-2"}`,P=`border-t ${x()?"flex justify-center py-2":"p-2"}`;return $!==F.e&&Ot(R,F.e=$),F.t=$i(R,U,F.t),G!==F.a&&Ot(A,F.a=G),P!==F.o&&Ot(I,F.o=P),F},{e:void 0,t:void 0,a:void 0,o:void 0}),R})()};an(["mousedown","click"]);var $O=["second","minute","hour","day","week","month","year"];function PO(e,t){if(t===0)return["just now","right now"];var n=$O[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var FO=["秒","分钟","小时","天","周","个月","年"];function BO(e,t){if(t===0)return["刚刚","片刻后"];var n=FO[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Pc={},La=function(e,t){Pc[e]=t},zO=function(e){return Pc[e]||Pc.en_US},oc=[60,60,24,7,365/7/12,12];function UO(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 KO(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=oc[o]&&o<oc.length;o++)e/=oc[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 HO(e,t){var n=new Date;return(+n-+UO(e))/1e3}var jO=function(e,t,n){var r=HO(e);return KO(r,zO(t))};La("en_US",PO);La("zh_CN",BO);var ks={},tp;function qO(){if(tp)return ks;tp=1,Object.defineProperty(ks,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return ks.default=t,ks}var GO=qO();const VO=Na(GO),np=[["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 WO(e,t){return np[t]??np[0]}const gi={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"},appearance:{themeMode:"system",themeName:"terminal",language:"zh-CN"},customInstructions:[]},[mr,Fc]=N(gi);async function YO(){try{const e=await he.getGlobalConfig();return Fc(e),Bc(e),ZO(e),e}catch{return Fc(gi),Bc(gi,!1),gi}}async function Jb(e){const t=await he.updateGlobalConfig(e);return Fc(t.config),Bc(t.config),Qb(),t.config}async function pi(e){return Jb(e(mr()))}async function rp(e){return pi(t=>({...t,customInstructions:e}))}function Bc(e,t=!0){vv(e.appearance.themeMode,e.appearance.themeName),t&&gv(e.appearance.themeMode,e.appearance.themeName),Ct.language!==e.appearance.language&&Ct.changeLanguage(e.appearance.language)}function ZO(e){if(!(typeof window>"u"))try{const t=window.localStorage,n=t.getItem("yorz.theme"),r=t.getItem("yorz.themeName"),o=t.getItem("yorz.lang"),i=eR(t.getItem("yorz.chat.customSlashCommands")),s=e.appearance,a={themeMode:XO(n)?n:s.themeMode,themeName:JO(r)?r:s.themeName,language:QO(o)?o:s.language},u=e.customInstructions.length>0||i.length===0?e.customInstructions:i;if(a.themeMode===s.themeMode&&a.themeName===s.themeName&&a.language===s.language&&u===e.customInstructions){Qb();return}pi(c=>({...c,appearance:a,customInstructions:u}))}catch{}}function Qb(){if(!(typeof window>"u"))try{window.localStorage.removeItem("yorz.theme"),window.localStorage.removeItem("yorz.themeName"),window.localStorage.removeItem("yorz.lang"),window.localStorage.removeItem("yorz.chat.customSlashCommands")}catch{}}function XO(e){return e==="system"||e==="light"||e==="dark"}function JO(e){return e==="terminal"||e==="graphite"||e==="paper"}function QO(e){return e==="zh-CN"||e==="en"}function eR(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(tR).filter(n=>n!==null):[]}catch{return[]}}function tR(e){if(!e||typeof e!="object")return null;const t=e,n=typeof t.hiddenPrompt=="string"?t.hiddenPrompt:typeof t.systemPrompt=="string"?t.systemPrompt:null;return typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||n===null||typeof t.prefill!="string"||typeof t.createdAt!="number"?null:{id:t.id,name:t.name,description:t.description,hiddenPrompt:n,prefill:t.prefill,createdAt:t.createdAt}}const[nR,rR]=N({});function ic(e){return e?nR()[e]??[]:[]}function zc(e,t){return rR(n=>({...n,[e]:t})),t}async function oR(e){if(!e)return[];try{const t=await he.getProjectCustomInstructions(e);return zc(e,t.customInstructions)}catch{return zc(e,[])}}async function op(e,t){const n=await he.updateProjectCustomInstructions(e,t);return zc(e,n.customInstructions)}function iR(e,t){const n=`/${e}`;return t.trim()?sR(t,e)?t:`${n} ${t}`:`${n} `}function sR(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^/${n}(\\s|$)`).test(e.trimStart())}function aR(e,t){const n=new Set(e.map(r=>r.name));return[...e.map(r=>({...r,scope:"project"})),...t.filter(r=>!n.has(r.name)).map(r=>({...r,scope:"global"}))]}const e1=`
|
|
28
|
-
|
|
29
|
-
`,uR="<!-- yorz:hidden -->",cR=/<!-- yorz:hidden -->[\s\S]*?<!-- \/yorz:hidden -->\n?/g;function lR(e){return e.includes(uR)?e.replace(cR,"").trim():e}function dR(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:e==="user"?lR(t.text):t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function fR(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=dR(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:e1+i.text}:i),r=!0}else t.push(i)}}return t}function gR(e,t){return!e||!t||e.endsWith(`
|
|
30
|
-
`)||t.startsWith(`
|
|
31
|
-
`)?e+t:e+e1+t}function pR(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 hR(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=gR(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?pR(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 mR=B("<div>");const bR=e=>{const[t,n]=ce(e,["class"]);return(()=>{var r=mR();return Yn(r,q({get class(){return ot("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},zl=ka;ka.Trigger;const Ul=e=>{const[t,n]=ce(e,["class"]);return f(ka.Content,q({get class(){return ot("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var yR=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),vR=B('<div class="mt-1 max-h-64 space-y-2 overflow-auto rounded border bg-background p-2">'),xR=B('<div class="font-mono text-xs font-semibold">'),wR=B('<pre class="overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),_R=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-muted px-2 py-1 text-[11px] leading-snug">'),ER=B("<div class=space-y-1>");const CR=e=>{const[t,n]=N(!1);return f(zl,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=yR(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Vc,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.toolCollapsed",{count:e.tools.length})),r})(),f(Ul,{get children(){var r=vR();return w(r,f(tt,{get each(){return e.tools},children:o=>(()=>{var i=ER();return w(i,f(W,{get when(){return o.name},get children(){var s=xR();return w(s,()=>o.name),s}}),null),w(i,f(W,{get when(){return o.input!==void 0},get children(){var s=wR();return w(s,()=>SR(o.input)),s}}),null),w(i,f(W,{get when(){return o.result!==void 0},get children(){var s=_R();return w(s,()=>o.result),s}}),null),i})()})),r}})]}})};function SR(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}an(["click"]);var kR=B('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),AR=B('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),TR=B('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const DR=e=>{const[t,n]=N(!1);return f(zl,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=kR(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Vc,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.agentContextCollapsed",{count:e.contexts.length})),Ie(()=>We(r,"title",_("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),f(Ul,{get children(){var r=AR();return w(r,f(tt,{get each(){return e.contexts},children:o=>(()=>{var i=TR();return w(i,()=>o.text),i})()})),r}})]}})};an(["click"]);var IR=B('<span class="font-semibold tracking-wide">'),ip=B("<span>"),OR=B('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),RR=B('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),NR=B("<div class=mb-1.5>"),MR=B('<p class="mb-1 text-xs text-destructive">'),LR=B('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto m-2 mt-0"></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),$R=B('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),PR=B('<p class="m-0 text-sm text-destructive">'),FR=B('<form class="flex flex-col gap-4"><div class="flex flex-col gap-1 font-medium"><span class="text-xs font-normal text-muted-foreground"></span></div><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-name></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-description></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-hidden-prompt><span class="text-xs font-normal text-muted-foreground"></span></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-prefill><span class="text-xs font-normal text-muted-foreground">'),BR=B("<aside><header>"),zR=B('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),UR=B('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),KR=B("<div class=text-muted-foreground><p class=m-0>"),HR=B('<p class="mt-1 text-sm">'),jR=B('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),qR=B('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),GR=B('<div class="markdown chat-md">'),VR=B('<span class="text-sm font-normal text-muted-foreground">');const sc="yorz.layout.col2.collapsed",Uc="yorz.layout.col2.width",sp="yorz.chat.sessionList.collapsed",t1="yorz.chat.sessionList.rows",WR="yorz.chat.sessionList.limit",YR="yorz.chat.sessionList.showHistory",n1=[3,5,10],ZR=28,Kl=340,XR=.4,r1=260,JR=960,QR=.8,eN=96,tN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,nN=1500,rN=80;function oN(e){return new Promise(t=>setTimeout(t,e))}La("en",WO);La("zh-CN",VO);function iN(){return typeof window>"u"?JR:Math.max(r1,Math.round(window.innerWidth*QR))}function Ws(e){return Number.isFinite(e)?Math.min(iN(),Math.max(r1,Math.round(e))):Kl}function ac(){return typeof window>"u"?Kl:Ws(window.innerWidth*XR)}function ap(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function sN(){try{if(typeof window>"u")return Kl;const e=window.localStorage.getItem(Uc);if(!e)return ac();const t=Number(e);return Number.isFinite(t)?Ws(t):ac()}catch{return ac()}}function hi(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function ko(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Kc(e){return n1.includes(e)}function aN(){const e=Number(hi(t1,""));if(Kc(e))return e;const t=Number(hi(WR,""));return Kc(t)?t:hi(YR,"0")==="1"?10:3}function up(e){return e.trim().replace(/^\/+/,"")}function uN(e){return/^[\w-]+$/.test(e)}function cN(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const lN=()=>{let e,t;const{lng:n}=$h(),r=ub({projectId:()=>pt()||""}),o=se(()=>aR(ic(pt()||""),mr().customInstructions));ie(()=>{const H=pt()||"";H&&oR(H)});const[i,s]=N(!1),[a,u]=N(""),[c,l]=N(""),[d,h]=N(""),[g,p]=N(""),[m,b]=N("project"),[v,y]=N(null),[x,E]=N(!1),[C,k]=N(null),[O,S]=N(null),[D,M]=N(!1),z=se(()=>{n();const H=o().map(oe=>{const ue=`/${oe.name}`;return{value:ue,label:ue,description:oe.description||_("chat.customSlashCommandNoDescription"),replacement:iR(oe.name,oe.prefill),customId:oe.id,editable:!0,editLabel:_("chat.editCustomSlashCommand",{name:oe.name}),deletable:!0,deleteLabel:_("chat.deleteCustomSlashCommand",{name:oe.name})}});return[{value:"/yorz-debug",description:_("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:_("chat.slashCommandYorzSpec")},...H,{value:"/add-command",label:_("chat.addSlashCommandOption"),description:_("chat.addSlashCommandOptionDescription"),action:"add",icon:"plus"}]}),[K,j]=N(hi(sc,"0")==="1"),[T,R]=N(sN()),[A,I]=N(hi(sp,"0")!=="1"),[F,$]=N(aN()),[U,G]=N(""),[P,Z]=N([]),V=se(()=>hR(P())),[Y,ee]=N(""),[re,Q]=N(!0),[Ce,Oe]=N(Date.now()),[Ye,nt]=N(!1),[yt,lt]=N({}),St=new Set,[kt,zt]=N(0);let Lt="";const Vt=new Map;function nr(H){let oe=Vt.get(H);if(!oe){let ue=()=>{};oe={promise:new Promise(Fe=>{ue=Fe}),resolve:ue},Vt.set(H,oe)}return oe.promise}function le(H){nr(H),Vt.get(H)?.resolve()}function Re(H){St.delete(H)&&zt(oe=>oe+1)}const[Ne,{refetch:st}]=Gt(()=>pt()||void 0,H=>he.listSessions(H)),[Se]=Gt(()=>{const H=pt();return H&&!U()?H:void 0},H=>he.getAgentUsageStatus(H));ie(()=>{const H=Ne();if(!H)return;const oe=U();let ue=!1;for(const Pe of H)!Pe.running&&St.delete(Pe.id)&&Pe.id===oe&&(ue=!0);ue&&zt(Pe=>Pe+1),lt(Pe=>{const Fe={};for(const J of H)Fe[J.id]=!!J.running;return oe&&!(oe in Fe)&&Pe[oe]===!0&&(Fe[oe]=!0),Fe})}),ie(mt(pt,()=>{G(""),lt({}),$n(),Lt="",nt(!1),St.clear(),zt(H=>H+1),Vt.clear(),r.reset()})),ie(()=>{const H=pt();if(!H)return;const oe=sh(H,{onStatus:ue=>{lt(Pe=>({...Pe,[ue.sessionId]:ue.running})),st()}});ae(oe)});const Le=H=>yt()[H]===!0,Ft=se(()=>{const H=U();return H?Le(H):!1}),At=se(()=>(Ne()??[]).filter(H=>Le(H.id)).length),bn=se(()=>Ne()??[]);function un(H){!H||H===U()||(G(H),st())}ie(()=>{const H=mw();H&&(bw(),un(H),K()&&(j(!1),ko(sc,"0")))});const Wt=()=>K()||Lr();function rr(){if(Lr()){Zc();return}const H=!K();j(H),ko(sc,H?"1":"0")}function Yt(H){I(H),ko(sp,H?"0":"1")}function or(H){const oe=Number(H);Kc(oe)&&($(oe),ko(t1,String(oe)))}function Sr(H){return _(H===3?"chat.sessionListRows3":H===5?"chat.sessionListRows5":"chat.sessionListRows10")}function kr(H){const oe=H.title.trim();return oe&&oe!==H.id&&!tN.test(oe)?oe:H.id}wn(()=>{const H=()=>{const oe=Ws(T());oe!==T()&&(R(oe),ko(Uc,String(oe)))};window.addEventListener("resize",H),ae(()=>window.removeEventListener("resize",H))}),wn(()=>{const H=window.setInterval(()=>Oe(Date.now()),6e4);ae(()=>window.clearInterval(H))});let Zt=null,cn=null,yn=null;function rt(H){Wt()||(H.preventDefault(),Zt={startX:H.clientX,startW:T(),raf:null},document.body.classList.add("is-resizing"),cn=oe=>{if(!Zt)return;const ue=Ws(Zt.startW+(oe.clientX-Zt.startX));Zt.raf==null&&(Zt.raf=requestAnimationFrame(()=>{Zt&&(Zt.raf=null,R(ue))}))},yn=()=>{Zt?.raf!=null&&cancelAnimationFrame(Zt.raf),Zt=null,document.body.classList.remove("is-resizing"),cn&&document.removeEventListener("mousemove",cn),yn&&document.removeEventListener("mouseup",yn),cn=null,yn=null,ko(Uc,String(T()))},document.addEventListener("mousemove",cn),document.addEventListener("mouseup",yn))}ae(()=>{cn&&document.removeEventListener("mousemove",cn),yn&&document.removeEventListener("mouseup",yn),document.body.classList.remove("is-resizing")}),ie(()=>{const H=pt(),oe=U();if(kt(),!H||!oe)return;let ue=!1;Q(!0),St.has(oe)?Lt!==oe&&($n(),Lt=oe):(Lt=oe,$n(),he.getSessionMessages(H,oe).then(Fe=>{ue||$n(fR(Fe))}).catch(()=>{}));const Pe=ia(H,oe,{onReady:()=>le(oe),onEvent:Fe=>{Fe.type==="text"?Wo(Fe.delta):Fe.type==="tool-use"?Yo({kind:"tool",name:Fe.name,input:Fe.input}):Fe.type==="tool-result"?Yo({kind:"tool",result:Fe.text}):Fe.type==="turn-completed"?(Ln(),Re(oe),lt(J=>({...J,[oe]:!1}))):Fe.type==="error"?(Tr(`
|
|
32
|
-
${_("chat.errorMessage",{message:Fe.message})}
|
|
33
|
-
`),lt(J=>({...J,[oe]:!1}))):Fe.type==="session-started"&&Fe.sessionId!==oe&&(St.has(oe)&&St.add(Fe.sessionId),Lt===oe&&(Lt=Fe.sessionId),lt(J=>({...J,[oe]:!1,[Fe.sessionId]:!0})),G(Fe.sessionId),st())}});ae(()=>{ue=!0,Vt.delete(oe),Pe()})}),ie(()=>{P(),re()&&requestAnimationFrame(Nn)});function Ar(H){return H.scrollHeight-H.scrollTop-H.clientHeight<=eN}function Nn(){e&&(e.scrollTop=e.scrollHeight)}function Mn(){e&&Q(Ar(e))}function L(H){return Ce(),!Number.isFinite(H)||H<=0?"":jO(H,n())}function ne(H){return!Number.isFinite(H)||H<=0?"":new Date(H).toLocaleString(n())}function de(H){if(!H)return _("chat.usageResetUnknown");const oe=new Date(H);return Number.isFinite(oe.getTime())?oe.toLocaleString(n()):_("chat.usageResetUnknown")}function $e(H){if(typeof H.utilization!="number")return _("chat.usageWindowUnknown",{label:H.label});const oe=Math.min(100,Math.max(0,Math.round(H.utilization))),ue=Math.max(0,100-oe);return _("chat.usageWindow",{label:H.label,remaining:ue,used:oe,reset:de(H.resetsAt)})}const wt=se(()=>{if(n(),Se.loading)return _("chat.usageLoading");const H=Se();if(!H)return"";if(H.status==="error")return _("chat.usageError",{kind:H.kind});if(H.status==="unavailable"&&H.installCommand)return _("chat.usageInstallHint",{kind:H.kind,command:H.installCommand});if(H.status==="unavailable")return _("chat.usageUnavailable",{kind:H.kind});const oe=H.windows??[];return oe.length===0?_("chat.usageAvailableNoDetails",{kind:H.kind}):_("chat.usageSummary",{kind:H.kind,details:oe.slice(0,2).map($e).join(_("chat.usageSeparator"))})});async function vt(H){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(H),Dt.success(_("chat.filePathCopied"))}catch{Dt.error(_("chat.filePathCopyFailed"))}}function we(H){const oe=ap(H.target);if(!oe||e&&!e.contains(oe))return;const ue=oe.dataset.filePath;ue&&(H.preventDefault(),vt(ue))}function me(H){if(H.key!=="Enter"&&H.key!==" ")return;const oe=ap(H.target);if(!oe||e&&!e.contains(oe))return;const ue=oe.dataset.filePath;ue&&(H.preventDefault(),vt(ue))}let De="",at=null;function _t(H,oe){const ue=H[H.length-1];return ue&&ue.kind==="text"&&ue.role==="assistant"?[...H.slice(0,-1),{...ue,text:ue.text+oe}]:[...H,{kind:"text",role:"assistant",text:oe}]}function Ln(){at!=null&&(clearTimeout(at),at=null);const H=De;De="",H&&Z(oe=>_t(oe,H))}function Wo(H){De+=H,at==null&&(at=window.setTimeout(Ln,rN))}function Tr(H){Ln(),Z(oe=>_t(oe,H))}function Yo(H){Ln(),Z(oe=>[...oe,H])}function $n(H=[]){at!=null&&(clearTimeout(at),at=null),De="",Z(oe=>H.length===0&&oe.length===0?oe:H)}ae(()=>{at!=null&&clearTimeout(at)});function $a(){!pt()||!U()||(G(""),$n(),Lt="",Q(!0),r.reset())}async function rs(){const H=pt(),oe=U(),ue=Y().trim();if(!H||!ue||Ye()||Ft()||r.hasPending())return;if(ee(""),Q(!0),!oe){await Pa(H,ue);return}const Pe=r.draftId()??void 0;Yo({kind:"text",role:"user",text:ue}),lt(Fe=>({...Fe,[oe]:!0}));try{await he.sendSessionMessage(H,oe,ue,Pe),r.reset()}catch(Fe){Tr(`
|
|
34
|
-
${_("chat.errorMessage",{message:Fe.message})}
|
|
35
|
-
`),lt(J=>({...J,[oe]:!1}))}}async function Pa(H,oe){nt(!0);try{let ue;try{ue=(await he.createSession(H,{})).sessionId}catch(J){ee(oe),Tr(`
|
|
36
|
-
${_("chat.errorMessage",{message:J.message})}
|
|
37
|
-
`);return}St.add(ue);const Pe=r.draftId()??void 0,Fe=nr(ue);$n([{kind:"text",role:"user",text:oe}]),Lt=ue,lt(J=>({...J,[ue]:!0})),G(ue),await Promise.race([Fe,oN(nN)]);try{await he.sendSessionMessage(H,ue,oe,Pe),r.reset()}catch(J){Tr(`
|
|
38
|
-
${_("chat.errorMessage",{message:J.message})}
|
|
39
|
-
`),lt(pe=>({...pe,[ue]:!1}))}st()}finally{nt(!1)}}async function os(){const H=pt(),oe=U();!H||!oe||(await he.abortSession(H,oe).catch(()=>{}),lt(ue=>({...ue,[oe]:!1})))}function bo(H){H.defaultPrevented||H.isComposing||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),rs())}function Fa(){return C()===null&&!!pt()}function Zo(){u(""),l(""),h(""),p(""),b(pt()?"project":"global"),y(null),k(null)}function Ba(){Zo(),s(!0)}function Pn(H){const oe=H.customId,ue=oe?o().find(Pe=>Pe.id===oe):void 0;ue&&(k(ue.id),u(ue.name),l(ue.description),h(ue.hiddenPrompt),p(ue.prefill),b(ue.scope),y(null),s(!0))}async function is(H){if(H.preventDefault(),x())return;const oe=up(a());if(!oe){y(_("chat.customSlashCommandNameRequired"));return}if(!uN(oe)){y(_("chat.customSlashCommandNameInvalid"));return}const ue=C(),Pe=pt()||"",Fe=m()==="project"&&Pe?"project":"global",J=Fe==="project"?ic(Pe):mr().customInstructions,pe=ue?J.find(Qe=>Qe.id===ue):void 0,Be={id:pe?.id??cN(),name:oe,description:c().trim(),hiddenPrompt:d().trim(),prefill:g(),createdAt:pe?.createdAt??Date.now()},Ze=[...J.filter(Qe=>Qe.id!==Be.id&&Qe.name!==oe),Be];E(!0);try{Fe==="project"?await op(Pe,Ze):await rp(Ze),s(!1),Zo()}catch(Qe){y(Qe.message)}finally{E(!1)}}async function ss(){const H=O()?.customId;if(!H)return;const oe=o().find(ue=>ue.id===H);if(oe){M(!0);try{if(oe.scope==="project"){const ue=pt()||"";await op(ue,ic(ue).filter(Pe=>Pe.id!==H))}else await rp(mr().customInstructions.filter(ue=>ue.id!==H));S(null)}catch(ue){Dt.error(ue.message)}finally{M(!1)}}}return(()=>{var H=BR(),oe=H.firstChild;return w(oe,f(W,{get when(){return!Wt()},get fallback(){return f(xe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:rr,get title(){return _("chat.expand")},get children(){return f(th,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ue=IR();return w(ue,()=>_("chat.title")),ue})(),f(xe,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:rr,get title(){return _("chat.collapse")},get children(){return f(eh,{class:"h-4 w-4"})}})]}})),w(H,f(W,{get when(){return!Wt()},get children(){var ue=LR(),Pe=ue.firstChild,Fe=Pe.nextSibling,J=Fe.firstChild,pe=J.firstChild,Be=J.nextSibling;w(ue,f(W,{get when(){return pt()},get children(){return f(bR,{class:"m-2 rounded-lg shadow-none",get children(){return f(zl,{get open(){return A()},onOpenChange:Yt,get children(){return[(()=>{var je=OR(),_e=je.firstChild,Tt=_e.nextSibling;return _e.$$click=()=>Yt(!A()),w(_e,f(W,{get when(){return At()>0},get fallback(){return(()=>{var He=ip();return w(He,()=>_("chat.sessionsLabelPlain")),He})()},get children(){var He=ip();return w(He,()=>_("chat.sessionsLabel",{count:At()})),He}})),w(je,f(xn,{class:"flex shrink-0 items-center gap-2",get value(){return String(F())},onChange:or,get"aria-label"(){return _("chat.sessionListRows")},get children(){return f(tt,{each:n1,children:He=>f(Qt,{get value(){return String(He)},class:"flex items-center gap-1",get children(){return[f(Xt,{}),f(rn,{class:"h-3 w-3"}),f(Jt,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return Sr(He)}})]}})})}}),Tt),Tt.$$click=()=>Yt(!A()),w(Tt,f(Vc,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${A()?"":"-rotate-90"}`}})),Ie(He=>{var Et=A()?_("chat.collapseSessions"):_("chat.expandSessions"),Zr=A()?_("chat.collapseSessions"):_("chat.expandSessions");return Et!==He.e&&We(_e,"title",He.e=Et),Zr!==He.t&&We(Tt,"title",He.t=Zr),He},{e:void 0,t:void 0}),je})(),f(Ul,{get children(){var je=RR();return w(je,f(W,{get when(){return bn().length>0},get fallback(){return(()=>{var _e=zR();return w(_e,()=>_("chat.noRunningSessions")),_e})()},get children(){return f(tt,{get each(){return bn()},children:_e=>(()=>{var Tt=UR(),He=Tt.firstChild,Et=He.firstChild,Zr=Et.firstChild,Xo=Zr.nextSibling;Xo.nextSibling;var Jo=Et.nextSibling,as=Jo.nextSibling;return He.$$click=()=>un(_e.id),w(He,f(W,{get when(){return Le(_e.id)},get children(){return f(Un,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Et),w(Et,()=>_e.kind,Xo),w(Jo,()=>kr(_e)),w(as,()=>L(_e.updatedAt)),Ie(ir=>{var us=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${U()===_e.id?"bg-primary-soft font-semibold":"hover:bg-accent"}`,cs=Le(_e.id)?_("chat.sessionTitleRunning",{kind:_e.kind,id:_e.id}):_("chat.sessionTitle",{kind:_e.kind,id:_e.id}),Xr=ne(_e.updatedAt);return us!==ir.e&&Ot(He,ir.e=us),cs!==ir.t&&We(He,"title",ir.t=cs),Xr!==ir.a&&We(as,"title",ir.a=Xr),ir},{e:void 0,t:void 0,a:void 0}),Tt})()})}})),Ie(_e=>yi(je,"max-height",`${F()*ZR+4}px`)),je}})]}})}})}}),Pe),Pe.addEventListener("scroll",Mn),Pe.$$keydown=me,Pe.$$click=we;var Ze=e;typeof Ze=="function"?br(Ze,Pe):e=Pe,w(Pe,f(W,{get when(){return V().length>0},get fallback(){return(()=>{var je=KR(),_e=je.firstChild;return w(_e,(()=>{var Tt=te(()=>!!U());return()=>Tt()?_("chat.empty"):_("chat.draftEmpty")})()),w(je,f(W,{get when(){return te(()=>!U())()&&wt()},children:Tt=>(()=>{var He=HR();return w(He,Tt),He})()}),null),je})()},get children(){return f(tt,{get each(){return V()},children:je=>f(W,{get when(){return je.kind==="context"?je:null},get fallback(){return f(W,{get when(){return je.kind==="assistant"?je:null},get fallback(){return(()=>{var _e=jR();return w(_e,()=>je.text),_e})()},children:_e=>(()=>{var Tt=qR();return w(Tt,f(tt,{get each(){return _e().segments},children:He=>f(W,{get when(){return He.kind==="tools"?He:null},get fallback(){return(()=>{var Et=GR();return Ie(()=>Et.innerHTML=Fl(He.text,{mermaid:"code",fileLinks:"copy",fileLinkTitle:_("chat.copyFilePath")})),Et})()},children:Et=>f(CR,{get tools(){return Et().tools}})})})),Tt})()})},children:_e=>f(DR,{get contexts(){return _e().contexts}})})})}})),w(Fe,f(W,{get when(){return r.count()>0},get children(){var je=NR();return w(je,f(gb,{ctrl:r,compact:!0})),je}}),J),w(Fe,f(W,{get when(){return r.error()},get children(){var je=MR();return w(je,()=>r.error()),je}}),J),w(J,f(Aa,{get projectId(){return pt()||""},get value(){return Y()},onValueChange:ee,get slashCommands(){return z()},get slashEmptyLabel(){return _("chat.slashCommandNoMatch")},onSlashCommandAction:Ba,onEditSlashCommand:Pn,onDeleteSlashCommand:S,onKeyDown:bo,get onPaste(){return r.onPaste},get placeholder(){return te(()=>!pt())()?_("chat.noSessionPlaceholder"):te(()=>!!U())()?_("chat.inputPlaceholder"):_("chat.draftPlaceholder")},get disabled(){return!pt()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),pe),w(J,f(xe,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!pt()||r.count()>=Mo},get title(){return _("newSpec.importAttachment")},get children(){return f($x,{class:"h-4 w-4"})}}),pe),Ms(pe,"change",r.onFileInputChange);var Qe=t;return typeof Qe=="function"?br(Qe,pe):t=pe,We(pe,"accept",ab),w(Be,f(xe,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:$a,get disabled(){return!pt()||!U()},get title(){return _("chat.newSession")},get children(){return f(zi,{class:"h-4 w-4"})}}),null),w(Be,f(W,{get when(){return Ft()},get fallback(){return f(xe,{size:"sm",onClick:()=>void rs(),get disabled(){return!pt()||!Y().trim()||Ye()||r.hasPending()},get children(){return[f(ra,{class:"mr-1 h-3.5 w-3.5"}),te(()=>_("chat.send"))]}})},get children(){return f(xe,{variant:"outline",size:"sm",onClick:()=>void os(),get title(){return _("chat.abort")},get children(){return[f(rh,{class:"mr-1 h-3.5 w-3.5"}),te(()=>_("chat.abort"))]}})}}),null),ue}}),null),w(H,f(W,{get when(){return!Wt()},get children(){var ue=$R();return ue.$$mousedown=rt,ue}}),null),w(H,f(on,{get open(){return i()},onOpenChange:ue=>{!ue&&x()||(s(ue),ue||Zo())},get children(){return f(yr,{class:"max-w-[480px]",get children(){return[f(xr,{get children(){return f(vr,{get children(){return te(()=>!!C())()?_("chat.editSlashCommandTitle"):_("chat.addSlashCommandTitle")}})}}),(()=>{var ue=FR(),Pe=ue.firstChild,Fe=Pe.firstChild,J=Pe.nextSibling,pe=J.nextSibling,Be=pe.nextSibling,Ze=Be.firstChild,Qe=Be.nextSibling,je=Qe.firstChild;return ue.addEventListener("submit",_e=>void is(_e)),w(Pe,()=>_("chat.customSlashCommandScope"),Fe),w(Pe,f(W,{get when(){return Fa()},get fallback(){return(()=>{var _e=VR();return w(_e,(()=>{var Tt=te(()=>m()==="project");return()=>Tt()?_("chat.slashCommandScopeProject"):_("chat.slashCommandScopeGlobal")})()),_e})()},get children(){return f(xn,{get value(){return m()},onChange:_e=>b(_e),class:"flex items-center gap-4",get children(){return f(tt,{get each(){return[{value:"project",label:_("chat.slashCommandScopeProject")},{value:"global",label:_("chat.slashCommandScopeGlobal")}]},children:_e=>f(Qt,{get value(){return _e.value},class:"flex items-center gap-1",get children(){return[f(Xt,{}),f(rn,{class:"h-3 w-3"}),f(Jt,{class:"cursor-pointer text-sm font-normal",get children(){return _e.label}})]}})})}})}}),Fe),w(Fe,(()=>{var _e=te(()=>m()==="project");return()=>_e()?_("chat.customSlashCommandScopeProjectHint"):_("chat.customSlashCommandScopeGlobalHint")})()),w(J,()=>_("chat.customSlashCommandName"),null),w(J,f(qn,{id:"chat-custom-command-name",get value(){return a()},get placeholder(){return _("chat.customSlashCommandNamePlaceholder")},onInput:_e=>{u(_e.currentTarget.value),y(null)},required:!0}),null),w(pe,()=>_("chat.customSlashCommandDescription"),null),w(pe,f(qn,{id:"chat-custom-command-description",get value(){return c()},get placeholder(){return _("chat.customSlashCommandDescriptionPlaceholder")},onInput:_e=>l(_e.currentTarget.value)}),null),w(Be,()=>_("chat.customSlashCommandHiddenPrompt"),Ze),w(Be,f(Po,{id:"chat-custom-command-hidden-prompt",get value(){return d()},get placeholder(){return _("chat.customSlashCommandHiddenPromptPlaceholder")},rows:3,onInput:_e=>h(_e.currentTarget.value)}),Ze),w(Ze,()=>_("chat.customSlashCommandHiddenPromptHint")),w(Qe,()=>_("chat.customSlashCommandPrefill"),je),w(Qe,f(Po,{id:"chat-custom-command-prefill",get value(){return g()},get placeholder(){return _("chat.customSlashCommandPrefillPlaceholder")},rows:3,onInput:_e=>p(_e.currentTarget.value)}),je),w(je,()=>_("chat.customSlashCommandPrefillHint")),w(ue,f(W,{get when(){return v()},get children(){var _e=PR();return w(_e,v),_e}}),null),w(ue,f(Kr,{get children(){return[f(xe,{type:"button",variant:"outline",onClick:()=>s(!1),get disabled(){return x()},get children(){return _("common.cancel")}}),f(xe,{type:"submit",get disabled(){return!a().trim()||x()},get children(){return te(()=>!!x())()?_("common.saving"):_("chat.saveCustomSlashCommand")}})]}}),null),ue})()]}})}}),null),w(H,f(on,{get open(){return O()!==null},onOpenChange:ue=>!ue&&!D()&&S(null),get children(){return f(yr,{class:"max-w-sm",get children(){return[f(xr,{get children(){return[f(vr,{get children(){return _("chat.deleteSlashCommandTitle")}}),f(ya,{get children(){return _("chat.deleteSlashCommandConfirm",{name:up(O()?.value??"")})}})]}}),f(Kr,{get children(){return[f(xe,{variant:"outline",onClick:()=>S(null),get disabled(){return D()},get children(){return _("common.cancel")}}),f(xe,{variant:"destructive",onClick:()=>void ss(),get disabled(){return D()},get children(){return te(()=>!!D())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Ie(ue=>{var Pe=`relative flex flex-col border-r bg-background text-base shrink-0 ${Wt()?"w-9 transition-[width] duration-150":""}`,Fe=Wt()?void 0:{width:`${T()}px`},J=`flex items-center border-b ${Wt()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Pe!==ue.e&&Ot(H,ue.e=Pe),ue.t=$i(H,Fe,ue.t),J!==ue.a&&Ot(oe,ue.a=J),ue},{e:void 0,t:void 0,a:void 0}),H})()};an(["click","keydown","mousedown"]);const o1=["newSpec","toggleSpecDetailFullscreen","projectSettings"],so={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S"},dN=new Set(["Control","Shift","Alt","Meta"]);function uc(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=Hl(r)}return n.key?s1(n):null}function i1(e){if(dN.has(e.key))return null;const t=Hl(e.key);return t?s1({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function Ys(e){return{newSpec:uc(e?.newSpec)??so.newSpec,toggleSpecDetailFullscreen:uc(e?.toggleSpecDetailFullscreen)??so.toggleSpecDetailFullscreen,projectSettings:uc(e?.projectSettings)??so.projectSettings}}function cp(e){const t=Ys(e),n=new Map,r=new Set;for(const o of o1){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function fN(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function s1(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(Hl(e.key)),t.join("+")}function Hl(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var gN=B("<span>"),pN=B('<span class="text-xs font-normal text-muted-foreground">'),hN=B('<p class="m-0 text-sm text-destructive">'),mN=B('<div class="flex flex-col gap-4"><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),bN=B("<p class=text-muted-foreground>"),yN=B('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),vN=B("<p class=text-destructive>");const xN=e=>{const[t,n]=N("claude"),[r,o]=N(!1),[i,s]=N(!1),[a,u]=N("system-default"),[c,l]=N({}),[d,h]=N(null),[g,p]=N(!1),[m,b]=N("idle"),[v,y]=N(null),x=se(()=>new Set(cp(c())));let E;ie(()=>{e.open&&(y(null),O(),b("idle"),p(!0),(async()=>{try{C(await he.getGlobalConfig())}catch(I){y(I.message),C(gi)}finally{p(!1)}})())});function C(I){n(I.agent.defaultKind),o(!!I.notifications.sessionEnd.banner),s(!!I.notifications.sessionEnd.sound),u(I.power?.inhibitWhenRunning??"system-default"),l(I.shortcuts??{}),h(null)}ie(()=>{const I=d();if(!I)return;const F=$=>{if($.preventDefault(),$.stopPropagation(),$.key==="Escape"){h(null);return}if($.key==="Backspace"||$.key==="Delete"){const P={...c(),[I]:null};l(P),h(null),k({shortcuts:P});return}const U=i1($);if(!U)return;const G={...c(),[I]:U};l(G),h(null),k({shortcuts:G})};window.addEventListener("keydown",F,!0),ae(()=>window.removeEventListener("keydown",F,!0))});async function k(I){y(null);const F=I.shortcuts??c();if(cp(F).length>0){y(_("globalConfig.shortcutConflict"));return}O(),b("saving");try{await Jb({agent:{defaultKind:I.agent?.defaultKind??t()},notifications:{sessionEnd:{banner:I.notifications?.sessionEnd.banner??r(),sound:I.notifications?.sessionEnd.sound??i()}},shortcuts:F,power:{inhibitWhenRunning:I.power?.inhibitWhenRunning??a()},appearance:mr().appearance,customInstructions:mr().customInstructions}),b("saved"),E=setTimeout(()=>b("idle"),2e3)}catch($){b("idle"),y($.message)}}function O(){E&&(clearTimeout(E),E=void 0)}ae(O);function S(I){return _(I==="codex"?"projectConfig.agentCodex":I==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}function D(I){return _(`globalConfig.shortcuts.${I}`)}function M(I){return _(I==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":I==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function z(I){return d()===I?_("globalConfig.shortcutRecording"):Ys(c())[I]}function K(I){const F={...c(),[I]:null};l(F),k({shortcuts:F})}function j(I){n(I),k({agent:{defaultKind:I}})}function T(I){o(I),k({notifications:{sessionEnd:{banner:I,sound:i()}}})}function R(I){s(I),k({notifications:{sessionEnd:{banner:r(),sound:I}}})}function A(I){u(I),k({power:{inhibitWhenRunning:I}})}return f(on,{get open(){return e.open},onOpenChange:I=>!I&&e.onClose(),get children(){return f(yr,{class:"max-w-[560px]",get children(){return[f(xr,{get children(){return f(vr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var I=gN();return w(I,()=>_("globalConfig.title")),I})(),f(W,{get when(){return m()!=="idle"},get children(){var I=pN();return w(I,(()=>{var F=te(()=>m()==="saving");return()=>F()?_("globalConfig.saveStatusSaving"):_("globalConfig.saveStatusSaved")})()),I}})]}})}}),f(W,{get when(){return!g()},get fallback(){return(()=>{var I=bN();return w(I,()=>_("common.loading")),I})()},get children(){var I=mN(),F=I.firstChild,$=F.firstChild,U=$.nextSibling,G=F.nextSibling,P=G.firstChild,Z=P.nextSibling;return w(I,f(xn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:V=>j(V),get children(){return[f(Ii,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.agentDefault")}}),te(()=>["claude","opencode","codex"].map(V=>f(Qt,{value:V,class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return S(V)}})]}})))]}}),F),w($,()=>_("globalConfig.sessionEnd")),w(U,f(Fo,{get checked(){return r()},onChange:T,class:"flex items-center gap-2",get children(){return[f(Bo,{}),f(Di,{get children(){return _("globalConfig.banner")}})]}}),null),w(U,f(Fo,{get checked(){return i()},onChange:R,class:"flex items-center gap-2",get children(){return[f(Bo,{}),f(Di,{get children(){return _("globalConfig.sound")}})]}}),null),w(I,f(xn,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return a()},onChange:V=>A(V),get children(){return[f(Ii,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.powerTitle")}}),te(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(V=>f(Qt,{value:V,class:"flex items-center gap-1.5",get children(){return[f(Xt,{}),f(rn,{}),f(Jt,{class:"cursor-pointer",get children(){return M(V)}})]}})))]}}),G),w(P,()=>_("globalConfig.shortcutsTitle")),w(Z,f(tt,{each:o1,children:V=>(()=>{var Y=yN(),ee=Y.firstChild,re=ee.firstChild,Q=re.nextSibling;return w(re,()=>D(V)),w(Q,()=>z(V)),w(Y,f(xe,{type:"button",variant:"outline",size:"sm",onClick:()=>h(V),get children(){return te(()=>d()===V)()?_("globalConfig.shortcutRecordingButton"):_("globalConfig.shortcutRecord")}}),null),w(Y,f(xe,{type:"button",variant:"ghost",size:"sm",onClick:()=>K(V),get disabled(){return z(V)===so[V]},get children(){return _("globalConfig.shortcutReset")}}),null),Ie(()=>Ot(Q,`m-0 font-mono text-sm ${x().has(V)?"text-destructive":"text-muted-foreground"}`)),Y})()})),w(G,f(W,{get when(){return x().size>0},get children(){var V=hN();return w(V,()=>_("globalConfig.shortcutConflict")),V}}),null),w(I,(()=>{var V=te(()=>!!v());return()=>V()&&(()=>{var Y=vN();return w(Y,v),Y})()})(),null),I}})]}})}})},wN=200,_N=8e3;async function EN({id:e,list:t,intervalMs:n=wN,timeoutMs:r=_N,sleep:o=CN}){const i=Math.max(1,n),s=Math.max(1,Math.ceil(r/i)+1);for(let a=0;a<s;a++){try{if(!(await t()).some(c=>c.id===e))return!0}catch{}a<s-1&&await o(i)}return!1}function CN(e){return new Promise(t=>window.setTimeout(t,e))}var SN=B('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),kN=B('<div class="border-b px-3 py-2">'),AN=B('<div class="max-h-96 overflow-auto p-2">'),TN=B('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function DN(){const[e,t]=N([]),[n,r]=N(null);async function o(){try{t(await he.listSystemNotifications())}catch{}}ie(()=>{o();const u=Dw(()=>void o());ae(u)});async function i(u){r(u);try{await he.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await he.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await he.restartSystemNotification(u),t(c=>c.filter(l=>l.id!==u)),await EN({id:u,list:he.listSystemNotifications}),window.location.reload()}finally{r(null)}}return f(W,{get when(){return e().length>0},get children(){return f(ob,{placement:"bottom-start",get children(){return[f(rb,{as:xe,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return _("systemNotifications.title")},get children(){return[f(Mv,{class:"h-4 w-4"}),SN()]}}),f(ib,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=kN();return w(u,f(vS,{class:"text-sm font-semibold",get children(){return _("systemNotifications.title")}})),u})(),(()=>{var u=AN();return w(u,f(tt,{get each(){return e()},children:c=>(()=>{var l=TN(),d=l.firstChild,h=d.firstChild,g=h.firstChild,p=g.nextSibling,m=h.nextSibling;return w(g,()=>IN(c)),w(p,()=>ON(c)),w(m,f(W,{get when(){return c.kind==="version-update"},get children(){return f(W,{get when(){return c.action==="restart-ready"},get fallback(){return f(xe,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id||c.action==="updating"},onClick:()=>void s(c.id),get children(){return f(W,{get when(){return n()===c.id||c.action==="updating"},get fallback(){return _("systemNotifications.update")},get children(){return[f(Gx,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),te(()=>_("systemNotifications.updating"))]}})}})},get children(){return f(lb,{openDelay:150,closeDelay:0,get children(){return[f(cb,{as:xe,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id},onClick:()=>void a(c.id),get children(){return _("systemNotifications.restart")}}),f(db,{get children(){return _("systemNotifications.restartTooltip")}})]}})}})}}),null),w(m,f(xe,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return _("systemNotifications.delete")},get disabled(){return n()===c.id},onClick:()=>void i(c.id),get children(){return f(Wc,{class:"h-4 w-4"})}}),null),l})()})),u})()]}})]}})}})}function IN(e){return e.kind==="version-update"?_("systemNotifications.versionTitle"):e.title}function ON(e){return e.kind!=="version-update"?e.message:_("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}var lp=B('<div class="px-2 py-1 text-xs text-muted-foreground">'),RN=B('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const NN=[{mode:"system",labelKey:"shell.themeSystem",icon:Ax},{mode:"light",labelKey:"shell.themeLight",icon:nw},{mode:"dark",labelKey:"shell.themeDark",icon:Ix}],MN=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],LN=e=>{const t=ea(),n=jo(),{lng:r,changeLanguage:o}=$h(),[i,s]=N(!1),a=se(()=>t.pathname===Mt("specs/new"));function u(p){p!==r()&&(o(p),pi(m=>({...m,appearance:{...m.appearance,language:p}})))}function c(p){Jp(p),pi(m=>({...m,appearance:{...m.appearance,themeMode:p}}))}function l(p){yv(p),pi(m=>({...m,appearance:{...m.appearance,themeName:p}}))}function d(){if(!pt())return;const p=Mt("specs/new");a()?window.open(p,"_blank","noopener"):n(p)}function h(p){const m=Ys(mr().shortcuts);if(p===m.newSpec)return d(),!0;if(p===m.projectSettings)return Ew(),!0;if(p===m.toggleSpecDetailFullscreen){const b=_w();return b?(b(),!0):!1}return!1}const g=p=>{if(p.defaultPrevented)return;const m=i1(p);if(!m)return;const b=Ys(mr().shortcuts),v=m===b.toggleSpecDetailFullscreen||m===b.projectSettings;fN(p.target)&&!v||m!==so.newSpec&&m!==so.projectSettings&&m!==so.toggleSpecDetailFullscreen&&!Object.values(mr().shortcuts).includes(m)||h(m)&&p.preventDefault()};return wn(()=>{YO(),window.addEventListener("keydown",g)}),ae(()=>window.removeEventListener("keydown",g)),ie(()=>{const p=t.pathname.match(/^\/([^/]+)/);yw(p&&p[1]!=="api"?p[1]:"")}),(()=>{var p=RN(),m=p.firstChild,b=m.firstChild,v=m.nextSibling,y=v.firstChild;return w(m,f(Sn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),b),w(m,f(DN,{}),b),w(b,f(W,{get when(){return pt()},get children(){return f(xe,{as:Sn,get href(){return Mt("specs/new")},get target(){return a()?"_blank":void 0},get rel(){return a()?"noopener":void 0},variant:"default",size:"sm",get children(){return[f(zi,{class:"mr-1 h-4 w-4"}),te(()=>_("shell.newSpec"))]}})}}),null),w(b,f(bl,{placement:"bottom-end",get children(){return[f(ml,{as:xe,variant:"ghost",size:"icon",get title(){return _("shell.settingsMenu")},get children(){return f(wx,{class:"h-4 w-4"})}}),f(yl,{get children(){return[f(ff,{get children(){return[f(gf,{"data-submenu":"language",get children(){return[f(gx,{class:"mr-2 h-4 w-4"}),te(()=>_("shell.languageSwitch"))]}}),f(pf,{get children(){return[f(Nr,{onSelect:()=>u("zh-CN"),get children(){return[f(gs,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),te(()=>_("shell.langZh"))]}}),f(Nr,{onSelect:()=>u("en"),get children(){return[f(gs,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),te(()=>_("shell.langEn"))]}})]}})]}}),f(ff,{get children(){return[f(gf,{"data-submenu":"theme",get children(){return[f(Nx,{class:"mr-2 h-4 w-4"}),te(()=>_("shell.themeSwitch"))]}}),f(pf,{get children(){return[(()=>{var x=lp();return w(x,()=>_("shell.themeModeGroup")),x})(),f(tt,{each:NN,children:x=>f(Nr,{get"data-theme-option"(){return x.mode},onSelect:()=>c(x.mode),get children(){return[f(gs,{get class(){return`mr-2 h-4 w-4 ${bc()===x.mode?"opacity-100":"opacity-0"}`}}),f(x.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),te(()=>_(x.labelKey))]}})}),f(Oc,{}),(()=>{var x=lp();return w(x,()=>_("shell.themeNameGroup")),x})(),f(tt,{each:MN,children:x=>f(Nr,{get"data-theme-name-option"(){return x.name},onSelect:()=>l(x.name),get children(){return[f(gs,{get class(){return`mr-2 h-4 w-4 ${Wp()===x.name?"opacity-100":"opacity-0"}`}}),te(()=>_(x.labelKey))]}})})]}})]}}),f(Oc,{}),f(Nr,{onSelect:()=>s(!0),get children(){return[f(Xx,{class:"mr-2 h-4 w-4"}),te(()=>_("shell.globalConfig"))]}})]}})]}}),null),w(v,f(LO,{}),y),w(v,f(lN,{}),y),w(y,()=>e.children),w(p,f(uS,{position:"top-center"}),null),w(p,f(xN,{get open(){return i()},onClose:()=>s(!1)}),null),p})()};xv();const a1=document.getElementById("app");if(!a1)throw new Error("missing #app root");$1(()=>f(wy,{root:LN,get children(){return[f(ar,{path:"/",component:aO}),f(ar,{path:"/:projectId",component:GS}),f(ar,{path:"/:projectId/git",component:GI}),f(ar,{path:"/:projectId/commands/:runId",component:oO}),f(ar,{path:"/:projectId/specs/new",component:zk}),f(ar,{path:"/:projectId/specs/:id",component:rI}),f(ar,{path:"/:projectId/specs/:id/review",component:FI}),f(ar,{path:"/:projectId/specs/:id/debug",component:jI}),f(ar,{path:"*",component:Yb})]}}),a1);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{zD as _,Na as g};
|