single-file.js 288 KB

1
  1. !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",n="single-file-image-loaded",r=globalThis.browser,a=e=>globalThis.dispatchEvent(e),o=globalThis.CustomEvent,s=globalThis.document,i=globalThis.HTMLDocument,l=globalThis.Blob;let c;if(c=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=[],s instanceof i&&r&&r.runtime&&r.runtime.getURL){u="single-file-new-font-face",h=e=>{const t=e.detail;c.find((e=>JSON.stringify(e)==JSON.stringify(t)))||c.push(e.detail)},globalThis.addEventListener(u,h,d);let e=s.createElement("script");e.textContent="("+function(){const e=globalThis.console,t=e=>globalThis.dispatchEvent(e),n=globalThis.CustomEvent,r=globalThis.FileReader,a=e&&e.warn&&((...t)=>e.warn(...t))||(()=>{}),o="single-file-new-font-face",s={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 e=globalThis.FontFace;let i;globalThis.FontFace=function(){i||(a("SingleFile is hooking the FontFace constructor to get font URLs."),i=!0);const c={};c["font-family"]=arguments[0],c.src=arguments[1];const u=arguments[2];if(u&&Object.keys(u).forEach((e=>{s[e]&&(c[s[e]]=u[e])})),c.src instanceof ArrayBuffer){const e=new r;e.readAsDataURL(new l([c.src])),e.addEventListener("load",(()=>{c.src="url("+e.result+")",t(new n(o,{detail:c}))}))}else t(new n(o,{detail:c}));return new e(...arguments)},globalThis.FontFace.toString=function(){return"function FontFace() { [native code] }"}}}.toString()+")()",(s.documentElement||s).appendChild(e),e.remove(),e=s.createElement("script"),e.src=r.runtime.getURL("/dist/web/hooks/hooks-frames-web.js"),e.async=!1,(s.documentElement||s).appendChild(e),e.remove()}var u,h,d;function p(){return c}function m(e){e.loadDeferredImagesBlockCookies&&a(new o("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&a(new o("single-file-block-storage-start")),e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-start")):a(new o("single-file-load-deferred-images-start"))}function f(e){e.loadDeferredImagesBlockCookies&&a(new o("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&a(new o("single-file-block-storage-end")),e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-end")):a(new o("single-file-load-deferred-images-end"))}function g(e){e.loadDeferredImagesKeepZoomLevel?a(new o("single-file-load-deferred-images-keep-zoom-level-reset")):a(new o("single-file-load-deferred-images-reset"))}var y=Object.freeze({__proto__:null,getFontsData:p,loadDeferredImagesStart:m,loadDeferredImagesEnd:f,loadDeferredImagesResetZoomLevel:g,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:n});const b=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function v(e){return e.replace(b,((e,t,n)=>{const r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}))}var k=Object.freeze({__proto__:null,process:v});const w="single-file-on-before-capture",x="single-file-on-after-capture",S="data-single-file-removed-content",E="data-single-file-hidden-content",A="data-single-file-kept-content",T="data-single-file-hidden-frame",C="data-single-file-preserved-space-element",R="data-single-file-shadow-root-element",_="data-single-file-win-id",I="data-single-file-image",L="data-single-file-poster",P="data-single-file-canvas",N="data-single-file-import",z="data-single-file-input-value",M="data-single-file-lazy-loaded-src",D="data-single-file-stylesheet",O="data-single-file-disabled-noscript",U="data-single-file-selected-content",F="data-single-file-async-script",B="*: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"],j=/^'(.*?)'$/,H=/^"(.*?)"$/,W={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},V="Page saved with SingleFile",$="Archive processed by SingleFile",Y="single-file-ui-element",G=(e,t,n)=>globalThis.addEventListener(e,t,n);function K(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function Q(e,t,n){let r;return e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(O,e.textContent),e.textContent=""})),K(e),e.head&&e.head.querySelectorAll(B).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+B+", html > body > "+B);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))})),r=t&&e.documentElement?J(t,e,e.documentElement,n):{canvases:[],images:[],posters:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:r.canvases,fonts:p(),stylesheets:ne(e),images:r.images,posters:r.posters,usedFonts:Array.from(r.usedFonts.values()),shadowRoots:r.shadowRoots,imports:r.imports,referrer:e.referrer,markedElements:r.markedElements}}function J(e,t,n,r,a={usedFonts:new Map,canvases:[],images:[],posters:[],shadowRoots:[],imports:[],markedElements:[]},o){return Array.from(n.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((n=>{let s,i,l;if(!r.autoSaveExternalSave&&(r.removeHiddenElements||r.removeUnusedFonts||r.compressHTML)&&(l=e.getComputedStyle(n),n instanceof e.HTMLElement&&r.removeHiddenElements&&(i=(o||n.closest("html > head"))&&q.includes(n.tagName)||n.closest("details"),i||(s=o||function(e,t){let n=!1;if(t){const r=t.getPropertyValue("display"),a=t.getPropertyValue("opacity"),o=t.getPropertyValue("visibility");if(n="none"==r,!n&&("0"==a||"hidden"==o)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();n=!t.width&&!t.height}}return Boolean(n)}(n,l),s&&(n.setAttribute(E,""),a.markedElements.push(n)))),!s)){if(r.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(n.setAttribute(C,""),a.markedElements.push(n))}r.removeUnusedFonts&&(Z(l,r,a.usedFonts),Z(e.getComputedStyle(n,":first-letter"),r,a.usedFonts),Z(e.getComputedStyle(n,":before"),r,a.usedFonts),Z(e.getComputedStyle(n,":after"),r,a.usedFonts))}!function(e,t,n,r,a,o,s){if("CANVAS"==n.tagName)try{const t=re(e,n,s);a.canvases.push({dataURI:n.toDataURL("image/png",""),width:t.width,height:t.height}),n.setAttribute(P,a.canvases.length-1),a.markedElements.push(n)}catch(e){}if("IMG"==n.tagName){const t={currentSrc:o?"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==":r.loadDeferredImages&&n.getAttribute(M)||n.currentSrc};if(a.images.push(t),n.setAttribute(I,a.images.length-1),a.markedElements.push(n),n.removeAttribute(M),s=s||e.getComputedStyle(n)){t.size=re(e,n,s);const r=s.getPropertyValue("box-shadow"),a=s.getPropertyValue("background-image");r&&"none"!=r||a&&"none"!=a||!(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"==n.tagName&&!n.poster){const e=t.createElement("canvas"),r=e.getContext("2d");e.width=n.clientWidth,e.height=n.clientHeight;try{r.drawImage(n,0,0,e.width,e.height),a.posters.push(e.toDataURL("image/png","")),n.setAttribute(L,a.posters.length-1),a.markedElements.push(n)}catch(e){}}"IFRAME"==n.tagName&&o&&r.removeHiddenElements&&(n.setAttribute(T,""),a.markedElements.push(n));"LINK"==n.tagName&&n.import&&n.import.documentElement&&(a.imports.push({content:oe(n.import)}),n.setAttribute(N,a.imports.length-1),a.markedElements.push(n));"INPUT"==n.tagName&&("password"!=n.type&&(n.setAttribute(z,n.value),a.markedElements.push(n)),"radio"!=n.type&&"checkbox"!=n.type||(n.setAttribute(z,n.checked),a.markedElements.push(n)));"TEXTAREA"==n.tagName&&(n.setAttribute(z,n.value),a.markedElements.push(n));"SELECT"==n.tagName&&n.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(z,""),a.markedElements.push(e))}));"SCRIPT"==n.tagName&&(n.async&&""!=n.getAttribute("async")&&"async"!=n.getAttribute("async")&&(n.setAttribute(F,""),a.markedElements.push(n)),n.textContent=n.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,n,r,a,s,l);const c=!(n instanceof e.SVGElement)&&X(n);if(c&&!n.classList.contains(Y)){const o={};n.setAttribute(R,a.shadowRoots.length),a.markedElements.push(n),a.shadowRoots.push(o),J(e,t,c,r,a,s),o.content=c.innerHTML,o.delegatesFocus=c.delegatesFocus,o.mode=c.mode,c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(o.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))))}J(e,t,n,r,a,s),!r.autoSaveExternalSave&&r.removeHiddenElements&&o&&(i||""==n.getAttribute(A)?n.parentElement&&(n.parentElement.setAttribute(A,""),a.markedElements.push(n.parentElement)):s&&(n.setAttribute(S,""),a.markedElements.push(n)))})),a}function Z(e,t,n){if(e){const r=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((a=>{if(a=ee(a),!t.loadedFonts||t.loadedFonts.find((e=>ee(e.family)==a&&e.style==r))){const t=ie(e.getPropertyValue("font-weight")),o=e.getPropertyValue("font-variant")||"normal",s=[a,t,r,o];n.set(JSON.stringify(s),[a,t,r,o])}}))}}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(v(e.trim())).toLowerCase()}function te(e,t){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 n=[S,T,E,C,I,L,P,z,R,N,D,F];t=e.querySelectorAll(n.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(S),e.removeAttribute(E),e.removeAttribute(A),e.removeAttribute(T),e.removeAttribute(C),e.removeAttribute(I),e.removeAttribute(L),e.removeAttribute(P),e.removeAttribute(z),e.removeAttribute(R),e.removeAttribute(N),e.removeAttribute(D),e.removeAttribute(F)}))}function ne(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((n,r)=>{try{const a=e.createElement("style");a.textContent=n.textContent,e.body.appendChild(a);const o=a.sheet;a.remove(),o&&o.cssRules.length==n.sheet.cssRules.length||(n.setAttribute(D,r),t[r]=Array.from(n.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function re(e,t,n){let r=t.naturalWidth,a=t.naturalHeight;if(!r&&!a){let o,s,i,l,c,u,h,d,p=!1;if("content-box"==(n=n||e.getComputedStyle(t)).getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),n=t.style.getPropertyPriority("box-sizing"),r=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),p=t.clientWidth!=r,e?t.style.setProperty("box-sizing",e,n):t.style.removeProperty("box-sizing")}o=ae("padding-left",n),s=ae("padding-right",n),i=ae("padding-top",n),l=ae("padding-bottom",n),p?(c=ae("border-left-width",n),u=ae("border-right-width",n),h=ae("border-top-width",n),d=ae("border-bottom-width",n)):c=u=h=d=0,r=Math.max(0,t.clientWidth-o-s-c-u),a=Math.max(0,t.clientHeight-i-l-h-d)}return{pxWidth:r,pxHeight:a}}function ae(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function oe(e){const t=e.doctype;let n="";return t&&(n="<!DOCTYPE "+t.nodeName,t.publicId?(n+=' PUBLIC "'+t.publicId+'"',t.systemId&&(n+=' "'+t.systemId+'"')):t.systemId&&(n+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(n+=" ["+t.internalSubset+"]"),n+="> "),n+e.documentElement.outerHTML}function se(e){return(e=e.match(j)?e.replace(j,"$1"):e.replace(H,"$1")).trim()}function ie(e){return W[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(){G("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),n=new Promise((t=>G(e+"-response",t)));(e=>{globalThis.dispatchEvent(e)})(t),t.defaultPrevented&&await n}))},initDoc:K,preProcessDoc:Q,postProcessDoc:te,serialize:oe,removeQuotes:se,flatten:le,getFontWeight:ie,normalizeFontFamily:ee,getShadowRoot:X,ON_BEFORE_CAPTURE_EVENT_NAME:w,ON_AFTER_CAPTURE_EVENT_NAME:x,WIN_ID_ATTRIBUTE_NAME:_,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:C,REMOVED_CONTENT_ATTRIBUTE_NAME:S,HIDDEN_CONTENT_ATTRIBUTE_NAME:E,HIDDEN_FRAME_ATTRIBUTE_NAME:T,IMAGE_ATTRIBUTE_NAME:I,POSTER_ATTRIBUTE_NAME:L,CANVAS_ATTRIBUTE_NAME:P,INPUT_VALUE_ATTRIBUTE_NAME:z,SHADOW_ROOT_ATTRIBUTE_NAME:R,HTML_IMPORT_ATTRIBUTE_NAME:N,LAZY_SRC_ATTRIBUTE_NAME:M,STYLESHEET_ATTRIBUTE_NAME:D,SELECTED_CONTENT_ATTRIBUTE_NAME:U,ASYNC_SCRIPT_ATTRIBUTE_NAME:F,COMMENT_HEADER:V,COMMENT_HEADER_LEGACY:$,SINGLE_FILE_UI_ELEMENT_CLASS:Y});const ue=M,he=Y,de="attributes",pe=globalThis.browser,me=globalThis.document,fe=globalThis.MutationObserver,ge=(e,t,n)=>globalThis.addEventListener(e,t,n),ye=(e,t,n)=>globalThis.removeEventListener(e,t,n),be=new Map;async function ve(e){if(me.documentElement){be.clear();const r=Math.max(me.documentElement.scrollHeight-1.5*me.documentElement.clientHeight,0),a=Math.max(me.documentElement.scrollWidth-1.5*me.documentElement.clientWidth,0);if(globalThis.scrollY<=r&&globalThis.scrollX<=a)return function(e){return new Promise((async r=>{let a;const o=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&&(a=!0,await xe(s,e,h),o.size||await we(s,e,h))}}));async function i(t){await Ee("idleTimeout",(async()=>{a?(Ae("idleTimeout"),await i(Math.max(500,t/2))):(Ae("loadTimeout"),Ae("maxTimeout"),Se(s,e,h))}),t)}function l(e){const t=e.target;t.removeAttribute(ue),t.removeEventListener("load",l)}async function c(t){a=!0,await xe(s,e,h),await we(s,e,h),t.detail&&o.add(t.detail)}async function u(t){await xe(s,e,h),await we(s,e,h),o.delete(t.detail),o.size||await we(s,e,h)}function h(e){s.disconnect(),ye(t,c),ye(n,u),r(e)}await i(2*e.loadDeferredImagesMaxIdleTime),await xe(s,e,h),s.observe(me,{subtree:!0,childList:!0,attributes:!0}),ge(t,c),ge(n,u),m(e)}))}(e)}}function ke(e){g(e)}async function we(e,t,n){await Ee("loadTimeout",(()=>Se(e,t,n)),t.loadDeferredImagesMaxIdleTime)}async function xe(e,t,n){await Ee("maxTimeout",(async()=>{await Ae("loadTimeout"),await Se(e,t,n)}),10*t.loadDeferredImagesMaxIdleTime)}async function Se(e,t,n){await Ae("idleTimeout"),f(t),await Ee("endTimeout",(async()=>{await Ae("maxTimeout"),n()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Ee(e,t,n){if(pe&&pe.runtime&&pe.runtime.sendMessage){if(!be.get(e)||!be.get(e).pending){const r={callback:t,pending:!0};be.set(e,r),await pe.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:n}),r.pending=!1}}else{const r=be.get(e);r&&globalThis.clearTimeout(r),be.set(e,t),globalThis.setTimeout(t,n)}}async function Ae(e){if(pe&&pe.runtime&&pe.runtime.sendMessage)await pe.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e});else{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);t&&(be.delete(e.type),t.callback())}}));var Te=Object.freeze({__proto__:null,process:ve,resetZoomLevel:ke});const Ce={ON_BEFORE_CAPTURE_EVENT_NAME:w,ON_AFTER_CAPTURE_EVENT_NAME:x,WIN_ID_ATTRIBUTE_NAME:_,preProcessDoc:Q,serialize:oe,postProcessDoc:te,getShadowRoot:X},Re="__frameTree__::",_e='iframe, frame, object[type="text/html"][data]',Ie="singlefile.frameTree.initRequest",Le="singlefile.frameTree.ackInitRequest",Pe="singlefile.frameTree.cleanupRequest",Ne="singlefile.frameTree.initResponse",ze=".",Me=globalThis.window==globalThis.top,De=globalThis.browser,Oe=globalThis.top,Ue=globalThis.MessageChannel,Fe=globalThis.document,Be=new Map;let qe;function je(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function He(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;Me||(qe=globalThis.frameId=e.windowId),$e(Fe,e.options,qe,t),Me||(e.options.userScriptEnabled&&n&&await n(Ce.ON_BEFORE_CAPTURE_EVENT_NAME),Qe({frames:[Ze(Fe,globalThis,qe,e.options)],sessionId:t,requestedFrameId:Fe.documentElement.dataset.requestedFrameId&&qe}),e.options.userScriptEnabled&&n&&await n(Ce.ON_AFTER_CAPTURE_EVENT_NAME),delete Fe.documentElement.dataset.requestedFrameId)}function We(e){const t=e.sessionId;Ke(Xe(Fe),e.windowId,t)}function Ve(e){e.frames.forEach((t=>Ye("responseTimeouts",e.sessionId,t.windowId)));const t=Be.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let n=t.frames.find((t=>e.windowId==t.windowId));n||(n={windowId:e.windowId},t.frames.push(n)),n.processed||(n.content=e.content,n.baseURI=e.baseURI,n.title=e.title,n.canvases=e.canvases,n.fonts=e.fonts,n.stylesheets=e.stylesheets,n.images=e.images,n.posters=e.posters,n.usedFonts=e.usedFonts,n.shadowRoots=e.shadowRoots,n.imports=e.imports,n.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(ze).length-e.windowId.split(ze).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function $e(e,t,n,r){const a=Xe(e);!function(e,t,n,r,a){const o=[];let s;Be.get(a)?s=Be.get(a).requestTimeouts:(s={},Be.set(a,{requestTimeouts:s}));t.forEach(((e,t)=>{const n=r+ze+t;e.setAttribute(Ce.WIN_ID_ATTRIBUTE_NAME,n),o.push({windowId:n})})),Qe({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),t.forEach(((e,t)=>{const o=r+ze+t;try{Je(e.contentWindow,{method:Ie,windowId:o,sessionId:a,options:n})}catch(e){}s[o]=globalThis.setTimeout((()=>Qe({frames:[{windowId:o,processed:!0}],sessionId:a})),750)})),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r),a.length&&function(e,t,n,r,a){const o=[];t.forEach(((e,t)=>{const s=r+ze+t;let i;try{i=e.contentDocument}catch(e){}if(i)try{const t=e.contentWindow;t.stop(),Ye("requestTimeouts",a,s),$e(i,n,s,a),o.push(Ze(i,t,s,n))}catch(e){o.push({windowId:s,processed:!0})}})),Qe({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r)}function Ye(e,t,n){const r=Be.get(t);if(r&&r[e]){const t=r[e][n];t&&(globalThis.clearTimeout(t),delete r[e][n])}}function Ge(e,t){const n=Be.get(e);n&&n.responseTimeouts&&(n.responseTimeouts[t]=globalThis.setTimeout((()=>Qe({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function Ke(e,t,n){e.forEach(((e,r)=>{const a=t+ze+r;e.removeAttribute(Ce.WIN_ID_ATTRIBUTE_NAME);try{Je(e.contentWindow,{method:Pe,windowId:a,sessionId:n})}catch(e){}})),e.forEach(((e,r)=>{const a=t+ze+r;let o;try{o=e.contentDocument}catch(e){}if(o)try{Ke(Xe(o),a,n)}catch(e){}}))}function Qe(e){e.method=Ne;try{Oe.singlefile.processors.frameTree.initResponse(e)}catch(t){Je(Oe,e,!0)}}function Je(e,t,n){if(e==Oe&&De&&De.runtime&&De.runtime.sendMessage)De.runtime.sendMessage(t);else if(n){const n=new Ue;e.postMessage(Re+JSON.stringify({method:t.method,sessionId:t.sessionId}),"*",[n.port2]),n.port1.postMessage(t)}else e.postMessage(Re+JSON.stringify(t),"*")}function Ze(e,t,n,r){const a=Ce.preProcessDoc(e,t,r),o=Ce.serialize(e);Ce.postProcessDoc(e,a.markedElements);return{windowId:n,content:o,baseURI:e.baseURI.split("#")[0],title:e.title,canvases:a.canvases,fonts:a.fonts,stylesheets:a.stylesheets,images:a.images,posters:a.posters,usedFonts:a.usedFonts,shadowRoots:a.shadowRoots,imports:a.imports,processed:!0}}function Xe(e){let t=Array.from(e.querySelectorAll(_e));return e.querySelectorAll("*").forEach((e=>{const n=Ce.getShadowRoot(e);n&&(t=t.concat(...n.querySelectorAll(_e)))})),t}Me&&(qe="0",De&&De.runtime&&De.runtime.onMessage&&De.runtime.onMessage.addListener&&De.runtime.onMessage.addListener((e=>e.method==Ne?(Ve(e),Promise.resolve({})):e.method==Le?(Ye("requestTimeouts",e.sessionId,e.windowId),Ge(e.sessionId,e.windowId),Promise.resolve({})):void 0))),((e,t,n)=>{globalThis.addEventListener(e,t,n)})("message",(async e=>{if("string"==typeof e.data&&e.data.startsWith(Re)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(Re.length));if(t.method==Ie)e.source&&Je(e.source,{method:Le,windowId:t.windowId,sessionId:t.sessionId}),Me||(globalThis.stop(),t.options.loadDeferredImages&&ve(t.options),await He(t));else if(t.method==Le)Ye("requestTimeouts",t.sessionId,t.windowId),Ge(t.sessionId,t.windowId);else if(t.method==Pe)We(t);else if(t.method==Ne&&Be.get(t.sessionId)){e.ports[0].onmessage=e=>Ve(e.data)}}}),!0);var et=Object.freeze({__proto__:null,getAsync:function(e){const t=je();return e=JSON.parse(JSON.stringify(e)),new Promise((n=>{Be.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,n(e)}}),He({windowId:qe,sessionId:t,options:e})}))},getSync:function(e){const t=je();e=JSON.parse(JSON.stringify(e)),Be.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,n=globalThis._singleFile_waitForUserScript;Me||(qe=globalThis.frameId=e.windowId);$e(Fe,e.options,qe,t),Me||(e.options.userScriptEnabled&&n&&n(Ce.ON_BEFORE_CAPTURE_EVENT_NAME),Qe({frames:[Ze(Fe,globalThis,qe,e.options)],sessionId:t,requestedFrameId:Fe.documentElement.dataset.requestedFrameId&&qe}),e.options.userScriptEnabled&&n&&n(Ce.ON_AFTER_CAPTURE_EVENT_NAME),delete Fe.documentElement.dataset.requestedFrameId)}({windowId:qe,sessionId:t,options:e});const n=Be.get(t).frames;return n.sessionId=t,n},cleanup:function(e){Be.delete(e),We({windowId:qe,sessionId:e,options:{sessionId:e}})},initResponse:Ve,TIMEOUT_INIT_REQUEST_MESSAGE:750});const tt=globalThis.browser,nt=globalThis.document;if(nt instanceof globalThis.HTMLDocument){const e=nt.createElement("script");e.async=!1,tt&&tt.runtime&&tt.runtime.getURL&&(e.src=tt.runtime.getURL("/dist/web/hooks/hooks-web.js"),e.async=!1),(nt.documentElement||nt).appendChild(e),e.remove()}var rt=Object.freeze({__proto__:null}),at=Object.freeze({__proto__:null,frameTree:et,hooks:rt,hooksFrames:y,lazy:Te});const ot=/^'(.*?)'$/,st=/^"(.*?)"$/,it=["inherit","initial","unset"],lt=["caption","icon","menu","message-box","small-caption","status-bar"],ct=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],ut=["normal","italic","oblique"],ht=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],dt=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"],pt={splitBySpaces:function(e){return vt(e,[" ","\n","\t"])},split:vt,splitByCommas:function(e){return vt(e,[","],{last:!0})}},mt={isSize:function(e){return!isNaN(parseFloat(e))||-1!==e.indexOf("/")||-1!==dt.indexOf(e)}},ft="[parse-css-font] ";function gt(e){if("string"!=typeof e)throw new TypeError(ft+"Expected a string.");if(""===e)throw yt("Cannot parse an empty string.");if(-1!==lt.indexOf(e))return{system:e};const t={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let n=!1;const r=pt.splitBySpaces(e);let a=r.shift();for(;a;a=r.shift())if("normal"!==a&&-1===it.indexOf(a))if(-1===ct.indexOf(a))if(-1===ut.indexOf(a))if(-1===ht.indexOf(a)){if(mt.isSize(a)){const e=pt.split(a,["/"]);if(t.size=e[0],e[1]?t.lineHeight=bt(e[1]):"/"===r[0]&&(r.shift(),t.lineHeight=bt(r.shift())),!r.length)throw yt("Missing required font-family.");return t.family=pt.splitByCommas(r.join(" ")).map(kt),t}if("normal"!==t.variant)throw yt("Unknown or unsupported font token: "+t.variant);n||(t.variant=a)}else{if(n)continue;t.stretch=a}else{if(n)continue;t.style=a}else{if(n)continue;t.weight=a}else["style","variant","weight","stretch"].forEach((e=>{t[e]=a})),n=!0;throw yt("Missing required font-size.")}function yt(e){return new Error(ft+e)}function bt(e){const t=parseFloat(e);return t.toString()===e?t:e}function vt(e,t,{last:n=!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 n)throw new TypeError("expected a Boolean value for options.last");const r=[];let a="",o=!1,s=0,i=!1,l=!1;for(const n of e)i?l?l=!1:"\\"===n?l=!0:n===i&&(i=!1):'"'===n||"'"===n?i=n:"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&-1!==t.indexOf(n)&&(o=!0),o?(""!==a&&r.push(a.trim()),a="",o=!1):a+=n;return(n||""!==a)&&r.push(a.trim()),r}function kt(e){return(e=e.match(ot)?e.replace(ot,"$1"):e.replace(st,"$1")).trim()}var wt=Object.freeze({__proto__:null,parse:gt});function xt(e,t=0){const n=[{mode:"normal",character:null}],r=[];let a=0,o="",s=null,i=null,l=t,c=e;"("===e[0]&&")"===e[e.length-1]&&(c=e.substring(1,e.length-1),l++);for(let e=0;e<c.length;e++){const t=c[e];if("'"!==t&&'"'!==t||(!0===n[a].isCalculationEnabled?(n.push({mode:"string",isCalculationEnabled:!1,character:t}),a++):"string"===n[a].mode&&n[a].character===t&&"\\"!==c[e-1]&&(n.pop(),a--)),"{"===t?(n.push({mode:"interpolation",isCalculationEnabled:!0}),a++):"}"===t&&(n.pop(),a--),"normal"===n[a].mode&&":"===t){const t=c.substring(e+1);i={type:"value",before:/^(\s*)/.exec(t)[1],after:/(\s*)$/.exec(t)[1],value:t.trim()},i.sourceIndex=i.before.length+e+1+l,s={type:"colon",sourceIndex:e+l,after:i.before,value:":"};break}o+=t}return o={type:"media-feature",before:/^(\s*)/.exec(o)[1],after:/(\s*)$/.exec(o)[1],value:o.trim()},o.sourceIndex=o.before.length+l,r.push(o),null!==s&&(s.before=o.after,r.push(s)),null!==i&&r.push(i),r}function St(e,t=0){const n=[];let r,a=0,o=!1;r={before:"",after:"",value:""};for(let s=0;s<e.length;s++){const i=e[s];o?(r.value+=i,"{"!==i&&"("!==i||a++,")"!==i&&"}"!==i||a--):-1!==i.search(/\s/)?r.before+=i:("("===i&&(r.type="media-feature-expression",a++),r.value=i,r.sourceIndex=t+s,o=!0),!o||0!==a||")"!==i&&s!==e.length-1&&-1===e[s+1].search(/\s/)||(-1!==["not","only","and"].indexOf(r.value)&&(r.type="keyword"),"media-feature-expression"===r.type&&(r.nodes=xt(r.value,r.sourceIndex)),n.push(Array.isArray(r.nodes)?new At(r):new Tt(r)),r={before:"",after:"",value:""},o=!1)}for(let e=0;e<n.length;e++)if(r=n[e],e>0&&(n[e-1].after=r.before),void 0===r.type){if(e>0){if("media-feature-expression"===n[e-1].type){r.type="keyword";continue}if("not"===n[e-1].value||"only"===n[e-1].value){r.type="media-type";continue}if("and"===n[e-1].value){r.type="media-feature-expression";continue}"media-type"===n[e-1].type&&(n[e+1]?r.type="media-feature-expression"===n[e+1].type?"keyword":"media-feature-expression":r.type="media-feature-expression")}if(0===e){if(!n[e+1]){r.type="media-type";continue}if(n[e+1]&&("media-feature-expression"===n[e+1].type||"keyword"===n[e+1].type)){r.type="media-type";continue}if(n[e+2]){if("media-feature-expression"===n[e+2].type){r.type="media-type",n[e+1].type="keyword";continue}if("keyword"===n[e+2].type){r.type="keyword",n[e+1].type="media-type";continue}}if(n[e+3]&&"media-feature-expression"===n[e+3].type){r.type="keyword",n[e+1].type="media-type",n[e+2].type="keyword";continue}}}return n}function Et(e){const t=[];let n=0,r=0;const a=/^(\s*)url\s*\(/.exec(e);if(null!==a){let r=a[0].length,o=1;for(;o>0;){const t=e[r];"("===t&&o++,")"===t&&o--,r++}t.unshift(new Tt({type:"url",value:e.substring(0,r).trim(),sourceIndex:a[1].length,before:a[1],after:/^(\s*)/.exec(e.substring(r))[1]})),n=r}for(let a=n;a<e.length;a++){const o=e[a];if("("===o&&r++,")"===o&&r--,0===r&&","===o){const r=e.substring(n,a),o=/^(\s*)/.exec(r)[1];t.push(new At({type:"media-query",value:r.trim(),sourceIndex:n+o.length,nodes:St(r,n),before:o,after:/(\s*)$/.exec(r)[1]})),n=a+1}}const o=e.substring(n),s=/^(\s*)/.exec(o)[1];return t.push(new At({type:"media-query",value:o.trim(),sourceIndex:n+s.length,nodes:St(o,n),before:s,after:/(\s*)$/.exec(o)[1]})),t}function At(e){this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?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 Tt(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}At.prototype=Object.create(Tt.prototype),At.constructor=Tt,At.prototype.walk=function(e,t){const n="string"==typeof e||e instanceof RegExp,r=n?t:e,a="string"==typeof e?new RegExp(e):e;for(let o=0;o<this.nodes.length;o++){const s=this.nodes[o];if((!n||a.test(s.type))&&r&&!1===r(s,o,this.nodes))return!1;if(s.nodes&&!1===s.walk(e,t))return!1}return!0},At.prototype.each=function(e=(()=>{})){for(let t=0;t<this.nodes.length;t++){if(!1===e(this.nodes[t],t,this.nodes))return!1}return!0};var Ct=Object.freeze({__proto__:null,parseMediaList:Et});const Rt="___PRESERVED_TOKEN_",_t={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},It=/url\(\s*(["']?)data:/g,Lt=/\s+/g,Pt=/\n/g;const Nt=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const zt=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Mt=/(^\s|\s$)/g;const Dt=/("([^\\"]|\\.|\\)*")|('([^\\']|\\.|\\)*')/g,Ot=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Ut=/\r\n/g,Ft=/[\r\n]/g,Bt=/@variables\s*\{\s*([^}]+)\s*\}/g,qt=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,jt=/var\s*\(\s*([^)]+)\s*\)/g,Ht=/calc\(([^;}]*)\)/g,Wt=/(^\s*|\s*$)/g,Vt=/\( /g,$t=/ \)/g,Yt=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,Gt=/(^|\})(([^{:])+:)+([^{]*{)/g,Kt=/\s+([!{;:>+()\],])/g,Qt=/([^\\])\s+([}])/g,Jt=/!important/g,Zt=/___PSEUDOCLASSCOLON___/g,Xt=/:/g,en=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,tn=/(^|\D)0?\.?0(m?s)/gi,nn=/\s*(flex|flex-basis):\s*([^;}]+)/gi,rn=/\s+/,an=/(hsla?)\(([^)]+)\)/g,on=/(^\s+|\s+$)/g,sn=/:first-(line|letter)(\{|,)/gi,ln=/^(.*)(@charset)( "[^"]*";)/gi,cn=/^((\s*)(@charset)( [^;]+;\s*))+/gi,un=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,hn=/:(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,dn=/^(.*)(@charset "[^"]*";)/g,pn=/^(\s*@charset [^;]+;\s*)+/g,mn=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,fn=/([:,( ]\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,gn=/\s*\/\*/g,yn=/\*\/\s*/g,bn=/\band\(/gi,vn=/([^:])not\(/gi,kn=/\bor\(/gi,wn=/([!{}:;>+([,])\s+/g,xn=/;+\}/g,Sn=/([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,En=/:0 0 0 0(;|\})/g,An=/:0 0 0(;|\})/g,Tn=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Cn=/(:|\s)0+\.(\d+)/g,Rn=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,_n=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,In=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Ln=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,Pn=/___QUERY_FRACTION___/g,Nn=/;;+/g,zn=/(:|\s)(#f00)(;|})/g,Mn=/___PRESERVED_NEWLINE___/g,Dn=/(:|\s)(#000080)(;|})/g,On=/(:|\s)(#808080)(;|})/g,Un=/(:|\s)(#808000)(;|})/g,Fn=/(:|\s)(#800080)(;|})/g,Bn=/(:|\s)(#c0c0c0)(;|})/g,qn=/(:|\s)(#008080)(;|})/g,jn=/(:|\s)(#ffa500)(;|})/g,Hn=/(:|\s)(#800000)(;|})/g;function Wn(e="",t=_t){const n=[],r=[];let a;const o=e;e=function(e,t){const n=[];let r,a=0;for(;;){const o=e.indexOf("/*",a);if(!(o>-1))break;if(r=e.indexOf("*/",o+2),!(r>-1)){r=-2;break}t.push(e.slice(o+2,r)),n.push(e.slice(a,o)),n.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),a=r+2}return n.push(e.slice(r+2)),n.join("")}(e=function(e,t){const n=It,r=e.length-1,a=[];let o,s=0;for(;null!==(o=n.exec(e));){const i=o.index+4;let l=o[1];0===l.length&&(l=")");let c=!1,u=n.lastIndex-1;for(;!1===c&&u+1<=r&&-1!=u;)u=e.indexOf(l,u+1),u>0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(a.push(e.substring(s,o.index)),c){let n=e.substring(i,u);const r=n.split(",");r.length>1&&";base64"==r[0].slice(-7)?n=n.replace(Lt,""):(n=n.replace(Pt," "),n=n.replace(Lt," "),n=n.replace(on,"")),t.push(n);const o="url(___PRESERVED_TOKEN_"+(t.length-1)+"___)";a.push(o),s=u+1}else a.push(e.substring(o.index,n.lastIndex)),s=n.lastIndex}return a.push(e.substring(s)),a.join("")}(e,r),n),a=Dt,e=e.replace(a,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,r=n.length;t<r;t+=1)e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+t+"___",n[t]);return e=e.replace(Ot,"alpha(opacity="),r.push(e),t+Rt+(r.length-1)+"___"+t}));for(let a=0,o=n.length;a<o;a+=1){const o=n[a],s="___PRESERVE_CANDIDATE_COMMENT_"+a+"___";if("!"!==o.charAt(0))if("\\"!==o.charAt(o.length-1)){if(0===o.length){const t=e.indexOf(s);t>2&&">"===e.charAt(t-3)&&(r.push(""),e=e.replace(s,Rt+(r.length-1)+"___"))}e=e.replace(`/*${s}*/`,"")}else r.push("\\"),e=e.replace(s,Rt+(r.length-1)+"___"),a+=1,r.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+a+"___",Rt+(r.length-1)+"___");else t.cuteComments?r.push(o.substring(1).replace(Ut,"\n")):t.uglyComments?r.push(o.substring(1).replace(Ft,"")):r.push(o),e=e.replace(s,Rt+(r.length-1)+"___")}if(t.expandVars){const t={};a=Bt,e=e.replace(a,((e,n)=>(a=qt,n.replace(a,((e,n,r)=>(n&&r&&(t[n]=r),""))),""))),a=jt,e=e.replace(a,((e,n)=>t[n]||"none"))}if(e=e.replace(Lt," "),a=Ht,e=e.replace(a,((e,t)=>(r.push("calc("+t.replace(Wt,"").replace(Vt,"(").replace($t,")")+")"),Rt+(r.length-1)+"___"))),a=Yt,e=e.replace(a,((e,t)=>(r.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(r.length-1)+"___);"))),a=Gt,e=(e=(e=(e=(e=e.replace(a,(e=>e.replace(Xt,"___PSEUDOCLASSCOLON___")))).replace(Kt,"$1")).replace(Qt,"$1$2")).replace(Jt," !important")).replace(Zt,":"),a=en,e=e.replace(a,((e,t,n)=>t+":"+(n=n.replace(tn,((e,t,n)=>(r.push("0"+n),t+Rt+(r.length-1)+"___")))))),a=nn,e=(e=function(e,t){const n=zt;let r,a=0;const o=(e,n)=>{"0"===(e=e.replace(Mt,"")).charAt(0)&&(t.push(e),r[n]=Rt+(t.length-1)+"___")};for(;;){let t=0;r="";let s=e.slice(a).search(n);if(s<0)break;a+=s,s=a;const i=e.length,l=[];for(;a<i;++a){const n=e.charAt(a);if("{"===n)0===t?l.push(r.replace(Mt,"")):1===t&&(r=r.split(","),r.forEach(o),l.push(r.join(",").replace(Mt,""))),r="",t+=1;else if("}"===n){if(2===t)l.push("{"+r.replace(Mt,"")+"}"),r="";else if(1===t){e=e.slice(0,s)+l.shift()+"{"+l.join("")+e.slice(a);break}t-=1}if(t<0)break;"{"!==n&&"}"!==n&&(r+=n)}}return e}(e=(e=e.replace(a,((e,t,n)=>{let a=n.split(rn);return r.push(a.pop()),a.push(Rt+(r.length-1)+"___"),a=a.join(" "),`${t}:${a}`}))).replace(an,((e,t,n)=>{const a=[];return n.split(",").forEach((e=>{"0%"===(e=e.replace(on,""))?(r.push("0%"),a.push(Rt+(r.length-1)+"___")):a.push(e)})),t+"("+a.join(",")+")"})),r)).replace(sn,((e,t,n)=>":first-"+t.toLowerCase()+" "+n)),e=t.cuteComments?(e=e.replace(gn,"___PRESERVED_NEWLINE___/*")).replace(yn,"*/___PRESERVED_NEWLINE___"):e.replace(yn,"*/"),a=ln,e=e.replace(a,((e,t,n,r)=>n.toLowerCase()+r+t)),a=cn,e=e.replace(a,((e,t,n,r,a)=>n+r.toLowerCase()+a)),a=un,e=e.replace(a,((e,t)=>"@"+t.toLowerCase())),a=hn,e=(e=(e=e.replace(a,((e,t)=>":"+t.toLowerCase()))).replace(dn,"$2$1")).replace(pn,"$1"),a=mn,e=e.replace(a,((e,t)=>":"+t.toLowerCase()+"(")),a=fn,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(a,((e,t,n)=>t+n.toLowerCase()))).replace(bn,"and (")).replace(vn,"$1not (")).replace(kn,"or (")).replace(wn,"$1")).replace(xn,"}")).replace(Sn,"$1$2")).replace(En,":0$1")).replace(An,":0$1"),a=Tn,e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0 0"+n))).replace(Cn,"$1.$2"),a=Rn,e=(e=(e=(e=(e=(e=(e=(e=(e=(e=function(e){const t=Nt,n=[];let r,a=0;for(;null!==(r=t.exec(e));)n.push(e.substring(a,r.index)),r[1]?n.push(r[1]+"#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7])):r[2].toLowerCase()==r[3].toLowerCase()&&r[4].toLowerCase()==r[5].toLowerCase()&&r[6].toLowerCase()==r[7].toLowerCase()?n.push("#"+(r[3]+r[5]+r[7]).toLowerCase()):n.push("#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7]).toLowerCase()),a=t.lastIndex=t.lastIndex-r[8].length;return n.push(e.substring(a)),n.join("")}(e=e.replace(a,((e,t)=>{const n=t.split(",");let r="#";for(let e=0;e<n.length;e+=1){let t=parseInt(n[e],10);t<16&&(r+="0"),t>255&&(t=255),r+=t.toString(16)}return r})))).replace(zn,"$1red$3")).replace(Dn,"$1navy$3")).replace(On,"$1gray$3")).replace(Un,"$1olive$3")).replace(Fn,"$1purple$3")).replace(Bn,"$1silver$3")).replace(qn,"$1teal$3")).replace(jn,"$1orange$3")).replace(Hn,"$1maroon$3"),a=_n,e=(e=(e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0"+n))).replace(In,"alpha(opacity=")).replace(Ln,"($1:$2___QUERY_FRACTION___$3)")).replace(Pn,"/"),t.maxLineLen>0){const n=[];let r=[];for(let a=0,o=e.length;a<o;a+=1){const o=e.charAt(a);r.push(o),"}"===o&&r.length>t.maxLineLen&&(n.push(r.join("")),r=[])}r.length&&n.push(r.join("")),e=n.join("\n")}if(e=(e=e.replace(Nn,";")).replace(Wt,""),r.length>1e3)return o;for(let t=r.length-1;t>=0;t--)e=e.replace(Rt+t+"___",r[t],"g");return e=e.replace(Mn,"\n")}var Vn=Object.freeze({__proto__:null,defaultOptions:_t,processString:Wn});function $n(e){return{prev:null,next:null,data:e}}function Yn(e,t,n){var r;return null!==Kn?(r=Kn,Kn=Kn.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function Gn(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=Kn,Kn=t}var Kn=null,Qn=function(){this.cursor=null,this.head=null,this.tail=null};Qn.createItem=$n,Qn.prototype.createItem=$n,Qn.prototype.updateCursors=function(e,t,n,r){for(var a=this.cursor;null!==a;)a.prev===e&&(a.prev=t),a.next===n&&(a.next=r),a=a.cursor},Qn.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},Qn.prototype.fromArray=function(e){var t=null;this.head=null;for(var n=0;n<e.length;n++){var r=$n(e[n]);null!==t?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this},Qn.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},Qn.prototype.toJSON=Qn.prototype.toArray,Qn.prototype.isEmpty=function(){return null===this.head},Qn.prototype.first=function(){return this.head&&this.head.data},Qn.prototype.last=function(){return this.tail&&this.tail.data},Qn.prototype.each=function(e,t){var n;void 0===t&&(t=this);for(var r=Yn(this,null,this.head);null!==r.next;)n=r.next,r.next=n.next,e.call(t,n.data,n,this);Gn(this)},Qn.prototype.forEach=Qn.prototype.each,Qn.prototype.eachRight=function(e,t){var n;void 0===t&&(t=this);for(var r=Yn(this,this.tail,null);null!==r.prev;)n=r.prev,r.prev=n.prev,e.call(t,n.data,n,this);Gn(this)},Qn.prototype.forEachRight=Qn.prototype.eachRight,Qn.prototype.reduce=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Yn(this,null,this.head),o=t;null!==a.next;)r=a.next,a.next=r.next,o=e.call(n,o,r.data,r,this);return Gn(this),o},Qn.prototype.reduceRight=function(e,t,n){var r;void 0===n&&(n=this);for(var a=Yn(this,this.tail,null),o=t;null!==a.prev;)r=a.prev,a.prev=r.prev,o=e.call(n,o,r.data,r,this);return Gn(this),o},Qn.prototype.nextUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Yn(this,null,e);null!==a.next&&(r=a.next,a.next=r.next,!t.call(n,r.data,r,this)););Gn(this)}},Qn.prototype.prevUntil=function(e,t,n){if(null!==e){var r;void 0===n&&(n=this);for(var a=Yn(this,e,null);null!==a.prev&&(r=a.prev,a.prev=r.prev,!t.call(n,r.data,r,this)););Gn(this)}},Qn.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return!0;n=n.next}return!1},Qn.prototype.map=function(e,t){var n=new Qn,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},Qn.prototype.filter=function(e,t){var n=new Qn,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},Qn.prototype.clear=function(){this.head=null,this.tail=null},Qn.prototype.copy=function(){for(var e=new Qn,t=this.head;null!==t;)e.insert($n(t.data)),t=t.next;return e},Qn.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},Qn.prototype.prependData=function(e){return this.prepend($n(e))},Qn.prototype.append=function(e){return this.insert(e)},Qn.prototype.appendData=function(e){return this.insert($n(e))},Qn.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},Qn.prototype.insertData=function(e,t){return this.insert($n(e),t)},Qn.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e},Qn.prototype.push=function(e){this.insert($n(e))},Qn.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},Qn.prototype.unshift=function(e){this.prepend($n(e))},Qn.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},Qn.prototype.prependList=function(e){return this.insertList(e,this.head)},Qn.prototype.appendList=function(e){return this.insertList(e)},Qn.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},Qn.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)};var Jn=Qn,Zn=function(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return n.name=e,n.message=t,Object.defineProperty(n,"stack",{get:function(){return(r.stack||"").replace(/^(.+\n){1,3}/,e+": "+t+"\n")}}),n},Xn=" ";function er(e,t){function n(e,t){return r.slice(e,t).map((function(t,n){for(var r=String(e+n+1);r.length<l;)r=" "+r;return r+" |"+t})).join("\n")}var r=e.source.split(/\r\n?|\n|\f/),a=e.line,o=e.column,s=Math.max(1,a-t)-1,i=Math.min(a+t,r.length+1),l=Math.max(4,String(i).length)+1,c=0;(o+=(Xn.length-1)*(r[a-1].substr(0,o-1).match(/\t/g)||[]).length)>100&&(c=o-60+3,o=58);for(var u=s;u<=i;u++)u>=0&&u<r.length&&(r[u]=r[u].replace(/\t/g,Xn),r[u]=(c>0&&r[u].length>c?"…":"")+r[u].substr(c,98)+(r[u].length>c+100-1?"…":""));return[n(s,a),new Array(o+l+2).join("-")+"^",n(a,i)].filter(Boolean).join("\n")}var tr=function(e,t,n,r,a){var o=Zn("SyntaxError",e);return o.source=t,o.offset=n,o.line=r,o.column=a,o.sourceFragment=function(e){return er(o,isNaN(e)?0:e)},Object.defineProperty(o,"formattedMessage",{get:function(){return"Parse error: "+o.message+"\n"+er(o,2)}}),o.parseError={offset:n,line:r,column:a},o},nr={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},rr=Object.keys(nr).reduce((function(e,t){return e[nr[t]]=t,e}),{}),ar={TYPE:nr,NAME:rr};function or(e){return e>=48&&e<=57}function sr(e){return e>=65&&e<=90}function ir(e){return e>=97&&e<=122}function lr(e){return sr(e)||ir(e)}function cr(e){return e>=128}function ur(e){return lr(e)||cr(e)||95===e}function hr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function dr(e){return 10===e||13===e||12===e}function pr(e){return dr(e)||32===e||9===e}function mr(e,t){return 92===e&&(!dr(t)&&0!==t)}var fr=new Array(128);yr.Eof=128,yr.WhiteSpace=130,yr.Digit=131,yr.NameStart=132,yr.NonPrintable=133;for(var gr=0;gr<fr.length;gr++)switch(!0){case pr(gr):fr[gr]=yr.WhiteSpace;break;case or(gr):fr[gr]=yr.Digit;break;case ur(gr):fr[gr]=yr.NameStart;break;case hr(gr):fr[gr]=yr.NonPrintable;break;default:fr[gr]=gr||yr.Eof}function yr(e){return e<128?fr[e]:yr.NameStart}var br={isDigit:or,isHexDigit:function(e){return or(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:sr,isLowercaseLetter:ir,isLetter:lr,isNonAscii:cr,isNameStart:ur,isName:function(e){return ur(e)||or(e)||45===e},isNonPrintable:hr,isNewline:dr,isWhiteSpace:pr,isValidEscape:mr,isIdentifierStart:function(e,t,n){return 45===e?ur(t)||45===t||mr(t,n):!!ur(e)||92===e&&mr(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?or(t)?2:46===t&&or(n)?3:0:46===e?or(t)?2:0:or(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:yr},vr=br.isDigit,kr=br.isHexDigit,wr=br.isUppercaseLetter,xr=br.isName,Sr=br.isWhiteSpace,Er=br.isValidEscape;function Ar(e,t){return t<e.length?e.charCodeAt(t):0}function Tr(e,t,n){return 13===n&&10===Ar(e,t+1)?2:1}function Cr(e,t,n){var r=e.charCodeAt(t);return wr(r)&&(r|=32),r===n}function Rr(e,t){for(;t<e.length&&vr(e.charCodeAt(t));t++);return t}function _r(e,t){if(kr(Ar(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&kr(Ar(e,t));t++);var r=Ar(e,t);Sr(r)&&(t+=Tr(e,t,r))}return t}var Ir={consumeEscaped:_r,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!xr(n)){if(!Er(n,Ar(e,t+1)))break;t=_r(e,t)-1}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),vr(n)&&(t=Rr(e,t+1),n=e.charCodeAt(t)),46===n&&vr(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=Rr(e,t)),Cr(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),vr(n)&&(t=Rr(e,t+1+r+1))}return t},consumeBadUrlRemnants:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(41===n){t++;break}Er(n,Ar(e,t+1))&&(t=_r(e,t))}return t},cmpChar:Cr,cmpStr:function(e,t,n,r){if(n-t!==r.length)return!1;if(t<0||n>e.length)return!1;for(var a=t;a<n;a++){var o=e.charCodeAt(a),s=r.charCodeAt(a-t);if(wr(o)&&(o|=32),o!==s)return!1}return!0},getNewlineLength:Tr,findWhiteSpaceStart:function(e,t){for(;t>=0&&Sr(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&Sr(e.charCodeAt(t));t++);return t}},Lr=ar.TYPE,Pr=ar.NAME,Nr=Ir.cmpStr,zr=Lr.EOF,Mr=Lr.WhiteSpace,Dr=Lr.Comment,Or=16777215,Ur=24,Fr=function(){this.offsetAndType=null,this.balance=null,this.reset()};Fr.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset},lookupType:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>Ur:zr},lookupOffset:function(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&Or:this.source.length},lookupValue:function(e,t){return(e+=this.tokenIndex)<this.tokenCount&&Nr(this.source,this.offsetAndType[e-1]&Or,this.offsetAndType[e]&Or,t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Or:this.offsetAndType[this.tokenCount]&Or:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,a=this.offsetAndType[Math.max(r-1,0)]&Or;e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>Ur,this.source,a)){case 1:break e;case 2:r++;break e;default:a=this.offsetAndType[r]&Or,this.balance[n]===r&&(r=n)}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===Lr.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===Lr.Delim&&this.source.charCodeAt(this.tokenStart)===e},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(e){return this.source.substring(e,this.tokenStart)},skipWS:function(){for(var e=this.tokenIndex,t=0;e<this.tokenCount&&this.offsetAndType[e]>>Ur===Mr;e++,t++);t>0&&this.skip(t)},skipSC:function(){for(;this.tokenType===Mr||this.tokenType===Dr;)this.next()},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Or,t=this.offsetAndType[t],this.tokenType=t>>Ur,this.tokenEnd=t&Or):(this.tokenIndex=this.tokenCount,this.next())},next:function(){var e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Ur,this.tokenEnd=e&Or):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=zr,this.tokenStart=this.tokenEnd=this.source.length)},forEachToken(e){for(var t=0,n=this.firstCharOffset;t<this.tokenCount;t++){var r=n,a=this.offsetAndType[t],o=a&Or;n=o,e(a>>Ur,r,o,t)}},dump(){var e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:Pr[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};var Br=Fr;function qr(e){return e}function jr(e,t,n,r){var a,o;switch(e.type){case"Group":a=function(e,t,n,r){var a=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",o=e.terms.map((function(e){return jr(e,t,n,r)})).join(a);return(e.explicit||n)&&(o=(r||","===o[0]?"[":"[ ")+o+(r?"]":" ]")),o}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return jr(e.term,t,n,r)+t(0===(o=e).min&&0===o.max?"*":0===o.min&&1===o.max?"?":1===o.min&&0===o.max?o.comma?"#":"+":1===o.min&&1===o.max?"":(o.comma?"#":"")+(o.min===o.max?"{"+o.min+"}":"{"+o.min+","+(0!==o.max?o.max:"")+"}"),e);case"Type":a="<"+e.name+(e.opts?t(function(e){switch(e.type){case"Range":return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}(e.opts),e.opts):"")+">";break;case"Property":a="<'"+e.name+"'>";break;case"Keyword":a=e.name;break;case"AtKeyword":a="@"+e.name;break;case"Function":a=e.name+"(";break;case"String":case"Token":a=e.value;break;case"Comma":a=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(a,e)}var Hr=function(e,t){var n=qr,r=!1,a=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),jr(e,n,r,a)};const Wr={offset:0,line:1,column:1};function Vr(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?$r(n):n:null}function $r({offset:e,line:t,column:n},r){const a={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);a.offset+=r.length,a.line+=e.length-1,a.column=1===e.length?a.column+r.length:e.pop().length+1}return a}var Yr=function(e,t){const n=Zn("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Gr=function(e,t,n,r){const a=Zn("SyntaxMatchError",e),{css:o,mismatchOffset:s,mismatchLength:i,start:l,end:c}=function(e,t){const n=e.tokens,r=e.longestMatch,a=r<n.length&&n[r].node||null,o=a!==t?a:null;let s,i,l=0,c=0,u=0,h="";for(let e=0;e<n.length;e++){const t=n[e].value;e===r&&(c=t.length,l=h.length),null!==o&&n[e].node===o&&(e<=r?u++:u=0),h+=t}return r===n.length||u>1?(s=Vr(o||t,"end")||$r(Wr,h),i=$r(s)):(s=Vr(o,"start")||$r(Vr(t,"start")||Wr,h.slice(0,l)),i=Vr(o,"end")||$r(s,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:s,end:i}}(r,n);return a.rawMessage=e,a.syntax=t?Hr(t):"<generic>",a.css=o,a.mismatchOffset=s,a.mismatchLength=i,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(o||"<empty string>")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,l),a.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},a},Kr=Object.prototype.hasOwnProperty,Qr=Object.create(null),Jr=Object.create(null);function Zr(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function Xr(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var ea={keyword:function(e){if(Kr.call(Qr,e))return Qr[e];var t=e.toLowerCase();if(Kr.call(Qr,t))return Qr[e]=Qr[t];var n=Zr(t,0),r=n?"":Xr(t,0);return Qr[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(Kr.call(Jr,e))return Jr[e];var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=Zr(t,n.length);if(!r&&(t=t.toLowerCase(),Kr.call(Jr,t)))return Jr[e]=Jr[t];var a=r?"":Xr(t,n.length),o=t.substr(0,n.length+a.length);return Jr[e]=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:a,prefix:o,custom:r})},isCustomProperty:Zr,vendorPrefix:Xr},ta="undefined"!=typeof Uint32Array?Uint32Array:Array,na=function(e,t){return null===e||e.length<t?new ta(Math.max(t+1024,16384)):e},ra=ar.TYPE,aa=br.isNewline,oa=br.isName,sa=br.isValidEscape,ia=br.isNumberStart,la=br.isIdentifierStart,ca=br.charCodeCategory,ua=br.isBOM,ha=Ir.cmpStr,da=Ir.getNewlineLength,pa=Ir.findWhiteSpaceEnd,ma=Ir.consumeEscaped,fa=Ir.consumeName,ga=Ir.consumeNumber,ya=Ir.consumeBadUrlRemnants,ba=16777215,va=24;function ka(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){return h=ga(e,h),la(n(h),n(h+1),n(h+2))?(g=ra.Dimension,void(h=fa(e,h))):37===n(h)?(g=ra.Percentage,void h++):void(g=ra.Number)}function a(){const t=h;return h=fa(e,h),ha(e,t,h,"url")&&40===n(h)?34===n(h=pa(e,h+1))||39===n(h)?(g=ra.Function,void(h=t+4)):void function(){for(g=ra.Url,h=pa(e,h);h<e.length;h++){var t=e.charCodeAt(h);switch(ca(t)){case 41:return void h++;case ca.Eof:return;case ca.WhiteSpace:return 41===n(h=pa(e,h))||h>=e.length?void(h<e.length&&h++):(h=ya(e,h),void(g=ra.BadUrl));case 34:case 39:case 40:case ca.NonPrintable:return h=ya(e,h),void(g=ra.BadUrl);case 92:if(sa(t,n(h+1))){h=ma(e,h)-1;break}return h=ya(e,h),void(g=ra.BadUrl)}}}():40===n(h)?(g=ra.Function,void h++):void(g=ra.Ident)}function o(t){for(t||(t=n(h++)),g=ra.String;h<e.length;h++){var r=e.charCodeAt(h);switch(ca(r)){case t:return void h++;case ca.Eof:return;case ca.WhiteSpace:if(aa(r))return h+=da(e,h,r),void(g=ra.BadString);break;case 92:if(h===e.length-1)break;var a=n(h+1);aa(a)?h+=da(e,h+1,a):sa(r,a)&&(h=ma(e,h)-1)}}}t||(t=new Br);for(var s=(e=String(e||"")).length,i=na(t.offsetAndType,s+1),l=na(t.balance,s+1),c=0,u=ua(n(0)),h=u,d=0,p=0,m=0;h<s;){var f=e.charCodeAt(h),g=0;switch(l[c]=s,ca(f)){case ca.WhiteSpace:g=ra.WhiteSpace,h=pa(e,h+1);break;case 34:o();break;case 35:oa(n(h+1))||sa(n(h+1),n(h+2))?(g=ra.Hash,h=fa(e,h+1)):(g=ra.Delim,h++);break;case 39:o();break;case 40:g=ra.LeftParenthesis,h++;break;case 41:g=ra.RightParenthesis,h++;break;case 43:ia(f,n(h+1),n(h+2))?r():(g=ra.Delim,h++);break;case 44:g=ra.Comma,h++;break;case 45:ia(f,n(h+1),n(h+2))?r():45===n(h+1)&&62===n(h+2)?(g=ra.CDC,h+=3):la(f,n(h+1),n(h+2))?a():(g=ra.Delim,h++);break;case 46:ia(f,n(h+1),n(h+2))?r():(g=ra.Delim,h++);break;case 47:42===n(h+1)?(g=ra.Comment,1===(h=e.indexOf("*/",h+2)+2)&&(h=e.length)):(g=ra.Delim,h++);break;case 58:g=ra.Colon,h++;break;case 59:g=ra.Semicolon,h++;break;case 60:33===n(h+1)&&45===n(h+2)&&45===n(h+3)?(g=ra.CDO,h+=4):(g=ra.Delim,h++);break;case 64:la(n(h+1),n(h+2),n(h+3))?(g=ra.AtKeyword,h=fa(e,h+1)):(g=ra.Delim,h++);break;case 91:g=ra.LeftSquareBracket,h++;break;case 92:sa(f,n(h+1))?a():(g=ra.Delim,h++);break;case 93:g=ra.RightSquareBracket,h++;break;case 123:g=ra.LeftCurlyBracket,h++;break;case 125:g=ra.RightCurlyBracket,h++;break;case ca.Digit:r();break;case ca.NameStart:a();break;case ca.Eof:break;default:g=ra.Delim,h++}switch(g){case d:for(d=(p=l[m=p&ba])>>va,l[c]=m,l[m++]=c;m<c;m++)l[m]===s&&(l[m]=c);break;case ra.LeftParenthesis:case ra.Function:l[c]=p,p=(d=ra.RightParenthesis)<<va|c;break;case ra.LeftSquareBracket:l[c]=p,p=(d=ra.RightSquareBracket)<<va|c;break;case ra.LeftCurlyBracket:l[c]=p,p=(d=ra.RightCurlyBracket)<<va|c}i[c++]=g<<va|h}for(i[c]=ra.EOF<<va|h,l[c]=s,l[s]=s;0!==p;)p=l[m=p&ba],l[m]=s;return t.source=e,t.firstCharOffset=u,t.offsetAndType=i,t.tokenCount=c,t.balance=l,t.reset(),t.next(),t}Object.keys(ar).forEach((function(e){ka[e]=ar[e]})),Object.keys(br).forEach((function(e){ka[e]=br[e]})),Object.keys(Ir).forEach((function(e){ka[e]=Ir[e]}));var wa=ka,xa=wa.isDigit,Sa=wa.cmpChar,Ea=wa.TYPE,Aa=Ea.Delim,Ta=Ea.WhiteSpace,Ca=Ea.Comment,Ra=Ea.Ident,_a=Ea.Number,Ia=Ea.Dimension,La=45,Pa=!0;function Na(e,t){return null!==e&&e.type===Aa&&e.value.charCodeAt(0)===t}function za(e,t,n){for(;null!==e&&(e.type===Ta||e.type===Ca);)e=n(++t);return t}function Ma(e,t,n,r){if(!e)return 0;var a=e.value.charCodeAt(t);if(43===a||a===La){if(n)return 0;t++}for(;t<e.value.length;t++)if(!xa(e.value.charCodeAt(t)))return 0;return r+1}function Da(e,t,n){var r=!1,a=za(e,t,n);if(null===(e=n(a)))return t;if(e.type!==_a){if(!Na(e,43)&&!Na(e,La))return t;if(r=!0,a=za(n(++a),a,n),null===(e=n(a))&&e.type!==_a)return 0}if(!r){var o=e.value.charCodeAt(0);if(43!==o&&o!==La)return 0}return Ma(e,r?0:1,r,a)}var Oa=wa.isHexDigit,Ua=wa.cmpChar,Fa=wa.TYPE,Ba=Fa.Ident,qa=Fa.Delim,ja=Fa.Number,Ha=Fa.Dimension;function Wa(e,t){return null!==e&&e.type===qa&&e.value.charCodeAt(0)===t}function Va(e,t){return e.value.charCodeAt(0)===t}function $a(e,t,n){for(var r=t,a=0;r<e.value.length;r++){var o=e.value.charCodeAt(r);if(45===o&&n&&0!==a)return $a(e,t+a+1,!1)>0?6:0;if(!Oa(o))return 0;if(++a>6)return 0}return a}function Ya(e,t,n){if(!e)return 0;for(;Wa(n(t),63);){if(++e>6)return 0;t++}return t}var Ga=wa.isIdentifierStart,Ka=wa.isHexDigit,Qa=wa.isDigit,Ja=wa.cmpStr,Za=wa.consumeNumber,Xa=wa.TYPE,eo=["unset","initial","inherit"],to=["calc(","-moz-calc(","-webkit-calc("];function no(e,t){return t<e.length?e.charCodeAt(t):0}function ro(e,t){return Ja(e,0,e.length,t)}function ao(e,t){for(var n=0;n<t.length;n++)if(ro(e,t[n]))return!0;return!1}function oo(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&Qa(e.charCodeAt(t+1)))}function so(e,t,n){if(e&&"Range"===e.type){var r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return!0;if(null!==e.min&&r<e.min)return!0;if(null!==e.max&&r>e.max)return!0}return!1}function io(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function lo(e){return function(t,n,r){return null===t?0:t.type===Xa.Function&&ao(t.value,to)?io(t,n):e(t,n,r)}}function co(e){return function(t){return null===t||t.type!==e?0:1}}function uo(e){return function(t,n,r){if(null===t||t.type!==Xa.Dimension)return 0;var a=Za(t.value,0);if(null!==e){var o=t.value.indexOf("\\",a),s=-1!==o&&oo(t.value,o)?t.value.substring(a,o):t.value.substr(a);if(!1===e.hasOwnProperty(s.toLowerCase()))return 0}return so(r,t.value,a)?0:1}}function ho(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===Xa.Number&&0===Number(t.value)?1:e(t,n,r)}}var po,mo={"ident-token":co(Xa.Ident),"function-token":co(Xa.Function),"at-keyword-token":co(Xa.AtKeyword),"hash-token":co(Xa.Hash),"string-token":co(Xa.String),"bad-string-token":co(Xa.BadString),"url-token":co(Xa.Url),"bad-url-token":co(Xa.BadUrl),"delim-token":co(Xa.Delim),"number-token":co(Xa.Number),"percentage-token":co(Xa.Percentage),"dimension-token":co(Xa.Dimension),"whitespace-token":co(Xa.WhiteSpace),"CDO-token":co(Xa.CDO),"CDC-token":co(Xa.CDC),"colon-token":co(Xa.Colon),"semicolon-token":co(Xa.Semicolon),"comma-token":co(Xa.Comma),"[-token":co(Xa.LeftSquareBracket),"]-token":co(Xa.RightSquareBracket),"(-token":co(Xa.LeftParenthesis),")-token":co(Xa.RightParenthesis),"{-token":co(Xa.LeftCurlyBracket),"}-token":co(Xa.RightCurlyBracket),string:co(Xa.String),ident:co(Xa.Ident),"custom-ident":function(e){if(null===e||e.type!==Xa.Ident)return 0;var t=e.value.toLowerCase();return ao(t,eo)||ro(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==Xa.Ident||45!==no(e.value,0)||45!==no(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==Xa.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n<t;n++)if(!Ka(e.value.charCodeAt(n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==Xa.Hash?0:Ga(no(e.value,1),no(e.value,2),no(e.value,3))?1:0},"an-plus-b":function(e,t){var n=0;if(!e)return 0;if(e.type===_a)return Ma(e,0,false,n);if(e.type===Ra&&e.value.charCodeAt(0)===La){if(!Sa(e.value,1,110))return 0;switch(e.value.length){case 2:return Da(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==La?0:(n=za(t(++n),n,t),Ma(e=t(n),0,Pa,n));default:return e.value.charCodeAt(2)!==La?0:Ma(e,3,Pa,n)}}else if(e.type===Ra||Na(e,43)&&t(n+1).type===Ra){if(e.type!==Ra&&(e=t(++n)),null===e||!Sa(e.value,0,110))return 0;switch(e.value.length){case 1:return Da(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==La?0:(n=za(t(++n),n,t),Ma(e=t(n),0,Pa,n));default:return e.value.charCodeAt(1)!==La?0:Ma(e,2,Pa,n)}}else if(e.type===Ia){for(var r=e.value.charCodeAt(0),a=43===r||r===La?1:0,o=a;o<e.value.length&&xa(e.value.charCodeAt(o));o++);return o===a?0:Sa(e.value,o,110)?o+1===e.value.length?Da(t(++n),n,t):e.value.charCodeAt(o+1)!==La?0:o+2===e.value.length?(n=za(t(++n),n,t),Ma(e=t(n),0,Pa,n)):Ma(e,o+2,Pa,n):0}return 0},urange:function(e,t){var n=0;if(null===e||e.type!==Ba||!Ua(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(Wa(e,43))return null===(e=t(++n))?0:e.type===Ba?Ya($a(e,0,!0),++n,t):Wa(e,63)?Ya(1,++n,t):0;if(e.type===ja){if(!Va(e,43))return 0;var r=$a(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===Ha||e.type===ja?Va(e,45)&&$a(e,1,!1)?n+1:0:Ya(r,n,t)}return e.type===Ha&&Va(e,43)?Ya($a(e,1,!0),++n,t):0},"declaration-value":function(e,t){if(!e)return 0;var n=0,r=0,a=e.index;e:do{switch(e.type){case Xa.BadString:case Xa.BadUrl:break e;case Xa.RightCurlyBracket:case Xa.RightParenthesis:case Xa.RightSquareBracket:if(e.balance>e.index||e.balance<a)break e;r--;break;case Xa.Semicolon:if(0===r)break e;break;case Xa.Delim:if("!"===e.value&&0===r)break e;break;case Xa.Function:case Xa.LeftParenthesis:case Xa.LeftSquareBracket:case Xa.LeftCurlyBracket:r++}if(n++,e.balance<=a)break}while(e=t(n));return n},"any-value":function(e,t){if(!e)return 0;var n=e.index,r=0;e:do{switch(e.type){case Xa.BadString:case Xa.BadUrl:break e;case Xa.RightCurlyBracket:case Xa.RightParenthesis:case Xa.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:lo(uo(null)),angle:lo(uo({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:lo(uo({db:!0})),frequency:lo(uo({hz:!0,khz:!0})),flex:lo(uo({fr:!0})),length:lo(ho(uo({px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,q:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0}))),resolution:lo(uo({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:lo(uo({st:!0})),time:lo(uo({s:!0,ms:!0})),percentage:lo((function(e,t,n){return null===e||e.type!==Xa.Percentage||so(n,e.value,e.value.length-1)?0:1})),zero:ho(),number:lo((function(e,t,n){if(null===e)return 0;var r=Za(e.value,0);return r===e.value.length||oo(e.value,r)?so(n,e.value,r)?0:1:0})),integer:lo((function(e,t,n){if(null===e||e.type!==Xa.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!Qa(e.value.charCodeAt(r)))return 0;return so(n,e.value,r)?0:1})),"-ms-legacy-expression":(po="expression",po+="(",function(e,t){return null!==e&&ro(e.value,po)?io(e,t):0})},fo=function(e,t,n){var r=Zn("SyntaxError",e);return r.input=t,r.offset=n,r.rawMessage=e,r.message=r.rawMessage+"\n "+r.input+"\n--"+new Array((r.offset||r.input.length)+1).join("-")+"^",r},go=function(e){this.str=e,this.pos=0};go.prototype={charCodeAt:function(e){return e<this.str.length?this.str.charCodeAt(e):0},charCode:function(){return this.charCodeAt(this.pos)},nextCharCode:function(){return this.charCodeAt(this.pos+1)},nextNonWsCode:function(e){return this.charCodeAt(this.findWsEnd(e))},findWsEnd:function(e){for(;e<this.str.length;e++){var t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e},substringToPos:function(e){return this.str.substring(this.pos,this.pos=e)},eat:function(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++},peek:function(){return this.pos<this.str.length?this.str.charAt(this.pos++):""},error:function(e){throw new fo(e,this.str,this.pos)}};var yo=go,bo=123,vo=function(e){for(var t="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),n=0;n<128;n++)t[n]=e(String.fromCharCode(n))?1:0;return t}((function(e){return/[a-zA-Z0-9\-]/.test(e)})),ko={" ":1,"&&":2,"||":3,"|":4};function wo(e){return e.substringToPos(e.findWsEnd(e.pos))}function xo(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===vo[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function So(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Eo(e){var 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 Ao(e){var t,n=null;return e.eat(bo),t=So(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=So(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function To(e,t){var n=function(e){var t=null,n=!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++,n=!0,t=e.charCode()===bo?Ao(e):{min:1,max:0};break;case bo:t=Ao(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function Co(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function Ro(e){var t,n=null;return e.eat(60),t=xo(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(wo(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():t=r*Number(So(e)),wo(e),e.eat(44),wo(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(So(e))),e.eat(93),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(62),To(e,{type:"Type",name:t,opts:n})}function _o(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return ko[e]-ko[t]}));t.length>0;){for(var r=t.shift(),a=0,o=0;a<e.length;a++){var s=e[a];"Combinator"===s.type&&(s.value===r?(-1===o&&(o=a-1),e.splice(a,1),a--):(-1!==o&&a-o>1&&(e.splice(o,a-o,n(e.slice(o,a),r)),a=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,a-o,n(e.slice(o,a),r))}return r}function Io(e){for(var t,n=[],r={},a=null,o=e.pos;t=Lo(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==a&&"Combinator"!==a.type||(e.pos=o,e.error("Unexpected combinator")),r[t.value]=!0):null!==a&&"Combinator"!==a.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),a=t,o=e.pos);return null!==a&&"Combinator"===a.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:_o(n,r)||" ",disallowEmpty:!1,explicit:!1}}function Lo(e){var t=e.charCode();if(t<128&&1===vo[t])return function(e){var t;return t=xo(e),40===e.charCode()?(e.pos++,{type:"Function",name:t}):To(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return To(e,function(e){var t;return e.eat(91),t=Io(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){var t;return e.eat(60),e.eat(39),t=xo(e),e.eat(39),e.eat(62),To(e,{type:"Property",name:t})}(e):Ro(e);case 124:return{type:"Combinator",value:e.substringToPos(124===e.nextCharCode()?e.pos+2:e.pos+1)};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return To(e,{type:"String",value:Eo(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:wo(e)};case 64:return(t=e.nextCharCode())<128&&1===vo[t]?(e.pos++,{type:"AtKeyword",name:xo(e)}):Co(e);case 42:case 43:case 63:case 35:case 33:break;case bo:if((t=e.nextCharCode())<48||t>57)return Co(e);break;default:return Co(e)}}function Po(e){var t=new yo(e),n=Io(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}Po("[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!");var No=Po,zo=function(){};function Mo(e){return"function"==typeof e?e:zo}var Do=function(e,t,n){var r=zo,a=zo;if("function"==typeof t?r=t:t&&(r=Mo(t.enter),a=Mo(t.leave)),r===zo&&a===zo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}a.call(n,t)}(e)},Oo=new Br,Uo={decorator:function(e){var t=null,n={len:0,node:null},r=[n],a="";return{children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r},chunk:function(e){a+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length},result:function(){return Fo(a,r)}}}};function Fo(e,t){var n=[],r=0,a=0,o=t?t[a].node:null;for(wa(e,Oo);!Oo.eof;){if(t)for(;a<t.length&&r+t[a].len<=Oo.tokenStart;)r+=t[a++].len,o=t[a].node;n.push({type:Oo.tokenType,value:Oo.getTokenValue(),index:Oo.tokenIndex,balance:Oo.balance[Oo.tokenIndex],node:o}),Oo.next()}return n}var Bo={type:"Match"},qo={type:"Mismatch"},jo={type:"DisallowEmpty"};function Ho(e,t,n){return t===Bo&&n===qo||e===Bo&&t===Bo&&n===Bo?e:("If"===e.type&&e.else===qo&&t===Bo&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Wo(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function Vo(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&Wo(e.name)}function $o(e,t,n){switch(e){case" ":for(var r=Bo,a=t.length-1;a>=0;a--){r=Ho(i=t[a],r,qo)}return r;case"|":r=qo;var o=null;for(a=t.length-1;a>=0;a--){if(Vo(i=t[a])&&(null===o&&a>0&&Vo(t[a-1])&&(r=Ho({type:"Enum",map:o=Object.create(null)},Bo,r)),null!==o)){var s=(Wo(i.name)?i.name.slice(0,-1):i.name).toLowerCase();if(s in o==!1){o[s]=i;continue}}o=null,r=Ho(i,Bo,r)}return r;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(r=qo,a=t.length-1;a>=0;a--){var i=t[a];l=t.length>1?$o(e,t.filter((function(e){return e!==i})),!1):Bo,r=Ho(i,l,r)}return r;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(r=n?Bo:qo,a=t.length-1;a>=0;a--){var l;i=t[a];l=t.length>1?$o(e,t.filter((function(e){return e!==i})),!0):Bo,r=Ho(i,l,r)}return r}}function Yo(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=$o(e.combinator,e.terms.map(Yo),!1);return e.disallowEmpty&&(t=Ho(t,jo,qo)),t;case"Multiplier":return function(e){var t=Bo,n=Yo(e.term);if(0===e.max)n=Ho(n,jo,qo),(t=Ho(n,null,qo)).then=Ho(Bo,Bo,t),e.comma&&(t.then.else=Ho({type:"Comma",syntax:e},t,qo));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==Bo&&(t=Ho({type:"Comma",syntax:e},t,qo)),t=Ho(n,Ho(Bo,Bo,t),qo);if(0===e.min)t=Ho(Bo,Bo,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==Bo&&(t=Ho({type:"Comma",syntax:e},t,qo)),t=Ho(n,t,qo);return t}(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}var Go=Bo,Ko=qo,Qo=jo,Jo=function(e,t){return"string"==typeof e&&(e=No(e)),{type:"MatchGraph",match:Yo(e),syntax:t||null,source:e}},Zo=Object.prototype.hasOwnProperty,Xo=Go,es=Ko,ts=Qo,ns=ar.TYPE,rs="Match";function as(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function os(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return!1}return!0}function ss(e){return null===e||(e.type===ns.Comma||e.type===ns.Function||e.type===ns.LeftParenthesis||e.type===ns.LeftSquareBracket||e.type===ns.LeftCurlyBracket||function(e){return e.type===ns.Delim&&"?"!==e.value}(e))}function is(e){return null===e||(e.type===ns.RightParenthesis||e.type===ns.RightSquareBracket||e.type===ns.RightCurlyBracket||e.type===ns.Delim)}function ls(e,t,n){function r(){do{y++,g=y<e.length?e[y]:null}while(null!==g&&(g.type===ns.WhiteSpace||g.type===ns.Comment))}function a(t){var n=y+t;return n<e.length?e[n]:null}function o(e,t){return{nextState:e,matchStack:v,syntaxStack:u,thenStack:h,tokenIndex:y,prev:t}}function s(e){h={nextState:e,matchStack:v,syntaxStack:u,prev:h}}function i(e){d=o(e,d)}function l(){v={type:1,syntax:t.syntax,token:g,prev:v},r(),p=null,y>b&&(b=y)}function c(){v=2===v.type?v.prev:{type:3,syntax:u.syntax,token:v.token,prev:v},u=u.prev}var u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,v={type:0,syntax:null,token:null,prev:null};for(r();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=es;break}f=rs;break}if((t=h.nextState)===ts){if(h.matchStack===v){t=es;break}t=Xo}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,v=d.matchStack,y=d.tokenIndex,g=y<e.length?e[y]:null,d=d.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==es&&i(t.else),t.then!==Xo&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":var k=t.syntax.terms;if(t.index===k.length){if(0===t.mask||t.syntax.all){t=es;break}t=Xo;break}if(t.mask===(1<<k.length)-1){t=Xo;break}for(;t.index<k.length;t.index++){var w=1<<t.index;if(0==(t.mask&w)){i(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|w}),t=k[t.index++];break}}break;case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==g)if(-1!==(T=g.value.toLowerCase()).indexOf("\\")&&(T=T.replace(/\\[09].*$/,"")),Zo.call(t.map,T)){t=t.map[T];break}t=es;break;case"Generic":var x=null!==u?u.opts:null,S=y+Math.floor(t.fn(g,a,x));if(!isNaN(S)&&S>y){for(;y<S;)l();t=Xo}else t=es;break;case"Type":case"Property":var E="Type"===t.type?"types":"properties",A=Zo.call(n,E)?n[E][t.name]:null;if(!A||!A.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type)if("custom-ident"===t.name&&g.type===ns.Ident||"length"===t.name&&"0"===g.value){null===p&&(p=o(t,d)),t=es;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},v={type:2,syntax:t.syntax,token:v.token,prev:v},t=A.match;break;case"Keyword":var T=t.name;if(null!==g){var C=g.value;if(-1!==C.indexOf("\\")&&(C=C.replace(/\\[09].*$/,"")),os(C,T)){l(),t=Xo;break}}t=es;break;case"AtKeyword":case"Function":if(null!==g&&os(g.value,t.name)){l(),t=Xo;break}t=es;break;case"Token":if(null!==g&&g.value===t.value){l(),t=Xo;break}t=es;break;case"Comma":null!==g&&g.type===ns.Comma?ss(v.token)?t=es:(l(),t=is(g)?es:Xo):t=ss(v.token)||is(g)?Xo:es;break;case"String":var R="";for(S=y;S<e.length&&R.length<t.value.length;S++)R+=e[S].value;if(os(R,t.value)){for(;y<S;)l();t=Xo}else t=es;break;default:throw new Error("Unknown node type: "+t.type)}switch(m,f){case null:console.warn("[csstree-match] BREAK after 15000 iterations"),f="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",v=null;break;case rs:for(;null!==u;)c();break;default:v=null}return{tokens:e,reason:f,iterations:m,match:v,longestMatch:b}}var cs=function(e,t,n){var r=ls(e,t,n||{});if(null===r.match)return r;var a=r.match,o=r.match={syntax:t.syntax||null,match:[]},s=[o];for(a=as(a).prev;null!==a;){switch(a.type){case 2:o.match.push(o={syntax:a.syntax,match:[]}),s.push(o);break;case 3:s.pop(),o=s[s.length-1];break;default:o.match.push({syntax:a.syntax||null,token:a.token.value,node:a.token.node})}a=a.prev}return r};function us(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}var n=null;return null!==this.matched&&function r(a){if(Array.isArray(a.match)){for(var o=0;o<a.match.length;o++)if(r(a.match[o]))return t(a.syntax)&&n.unshift(a.syntax),!0}else if(a.node===e)return n=t(a.syntax)?[a.syntax]:[],!0;return!1}(this.matched),n}function hs(e,t,n){var r=us.call(e,t);return null!==r&&r.some(n)}var ds={getTrace:us,isType:function(e,t){return hs(this,e,(function(e){return"Type"===e.type&&e.name===t}))},isProperty:function(e,t){return hs(this,e,(function(e){return"Property"===e.type&&e.name===t}))},isKeyword:function(e){return hs(this,e,(function(e){return"Keyword"===e.type}))}};function ps(e){return"node"in e?e.node:ps(e.match[0])}function ms(e){return"node"in e?e.node:ms(e.match[e.match.length-1])}var fs={matchFragments:function(e,t,n,r,a){var o=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===a){var i=ps(s),l=ms(s);e.syntax.walk(t,(function(e,t,n){if(e===i){var r=new Jn;do{if(r.appendData(t.data),t.data===l)break;t=t.next}while(null!==t);o.push({parent:n,nodes:r})}}))}Array.isArray(s.match)&&s.match.forEach(n)}(n.matched),o}},gs=Object.prototype.hasOwnProperty;function ys(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function bs(e){return Boolean(e)&&ys(e.offset)&&ys(e.line)&&ys(e.column)}function vs(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var a in n){var o=!0;if(!1!==gs.call(n,a)){if("type"===a)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(bs(n.loc.start)){if(bs(n.loc.end))continue;a+=".end"}else a+=".start";o=!1}else if(t.hasOwnProperty(a)){var s=0;for(o=!1;!o&&s<t[a].length;s++){var i=t[a][s];switch(i){case String:o="string"==typeof n[a];break;case Boolean:o="boolean"==typeof n[a];break;case null:o=null===n[a];break;default:"string"==typeof i?o=n[a]&&n[a].type===i:Array.isArray(i)&&(o=n[a]instanceof Jn)}}}else r(n,"Unknown field `"+a+"` for "+e+" node type");o||r(n,"Bad value for `"+e+"."+a+"`")}}for(var a in t)gs.call(t,a)&&!1===gs.call(n,a)&&r(n,"Field `"+e+"."+a+"` is missed")}}function ks(e,t){var n=t.structure,r={type:String,loc:!0},a={type:'"'+e+'"'};for(var o in n)if(!1!==gs.call(n,o)){for(var s=[],i=r[o]=Array.isArray(n[o])?n[o].slice():[n[o]],l=0;l<i.length;l++){var c=i[l];if(c===String||c===Boolean)s.push(c.name);else if(null===c)s.push("null");else if("string"==typeof c)s.push("<"+c+">");else{if(!Array.isArray(c))throw new Error("Wrong value `"+c+"` in `"+e+"."+o+"` structure definition");s.push("List")}}a[o]=s.join(" | ")}return{docs:a,check:vs(e,r)}}var ws=Yr,xs=Gr,Ss=Jo,Es=cs,As=function(e){var t={};if(e.node)for(var n in e.node)if(gs.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=ks(n,r)}return t},Ts=Ss("inherit | initial | unset"),Cs=Ss("inherit | initial | unset | <-ms-legacy-expression>");function Rs(e,t,n){var r={};for(var a in e)e[a].syntax&&(r[a]=n?e[a].syntax:Hr(e[a].syntax,{compact:t}));return r}function _s(e,t,n){const r={};for(const[a,o]of Object.entries(e))r[a]={prelude:o.prelude&&(n?o.prelude.syntax:Hr(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&Rs(o.descriptors,t,n)};return r}function Is(e,t,n){return{matched:e,iterations:n,error:t,getTrace:ds.getTrace,isType:ds.isType,isProperty:ds.isProperty,isKeyword:ds.isKeyword}}function Ls(e,t,n,r){var a,o=function(e,t){return"string"==typeof e?Fo(e,null):t.generate(e,Uo)}(n,e.syntax);return function(e){for(var t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(o)?Is(null,new Error("Matching for a tree with var() is not supported")):(r&&(a=Es(o,e.valueCommonSyntax,e)),r&&a.match||(a=Es(o,t.match,e)).match?Is(a.match,null,a.iterations):Is(null,new xs(a.reason,t.syntax,n,a),a.iterations))}var Ps=function(e,t,n){if(this.valueCommonSyntax=Ts,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||As(e),e){if(e.types)for(var r in e.types)this.addType_(r,e.types[r]);if(e.generic)for(var r in this.generic=!0,mo)this.addType_(r,mo[r]);if(e.atrules)for(var r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(var r in e.properties)this.addProperty_(r,e.properties[r])}};Ps.prototype={structure:{},checkStructure:function(e){function t(e,t){r.push({node:e,message:t})}var n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!r.length&&r},createDescriptor:function(e,t,n,r=null){var a={type:t,name:n},o={type:t,name:n,parent:r,syntax:null,match:null};return"function"==typeof e?o.match=Ss(e,a):("string"==typeof e?Object.defineProperty(o,"syntax",{get:function(){return Object.defineProperty(o,"syntax",{value:No(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get:function(){return Object.defineProperty(o,"match",{value:Ss(o.syntax,a)}),o.match}})),o},addAtrule_:function(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(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),{}):null})},addProperty_:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))},addType_:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e),t===mo["-ms-legacy-expression"]&&(this.valueCommonSyntax=Cs))},checkAtruleName:function(e){if(!this.getAtrule(e))return new ws("Unknown at-rule","@"+e)},checkAtrulePrelude:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):r.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),a=ea.keyword(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new ws("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return ea.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new ws("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?Is(null,n):t?Ls(this,this.getAtrule(e).prelude,t,!0):Is(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return Is(null,r);var a=this.getAtrule(e),o=ea.keyword(t);return Ls(this,a.descriptors[o.name]||a.descriptors[o.basename],n,!0)},matchDeclaration:function(e){return"Declaration"!==e.type?Is(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?Is(null,n):Ls(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?Ls(this,n,t,!1):Is(null,new ws("Unknown type",e))},match:function(e,t){return"string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),Ls(this,e,t,!1)):Is(null,new ws("Bad syntax"))},findValueFragments:function(e,t,n,r){return fs.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return fs.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}.bind(this)}),r},getAtrule:function(e,t=!0){var n=ea.keyword(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null},getAtrulePrelude:function(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e,t=!0){var n=ea.property(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,a,o,s){if(o.hasOwnProperty(a))return o[a];o[a]=!1,null!==s.syntax&&Do(s.syntax,(function(s){if("Type"===s.type||"Property"===s.type){var i="Type"===s.type?r.types:r.properties,l="Type"===s.type?t:n;i.hasOwnProperty(s.name)&&!e(r,s.name,l,i[s.name])||(o[a]=!0)}}),this)}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return{generic:this.generic,types:Rs(this.types,!t,e),properties:Rs(this.properties,!t,e),atrules:_s(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var Ns=Ps,zs={SyntaxError:fo,parse:No,generate:Hr,walk:Do},Ms=wa.isBOM;var Ds=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1};Ds.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,r=na(e.lines,n),a=e.startLine,o=na(e.columns,n),s=e.startColumn,i=t.length>0?Ms(t.charCodeAt(0)):0;i<n;i++){var l=t.charCodeAt(i);r[i]=a,o[i]=s++,10!==l&&13!==l&&12!==l||(13===l&&i+1<n&&10===t.charCodeAt(i+1)&&(r[++i]=a,o[i]=s),a++,s=1)}r[i]=a,o[i]=s,e.lines=r,e.columns=o}(this,this.source),this.linesAndColumnsComputed=!0)},getLocation:function(e,t){return this.ensureLinesAndColumnsComputed(),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}},getLocationRange:function(e,t,n){return this.ensureLinesAndColumnsComputed(),{source:n,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]}}}};var Os=Ds,Us=wa.TYPE,Fs=Us.WhiteSpace,Bs=Us.Comment,qs=function(e){var t=this.createList(),n=null,r={recognizer:e,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case Bs:this.scanner.next();continue;case Fs:r.ignoreWS?this.scanner.next():r.space=this.WhiteSpace();continue}if(void 0===(n=e.getNode.call(this,r)))break;null!==r.space&&(t.push(r.space),r.space=null),t.push(n),r.ignoreWSAfter?(r.ignoreWSAfter=!1,r.ignoreWS=!0):r.ignoreWS=!1}return t},{findWhiteSpaceStart:js,cmpStr:Hs}=Ir,Ws=function(){},Vs=ar.TYPE,$s=ar.NAME,Ys=Vs.WhiteSpace,Gs=Vs.Comment,Ks=Vs.Ident,Qs=Vs.Function,Js=Vs.Url,Zs=Vs.Hash,Xs=Vs.Percentage,ei=Vs.Number;function ti(e){return function(){return this[e]()}}var ni=function(e){var t={scanner:new Br,locationMap:new Os,filename:"<unknown>",needPositions:!1,onParseError:Ws,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:qs,createList:function(){return new Jn},createSingleNodeList:function(e){return(new Jn).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==Ys)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=$s[e]+" is expected";switch(e){case Ks:this.scanner.tokenType===Qs||this.scanner.tokenType===Js?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case Zs:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case Xs:this.scanner.tokenType===ei&&(t=this.scanner.tokenEnd,n="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1)}this.error(n,t)}this.scanner.next()},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(Qs),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t<this.scanner.source.length?this.locationMap.getLocation(t):this.scanner.eof?this.locationMap.getLocation(js(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new tr(e||"Unexpected input",this.scanner.source,n.offset,n.line,n.column)}};for(var n in e=function(e){var t={context:{},scope:{},atrule:{},pseudo:{}};if(e.parseContext)for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=ti(e.parseContext[n])}if(e.scope)for(var n in e.scope)t.scope[n]=e.scope[n];if(e.atrule)for(var n in e.atrule){var r=e.atrule[n];r.parse&&(t.atrule[n]=r.parse)}if(e.pseudo)for(var n in e.pseudo){var a=e.pseudo[n];a.parse&&(t.pseudo[n]=a.parse)}if(e.node)for(var n in e.node)t[n]=e.node[n].parse;return t}(e||{}))t[n]=e[n];return function(e,n){var r,a=(n=n||{}).context||"default",o=n.onComment;if(wa(e,t.scanner),t.locationMap.setSource(e,n.offset,n.line,n.column),t.filename=n.filename||"<unknown>",t.needPositions=Boolean(n.positions),t.onParseError="function"==typeof n.onParseError?n.onParseError:Ws,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!("parseAtrulePrelude"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!("parseRulePrelude"in n)||Boolean(n.parseRulePrelude),t.parseValue=!("parseValue"in n)||Boolean(n.parseValue),t.parseCustomProperty="parseCustomProperty"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(a))throw new Error("Unknown context `"+a+"`");return"function"==typeof o&&t.scanner.forEachToken(((n,r,a)=>{if(n===Gs){const n=t.getLocation(r,a),s=Hs(e,a-2,a,"*/")?e.slice(r+2,a-2):e.slice(r+2,a);o(s,n)}})),r=t.context[a].call(t,n),t.scanner.eof||t.error(),r}},ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ai=function(e){if(0<=e&&e<ri.length)return ri[e];throw new TypeError("Must be between 0 and 63: "+e)};var oi=function(e){var t,n="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&r,(r>>>=5)>0&&(t|=32),n+=ai(t)}while(r>0);return n};var si=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function a(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[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}function s(e){var n=e,r=a(e);if(r){if(!r.path)return e;n=r.path}for(var s,i=t.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(s=l[u])?l.splice(u,1):".."===s?c++:c>0&&(""===s?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=i?"/":"."),r?(r.path=n,o(r)):n}function i(e,t){""===e&&(e="."),""===t&&(t=".");var n=a(t),i=a(e);if(i&&(e=i.path||"/"),n&&!n.scheme)return i&&(n.scheme=i.scheme),o(n);if(n||t.match(r))return t;if(i&&!i.host&&!i.path)return i.host=t,o(i);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return i?(i.path=l,o(i)):l}t.urlParse=a,t.urlGenerate=o,t.normalize=s,t.join=i,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(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 n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=a(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var l=r.path.lastIndexOf("/");l>=0&&(r.path=r.path.substring(0,l+1))}t=i(o(r),t)}return s(t)}})),ii=(si.getArg,si.urlParse,si.urlGenerate,si.normalize,si.join,si.isAbsolute,si.relative,si.toSetString,si.fromSetString,si.compareByOriginalPositions,si.compareByGeneratedPositionsDeflated,si.compareByGeneratedPositionsInflated,si.parseSourceMapInput,si.computeSourceURL,Object.prototype.hasOwnProperty),li="undefined"!=typeof Map;function ci(){this._array=[],this._set=li?new Map:Object.create(null)}ci.fromArray=function(e,t){for(var n=new ci,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},ci.prototype.size=function(){return li?this._set.size:Object.getOwnPropertyNames(this._set).length},ci.prototype.add=function(e,t){var n=li?e:si.toSetString(e),r=li?this.has(e):ii.call(this._set,n),a=this._array.length;r&&!t||this._array.push(e),r||(li?this._set.set(e,a):this._set[n]=a)},ci.prototype.has=function(e){if(li)return this._set.has(e);var t=si.toSetString(e);return ii.call(this._set,t)},ci.prototype.indexOf=function(e){if(li){var t=this._set.get(e);if(t>=0)return t}else{var n=si.toSetString(e);if(ii.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},ci.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},ci.prototype.toArray=function(){return this._array.slice()};var ui={ArraySet:ci};function hi(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}hi.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},hi.prototype.add=function(e){var t,n,r,a,o,s;t=this._last,n=e,r=t.generatedLine,a=n.generatedLine,o=t.generatedColumn,s=n.generatedColumn,a>r||a==r&&s>=o||si.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},hi.prototype.toArray=function(){return this._sorted||(this._array.sort(si.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var di=ui.ArraySet,pi={MappingList:hi}.MappingList;function mi(e){e||(e={}),this._file=si.getArg(e,"file",null),this._sourceRoot=si.getArg(e,"sourceRoot",null),this._skipValidation=si.getArg(e,"skipValidation",!1),this._sources=new di,this._names=new di,this._mappings=new pi,this._sourcesContents=null}mi.prototype._version=3,mi.fromSourceMap=function(e){var t=e.sourceRoot,n=new mi({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=si.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var a=r;null!==t&&(a=si.relative(t,r)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(r);null!=o&&n.setSourceContent(r,o)})),n},mi.prototype.addMapping=function(e){var t=si.getArg(e,"generated"),n=si.getArg(e,"original",null),r=si.getArg(e,"source",null),a=si.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},mi.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=si.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[si.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[si.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},mi.prototype.applySourceMap=function(e,t,n){var r=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.');r=e.file}var a=this._sourceRoot;null!=a&&(r=si.relative(a,r));var o=new di,s=new di;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=si.join(n,t.source)),null!=a&&(t.source=si.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||s.has(c)||s.add(c)}),this),this._sources=o,this._names=s,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=si.join(n,t)),null!=a&&(t=si.relative(a,t)),this.setSourceContent(t,r))}),this)},mi.prototype._validateMapping=function(e,t,n,r){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||n||r)&&!(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&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},mi.prototype._serializeMappings=function(){for(var e,t,n,r,a=0,o=1,s=0,i=0,l=0,c=0,u="",h=this._mappings.toArray(),d=0,p=h.length;d<p;d++){if(e="",(t=h[d]).generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(d>0){if(!si.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=","}e+=oi(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=oi(r-c),c=r,e+=oi(t.originalLine-1-i),i=t.originalLine-1,e+=oi(t.originalColumn-s),s=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=oi(n-l),l=n)),u+=e}return u},mi.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=si.relative(t,e));var n=si.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},mi.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},mi.prototype.toString=function(){return JSON.stringify(this.toJSON())};var fi={SourceMapGenerator:mi}.SourceMapGenerator,gi={Atrule:!0,Selector:!0,Declaration:!0},yi=Object.prototype.hasOwnProperty;function bi(e,t){var n=e.children,r=null;"function"!=typeof t?n.forEach(this.node,this):n.forEach((function(e){null!==r&&t.call(this,r),this.node(e),r=e}),this)}var vi=function(e){function t(e){if(!yi.call(n,e.type))throw new Error("Unknown node type: "+e.type);n[e.type].call(this,e)}var n={};if(e.node)for(var r in e.node)n[r]=e.node[r].generate;return function(e,n){var r="",a={children:bi,node:t,chunk:function(e){r+=e},result:function(){return r}};return n&&("function"==typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=function(e){var t=new fi,n=1,r=0,a={line:1,column:0},o={line:0,column:0},s=!1,i={line:1,column:0},l={generated:i},c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&gi.hasOwnProperty(e.type)){var u=e.loc.start.line,h=e.loc.start.column-1;o.line===u&&o.column===h||(o.line=u,o.column=h,a.line=n,a.column=r,s&&(s=!1,a.line===i.line&&a.column===i.column||t.addMapping(l)),s=!0,t.addMapping({source:e.loc.source,original:o,generated:a}))}c.call(this,e),s&&gi.hasOwnProperty(e.type)&&(i.line=n,i.column=r)};var u=e.chunk;e.chunk=function(e){for(var t=0;t<e.length;t++)10===e.charCodeAt(t)?(n++,r=0):r++;u(e)};var h=e.result;return e.result=function(){return s&&t.addMapping(l),{css:h(),map:t}},e}(a))),a.node(e),a.result()}},ki=Object.prototype.hasOwnProperty,wi=function(){};function xi(e){return"function"==typeof e?e:wi}function Si(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function Ei(e,t){var n=t.structure,r=[];for(var a in n)if(!1!==ki.call(n,a)){var o=n[a],s={name:a,type:!1,nullable:!1};Array.isArray(n[a])||(o=[n[a]]);for(var i=0;i<o.length;i++){var l=o[i];null===l?s.nullable=!0:"string"==typeof l?s.type="node":Array.isArray(l)&&(s.type="list")}s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function Ai(e,t){var n=e.fields.slice(),r=e.context,a="string"==typeof r;return t&&n.reverse(),function(e,o,s,i){var l;a&&(l=o[r],o[r]=e);for(var c=0;c<n.length;c++){var u=n[c],h=e[u.name];if(!u.nullable||h)if("list"===u.type){if(t?h.reduceRight(i,!1):h.reduce(i,!1))return!0}else if(s(h))return!0}a&&(o[r]=l)}}function Ti(e){return{Atrule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Rule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Declaration:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block,DeclarationList:e.DeclarationList}}}var Ci=function(e){var t=function(e){var t={};for(var n in e.node)if(ki.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Ei(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),o=Symbol("skip-node");for(var s in t)ki.call(t,s)&&null!==t[s]&&(n[s]=Ai(t[s],!1),r[s]=Ai(t[s],!0));var i=Ti(n),l=Ti(r),c=function(e,s){function c(e,t,n){var r=h.call(m,e,t,n);return r===a||r!==o&&(!(!p.hasOwnProperty(e.type)||!p[e.type](e,m,c,u))||d.call(m,e,t,n)===a)}var u=(e,t,n,r)=>e||c(t,n,r),h=wi,d=wi,p=n,m={break:a,skip:o,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof s)h=s;else if(s&&(h=xi(s.enter),d=xi(s.leave),s.reverse&&(p=r),s.visit)){if(i.hasOwnProperty(s.visit))p=s.reverse?l[s.visit]:i[s.visit];else if(!t.hasOwnProperty(s.visit))throw new Error("Bad value `"+s.visit+"` for `visit` option (should be: "+Object.keys(t).join(", ")+")");h=Si(h,s.visit),d=Si(d,s.visit)}if(h===wi&&d===wi)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return c.break=a,c.skip=o,c.find=function(e,t){var n=null;return c(e,(function(e,r,o){if(t.call(this,e,r,o))return n=e,a})),n},c.findLast=function(e,t){var n=null;return c(e,{reverse:!0,enter:function(e,r,o){if(t.call(this,e,r,o))return n=e,a}}),n},c.findAll=function(e,t){var n=[];return c(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},c},Ri=function e(t){var n={};for(var r in t){var a=t[r];a&&(Array.isArray(a)||a instanceof Jn?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n};const _i=Object.prototype.hasOwnProperty,Ii={generic:!0,types:zi,atrules:{prelude:Mi,descriptors:Mi},properties:zi,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(const r in n)_i.call(n,r)&&(Li(t[r])?e(t[r],Pi(n[r])):t[r]=Pi(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Li(e){return e&&e.constructor===Object}function Pi(e){return Li(e)?Object.assign({},e):e}function Ni(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function zi(e,t){if("string"==typeof t)return Ni(e,t);const n=Object.assign({},e);for(let r in t)_i.call(t,r)&&(n[r]=Ni(_i.call(e,r)?e[r]:void 0,t[r]));return n}function Mi(e,t){const n=zi(e,t);return!Li(n)||Object.keys(n).length?n:null}function Di(e,t,n){for(const r in n)if(!1!==_i.call(n,r))if(!0===n[r])r in t&&_i.call(t,r)&&(e[r]=Pi(t[r]));else if(n[r])if("function"==typeof n[r]){const a=n[r];e[r]=a({},e[r]),e[r]=a(e[r]||{},t[r])}else if(Li(n[r])){const a={};for(let t in e[r])a[t]=Di({},e[r][t],n[r]);for(let e in t[r])a[e]=Di(a[e]||{},t[r][e],n[r]);e[r]=a}else if(Array.isArray(n[r])){const a={},o=n[r].reduce((function(e,t){return e[t]=!0,e}),{});for(const[t,n]of Object.entries(e[r]||{}))a[t]={},n&&Di(a[t],n,o);for(const e in t[r])_i.call(t[r],e)&&(a[e]||(a[e]={}),t[r]&&t[r][e]&&Di(a[e],t[r][e],o));e[r]=a}return e}var Oi=(e,t)=>Di(e,t,Ii);function Ui(e){var t=ni(e),n=Ci(e),r=vi(e),a=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof Jn==0&&(e.children=(new Jn).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof Jn&&(e.children=e.children.toArray())}}),t}}}(n),o={List:Jn,SyntaxError:tr,TokenStream:Br,Lexer:Ns,vendorPrefix:ea.vendorPrefix,keyword:ea.keyword,property:ea.property,isCustomProperty:ea.isCustomProperty,definitionSyntax:zs,lexer:null,createLexer:function(e){return new Ns(e,o,o.lexer.structure)},tokenize:wa,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:Ri,fromPlainObject:a.fromPlainObject,toPlainObject:a.toPlainObject,createSyntax:function(e){return Ui(Oi({},e))},fork:function(t){var n=Oi({},e);return Ui("function"==typeof t?t(n,Object.assign):Oi(n,t))}};return o.lexer=new Ns({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var Fi=function(e){return Ui(Oi({},e))},Bi={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","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( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",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":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<quote>|<target>|<leader()>|<attr()>|counter( <ident> , <'list-style-type'>? )]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","counter()":"counter( <custom-ident> , <counter-style>? )","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <custom-ident> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","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":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<positive-integer>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] <resolution>","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","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":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","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-selector":"<pseudo-page>+|<ident> <pseudo-page>*","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<timing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-transition":"[none|<single-transition-property>]||<time>||<timing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<positive-integer>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#","name-repeat":"repeat( [<positive-integer>|auto-fill] , <line-names>+ )",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",ratio:"<integer> / <integer>",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"<integer [0,1]>","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<'color'>","-webkit-border-before-color":"<'color'>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<timing-function>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","color-adjust":"economy|exact","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ <string>]?","counter-increment":"[<custom-ident> <integer>?]+|none","counter-reset":"[<custom-ident> <integer>?]+|none","counter-set":"[<custom-ident> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|<number>","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<url>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"over|under|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|dark|light|<color>{2}","scrollbar-gutter":"auto|[stable|always]&&both?&&force?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|<shape-box>||<basic-shape>|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<timing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length-percentage>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [<media-query-list>]?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}}},qi=wa.cmpChar,ji=wa.isDigit,Hi=wa.TYPE,Wi=Hi.WhiteSpace,Vi=Hi.Comment,$i=Hi.Ident,Yi=Hi.Number,Gi=Hi.Dimension,Ki=43,Qi=45,Ji=110,Zi=!0;function Xi(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(r!==Ki&&r!==Qi||(t&&this.error("Number sign is not allowed"),n++);n<this.scanner.tokenEnd;n++)ji(this.scanner.source.charCodeAt(n))||this.error("Integer is expected",n)}function el(e){return Xi.call(this,0,e)}function tl(e,t){if(!qi(this.scanner.source,this.scanner.tokenStart+e,t)){var n="";switch(t){case Ji:n="N is expected";break;case Qi:n="HyphenMinus is expected"}this.error(n,this.scanner.tokenStart+e)}}function nl(){for(var e=0,t=0,n=this.scanner.tokenType;n===Wi||n===Vi;)n=this.scanner.lookupType(++e);if(n!==Yi){if(!this.scanner.isDelim(Ki,e)&&!this.scanner.isDelim(Qi,e))return null;t=this.scanner.isDelim(Ki,e)?Ki:Qi;do{n=this.scanner.lookupType(++e)}while(n===Wi||n===Vi);n!==Yi&&(this.scanner.skip(e),el.call(this,Zi))}return e>0&&this.scanner.skip(e),0===t&&(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))!==Ki&&n!==Qi&&this.error("Number sign is expected"),el.call(this,0!==t),t===Qi?"-"+this.consume(Yi):this.consume(Yi)}var rl={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===Yi)el.call(this,false),n=this.consume(Yi);else if(this.scanner.tokenType===$i&&qi(this.scanner.source,this.scanner.tokenStart,Qi))switch(t="-1",tl.call(this,1,Ji),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=nl.call(this);break;case 3:tl.call(this,2,Qi),this.scanner.next(),this.scanner.skipSC(),el.call(this,Zi),n="-"+this.consume(Yi);break;default:tl.call(this,2,Qi),Xi.call(this,3,Zi),this.scanner.next(),n=this.scanner.substrToCursor(e+2)}else if(this.scanner.tokenType===$i||this.scanner.isDelim(Ki)&&this.scanner.lookupType(1)===$i){var r=0;switch(t="1",this.scanner.isDelim(Ki)&&(r=1,this.scanner.next()),tl.call(this,0,Ji),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=nl.call(this);break;case 2:tl.call(this,1,Qi),this.scanner.next(),this.scanner.skipSC(),el.call(this,Zi),n="-"+this.consume(Yi);break;default:tl.call(this,1,Qi),Xi.call(this,2,Zi),this.scanner.next(),n=this.scanner.substrToCursor(e+r+1)}}else if(this.scanner.tokenType===Gi){for(var a=this.scanner.source.charCodeAt(this.scanner.tokenStart),o=(r=a===Ki||a===Qi,this.scanner.tokenStart+r);o<this.scanner.tokenEnd&&ji(this.scanner.source.charCodeAt(o));o++);o===this.scanner.tokenStart+r&&this.error("Integer is expected",this.scanner.tokenStart+r),tl.call(this,o-this.scanner.tokenStart,Ji),t=this.scanner.source.substring(e,o),o+1===this.scanner.tokenEnd?(this.scanner.next(),n=nl.call(this)):(tl.call(this,o-this.scanner.tokenStart+1,Qi),o+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),el.call(this,Zi),n="-"+this.consume(Yi)):(Xi.call(this,o-this.scanner.tokenStart+2,Zi),this.scanner.next(),n=this.scanner.substrToCursor(o+1)))}else this.error();return null!==t&&t.charCodeAt(0)===Ki&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===Ki&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.scanner.tokenStart),a:t,b:n}},generate:function(e){var t=null!==e.a&&void 0!==e.a,n=null!==e.b&&void 0!==e.b;t?(this.chunk("+1"===e.a?"+n":"1"===e.a?"n":"-1"===e.a?"-n":e.a+"n"),n&&("-"===(n=String(e.b)).charAt(0)||"+"===n.charAt(0)?(this.chunk(n.charAt(0)),this.chunk(n.substr(1))):(this.chunk("+"),this.chunk(n)))):this.chunk(String(e.b))}},al=wa.TYPE,ol=al.WhiteSpace,sl=al.Semicolon,il=al.LeftCurlyBracket,ll=al.Delim;function cl(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===ol?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function ul(){return 0}var hl={name:"Raw",structure:{value:String},parse:function(e,t,n){var r,a=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||ul)),r=n&&this.scanner.tokenStart>a?cl.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(a,r),value:this.scanner.source.substring(a,r)}},generate:function(e){this.chunk(e.value)},mode:{default:ul,leftCurlyBracket:function(e){return e===il?1:0},leftCurlyBracketOrSemicolon:function(e){return e===il||e===sl?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===ll&&33===t.charCodeAt(n)||e===sl?1:0},semicolonIncluded:function(e){return e===sl?2:0}}},dl=wa.TYPE,pl=hl.mode,ml=dl.AtKeyword,fl=dl.Semicolon,gl=dl.LeftCurlyBracket,yl=dl.RightCurlyBracket;function bl(e){return this.Raw(e,pl.leftCurlyBracketOrSemicolon,!0)}function vl(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===yl)return!0;if(e===gl||e===ml)return!1}return!1}var kl={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null,a=null;switch(this.eat(ml),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==gl&&this.scanner.tokenType!==fl&&(this.parseAtrulePrelude?"AtrulePrelude"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),bl)).type&&null===r.children.head&&(r=null):r=bl.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case fl:this.scanner.next();break;case gl:a=this.atrule.hasOwnProperty(t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(vl.call(this))}return{type:"Atrule",loc:this.getLocation(n,this.scanner.tokenStart),name:e,prelude:r,block:a}},generate:function(e){this.chunk("@"),this.chunk(e.name),null!==e.prelude&&(this.chunk(" "),this.node(e.prelude)),e.block?this.node(e.block):this.chunk(";")},walkContext:"atrule"},wl=wa.TYPE,xl=wl.Semicolon,Sl=wl.LeftCurlyBracket,El={name:"AtrulePrelude",structure:{children:[[]]},parse:function(e){var t=null;return null!==e&&(e=e.toLowerCase()),this.scanner.skipSC(),t=this.atrule.hasOwnProperty(e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),!0!==this.scanner.eof&&this.scanner.tokenType!==Sl&&this.scanner.tokenType!==xl&&this.error("Semicolon or block is expected"),null===t&&(t=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e)},walkContext:"atrulePrelude"},Al=wa.TYPE,Tl=Al.Ident,Cl=Al.String,Rl=Al.Colon,_l=Al.LeftSquareBracket,Il=Al.RightSquareBracket;function Ll(){this.scanner.eof&&this.error("Unexpected end of input");var e=this.scanner.tokenStart,t=!1,n=!0;return this.scanner.isDelim(42)?(t=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(Tl),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(Tl)):t&&this.error("Identifier is expected",this.scanner.tokenEnd):t&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===Rl&&(this.scanner.next(),this.eat(Tl)),{type:"Identifier",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function Pl(){var e=this.scanner.tokenStart,t=this.scanner.source.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),61!==t&&(this.scanner.isDelim(61)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(e)}var Nl={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var e,t=this.scanner.tokenStart,n=null,r=null,a=null;return this.eat(_l),this.scanner.skipSC(),e=Ll.call(this),this.scanner.skipSC(),this.scanner.tokenType!==Il&&(this.scanner.tokenType!==Tl&&(n=Pl.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===Cl?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===Tl&&(a=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(Il),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:n,value:r,flags:a}},generate:function(e){var t=" ";this.chunk("["),this.node(e.name),null!==e.matcher&&(this.chunk(e.matcher),null!==e.value&&(this.node(e.value),"String"===e.value.type&&(t=""))),null!==e.flags&&(this.chunk(t),this.chunk(e.flags)),this.chunk("]")}},zl=wa.TYPE,Ml=hl.mode,Dl=zl.WhiteSpace,Ol=zl.Comment,Ul=zl.Semicolon,Fl=zl.AtKeyword,Bl=zl.LeftCurlyBracket,ql=zl.RightCurlyBracket;function jl(e){return this.Raw(e,null,!0)}function Hl(){return this.parseWithFallback(this.Rule,jl)}function Wl(e){return this.Raw(e,Ml.semicolonIncluded,!0)}function Vl(){if(this.scanner.tokenType===Ul)return Wl.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,Wl);return this.scanner.tokenType===Ul&&this.scanner.next(),e}var $l={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(e){var t=e?Vl:Hl,n=this.scanner.tokenStart,r=this.createList();this.eat(Bl);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case ql:break e;case Dl:case Ol:this.scanner.next();break;case Fl:r.push(this.parseWithFallback(this.Atrule,jl));break;default:r.push(t.call(this))}return this.scanner.eof||this.eat(ql),{type:"Block",loc:this.getLocation(n,this.scanner.tokenStart),children:r}},generate:function(e){this.chunk("{"),this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")})),this.chunk("}")},walkContext:"block"},Yl=wa.TYPE,Gl=Yl.LeftSquareBracket,Kl=Yl.RightSquareBracket,Ql={name:"Brackets",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(Gl),n=e.call(this,t),this.scanner.eof||this.eat(Kl),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("["),this.children(e),this.chunk("]")}},Jl=wa.TYPE.CDC,Zl={name:"CDC",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(Jl),{type:"CDC",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("--\x3e")}},Xl=wa.TYPE.CDO,ec={name:"CDO",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(Xl),{type:"CDO",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("\x3c!--")}},tc=wa.TYPE.Ident,nc={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(46)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(tc)}},generate:function(e){this.chunk("."),this.chunk(e.name)}},rc=wa.TYPE.Ident,ac={name:"Combinator",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 62:case 43:case 126:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.tokenType===rc&&!1!==this.scanner.lookupValue(0,"deep")||this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected")}return{type:"Combinator",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},oc=wa.TYPE.Comment,sc={name:"Comment",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(oc),t-e+2>=2&&42===this.scanner.source.charCodeAt(t-2)&&47===this.scanner.source.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e+2,t)}},generate:function(e){this.chunk("/*"),this.chunk(e.value),this.chunk("*/")}},ic=ea.isCustomProperty,lc=wa.TYPE,cc=hl.mode,uc=lc.Ident,hc=lc.Hash,dc=lc.Colon,pc=lc.Semicolon,mc=lc.Delim,fc=lc.WhiteSpace;function gc(e){return this.Raw(e,cc.exclamationMarkOrSemicolon,!0)}function yc(e){return this.Raw(e,cc.exclamationMarkOrSemicolon,!1)}function bc(){var e=this.scanner.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==pc&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}var vc={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=kc.call(this),a=ic(r),o=a?this.parseCustomProperty:this.parseValue,s=a?yc:gc,i=!1;this.scanner.skipSC(),this.eat(dc);const l=this.scanner.tokenIndex;if(a||this.scanner.skipSC(),e=o?this.parseWithFallback(bc,s):s.call(this,this.scanner.tokenIndex),a&&"Value"===e.type&&e.children.isEmpty())for(let t=l-this.scanner.tokenIndex;t<=0;t++)if(this.scanner.lookupType(t)===fc){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(i=wc.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==pc&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:i,property:r,value:e}},generate:function(e){this.chunk(e.property),this.chunk(":"),this.node(e.value),e.important&&this.chunk(!0===e.important?"!important":"!"+e.important)},walkContext:"declaration"};function kc(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===mc)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next()}return this.scanner.tokenType===hc?this.eat(hc):this.eat(uc),this.scanner.substrToCursor(e)}function wc(){this.eat(mc),this.scanner.skipSC();var e=this.consume(uc);return"important"===e||e}var xc=wa.TYPE,Sc=hl.mode,Ec=xc.WhiteSpace,Ac=xc.Comment,Tc=xc.Semicolon;function Cc(e){return this.Raw(e,Sc.semicolonIncluded,!0)}var Rc={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case Ec:case Ac:case Tc:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,Cc))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";")}))}},_c=Ir.consumeNumber,Ic=wa.TYPE.Dimension,Lc={name:"Dimension",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=_c(this.scanner.source,e);return this.eat(Ic),{type:"Dimension",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t),unit:this.scanner.source.substring(t,this.scanner.tokenStart)}},generate:function(e){this.chunk(e.value),this.chunk(e.unit)}},Pc=wa.TYPE.RightParenthesis,Nc={name:"Function",structure:{name:String,children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart,a=this.consumeFunctionName(),o=a.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.scanner.eof||this.eat(Pc),{type:"Function",loc:this.getLocation(r,this.scanner.tokenStart),name:a,children:n}},generate:function(e){this.chunk(e.name),this.chunk("("),this.children(e),this.chunk(")")},walkContext:"function"},zc=wa.TYPE.Hash,Mc={name:"Hash",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(zc),{type:"Hash",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.value)}},Dc=wa.TYPE.Ident,Oc={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(Dc)}},generate:function(e){this.chunk(e.name)}},Uc=wa.TYPE.Hash,Fc={name:"IdSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(Uc),{type:"IdSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.name)}},Bc=wa.TYPE,qc=Bc.Ident,jc=Bc.Number,Hc=Bc.Dimension,Wc=Bc.LeftParenthesis,Vc=Bc.RightParenthesis,$c=Bc.Colon,Yc=Bc.Delim,Gc={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(Wc),this.scanner.skipSC(),e=this.consume(qc),this.scanner.skipSC(),this.scanner.tokenType!==Vc){switch(this.eat($c),this.scanner.skipSC(),this.scanner.tokenType){case jc:n=this.lookupNonWSType(1)===Yc?this.Ratio():this.Number();break;case Hc:n=this.Dimension();break;case qc:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(Vc),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:n}},generate:function(e){this.chunk("("),this.chunk(e.name),null!==e.value&&(this.chunk(":"),this.node(e.value)),this.chunk(")")}},Kc=wa.TYPE,Qc=Kc.WhiteSpace,Jc=Kc.Comment,Zc=Kc.Ident,Xc=Kc.LeftParenthesis,eu={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var e=this.createList(),t=null,n=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case Jc:this.scanner.next();continue;case Qc:n=this.WhiteSpace();continue;case Zc:t=this.Identifier();break;case Xc:t=this.MediaFeature();break;default:break e}null!==n&&(e.push(n),n=null),e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},tu=wa.TYPE.Comma,nu={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(e){var t=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(t.push(this.MediaQuery(e)),this.scanner.tokenType===tu);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(",")}))}},ru=wa.TYPE.Number,au={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(ru)}},generate:function(e){this.chunk(e.value)}},ou={name:"Operator",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},su=wa.TYPE,iu=su.LeftParenthesis,lu=su.RightParenthesis,cu={name:"Parentheses",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(iu),n=e.call(this,t),this.scanner.eof||this.eat(lu),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("("),this.children(e),this.chunk(")")}},uu=Ir.consumeNumber,hu=wa.TYPE.Percentage,du={name:"Percentage",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=uu(this.scanner.source,e);return this.eat(hu),{type:"Percentage",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t)}},generate:function(e){this.chunk(e.value),this.chunk("%")}},pu=wa.TYPE,mu=pu.Ident,fu=pu.Function,gu=pu.Colon,yu=pu.RightParenthesis,bu={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(gu),this.scanner.tokenType===fu?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(yu)):e=this.consume(mu),{type:"PseudoClassSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(":"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"},vu=wa.TYPE,ku=vu.Ident,wu=vu.Function,xu=vu.Colon,Su=vu.RightParenthesis,Eu={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(xu),this.eat(xu),this.scanner.tokenType===wu?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(Su)):e=this.consume(ku),{type:"PseudoElementSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk("::"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"))},walkContext:"function"},Au=wa.isDigit,Tu=wa.TYPE,Cu=Tu.Number,Ru=Tu.Delim;function _u(){this.scanner.skipWS();for(var e=this.consume(Cu),t=0;t<e.length;t++){var n=e.charCodeAt(t);Au(n)||46===n||this.error("Unsigned number is expected",this.scanner.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.scanner.tokenStart-e.length),e}var Iu={name:"Ratio",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=_u.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.eat(Ru),e=_u.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:n,right:e}},generate:function(e){this.chunk(e.left),this.chunk("/"),this.chunk(e.right)}},Lu=wa.TYPE,Pu=hl.mode,Nu=Lu.LeftCurlyBracket;function zu(e){return this.Raw(e,Pu.leftCurlyBracket,!0)}function Mu(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==Nu&&this.error(),e}var Du={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var e,t,n=this.scanner.tokenIndex,r=this.scanner.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Mu,zu):zu.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.scanner.tokenStart),prelude:e,block:t}},generate:function(e){this.node(e.prelude),this.node(e.block)},walkContext:"rule"},Ou=wa.TYPE.Comma,Uu={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===Ou);)this.scanner.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(",")}))},walkContext:"selector"},Fu=wa.TYPE.String,Bu={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Fu)}},generate:function(e){this.chunk(e.value)}},qu=wa.TYPE,ju=qu.WhiteSpace,Hu=qu.Comment,Wu=qu.AtKeyword,Vu=qu.CDO,$u=qu.CDC;function Yu(e){return this.Raw(e,null,!1)}var Gu={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var e,t=this.scanner.tokenStart,n=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case ju:this.scanner.next();continue;case Hu:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case Vu:e=this.CDO();break;case $u:e=this.CDC();break;case Wu:e=this.parseWithFallback(this.Atrule,Yu);break;default:e=this.parseWithFallback(this.Rule,Yu)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e)},walkContext:"stylesheet"},Ku=wa.TYPE.Ident;function Qu(){this.scanner.tokenType!==Ku&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next()}var Ju={name:"TypeSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),Qu.call(this)):(Qu.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),Qu.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name)}},Zu=wa.isHexDigit,Xu=wa.cmpChar,eh=wa.TYPE,th=wa.NAME,nh=eh.Ident,rh=eh.Number,ah=eh.Dimension;function oh(e,t){for(var n=this.scanner.tokenStart+e,r=0;n<this.scanner.tokenEnd;n++){var a=this.scanner.source.charCodeAt(n);if(45===a&&t&&0!==r)return 0===oh.call(this,e+r+1,!1)&&this.error(),-1;Zu(a)||this.error(t&&0!==r?"HyphenMinus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n)}return this.scanner.next(),r}function sh(e){for(var t=0;this.scanner.isDelim(63);)++t>e&&this.error("Too many question marks"),this.scanner.next()}function ih(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(th[e]+" is expected")}function lh(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===nh?void((e=oh.call(this,0,!0))>0&&sh.call(this,6-e)):this.scanner.isDelim(63)?(this.scanner.next(),void sh.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===rh?(ih.call(this,43),e=oh.call(this,1,!0),this.scanner.isDelim(63)?void sh.call(this,6-e):this.scanner.tokenType===ah||this.scanner.tokenType===rh?(ih.call(this,45),void oh.call(this,1,!1)):void 0):this.scanner.tokenType===ah?(ih.call(this,43),void((e=oh.call(this,1,!0))>0&&sh.call(this,6-e))):void this.error()}var ch={name:"UnicodeRange",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return Xu(this.scanner.source,e,117)||this.error("U is expected"),Xu(this.scanner.source,e+1,43)||this.error("Plus sign is expected"),this.scanner.next(),lh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value)}},uh=wa.isWhiteSpace,hh=wa.cmpStr,dh=wa.TYPE,ph=dh.Function,mh=dh.Url,fh=dh.RightParenthesis,gh={name:"Url",structure:{value:["String","Raw"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case mh:for(var n=t+4,r=this.scanner.tokenEnd-1;n<r&&uh(this.scanner.source.charCodeAt(n));)n++;for(;n<r&&uh(this.scanner.source.charCodeAt(r-1));)r--;e={type:"Raw",loc:this.getLocation(n,r),value:this.scanner.source.substring(n,r)},this.eat(mh);break;case ph:hh(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(ph),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(fh);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(e){this.chunk("url"),this.chunk("("),this.node(e.value),this.chunk(")")}},yh=wa.TYPE.WhiteSpace,bh=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),vh={AnPlusB:rl,Atrule:kl,AtrulePrelude:El,AttributeSelector:Nl,Block:$l,Brackets:Ql,CDC:Zl,CDO:ec,ClassSelector:nc,Combinator:ac,Comment:sc,Declaration:vc,DeclarationList:Rc,Dimension:Lc,Function:Nc,Hash:Mc,Identifier:Oc,IdSelector:Fc,MediaFeature:Gc,MediaQuery:eu,MediaQueryList:nu,Nth:{name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(e){this.scanner.skipSC();var t,n=this.scanner.tokenStart,r=n,a=null;return t=this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),e&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),a=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(a.children).loc.end.offset)):this.needPositions&&(r=t.loc.end.offset),{type:"Nth",loc:this.getLocation(n,r),nth:t,selector:a}},generate:function(e){this.node(e.nth),null!==e.selector&&(this.chunk(" of "),this.node(e.selector))}},Number:au,Operator:ou,Parentheses:cu,Percentage:du,PseudoClassSelector:bu,PseudoElementSelector:Eu,Ratio:Iu,Raw:hl,Rule:Du,Selector:{name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e)}},SelectorList:Uu,String:Bu,StyleSheet:Gu,TypeSelector:Ju,UnicodeRange:ch,Url:gh,Value:{name:"Value",structure:{children:[[]]},parse:function(){var e=this.scanner.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.scanner.tokenStart),children:t}},generate:function(e){this.children(e)}},WhiteSpace:{name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(yh),bh},generate:function(e){this.chunk(e.value)}}},kh={generic:!0,types:Bi.types,atrules:Bi.atrules,properties:Bi.properties,node:vh},wh=wa.cmpChar,xh=wa.cmpStr,Sh=wa.TYPE,Eh=Sh.Ident,Ah=Sh.String,Th=Sh.Number,Ch=Sh.Function,Rh=Sh.Url,_h=Sh.Hash,Ih=Sh.Dimension,Lh=Sh.Percentage,Ph=Sh.LeftParenthesis,Nh=Sh.LeftSquareBracket,zh=Sh.Comma,Mh=Sh.Delim,Dh=function(e){switch(this.scanner.tokenType){case _h:return this.Hash();case zh:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case Ph:return this.Parentheses(this.readSequence,e.recognizer);case Nh:return this.Brackets(this.readSequence,e.recognizer);case Ah:return this.String();case Ih:return this.Dimension();case Lh:return this.Percentage();case Th:return this.Number();case Ch:return xh(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case Rh:return this.Url();case Eh:return wh(this.scanner.source,this.scanner.tokenStart,117)&&wh(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case Mh:var t=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1)}},Oh={getNode:Dh},Uh=wa.TYPE,Fh=Uh.Delim,Bh=Uh.Ident,qh=Uh.Dimension,jh=Uh.Percentage,Hh=Uh.Number,Wh=Uh.Hash,Vh=Uh.Colon,$h=Uh.LeftSquareBracket;var Yh={getNode:function(e){switch(this.scanner.tokenType){case $h:return this.AttributeSelector();case Wh:return this.IdSelector();case Vh:return this.scanner.lookupType(1)===Vh?this.PseudoElementSelector():this.PseudoClassSelector();case Bh:return this.TypeSelector();case Hh:case jh:return this.Percentage();case qh:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case Fh:switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 43:case 62:case 126:return e.space=null,e.ignoreWSAfter=!0,this.Combinator();case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}},Gh=wa.TYPE,Kh=hl.mode,Qh=Gh.Comma,Jh=Gh.WhiteSpace,Zh={AtrulePrelude:Oh,Selector:Yh,Value:{getNode:Dh,expression:function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},var:function(){var e=this.createList();if(this.scanner.skipSC(),e.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===Qh){e.push(this.Operator());const t=this.scanner.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,Kh.exclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty())for(let e=t-this.scanner.tokenIndex;e<=0;e++)if(this.scanner.lookupType(e)===Jh){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}}},Xh=wa.TYPE,ed=Xh.String,td=Xh.Ident,nd=Xh.Url,rd=Xh.Function,ad=Xh.LeftParenthesis,od={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case ed:e.push(this.String());break;case nd:case rd:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.lookupNonWSType(0)!==td&&this.lookupNonWSType(0)!==ad||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}},sd=wa.TYPE,id=sd.WhiteSpace,ld=sd.Comment,cd=sd.Ident,ud=sd.Function,hd=sd.Colon,dd=sd.LeftParenthesis;function pd(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function md(){return this.scanner.skipSC(),this.scanner.tokenType===cd&&this.lookupNonWSType(1)===hd?this.createSingleNodeList(this.Declaration()):fd.call(this)}function fd(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case id:n=this.WhiteSpace();continue;case ld:this.scanner.next();continue;case ud:e=this.Function(pd,this.scope.AtrulePrelude);break;case cd:e=this.Identifier();break;case dd:e=this.Parentheses(md,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e)}return t}var gd,yd={parse:function(){return this.createSingleNodeList(this.SelectorList())}},bd={parse:function(){return this.createSingleNodeList(this.Nth(true))}},vd={parse:function(){return this.createSingleNodeList(this.Nth(false))}},kd={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Zh,atrule:{"font-face":{parse:{prelude:null,block:function(){return this.Block(!0)}}},import:od,media:{parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},page:{parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},supports:{parse:{prelude:function(){var e=fd.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block:function(){return this.Block(!1)}}}},pseudo:{dir:{parse:function(){return this.createSingleNodeList(this.Identifier())}},has:{parse:function(){return this.createSingleNodeList(this.SelectorList())}},lang:{parse:function(){return this.createSingleNodeList(this.Identifier())}},matches:yd,not:yd,"nth-child":bd,"nth-last-child":bd,"nth-last-of-type":vd,"nth-of-type":vd,slotted:{parse:function(){return this.createSingleNodeList(this.Selector())}}},node:vh},wd={node:vh},xd="1.1.2",Sd={version:xd},Ed=(gd=Object.freeze({__proto__:null,version:xd,default:Sd}))&&gd.default||gd;var Ad=Fi(function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}(kh,kd,wd)),Td=Ed.version;Ad.version=Td;var Cd=Ad;const Rd=Cd.generate,_d=Cd.parse;var Id=Object.freeze({__proto__:null,generate:Rd,parse:_d});function Ld(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){let n;const r=t.exec(e.substring(f));if(r)return n=r[0],f+=n.length,n}const r=e.length,a=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,s=/^[^ \t\n\r\u000c]+/,i=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;let u,h,d,p,m,f=0;const g=[];for(;;){if(n(o),f>=r)return g;u=n(s),h=[],","===u.slice(-1)?(u=u.replace(i,""),b()):y()}function y(){for(n(a),d="",p="in descriptor";;){if(m=e.charAt(f),"in descriptor"===p)if(t(m))d&&(h.push(d),d="",p="after descriptor");else{if(","===m)return f+=1,d&&h.push(d),void b();if("("===m)d+=m,p="in parens";else{if(""===m)return d&&h.push(d),void b();d+=m}}else if("in parens"===p)if(")"===m)d+=m,p="in descriptor";else{if(""===m)return h.push(d),void b();d+=m}else if("after descriptor"===p)if(t(m));else{if(""===m)return void b();p="in descriptor",f-=1}f+=1}}function b(){let t,n,r,a,o,s,i,d,p,m=!1;const f={};for(a=0;a<h.length;a++)o=h[a],s=o[o.length-1],i=o.substring(0,o.length-1),d=parseInt(i,10),p=parseFloat(i),l.test(i)&&"w"===s?((t||n)&&(m=!0),0===d?m=!0:t=d):c.test(i)&&"x"===s?((t||n||r)&&(m=!0),p<0?m=!0:n=p):l.test(i)&&"h"===s?((r||n)&&(m=!0),0===d?m=!0:r=d):m=!0;m?console&&console.log&&console.log('Invalid srcset descriptor found in "'+e+'" at "'+o+'".'):(f.url=u,t&&(f.w=t),n&&(f.d=n),r&&(f.h=r),g.push(f))}}var Pd=Object.freeze({__proto__:null,process:Ld});let Nd,zd,Md,Dd;Nd={},Nd.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),Nd.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),Nd.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,Nd.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),Nd.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),Nd.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),Nd.collectAnHTTPQuotedString=(e,t)=>{let n="";for(t++;;){for(;t<e.length&&'"'!==e[t]&&"\\"!==e[t];)n+=e[t],++t;if(t>=e.length)break;const r=e[t];if(++t,"\\"!==r)break;if(t>=e.length){n+="\\";break}n+=e[t],++t}return[n,t]};{const{solelyContainsHTTPTokenCodePoints:e}=Nd;Md=t=>{let n=`${t.type}/${t.subtype}`;if(0===t.parameters.size)return n;for(let[r,a]of t.parameters)n+=";",n+=r,n+="=",e(a)&&0!==a.length||(a=a.replace(/(["\\])/g,"\\$1"),a=`"${a}"`),n+=a;return n}}{const{removeLeadingAndTrailingHTTPWhitespace:e,removeTrailingHTTPWhitespace:t,isHTTPWhitespaceChar:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a,asciiLowercase:o,collectAnHTTPQuotedString:s}=Nd;zd=i=>{i=e(i);let l=0,c="";for(;l<i.length&&"/"!==i[l];)c+=i[l],++l;if(0===c.length||!r(c))return null;if(l>=i.length)return null;++l;let u="";for(;l<i.length&&";"!==i[l];)u+=i[l],++l;if(u=t(u),0===u.length||!r(u))return null;const h={type:o(c),subtype:o(u),parameters:new Map};for(;l<i.length;){for(++l;n(i[l]);)++l;let e="";for(;l<i.length&&";"!==i[l]&&"="!==i[l];)e+=i[l],++l;if(e=o(e),l<i.length){if(";"===i[l])continue;++l}let c=null;if('"'===i[l])for([c,l]=s(i,l);l<i.length&&";"!==i[l];)++l;else{for(c="";l<i.length&&";"!==i[l];)c+=i[l],++l;if(c=t(c),""===c)continue}e.length>0&&r(e)&&a(c)&&!h.parameters.has(e)&&h.parameters.set(e,c)}return h}}{const e=zd,t=Md,{asciiLowercase:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a}=Nd;Dd=class{constructor(t){t=String(t);const n=e(t);if(null===n)throw new Error(`Could not parse MIME type string "${t}"`);this._type=n.type,this._subtype=n.subtype,this._parameters=new o(n.parameters)}static parse(e){try{return new this(e)}catch(e){return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(0===(e=n(String(e))).length)throw new Error("Invalid type: must be a non-empty string");if(!r(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(0===(e=n(String(e))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!r(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return t(this)}isJavaScript({allowParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}default:return!1}}isXML(){return"xml"===this._subtype&&("text"===this._type||"application"===this._type)||this._subtype.endsWith("+xml")}isHTML(){return"html"===this._subtype&&"text"===this._type}};class o{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=n(String(e)),this._map.get(e)}has(e){return e=n(String(e)),this._map.has(e)}set(e,t){if(e=n(String(e)),t=String(t),!r(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!a(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=n(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}}var Od=Object.freeze({__proto__:null,fontPropertyParser:wt,mediaQueryParser:Ct,cssMinifier:Vn,cssTree:Id,cssUnescape:k,srcsetParser:Pd,get MIMEType(){return Dd}});const Ud={normalizeFontFamily:ee,getFontWeight:ie},Fd=globalThis.FontFace,Bd=/url\s*\(\s*'(.*?)'\s*\)/i,qd=/url\s*\(\s*"(.*?)"\s*\)/i,jd=/url\s*\(\s*(.*?)\s*\)/i,Hd=/(url|local)\(.*?\)\s*(,|$)/g,Wd=/^'(.*?)'$/,Vd=/^"(.*?)"$/,$d=/^url\(\s*["']?data:font\/(woff2?)/,Yd=/^url\(\s*["']?data:application\/x-font-(woff)/,Gd=/\.([^.?#]+)((\?|#).*?)?$/,Kd=/format\((.*?)\)\s*,?$/,Qd=/(.*?)\s*,?$/,Jd=/^url\(["']?data:[^,]*,?["']?\)/,Zd="local(",Xd={"ultra-condensed":"50%","extra-condensed":"62.5%",condensed:"75%","semi-condensed":"87.5%",normal:"100%","semi-expanded":"112.5%",expanded:"125%","extra-expanded":"150%","ultra-expanded":"200%"};async function ep(e,t,n,r){const a={fonts:new Map,medias:new Map,supports:new Map},o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let s=0;return t.forEach((t=>{const n=t.stylesheet.children;if(n)if(o.rules.processed+=n.getSize(),o.rules.discarded+=n.getSize(),t.mediaText&&"all"!=t.mediaText){const r=ip();a.medias.set("media-"+s+"-"+t.mediaText,r),tp(e,n,s,r)}else tp(e,n,s,a);s++})),np(a),await Promise.all([...t].map((async([,e],t)=>{const s=e.stylesheet.children,i=e.mediaText;s&&(i&&"all"!=i?await rp(s,t,a.medias.get("media-"+t+"-"+i),n,r,o):await rp(s,t,a,n,r,o),o.rules.discarded-=s.getSize())}))),o}function tp(e,t,n,r){let a=0,o=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const o=Rd(t.prelude),s=ip();r.medias.set("media-"+n+"-"+a+"-"+o,s),a++,tp(e,t.block.children,n,s)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const a=Rd(t.prelude),s=ip();r.supports.set("supports-"+n+"-"+o+"-"+a,s),o++,tp(e,t.block.children,n,s)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=sp(t);let n=r.fonts.get(e);n||(n=[],r.fonts.set(e,n));const a=op(t,"src");if(a){const e=a.match(Hd);e&&e.forEach((e=>n.unshift(e)))}}}))}function np(e){e.fonts.forEach(((t,n)=>{e.fonts.set(n,t.map((e=>{const t=e.match(Kd);let n;const r=e.match(Bd)||e.match(qd)||e.match(jd),a=r&&r[1];if(t&&t[1]&&(n=t[1].replace(Wd,"$1").replace(Vd,"$1").toLowerCase()),!n){const t=e.match($d);if(t&&t[1])n=t[1];else{const t=e.match(Yd);t&&t[1]&&(n=t[1])}}if(!n&&a){const e=a.match(Gd);e&&e[1]&&(n=e[1])}return{src:e.match(Qd)[1],fontUrl:a,format:n}})))})),e.medias.forEach((e=>np(e))),e.supports.forEach((e=>np(e)))}async function rp(e,t,n,r,a,o){const s=[];let i=0,l=0;for(let c=e.head;c;c=c.next){const e=c.data;if("Atrule"==e.type&&"media"==e.name&&e.block&&e.block.children&&e.prelude){const s=Rd(e.prelude);await rp(e.block.children,t,n.medias.get("media-"+t+"-"+i+"-"+s),r,a,o),i++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const s=Rd(e.prelude);await rp(e.block.children,t,n.supports.get("supports-"+t+"-"+l+"-"+s),r,a,o),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=sp(e),i=n.fonts.get(t);if(i){await ap(e,i,r,a,o)&&n.fonts.delete(t)}else s.push(c)}}s.forEach((t=>e.remove(t)))}async function ap(e,t,n,r,a){const o=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&o.push(t);o.pop(),o.forEach((t=>e.block.children.remove(t)));const s=e.block.children.filter((e=>"src"==e.property)).tail;if(s){await Promise.all(t.map((async(e,t)=>{if(r.has(e.src))e.valid=r.get(e.src);else{if(Fd){const r=new Fd("test-font",e.src);try{await r.load(),await r.loaded,e.valid=!0}catch(r){const a=n.get(s.data);if(a){const n=a[a.length-t-1];if(n){const t=new Fd("test-font","url("+n+")");try{await Promise.race([t.load().then((()=>t.loaded)).then((()=>e.valid=!0)),new Promise((t=>globalThis.setTimeout((()=>{e.valid=!0,t()}),5e3)))])}catch(e){}}}else e.valid=!0}}else e.valid=!0;r.set(e.src,e.valid)}})));const e=(e,n)=>t.find((t=>!t.src.match(Jd)&&t.format==e&&(!n||t.valid))),o=e=>t.filter((t=>t==e||t.src.startsWith(Zd)));a.fonts.processed+=t.length,a.fonts.discarded+=t.length;const i=e("woff2-variations",!0)||e("woff2",!0)||e("woff",!0);if(i)t=o(i);else{const n=e("truetype-variations",!0)||e("truetype",!0);if(n)t=o(n);else{const n=e("opentype")||e("embedded-opentype");t=n?o(n):t.filter((e=>!e.src.match(Jd)&&e.valid||e.src.startsWith(Zd)))}}a.fonts.discarded-=t.length,t.reverse();try{s.data.value=_d(t.map((e=>e.src)).join(","),{context:"value"})}catch(e){}return!0}return!1}function op(e,t){let n;if(e.block.children&&(n=e.block.children.filter((e=>{try{return e.property==t&&!Rd(e.value).match(/\\9$/)}catch(n){return e.property==t}})).tail),n)try{return Rd(n.data.value)}catch(e){}}function sp(e){return JSON.stringify([Ud.normalizeFontFamily(op(e,"font-family")),Ud.getFontWeight(op(e,"font-weight")||"400"),op(e,"font-style")||"normal",op(e,"unicode-range"),(t=op(e,"font-stretch"),Xd[t]||t),op(e,"font-variant")||"normal",op(e,"font-feature-settings"),op(e,"font-variation-settings")]);var t}function ip(){return{fonts:new Map,medias:new Map,supports:new Map}}var lp=Object.freeze({__proto__:null,process:ep});const cp={normalizeFontFamily:ee,flatten:le,getFontWeight:ie,removeQuotes:se},up=/\s*,\s*/,hp=/-/,dp=/\?/g,pp=/^U\+/i,mp=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function fp(e,t,n,r){const a={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}},o={declared:[],used:[]},s=e.createElement("style");let i="";e.body.appendChild(s),t.forEach((t=>{const n=t.stylesheet.children;n&&(a.processed+=n.getSize(),a.discarded+=n.getSize(),gp(n,o),i=Ap(e,n,s,i))})),n.forEach((e=>{const t=wp(e);t.length&&o.used.push(t),i=Tp(e.children,s,i)})),s.remove(),i+=e.body.innerText,globalThis.getComputedStyle&&r.doc&&(o.used=o.used.map((e=>e.map((e=>{const t=e.match(/^var\((--.*)\)$/);if(t&&t[1]){const n=globalThis.getComputedStyle(r.doc.body).getPropertyValue(t[1]);return n&&n.split(",").map((e=>cp.normalizeFontFamily(e)))||e}return e})))),o.used=o.used.map((e=>cp.flatten(e))));let l,c;return o.used.find((e=>e.find((e=>e.startsWith("var(--")))))?l=[]:(c=new Map,o.used.forEach((e=>e.forEach((e=>{if(o.declared.find((t=>t.fontFamily==e))){const t=r.usedFonts&&r.usedFonts.filter((t=>t[0]==e));t&&t.length&&c.set(e,t)}})))),l=o.declared.filter((e=>!c.has(e.fontFamily)))),t.forEach((e=>{const t=e.stylesheet.children;t&&(yp(t,o.declared,l,c,i),a.rules.discarded-=t.getSize())})),a}function gp(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)gp(e.block.children,t);else if("Rule"==e.type){const n=wp(e.block);n.length&&t.used.push(n)}else if("Atrule"==e.type&&"font-face"==e.name){const n=cp.normalizeFontFamily(kp(e.block.children,"font-family"));if(n){const r=kp(e.block.children,"font-weight")||"400",a=kp(e.block.children,"font-style")||"normal",o=kp(e.block.children,"font-variant")||"normal";r.split(",").forEach((e=>t.declared.push({fontFamily:n,fontWeight:cp.getFontWeight(cp.removeQuotes(e)),fontStyle:a,fontVariant:o})))}}}))}function yp(e,t,n,r,a){const o=[];for(let s=e.head;s;s=s.next){const e=s.data;if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)yp(e.block.children,t,n,r,a);else if("Atrule"==e.type&&"font-face"==e.name){const i=cp.normalizeFontFamily(kp(e.block.children,"font-family"));if(i){const l=kp(e.block.children,"unicode-range");!n.find((e=>e.fontFamily==i))&&Rp(a,l)&&bp(e,i,t,r)||o.push(s)}const l=[];for(let t=e.block.children.head;t;t=t.next)"font-display"==t.data.property&&l.push(t);l.length&&l.forEach((t=>e.block.children.remove(t)))}}o.forEach((t=>e.remove(t)))}function bp(e,t,n,r){let a;const o=r&&r.get(t);if(o&&o.length){let r=kp(e.block.children,"font-style")||"normal";if(mp.find((e=>r.trim().match(e)))){const s=cp.getFontWeight(kp(e.block.children,"font-weight")||"400"),i=n.filter((e=>e.fontFamily==t&&e.fontStyle==r)).map((e=>e.fontWeight)).sort(((e,t)=>e-t));let l=o.map((e=>xp(e,r,i)));a=vp(s,l),a||(l=o.map((e=>((e=Array.from(e))[2]="normal",xp(e,r,i))))),a=vp(s,l)}else a=!0}else a=!0;return a}function vp(e,t){return e.split(",").find((e=>t.includes(cp.getFontWeight(cp.removeQuotes(e)))))}function kp(e,t){let n;if(e&&(n=e.filter((e=>e.property==t)).tail),n)try{return cp.removeQuotes(Rd(n.data.value)).toLowerCase()}catch(e){}}function wp(e){let t=e.children.filter((e=>"font-family"==e.property)).tail,n=[];if(t){let e="";t.data.value.children?t.data.value.children.forEach((t=>{"Operator"==t.type&&","==t.value&&e?(n.push(cp.normalizeFontFamily(e)),e=""):e+=Rd(t)})):t=Rd(t.data.value),e&&n.push(cp.normalizeFontFamily(e))}const r=e.children.filter((e=>"font"==e.property)).tail;if(r&&r.data&&r.data.value)try{gt(Rd(r.data.value)).family.forEach((e=>n.push(cp.normalizeFontFamily(e))))}catch(e){}return n}function xp(e,t,n){let r;if(e[2]==t){let t=Number(e[1]);n.length>1?(t>=400&&t<=500&&(r=n.find((e=>e>=t&&e<=500)),r||(r=Sp(t,n)),r||(r=Ep(t,n))),t<400&&(r=n.slice().reverse().find((e=>e<=t)),r||(r=Ep(t,n))),t>500&&(r=n.find((e=>e>=t)),r||(r=Sp(t,n)))):r=n[0]}return r}function Sp(e,t){return t.slice().reverse().find((t=>t<e))}function Ep(e,t){return t.find((t=>t>e))}function Ap(e,t,n,r){return t.forEach((t=>{t.block&&t.block.children&&t.prelude&&t.prelude.children&&("Atrule"!=t.type||"media"!=t.name&&"supports"!=t.name?"Rule"==t.type&&(r=Tp(t.block.children,n,r)):r=Ap(e,t.block.children,n,r))})),r}function Tp(e,t,n){const r=Cp(e,"content",t),a=Cp(e,"quotes",t);return n.includes(r)||(n+=r),n.includes(a)||(n+=a),n}function Cp(e,t,n){const r=kp(e,t)||"";return r?(n.textContent='tmp { content:"'+r+'"}',n.sheet&&n.sheet.cssRules?cp.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content")):r):""}function Rp(e,t){if(t){const n=t.split(up);let r;const a=n.filter((t=>{const n=t.split(hp);let a;if(2==n.length&&(n[0]=_p(n[0]),a="["+n[0]+"-"+_p("U+"+n[1])+"]"),1==n.length)if(n[0].includes("?")){const e=_p(n[0]),t=e;a="["+e.replace(dp,"0")+"-"+t.replace(dp,"F")+"]"}else n[0]&&(a="["+_p(n[0])+"]");if(a)try{return new RegExp(a,"u").test(e)}catch(e){return r=!0,!1}return!0}));return!r&&(!n.length||a.length)}return!0}function _p(e){for(e=e.replace(pp,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var Ip=Object.freeze({__proto__:null,process:fp});const Lp="all",Pp=["after","before","first-letter","first-line","placeholder","selection","part","marker"],Np="sf-hidden",zp=/-(ms|webkit|moz|o)-/;class Mp{constructor(e,t,n){this.doc=e,this.mediaAllInfo=Op(Lp);const r=new Map;let a=0;const o=e.createElement("style");e.body.appendChild(o),t.forEach((t=>{if(!t.scoped){const s=t.stylesheet.children;if(s)if(t.mediaText&&t.mediaText!=Lp){const i=Op(t.mediaText);this.mediaAllInfo.medias.set("style-"+a+"-"+t.mediaText,i),Up(e,s,i,a,n,r,o)}else Up(e,s,this.mediaAllInfo,a,n,r,o)}a++})),jp(this.mediaAllInfo),Bp(this.mediaAllInfo,[],this.mediaAllInfo,o),o.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Dp(e,t,n){return new Mp(e,t,n).getMediaAllInfo()}function Op(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==Lp&&(t.matchedStyles=new Map),t}function Up(e,t,n,r,a,o,s){let i=0,l=0;t.forEach((t=>{if(t.block&&t.block.children&&t.prelude&&t.prelude.children)if("Atrule"==t.type&&"media"==t.name){const l=Rd(t.prelude),c=Op(l);n.medias.set("rule-"+r+"-"+i+"-"+l,c),i++,Up(e,t.block.children,c,r,a,o,s)}else if("Rule"==t.type){const i=t.prelude.children.toArray(),c=t.prelude.children.toArray().map((e=>Rd(e))),u={ruleData:t,mediaInfo:n,ruleIndex:l,sheetIndex:r,matchedSelectors:new Set,declarations:new Set,selectors:i,selectorsText:c};if(!function(e,t){return t.textContent=e+"{}",t.sheet?!t.sheet.cssRules.length:t.sheet}(c.join(","),s))for(let n=t.prelude.children.head,r=0;n;n=n.next,r++){const t=c[r];Fp(e,{selector:n,selectorText:t,ruleInfo:u},a,o)}l++}}))}function Fp(e,t,n,r){const a=function(e,t){const n=[];r(e={data:_d(Rd(e.data),{context:"selector"})}),n.length&&(n.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.getSize()&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,_d("*",{context:"selector"}).children.head)})),t=Rd(e.data).trim());return t;function r(e,t){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)r(t,e);("PseudoClassSelector"==e.data.type||"PseudoElementSelector"==e.data.type&&(a(e)||Pp.includes(e.data.name)))&&n.push({parentSelector:t,selector:e})}function a(e){const t=e.data.name;return t.startsWith("-")||t.startsWith("\\-")}}(t.selector,t.selectorText),o=a!=t.selectorText?a:t.selectorText,s=r.get(o);let i=s;if(!i)try{i=e.querySelectorAll(o),".sf-hidden"!=o&&(i=Array.from(e.querySelectorAll(o)).filter((e=>!e.classList.contains(Np)&&("none"!=e.style.getPropertyValue("display")||"important"!=e.style.getPropertyPriority("display")))))}catch(e){}if(i&&(s||r.set(o,i),i.length))if(a==t.selectorText)i.forEach((e=>function(e,t,n){const r=t.ruleInfo.mediaInfo,a=n.get(e);let o=r.elements.get(e);o||(o=[],a&&o.push({styleInfo:{styleData:a,declarations:new Set}}),r.elements.set(e,o));const s=Hp(t.selector.data);s.ruleIndex=t.ruleInfo.ruleIndex,s.sheetIndex=t.ruleInfo.sheetIndex,t.specificity=s,o.push(t)}(e,t,n)));else{let e=t.ruleInfo.mediaInfo.pseudoRules.get(t.ruleInfo.ruleData);e||(e=new Set,t.ruleInfo.mediaInfo.pseudoRules.set(t.ruleInfo.ruleData,e)),e.add(t.selectorText)}}function Bp(e,t,n,r){e.elements.forEach((a=>function(e,t){const n=new Map,r=new Set;return e.forEach((e=>{let a;a=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,n,r,a){for(let o=t.tail;o;o=o.prev){const t=o.data,s=Rd(t);if("Declaration"==t.type&&(s.match(zp)||!r.has(t.property)||t.important)&&!qp(s,a)){const a=e.get(t);(!a||t.important&&!a.important)&&(e.set(t,{selectorInfo:n,important:t.important}),s.match(zp)||r.add(t.property))}}}(n,a,e,r,t)})),n}(a,r).forEach(((r,a)=>{if(r.selectorInfo.ruleInfo||e==n){let o;if(r.selectorInfo.ruleInfo){o=r.selectorInfo.ruleInfo;const n=o.ruleData;([e,...t].find((e=>e.rules.get(n)))||e).rules.set(n,o),n&&o.matchedSelectors.add(r.selectorInfo.selectorText)}else{o=r.selectorInfo.styleInfo;const e=o.styleData;n.matchedStyles.get(e)||n.matchedStyles.set(e,o)}o.declarations.has(a)||o.declarations.add(a)}})))),delete e.elements,e.medias.forEach((a=>Bp(a,[e,...t],n,r)))}function qp(e,t){let n;return t.textContent="single-file-declaration { "+e+"}",t.sheet&&!t.sheet.cssRules[0].style.length&&(e.match(zp)||(n=!0)),n}function jp(e){e.elements.forEach((e=>e.sort(((e,t)=>{return e.styleInfo&&!t.styleInfo?-1:!e.styleInfo&&t.styleInfo?1:(n=e.specificity,r=t.specificity,n.a>r.a?-1:n.a<r.a?1:n.b>r.b?-1:n.b<r.b?1:n.c>r.c?-1:n.c<r.c?1:n.sheetIndex>r.sheetIndex?-1:n.sheetIndex<r.sheetIndex?1:n.ruleIndex>r.ruleIndex?-1:n.ruleIndex<r.ruleIndex?1:-1);var n,r})))),e.medias.forEach(jp)}function Hp(e,t={a:0,b:0,c:0}){return"IdSelector"==e.type&&t.a++,("ClassSelector"==e.type||"AttributeSelector"==e.type||"PseudoClassSelector"==e.type&&"not"!=e.name)&&t.b++,("TypeSelector"==e.type&&"*"!=e.name||"PseudoElementSelector"==e.type)&&t.c++,e.children&&e.children.forEach((e=>Hp(e,t))),t}var Wp=Object.freeze({__proto__:null,getMediaAllInfo:Dp});const Vp={flatten:le},$p="all",Yp="screen";function Gp(e){const t={processed:0,discarded:0};return e.forEach(((n,r)=>{if(Qp(n.mediaText||$p,Yp)&&n.stylesheet.children){Kp(n.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(r)})),t}function Kp(e,t,n=[]){for(let r=e.head;r;r=r.next){const a=r.data;"Atrule"==a.type&&"media"==a.name&&a.block&&a.block.children&&a.prelude&&a.prelude.children&&(t.processed++,Qp(Rd(a.prelude),Yp)?Kp(a.block.children,t,n):(n.push({cssRules:e,cssRule:r}),t.discarded++))}return n}function Qp(e,t){return Vp.flatten(Et(e).map((e=>Jp(e,t)))).find((e=>!e.not&&(e.value==t||e.value==$p)||e.not&&(e.value==$p||e.value!=t)))}function Jp(e,t,n=[]){return e.nodes.map(((r,a)=>{if("media-query"==r.type)return Jp(r,t,n);if("media-type"==r.type){const t={not:Boolean(a&&"keyword"==e.nodes[0].type&&"not"==e.nodes[0].value),value:r.value};n.find((e=>t.not==e.not&&t.value==e.value))||n.push(t)}})),n.length||n.push({not:!1,value:$p}),n}var Zp=Object.freeze({__proto__:null,process:Gp});function Xp(e,t,n){const r={processed:0,discarded:0};let a=0;return e.forEach((e=>{if(!e.scoped){const t=e.stylesheet.children;if(t){let o;r.processed+=t.getSize(),r.discarded+=t.getSize(),o=e.mediaText&&"all"!=e.mediaText?n.medias.get("style-"+a+"-"+e.mediaText):n,em(t,a,o),r.discarded-=t.getSize()}}a++})),t.forEach((e=>function(e,t){const n=[],r=t.matchedStyles.get(e);if(r){let t;for(let a=e.children.head;a&&!t;a=a.next)r.declarations.has(a.data)||n.push(a);n.forEach((t=>e.children.remove(t)))}}(e,n))),r}function em(e,t,n){let r=0;const a=[];for(let o=e.head;o;o=o.next){const e=o.data;if(e.block&&e.block.children&&e.prelude&&e.prelude.children){if("Atrule"==e.type&&"media"==e.name){const s=Rd(e.prelude);em(e.block.children,t,n.medias.get("rule-"+t+"-"+r+"-"+s)),e.prelude.children.getSize()&&e.block.children.getSize()||a.push(o),r++}else if("Rule"==e.type){const t=n.rules.get(e),r=n.pseudoRules.get(e);t||r?t&&(tm(e,t,r),e.prelude.children.getSize()&&e.block.children.getSize()||a.push(o)):a.push(o)}}else e&&"Raw"!=e.type&&("Rule"!=e.type||e.prelude&&"Raw"!=e.prelude.type)||a.push(o)}a.forEach((t=>e.remove(t)))}function tm(e,t,n){const r=[],a=[];let o;for(let r=e.prelude.children.head;r;r=r.next){const e=Rd(r.data);n&&n.has(e)&&(o=!0),t.matchedSelectors.has(e)||n&&n.has(e)||a.push(r)}if(!o)for(let n=e.block.children.tail;n;n=n.prev)t.declarations.has(n.data)||r.push(n);r.forEach((t=>e.block.children.remove(t))),a.forEach((t=>e.prelude.children.remove(t)))}var nm=Object.freeze({__proto__:null,process:Xp});const rm="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";function am(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:n,srcset:r}=om(t);if(!n){const t=function(e){let t=e.find((e=>e.src)),n=t&&t.src,r=t&&t.srcset;n||(t=e.find((e=>im(e.src))),n=t&&t.src,n==rm&&(n=null));r||(t=e.find((e=>im(e.srcset))),r=t&&t.srcset,r==rm&&(r=null));return{src:n,srcset:r}}(Array.from(e.querySelectorAll("source")).reverse());n=t.src,r||(r=t.srcset)}sm({src:n,srcset:r},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>sm(om(e),e)))}function om(e){let t=e.getAttribute("src");t==rm&&(t=null);let n=im(e.getAttribute("srcset"));return n==rm&&(n=null),{src:t,srcset:n}}function sm(e,t,n){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",rm),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),n&&n.querySelectorAll("source").forEach((e=>e.remove()))}function im(e){if(e){const t=Ld(e);if(t.length)return t.find((e=>e.url)).url}}var lm=Object.freeze({__proto__:null,process:am});const cm=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","truespeed","typemustmatch","visible"],um=["script","style","pre","textarea"],hm=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],dm={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},pm=/[ \t\f\r]+/g,mm=/[\n]+/g,fm=/^\s+$/,gm=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{cm.includes(t.name)&&e.setAttribute(t.name,"")}))},function(e){3==e.nodeType&&e.previousSibling&&3==e.previousSibling.nodeType&&(e.textContent=e.previousSibling.textContent+e.textContent,e.previousSibling.remove())},function(e,t){if(3==e.nodeType){let n=e.parentElement;if(!(""==n.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let r=bm(n);for(;r;)n=n.parentElement,r=n&&bm(n);(!n||r)&&t.length>1&&(e.textContent=t.replace(pm,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(mm,"\n"))}}},function(e){if(8==e.nodeType&&"HTML"!=e.parentElement.tagName)return!e.textContent.toLowerCase().trim().startsWith("[if")},function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{if(hm.includes(t.name.toLowerCase())){const n=e.getAttribute(t.name);(""==n||(n||"").match(fm))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=dm[e.tagName.toLowerCase()];t&&Object.keys(t).forEach((n=>{const r=t[n];("function"==typeof r?r(e):e.getAttribute(n)==r)&&e.removeAttribute(n)}))}},function(e){if(1==e.nodeType&&"SCRIPT"==e.tagName&&"application/ld+json"==e.type&&e.textContent.trim())try{e.textContent=JSON.stringify(JSON.parse(e.textContent))}catch(e){}},e=>function(e,t,n){if(1==e.nodeType&&e.tagName.toLowerCase()==t.toLowerCase()){let t=e.previousSibling;const r=[];for(;t&&3==t.nodeType&&!t.textContent.trim();)r.push(t),t=t.previousSibling;t&&1==t.nodeType&&t.tagName==e.tagName&&n(e,t)&&(e.textContent=t.textContent+e.textContent,r.forEach((e=>e.remove())),t.remove())}}(e,"style",((e,t)=>e.parentElement&&"HEAD"==e.parentElement.tagName&&e.media==t.media&&e.title==t.title))];function ym(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const n=e.createTreeWalker(e.documentElement,4294967295,null,!1);let r=n.nextNode();for(;r;){const e=gm.find((e=>e(r,t))),a=r;r=n.nextNode(),e&&a.remove()}}function bm(e){return e&&!um.includes(e.tagName.toLowerCase())}var vm=Object.freeze({__proto__:null,process:ym});const km=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],wm=[{tagName:"head",accept:e=>!e.childNodes.length||1==e.childNodes[0].nodeType},{tagName:"body",accept:e=>!e.childNodes.length}],xm=[{tagName:"html",accept:e=>!e||8!=e.nodeType},{tagName:"head",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!Tm(e.textContent))},{tagName:"body",accept:e=>!e||8!=e.nodeType},{tagName:"li",accept:(e,t)=>!e&&t.parentElement&&("UL"==t.parentElement.tagName||"OL"==t.parentElement.tagName)||e&&["LI"].includes(e.tagName)},{tagName:"dt",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"p",accept:e=>e&&["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIV","DL","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"].includes(e.tagName)},{tagName:"dd",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"rt",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"rp",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"optgroup",accept:e=>!e||["OPTGROUP"].includes(e.tagName)},{tagName:"option",accept:e=>!e||["OPTION","OPTGROUP"].includes(e.tagName)},{tagName:"colgroup",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!Tm(e.textContent))},{tagName:"caption",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!Tm(e.textContent))},{tagName:"thead",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tbody",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tfoot",accept:e=>!e},{tagName:"tr",accept:e=>!e||["TR"].includes(e.tagName)},{tagName:"td",accept:e=>!e||["TD","TH"].includes(e.tagName)},{tagName:"th",accept:e=>!e||["TD","TH"].includes(e.tagName)}],Sm=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function Em(e,t){const n=e.doctype;let r="";return n&&(r="<!DOCTYPE "+n.nodeName,n.publicId?(r+=' PUBLIC "'+n.publicId+'"',n.systemId&&(r+=' "'+n.systemId+'"')):n.systemId&&(r+=' SYSTEM "'+n.systemId+'"'),n.internalSubset&&(r+=" ["+n.internalSubset+"]"),r+="> "),r+Am(e.documentElement,t)}function Am(e,t,n){return 3==e.nodeType?function(e){const t=e.parentNode;let n;t&&1==t.nodeType&&(n=t.tagName.toLowerCase());return!n||Sm.includes(n)?"script"==n?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&amp;").replace(/\u00a0/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}(e):8==e.nodeType?"\x3c!--"+e.textContent+"--\x3e":1==e.nodeType?function(e,t,n){const r=e.tagName.toLowerCase(),a=t&&wm.find((t=>r==t.tagName&&t.accept(e)));let o="";a&&!e.attributes.length||(o="<"+r,Array.from(e.attributes).forEach((n=>o+=function(e,t,n){const r=e.name;let a="";if(!r.match(/["'>/=]/)){let o,s=e.value;n&&"class"==r&&(s=Array.from(t.classList).map((e=>e.trim())).join(" ")),s=s.replace(/&/g,"&amp;").replace(/\u00a0/g,"&nbsp;"),s.includes('"')&&(s.includes("'")||!n?s=s.replace(/"/g,"&quot;"):o=!0);const i=!n||!s.match(/^[^ \t\n\f\r'"`=<>]+$/);a+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?a+="xml:"+r:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==r&&(a+="xmlns:"),a+=r):"http://www.w3.org/1999/xlink"==e.namespaceURI?a+="xlink:"+r:a+=r:a+=r,""!=s&&(a+="=",i&&(a+=o?"'":'"'),a+=s,i&&(a+=o?"'":'"'))}return a}(n,e,t))),o+=">");"TEMPLATE"!=e.tagName||e.childNodes.length?Array.from(e.childNodes).forEach((e=>o+=Am(e,t,n||"svg"==r))):o+=e.innerHTML;const s=t&&xm.find((t=>r==t.tagName&&t.accept(e.nextSibling,e)));(n||!s&&!km.includes(r))&&(o+="</"+r+">");return o}(e,t,n):void 0}function Tm(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var Cm=Object.freeze({__proto__:null,process:Em}),Rm=Object.freeze({__proto__:null,fontsAltMinifier:lp,fontsMinifier:Ip,matchedRules:Wp,mediasAltMinifier:Zp,cssRulesMinifier:nm,imagesAltMinifier:lm,htmlMinifier:vm,serializer:Cm});const _m=globalThis.Set,Im=globalThis.Map;let Lm,Pm;class Nm{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(Lm.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new $m(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(Lm.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const zm="page-loading",Mm="page-loaded",Dm="resource-initializing",Om="resources-initialized",Um="resource-loaded",Fm="page-ended",Bm="stage-started",qm="stage-ended",jm="stage-task-started",Hm="stage-task-ended";class Wm{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:zm,PAGE_LOADED:Mm,RESOURCES_INITIALIZING:Dm,RESOURCES_INITIALIZED:Om,RESOURCE_LOADED:Um,PAGE_ENDED:Fm,STAGE_STARTED:Bm,STAGE_ENDED:qm,STAGE_TASK_STARTED:jm,STAGE_TASK_ENDED:Hm}}}const Vm=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"replaceCanvasElements"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"setInputValues"},{option:"removeScripts",action:"removeScripts"},{option:"selected",action:"removeUnselectedElements"},{option:"removeVideoSrc",action:"insertVideoPosters"},{option:"removeFrames",action:"removeFrames"},{option:"removeVideoSrc",action:"removeVideoSources"},{option:"removeAudioSrc",action:"removeAudioSources"},{action:"removeDiscardedResources"},{option:"removeHiddenElements",action:"removeHiddenElements"},{action:"resolveHrefs"},{action:"resolveStyleAttributeURLs"}],parallel:[{action:"resolveStylesheetURLs"},{option:"!removeFrames",action:"resolveFrameURLs"},{action:"resolveHtmlImportURLs"}]},{sequential:[{option:"removeUnusedStyles",action:"removeUnusedStyles"},{option:"removeAlternativeMedias",action:"removeAlternativeMedias"},{option:"removeUnusedFonts",action:"removeUnusedFonts"}],parallel:[{action:"processStylesheets"},{action:"processStyleAttributes"},{action:"processPageResources"},{option:"!removeScripts",action:"processScripts"}]},{sequential:[{option:"removeAlternativeImages",action:"removeAlternativeImages"}],parallel:[{option:"removeAlternativeFonts",action:"removeAlternativeFonts"},{option:"!removeFrames",action:"processFrames"},{option:"!removeImports",action:"processHtmlImports"}]},{sequential:[{action:"replaceStylesheets"},{action:"replaceStyleAttributes"},{action:"insertVariables"},{option:"compressHTML",action:"compressHTML"},{action:"cleanupPage"}],parallel:[{option:"enableMaff",action:"insertMAFFMetaData"},{action:"setDocInfo"}]}];class $m{constructor(e,t){const n=t&&e.doc;this.root=t,this.options=e,this.options.url=this.options.url||n&&this.options.doc.location.href;const r=this.options.url.match(/^.*\//);if(this.options.resourceReferrer=this.options.passReferrerOnError&&r&&r[0],this.options.baseURI=n&&this.options.doc.baseURI,this.options.rootDocument=t,this.options.updatedResources=this.options.updatedResources||{},this.options.fontTests=new Im,this.batchRequest=new Ym,this.processor=new rf(e,this.batchRequest),n){const e=Lm.preProcessDoc(this.options.doc,this.options.win,this.options);this.options.canvases=e.canvases,this.options.fonts=e.fonts,this.options.stylesheets=e.stylesheets,this.options.images=e.images,this.options.posters=e.posters,this.options.usedFonts=e.usedFonts,this.options.shadowRoots=e.shadowRoots,this.options.imports=e.imports,this.options.referrer=e.referrer,this.markedElements=e.markedElements}this.options.saveRawPage&&(this.options.removeFrames=!0),this.options.content=this.options.content||(n?Lm.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new Wm(zm,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new Wm(Mm,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new Wm(Dm,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&Lm.postProcessDoc(this.options.doc,this.markedElements)}cancel(){function e(e){e.runner&&e.runner.cancel()}this.cancelled=!0,this.batchRequest.cancel(),this.root&&(this.options.frames&&this.options.frames.forEach(e),this.options.imports&&this.options.imports.forEach(e))}async run(){this.root&&(this.processor.initialize(this.batchRequest),this.onprogress(new Wm(Om,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new Wm(Um,e))}),this.options),await this.pendingPromises,this.options.doc=null,this.options.win=null,await this.executeStage(2),await this.executeStage(3),this.processor.finalize()}getDocument(){return this.processor.doc}getStyleSheets(){return this.processor.stylesheets}getPageData(){return this.root&&this.onprogress(new Wm(Fm,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let n;return this.onprogress(new Wm(Bm,{pageURL:this.options.url,step:e,frame:t})),Vm[e].sequential.forEach((n=>{this.onprogress(new Wm(jm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||this.executeTask(n),this.onprogress(new Wm(Hm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))})),n=Vm[e].parallel?await Promise.all(Vm[e].parallel.map((async n=>{this.onprogress(new Wm(jm,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||await this.executeTask(n),this.onprogress(new Wm(Hm,{pageURL:this.options.url,step:e,task:n.action,frame:t}))}))):Promise.resolve(),this.onprogress(new Wm(qm,{pageURL:this.options.url,step:e,frame:t})),n}executeTask(e){if(!e.option||e.option.startsWith("!")&&!this.options[e.option]||this.options[e.option])return this.processor[e.action]()}}class Ym{constructor(){this.requests=new Im,this.duplicates=new Im}addURL(e,t,n,r){return new Promise(((a,o)=>{const s=JSON.stringify([e,t,n]);let i=this.requests.get(s);i||(i=[],this.requests.set(s,i));const l={resolve:a,reject:o};if(i.push(l),r){let e=this.duplicates.get(s);e||(e=[],this.duplicates.set(s,e)),e.push(l)}}))}getMaxResources(){return this.requests.size}run(e,t){const n=[...this.requests.keys()];let r=0;return Promise.all(n.map((async n=>{const[a,o,s]=JSON.parse(n),i=this.requests.get(n);try{const l=r;r+=1;const c=await Lm.getContent(a,{asBinary:o,expectedType:s,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer});e({url:a}),this.cancelled||i.forEach((e=>{const t=this.duplicates.get(n),r=t&&t.length>1&&t.includes(e);e.resolve({content:c.data,indexResource:l,duplicate:r})}))}catch(t){r+=1,e({url:a}),i.forEach((e=>e.reject(t)))}this.requests.delete(n)})))}cancel(){this.cancelled=!0;[...this.requests.keys()].forEach((e=>{this.requests.get(e).forEach((e=>e.reject())),this.requests.delete(e)}))}}const Gm=["data:text/"],Km="data:image/svg+xml",Qm="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Jm=/<script/gi,Zm=/<noscript/gi,Xm="shadowmode",ef="delegatesfocus",tf="data-template-shadow-root",nf="utf-8";class rf{constructor(e,t){this.options=e,this.stats=new Hf(e),this.baseURI=_f(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new Im,this.styles=new Im,this.cssVariables=new Im,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(Lm.resolveURL("index.rdf",this.options.baseURI||this.options.url))),this.maxResources=this.batchRequest.getMaxResources(),this.options.saveRawPage||this.options.removeFrames||!this.options.frames||this.options.frames.forEach((e=>this.maxResources+=e.maxResources||0)),!this.options.removeImports&&this.options.imports&&this.options.imports.forEach((e=>this.maxResources+=e.maxResources||0)),this.stats.set("processed","resources",this.maxResources)}async loadPage(e,t){let n;if(e&&!this.options.saveRawPage||(n=await Lm.getContent(this.baseURI,{maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer}),e=n.data),this.doc=Lm.parseDocContent(e,this.baseURI),this.options.saveRawPage){let t;if(this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((e=>{const n=e.content.split(";")[1];n&&!t&&(t=n.split("=")[1].trim().toLowerCase())})),t&&t.toLowerCase()!=n.charset.toLowerCase())return this.loadPage(e,t)}this.workStyleElement=this.doc.createElement("style"),this.doc.body.appendChild(this.workStyleElement),this.onEventAttributeNames=function(e){const t=e.createElement("div"),n=[];for(const e in t)e.startsWith("on")&&n.push(e);return n.push("onunload"),n}(this.doc)}finalize(){this.workStyleElement.parentNode&&this.workStyleElement.remove()}async getPageData(){Lm.postProcessDoc(this.doc);const e=Lm.parseURL(this.baseURI);if(this.options.insertSingleFileComment){const e=this.doc.documentElement.firstChild;let t=this.options.saveUrl,n=this.options.saveDate;if(8==e.nodeType&&(e.textContent.includes(Lm.COMMENT_HEADER_LEGACY)||e.textContent.includes(Lm.COMMENT_HEADER))){const r=this.doc.documentElement.firstChild.textContent.split("\n"),[,,a,o]=r;t=a.split("url: ")[1],n=o.split("saved date: ")[1],e.remove()}const r=(this.options.infobarContent||"").replace(/\\n/g,"\n").replace(/\\t/g,"\t"),a=this.doc.createComment("\n "+(this.options.useLegacyCommentHeader?Lm.COMMENT_HEADER_LEGACY:Lm.COMMENT_HEADER)+" \n url: "+t+" \n saved date: "+n+(r?" \n info: "+r:"")+"\n");this.doc.documentElement.insertBefore(a,this.doc.documentElement.firstChild)}if(this.options.insertCanonicalLink&&this.options.saveUrl.match(df)){let e=this.doc.querySelector("link[rel=canonical]");e||(e=this.doc.createElement("link"),e.setAttribute("rel","canonical"),this.doc.head.appendChild(e)),e&&!e.href&&(e.href=this.options.saveUrl)}if(this.options.insertMetaNoIndex){let e=this.doc.querySelector("meta[name=robots][content*=noindex]");e||(e=this.doc.createElement("meta"),e.setAttribute("name","robots"),e.setAttribute("content","noindex"),this.doc.head.appendChild(e))}let t;this.options.displayStats&&(t=Lm.getContentSize(this.doc.documentElement.outerHTML));const n=Lm.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=Lm.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",t-e)}let r=await hf.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const a=this.options.filenameReplacementCharacter;if(r=Lm.getValidFilename(r,this.options.filenameReplacedCharacters,a),this.options.backgroundSave||(r=r.replace(/\//g,a)),!this.options.saveToGDrive&&Lm.getContentSize(r)>this.options.filenameMaxLength){const e=r.match(/(\.[^.]{3,4})$/),t=e&&e[0]&&e[0].length>1?e[0]:"";r=await Lm.truncateText(r,this.options.filenameMaxLength-t.length),r=r+"…"+t}r||(r="Unnamed page");const o=this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)||this.baseURI.match(/\/\/([^/]*)\/?$/),s={stats:this.stats.data,title:this.options.title||(this.baseURI&&o?o[1]:e.hostname?e.hostname:""),filename:r,content:n};return this.options.addProof&&(s.hash=await Lm.digest("SHA-256",n)),this.options.retrieveLinks&&(s.links=Array.from(new _m(Array.from(this.doc.links).map((e=>e.href))))),s}preProcessPage(){this.options.win&&this.doc.body.querySelectorAll(':not(svg) title, meta, link[href][rel*="icon"]').forEach((e=>e instanceof this.options.win.HTMLElement&&this.doc.head.appendChild(e))),this.options.images&&!this.options.saveRawPage&&(this.doc.querySelectorAll("img["+Lm.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(Lm.IMAGE_ATTRIBUTE_NAME);if(t){const n=this.options.images[Number(t)];n&&(this.options.removeHiddenElements&&(n.size&&!n.size.pxWidth&&!n.size.pxHeight||""==e.getAttribute(Lm.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",Qm):(n.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",n.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=Qm||!e.getAttribute("data-src")||(n.src=e.dataset.src,e.setAttribute("src",e.dataset.src),e.removeAttribute("data-src")))))}})),this.options.loadDeferredImages&&this.doc.querySelectorAll("img[data-srcset]").forEach((e=>{!e.getAttribute("srcset")&&e.getAttribute("data-srcset")&&(e.setAttribute("srcset",e.dataset.srcset),e.removeAttribute("data-srcset"))})))}replaceStyleContents(){this.options.stylesheets&&this.doc.querySelectorAll("style").forEach(((e,t)=>{if(e.getAttribute(Lm.STYLESHEET_ATTRIBUTE_NAME)){const n=this.options.stylesheets[Number(t)];n&&(e.textContent=n)}}))}removeUnselectedElements(){function e(e){1==e.nodeType&&e.querySelector("svg,style,link")||!n(e)?t(e):e.remove()}function t(t){n(t)&&(t.style.setProperty("display","none","important"),Array.from(t.childNodes).forEach(e))}function n(e){if(1==e.nodeType){const t=e.tagName&&e.tagName.toLowerCase();return"svg"!=t&&"style"!=t&&"link"!=t}}!function n(r){let a=!1;Array.from(r.childNodes).forEach((r=>{if(1==r.nodeType){const o=""==r.getAttribute(Lm.SELECTED_CONTENT_ATTRIBUTE_NAME);a=a||o,o?(r.removeAttribute(Lm.SELECTED_CONTENT_ATTRIBUTE_NAME),n(r)):a?e(r):t(r)}}))}(this.doc.body),this.doc.body.removeAttribute(Lm.SELECTED_CONTENT_ATTRIBUTE_NAME)}insertVideoPosters(){this.options.posters&&this.doc.querySelectorAll("video[src], video > source[src]").forEach((e=>{let t;t="VIDEO"==e.tagName?e:e.parentElement;const n=e.getAttribute(Lm.POSTER_ATTRIBUTE_NAME);if(n){const e=this.options.posters[Number(n)];!t.poster&&e&&t.setAttribute("poster",e)}}))}removeFrames(){const e=this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]');this.stats.set("discarded","frames",e.length),this.stats.set("processed","frames",e.length),this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]').forEach((e=>e.remove()))}removeScripts(){this.onEventAttributeNames.forEach((e=>this.doc.querySelectorAll("["+e+"]").forEach((t=>t.removeAttribute(e))))),this.doc.querySelectorAll("[href]").forEach((e=>{e.href&&e.href.match&&e.href.match(/^\s*javascript:/)&&e.setAttribute("href","")})),this.doc.querySelectorAll("[src]").forEach((e=>{e.src&&e.src.match(/^\s*javascript:/)&&e.removeAttribute("src")}));const e=this.doc.querySelectorAll('script:not([type="application/ld+json"]):not([data-template-shadow-root])');this.stats.set("discarded","scripts",e.length),this.stats.set("processed","scripts",e.length),e.forEach((e=>e.remove()))}removeVideoSources(){const e=this.doc.querySelectorAll("video[src], video > source");this.stats.set("discarded","video sources",e.length),this.stats.set("processed","video sources",e.length),e.forEach((t=>{"SOURCE"==t.tagName?t.remove():e.forEach((e=>e.removeAttribute("src")))}))}removeAudioSources(){const e=this.doc.querySelectorAll("audio[src], audio > source[src]");this.stats.set("discarded","audio sources",e.length),this.stats.set("processed","audio sources",e.length),e.forEach((t=>{"SOURCE"==t.tagName?t.remove():e.forEach((e=>e.removeAttribute("src")))}))}removeDiscardedResources(){this.doc.querySelectorAll("."+Lm.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove())),this.doc.querySelectorAll('meta[http-equiv=refresh], meta[disabled-http-equiv], meta[http-equiv="content-security-policy"]').forEach((e=>e.remove()));const e=this.doc.querySelectorAll('applet, object[data]:not([type="image/svg+xml"]):not([type="image/svg-xml"]):not([type="text/html"]), embed[src]:not([src*=".svg"]):not([src*=".pdf"])');this.stats.set("discarded","objects",e.length),this.stats.set("processed","objects",e.length),e.forEach((e=>e.remove()));this.doc.querySelectorAll("link[rel~=preconnect], link[rel~=prerender], link[rel~=dns-prefetch], link[rel~=preload], link[rel~=manifest], link[rel~=prefetch]").forEach((e=>{let t;t=this.options.removeScripts?/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest)/g:/(preconnect|prerender|dns-prefetch|prefetch|manifest)/g;const n=e.getAttribute("rel").replace(t,"").trim();n.length?e.setAttribute("rel",n):e.remove()})),this.doc.querySelectorAll('link[rel*=stylesheet][rel*=alternate][title],link[rel*=stylesheet]:not([href]),link[rel*=stylesheet][href=""]').forEach((e=>e.remove())),this.options.removeHiddenElements&&this.doc.querySelectorAll("input[type=hidden]").forEach((e=>e.remove())),this.options.saveFavicon||this.doc.querySelectorAll('link[rel*="icon"]').forEach((e=>e.remove())),this.doc.querySelectorAll("a[ping]").forEach((e=>e.removeAttribute("ping")))}resetCharsetMeta(){let e;this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((t=>{const n=t.content.split(";")[1];n&&!e&&(e=n.split("=")[1],e&&(this.charset=e.trim().toLowerCase())),t.remove()}));const t=this.doc.createElement("meta");t.setAttribute("charset",nf),this.doc.head.firstChild?this.doc.head.insertBefore(t,this.doc.head.firstChild):this.doc.head.appendChild(t)}setInputValues(){this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach((e=>{const t=e.getAttribute(Lm.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(Lm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(Lm.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(Lm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}saveFavicon(){let e=this.doc.querySelector('link[href][rel="icon"]');e||(e=this.doc.querySelector('link[href][rel="shortcut icon"]')),e||(e=this.doc.createElement("link"),e.setAttribute("type","image/x-icon"),e.setAttribute("rel","shortcut icon"),e.setAttribute("href","/favicon.ico")),this.doc.head.appendChild(e)}replaceCanvasElements(){this.options.canvases&&this.doc.querySelectorAll("canvas").forEach((e=>{const t=e.getAttribute(Lm.CANVAS_ATTRIBUTE_NAME);if(t){const n=this.options.canvases[Number(t)];n&&(hf.setBackgroundImage(e,"url("+n.dataURI+")"),this.stats.add("processed","canvas",1))}}))}insertFonts(){if(this.options.fonts&&this.options.fonts.length){let e="";if(this.options.fonts.forEach((t=>{if(t["font-family"]&&t.src){e+="@font-face{";let n="";Object.keys(t).forEach((e=>{n&&(n+=";"),n+=e+":"+t[e]})),e+=n+"}"}})),e){const t=this.doc.createElement("style");t.textContent=e;const n=this.doc.querySelector("style");n?n.parentElement.insertBefore(t,n):this.doc.head.insertBefore(t,this.doc.head.firstChild)}}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+Lm.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+Lm.REMOVED_CONTENT_ATTRIBUTE_NAME+"]");if(this.stats.set("discarded","hidden elements",t.length),this.stats.set("processed","hidden elements",t.length),e.length){const t=this.doc.createElement("style");t.textContent=".sf-hidden{display:none!important;}",this.doc.head.appendChild(t),e.forEach((e=>{"none"!=e.style.getPropertyValue("display")&&("important"==e.style.getPropertyPriority("display")?e.style.setProperty("display","none","important"):e.classList.add("sf-hidden"))}))}t.forEach((e=>e.remove()))}resolveHrefs(){this.doc.querySelectorAll("a[href], area[href], link[href]").forEach((e=>{const t=e.getAttribute("href").trim();if(!Uf(t)){let n;try{n=Lm.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(n){const t=_f(this.options.url);!n.startsWith(t+"#")||n.startsWith(t+"#!")||this.options.resolveFragmentIdentifierURLs||(n=n.substring(t.length));try{e.setAttribute("href",n)}catch(e){}}}}))}resolveStyleAttributeURLs(){this.doc.querySelectorAll("[style]").forEach((e=>{let t=e.getAttribute("style");this.options.compressCSS&&(t=Lm.compressCSS(t)),t=hf.resolveStylesheetURLs(t,this.baseURI,this.workStyleElement);const n=Pm.parse(t,{context:"declarationList"});this.styles.set(e,n)}))}async resolveStylesheetURLs(){if(await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map((async t=>{const n={maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,url:this.options.url,charset:this.charset,compressCSS:this.options.compressCSS,updatedResources:this.options.updatedResources,rootDocument:this.options.rootDocument,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer};let r;t.media&&(r=t.media.toLowerCase());const a={mediaText:r};t.closest("[shadowmode]")&&(a.scoped=!0),"LINK"==t.tagName&&t.charset&&(n.charset=t.charset),await e(t,a,this.stylesheets,this.baseURI,n,this.workStyleElement)}))),this.options.rootDocument){const t=Object.keys(this.options.updatedResources).filter((e=>"stylesheet"==this.options.updatedResources[e].type&&!this.options.updatedResources[e].retrieved)).map((e=>this.options.updatedResources[e]));await Promise.all(t.map((async t=>{t.retrieved=!0;const n=this.doc.createElement("style");this.doc.body.appendChild(n),n.textContent=t.content,await e(n,{},this.stylesheets,this.baseURI,this.options,this.workStyleElement)})))}async function e(e,n,r,a,o,s){r.set(e,n);let i,l=await t(e,a,o,s);Lf(l,o.charset)||(o=Object.assign({},o,{charset:Pf(l)}),l=await t(e,a,o,s));try{i=Pm.parse(qf(l))}catch(e){}i&&i.children?(o.compressCSS&&hf.removeSingleLineCssComments(i),n.stylesheet=i):r.delete(e)}async function t(e,t,n,r){let a;return a="LINK"==e.tagName?await hf.resolveLinkStylesheetURLs(e.href,t,n,r):await hf.resolveImportURLs(e.textContent,t,n,r),a||""}}async resolveFrameURLs(){if(!this.options.saveRawPage){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{"OBJECT"==e.tagName?e.setAttribute("data","data:text/html,"):(e.removeAttribute("src"),e.removeAttribute("srcdoc")),Array.from(e.childNodes).forEach((e=>e.remove()));const t=e.getAttribute(Lm.WIN_ID_ATTRIBUTE_NAME);if(this.options.frames&&t){const n=this.options.frames.find((e=>e.windowId==t));n&&await async function(e,t,n,r,a){a.insertSingleFileComment=!1,a.insertCanonicalLink=!1,a.insertMetaNoIndex=!1,a.saveFavicon=!1,a.url=e.baseURI,a.windowId=n,e.content&&(a.content=e.content,a.canvases=e.canvases,a.fonts=e.fonts,a.stylesheets=e.stylesheets,a.images=e.images,a.posters=e.posters,a.usedFonts=e.usedFonts,a.shadowRoots=e.shadowRoots,a.imports=e.imports,e.runner=new $m(a),e.frameElement=t,await e.runner.loadPage(),await e.runner.initialize(),e.maxResources=r.getMaxResources())}(n,e,t,this.batchRequest,Object.create(this.options))}})))}}insertShadowRootContents(){const e=this.doc,t=this.options;if(this.options.shadowRoots&&this.options.shadowRoots.length){!function n(r){Array.from(r.querySelectorAll("["+Lm.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((r=>{const a=r.getAttribute(Lm.SHADOW_ROOT_ATTRIBUTE_NAME);if(a){const o=t.shadowRoots[Number(a)];if(o){const t=e.createElement("template");t.setAttribute(Xm,o.mode),o.delegatesFocus&&t.setAttribute(ef),o.adoptedStyleSheets&&o.adoptedStyleSheets.forEach((n=>{const r=e.createElement("style");r.textContent=n,t.appendChild(r)}));const a=Lm.parseDocContent(o.content);if(a.head){const e=a.head.querySelector("meta[charset]");e&&e.remove(),a.head.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0))))}a.body&&a.body.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0)))),n(t),r.firstChild?r.insertBefore(t,r.firstChild):r.appendChild(t)}}}))}(this.doc),this.options.removeScripts&&this.doc.querySelectorAll("script[data-template-shadow-root]").forEach((e=>e.remove()));const n=e.createElement("script");n.setAttribute(tf,""),n.textContent='(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[shadowmode]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("shadowmode"),delegatesFocus:Boolean(element.getAttribute("delegatesfocus"))});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()',e.body.appendChild(n)}}async resolveHtmlImportURLs(){const e=Array.from(this.doc.querySelectorAll("link[rel=import][href]"));await Promise.all(e.map((async e=>{const t=e.href;e.removeAttribute("href");const n=Object.create(this.options);n.insertSingleFileComment=!1,n.insertCanonicalLink=!1,n.insertMetaNoIndex=!1,n.saveFavicon=!1,n.removeUnusedStyles=!1,n.removeAlternativeMedias=!1,n.removeUnusedFonts=!1,n.removeHiddenElements=!1,n.url=t;const r=e.getAttribute(Lm.HTML_IMPORT_ATTRIBUTE_NAME);if(r){const t=n.imports[Number(r)];t&&(n.content=t.content,t.runner=new $m(n),await t.runner.loadPage(),await t.runner.initialize(),n.removeImports||(t.maxResources=t.runner.batchRequest.getMaxResources()),t.runner.getStyleSheets().forEach((t=>{const n=this.doc.createElement("style");e.insertAdjacentElement("afterEnd",n),this.stylesheets.set(n,t)})))}n.removeImports&&(e.remove(),this.stats.add("discarded","HTML imports",1))})))}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=Lm.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=Lm.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){Lm.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=Lm.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontURLs=new Im,await Promise.all([...this.stylesheets].map((([,e])=>hf.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>hf.processStyle(e.children.toArray(),this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processPageResources(){let e=[['link[href][rel*="icon"]',"href",!1,!0],['object[type="image/svg+xml"], object[type="image/svg-xml"]',"data"],["img[src], input[src][type=image]","src",!0],['embed[src*=".svg"], embed[src*=".pdf"]',"src"],["video[poster]","poster"],["*[background]","background"],["image","xlink:href"],["image","href"]].map((([e,t,n,r])=>hf.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest,n,r)));e=e.concat([hf.processXLinks(this.doc.querySelectorAll("use"),this.baseURI,this.options,this.batchRequest),hf.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),"srcset",this.baseURI,this.batchRequest)]),this.options.removeAudioSrc||e.push(hf.processAttribute(this.doc.querySelectorAll("audio[src], audio > source[src]"),"src",this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest)),this.options.removeVideoSrc||e.push(hf.processAttribute(this.doc.querySelectorAll("video[src], video > source[src]"),"src",this.baseURI,this.options,this.cssVariables,this.styles,this.batchRequest)),await Promise.all(e),this.options.saveFavicon&&hf.processShortcutIcons(this.doc)}async processScripts(){await Promise.all(Array.from(this.doc.querySelectorAll("script[src], link[rel=preload][as=script][href]")).map((async e=>{let t,n;"SCRIPT"==e.tagName?(n=e.getAttribute("src"),e.removeAttribute("src")):(n=e.getAttribute("href"),e.removeAttribute("href")),e.removeAttribute("integrity"),e.textContent="";try{t=Lm.resolveURL(n,this.baseURI)}catch(e){}if(Bf(t)){this.stats.add("processed","scripts",1);const n=await Lm.getContent(t,{asBinary:!0,charset:this.charset!=nf&&this.charset,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer});if(n.data=Rf(t,n,this.options),"SCRIPT"==e.tagName)e.setAttribute("src",n.data),""!=e.getAttribute("async")&&"async"!=e.getAttribute("async")&&""!=e.getAttribute(Lm.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async","");else{const t=this.doc.createElement("script");t.setAttribute("src",n.data),t.setAttribute("async",""),e.parentElement.replaceChild(t,e)}}})))}removeAlternativeImages(){Lm.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await Lm.removeAlternativeFonts(this.doc,this.stylesheets,this.options.fontURLs,this.options.fontTests)}async processFrames(){if(this.options.frames){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{const t=e.getAttribute(Lm.WIN_ID_ATTRIBUTE_NAME);if(t){const n=this.options.frames.find((e=>e.windowId==t));if(n)if(this.options.frames=this.options.frames.filter((e=>e.windowId!=t)),n.runner&&""!=e.getAttribute(Lm.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await n.runner.run();const t=await n.runner.getPageData();e.removeAttribute(Lm.WIN_ID_ATTRIBUTE_NAME);let r="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(Zm)||t.content.match(Jm))&&(r+=" allow-scripts allow-same-origin"),e.setAttribute("sandbox",r),"OBJECT"==e.tagName?e.setAttribute("data","data:text/html,"+t.content):"FRAME"==e.tagName?e.setAttribute("src","data:text/html,"+t.content.replace(/%/g,"%25").replace(/#/g,"%23")):(e.setAttribute("srcdoc",t.content),e.removeAttribute("src")),this.stats.addAll(t)}else e.removeAttribute(Lm.WIN_ID_ATTRIBUTE_NAME),this.stats.add("discarded","frames",1)}})))}}async processHtmlImports(){const e=Array.from(this.doc.querySelectorAll("link[rel=import]"));await Promise.all(e.map((async e=>{const t=e.getAttribute(Lm.HTML_IMPORT_ATTRIBUTE_NAME);if(t){const n=this.options.imports[Number(t)];if(n.runner){this.stats.add("processed","HTML imports",1),await n.runner.run();const t=await n.runner.getPageData();e.removeAttribute(Lm.HTML_IMPORT_ATTRIBUTE_NAME),e.setAttribute("href","data:text/html,"+t.content),this.stats.addAll(t)}else this.stats.add("discarded","HTML imports",1)}})))}replaceStylesheets(){this.doc.querySelectorAll("style").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);let n=Pm.generate(t.stylesheet);e.textContent=n,t.mediaText&&(e.media=t.mediaText)}else e.remove()})),this.doc.querySelectorAll("link[rel*=stylesheet]").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);const n=this.doc.createElement("style");t.mediaText&&(n.media=t.mediaText);let r=Pm.generate(t.stylesheet);n.textContent=r,e.parentElement.replaceChild(n,e)}else e.remove()}))}replaceStyleAttributes(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=this.styles.get(e);if(t){this.styles.delete(e);let n=Pm.generate(t);e.setAttribute("style",n)}else e.setAttribute("style","")}))}insertVariables(){if(this.cssVariables.size){const e=this.doc.createElement("style"),t=this.doc.head.querySelector("style");t?this.doc.head.insertBefore(e,t):this.doc.head.appendChild(e);let n="";this.cssVariables.forEach(((e,t)=>{this.cssVariables.delete(t),n&&(n+=";"),n+=`${cf+t}:url("${e}")`})),e.textContent=":root{"+n+"}"}}compressHTML(){let e;this.options.displayStats&&(e=Lm.getContentSize(this.doc.documentElement.outerHTML)),Lm.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:Lm.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-Lm.getContentSize(this.doc.documentElement.outerHTML))}cleanupPage(){this.doc.querySelectorAll("base").forEach((e=>e.remove()));const e=this.doc.head.querySelector("meta[charset]");e&&(this.doc.head.insertBefore(e,this.doc.head.firstChild),1==this.doc.head.querySelectorAll("*").length&&0==this.doc.body.childNodes.length&&this.doc.head.querySelector("meta[charset]").remove())}resetZoomLevel(){const e=this.doc.documentElement.style.getPropertyValue("-sf-transform"),t=this.doc.documentElement.style.getPropertyPriority("-sf-transform"),n=this.doc.documentElement.style.getPropertyValue("-sf-transform-origin"),r=this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin"),a=this.doc.documentElement.style.getPropertyValue("-sf-min-height"),o=this.doc.documentElement.style.getPropertyPriority("-sf-min-height");this.doc.documentElement.style.setProperty("transform",e,t),this.doc.documentElement.style.setProperty("transform-origin",n,r),this.doc.documentElement.style.setProperty("min-height",a,o),this.doc.documentElement.style.removeProperty("-sf-transform"),this.doc.documentElement.style.removeProperty("-sf-transform-origin"),this.doc.documentElement.style.removeProperty("-sf-min-height")}async insertMAFFMetaData(){const e=await this.maffMetaDataPromise;if(e&&e.content){const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",n=Lm.parseXMLContent(e.content),r=n.querySelector("RDF > Description > originalurl"),a=n.querySelector("RDF > Description > archivetime");if(r&&(this.options.saveUrl=r.getAttributeNS(t,"resource")),a){const e=a.getAttributeNS(t,"resource");if(e){const t=new Date(e);isNaN(t.getTime())||(this.options.saveDate=new Date(e))}}}}async setDocInfo(){const e=this.doc.querySelector("title"),t=this.doc.querySelector("meta[name=description]"),n=this.doc.querySelector("meta[name=author]"),r=this.doc.querySelector("meta[name=creator]"),a=this.doc.querySelector("meta[name=publisher]"),o=this.doc.querySelector("h1");this.options.title=e?e.textContent.trim():"",this.options.info={description:t&&t.content?t.content.trim():"",lang:this.doc.documentElement.lang,author:n&&n.content?n.content.trim():"",creator:r&&r.content?r.content.trim():"",publisher:a&&a.content?a.content.trim():"",heading:o&&o.textContent?o.textContent.trim():""},this.options.infobarContent=await hf.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const af="data:",of="about:blank",sf="data:null;base64,",lf=/(#.+?)$/,cf="--sf-img-",uf=524288;class hf{static async evalTemplate(e="",t,n,r){const a=Lm.parseURL(t.saveUrl);e=await Nf(e,"page-title",(()=>t.title||"No title"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-heading",(()=>t.info.heading||"No heading"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-language",(()=>t.info.lang||"No language"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-description",(()=>t.info.description||"No description"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-author",(()=>t.info.author||"No author"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-creator",(()=>t.info.creator||"No creator"),r,t.filenameReplacementCharacter),e=await Nf(e,"page-publisher",(()=>t.info.publisher||"No publisher"),r,t.filenameReplacementCharacter),await l(t.saveDate),await l(t.visitDate,"visit-"),e=await Nf(e,"url-hash",(()=>a.hash.substring(1)||"No hash"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-host",(()=>a.host.replace(/\/$/,"")||"No host"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-hostname",(()=>a.hostname.replace(/\/$/,"")||"No hostname"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-href",(()=>i(a.href)||"No href"),void 0===r||r,t.filenameReplacementCharacter),e=await Nf(e,"url-href-flat",(()=>i(a.href)||"No href"),!1,t.filenameReplacementCharacter),e=await Nf(e,"url-referrer",(()=>i(t.referrer)||"No referrer"),void 0===r||r,t.filenameReplacementCharacter),e=await Nf(e,"url-referrer-flat",(()=>i(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await Nf(e,"url-password",(()=>a.password||"No password"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-pathname",(()=>i(a.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===r||r,t.filenameReplacementCharacter),e=await Nf(e,"url-pathname-flat",(()=>i(a.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await Nf(e,"url-port",(()=>a.port||"No port"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-protocol",(()=>a.protocol||"No protocol"),r,t.filenameReplacementCharacter),e=await Nf(e,"url-search",(()=>a.search.substring(1)||"No search"),r,t.filenameReplacementCharacter);const o=a.search.substring(1).split("&").map((e=>e.split("=")));for(const[n,a]of o)e=await Nf(e,"url-search-"+n,(()=>a||""),r,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await Nf(e,"url-username",(()=>a.username||"No username"),r,t.filenameReplacementCharacter),e=await Nf(e,"tab-id",(()=>String(t.tabId||"No tab id")),r,t.filenameReplacementCharacter),e=await Nf(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),r,t.filenameReplacementCharacter),e=await Nf(e,"url-last-segment",(()=>i(function(e,t){let n=e.pathname.match(/\/([^/]+)$/),r=n&&n[0];r||(n=e.href.match(/([^/]+)\/?$/),r=n&&n[0]);r||(n=r.match(/(.*)\.[^.]+$/),r=n&&n[0]);r||(r=e.hostname.replace(/\/+/g,t).replace(/\/$/,""));n=r.match(/(.*)\.[^.]+$/),n&&n[1]&&(r=n[1]);return r=r.replace(/\/$/,"").replace(/^\//,""),r}(a,t.filenameReplacementCharacter))||"No last segment"),r,t.filenameReplacementCharacter),n&&(e=await Nf(e,"digest-sha-256",(async()=>Lm.digest("SHA-256",n)),r,t.filenameReplacementCharacter),e=await Nf(e,"digest-sha-384",(async()=>Lm.digest("SHA-384",n)),r,t.filenameReplacementCharacter),e=await Nf(e,"digest-sha-512",(async()=>Lm.digest("SHA-512",n)),r,t.filenameReplacementCharacter));const s=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await Nf(e,"bookmark-pathname",(()=>s),void 0===r||r,t.filenameReplacementCharacter),e=await Nf(e,"bookmark-pathname-flat",(()=>s),!1,t.filenameReplacementCharacter),(e=await Nf(e,"profile-name",(()=>t.profileName),r,t.filenameReplacementCharacter)).trim();function i(e){try{return decodeURI(e)}catch(t){return e}}async function l(n,a=""){n&&(e=await Nf(e,a+"datetime-iso",(()=>n.toISOString()),r,t.filenameReplacementCharacter),e=await Nf(e,a+"date-iso",(()=>n.toISOString().split("T")[0]),r,t.filenameReplacementCharacter),e=await Nf(e,a+"time-iso",(()=>n.toISOString().split("T")[1].split("Z")[0]),r,t.filenameReplacementCharacter),e=await Nf(e,a+"date-locale",(()=>n.toLocaleDateString()),r,t.filenameReplacementCharacter),e=await Nf(e,a+"time-locale",(()=>n.toLocaleTimeString()),r,t.filenameReplacementCharacter),e=await Nf(e,a+"day-locale",(()=>String(n.getDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"month-locale",(()=>String(n.getMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"year-locale",(()=>String(n.getFullYear())),r,t.filenameReplacementCharacter),e=await Nf(e,a+"datetime-locale",(()=>n.toLocaleString()),r,t.filenameReplacementCharacter),e=await Nf(e,a+"datetime-utc",(()=>n.toUTCString()),r,t.filenameReplacementCharacter),e=await Nf(e,a+"day-utc",(()=>String(n.getUTCDate()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"month-utc",(()=>String(n.getUTCMonth()+1).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"year-utc",(()=>String(n.getUTCFullYear())),r,t.filenameReplacementCharacter),e=await Nf(e,a+"hours-locale",(()=>String(n.getHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"minutes-locale",(()=>String(n.getMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"seconds-locale",(()=>String(n.getSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"hours-utc",(()=>String(n.getUTCHours()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"minutes-utc",(()=>String(n.getUTCMinutes()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"seconds-utc",(()=>String(n.getUTCSeconds()).padStart(2,"0")),r,t.filenameReplacementCharacter),e=await Nf(e,a+"time-ms",(()=>String(n.getTime())),r,t.filenameReplacementCharacter))}}static setBackgroundImage(e,t,n){e.style.setProperty("background-blend-mode","normal","important"),e.style.setProperty("background-clip","content-box","important"),e.style.setProperty("background-position",n&&n["background-position"]?n["background-position"]:"center","important"),e.style.setProperty("background-color",n&&n["background-color"]?n["background-color"]:"transparent","important"),e.style.setProperty("background-image",t,"important"),e.style.setProperty("background-size",n&&n["background-size"]?n["background-size"]:"100% 100%","important"),e.style.setProperty("background-origin","content-box","important"),e.style.setProperty("background-repeat","no-repeat","important")}static processShortcutIcons(e){let t=Df(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=Df(Array.from(e.querySelectorAll('link[href][rel*="icon"]'))),t&&(t.rel="icon")),t&&e.querySelectorAll('link[href][rel*="icon"]').forEach((e=>{e!=t&&e.remove()}))}static removeSingleLineCssComments(e){const t=[];for(let n=e.children.head;n;n=n.next){const e=n.data;"Raw"==e.type&&e.value&&e.value.trim().startsWith("//")&&t.push(n)}t.forEach((t=>e.children.remove(t)))}static async resolveImportURLs(e,t,n,r,a=new _m){const o=function(e){return e.match(kf)||[]}(e=hf.resolveStylesheetURLs(e,t,r));return await Promise.all(o.map((async o=>{const i=function(e){const t=e.match(wf)||e.match(xf)||e.match(Sf)||e.match(Ef)||e.match(Af)||e.match(Tf);if(t){const[,e,n]=t;return{resourceURL:e,media:n}}}(o);if(i){const l=zf(o);let c=_f(i.resourceURL);if(!Uf(c)&&Ff(c)){try{c=Lm.resolveURL(i.resourceURL,t)}catch(e){}if(Bf(c)&&!a.has(c)){const t=await s(c);c=t.resourceURL,t.data=Rf(c,t,n);let u=qf(t.data);if(n.compressCSS&&(u=Lm.compressCSS(u)),u=function(e,t){return t?"@media "+t+"{ "+e+" }":e}(u,i.media),e.includes(o)){const t=new _m(a);t.add(c),u=await hf.resolveImportURLs(u,c,n,r,t),r.textContent=u,e=r.sheet&&r.sheet.cssRules.length||!r.sheet&&u?e.replace(l,u):e.replace(l,"")}}else e=e.replace(l,"")}else e=e.replace(l,"")}}))),e;async function s(e){const t=await Lm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,validateTextContentType:!0,frameId:n.frameId,charset:n.charset,resourceReferrer:n.resourceReferrer});return Lf(t.data,t.charset||n.charset)?t:(n=Object.assign({},n,{charset:Pf(t.data)}),s(e))}}static resolveStylesheetURLs(e,t,n){return Mf(e,!0).map((r=>{const a=Of(r);let o=_f(a);if(n.textContent='tmp { content:"'+o+'"}',n.sheet&&n.sheet.cssRules&&(o=Lm.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content"))),!Uf(o))if(!o||Ff(o)){let n;if(!a.startsWith("#"))try{n=Lm.resolveURL(o,t)}catch(e){}Bf(n)&&o!=n&&e.includes(r)&&(e=e.replace(zf(r),a?r.replace(a,n):"url("+n+")"))}else{let t;t=a?r.replace(a,sf):"url(data:null;base64,)",e=e.replace(zf(r),t)}})),e}static async resolveLinkStylesheetURLs(e,t,n,r){if((e=_f(e))&&e!=t&&e!=of){const a=await Lm.getContent(e,{maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,charset:n.charset,frameId:n.frameId,resourceReferrer:n.resourceReferrer,validateTextContentType:!0});if(!Lf(a.data,a.charset||n.charset))return n=Object.assign({},n,{charset:Pf(a.data)}),hf.resolveLinkStylesheetURLs(e,t,n,r);e=a.resourceURL,a.data=Rf(a.resourceURL,a,n);let o=qf(a.data);return n.compressCSS&&(o=Lm.compressCSS(o)),o=await hf.resolveImportURLs(o,e,n,r),o}}static async processStylesheet(e,t,n,r,a){const o=[],s=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?s.push(l):e.block&&e.block.children&&("Rule"==e.type?o.push(this.processStyle(e.block.children.toArray(),t,n,r,a)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&o.push(i(e,n.fontURLs)):o.push(this.processStylesheet(e.block.children,t,n,r,a)))}async function i(e,t){await Promise.all(e.block.children.toArray().map((async e=>{if("Declaration"==e.type&&e.value.children){const n=Mf(If(e.value),!0);await Promise.all(n.map((async n=>{const r=Of(n),o=_f(r);if(!Uf(o)&&Bf(o)){let{content:n}=await a.addURL(o,!0,"font"),s=t.get(e);s||(s=[],t.set(e,s)),s.push(o),function(e,t,n){e.value.children.forEach((e=>{"Url"==e.type&&Lm.removeQuotes(If(e.value))==t&&(e.value.value=n)}))}(e,r,n)}})))}})))}s.forEach((t=>e.remove(t))),await Promise.all(o)}static async processStyle(e,t,n,r,a){function o(e,t,n,r=0){for(let a=t.head;a;a=a.next)a.data.children&&o(e,a.data.children,n,r+1),"Url"==a.data.type&&Lm.removeQuotes(If(a.data.value))==e&&n(a,t,0==r)}await Promise.all(e.map((async e=>{if(e.value&&!e.value.children&&"Raw"==e.value.type)try{e.value=Pm.parse(e.value.value,{context:"value"})}catch(e){}if("Declaration"==e.type&&e.value.children){const t=Mf(If(e.value));await Promise.all(t.map((async t=>{const s=Of(t),i=_f(s);if(!Uf(i)&&Bf(i)){let t,{content:l,indexResource:c,duplicate:u}=await a.addURL(i,!0,"image",!0);const h=[];o(s,e.value.children,((e,r,a)=>{if(!s.startsWith("#"))if(u&&n.groupDuplicateImages&&a&&Lm.getContentSize(l)<uf){const n=Pm.parse("var("+cf+c+")",{context:"value"}).children.head;h.push({parent:r,token:e,value:n}),t=!0}else e.data.value.value=l})),t&&(r.set(c,l),h.forEach((({parent:e,token:t,value:n})=>e.replace(t,n))))}})))}})))}static async processAttribute(e,t,n,r,a,o,s,i,l){await Promise.all(Array.from(e).map((async e=>{let c=e.getAttribute(t);if(null!=c){c=_f(c);let u=e.dataset.singleFileOriginURL;if(delete e.dataset.singleFileOriginURL,!Uf(c)&&(e.setAttribute(t,Qm),Ff(c))){try{c=Lm.resolveURL(c,n)}catch(e){}if(Bf(c)){let{content:h,indexResource:d,duplicate:p}=await s.addURL(c,!0,"image","IMG"==e.tagName&&"src"==t);if(u&&h==sf){try{u=Lm.resolveURL(u,n)}catch(e){}try{c=u,h=(await Lm.getContent(c,{asBinary:!0,expectedType:"image",maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,frameId:r.windowId,resourceReferrer:r.resourceReferrer})).data}catch(e){}}if(l&&h==sf)e.remove();else{if(!Gm.filter((e=>h.startsWith(e))).length){const n=h.startsWith(Km);if(i&&p&&r.groupDuplicateImages&&!n&&Lm.getContentSize(h)<uf)if(hf.replaceImageSource(e,cf+d,r)){a.set(d,h);const t=Pm.parse(e.getAttribute("style"),{context:"declarationList"});o.set(e,t)}else e.setAttribute(t,h);else e.setAttribute(t,h)}}}}}})))}static async processXLinks(e,t,n,r){let a="xlink:href";await Promise.all(Array.from(e).map((async e=>{let o=e.getAttribute(a);null==o&&(a="href",o=e.getAttribute(a));let s=_f(o);if(Ff(s)&&!Uf(s)){e.setAttribute(a,Qm);try{s=Lm.resolveURL(s,t)}catch(e){}if(Bf(s)){const{content:t}=await r.addURL(s),n=o.match(lf);if(n&&n[0]){let r;try{r=Lm.parseSVGContent(t).querySelector(n[0])}catch(e){}r&&(e.setAttribute(a,n[0]),e.parentElement.insertBefore(r,e.parentElement.firstChild))}else e.setAttribute(a,"data:image/svg+xml,"+t)}}else s==n.url&&e.setAttribute(a,o.substring(s.length))})))}static async processSrcset(e,t,n,r){await Promise.all(Array.from(e).map((async e=>{const a=Lm.parseSrcset(e.getAttribute(t)),o=await Promise.all(a.map((async e=>{let t=_f(e.url);if(Uf(t))return t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(Ff(t)){try{t=Lm.resolveURL(t,n)}catch(e){}if(Bf(t)){const{content:n}=await r.addURL(t,!0,"image");return Gm.filter((e=>n.startsWith(e))).length?"":n+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute(t,o.join(", "))})))}static replaceImageSource(e,t,n){if(e.getAttribute(Lm.IMAGE_ATTRIBUTE_NAME)){const r=n.images[Number(e.getAttribute(Lm.IMAGE_ATTRIBUTE_NAME))];if(r&&r.replaceable){e.setAttribute("src",`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="${r.size.pxWidth}" height="${r.size.pxHeight}"><rect fill-opacity="0"/></svg>`);const n={};return("content"==r.objectFit||"cover"==r.objectFit)&&r.objectFit&&(n["background-size"]=r.objectFit),r.objectPosition&&(n["background-position"]=r.objectPosition),r.backgroundColor&&(n["background-color"]=r.backgroundColor),hf.setBackgroundImage(e,"var("+t+")",n),e.removeAttribute(Lm.IMAGE_ATTRIBUTE_NAME),!0}}}}const df=/^https?:\/\//,pf=/^file:\/\//,mf=/^https?:\/\/+\s*$/,ff=/^(https?:\/\/|file:\/\/|blob:).+/,gf=/(url\s*\(\s*'(.*?)'\s*\))|(url\s*\(\s*"(.*?)"\s*\))|(url\s*\(\s*(.*?)\s*\))/gi,yf=/^url\s*\(\s*'(.*?)'\s*\)$/i,bf=/^url\s*\(\s*"(.*?)"\s*\)$/i,vf=/^url\s*\(\s*(.*?)\s*\)$/i,kf=/(@import\s*url\s*\(\s*'(.*?)'\s*\)\s*(.*?)(;|$|}))|(@import\s*url\s*\(\s*"(.*?)"\s*\)\s*(.*?)(;|$|}))|(@import\s*url\s*\(\s*(.*?)\s*\)\s*(.*?)(;|$|}))|(@import\s*'(.*?)'\s*(.*?)(;|$|}))|(@import\s*"(.*?)"\s*(.*?)(;|$|}))|(@import\s*(.*?)\s*(.*?)(;|$|}))/gi,wf=/@import\s*url\s*\(\s*'(.*?)'\s*\)\s*(.*?)(;|$|})/i,xf=/@import\s*url\s*\(\s*"(.*?)"\s*\)\s*(.*?)(;|$|})/i,Sf=/@import\s*url\s*\(\s*(.*?)\s*\)\s*(.*?)(;|$|})/i,Ef=/@import\s*'(.*?)'\s*(.*?)(;|$|})/i,Af=/@import\s*"(.*?)"\s*(.*?)(;|$|})/i,Tf=/@import\s*(.*?)\s*(.*?)(;|$|})/i,Cf=/([{}()^$&.*?/+|[\\\\]|\]|-)/g;function Rf(e,t,n){return n.rootDocument&&n.updatedResources[e]?(n.updatedResources[e].retrieved=!0,n.updatedResources[e].content):t.data||""}function _f(e){return!e||e.startsWith(af)?e:e.split("#")[0]}function If(e){let t="";try{t=Pm.generate(e)}catch(e){}return t}function Lf(e,t="utf-8"){const n=Pf(e);return!n||n==t.toLowerCase()}function Pf(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function Nf(e,t,n,r,a){let o;if(e){const s="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let i=new RegExp(s+"\\[\\d+\\]","g");if(e.match(i)){const t=e.match(i)[0];o=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(o)||o<=0)&&(o=null)}else i=new RegExp(s,"g");if(e.match(i)){let t=await n();return r||(t=t.replace(/\/+/g,a)),o&&(t=await Lm.truncateText(t,o)),e.replace(i,t)}}return e}function zf(e){return new RegExp(e.replace(Cf,"\\$1"),"gi")}function Mf(e,t){const n=e.match(gf)||[];return t?[...new _m(n)]:n}function Df(e){return(e=e.filter((e=>e.href!=Qm))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function Of(e){const t=e.match(yf)||e.match(bf)||e.match(vf);return t&&t[1]}function Uf(e){return e&&(e.startsWith(af)||e==of)}function Ff(e){return e&&!e.match(mf)}function Bf(e){return Ff(e)&&(e.match(df)||e.match(pf)||e.startsWith("blob:"))&&e.match(ff)}function qf(e){try{return e.replace(/\/\*(.|\s)*?\*\//g,"")}catch(t){let n,r;do{n=e.indexOf("/*"),r=e.indexOf("*/",n+2),-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substr(r+2))}while(-1!=n&&-1!=r);return e}}const jf={discarded:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0},processed:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0}};class Hf{constructor(e){this.options=e,e.displayStats&&(this.data=JSON.parse(JSON.stringify(jf)))}set(e,t,n){this.options.displayStats&&(this.data[e][t]=n)}add(e,t,n){this.options.displayStats&&(this.data[e][t]+=n)}addAll(e){this.options.displayStats&&(Object.keys(this.data.discarded).forEach((t=>this.add("discarded",t,e.stats.discarded[t]||0))),Object.keys(this.data.processed).forEach((t=>this.add("processed",t,e.stats.processed[t]||0))))}}const Wf=1048576,Vf=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],$f=globalThis.URL,Yf=globalThis.DOMParser,Gf=globalThis.Blob,Kf=globalThis.FileReader,Qf=e=>globalThis.fetch(e),Jf=globalThis.crypto,Zf=globalThis.TextDecoder,Xf=globalThis.TextEncoder;function eg(e){return(e=e||{}).fetch=e.fetch||Qf,e.frameFetch=e.frameFetch||e.fetch||Qf,{getContent:async function(t,n){let r;const a=e.fetch,o=e.frameFetch;try{if(n.frameId)try{r=await o(t,{frameId:n.frameId,referrer:n.resourceReferrer})}catch(e){r=await a(t)}else r=await a(t,{referrer:n.resourceReferrer})}catch(e){return{data:n.asBinary?"data:null;base64,":"",resourceURL:t}}let s;try{s=await r.arrayBuffer()}catch(e){return{data:n.asBinary?"data:null;base64,":"",resourceURL:t}}t=r.url||t;let i,l="";try{const e=new Dd(r.headers.get("content-type"));l=e.type+"/"+e.subtype,i=e.parameters.get("charset")}catch(e){}l||(l=function(e,t){if("image"==e){if(n([255,255,255,255],[0,0,1,0]))return"image/x-icon";if(n([255,255,255,255],[0,0,2,0]))return"image/x-icon";if(n([255,255],[78,77]))return"image/bmp";if(n([255,255,255,255,255,255],[71,73,70,56,57,97]))return"image/gif";if(n([255,255,255,255,255,255],[71,73,70,56,59,97]))return"image/gif";if(n([255,255,255,255,0,0,0,0,255,255,255,255,255,255],[82,73,70,70,0,0,0,0,87,69,66,80,86,80]))return"image/webp";if(n([255,255,255,255,255,255,255,255],[137,80,78,71,13,10,26,10]))return"image/png";if(n([255,255,255],[255,216,255]))return"image/jpeg"}if("font"==e){if(n([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,80]))return"application/vnd.ms-fontobject";if(n([255,255,255,255],[0,1,0,0]))return"font/ttf";if(n([255,255,255,255],[79,84,84,79]))return"font/otf";if(n([255,255,255,255],[116,116,99,102]))return"font/collection";if(n([255,255,255,255],[119,79,70,70]))return"font/woff";if(n([255,255,255,255],[119,79,70,50]))return"font/woff2"}function n(e,n){let r=!0,a=0;if(t.byteLength>=n.length){const o=new Uint8Array(t,0,e.length);for(a=0;a<e.length&&r;a++)r=r&&(o[a]&e[a])==n[a];return r}}}(n.expectedType,s));!i&&n.charset&&(i=n.charset);if(n.asBinary)try{if(n.maxResourceSizeEnabled&&s.byteLength>n.maxResourceSize*Wf)return{data:"data:null;base64,",resourceURL:t};{const e=new Kf;e.readAsDataURL(new Gf([s],{type:l+(n.charset?";charset="+n.charset:"")}));return{data:await new Promise(((t,n)=>{e.addEventListener("load",(()=>t(e.result)),!1),e.addEventListener("error",n,!1)})),resourceURL:t}}}catch(e){return{data:"data:null;base64,",resourceURL:t}}else{if(r.status>=400||n.validateTextContentType&&l&&!l.startsWith("text/"))return{data:"",resourceURL:t};if(i||(i="utf-8"),n.maxResourceSizeEnabled&&s.byteLength>n.maxResourceSize*Wf)return{data:"",resourceURL:t,charset:i};try{return{data:new Zf(i).decode(s),resourceURL:t,charset:i}}catch(e){try{return i="utf-8",{data:new Zf(i).decode(s),resourceURL:t,charset:i}}catch(e){return{data:"",resourceURL:t,charset:i}}}}},parseURL:(e,t)=>void 0===t?new $f(e):new $f(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getValidFilename:(e,t=Vf,n="_")=>(t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),n))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+n).replace(/\/\./g,"/"+n)),parseDocContent(e,t){const n=(new Yf).parseFromString(e,"text/html");n.head||n.documentElement.insertBefore(n.createElement("HEAD"),n.body);let r=n.querySelector("base");return r&&r.getAttribute("href")||(r&&r.remove(),r=n.createElement("base"),r.setAttribute("href",t),n.head.insertBefore(r,n.head.firstChild)),n},parseXMLContent:e=>(new Yf).parseFromString(e,"text/xml"),parseSVGContent:e=>(new Yf).parseFromString(e,"image/svg+xml"),async digest(e,t){try{return function(e){const t=[],n=new DataView(e);for(let e=0;e<n.byteLength;e+=4){const r="00000000",a=(r+n.getUint32(e).toString(16)).slice(-r.length);t.push(a)}return t.join("")}(await Jf.subtle.digest(e,new Xf("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new Gf([e]).size,truncateText(e,t){const n=new Gf([e]),r=new Kf;return r.readAsText(n.slice(0,t)),new Promise(((n,a)=>{r.addEventListener("load",(()=>{e.startsWith(r.result)?n(r.result):this.truncateText(e,t-1).then(n).catch(a)}),!1),r.addEventListener("error",a,!1)}))},minifyHTML:(e,t)=>ym(e,t),minifyCSSRules:(e,t,n)=>Xp(e,t,n),removeUnusedFonts:(e,t,n,r)=>fp(e,t,n,r),removeAlternativeFonts:(e,t,n,r)=>ep(e,t,n,r),getMediaAllInfo:(e,t,n)=>Dp(e,t,n),compressCSS:(e,t)=>Wn(e,t),minifyMedias:e=>Gp(e),removeAlternativeImages:e=>am(e),parseSrcset:e=>Ld(e),preProcessDoc:(e,t,n)=>Q(e,t,n),postProcessDoc(e,t){te(e,t)},serialize:(e,t)=>Em(e,t),removeQuotes:e=>se(e),ON_BEFORE_CAPTURE_EVENT_NAME:w,ON_AFTER_CAPTURE_EVENT_NAME:x,WIN_ID_ATTRIBUTE_NAME:_,REMOVED_CONTENT_ATTRIBUTE_NAME:S,HIDDEN_CONTENT_ATTRIBUTE_NAME:E,HIDDEN_FRAME_ATTRIBUTE_NAME:T,IMAGE_ATTRIBUTE_NAME:I,POSTER_ATTRIBUTE_NAME:L,CANVAS_ATTRIBUTE_NAME:P,HTML_IMPORT_ATTRIBUTE_NAME:N,INPUT_VALUE_ATTRIBUTE_NAME:z,SHADOW_ROOT_ATTRIBUTE_NAME:R,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:C,STYLESHEET_ATTRIBUTE_NAME:D,SELECTED_CONTENT_ATTRIBUTE_NAME:U,COMMENT_HEADER:V,COMMENT_HEADER_LEGACY:$,SINGLE_FILE_UI_ELEMENT_CLASS:Y}}function tg(t){e.SingleFile=function(...e){return[Lm,Pm]=e,Nm}(eg(t),Id)}e.getPageData=async function(t={},n,r=globalThis.document,a=globalThis){const o=et;let s;if(tg(n),r&&a){K(r);const e=[];if(!t.saveRawPage){if(!t.removeFrames&&o&&globalThis.frames&&globalThis.frames.length){let n;n=t.loadDeferredImages?new Promise((e=>globalThis.setTimeout((()=>e(o.getAsync(t))),t.loadDeferredImagesMaxIdleTime-o.TIMEOUT_INIT_REQUEST_MESSAGE))):o.getAsync(t),e.push(n)}t.loadDeferredImages&&e.push(ve(t))}[t.frames]=await Promise.all(e),s=t.frames&&t.frames.sessionId}t.doc=r,t.win=a,t.insertSingleFileComment=!0,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&r&&a&&t.loadDeferredImages&&ke(t)};const i=new e.SingleFile(t);return await i.run(),s&&o.cleanup(s),await i.getPageData()},e.helper=ce,e.init=tg,e.modules=Rm,e.processors=at,e.vendor=Od,Object.defineProperty(e,"__esModule",{value:!0})}));