zen-gitsync 2.12.4 → 2.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/LICENSE +190 -190
  2. package/package.json +1 -1
  3. package/scripts/README_COLOR_CONVERTER.md +196 -196
  4. package/scripts/README_FONTSIZE_CONVERTER.md +278 -278
  5. package/scripts/README_SPACING_CONVERTER.md +126 -126
  6. package/scripts/README_STYLE_VARS.md +180 -180
  7. package/src/ui/public/assets/EditorView-DDyMmxPI.js +0 -0
  8. package/src/ui/public/assets/EditorView-DK-Xgt7r.css +1 -0
  9. package/src/ui/public/assets/SourceMapView-DakscAmd.js +3 -0
  10. package/src/ui/public/assets/{css.worker-Wv5dxAWO.js → css.worker-CvXBzhp8.js} +1 -1
  11. package/src/ui/public/assets/{html.worker-CQP8QQsS.js → html.worker-BO6WuOEO.js} +1 -1
  12. package/src/ui/public/assets/index-CPUqt5Ue.js +73 -0
  13. package/src/ui/public/assets/index-a-r8YYZJ.css +1 -0
  14. package/src/ui/public/assets/{json.worker-DzV-CpCQ.js → json.worker-BkJRGcCJ.js} +1 -1
  15. package/src/ui/public/assets/{ts.worker-METxwbDZ.js → ts.worker-B0J26iPs.js} +31 -16
  16. package/src/ui/public/assets/{vendor-DITsiaGj.js → vendor-BMFU1ekz.js} +254 -234
  17. package/src/ui/public/assets/vendor-BPPhhD0O.css +1 -0
  18. package/src/ui/public/favicon.svg +75 -75
  19. package/src/ui/public/index.html +22 -22
  20. package/src/ui/public/logo.svg +74 -74
  21. package/src/ui/server/routes/config.js +25 -8
  22. package/src/ui/public/assets/EditorView-BZaOzahT.js +0 -21
  23. package/src/ui/public/assets/EditorView-CbqSI9nw.css +0 -1
  24. package/src/ui/public/assets/SourceMapView-D_8mnVt2.js +0 -3
  25. package/src/ui/public/assets/index-BgFwmXzV.js +0 -73
  26. package/src/ui/public/assets/index-Dsi6tg7k.css +0 -1
  27. package/src/ui/public/assets/vendor-q83wvJns.css +0 -1
  28. package/src/ui/server/.claude/codediff.txt +0 -6
  29. /package/src/ui/public/assets/{editor.worker-Bd9IXS8d.js → editor.worker-Cn2oRESe.js} +0 -0
  30. /package/src/ui/public/assets/{rolldown-runtime-BM3Ffeng.js → rolldown-runtime-CMxvf4Kt.js} +0 -0
@@ -0,0 +1,3 @@
1
+ import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{An as t,Bn as n,Dn as r,En as i,Gn as a,In as o,Mn as s,Nn as c,P as l,Pn as u,Sn as ee,Un as d,Vn as te,Xn as f,Yn as ne,Zn as p,_ as re,ar as m,bn as ie,c as ae,d as h,er as g,f as oe,g as _,h as se,ht as ce,ir as v,kn as y,m as le,nr as b,p as ue,rr as x,t as de,tr as fe,v as pe,wn as S,xn as C,y as me,zn as w}from"./vendor-BMFU1ekz.js";import{a as T,i as he,n as ge,o as E}from"./index-CPUqt5Ue.js";var _e=e(h(),1),ve={class:`source-map-view`},ye={class:`sm-toolbar`},be={class:`sm-toolbar-left`},xe={class:`sm-title`},Se={class:`sm-toolbar-center`},Ce=[`placeholder`,`disabled`],we=[`disabled`],Te={class:`sm-toolbar-right`},Ee={class:`sm-body`},De={class:`sm-panel-header sm-panel-header--tabs`},Oe={key:0,class:`sm-badge`},ke={class:`sm-panel-body sm-file-tree`},Ae=[`onClick`],je={key:1,class:`sm-tree-arrow-spacer`},Me={key:2,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},Ne=[`xlink:href`],Pe={key:3,class:`sm-tree-icon mit-icon`,"aria-hidden":`true`},Fe=[`xlink:href`],Ie=[`title`],Le={key:1,class:`sm-tree-empty`},Re={class:`sm-panel-body sm-outline-body`},ze={class:`sm-badge`,style:{"margin-left":`auto`}},Be=[`onClick`],Ve=[`title`],He={key:0,class:`sm-outline-desc`},Ue={key:1,class:`sm-tree-empty`},We={class:`sm-panel sm-panel-graph`},Ge={key:0,class:`sm-project-info`},Ke={class:`sm-lang-badge`},qe={class:`sm-summary-text`},Je={class:`sm-graph-container`},Ye={class:`sm-layout-btn-wrap`},Xe=[`disabled`],Ze=[`title`],Qe={class:`sm-fn-label`},$e={key:0,class:`sm-fn-desc`},et={key:0,class:`sm-graph-empty`},tt={viewBox:`0 0 24 24`,width:`48`,height:`48`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,style:{opacity:`0.3`}},nt={key:1,class:`sm-graph-loading`},rt={class:`sm-log-header`},it={key:0,class:`sm-log-indicator`},at={class:`sm-log-body`,ref:`logBodyRef`},ot={key:0,class:`sm-empty`},st={class:`sm-panel-header`},ct={key:0,class:`sm-badge sm-badge-amber`},lt={key:0,class:`sm-node-detail`},ut={class:`sm-node-name`},dt={class:`sm-node-file`},ft={key:0},pt={key:0,class:`sm-node-desc`},mt={class:`sm-panel-body sm-source-body`},ht={key:0,class:`sm-source-overlay`},gt={key:1,class:`sm-source-overlay sm-source-placeholder`},D=T(o({__name:`SourceMapView`,setup(e){let o=he(),h=g(o.currentDirectory||``),T=g(`idle`),D=g([]),_t=0,O=g(null),k=g(null),A=g(`files`),j=g(``),M=g(``),N=g(!1),P=g([]),F=g(new Set),I=g({files:!0,graph:!0,source:!0}),L=g(!1),R=g(220),z=g(360),B=g(140),V=null,H=0,vt=0,U=0;function W(e,t){V=e,H=t.clientX,vt=t.clientY,U=e===`files`?R.value:e===`source`?z.value:B.value,document.addEventListener(`mousemove`,yt),document.addEventListener(`mouseup`,G),t.preventDefault()}function yt(e){V&&(V===`files`?R.value=Math.max(120,Math.min(480,U+e.clientX-H)):V===`source`?z.value=Math.max(200,Math.min(700,U+H-e.clientX)):B.value=Math.max(60,Math.min(500,U+vt-e.clientY)))}function G(){V=null,document.removeEventListener(`mousemove`,yt),document.removeEventListener(`mouseup`,G)}let K=g(null),q=fe(null),{fitView:bt,setNodes:J,setEdges:xt,getNodes:St,getEdges:Ct,updateNodeInternals:wt}=me(),Y=i(()=>T.value===`scanning`||T.value===`analyzing`),X=i(()=>O.value?.nodes.find(e=>e.id===k.value)??null),Tt=i(()=>{if(!O.value)return[];let e=new Map;for(let t of O.value.nodes){let n=t.subsystem??`__default__`;if(!e.has(n)){let r=O.value.subsystems?.find(e=>e.name===n);e.set(n,{displayName:r?.displayName||t.subsystem||E(`@SRCMAP:默认`),color:t.subsystemColor||Q[0],nodes:[]})}e.get(n).nodes.push(t)}return[...e.entries()].map(([,e])=>e)});function Z(e,t=`info`){D.value.push({id:++_t,message:e,type:t,timestamp:Date.now()}),D.value.length>200&&D.value.splice(0,D.value.length-200)}function Et(e){let t={name:``,path:``,kind:`dir`,children:[],childMap:new Map};for(let n of e){let e=n.trim().split(`/`).filter(Boolean),r=t,i=``;for(let t=0;t<e.length;t++){let n=e[t];i=i?`${i}/${n}`:n;let a=t===e.length-1,o=r.childMap.get(n);o||(o={name:n,path:i,kind:a?`file`:`dir`,children:[],childMap:new Map},r.childMap.set(n,o),r.children.push(o)),r=o}}let n=e=>{e.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`dir`?-1:1),e.forEach(e=>{e.kind===`dir`&&n(e.children)})};return n(t.children),t.children}let Q=[`#f59e0b`,`#3b82f6`,`#10b981`,`#8b5cf6`];function Dt(e){return e.subsystemColor?e.subsystemColor:e.subsystemIndex===void 0?e.importance===`high`?`#f59e0b`:e.importance===`low`?`#94a3b8`:`#3b82f6`:Q[e.subsystemIndex%Q.length]}function Ot(e){return{ts:`typescript`,tsx:`typescript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`javascript`,vue:`html`,svelte:`html`,html:`html`,py:`python`,java:`java`,go:`go`,rs:`rust`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,c:`c`,h:`c`,hpp:`cpp`,cs:`csharp`,rb:`ruby`,php:`php`,swift:`swift`,kt:`kotlin`,sh:`shell`,bash:`shell`,json:`json`,yaml:`yaml`,yml:`yaml`,md:`markdown`,css:`css`,scss:`scss`,less:`less`,sql:`sql`}[e.split(`.`).pop()?.toLowerCase()||``]||`plaintext`}function kt(){if(!K.value||q.value)return;let e=document.documentElement.getAttribute(`data-theme`)===`dark`;q.value=ae.create(K.value,{value:``,language:`plaintext`,theme:e?`vs-dark`:`vs`,readOnly:!0,fontSize:12,lineHeight:19,fontFamily:`'JetBrains Mono', 'Fira Code', Consolas, monospace`,minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:`off`,padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6}})}function At(e,t){let n={};t.forEach(e=>{n[e.source]||(n[e.source]=[]),n[e.source].push(e.target)});let r=new Map;e.forEach(e=>{let t=e.subsystem??`__default`;r.has(t)||r.set(t,[]),r.get(t).push(e)});let i=[],a=0;for(let[,e]of r){let t=new Set(e.map(e=>e.id)),r={},o=e.length?[e[0].id]:[];for(o[0]&&(r[o[0]]=0);o.length;){let e=o.shift();(n[e]||[]).filter(e=>t.has(e)).forEach(t=>{r[t]===void 0&&(r[t]=(r[e]??0)+1,o.push(t))})}let s={};e.forEach(e=>{let t=r[e.id]??0;s[t]=(s[t]||0)+1});let c={};e.forEach(e=>{let t=r[e.id]??0;c[t]=(c[t]??-1)+1;let n=c[t],o=s[t]??1,l=a*600+n*220-(o-1)*220/2,u=t*110,ee=Dt(e);i.push({id:e.id,type:`default`,position:{x:l,y:u},label:e.label,data:{...e},style:{background:`#1e293b`,border:`2px solid ${ee}`,borderRadius:`8px`,color:`#e2e8f0`,fontSize:`12px`,padding:`8px 12px`,minWidth:`140px`,maxWidth:`200px`,cursor:`pointer`}})}),a++}return{flowNodes:i,flowEdges:t.map((e,t)=>({id:`e_${t}_${e.source}_${e.target}`,source:e.source,target:e.target,type:`smoothstep`,animated:!1,style:{stroke:`#475569`,strokeWidth:1.5},markerEnd:{type:se.ArrowClosed,color:`#475569`}}))}}async function jt(){let e=St.value,t=Ct.value;if(e.length!==0){L.value=!0;try{await w(),await new Promise(e=>requestAnimationFrame(()=>e())),wt(e.map(e=>e.id)),await new Promise(e=>requestAnimationFrame(()=>e()));let n=new Map;e.forEach(e=>{let t=e.data?.subsystem??`__default__`;n.has(t)||n.set(t,[]),n.get(t).push(e)});let r=new Map,i=0;for(let[,e]of n){let n=new _e.default.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:`TB`,nodesep:55,ranksep:75,marginx:40,marginy:40});let a=new Set(e.map(e=>e.id));e.forEach(e=>{let t=190,r=e.data?.description?68:48,i=document.querySelector(`.vue-flow__node[data-id="${e.id}"]`);i&&i.offsetWidth>0&&(t=i.offsetWidth,r=i.offsetHeight),n.setNode(e.id,{width:t,height:r})}),t.forEach(e=>{a.has(e.source)&&a.has(e.target)&&n.setEdge(e.source,e.target)}),_e.default.layout(n);let o=0;e.forEach(e=>{let t=n.node(e.id);t&&(r.set(e.id,{x:i+t.x-t.width/2,y:t.y-t.height/2}),o=Math.max(o,t.x+t.width/2))}),i+=o+120}J(e.map(e=>({...e,position:r.get(e.id)??e.position}))),await w(),bt({padding:.18})}finally{L.value=!1}}}async function Mt(){if(!h.value.trim()){l.warning(E(`@SRCMAP:请先输入项目路径`));return}if(!Y.value){D.value=[],O.value=null,k.value=null,j.value=``,M.value=``,J([]),xt([]),T.value=`scanning`,Z(E(`@SRCMAP:开始分析项目...`),`info`);try{let e=await fetch(`/api/code-analysis/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:h.value})});if(!e.ok){let t=await e.json().catch(()=>({error:`请求失败`}));throw Error(t.error||`HTTP ${e.status}`)}let t=e.body.getReader(),n=new TextDecoder,r=``;T.value=`analyzing`;let i=``,a=[];for(;;){let{done:e,value:o}=await t.read();if(e)break;r+=n.decode(o,{stream:!0});let s=r.split(`
2
+ `);r=s.pop()??``;for(let e of s)if(e.startsWith(`event:`))i=e.slice(6).trim(),a=[];else if(e.startsWith(`data:`))a.push(e.slice(5).trim());else if(e===``){if(i&&a.length){let e=a.join(``);try{let t=JSON.parse(e);Nt(i,t)}catch{}}i=``,a=[]}}}catch(e){Z(`${E(`@SRCMAP:分析失败`)}: ${e.message}`,`error`),T.value=`error`}}}function Nt(e,t){if(e===`log`)Z(t.message,t.type||`info`);else if(e===`files`)P.value=Et(t.files||[]),P.value.forEach(e=>{e.kind===`dir`&&F.value.add(e.path)});else if(e===`result`){O.value={language:t.language||``,entryFile:t.entryFile||``,entryFunction:t.entryFunction||``,nodes:Array.isArray(t.nodes)?t.nodes:[],edges:Array.isArray(t.edges)?t.edges:[],techStack:Array.isArray(t.techStack)?t.techStack:[],summary:t.summary||``,allFiles:Array.isArray(t.allFiles)?t.allFiles:[],codeFiles:Array.isArray(t.codeFiles)?t.codeFiles:[],subsystems:Array.isArray(t.subsystems)?t.subsystems:void 0};let{flowNodes:e,flowEdges:n}=At(O.value.nodes,O.value.edges);J(e),xt(n),w(()=>jt())}else e===`done`&&(t.error?(Z(`${E(`@SRCMAP:分析失败`)}: ${t.error}`,`error`),T.value=`error`):T.value=`done`)}async function $(e){if(!(!e||N.value)&&M.value!==e){N.value=!0,M.value=e,j.value=``;try{let t=await(await fetch(`/api/code-analysis/file-content?path=${encodeURIComponent(h.value)}&file=${encodeURIComponent(e)}`)).json();if(t.error)throw Error(t.error);j.value=t.content||``}catch(e){j.value=`// ${E(`@SRCMAP:加载失败`)}: ${e.message}`}finally{N.value=!1}}}function Pt(e){let t=e.node.data;k.value=t.id,t.file&&$(t.file)}function Ft(e){F.value.has(e)?F.value.delete(e):F.value.add(e)}let It=i(()=>{let e=[];function t(n,r){for(let i of n){let n=F.value.has(i.path);e.push({name:i.name,path:i.path,kind:i.kind,depth:r,expanded:n}),i.kind===`dir`&&n&&t(i.children,r+1)}}return t(P.value,0),e});return ne(()=>o.currentDirectory,e=>{e&&!h.value&&(h.value=e)}),ne([j,M],([e,t])=>{let n=q.value;if(!n)return;let r=Ot(t||``),i=n.getModel(),a=ae.createModel(e||``,r);n.setModel(a),i?.dispose(),n.setScrollPosition({scrollTop:0,scrollLeft:0})}),te(()=>{kt(),!h.value&&o.currentDirectory&&(h.value=o.currentDirectory)}),n(()=>{q.value?.getModel()?.dispose(),q.value?.dispose(),G()}),(e,n)=>{let i=ce;return d(),t(`div`,ve,[r(`div`,ye,[r(`div`,be,[n[9]||=r(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,class:`sm-icon-map`},[r(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`}),r(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`}),r(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`})],-1),r(`span`,xe,m(b(E)(`@SRCMAP:源码地图`)),1)]),r(`div`,Se,[p(r(`input`,{"onUpdate:modelValue":n[0]||=e=>h.value=e,class:`sm-path-input`,placeholder:b(E)(`@SRCMAP:输入项目目录路径`),disabled:Y.value,onKeydown:ee(Mt,[`enter`])},null,40,Ce),[[ie,h.value]]),r(`button`,{class:`sm-btn sm-btn-primary`,disabled:Y.value,onClick:Mt},[Y.value?(d(),t(S,{key:0},[n[10]||=r(`span`,{class:`sm-spinner`},null,-1),c(` `+m(b(E)(`@SRCMAP:分析中...`)),1)],64)):(d(),t(S,{key:1},[c(m(T.value===`done`?b(E)(`@SRCMAP:重新分析`):b(E)(`@SRCMAP:开始分析`)),1)],64))],8,we)]),r(`div`,Te,[u(i,{content:b(E)(`@SRCMAP:文件列表`),placement:`bottom`},{default:f(()=>[r(`button`,{class:x([`sm-panel-btn`,{active:I.value.files}]),onClick:n[1]||=e=>I.value.files=!I.value.files},[...n[11]||=[r(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1)]],2)]),_:1},8,[`content`]),u(i,{content:b(E)(`@SRCMAP:调用图`),placement:`bottom`},{default:f(()=>[r(`button`,{class:x([`sm-panel-btn`,{active:I.value.graph}]),onClick:n[2]||=e=>I.value.graph=!I.value.graph},[...n[12]||=[r(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`circle`,{cx:`12`,cy:`12`,r:`3`}),r(`circle`,{cx:`3`,cy:`6`,r:`2`}),r(`circle`,{cx:`21`,cy:`6`,r:`2`}),r(`circle`,{cx:`3`,cy:`18`,r:`2`}),r(`circle`,{cx:`21`,cy:`18`,r:`2`}),r(`line`,{x1:`5`,y1:`6`,x2:`9`,y2:`11`}),r(`line`,{x1:`19`,y1:`6`,x2:`15`,y2:`11`}),r(`line`,{x1:`5`,y1:`18`,x2:`9`,y2:`13`}),r(`line`,{x1:`19`,y1:`18`,x2:`15`,y2:`13`})],-1)]],2)]),_:1},8,[`content`]),u(i,{content:b(E)(`@SRCMAP:源码面板`),placement:`bottom`},{default:f(()=>[r(`button`,{class:x([`sm-panel-btn`,{active:I.value.source}]),onClick:n[3]||=e=>I.value.source=!I.value.source},[...n[13]||=[r(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`polyline`,{points:`16 18 22 12 16 6`}),r(`polyline`,{points:`8 6 2 12 8 18`})],-1)]],2)]),_:1},8,[`content`])])]),r(`div`,Ee,[p(r(`div`,{class:`sm-panel sm-panel-files`,style:v({width:R.value+`px`})},[r(`div`,De,[r(`button`,{class:x([`sm-tab-btn`,{active:A.value===`files`}]),onClick:n[4]||=e=>A.value=`files`},[n[14]||=r(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})],-1),c(` `+m(b(E)(`@SRCMAP:文件列表`))+` `,1),O.value?(d(),t(`span`,Oe,m(O.value.allFiles.length),1)):y(``,!0)],2),r(`button`,{class:x([`sm-tab-btn`,{active:A.value===`outline`}]),onClick:n[5]||=e=>A.value=`outline`},[n[15]||=s(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-39b8daed><line x1="8" y1="6" x2="21" y2="6" data-v-39b8daed></line><line x1="8" y1="12" x2="21" y2="12" data-v-39b8daed></line><line x1="8" y1="18" x2="21" y2="18" data-v-39b8daed></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-39b8daed></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-39b8daed></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-39b8daed></line></svg>`,1),c(` `+m(b(E)(`@SRCMAP:大纲`)),1)],2)]),p(r(`div`,ke,[It.value.length>0?(d(!0),t(S,{key:0},a(It.value,e=>(d(),t(`div`,{key:e.path,class:x([`sm-tree-node`,{"sm-tree-node--dir":e.kind===`dir`,"sm-tree-node--active":e.kind===`file`&&M.value===e.path}]),style:v({paddingLeft:10+e.depth*14+`px`}),onClick:t=>e.kind===`dir`?Ft(e.path):$(e.path)},[e.kind===`dir`?(d(),t(`span`,{key:0,class:x([`sm-tree-arrow`,{expanded:e.expanded}])},[...n[16]||=[r(`svg`,{viewBox:`0 0 24 24`,width:`10`,height:`10`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[r(`polyline`,{points:`9 18 15 12 9 6`})],-1)]],2)):(d(),t(`span`,je)),e.kind===`dir`?(d(),t(`svg`,Me,[r(`use`,{"xlink:href":`#${b(ge)(e.name)||`icon-folder`}`},null,8,Ne)])):(d(),t(`svg`,Pe,[r(`use`,{"xlink:href":`#${b(ge)(e.name)}`},null,8,Fe)])),r(`span`,{class:`sm-tree-name`,title:e.path},m(e.name),9,Ie)],14,Ae))),128)):(d(),t(`div`,Le,m(b(E)(`@SRCMAP:暂无文件,请先开始分析`)),1))],512),[[C,A.value===`files`]]),p(r(`div`,Re,[Tt.value.length>0?(d(!0),t(S,{key:0},a(Tt.value,e=>(d(),t(`div`,{key:e.displayName,class:`sm-outline-group`},[r(`div`,{class:`sm-outline-group-header`,style:v({color:e.color})},[n[17]||=r(`svg`,{viewBox:`0 0 24 24`,width:`8`,height:`8`,fill:`currentColor`},[r(`circle`,{cx:`12`,cy:`12`,r:`6`})],-1),c(` `+m(e.displayName)+` `,1),r(`span`,ze,m(e.nodes.length),1)],4),(d(!0),t(S,null,a(e.nodes,n=>(d(),t(`div`,{key:n.id,class:x([`sm-outline-node`,{"sm-outline-node--active":k.value===n.id}]),onClick:e=>{k.value=n.id,n.file&&$(n.file)}},[r(`span`,{class:`sm-outline-dot`,style:v({background:e.color})},null,4),r(`span`,{class:`sm-outline-label`,title:n.file||n.label},m(n.label),9,Ve),n.description?(d(),t(`span`,He,m(n.description.length>18?n.description.slice(0,18)+`…`:n.description),1)):y(``,!0)],10,Be))),128))]))),128)):(d(),t(`div`,Ue,m(b(E)(`@SRCMAP:暂无分析结果`)),1))],512),[[C,A.value===`outline`]])],4),[[C,I.value.files]]),p(r(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:n[6]||=e=>W(`files`,e)},null,544),[[C,I.value.files&&I.value.graph]]),p(r(`div`,We,[O.value?(d(),t(`div`,Ge,[r(`span`,Ke,m(O.value.language),1),O.value.subsystems&&O.value.subsystems.length>1?(d(!0),t(S,{key:0},a(O.value.subsystems,e=>(d(),t(`span`,{key:e.name,class:`sm-subsystem-tag`,style:v({borderColor:e.color,color:e.color})},`● `+m(e.displayName||e.name),5))),128)):(d(!0),t(S,{key:1},a(O.value.techStack.slice(0,4),e=>(d(),t(`span`,{key:e,class:`sm-tech-tag`},m(e),1))),128)),r(`span`,qe,m(O.value.summary),1)])):y(``,!0),r(`div`,Je,[r(`div`,Ye,[r(`button`,{class:`sm-layout-btn`,disabled:L.value||!O.value,onClick:jt},[n[18]||=s(`<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" data-v-39b8daed><rect x="3" y="3" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-39b8daed></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-39b8daed></rect></svg>`,1),c(` `+m(L.value?b(E)(`@SRCMAP:布局中...`):b(E)(`@SRCMAP:优化布局`)),1)],8,Xe)]),u(b(re),{class:`sm-vue-flow`,"default-viewport":{zoom:1},"min-zoom":.2,"max-zoom":4,"fit-view-on-init":``,onNodeClick:Pt},{"node-default":f(({data:e,label:n})=>[u(b(pe),{type:`target`,position:b(_).Top},null,8,[`position`]),r(`div`,{class:`sm-fn-inner`,title:`${n}${e?.description?`
3
+ `+e.description:``}`},[r(`div`,Qe,m(n),1),e?.description?(d(),t(`div`,$e,m(e.description.length>22?e.description.slice(0,22)+`…`:e.description),1)):y(``,!0)],8,Ze),u(b(pe),{type:`source`,position:b(_).Bottom},null,8,[`position`])]),default:f(()=>[u(b(le),{variant:b(ue).Dots,gap:20,size:1,"pattern-color":`#334155`},null,8,[`variant`]),u(b(oe)),u(b(de),{"node-color":`#3b82f6`})]),_:1}),!O.value&&!Y.value?(d(),t(`div`,et,[(d(),t(`svg`,tt,[...n[19]||=[r(`polygon`,{points:`3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21`},null,-1),r(`line`,{x1:`9`,y1:`3`,x2:`9`,y2:`18`},null,-1),r(`line`,{x1:`15`,y1:`6`,x2:`15`,y2:`21`},null,-1)]])),r(`p`,null,m(b(E)(`@SRCMAP:输入项目路径后点击开始分析`)),1)])):y(``,!0),Y.value&&!O.value?(d(),t(`div`,nt,[n[20]||=r(`span`,{class:`sm-spinner sm-spinner-lg`},null,-1),r(`p`,null,m(b(E)(`@SRCMAP:AI 正在分析项目结构...`)),1)])):y(``,!0)]),r(`div`,{class:`sm-resizer sm-resizer-h`,onMousedown:n[7]||=e=>W(`log`,e)},null,32),r(`div`,{class:`sm-log-panel`,style:v({height:B.value+`px`})},[r(`div`,rt,[n[21]||=r(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`polyline`,{points:`4 17 10 11 4 5`}),r(`line`,{x1:`12`,y1:`19`,x2:`20`,y2:`19`})],-1),c(` `+m(b(E)(`@SRCMAP:Agent 日志`))+` `,1),Y.value?(d(),t(`span`,it)):y(``,!0)]),r(`div`,at,[(d(!0),t(S,null,a(D.value.slice(-50),e=>(d(),t(`div`,{key:e.id,class:x([`sm-log-entry`,`sm-log-entry--${e.type}`])},m(e.message),3))),128)),D.value.length===0?(d(),t(`div`,ot,m(b(E)(`@SRCMAP:等待开始分析`)),1)):y(``,!0)],512)],4)],512),[[C,I.value.graph]]),p(r(`div`,{class:`sm-resizer sm-resizer-v`,onMousedown:n[8]||=e=>W(`source`,e)},null,544),[[C,I.value.graph&&I.value.source]]),p(r(`div`,{class:`sm-panel sm-panel-source`,style:v({width:z.value+`px`})},[r(`div`,st,[n[22]||=r(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`},[r(`polyline`,{points:`16 18 22 12 16 6`}),r(`polyline`,{points:`8 6 2 12 8 18`})],-1),c(` `+m(M.value||b(E)(`@SRCMAP:源码面板`))+` `,1),X.value?(d(),t(`span`,ct,m(X.value.label),1)):y(``,!0)]),X.value?(d(),t(`div`,lt,[r(`div`,ut,m(X.value.label),1),r(`div`,dt,[c(m(X.value.file),1),X.value.line?(d(),t(`span`,ft,` :`+m(X.value.line),1)):y(``,!0)]),X.value.description?(d(),t(`div`,pt,m(X.value.description),1)):y(``,!0)])):y(``,!0),r(`div`,mt,[N.value?(d(),t(`div`,ht,[...n[23]||=[r(`span`,{class:`sm-spinner`},null,-1)]])):y(``,!0),!N.value&&!j.value?(d(),t(`div`,gt,m(b(E)(`@SRCMAP:点击调用图中的节点查看源码`)),1)):y(``,!0),r(`div`,{ref_key:`monacoContainerRef`,ref:K,class:`sm-monaco-container`},null,512)])],4),[[C,I.value.source]])])])}}}),[[`__scopeId`,`data-v-39b8daed`]]);export{D as default};
@@ -39,7 +39,7 @@
39
39
 
40
40
  (`+xu(t)+`)`),`syntax`in e&&e.syntax&&(n+=`\n\nSyntax: ${xu(e.syntax)}`)}return e.references&&e.references.length>0&&t?.references!==!1&&(n.length>0&&(n+=`
41
41
 
42
- `),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(` | `)),n}function wu(e=[]){return e.length===0?null:e.map(e=>{let t=``,n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in vu&&(t+=vu[r]),i&&(t+=` `+i),t}).join(`, `)}var Tu;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Tu=r})();let{URI:Eu,Utils:Du}=Tu;function Ou(e){return Du.dirname(Eu.parse(e)).toString(!0)}function ku(e,...t){return Du.joinPath(Eu.parse(e),...t).toString(!0)}var Au=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){let n={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let i=r.uriValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of a)n.items.push(e)}}for(let r of this.importCompletions){let i=r.pathValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);e.languageId===`scss`&&a.forEach(e=>{L(e.label,`_`)&&Do(e.label,`.scss`)&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of a)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){let a=Mu(e),o=L(e,`'`)||L(e,`"`),s=o?a.slice(0,t.character-(n.start.character+1)):a.slice(0,t.character-n.start.character),c=r.uri,l=Nu(s,a,o?Lu(n,1,-1):n),u=s.substring(0,s.lastIndexOf(`/`)+1),d=i.resolveReference(u||`.`,c);if(d)try{let e=[],t=await this.readDirectory(d);for(let[n,r]of t)n.charCodeAt(0)!==ju&&(r===Ol.Directory||ku(d,n)!==c)&&e.push(Pu(n,r===Ol.Directory,l));return e}catch{}return[]}};let ju=46;function Mu(e){return L(e,`'`)||L(e,`"`)?e.slice(1,-1):e}function Nu(e,t,n){let r,i=e.lastIndexOf(`/`);if(i===-1)r=n;else{let e=t.slice(i+1),a=Iu(n.end,-e.length),o=e.indexOf(` `),s;s=o===-1?n.end:Iu(a,o),r=K.create(a,s)}return r}function Pu(e,t,n){return t?(e+=`/`,{label:Fu(e),kind:J.Folder,textEdit:q.replace(n,Fu(e)),command:{title:`Suggest`,command:`editor.action.triggerSuggest`}}):{label:Fu(e),kind:J.File,textEdit:q.replace(n,Fu(e))}}function Fu(e){return e.replace(/(\s|\(|\)|,|"|')/g,`\\$1`)}function Iu(e,t){return nc.create(e.line,e.character+t)}function Lu(e,t,n){let r=Iu(e.start,t),i=Iu(e.end,n);return K.create(r,i)}let Ru=Ac.Snippet,zu={title:`Suggest`,command:`editor.action.triggerSuggest`};var Bu;(function(e){e.Enums=` `,e.Normal=`d`,e.VendorPrefixed=`x`,e.Term=`y`,e.Variable=`z`})(Bu||={});var Vu=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||=new _u(this.styleSheet),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);let a=new Au(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);let s=this.doComplete(e,t,n,i);try{let t=await a.computeCompletions(e,r);return{isIncomplete:s.isIncomplete||t.isIncomplete,itemDefaults:s.itemDefaults,items:t.items.concat(s.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Ju(e,this.offset),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{let e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=No(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(n instanceof Ko)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof Ds)n.parent instanceof Fs?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof Vo){let t=n.findAParent(R.ExtendsReference,R.Ruleset);if(t)if(t.type===R.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{let n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Xo)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof Ro)this.getCompletionsForDeclarations(n,e);else if(n instanceof Ps)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof zo)this.getCompletionsForRuleSet(n,e);else if(n instanceof Fs)this.getCompletionsForInterpolation(n,e);else if(n instanceof ns)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof Bs)this.getCompletionsForMixinReference(n,e);else if(n instanceof Jo)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof hs)this.getCompletionsForSupports(n,e);else if(n instanceof ws)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof Ls)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===R.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(n.parent===null)this.getCompletionForTopLevel(e);else if(n.type===R.StringLiteral&&this.isImportPathParent(n.parent.type))this.getCompletionForImportPath(n,e);else continue;if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),e.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===R.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(e.indexOf(n.type)!==-1)return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let a,o,s=!1;e?(a=this.getCompletionRange(e.getProperty()),o=i.name,cu(e.colonPosition)||(o+=`: `,s=!0)):(a=this.getCompletionRange(null),o=i.name+`: `,s=!0),!e&&r&&(o+=`$0;`),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(a.end)&&(o+=`$0;`);let c={label:i.name,documentation:bu(i,this.doesSupportMarkdown()),tags:Hu(i)?[jc.Deprecated]:[],textEdit:q.replace(a,o),insertTextFormat:Ac.Snippet,kind:J.Property};i.restrictions||(s=!1),n&&s&&(c.command=zu);let l=(255-(typeof i.relevance==`number`?Math.min(Math.max(i.relevance,0),99):50)).toString(16);c.sortText=(L(i.name,`-`)?Bu.VendorPrefixed:Bu.Normal)+`_`+l,t.items.push(c)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){let n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n),i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(let e of r.restrictions)switch(e){case`color`:this.getColorProposals(r,i,t);break;case`position`:this.getPositionProposals(r,i,t);break;case`repeat`:this.getRepeatStyleProposals(r,i,t);break;case`line-style`:this.getLineStyleProposals(r,i,t);break;case`line-width`:this.getLineWidthProposals(r,i,t);break;case`geometry-box`:this.getGeometryBoxProposals(r,i,t);break;case`box`:this.getBoxProposals(r,i,t);break;case`image`:this.getImageProposals(r,i,t);break;case`timing-function`:this.getTimingFunctionProposals(r,i,t);break;case`shape`:this.getBasicShapeProposals(r,i,t);break}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{let n=Gu(this.styleSheet,e);for(let e of n.getEntries())t.items.push({label:e,textEdit:q.replace(this.getCompletionRange(i),e),kind:J.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(let r of e.values){let i=r.name,a;if(Do(i,`)`)){let e=i.lastIndexOf(`(`);e!==-1&&(i=i.substring(0,e+1)+`$1`+i.substring(e+1),a=Ru)}let o=Bu.Enums;L(r.name,`-`)&&(o+=Bu.VendorPrefixed);let s={label:r.name,documentation:bu(r,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],textEdit:q.replace(this.getCompletionRange(t),i),sortText:o,kind:J.Value,insertTextFormat:a};n.items.push(s)}return n}getCSSWideKeywordProposals(e,t,n){for(let e in Ql)n.items.push({label:e,documentation:Ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});for(let e in $l){let r=Wu(e);n.items.push({label:e,documentation:$l[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:Ru,command:L(e,`var`)?zu:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){let n=L(r.name,`--`)?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(e),n),kind:J.Variable,sortText:Bu.Variable};if(typeof i.documentation==`string`&&zl(i.documentation)&&(i.kind=J.Color),r.node.type===R.FunctionParameter){let e=r.node.getParent();e.type===R.MixinDeclaration&&(i.detail=U(`argument from '{0}'`,e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){let t=new Uu;this.styleSheet.acceptVisitor(new qu(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){if(L(r.name,`--`)){let t={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(null),r.name),kind:J.Variable};typeof t.documentation==`string`&&zl(t.documentation)&&(t.kind=J.Color),e.items.push(t)}t.remove(r.name)}for(let n of t.getEntries())if(L(n,`--`)){let t={label:n,textEdit:q.replace(this.getCompletionRange(null),n),kind:J.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r=`0`;if(this.currentWord.length>0){let e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===R.Term&&(t=t.getParent()),e.restrictions)for(let i of e.restrictions){let e=ru[i];if(e)for(let i of e){let e=r+i;n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=e.end===-1?this.position:this.textDocument.positionAt(e.end),n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return K.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(let e in Ml)n.items.push({label:e,documentation:Ml[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e in Pl)n.items.push({label:e,documentation:Pl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});let r=new Uu;this.styleSheet.acceptVisitor(new Ku(r,this.offset));for(let e of r.getEntries())n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e of Al)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:q.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Ru,kind:J.Function});return n}getPositionProposals(e,t,n){for(let e in Kl)n.items.push({label:e,documentation:Kl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getRepeatStyleProposals(e,t,n){for(let e in ql)n.items.push({label:e,documentation:ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineStyleProposals(e,t,n){for(let e in Jl)n.items.push({label:e,documentation:Jl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineWidthProposals(e,t,n){for(let e of Yl)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getGeometryBoxProposals(e,t,n){for(let e in Zl)n.items.push({label:e,documentation:Zl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getBoxProposals(e,t,n){for(let e in Xl)n.items.push({label:e,documentation:Xl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getImageProposals(e,t,n){for(let e in eu){let r=Wu(e);n.items.push({label:e,documentation:eu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getTimingFunctionProposals(e,t,n){for(let e in tu){let r=Wu(e);n.items.push({label:e,documentation:tu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getBasicShapeProposals(e,t,n){for(let e in nu){let r=Wu(e);n.items.push({label:e,documentation:nu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof zo?this.getCompletionsForRuleSet(t,e):t instanceof hs?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:q.replace(this.getCompletionRange(null),t.name),documentation:bu(t,this.doesSupportMarkdown()),tags:Hu(t)?[jc.Deprecated]:[],kind:J.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let n=e.getDeclarations();return n&&n.endsWith(`}`)&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){let r=this.findInNodePath(R.PseudoSelector,R.IdentifierSelector,R.ClassSelector,R.ElementNameSelector);if(!r&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,`:`)&&(this.currentWord=`:`+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,`:`)&&(this.currentWord=`:`+this.currentWord),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`:-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),this.cssDataManager.getPseudoElements().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`::-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),!t){for(let e of iu)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword});for(let e of au)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword})}let i={};i[this.currentWord]=!0;let a=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===R.SimpleSelector&&e.length>0){let t=a.substr(e.offset,e.length);return t.charAt(0)===`.`&&!i[t]&&(i[t]=!0,n.items.push({label:t,textEdit:q.replace(this.getCompletionRange(r),t),kind:J.Keyword})),!1}return!0}),e&&e.isNested()){let t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&e.getSelectors().getChildren().indexOf(t)===0&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Ho){let e=n;if(!cu(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(cu(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof Wo)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof Ls?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&this.currentWord[0]===`@`||n instanceof zo)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&cu(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let n=e.getParent();if(n instanceof Xo)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;let r=e.findParent(R.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;let i=e.findChildAtOffset(this.offset,!0);return!i||i instanceof Ns||i instanceof Io?this.getCompletionsForDeclarationValue(r,t):t}getCompletionsForFunctionArgument(e,t,n){let r=t.getIdentifier();return r&&r.matches(`var`)&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(n),n}getCompletionsForFunctionDeclaration(e,t){let n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Mixin);for(let e of n)e.node instanceof Vs&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));let r=e.getIdentifier()||null;return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Function);for(let e of r)e.node instanceof ns&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;let r=t.getChildren().map(e=>e instanceof Yo?e.getName():e.getText()),i=e.name+`(`+r.map((e,t)=>"${"+(t+1)+`:`+e+`}`).join(`, `)+`)`;return{label:e.name,detail:e.name+`(`+r.join(`, `)+`)`,textEdit:q.replace(this.getCompletionRange(n),i),insertTextFormat:Ru,kind:J.Function,sortText:Bu.Term}}getCompletionsForSupportsCondition(e,t){let n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Wo)return!cu(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof ws)return this.getCompletionsForSupportsCondition(n,t)}return cu(e.lParent)&&this.offset>e.lParent&&(!cu(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let n=e.getDeclarations();if(!n||this.offset<=n.offset){let n=e.findFirstChildBeforeOffset(this.offset);return n instanceof ws?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){let t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n=``,r=this.position;let t=this.textDocument.positionAt(e.offset+4);i=K.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){let n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Oc.Markdown)!==-1}return this.supportsMarkdown}};function Hu(e){return!!(e.status&&(e.status===`nonstandard`||e.status===`obsolete`))}var Uu=class{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}};function Wu(e){return e.replace(/\(\)$/,`($1)`)}function Gu(e,t){let n=t.getFullPropertyName(),r=new Uu;function i(e){return(e instanceof Io||e instanceof Ns||e instanceof js)&&r.add(e.getText()),!0}function a(e){return n===e.getFullPropertyName()}function o(e){if(e instanceof Wo&&e!==t&&a(e)){let t=e.getValue();t&&t.accept(i)}return!0}return e.accept(o),r}var Ku=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof js||e instanceof Jo&&Rl(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}},qu=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof Io&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}};function Ju(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
42
+ `),n+=e.references.map(e=>`[${e.name}](${e.url})`).join(` | `)),n}function wu(e=[]){return e.length===0?null:e.map(e=>{let t=``,n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in vu&&(t+=vu[r]),i&&(t+=` `+i),t}).join(`, `)}var Tu;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Tu=r})();let{URI:Eu,Utils:Du}=Tu;function Ou(e){return Du.dirname(Eu.parse(e)).toString(!0)}function ku(e,...t){return Du.joinPath(Eu.parse(e),...t).toString(!0)}var Au=class{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){let n={items:[],isIncomplete:!1};for(let r of this.literalCompletions){let i=r.uriValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);for(let e of a)n.items.push(e)}}for(let r of this.importCompletions){let i=r.pathValue,a=Mu(i);if(a===`.`||a===`..`)n.isIncomplete=!0;else{let a=await this.providePathSuggestions(i,r.position,r.range,e,t);e.languageId===`scss`&&a.forEach(e=>{L(e.label,`_`)&&Do(e.label,`.scss`)&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))});for(let e of a)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,r,i){let a=Mu(e),o=L(e,`'`)||L(e,`"`),s=o?a.slice(0,t.character-(n.start.character+1)):a.slice(0,t.character-n.start.character),c=r.uri,l=Nu(s,a,o?Lu(n,1,-1):n),u=s.substring(0,s.lastIndexOf(`/`)+1),d=i.resolveReference(u||`.`,c);if(d)try{let e=[],t=await this.readDirectory(d);for(let[n,r]of t)n.charCodeAt(0)!==ju&&(r===Ol.Directory||ku(d,n)!==c)&&e.push(Pu(n,r===Ol.Directory,l));return e}catch{}return[]}};let ju=46;function Mu(e){return L(e,`'`)||L(e,`"`)?e.slice(1,-1):e}function Nu(e,t,n){let r,i=e.lastIndexOf(`/`);if(i===-1)r=n;else{let e=t.slice(i+1),a=Iu(n.end,-e.length),o=e.indexOf(` `),s;s=o===-1?n.end:Iu(a,o),r=K.create(a,s)}return r}function Pu(e,t,n){return t?(e+=`/`,{label:Fu(e),kind:J.Folder,textEdit:q.replace(n,Fu(e)),command:{title:`Suggest`,command:`editor.action.triggerSuggest`}}):{label:Fu(e),kind:J.File,textEdit:q.replace(n,Fu(e))}}function Fu(e){return e.replace(/(\s|\(|\)|,|"|')/g,`\\$1`)}function Iu(e,t){return nc.create(e.line,e.character+t)}function Lu(e,t,n){let r=Iu(e.start,t),i=Iu(e.end,n);return K.create(r,i)}let Ru=Ac.Snippet,zu={title:`Suggest`,command:`editor.action.triggerSuggest`};var Bu;(function(e){e.Enums=` `,e.Normal=`d`,e.VendorPrefixed=`x`,e.Term=`y`,e.Variable=`z`})(Bu||={});var Vu=class{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||=new _u(this.styleSheet),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,r,i=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,i);let a=new Au(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);let s=this.doComplete(e,t,n,i);try{let t=await a.computeCompletions(e,r);return{isIncomplete:s.isIncomplete||t.isIncomplete,itemDefaults:s.itemDefaults,items:t.items.concat(s.items)}}finally{this.completionParticipants=o}}doComplete(e,t,n,r){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Ju(e,this.offset),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=r;try{let e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=No(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(n instanceof Ko)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof Ds)n.parent instanceof Fs?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof Vo){let t=n.findAParent(R.ExtendsReference,R.Ruleset);if(t)if(t.type===R.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{let n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof Xo)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof Ro)this.getCompletionsForDeclarations(n,e);else if(n instanceof Ps)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof zo)this.getCompletionsForRuleSet(n,e);else if(n instanceof Fs)this.getCompletionsForInterpolation(n,e);else if(n instanceof ns)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof Bs)this.getCompletionsForMixinReference(n,e);else if(n instanceof Jo)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof hs)this.getCompletionsForSupports(n,e);else if(n instanceof ws)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof Ls)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===R.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(n.parent===null)this.getCompletionForTopLevel(e);else if(n.type===R.StringLiteral&&this.isImportPathParent(n.parent.type))this.getCompletionForImportPath(n,e);else continue;if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),e.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===R.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){let n=this.nodePath[t];if(e.indexOf(n.type)!==-1)return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){let n=this.isTriggerPropertyValueCompletionEnabled,r=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(i=>{let a,o,s=!1;e?(a=this.getCompletionRange(e.getProperty()),o=i.name,cu(e.colonPosition)||(o+=`: `,s=!0)):(a=this.getCompletionRange(null),o=i.name+`: `,s=!0),!e&&r&&(o+=`$0;`),e&&!e.semicolonPosition&&r&&this.offset>=this.textDocument.offsetAt(a.end)&&(o+=`$0;`);let c={label:i.name,documentation:bu(i,this.doesSupportMarkdown()),tags:Hu(i)?[jc.Deprecated]:[],textEdit:q.replace(a,o),insertTextFormat:Ac.Snippet,kind:J.Property};i.restrictions||(s=!1),n&&s&&(c.command=zu);let l=(255-(typeof i.relevance==`number`?Math.min(Math.max(i.relevance,0),99):50)).toString(16);c.sortText=(L(i.name,`-`)?Bu.VendorPrefixed:Bu.Normal)+`_`+l,t.items.push(c)}),this.completionParticipants.forEach(e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){let n=e.getFullPropertyName(),r=this.cssDataManager.getProperty(n),i=e.getValue()||null;for(;i&&i.hasChildren();)i=i.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(i)})}),r){if(r.restrictions)for(let e of r.restrictions)switch(e){case`color`:this.getColorProposals(r,i,t);break;case`position`:this.getPositionProposals(r,i,t);break;case`repeat`:this.getRepeatStyleProposals(r,i,t);break;case`line-style`:this.getLineStyleProposals(r,i,t);break;case`line-width`:this.getLineWidthProposals(r,i,t);break;case`geometry-box`:this.getGeometryBoxProposals(r,i,t);break;case`box`:this.getBoxProposals(r,i,t);break;case`image`:this.getImageProposals(r,i,t);break;case`timing-function`:this.getTimingFunctionProposals(r,i,t);break;case`shape`:this.getBasicShapeProposals(r,i,t);break}this.getValueEnumProposals(r,i,t),this.getCSSWideKeywordProposals(r,i,t),this.getUnitProposals(r,i,t)}else{let n=Gu(this.styleSheet,e);for(let e of n.getEntries())t.items.push({label:e,textEdit:q.replace(this.getCompletionRange(i),e),kind:J.Value})}return this.getVariableProposals(i,t),this.getTermProposals(r,i,t),t}getValueEnumProposals(e,t,n){if(e.values)for(let r of e.values){let i=r.name,a;if(Do(i,`)`)){let e=i.lastIndexOf(`(`);e!==-1&&(i=i.substring(0,e+1)+`$1`+i.substring(e+1),a=Ru)}let o=Bu.Enums;L(r.name,`-`)&&(o+=Bu.VendorPrefixed);let s={label:r.name,documentation:bu(r,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],textEdit:q.replace(this.getCompletionRange(t),i),sortText:o,kind:J.Value,insertTextFormat:a};n.items.push(s)}return n}getCSSWideKeywordProposals(e,t,n){for(let e in Ql)n.items.push({label:e,documentation:Ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});for(let e in $l){let r=Wu(e);n.items.push({label:e,documentation:$l[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:Ru,command:L(e,`var`)?zu:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){let n=L(r.name,`--`)?`var(${r.name})`:r.name,i={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(e),n),kind:J.Variable,sortText:Bu.Variable};if(typeof i.documentation==`string`&&zl(i.documentation)&&(i.kind=J.Color),r.node.type===R.FunctionParameter){let e=r.node.getParent();e.type===R.MixinDeclaration&&(i.detail=U(`argument from '{0}'`,e.getName()))}t.items.push(i)}return t}getVariableProposalsForCSSVarFunction(e){let t=new Uu;this.styleSheet.acceptVisitor(new qu(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Variable);for(let r of n){if(L(r.name,`--`)){let t={label:r.name,documentation:r.value?ko(r.value):r.value,textEdit:q.replace(this.getCompletionRange(null),r.name),kind:J.Variable};typeof t.documentation==`string`&&zl(t.documentation)&&(t.kind=J.Color),e.items.push(t)}t.remove(r.name)}for(let n of t.getEntries())if(L(n,`--`)){let t={label:n,textEdit:q.replace(this.getCompletionRange(null),n),kind:J.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let r=`0`;if(this.currentWord.length>0){let e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(r=e[0],n.isIncomplete=r.length===this.currentWord.length)}else this.currentWord.length===0&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===R.Term&&(t=t.getParent()),e.restrictions)for(let i of e.restrictions){let e=ru[i];if(e)for(let i of e){let e=r+i;n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){let t=e.end===-1?this.position:this.textDocument.positionAt(e.end),n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return K.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(let e in Ml)n.items.push({label:e,documentation:Ml[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e in Pl)n.items.push({label:e,documentation:Pl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});let r=new Uu;this.styleSheet.acceptVisitor(new Ku(r,this.offset));for(let e of r.getEntries())n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Color});for(let e of Al)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:q.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Ru,kind:J.Function});return n}getPositionProposals(e,t,n){for(let e in Kl)n.items.push({label:e,documentation:Kl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getRepeatStyleProposals(e,t,n){for(let e in ql)n.items.push({label:e,documentation:ql[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineStyleProposals(e,t,n){for(let e in Jl)n.items.push({label:e,documentation:Jl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getLineWidthProposals(e,t,n){for(let e of Yl)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getGeometryBoxProposals(e,t,n){for(let e in Zl)n.items.push({label:e,documentation:Zl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getBoxProposals(e,t,n){for(let e in Xl)n.items.push({label:e,documentation:Xl[e],textEdit:q.replace(this.getCompletionRange(t),e),kind:J.Value});return n}getImageProposals(e,t,n){for(let e in eu){let r=Wu(e);n.items.push({label:e,documentation:eu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getTimingFunctionProposals(e,t,n){for(let e in tu){let r=Wu(e);n.items.push({label:e,documentation:tu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getBasicShapeProposals(e,t,n){for(let e in nu){let r=Wu(e);n.items.push({label:e,documentation:nu[e],textEdit:q.replace(this.getCompletionRange(t),r),kind:J.Function,insertTextFormat:e===r?void 0:Ru})}return n}getCompletionsForStylesheet(e){let t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof zo?this.getCompletionsForRuleSet(t,e):t instanceof hs?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(t=>{e.items.push({label:t.name,textEdit:q.replace(this.getCompletionRange(null),t.name),documentation:bu(t,this.doesSupportMarkdown()),tags:Hu(t)?[jc.Deprecated]:[],kind:J.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){let n=e.getDeclarations();return n&&n.endsWith(`}`)&&this.offset>=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){let r=this.findInNodePath(R.PseudoSelector,R.IdentifierSelector,R.ClassSelector,R.ElementNameSelector);if(!r&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,`:`)&&(this.currentWord=`:`+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,`:`)&&(this.currentWord=`:`+this.currentWord),this.defaultReplaceRange=K.create(nc.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`:-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),this.cssDataManager.getPseudoElements().forEach(e=>{let t=Wu(e.name),i={label:e.name,textEdit:q.replace(this.getCompletionRange(r),t),documentation:bu(e,this.doesSupportMarkdown()),tags:Hu(e)?[jc.Deprecated]:[],kind:J.Function,insertTextFormat:e.name===t?void 0:Ru};L(e.name,`::-`)&&(i.sortText=Bu.VendorPrefixed),n.items.push(i)}),!t){for(let e of iu)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword});for(let e of au)n.items.push({label:e,textEdit:q.replace(this.getCompletionRange(r),e),kind:J.Keyword})}let i={};i[this.currentWord]=!0;let a=this.textDocument.getText();if(this.styleSheet.accept(e=>{if(e.type===R.SimpleSelector&&e.length>0){let t=a.substr(e.offset,e.length);return t.charAt(0)===`.`&&!i[t]&&(i[t]=!0,n.items.push({label:t,textEdit:q.replace(this.getCompletionRange(r),t),kind:J.Keyword})),!1}return!0}),e&&e.isNested()){let t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&e.getSelectors().getChildren().indexOf(t)===0&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;let n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Ho){let e=n;if(!cu(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(cu(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof Wo)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof Ls?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&this.currentWord[0]===`@`||n instanceof zo)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&cu(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){let n=e.getParent();if(n instanceof Xo)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;let r=e.findParent(R.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;let i=e.findChildAtOffset(this.offset,!0);return!i||i instanceof Ns||i instanceof Io?this.getCompletionsForDeclarationValue(r,t):t}getCompletionsForFunctionArgument(e,t,n){let r=t.getIdentifier();return r&&r.matches(`var`)&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(n),n}getCompletionsForFunctionDeclaration(e,t){let n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Mixin);for(let e of n)e.node instanceof Vs&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));let r=e.getIdentifier()||null;return this.completionParticipants.forEach(e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(r)})}),t}getTermProposals(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Function);for(let e of r)e.node instanceof ns&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;let r=t.getChildren().map(e=>e instanceof Yo?e.getName():e.getText()),i=e.name+`(`+r.map((e,t)=>"${"+(t+1)+`:`+e+`}`).join(`, `)+`)`;return{label:e.name,detail:e.name+`(`+r.join(`, `)+`)`,textEdit:q.replace(this.getCompletionRange(n),i),insertTextFormat:Ru,kind:J.Function,sortText:Bu.Term}}getCompletionsForSupportsCondition(e,t){let n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof Wo)return!cu(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof ws)return this.getCompletionsForSupportsCondition(n,t)}return cu(e.lParent)&&this.offset>e.lParent&&(!cu(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){let n=e.getDeclarations();if(!n||this.offset<=n.offset){let n=e.findFirstChildBeforeOffset(this.offset);return n instanceof ws?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,r,i;if(e.hasChildren()){let t=e.getChild(0);n=t.getText(),r=this.position,i=this.getCompletionRange(t)}else{n=``,r=this.position;let t=this.textDocument.positionAt(e.offset+4);i=K.create(t,t)}return this.completionParticipants.forEach(e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})}),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach(t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),t}hasCharacterAtPosition(e,t){let n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Oc.Markdown)!==-1}return this.supportsMarkdown}};function Hu(e){return!!(e.status&&(e.status===`nonstandard`||e.status===`obsolete`))}var Uu=class{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}};function Wu(e){return e.replace(/\(\)$/,`($1)`)}function Gu(e,t){let n=t.getFullPropertyName(),r=new Uu;function i(e){return(e instanceof Io||e instanceof Ns||e instanceof js)&&r.add(e.getText()),!0}function a(e){return n===e.getFullPropertyName()}function o(e){if(e instanceof Wo&&e!==t&&a(e)){let t=e.getValue();t&&t.accept(i)}return!0}return e.accept(o),r}var Ku=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof js||e instanceof Jo&&Rl(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}},qu=class{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof Io&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}};function Ju(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
43
43
  \r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}var Yu=class e{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(let t of this.attributes)if(t.name===e)return t.value}return null}addChild(t){t instanceof e&&(t.parent=this),this.children||=[],this.children.push(t)}append(e){if(this.attributes){let t=this.attributes[this.attributes.length-1];t.value+=e}}prepend(e){if(this.attributes){let t=this.attributes[0];t.value=e+t.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Xu);)e=e.parent;return e}removeChild(e){if(this.children){let t=this.children.indexOf(e);if(t!==-1)return this.children.splice(t,1),!0}return!1}addAttr(e,t){this.attributes||=[];for(let n of this.attributes)if(n.name===e){n.value+=` `+t;return}this.attributes.push({name:e,value:t})}clone(t=!0){let n=new e;if(this.attributes){n.attributes=[];for(let e of this.attributes)n.addAttr(e.name,e.value)}if(t&&this.children){n.children=[];for(let e=0;e<this.children.length;e++)n.addChild(this.children[e].clone())}return n}cloneWithParent(){let e=this.clone(!1);return this.parent&&!(this.parent instanceof Xu)&&this.parent.cloneWithParent().addChild(e),e}},Xu=class extends Yu{},Zu=class extends Yu{constructor(e){super(),this.addAttr(`name`,e)}},Qu=class{constructor(e){this.quote=e,this.result=[]}print(e,t){this.result=[],e instanceof Xu?e.children&&this.doPrint(e.children,0):this.doPrint([e],0);let n;return n=t?`${t.text}\n … `+this.result.join(`
44
44
  `):this.result.join(`
45
45
  `),[{language:`html`,value:n}]}doPrint(e,t){for(let n of e)this.doPrintElement(n,t),n.children&&this.doPrint(n.children,t+1)}writeLine(e,t){let n=Array(e+1).join(` `);this.result.push(n+t)}doPrintElement(e,t){let n=e.findAttribute(`name`);if(e instanceof Zu||n===`…`){this.writeLine(t,n);return}let r=[`<`];if(n?r.push(n):r.push(`element`),e.attributes){for(let t of e.attributes)if(t.name!==`name`){r.push(` `),r.push(t.name);let e=t.value;e&&(r.push(`=`),r.push($u.ensure(e,this.quote)))}}r.push(`>`),this.writeLine(t,r.join(``))}},$u;(function(e){function t(e,t){return t+n(e)+t}e.ensure=t;function n(e){let t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.remove=n})($u||={});var ed=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function td(e,t){let n=new Yu;for(let r of e.getChildren())switch(r.type){case R.SelectorCombinator:if(t){let e=r.getText().split(`&`);if(e.length===1){n.addAttr(`name`,e[0]);break}n=t.cloneWithParent(),e[0]&&n.findRoot().prepend(e[0]);for(let r=1;r<e.length;r++){if(r>1){let e=t.cloneWithParent();n.addChild(e.findRoot()),n=e}n.append(e[r])}}break;case R.SelectorPlaceholder:if(r.matches(`@at-root`))return n;case R.ElementNameSelector:let e=r.getText();n.addAttr(`name`,e===`*`?`element`:nd(e));break;case R.ClassSelector:n.addAttr(`class`,nd(r.getText().substring(1)));break;case R.IdentifierSelector:n.addAttr(`id`,nd(r.getText().substring(1)));break;case R.MixinDeclaration:n.addAttr(`class`,r.getName());break;case R.PseudoSelector:n.addAttr(nd(r.getText()),``);break;case R.AttributeSelector:let i=r,a=i.getIdentifier();if(a){let e=i.getValue(),t=i.getOperator(),r;if(e&&t)switch(nd(t.getText())){case`|=`:r=`${$u.remove(nd(e.getText()))}-\u2026`;break;case`^=`:r=`${$u.remove(nd(e.getText()))}\u2026`;break;case`$=`:r=`\u2026${$u.remove(nd(e.getText()))}`;break;case`~=`:r=` \u2026 ${$u.remove(nd(e.getText()))} \u2026 `;break;case`*=`:r=`\u2026${$u.remove(nd(e.getText()))}\u2026`;break;default:r=$u.remove(nd(e.getText()));break}n.addAttr(nd(a.getText()),r)}break}return n}function nd(e){let t=new Eo;t.setSource(e);let n=t.scanUnquotedString();return n?n.text:e}var rd=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,t){let n=od(e);if(n){let r=new Qu(`"`).print(n,t);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]}simpleSelectorToMarkedString(e){let t=td(e),n=new Qu(`"`).print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}isPseudoElementIdentifier(e){let t=e.match(/^::?([\w-]+)/);return t?!!this.cssDataManager.getPseudoElement(`::`+t[1]):!1}selectorToSpecificityMarkedString(e){let t=e=>{let t=new ed,r=new ed;for(let t of e)for(let e of t.getChildren()){let t=n(e);if(t.id>r.id){r=t;continue}else if(t.id<r.id)continue;if(t.attr>r.attr){r=t;continue}else if(t.attr<r.attr)continue;if(t.tag>r.tag){r=t;continue}}return t.id+=r.id,t.attr+=r.attr,t.tag+=r.tag,t},n=e=>{let r=new ed;elementLoop:for(let i of e.getChildren()){switch(i.type){case R.IdentifierSelector:r.id++;break;case R.ClassSelector:case R.AttributeSelector:r.attr++;break;case R.ElementNameSelector:if(i.matches(`*`))break;r.tag++;break;case R.PseudoSelector:let e=i.getText(),n=i.getChildren();if(this.isPseudoElementIdentifier(e)){if(e.match(/^::slotted/i)&&n.length>0){r.tag++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}r.tag++;continue elementLoop}if(e.match(/^:where/i))continue elementLoop;if(e.match(/^:(?:not|has|is)/i)&&n.length>0){let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}if(e.match(/^:(?:host|host-context)/i)&&n.length>0){r.attr++;let e=t(n);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}if(e.match(/^:(?:nth-child|nth-last-child)/i)&&n.length>0){if(r.attr++,n.length===3&&n[1].type===23){let e=t(n[2].getChildren());r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag;continue elementLoop}let e=new lu,i=n[1].getText();e.scanner.setSource(i);let a=e.scanner.scan(),o=e.scanner.scan();if(a.text===`n`||a.text===`-n`&&o.text===`of`){let n=[],a=i.slice(o.offset+2).split(`,`);for(let t of a){let r=e.internalParse(t,e._parseSelector);r&&n.push(r)}let s=t(n);r.id+=s.id,r.attr+=s.attr,r.tag+=s.tag;continue elementLoop}continue elementLoop}r.attr++;continue elementLoop}if(i.getChildren().length>0){let e=n(i);r.id+=e.id,r.attr+=e.attr,r.tag+=e.tag}}return r},r=n(e);return`[${U(`Selector Specificity`)}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${r.id}, ${r.attr}, ${r.tag})`}},id=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let t=null;if(!(this.element instanceof Xu)&&e.getChildren().some(e=>e.hasChildren()&&e.getChild(0).type===R.SelectorCombinator)){let e=this.element.findRoot();e.parent instanceof Xu&&(t=this.element,this.element=e.parent,this.element.removeChild(e),this.prev=null)}for(let n of e.getChildren()){if(n instanceof Vo){if(this.prev instanceof Vo){let e=new Zu(`…`);this.element.addChild(e),this.element=e}else this.prev&&(this.prev.matches(`+`)||this.prev.matches(`~`))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches(`~`)&&this.element.addChild(new Zu(`⋮`));let e=td(n,t),r=e.findRoot();this.element.addChild(r),this.element=e}(n instanceof Vo||n.type===R.SelectorCombinatorParent||n.type===R.SelectorCombinatorShadowPiercingDescendant||n.type===R.SelectorCombinatorSibling||n.type===R.SelectorCombinatorAllSiblings)&&(this.prev=n)}}};function ad(e){switch(e.type){case R.MixinDeclaration:case R.Stylesheet:return!0}return!1}function od(e){if(e.matches(`@at-root`))return null;let t=new Xu,n=[],r=e.getParent();if(r instanceof zo){let e=r.getParent();for(;e&&!ad(e);){if(e instanceof zo){if(e.getSelectors().matches(`@at-root`))break;n.push(e)}e=e.getParent()}}let i=new id(t);for(let e=n.length-1;e>=0;e--){let t=n[e].getSelectors().getChild(0);t&&i.processSelector(t)}return i.processSelector(e),t}var sd=class{constructor(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new rd(t)}configure(e){this.defaultSettings=e}doHover(e,t,n,r=this.defaultSettings){function i(t){return K.create(e.positionAt(t.offset),e.positionAt(t.end))}let a=No(n,e.offsetAt(t)),o=null,s;for(let e=0;e<a.length;e++){let t=a[e];if(t instanceof ms&&(s={isMedia:!0,text:t.getText().match(/@media[^\{]+/g)?.[0]}),t instanceof Bo){o={contents:this.selectorPrinting.selectorToMarkedString(t,s),range:i(t)};break}if(t instanceof Vo){L(t.getText(),`@`)||(o={contents:this.selectorPrinting.simpleSelectorToMarkedString(t),range:i(t)});break}if(t instanceof Wo){let e=t.getFullPropertyName(),n=this.cssDataManager.getProperty(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}if(t instanceof Hs){let e=t.getText(),n=this.cssDataManager.getAtDirective(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}if(t instanceof B&&t.type===R.PseudoSelector){let e=t.getText(),n=e.slice(0,2)===`::`?this.cssDataManager.getPseudoElement(e):this.cssDataManager.getPseudoClass(e);if(n){let e=bu(n,this.doesSupportMarkdown(),r);o=e?{contents:e,range:i(t)}:null}continue}}return o&&(o.contents=this.convertContents(o.contents)),o}convertContents(e){return this.doesSupportMarkdown()||typeof e==`string`?e:`kind`in e?{kind:`plaintext`,value:e.value}:Array.isArray(e)?e.map(e=>typeof e==`string`?e:e.value):e.value}doesSupportMarkdown(){if(!cu(this.supportsMarkdown)){if(!cu(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;let e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(Oc.Markdown)!==-1}return this.supportsMarkdown}};let cd=/^\w+:\/\//,ld=/^data:/;var ud=class{constructor(e,t){this.fileSystemProvider=e,this.resolveModuleReferences=t}configure(e){this.defaultSettings=e}findDefinition(e,t,n){let r=new _u(n),i=Mo(n,e.offsetAt(t));if(!i)return null;let a=r.findSymbolFromNode(i);return a?{uri:e.uri,range:fd(a.node,e)}:null}findReferences(e,t,n){return this.findDocumentHighlights(e,t,n).map(t=>({uri:e.uri,range:t.range}))}getHighlightNode(e,t,n){let r=Mo(n,e.offsetAt(t));if(!(!r||r.type===R.Stylesheet||r.type===R.Declarations))return r.type===R.Identifier&&r.parent&&r.parent.type===R.ClassSelector&&(r=r.parent),r}findDocumentHighlights(e,t,n){let r=[],i=this.getHighlightNode(e,t,n);if(!i)return r;let a=new _u(n),o=a.findSymbolFromNode(i),s=i.getText();return n.accept(t=>{if(o){if(a.matchesSymbol(t,o))return r.push({kind:md(t),range:fd(t,e)}),!1}else i&&i.type===t.type&&t.matches(s)&&r.push({kind:md(t),range:fd(t,e)});return!0}),r}isRawStringDocumentLinkNode(e){return e.type===R.Import}findDocumentLinks(e,t,n){let r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){let r=t.link,a=r.target;if(!(!a||ld.test(a)))if(cd.test(a))i.push(r);else{let t=n.resolveReference(a,e.uri);t&&(r.target=t),i.push(r)}}return i}async findDocumentLinks2(e,t,n){let r=this.findUnresolvedLinks(e,t),i=[];for(let t of r){let r=t.link,a=r.target;if(!(!a||ld.test(a)))if(cd.test(a))i.push(r);else{let o=await this.resolveReference(a,e.uri,n,t.isRawLink);o!==void 0&&(r.target=o,i.push(r))}}return i}findUnresolvedLinks(e,t){let n=[],r=t=>{let r=t.getText(),i=fd(t,e);if(i.start.line===i.end.line&&i.start.character===i.end.character)return;(L(r,`'`)||L(r,`"`))&&(r=r.slice(1,-1));let a=t.parent?this.isRawStringDocumentLinkNode(t.parent):!1;n.push({link:{target:r,range:i},isRawLink:a})};return t.accept(e=>{if(e.type===R.URILiteral){let t=e.getChild(0);return t&&r(t),!1}if(e.parent&&this.isRawStringDocumentLinkNode(e.parent)){let t=e.getText();return(L(t,`'`)||L(t,`"`))&&r(e),!1}return!0}),n}findSymbolInformations(e,t){let n=[];return this.collectDocumentSymbols(e,t,(t,r,i)=>{let a=i instanceof B?fd(i,e):i,o={name:t||U(`<undefined>`),kind:r,location:rc.create(e.uri,a)};n.push(o)}),n}findDocumentSymbols(e,t){let n=[],r=[];return this.collectDocumentSymbols(e,t,(t,i,a,o,s)=>{let c=a instanceof B?fd(a,e):a,l=o instanceof B?fd(o,e):o;(!l||!pd(c,l))&&(l=K.create(c.start,c.start));let u={name:t||U(`<undefined>`),kind:i,range:c,selectionRange:l},d=r.pop();for(;d&&!pd(d[1],c);)d=r.pop();if(d){let e=d[0];e.children||=[],e.children.push(u),r.push(d)}else n.push(u);s&&r.push([u,fd(s,e)])}),n}collectDocumentSymbols(e,t,n){t.accept(t=>{if(t instanceof zo){for(let r of t.getSelectors().getChildren())if(r instanceof Bo){let i=K.create(e.positionAt(r.offset),e.positionAt(t.end));n(r.getText(),Uc.Class,i,r,t.getDeclarations())}}else if(t instanceof Ps)n(t.getName(),Uc.Variable,t,t.getVariable(),void 0);else if(t instanceof Vs)n(t.getName(),Uc.Method,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof ns)n(t.getName(),Uc.Function,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof os)n(U(`@keyframes {0}`,t.getName()),Uc.Class,t,t.getIdentifier(),t.getDeclarations());else if(t instanceof is)n(U(`@font-face`),Uc.Class,t,void 0,t.getDeclarations());else if(t instanceof ms){let e=t.getChild(0);e instanceof bs&&n(`@media `+e.getText(),Uc.Module,t,e,t.getDeclarations())}return!0})}findDocumentColors(e,t){let n=[];return t.accept(t=>{let r=dd(t,e);return r&&n.push(r),!0}),n}getColorPresentations(e,t,n,r){let i=[],a=Math.round(n.red*255),o=Math.round(n.green*255),s=Math.round(n.blue*255),c;c=n.alpha===1?`rgb(${a}, ${o}, ${s})`:`rgba(${a}, ${o}, ${s}, ${n.alpha})`,i.push({label:c,textEdit:q.replace(r,c)}),c=n.alpha===1?`#${hd(a)}${hd(o)}${hd(s)}`:`#${hd(a)}${hd(o)}${hd(s)}${hd(Math.round(n.alpha*255))}`,i.push({label:c,textEdit:q.replace(r,c)});let l=Hl(n);c=l.a===1?`hsl(${l.h}, ${Math.round(l.s*100)}%, ${Math.round(l.l*100)}%)`:`hsla(${l.h}, ${Math.round(l.s*100)}%, ${Math.round(l.l*100)}%, ${l.a})`,i.push({label:c,textEdit:q.replace(r,c)});let u=Wl(n);return c=u.a===1?`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,i.push({label:c,textEdit:q.replace(r,c)}),i}prepareRename(e,t,n){let r=this.getHighlightNode(e,t,n);if(r)return K.create(e.positionAt(r.offset),e.positionAt(r.end))}doRename(e,t,n,r){let i=this.findDocumentHighlights(e,t,r).map(e=>q.replace(e.range,n));return{changes:{[e.uri]:i}}}async resolveModuleReference(e,t,n){if(L(t,`file://`)){let r=gd(e);if(r&&r!==`.`&&r!==`..`){let i=n.resolveReference(`/`,t),a=Ou(t),o=await this.resolvePathToModule(r,a,i);if(o)return ku(o,e.substring(r.length+1))}}}async mapReference(e,t){return e}async resolveReference(e,t,n,r=!1,i=this.defaultSettings){if(e[0]===`~`&&e[1]!==`/`&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,t,n),r);let a=await this.mapReference(n.resolveReference(e,t),r);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;let i=await this.mapReference(await this.resolveModuleReference(e,t,n),r);if(i)return i}if(a&&!await this.fileExists(a)){let a=n.resolveReference(`/`,t);if(i&&a){if(e in i)return this.mapReference(ku(a,i[e]),r);let t=e.indexOf(`/`),n=`${e.substring(0,t)}/`;if(n in i){let t=ku(a,i[n].slice(0,-1));return this.mapReference(t=ku(t,e.substring(n.length-1)),r)}}}return a}async resolvePathToModule(e,t,n){let r=ku(t,`node_modules`,e,`package.json`);if(await this.fileExists(r))return Ou(r);if(n&&t.startsWith(n)&&t.length!==n.length)return this.resolvePathToModule(e,Ou(t),n)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{let t=await this.fileSystemProvider.stat(e);return!(t.type===Ol.Unknown&&t.size===-1)}catch{return!1}}};function dd(e,t){let n=Gl(e);return n?{color:n,range:fd(e,t)}:null}function fd(e,t){return K.create(t.positionAt(e.offset),t.positionAt(e.end))}function pd(e,t){let n=t.start.line,r=t.end.line,i=e.start.line,a=e.end.line;return!(n<i||r<i||n>a||r>a||n===i&&t.start.character<e.start.character||r===a&&t.end.character>e.end.character)}function md(e){if(e.type===R.Selector||e instanceof Io&&e.parent&&e.parent instanceof Ko&&e.isCustomProperty)return Vc.Write;if(e.parent)switch(e.parent.type){case R.FunctionDeclaration:case R.MixinDeclaration:case R.Keyframe:case R.VariableDeclaration:case R.FunctionParameter:return Vc.Write}return Vc.Read}function hd(e){let t=e.toString(16);return t.length===2?t:`0`+t}function gd(e){let t=e.indexOf(`/`);if(t===-1)return``;if(e[0]===`@`){let n=e.indexOf(`/`,t+1);return n===-1?e:e.substring(0,n)}return e.substring(0,t)}let _d=qs.Warning,vd=qs.Error,yd=qs.Ignore;var Z=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}},bd=class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}};let Q={AllVendorPrefixes:new Z(`compatibleVendorPrefixes`,U(`When using a vendor-specific prefix make sure to also include all other vendor-specific properties`),yd),IncludeStandardPropertyWhenUsingVendorPrefix:new Z(`vendorPrefix`,U(`When using a vendor-specific prefix also include the standard property`),_d),DuplicateDeclarations:new Z(`duplicateProperties`,U(`Do not use duplicate style definitions`),yd),EmptyRuleSet:new Z(`emptyRules`,U(`Do not use empty rulesets`),_d),ImportStatemement:new Z(`importStatement`,U(`Import statements do not load in parallel`),yd),BewareOfBoxModelSize:new Z(`boxModel`,U(`Do not use width or height when using padding or border`),yd),UniversalSelector:new Z(`universalSelector`,U(`The universal selector (*) is known to be slow`),yd),ZeroWithUnit:new Z(`zeroUnits`,U(`No unit for zero needed`),yd),RequiredPropertiesForFontFace:new Z(`fontFaceProperties`,U(`@font-face rule must define 'src' and 'font-family' properties`),_d),HexColorLength:new Z(`hexColorLength`,U(`Hex colors must consist of three, four, six or eight hex numbers`),vd),ArgsInColorFunction:new Z(`argumentsInColorFunction`,U(`Invalid number of parameters`),vd),UnknownProperty:new Z(`unknownProperties`,U(`Unknown property.`),_d),UnknownAtRules:new Z(`unknownAtRules`,U(`Unknown at-rule.`),_d),IEStarHack:new Z(`ieHack`,U(`IE hacks are only necessary when supporting IE7 and older`),yd),UnknownVendorSpecificProperty:new Z(`unknownVendorSpecificProperties`,U(`Unknown vendor specific property.`),yd),PropertyIgnoredDueToDisplay:new Z(`propertyIgnoredDueToDisplay`,U(`Property is ignored due to the display.`),_d),AvoidImportant:new Z(`important`,U(`Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored.`),yd),AvoidFloat:new Z(`float`,U(`Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes.`),yd),AvoidIdSelector:new Z(`idSelector`,U(`Selectors should not contain IDs because these rules are too tightly coupled with the HTML.`),yd)},xd={ValidProperties:new bd(`validProperties`,U("A list of properties that are not validated against the `unknownProperties` rule."),[])};var Sd=class{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){let t=Cd(this.conf[e.id]);if(t)return t}return e.defaultValue}getSetting(e){return this.conf[e.id]}};function Cd(e){switch(e){case`ignore`:return qs.Ignore;case`warning`:return qs.Warning;case`error`:return qs.Error}return null}var wd=class{constructor(e){this.cssDataManager=e}doCodeActions(e,t,n,r){return this.doCodeActions2(e,t,n,r).map(t=>{let n=t.edit&&t.edit.documentChanges&&t.edit.documentChanges[0];return hc.create(t.title,`_css.applyCodeAction`,e.uri,e.version,n&&n.edits)})}doCodeActions2(e,t,n,r){let i=[];if(n.diagnostics)for(let t of n.diagnostics)this.appendFixesForMarker(e,r,t,i);return i}getFixesForUnknownProperty(e,t,n,r){let i=t.getName(),a=[];this.cssDataManager.getProperties().forEach(e=>{let t=Oo(i,e.name);t>=i.length/2&&a.push({property:e.name,score:t})}),a.sort((e,t)=>t.score-e.score||e.property.localeCompare(t.property));let o=3;for(let t of a){let i=t.property,a=U(`Rename to '{0}'`,i),s=q.replace(n.range,i),c=Tc.create(e.uri,e.version),l={documentChanges:[yc.create(c,[s])]},u=Zc.create(a,l,Jc.QuickFix);if(u.diagnostics=[n],r.push(u),--o<=0)return}}appendFixesForMarker(e,t,n,r){if(n.code!==Q.UnknownProperty.id)return;let i=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end),o=No(t,i);for(let t=o.length-1;t>=0;t--){let s=o[t];if(s instanceof Wo){let t=s.getProperty();if(t&&t.offset===i&&t.end===a){this.getFixesForUnknownProperty(e,t,n,r);return}}}}},Td=class{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}};function Ed(e,t,n,r){let i=e[t];i.value=n,n&&(du(i.properties,r)||i.properties.push(r))}function Dd(e,t,n){Ed(e,`top`,t,n),Ed(e,`right`,t,n),Ed(e,`bottom`,t,n),Ed(e,`left`,t,n)}function $(e,t,n,r){t===`top`||t===`right`||t===`bottom`||t===`left`?Ed(e,t,n,r):Dd(e,n,r)}function Od(e,t,n){switch(t.length){case 1:$(e,void 0,t[0],n);break;case 2:$(e,`top`,t[0],n),$(e,`bottom`,t[0],n),$(e,`right`,t[1],n),$(e,`left`,t[1],n);break;case 3:$(e,`top`,t[0],n),$(e,`right`,t[1],n),$(e,`left`,t[1],n),$(e,`bottom`,t[2],n);break;case 4:$(e,`top`,t[0],n),$(e,`right`,t[1],n),$(e,`bottom`,t[2],n),$(e,`left`,t[3],n);break}}function kd(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function Ad(e,t=!0){return t&&kd(e,[`initial`,`unset`])?!1:parseFloat(e.getText())!==0}function jd(e,t=!0){return e.map(e=>Ad(e,t))}function Md(e,t=!0){return!(kd(e,[`none`,`hidden`])||t&&kd(e,[`initial`,`unset`]))}function Nd(e,t=!0){return e.map(e=>Md(e,t))}function Pd(e){let t=e.getChildren();if(t.length===1){let e=t[0];return Ad(e)&&Md(e)}for(let e of t){let t=e;if(!Ad(t,!1)||!Md(t,!1))return!1}return!0}function Fd(e){let t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(let n of e){let e=n.node.value;if(e!==void 0)switch(n.fullPropertyName){case`box-sizing`:return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case`width`:t.width=n;break;case`height`:t.height=n;break;default:let r=n.fullPropertyName.split(`-`);switch(r[0]){case`border`:switch(r[1]){case void 0:case`top`:case`right`:case`bottom`:case`left`:switch(r[2]){case void 0:$(t,r[1],Pd(e),n);break;case`width`:$(t,r[1],Ad(e,!1),n);break;case`style`:$(t,r[1],Md(e,!0),n);break}break;case`width`:Od(t,jd(e.getChildren(),!1),n);break;case`style`:Od(t,Nd(e.getChildren(),!0),n);break}break;case`padding`:r.length===1?Od(t,jd(e.getChildren(),!0),n):$(t,r[1],Ad(e,!0),n);break}break}}return t}var Id=class{constructor(){this.data={}}add(e,t,n){let r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)}},Ld=class e{static entries(t,n,r,i,a){let o=new e(n,r,i);return t.acceptVisitor(o),o.completeValidations(),o.getEntries(a)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new Id,this.validProperties={};let r=t.getSetting(xd.ValidProperties);Array.isArray(r)&&r.forEach(e=>{if(typeof e==`string`){let t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}})}isValidPropertyDeclaration(e){let t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){let n=[];for(let r of e)r.fullPropertyName===t&&n.push(r);return n}fetchWithValue(e,t,n){let r=[];for(let i of e)if(i.fullPropertyName===t){let e=i.node.getValue();e&&this.findValueInExpression(e,n)&&r.push(i)}return r}findValueInExpression(e,t){let n=!1;return e.accept(e=>(e.type===R.Identifier&&e.matches(t)&&(n=!0),!n)),n}getEntries(e=qs.Warning|qs.Error){return this.warnings.filter(t=>(t.getLevel()&e)!==0)}addEntry(e,t,n){let r=new Js(e,t,this.settings.getRule(t),n);this.warnings.push(r)}getMissingNames(e,t){let n=e.slice(0);for(let e=0;e<t.length;e++){let r=n.indexOf(t[e]);r!==-1&&(n[r]=null)}let r=null;for(let e=0;e<n.length;e++){let t=n[e];t&&(r=r===null?U(`'{0}'`,t):U(`{0}, '{1}'`,r,t))}return r}visitNode(e){switch(e.type){case R.UnknownAtRule:return this.visitUnknownAtRule(e);case R.Keyframe:return this.visitKeyframe(e);case R.FontFace:return this.visitFontFace(e);case R.Ruleset:return this.visitRuleSet(e);case R.SimpleSelector:return this.visitSimpleSelector(e);case R.Function:return this.visitFunction(e);case R.NumericValue:return this.visitNumericValue(e);case R.Import:return this.visitImport(e);case R.HexColorValue:return this.visitHexColorValue(e);case R.Prio:return this.visitPrio(e);case R.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){let t=e.getChild(0);return!t||this.cssDataManager.getAtDirective(t.getText())?!1:(this.addEntry(t,Q.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){let t=e.getKeyword();if(!t)return!1;let n=t.getText();return this.keyframes.add(e.getName(),n,n===`@keyframes`?null:t),!0}validateKeyframes(){let e=[`@-webkit-keyframes`,`@-moz-keyframes`,`@-o-keyframes`];for(let t in this.keyframes.data){let n=this.keyframes.data[t].names,r=n.indexOf(`@keyframes`)===-1;if(!r&&n.length===1)continue;let i=this.getMissingNames(e,n);if(i||r)for(let e of this.keyframes.data[t].nodes){if(r){let t=U(`Always define standard rule '@keyframes' when defining keyframes.`);this.addEntry(e,Q.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(i){let t=U(`Always include all vendor specific rules: Missing: {0}`,i);this.addEntry(e,Q.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){let t=this.documentText.charAt(e.offset);return e.length===1&&t===`*`&&this.addEntry(e,Q.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,Q.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,Q.ImportStatemement),!0}visitRuleSet(t){let n=t.getDeclarations();if(!n)return!1;n.hasChildren()||this.addEntry(t.getSelectors(),Q.EmptyRuleSet);let r=[];for(let e of n.getChildren())e instanceof Wo&&r.push(new Td(e));let i=Fd(r);if(i.width){let e=[];if(i.right.value&&(e=fu(e,i.right.properties)),i.left.value&&(e=fu(e,i.left.properties)),e.length!==0){for(let t of e)this.addEntry(t.node,Q.BewareOfBoxModelSize);this.addEntry(i.width.node,Q.BewareOfBoxModelSize)}}if(i.height){let e=[];if(i.top.value&&(e=fu(e,i.top.properties)),i.bottom.value&&(e=fu(e,i.bottom.properties)),e.length!==0){for(let t of e)this.addEntry(t.node,Q.BewareOfBoxModelSize);this.addEntry(i.height.node,Q.BewareOfBoxModelSize)}}let a=this.fetchWithValue(r,`display`,`inline-block`);if(a.length>0){let e=this.fetch(r,`float`);for(let t=0;t<e.length;t++){let n=e[t].node,r=n.getValue();r&&!r.matches(`none`)&&this.addEntry(n,Q.PropertyIgnoredDueToDisplay,U(`inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'`))}}if(a=this.fetchWithValue(r,`display`,`block`),a.length>0){let e=this.fetch(r,`vertical-align`);for(let t=0;t<e.length;t++)this.addEntry(e[t].node,Q.PropertyIgnoredDueToDisplay,U(`Property is ignored due to the display. With 'display: block', vertical-align should not be used.`))}let o=this.fetch(r,`float`);for(let e=0;e<o.length;e++){let t=o[e];this.isValidPropertyDeclaration(t)||this.addEntry(t.node,Q.AvoidFloat)}for(let e=0;e<r.length;e++){let t=r[e];if(t.fullPropertyName!==`background`&&!this.validProperties[t.fullPropertyName]){let e=t.node.getValue();if(e&&this.documentText.charAt(e.offset)!==`-`){let e=this.fetch(r,t.fullPropertyName);if(e.length>1)for(let n=0;n<e.length;n++){let r=e[n].node.getValue();r&&this.documentText.charAt(r.offset)!==`-`&&e[n]!==t&&this.addEntry(t.node,Q.DuplicateDeclarations)}}}}if(!t.getSelectors().matches(`:export`)){let n=new Id,i=!1;for(let e of r){let t=e.node;if(this.isCSSDeclaration(t)){let r=e.fullPropertyName,i=r.charAt(0);if(i===`-`){if(r.charAt(1)!==`-`){!this.cssDataManager.isKnownProperty(r)&&!this.validProperties[r]&&this.addEntry(t.getProperty(),Q.UnknownVendorSpecificProperty);let e=t.getNonPrefixedPropertyName();n.add(e,r,t.getProperty())}}else{let e=r;(i===`*`||i===`_`)&&(this.addEntry(t.getProperty(),Q.IEStarHack),r=r.substr(1)),!this.cssDataManager.isKnownProperty(e)&&!this.cssDataManager.isKnownProperty(r)&&(this.validProperties[r]||this.addEntry(t.getProperty(),Q.UnknownProperty,U(`Unknown property: '{0}'`,t.getFullPropertyName()))),n.add(r,r,null)}}else i=!0}if(!i)for(let r in n.data){let i=n.data[r],a=i.names,o=this.cssDataManager.isStandardProperty(r)&&a.indexOf(r)===-1;if(!o&&a.length===1)continue;let s=new Set(o?i.nodes:[]);if(o){let e=this.getContextualVendorSpecificPseudoElements(t);for(let t of i.nodes){let n=t.getName(),i=n.substring(0,n.length-r.length);e.some(e=>e.startsWith(i))&&s.delete(t)}}let c=[];for(let t=0,n=e.prefixes.length;t<n;t++){let n=e.prefixes[t];this.cssDataManager.isStandardProperty(n+r)&&c.push(n+r)}let l=this.getMissingNames(c,a);if(l||o)for(let e of i.nodes){if(o&&s.has(e)){let t=U(`Also define the standard property '{0}' for compatibility`,r);this.addEntry(e,Q.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(l){let t=U(`Always include all vendor specific properties: Missing: {0}`,l);this.addEntry(e,Q.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){function t(e,n){for(let r of n.getChildren()){if(r.type===R.PseudoSelector){let t=r.getChildren()[0]?.getText();t&&e.add(t)}t(e,r)}}function n(e,r){if(r.type===R.Ruleset)for(let n of r.getSelectors().getChildren())t(e,n);return r.parent?n(e,r.parent):void 0}let r=new Set;return n(r,e),Array.from(r)}visitPrio(e){return this.addEntry(e,Q.AvoidImportant),!0}visitNumericValue(e){let t=e.findParent(R.Function);if(t&&t.getName()===`calc`)return!0;let n=e.findParent(R.Declaration);if(n&&n.getValue()){let t=e.getValue();if(!t.unit||ru.length.indexOf(t.unit.toLowerCase())===-1)return!0;parseFloat(t.value)===0&&t.unit&&!this.validProperties[n.getFullPropertyName()]&&this.addEntry(e,Q.ZeroWithUnit)}return!0}visitFontFace(e){let t=e.getDeclarations();if(!t)return!1;let n=!1,r=!1,i=!1;for(let e of t.getChildren())if(this.isCSSDeclaration(e)){let t=e.getProperty().getName().toLowerCase();t===`src`&&(n=!0),t===`font-family`&&(r=!0)}else i=!0;return!i&&(!n||!r)&&this.addEntry(e,Q.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof Wo){if(!e.getValue())return!1;let t=e.getProperty();if(!t)return!1;let n=t.getIdentifier();return!(!n||n.containsInterpolation())}return!1}visitHexColorValue(e){let t=e.length;return t!==9&&t!==7&&t!==5&&t!==4&&this.addEntry(e,Q.HexColorLength),!1}visitFunction(e){let t=e.getName().toLowerCase(),n=-1,r=0;switch(t){case`rgb(`:case`hsl(`:n=3;break;case`rgba(`:case`hsla(`:n=4;break}return n!==-1&&(e.getArguments().accept(e=>e instanceof Os?(r+=1,!1):!0),r!==n&&this.addEntry(e,Q.ArgsInColorFunction)),!0}};Ld.prefixes=[`-ms-`,`-moz-`,`-o-`,`-webkit-`];var Rd=class{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,t,n=this.settings){if(n&&n.validate===!1)return[];let r=[];r.push.apply(r,Ys.entries(t)),r.push.apply(r,Ld.entries(t,e,new Sd(n&&n.lint),this.cssDataManager));let i=[];for(let e in Q)i.push(Q[e].id);function a(t){let n=K.create(e.positionAt(t.getOffset()),e.positionAt(t.getOffset()+t.getLength())),r=e.languageId;return{code:t.getRule().id,source:r,message:t.getMessage(),severity:t.getLevel()===qs.Warning?dc.Warning:dc.Error,range:n}}return r.filter(e=>e.getLevel()!==qs.Ignore).map(a)}};let zd=F.CustomToken,Bd=zd++,Vd=zd++;zd++;let Hd=zd++,Ud=zd++,Wd=zd++,Gd=zd++,Kd=zd++;zd++;var qd=class extends Eo{scanNext(e){if(this.stream.advanceIfChar(36)){let t=[`$`];if(this.ident(t))return this.finishToken(e,Bd,t.join(``));this.stream.goBackTo(e)}return this.stream.advanceIfChars([35,123])?this.finishToken(e,Vd):this.stream.advanceIfChars([61,61])?this.finishToken(e,Hd):this.stream.advanceIfChars([33,61])?this.finishToken(e,Ud):this.stream.advanceIfChar(60)?this.stream.advanceIfChar(61)?this.finishToken(e,Gd):this.finishToken(e,F.Delim):this.stream.advanceIfChar(62)?this.stream.advanceIfChar(61)?this.finishToken(e,Wd):this.finishToken(e,F.Delim):this.stream.advanceIfChars([46,46,46])?this.finishToken(e,Kd):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([47,47])?(this.stream.advanceWhileChar(e=>{switch(e){case 10:case 13:case 12:return!1;default:return!0}}),!0):!1}},Jd=class{constructor(e,t){this.id=e,this.message=t}};let Yd={FromExpected:new Jd(`scss-fromexpected`,U(`'from' expected`)),ThroughOrToExpected:new Jd(`scss-throughexpected`,U(`'through' or 'to' expected`)),InExpected:new Jd(`scss-fromexpected`,U(`'in' expected`))};var Xd=class extends lu{constructor(){super(new qd)}_parseStylesheetStatement(e=!1){return this.peek(F.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword(`@import`))return null;let e=this.create(cs);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,G.URIOrStringExpected);for(;this.accept(F.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,G.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Bd))return null;let t=this.create(Ps);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(F.Colon))return this.finish(t,G.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,G.VariableValueExpected,[],e);for(;this.peek(F.Exclamation);)if(!t.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(F.Ident,/^(default|global)$/))return this.finish(t,G.UnknownKeyword);this.consumeToken()}return this.peek(F.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Gd)||this.accept(Wd)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Bd))return null;let e=this.create(Is);return this.consumeToken(),e}_parseModuleMember(){let e=this.mark(),t=this.create(Ks);return t.setIdentifier(this._parseIdent([z.Module]))?this.hasWhitespace()||!this.acceptDelim(`.`)||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,G.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(F.Ident)&&!this.peek(Vd)&&!this.peekDelim(`-`))return null;let t=this.create(Io);t.referenceTypes=e,t.isCustomProperty=this.peekRegExp(F.Ident,/^--/);let n=!1,r=()=>{let e=this.mark();return this.acceptDelim(`-`)&&(this.hasWhitespace()||this.acceptDelim(`-`),this.hasWhitespace())?(this.restoreAtMark(e),null):this._parseInterpolation()};for(;(this.accept(F.Ident)||t.addChild(r())||n&&this.acceptRegexp(/^[\w-]/))&&(n=!0,!this.hasWhitespace()););return n?this.finish(t):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Vd)){let e=this.create(Fs);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(F.CurlyR)?this.finish(e):this.finish(e,G.ExpressionExpected):this.accept(F.CurlyR)?this.finish(e):this.finish(e,G.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Hd)||this.peek(Ud)||this.peek(Wd)||this.peek(Gd)||this.peekDelim(`>`)||this.peekDelim(`<`)||this.peekIdent(`and`)||this.peekIdent(`or`)||this.peekDelim(`%`)){let e=this.createNode(R.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent(`not`)){let e=this.create(B);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(F.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){let t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;let n=this.create(Wo);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(F.Colon))return this.finish(n,G.ColonExpected,[F.Colon],e||[F.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);let r=!1;if(n.setValue(this._parseExpr())&&(r=!0,n.addChild(this._parsePrio())),this.peek(F.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!r)return this.finish(n,G.PropertyValueExpected);return this.peek(F.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseNestedProperties(){let e=this.create(as);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword(`@extend`)){let e=this.create(Ls);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,G.SelectorExpected);for(;this.accept(F.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(F.Exclamation)&&!this.acceptIdent(`optional`)?this.finish(e,G.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim(`&`)){let e=this.createNode(R.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim(`-`)||this.accept(F.Num)||this.accept(F.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim(`&`)););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim(`%`)){let e=this.createNode(R.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword(`@at-root`)){let e=this.createNode(R.SelectorPlaceholder);if(this.consumeToken(),this.accept(F.ParenthesisL)){if(!this.acceptIdent(`with`)&&!this.acceptIdent(`without`))return this.finish(e,G.IdentifierExpected);if(!this.accept(F.Colon))return this.finish(e,G.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,G.IdentifierExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}return this.finish(e)}return null}_parseElementName(){let e=this.mark(),t=super._parseElementName();return t&&!this.hasWhitespace()&&this.peek(F.ParenthesisL)?(this.restoreAtMark(e),null):t}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword(`@debug`)&&!this.peekKeyword(`@warn`)&&!this.peekKeyword(`@error`))return null;let e=this.createNode(R.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(F.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword(`@if`)?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){let t=this.create(Zo);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,G.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword(`@else`)){if(this.peekIdent(`if`))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(F.CurlyL)){let n=this.create(ts);this._parseBody(n,e),t.setElseClause(n)}}return this.finish(t)}_parseForStatement(e){if(!this.peekKeyword(`@for`))return null;let t=this.create(Qo);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent(`from`)?t.addChild(this._parseBinaryExpr())?!this.acceptIdent(`to`)&&!this.acceptIdent(`through`)?this.finish(t,Yd.ThroughOrToExpected,[F.CurlyR]):t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,Yd.FromExpected,[F.CurlyR]):this.finish(t,G.VariableNameExpected,[F.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword(`@each`))return null;let t=this.create($o);this.consumeToken();let n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,G.VariableNameExpected,[F.CurlyR]);for(;this.accept(F.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,G.VariableNameExpected,[F.CurlyR]);return this.finish(n),this.acceptIdent(`in`)?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.CurlyR]):this.finish(t,Yd.InExpected,[F.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword(`@while`))return null;let t=this.create(es);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,G.ExpressionExpected,[F.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword(`@function`))return null;let e=this.create(ns);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Function])))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}return this.accept(F.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword(`@return`))return null;let e=this.createNode(R.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,G.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword(`@mixin`))return null;let e=this.create(Vs);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([z.Mixin])))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(this.accept(F.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){let e=this.create(Yo);return e.setIdentifier(this._parseVariable())?(this.accept(Kd),this.accept(F.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,G.VariableValueExpected,[],[F.Comma,F.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword(`@content`))return null;let e=this.create(Rs);if(this.consumeToken(),this.accept(F.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,G.ExpressionExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword(`@include`))return null;let e=this.create(Bs);this.consumeToken();let t=this._parseIdent([z.Mixin]);if(!e.setIdentifier(t))return this.finish(e,G.IdentifierExpected,[F.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(`.`)&&!this.hasWhitespace()){let n=this._parseIdent([z.Mixin]);if(!n)return this.finish(e,G.IdentifierExpected,[F.CurlyR]);let r=this.create(Ks);t.referenceTypes=[z.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(F.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,G.ExpressionExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}return(this.peekIdent(`using`)||this.peek(F.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){let e=this.create(zs);if(this.acceptIdent(`using`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,G.VariableNameExpected)}if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.CurlyL])}return this.peek(F.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){let e=this.create(Xo),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(F.Colon))e.setIdentifier(n);else{if(this.accept(Kd))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Kd),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){let e=this.mark(),t=super._parseURLArgument();if(!t||!this.peek(F.ParenthesisR)){this.restoreAtMark(e);let t=this.create(B);return t.addChild(this._parseBinaryExpr()),this.finish(t)}return t}_parseOperation(){if(!this.peek(F.ParenthesisL))return null;let e=this.create(B);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(F.Comma);return this.accept(F.ParenthesisR)?this.finish(e):this.finish(e,G.RightParenthesisExpected)}_parseListElement(){let e=this.create(Us),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(F.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,G.ExpressionExpected)}else e.setValue(t);return this.finish(e)}_parseUse(){if(!this.peekKeyword(`@use`))return null;let e=this.create(ls);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,G.StringLiteralExpected);if(!this.peek(F.SemiColon)&&!this.peek(F.EOF)){if(!this.peekRegExp(F.Ident,/as|with/))return this.finish(e,G.UnknownKeyword);if(this.acceptIdent(`as`)&&!e.setIdentifier(this._parseIdent([z.Module]))&&!this.acceptDelim(`*`))return this.finish(e,G.IdentifierOrWildcardExpected);if(this.acceptIdent(`with`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}}return!this.accept(F.SemiColon)&&!this.accept(F.EOF)?this.finish(e,G.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){let e=this.create(us);return e.setIdentifier(this._parseVariable())?!this.accept(F.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,G.VariableValueExpected,[],[F.Comma,F.ParenthesisR]):this.accept(F.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent(`default`))?this.finish(e,G.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword(`@forward`))return null;let e=this.create(ds);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,G.StringLiteralExpected);if(this.acceptIdent(`as`)){let t=this._parseIdent([z.Forward]);if(!e.setIdentifier(t))return this.finish(e,G.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim(`*`))return this.finish(e,G.WildcardExpected)}if(this.acceptIdent(`with`)){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[F.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,G.VariableNameExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}else if((this.peekIdent(`hide`)||this.peekIdent(`show`))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,G.IdentifierOrVariableExpected);return!this.accept(F.SemiColon)&&!this.accept(F.EOF)?this.finish(e,G.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){let e=this.create(fs);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(F.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}};let Zd=U(`Sass documentation`);var Qd=class e extends Vu{constructor(t,n){super(`$`,t,n),$d(e.scssModuleLoaders),$d(e.scssModuleBuiltIns)}isImportPathParent(e){return e===R.Forward||e===R.Use||super.isImportPathParent(e)}getCompletionForImportPath(t,n){let r=t.getParent().type;if(r===R.Forward||r===R.Use)for(let r of e.scssModuleBuiltIns){let e={label:r.label,documentation:r.documentation,textEdit:q.replace(this.getCompletionRange(t),`'${r.label}'`),kind:J.Module};n.items.push(e)}return super.getCompletionForImportPath(t,n)}createReplaceFunction(){let t=1;return(n,r)=>`\\`+r+": ${"+ t+++`:`+(e.variableDefaults[r]||``)+`}`}createFunctionProposals(e,t,n,r){for(let i of e){let e=i.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),a={label:i.func.substr(0,i.func.indexOf(`(`)),detail:i.func,documentation:i.desc,textEdit:q.replace(this.getCompletionRange(t),e),insertTextFormat:Ac.Snippet,kind:J.Function};n&&(a.sortText=`z`),r.items.push(a)}return r}getCompletionsForSelector(t,n,r){return this.createFunctionProposals(e.selectorFuncs,null,!0,r),super.getCompletionsForSelector(t,n,r)}getTermProposals(t,n,r){let i=e.builtInFuncs;return t&&(i=i.filter(e=>!e.type||!t.restrictions||t.restrictions.indexOf(e.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(t,n,r)}getColorProposals(t,n,r){return this.createFunctionProposals(e.colorProposals,n,!1,r),super.getColorProposals(t,n,r)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,z.Rule);for(let e of r){let r={label:e.name,textEdit:q.replace(this.getCompletionRange(t),e.name),kind:J.Function};n.items.push(r)}return n}getCompletionForAtDirectives(t){return t.items.push(...e.scssAtDirectives),t}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(t){return t.items.push(...e.scssModuleLoaders),t}};Qd.variableDefaults={$red:`1`,$green:`2`,$blue:`3`,$alpha:`1.0`,$color:`#000000`,$weight:`0.5`,$hue:`0`,$saturation:`0%`,$lightness:`0%`,$degrees:`0`,$amount:`0`,$string:`""`,$substring:`"s"`,$number:`0`,$limit:`1`},Qd.colorProposals=[{func:`red($color)`,desc:U(`Gets the red component of a color.`)},{func:`green($color)`,desc:U(`Gets the green component of a color.`)},{func:`blue($color)`,desc:U(`Gets the blue component of a color.`)},{func:`mix($color, $color, [$weight])`,desc:U(`Mixes two colors together.`)},{func:`hue($color)`,desc:U(`Gets the hue component of a color.`)},{func:`saturation($color)`,desc:U(`Gets the saturation component of a color.`)},{func:`lightness($color)`,desc:U(`Gets the lightness component of a color.`)},{func:`adjust-hue($color, $degrees)`,desc:U(`Changes the hue of a color.`)},{func:`lighten($color, $amount)`,desc:U(`Makes a color lighter.`)},{func:`darken($color, $amount)`,desc:U(`Makes a color darker.`)},{func:`saturate($color, $amount)`,desc:U(`Makes a color more saturated.`)},{func:`desaturate($color, $amount)`,desc:U(`Makes a color less saturated.`)},{func:`grayscale($color)`,desc:U(`Converts a color to grayscale.`)},{func:`complement($color)`,desc:U(`Returns the complement of a color.`)},{func:`invert($color)`,desc:U(`Returns the inverse of a color.`)},{func:`alpha($color)`,desc:U(`Gets the opacity component of a color.`)},{func:`opacity($color)`,desc:`Gets the alpha component (opacity) of a color.`},{func:`rgba($color, $alpha)`,desc:U(`Changes the alpha component for a color.`)},{func:`opacify($color, $amount)`,desc:U(`Makes a color more opaque.`)},{func:`fade-in($color, $amount)`,desc:U(`Makes a color more opaque.`)},{func:`transparentize($color, $amount)`,desc:U(`Makes a color more transparent.`)},{func:`fade-out($color, $amount)`,desc:U(`Makes a color more transparent.`)},{func:`adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])`,desc:U(`Increases or decreases one or more components of a color.`)},{func:`scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])`,desc:U(`Fluidly scales one or more properties of a color.`)},{func:`change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])`,desc:U(`Changes one or more properties of a color.`)},{func:`ie-hex-str($color)`,desc:U(`Converts a color into the format understood by IE filters.`)}],Qd.selectorFuncs=[{func:`selector-nest($selectors…)`,desc:U(`Nests selector beneath one another like they would be nested in the stylesheet.`)},{func:`selector-append($selectors…)`,desc:U(`Appends selectors to one another without spaces in between.`)},{func:`selector-extend($selector, $extendee, $extender)`,desc:U(`Extends $extendee with $extender within $selector.`)},{func:`selector-replace($selector, $original, $replacement)`,desc:U(`Replaces $original with $replacement within $selector.`)},{func:`selector-unify($selector1, $selector2)`,desc:U(`Unifies two selectors to produce a selector that matches elements matched by both.`)},{func:`is-superselector($super, $sub)`,desc:U(`Returns whether $super matches all the elements $sub does, and possibly more.`)},{func:`simple-selectors($selector)`,desc:U(`Returns the simple selectors that comprise a compound selector.`)},{func:`selector-parse($selector)`,desc:U(`Parses a selector into the format returned by &.`)}],Qd.builtInFuncs=[{func:`unquote($string)`,desc:U(`Removes quotes from a string.`)},{func:`quote($string)`,desc:U(`Adds quotes to a string.`)},{func:`str-length($string)`,desc:U(`Returns the number of characters in a string.`)},{func:`str-insert($string, $insert, $index)`,desc:U(`Inserts $insert into $string at $index.`)},{func:`str-index($string, $substring)`,desc:U(`Returns the index of the first occurance of $substring in $string.`)},{func:`str-slice($string, $start-at, [$end-at])`,desc:U(`Extracts a substring from $string.`)},{func:`to-upper-case($string)`,desc:U(`Converts a string to upper case.`)},{func:`to-lower-case($string)`,desc:U(`Converts a string to lower case.`)},{func:`percentage($number)`,desc:U(`Converts a unitless number to a percentage.`),type:`percentage`},{func:`round($number)`,desc:U(`Rounds a number to the nearest whole number.`)},{func:`ceil($number)`,desc:U(`Rounds a number up to the next whole number.`)},{func:`floor($number)`,desc:U(`Rounds a number down to the previous whole number.`)},{func:`abs($number)`,desc:U(`Returns the absolute value of a number.`)},{func:`min($numbers)`,desc:U(`Finds the minimum of several numbers.`)},{func:`max($numbers)`,desc:U(`Finds the maximum of several numbers.`)},{func:`random([$limit])`,desc:U(`Returns a random number.`)},{func:`length($list)`,desc:U(`Returns the length of a list.`)},{func:`nth($list, $n)`,desc:U(`Returns a specific item in a list.`)},{func:`set-nth($list, $n, $value)`,desc:U(`Replaces the nth item in a list.`)},{func:`join($list1, $list2, [$separator])`,desc:U(`Joins together two lists into one.`)},{func:`append($list1, $val, [$separator])`,desc:U(`Appends a single value onto the end of a list.`)},{func:`zip($lists)`,desc:U(`Combines several lists into a single multidimensional list.`)},{func:`index($list, $value)`,desc:U(`Returns the position of a value within a list.`)},{func:`list-separator(#list)`,desc:U(`Returns the separator of a list.`)},{func:`map-get($map, $key)`,desc:U(`Returns the value in a map associated with a given key.`)},{func:`map-merge($map1, $map2)`,desc:U(`Merges two maps together into a new map.`)},{func:`map-remove($map, $keys)`,desc:U(`Returns a new map with keys removed.`)},{func:`map-keys($map)`,desc:U(`Returns a list of all keys in a map.`)},{func:`map-values($map)`,desc:U(`Returns a list of all values in a map.`)},{func:`map-has-key($map, $key)`,desc:U(`Returns whether a map has a value associated with a given key.`)},{func:`keywords($args)`,desc:U(`Returns the keywords passed to a function that takes variable arguments.`)},{func:`feature-exists($feature)`,desc:U(`Returns whether a feature exists in the current Sass runtime.`)},{func:`variable-exists($name)`,desc:U(`Returns whether a variable with the given name exists in the current scope.`)},{func:`global-variable-exists($name)`,desc:U(`Returns whether a variable with the given name exists in the global scope.`)},{func:`function-exists($name)`,desc:U(`Returns whether a function with the given name exists.`)},{func:`mixin-exists($name)`,desc:U(`Returns whether a mixin with the given name exists.`)},{func:`inspect($value)`,desc:U(`Returns the string representation of a value as it would be represented in Sass.`)},{func:`type-of($value)`,desc:U(`Returns the type of a value.`)},{func:`unit($number)`,desc:U(`Returns the unit(s) associated with a number.`)},{func:`unitless($number)`,desc:U(`Returns whether a number has units.`)},{func:`comparable($number1, $number2)`,desc:U(`Returns whether two numbers can be added, subtracted, or compared.`)},{func:`call($name, $args…)`,desc:U(`Dynamically calls a Sass function.`)}],Qd.scssAtDirectives=[{label:`@extend`,documentation:U(`Inherits the styles of another selector.`),kind:J.Keyword},{label:`@at-root`,documentation:U(`Causes one or more rules to be emitted at the root of the document.`),kind:J.Keyword},{label:`@debug`,documentation:U(`Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files.`),kind:J.Keyword},{label:`@warn`,documentation:U("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:J.Keyword},{label:`@error`,documentation:U(`Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions.`),kind:J.Keyword},{label:`@if`,documentation:U("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} {
@@ -67,7 +67,7 @@ You passed in: '`+this.raw_options[e]+`'`);return r},t.prototype._is_valid_selec
67
67
  `,indent_scripts:$(n,`indentScripts`,`normal`),templating:Lc(n,`all`),unformatted_content_delimiter:$(n,`unformattedContentDelimiter`,``)},c=Nc(Fc(r),s);if(a>0){let e=n.insertSpaces?sc(` `,o*a):sc(` `,a);c=c.split(`
68
68
  `).join(`
69
69
  `+e),t.start.character===0&&(c=e+c)}return[{range:t,newText:c}]}function Fc(e){return e.replace(/^\s+/,``)}function $(e,t,n){if(e&&e.hasOwnProperty(t)){let n=e[t];if(n!==null)return n}return n}function Ic(e,t,n){let r=$(e,t,null);return typeof r==`string`?r.length>0?r.split(`,`).map(e=>e.trim().toLowerCase()):[]:n}function Lc(e,t){let n=$(e,`templating`,t);return n===!0?[`auto`]:n===!1||n===t||Array.isArray(n)===!1?[`none`]:n}function Rc(e,t,n){let r=t,i=0,a=n.tabSize||4;for(;r<e.length;){let t=e.charAt(r);if(t===` `)i++;else if(t===` `)i+=a;else break;r++}return Math.floor(i/a)}function zc(e,t){return`\r
70
- `.indexOf(e.charAt(t))!==-1}function Bc(e,t){return` `.indexOf(e.charAt(t))!==-1}var Vc;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Vc=r})();let{URI:Hc,Utils:Uc}=Vc;function Wc(e){let t=e[0];return t===e[e.length-1]&&(t===`'`||t===`"`)&&(e=e.substring(1,e.length-1)),e}function Gc(e,t){return!e.length||t===`handlebars`&&/{{|}}/.test(e)?!1:/\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(e)}function Kc(e,t,n,r){if(/^\s*javascript\:/i.test(t)||/[\n\r]/.test(t))return;t=t.replace(/^\s*/g,``);let i=t.match(/^(\w[\w\d+.-]*):/);if(i){let e=i[1].toLowerCase();return e===`http`||e===`https`||e===`file`?t:void 0}return/^\#/i.test(t)?e+t:/^\/\//i.test(t)?(ac(e,`https://`)?`https`:`http`)+`:`+t.replace(/^\s*/g,``):n?n.resolveReference(t,r||e):t}function qc(e,t,n,r,i,a){let o=Wc(n);if(!Gc(o,e.languageId))return;o.length<n.length&&(r++,i--);let s=Kc(e.uri,o,t,a);if(!s)return;let c=Jc(s,e);return{range:G.create(e.positionAt(r),e.positionAt(i)),target:c}}function Jc(e,t){try{let n=Hc.parse(e);return n.scheme===`file`&&n.query&&(n=n.with({query:null}),e=n.toString(!0)),n.scheme===`file`&&n.fragment&&!(e.startsWith(t.uri)&&e.charCodeAt(t.uri.length)===35)?n.with({fragment:null}).toString(!0):e}catch{return}}var Yc=class{constructor(e){this.dataManager=e}findDocumentLinks(e,t){let n=[],r=Q(e.getText(),0),i=r.scan(),a,o,s=!1,c,l={};for(;i!==X.EOS;){switch(i){case X.StartTag:o=r.getTokenText().toLowerCase(),c||(s=o===`base`);break;case X.AttributeName:a=r.getTokenText().toLowerCase();break;case X.AttributeValue:if(o&&a&&this.dataManager.isPathAttribute(o,a)){let i=r.getTokenText();if(!s){let a=qc(e,t,i,r.getTokenOffset(),r.getTokenEnd(),c);a&&n.push(a)}s&&c===void 0&&(c=Wc(i),c&&t&&(c=t.resolveReference(c,e.uri))),s=!1,a=void 0}else if(a===`id`){let e=Wc(r.getTokenText());l[e]=r.getTokenOffset()}break}i=r.scan()}for(let t of n){let n=e.uri+`#`;if(t.target&&ac(t.target,n)){let r=l[t.target.substring(n.length)];if(r!==void 0){let i=e.positionAt(r);t.target=`${n}${i.line+1},${i.character+1}`}else t.target=e.uri}}return n}};function Xc(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag)return[];let a=[],o=$c(X.StartTag,e,i.start),s=typeof i.endTagStart==`number`&&$c(X.EndTag,e,i.endTagStart);return(o&&Qc(o,t)||s&&Qc(s,t))&&(o&&a.push({kind:as.Read,range:o}),s&&a.push({kind:as.Read,range:s})),a}function Zc(e,t){return e.line<t.line||e.line===t.line&&e.character<=t.character}function Qc(e,t){return Zc(e.start,t)&&Zc(t,e.end)}function $c(e,t,n){let r=Q(t.getText(),n),i=r.scan();for(;i!==X.EOS&&i!==e;)i=r.scan();return i===X.EOS?null:{start:t.positionAt(r.getTokenOffset()),end:t.positionAt(r.getTokenEnd())}}function el(e,t){let n=[],r=tl(e,t);for(let e of r)i(e,void 0);return n;function i(t,r){let a=ls.create(t.name,t.kind,t.range,e.uri,r?.name);if(a.containerName??=``,n.push(a),t.children)for(let e of t.children)i(e,t)}}function tl(e,t){let n=[];return t.roots.forEach(t=>{nl(e,t,n)}),n}function nl(e,t,n){let r=rl(t),i=G.create(e.positionAt(t.start),e.positionAt(t.end)),a=ds.create(r,void 0,ss.Field,i,i);n.push(a),t.children.forEach(t=>{a.children??=[],nl(e,t,a.children)})}function rl(e){let t=e.tag;if(e.attributes){let n=e.attributes.id,r=e.attributes.class;n&&(t+=`#${n.replace(/[\"\']/g,``)}`),r&&(t+=r.replace(/[\"\']/g,``).split(/\s+/).map(e=>`.${e}`).join(``))}return t||`?`}function il(e,t,n,r){let i=e.offsetAt(t),a=r.findNodeAt(i);if(!a.tag||!al(a,i,a.tag))return null;let o=[],s={start:e.positionAt(a.start+1),end:e.positionAt(a.start+1+a.tag.length)};if(o.push({range:s,newText:n}),a.endTagStart){let t={start:e.positionAt(a.endTagStart+2),end:e.positionAt(a.endTagStart+2+a.tag.length)};o.push({range:t,newText:n})}return{changes:{[e.uri.toString()]:o}}}function al(e,t,n){return e.endTagStart&&e.endTagStart+2<=t&&t<=e.endTagStart+2+n.length?!0:e.start+1<=t&&t<=e.start+1+n.length}function ol(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag||!i.endTagStart)return null;if(i.start+1<=r&&r<=i.start+1+i.tag.length){let t=r-1-i.start+i.endTagStart+2;return e.positionAt(t)}if(i.endTagStart+2<=r&&r<=i.endTagStart+2+i.tag.length){let t=r-2-i.endTagStart+i.start+1;return e.positionAt(t)}return null}function sl(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=i.tag?i.tag.length:0;return i.endTagStart&&(i.start+1<=r&&r<=i.start+1+a||i.endTagStart+2<=r&&r<=i.endTagStart+2+a)?[G.create(e.positionAt(i.start+1),e.positionAt(i.start+1+a)),G.create(e.positionAt(i.endTagStart+2),e.positionAt(i.endTagStart+2+a))]:null}var cl=class{constructor(e){this.dataManager=e}limitRanges(e,t){e=e.sort((e,t)=>{let n=e.startLine-t.startLine;return n===0&&(n=e.endLine-t.endLine),n});let n,r=[],i=[],a=[],o=(e,t)=>{i[e]=t,t<30&&(a[t]=(a[t]||0)+1)};for(let t=0;t<e.length;t++){let i=e[t];if(!n)n=i,o(t,0);else if(i.startLine>n.startLine){if(i.endLine<=n.endLine)r.push(n),n=i,o(t,r.length);else if(i.startLine>n.endLine){do n=r.pop();while(n&&i.startLine>n.endLine);n&&r.push(n),n=i,o(t,r.length)}}}let s=0,c=0;for(let e=0;e<a.length;e++){let n=a[e];if(n){if(n+s>t){c=e;break}s+=n}}let l=[];for(let n=0;n<e.length;n++){let r=i[n];typeof r==`number`&&(r<c||r===c&&s++<t)&&l.push(e[n])}return l}getFoldingRanges(e,t){let n=this.dataManager.getVoidElements(e.languageId),r=Q(e.getText()),i=r.scan(),a=[],o=[],s=null,c=-1;function l(e){a.push(e),c=e.startLine}for(;i!==X.EOS;){switch(i){case X.StartTag:{let t=r.getTokenText(),n=e.positionAt(r.getTokenOffset()).line;o.push({startLine:n,tagName:t}),s=t;break}case X.EndTag:s=r.getTokenText();break;case X.StartTagClose:if(!s||!this.dataManager.isVoidElement(s,n))break;case X.EndTagClose:case X.StartTagSelfClose:{let t=o.length-1;for(;t>=0&&o[t].tagName!==s;)t--;if(t>=0){let n=o[t];o.length=t;let i=e.positionAt(r.getTokenOffset()).line,a=n.startLine,s=i-1;s>a&&c!==a&&l({startLine:a,endLine:s})}break}case X.Comment:{let t=e.positionAt(r.getTokenOffset()).line,n=r.getTokenText().match(/^\s*#(region\b)|(endregion\b)/);if(n)if(n[1])o.push({startLine:t,tagName:``});else{let e=o.length-1;for(;e>=0&&o[e].tagName.length;)e--;if(e>=0){let n=o[e];o.length=e;let r=t;t=n.startLine,r>t&&c!==t&&l({startLine:t,endLine:r,kind:Do.Region})}}else{let n=e.positionAt(r.getTokenOffset()+r.getTokenLength()).line;t<n&&l({startLine:t,endLine:n,kind:Do.Comment})}break}}i=r.scan()}let u=t&&t.rangeLimit||Number.MAX_VALUE;return a.length>u?this.limitRanges(a,u):a}},ll=class{constructor(e){this.htmlParser=e}getSelectionRanges(e,t){let n=this.htmlParser.parseDocument(e);return t.map(t=>this.getSelectionRange(t,e,n))}getSelectionRange(e,t,n){let r=this.getApplicableRanges(t,e,n),i,a;for(let e=r.length-1;e>=0;e--){let n=r[e];(!i||n[0]!==i[0]||n[1]!==i[1])&&(a=ys.create(G.create(t.positionAt(r[e][0]),t.positionAt(r[e][1])),a)),i=n}return a||=ys.create(G.create(e,e)),a}getApplicableRanges(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=this.getAllParentTagRanges(i);if(i.startTagEnd&&!i.endTagStart){if(i.startTagEnd!==i.end)return[[i.start,i.end]];let t=G.create(e.positionAt(i.startTagEnd-2),e.positionAt(i.startTagEnd));return e.getText(t)===`/>`?a.unshift([i.start+1,i.startTagEnd-2]):a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a}return!i.startTagEnd||!i.endTagStart?a:(a.unshift([i.start,i.end]),i.start<r&&r<i.startTagEnd?(a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a):i.startTagEnd<=r&&r<=i.endTagStart?(a.unshift([i.startTagEnd,i.endTagStart]),a):(r>=i.endTagStart+2&&a.unshift([i.endTagStart+2,i.end-1]),a))}getAllParentTagRanges(e){let t=e,n=[];for(;t.parent;)t=t.parent,this.getNodeRanges(t).forEach(e=>n.push(e));return n}getNodeRanges(e){return e.startTagEnd&&e.endTagStart&&e.startTagEnd<e.endTagStart?[[e.startTagEnd,e.endTagStart],[e.start,e.end]]:[[e.start,e.end]]}getAttributeLevelRanges(e,t,n){let r=G.create(e.positionAt(t.start),e.positionAt(t.end)),i=e.getText(r),a=n-t.start,o=Q(i),s=o.scan(),c=t.start,l=[],u=!1,d=-1;for(;s!==X.EOS;){switch(s){case X.AttributeName:if(a<o.getTokenOffset()){u=!1;break}a<=o.getTokenEnd()&&l.unshift([o.getTokenOffset(),o.getTokenEnd()]),u=!0,d=o.getTokenOffset();break;case X.AttributeValue:{if(!u)break;let e=o.getTokenText();if(a<o.getTokenOffset()){l.push([d,o.getTokenEnd()]);break}a>=o.getTokenOffset()&&a<=o.getTokenEnd()&&(l.unshift([o.getTokenOffset(),o.getTokenEnd()]),(e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`)&&a>=o.getTokenOffset()+1&&a<=o.getTokenEnd()-1&&l.unshift([o.getTokenOffset()+1,o.getTokenEnd()-1]),l.push([d,o.getTokenEnd()]));break}}s=o.scan()}return l.map(e=>[e[0]+c,e[1]+c])}};let ul={version:1.1,tags:[{name:`html`,description:{kind:`markdown`,value:`The html element represents the root of an HTML document.`},attributes:[{name:`manifest`,description:{kind:`markdown`,value:`Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details.`}},{name:`version`,description:`Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "<!DOCTYPE html>" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!DOCTYPE html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.`},{name:`xmlns`,description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/html`}]},{name:`head`,description:{kind:`markdown`,value:`The head element represents a collection of metadata for the Document.`},attributes:[{name:`profile`,description:`The URIs of one or more metadata profiles, separated by white space.`}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/head`}]},{name:`title`,description:{kind:`markdown`,value:`The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context.`},attributes:[],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/title`}]},{name:`base`,description:{kind:`markdown`,value:`The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed.`}},{name:`target`,valueSet:`target`,description:{kind:`markdown`,value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/base`}]},{name:`link`,description:{kind:`markdown`,value:`The link element allows authors to link their document to other resources.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.`}},{name:`crossorigin`,valueSet:`xo`,description:{kind:`markdown`,value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin "The Origin request header indicates where a fetch originates from. It doesn\'t include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn\'t disclose the whole path.") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin "The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request\'s credentials mode (Request.credentials) is "include".") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information.'}},{name:`rel`,description:{kind:`markdown`,value:`This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).`}},{name:`media`,description:{kind:`markdown`,value:"This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."}},{name:`hreflang`,description:{kind:`markdown`,value:"This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."}},{name:`type`,description:{kind:`markdown`,value:'This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel="preload"` link types, to make sure the browser only downloads file types that it supports.'}},{name:`sizes`,description:{kind:`markdown`,value:"This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."}},{name:`as`,description:'This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept "The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on\xA0the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image,\xA0video or a script.") request header.'},{name:`importance`,description:`Indicates the relative importance of the resource. Priority hints are delegated using the values:`},{name:`importance`,description:'**`auto`**: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the\xA0browser\xA0that the resource is of\xA0**high** priority.\n\n**`low`**:\xA0Indicates to the\xA0browser\xA0that the resource is of\xA0**low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel="preload"` or `rel="prefetch"` is present.'},{name:`integrity`,description:`Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).`},{name:`referrerpolicy`,description:'A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer\'s path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.'},{name:`title`,description:'The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel="stylesheet">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets).'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/link`}]},{name:`meta`,description:{kind:`markdown`,value:`The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.`},void:!0,attributes:[{name:`name`,description:{kind:`markdown`,value:`This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [\`itemprop\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [\`http-equiv\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [\`charset\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.
70
+ `.indexOf(e.charAt(t))!==-1}function Bc(e,t){return` `.indexOf(e.charAt(t))!==-1}var Vc;(()=>{var e={470:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;n.r(r),n.d(r,{URI:()=>c,Utils:()=>x}),typeof process==`object`?e=process.platform===`win32`:typeof navigator==`object`&&(e=navigator.userAgent.indexOf(`Windows`)>=0);let t=/^\w[\w\d+.-]*$/,i=/^\//,a=/^\/\//;function o(e,n){if(!e.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!i.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(a.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,o(this,a))}get fsPath(){return m(this)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new u(t,n,r,i,a)}static parse(e,t=!1){let n=s.exec(e);return n?new u(n[2]||``,v(n[4]||``),v(n[5]||``),v(n[7]||``),v(n[9]||``),t):new u(``,``,``,``,``)}static file(t){let n=``;if(e&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let e=t.indexOf(`/`,2);e===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,e),t=t.substring(e)||`/`)}return new u(`file`,n,t,``,``)}static from(e){let t=new u(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return h(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof c)return e;{let t=new u(e);return t._formatted=e.external,t._fsPath=e._sep===l?e.fsPath:null,t}}return e}}let l=e?1:void 0;class u extends c{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=m(this),this._fsPath}toString(e=!1){return e?h(this,!0):(this._formatted||=h(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=l),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let d={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function f(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=d[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function p(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=d[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function m(t,n){let r;return r=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,`\\`)),r}function h(e,t){let n=t?p:f,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:f(c,!1,!1)),r}function g(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+g(e.substr(3)):e}}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,(e=>g(e))):e}var y=n(470);let b=y.posix||y;var x;(function(e){e.joinPath=function(e,...t){return e.with({path:b.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=b.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=b.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return b.basename(e.path)},e.extname=function(e){return b.extname(e.path)}})(x||={})})(),Vc=r})();let{URI:Hc,Utils:Uc}=Vc;function Wc(e){let t=e[0];return t===e[e.length-1]&&(t===`'`||t===`"`)&&(e=e.substring(1,e.length-1)),e}function Gc(e,t){return!e.length||t===`handlebars`&&/{{|}}/.test(e)?!1:/\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(e)}function Kc(e,t,n,r){if(/^\s*javascript\:/i.test(t)||/[\n\r]/.test(t))return;t=t.replace(/^\s*/g,``);let i=t.match(/^(\w[\w\d+.-]*):/);if(i){let e=i[1].toLowerCase();return e===`http`||e===`https`||e===`file`?t:void 0}return/^\#/i.test(t)?e+t:/^\/\//i.test(t)?(ac(e,`https://`)?`https`:`http`)+`:`+t.replace(/^\s*/g,``):n?n.resolveReference(t,r||e):t}function qc(e,t,n,r,i,a){let o=Wc(n);if(!Gc(o,e.languageId))return;o.length<n.length&&(r++,i--);let s=Kc(e.uri,o,t,a);if(!s)return;let c=Jc(s,e);return{range:G.create(e.positionAt(r),e.positionAt(i)),target:c}}function Jc(e,t){try{let n=Hc.parse(e);return n.scheme===`file`&&n.query&&(n=n.with({query:null}),e=n.toString(!0)),n.scheme===`file`&&n.fragment&&!(e.startsWith(t.uri)&&e.charCodeAt(t.uri.length)===35)?n.with({fragment:null}).toString(!0):e}catch{return}}var Yc=class{constructor(e){this.dataManager=e}findDocumentLinks(e,t){let n=[],r=Q(e.getText(),0),i=r.scan(),a,o,s=!1,c,l={};for(;i!==X.EOS;){switch(i){case X.StartTag:o=r.getTokenText().toLowerCase(),c||(s=o===`base`);break;case X.AttributeName:a=r.getTokenText().toLowerCase();break;case X.AttributeValue:if(o&&a&&this.dataManager.isPathAttribute(o,a)){let i=r.getTokenText();if(!s){let a=qc(e,t,i,r.getTokenOffset(),r.getTokenEnd(),c);a&&n.push(a)}s&&c===void 0&&(c=Wc(i),c&&t&&(c=t.resolveReference(c,e.uri))),s=!1,a=void 0}else if(a===`id`){let e=Wc(r.getTokenText());l[e]=r.getTokenOffset()}break}i=r.scan()}for(let t of n){let n=e.uri+`#`;if(t.target&&ac(t.target,n)){let r=l[t.target.substring(n.length)];if(r!==void 0){let i=e.positionAt(r);t.target=`${n}${i.line+1},${i.character+1}`}else t.target=e.uri}}return n}};function Xc(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag)return[];let a=[],o=$c(X.StartTag,e,i.start),s=typeof i.endTagStart==`number`&&$c(X.EndTag,e,i.endTagStart);return(o&&Qc(o,t)||s&&Qc(s,t))&&(o&&a.push({kind:as.Read,range:o}),s&&a.push({kind:as.Read,range:s})),a}function Zc(e,t){return e.line<t.line||e.line===t.line&&e.character<=t.character}function Qc(e,t){return Zc(e.start,t)&&Zc(t,e.end)}function $c(e,t,n){let r=Q(t.getText(),n),i=r.scan();for(;i!==X.EOS&&i!==e;)i=r.scan();return i===X.EOS?null:{start:t.positionAt(r.getTokenOffset()),end:t.positionAt(r.getTokenEnd())}}function el(e,t){let n=[],r=tl(e,t);for(let e of r)i(e,void 0);return n;function i(t,r){let a=ls.create(t.name,t.kind,t.range,e.uri,r?.name);if(a.containerName??=``,n.push(a),t.children)for(let e of t.children)i(e,t)}}function tl(e,t){let n=[];return t.roots.forEach(t=>{nl(e,t,n)}),n}function nl(e,t,n){let r=rl(t),i=G.create(e.positionAt(t.start),e.positionAt(t.end)),a=ds.create(r,void 0,ss.Field,i,i);n.push(a),t.children.forEach(t=>{a.children??=[],nl(e,t,a.children)})}function rl(e){let t=e.tag;if(e.attributes){let n=e.attributes.id,r=e.attributes.class;n&&(t+=`#${n.replace(/[\"\']/g,``)}`),r&&(t+=r.replace(/[\"\']/g,``).split(/\s+/).map(e=>`.${e}`).join(``))}return t||`?`}function il(e,t,n,r){let i=e.offsetAt(t),a=r.findNodeAt(i);if(!a.tag||!al(a,i,a.tag))return null;let o=[],s={start:e.positionAt(a.start+1),end:e.positionAt(a.start+1+a.tag.length)};if(o.push({range:s,newText:n}),a.endTagStart){let t={start:e.positionAt(a.endTagStart+2),end:e.positionAt(a.endTagStart+2+a.tag.length)};o.push({range:t,newText:n})}return{changes:{[e.uri.toString()]:o}}}function al(e,t,n){return e.endTagStart&&e.endTagStart+2<=t&&t<=e.endTagStart+2+n.length?!0:e.start+1<=t&&t<=e.start+1+n.length}function ol(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r);if(!i.tag||!i.endTagStart)return null;if(i.start+1<=r&&r<=i.start+1+i.tag.length){let t=r-1-i.start+i.endTagStart+2;return e.positionAt(t)}if(i.endTagStart+2<=r&&r<=i.endTagStart+2+i.tag.length){let t=r-2-i.endTagStart+i.start+1;return e.positionAt(t)}return null}function sl(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=i.tag?i.tag.length:0;return i.endTagStart&&(i.start+1<=r&&r<=i.start+1+a||i.endTagStart+2<=r&&r<=i.endTagStart+2+a)?[G.create(e.positionAt(i.start+1),e.positionAt(i.start+1+a)),G.create(e.positionAt(i.endTagStart+2),e.positionAt(i.endTagStart+2+a))]:null}var cl=class{constructor(e){this.dataManager=e}limitRanges(e,t){e=e.sort((e,t)=>{let n=e.startLine-t.startLine;return n===0&&(n=e.endLine-t.endLine),n});let n,r=[],i=[],a=[],o=(e,t)=>{i[e]=t,t<30&&(a[t]=(a[t]||0)+1)};for(let t=0;t<e.length;t++){let i=e[t];if(!n)n=i,o(t,0);else if(i.startLine>n.startLine){if(i.endLine<=n.endLine)r.push(n),n=i,o(t,r.length);else if(i.startLine>n.endLine){do n=r.pop();while(n&&i.startLine>n.endLine);n&&r.push(n),n=i,o(t,r.length)}}}let s=0,c=0;for(let e=0;e<a.length;e++){let n=a[e];if(n){if(n+s>t){c=e;break}s+=n}}let l=[];for(let n=0;n<e.length;n++){let r=i[n];typeof r==`number`&&(r<c||r===c&&s++<t)&&l.push(e[n])}return l}getFoldingRanges(e,t){let n=this.dataManager.getVoidElements(e.languageId),r=Q(e.getText()),i=r.scan(),a=[],o=[],s=null,c=-1;function l(e){a.push(e),c=e.startLine}for(;i!==X.EOS;){switch(i){case X.StartTag:{let t=r.getTokenText(),n=e.positionAt(r.getTokenOffset()).line;o.push({startLine:n,tagName:t}),s=t;break}case X.EndTag:s=r.getTokenText();break;case X.StartTagClose:if(!s||!this.dataManager.isVoidElement(s,n))break;case X.EndTagClose:case X.StartTagSelfClose:{let t=o.length-1;for(;t>=0&&o[t].tagName!==s;)t--;if(t>=0){let n=o[t];o.length=t;let i=e.positionAt(r.getTokenOffset()).line,a=n.startLine,s=i-1;s>a&&c!==a&&l({startLine:a,endLine:s})}break}case X.Comment:{let t=e.positionAt(r.getTokenOffset()).line,n=r.getTokenText().match(/^\s*#(region\b)|(endregion\b)/);if(n)if(n[1])o.push({startLine:t,tagName:``});else{let e=o.length-1;for(;e>=0&&o[e].tagName.length;)e--;if(e>=0){let n=o[e];o.length=e;let r=t;t=n.startLine,r>t&&c!==t&&l({startLine:t,endLine:r,kind:Do.Region})}}else{let n=e.positionAt(r.getTokenOffset()+r.getTokenLength()).line;t<n&&l({startLine:t,endLine:n,kind:Do.Comment})}break}}i=r.scan()}let u=t&&t.rangeLimit||Number.MAX_VALUE;return a.length>u?this.limitRanges(a,u):a}},ll=class{constructor(e){this.htmlParser=e}getSelectionRanges(e,t){let n=this.htmlParser.parseDocument(e);return t.map(t=>this.getSelectionRange(t,e,n))}getSelectionRange(e,t,n){let r=this.getApplicableRanges(t,e,n),i,a;for(let e=r.length-1;e>=0;e--){let n=r[e];(!i||n[0]!==i[0]||n[1]!==i[1])&&(a=ys.create(G.create(t.positionAt(r[e][0]),t.positionAt(r[e][1])),a)),i=n}return a||=ys.create(G.create(e,e)),a}getApplicableRanges(e,t,n){let r=e.offsetAt(t),i=n.findNodeAt(r),a=this.getAllParentTagRanges(i);if(i.startTagEnd&&!i.endTagStart){if(i.startTagEnd!==i.end)return[[i.start,i.end]];let t=G.create(e.positionAt(i.startTagEnd-2),e.positionAt(i.startTagEnd));return e.getText(t)===`/>`?a.unshift([i.start+1,i.startTagEnd-2]):a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a}return!i.startTagEnd||!i.endTagStart?a:(a.unshift([i.start,i.end]),i.start<r&&r<i.startTagEnd?(a.unshift([i.start+1,i.startTagEnd-1]),a=this.getAttributeLevelRanges(e,i,r).concat(a),a):i.startTagEnd<=r&&r<=i.endTagStart?(a.unshift([i.startTagEnd,i.endTagStart]),a):(r>=i.endTagStart+2&&a.unshift([i.endTagStart+2,i.end-1]),a))}getAllParentTagRanges(e){let t=e,n=[];for(;t.parent;)t=t.parent,this.getNodeRanges(t).forEach(e=>n.push(e));return n}getNodeRanges(e){return e.startTagEnd&&e.endTagStart&&e.startTagEnd<e.endTagStart?[[e.startTagEnd,e.endTagStart],[e.start,e.end]]:[[e.start,e.end]]}getAttributeLevelRanges(e,t,n){let r=G.create(e.positionAt(t.start),e.positionAt(t.end)),i=e.getText(r),a=n-t.start,o=Q(i),s=o.scan(),c=t.start,l=[],u=!1,d=-1;for(;s!==X.EOS;){switch(s){case X.AttributeName:if(a<o.getTokenOffset()){u=!1;break}a<=o.getTokenEnd()&&l.unshift([o.getTokenOffset(),o.getTokenEnd()]),u=!0,d=o.getTokenOffset();break;case X.AttributeValue:{if(!u)break;let e=o.getTokenText();if(a<o.getTokenOffset()){l.push([d,o.getTokenEnd()]);break}a>=o.getTokenOffset()&&a<=o.getTokenEnd()&&(l.unshift([o.getTokenOffset(),o.getTokenEnd()]),(e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`)&&a>=o.getTokenOffset()+1&&a<=o.getTokenEnd()-1&&l.unshift([o.getTokenOffset()+1,o.getTokenEnd()-1]),l.push([d,o.getTokenEnd()]));break}}s=o.scan()}return l.map(e=>[e[0]+c,e[1]+c])}};let ul={version:1.1,tags:[{name:`html`,description:{kind:`markdown`,value:`The html element represents the root of an HTML document.`},attributes:[{name:`manifest`,description:{kind:`markdown`,value:`Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details.`}},{name:`version`,description:`Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "<!DOCTYPE html>" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!DOCTYPE html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.`},{name:`xmlns`,description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/html`}]},{name:`head`,description:{kind:`markdown`,value:`The head element represents a collection of metadata for the Document.`},attributes:[{name:`profile`,description:`The URIs of one or more metadata profiles, separated by white space.`}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/head`}]},{name:`title`,description:{kind:`markdown`,value:`The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context.`},attributes:[],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/title`}]},{name:`base`,description:{kind:`markdown`,value:`The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed.`}},{name:`target`,valueSet:`target`,description:{kind:`markdown`,value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/base`}]},{name:`link`,description:{kind:`markdown`,value:`The link element allows authors to link their document to other resources.`},void:!0,attributes:[{name:`href`,description:{kind:`markdown`,value:`This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.`}},{name:`crossorigin`,valueSet:`xo`,description:{kind:`markdown`,value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin "The Origin request header indicates where a fetch originates from. It doesn\'t include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn\'t disclose the whole path.") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin "The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request\'s credentials mode (Request.credentials) is "include".") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information.'}},{name:`rel`,description:{kind:`markdown`,value:`This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).`}},{name:`media`,description:{kind:`markdown`,value:"This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."}},{name:`hreflang`,description:{kind:`markdown`,value:"This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."}},{name:`type`,description:{kind:`markdown`,value:'This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel="preload"` link types, to make sure the browser only downloads file types that it supports.'}},{name:`sizes`,description:{kind:`markdown`,value:"This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."}},{name:`as`,description:'This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept "The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on\xA0the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image,\xA0video or a script.") request header.'},{name:`importance`,description:`Indicates the relative importance of the resource. Priority hints are delegated using the values:`},{name:`importance`,description:'**`auto`**: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the\xA0browser\xA0that the resource is of\xA0**high** priority.\n\n**`low`**:\xA0Indicates to the\xA0browser\xA0that the resource is of\xA0**low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel="preload"` or `rel="prefetch"` is present.'},{name:`integrity`,description:`Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).`},{name:`referrerpolicy`,description:'A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer\'s path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.'},{name:`title`,description:'The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel="stylesheet">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets).'}],references:[{name:`MDN Reference`,url:`https://developer.mozilla.org/docs/Web/HTML/Element/link`}]},{name:`meta`,description:{kind:`markdown`,value:`The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.`},void:!0,attributes:[{name:`name`,description:{kind:`markdown`,value:`This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [\`itemprop\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [\`http-equiv\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [\`charset\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.
71
71
 
72
72
  This metadata name is associated with the value contained by the [\`content\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:
73
73