/** * GENERATED -- do not edit. Source: scripts/lib/static-html-parsers.entry.mjs * Rebuild: node scripts/build-static-html-parsers.js * * Bundles htmlparser2, css-select, css-tree, and domutils for skill/plugin installs. * Third-party licenses: see static-html-parsers.LICENSES.txt. */ var jA=Object.create;var Cn=Object.defineProperty;var zA=Object.getOwnPropertyDescriptor;var _A=Object.getOwnPropertyNames;var $A=Object.getPrototypeOf,ta=Object.prototype.hasOwnProperty;var vt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},St=(t,e)=>{for(var n in e)Cn(t,n,{get:e[n],enumerable:!0})},ea=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of _A(e))!ta.call(t,r)&&r!==n&&Cn(t,r,{get:()=>e[r],enumerable:!(i=zA(e,r))||i.enumerable});return t};var na=(t,e,n)=>(n=t!=null?jA($A(t)):{},ea(e||!t||!t.__esModule?Cn(n,"default",{value:t,enumerable:!0}):n,t));var kA=vt(di=>{var bA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");di.encode=function(t){if(0<=t&&t{var yA=kA(),mi=5,BA=1<>1;return e?-n:n}xi.encode=function(e){var n="",i,r=zl(e);do i=r&wA,r>>>=mi,r>0&&(i|=EA),n+=yA.encode(i);while(r>0);return n};xi.decode=function(e,n,i){var r=e.length,s=0,o=0,a,l;do{if(n>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=yA.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(l&EA),l&=wA,s=s+(l<{function $l(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}M.getArg=$l;var FA=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,th=/^data:.+\,.+$/;function Ee(t){var e=t.match(FA);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}M.urlParse=Ee;function oe(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}M.urlGenerate=oe;var eh=32;function nh(t){var e=[];return function(n){for(var i=0;ieh&&e.pop(),s}}var Ci=nh(function(e){var n=e,i=Ee(e);if(i){if(!i.path)return e;n=i.path}for(var r=M.isAbsolute(n),s=[],o=0,a=0;;)if(o=a,a=n.indexOf("/",o),a===-1){s.push(n.slice(o));break}else for(s.push(n.slice(o,a));a=0;a--)l=s[a],l==="."?s.splice(a,1):l===".."?A++:A>0&&(l===""?(s.splice(a+1,A),A=0):(s.splice(a,2),A--));return n=s.join("/"),n===""&&(n=r?"/":"."),i?(i.path=n,oe(i)):n});M.normalize=Ci;function NA(t,e){t===""&&(t="."),e===""&&(e=".");var n=Ee(e),i=Ee(t);if(i&&(t=i.path||"/"),n&&!n.scheme)return i&&(n.scheme=i.scheme),oe(n);if(n||e.match(th))return e;if(i&&!i.host&&!i.path)return i.host=e,oe(i);var r=e.charAt(0)==="/"?e:Ci(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=r,oe(i)):r}M.join=NA;M.isAbsolute=function(t){return t.charAt(0)==="/"||FA.test(t)};function ih(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}M.relative=ih;var QA=(function(){var t=Object.create(null);return!("__proto__"in t)})();function TA(t){return t}function rh(t){return LA(t)?"$"+t:t}M.toSetString=QA?TA:rh;function sh(t){return LA(t)?t.slice(1):t}M.fromSetString=QA?TA:sh;function LA(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function oh(t,e,n){var i=Ct(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||n)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Ct(t.name,e.name)}M.compareByOriginalPositions=oh;function Ah(t,e,n){var i;return i=t.originalLine-e.originalLine,i!==0||(i=t.originalColumn-e.originalColumn,i!==0||n)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Ct(t.name,e.name)}M.compareByOriginalPositionsNoSource=Ah;function ah(t,e,n){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||n)||(i=Ct(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Ct(t.name,e.name)}M.compareByGeneratedPositionsDeflated=ah;function ch(t,e,n){var i=t.generatedColumn-e.generatedColumn;return i!==0||n||(i=Ct(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Ct(t.name,e.name)}M.compareByGeneratedPositionsDeflatedNoLine=ch;function Ct(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function lh(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Ct(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ct(t.name,e.name)}M.compareByGeneratedPositionsInflated=lh;function hh(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}M.parseSourceMapInput=hh;function uh(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var i=Ee(n);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var r=i.path.lastIndexOf("/");r>=0&&(i.path=i.path.substring(0,r+1))}e=NA(oe(i),e)}return Ci(e)}M.computeSourceURL=uh});var KA=vt(GA=>{var Ii=pn(),Si=Object.prototype.hasOwnProperty,Rt=typeof Map<"u";function It(){this._array=[],this._set=Rt?new Map:Object.create(null)}It.fromArray=function(e,n){for(var i=new It,r=0,s=e.length;r=0)return n}else{var i=Ii.toSetString(e);if(Si.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};It.prototype.at=function(e){if(e>=0&&e{var WA=pn();function fh(t,e){var n=t.generatedLine,i=e.generatedLine,r=t.generatedColumn,s=e.generatedColumn;return i>n||i==n&&s>=r||WA.compareByGeneratedPositionsInflated(t,e)<=0}function gn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}gn.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};gn.prototype.add=function(e){fh(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};gn.prototype.toArray=function(){return this._sorted||(this._array.sort(WA.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};YA.MappingList=gn});var MA=vt(vA=>{var De=DA(),W=pn(),dn=KA().ArraySet,ph=RA().MappingList;function st(t){t||(t={}),this._file=W.getArg(t,"file",null),this._sourceRoot=W.getArg(t,"sourceRoot",null),this._skipValidation=W.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=W.getArg(t,"ignoreInvalidMapping",!1),this._sources=new dn,this._names=new dn,this._mappings=new ph,this._sourcesContents=null}st.prototype._version=3;st.fromSourceMap=function(e,n){var i=e.sourceRoot,r=new st(Object.assign(n||{},{file:e.file,sourceRoot:i}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,i!=null&&(o.source=W.relative(i,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),r.addMapping(o)}),e.sources.forEach(function(s){var o=s;i!==null&&(o=W.relative(i,s)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(s);a!=null&&r.setSourceContent(s,a)}),r};st.prototype.addMapping=function(e){var n=W.getArg(e,"generated"),i=W.getArg(e,"original",null),r=W.getArg(e,"source",null),s=W.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(n,i,r,s)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:r,name:s}))};st.prototype.setSourceContent=function(e,n){var i=e;this._sourceRoot!=null&&(i=W.relative(this._sourceRoot,i)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[W.toSetString(i)]=n):this._sourcesContents&&(delete this._sourcesContents[W.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};st.prototype.applySourceMap=function(e,n,i){var r=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var s=this._sourceRoot;s!=null&&(r=W.relative(s,r));var o=new dn,a=new dn;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var A=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});A.source!=null&&(l.source=A.source,i!=null&&(l.source=W.join(i,l.source)),s!=null&&(l.source=W.relative(s,l.source)),l.originalLine=A.line,l.originalColumn=A.column,A.name!=null&&(l.name=A.name))}var c=l.source;c!=null&&!o.has(c)&&o.add(c);var h=l.name;h!=null&&!a.has(h)&&a.add(h)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var A=e.sourceContentFor(l);A!=null&&(i!=null&&(l=W.join(i,l)),s!=null&&(l=W.relative(s,l)),this.setSourceContent(l,A))},this)};st.prototype._validateMapping=function(e,n,i,r){if(n&&typeof n.line!="number"&&typeof n.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!i&&!r)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&i)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:i,original:n,name:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};st.prototype._serializeMappings=function(){for(var e=0,n=1,i=0,r=0,s=0,o=0,a="",l,A,c,h,f=this._mappings.toArray(),p=0,x=f.length;p0){if(!W.compareByGeneratedPositionsInflated(A,f[p-1]))continue;l+=","}l+=De.encode(A.generatedColumn-e),e=A.generatedColumn,A.source!=null&&(h=this._sources.indexOf(A.source),l+=De.encode(h-o),o=h,l+=De.encode(A.originalLine-1-r),r=A.originalLine-1,l+=De.encode(A.originalColumn-i),i=A.originalColumn,A.name!=null&&(c=this._names.indexOf(A.name),l+=De.encode(c-s),s=c)),a+=l}return a};st.prototype._generateSourcesContent=function(e,n){return e.map(function(i){if(!this._sourcesContents)return null;n!=null&&(i=W.relative(n,i));var r=W.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};st.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};st.prototype.toString=function(){return JSON.stringify(this.toJSON())};vA.SourceMapGenerator=st});var $i={};St($i,{DefaultHandler:()=>kt,DomHandler:()=>kt,DomUtils:()=>Pt,ElementType:()=>Qe,Parser:()=>Nt,QuoteType:()=>_,Tokenizer:()=>Ft,createDocumentStream:()=>tc,getFeed:()=>pe,parseDocument:()=>_i,parseFeed:()=>nc});var ia=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Bi(t){return t>=55296&&t<=57343||t>1114111?65533:ia.get(t)??t}function Fe(t){let e=atob(t),n=e.length&-2,i=new Uint16Array(n/2);for(let r=0,s=0;r=N.ZERO&&t<=N.NINE}function ra(t){return t>=N.UPPER_A&&t<=N.UPPER_F||t>=N.LOWER_A&&t<=N.LOWER_F}function sa(t){return t>=N.UPPER_A&&t<=N.UPPER_Z||t>=N.LOWER_A&&t<=N.LOWER_Z||bn(t)}function oa(t){return t===N.EQUALS||sa(t)}var Y;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Y||(Y={}));var ot;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ot||(ot={}));var Ne=class{decodeTree;emitCodePoint;errors;constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i}state=Y.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=ot.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=Y.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,n){switch(this.state){case Y.EntityStart:return e.charCodeAt(n)===N.NUM?(this.state=Y.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Y.NamedEntity,this.stateNamedEntity(e,n));case Y.NumericStart:return this.stateNumericStart(e,n);case Y.NumericDecimal:return this.stateNumericDecimal(e,n);case Y.NumericHex:return this.stateNumericHex(e,n);case Y.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|wi)===N.LOWER_X?(this.state=Y.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Y.NumericDecimal,this.stateNumericDecimal(e,n))}stateNumericHex(e,n){for(;n>14;for(;n>7;if(this.runConsumed===0){let l=r&U.JUMP_TABLE;if(e.charCodeAt(n)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}for(;this.runConsumed=e.length)return-1;let l=this.runConsumed-1,A=i[this.treeIndex+1+(l>>1)],c=l%2===0?A&255:A>>8&255;if(e.charCodeAt(n)!==c)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=i[this.treeIndex],s=(r&U.VALUE_LENGTH)>>14}if(n>=e.length)break;let o=e.charCodeAt(n);if(o===N.SEMI&&s!==0&&(r&U.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Aa(i,r,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===ot.Attribute&&(s===0||oa(o))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],s=(r&U.VALUE_LENGTH)>>14,s!==0){if(o===N.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ot.Strict&&(r&U.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}n++,this.excess++}return-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:n}=this,i=(n[e]&U.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,i,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){let{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~(U.VALUE_LENGTH|U.FLAG13):r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){switch(this.state){case Y.NamedEntity:return this.result!==0&&(this.decodeMode!==ot.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Y.NumericDecimal:return this.emitNumericEntity(0,2);case Y.NumericHex:return this.emitNumericEntity(0,3);case Y.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Y.EntityStart:return 0}}};function Aa(t,e,n,i){let r=(e&U.BRANCH_LENGTH)>>7,s=e&U.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){let A=i-s;return A<0||A>=r?-1:t[n+A]-1}let o=r+1>>1,a=0,l=r-1;for(;a<=l;){let A=a+l>>>1,c=A>>1,f=t[n+c]>>(A&1)*8&255;if(fi)l=A-1;else return t[n+o+A]}return-1}var d;(function(t){t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationMark=33]="ExclamationMark",t[t.Number=35]="Number",t[t.Amp=38]="Amp",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Dash=45]="Dash",t[t.Slash=47]="Slash",t[t.Zero=48]="Zero",t[t.Nine=57]="Nine",t[t.Semi=59]="Semi",t[t.Lt=60]="Lt",t[t.Eq=61]="Eq",t[t.Gt=62]="Gt",t[t.Questionmark=63]="Questionmark",t[t.UpperA=65]="UpperA",t[t.LowerA=97]="LowerA",t[t.UpperF=70]="UpperF",t[t.LowerF=102]="LowerF",t[t.UpperZ=90]="UpperZ",t[t.LowerZ=122]="LowerZ",t[t.LowerX=120]="LowerX",t[t.OpeningSquareBracket=91]="OpeningSquareBracket"})(d||(d={}));var u;(function(t){t[t.Text=1]="Text",t[t.BeforeTagName=2]="BeforeTagName",t[t.InTagName=3]="InTagName",t[t.InSelfClosingTag=4]="InSelfClosingTag",t[t.BeforeClosingTagName=5]="BeforeClosingTagName",t[t.InClosingTagName=6]="InClosingTagName",t[t.AfterClosingTagName=7]="AfterClosingTagName",t[t.BeforeAttributeName=8]="BeforeAttributeName",t[t.InAttributeName=9]="InAttributeName",t[t.AfterAttributeName=10]="AfterAttributeName",t[t.BeforeAttributeValue=11]="BeforeAttributeValue",t[t.InAttributeValueDq=12]="InAttributeValueDq",t[t.InAttributeValueSq=13]="InAttributeValueSq",t[t.InAttributeValueNq=14]="InAttributeValueNq",t[t.BeforeDeclaration=15]="BeforeDeclaration",t[t.InDeclaration=16]="InDeclaration",t[t.InProcessingInstruction=17]="InProcessingInstruction",t[t.BeforeComment=18]="BeforeComment",t[t.CDATASequence=19]="CDATASequence",t[t.DeclarationSequence=20]="DeclarationSequence",t[t.InSpecialComment=21]="InSpecialComment",t[t.InCommentLike=22]="InCommentLike",t[t.SpecialStartSequence=23]="SpecialStartSequence",t[t.InSpecialTag=24]="InSpecialTag",t[t.InPlainText=25]="InPlainText",t[t.InEntity=26]="InEntity"})(u||(u={}));function Dt(t){return t===d.Space||t===d.NewLine||t===d.Tab||t===d.FormFeed||t===d.CarriageReturn}function Mt(t){return t===d.Slash||t===d.Gt||Dt(t)}function aa(t){return t>=d.LowerA&&t<=d.LowerZ||t>=d.UpperA&&t<=d.UpperZ}var _;(function(t){t[t.NoValue=0]="NoValue",t[t.Unquoted=1]="Unquoted",t[t.Single=2]="Single",t[t.Double=3]="Double"})(_||(_={}));var I={Empty:new Uint8Array(0),Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},ca=new Map([[I.IframeEnd[2],I.IframeEnd],[I.NoembedEnd[2],I.NoembedEnd],[I.Plaintext[2],I.Plaintext],[I.ScriptEnd[2],I.ScriptEnd],[I.TitleEnd[2],I.TitleEnd],[I.XmpEnd[2],I.XmpEnd]]),Ft=class{cbs;state=u.Text;buffer="";sectionStart=0;index=0;entityStart=0;baseState=u.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:e=!1,decodeEntities:n=!0,recognizeSelfClosing:i=e},r){this.cbs=r,this.xmlMode=e,this.decodeEntities=n,this.recognizeSelfClosing=i,this.entityDecoder=new Ne(e?Sn:In,(s,o)=>this.emitCodePoint(s,o))}reset(){this.state=u.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=u.Text,this.isSpecial=!1,this.currentSequence=I.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=u.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===d.Amp&&this.startEntity()}currentSequence=I.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===I.Plaintext?(this.currentSequence=I.Empty,this.state=u.InPlainText):this.isSpecial?(this.state=u.InSpecialTag,this.sequenceIndex=0):this.state=u.Text}stateSpecialStartSequence(e){let n=e|32;if(this.sequenceIndex=0)this.state=this.baseState,n===0&&(this.index-=1);else{if(e=e))switch(this.state){case u.InTagName:case u.BeforeAttributeName:case u.BeforeAttributeValue:case u.AfterAttributeName:case u.InAttributeName:case u.InAttributeValueSq:case u.InAttributeValueDq:case u.InAttributeValueNq:case u.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,e)}}emitCodePoint(e,n){this.baseState!==u.Text&&this.baseState!==u.InSpecialTag?(this.sectionStart1){let r=Li.get(i);if(r!==void 0&&this.stack.includes(r))return r}return this.isInForeignContext()?i:i==="image"?"img":i}onopentagname(e,n){this.endIndex=n,this.emitOpenTag(this.readTagName(e,n))}emitOpenTag(e){if(this.openTagStart=this.startIndex,this.tagname=e,this.htmlMode&&e==="form"&&this.stack.includes("form")){this.tagname="";return}let n=this.htmlMode&&la.get(e);if(n)for(;this.stack.length>0&&n.has(this.stack[0]);)this.popElement(!0);this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(e==="svg"?this.foreignContext.unshift(mt.Svg):e==="math"?this.foreignContext.unshift(mt.MathML):Ti.has(e)&&this.foreignContext.unshift(mt.None))),this.cbs.onopentagname?.(e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){this.startIndex=this.openTagStart,this.attribs&&(this.cbs.onopentag?.(this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,n){this.endIndex=n;let i=this.readTagName(e,n);if(this.isVoidElement(i))this.htmlMode&&i==="br"&&(this.cbs.onopentagname?.("br"),this.cbs.onopentag?.("br",{},!0),this.cbs.onclosetag?.("br",!1));else{let r=this.stack.indexOf(i);if(r!==-1){for(let s=0;s=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(e-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,n-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){if(this.ended){this.cbs.onerror?.(new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){if(this.ended){this.cbs.onerror?.(new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexQn,Comment:()=>En,Directive:()=>wn,Doctype:()=>pa,ElementType:()=>y,Root:()=>yn,Script:()=>Dn,Style:()=>Fn,Tag:()=>Nn,Text:()=>Bn,isTag:()=>kn});var y;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(y||(y={}));function kn(t){return t.type===y.Tag||t.type===y.Script||t.type===y.Style}var yn=y.Root,Bn=y.Text,wn=y.Directive,En=y.Comment,Dn=y.Script,Fn=y.Style,Nn=y.Tag,Qn=y.CDATA,pa=y.Doctype;var Te=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return Gi(this,e)}},Ae=class extends Te{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},Ht=class extends Ae{type=y.Text;get nodeType(){return 3}},ae=class extends Ae{type=y.Comment;get nodeType(){return 8}},ce=class extends Ae{type=y.Directive;name;constructor(e,n){super(n),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},le=class extends Te{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},he=class extends le{type=y.CDATA;get nodeType(){return 4}},Ot=class extends le{type=y.Root;get nodeType(){return 9}},ue=class extends le{name;attribs;type;constructor(e,n,i=[],r=e==="script"?y.Script:e==="style"?y.Style:y.Tag){super(i),this.name=e,this.attribs=n,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this["x-attribsNamespace"]?.[e],prefix:this["x-attribsPrefix"]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"};function R(t){return kn(t)}function Le(t){return t.type===y.CDATA}function bt(t){return t.type===y.Text}function Ln(t){return t.type===y.Comment}function ga(t){return t.type===y.Directive}function da(t){return t.type===y.Root}function X(t){return Object.hasOwn(t,"children")}function Gi(t,e=!1){let n;if(bt(t))n=new Ht(t.data);else if(Ln(t))n=new ae(t.data);else if(R(t)){let i=e?Tn(t.children):[],r=new ue(t.name,{...t.attribs},i);for(let s of i)s.parent=r;t.namespace!=null&&(r.namespace=t.namespace),t["x-attribsNamespace"]&&(r["x-attribsNamespace"]={...t["x-attribsNamespace"]}),t["x-attribsPrefix"]&&(r["x-attribsPrefix"]={...t["x-attribsPrefix"]}),n=r}else if(Le(t)){let i=e?Tn(t.children):[],r=new he(i);for(let s of i)s.parent=r;n=r}else if(da(t)){let i=e?Tn(t.children):[],r=new Ot(i);for(let s of i)s.parent=r;t["x-mode"]&&(r["x-mode"]=t["x-mode"]),n=r}else if(ga(t)){let i=new ce(t.name,t.data);t["x-name"]!=null&&(i["x-name"]=t["x-name"],i["x-publicId"]=t["x-publicId"],i["x-systemId"]=t["x-systemId"]),n=i}else throw new Error(`Not implemented yet: ${t.type}`);return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}function Tn(t){let e=t.map(n=>Gi(n,!0));for(let n=1;nnt,append:()=>Za,appendChild:()=>Oa,compareDocumentPosition:()=>qi,existsOne:()=>Yi,filter:()=>Zt,find:()=>Wi,findAll:()=>ma,findOne:()=>Ge,getAttributeValue:()=>qa,getChildren:()=>ji,getElementById:()=>Sa,getElements:()=>Ia,getElementsByClassName:()=>ba,getElementsByTagName:()=>Qt,getElementsByTagType:()=>ka,getFeed:()=>pe,getInnerHTML:()=>Ka,getName:()=>za,getOuterHTML:()=>Vi,getParent:()=>zi,getSiblings:()=>Xa,getText:()=>Ye,hasAttrib:()=>ja,innerText:()=>Yn,nextElementSibling:()=>_a,prepend:()=>Va,prependChild:()=>Pa,prevElementSibling:()=>$a,removeElement:()=>ge,removeSubsets:()=>Ja,replaceElement:()=>Ha,testElement:()=>Ca,textContent:()=>fe,uniqueSort:()=>Ua});function Zt(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Wi(t,Array.isArray(e)?e:[e],n,i)}function Wi(t,e,n,i){let r=[],s=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=s[0].length){if(o.length===1)return r;s.shift(),o.shift();continue}let a=s[0][o[0]++];if(t(a)&&(r.push(a),--i<=0))return r;n&&X(a)&&a.children.length>0&&(o.unshift(0),s.unshift(a.children))}}function Ge(t,e,n=!0){let i=Array.isArray(e)?e:[e];for(let r of i){if(R(r)&&t(r))return r;if(n&&X(r)&&r.children.length>0){let s=Ge(t,r.children,!0);if(s)return s}}return null}function Yi(t,e){return(Array.isArray(e)?e:[e]).some(n=>R(n)&&t(n)||X(n)&&Yi(t,n.children))}function ma(t,e){let n=[],i=[Array.isArray(e)?e:[e]],r=[0];for(;;){if(r[0]>=i[0].length){if(i.length===1)return n;i.shift(),r.shift();continue}let s=i[0][r[0]++];R(s)&&t(s)&&n.push(s),X(s)&&s.children.length>0&&(r.unshift(0),i.unshift(s.children))}}var Ke={tag_name(t){return typeof t=="function"?e=>R(e)&&t(e.name):t==="*"?R:e=>R(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>bt(e)&&t(e.data):e=>bt(e)&&e.data===t}};function Gn(t,e){return typeof e=="function"?n=>R(n)&&e(n.attribs[t]):n=>R(n)&&n.attribs[t]===e}function xa(t,e){return n=>t(n)||e(n)}function Ri(t){let e=Object.keys(t).map(n=>{let i=t[n];return Object.hasOwn(Ke,n)?Ke[n](i):Gn(n,i)});return e.length===0?null:e.reduce(xa)}function Ca(t,e){let n=Ri(t);return n?n(e):!0}function Ia(t,e,n,i=Number.POSITIVE_INFINITY){let r=Ri(t);return r?Zt(r,e,n,i):[]}function Sa(t,e,n=!0){return Array.isArray(e)||(e=[e]),Ge(Gn("id",t),e,n)}function Qt(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Ke.tag_name(t),e,n,i)}function ba(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Gn("class",t),e,n,i)}function ka(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Ke.tag_type(t),e,n,i)}var ya=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),Ba=typeof String.prototype.codePointAt=="function"?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e),wa=1342177476;function We(t){let e,n=0,{length:i}=t;for(let r=0;r>>s&1)===0||s>=64||s<32))continue;if(e===void 0?e=t.substring(0,r):n!==r&&(e+=t.substring(n,r)),s<64){e+=ya.get(s),n=r+1;continue}let o=Ba(t,r);e+=`&#x${o.toString(16)};`,o!==s&&r++,n=r+1}return e===void 0?t:(n\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Mi;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(Mi||(Mi={}));var Ji;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(Ji||(Ji={}));var Ui=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(t=>[t.toLowerCase(),t])),Hi=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(t=>[t.toLowerCase(),t]));var Ea=new Set("style script xmp iframe noembed noframes plaintext noscript".split(" ")),Da=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),Fa=new Set(["svg","math"]),Na=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));function Qa(t,e={}){let n="length"in t?t:[t],i=e.xmlMode??!1,r="";for(let s=0;s`;case En:return``;case Qn:return``;case Dn:case Fn:case Nn:return Ta(t,e,n);case Bn:{let i=t,r=i.data||"";return(e.encodeEntities??e.decodeEntities)!==!1&&!(!n&&i.parent&&Ea.has(i.parent.name))?n||e.encodeEntities!=="utf8"?We(r):Wn(r):r}}}function Ta(t,e,n){n==="foreign"&&(t.name=Ui.get(t.name)??t.name,t.parent&&Na.has(t.parent.name)&&(n=!1)),!n&&Fa.has(t.name)&&(n="foreign");let{name:i,children:r}=t,s=!n&&Da.has(i),o=`<${i}${Ga(t.attribs,e,n)}`;return r.length===0&&(n?e.selfClosingTags!==!1:e.selfClosingTags&&s)?o+=n?"/>":" />":(o+=">",r.length>0&&(o+=Zi(r,e,n)),s||(o+=``)),o}function La(t){return t.replaceAll('"',""")}function Ga(t,e,n){if(!t)return"";let i=(e.encodeEntities??e.decodeEntities)===!1?La:n||e.encodeEntities!=="utf8"?We:Kn,r=n==="foreign",s=!!(e.emptyAttrs??n),o="";for(let a in t){if(!Object.hasOwn(t,a))continue;let l=t[a],A=r?Hi.get(a)??a:a;o+=!s&&(l==null||l==="")?` ${A}`:` ${A}="${i(l==null?"":String(l))}"`}return o}function Vi(t,e){return Oi(t,e)}function Ka(t,e){return X(t)?t.children.map(n=>Vi(n,e)).join(""):""}function Ye(t){return Array.isArray(t)?t.map(Ye).join(""):R(t)?t.name==="br"?` `:Ye(t.children):Le(t)?Ye(t.children):bt(t)?t.data:""}function fe(t){return Array.isArray(t)?t.map(fe).join(""):X(t)&&!Ln(t)?fe(t.children):bt(t)?t.data:""}function Yn(t){return Array.isArray(t)?t.map(Yn).join(""):X(t)&&(t.type===y.Tag||Le(t))?Yn(t.children):bt(t)?t.data:""}function pe(t){let e=Re(Ma,t);return e?e.name==="feed"?Wa(e):Ya(e):null}function Wa(t){let e=t.children,n={type:"atom",items:Qt("entry",e).map(s=>{let{children:o}=s,a={media:Xi(o)};q(a,"id","id",o),q(a,"title","title",o);let l=Re("link",o)?.attribs.href;l&&(a.link=l);let A=yt("summary",o)||yt("content",o);A&&(a.description=A);let c=yt("updated",o);return c&&(a.pubDate=new Date(c)),a})};q(n,"id","id",e),q(n,"title","title",e);let i=Re("link",e)?.attribs.href;i&&(n.link=i),q(n,"description","subtitle",e);let r=yt("updated",e);return r&&(n.updated=new Date(r)),q(n,"author","email",e,!0),n}function Ya(t){let e=Re("channel",t.children)?.children??[],n={type:t.name.substr(0,3),id:"",items:Qt("item",t.children).map(r=>{let{children:s}=r,o={media:Xi(s)};q(o,"id","guid",s),q(o,"title","title",s),q(o,"link","link",s),q(o,"description","description",s);let a=yt("pubDate",s)||yt("dc:date",s);return a&&(o.pubDate=new Date(a)),o})};q(n,"title","title",e),q(n,"link","link",e),q(n,"description","description",e);let i=yt("lastBuildDate",e);return i&&(n.updated=new Date(i)),q(n,"author","managingEditor",e,!0),n}var Ra=["url","type","lang"],va=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Xi(t){return Qt("media:content",t).map(e=>{let{attribs:n}=e,i={medium:n.medium,isDefault:!!n.isDefault};for(let r of Ra)n[r]&&(i[r]=n[r]);for(let r of va)n[r]&&(i[r]=Number.parseInt(n[r],10));return n.expression&&(i.expression=n.expression),i})}function Re(t,e){return Qt(t,e,!0,1)[0]}function yt(t,e,n=!1){return fe(Qt(t,e,n,1)).trim()}function q(t,e,n,i,r=!1){let s=yt(n,i,r);s&&(t[e]=s)}function Ma(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}function Ja(t){let e=t.length;for(;--e>=0;){let n=t[e];if(e>0&&t.lastIndexOf(n,e-1)>=0){t.splice(e,1);continue}for(let i=n.parent;i;i=i.parent)if(t.includes(i)){t.splice(e,1);break}}return t}var nt;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(nt||(nt={}));function qi(t,e){let n=[],i=[];if(t===e)return 0;let r=X(t)?t:t.parent;for(;r;)n.unshift(r),r=r.parent;for(r=X(e)?e:e.parent;r;)i.unshift(r),r=r.parent;let s=Math.min(n.length,i.length),o=0;for(;ol.indexOf(c)?a===e?nt.FOLLOWING|nt.CONTAINED_BY:nt.FOLLOWING:a===t?nt.PRECEDING|nt.CONTAINS:nt.PRECEDING}function Ua(t){return t=t.filter((e,n,i)=>!i.includes(e,n+1)),t.sort((e,n)=>{let i=qi(e,n);return i&nt.PRECEDING?-1:i&nt.FOLLOWING?1:0}),t}function ge(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,n=e.lastIndexOf(t);n!==-1&&e.splice(n,1)}t.next=null,t.prev=null,t.parent=null}function Ha(t,e){if(e.prev=t.prev,e.prev&&(e.prev.next=e),e.next=t.next,e.next&&(e.next.prev=e),e.parent=t.parent,e.parent){let{children:n}=e.parent,i=n.lastIndexOf(t);if(i===-1)return;n[i]=e,t.parent=null}}function Oa(t,e){if(ge(e),e.next=null,e.parent=t,t.children.push(e)>1){let n=t.children[t.children.length-2];n.next=e,e.prev=n}else e.prev=null}function Za(t,e){ge(e);let{parent:n}=t,i=t.next;if(e.next=i,e.prev=t,t.next=e,e.parent=n,i){if(i.prev=e,n){let r=n.children;r.splice(r.lastIndexOf(i),0,e)}}else n&&n.children.push(e)}function Pa(t,e){if(ge(e),e.parent=t,e.prev=null,t.children.unshift(e)===1)e.next=null;else{let n=t.children[1];n.prev=e,e.next=n}}function Va(t,e){ge(e);let{parent:n}=t;if(n){let i=n.children;i.splice(i.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,e.next=t,t.prev=e}function ji(t){return X(t)?t.children:[]}function zi(t){return t.parent||null}function Xa(t){let e=zi(t);if(e!=null)return ji(e);let n=[t],{prev:i,next:r}=t;for(;i!=null;)n.unshift(i),{prev:i}=i;for(;r!=null;)n.push(r),{next:r}=r;return n}function qa(t,e){let{attribs:n}=t;return n?.[e]}function ja(t,e){let{attribs:n}=t;return n!=null&&Object.hasOwn(n,e)&&n[e]!=null}function za(t){return t.name}function _a(t){let{next:e}=t;for(;e!==null&&!R(e);)({next:e}=e);return e}function $a(t){let{prev:e}=t;for(;e!==null&&!R(e);)({prev:e}=e);return e}function _i(t,e){let n=new kt(void 0,e);return new Nt(n,e).end(t),n.root}function tc(t,e,n){let i=new kt(r=>t(r,i.root),e,n);return new Nt(i,e)}var ec={xmlMode:!0};function nc(t,e=ec){return pe(_i(t,e).children)}var Ir={};St(Ir,{_compileUnsafe:()=>Vn,compile:()=>dr,default:()=>Ec,is:()=>wc,prepareContext:()=>xr,selectAll:()=>Cr,selectOne:()=>Bc});function At(){return!0}function E(){return!1}var m;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(m||(m={}));var L;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(L||(L={}));var tr=/^[^#\\]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\u00B0-\uFFFF-])+/,ic=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,C;(function(t){t[t.LeftParenthesis=40]="LeftParenthesis",t[t.RightParenthesis=41]="RightParenthesis",t[t.LeftSquareBracket=91]="LeftSquareBracket",t[t.RightSquareBracket=93]="RightSquareBracket",t[t.Comma=44]="Comma",t[t.Period=46]="Period",t[t.Colon=58]="Colon",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Plus=43]="Plus",t[t.Tilde=126]="Tilde",t[t.QuestionMark=63]="QuestionMark",t[t.ExclamationMark=33]="ExclamationMark",t[t.Slash=47]="Slash",t[t.Equal=61]="Equal",t[t.Dollar=36]="Dollar",t[t.Pipe=124]="Pipe",t[t.Circumflex=94]="Circumflex",t[t.Asterisk=42]="Asterisk",t[t.GreaterThan=62]="GreaterThan",t[t.LessThan=60]="LessThan",t[t.Hash=35]="Hash",t[t.LowerI=105]="LowerI",t[t.LowerS=115]="LowerS",t[t.BackSlash=92]="BackSlash",t[t.Space=32]="Space",t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn"})(C||(C={}));var rc=new Map([[C.Tilde,L.Element],[C.Circumflex,L.Start],[C.Dollar,L.End],[C.Asterisk,L.Any],[C.ExclamationMark,L.Not],[C.Pipe,L.Hyphen]]),sc=new Set(["has","not","matches","is","where","host","host-context"]),oc=new Set(["before","after","first-line","first-letter"]);function ve(t){switch(t.type){case m.Adjacent:case m.Child:case m.Descendant:case m.Parent:case m.Sibling:case m.ColumnCombinator:return!0;case m.Attribute:case m.Pseudo:case m.PseudoElement:case m.Tag:case m.Universal:return!1}}var Ac=new Set(["contains","icontains"]);function ac(t,e,n){let i=Number.parseInt(e,16)-65536;return Number.isNaN(i)||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function de(t){return t.replace(ic,ac)}function Rn(t){return t===C.SingleQuote||t===C.DoubleQuote}function er(t){return t===C.Space||t===C.Tab||t===C.NewLine||t===C.FormFeed||t===C.CarriageReturn}function Tt(t){let e=[],n=nr(e,`${t}`,0);if(n0&&ve(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function l(h){if(i.length>0&&i[i.length-1].type===m.Descendant){i[i.length-1].type=h;return}a(),i.push({type:h})}function A(h,f){i.push({type:m.Attribute,name:h,action:f,value:r(1),namespace:null,ignoreCase:"quirks"})}function c(){if(i.length>0&&i[i.length-1].type===m.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");t.push(i)}if(s(0),e.length===n)return n;t:for(;n{let a=i.getAttributeValue(o,r);return a!=null&&a.length===s.length&&a.toLowerCase()===s&&t(o)}):o=>i.getAttributeValue(o,r)===s&&t(o)},hyphen(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,{length:o}=s;return Lt(e,n)?(s=s.toLowerCase(),function(l){let A=i.getAttributeValue(l,r);return A!=null&&(A.length===o||A.charAt(o)==="-")&&A.substr(0,o).toLowerCase()===s&&t(l)}):function(l){let A=i.getAttributeValue(l,r);return A!=null&&(A.length===o||A.charAt(o)==="-")&&A.substr(0,o)===s&&t(l)}},element(t,e,n){let{adapter:i}=n,{name:r,value:s}=e;if(lc.test(s))return E;let o=new RegExp(`(?:^|\\s)${ir(s)}(?:$|\\s)`,Lt(e,n)?"i":"");return function(l){let A=i.getAttributeValue(l,r);return A!=null&&A.length>=s.length&&o.test(A)&&t(l)}},exists(t,{name:e},{adapter:n}){return i=>n.hasAttrib(i,e)&&t(i)},start(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,{length:o}=s;return o===0?E:Lt(e,n)?(s=s.toLowerCase(),a=>{let l=i.getAttributeValue(a,r);return l!=null&&l.length>=o&&l.substr(0,o).toLowerCase()===s&&t(a)}):a=>!!i.getAttributeValue(a,r)?.startsWith(s)&&t(a)},end(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,o=-s.length;return o===0?E:Lt(e,n)?(s=s.toLowerCase(),a=>i.getAttributeValue(a,r)?.substr(o).toLowerCase()===s&&t(a)):a=>!!i.getAttributeValue(a,r)?.endsWith(s)&&t(a)},any(t,e,n){let{adapter:i}=n,{name:r,value:s}=e;if(s==="")return E;if(Lt(e,n)){let o=new RegExp(ir(s),"i");return function(l){let A=i.getAttributeValue(l,r);return A!=null&&A.length>=s.length&&o.test(A)&&t(l)}}return o=>!!i.getAttributeValue(o,r)?.includes(s)&&t(o)},not(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e;return s===""?o=>!!i.getAttributeValue(o,r)&&t(o):Lt(e,n)?(s=s.toLowerCase(),o=>{let a=i.getAttributeValue(o,r);return(a==null||a.length!==s.length||a.toLowerCase()!==s)&&t(o)}):o=>i.getAttributeValue(o,r)!==s&&t(o)}};function sr(t,e,n){let{adapter:i,xmlMode:r=!1}=n,s=[],o=[e],a=[0];for(;;){if(a[0]>=o[0].length){if(o.length===1)return s;o.shift(),a.shift();continue}let l=o[0][a[0]++];if(i.isTag(l)&&(t(l)&&s.push(l),r||i.getName(l)!=="template")){let A=i.getChildren(l);A.length>0&&(o.unshift(A),a.unshift(0))}}}function Xt(t,e,n){let{adapter:i,xmlMode:r=!1}=n,s=[e],o=[0];for(;;){if(o[0]>=s[0].length){if(s.length===1)return null;s.shift(),o.shift();continue}let a=s[0][o[0]++];if(i.isTag(a)){if(t(a))return a;if(r||i.getName(a)!=="template"){let l=i.getChildren(a);l.length>0&&(s.unshift(l),o.unshift(0))}}}}function Me(t,e){let n=e.getSiblings(t);if(n.length<=1)return[];let i=n.indexOf(t);return i===-1||i===n.length-1?[]:n.slice(i+1).filter(e.isTag)}function it(t,e){let n=e.getParent(t);return n!=null&&e.isTag(n)?n:null}var or="input:is([type=text i],[type=search i],[type=url i],[type=tel i],[type=email i],[type=password i],[type=date i],[type=month i],[type=week i],[type=time i],[type=datetime-local i],[type=number i])",Ar={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) )`,enabled:":is(button, input, select, textarea, optgroup, option, fieldset):not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], :selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])","read-only":`[readonly]:is(textarea, ${or})`,"read-write":`:not([readonly]):is(textarea, ${or})`,selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};function ar(t){let e=t[0],n=t[1]-1;if(n<0&&e<=0)return E;if(e===-1)return s=>s<=n;if(e===0)return s=>s===n;if(e===1)return n<0?At:s=>s>=n;let i=Math.abs(e),r=(n%i+i)%i;return e>1?s=>s>=n&&s%i===r:s=>s<=n&&s%i===r}var uc=new Set([9,10,12,13,32]),cr=48,fc=57;function lr(t){switch(t=t.trim().toLowerCase(),t){case"even":return[2,0];case"odd":return[2,1]}let e=0,n=0,i=s(),r=o();if(e=cr&&t.charCodeAt(e)<=fc;)A=A*10+(t.charCodeAt(e)-cr),e++;return e===l?null:A}function a(){for(;e"u")return o=>t(o)&&i(o);let r=new WeakMap;function s(o){let a=i(o);return r.set(o,a),a}return function(a){if(!t(a))return!1;if(r.has(a))return r.get(a)??!1;let l=a;do{let A=it(l,e);if(A===null)return s(a);l=A}while(!r.has(l));return r.get(l)?s(a):!1}}function jt(t){let{context:e,rootFunc:n,...i}=t;return i}function pc(t,e){if(e[0]!=="*"&&e[0]!==t[0])return!1;let n=1;for(let i=1;i=t.length)return!1;n++}return!0}var gc=/^(.+?)\s+of\s+(.+)$/is;function Je(t,e){return function(i,r,s,o,a){let{adapter:l,equals:A}=s,c=e?null:r.match(gc),h=vn(c?c[1].trim():r);if(h===E)return E;let f=c&&a?a(Tt(c[2].trim()),jt(s),o):void 0;if(f===E)return E;if(h===At&&!f)return x=>it(x,l)!==null&&i(x);let p=f?(x,w)=>f(w):e?(x,w)=>l.getName(w)===l.getName(x):At;return t?function(w){if(f&&!f(w))return!1;let et=l.getSiblings(w),O=0;for(let Z=et.length-1;Z>=0;Z--){let J=et[Z];if(A(w,J))break;l.isTag(J)&&p(w,J)&&O++}return h(O)&&i(w)}:function(w){if(f&&!f(w))return!1;let et=l.getSiblings(w),O=0;for(let Z of et){if(A(w,Z))break;l.isTag(Z)&&p(w,Z)&&O++}return h(O)&&i(w)}}}var Ue={contains(t,e,n){let{getText:i}=n.adapter;return qt(t,n,r=>i(r).includes(e))},icontains(t,e,n){let i=e.toLowerCase(),{getText:r}=n.adapter;return qt(t,n,s=>r(s).toLowerCase().includes(i))},"nth-child":Je(!1,!1),"nth-last-child":Je(!0,!1),"nth-of-type":Je(!1,!0),"nth-last-of-type":Je(!0,!0),root(t,e,{adapter:n}){return i=>it(i,n)===null&&t(i)},scope(t,e,n,i){let{equals:r}=n;return!i||i.length===0?Ue.root(t,e,n):i.length===1?s=>r(i[0],s)&&t(s):s=>i.includes(s)&&t(s)},lang(t,e,{adapter:n}){let i=e.split(",").map(r=>r.trim()).filter(r=>r.length>0).map(r=>r.replace(/^['"]|['"]$/g,"").toLowerCase().split("-"));return function(s){let o=s;for(;o!=null;){let a=n.getAttributeValue(o,"xml:lang")??n.getAttributeValue(o,"lang");if(a!=null){if(!a)return i.some(c=>c[0]==="")&&t(s);let A=a.toLowerCase().split("-");return i.some(c=>pc(A,c))&&t(s)}let l=n.getParent(o);o=l!=null&&n.isTag(l)?l:null}return i.some(a=>a[0]==="")&&t(s)}},hover:Mn("isHovered"),visited:Mn("isVisited"),active:Mn("isActive")};function Mn(t){return function(n,i,{adapter:r}){let s=r[t];return typeof s!="function"?E:function(a){return s(a)&&n(a)}}}var dc=/^[ \t\r\n]*$/,Jn={empty(t,{adapter:e}){let n=e.getChildren(t);return n.every(i=>!e.isTag(i))&&n.every(i=>dc.test(e.getText(i)))},"first-child"(t,{adapter:e,equals:n}){if(e.prevElementSibling)return e.prevElementSibling(t)==null;let i=e.getSiblings(t).find(r=>e.isTag(r));return i!=null&&n(t,i)},"last-child"(t,{adapter:e,equals:n}){let i=e.getSiblings(t);for(let r=i.length-1;r>=0;r--){if(n(t,i[r]))return!0;if(e.isTag(i[r]))break}return!1},"first-of-type"(t,{adapter:e,equals:n}){let i=e.getSiblings(t),r=e.getName(t);for(let s of i){if(n(t,s))return!0;if(e.isTag(s)&&e.getName(s)===r)break}return!1},"last-of-type"(t,{adapter:e,equals:n}){let i=e.getSiblings(t),r=e.getName(t);for(let s=i.length-1;s>=0;s--){let o=i[s];if(n(t,o))return!0;if(e.isTag(o)&&e.getName(o)===r)break}return!1},"only-of-type"(t,{adapter:e,equals:n}){let i=e.getName(t);return e.getSiblings(t).every(r=>n(t,r)||!e.isTag(r)||e.getName(r)!==i)},"only-child"(t,{adapter:e,equals:n}){return e.getSiblings(t).every(i=>n(t,i)||!e.isTag(i))}};function Un(t,e,n,i){if(n===null){if(t.length>i)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(t.length===i)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}function zt(t){return t.type==="_flexibleDescendant"||ve(t)}function hr(t){let e=t.map(He);for(let n=1;n0&&iMath.min(...e.map(He))))):2:3;default:return-1}}function me(t){return t.type===m.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(me)))}var On={};function xc(t){return t.some(e=>e.length>0&&(zt(e[0])||e.some(me)))}var Hn=(t,e,n,i,r)=>{let s=r(e,jt(n),i);return s===At?t:s===E?E:o=>s(o)&&t(o)},Oe={is:Hn,matches:Hn,where:Hn,not(t,e,n,i,r){let s=r(e,jt(n),i);return s===E?t:s===At?E:o=>!s(o)&&t(o)},has(t,e,n,i,r){let{adapter:s}=n,o=jt(n);o.relativeSelector=!0;let a=e.some(h=>h.some(zt))?[On]:void 0,l=xc(e),A=r(e,o,a);if(A===E)return E;if(a&&A!==At)return l?h=>{if(!t(h))return!1;a[0]=h;let f=s.getChildren(h);return Xt(A,A.shouldTestNextSiblings?[...f,...Me(h,s)]:f,n)!==null}:qt(t,n,h=>(a[0]=h,Xt(A,s.getChildren(h),n)!==null));let c=h=>Xt(A,s.getChildren(h),n)!==null;return l?h=>t(h)&&c(h):qt(t,n,c)}};function ur(t,e,n,i,r){let{name:s,data:o}=e;if(Array.isArray(o)){if(!(s in Oe))throw new Error(`Unknown pseudo-class :${s}(${o})`);return Oe[s](t,o,n,i,r)}let a=n.pseudos?.[s],l=typeof a=="string"?a:Ar[s];if(typeof l=="string"){if(o!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);let A=Tt(l);return Oe.is(t,A,n,i,r)}if(typeof a=="function")return Un(a,s,o,1),A=>a(A,o)&&t(A);if(s in Ue)return Ue[s](t,o,n,i,r);if(s in Jn){let A=Jn[s];return Un(A,s,o,2),c=>A(c,n,o)&&t(c)}throw new Error(`Unknown pseudo-class :${s}`)}function fr(t,e,n,i,r,s){let{adapter:o,equals:a,cacheResults:l}=n;switch(e.type){case m.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case m.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case m.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),rr[e.action](t,e,n)}case m.Pseudo:return ur(t,e,n,i,r);case m.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:A}=e;return(!n.xmlMode||n.lowerCaseTags)&&(A=A.toLowerCase()),function(h){return o.getName(h)===A&&t(h)}}case m.Descendant:{if(!s||l===!1||typeof WeakMap>"u")return function(h){let f=h;for(;f=it(f,o);)if(t(f))return!0;return!1};let A=new WeakMap;return function(h){let f=h,p;for(;f=it(f,o);){let x=A.get(f);if(x===void 0){if(p??={matches:!1},p.matches=t(f),A.set(f,p),p.matches)return!0}else return p&&(p.matches=x.matches),x.matches}return!1}}case"_flexibleDescendant":return function(c){let h=c;do{if(t(h))return!0;h=it(h,o)}while(h);return!1};case m.Parent:return function(c){return o.getChildren(c).some(h=>o.isTag(h)&&t(h))};case m.Child:return function(c){let h=it(c,o);return h!==null&&t(h)};case m.Sibling:return function(c){let h=o.getSiblings(c);for(let f of h){if(a(c,f))break;if(o.isTag(f)&&t(f))return!0}return!1};case m.Adjacent:return o.prevElementSibling?function(c){let h=o.prevElementSibling(c);return h!=null&&t(h)}:function(c){let h=o.getSiblings(c),f;for(let p of h){if(a(c,p))break;o.isTag(p)&&(f=p)}return!!f&&t(f)};case m.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}var Cc={type:m.Descendant},Ic={type:"_flexibleDescendant"},Sc={type:m.Pseudo,name:"scope",data:null};function bc(t,{adapter:e},n){let i=!!n?.every(r=>r===On||e.isTag(r)&&it(r,e)!==null);for(let r of t){if(!(r.length>0&&zt(r[0])&&r[0].type!==m.Descendant))if(i&&!r.some(me))r.unshift(Cc);else continue;r.unshift(Sc)}}function Zn(t,e,n){for(let A of t)hr(A);let{context:i=n,rootFunc:r=At}=e,s=Array.isArray(i),o=i&&(Array.isArray(i)?i:[i]);if(e.relativeSelector!==!1)bc(t,e,o);else if(t.some(A=>A.length>0&&zt(A[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1,l=E;t:for(let A of t){if(A.length>=2){let[f,p]=A;f.type!==m.Pseudo||f.name!=="scope"||(s&&p.type===m.Descendant?A[1]=Ic:(p.type===m.Adjacent||p.type===m.Sibling)&&(a=!0))}let c=r,h=!1;for(let f of A)if(c=fr(c,f,e,o,Zn,h),He(f)===0&&(h=!0),c===E)continue t;if(c===r)return r;l=l===E?c:kc(l,c)}return l.shouldTestNextSiblings=a,l}function kc(t,e){return n=>t(n)||e(n)}var gr=(t,e)=>t===e,pr={adapter:{...Pt,isTag:R},equals:gr};function Pn(t){let e=t??pr;return e.adapter??=pr.adapter,e.equals??=e.adapter?.equals??gr,e}function dr(t,e,n){let i=Pn(e),r=Vn(t,i,n);return r===E?E:s=>i.adapter.isTag(s)&&r(s)}function Vn(t,e,n){return Zn(typeof t=="string"?Tt(t):t,Pn(e),n)}function mr(t){return function(n,i,r){let s=Pn(r);typeof n!="function"&&(n=Vn(n,s,i));let o=xr(i,s.adapter,n.shouldTestNextSiblings);return t(n,o,s)}}function xr(t,e,n=!1){return n&&(t=yc(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}function yc(t,e){let n=Array.isArray(t)?[...t]:[t],i=n.length;for(let r=0;rt===E||!e||e.length===0?[]:sr(t,e,n)),Bc=mr((t,e,n)=>t===E||!e||e.length===0?null:Xt(t,e,n));function wc(t,e,n){return(typeof e=="function"?e:dr(e,n))(t)}var Ec=Cr;var _t=null,xe=class t{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return t.createItem(e)}allocateCursor(e,n){let i;return _t!==null?(i=_t,_t=_t.cursor,i.prev=e,i.next=n,i.cursor=this.cursor):i={prev:e,next:n,cursor:this.cursor},this.cursor=i,i}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=_t,_t=e}updateCursors(e,n,i,r){let{cursor:s}=this;for(;s!==null;)s.prev===e&&(s.prev=n),s.next===i&&(s.next=r),s=s.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let n=this.head;n!==null;n=n.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let n=null;this.head=null;for(let i of e){let r=t.createItem(i);n!==null?n.next=r:this.head=r,r.prev=n,n=r}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,n=this){let i=this.allocateCursor(null,this.head);for(;i.next!==null;){let r=i.next;i.next=r.next,e.call(n,r.data,r,this)}this.releaseCursor()}forEachRight(e,n=this){let i=this.allocateCursor(this.tail,null);for(;i.prev!==null;){let r=i.prev;i.prev=r.prev,e.call(n,r.data,r,this)}this.releaseCursor()}reduce(e,n,i=this){let r=this.allocateCursor(null,this.head),s=n,o;for(;r.next!==null;)o=r.next,r.next=o.next,s=e.call(i,s,o.data,o,this);return this.releaseCursor(),s}reduceRight(e,n,i=this){let r=this.allocateCursor(this.tail,null),s=n,o;for(;r.prev!==null;)o=r.prev,r.prev=o.prev,s=e.call(i,s,o.data,o,this);return this.releaseCursor(),s}some(e,n=this){for(let i=this.head;i!==null;i=i.next)if(e.call(n,i.data,i,this))return!0;return!1}map(e,n=this){let i=new t;for(let r=this.head;r!==null;r=r.next)i.appendData(e.call(n,r.data,r,this));return i}filter(e,n=this){let i=new t;for(let r=this.head;r!==null;r=r.next)e.call(n,r.data,r,this)&&i.appendData(r.data);return i}nextUntil(e,n,i=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let s=r.next;if(r.next=s.next,n.call(i,s.data,s,this))break}this.releaseCursor()}prevUntil(e,n,i=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let s=r.prev;if(r.prev=s.prev,n.call(i,s.data,s,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new t;for(let n of this)e.appendData(n);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(t.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(t.createItem(e))}insert(e,n=null){if(n!==null)if(this.updateCursors(n.prev,e,n,e),n.prev===null){if(this.head!==n)throw new Error("before doesn't belong to list");this.head=e,n.prev=e,e.next=n,this.updateCursors(null,e)}else n.prev.next=e,e.prev=n.prev,n.prev=e,e.next=n;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,n){return this.insert(t.createItem(e),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(t.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(t.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,n){return e.head===null?this:(n!=null?(this.updateCursors(n.prev,e.tail,n,e.head),n.prev!==null?(n.prev.next=e.head,e.head.prev=n.prev):this.head=e.head,n.prev=e.tail,e.tail.next=n):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,n){"head"in n?this.insertList(n,e):this.insert(n,e),this.remove(e)}};function Sr(t,e){let n=Object.create(SyntaxError.prototype),i=new Error;return Object.assign(n,{name:t,message:e,get stack(){return(i.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e} `)}})}var Xn=100,br=60,kr=" ";function yr({source:t,line:e,column:n,baseLine:i,baseColumn:r},s){function o(x,w){return A.slice(x,w).map((et,O)=>String(x+O+1).padStart(f)+" |"+et).join(` `)}let a=` `.repeat(Math.max(i-1,0)),l=" ".repeat(Math.max(r-1,0)),A=(a+l+t).split(/\r\n?|\n|\f/),c=Math.max(1,e-s)-1,h=Math.min(e+s,A.length+1),f=Math.max(4,String(h).length)+1,p=0;n+=(kr.length-1)*(A[e-1].substr(0,n-1).match(/\t/g)||[]).length,n>Xn&&(p=n-br+3,n=br-2);for(let x=c;x<=h;x++)x>=0&&x0&&A[x].length>p?"\u2026":"")+A[x].substr(p,Xn-2)+(A[x].length>p+Xn-1?"\u2026":""));return[o(c,e),new Array(n+f+2).join("-")+"^",o(e,h)].filter(Boolean).join(` `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function qn(t,e,n,i,r,s=1,o=1){return Object.assign(Sr("SyntaxError",t),{source:e,offset:n,line:i,column:r,sourceFragment(l){return yr({source:e,line:i,column:r,baseLine:s,baseColumn:o},isNaN(l)?0:l)},get formattedMessage(){return`Parse error: ${t} `+yr({source:e,line:i,column:r,baseLine:s,baseColumn:o},2)}})}function P(t){return t>=48&&t<=57}function ut(t){return P(t)||t>=65&&t<=70||t>=97&&t<=102}function Pe(t){return t>=65&&t<=90}function Dc(t){return t>=97&&t<=122}function Fc(t){return Pe(t)||Dc(t)}function Nc(t){return t>=128}function Ze(t){return Fc(t)||Nc(t)||t===95}function Ve(t){return Ze(t)||P(t)||t===45}function Qc(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function Ce(t){return t===10||t===13||t===12}function ft(t){return Ce(t)||t===32||t===9}function j(t,e){return!(t!==92||Ce(e)||e===0)}function Xe(t,e,n){return t===45?Ze(e)||e===45||j(e,n):Ze(t)?!0:t===92?j(t,e):!1}function qe(t,e,n){return t===43||t===45?P(e)?2:e===46&&P(n)?3:0:t===46?P(e)?2:0:P(t)?1:0}function je(t){return t===65279||t===65534?1:0}var jn=new Array(128),Tc=128,Ie=130,zn=131,ze=132,_n=133;for(let t=0;tt.length)return!1;for(let r=e;r=0&&ft(t.charCodeAt(e));e--);return e+1}function Se(t,e){for(;e=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}var te=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function ee(t=null,e){return t===null||t.length0?je(e.charCodeAt(0)):0,r=ee(t.lines,n),s=ee(t.columns,n),o=t.startLine,a=t.startColumn;for(let l=i;ln?n:t}var sn=class{constructor(e,n){this.setSource(e,n)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",n=()=>{}){e=String(e||"");let i=e.length,r=ee(this.offsetAndType,e.length+1),s=ee(this.balance,e.length+1),o=0,a=-1,l=0,A=e.length;this.offsetAndType=null,this.balance=null,s.fill(0),n(e,(c,h,f)=>{let p=o++;if(r[p]=c<>ct]}else this.isBlockOpenerTokenType(c)&&(A=p,l=Bt[c])}),r[o]=0<o&&(s[c]=o)}this.source=e,this.firstCharOffset=a===-1?0:a,this.tokenCount=o,this.offsetAndType=r,this.balance=s,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e>ct:0}lookupTypeNonSC(e){for(let n=this.tokenIndex;n>ct;if(i!==13&&i!==25&&e--===0)return i}return 0}lookupOffset(e){return e+=this.tokenIndex,e>ct;if(i!==13&&i!==25&&e--===0)return n-this.tokenIndex}return 0}lookupValue(e,n){return e+=this.tokenIndex,e0?e>ct}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBlockOpenerTokenType(e){return lt[e]===ye}isBlockCloserTokenType(e){return lt[e]===on}getBlockTokenPairIndex(e){let n=this.getTokenType(e);if(lt[n]===1){let i=this.balance[e],r=this.getTokenType(i);return Bt[n]===r?i:-1}else if(lt[n]===2){let i=this.balance[e],r=this.getTokenType(i);return Bt[r]===n?i:-1}return-1}isBalanceEdge(e){return this.balance[this.tokenIndex]>ct,this.tokenEnd=n&at):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>ct,this.tokenEnd=e&at):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,n){let i=e,r=0,s=0;t:for(;i0?this.offsetAndType[i-1]&at:this.firstCharOffset,n(this.source.charCodeAt(s))){case 1:break t;case 2:i++;break t;default:this.isBlockOpenerTokenType(this.offsetAndType[i]>>ct)&&(i=r)}}this.skip(i-this.tokenIndex)}forEachToken(e){for(let n=0,i=this.firstCharOffset;n>ct;i=o,e(a,r,o,n)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((n,i,r,s)=>{e[s]={idx:s,type:te[n],chunk:this.source.substring(i,r),balance:this.balance[s]}}),e}};function An(t,e){function n(h){return h=t.length){A{},Gc=33,Kc=35,ni=59,Qr=123,Tr=0,Wc={createList(){return[]},createSingleNodeList(t){return[t]},getFirstListNode(t){return t&&t[0]||null},getLastListNode(t){return t&&t.length>0?t[t.length-1]:null}},Yc={createList(){return new xe},createSingleNodeList(t){return new xe().appendData(t)},getFirstListNode(t){return t&&t.first},getLastListNode(t){return t&&t.last}};function Rc(t){return function(){return this[t]()}}function ii(t){let e=Object.create(null);for(let n of Object.keys(t)){let i=t[n],r=i.parse||i;r&&(e[n]=r)}return e}function vc(t){let e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:ii(t.atrule),pseudo:ii(t.pseudo),node:ii(t.node)};for(let[n,i]of Object.entries(t.parseContext))switch(typeof i){case"function":e.context[n]=i;break;case"string":e.context[n]=Rc(i);break}return{config:e,...e,...e.node}}function Lr(t){let e="",n="",i=!1,r=re,s=!1,o=new rn,a=Object.assign(new sn,vc(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Nr,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===Qr?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===Qr||c===ni?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===Gc||c===ni?1:0},consumeUntilSemicolonIncluded(c){return c===ni?2:0},createList:re,createSingleNodeList:re,getFirstListNode:re,getLastListNode:re,parseWithFallback(c,h){let f=this.tokenIndex;try{return c.call(this)}catch(p){if(s)throw p;this.skip(f-this.tokenIndex);let x=h.call(this);return s=!0,r(p,x),s=!1,x}},lookupNonWSType(c){let h;do if(h=this.lookupType(c++),h!==13&&h!==25)return h;while(h!==Tr);return Tr},charCodeAt(c){return c>=0&&cx.toUpperCase()),f=`${/[[\](){}]/.test(h)?`"${h}"`:h} is expected`,p=this.tokenStart;switch(c){case 1:this.tokenType===2||this.tokenType===7?(p=this.tokenEnd-1,f="Identifier is expected but function found"):f="Identifier is expected";break;case 4:this.isDelim(Kc)&&(this.next(),p++,f="Name is expected");break;case 11:this.tokenType===10&&(p=this.tokenEnd,f="Percent sign is expected");break}this.error(f,p)}this.next()},eatIdent(c){(this.tokenType!==1||this.lookupValue(0,c)===!1)&&this.error(`Identifier "${c}" is expected`),this.next()},eatDelim(c){this.isDelim(c)||this.error(`Delim "${String.fromCharCode(c)}" is expected`),this.next()},getLocation(c,h){return i?o.getLocationRange(c,h,n):null},getLocationFromList(c){if(i){let h=this.getFirstListNode(c),f=this.getLastListNode(c);return o.getLocationRange(h!==null?h.loc.start.offset-o.startOffset:this.tokenStart,f!==null?f.loc.end.offset-o.startOffset:this.tokenStart,n)}return null},error(c,h){let f=typeof h<"u"&&h({filename:n,source:e,tokenCount:a.tokenCount,getTokenType:c=>a.getTokenType(c),getTokenTypeName:c=>te[a.getTokenType(c)],getTokenStart:c=>a.getTokenStart(c),getTokenEnd:c=>a.getTokenEnd(c),getTokenValue:c=>a.source.substring(a.getTokenStart(c),a.getTokenEnd(c)),substring:(c,h)=>a.source.substring(c,h),balance:a.balance.subarray(0,a.tokenCount+1),isBlockOpenerTokenType:a.isBlockOpenerTokenType,isBlockCloserTokenType:a.isBlockCloserTokenType,getBlockTokenPairIndex:c=>a.getBlockTokenPairIndex(c),getLocation:c=>o.getLocation(c,n),getRangeLocation:(c,h)=>o.getLocationRange(c,h,n)});return Object.assign(function(c,h){e=c,h=h||{},a.setSource(e,An),o.setSource(e,h.offset,h.line,h.column),n=h.filename||"",i=!!h.positions,r=typeof h.onParseError=="function"?h.onParseError:re,s=!1,a.parseAtrulePrelude="parseAtrulePrelude"in h?!!h.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in h?!!h.parseRulePrelude:!0,a.parseValue="parseValue"in h?!!h.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in h?!!h.parseCustomProperty:!1;let{context:f="default",list:p=!0,onComment:x,onToken:w}=h;if(!(f in a.context))throw new Error("Unknown context `"+f+"`");Object.assign(a,p?Yc:Wc),Array.isArray(w)?a.forEachToken((O,Z,J)=>{w.push({type:O,start:Z,end:J})}):typeof w=="function"&&a.forEachToken(w.bind(l())),typeof x=="function"&&a.forEachToken((O,Z,J)=>{if(O===25){let xn=a.getLocation(Z,J),qA=Gt(e,J-2,J,"*/")?e.slice(Z+2,J-2):e.slice(Z+2,J);x(qA,xn)}});let et=a.context[f].call(a,h);return a.eof||a.error(),et},{SyntaxError:qn,config:a.config})}var ri={};St(ri,{AtrulePrelude:()=>Kr,Selector:()=>Yr,Value:()=>Jr});var Mc=35,Jc=42,Gr=43,Uc=45,Hc=47,Oc=117;function Be(t){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,t.recognizer);case 19:return this.Brackets(this.readSequence,t.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,t.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,Oc)&&this.cmpChar(this.tokenStart+1,Gr)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===Hc||e===Jc||e===Gr||e===Uc)return this.Operator();e===Mc&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var Kr={getNode:Be};var Zc=35,Pc=38,Vc=42,Xc=43,qc=47,Wr=46,jc=62,zc=124,_c=126;function $c(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function tl(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Wr&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case Xc:case jc:case _c:case qc:return this.Combinator();case Wr:return this.ClassSelector();case Vc:case zc:return this.TypeSelector();case Zc:return this.IdSelector();case Pc:return this.NestingSelector()}break}}}var Yr={onWhiteSpace:$c,getNode:tl};function Rr(){return this.createSingleNodeList(this.Raw(null,!1))}function vr(){let t=this.createList();if(this.skipSC(),t.push(this.Identifier()),this.skipSC(),this.tokenType===18){t.push(this.Operator());let e=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let i=e-this.tokenIndex;i<=0;i++)if(this.lookupType(i)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}t.push(n)}return t}function Mr(t){return t!==null&&t.type==="Operator"&&(t.value[t.value.length-1]==="-"||t.value[t.value.length-1]==="+")}var Jr={getNode:Be,onWhiteSpace(t,e){Mr(t)&&(t.value=" "+t.value),Mr(e.last)&&(e.last.value+=" ")},expression:Rr,var:vr};var el=new Set(["none","and","not","or"]),Ur={parse:{prelude(){let t=this.createList();if(this.tokenType===1){let e=this.substring(this.tokenStart,this.tokenEnd);el.has(e.toLowerCase())||t.push(this.Identifier())}return t.push(this.Condition("container")),t},block(t=!1){return this.Block(t)}}};var Hr={parse:{prelude:null,block(){return this.Block(!0)}}};function si(t,e){return this.parseWithFallback(()=>{try{return t.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},e||(()=>this.Raw(null,!0)))}var Or={layer(){this.skipSC();let t=this.createList(),e=si.call(this,this.Layer);return(e.type!=="Raw"||e.value!=="")&&t.push(e),t},supports(){this.skipSC();let t=this.createList(),e=si.call(this,this.Declaration,()=>si.call(this,()=>this.Condition("supports")));return(e.type!=="Raw"||e.value!=="")&&t.push(e),t}},Zr={parse:{prelude(){let t=this.createList();switch(this.tokenType){case 5:t.push(this.String());break;case 7:case 2:t.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?t.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&t.push(this.Function(null,Or)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&t.push(this.Function(null,Or)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&t.push(this.MediaQueryList()),t},block:null}};var Pr={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}};var Vr={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(t=!1){return this.Block(t)}}};var Xr={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var qr={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var jr={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(t=!1){return this.Block(t)}}};var zr={parse:{prelude:null,block(t=!1){return this.Block(t)}}};var _r={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(t=!1){return this.Block(t)}}};var $r={container:Ur,"font-face":Hr,import:Zr,layer:Pr,media:Vr,nest:Xr,page:qr,scope:jr,"starting-style":zr,supports:_r};function ts(){let t=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:t.push(this.Identifier());break;case 5:t.push(this.String());break;case 18:t.push(this.Operator());break;case 22:break t;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}var Wt={parse(){return this.createSingleNodeList(this.SelectorList())}},oi={parse(){return this.createSingleNodeList(this.Selector())}},nl={parse(){return this.createSingleNodeList(this.Identifier())}},il={parse:ts},an={parse(){return this.createSingleNodeList(this.Nth())}},es={dir:nl,has:Wt,lang:il,matches:Wt,is:Wt,"-moz-any":Wt,"-webkit-any":Wt,where:Wt,not:Wt,"nth-child":an,"nth-last-child":an,"nth-last-of-type":an,"nth-of-type":an,slotted:oi,host:oi,"host-context":oi};var gi={};St(gi,{AnPlusB:()=>ns,Atrule:()=>ss,AtrulePrelude:()=>As,AttributeSelector:()=>ls,Block:()=>gs,Brackets:()=>ms,CDC:()=>Cs,CDO:()=>Ss,ClassSelector:()=>ks,Combinator:()=>ws,Comment:()=>Ds,Condition:()=>Qs,Declaration:()=>Ys,DeclarationList:()=>vs,Dimension:()=>Js,Feature:()=>Hs,FeatureFunction:()=>Zs,FeatureRange:()=>js,Function:()=>_s,GeneralEnclosed:()=>to,Hash:()=>no,IdSelector:()=>oo,Identifier:()=>ro,Layer:()=>ao,LayerList:()=>lo,MediaQuery:()=>uo,MediaQueryList:()=>po,NestingSelector:()=>mo,Nth:()=>Co,Number:()=>So,Operator:()=>ko,Parentheses:()=>Bo,Percentage:()=>Eo,PseudoClassSelector:()=>Fo,PseudoElementSelector:()=>Qo,Ratio:()=>Ko,Raw:()=>Yo,Rule:()=>Mo,Scope:()=>Uo,Selector:()=>Oo,SelectorList:()=>Po,String:()=>zo,StyleSheet:()=>tA,SupportsDeclaration:()=>nA,TypeSelector:()=>sA,UnicodeRange:()=>cA,Url:()=>pA,Value:()=>dA,WhiteSpace:()=>xA});var dt=43,tt=45,cn=110,Yt=!0,rl=!1;function ln(t,e){let n=this.tokenStart+t,i=this.charCodeAt(n);for((i===dt||i===tt)&&(e&&this.error("Number sign is not allowed"),n++);n0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==dt&&n!==tt&&this.error("Number sign is expected")),se.call(this,e!==0),e===tt?"-"+this.consume(10):this.consume(10)}function ns(){let t=this.tokenStart,e=null,n=null;if(this.tokenType===10)se.call(this,rl),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,tt))switch(e="-1",Et.call(this,1,cn),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ai.call(this);break;case 3:Et.call(this,2,tt),this.next(),this.skipSC(),se.call(this,Yt),n="-"+this.consume(10);break;default:Et.call(this,2,tt),ln.call(this,3,Yt),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===1||this.isDelim(dt)&&this.lookupType(1)===1){let i=0;switch(e="1",this.isDelim(dt)&&(i=1,this.next()),Et.call(this,0,cn),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ai.call(this);break;case 2:Et.call(this,1,tt),this.next(),this.skipSC(),se.call(this,Yt),n="-"+this.consume(10);break;default:Et.call(this,1,tt),ln.call(this,2,Yt),this.next(),n=this.substrToCursor(t+i+1)}}else if(this.tokenType===12){let i=this.charCodeAt(this.tokenStart),r=i===dt||i===tt,s=this.tokenStart+r;for(;s{e.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}function ms(t,e){let n=this.tokenStart,i=null;return this.eat(19),i=t.call(this,e),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:i}}function xs(t){this.token(9,"["),this.children(t),this.token(9,"]")}function Cs(){let t=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(t,this.tokenStart)}}function Is(){this.token(15,"-->")}function Ss(){let t=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}function bs(){this.token(14,"