!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).singlefile={})}(this,(function(e){"use strict";const t="single-file-load-image",r="single-file-image-loaded",n=globalThis.browser,o=(e,t,r)=>globalThis.addEventListener(e,t,r),i=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},s=globalThis.CustomEvent,a=globalThis.document,l=globalThis.Document;let c;if(c=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,a instanceof l){o("single-file-new-font-face",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,c.set(JSON.stringify(r),t)})),o("single-file-delete-font",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,c.delete(JSON.stringify(r))})),o("single-file-clear-fonts",(()=>c=new Map));let e=a.createElement("script");e.src="data:,("+function(){"undefined"==typeof globalThis&&(window.globalThis=window);const e=globalThis.document,t=globalThis.console,r=e=>globalThis.dispatchEvent(e),n=globalThis.CustomEvent,o=globalThis.FileReader,i=globalThis.Blob,s=t&&t.warn&&((...e)=>t.warn(...e))||(()=>{}),a="single-file-new-font-face",l="single-file-delete-font",c="single-file-clear-fonts",u={family:"font-family",style:"font-style",weight:"font-weight",stretch:"font-stretch",unicodeRange:"unicode-range",variant:"font-variant",featureSettings:"font-feature-settings"};if(globalThis.FontFace){const t=globalThis.FontFace;let o;globalThis.FontFace=function(){return o||(s("SingleFile is hooking the FontFace constructor, document.fonts.delete and document.fonts.clear to handle dynamically loaded fonts."),o=!0),h(...arguments).then((e=>r(new n(a,{detail:e})))),new t(...arguments)},globalThis.FontFace.toString=function(){return"function FontFace() { [native code] }"};const i=e.fonts.delete;e.fonts.delete=function(t){return h(t.family).then((e=>r(new n(l,{detail:e})))),i.call(e.fonts,t)},e.fonts.delete.toString=function(){return"function delete() { [native code] }"};const u=e.fonts.clear;e.fonts.clear=function(){return r(new n(c)),u.call(e.fonts)},e.fonts.clear.toString=function(){return"function clear() { [native code] }"}}async function h(e,t,r){const n={};return n["font-family"]=e,n.src=t,r&&Object.keys(r).forEach((e=>{u[e]&&(n[u[e]]=r[e])})),new Promise((e=>{if(n.src instanceof ArrayBuffer){const t=new o;t.readAsDataURL(new i([n.src])),t.addEventListener("load",(()=>{n.src="url("+t.result+")",e(n)}))}else e(n)}))}}.toString()+")()",(a.documentElement||a).appendChild(e),e.remove(),n&&n.runtime&&n.runtime.getURL&&(e=a.createElement("script"),e.src=n.runtime.getURL("/lib/single-file-hooks-frames.js"),e.async=!1,(a.documentElement||a).appendChild(e),e.remove())}function u(){return Array.from(c.values())}function h(e){e.loadDeferredImagesBlockCookies&&i(new s("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&i(new s("single-file-block-storage-start")),e.loadDeferredImagesDispatchScrollEvent&&i(new s("single-file-dispatch-scroll-event-start")),e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-start")):i(new s("single-file-load-deferred-images-start"))}function d(e){e.loadDeferredImagesBlockCookies&&i(new s("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&i(new s("single-file-block-storage-end")),e.loadDeferredImagesDispatchScrollEvent&&i(new s("single-file-dispatch-scroll-event-end")),e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-end")):i(new s("single-file-load-deferred-images-end"))}function p(e){e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-reset")):i(new s("single-file-load-deferred-images-reset"))}var m=Object.freeze({__proto__:null,getFontsData:u,loadDeferredImagesStart:h,loadDeferredImagesEnd:d,loadDeferredImagesResetZoomLevel:p,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:r});const f=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function g(e){return e.replace(f,((e,t,r)=>{const n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))}var y=Object.freeze({__proto__:null,process:g});const b="single-file-on-before-capture",k="single-file-on-after-capture",v="data-single-file-removed-content",w="data-single-file-hidden-content",x="data-single-file-kept-content",E="data-single-file-hidden-frame",A="data-single-file-preserved-space-element",S="data-single-file-shadow-root-element",T="data-single-file-win-id",C="data-single-file-image",R="data-single-file-poster",_="data-single-file-video",I="data-single-file-canvas",L="data-single-file-import",N="data-single-file-movable-style",z="data-single-file-input-value",P="data-single-file-lazy-loaded-src",M="data-single-file-stylesheet",O="data-single-file-disabled-noscript",U="data-single-file-selected-content",D="data-single-file-async-script",F="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",q=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],B=/^'(.*?)'$/,j=/^"(.*?)"$/,H={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},V="Page saved with SingleFile",$="Archive processed by SingleFile",W="single-file-ui-element",G="data:,",Y=(e,t,r)=>globalThis.addEventListener(e,t,r);function J(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function Q(e,t,r){e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(O,e.textContent),e.textContent=""})),J(e),e.head&&e.head.querySelectorAll(F).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+F+", html > body > "+F);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))}));const n=new Map;let o;return t&&e.documentElement?(e.querySelectorAll("button button").forEach((t=>{const r=e.createComment("");n.set(t,r),t.replaceWith(r)})),o=K(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const r=t.getComputedStyle(e);r&&te(e,r)&&(e.setAttribute(N,""),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:o.canvases,fonts:u(),stylesheets:ne(e),images:o.images,posters:o.posters,videos:o.videos,usedFonts:Array.from(o.usedFonts.values()),shadowRoots:o.shadowRoots,imports:o.imports,referrer:e.referrer,markedElements:o.markedElements,invalidElements:n}}function K(e,t,r,n,o={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],imports:[],markedElements:[]},i){return Array.from(r.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((r=>{let s,a,l;if(!n.autoSaveExternalSave&&(n.removeHiddenElements||n.removeUnusedFonts||n.compressHTML)&&(l=e.getComputedStyle(r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(a=(i||r.closest("html > head"))&&q.includes(r.tagName)||r.closest("details"),a||(s=i||te(r,l),s&&(r.setAttribute(w,""),o.markedElements.push(r)))),!s)){if(n.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(r.setAttribute(A,""),o.markedElements.push(r))}n.removeUnusedFonts&&(Z(l,n,o.usedFonts),Z(e.getComputedStyle(r,":first-letter"),n,o.usedFonts),Z(e.getComputedStyle(r,":before"),n,o.usedFonts),Z(e.getComputedStyle(r,":after"),n,o.usedFonts))}!function(e,t,r,n,o,i,s){if("CANVAS"==r.tagName)try{o.canvases.push({dataURI:r.toDataURL("image/png","")}),r.setAttribute(I,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if("IMG"==r.tagName){const t={currentSrc:i?G:n.loadDeferredImages&&r.getAttribute(P)||r.currentSrc};if(o.images.push(t),r.setAttribute(C,o.images.length-1),o.markedElements.push(r),r.removeAttribute(P),s=s||e.getComputedStyle(r)){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute("style");let s,a,l,c,u,h,d,p,m=!1;if("content-box"==(r=r||e.getComputedStyle(t)).getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),r=t.style.getPropertyPriority("box-sizing"),n=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),m=t.clientWidth!=n,e?t.style.setProperty("box-sizing",e,r):t.style.removeProperty("box-sizing")}s=oe("padding-left",r),a=oe("padding-right",r),l=oe("padding-top",r),c=oe("padding-bottom",r),m?(u=oe("border-left-width",r),h=oe("border-right-width",r),d=oe("border-top-width",r),p=oe("border-bottom-width",r)):u=h=d=p=0,n=Math.max(0,t.clientWidth-s-a-u-h),o=Math.max(0,t.clientHeight-l-c-d-p),i&&t.removeAttribute("style")}return{pxWidth:n,pxHeight:o}}(e,r,s);const n=s.getPropertyValue("box-shadow"),o=s.getPropertyValue("background-image");n&&"none"!=n||o&&"none"!=o||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=s.getPropertyValue("background-color"),t.objectFit=s.getPropertyValue("object-fit"),t.boxSizing=s.getPropertyValue("box-sizing"),t.objectPosition=s.getPropertyValue("object-position"))}}if("VIDEO"==r.tagName){const n=r.currentSrc;if(n&&!n.startsWith("blob:")&&!n.startsWith("data:")){const t=e.getComputedStyle(r.parentNode).getPropertyValue("position");o.videos.push({positionParent:t,src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(_,o.videos.length-1)}if(!r.poster){const e=t.createElement("canvas"),n=e.getContext("2d");e.width=r.clientWidth,e.height=r.clientHeight;try{n.drawImage(r,0,0,e.width,e.height),o.posters.push(e.toDataURL("image/png","")),r.setAttribute(R,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}"IFRAME"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(E,""),o.markedElements.push(r));"LINK"==r.tagName&&r.import&&r.import.documentElement&&(o.imports.push({content:ie(r.import)}),r.setAttribute(L,o.imports.length-1),o.markedElements.push(r));"INPUT"==r.tagName&&("password"!=r.type&&(r.setAttribute(z,r.value),o.markedElements.push(r)),"radio"!=r.type&&"checkbox"!=r.type||(r.setAttribute(z,r.checked),o.markedElements.push(r)));"TEXTAREA"==r.tagName&&(r.setAttribute(z,r.value),o.markedElements.push(r));"SELECT"==r.tagName&&r.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(z,""),o.markedElements.push(e))}));"SCRIPT"==r.tagName&&(r.async&&""!=r.getAttribute("async")&&"async"!=r.getAttribute("async")&&(r.setAttribute(D,""),o.markedElements.push(r)),r.textContent=r.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,r,n,o,s,l);const c=!(r instanceof e.SVGElement)&&X(r);if(c&&!r.classList.contains(W)){const i={};r.setAttribute(S,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),K(e,t,c,n,o,s),i.content=c.innerHTML,i.mode=c.mode;try{c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(i.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))))}catch(e){}}K(e,t,r,n,o,s),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(a||""==r.getAttribute(x)?r.parentElement&&(r.parentElement.setAttribute(x,""),o.markedElements.push(r.parentElement)):s&&(r.setAttribute(v,""),o.markedElements.push(r)))})),o}function Z(e,t,r){if(e){const n=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((o=>{if(o=ee(o),!t.loadedFonts||t.loadedFonts.find((e=>ee(e.family)==o&&e.style==n))){const t=ae(e.getPropertyValue("font-weight")),i=e.getPropertyValue("font-variant")||"normal",s=[o,t,n,i];r.set(JSON.stringify(s),[o,t,n,i])}}))}}function X(e){const t=globalThis.chrome;if(e.openOrClosedShadowRoot)return e.openOrClosedShadowRoot;if(!(t&&t.dom&&t.dom.openOrClosedShadowRoot))return e.shadowRoot;try{return t.dom.openOrClosedShadowRoot(e)}catch(t){return e.shadowRoot}}function ee(e=""){return se(g(e.trim())).toLowerCase()}function te(e,t){let r=!1;if(t){const n=t.getPropertyValue("display"),o=t.getPropertyValue("opacity"),i=t.getPropertyValue("visibility");if(r="none"==n,!r&&("0"==o||"hidden"==i)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();r=!t.width&&!t.height}}return Boolean(r)}function re(e,t,r){if(e.querySelectorAll("[data-single-file-disabled-noscript]").forEach((e=>{e.textContent=e.getAttribute(O),e.removeAttribute(O)})),e.querySelectorAll("meta[disabled-http-equiv]").forEach((e=>{e.setAttribute("http-equiv",e.getAttribute("disabled-http-equiv")),e.removeAttribute("disabled-http-equiv")})),e.head&&e.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach((e=>e.removeAttribute("hidden"))),!t){const r=[v,E,w,A,C,R,_,I,z,S,L,M,D];t=e.querySelectorAll(r.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(v),e.removeAttribute(w),e.removeAttribute(x),e.removeAttribute(E),e.removeAttribute(A),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(_),e.removeAttribute(I),e.removeAttribute(z),e.removeAttribute(S),e.removeAttribute(L),e.removeAttribute(M),e.removeAttribute(D),e.removeAttribute(N)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function ne(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((r,n)=>{try{const o=e.createElement("style");o.textContent=r.textContent,e.body.appendChild(o);const i=o.sheet;o.remove(),i&&i.cssRules.length==r.sheet.cssRules.length||(r.setAttribute(M,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function oe(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function ie(e){const t=e.doctype;let r="";return t&&(r=" "),r+e.documentElement.outerHTML}function se(e){return(e=e.match(B)?e.replace(B,"$1"):e.replace(j,"$1")).trim()}function ae(e){return H[e.toLowerCase().trim()]||e}function le(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?le(t):t)),[])}var ce=Object.freeze({__proto__:null,initUserScriptHandler:function(){Y("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),r=new Promise((t=>Y(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:J,preProcessDoc:Q,postProcessDoc:re,serialize:ie,removeQuotes:se,flatten:le,getFontWeight:ae,normalizeFontFamily:ee,getShadowRoot:X,ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:A,REMOVED_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:E,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,VIDEO_ATTRIBUTE_NAME:_,CANVAS_ATTRIBUTE_NAME:I,INPUT_VALUE_ATTRIBUTE_NAME:z,SHADOW_ROOT_ATTRIBUTE_NAME:S,HTML_IMPORT_ATTRIBUTE_NAME:L,STYLE_ATTRIBUTE_NAME:N,LAZY_SRC_ATTRIBUTE_NAME:P,STYLESHEET_ATTRIBUTE_NAME:M,SELECTED_CONTENT_ATTRIBUTE_NAME:U,ASYNC_SCRIPT_ATTRIBUTE_NAME:D,COMMENT_HEADER:V,COMMENT_HEADER_LEGACY:$,SINGLE_FILE_UI_ELEMENT_CLASS:W,EMPTY_RESOURCE:G});const ue=P,he=W,de="attributes",pe=globalThis.browser,me=globalThis.document,fe=globalThis.MutationObserver,ge=(e,t,r)=>globalThis.addEventListener(e,t,r),ye=(e,t,r)=>globalThis.removeEventListener(e,t,r),be=new Map;let ke;async function ve(e){if(me.documentElement){be.clear();const n=Math.max(me.documentElement.scrollHeight-1.5*me.documentElement.clientHeight,0),o=Math.max(me.documentElement.scrollWidth-1.5*me.documentElement.clientWidth,0);if(globalThis.scrollY<=n&&globalThis.scrollX<=o)return function(e){return ke=0,new Promise((async n=>{let o;const i=new Set,s=new fe((async t=>{if((t=t.filter((e=>e.type==de))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(ue,e.target.src),e.target.addEventListener("load",l)),"src"==e.attributeName||"srcset"==e.attributeName||"SOURCE"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(he)})).length&&(o=!0,await Ee(s,e,d),i.size||await xe(s,e,d))}}));async function a(t){await Se("idleTimeout",(async()=>{o?ke<10&&(ke++,Ce("idleTimeout"),await a(Math.max(500,t/2))):(Ce("loadTimeout"),Ce("maxTimeout"),Ae(s,e,d))}),t)}function l(e){const t=e.target;t.removeAttribute(ue),t.removeEventListener("load",l)}async function c(t){o=!0,await Ee(s,e,d),await xe(s,e,d),t.detail&&i.add(t.detail)}async function u(t){await Ee(s,e,d),await xe(s,e,d),i.delete(t.detail),i.size||await xe(s,e,d)}function d(e){s.disconnect(),ye(t,c),ye(r,u),n(e)}await a(2*e.loadDeferredImagesMaxIdleTime),await Ee(s,e,d),s.observe(me,{subtree:!0,childList:!0,attributes:!0}),ge(t,c),ge(r,u),h(e)}))}(e)}}function we(e){p(e)}async function xe(e,t,r){await Se("loadTimeout",(()=>Ae(e,t,r)),t.loadDeferredImagesMaxIdleTime)}async function Ee(e,t,r){await Se("maxTimeout",(async()=>{await Ce("loadTimeout"),await Ae(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime)}async function Ae(e,t,r){await Ce("idleTimeout"),d(t),await Se("endTimeout",(async()=>{await Ce("maxTimeout"),r()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Se(e,t,r){if(pe&&pe.runtime&&pe.runtime.sendMessage){if(!be.get(e)||!be.get(e).pending){const n={callback:t,pending:!0};be.set(e,n);try{await pe.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:r})}catch(n){Te(e,t,r)}n.pending=!1}}else Te(e,t,r)}function Te(e,t,r){const n=be.get(e);n&&globalThis.clearTimeout(n),be.set(e,t),globalThis.setTimeout(t,r)}async function Ce(e){if(pe&&pe.runtime&&pe.runtime.sendMessage)try{await pe.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){Re(e)}else Re(e)}function Re(e){const t=be.get(e);be.delete(e),t&&globalThis.clearTimeout(t)}pe&&pe.runtime&&pe.runtime.onMessage&&pe.runtime.onMessage.addListener&&pe.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=be.get(e.type);if(t){be.delete(e.type);try{t.callback()}catch(t){Re(e.type)}}}}));var _e=Object.freeze({__proto__:null,process:ve,resetZoomLevel:we});const Ie={ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,preProcessDoc:Q,serialize:ie,postProcessDoc:re,getShadowRoot:X},Le="__frameTree__::",Ne='iframe, frame, object[type="text/html"][data]',ze="singlefile.frameTree.initRequest",Pe="singlefile.frameTree.ackInitRequest",Me="singlefile.frameTree.cleanupRequest",Oe="singlefile.frameTree.initResponse",Ue=5e3,De=".",Fe=globalThis.window==globalThis.top,qe=globalThis.browser,Be=globalThis.top,je=globalThis.MessageChannel,He=globalThis.document;let Ve,$e=globalThis.sessions;var We,Ge,Ye;function Je(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function Qe(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,Fe||(Ve=globalThis.frameId=e.windowId),Xe(He,e.options,Ve,t),Fe||(e.options.userScriptEnabled&&r&&await r(Ie.ON_BEFORE_CAPTURE_EVENT_NAME),nt({frames:[it(He,globalThis,Ve,e.options)],sessionId:t,requestedFrameId:He.documentElement.dataset.requestedFrameId&&Ve}),e.options.userScriptEnabled&&r&&await r(Ie.ON_AFTER_CAPTURE_EVENT_NAME),delete He.documentElement.dataset.requestedFrameId)}function Ke(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;rt(st(He),e.windowId,t)}}function Ze(e){e.frames.forEach((t=>et("responseTimeouts",e.sessionId,t.windowId)));const t=$e.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let r=t.frames.find((t=>e.windowId==t.windowId));r||(r={windowId:e.windowId},t.frames.push(r)),r.processed||(r.content=e.content,r.baseURI=e.baseURI,r.title=e.title,r.canvases=e.canvases,r.fonts=e.fonts,r.stylesheets=e.stylesheets,r.images=e.images,r.posters=e.posters,r.videos=e.videos,r.usedFonts=e.usedFonts,r.shadowRoots=e.shadowRoots,r.imports=e.imports,r.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(De).length-e.windowId.split(De).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function Xe(e,t,r,n){const o=st(e);!function(e,t,r,n,o){const i=[];let s;$e.get(o)?s=$e.get(o).requestTimeouts:(s={},$e.set(o,{requestTimeouts:s}));t.forEach(((e,t)=>{const r=n+De+t;e.setAttribute(Ie.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),nt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+De+t;try{ot(e.contentWindow,{method:ze,windowId:i,sessionId:o,options:r})}catch(e){}s[i]=globalThis.setTimeout((()=>nt({frames:[{windowId:i,processed:!0}],sessionId:o})),Ue)})),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n),o.length&&function(e,t,r,n,o){const i=[];t.forEach(((e,t)=>{const s=n+De+t;let a;try{a=e.contentDocument}catch(e){}if(a)try{const t=e.contentWindow;t.stop(),et("requestTimeouts",o,s),Xe(a,r,s,o),i.push(it(a,t,s,r))}catch(e){i.push({windowId:s,processed:!0})}})),nt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function et(e,t,r){const n=$e.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function tt(e,t){const r=$e.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>nt({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function rt(e,t,r){e.forEach(((e,n)=>{const o=t+De+n;e.removeAttribute(Ie.WIN_ID_ATTRIBUTE_NAME);try{ot(e.contentWindow,{method:Me,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+De+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{rt(st(i),o,r)}catch(e){}}))}function nt(e){e.method=Oe;try{Be.singlefile.processors.frameTree.initResponse(e)}catch(t){ot(Be,e,!0)}}function ot(e,t,r){if(e==Be&&qe&&qe.runtime&&qe.runtime.sendMessage)qe.runtime.sendMessage(t);else if(r){const r=new je;e.postMessage(Le+JSON.stringify({method:t.method,sessionId:t.sessionId}),"*",[r.port2]),r.port1.postMessage(t)}else e.postMessage(Le+JSON.stringify(t),"*")}function it(e,t,r,n){const o=Ie.preProcessDoc(e,t,n),i=Ie.serialize(e);Ie.postProcessDoc(e,o.markedElements,o.invalidElements);return{windowId:r,content:i,baseURI:e.baseURI.split("#")[0],title:e.title,canvases:o.canvases,fonts:o.fonts,stylesheets:o.stylesheets,images:o.images,posters:o.posters,videos:o.videos,usedFonts:o.usedFonts,shadowRoots:o.shadowRoots,imports:o.imports,processed:!0}}function st(e){let t=Array.from(e.querySelectorAll(Ne));return e.querySelectorAll("*").forEach((e=>{const r=Ie.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(Ne)))})),t}$e||($e=globalThis.sessions=new Map),Fe&&(Ve="0",qe&&qe.runtime&&qe.runtime.onMessage&&qe.runtime.onMessage.addListener&&qe.runtime.onMessage.addListener((e=>e.method==Oe?(Ze(e),Promise.resolve({})):e.method==Pe?(et("requestTimeouts",e.sessionId,e.windowId),tt(e.sessionId,e.windowId),Promise.resolve({})):void 0))),We="message",Ge=async e=>{if("string"==typeof e.data&&e.data.startsWith(Le)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(Le.length));t.method==ze?(e.source&&ot(e.source,{method:Pe,windowId:t.windowId,sessionId:t.sessionId}),Fe||(globalThis.stop(),t.options.loadDeferredImages&&ve(t.options),await Qe(t))):t.method==Pe?(et("requestTimeouts",t.sessionId,t.windowId),tt(t.sessionId,t.windowId)):t.method==Me?Ke(t):t.method==Oe&&$e.get(t.sessionId)&&(e.ports[0].onmessage=e=>Ze(e.data))}},Ye=!0,globalThis.addEventListener(We,Ge,Ye);var at=Object.freeze({__proto__:null,getAsync:function(e){const t=Je();return e=JSON.parse(JSON.stringify(e)),new Promise((r=>{$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),Qe({windowId:Ve,sessionId:t,options:e})}))},getSync:function(e){const t=Je();e=JSON.parse(JSON.stringify(e)),$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,Fe||(Ve=globalThis.frameId=e.windowId);Xe(He,e.options,Ve,t),Fe||(e.options.userScriptEnabled&&r&&r(Ie.ON_BEFORE_CAPTURE_EVENT_NAME),nt({frames:[it(He,globalThis,Ve,e.options)],sessionId:t,requestedFrameId:He.documentElement.dataset.requestedFrameId&&Ve}),e.options.userScriptEnabled&&r&&r(Ie.ON_AFTER_CAPTURE_EVENT_NAME),delete He.documentElement.dataset.requestedFrameId)}({windowId:Ve,sessionId:t,options:e});const r=$e.get(t).frames;return r.sessionId=t,r},cleanup:function(e){$e.delete(e),Ke({windowId:Ve,sessionId:e,options:{sessionId:e}})},initResponse:Ze,TIMEOUT_INIT_REQUEST_MESSAGE:Ue});const lt=globalThis.browser,ct=globalThis.document;if(ct instanceof globalThis.Document){const e=ct.createElement("script");e.async=!1,lt&<.runtime&<.runtime.getURL&&(e.src=lt.runtime.getURL("/lib/single-file-hooks.js"),e.async=!1),(ct.documentElement||ct).appendChild(e),e.remove()}var ut=Object.freeze({__proto__:null}),ht=Object.freeze({__proto__:null,frameTree:at,hooks:ut,hooksFrames:m,lazy:_e});const dt=/^'(.*?)'$/,pt=/^"(.*?)"$/,mt=["inherit","initial","unset"],ft=["caption","icon","menu","message-box","small-caption","status-bar"],gt=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],yt=["normal","italic","oblique"],bt=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],kt=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"],vt={splitBySpaces:function(e){return Tt(e,[" ","\n","\t"])},split:Tt,splitByCommas:function(e){return Tt(e,[","],{last:!0})}},wt={isSize:function(e){return!isNaN(parseFloat(e))||-1!==e.indexOf("/")||-1!==kt.indexOf(e)}},xt="[parse-css-font] ";function Et(e){if("string"!=typeof e)throw new TypeError(xt+"Expected a string.");if(""===e)throw At("Cannot parse an empty string.");if(-1!==ft.indexOf(e))return{system:e};const t={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let r=!1;const n=vt.splitBySpaces(e);let o=n.shift();for(;o;o=n.shift())if("normal"!==o&&-1===mt.indexOf(o))if(-1===gt.indexOf(o))if(-1===yt.indexOf(o))if(-1===bt.indexOf(o)){if(wt.isSize(o)){const e=vt.split(o,["/"]);if(t.size=e[0],e[1]?t.lineHeight=St(e[1]):"/"===n[0]&&(n.shift(),t.lineHeight=St(n.shift())),!n.length)throw At("Missing required font-family.");return t.family=vt.splitByCommas(n.join(" ")).map(Ct),t}if("normal"!==t.variant)throw At("Unknown or unsupported font token: "+t.variant);r||(t.variant=o)}else{if(r)continue;t.stretch=o}else{if(r)continue;t.style=o}else{if(r)continue;t.weight=o}else["style","variant","weight","stretch"].forEach((e=>{t[e]=o})),r=!0;throw At("Missing required font-size.")}function At(e){return new Error(xt+e)}function St(e){const t=parseFloat(e);return t.toString()===e?t:e}function Tt(e,t,{last:r=!1}={}){if("string"!=typeof e)throw new TypeError("expected a string");if(!Array.isArray(t))throw new TypeError("expected a string array of separators");if("boolean"!=typeof r)throw new TypeError("expected a Boolean value for options.last");const n=[];let o="",i=!1,s=0,a=!1,l=!1;for(const r of e)a?l?l=!1:"\\"===r?l=!0:r===a&&(a=!1):'"'===r||"'"===r?a=r:"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&-1!==t.indexOf(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}function Ct(e){return(e=e.match(dt)?e.replace(dt,"$1"):e.replace(pt,"$1")).trim()}var Rt=Object.freeze({__proto__:null,parse:Et});function _t(e,t=0){const r=[{mode:"normal",character:null}],n=[];let o=0,i="",s=null,a=null,l=t,c=e;"("===e[0]&&")"===e[e.length-1]&&(c=e.substring(1,e.length-1),l++);for(let e=0;e0&&(r[e-1].after=n.before),void 0===n.type){if(e>0){if("media-feature-expression"===r[e-1].type){n.type="keyword";continue}if("not"===r[e-1].value||"only"===r[e-1].value){n.type="media-type";continue}if("and"===r[e-1].value){n.type="media-feature-expression";continue}"media-type"===r[e-1].type&&(r[e+1]?n.type="media-feature-expression"===r[e+1].type?"keyword":"media-feature-expression":n.type="media-feature-expression")}if(0===e){if(!r[e+1]){n.type="media-type";continue}if(r[e+1]&&("media-feature-expression"===r[e+1].type||"keyword"===r[e+1].type)){n.type="media-type";continue}if(r[e+2]){if("media-feature-expression"===r[e+2].type){n.type="media-type",r[e+1].type="keyword";continue}if("keyword"===r[e+2].type){n.type="keyword",r[e+1].type="media-type";continue}}if(r[e+3]&&"media-feature-expression"===r[e+3].type){n.type="keyword",r[e+1].type="media-type",r[e+2].type="keyword";continue}}}return r}function Lt(e){const t=[];let r=0,n=0;const o=/^(\s*)url\s*\(/.exec(e);if(null!==o){let n=o[0].length,i=1;for(;i>0;){const t=e[n];"("===t&&i++,")"===t&&i--,n++}t.unshift(new zt({type:"url",value:e.substring(0,n).trim(),sourceIndex:o[1].length,before:o[1],after:/^(\s*)/.exec(e.substring(n))[1]})),r=n}for(let o=r;o0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((e=>{e.parent=this}))}function zt(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}Nt.prototype=Object.create(zt.prototype),Nt.constructor=zt,Nt.prototype.walk=function(e,t){const r="string"==typeof e||e instanceof RegExp,n=r?t:e,o="string"==typeof e?new RegExp(e):e;for(let i=0;i{})){for(let t=0;t+()\],])/g,or=/([^\\])\s+([}])/g,ir=/!important/g,sr=/___PSEUDOCLASSCOLON___/g,ar=/:/g,lr=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,cr=/(^|\D)0?\.?0(m?s)/gi,ur=/\s*(flex|flex-basis):\s*([^;}]+)/gi,hr=/\s+/,dr=/(hsla?)\(([^)]+)\)/g,pr=/(^\s+|\s+$)/g,mr=/:first-(line|letter)(\{|,)/gi,fr=/^(.*)(@charset)( "[^"]*";)/gi,gr=/^((\s*)(@charset)( [^;]+;\s*))+/gi,yr=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,br=/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi,kr=/^(.*)(@charset "[^"]*";)/g,vr=/^(\s*@charset [^;]+;\s*)+/g,wr=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,xr=/([:,( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi,Er=/\s*\/\*/g,Ar=/\*\/\s*/g,Sr=/\band\(/gi,Tr=/([^:])not\(/gi,Cr=/\bor\(/gi,Rr=/([!{}:;>+([,])\s+/g,_r=/;+\}/g,Ir=/([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi,Lr=/:0 0 0 0(;|\})/g,Nr=/:0 0 0(;|\})/g,zr=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Pr=/(:|\s)0+\.(\d+)/g,Mr=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,Or=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,Ur=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Dr=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,Fr=/___QUERY_FRACTION___/g,qr=/;;+/g,Br=/(:|\s)(#f00)(;|})/g,jr=/___PRESERVED_NEWLINE___/g,Hr=/(:|\s)(#000080)(;|})/g,Vr=/(:|\s)(#808080)(;|})/g,$r=/(:|\s)(#808000)(;|})/g,Wr=/(:|\s)(#800080)(;|})/g,Gr=/(:|\s)(#c0c0c0)(;|})/g,Yr=/(:|\s)(#008080)(;|})/g,Jr=/(:|\s)(#ffa500)(;|})/g,Qr=/(:|\s)(#800000)(;|})/g;function Kr(e="",t=Ot){const r=[],n=[];let o;const i=e;function s(t){e=e.replace(t,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,n=r.length;t0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(o.push(e.substring(s,i.index)),c){let r=e.substring(a,u);const n=r.split(",");n.length>1&&";base64"==n[0].slice(-7)?r=r.replace(Dt,""):(r=r.replace(Ft," "),r=r.replace(Dt," "),r=r.replace(pr,"")),t.push(r);const i="url(___PRESERVED_TOKEN_"+(t.length-1)+"___)";o.push(i),s=u+1}else o.push(e.substring(i.index,r.lastIndex)),s=r.lastIndex}return o.push(e.substring(s)),o.join("")}(e,n),e=function(e,t){const r=[];let n,o=0;for(;;){const i=e.indexOf("/*",o);if(!(i>-1))break;if(n=e.indexOf("*/",i+2),!(n>-1)){n=-2;break}t.push(e.slice(i+2,n)),r.push(e.slice(o,i)),r.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),o=n+2}return r.push(e.slice(n+2)),r.join("")}(e,r),s(Ht),s(Vt);for(let o=0,i=r.length;o2&&">"===e.charAt(t-3)&&(n.push(""),e=e.replace(s,Mt+(n.length-1)+"___"))}e=e.replace(`/*${s}*/`,"")}else n.push("\\"),e=e.replace(s,Mt+(n.length-1)+"___"),o+=1,n.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+o+"___",Mt+(n.length-1)+"___");else t.cuteComments?n.push(i.substring(1).replace(Wt,"\n")):t.uglyComments?n.push(i.substring(1).replace(Gt,"")):n.push(i),e=e.replace(s,Mt+(n.length-1)+"___")}if(t.expandVars){const t={};o=Yt,e=e.replace(o,((e,r)=>(o=Jt,r.replace(o,((e,r,n)=>(r&&n&&(t[r]=n),""))),""))),o=Qt,e=e.replace(o,((e,r)=>t[r]||"none"))}if(e=e.replace(Dt," "),o=Kt,e=e.replace(o,((e,t)=>(n.push("calc("+t.replace(Zt,"").replace(Xt,"(").replace(er,")")+")"),Mt+(n.length-1)+"___"))),o=tr,e=e.replace(o,((e,t)=>(n.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(n.length-1)+"___);"))),o=rr,e=(e=(e=(e=(e=e.replace(o,(e=>e.replace(ar,"___PSEUDOCLASSCOLON___")))).replace(nr,"$1")).replace(or,"$1$2")).replace(ir," !important")).replace(sr,":"),o=lr,e=e.replace(o,((e,t,r)=>t+":"+(r=r.replace(cr,((e,t,r)=>(n.push("0"+r),t+Mt+(n.length-1)+"___")))))),o=ur,e=function(e,t){const r=Bt;let n,o=0;const i=(e,r)=>{"0"===(e=e.replace(jt,"")).charAt(0)&&(t.push(e),n[r]=Mt+(t.length-1)+"___")};for(;;){let t=0;n="";let s=e.slice(o).search(r);if(s<0)break;o+=s,s=o;const a=e.length,l=[];for(;o{let o=r.split(hr);return n.push(o.pop()),o.push(Mt+(n.length-1)+"___"),o=o.join(" "),`${t}:${o}`}))).replace(dr,((e,t,r)=>{const o=[];return r.split(",").forEach((e=>{"0%"===(e=e.replace(pr,""))?(n.push("0%"),o.push(Mt+(n.length-1)+"___")):o.push(e)})),t+"("+o.join(",")+")"})),n),e=e.replace(mr,((e,t,r)=>":first-"+t.toLowerCase()+" "+r)),e=t.cuteComments?(e=e.replace(Er,"___PRESERVED_NEWLINE___/*")).replace(Ar,"*/___PRESERVED_NEWLINE___"):e.replace(Ar,"*/"),o=fr,e=e.replace(o,((e,t,r,n)=>r.toLowerCase()+n+t)),o=gr,e=e.replace(o,((e,t,r,n,o)=>r+n.toLowerCase()+o)),o=yr,e=e.replace(o,((e,t)=>"@"+t.toLowerCase())),o=br,e=(e=(e=e.replace(o,((e,t)=>":"+t.toLowerCase()))).replace(kr,"$2$1")).replace(vr,"$1"),o=wr,e=e.replace(o,((e,t)=>":"+t.toLowerCase()+"(")),o=xr,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(o,((e,t,r)=>t+r.toLowerCase()))).replace(Sr,"and (")).replace(Tr,"$1not (")).replace(Cr,"or (")).replace(Rr,"$1")).replace(_r,"}")).replace(Ir,"$1$2")).replace(Lr,":0$1")).replace(Nr,":0$1"),o=zr,e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0 0"+r))).replace(Pr,"$1.$2"),o=Mr,e=function(e){const t=qt,r=[];let n,o=0;for(;null!==(n=t.exec(e));)r.push(e.substring(o,n.index)),n[1]?r.push(n[1]+"#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7])):n[2].toLowerCase()==n[3].toLowerCase()&&n[4].toLowerCase()==n[5].toLowerCase()&&n[6].toLowerCase()==n[7].toLowerCase()?r.push("#"+(n[3]+n[5]+n[7]).toLowerCase()):r.push("#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7]).toLowerCase()),o=t.lastIndex=t.lastIndex-n[8].length;return r.push(e.substring(o)),r.join("")}(e=e.replace(o,((e,t)=>{const r=t.split(",");let n="#";for(let e=0;e255&&(t=255),n+=t.toString(16)}return n}))),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(Br,"$1red$3")).replace(Hr,"$1navy$3")).replace(Vr,"$1gray$3")).replace($r,"$1olive$3")).replace(Wr,"$1purple$3")).replace(Gr,"$1silver$3")).replace(Yr,"$1teal$3")).replace(Jr,"$1orange$3")).replace(Qr,"$1maroon$3"),o=Or,e=(e=(e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0"+r))).replace(Ur,"alpha(opacity=")).replace(Dr,"($1:$2___QUERY_FRACTION___$3)")).replace(Fr,"/"),t.maxLineLen>0){const r=[];let n=[];for(let o=0,i=e.length;ot.maxLineLen&&(r.push(n.join("")),n=[])}n.length&&r.push(n.join("")),e=r.join("\n")}if(e=(e=e.replace(qr,";")).replace(Zt,""),n.length>1e3)return i;for(let t=n.length-1;t>=0;t--)e=e.replace(Mt+t+"___",n[t],"g");return e=e.replace(jr,"\n")}var Zr=Object.freeze({__proto__:null,defaultOptions:Ot,processString:Kr}),Xr=Object.create,en=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,rn=Object.getOwnPropertyNames,nn=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty,sn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),an=(e,t)=>{for(var r in t)en(e,r,{get:t[r],enumerable:!0})},ln=sn((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e{var t=ln();e.encode=function(e){var r,n,o="",i=(n=e)<0?1+(-n<<1):0+(n<<1);do{r=31&i,(i>>>=5)>0&&(r|=32),o+=t.encode(r)}while(i>0);return o},e.decode=function(e,r,n){var o,i,s=e.length,a=0,l=0;do{if(r>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(r++))))throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(32&i),a+=(i&=31)<>1;return 1==(1&e)?-t:t}(a),n.rest=r}})),un=sn((e=>{e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=n,e.urlGenerate=o;var i,s,a=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var s=e.isAbsolute(r),a=[],l=0,c=0;;){if(l=c,-1===(c=r.indexOf("/",l))){a.push(r.slice(l));break}for(a.push(r.slice(l,c));c=0;c--)"."===(u=a[c])?a.splice(c,1):".."===u?h++:h>0&&(""===u?(a.splice(c+1,h),h=0):(a.splice(c,2),h--));return""===(r=a.join("/"))&&(r=s?"/":"."),i?(i.path=r,o(i)):r},s=[],function(e){for(var t=0;t32&&s.pop(),n});function l(e,t){""===e&&(e="."),""===t&&(t=".");var i=n(t),s=n(e);if(s&&(e=s.path||"/"),i&&!i.scheme)return s&&(i.scheme=s.scheme),o(i);if(i||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,o(s);var l="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,o(s)):l}e.normalize=a,e.join=l,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=c?u:function(e){return h(e)?"$"+e:e},e.fromSetString=c?u:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=d(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,r){var n;return 0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||(0!==(n=e.generatedColumn-t.generatedColumn)||r)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,r){var n=e.generatedColumn-t.generatedColumn;return 0!==n||r||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var i=n(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var s=i.path.lastIndexOf("/");s>=0&&(i.path=i.path.substring(0,s+1))}t=l(o(i),t)}return a(t)}})),hn=sn((e=>{var t=un(),r=Object.prototype.hasOwnProperty,n=typeof Map<"u";function o(){this._array=[],this._set=n?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n=0)return o}else{var i=t.toSetString(e);if(r.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e{var t=un();function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,r){var n=e.generatedLine,o=r.generatedLine,i=e.generatedColumn,s=r.generatedColumn;return o>n||o==n&&s>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),pn=sn((e=>{var t=cn(),r=un(),n=hn().ArraySet,o=dn().MappingList;function i(e){e||(e={}),this._file=r.getArg(e,"file",null),this._sourceRoot=r.getArg(e,"sourceRoot",null),this._skipValidation=r.getArg(e,"skipValidation",!1),this._sources=new n,this._names=new n,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,n=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=r.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),n.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=r.relative(t,o)),n._sources.has(i)||n._sources.add(i);var s=e.sourceContentFor(o);null!=s&&n.setSourceContent(o,s)})),n},i.prototype.addMapping=function(e){var t=r.getArg(e,"generated"),n=r.getArg(e,"original",null),o=r.getArg(e,"source",null),i=r.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=r.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[r.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=r.relative(s,i));var a=new n,l=new n;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var n=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=n.source&&(t.source=n.source,null!=o&&(t.source=r.join(o,t.source)),null!=s&&(t.source=r.relative(s,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}var c=t.source;null!=c&&!a.has(c)&&a.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=o&&(t=r.join(o,t)),null!=s&&(t=r.relative(s,t)),this.setSourceContent(t,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("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(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))}},i.prototype._serializeMappings=function(){for(var e,n,o,i,s=0,a=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),m=0,f=p.length;m0){if(!r.compareByGeneratedPositionsInflated(n,p[m-1]))continue;e+=","}e+=t.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(i=this._sources.indexOf(n.source),e+=t.encode(i-h),h=i,e+=t.encode(n.originalLine-1-c),c=n.originalLine-1,e+=t.encode(n.originalColumn-l),l=n.originalColumn,null!=n.name&&(o=this._names.indexOf(n.name),e+=t.encode(o-u),u=o)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=r.relative(t,e));var n=r.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i})),mn={};an(mn,{AtKeyword:()=>bn,BadString:()=>wn,BadUrl:()=>En,CDC:()=>In,CDO:()=>_n,Colon:()=>Ln,Comma:()=>zn,Comment:()=>qn,Delim:()=>An,Dimension:()=>Cn,EOF:()=>fn,Function:()=>yn,Hash:()=>kn,Ident:()=>gn,LeftCurlyBracket:()=>Dn,LeftParenthesis:()=>On,LeftSquareBracket:()=>Pn,Number:()=>Sn,Percentage:()=>Tn,RightCurlyBracket:()=>Fn,RightParenthesis:()=>Un,RightSquareBracket:()=>Mn,Semicolon:()=>Nn,String:()=>vn,Url:()=>xn,WhiteSpace:()=>Rn});var fn=0,gn=1,yn=2,bn=3,kn=4,vn=5,wn=6,xn=7,En=8,An=9,Sn=10,Tn=11,Cn=12,Rn=13,_n=14,In=15,Ln=16,Nn=17,zn=18,Pn=19,Mn=20,On=21,Un=22,Dn=23,Fn=24,qn=25;function Bn(e){return e>=48&&e<=57}function jn(e){return Bn(e)||e>=65&&e<=70||e>=97&&e<=102}function Hn(e){return e>=65&&e<=90}function Vn(e){return function(e){return Hn(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function $n(e){return Vn(e)||Bn(e)||45===e}function Wn(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Gn(e){return 10===e||13===e||12===e}function Yn(e){return Gn(e)||32===e||9===e}function Jn(e,t){return!(92!==e||Gn(t)||0===t)}function Qn(e,t,r){return 45===e?Vn(t)||45===t||Jn(t,r):!!Vn(e)||92===e&&Jn(e,t)}function Kn(e,t,r){return 43===e||45===e?Bn(t)?2:46===t&&Bn(r)?3:0:46===e?Bn(t)?2:0:Bn(e)?1:0}function Zn(e){return 65279===e||65534===e?1:0}var Xn=new Array(128),eo=130;for(let e=0;ee.length)return!1;for(let o=t;o=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var mo=["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"];function fo(e=null,t){return null===e||e.length0?Zn(t.charCodeAt(0)):0,o=fo(e.lines,r),i=fo(e.columns,r),s=e.startLine,a=e.startColumn;for(let e=n;e{})){let r=(e=String(e||"")).length,n=fo(this.offsetAndType,e.length+1),o=fo(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=r;break;case s:{let e=a&yo;for(a=o[e],s=a>>bo,o[i]=e,o[e++]=i;e>bo:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>bo,this.tokenEnd=t&yo):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>bo,this.tokenEnd=e&yo):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let r,n,o=e;e:for(;o0?this.offsetAndType[o-1]&yo:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break e;case 2:o++;break e;default:this.balance[r]===o&&(o=r)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t>bo,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:mo[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function wo(e,t){function r(t){return t=e.length?void(cString(e+r+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-n)-1,a=Math.min(t+n,i.length+1),l=Math.max(4,String(a).length)+1,c=0;(r+=(So.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length)>100&&(c=r-60+3,r=58);for(let e=s;e<=a;e++)e>=0&&e0&&i[e].length>c?"…":"")+i[e].substr(c,98)+(i[e].length>c+100-1?"…":""));return[o(s,t),new Array(r+l+2).join("-")+"^",o(t,a)].filter(Boolean).join("\n")}function Co(e,t,r,n,o){return Object.assign(Ao("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>To({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+To({source:t,line:n,column:o},2)}})}function Ro(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(void 0===o)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var _o=()=>{};function Io(e){return function(){return this[e]()}}function Lo(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function No(e){let t="",r="",n=!1,o=_o,i=!1,s=new class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,r=1,n=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||go(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||go(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},a=Object.assign(new vo,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Lo(e.atrule),pseudo:Lo(e.pseudo),node:Lo(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Io(e.parseContext[r])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Ro,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new Eo,createSingleNodeList:e=>(new Eo).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let r=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let n=t.call(this,r);return i=!0,o(e,n),i=!1,n}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&et.substring(e,r),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,r)=>oo(t,e,r),cmpStr:(e,r,n)=>io(t,e,r,n),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let r=t.substring(this.tokenStart,uo(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=mo[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),r=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,n=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(n=this.tokenEnd-1,r="Identifier is expected but function found"):r="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),n++,r="Name is expected");break;case 11:10===this.tokenType&&(n=this.tokenEnd,r="Percent sign is expected")}this.error(r,n)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>n?s.getLocationRange(e,t,r):null,getLocationFromList(e){if(n){let t=this.getFirstListNode(e),n=this.getLastListNode(e);return s.getLocationRange(null!==t?t.loc.start.offset-s.startOffset:this.tokenStart,null!==n?n.loc.end.offset-s.startOffset:this.tokenStart,r)}return null},error(e,r){let n=typeof r<"u"&&r=0&&Yn(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):s.getLocation(this.tokenStart);throw new Co(e||"Unexpected input",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},a.setSource(t,wo),s.setSource(t,l.offset,l.line,l.column),r=l.filename||"",n=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:_o,i=!1,a.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),a.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),a.parseValue=!("parseValue"in l)||Boolean(l.parseValue),a.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in a.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&a.forEachToken(((e,r,n)=>{if(25===e){let e=a.getLocation(r,n),o=io(t,n-2,n,"*/")?t.slice(r+2,n-2):t.slice(r+2,n);u(o,e)}}));let h=a.context[c].call(a,l);return a.eof||a.error(),h}),{SyntaxError:Co,config:a.config})}var zo,Po,Mo=(zo=pn(),Po=1,((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of rn(t))!on.call(e,o)&&(r||"default"!==o)&&en(e,o,{get:()=>t[o],enumerable:!(n=tn(t,o))||n.enumerable});return e})((e=>en(e,"__esModule",{value:!0}))(en(null!=zo?Xr(nn(zo)):{},"default",!Po&&zo&&zo.__esModule?{get:()=>zo.default,enumerable:!0}:{value:zo,enumerable:!0})),zo)),Oo=new Set(["Atrule","Selector","Declaration"]);var Uo={};an(Uo,{safe:()=>Ho,spec:()=>jo});var Do=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},Fo=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],qo=Fo.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function Bo(e){let t=new Set(e.map((([e,t])=>Do(e)<<16|Do(t))));return function(e,r,n){let o=Do(r,n),i=n.charCodeAt(0);return(45===i&&1!==r&&2!==r&&15!==r||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var jo=Bo(Fo),Ho=Bo(qo);function Vo(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let r=null;e.children.forEach((e=>{null!==r&&t.call(this,r),this.node(e),r=e}))}}function $o(e){wo(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function Wo(e){let t=new Map;for(let r in e.node){let n=e.node[r];"function"==typeof(n.generate||n)&&t.set(r,n.generate||n)}return function(e,r){let n="",o=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:Ho,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){n+=e},result:()=>n};r&&("function"==typeof r.decorator&&(i=r.decorator(i)),r.sourceMap&&(i=function(e){let t=new Mo.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Oo.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(n.line!==c||n.column!==u)&&(n.line=c,n.column=u,r.line=s,r.column=a,l&&(l=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:n,generated:r}))}c.call(this,e),l&&Oo.has(e.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(e,t,r){for(let t=0;ti.node(e),children:Vo,token:(e,t)=>i.token(e,t),tokenize:$o};return i.node(e),i.result()}}var{hasOwnProperty:Go}=Object.prototype,Yo=function(){};function Jo(e){return"function"==typeof e?e:Yo}function Qo(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Ko(e,t){let r=t.structure,n=[];for(let e in r){if(!1===Go.call(r,e))continue;let t=r[e],o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?o.nullable=!0:"string"==typeof e?o.type="node":Array.isArray(e)&&(o.type="list");o.type&&n.push(o)}return n.length?{context:t.walkContext,fields:n}:null}function Zo(e,t){let r=e.fields.slice(),n=e.context,o="string"==typeof n;return t&&r.reverse(),function(e,i,s,a){let l;o&&(l=i[n],i[n]=e);for(let n of r){let r=e[n.name];if(!n.nullable||r)if("list"===n.type){if(t?r.reduceRight(a,!1):r.reduce(a,!1))return!0}else if(s(r))return!0}o&&(i[n]=l)}}function Xo({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function ei(e){let t=function(e){let t={};for(let r in e.node)if(Go.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Ko(0,n)}return t}(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)Go.call(t,e)&&null!==t[e]&&(r[e]=Zo(t[e],!1),n[e]=Zo(t[e],!0));let s=Xo(r),a=Xo(n),l=function(e,l){function c(e,t,r){let n=u.call(m,e,t,r);return n===o||n!==i&&!!(d.hasOwnProperty(e.type)&&d[e.type](e,m,c,p)||h.call(m,e,t,r)===o)}let u=Yo,h=Yo,d=r,p=(e,t,r,n)=>e||c(t,r,n),m={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=Jo(l.enter),h=Jo(l.leave),l.reverse&&(d=n),l.visit)){if(s.hasOwnProperty(l.visit))d=l.reverse?a[l.visit]:s[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=Qo(u,l.visit),h=Qo(h,l.visit)}if(u===Yo&&h===Yo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let r=null;return l(e,(function(e,n,i){if(t.call(this,e,n,i))return r=e,o})),r},l.findLast=function(e,t){let r=null;return l(e,{reverse:!0,enter:function(e,n,i){if(t.call(this,e,n,i))return r=e,o}}),r},l.findAll=function(e,t){let r=[];return l(e,(function(e,n,o){t.call(this,e,n,o)&&r.push(e)})),r},l}function ti(e){return e}function ri(e,t,r,n){let o;switch(e.type){case"Group":o=function(e,t,r,n){let o=" "===e.combinator||n?e.combinator:" "+e.combinator+" ",i=e.terms.map((e=>ri(e,t,r,n))).join(o);return e.explicit||r?(n||","===i[0]?"[":"[ ")+i+(n?"]":" ]"):i}(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return ri(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?"*":0===t&&1===r?"?":1===t&&0===r?n?"#":"+":1===t&&1===r?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(0!==r?r:"")+"}")}(e),e);case"Type":o="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function ni(e,t){let r=ti,n=!1,o=!1;return"function"==typeof t?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(r=t.decorate)),ri(e,r,n,o)}var oi={offset:0,line:1,column:1};function ii(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?si(r):r:null}function si({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let e=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=e.length-1,o.column=1===e.length?o.column+n.length:e.pop().length+1}return o}var ai=function(e,t){let r=Ao("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},li=function(e,t,r,n){let o=Ao("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=function(e,t){let r,n,o=e.tokens,i=e.longestMatch,s=i1?(r=ii(a||t,"end")||si(oi,h),n=si(r)):(r=ii(a,"start")||si(ii(t,"start")||oi,h.slice(0,l)),n=ii(a,"end")||si(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?ni(t):"",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:r&&r.loc&&r.loc.source||"",start:l,end:c},o},ci=new Map,ui=new Map,hi=function(e){if(ci.has(e))return ci.get(e);let t=e.toLowerCase(),r=ci.get(t);if(void 0===r){let e=mi(t,0),n=e?"":fi(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return ci.set(e,r),r},di=function(e){if(ui.has(e))return ui.get(e);let t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");let n=mi(t,r.length);if(!n&&(t=t.toLowerCase(),ui.has(t))){let r=ui.get(t);return ui.set(e,r),r}let o=n?"":fi(t,r.length),i=t.substr(0,r.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return ui.set(e,s),s},pi=fi;function mi(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function fi(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){let r=e.indexOf("-",t+2);if(-1!==r)return e.substring(t,r+1)}return""}var gi=45,yi=!0;function bi(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function ki(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function vi(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(43===o||o===gi){if(r)return 0;t++}for(;t6)return 0}return n}function Ai(e,t,r){if(!e)return 0;for(;xi(r(t),63);){if(++e>6)return 0;t++}return t}var Si=["unset","initial","inherit"],Ti=["calc(","-moz-calc(","-webkit-calc("],Ci=new Map([[2,22],[21,22],[19,20],[23,24]]);function Ri(e,t){return te.max)return!0}return!1}function zi(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),0===n.length){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Ci.get(e.type)}o++}while(e=t(o));return o}function Pi(e){return function(t,r,n){return null===t?0:2===t.type&&Ii(t.value,Ti)?zi(t,r):e(t,r,n)}}function Mi(e){return function(t){return null===t||t.type!==e?0:1}}function Oi(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=uo(t.value,0);if(null!==e){let r=t.value.indexOf("\\",o),n=-1!==r&&Li(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return Ni(n,t.value,o)?0:1}}function Ui(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,r,n){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,r,n)}}var Di={"ident-token":Mi(1),"function-token":Mi(2),"at-keyword-token":Mi(3),"hash-token":Mi(4),"string-token":Mi(5),"bad-string-token":Mi(6),"url-token":Mi(7),"bad-url-token":Mi(8),"delim-token":Mi(9),"number-token":Mi(10),"percentage-token":Mi(11),"dimension-token":Mi(12),"whitespace-token":Mi(13),"CDO-token":Mi(14),"CDC-token":Mi(15),"colon-token":Mi(16),"semicolon-token":Mi(17),"comma-token":Mi(18),"[-token":Mi(19),"]-token":Mi(20),"(-token":Mi(21),")-token":Mi(22),"{-token":Mi(23),"}-token":Mi(24),string:Mi(5),ident:Mi(1),"custom-ident":function(e){if(null===e||1!==e.type)return 0;let t=e.value.toLowerCase();return Ii(t,Si)||_i(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==Ri(e.value,0)||45!==Ri(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;let t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(let r=1;rqi,generate:()=>ni,parse:()=>ts,walk:()=>os});var Bi=123,ji=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),Hi={" ":1,"&&":2,"||":3,"|":4};function Vi(e){return e.substringToPos(e.findWsEnd(e.pos))}function $i(e){let t=e.pos;for(;t=128||0===ji[r])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Wi(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Gi(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Yi(e){let t=null,r=null;return e.eat(Bi),t=Wi(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(r=Wi(e))):r=t,e.eat(125),{min:Number(t),max:r?Number(r):0}}function Ji(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,r=!0,t=e.charCode()===Bi?Yi(e):{min:1,max:0};break;case Bi:t=Yi(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}(e);return null!==r?(r.term=t,r):t}function Qi(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function Ki(e){let t,r=null;return e.eat(60),t=$i(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(Vi(e),r=function(e){let t=null,r=null,n=1;return e.eat(91),45===e.charCode()&&(e.peek(),n=-1),-1==n&&8734===e.charCode()?e.peek():t=n*Number(Wi(e)),Vi(e),e.eat(44),Vi(e),8734===e.charCode()?e.peek():(n=1,45===e.charCode()&&(e.peek(),n=-1),r=n*Number(Wi(e))),e.eat(93),null===t&&null===r?null:{type:"Range",min:t,max:r}}(e)),e.eat(62),Ji(e,{type:"Type",name:t,opts:r})}function Zi(e,t){function r(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort(((e,t)=>Hi[e]-Hi[t]));t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Xi(e){let t,r=[],n={},o=null,i=e.pos;for(;t=es(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===o||"Combinator"===o.type)&&(e.pos=i,e.error("Unexpected combinator")),n[t.value]=!0):null!==o&&"Combinator"!==o.type&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(t),o=t,i=e.pos);return null!==o&&"Combinator"===o.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:Zi(r,n)||" ",disallowEmpty:!1,explicit:!1}}function es(e){let t=e.charCode();if(t<128&&1===ji[t])return function(e){let t=$i(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):Ji(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return Ji(e,function(e){let t;return e.eat(91),t=Xi(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=$i(e),e.eat(39),e.eat(62),Ji(e,{type:"Property",name:t})}(e):Ki(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return Ji(e,{type:"String",value:Gi(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:Vi(e)};case 64:return t=e.nextCharCode(),t<128&&1===ji[t]?(e.pos++,{type:"AtKeyword",name:$i(e)}):Qi(e);case 42:case 43:case 63:case 35:case 33:break;case Bi:if(t=e.nextCharCode(),t<48||t>57)return Qi(e);break;default:return Qi(e)}}function ts(e){let t=new class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return et}}};function ss(e,t){return"string"==typeof e?function(e){let t=[];return wo(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,is)}var as={type:"Match"},ls={type:"Mismatch"},cs={type:"DisallowEmpty"};function us(e,t,r){return t===as&&r===ls||e===as&&t===as&&r===as?e:("If"===e.type&&e.else===ls&&t===as&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function hs(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function ds(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&hs(e.name)}function ps(e,t,r){switch(e){case" ":{let e=as;for(let r=t.length-1;r>=0;r--){e=us(t[r],e,ls)}return e}case"|":{let e=ls,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(ds(o)&&(null===r&&n>0&&ds(t[n-1])&&(r=Object.create(null),e=us({type:"Enum",map:r},as,e)),null!==r)){let e=(hs(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=us(o,as,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=ls;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?ps(e,t.filter((function(e){return e!==i})),!1):as,r=us(i,o,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?as:ls;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?ps(e,t.filter((function(e){return e!==i})),!0):as,n=us(i,o,n)}return n}}}function ms(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=ps(e.combinator,e.terms.map(ms),!1);return e.disallowEmpty&&(t=us(t,cs,ls)),t}case"Multiplier":return function(e){let t=as,r=ms(e.term);if(0===e.max)r=us(r,cs,ls),t=us(r,null,ls),t.then=us(as,as,t),e.comma&&(t.then.else=us({type:"Comma",syntax:e},t,ls));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==as&&(t=us({type:"Comma",syntax:e},t,ls)),t=us(r,us(as,as,t),ls);if(0===e.min)t=us(as,as,t);else for(let n=0;n=65&&o<=90&&(o|=32),o!==n)return!1}return!0}function ks(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function vs(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type)}function ws(e,t,r){let n=function(e,t,r){function n(){do{y++,g=yb&&(b=y)}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev}let u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,k={type:0,syntax:null,token:null,prev:null};for(n();null===f&&++m<15e3;)switch(t.type){case"Match":if(null===h){if(null!==g&&(y!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=ls;break}f=ys;break}if((t=h.nextState)===cs){if(h.matchStack===k){t=ls;break}t=as}for(;h.syntaxStack!==u;)c();h=h.prev;break;case"Mismatch":if(null!==p&&!1!==p)(null===d||y>d.tokenIndex)&&(d=p,p=!1);else if(null===d){f="Mismatch";break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,y=d.tokenIndex,g=yy){for(;y":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type&&("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value)){null===p&&(p=i(t,d)),t=ls;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=n.match;break}case"Keyword":{let e=t.name;if(null!==g){let r=g.value;if(-1!==r.indexOf("\\")&&(r=r.replace(/\\[09].*$/,"")),bs(r,e)){l(),t=as;break}}t=ls;break}case"AtKeyword":case"Function":if(null!==g&&bs(g.value,t.name)){l(),t=as;break}t=ls;break;case"Token":if(null!==g&&g.value===t.value){l(),t=as;break}t=ls;break;case"Comma":null!==g&&18===g.type?ks(k.token)?t=ls:(l(),t=vs(g)?ls:as):t=ks(k.token)||vs(g)?as:ls;break;case"String":let n="",m=y;for(;m"Type"===e.type&&e.name===t))}function Ss(e,t){return Cs(this,e,(e=>"Property"===e.type&&e.name===t))}function Ts(e){return Cs(this,e,(e=>"Keyword"===e.type))}function Cs(e,t,r){let n=Es.call(e,t);return null!==n&&n.some(r)}function Rs(e){return"node"in e?e.node:Rs(e.match[0])}function _s(e){return"node"in e?e.node:_s(e.match[e.match.length-1])}function Is(e,t,r,n,o){let i=[];return null!==r.matched&&function r(s){if(null!==s.syntax&&s.syntax.type===n&&s.syntax.name===o){let r=Rs(s),n=_s(s);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new Eo;do{if(e.appendData(t.data),t.data===n)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(s.match)&&s.match.forEach(r)}(r.matched),i}an(xs,{getTrace:()=>Es,isKeyword:()=>Ts,isProperty:()=>Ss,isType:()=>As});var{hasOwnProperty:Ls}=Object.prototype;function Ns(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function zs(e){return Boolean(e)&&Ns(e.offset)&&Ns(e.line)&&Ns(e.column)}function Ps(e,t){return function(r,n){if(!r||r.constructor!==Object)return n(r,"Type of node should be an Object");for(let o in r){let i=!0;if(!1!==Ls.call(r,o)){if("type"===o)r.type!==e&&n(r,"Wrong node type `"+r.type+"`, expected `"+e+"`");else if("loc"===o){if(null===r.loc)continue;if(r.loc&&r.loc.constructor===Object)if("string"!=typeof r.loc.source)o+=".source";else if(zs(r.loc.start)){if(zs(r.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e");else{if(!Array.isArray(n))throw new Error("Wrong value `"+n+"` in `"+e+"."+t+"` structure definition");i.push("List")}}o[t]=i.join(" | ")}return{docs:o,check:Ps(e,n)}}var Os=fs("inherit | initial | unset"),Us=fs("inherit | initial | unset | <-ms-legacy-expression>");function Ds(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:ni(e[o].syntax,{compact:t}));return n}function Fs(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:ni(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Ds(i.descriptors,t,r)};return n}function qs(e,t,r){return{matched:e,iterations:r,error:t,...xs}}function Bs(e,t,r,n){let o,i=ss(r,e.syntax);return function(e){for(let t=0;t(Object.defineProperty(i,"syntax",{value:ts(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:fs(i.syntax,o)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((r,n)=>(r[n]=this.createDescriptor(t.descriptors[n],"AtruleDescriptor",n,e),r)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e),t===Di["-ms-legacy-expression"]&&(this.valueCommonSyntax=Us))}checkAtruleName(e){if(!this.getAtrule(e))return new ai("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e);return!n.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):n.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=hi(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new ai("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new ai("Unknown property",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);return r?qs(null,r):t?Bs(this,this.getAtrule(e).prelude,t,!1):qs(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return qs(null,n);let o=this.getAtrule(e),i=hi(t);return Bs(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return"Declaration"!==e.type?qs(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(di(e).custom)return qs(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(e);return r?qs(null,r):Bs(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?Bs(this,r,t,!1):qs(null,new ai("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Bs(this,e,t,!1)):qs(null,new ai("Bad syntax"))}findValueFragments(e,t,r,n){return Is(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return Is(this,e.value,this.matchDeclaration(e),t,r)}findAllFragments(e,t,r){let n=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{n.push.apply(n,this.findDeclarationValueFragments(e,t,r))}}),n}getAtrule(e,t=!0){let r=hi(e);return(r.vendor&&t?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(e,t=!0){let r=this.getAtrule(e,t);return r&&r.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let r=di(e);return(r.vendor&&t?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(n,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),null!==s.syntax&&os(s.syntax,(function(s){if("Type"!==s.type&&"Property"!==s.type)return;let a="Type"===s.type?n.types:n.properties,l="Type"===s.type?t:r;(!hasOwnProperty.call(a,s.name)||e(n,s.name,l,a[s.name]))&&i.set(o,!0)}),this)}let t=new Map,r=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let t in this.properties)e(this,t,r,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),r=[...r.keys()].filter((e=>r.get(e))),t.length||r.length?{types:t,properties:r}:null}dump(e,t){return{generic:this.generic,types:Ds(this.types,!t,e),properties:Ds(this.properties,!t,e),atrules:Fs(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}},{hasOwnProperty:Hs}=Object.prototype,Vs={generic:!0,types:Ys,atrules:{prelude:Js,descriptors:Js},properties:Ys,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,r){for(let n in r)Hs.call(r,n)&&($s(t[n])?e(t[n],Ws(r[n])):t[n]=Ws(r[n]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function $s(e){return e&&e.constructor===Object}function Ws(e){return $s(e)?{...e}:e}function Gs(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Ys(e,t){if("string"==typeof t)return Gs(e,t);let r={...e};for(let n in t)Hs.call(t,n)&&(r[n]=Gs(Hs.call(e,n)?e[n]:void 0,t[n]));return r}function Js(e,t){let r=Ys(e,t);return!$s(r)||Object.keys(r).length?r:null}function Qs(e,t,r){for(let n in r)if(!1!==Hs.call(r,n))if(!0===r[n])n in t&&Hs.call(t,n)&&(e[n]=Ws(t[n]));else if(r[n])if("function"==typeof r[n]){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if($s(r[n])){let o={};for(let t in e[n])o[t]=Qs({},e[n][t],r[n]);for(let e in t[n])o[e]=Qs(o[e]||{},t[n][e],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce((function(e,t){return e[t]=!0,e}),{});for(let[t,r]of Object.entries(e[n]||{}))o[t]={},r&&Qs(o[t],r,i);for(let e in t[n])Hs.call(t[n],e)&&(o[e]||(o[e]={}),t[n]&&t[n][e]&&Qs(o[e],t[n][e],i));e[n]=o}return e}var Ks=(e,t)=>Qs(e,t,Vs);function Zs(e){let t=No(e),r=ei(e),n=Wo(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&!(e.children instanceof Eo)&&(e.children=(new Eo).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof Eo&&(e.children=e.children.toArray())}}),t}}}(r),s={lexer:null,createLexer:e=>new js(e,s,s.lexer.structure),tokenize:wo,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=Ks({},e);return Zs("function"==typeof t?t(r,Object.assign):Ks(r,t))}};return s.lexer=new js({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var Xs=e=>Zs(Ks({},e)),ea={};an(ea,{AnPlusB:()=>ta,Atrule:()=>ma,AtrulePrelude:()=>xa,AttributeSelector:()=>Ra,Block:()=>Ma,Brackets:()=>$a,CDC:()=>Qa,CDO:()=>tl,ClassSelector:()=>sl,Combinator:()=>hl,Comment:()=>gl,Declaration:()=>wl,DeclarationList:()=>Nl,Dimension:()=>Dl,Function:()=>Hl,Hash:()=>Jl,IdSelector:()=>sc,Identifier:()=>tc,MediaFeature:()=>hc,MediaQuery:()=>gc,MediaQueryList:()=>wc,Nth:()=>Tc,Number:()=>Lc,Operator:()=>Oc,Parentheses:()=>Bc,Percentage:()=>Wc,PseudoClassSelector:()=>Kc,PseudoElementSelector:()=>nu,Ratio:()=>cu,Raw:()=>fu,Rule:()=>wu,Selector:()=>_u,SelectorList:()=>Pu,String:()=>qu,StyleSheet:()=>Yu,TypeSelector:()=>th,UnicodeRange:()=>ah,Url:()=>gh,Value:()=>Ah,WhiteSpace:()=>_h});var ta={};an(ta,{generate:()=>pa,name:()=>ua,parse:()=>da,structure:()=>ha});var ra=43,na=45,oa=110,ia=!0;function sa(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===ra||n===na)&&(t&&this.error("Number sign is not allowed"),r++);r0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==ra&&r!==na&&this.error("Number sign is expected")),aa.call(this,0!==t),t===na?"-"+this.consume(10):this.consume(10)}var ua="AnPlusB",ha={a:[String,null],b:[String,null]};function da(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)aa.call(this,false),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,na))switch(t="-1",la.call(this,1,oa),this.tokenEnd-this.tokenStart){case 2:this.next(),r=ca.call(this);break;case 3:la.call(this,2,na),this.next(),this.skipSC(),aa.call(this,ia),r="-"+this.consume(10);break;default:la.call(this,2,na),sa.call(this,3,ia),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(ra)&&1===this.lookupType(1)){let n=0;switch(t="1",this.isDelim(ra)&&(n=1,this.next()),la.call(this,0,oa),this.tokenEnd-this.tokenStart){case 1:this.next(),r=ca.call(this);break;case 2:la.call(this,1,na),this.next(),this.skipSC(),aa.call(this,ia),r="-"+this.consume(10);break;default:la.call(this,1,na),sa.call(this,2,ia),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===ra||n===na,i=this.tokenStart+o;for(;iwa,name:()=>ya,parse:()=>va,structure:()=>ka,walkContext:()=>ba});var ya="Atrule",ba="atrule",ka={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function va(){let e,t,r=this.tokenStart,n=null,o=null;switch(this.eat(3),e=this.substrToCursor(r+1),t=e.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(n=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,e),fa):fa.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:o=hasOwnProperty.call(this.atrule,t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(ga.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:e,prelude:n,block:o}}function wa(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var xa={};an(xa,{generate:()=>Ca,name:()=>Ea,parse:()=>Ta,structure:()=>Sa,walkContext:()=>Aa});var Ea="AtrulePrelude",Aa="atrulePrelude",Sa={children:[[]]};function Ta(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Ca(e){this.children(e)}var Ra={};an(Ra,{generate:()=>Pa,name:()=>La,parse:()=>za,structure:()=>Na});function _a(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Ia(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var La="AttributeSelector",Na={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function za(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=_a.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=Ia.call(this),this.skipSC(),n=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:r,value:n,flags:o}}function Pa(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var Ma={};function Oa(e){return this.Raw(e,null,!0)}function Ua(){return this.parseWithFallback(this.Rule,Oa)}function Da(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Fa(){if(17===this.tokenType)return Da.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Da);return 17===this.tokenType&&this.next(),e}an(Ma,{generate:()=>Va,name:()=>qa,parse:()=>Ha,structure:()=>ja,walkContext:()=>Ba});var qa="Block",Ba="block",ja={children:[["Atrule","Rule","Declaration"]]};function Ha(e){let t=e?Fa:Ua,r=this.tokenStart,n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule,Oa));break;default:n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function Va(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var $a={};an($a,{generate:()=>Ja,name:()=>Wa,parse:()=>Ya,structure:()=>Ga});var Wa="Brackets",Ga={children:[[]]};function Ya(e,t){let r=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}function Ja(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Qa={};an(Qa,{generate:()=>el,name:()=>Ka,parse:()=>Xa,structure:()=>Za});var Ka="CDC",Za=[];function Xa(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function el(){this.token(15,"--\x3e")}var tl={};an(tl,{generate:()=>il,name:()=>rl,parse:()=>ol,structure:()=>nl});var rl="CDO",nl=[];function ol(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function il(){this.token(14,"\x3c!--")}var sl={};an(sl,{generate:()=>ul,name:()=>al,parse:()=>cl,structure:()=>ll});var al="ClassSelector",ll={name:String};function cl(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function ul(e){this.token(9,"."),this.token(1,e.name)}var hl={};an(hl,{generate:()=>fl,name:()=>dl,parse:()=>ml,structure:()=>pl});var dl="Combinator",pl={name:String};function ml(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function fl(e){this.tokenize(e.name)}var gl={};an(gl,{generate:()=>vl,name:()=>yl,parse:()=>kl,structure:()=>bl});var yl="Comment",bl={value:String};function kl(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function vl(e){this.token(25,"/*"+e.value+"*/")}var wl={};an(wl,{generate:()=>_l,name:()=>Sl,parse:()=>Rl,structure:()=>Cl,walkContext:()=>Tl});function xl(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function El(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Al(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Sl="Declaration",Tl="declaration",Cl={important:[Boolean,String],property:String,value:["Value","Raw"]};function Rl(){let e,t=this.tokenStart,r=this.tokenIndex,n=Il.call(this),o=mi(n),i=o?this.parseCustomProperty:this.parseValue,s=o?El:xl,a=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(Al,s):s.call(this,this.tokenIndex),o&&"Value"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(a=Ll.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(r)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:a,property:n,value:e}}function _l(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Il(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Ll(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var Nl={};function zl(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}an(Nl,{generate:()=>Ul,name:()=>Pl,parse:()=>Ol,structure:()=>Ml});var Pl="DeclarationList",Ml={children:[["Declaration"]]};function Ol(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,zl))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Ul(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var Dl={};an(Dl,{generate:()=>jl,name:()=>Fl,parse:()=>Bl,structure:()=>ql});var Fl="Dimension",ql={value:String,unit:String};function Bl(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function jl(e){this.token(12,e.value+e.unit)}var Hl={};an(Hl,{generate:()=>Yl,name:()=>Vl,parse:()=>Gl,structure:()=>Wl,walkContext:()=>$l});var Vl="Function",$l="function",Wl={name:String,children:[[]]};function Gl(e,t){let r,n=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return r=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:o,children:r}}function Yl(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Jl={};an(Jl,{generate:()=>ec,name:()=>Kl,parse:()=>Xl,structure:()=>Zl,xxx:()=>Ql});var Ql="XXX",Kl="Hash",Zl={value:String};function Xl(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function ec(e){this.token(4,"#"+e.value)}var tc={};an(tc,{generate:()=>ic,name:()=>rc,parse:()=>oc,structure:()=>nc});var rc="Identifier",nc={name:String};function oc(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function ic(e){this.token(1,e.name)}var sc={};an(sc,{generate:()=>uc,name:()=>ac,parse:()=>cc,structure:()=>lc});var ac="IdSelector",lc={name:String};function cc(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function uc(e){this.token(9,"#"+e.name)}var hc={};an(hc,{generate:()=>fc,name:()=>dc,parse:()=>mc,structure:()=>pc});var dc="MediaFeature",pc={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function mc(){let e,t=this.tokenStart,r=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:r}}function fc(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var gc={};an(gc,{generate:()=>vc,name:()=>yc,parse:()=>kc,structure:()=>bc});var yc="MediaQuery",bc={children:[["Identifier","MediaFeature","WhiteSpace"]]};function kc(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function vc(e){this.children(e)}var wc={};an(wc,{generate:()=>Sc,name:()=>xc,parse:()=>Ac,structure:()=>Ec});var xc="MediaQueryList",Ec={children:[["MediaQuery"]]};function Ac(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Sc(e){this.children(e,(()=>this.token(18,",")))}var Tc={};an(Tc,{generate:()=>Ic,name:()=>Cc,parse:()=>_c,structure:()=>Rc});var Cc="Nth",Rc={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function _c(){this.skipSC();let e,t=this.tokenStart,r=t,n=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),r=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),r=this.tokenStart),{type:"Nth",loc:this.getLocation(t,r),nth:e,selector:n}}function Ic(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var Lc={};an(Lc,{generate:()=>Mc,name:()=>Nc,parse:()=>Pc,structure:()=>zc});var Nc="Number",zc={value:String};function Pc(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Mc(e){this.token(10,e.value)}var Oc={};an(Oc,{generate:()=>qc,name:()=>Uc,parse:()=>Fc,structure:()=>Dc});var Uc="Operator",Dc={value:String};function Fc(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function qc(e){this.tokenize(e.value)}var Bc={};an(Bc,{generate:()=>$c,name:()=>jc,parse:()=>Vc,structure:()=>Hc});var jc="Parentheses",Hc={children:[[]]};function Vc(e,t){let r=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function $c(e){this.token(21,"("),this.children(e),this.token(22,")")}var Wc={};an(Wc,{generate:()=>Qc,name:()=>Gc,parse:()=>Jc,structure:()=>Yc});var Gc="Percentage",Yc={value:String};function Jc(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Qc(e){this.token(11,e.value+"%")}var Kc={};an(Kc,{generate:()=>ru,name:()=>Zc,parse:()=>tu,structure:()=>eu,walkContext:()=>Xc});var Zc="PseudoClassSelector",Xc="function",eu={name:String,children:[["Raw"],null]};function tu(){let e,t,r=this.tokenStart,n=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function ru(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var nu={};an(nu,{generate:()=>lu,name:()=>ou,parse:()=>au,structure:()=>su,walkContext:()=>iu});var ou="PseudoElementSelector",iu="function",su={name:String,children:[["Raw"],null]};function au(){let e,t,r=this.tokenStart,n=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function lu(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var cu={};an(cu,{generate:()=>mu,name:()=>hu,parse:()=>pu,structure:()=>du});function uu(){this.skipSC();let e=this.consume(10);for(let t=0;t0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}an(fu,{generate:()=>vu,name:()=>yu,parse:()=>ku,structure:()=>bu});var yu="Raw",bu={value:String};function ku(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?gu.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,n),value:this.substring(o,n)}}function vu(e){this.tokenize(e.value)}var wu={};function xu(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Eu(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}an(wu,{generate:()=>Ru,name:()=>Au,parse:()=>Cu,structure:()=>Tu,walkContext:()=>Su});var Au="Rule",Su="rule",Tu={prelude:["SelectorList","Raw"],block:["Block"]};function Cu(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Eu,xu):xu.call(this,r),t=this.Block(!0),{type:"Rule",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function Ru(e){this.node(e.prelude),this.node(e.block)}var _u={};an(_u,{generate:()=>zu,name:()=>Iu,parse:()=>Nu,structure:()=>Lu});var Iu="Selector",Lu={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Nu(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function zu(e){this.children(e)}var Pu={};an(Pu,{generate:()=>Fu,name:()=>Mu,parse:()=>Du,structure:()=>Uu,walkContext:()=>Ou});var Mu="SelectorList",Ou="selector",Uu={children:[["Selector","Raw"]]};function Du(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Fu(e){this.children(e,(()=>this.token(18,",")))}var qu={};an(qu,{generate:()=>Gu,name:()=>Vu,parse:()=>Wu,structure:()=>$u});var Bu={};an(Bu,{decode:()=>ju,encode:()=>Hu});function ju(e){let t=e.length,r=e.charCodeAt(0),n=34===r||39===r?1:0,o=1===n&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,i="";for(let r=n;r<=o;r++){let n=e.charCodeAt(r);if(92===n){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),Jn(92,n)){let t=r-1,n=lo(e,t);r=n-1,i+=po(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function Hu(e,t){let r=t?"'":'"',n=t?39:34,o="",i=!1;for(let t=0;teh,name:()=>Qu,parse:()=>Xu,structure:()=>Zu,walkContext:()=>Ku});function Ju(e){return this.Raw(e,null,!1)}var Qu="StyleSheet",Ku="stylesheet",Zu={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Xu(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(33!==this.charCodeAt(this.tokenStart+2)){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,Ju);break;default:e=this.parseWithFallback(this.Rule,Ju)}r.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:r}}function eh(e){this.children(e)}var th={};an(th,{generate:()=>sh,name:()=>nh,parse:()=>ih,structure:()=>oh});function rh(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}var nh="TypeSelector",oh={name:String};function ih(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),rh.call(this)):(rh.call(this),this.isDelim(124)&&(this.next(),rh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function sh(e){this.tokenize(e.name)}var ah={};an(ah,{generate:()=>fh,name:()=>dh,parse:()=>mh,structure:()=>ph});function lh(e,t){let r=0;for(let n=this.tokenStart+e;n6&&this.error("Too many hex digits",n)}return this.next(),r}function ch(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function uh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function hh(){let e=0;switch(this.tokenType){case 10:if(e=lh.call(this,1,!0),this.isDelim(63)){ch.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){uh.call(this,45),lh.call(this,1,!1);break}break;case 12:e=lh.call(this,1,!0),e>0&&ch.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){e=lh.call(this,0,!0),e>0&&ch.call(this,6-e);break}if(this.isDelim(63)){this.next(),ch.call(this,5);break}this.error("Hex digit or question mark is expected")}}var dh="UnicodeRange",ph={value:String};function mh(){let e=this.tokenStart;return this.eatIdent("u"),hh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function fh(e){this.tokenize(e.value)}var gh={};an(gh,{generate:()=>Eh,name:()=>vh,parse:()=>xh,structure:()=>wh});var yh={};an(yh,{decode:()=>bh,encode:()=>kh});function bh(e){let t=e.length,r=4,n=41===e.charCodeAt(t-1)?t-2:t-1,o="";for(;rRh,name:()=>Sh,parse:()=>Ch,structure:()=>Th});var Sh="Value",Th={children:[[]]};function Ch(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function Rh(e){this.children(e)}var _h={};an(_h,{generate:()=>Ph,name:()=>Lh,parse:()=>zh,structure:()=>Nh});var Ih=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Lh="WhiteSpace",Nh={value:String};function zh(){return this.eat(13),Ih}function Ph(e){this.token(13,e.value)}var Mh={generic:!0,generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents|||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"|||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"||min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","layer()":"layer( )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [||min-content|max-content|auto] , [|||min-content|max-content|auto] )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","saturate()":"saturate( )","scale()":"scale( , ? )","scale3d()":"scale3d( , , )","scaleX()":"scaleX( )","scaleY()":"scaleY( )","scaleZ()":"scaleZ( )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"