single-file.js 289 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",r="single-file-image-loaded",n=(e,t,r)=>globalThis.addEventListener(e,t,r),o=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},i=globalThis.CustomEvent,a=globalThis.document,s=globalThis.Document;let l;function c(){return Array.from(l.values())}function u(e){e.loadDeferredImagesBlockCookies&&o(new i("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&o(new i("single-file-block-storage-start")),e.loadDeferredImagesDispatchScrollEvent&&o(new i("single-file-dispatch-scroll-event-start")),e.loadDeferredImagesKeepZoomLevel?o(new i("single-file-load-deferred-images-keep-zoom-level-start")):o(new i("single-file-load-deferred-images-start"))}function h(e){e.loadDeferredImagesBlockCookies&&o(new i("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&o(new i("single-file-block-storage-end")),e.loadDeferredImagesDispatchScrollEvent&&o(new i("single-file-dispatch-scroll-event-end")),e.loadDeferredImagesKeepZoomLevel?o(new i("single-file-load-deferred-images-keep-zoom-level-end")):o(new i("single-file-load-deferred-images-end"))}function d(e){e.loadDeferredImagesKeepZoomLevel?o(new i("single-file-load-deferred-images-keep-zoom-level-reset")):o(new i("single-file-load-deferred-images-reset"))}l=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,a instanceof s&&(n("single-file-new-font-face",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,l.set(JSON.stringify(r),t)})),n("single-file-delete-font",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,l.delete(JSON.stringify(r))})),n("single-file-clear-fonts",(()=>l=new Map)));var p=Object.freeze({__proto__:null,getFontsData:c,loadDeferredImagesStart:u,loadDeferredImagesEnd:h,loadDeferredImagesResetZoomLevel:d,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:r});const m=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function f(e){return e.replace(m,((e,t,r)=>{const n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))}var g=Object.freeze({__proto__:null,process:f});const y="single-file-on-before-capture",b="single-file-on-after-capture",k="data-single-file-removed-content",v="data-single-file-hidden-content",w="data-single-file-kept-content",x="data-single-file-hidden-frame",E="data-single-file-preserved-space-element",A="data-single-file-shadow-root-element",S="data-single-file-win-id",T="data-single-file-image",C="data-single-file-poster",R="data-single-file-video",_="data-single-file-canvas",I="data-single-file-movable-style",L="data-single-file-input-value",N="data-single-file-lazy-loaded-src",z="data-single-file-stylesheet",P="data-single-file-disabled-noscript",M="data-single-file-selected-content",O="data-single-file-invalid-element",U="data-single-file-async-script",D="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",F=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],q=/^'(.*?)'$/,B=/^"(.*?)"$/,j={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},H="Page saved with SingleFile",V="Archive processed by SingleFile",W="single-file-ui-element",$="data:,",G=(e,t,r)=>globalThis.addEventListener(e,t,r);function Y(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function J(e,t,r){e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(P,e.textContent),e.textContent=""})),Y(e),e.head&&e.head.querySelectorAll(D).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+D+", html > body > "+D);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))}));const n=new Map;let o;return t&&e.documentElement?(e.querySelectorAll("button button, a a, p div").forEach((t=>{const r=e.createElement("template");r.setAttribute(O,""),r.content.appendChild(t.cloneNode(!0)),n.set(t,r),t.replaceWith(r)})),o=Q(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const r=t.getComputedStyle(e);r&&ee(e,r)&&(e.setAttribute(I,""),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],markedElements:[]},{canvases:o.canvases,fonts:c(),stylesheets:re(e),images:o.images,posters:o.posters,videos:o.videos,usedFonts:Array.from(o.usedFonts.values()),shadowRoots:o.shadowRoots,referrer:e.referrer,markedElements:o.markedElements,invalidElements:n}}function Q(e,t,r,n,o={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],markedElements:[]},i){return Array.from(r.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((r=>{let a,s,l;if(!n.autoSaveExternalSave&&(n.removeHiddenElements||n.removeUnusedFonts||n.compressHTML)&&(l=e.getComputedStyle(r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(s=(i||r.closest("html > head"))&&F.includes(r.tagName)||r.closest("details"),s||(a=i||ee(r,l),a&&(r.setAttribute(v,""),o.markedElements.push(r)))),!a)){if(n.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(r.setAttribute(E,""),o.markedElements.push(r))}n.removeUnusedFonts&&(K(l,n,o.usedFonts),K(e.getComputedStyle(r,":first-letter"),n,o.usedFonts),K(e.getComputedStyle(r,":before"),n,o.usedFonts),K(e.getComputedStyle(r,":after"),n,o.usedFonts))}!function(e,t,r,n,o,i,a){if("CANVAS"==r.tagName)try{o.canvases.push({dataURI:r.toDataURL("image/png","")}),r.setAttribute(_,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if("IMG"==r.tagName){const t={currentSrc:i?$:n.loadDeferredImages&&r.getAttribute(N)||r.currentSrc};o.images.push(t),r.setAttribute(T,o.images.length-1),o.markedElements.push(r),r.removeAttribute(N);try{a=a||e.getComputedStyle(r)}catch(e){}if(a){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute("style");let a,s,l,c,u,h,d,p,m=!1;if("content-box"==(r=r||e.getComputedStyle(t)).getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),r=t.style.getPropertyPriority("box-sizing"),n=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),m=t.clientWidth!=n,e?t.style.setProperty("box-sizing",e,r):t.style.removeProperty("box-sizing")}a=ne("padding-left",r),s=ne("padding-right",r),l=ne("padding-top",r),c=ne("padding-bottom",r),m?(u=ne("border-left-width",r),h=ne("border-right-width",r),d=ne("border-top-width",r),p=ne("border-bottom-width",r)):u=h=d=p=0,n=Math.max(0,t.clientWidth-a-s-u-h),o=Math.max(0,t.clientHeight-l-c-d-p),i&&t.removeAttribute("style")}return{pxWidth:n,pxHeight:o}}(e,r,a);const n=a.getPropertyValue("box-shadow"),o=a.getPropertyValue("background-image");n&&"none"!=n||o&&"none"!=o||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=a.getPropertyValue("background-color"),t.objectFit=a.getPropertyValue("object-fit"),t.boxSizing=a.getPropertyValue("box-sizing"),t.objectPosition=a.getPropertyValue("object-position"))}}if("VIDEO"==r.tagName){const n=r.currentSrc;if(n&&!n.startsWith("blob:")&&!n.startsWith("data:")){const t=e.getComputedStyle(r.parentNode).getPropertyValue("position");o.videos.push({positionParent:t,src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(R,o.videos.length-1)}if(!r.poster){const e=t.createElement("canvas"),n=e.getContext("2d");e.width=r.clientWidth,e.height=r.clientHeight;try{n.drawImage(r,0,0,e.width,e.height),o.posters.push(e.toDataURL("image/png","")),r.setAttribute(C,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}"IFRAME"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(x,""),o.markedElements.push(r));"INPUT"==r.tagName&&("password"!=r.type&&(r.setAttribute(L,r.value),o.markedElements.push(r)),"radio"!=r.type&&"checkbox"!=r.type||(r.setAttribute(L,r.checked),o.markedElements.push(r)));"TEXTAREA"==r.tagName&&(r.setAttribute(L,r.value),o.markedElements.push(r));"SELECT"==r.tagName&&r.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(L,""),o.markedElements.push(e))}));"SCRIPT"==r.tagName&&(r.async&&""!=r.getAttribute("async")&&"async"!=r.getAttribute("async")&&(r.setAttribute(U,""),o.markedElements.push(r)),r.textContent=r.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,r,n,o,a,l);const c=!(r instanceof e.SVGElement)&&Z(r);if(c&&!r.classList.contains(W)){const i={};r.setAttribute(A,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),Q(e,t,c,n,o,a),i.content=c.innerHTML,i.mode=c.mode;try{c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(i.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))))}catch(e){}}Q(e,t,r,n,o,a),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(s||""==r.getAttribute(w)?r.parentElement&&(r.parentElement.setAttribute(w,""),o.markedElements.push(r.parentElement)):a&&(r.setAttribute(k,""),o.markedElements.push(r)))})),o}function K(e,t,r){if(e){const n=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((o=>{if(o=X(o),!t.loadedFonts||t.loadedFonts.find((e=>X(e.family)==o&&e.style==n))){const t=ae(e.getPropertyValue("font-weight")),i=e.getPropertyValue("font-variant")||"normal",a=[o,t,n,i];r.set(JSON.stringify(a),[o,t,n,i])}}))}}function Z(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 X(e=""){return ie(f(e.trim())).toLowerCase()}function ee(e,t){let r=!1;if(t){const n=t.getPropertyValue("display"),o=t.getPropertyValue("opacity"),i=t.getPropertyValue("visibility");if(r="none"==n,!r&&("0"==o||"hidden"==i)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();r=!t.width&&!t.height}}return Boolean(r)}function te(e,t,r){if(e.querySelectorAll("[data-single-file-disabled-noscript]").forEach((e=>{e.textContent=e.getAttribute(P),e.removeAttribute(P)})),e.querySelectorAll("meta[disabled-http-equiv]").forEach((e=>{e.setAttribute("http-equiv",e.getAttribute("disabled-http-equiv")),e.removeAttribute("disabled-http-equiv")})),e.head&&e.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach((e=>e.removeAttribute("hidden"))),!t){const r=[k,x,v,E,T,C,R,_,L,A,z,U];t=e.querySelectorAll(r.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(k),e.removeAttribute(v),e.removeAttribute(w),e.removeAttribute(x),e.removeAttribute(E),e.removeAttribute(T),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(_),e.removeAttribute(L),e.removeAttribute(A),e.removeAttribute(z),e.removeAttribute(U),e.removeAttribute(I)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function re(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((r,n)=>{try{const o=e.createElement("style");o.textContent=r.textContent,e.body.appendChild(o);const i=o.sheet;o.remove(),i&&i.cssRules.length==r.sheet.cssRules.length||(r.setAttribute(z,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ne(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function oe(e){const t=e.doctype;let r="";return t&&(r="<!DOCTYPE "+t.nodeName,t.publicId?(r+=' PUBLIC "'+t.publicId+'"',t.systemId&&(r+=' "'+t.systemId+'"')):t.systemId&&(r+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(r+=" ["+t.internalSubset+"]"),r+="> "),r+e.documentElement.outerHTML}function ie(e){return(e=e.match(q)?e.replace(q,"$1"):e.replace(B,"$1")).trim()}function ae(e){return j[e.toLowerCase().trim()]||e}function se(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?se(t):t)),[])}var le=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}),r=new Promise((t=>G(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:Y,preProcessDoc:J,postProcessDoc:te,serialize:oe,removeQuotes:ie,flatten:se,getFontWeight:ae,normalizeFontFamily:X,getShadowRoot:Z,ON_BEFORE_CAPTURE_EVENT_NAME:y,ON_AFTER_CAPTURE_EVENT_NAME:b,WIN_ID_ATTRIBUTE_NAME:S,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:E,REMOVED_CONTENT_ATTRIBUTE_NAME:k,HIDDEN_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_FRAME_ATTRIBUTE_NAME:x,IMAGE_ATTRIBUTE_NAME:T,POSTER_ATTRIBUTE_NAME:C,VIDEO_ATTRIBUTE_NAME:R,CANVAS_ATTRIBUTE_NAME:_,INPUT_VALUE_ATTRIBUTE_NAME:L,SHADOW_ROOT_ATTRIBUTE_NAME:A,STYLE_ATTRIBUTE_NAME:I,LAZY_SRC_ATTRIBUTE_NAME:N,STYLESHEET_ATTRIBUTE_NAME:z,SELECTED_CONTENT_ATTRIBUTE_NAME:M,INVALID_ELEMENT_ATTRIBUTE_NAME:O,ASYNC_SCRIPT_ATTRIBUTE_NAME:U,COMMENT_HEADER:H,COMMENT_HEADER_LEGACY:V,SINGLE_FILE_UI_ELEMENT_CLASS:W,EMPTY_RESOURCE:$});const ce=N,ue=W,he="attributes",de=globalThis.browser,pe=globalThis.document,me=globalThis.MutationObserver,fe=(e,t,r)=>globalThis.addEventListener(e,t,r),ge=(e,t,r)=>globalThis.removeEventListener(e,t,r),ye=new Map;let be;async function ke(e){if(pe.documentElement){ye.clear();const n=Math.max(pe.documentElement.scrollHeight-1.5*pe.documentElement.clientHeight,0),o=Math.max(pe.documentElement.scrollWidth-1.5*pe.documentElement.clientWidth,0);if(globalThis.scrollY<=n&&globalThis.scrollX<=o)return function(e){return be=0,new Promise((async n=>{let o;const i=new Set,a=new me((async t=>{if((t=t.filter((e=>e.type==he))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(ce,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(ue)})).length&&(o=!0,await xe(a,e,d),i.size||await we(a,e,d))}}));async function s(t){await Ae("idleTimeout",(async()=>{o?be<10&&(be++,Te("idleTimeout"),await s(Math.max(500,t/2))):(Te("loadTimeout"),Te("maxTimeout"),Ee(a,e,d))}),t)}function l(e){const t=e.target;t.removeAttribute(ce),t.removeEventListener("load",l)}async function c(t){o=!0,await xe(a,e,d),await we(a,e,d),t.detail&&i.add(t.detail)}async function h(t){await xe(a,e,d),await we(a,e,d),i.delete(t.detail),i.size||await we(a,e,d)}function d(e){a.disconnect(),ge(t,c),ge(r,h),n(e)}await s(2*e.loadDeferredImagesMaxIdleTime),await xe(a,e,d),a.observe(pe,{subtree:!0,childList:!0,attributes:!0}),fe(t,c),fe(r,h),u(e)}))}(e)}}function ve(e){d(e)}async function we(e,t,r){await Ae("loadTimeout",(()=>Ee(e,t,r)),t.loadDeferredImagesMaxIdleTime)}async function xe(e,t,r){await Ae("maxTimeout",(async()=>{await Te("loadTimeout"),await Ee(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime)}async function Ee(e,t,r){await Te("idleTimeout"),h(t),await Ae("endTimeout",(async()=>{await Te("maxTimeout"),r()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Ae(e,t,r){if(de&&de.runtime&&de.runtime.sendMessage){if(!ye.get(e)||!ye.get(e).pending){const n={callback:t,pending:!0};ye.set(e,n);try{await de.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:r})}catch(n){Se(e,t,r)}n.pending=!1}}else Se(e,t,r)}function Se(e,t,r){const n=ye.get(e);n&&globalThis.clearTimeout(n),ye.set(e,t),globalThis.setTimeout(t,r)}async function Te(e){if(de&&de.runtime&&de.runtime.sendMessage)try{await de.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){Ce(e)}else Ce(e)}function Ce(e){const t=ye.get(e);ye.delete(e),t&&globalThis.clearTimeout(t)}de&&de.runtime&&de.runtime.onMessage&&de.runtime.onMessage.addListener&&de.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ye.get(e.type);if(t){ye.delete(e.type);try{t.callback()}catch(t){Ce(e.type)}}}}));var Re=Object.freeze({__proto__:null,process:ke,resetZoomLevel:ve});const _e={ON_BEFORE_CAPTURE_EVENT_NAME:y,ON_AFTER_CAPTURE_EVENT_NAME:b,WIN_ID_ATTRIBUTE_NAME:S,preProcessDoc:J,serialize:oe,postProcessDoc:te,getShadowRoot:Z},Ie="__frameTree__::",Le='iframe, frame, object[type="text/html"][data]',Ne="singlefile.frameTree.initRequest",ze="singlefile.frameTree.ackInitRequest",Pe="singlefile.frameTree.cleanupRequest",Me="singlefile.frameTree.initResponse",Oe=5e3,Ue=".",De=globalThis.window==globalThis.top,Fe=globalThis.browser,qe=globalThis.top,Be=globalThis.MessageChannel,je=globalThis.document;let He,Ve=globalThis.sessions;var We,$e,Ge;function Ye(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function Je(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,De||(He=globalThis.frameId=e.windowId),Ze(je,e.options,He,t),De||(e.options.userScriptEnabled&&r&&await r(_e.ON_BEFORE_CAPTURE_EVENT_NAME),rt({frames:[ot(je,globalThis,He,e.options)],sessionId:t,requestedFrameId:je.documentElement.dataset.requestedFrameId&&He}),e.options.userScriptEnabled&&r&&await r(_e.ON_AFTER_CAPTURE_EVENT_NAME),delete je.documentElement.dataset.requestedFrameId)}function Qe(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;tt(it(je),e.windowId,t)}}function Ke(e){e.frames.forEach((t=>Xe("responseTimeouts",e.sessionId,t.windowId)));const t=Ve.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let r=t.frames.find((t=>e.windowId==t.windowId));r||(r={windowId:e.windowId},t.frames.push(r)),r.processed||(r.content=e.content,r.baseURI=e.baseURI,r.title=e.title,r.canvases=e.canvases,r.fonts=e.fonts,r.stylesheets=e.stylesheets,r.images=e.images,r.posters=e.posters,r.videos=e.videos,r.usedFonts=e.usedFonts,r.shadowRoots=e.shadowRoots,r.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(Ue).length-e.windowId.split(Ue).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function Ze(e,t,r,n){const o=it(e);!function(e,t,r,n,o){const i=[];let a;Ve.get(o)?a=Ve.get(o).requestTimeouts:(a={},Ve.set(o,{requestTimeouts:a}));t.forEach(((e,t)=>{const r=n+Ue+t;e.setAttribute(_e.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),rt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+Ue+t;try{nt(e.contentWindow,{method:Ne,windowId:i,sessionId:o,options:r})}catch(e){}a[i]=globalThis.setTimeout((()=>rt({frames:[{windowId:i,processed:!0}],sessionId:o})),Oe)})),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n),o.length&&function(e,t,r,n,o){const i=[];t.forEach(((e,t)=>{const a=n+Ue+t;let s;try{s=e.contentDocument}catch(e){}if(s)try{const t=e.contentWindow;t.stop(),Xe("requestTimeouts",o,a),Ze(s,r,a,o),i.push(ot(s,t,a,r))}catch(e){i.push({windowId:a,processed:!0})}})),rt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function Xe(e,t,r){const n=Ve.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function et(e,t){const r=Ve.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>rt({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function tt(e,t,r){e.forEach(((e,n)=>{const o=t+Ue+n;e.removeAttribute(_e.WIN_ID_ATTRIBUTE_NAME);try{nt(e.contentWindow,{method:Pe,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+Ue+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{tt(it(i),o,r)}catch(e){}}))}function rt(e){e.method=Me;try{qe.singlefile.processors.frameTree.initResponse(e)}catch(t){nt(qe,e,!0)}}function nt(e,t,r){if(e==qe&&Fe&&Fe.runtime&&Fe.runtime.sendMessage)Fe.runtime.sendMessage(t);else if(r){const r=new Be;e.postMessage(Ie+JSON.stringify({method:t.method,sessionId:t.sessionId}),"*",[r.port2]),r.port1.postMessage(t)}else e.postMessage(Ie+JSON.stringify(t),"*")}function ot(e,t,r,n){const o=_e.preProcessDoc(e,t,n),i=_e.serialize(e);_e.postProcessDoc(e,o.markedElements,o.invalidElements);return{windowId:r,content:i,baseURI:e.baseURI.split("#")[0],title:e.title,canvases:o.canvases,fonts:o.fonts,stylesheets:o.stylesheets,images:o.images,posters:o.posters,videos:o.videos,usedFonts:o.usedFonts,shadowRoots:o.shadowRoots,processed:!0}}function it(e){let t=Array.from(e.querySelectorAll(Le));return e.querySelectorAll("*").forEach((e=>{const r=_e.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(Le)))})),t}Ve||(Ve=globalThis.sessions=new Map),De&&(He="0",Fe&&Fe.runtime&&Fe.runtime.onMessage&&Fe.runtime.onMessage.addListener&&Fe.runtime.onMessage.addListener((e=>e.method==Me?(Ke(e),Promise.resolve({})):e.method==ze?(Xe("requestTimeouts",e.sessionId,e.windowId),et(e.sessionId,e.windowId),Promise.resolve({})):void 0))),We="message",$e=async e=>{if("string"==typeof e.data&&e.data.startsWith(Ie)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(Ie.length));t.method==Ne?(e.source&&nt(e.source,{method:ze,windowId:t.windowId,sessionId:t.sessionId}),De||(globalThis.stop(),t.options.loadDeferredImages&&ke(t.options),await Je(t))):t.method==ze?(Xe("requestTimeouts",t.sessionId,t.windowId),et(t.sessionId,t.windowId)):t.method==Pe?Qe(t):t.method==Me&&Ve.get(t.sessionId)&&(e.ports[0].onmessage=e=>Ke(e.data))}},Ge=!0,globalThis.addEventListener(We,$e,Ge);var at=Object.freeze({__proto__:null,getAsync:function(e){const t=Ye();return e=JSON.parse(JSON.stringify(e)),new Promise((r=>{Ve.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),Je({windowId:He,sessionId:t,options:e})}))},getSync:function(e){const t=Ye();e=JSON.parse(JSON.stringify(e)),Ve.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,De||(He=globalThis.frameId=e.windowId);Ze(je,e.options,He,t),De||(e.options.userScriptEnabled&&r&&r(_e.ON_BEFORE_CAPTURE_EVENT_NAME),rt({frames:[ot(je,globalThis,He,e.options)],sessionId:t,requestedFrameId:je.documentElement.dataset.requestedFrameId&&He}),e.options.userScriptEnabled&&r&&r(_e.ON_AFTER_CAPTURE_EVENT_NAME),delete je.documentElement.dataset.requestedFrameId)}({windowId:He,sessionId:t,options:e});const r=Ve.get(t).frames;return r.sessionId=t,r},cleanup:function(e){Ve.delete(e),Qe({windowId:He,sessionId:e,options:{sessionId:e}})},initResponse:Ke,TIMEOUT_INIT_REQUEST_MESSAGE:Oe}),st=Object.freeze({__proto__:null,frameTree:at,hooksFrames:p,lazy:Re}),lt=Object.create,ct=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ht=Object.getOwnPropertyNames,dt=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty,mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ft=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0})},gt=mt((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},e.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}})),yt=mt((e=>{var t=gt();e.encode=function(e){var r,n,o="",i=(n=e)<0?1+(-n<<1):0+(n<<1);do{r=31&i,(i>>>=5)>0&&(r|=32),o+=t.encode(r)}while(i>0);return o},e.decode=function(e,r,n){var o,i,a=e.length,s=0,l=0;do{if(r>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(r++))))throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(32&i),s+=(i&=31)<<l,l+=5}while(o);n.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(s),n.rest=r}})),bt=mt((e=>{e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=n,e.urlGenerate=o;var i,a,s=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var a=e.isAbsolute(r),s=[],l=0,c=0;;){if(l=c,-1===(c=r.indexOf("/",l))){s.push(r.slice(l));break}for(s.push(r.slice(l,c));c<r.length&&"/"===r[c];)c++}var u,h=0;for(c=s.length-1;c>=0;c--)"."===(u=s[c])?s.splice(c,1):".."===u?h++:h>0&&(""===u?(s.splice(c+1,h),h=0):(s.splice(c,2),h--));return""===(r=s.join("/"))&&(r=a?"/":"."),i?(i.path=r,o(i)):r},a=[],function(e){for(var t=0;t<a.length;t++)if(a[t].input===e){var r=a[0];return a[0]=a[t],a[t]=r,a[0].result}var n=i(e);return a.unshift({input:e,result:n}),a.length>32&&a.pop(),n});function l(e,t){""===e&&(e="."),""===t&&(t=".");var i=n(t),a=n(e);if(a&&(e=a.path||"/"),i&&!i.scheme)return a&&(i.scheme=a.scheme),o(i);if(i||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l}e.normalize=s,e.join=l,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=c?u:function(e){return h(e)?"$"+e:e},e.fromSetString=c?u:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=d(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,r){var n;return 0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||(0!==(n=e.generatedColumn-t.generatedColumn)||r)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,r){var n=e.generatedColumn-t.generatedColumn;return 0!==n||r||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var i=n(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var a=i.path.lastIndexOf("/");a>=0&&(i.path=i.path.substring(0,a+1))}t=l(o(i),t)}return s(t)}})),kt=mt((e=>{var t=bt(),r=Object.prototype.hasOwnProperty,n=typeof Map<"u";function o(){this._array=[],this._set=n?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n<i;n++)r.add(e[n],t);return r},o.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,o){var i=n?e:t.toSetString(e),a=n?this.has(e):r.call(this._set,i),s=this._array.length;(!a||o)&&this._array.push(e),a||(n?this._set.set(e,s):this._set[i]=s)},o.prototype.has=function(e){if(n)return this._set.has(e);var o=t.toSetString(e);return r.call(this._set,o)},o.prototype.indexOf=function(e){if(n){var o=this._set.get(e);if(o>=0)return o}else{var i=t.toSetString(e);if(r.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o})),vt=mt((e=>{var t=bt();function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,r){var n=e.generatedLine,o=r.generatedLine,i=e.generatedColumn,a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),wt=mt((e=>{var t=yt(),r=bt(),n=kt().ArraySet,o=vt().MappingList;function i(e){e||(e={}),this._file=r.getArg(e,"file",null),this._sourceRoot=r.getArg(e,"sourceRoot",null),this._skipValidation=r.getArg(e,"skipValidation",!1),this._sources=new n,this._names=new n,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,n=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=r.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),n.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=r.relative(t,o)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(o);null!=a&&n.setSourceContent(o,a)})),n},i.prototype.addMapping=function(e){var t=r.getArg(e,"generated"),n=r.getArg(e,"original",null),o=r.getArg(e,"source",null),i=r.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=r.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[r.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var a=this._sourceRoot;null!=a&&(i=r.relative(a,i));var s=new n,l=new n;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var n=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=n.source&&(t.source=n.source,null!=o&&(t.source=r.join(o,t.source)),null!=a&&(t.source=r.relative(a,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}var c=t.source;null!=c&&!s.has(c)&&s.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=s,this._names=l,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=o&&(t=r.join(o,t)),null!=a&&(t=r.relative(a,t)),this.setSourceContent(t,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))}},i.prototype._serializeMappings=function(){for(var e,n,o,i,a=0,s=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),m=0,f=p.length;m<f;m++){if(e="",(n=p[m]).generatedLine!==s)for(a=0;n.generatedLine!==s;)e+=";",s++;else if(m>0){if(!r.compareByGeneratedPositionsInflated(n,p[m-1]))continue;e+=","}e+=t.encode(n.generatedColumn-a),a=n.generatedColumn,null!=n.source&&(i=this._sources.indexOf(n.source),e+=t.encode(i-h),h=i,e+=t.encode(n.originalLine-1-c),c=n.originalLine-1,e+=t.encode(n.originalColumn-l),l=n.originalColumn,null!=n.name&&(o=this._names.indexOf(n.name),e+=t.encode(o-u),u=o)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=r.relative(t,e));var n=r.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i})),xt={};ft(xt,{AtKeyword:()=>Tt,BadString:()=>_t,BadUrl:()=>Lt,CDC:()=>Dt,CDO:()=>Ut,Colon:()=>Ft,Comma:()=>Bt,Comment:()=>Yt,Delim:()=>Nt,Dimension:()=>Mt,EOF:()=>Et,Function:()=>St,Hash:()=>Ct,Ident:()=>At,LeftCurlyBracket:()=>$t,LeftParenthesis:()=>Vt,LeftSquareBracket:()=>jt,Number:()=>zt,Percentage:()=>Pt,RightCurlyBracket:()=>Gt,RightParenthesis:()=>Wt,RightSquareBracket:()=>Ht,Semicolon:()=>qt,String:()=>Rt,Url:()=>It,WhiteSpace:()=>Ot});var Et=0,At=1,St=2,Tt=3,Ct=4,Rt=5,_t=6,It=7,Lt=8,Nt=9,zt=10,Pt=11,Mt=12,Ot=13,Ut=14,Dt=15,Ft=16,qt=17,Bt=18,jt=19,Ht=20,Vt=21,Wt=22,$t=23,Gt=24,Yt=25;function Jt(e){return e>=48&&e<=57}function Qt(e){return Jt(e)||e>=65&&e<=70||e>=97&&e<=102}function Kt(e){return e>=65&&e<=90}function Zt(e){return function(e){return Kt(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function Xt(e){return Zt(e)||Jt(e)||45===e}function er(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function tr(e){return 10===e||13===e||12===e}function rr(e){return tr(e)||32===e||9===e}function nr(e,t){return!(92!==e||tr(t)||0===t)}function or(e,t,r){return 45===e?Zt(t)||45===t||nr(t,r):!!Zt(e)||92===e&&nr(e,t)}function ir(e,t,r){return 43===e||45===e?Jt(t)?2:46===t&&Jt(r)?3:0:46===e?Jt(t)?2:0:Jt(e)?1:0}function ar(e){return 65279===e||65534===e?1:0}var sr=new Array(128),lr=130;for(let e=0;e<sr.length;e++)sr[e]=(rr(e)?lr:Jt(e)&&131)||Zt(e)&&132||er(e)&&133||e||128;function cr(e){return e<128?sr[e]:132}function ur(e,t){return t<e.length?e.charCodeAt(t):0}function hr(e,t,r){return 13===r&&10===ur(e,t+1)?2:1}function dr(e,t,r){let n=e.charCodeAt(t);return Kt(n)&&(n|=32),n===r}function pr(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let o=t;o<r;o++){let r=n.charCodeAt(o-t),i=e.charCodeAt(o);if(Kt(i)&&(i|=32),i!==r)return!1}return!0}function mr(e,t){for(;t<e.length&&rr(e.charCodeAt(t));t++);return t}function fr(e,t){for(;t<e.length&&Jt(e.charCodeAt(t));t++);return t}function gr(e,t){if(Qt(ur(e,(t+=2)-1))){for(let r=Math.min(e.length,t+5);t<r&&Qt(ur(e,t));t++);let r=ur(e,t);rr(r)&&(t+=hr(e,t,r))}return t}function yr(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!Xt(r)){if(nr(r,ur(e,t+1))){t=gr(e,t)-1;continue}break}}return t}function br(e,t){let r=e.charCodeAt(t);if((43===r||45===r)&&(r=e.charCodeAt(t+=1)),Jt(r)&&(t=fr(e,t+1),r=e.charCodeAt(t)),46===r&&Jt(e.charCodeAt(t+1))&&(t=fr(e,t+=2)),dr(e,t,101)){let n=0;r=e.charCodeAt(t+1),(45===r||43===r)&&(n=1,r=e.charCodeAt(t+2)),Jt(r)&&(t=fr(e,t+1+n+1))}return t}function kr(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(41===r){t++;break}nr(r,ur(e,t+1))&&(t=gr(e,t))}return t}function vr(e){if(1===e.length&&!Qt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var wr=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function xr(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function Er(e){let t=e.source,r=t.length,n=t.length>0?ar(t.charCodeAt(0)):0,o=xr(e.lines,r),i=xr(e.columns,r),a=e.startLine,s=e.startColumn;for(let e=n;e<r;e++){let n=t.charCodeAt(e);o[e]=a,i[e]=s++,(10===n||13===n||12===n)&&(13===n&&e+1<r&&10===t.charCodeAt(e+1)&&(e++,o[e]=a,i[e]=s),a++,s=1)}o[r]=a,i[r]=s,e.lines=o,e.columns=i,e.computed=!0}var Ar=16777215,Sr=24,Tr=new Map([[2,22],[21,22],[19,20],[23,24]]),Cr=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=(()=>{})){let r=(e=String(e||"")).length,n=xr(this.offsetAndType,e.length+1),o=xr(this.balance,e.length+1),i=0,a=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=r;break;case a:{let e=s&Ar;for(s=o[e],a=s>>Sr,o[i]=e,o[e++]=i;e<i;e++)o[e]===r&&(o[e]=i);break}case 21:case 2:case 19:case 23:o[i]=s,a=Tr.get(e),s=a<<Sr|i}n[i++]=e<<Sr|c,-1===l&&(l=t)})),n[i]=0|r,o[i]=r,o[r]=r;0!==s;){let e=s&Ar;s=o[e],o[e]=r}this.source=e,this.firstCharOffset=-1===l?0:l,this.tokenCount=i,this.offsetAndType=n,this.balance=o,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>Sr:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&Ar:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&pr(this.source,this.offsetAndType[e-1]&Ar,this.offsetAndType[e]&Ar,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Ar:this.offsetAndType[this.tokenCount]&Ar:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?9===this.lookupType(t)&&this.source.charCodeAt(this.lookupOffset(t))===e:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Ar,t=this.offsetAndType[t],this.tokenType=t>>Sr,this.tokenEnd=t&Ar):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Sr,this.tokenEnd=e&Ar):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let r,n,o=e;e:for(;o<this.tokenCount&&(r=this.balance[o],!(r<e));o++)switch(n=o>0?this.offsetAndType[o-1]&Ar:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break e;case 2:o++;break e;default:this.balance[r]===o&&(o=r)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t<this.tokenCount;t++){let n=r,o=this.offsetAndType[t],i=o&Ar;r=i,e(o>>Sr,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:wr[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function Rr(e,t){function r(t){return t<s?e.charCodeAt(t):0}function n(){return c=br(e,c),or(r(c),r(c+1),r(c+2))?(a=12,void(c=yr(e,c))):37===r(c)?(a=11,void c++):void(a=10)}function o(){let t=c;return c=yr(e,c),pr(e,t,c,"url")&&40===r(c)?(c=mr(e,c+1),34===r(c)||39===r(c)?(a=2,void(c=t+4)):void function(){for(a=7,c=mr(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(cr(t)){case 41:return void c++;case lr:return c=mr(e,c),41===r(c)||c>=e.length?void(c<e.length&&c++):(c=kr(e,c),void(a=8));case 34:case 39:case 40:case 133:return c=kr(e,c),void(a=8);case 92:if(nr(t,r(c+1))){c=gr(e,c)-1;break}return c=kr(e,c),void(a=8)}}}()):40===r(c)?(a=2,void c++):void(a=1)}function i(t){for(t||(t=r(c++)),a=5;c<e.length;c++){let n=e.charCodeAt(c);switch(cr(n)){case t:return void c++;case lr:if(tr(n))return c+=hr(e,c,n),void(a=6);break;case 92:if(c===e.length-1)break;let o=r(c+1);tr(o)?c+=hr(e,c+1,o):nr(n,o)&&(c=gr(e,c)-1)}}}let a,s=(e=String(e||"")).length,l=ar(r(0)),c=l;for(;c<s;){let s=e.charCodeAt(c);switch(cr(s)){case lr:a=13,c=mr(e,c+1);break;case 34:i();break;case 35:Xt(r(c+1))||nr(r(c+1),r(c+2))?(a=4,c=yr(e,c+1)):(a=9,c++);break;case 39:i();break;case 40:a=21,c++;break;case 41:a=22,c++;break;case 43:ir(s,r(c+1),r(c+2))?n():(a=9,c++);break;case 44:a=18,c++;break;case 45:ir(s,r(c+1),r(c+2))?n():45===r(c+1)&&62===r(c+2)?(a=15,c+=3):or(s,r(c+1),r(c+2))?o():(a=9,c++);break;case 46:ir(s,r(c+1),r(c+2))?n():(a=9,c++);break;case 47:42===r(c+1)?(a=25,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(a=9,c++);break;case 58:a=16,c++;break;case 59:a=17,c++;break;case 60:33===r(c+1)&&45===r(c+2)&&45===r(c+3)?(a=14,c+=4):(a=9,c++);break;case 64:or(r(c+1),r(c+2),r(c+3))?(a=3,c=yr(e,c+1)):(a=9,c++);break;case 91:a=19,c++;break;case 92:nr(s,r(c+1))?o():(a=9,c++);break;case 93:a=20,c++;break;case 123:a=23,c++;break;case 125:a=24,c++;break;case 131:n();break;case 132:o();break;default:a=9,c++}t(a,l,l=c)}}var _r=null,Ir=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return Ir.createItem(e)}allocateCursor(e,t){let r;return null!==_r?(r=_r,_r=_r.cursor,r.prev=e,r.next=t,r.cursor=this.cursor):r={prev:e,next:t,cursor:this.cursor},this.cursor=r,r}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=_r,_r=e}updateCursors(e,t,r,n){let{cursor:o}=this;for(;null!==o;)o.prev===e&&(o.prev=t),o.next===r&&(o.next=n),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let r of e){let e=Ir.createItem(r);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let r=this.allocateCursor(null,this.head);for(;null!==r.next;){let n=r.next;r.next=n.next,e.call(t,n.data,n,this)}this.releaseCursor()}forEachRight(e,t=this){let r=this.allocateCursor(this.tail,null);for(;null!==r.prev;){let n=r.prev;r.prev=n.prev,e.call(t,n.data,n,this)}this.releaseCursor()}reduce(e,t,r=this){let n,o=this.allocateCursor(null,this.head),i=t;for(;null!==o.next;)n=o.next,o.next=n.next,i=e.call(r,i,n.data,n,this);return this.releaseCursor(),i}reduceRight(e,t,r=this){let n,o=this.allocateCursor(this.tail,null),i=t;for(;null!==o.prev;)n=o.prev,o.prev=n.prev,i=e.call(r,i,n.data,n,this);return this.releaseCursor(),i}some(e,t=this){for(let r=this.head;null!==r;r=r.next)if(e.call(t,r.data,r,this))return!0;return!1}map(e,t=this){let r=new Ir;for(let n=this.head;null!==n;n=n.next)r.appendData(e.call(t,n.data,n,this));return r}filter(e,t=this){let r=new Ir;for(let n=this.head;null!==n;n=n.next)e.call(t,n.data,n,this)&&r.appendData(n.data);return r}nextUntil(e,t,r=this){if(null===e)return;let n=this.allocateCursor(null,e);for(;null!==n.next;){let e=n.next;if(n.next=e.next,t.call(r,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,r=this){if(null===e)return;let n=this.allocateCursor(e,null);for(;null!==n.prev;){let e=n.prev;if(n.prev=e.prev,t.call(r,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new Ir;for(let t of this)e.appendData(t);return e}prepend(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}prependData(e){return this.prepend(Ir.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(Ir.createItem(e))}insert(e,t=null){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}insertData(e,t){return this.insert(Ir.createItem(e),t)}remove(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}push(e){this.insert(Ir.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(Ir.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(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}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Lr(e,t){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}var Nr=" ";function zr({source:e,line:t,column:r},n){function o(e,t){return i.slice(e,t).map(((t,r)=>String(e+r+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,s=Math.min(t+n,i.length+1),l=Math.max(4,String(s).length)+1,c=0;(r+=(Nr.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length)>100&&(c=r-60+3,r=58);for(let e=a;e<=s;e++)e>=0&&e<i.length&&(i[e]=i[e].replace(/\t/g,Nr),i[e]=(c>0&&i[e].length>c?"…":"")+i[e].substr(c,98)+(i[e].length>c+100-1?"…":""));return[o(a,t),new Array(r+l+2).join("-")+"^",o(t,s)].filter(Boolean).join("\n")}function Pr(e,t,r,n,o){return Object.assign(Lr("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>zr({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+zr({source:t,line:n,column:o},2)}})}function Mr(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(void 0===o)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Or=()=>{};function Ur(e){return function(){return this[e]()}}function Dr(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function Fr(e){let t="",r="<unknown>",n=!1,o=Or,i=!1,a=new class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,r=1,n=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||Er(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||Er(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},s=Object.assign(new Cr,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Dr(e.atrule),pseudo:Dr(e.pseudo),node:Dr(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Ur(e.parseContext[r])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Mr,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new Ir,createSingleNodeList:e=>(new Ir).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let r=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let n=t.call(this,r);return i=!0,o(e,n),i=!1,n}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,r)=>t.substring(e,r),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,r)=>dr(t,e,r),cmpStr:(e,r,n)=>pr(t,e,r,n),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let r=t.substring(this.tokenStart,br(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=wr[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),r=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,n=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(n=this.tokenEnd-1,r="Identifier is expected but function found"):r="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),n++,r="Name is expected");break;case 11:10===this.tokenType&&(n=this.tokenEnd,r="Percent sign is expected")}this.error(r,n)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>n?a.getLocationRange(e,t,r):null,getLocationFromList(e){if(n){let t=this.getFirstListNode(e),n=this.getLastListNode(e);return a.getLocationRange(null!==t?t.loc.start.offset-a.startOffset:this.tokenStart,null!==n?n.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(e,r){let n=typeof r<"u"&&r<t.length?a.getLocation(r):this.eof?a.getLocation(function(e,t){for(;t>=0&&rr(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new Pr(e||"Unexpected input",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,Rr),a.setSource(t,l.offset,l.line,l.column),r=l.filename||"<unknown>",n=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:Or,i=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in s.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&s.forEachToken(((e,r,n)=>{if(25===e){let e=s.getLocation(r,n),o=pr(t,n-2,n,"*/")?t.slice(r+2,n-2):t.slice(r+2,n);u(o,e)}}));let h=s.context[c].call(s,l);return s.eof||s.error(),h}),{SyntaxError:Pr,config:s.config})}var qr,Br,jr=(qr=wt(),Br=1,((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of ht(t))!pt.call(e,o)&&(r||"default"!==o)&&ct(e,o,{get:()=>t[o],enumerable:!(n=ut(t,o))||n.enumerable});return e})((e=>ct(e,"__esModule",{value:!0}))(ct(null!=qr?lt(dt(qr)):{},"default",!Br&&qr&&qr.__esModule?{get:()=>qr.default,enumerable:!0}:{value:qr,enumerable:!0})),qr)),Hr=new Set(["Atrule","Selector","Declaration"]);var Vr={};ft(Vr,{safe:()=>Qr,spec:()=>Jr});var Wr=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},$r=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],Gr=$r.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function Yr(e){let t=new Set(e.map((([e,t])=>Wr(e)<<16|Wr(t))));return function(e,r,n){let o=Wr(r,n),i=n.charCodeAt(0);return(45===i&&1!==r&&2!==r&&15!==r||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var Jr=Yr($r),Qr=Yr(Gr);function Kr(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let r=null;e.children.forEach((e=>{null!==r&&t.call(this,r),this.node(e),r=e}))}}function Zr(e){Rr(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function Xr(e){let t=new Map;for(let r in e.node){let n=e.node[r];"function"==typeof(n.generate||n)&&t.set(r,n.generate||n)}return function(e,r){let n="",o=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(a,e)},tokenBefore:Qr,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){n+=e},result:()=>n};r&&("function"==typeof r.decorator&&(i=r.decorator(i)),r.sourceMap&&(i=function(e){let t=new jr.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,s=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Hr.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(n.line!==c||n.column!==u)&&(n.line=c,n.column=u,r.line=a,r.column=s,l&&(l=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:n,generated:r}))}c.call(this,e),l&&Hr.has(e.type)&&(o.line=a,o.column=s)};let u=e.emit;e.emit=function(e,t,r){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(a++,s=0):s++;u(e,t,r)};let h=e.result;return e.result=function(){return l&&t.addMapping(i),{css:h(),map:t}},e}(i)),r.mode in Vr&&(i.tokenBefore=Vr[r.mode]));let a={node:e=>i.node(e),children:Kr,token:(e,t)=>i.token(e,t),tokenize:Zr};return i.node(e),i.result()}}var{hasOwnProperty:en}=Object.prototype,tn=function(){};function rn(e){return"function"==typeof e?e:tn}function nn(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function on(e,t){let r=t.structure,n=[];for(let e in r){if(!1===en.call(r,e))continue;let t=r[e],o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?o.nullable=!0:"string"==typeof e?o.type="node":Array.isArray(e)&&(o.type="list");o.type&&n.push(o)}return n.length?{context:t.walkContext,fields:n}:null}function an(e,t){let r=e.fields.slice(),n=e.context,o="string"==typeof n;return t&&r.reverse(),function(e,i,a,s){let l;o&&(l=i[n],i[n]=e);for(let n of r){let r=e[n.name];if(!n.nullable||r)if("list"===n.type){if(t?r.reduceRight(s,!1):r.reduce(s,!1))return!0}else if(a(r))return!0}o&&(i[n]=l)}}function sn({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function ln(e){let t=function(e){let t={};for(let r in e.node)if(en.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=on(0,n)}return t}(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)en.call(t,e)&&null!==t[e]&&(r[e]=an(t[e],!1),n[e]=an(t[e],!0));let a=sn(r),s=sn(n),l=function(e,l){function c(e,t,r){let n=u.call(m,e,t,r);return n===o||n!==i&&!!(d.hasOwnProperty(e.type)&&d[e.type](e,m,c,p)||h.call(m,e,t,r)===o)}let u=tn,h=tn,d=r,p=(e,t,r,n)=>e||c(t,r,n),m={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=rn(l.enter),h=rn(l.leave),l.reverse&&(d=n),l.visit)){if(a.hasOwnProperty(l.visit))d=l.reverse?s[l.visit]:a[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=nn(u,l.visit),h=nn(h,l.visit)}if(u===tn&&h===tn)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let r=null;return l(e,(function(e,n,i){if(t.call(this,e,n,i))return r=e,o})),r},l.findLast=function(e,t){let r=null;return l(e,{reverse:!0,enter:function(e,n,i){if(t.call(this,e,n,i))return r=e,o}}),r},l.findAll=function(e,t){let r=[];return l(e,(function(e,n,o){t.call(this,e,n,o)&&r.push(e)})),r},l}function cn(e){return e}function un(e,t,r,n){let o;switch(e.type){case"Group":o=function(e,t,r,n){let o=" "===e.combinator||n?e.combinator:" "+e.combinator+" ",i=e.terms.map((e=>un(e,t,r,n))).join(o);return e.explicit||r?(n||","===i[0]?"[":"[ ")+i+(n?"]":" ]"):i}(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return un(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?"*":0===t&&1===r?"?":1===t&&0===r?n?"#":"+":1===t&&1===r?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(0!==r?r:"")+"}")}(e),e);case"Type":o="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function hn(e,t){let r=cn,n=!1,o=!1;return"function"==typeof t?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(r=t.decorate)),un(e,r,n,o)}var dn={offset:0,line:1,column:1};function pn(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?mn(r):r:null}function mn({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let e=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=e.length-1,o.column=1===e.length?o.column+n.length:e.pop().length+1}return o}var fn=function(e,t){let r=Lr("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},gn=function(e,t,r,n){let o=Lr("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:s,start:l,end:c}=function(e,t){let r,n,o=e.tokens,i=e.longestMatch,a=i<o.length&&o[i].node||null,s=a!==t?a:null,l=0,c=0,u=0,h="";for(let e=0;e<o.length;e++){let t=o[e].value;e===i&&(c=t.length,l=h.length),null!==s&&o[e].node===s&&(e<=i?u++:u=0),h+=t}return i===o.length||u>1?(r=pn(s||t,"end")||mn(dn,h),n=mn(r)):(r=pn(s,"start")||mn(pn(t,"start")||dn,h.slice(0,l)),n=pn(s,"end")||mn(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?hn(t):"<generic>",o.css=i,o.mismatchOffset=a,o.mismatchLength=s,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"<empty string>")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:l,end:c},o},yn=new Map,bn=new Map,kn=function(e){if(yn.has(e))return yn.get(e);let t=e.toLowerCase(),r=yn.get(t);if(void 0===r){let e=xn(t,0),n=e?"":En(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return yn.set(e,r),r},vn=function(e){if(bn.has(e))return bn.get(e);let t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");let n=xn(t,r.length);if(!n&&(t=t.toLowerCase(),bn.has(t))){let r=bn.get(t);return bn.set(e,r),r}let o=n?"":En(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return bn.set(e,a),a},wn=En;function xn(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function En(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){let r=e.indexOf("-",t+2);if(-1!==r)return e.substring(t,r+1)}return""}var An=45,Sn=!0;function Tn(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Cn(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function Rn(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(43===o||o===An){if(r)return 0;t++}for(;t<e.value.length;t++)if(!Jt(e.value.charCodeAt(t)))return 0;return n+1}function _n(e,t,r){let n=!1,o=Cn(e,t,r);if(null===(e=r(o)))return t;if(10!==e.type){if(!Tn(e,43)&&!Tn(e,An))return t;if(n=!0,o=Cn(r(++o),o,r),null===(e=r(o))||10!==e.type)return 0}if(!n){let t=e.value.charCodeAt(0);if(43!==t&&t!==An)return 0}return Rn(e,n?0:1,n,o)}function In(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Ln(e,t,r){let n=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(45===i&&r&&0!==n)return Ln(e,t+n+1,!1),6;if(!Qt(i)||++n>6)return 0}return n}function Nn(e,t,r){if(!e)return 0;for(;In(r(t),63);){if(++e>6)return 0;t++}return t}var zn=["unset","initial","inherit"],Pn=["calc(","-moz-calc(","-webkit-calc("],Mn=new Map([[2,22],[21,22],[19,20],[23,24]]);function On(e,t){return t<e.length?e.charCodeAt(t):0}function Un(e,t){return pr(e,0,e.length,t)}function Dn(e,t){for(let r=0;r<t.length;r++)if(Un(e,t[r]))return!0;return!1}function Fn(e,t){return t===e.length-2&&(92===On(e,t)&&Jt(On(e,t+1)))}function qn(e,t,r){if(e&&"Range"===e.type){let n=Number(void 0!==r&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||null!==e.min&&n<e.min||null!==e.max&&n>e.max)return!0}return!1}function Bn(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),0===n.length){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Mn.get(e.type)}o++}while(e=t(o));return o}function jn(e){return function(t,r,n){return null===t?0:2===t.type&&Dn(t.value,Pn)?Bn(t,r):e(t,r,n)}}function Hn(e){return function(t){return null===t||t.type!==e?0:1}}function Vn(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=br(t.value,0);if(null!==e){let r=t.value.indexOf("\\",o),n=-1!==r&&Fn(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return qn(n,t.value,o)?0:1}}function Wn(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,r,n){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,r,n)}}var $n={"ident-token":Hn(1),"function-token":Hn(2),"at-keyword-token":Hn(3),"hash-token":Hn(4),"string-token":Hn(5),"bad-string-token":Hn(6),"url-token":Hn(7),"bad-url-token":Hn(8),"delim-token":Hn(9),"number-token":Hn(10),"percentage-token":Hn(11),"dimension-token":Hn(12),"whitespace-token":Hn(13),"CDO-token":Hn(14),"CDC-token":Hn(15),"colon-token":Hn(16),"semicolon-token":Hn(17),"comma-token":Hn(18),"[-token":Hn(19),"]-token":Hn(20),"(-token":Hn(21),")-token":Hn(22),"{-token":Hn(23),"}-token":Hn(24),string:Hn(5),ident:Hn(1),"custom-ident":function(e){if(null===e||1!==e.type)return 0;let t=e.value.toLowerCase();return Dn(t,zn)||Un(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==On(e.value,0)||45!==On(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;let t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(let r=1;r<t;r++)if(!Qt(On(e.value,r)))return 0;return 1},"id-selector":function(e){return null!==e&&4===e.type&&or(On(e.value,1),On(e.value,2),On(e.value,3))?1:0},"an-plus-b":function(e,t){let r=0;if(!e)return 0;if(10===e.type)return Rn(e,0,false,r);if(1===e.type&&e.value.charCodeAt(0)===An){if(!dr(e.value,1,110))return 0;switch(e.value.length){case 2:return _n(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==An?0:(r=Cn(t(++r),r,t),Rn(e=t(r),0,Sn,r));default:return e.value.charCodeAt(2)!==An?0:Rn(e,3,Sn,r)}}else if(1===e.type||Tn(e,43)&&1===t(r+1).type){if(1!==e.type&&(e=t(++r)),null===e||!dr(e.value,0,110))return 0;switch(e.value.length){case 1:return _n(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==An?0:(r=Cn(t(++r),r,t),Rn(e=t(r),0,Sn,r));default:return e.value.charCodeAt(1)!==An?0:Rn(e,2,Sn,r)}}else if(12===e.type){let n=e.value.charCodeAt(0),o=43===n||n===An?1:0,i=o;for(;i<e.value.length&&Jt(e.value.charCodeAt(i));i++);return i!==o&&dr(e.value,i,110)?i+1===e.value.length?_n(t(++r),r,t):e.value.charCodeAt(i+1)!==An?0:i+2===e.value.length?(r=Cn(t(++r),r,t),Rn(e=t(r),0,Sn,r)):Rn(e,i+2,Sn,r):0}return 0},urange:function(e,t){let r=0;if(null===e||1!==e.type||!dr(e.value,0,117)||null===(e=t(++r)))return 0;if(In(e,43))return null===(e=t(++r))?0:1===e.type?Nn(Ln(e,0,!0),++r,t):In(e,63)?Nn(1,++r,t):0;if(10===e.type){let n=Ln(e,1,!0);return 0===n?0:null===(e=t(++r))?r:12===e.type||10===e.type?function(e,t){return e.value.charCodeAt(0)===t}(e,45)&&Ln(e,1,!1)?r+1:0:Nn(n,r,t)}return 12===e.type?Nn(Ln(e,1,!0),++r,t):0},"declaration-value":function(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(0===r)break e;break;case 9:if(0===r&&"!"===e.value)break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Mn.get(e.type)}o++}while(e=t(o));return o},"any-value":function(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Mn.get(e.type)}o++}while(e=t(o));return o},dimension:jn(Vn(null)),angle:jn(Vn(["deg","grad","rad","turn"])),decibel:jn(Vn(["db"])),frequency:jn(Vn(["hz","khz"])),flex:jn(Vn(["fr"])),length:jn(Wn(Vn(["px","mm","cm","in","pt","pc","q","em","ex","ch","rem","vh","vw","vmin","vmax","vm"]))),resolution:jn(Vn(["dpi","dpcm","dppx","x"])),semitones:jn(Vn(["st"])),time:jn(Vn(["s","ms"])),percentage:jn((function(e,t,r){return null===e||11!==e.type||qn(r,e.value,e.value.length-1)?0:1})),zero:Wn(),number:jn((function(e,t,r){if(null===e)return 0;let n=br(e.value,0);return n!==e.value.length&&!Fn(e.value,n)||qn(r,e.value,n)?0:1})),integer:jn((function(e,t,r){if(null===e||10!==e.type)return 0;let n=43===On(e.value,0)||45===On(e.value,0)?1:0;for(;n<e.value.length;n++)if(!Jt(On(e.value,n)))return 0;return qn(r,e.value,n)?0:1})),"-ms-legacy-expression":function(e){return e+="(",function(t,r){return null!==t&&Un(t.value,e)?Bn(t,r):0}}("expression")},Gn={};function Yn(e,t,r){return Object.assign(Lr("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((r||t.length)+1).join("-")+"^"})}ft(Gn,{SyntaxError:()=>Yn,generate:()=>hn,parse:()=>co,walk:()=>po});var Jn=123,Qn=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),Kn={" ":1,"&&":2,"||":3,"|":4};function Zn(e){return e.substringToPos(e.findWsEnd(e.pos))}function Xn(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||0===Qn[r])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function eo(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function to(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function ro(e){let t=null,r=null;return e.eat(Jn),t=eo(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(r=eo(e))):r=t,e.eat(125),{min:Number(t),max:r?Number(r):0}}function no(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,r=!0,t=e.charCode()===Jn?ro(e):{min:1,max:0};break;case Jn:t=ro(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}(e);return null!==r?(r.term=t,r):t}function oo(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function io(e){let t,r=null;return e.eat(60),t=Xn(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(Zn(e),r=function(e){let t=null,r=null,n=1;return e.eat(91),45===e.charCode()&&(e.peek(),n=-1),-1==n&&8734===e.charCode()?e.peek():t=n*Number(eo(e)),Zn(e),e.eat(44),Zn(e),8734===e.charCode()?e.peek():(n=1,45===e.charCode()&&(e.peek(),n=-1),r=n*Number(eo(e))),e.eat(93),null===t&&null===r?null:{type:"Range",min:t,max:r}}(e)),e.eat(62),no(e,{type:"Type",name:t,opts:r})}function ao(e,t){function r(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort(((e,t)=>Kn[e]-Kn[t]));t.length>0;){n=t.shift();let o=0,i=0;for(;o<e.length;o++){let t=e[o];"Combinator"===t.type&&(t.value===n?(-1===i&&(i=o-1),e.splice(o,1),o--):(-1!==i&&o-i>1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function so(e){let t,r=[],n={},o=null,i=e.pos;for(;t=lo(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===o||"Combinator"===o.type)&&(e.pos=i,e.error("Unexpected combinator")),n[t.value]=!0):null!==o&&"Combinator"!==o.type&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(t),o=t,i=e.pos);return null!==o&&"Combinator"===o.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:ao(r,n)||" ",disallowEmpty:!1,explicit:!1}}function lo(e){let t=e.charCode();if(t<128&&1===Qn[t])return function(e){let t=Xn(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):no(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return no(e,function(e){let t;return e.eat(91),t=so(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=Xn(e),e.eat(39),e.eat(62),no(e,{type:"Property",name:t})}(e):io(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return no(e,{type:"String",value:to(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:Zn(e)};case 64:return t=e.nextCharCode(),t<128&&1===Qn[t]?(e.pos++,{type:"AtKeyword",name:Xn(e)}):oo(e);case 42:case 43:case 63:case 35:case 33:break;case Jn:if(t=e.nextCharCode(),t<48||t>57)return oo(e);break;default:return oo(e)}}function co(e){let t=new class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new Yn(e,this.str,this.pos)}}(e),r=so(t);return t.pos!==e.length&&t.error("Unexpected input"),1===r.terms.length&&"Group"===r.terms[0].type?r.terms[0]:r}var uo=function(){};function ho(e){return"function"==typeof e?e:uo}function po(e,t,r){let n=uo,o=uo;if("function"==typeof t?n=t:t&&(n=ho(t.enter),o=ho(t.leave)),n===uo&&o===uo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(n.call(r,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)}o.call(r,t)}(e)}var mo={decorator:function(e){let t=[],r=null;return{...e,node(t){let n=r;r=t,e.node.call(this,t),r=n},emit(e,n,o){t.push({type:n,value:e,node:o?null:r})},result:()=>t}}};function fo(e,t){return"string"==typeof e?function(e){let t=[];return Rr(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,mo)}var go={type:"Match"},yo={type:"Mismatch"},bo={type:"DisallowEmpty"};function ko(e,t,r){return t===go&&r===yo||e===go&&t===go&&r===go?e:("If"===e.type&&e.else===yo&&t===go&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function vo(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function wo(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&vo(e.name)}function xo(e,t,r){switch(e){case" ":{let e=go;for(let r=t.length-1;r>=0;r--){e=ko(t[r],e,yo)}return e}case"|":{let e=yo,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(wo(o)&&(null===r&&n>0&&wo(t[n-1])&&(r=Object.create(null),e=ko({type:"Enum",map:r},go,e)),null!==r)){let e=(vo(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=ko(o,go,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=yo;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?xo(e,t.filter((function(e){return e!==i})),!1):go,r=ko(i,o,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?go:yo;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?xo(e,t.filter((function(e){return e!==i})),!0):go,n=ko(i,o,n)}return n}}}function Eo(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=xo(e.combinator,e.terms.map(Eo),!1);return e.disallowEmpty&&(t=ko(t,bo,yo)),t}case"Multiplier":return function(e){let t=go,r=Eo(e.term);if(0===e.max)r=ko(r,bo,yo),t=ko(r,null,yo),t.then=ko(go,go,t),e.comma&&(t.then.else=ko({type:"Comma",syntax:e},t,yo));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==go&&(t=ko({type:"Comma",syntax:e},t,yo)),t=ko(r,ko(go,go,t),yo);if(0===e.min)t=ko(go,go,t);else for(let n=0;n<e.min-1;n++)e.comma&&t!==go&&(t=ko({type:"Comma",syntax:e},t,yo)),t=ko(r,t,yo);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)}}function Ao(e,t){return"string"==typeof e&&(e=co(e)),{type:"MatchGraph",match:Eo(e),syntax:t||null,source:e}}var{hasOwnProperty:So}=Object.prototype,To="Match";function Co(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let n=t.charCodeAt(r),o=e.charCodeAt(r);if(o>=65&&o<=90&&(o|=32),o!==n)return!1}return!0}function Ro(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function _o(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type)}function Io(e,t,r){let n=function(e,t,r){function n(){do{y++,g=y<e.length?e[y]:null}while(null!==g&&(13===g.type||25===g.type))}function o(t){let r=y+t;return r<e.length?e[r]:null}function i(e,t){return{nextState:e,matchStack:k,syntaxStack:u,thenStack:h,tokenIndex:y,prev:t}}function a(e){h={nextState:e,matchStack:k,syntaxStack:u,prev:h}}function s(e){d=i(e,d)}function l(){k={type:1,syntax:t.syntax,token:g,prev:k},n(),p=null,y>b&&(b=y)}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev}let u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,k={type:0,syntax:null,token:null,prev:null};for(n();null===f&&++m<15e3;)switch(t.type){case"Match":if(null===h){if(null!==g&&(y!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=yo;break}f=To;break}if((t=h.nextState)===bo){if(h.matchStack===k){t=yo;break}t=go}for(;h.syntaxStack!==u;)c();h=h.prev;break;case"Mismatch":if(null!==p&&!1!==p)(null===d||y>d.tokenIndex)&&(d=p,p=!1);else if(null===d){f="Mismatch";break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,y=d.tokenIndex,g=y<e.length?e[y]:null,d=d.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==yo&&s(t.else),t.then!==go&&a(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let e=t.syntax.terms;if(t.index===e.length){if(0===t.mask||t.syntax.all){t=yo;break}t=go;break}if(t.mask===(1<<e.length)-1){t=go;break}for(;t.index<e.length;t.index++){let r=1<<t.index;if(0==(t.mask&r)){s(t),a({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|r}),t=e[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==g){let e=g.value.toLowerCase();if(-1!==e.indexOf("\\")&&(e=e.replace(/\\[09].*$/,"")),So.call(t.map,e)){t=t.map[e];break}}t=yo;break;case"Generic":{let e=null!==u?u.opts:null,r=y+Math.floor(t.fn(g,o,e));if(!isNaN(r)&&r>y){for(;y<r;)l();t=go}else t=yo;break}case"Type":case"Property":{let e="Type"===t.type?"types":"properties",n=So.call(r,e)?r[e][t.name]:null;if(!n||!n.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type&&("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value)){null===p&&(p=i(t,d)),t=yo;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=n.match;break}case"Keyword":{let e=t.name;if(null!==g){let r=g.value;if(-1!==r.indexOf("\\")&&(r=r.replace(/\\[09].*$/,"")),Co(r,e)){l(),t=go;break}}t=yo;break}case"AtKeyword":case"Function":if(null!==g&&Co(g.value,t.name)){l(),t=go;break}t=yo;break;case"Token":if(null!==g&&g.value===t.value){l(),t=go;break}t=yo;break;case"Comma":null!==g&&18===g.type?Ro(k.token)?t=yo:(l(),t=_o(g)?yo:go):t=Ro(k.token)||_o(g)?go:yo;break;case"String":let n="",m=y;for(;m<e.length&&n.length<t.value.length;m++)n+=e[m].value;if(Co(n,t.value)){for(;y<m;)l();t=go}else t=yo;break;default:throw new Error("Unknown node type: "+t.type)}switch(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)",k=null;break;case To:for(;null!==u;)c();break;default:k=null}return{tokens:e,reason:f,iterations:m,match:k,longestMatch:b}}(e,t,r||{});if(null===n.match)return n;let o=n.match,i=n.match={syntax:t.syntax||null,match:[]},a=[i];for(o=function(e){let t=null,r=null,n=e;for(;null!==n;)r=n.prev,n.prev=t,t=n,n=r;return t}(o).prev;null!==o;){switch(o.type){case 2:i.match.push(i={syntax:o.syntax,match:[]}),a.push(i);break;case 3:a.pop(),i=a[a.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return n}var Lo={};function No(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}let r=null;return null!==this.matched&&function n(o){if(Array.isArray(o.match)){for(let e=0;e<o.match.length;e++)if(n(o.match[e]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}(this.matched),r}function zo(e,t){return Oo(this,e,(e=>"Type"===e.type&&e.name===t))}function Po(e,t){return Oo(this,e,(e=>"Property"===e.type&&e.name===t))}function Mo(e){return Oo(this,e,(e=>"Keyword"===e.type))}function Oo(e,t,r){let n=No.call(e,t);return null!==n&&n.some(r)}function Uo(e){return"node"in e?e.node:Uo(e.match[0])}function Do(e){return"node"in e?e.node:Do(e.match[e.match.length-1])}function Fo(e,t,r,n,o){let i=[];return null!==r.matched&&function r(a){if(null!==a.syntax&&a.syntax.type===n&&a.syntax.name===o){let r=Uo(a),n=Do(a);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new Ir;do{if(e.appendData(t.data),t.data===n)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(a.match)&&a.match.forEach(r)}(r.matched),i}ft(Lo,{getTrace:()=>No,isKeyword:()=>Mo,isProperty:()=>Po,isType:()=>zo});var{hasOwnProperty:qo}=Object.prototype;function Bo(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function jo(e){return Boolean(e)&&Bo(e.offset)&&Bo(e.line)&&Bo(e.column)}function Ho(e,t){return function(r,n){if(!r||r.constructor!==Object)return n(r,"Type of node should be an Object");for(let o in r){let i=!0;if(!1!==qo.call(r,o)){if("type"===o)r.type!==e&&n(r,"Wrong node type `"+r.type+"`, expected `"+e+"`");else if("loc"===o){if(null===r.loc)continue;if(r.loc&&r.loc.constructor===Object)if("string"!=typeof r.loc.source)o+=".source";else if(jo(r.loc.start)){if(jo(r.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e<t[o].length;e++){let n=t[o][e];switch(n){case String:i="string"==typeof r[o];break;case Boolean:i="boolean"==typeof r[o];break;case null:i=null===r[o];break;default:"string"==typeof n?i=r[o]&&r[o].type===n:Array.isArray(n)&&(i=r[o]instanceof Ir)}}}else n(r,"Unknown field `"+o+"` for "+e+" node type");i||n(r,"Bad value for `"+e+"."+o+"`")}}for(let o in t)qo.call(t,o)&&!1===qo.call(r,o)&&n(r,"Field `"+e+"."+o+"` is missed")}}function Vo(e,t){let r=t.structure,n={type:String,loc:!0},o={type:'"'+e+'"'};for(let t in r){if(!1===qo.call(r,t))continue;let i=[],a=n[t]=Array.isArray(r[t])?r[t].slice():[r[t]];for(let r=0;r<a.length;r++){let n=a[r];if(n===String||n===Boolean)i.push(n.name);else if(null===n)i.push("null");else if("string"==typeof n)i.push("<"+n+">");else{if(!Array.isArray(n))throw new Error("Wrong value `"+n+"` in `"+e+"."+t+"` structure definition");i.push("List")}}o[t]=i.join(" | ")}return{docs:o,check:Ho(e,n)}}var Wo=Ao("inherit | initial | unset"),$o=Ao("inherit | initial | unset | <-ms-legacy-expression>");function Go(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:hn(e[o].syntax,{compact:t}));return n}function Yo(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:hn(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Go(i.descriptors,t,r)};return n}function Jo(e,t,r){return{matched:e,iterations:r,error:t,...Lo}}function Qo(e,t,r,n){let o,i=fo(r,e.syntax);return function(e){for(let t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(i)?Jo(null,new Error("Matching for a tree with var() is not supported")):(n&&(o=Io(i,e.valueCommonSyntax,e)),n&&o.match||(o=Io(i,t.match,e),o.match)?Jo(o.match,null,o.iterations):Jo(null,new gn(o.reason,t.syntax,r,o),o.iterations))}var Ko=class{constructor(e,t,r){if(this.valueCommonSyntax=Wo,this.syntax=t,this.generic=!1,this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||function(e){let t={};if(e.node)for(let r in e.node)if(qo.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Vo(r,n)}return t}(e),e){if(e.types)for(let t in e.types)this.addType_(t,e.types[t]);if(e.generic){this.generic=!0;for(let e in $n)this.addType_(e,$n[e])}if(e.atrules)for(let t in e.atrules)this.addAtrule_(t,e.atrules[t]);if(e.properties)for(let t in e.properties)this.addProperty_(t,e.properties[t])}}checkStructure(e){function t(e,t){n.push({node:e,message:t})}let r=this.structure,n=[];return this.syntax.walk(e,(function(e){r.hasOwnProperty(e.type)?r[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!n.length&&n}createDescriptor(e,t,r,n=null){let o={type:t,name:r},i={type:t,name:r,parent:n,serializable:"string"==typeof e||e&&"string"==typeof e.type,syntax:null,match:null};return"function"==typeof e?i.match=Ao(e,o):("string"==typeof e?Object.defineProperty(i,"syntax",{get:()=>(Object.defineProperty(i,"syntax",{value:co(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Ao(i.syntax,o)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((r,n)=>(r[n]=this.createDescriptor(t.descriptors[n],"AtruleDescriptor",n,e),r)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e),t===$n["-ms-legacy-expression"]&&(this.valueCommonSyntax=$o))}checkAtruleName(e){if(!this.getAtrule(e))return new fn("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e);return!n.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):n.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=kn(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new fn("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new fn("Unknown property",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);return r?Jo(null,r):t?Qo(this,this.getAtrule(e).prelude,t,!1):Jo(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return Jo(null,n);let o=this.getAtrule(e),i=kn(t);return Qo(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return"Declaration"!==e.type?Jo(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(vn(e).custom)return Jo(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(e);return r?Jo(null,r):Qo(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?Qo(this,r,t,!1):Jo(null,new fn("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Qo(this,e,t,!1)):Jo(null,new fn("Bad syntax"))}findValueFragments(e,t,r,n){return Fo(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return Fo(this,e.value,this.matchDeclaration(e),t,r)}findAllFragments(e,t,r){let n=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{n.push.apply(n,this.findDeclarationValueFragments(e,t,r))}}),n}getAtrule(e,t=!0){let r=kn(e);return(r.vendor&&t?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(e,t=!0){let r=this.getAtrule(e,t);return r&&r.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let r=vn(e);return(r.vendor&&t?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(n,o,i,a){if(i.has(o))return i.get(o);i.set(o,!1),null!==a.syntax&&po(a.syntax,(function(a){if("Type"!==a.type&&"Property"!==a.type)return;let s="Type"===a.type?n.types:n.properties,l="Type"===a.type?t:r;(!hasOwnProperty.call(s,a.name)||e(n,a.name,l,s[a.name]))&&i.set(o,!0)}),this)}let t=new Map,r=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let t in this.properties)e(this,t,r,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),r=[...r.keys()].filter((e=>r.get(e))),t.length||r.length?{types:t,properties:r}:null}dump(e,t){return{generic:this.generic,types:Go(this.types,!t,e),properties:Go(this.properties,!t,e),atrules:Yo(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}},{hasOwnProperty:Zo}=Object.prototype,Xo={generic:!0,types:ni,atrules:{prelude:oi,descriptors:oi},properties:ni,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,r){for(let n in r)Zo.call(r,n)&&(ei(t[n])?e(t[n],ti(r[n])):t[n]=ti(r[n]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function ei(e){return e&&e.constructor===Object}function ti(e){return ei(e)?{...e}:e}function ri(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function ni(e,t){if("string"==typeof t)return ri(e,t);let r={...e};for(let n in t)Zo.call(t,n)&&(r[n]=ri(Zo.call(e,n)?e[n]:void 0,t[n]));return r}function oi(e,t){let r=ni(e,t);return!ei(r)||Object.keys(r).length?r:null}function ii(e,t,r){for(let n in r)if(!1!==Zo.call(r,n))if(!0===r[n])n in t&&Zo.call(t,n)&&(e[n]=ti(t[n]));else if(r[n])if("function"==typeof r[n]){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if(ei(r[n])){let o={};for(let t in e[n])o[t]=ii({},e[n][t],r[n]);for(let e in t[n])o[e]=ii(o[e]||{},t[n][e],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce((function(e,t){return e[t]=!0,e}),{});for(let[t,r]of Object.entries(e[n]||{}))o[t]={},r&&ii(o[t],r,i);for(let e in t[n])Zo.call(t[n],e)&&(o[e]||(o[e]={}),t[n]&&t[n][e]&&ii(o[e],t[n][e],i));e[n]=o}return e}var ai=(e,t)=>ii(e,t,Xo);function si(e){let t=Fr(e),r=ln(e),n=Xr(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&!(e.children instanceof Ir)&&(e.children=(new Ir).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof Ir&&(e.children=e.children.toArray())}}),t}}}(r),a={lexer:null,createLexer:e=>new Ko(e,a,a.lexer.structure),tokenize:Rr,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=ai({},e);return si("function"==typeof t?t(r,Object.assign):ai(r,t))}};return a.lexer=new Ko({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var li=e=>si(ai({},e)),ci={};ft(ci,{AnPlusB:()=>ui,Atrule:()=>Ei,AtrulePrelude:()=>Li,AttributeSelector:()=>Ui,Block:()=>Vi,Brackets:()=>ea,CDC:()=>ia,CDO:()=>ua,ClassSelector:()=>fa,Combinator:()=>va,Comment:()=>Sa,Declaration:()=>Ia,DeclarationList:()=>Ba,Dimension:()=>Ga,Function:()=>Za,Hash:()=>os,IdSelector:()=>fs,Identifier:()=>us,MediaFeature:()=>vs,MediaQuery:()=>Ss,MediaQueryList:()=>Is,Nth:()=>Ms,Number:()=>qs,Operator:()=>Ws,Parentheses:()=>Qs,Percentage:()=>tl,PseudoClassSelector:()=>al,PseudoElementSelector:()=>dl,Ratio:()=>bl,Raw:()=>Al,Rule:()=>Il,Selector:()=>Dl,SelectorList:()=>Hl,String:()=>Jl,StyleSheet:()=>nc,TypeSelector:()=>uc,UnicodeRange:()=>gc,Url:()=>Sc,Value:()=>zc,WhiteSpace:()=>Dc});var ui={};ft(ui,{generate:()=>xi,name:()=>ki,parse:()=>wi,structure:()=>vi});var hi=43,di=45,pi=110,mi=!0;function fi(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===hi||n===di)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)Jt(this.charCodeAt(r))||this.error("Integer is expected",r)}function gi(e){return fi.call(this,0,e)}function yi(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case pi:r="N is expected";break;case di:r="HyphenMinus is expected"}this.error(r,this.tokenStart+e)}}function bi(){let e=0,t=0,r=this.tokenType;for(;13===r||25===r;)r=this.lookupType(++e);if(10!==r){if(!this.isDelim(hi,e)&&!this.isDelim(di,e))return null;t=this.isDelim(hi,e)?hi:di;do{r=this.lookupType(++e)}while(13===r||25===r);10!==r&&(this.skip(e),gi.call(this,mi))}return e>0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==hi&&r!==di&&this.error("Number sign is expected")),gi.call(this,0!==t),t===di?"-"+this.consume(10):this.consume(10)}var ki="AnPlusB",vi={a:[String,null],b:[String,null]};function wi(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)gi.call(this,false),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,di))switch(t="-1",yi.call(this,1,pi),this.tokenEnd-this.tokenStart){case 2:this.next(),r=bi.call(this);break;case 3:yi.call(this,2,di),this.next(),this.skipSC(),gi.call(this,mi),r="-"+this.consume(10);break;default:yi.call(this,2,di),fi.call(this,3,mi),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(hi)&&1===this.lookupType(1)){let n=0;switch(t="1",this.isDelim(hi)&&(n=1,this.next()),yi.call(this,0,pi),this.tokenEnd-this.tokenStart){case 1:this.next(),r=bi.call(this);break;case 2:yi.call(this,1,di),this.next(),this.skipSC(),gi.call(this,mi),r="-"+this.consume(10);break;default:yi.call(this,1,di),fi.call(this,2,mi),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===hi||n===di,i=this.tokenStart+o;for(;i<this.tokenEnd&&Jt(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),yi.call(this,i-this.tokenStart,pi),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),r=bi.call(this)):(yi.call(this,i-this.tokenStart+1,di),i+2===this.tokenEnd?(this.next(),this.skipSC(),gi.call(this,mi),r="-"+this.consume(10)):(fi.call(this,i-this.tokenStart+2,mi),this.next(),r=this.substrToCursor(i+1)))}else this.error();return null!==t&&t.charCodeAt(0)===hi&&(t=t.substr(1)),null!==r&&r.charCodeAt(0)===hi&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function xi(e){if(e.a){let t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){let r="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+r)}else this.tokenize(t)}else this.tokenize(e.b)}var Ei={};function Ai(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Si(){for(let e,t=1;e=this.lookupType(t);t++){if(24===e)return!0;if(23===e||3===e)return!1}return!1}ft(Ei,{generate:()=>Ii,name:()=>Ti,parse:()=>_i,structure:()=>Ri,walkContext:()=>Ci});var Ti="Atrule",Ci="atrule",Ri={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function _i(){let e,t,r=this.tokenStart,n=null,o=null;switch(this.eat(3),e=this.substrToCursor(r+1),t=e.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(n=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,e),Ai):Ai.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:o=hasOwnProperty.call(this.atrule,t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(Si.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:e,prelude:n,block:o}}function Ii(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Li={};ft(Li,{generate:()=>Oi,name:()=>Ni,parse:()=>Mi,structure:()=>Pi,walkContext:()=>zi});var Ni="AtrulePrelude",zi="atrulePrelude",Pi={children:[[]]};function Mi(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Oi(e){this.children(e)}var Ui={};ft(Ui,{generate:()=>Hi,name:()=>qi,parse:()=>ji,structure:()=>Bi});function Di(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Fi(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var qi="AttributeSelector",Bi={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function ji(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=Di.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=Fi.call(this),this.skipSC(),n=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:r,value:n,flags:o}}function Hi(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var Vi={};function Wi(e){return this.Raw(e,null,!0)}function $i(){return this.parseWithFallback(this.Rule,Wi)}function Gi(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Yi(){if(17===this.tokenType)return Gi.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Gi);return 17===this.tokenType&&this.next(),e}ft(Vi,{generate:()=>Xi,name:()=>Ji,parse:()=>Zi,structure:()=>Ki,walkContext:()=>Qi});var Ji="Block",Qi="block",Ki={children:[["Atrule","Rule","Declaration"]]};function Zi(e){let t=e?Yi:$i,r=this.tokenStart,n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule,Wi));break;default:n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function Xi(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var ea={};ft(ea,{generate:()=>oa,name:()=>ta,parse:()=>na,structure:()=>ra});var ta="Brackets",ra={children:[[]]};function na(e,t){let r=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}function oa(e){this.token(9,"["),this.children(e),this.token(9,"]")}var ia={};ft(ia,{generate:()=>ca,name:()=>aa,parse:()=>la,structure:()=>sa});var aa="CDC",sa=[];function la(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function ca(){this.token(15,"--\x3e")}var ua={};ft(ua,{generate:()=>ma,name:()=>ha,parse:()=>pa,structure:()=>da});var ha="CDO",da=[];function pa(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function ma(){this.token(14,"\x3c!--")}var fa={};ft(fa,{generate:()=>ka,name:()=>ga,parse:()=>ba,structure:()=>ya});var ga="ClassSelector",ya={name:String};function ba(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function ka(e){this.token(9,"."),this.token(1,e.name)}var va={};ft(va,{generate:()=>Aa,name:()=>wa,parse:()=>Ea,structure:()=>xa});var wa="Combinator",xa={name:String};function Ea(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function Aa(e){this.tokenize(e.name)}var Sa={};ft(Sa,{generate:()=>_a,name:()=>Ta,parse:()=>Ra,structure:()=>Ca});var Ta="Comment",Ca={value:String};function Ra(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function _a(e){this.token(25,"/*"+e.value+"*/")}var Ia={};ft(Ia,{generate:()=>Da,name:()=>Pa,parse:()=>Ua,structure:()=>Oa,walkContext:()=>Ma});function La(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Na(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function za(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Pa="Declaration",Ma="declaration",Oa={important:[Boolean,String],property:String,value:["Value","Raw"]};function Ua(){let e,t=this.tokenStart,r=this.tokenIndex,n=Fa.call(this),o=xn(n),i=o?this.parseCustomProperty:this.parseValue,a=o?Na:La,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(za,a):a.call(this,this.tokenIndex),o&&"Value"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(s=qa.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(r)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:s,property:n,value:e}}function Da(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Fa(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function qa(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var Ba={};function ja(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}ft(Ba,{generate:()=>$a,name:()=>Ha,parse:()=>Wa,structure:()=>Va});var Ha="DeclarationList",Va={children:[["Declaration"]]};function Wa(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,ja))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function $a(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var Ga={};ft(Ga,{generate:()=>Ka,name:()=>Ya,parse:()=>Qa,structure:()=>Ja});var Ya="Dimension",Ja={value:String,unit:String};function Qa(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Ka(e){this.token(12,e.value+e.unit)}var Za={};ft(Za,{generate:()=>ns,name:()=>Xa,parse:()=>rs,structure:()=>ts,walkContext:()=>es});var Xa="Function",es="function",ts={name:String,children:[[]]};function rs(e,t){let r,n=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return r=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:o,children:r}}function ns(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var os={};ft(os,{generate:()=>cs,name:()=>as,parse:()=>ls,structure:()=>ss,xxx:()=>is});var is="XXX",as="Hash",ss={value:String};function ls(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function cs(e){this.token(4,"#"+e.value)}var us={};ft(us,{generate:()=>ms,name:()=>hs,parse:()=>ps,structure:()=>ds});var hs="Identifier",ds={name:String};function ps(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function ms(e){this.token(1,e.name)}var fs={};ft(fs,{generate:()=>ks,name:()=>gs,parse:()=>bs,structure:()=>ys});var gs="IdSelector",ys={name:String};function bs(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function ks(e){this.token(9,"#"+e.name)}var vs={};ft(vs,{generate:()=>As,name:()=>ws,parse:()=>Es,structure:()=>xs});var ws="MediaFeature",xs={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Es(){let e,t=this.tokenStart,r=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:r}}function As(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Ss={};ft(Ss,{generate:()=>_s,name:()=>Ts,parse:()=>Rs,structure:()=>Cs});var Ts="MediaQuery",Cs={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Rs(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function _s(e){this.children(e)}var Is={};ft(Is,{generate:()=>Ps,name:()=>Ls,parse:()=>zs,structure:()=>Ns});var Ls="MediaQueryList",Ns={children:[["MediaQuery"]]};function zs(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Ps(e){this.children(e,(()=>this.token(18,",")))}var Ms={};ft(Ms,{generate:()=>Fs,name:()=>Os,parse:()=>Ds,structure:()=>Us});var Os="Nth",Us={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Ds(){this.skipSC();let e,t=this.tokenStart,r=t,n=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),r=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),r=this.tokenStart),{type:"Nth",loc:this.getLocation(t,r),nth:e,selector:n}}function Fs(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var qs={};ft(qs,{generate:()=>Vs,name:()=>Bs,parse:()=>Hs,structure:()=>js});var Bs="Number",js={value:String};function Hs(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Vs(e){this.token(10,e.value)}var Ws={};ft(Ws,{generate:()=>Js,name:()=>$s,parse:()=>Ys,structure:()=>Gs});var $s="Operator",Gs={value:String};function Ys(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Js(e){this.tokenize(e.value)}var Qs={};ft(Qs,{generate:()=>el,name:()=>Ks,parse:()=>Xs,structure:()=>Zs});var Ks="Parentheses",Zs={children:[[]]};function Xs(e,t){let r=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function el(e){this.token(21,"("),this.children(e),this.token(22,")")}var tl={};ft(tl,{generate:()=>il,name:()=>rl,parse:()=>ol,structure:()=>nl});var rl="Percentage",nl={value:String};function ol(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function il(e){this.token(11,e.value+"%")}var al={};ft(al,{generate:()=>hl,name:()=>sl,parse:()=>ul,structure:()=>cl,walkContext:()=>ll});var sl="PseudoClassSelector",ll="function",cl={name:String,children:[["Raw"],null]};function ul(){let e,t,r=this.tokenStart,n=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function hl(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var dl={};ft(dl,{generate:()=>yl,name:()=>pl,parse:()=>gl,structure:()=>fl,walkContext:()=>ml});var pl="PseudoElementSelector",ml="function",fl={name:String,children:[["Raw"],null]};function gl(){let e,t,r=this.tokenStart,n=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function yl(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var bl={};ft(bl,{generate:()=>El,name:()=>vl,parse:()=>xl,structure:()=>wl});function kl(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);!Jt(r)&&46!==r&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var vl="Ratio",wl={left:String,right:String};function xl(){let e,t=this.tokenStart,r=kl.call(this);return this.skipSC(),this.eatDelim(47),e=kl.call(this),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:r,right:e}}function El(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Al={};function Sl(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}ft(Al,{generate:()=>_l,name:()=>Tl,parse:()=>Rl,structure:()=>Cl});var Tl="Raw",Cl={value:String};function Rl(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?Sl.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,n),value:this.substring(o,n)}}function _l(e){this.tokenize(e.value)}var Il={};function Ll(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Nl(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}ft(Il,{generate:()=>Ul,name:()=>zl,parse:()=>Ol,structure:()=>Ml,walkContext:()=>Pl});var zl="Rule",Pl="rule",Ml={prelude:["SelectorList","Raw"],block:["Block"]};function Ol(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Nl,Ll):Ll.call(this,r),t=this.Block(!0),{type:"Rule",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function Ul(e){this.node(e.prelude),this.node(e.block)}var Dl={};ft(Dl,{generate:()=>jl,name:()=>Fl,parse:()=>Bl,structure:()=>ql});var Fl="Selector",ql={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Bl(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function jl(e){this.children(e)}var Hl={};ft(Hl,{generate:()=>Yl,name:()=>Vl,parse:()=>Gl,structure:()=>$l,walkContext:()=>Wl});var Vl="SelectorList",Wl="selector",$l={children:[["Selector","Raw"]]};function Gl(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Yl(e){this.children(e,(()=>this.token(18,",")))}var Jl={};ft(Jl,{generate:()=>rc,name:()=>Xl,parse:()=>tc,structure:()=>ec});var Ql={};ft(Ql,{decode:()=>Kl,encode:()=>Zl});function Kl(e){let t=e.length,r=e.charCodeAt(0),n=34===r||39===r?1:0,o=1===n&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,i="";for(let r=n;r<=o;r++){let n=e.charCodeAt(r);if(92===n){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),nr(92,n)){let t=r-1,n=gr(e,t);r=n-1,i+=vr(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function Zl(e,t){let r=t?"'":'"',n=t?39:34,o="",i=!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);0!==r?r<=31||127===r?(o+="\\"+r.toString(16),i=!0):r===n||92===r?(o+="\\"+e.charAt(t),i=!1):(i&&(Qt(r)||rr(r))&&(o+=" "),o+=e.charAt(t),i=!1):o+="�"}return r+o+r}var Xl="String",ec={value:String};function tc(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Kl(this.consume(5))}}function rc(e){this.token(5,Zl(e.value))}var nc={};ft(nc,{generate:()=>cc,name:()=>ic,parse:()=>lc,structure:()=>sc,walkContext:()=>ac});function oc(e){return this.Raw(e,null,!1)}var ic="StyleSheet",ac="stylesheet",sc={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function lc(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(33!==this.charCodeAt(this.tokenStart+2)){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,oc);break;default:e=this.parseWithFallback(this.Rule,oc)}r.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:r}}function cc(e){this.children(e)}var uc={};ft(uc,{generate:()=>fc,name:()=>dc,parse:()=>mc,structure:()=>pc});function hc(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}var dc="TypeSelector",pc={name:String};function mc(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),hc.call(this)):(hc.call(this),this.isDelim(124)&&(this.next(),hc.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function fc(e){this.tokenize(e.name)}var gc={};ft(gc,{generate:()=>Ac,name:()=>wc,parse:()=>Ec,structure:()=>xc});function yc(e,t){let r=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){let o=this.charCodeAt(n);if(45===o&&t&&0!==r)return yc.call(this,e+r+1,!1),-1;Qt(o)||this.error(t&&0!==r?"Hyphen minus"+(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.next(),r}function bc(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function kc(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function vc(){let e=0;switch(this.tokenType){case 10:if(e=yc.call(this,1,!0),this.isDelim(63)){bc.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){kc.call(this,45),yc.call(this,1,!1);break}break;case 12:e=yc.call(this,1,!0),e>0&&bc.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){e=yc.call(this,0,!0),e>0&&bc.call(this,6-e);break}if(this.isDelim(63)){this.next(),bc.call(this,5);break}this.error("Hex digit or question mark is expected")}}var wc="UnicodeRange",xc={value:String};function Ec(){let e=this.tokenStart;return this.eatIdent("u"),vc.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Ac(e){this.tokenize(e.value)}var Sc={};ft(Sc,{generate:()=>Nc,name:()=>_c,parse:()=>Lc,structure:()=>Ic});var Tc={};ft(Tc,{decode:()=>Cc,encode:()=>Rc});function Cc(e){let t=e.length,r=4,n=41===e.charCodeAt(t-1)?t-2:t-1,o="";for(;r<n&&rr(e.charCodeAt(r));)r++;for(;r<n&&rr(e.charCodeAt(n));)n--;for(let i=r;i<=n;i++){let r=e.charCodeAt(i);if(92===r){if(i===n){i!==t-1&&(o=e.substr(i+1));break}if(r=e.charCodeAt(++i),nr(92,r)){let t=i-1,r=gr(e,t);i=r-1,o+=vr(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(i+1)&&i++}else o+=e[i]}return o}function Rc(e){let t="",r=!1;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);0!==o?o<=31||127===o?(t+="\\"+o.toString(16),r=!0):32===o||92===o||34===o||39===o||40===o||41===o?(t+="\\"+e.charAt(n),r=!1):(r&&Qt(o)&&(t+=" "),t+=e.charAt(n),r=!1):t+="�"}return"url("+t+")"}var _c="Url",Ic={value:String};function Lc(){let e,t=this.tokenStart;switch(this.tokenType){case 7:e=Cc(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),e=Kl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}function Nc(e){this.token(7,Rc(e.value))}var zc={};ft(zc,{generate:()=>Uc,name:()=>Pc,parse:()=>Oc,structure:()=>Mc});var Pc="Value",Mc={children:[[]]};function Oc(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function Uc(e){this.children(e)}var Dc={};ft(Dc,{generate:()=>Hc,name:()=>qc,parse:()=>jc,structure:()=>Bc});var Fc=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),qc="WhiteSpace",Bc={value:String};function jc(){return this.eat(13),Fc}function Hc(e){this.token(13,e.value)}var Vc={generic:!0,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()>|<hwb()>|<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>|<counter>|<quote>|<target>|<leader()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <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( [<integer [1,∞]>] , [<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> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )",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>||type( <string> )]","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>","layer()":"layer( <layer-name> )","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] )","name-repeat":"repeat( [<positive-integer>|auto-fill] , <line-names>+ )","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>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","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>||<easing-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>||<easing-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>","easing-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( [<integer [1,∞]>] , [<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>","visual-box":"content-box|padding-box|border-box","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","layer-name":"<ident> ['.' <ident>]*","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",ratio:"<integer> / <integer>",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb","single-animation-timeline":"auto|none|<timeline-name>","timeline-name":"<custom-ident>|<string>",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":"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","accent-color":"auto|<color>","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":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",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>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","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>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?]+|none","counter-set":"[<counter-name> <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|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<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||small-caps]","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","forced-color-adjust":"auto|none",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|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",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'>","input-security":"auto|none",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":"<image>|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|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-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-clip-margin":"<visual-box>||<length [0,∞]>","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":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","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":"<easing-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|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","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:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","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]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-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>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},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>"}}},node:ci},Wc={};ft(Wc,{AtrulePrelude:()=>Gc,Selector:()=>Yc,Value:()=>Qc});function $c(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(47===e||42===e||43===e||45===e)return this.Operator();35===e&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var Gc={getNode:$c};var Yc={onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}};function Jc(e){return null!==e&&"Operator"===e.type&&("-"===e.value[e.value.length-1]||"+"===e.value[e.value.length-1])}var Qc={getNode:$c,onWhiteSpace:function(e,t){Jc(e)&&(e.value=" "+e.value),Jc(t.last)&&(t.last.value+=" ")},expression:function(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))},var:function(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),18===this.tokenType){e.push(this.Operator());let t=this.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if("Value"===r.type&&r.children.isEmpty)for(let e=t-this.tokenIndex;e<=0;e++)if(13===this.lookupType(e)){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(r)}return e}},Kc={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(1===this.lookupNonWSType(0)||21===this.lookupNonWSType(0))&&e.push(this.MediaQueryList()),e},block:null}};function Zc(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function Xc(){return this.skipSC(),1===this.tokenType&&16===this.lookupNonWSType(1)?this.createSingleNodeList(this.Declaration()):eu.call(this)}function eu(){let e,t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:e=this.Function(Zc,this.scope.AtrulePrelude);break;case 1:e=this.Identifier();break;case 21:e=this.Parentheses(Xc,this.scope.AtrulePrelude);break;default:break e}t.push(e)}return t}var tu={parse:{prelude(){let e=eu.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block(){return this.Block(!1)}}},ru={"font-face":{parse:{prelude:null,block(){return this.Block(!0)}}},import:Kc,media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(){return this.Block(!1)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},supports:tu},nu={parse(){return this.createSingleNodeList(this.SelectorList())}},ou={parse(){return this.createSingleNodeList(this.Identifier())}},iu={parse(){return this.createSingleNodeList(this.Nth())}},au={dir:ou,has:nu,lang:ou,matches:nu,is:nu,"-moz-any":nu,"-webkit-any":nu,where:nu,not:nu,"nth-child":iu,"nth-last-child":iu,"nth-last-of-type":iu,"nth-of-type":iu,slotted:{parse(){return this.createSingleNodeList(this.Selector())}}},su={};ft(su,{AnPlusB:()=>wi,Atrule:()=>_i,AtrulePrelude:()=>Mi,AttributeSelector:()=>ji,Block:()=>Zi,Brackets:()=>na,CDC:()=>la,CDO:()=>pa,ClassSelector:()=>ba,Combinator:()=>Ea,Comment:()=>Ra,Declaration:()=>Ua,DeclarationList:()=>Wa,Dimension:()=>Qa,Function:()=>rs,Hash:()=>ls,IdSelector:()=>bs,Identifier:()=>ps,MediaFeature:()=>Es,MediaQuery:()=>Rs,MediaQueryList:()=>zs,Nth:()=>Ds,Number:()=>Hs,Operator:()=>Ys,Parentheses:()=>Xs,Percentage:()=>ol,PseudoClassSelector:()=>ul,PseudoElementSelector:()=>gl,Ratio:()=>xl,Raw:()=>Rl,Rule:()=>Ol,Selector:()=>Bl,SelectorList:()=>Gl,String:()=>tc,StyleSheet:()=>lc,TypeSelector:()=>mc,UnicodeRange:()=>Ec,Url:()=>Lc,Value:()=>Oc,WhiteSpace:()=>jc});var lu={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:Wc,atrule:ru,pseudo:au,node:su},cu=li({...Vc,...lu,...{node:ci}});var uu={};ft(uu,{decode:()=>hu,encode:()=>du});function hu(e){let t=e.length-1,r="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(92===o){if(n===t)break;if(o=e.charCodeAt(++n),nr(92,o)){let t=n-1,o=gr(e,t);n=o-1,r+=vr(e.substring(t+1,o))}else 13===o&&10===e.charCodeAt(n+1)&&n++}else r+=e[n]}return r}function du(e){let t="";if(1===e.length&&45===e.charCodeAt(0))return"\\-";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);0!==n?n<=31||127===n||n>=48&&n<=57&&(0===r||1===r&&45===e.charCodeAt(0))?t+="\\"+n.toString(16)+" ":Xt(n)?t+=e.charAt(r):t+="\\"+e.charAt(r):t+="�"}return t}var{tokenize:pu,parse:mu,generate:fu,lexer:gu,createLexer:yu,walk:bu,find:ku,findLast:vu,findAll:wu,toPlainObject:xu,fromPlainObject:Eu,fork:Au}=cu,Su=Object.freeze({__proto__:null,Lexer:Ko,List:Ir,TokenStream:Cr,clone:function e(t){let r={};for(let n in t){let o=t[n];o&&(Array.isArray(o)||o instanceof Ir?o=o.map(e):o.constructor===Object&&(o=e(o))),r[n]=o}return r},createLexer:yu,createSyntax:li,definitionSyntax:Gn,find:ku,findAll:wu,findLast:vu,fork:Au,fromPlainObject:Eu,generate:fu,ident:uu,isCustomProperty:xn,keyword:kn,lexer:gu,parse:mu,property:vn,string:Ql,toPlainObject:xu,tokenNames:wr,tokenTypes:xt,tokenize:pu,url:Tc,vendorPrefix:wn,version:"2.1.0",walk:bu});const Tu=/^'(.*?)'$/,Cu=/^"(.*?)"$/,Ru=["inherit","initial","unset"],_u=["caption","icon","menu","message-box","small-caption","status-bar"],Iu=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],Lu=["normal","italic","oblique"],Nu=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"];function zu(e){const t=fu(e);if(-1!==_u.indexOf(t))return{system:t};const r=e.children,n={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let o=!1;for(let e=r.head;e;e=e.next){const t=fu(e.data);if("normal"!==t&&-1===Ru.indexOf(t))if(-1===Iu.indexOf(t))if(-1===Lu.indexOf(t))if(-1===Nu.indexOf(t)){if("Dimension"==e.data.type){if(n.size=fu(e.data),e=e.next,e&&"Operator"==e.data.type&&"/"==e.data.value&&e.next?(e=e.next,n.lineHeight=fu(e.data),e=e.next):"Operator"==r.head.data.type&&"/"==r.head.data.value&&r.head.next&&(n.lineHeight=fu(r.head.next.data),e=r.head.next.next),!e)throw Pu("Missing required font-family.");for(n.family=[];e;e=e.next){for(;e&&"Operator"==e.data.type&&","==e.data.value;)e=e.next;e&&n.family.push(Mu(fu(e.data)))}return n}if("normal"!==n.variant)throw Pu("Unknown or unsupported font token: "+n.variant);o||(n.variant=t)}else{if(o)continue;n.stretch=t}else{if(o)continue;n.style=t}else{if(o)continue;n.weight=t}else["style","variant","weight","stretch"].forEach((e=>{n[e]=t})),o=!0}throw Pu("Missing required font-size.")}function Pu(e){return new Error("[parse-css-font] "+e)}function Mu(e){return(e=e.match(Tu)?e.replace(Tu,"$1"):e.replace(Cu,"$1")).trim()}var Ou=Object.freeze({__proto__:null,parse:zu});function Uu(e,t=0){const r=[{mode:"normal",character:null}],n=[];let o=0,i="",a=null,s=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===r[o].isCalculationEnabled?(r.push({mode:"string",isCalculationEnabled:!1,character:t}),o++):"string"===r[o].mode&&r[o].character===t&&"\\"!==c[e-1]&&(r.pop(),o--)),"{"===t?(r.push({mode:"interpolation",isCalculationEnabled:!0}),o++):"}"===t&&(r.pop(),o--),"normal"===r[o].mode&&":"===t){const t=c.substring(e+1);s={type:"value",before:/^(\s*)/.exec(t)[1],after:/(\s*)$/.exec(t)[1],value:t.trim()},s.sourceIndex=s.before.length+e+1+l,a={type:"colon",sourceIndex:e+l,after:s.before,value:":"};break}i+=t}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+l,n.push(i),null!==a&&(a.before=i.after,n.push(a)),null!==s&&n.push(s),n}function Du(e,t=0){const r=[];let n,o=0,i=!1;n={before:"",after:"",value:""};for(let a=0;a<e.length;a++){const s=e[a];i?(n.value+=s,"{"!==s&&"("!==s||o++,")"!==s&&"}"!==s||o--):-1!==s.search(/\s/)?n.before+=s:("("===s&&(n.type="media-feature-expression",o++),n.value=s,n.sourceIndex=t+a,i=!0),!i||0!==o||")"!==s&&a!==e.length-1&&-1===e[a+1].search(/\s/)||(-1!==["not","only","and"].indexOf(n.value)&&(n.type="keyword"),"media-feature-expression"===n.type&&(n.nodes=Uu(n.value,n.sourceIndex)),r.push(Array.isArray(n.nodes)?new qu(n):new Bu(n)),n={before:"",after:"",value:""},i=!1)}for(let e=0;e<r.length;e++)if(n=r[e],e>0&&(r[e-1].after=n.before),void 0===n.type){if(e>0){if("media-feature-expression"===r[e-1].type){n.type="keyword";continue}if("not"===r[e-1].value||"only"===r[e-1].value){n.type="media-type";continue}if("and"===r[e-1].value){n.type="media-feature-expression";continue}"media-type"===r[e-1].type&&(r[e+1]?n.type="media-feature-expression"===r[e+1].type?"keyword":"media-feature-expression":n.type="media-feature-expression")}if(0===e){if(!r[e+1]){n.type="media-type";continue}if(r[e+1]&&("media-feature-expression"===r[e+1].type||"keyword"===r[e+1].type)){n.type="media-type";continue}if(r[e+2]){if("media-feature-expression"===r[e+2].type){n.type="media-type",r[e+1].type="keyword";continue}if("keyword"===r[e+2].type){n.type="keyword",r[e+1].type="media-type";continue}}if(r[e+3]&&"media-feature-expression"===r[e+3].type){n.type="keyword",r[e+1].type="media-type",r[e+2].type="keyword";continue}}}return r}function Fu(e){const t=[];let r=0,n=0;const o=/^(\s*)url\s*\(/.exec(e);if(null!==o){let n=o[0].length,i=1;for(;i>0;){const t=e[n];"("===t&&i++,")"===t&&i--,n++}t.unshift(new Bu({type:"url",value:e.substring(0,n).trim(),sourceIndex:o[1].length,before:o[1],after:/^(\s*)/.exec(e.substring(n))[1]})),r=n}for(let o=r;o<e.length;o++){const i=e[o];if("("===i&&n++,")"===i&&n--,0===n&&","===i){const n=e.substring(r,o),i=/^(\s*)/.exec(n)[1];t.push(new qu({type:"media-query",value:n.trim(),sourceIndex:r+i.length,nodes:Du(n,r),before:i,after:/(\s*)$/.exec(n)[1]})),r=o+1}}const i=e.substring(r),a=/^(\s*)/.exec(i)[1];return t.push(new qu({type:"media-query",value:i.trim(),sourceIndex:r+a.length,nodes:Du(i,r),before:a,after:/(\s*)$/.exec(i)[1]})),t}function qu(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 Bu(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}qu.prototype=Object.create(Bu.prototype),qu.constructor=Bu,qu.prototype.walk=function(e,t){const r="string"==typeof e||e instanceof RegExp,n=r?t:e,o="string"==typeof e?new RegExp(e):e;for(let i=0;i<this.nodes.length;i++){const a=this.nodes[i];if((!r||o.test(a.type))&&n&&!1===n(a,i,this.nodes))return!1;if(a.nodes&&!1===a.walk(e,t))return!1}return!0},qu.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 ju=Object.freeze({__proto__:null,parseMediaList:Fu});const Hu="___PRESERVED_TOKEN_",Vu={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},Wu=/url\(\s*(["']?)data:/g,$u=/\s+/g,Gu=/\n/g;const Yu=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const Ju=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Qu=/(^\s|\s$)/g;const Ku=/"([^\\"]|\\.|\\)*"/g,Zu=/'([^\\']|\\.|\\)*'/g,Xu=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,eh=/\r\n/g,th=/[\r\n]/g,rh=/@variables\s*\{\s*([^}]+)\s*\}/g,nh=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,oh=/var\s*\(\s*([^)]+)\s*\)/g,ih=/calc\(([^;}]*)\)/g,ah=/(^\s*|\s*$)/g,sh=/\( /g,lh=/ \)/g,ch=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,uh=/(^|\})(([^{:])+:)+([^{]*{)/g,hh=/\s+([!{;:>+()\],])/g,dh=/([^\\])\s+([}])/g,ph=/!important/g,mh=/___PSEUDOCLASSCOLON___/g,fh=/:/g,gh=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,yh=/(^|\D)0?\.?0(m?s)/gi,bh=/\s*(flex|flex-basis):\s*([^;}]+)/gi,kh=/\s+/,vh=/(hsla?)\(([^)]+)\)/g,wh=/(^\s+|\s+$)/g,xh=/:first-(line|letter)(\{|,)/gi,Eh=/^(.*)(@charset)( "[^"]*";)/gi,Ah=/^((\s*)(@charset)( [^;]+;\s*))+/gi,Sh=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,Th=/:(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,Ch=/^(.*)(@charset "[^"]*";)/g,Rh=/^(\s*@charset [^;]+;\s*)+/g,_h=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,Ih=/([:,( ]\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,Lh=/\s*\/\*/g,Nh=/\*\/\s*/g,zh=/\band\(/gi,Ph=/([^:])not\(/gi,Mh=/\bor\(/gi,Oh=/([!{}:;>+([,])\s+/g,Uh=/;+\}/g,Dh=/([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,Fh=/:0 0 0 0(;|\})/g,qh=/:0 0 0(;|\})/g,Bh=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,jh=/(:|\s)0+\.(\d+)/g,Hh=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,Vh=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,Wh=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,$h=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,Gh=/___QUERY_FRACTION___/g,Yh=/;;+/g,Jh=/(:|\s)(#f00)(;|})/g,Qh=/___PRESERVED_NEWLINE___/g,Kh=/(:|\s)(#000080)(;|})/g,Zh=/(:|\s)(#808080)(;|})/g,Xh=/(:|\s)(#808000)(;|})/g,ed=/(:|\s)(#800080)(;|})/g,td=/(:|\s)(#c0c0c0)(;|})/g,rd=/(:|\s)(#008080)(;|})/g,nd=/(:|\s)(#ffa500)(;|})/g,od=/(:|\s)(#800000)(;|})/g;function id(e="",t=Vu){const r=[],n=[];let o;const i=e;function a(t){e=e.replace(t,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,n=r.length;t<n;t+=1)e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+t+"___",r[t]);return e=e.replace(Xu,"alpha(opacity="),n.push(e),t+Hu+(n.length-1)+"___"+t}))}e=function(e,t){const r=Wu,n=e.length-1,o=[];let i,a=0;for(;null!==(i=r.exec(e));){const s=i.index+4;let l=i[1];0===l.length&&(l=")");let c=!1,u=r.lastIndex-1;for(;!1===c&&u+1<=n&&-1!=u;)u=e.indexOf(l,u+1),u>0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(o.push(e.substring(a,i.index)),c){let r=e.substring(s,u);const n=r.split(",");n.length>1&&";base64"==n[0].slice(-7)?r=r.replace($u,""):(r=r.replace(Gu," "),r=r.replace($u," "),r=r.replace(wh,"")),t.push(r);const i="url(___PRESERVED_TOKEN_"+(t.length-1)+"___)";o.push(i),a=u+1}else o.push(e.substring(i.index,r.lastIndex)),a=r.lastIndex}return o.push(e.substring(a)),o.join("")}(e,n),e=function(e,t){const r=[];let n,o=0;for(;;){const i=e.indexOf("/*",o);if(!(i>-1))break;if(n=e.indexOf("*/",i+2),!(n>-1)){n=-2;break}t.push(e.slice(i+2,n)),r.push(e.slice(o,i)),r.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),o=n+2}return r.push(e.slice(n+2)),r.join("")}(e,r),a(Ku),a(Zu);for(let o=0,i=r.length;o<i;o+=1){const i=r[o],a="___PRESERVE_CANDIDATE_COMMENT_"+o+"___";if("!"!==i.charAt(0))if("\\"!==i.charAt(i.length-1)){if(0===i.length){const t=e.indexOf(a);t>2&&">"===e.charAt(t-3)&&(n.push(""),e=e.replace(a,Hu+(n.length-1)+"___"))}e=e.replace(`/*${a}*/`,"")}else n.push("\\"),e=e.replace(a,Hu+(n.length-1)+"___"),o+=1,n.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+o+"___",Hu+(n.length-1)+"___");else t.cuteComments?n.push(i.substring(1).replace(eh,"\n")):t.uglyComments?n.push(i.substring(1).replace(th,"")):n.push(i),e=e.replace(a,Hu+(n.length-1)+"___")}if(t.expandVars){const t={};o=rh,e=e.replace(o,((e,r)=>(o=nh,r.replace(o,((e,r,n)=>(r&&n&&(t[r]=n),""))),""))),o=oh,e=e.replace(o,((e,r)=>t[r]||"none"))}if(e=e.replace($u," "),o=ih,e=e.replace(o,((e,t)=>(n.push("calc("+t.replace(ah,"").replace(sh,"(").replace(lh,")")+")"),Hu+(n.length-1)+"___"))),o=ch,e=e.replace(o,((e,t)=>(n.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(n.length-1)+"___);"))),o=uh,e=(e=(e=(e=(e=e.replace(o,(e=>e.replace(fh,"___PSEUDOCLASSCOLON___")))).replace(hh,"$1")).replace(dh,"$1$2")).replace(ph," !important")).replace(mh,":"),o=gh,e=e.replace(o,((e,t,r)=>t+":"+(r=r.replace(yh,((e,t,r)=>(n.push("0"+r),t+Hu+(n.length-1)+"___")))))),o=bh,e=function(e,t){const r=Ju;let n,o=0;const i=(e,r)=>{"0"===(e=e.replace(Qu,"")).charAt(0)&&(t.push(e),n[r]=Hu+(t.length-1)+"___")};for(;;){let t=0;n="";let a=e.slice(o).search(r);if(a<0)break;o+=a,a=o;const s=e.length,l=[];for(;o<s;++o){const r=e.charAt(o);if("{"===r)0===t?l.push(n.replace(Qu,"")):1===t&&(n=n.split(","),n.forEach(i),l.push(n.join(",").replace(Qu,""))),n="",t+=1;else if("}"===r){if(2===t)l.push("{"+n.replace(Qu,"")+"}"),n="";else if(1===t){e=e.slice(0,a)+l.shift()+"{"+l.join("")+e.slice(o);break}t-=1}if(t<0)break;"{"!==r&&"}"!==r&&(n+=r)}}return e}(e=(e=e.replace(o,((e,t,r)=>{let o=r.split(kh);return n.push(o.pop()),o.push(Hu+(n.length-1)+"___"),o=o.join(" "),`${t}:${o}`}))).replace(vh,((e,t,r)=>{const o=[];return r.split(",").forEach((e=>{"0%"===(e=e.replace(wh,""))?(n.push("0%"),o.push(Hu+(n.length-1)+"___")):o.push(e)})),t+"("+o.join(",")+")"})),n),e=e.replace(xh,((e,t,r)=>":first-"+t.toLowerCase()+" "+r)),e=t.cuteComments?(e=e.replace(Lh,"___PRESERVED_NEWLINE___/*")).replace(Nh,"*/___PRESERVED_NEWLINE___"):e.replace(Nh,"*/"),o=Eh,e=e.replace(o,((e,t,r,n)=>r.toLowerCase()+n+t)),o=Ah,e=e.replace(o,((e,t,r,n,o)=>r+n.toLowerCase()+o)),o=Sh,e=e.replace(o,((e,t)=>"@"+t.toLowerCase())),o=Th,e=(e=(e=e.replace(o,((e,t)=>":"+t.toLowerCase()))).replace(Ch,"$2$1")).replace(Rh,"$1"),o=_h,e=e.replace(o,((e,t)=>":"+t.toLowerCase()+"(")),o=Ih,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(o,((e,t,r)=>t+r.toLowerCase()))).replace(zh,"and (")).replace(Ph,"$1not (")).replace(Mh,"or (")).replace(Oh,"$1")).replace(Uh,"}")).replace(Dh,"$1$2")).replace(Fh,":0$1")).replace(qh,":0$1"),o=Bh,e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0 0"+r))).replace(jh,"$1.$2"),o=Hh,e=function(e){const t=Yu,r=[];let n,o=0;for(;null!==(n=t.exec(e));)r.push(e.substring(o,n.index)),n[1]?r.push(n[1]+"#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7])):n[2].toLowerCase()==n[3].toLowerCase()&&n[4].toLowerCase()==n[5].toLowerCase()&&n[6].toLowerCase()==n[7].toLowerCase()?r.push("#"+(n[3]+n[5]+n[7]).toLowerCase()):r.push("#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7]).toLowerCase()),o=t.lastIndex=t.lastIndex-n[8].length;return r.push(e.substring(o)),r.join("")}(e=e.replace(o,((e,t)=>{const r=t.split(",");let n="#";for(let e=0;e<r.length;e+=1){let t=parseInt(r[e],10);t<16&&(n+="0"),t>255&&(t=255),n+=t.toString(16)}return n}))),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(Jh,"$1red$3")).replace(Kh,"$1navy$3")).replace(Zh,"$1gray$3")).replace(Xh,"$1olive$3")).replace(ed,"$1purple$3")).replace(td,"$1silver$3")).replace(rd,"$1teal$3")).replace(nd,"$1orange$3")).replace(od,"$1maroon$3"),o=Vh,e=(e=(e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0"+r))).replace(Wh,"alpha(opacity=")).replace($h,"($1:$2___QUERY_FRACTION___$3)")).replace(Gh,"/"),t.maxLineLen>0){const r=[];let n=[];for(let o=0,i=e.length;o<i;o+=1){const i=e.charAt(o);n.push(i),"}"===i&&n.length>t.maxLineLen&&(r.push(n.join("")),n=[])}n.length&&r.push(n.join("")),e=r.join("\n")}if(e=(e=e.replace(Yh,";")).replace(ah,""),n.length>1e3)return i;for(let t=n.length-1;t>=0;t--)e=e.replace(Hu+t+"___",n[t],"g");return e=e.replace(Qh,"\n")}var ad=Object.freeze({__proto__:null,defaultOptions:Vu,processString:id});function sd(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function r(t){let r;const n=t.exec(e.substring(f));if(n)return r=n[0],f+=r.length,r}const n=e.length,o=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,a=/^[^ \t\n\r\u000c]+/,s=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;let u,h,d,p,m,f=0;const g=[];for(;;){if(r(i),f>=n)return g;u=r(a),h=[],","===u.slice(-1)?(u=u.replace(s,""),b()):y()}function y(){for(r(o),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,r,n,o,i,a,s,d,p,m=!1;const f={};for(o=0;o<h.length;o++)i=h[o],a=i[i.length-1],s=i.substring(0,i.length-1),d=parseInt(s,10),p=parseFloat(s),l.test(s)&&"w"===a?((t||r)&&(m=!0),0===d?m=!0:t=d):c.test(s)&&"x"===a?((t||r||n)&&(m=!0),p<0?m=!0:r=p):l.test(s)&&"h"===a?((n||r)&&(m=!0),0===d?m=!0:n=d):m=!0;m?console&&console.log&&console.log('Invalid srcset descriptor found in "'+e+'" at "'+i+'".'):(f.url=u,t&&(f.w=t),r&&(f.d=r),n&&(f.h=n),g.push(f))}}var ld=Object.freeze({__proto__:null,process:sd});let cd,ud,hd,dd;cd={},cd.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),cd.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),cd.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,cd.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),cd.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),cd.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),cd.collectAnHTTPQuotedString=(e,t)=>{let r="";for(t++;;){for(;t<e.length&&'"'!==e[t]&&"\\"!==e[t];)r+=e[t],++t;if(t>=e.length)break;const n=e[t];if(++t,"\\"!==n)break;if(t>=e.length){r+="\\";break}r+=e[t],++t}return[r,t]};{const{solelyContainsHTTPTokenCodePoints:e}=cd;hd=t=>{let r=`${t.type}/${t.subtype}`;if(0===t.parameters.size)return r;for(let[n,o]of t.parameters)r+=";",r+=n,r+="=",e(o)&&0!==o.length||(o=o.replace(/(["\\])/g,"\\$1"),o=`"${o}"`),r+=o;return r}}{const{removeLeadingAndTrailingHTTPWhitespace:e,removeTrailingHTTPWhitespace:t,isHTTPWhitespaceChar:r,solelyContainsHTTPTokenCodePoints:n,soleyContainsHTTPQuotedStringTokenCodePoints:o,asciiLowercase:i,collectAnHTTPQuotedString:a}=cd;ud=s=>{s=e(s);let l=0,c="";for(;l<s.length&&"/"!==s[l];)c+=s[l],++l;if(0===c.length||!n(c))return null;if(l>=s.length)return null;++l;let u="";for(;l<s.length&&";"!==s[l];)u+=s[l],++l;if(u=t(u),0===u.length||!n(u))return null;const h={type:i(c),subtype:i(u),parameters:new Map};for(;l<s.length;){for(++l;r(s[l]);)++l;let e="";for(;l<s.length&&";"!==s[l]&&"="!==s[l];)e+=s[l],++l;if(e=i(e),l<s.length){if(";"===s[l])continue;++l}let c=null;if('"'===s[l])for([c,l]=a(s,l);l<s.length&&";"!==s[l];)++l;else{for(c="";l<s.length&&";"!==s[l];)c+=s[l],++l;if(c=t(c),""===c)continue}e.length>0&&n(e)&&o(c)&&!h.parameters.has(e)&&h.parameters.set(e,c)}return h}}{const e=ud,t=hd,{asciiLowercase:r,solelyContainsHTTPTokenCodePoints:n,soleyContainsHTTPQuotedStringTokenCodePoints:o}=cd;dd=class{constructor(t){t=String(t);const r=e(t);if(null===r)throw new Error(`Could not parse MIME type string "${t}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new i(r.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=r(String(e))).length)throw new Error("Invalid type: must be a non-empty string");if(!n(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=r(String(e))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!n(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 i{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=r(String(e)),this._map.get(e)}has(e){return e=r(String(e)),this._map.has(e)}set(e,t){if(e=r(String(e)),t=String(t),!n(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!o(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=r(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 pd=Object.freeze({__proto__:null,fontPropertyParser:Ou,mediaQueryParser:ju,cssMinifier:ad,cssTree:Su,cssUnescape:g,srcsetParser:ld,get MIMEType(){return dd}});const md={normalizeFontFamily:X,getFontWeight:ae},fd=globalThis.FontFace,gd=/url\s*\(\s*'(.*?)'\s*\)/i,yd=/url\s*\(\s*"(.*?)"\s*\)/i,bd=/url\s*\(\s*(.*?)\s*\)/i,kd=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,vd=/^'(.*?)'$/,wd=/^"(.*?)"$/,xd=/^url\(\s*["']?data:font\/(woff2?)/,Ed=/^url\(\s*["']?data:application\/x-font-(woff)/,Ad=/\.([^.?#]+)((\?|#).*?)?$/,Sd=/format\((.*?)\)\s*,?$/,Td=/(.*?)\s*,?$/,Cd=/^url\(["']?data:[^,]*,?["']?\)/,Rd="local(",_d={"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 Id(e,t,r,n){const o={fonts:new Map,medias:new Map,supports:new Map},i={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let a=0;return t.forEach((t=>{const r=t.stylesheet.children;if(r)if(i.rules.processed+=r.size,i.rules.discarded+=r.size,t.mediaText&&"all"!=t.mediaText){const n=Ud();o.medias.set("media-"+a+"-"+t.mediaText,n),Ld(e,r,a,n)}else Ld(e,r,a,o);a++})),Nd(o),await Promise.all([...t].map((async([,e],t)=>{const a=e.stylesheet.children,s=e.mediaText;a&&(s&&"all"!=s?await zd(a,t,o.medias.get("media-"+t+"-"+s),r,n,i):await zd(a,t,o,r,n,i),i.rules.discarded-=a.size)}))),i}function Ld(e,t,r,n){let o=0,i=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const i=fu(t.prelude),a=Ud();n.medias.set("media-"+r+"-"+o+"-"+i,a),o++,Ld(e,t.block.children,r,a)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const o=fu(t.prelude),a=Ud();n.supports.set("supports-"+r+"-"+i+"-"+o,a),i++,Ld(e,t.block.children,r,a)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=Od(t);let r=n.fonts.get(e);r||(r=[],n.fonts.set(e,r));const o=Md(t,"src");if(o){const e=o.match(kd);e&&e.forEach((e=>r.unshift(e)))}}}))}function Nd(e){e.fonts.forEach(((t,r)=>{e.fonts.set(r,t.map((e=>{const t=e.match(Sd);let r;const n=function(e){const t=(e=e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"")).match(gd)||e.match(yd)||e.match(bd);return t&&t[1]}(e);if(t&&t[1]&&(r=t[1].replace(vd,"$1").replace(wd,"$1").toLowerCase()),!r){const t=e.match(xd);if(t&&t[1])r=t[1];else{const t=e.match(Ed);t&&t[1]&&(r=t[1])}}if(!r&&n){const e=n.match(Ad);e&&e[1]&&(r=e[1])}return{src:e.match(Td)[1],fontUrl:n,format:r}})))})),e.medias.forEach((e=>Nd(e))),e.supports.forEach((e=>Nd(e)))}async function zd(e,t,r,n,o,i){const a=[];let s=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 a=fu(e.prelude);await zd(e.block.children,t,r.medias.get("media-"+t+"-"+s+"-"+a),n,o,i),s++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const a=fu(e.prelude);await zd(e.block.children,t,r.supports.get("supports-"+t+"-"+l+"-"+a),n,o,i),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=Od(e),s=r.fonts.get(t);if(s){await Pd(e,s,n,o,i)&&r.fonts.delete(t)}else a.push(c)}}a.forEach((t=>e.remove(t)))}async function Pd(e,t,r,n,o){const i=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&i.push(t);i.pop(),i.forEach((t=>e.block.children.remove(t)));const a=e.block.children.filter((e=>"src"==e.property)).tail;if(a){await Promise.all(t.map((async e=>{if(n.has(e.src))e.valid=n.get(e.src);else{if(fd&&e.fontUrl){const t=new fd("test-font",e.src);try{let r;await Promise.race([t.load().then((()=>t.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(r)})),new Promise((t=>r=globalThis.setTimeout((()=>{e.valid=!0,t()}),5e3)))])}catch(t){const n=wu(a.data,(e=>"Url"==e.type)),o=Array.from(r).find((([t])=>n.includes(t)&&t.value==e.fontUrl));if(o&&o[1].length){const t=o[1][0];if(t){const r=new fd("test-font","url("+t+")");try{let t;await Promise.race([r.load().then((()=>r.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((r=>t=globalThis.setTimeout((()=>{e.valid=!0,r()}),5e3)))])}catch(e){}}}else e.valid=!0}}else e.valid=!0;n.set(e.src,e.valid)}})));const e=(e,r)=>t.find((t=>!t.src.match(Cd)&&t.format==e&&(!r||t.valid))),i=e=>t.filter((t=>t==e||t.src.startsWith(Rd)));o.fonts.processed+=t.length,o.fonts.discarded+=t.length;const s=e("woff2-variations",!0)||e("woff2",!0)||e("woff",!0);if(s)t=i(s);else{const r=e("truetype-variations",!0)||e("truetype",!0);if(r)t=i(r);else{const r=e("opentype")||e("embedded-opentype");t=r?i(r):t.filter((e=>!e.src.match(Cd)&&e.valid||e.src.startsWith(Rd)))}}o.fonts.discarded-=t.length,t.reverse();try{a.data.value=mu(t.map((e=>e.src)).join(","),{context:"value",parseCustomProperty:!0})}catch(e){}return!0}return!1}function Md(e,t){let r;if(e.block.children&&(r=e.block.children.filter((e=>{try{return e.property==t&&!fu(e.value).match(/\\9$/)}catch(r){return e.property==t}})).tail),r)try{return fu(r.data.value)}catch(e){}}function Od(e){return JSON.stringify([md.normalizeFontFamily(Md(e,"font-family")),md.getFontWeight(Md(e,"font-weight")||"400"),Md(e,"font-style")||"normal",Md(e,"unicode-range"),(t=Md(e,"font-stretch"),_d[t]||t),Md(e,"font-variant")||"normal",Md(e,"font-feature-settings"),Md(e,"font-variation-settings")]);var t}function Ud(){return{fonts:new Map,medias:new Map,supports:new Map}}var Dd=Object.freeze({__proto__:null,process:Id});const Fd={normalizeFontFamily:X,flatten:se,getFontWeight:ae,removeQuotes:ie},qd=/\s*,\s*/,Bd=/-/,jd=/\?/g,Hd=/^U\+/i,Vd=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function Wd(e,t,r,n){const o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}},i={declared:[],used:[]},a=e.createElement("style");let s="";e.body.appendChild(a),t.forEach((t=>{const r=t.stylesheet.children;r&&(o.processed+=r.size,o.discarded+=r.size,$d(r,i),s=tp(e,r,a,s))})),r.forEach((e=>{const t=Kd(e);t.length&&i.used.push(t),s=rp(e.children,a,s)})),a.remove(),s+=e.body.innerText,globalThis.getComputedStyle&&n.doc&&(i.used=i.used.map((e=>e.map((e=>{const t=e.match(/^var\((--.*)\)$/);if(t&&t[1]){const r=globalThis.getComputedStyle(n.doc.body).getPropertyValue(t[1]);return r&&r.split(",").map((e=>Fd.normalizeFontFamily(e)))||e}return e})))),i.used=i.used.map((e=>Fd.flatten(e))));let l,c;return i.used.find((e=>e.find((e=>e.startsWith("var(--")))))?l=[]:(c=new Map,i.used.forEach((e=>e.forEach((e=>{if(i.declared.find((t=>t.fontFamily==e))){const t=n.usedFonts&&n.usedFonts.filter((t=>t[0]==e));t&&t.length&&c.set(e,t)}})))),l=i.declared.filter((e=>!c.has(e.fontFamily)))),t.forEach((e=>{const t=e.stylesheet.children;t&&(Gd(t,i.declared,l,c,s),o.rules.discarded-=t.size)})),o}function $d(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)$d(e.block.children,t);else if("Rule"==e.type){const r=Kd(e.block);r.length&&t.used.push(r)}else if("Atrule"==e.type&&"font-face"==e.name){const r=Fd.normalizeFontFamily(Qd(e.block.children,"font-family"));if(r){const n=Qd(e.block.children,"font-weight")||"400",o=Qd(e.block.children,"font-style")||"normal",i=Qd(e.block.children,"font-variant")||"normal";n.split(",").forEach((e=>t.declared.push({fontFamily:r,fontWeight:Fd.getFontWeight(Fd.removeQuotes(e)),fontStyle:o,fontVariant:i})))}}}))}function Gd(e,t,r,n,o){const i=[];for(let a=e.head;a;a=a.next){const e=a.data;if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)Gd(e.block.children,t,r,n,o);else if("Atrule"==e.type&&"font-face"==e.name){const s=Fd.normalizeFontFamily(Qd(e.block.children,"font-family"));if(s){const l=Qd(e.block.children,"unicode-range");!r.find((e=>e.fontFamily==s))&&op(o,l)&&Yd(e,s,t,n)||i.push(a)}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)))}}i.forEach((t=>e.remove(t)))}function Yd(e,t,r,n){let o;const i=n&&n.get(t);if(i&&i.length){let n=Qd(e.block.children,"font-style")||"normal";if(Vd.find((e=>n.trim().match(e)))){const a=Fd.getFontWeight(Qd(e.block.children,"font-weight")||"400"),s=r.filter((e=>e.fontFamily==t&&e.fontStyle==n)).map((e=>e.fontWeight)).sort(((e,t)=>Number.parseInt(e,10)-Number.parseInt(t,10)));let l=i.map((e=>Zd(e,n,s)));o=Jd(a,l),o||(l=i.map((e=>((e=Array.from(e))[2]="normal",Zd(e,n,s))))),o=Jd(a,l)}else o=!0}else o=!0;return o}function Jd(e,t){let r;for(const n of e.split(/[ ,]/))r=r||t.includes(Fd.getFontWeight(Fd.removeQuotes(n)));return r}function Qd(e,t){let r;if(e&&(r=e.filter((e=>e.property==t)).tail),r)try{return Fd.removeQuotes(fu(r.data.value)).toLowerCase()}catch(e){}}function Kd(e){let t=e.children.filter((e=>"font-family"==e.property)).tail,r=[];if(t){let e="";if(t.data.value.children){let n;t.data.value.children.forEach((t=>{"Operator"==t.type&&","==t.value&&e?(r.push(Fd.normalizeFontFamily(e)),e="",n=null):("Identifier"==n&&"Identifier"==t.type&&(e+=" "),e+=fu(t)),n=t.type}))}else t=fu(t.data.value);e&&r.push(Fd.normalizeFontFamily(e))}const n=e.children.filter((e=>"font"==e.property)).tail;if(n&&n.data&&n.data.value)try{zu(n.data.value).family.forEach((e=>r.push(Fd.normalizeFontFamily(e))))}catch(e){}return r}function Zd(e,t,r){let n;if(r=r.map((e=>String(Number.parseInt(e,10)))),e[2]==t){let t=Number(e[1]);r.length>1?(t>=400&&t<=500&&(n=r.find((e=>e>=t&&e<=500)),n||(n=Xd(t,r)),n||(n=ep(t,r))),t<400&&(n=r.slice().reverse().find((e=>e<=t)),n||(n=ep(t,r))),t>500&&(n=r.find((e=>e>=t)),n||(n=Xd(t,r)))):n=r[0]}return n}function Xd(e,t){return t.slice().reverse().find((t=>t<e))}function ep(e,t){return t.find((t=>t>e))}function tp(e,t,r,n){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&&(n=rp(t.block.children,r,n)):n=tp(e,t.block.children,r,n))})),n}function rp(e,t,r){const n=np(e,"content",t),o=np(e,"quotes",t);return r.includes(n)||(r+=n),r.includes(o)||(r+=o),r}function np(e,t,r){const n=Qd(e,t)||"";return n?(r.textContent='tmp { content:"'+n+'"}',r.sheet&&r.sheet.cssRules?Fd.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content")):n):""}function op(e,t){if(t){const r=t.split(qd);let n;const o=r.filter((t=>{const r=t.split(Bd);let o;if(2==r.length&&(r[0]=ip(r[0]),o="["+r[0]+"-"+ip("U+"+r[1])+"]"),1==r.length)if(r[0].includes("?")){const e=ip(r[0]),t=e;o="["+e.replace(jd,"0")+"-"+t.replace(jd,"F")+"]"}else r[0]&&(o="["+ip(r[0])+"]");if(o)try{return new RegExp(o,"u").test(e)}catch(e){return n=!0,!1}return!0}));return!n&&(!r.length||o.length)}return!0}function ip(e){for(e=e.replace(Hd,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var ap=Object.freeze({__proto__:null,process:Wd});const sp="all",lp=["after","before","first-letter","first-line","placeholder","selection","part","marker"],cp="sf-hidden",up=/-(ms|webkit|moz|o)-/;class hp{constructor(e,t,r){this.doc=e,this.mediaAllInfo=pp(sp);const n=new Map;let o=0;const i=e.createElement("style");e.body.appendChild(i),t.forEach((t=>{if(!t.scoped){const a=t.stylesheet.children;if(a)if(t.mediaText&&t.mediaText!=sp){const s=pp(t.mediaText);this.mediaAllInfo.medias.set("style-"+o+"-"+t.mediaText,s),mp(e,a,s,o,r,n,i)}else mp(e,a,this.mediaAllInfo,o,r,n,i)}o++})),bp(this.mediaAllInfo),gp(this.mediaAllInfo,[],this.mediaAllInfo,i),i.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function dp(e,t,r){return new hp(e,t,r).getMediaAllInfo()}function pp(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==sp&&(t.matchedStyles=new Map),t}function mp(e,t,r,n,o,i,a){let s=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=fu(t.prelude),c=pp(l);r.medias.set("rule-"+n+"-"+s+"-"+l,c),s++,mp(e,t.block.children,c,n,o,i,a)}else if("Rule"==t.type){const s=t.prelude.children.toArray(),c=t.prelude.children.toArray().map((e=>fu(e))),u={ruleData:t,mediaInfo:r,ruleIndex:l,sheetIndex:n,matchedSelectors:new Set,declarations:new Set,selectors:s,selectorsText:c};if(!function(e,t){return t.textContent=e+"{}",t.sheet?!t.sheet.cssRules.length:t.sheet}(c.join(","),a))for(let r=t.prelude.children.head,n=0;r;r=r.next,n++){const t=c[n];fp(e,{selector:r,selectorText:t,ruleInfo:u},o,i)}l++}}))}function fp(e,t,r,n){const o=function(e,t){const r=[];n(e={data:mu(fu(e.data),{context:"selector"})}),r.length&&(r.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.size&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,mu("*",{context:"selector"}).children.head)})),t=fu(e.data).trim());return t;function n(e,t){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)n(t,e);("PseudoClassSelector"==e.data.type||"PseudoElementSelector"==e.data.type&&(o(e)||lp.includes(e.data.name)))&&r.push({parentSelector:t,selector:e})}function o(e){const t=e.data.name;return t.startsWith("-")||t.startsWith("\\-")}}(t.selector,t.selectorText),i=o!=t.selectorText?o:t.selectorText,a=n.get(i);let s=a;if(!s)try{s=e.querySelectorAll(i),".sf-hidden"!=i&&(s=Array.from(e.querySelectorAll(i)).filter((e=>!e.classList.contains(cp)&&("none"!=e.style.getPropertyValue("display")||"important"!=e.style.getPropertyPriority("display")))))}catch(e){}if(s&&(a||n.set(i,s),s.length))if(o==t.selectorText)s.forEach((e=>function(e,t,r){const n=t.ruleInfo.mediaInfo,o=r.get(e);let i=n.elements.get(e);i||(i=[],o&&i.push({styleInfo:{styleData:o,declarations:new Set}}),n.elements.set(e,i));const a=kp(t.selector.data);a.ruleIndex=t.ruleInfo.ruleIndex,a.sheetIndex=t.ruleInfo.sheetIndex,t.specificity=a,i.push(t)}(e,t,r)));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 gp(e,t,r,n){e.elements.forEach((o=>function(e,t){const r=new Map,n=new Set;return e.forEach((e=>{let o;o=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,r,n,o){for(let i=t.tail;i;i=i.prev){const t=i.data,a=fu(t);if("Declaration"==t.type&&(a.match(up)||!n.has(t.property)||t.important)&&!yp(a,o)){const o=e.get(t);(!o||t.important&&!o.important)&&(e.set(t,{selectorInfo:r,important:t.important}),a.match(up)||n.add(t.property))}}}(r,o,e,n,t)})),r}(o,n).forEach(((n,o)=>{if(n.selectorInfo.ruleInfo||e==r){let i;if(n.selectorInfo.ruleInfo){i=n.selectorInfo.ruleInfo;const r=i.ruleData;([e,...t].find((e=>e.rules.get(r)))||e).rules.set(r,i),r&&i.matchedSelectors.add(n.selectorInfo.selectorText)}else{i=n.selectorInfo.styleInfo;const e=i.styleData;r.matchedStyles.get(e)||r.matchedStyles.set(e,i)}i.declarations.has(o)||i.declarations.add(o)}})))),delete e.elements,e.medias.forEach((o=>gp(o,[e,...t],r,n)))}function yp(e,t){let r;return t.textContent="single-file-declaration { "+e+"}",t.sheet&&!t.sheet.cssRules[0].style.length&&(e.match(up)||(r=!0)),r}function bp(e){e.elements.forEach((e=>e.sort(((e,t)=>{return e.styleInfo&&!t.styleInfo?-1:!e.styleInfo&&t.styleInfo?1:(r=e.specificity,n=t.specificity,r.a>n.a?-1:r.a<n.a?1:r.b>n.b?-1:r.b<n.b?1:r.c>n.c?-1:r.c<n.c?1:r.sheetIndex>n.sheetIndex?-1:r.sheetIndex<n.sheetIndex?1:r.ruleIndex>n.ruleIndex?-1:r.ruleIndex<n.ruleIndex?1:-1);var r,n})))),e.medias.forEach(bp)}function kp(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=>kp(e,t))),t}var vp=Object.freeze({__proto__:null,getMediaAllInfo:dp});const wp={flatten:se},xp="all",Ep="screen";function Ap(e){const t={processed:0,discarded:0};return e.forEach(((r,n)=>{if(Tp(r.mediaText||xp,Ep)&&r.stylesheet.children){Sp(r.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(n)})),t}function Sp(e,t,r=[]){for(let n=e.head;n;n=n.next){const o=n.data;"Atrule"==o.type&&"media"==o.name&&o.block&&o.block.children&&o.prelude&&o.prelude.children&&(t.processed++,Tp(fu(o.prelude),Ep)?Sp(o.block.children,t,r):(r.push({cssRules:e,cssRule:n}),t.discarded++))}return r}function Tp(e,t){return wp.flatten(Fu(e).map((e=>Cp(e,t)))).find((e=>!e.not&&(e.value==t||e.value==xp)||e.not&&(e.value==xp||e.value!=t)))}function Cp(e,t,r=[]){return e.nodes.map(((n,o)=>{if("media-query"==n.type)return Cp(n,t,r);if("media-type"==n.type){const t={not:Boolean(o&&"keyword"==e.nodes[0].type&&"not"==e.nodes[0].value),value:n.value};r.find((e=>t.not==e.not&&t.value==e.value))||r.push(t)}})),r.length||r.push({not:!1,value:xp}),r}var Rp=Object.freeze({__proto__:null,process:Ap});function _p(e,t,r){const n={processed:0,discarded:0};let o=0;return e.forEach((e=>{if(!e.scoped){const t=e.stylesheet.children;if(t){let i;n.processed+=t.size,n.discarded+=t.size,i=e.mediaText&&"all"!=e.mediaText?r.medias.get("style-"+o+"-"+e.mediaText):r,Ip(t,o,i),n.discarded-=t.size}}o++})),t.forEach((e=>function(e,t){const r=[],n=t.matchedStyles.get(e);if(n){let t;for(let o=e.children.head;o&&!t;o=o.next)n.declarations.has(o.data)||r.push(o);r.forEach((t=>e.children.remove(t)))}}(e,r))),n}function Ip(e,t,r){let n=0;const o=[];for(let i=e.head;i;i=i.next){const e=i.data;if(e.block&&e.block.children&&e.prelude&&e.prelude.children){if("Atrule"==e.type&&"media"==e.name){const a=fu(e.prelude);Ip(e.block.children,t,r.medias.get("rule-"+t+"-"+n+"-"+a)),e.prelude.children.size&&e.block.children.size||o.push(i),n++}else if("Rule"==e.type){const t=r.rules.get(e),n=r.pseudoRules.get(e);t||n?t&&(Lp(e,t,n),e.prelude.children.size&&e.block.children.size||o.push(i)):o.push(i)}}else e&&"Raw"!=e.type&&("Rule"!=e.type||e.prelude&&"Raw"!=e.prelude.type)||o.push(i)}o.forEach((t=>e.remove(t)))}function Lp(e,t,r){const n=[],o=[];let i;for(let n=e.prelude.children.head;n;n=n.next){const e=fu(n.data);r&&r.has(e)&&(i=!0),t.matchedSelectors.has(e)||r&&r.has(e)||o.push(n)}if(!i)for(let r=e.block.children.tail;r;r=r.prev)t.declarations.has(r.data)||n.push(r);n.forEach((t=>e.block.children.remove(t))),o.forEach((t=>e.prelude.children.remove(t)))}var Np=Object.freeze({__proto__:null,process:_p});const zp="data:,";function Pp(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:r,srcset:n}=Mp(t);if(!r){const t=function(e){let t=e.find((e=>e.src)),r=t&&t.src,n=t&&t.srcset;r||(t=e.find((e=>Up(e.src))),r=t&&t.src,r==zp&&(r=null));n||(t=e.find((e=>Up(e.srcset))),n=t&&t.srcset,n==zp&&(n=null));return{src:r,srcset:n}}(Array.from(e.querySelectorAll("source")).reverse());r=t.src,n||(n=t.srcset)}Op({src:r,srcset:n},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>Op(Mp(e),e)))}function Mp(e){let t=e.getAttribute("src");t==zp&&(t=null);let r=Up(e.getAttribute("srcset"));return r==zp&&(r=null),{src:t,srcset:r}}function Op(e,t,r){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",zp),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),r&&r.querySelectorAll("source").forEach((e=>e.remove()))}function Up(e){if(e){const t=sd(e);if(t.length)return t.find((e=>e.url)).url}}var Dp=Object.freeze({__proto__:null,process:Pp});const Fp=["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"],qp=["script","style","pre","textarea"],Bp=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],jp={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},Hp=/[ \t\f\r]+/g,Vp=/[\n]+/g,Wp=/^\s+$/,$p=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{Fp.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 r=e.parentElement;if(!(""==r.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let n=Yp(r);for(;n;)r=r.parentElement,n=r&&Yp(r);(!r||n)&&t.length>1&&(e.textContent=t.replace(Hp,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(Vp,"\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(Bp.includes(t.name.toLowerCase())){const r=e.getAttribute(t.name);(""==r||(r||"").match(Wp))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=jp[e.tagName.toLowerCase()];t&&Object.keys(t).forEach((r=>{const n=t[r];("function"==typeof n?n(e):e.getAttribute(r)==n)&&e.removeAttribute(r)}))}},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,r){if(1==e.nodeType&&e.tagName.toLowerCase()==t.toLowerCase()){let t=e.previousSibling;const n=[];for(;t&&3==t.nodeType&&!t.textContent.trim();)n.push(t),t=t.previousSibling;t&&1==t.nodeType&&t.tagName==e.tagName&&r(e,t)&&(e.textContent=t.textContent+e.textContent,n.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 Gp(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const r=e.createTreeWalker(e.documentElement,4294967295,null,!1);let n=r.nextNode();for(;n;){const e=$p.find((e=>e(n,t))),o=n;n=r.nextNode(),e&&o.remove()}}function Yp(e){return e&&!qp.includes(e.tagName.toLowerCase())}var Jp=Object.freeze({__proto__:null,process:Gp});const Qp=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Kp=[{tagName:"head",accept:e=>!e.childNodes.length||1==e.childNodes[0].nodeType},{tagName:"body",accept:e=>!e.childNodes.length}],Zp=[{tagName:"html",accept:e=>!e||8!=e.nodeType},{tagName:"head",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!rm(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||!rm(e.textContent))},{tagName:"caption",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!rm(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)}],Xp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function em(e,t){const r=e.doctype;let n="";return r&&(n="<!DOCTYPE "+r.nodeName,r.publicId?(n+=' PUBLIC "'+r.publicId+'"',r.systemId&&(n+=' "'+r.systemId+'"')):r.systemId&&(n+=' SYSTEM "'+r.systemId+'"'),r.internalSubset&&(n+=" ["+r.internalSubset+"]"),n+="> "),n+tm(e.documentElement,t)}function tm(e,t,r){return 3==e.nodeType?function(e){const t=e.parentNode;let r;t&&1==t.nodeType&&(r=t.tagName.toLowerCase());return!r||Xp.includes(r)?"script"==r?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,r){const n=e.tagName.toLowerCase(),o=t&&Kp.find((t=>n==t.tagName&&t.accept(e)));let i="";o&&!e.attributes.length||(i="<"+n,Array.from(e.attributes).forEach((r=>i+=function(e,t,r){const n=e.name;let o="";if(!n.match(/["'>/=]/)){let i,a=e.value;r&&"class"==n&&(a=Array.from(t.classList).map((e=>e.trim())).join(" ")),a=a.replace(/&/g,"&amp;").replace(/\u00a0/g,"&nbsp;"),a.includes('"')&&(a.includes("'")||!r?a=a.replace(/"/g,"&quot;"):i=!0);const s=!r||!a.match(/^[^ \t\n\f\r'"`=<>]+$/);o+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?o+="xml:"+n:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==n&&(o+="xmlns:"),o+=n):"http://www.w3.org/1999/xlink"==e.namespaceURI?o+="xlink:"+n:o+=n:o+=n,""!=a&&(o+="=",s&&(o+=i?"'":'"'),o+=a,s&&(o+=i?"'":'"'))}return o}(r,e,t))),i+=">");"TEMPLATE"!=e.tagName||e.childNodes.length?Array.from(e.childNodes).forEach((e=>i+=tm(e,t,r||"svg"==n))):i+=e.innerHTML;const a=t&&Zp.find((t=>n==t.tagName&&t.accept(e.nextSibling,e)));(r||!a&&!Qp.includes(n))&&(i+="</"+n+">");return i}(e,t,r):void 0}function rm(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var nm=Object.freeze({__proto__:null,process:em}),om=Object.freeze({__proto__:null,fontsAltMinifier:Dd,fontsMinifier:ap,matchedRules:vp,mediasAltMinifier:Rp,cssRulesMinifier:Np,imagesAltMinifier:Dp,htmlMinifier:Jp,serializer:nm});const im=globalThis.Set,am=globalThis.Map;let sm,lm;class cm{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(sm.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new xm(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(sm.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const um="page-loading",hm="page-loaded",dm="resource-initializing",pm="resources-initialized",mm="resource-loaded",fm="page-ended",gm="stage-started",ym="stage-ended",bm="stage-task-started",km="stage-task-ended";class vm{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:um,PAGE_LOADED:hm,RESOURCES_INITIALIZING:dm,RESOURCES_INITIALIZED:pm,RESOURCE_LOADED:mm,PAGE_ENDED:fm,STAGE_STARTED:gm,STAGE_ENDED:ym,STAGE_TASK_STARTED:bm,STAGE_TASK_ENDED:km}}}const wm=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"replaceInvalidElements"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"replaceCanvasElements"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"setInputValues"},{option:"moveStylesInHead",action:"moveStylesInHead"},{option:"blockScripts",action:"removeEmbedScripts"},{option:"selected",action:"removeUnselectedElements"},{option:"blockVideos",action:"insertVideoPosters"},{option:"blockVideos",action:"insertVideoLinks"},{option:"removeFrames",action:"removeFrames"},{action:"removeDiscardedResources"},{option:"removeHiddenElements",action:"removeHiddenElements"},{action:"resolveHrefs"},{action:"resolveStyleAttributeURLs"}],parallel:[{option:"blockVideos",action:"insertMissingVideoPosters"},{action:"resolveStylesheetURLs"},{option:"!removeFrames",action:"resolveFrameURLs"}]},{sequential:[{option:"removeUnusedStyles",action:"removeUnusedStyles"},{option:"removeAlternativeMedias",action:"removeAlternativeMedias"},{option:"removeUnusedFonts",action:"removeUnusedFonts"}],parallel:[{action:"processStylesheets"},{action:"processStyleAttributes"},{action:"processPageResources"},{action:"processScripts"}]},{sequential:[{option:"removeAlternativeImages",action:"removeAlternativeImages"}],parallel:[{option:"removeAlternativeFonts",action:"removeAlternativeFonts"},{option:"!removeFrames",action:"processFrames"}]},{sequential:[{action:"replaceStylesheets"},{action:"replaceStyleAttributes"},{action:"insertVariables"},{option:"compressHTML",action:"compressHTML"},{action:"cleanupPage"}],parallel:[{option:"enableMaff",action:"insertMAFFMetaData"},{action:"setDocInfo"}]}];class xm{constructor(e,t){const r=t&&e.doc;this.root=t,this.options=e,this.options.url=this.options.url||r&&this.options.doc.location.href;const n=this.options.url.match(/^.*\//);if(this.options.resourceReferrer=this.options.passReferrerOnError&&n&&n[0],this.options.baseURI=r&&this.options.doc.baseURI,this.options.rootDocument=t,this.options.updatedResources=this.options.updatedResources||{},this.options.fontTests=new am,this.batchRequest=new Em,this.processor=new Nm(e,this.batchRequest),r){const e=sm.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.videos=e.videos,this.options.usedFonts=e.usedFonts,this.options.shadowRoots=e.shadowRoots,this.options.referrer=e.referrer,this.markedElements=e.markedElements,this.invalidElements=e.invalidElements}this.options.saveRawPage&&(this.options.removeFrames=!0),this.options.content=this.options.content||(r?sm.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new vm(um,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new vm(hm,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new vm(dm,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&sm.postProcessDoc(this.options.doc,this.markedElements,this.invalidElements)}cancel(){this.cancelled=!0,this.batchRequest.cancel(),this.root&&this.options.frames&&this.options.frames.forEach((function(e){e.runner&&e.runner.cancel()}))}async run(){this.root&&(this.processor.initialize(this.batchRequest),this.onprogress(new vm(pm,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new vm(mm,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 vm(fm,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let r;return this.onprogress(new vm(gm,{pageURL:this.options.url,step:e,frame:t})),wm[e].sequential.forEach((r=>{this.onprogress(new vm(bm,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||this.executeTask(r),this.onprogress(new vm(km,{pageURL:this.options.url,step:e,task:r.action,frame:t}))})),r=wm[e].parallel?await Promise.all(wm[e].parallel.map((async r=>{this.onprogress(new vm(bm,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||await this.executeTask(r),this.onprogress(new vm(km,{pageURL:this.options.url,step:e,task:r.action,frame:t}))}))):Promise.resolve(),this.onprogress(new vm(ym,{pageURL:this.options.url,step:e,frame:t})),r}executeTask(e){if(!e.option||e.option.startsWith("!")&&!this.options[e.option]||this.options[e.option])return this.processor[e.action]()}}class Em{constructor(){this.requests=new am,this.duplicates=new am}addURL(e,{asBinary:t,expectedType:r,groupDuplicates:n,baseURI:o,blockMixedContent:i}={}){return new Promise(((a,s)=>{const l=JSON.stringify([e,t,r,o,i]);let c=this.requests.get(l);c||(c=[],this.requests.set(l,c));const u={resolve:a,reject:s};if(c.push(u),n){let e=this.duplicates.get(l);e||(e=[],this.duplicates.set(l,e)),e.push(u)}}))}getMaxResources(){return this.requests.size}run(e,t){const r=[...this.requests.keys()];let n=0;return Promise.all(r.map((async r=>{const[o,i,a,s,l]=JSON.parse(r),c=this.requests.get(r);try{const u=n;n+=1;const h=await sm.getContent(o,{asBinary:i,expectedType:a,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer,baseURI:s,blockMixedContent:l,acceptHeaders:t.acceptHeaders,networkTimeout:t.networkTimeout});e({url:o}),this.cancelled||c.forEach((e=>{const t=this.duplicates.get(r),n=t&&t.length>1&&t.includes(e);e.resolve({content:h.data,indexResource:u,duplicate:n})}))}catch(t){n+=1,e({url:o}),c.forEach((e=>e.reject(t)))}this.requests.delete(r)})))}cancel(){this.cancelled=!0;[...this.requests.keys()].forEach((e=>{this.requests.get(e).forEach((e=>e.reject())),this.requests.delete(e)}))}}const Am=["data:text/"],Sm="data:image/svg+xml",Tm=/<script/gi,Cm=/<noscript/gi,Rm=/<canvas/gi,_m="shadowroot",Im="data-template-shadow-root",Lm="utf-8";class Nm{constructor(e,t){this.options=e,this.stats=new nf(e),this.baseURI=Wm(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new am,this.styles=new am,this.cssVariables=new am,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(sm.resolveURL("index.rdf",this.options.baseURI||this.options.url),{expectedType:"document"})),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.stats.set("processed","resources",this.maxResources)}async loadPage(e,t){let r;if(e&&!this.options.saveRawPage||(r=await sm.getContent(this.baseURI,{maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,expectedType:"document",acceptHeaders:this.options.acceptHeaders,networkTimeout:this.options.networkTimeout}),e=r.data),this.doc=sm.parseDocContent(e,this.baseURI),this.options.saveRawPage){let t;if(this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((e=>{const r=e.content.split(";")[1];r&&!t&&(t=r.split("=")[1].trim().toLowerCase())})),t&&r.charset&&t.toLowerCase()!=r.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"),r=[];for(const e in t)e.startsWith("on")&&r.push(e);return r.push("onunload"),r}(this.doc)}finalize(){this.workStyleElement.parentNode&&this.workStyleElement.remove()}async getPageData(){sm.postProcessDoc(this.doc);const e=sm.parseURL(this.baseURI);if(this.options.insertSingleFileComment){const e=this.doc.documentElement.firstChild;let t=this.options.saveUrl,r=this.options.saveDate;if(8==e.nodeType&&(e.textContent.includes(sm.COMMENT_HEADER_LEGACY)||e.textContent.includes(sm.COMMENT_HEADER))){const n=this.doc.documentElement.firstChild.textContent.split("\n");try{const[,,o,i]=n;t=o.split("url: ")[1],r=i.split("saved date: ")[1],e.remove()}catch(e){}}const n=(this.options.infobarContent||"").replace(/\\n/g,"\n").replace(/\\t/g,"\t"),o=this.doc.createComment("\n "+(this.options.useLegacyCommentHeader?sm.COMMENT_HEADER_LEGACY:sm.COMMENT_HEADER)+" \n url: "+t+" \n saved date: "+r+(n?" \n info: "+n:"")+"\n");this.doc.documentElement.insertBefore(o,this.doc.documentElement.firstChild)}if(this.options.insertCanonicalLink&&this.options.saveUrl.match(qm)){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.insertMetaCSP){const e=this.doc.createElement("meta");e.httpEquiv="content-security-policy",e.content="default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:;",this.doc.head.appendChild(e)}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))}const t=this.doc.createElement("style");let r;t.textContent='img[src="data:,"],source[src="data:,"]{display:none!important}',this.doc.head.appendChild(t),this.options.displayStats&&(r=sm.getContentSize(this.doc.documentElement.outerHTML));const n=sm.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=sm.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",r-e)}let o=await Dm.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const i=this.options.filenameReplacementCharacter;if(o=sm.getValidFilename(o,this.options.filenameReplacedCharacters,i),this.options.backgroundSave||(o=o.replace(/\//g,i)),!this.options.saveToGDrive&&!this.options.saveToGitHub&&!this.options.saveWithCompanion&&!this.options.saveWithWebDAV&&("bytes"==this.options.filenameMaxLengthUnit&&sm.getContentSize(o)>this.options.filenameMaxLength||o.length>this.options.filenameMaxLength)){const e=o.match(/(\.[^.]{3,4})$/),t=e&&e[0]&&e[0].length>1?e[0]:"";o="bytes"==this.options.filenameMaxLengthUnit?await sm.truncateText(o,this.options.filenameMaxLength-t.length):o.substring(0,this.options.filenameMaxLength-t.length),o=o+"…"+t}o||(o="Unnamed page");const a=this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)||this.baseURI.match(/\/\/([^/]*)\/?$/),s={stats:this.stats.data,title:this.options.title||(this.baseURI&&a?a[1]:e.hostname?e.hostname:""),filename:o,content:n};return this.options.addProof&&(s.hash=await sm.digest("SHA-256",n)),this.options.retrieveLinks&&(s.links=Array.from(new im(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["+sm.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(sm.IMAGE_ATTRIBUTE_NAME);if(t){const r=this.options.images[Number(t)];r&&(this.options.removeHiddenElements&&(r.size&&!r.size.pxWidth&&!r.size.pxHeight||""==e.getAttribute(sm.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",sm.EMPTY_RESOURCE):(r.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",r.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=sm.EMPTY_RESOURCE||!e.getAttribute("data-src")||(r.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(sm.STYLESHEET_ATTRIBUTE_NAME)){const r=this.options.stylesheets[Number(t)];r&&(e.textContent=r)}}))}removeUnselectedElements(){function e(e){1==e.nodeType&&e.querySelector("svg,style,link")||!r(e)?t(e):e.remove()}function t(t){r(t)&&(t.style.setProperty("display","none","important"),Array.from(t.childNodes).forEach(e))}function r(e){if(1==e.nodeType){const t=e.tagName&&e.tagName.toLowerCase();return"svg"!=t&&"style"!=t&&"link"!=t}}!function r(n){let o=!1;Array.from(n.childNodes).forEach((n=>{if(1==n.nodeType){const i=""==n.getAttribute(sm.SELECTED_CONTENT_ATTRIBUTE_NAME);o=o||i,i?(n.removeAttribute(sm.SELECTED_CONTENT_ATTRIBUTE_NAME),r(n)):o?e(n):t(n)}}))}(this.doc.body),this.doc.body.removeAttribute(sm.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 r=e.getAttribute(sm.POSTER_ATTRIBUTE_NAME);if(r){const e=this.options.posters[Number(r)];!t.poster&&e&&t.setAttribute("poster",e)}}))}insertVideoLinks(){const e="16px";this.doc.querySelectorAll("video").forEach((t=>{const r=t.getAttribute(sm.VIDEO_ATTRIBUTE_NAME);if(r){const n=this.options.videos[Number(r)],o=n.src||t.src;if(t&&o){const r=this.doc.createElement("a"),i=this.doc.createElement("img");r.href=o,r.target="_blank",r.style.setProperty("z-index",2147483647,"important"),r.style.setProperty("position","absolute","important"),r.style.setProperty("top","8px","important"),r.style.setProperty("left","8px","important"),r.style.setProperty("width",e,"important"),r.style.setProperty("height",e,"important"),r.style.setProperty("min-width",e,"important"),r.style.setProperty("min-height",e,"important"),r.style.setProperty("max-width",e,"important"),r.style.setProperty("max-height",e,"important"),i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC",i.style.setProperty("width",e,"important"),i.style.setProperty("height",e,"important"),i.style.setProperty("min-width",e,"important"),i.style.setProperty("min-height",e,"important"),i.style.setProperty("max-width",e,"important"),i.style.setProperty("max-height",e,"important"),r.appendChild(i),t.insertAdjacentElement("afterend",r);const a=t.parentNode.style.getPropertyValue("position");(n.positionParent||a&&"static"==a)&&"static"!=n.positionParent||t.parentNode.style.setProperty("position","relative","important")}}}))}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()))}removeEmbedScripts(){const e="javascript:";this.onEventAttributeNames.forEach((e=>this.doc.querySelectorAll("["+e+"]").forEach((t=>t.removeAttribute(e))))),this.doc.querySelectorAll("[href]").forEach((t=>{t.href&&t.href.match&&t.href.trim().startsWith(e)&&t.removeAttribute("href")})),this.doc.querySelectorAll("[src]").forEach((t=>{t.src&&t.src.trim().startsWith(e)&&t.removeAttribute("src")}));const t=this.doc.querySelectorAll('script:not([type="application/ld+json"]):not([data-template-shadow-root])');this.stats.set("discarded","scripts",t.length),this.stats.set("processed","scripts",t.length),t.forEach((e=>e.remove()))}removeDiscardedResources(){this.doc.querySelectorAll("."+sm.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove()));const e=new am;this.doc.querySelectorAll("noscript").forEach((t=>{const r=this.doc.createElement("div");r.innerHTML=t.dataset.singleFileDisabledNoscript,t.replaceWith(r),e.set(r,t)})),this.doc.querySelectorAll("meta[http-equiv=refresh], meta[disabled-http-equiv]").forEach((e=>e.remove())),Array.from(e).forEach((([e,t])=>{t.dataset.singleFileDisabledNoscript=e.innerHTML,e.replaceWith(t)})),this.doc.querySelectorAll('meta[http-equiv="content-security-policy"]').forEach((e=>e.remove()));const t=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",t.length),this.stats.set("processed","objects",t.length),t.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=>{const t=e.getAttribute("rel").replace(/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest)/g,"").trim();t.length?e.setAttribute("rel",t):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"))),this.doc.querySelectorAll("link[rel=import][href]").forEach((e=>e.remove()))}replaceInvalidElements(){this.doc.querySelectorAll("template["+sm.INVALID_ELEMENT_ATTRIBUTE_NAME+"]").forEach((e=>{const t=this.doc.createElement("span"),r=e.content.firstChild;r&&(r.hasAttributes()&&Array.from(r.attributes).forEach((e=>t.setAttribute(e.name,e.value))),r.childNodes.forEach((e=>t.appendChild(e.cloneNode(!0))))),e.replaceWith(t)}))}resetCharsetMeta(){let e;this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((t=>{const r=t.content.split(";")[1];r&&!e&&(e=r.split("=")[1],e&&(this.charset=e.trim().toLowerCase())),t.remove()}));const t=this.doc.createElement("meta");t.setAttribute("charset",Lm),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(sm.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(sm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(sm.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(sm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}moveStylesInHead(){this.doc.querySelectorAll("style").forEach((e=>{""==e.getAttribute(sm.STYLE_ATTRIBUTE_NAME)&&this.doc.head.appendChild(e)}))}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(sm.CANVAS_ATTRIBUTE_NAME);if(t){const r=this.options.canvases[Number(t)];r&&(Dm.setBackgroundImage(e,"url("+r.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 r="";Object.keys(t).forEach((e=>{r&&(r+=";"),r+=e+":"+t[e]})),e+=r+"}"}})),e){const t=this.doc.createElement("style");t.textContent=e;const r=this.doc.querySelector("style");r?r.parentElement.insertBefore(t,r):this.doc.head.insertBefore(t,this.doc.head.firstChild)}}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+sm.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+sm.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("LINK"==e.tagName&&e.rel.includes("stylesheet")&&this.options.saveOriginalURLs&&!Zm(t)&&e.setAttribute("data-sf-original-href",t),!Xm(t)){let r;try{r=sm.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(r){const t=Wm(this.options.url);!r.startsWith(t+"#")||r.startsWith(t+"#!")||this.options.resolveFragmentIdentifierURLs||(r=r.substring(t.length));try{e.setAttribute("href",r)}catch(e){}}}}))}async insertMissingVideoPosters(){await Promise.all(Array.from(this.doc.querySelectorAll("video[src], video > source[src]")).map((async e=>{let t;if(t="VIDEO"==e.tagName?e:e.parentElement,!t.poster){const e=t.getAttribute(sm.VIDEO_ATTRIBUTE_NAME);if(e){const r=this.options.videos[Number(e)],n=r.src||t.src;if(n){const e=this.doc.createElement("video");e.src=n,e.style.setProperty("width",r.size.pxWidth+"px","important"),e.style.setProperty("height",r.size.pxHeight+"px","important"),e.style.setProperty("display","none","important"),e.crossOrigin="anonymous";const o=this.doc.createElement("canvas"),i=o.getContext("2d");return this.options.doc.body.appendChild(e),new Promise((n=>{e.currentTime=r.currentTime,e.oncanplay=()=>{o.width=r.size.pxWidth,o.height=r.size.pxHeight,i.drawImage(e,0,0,o.width,o.height);try{t.poster=o.toDataURL("image/png","")}catch(e){}e.remove(),n()},e.onerror=()=>{e.remove(),n()}}))}}}})))}resolveStyleAttributeURLs(){this.doc.querySelectorAll("[style]").forEach((e=>{if(this.options.blockStylesheets)e.removeAttribute("style");else{const t=e.getAttribute("style"),r=lm.parse(t,{context:"declarationList",parseCustomProperty:!0});Dm.resolveStylesheetURLs(r,this.baseURI,this.workStyleElement),this.styles.set(e,r)}}))}async resolveStylesheetURLs(){if(await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map((async t=>{const r=Object.assign({},this.options,{charset:this.charset});let n;t.media&&(n=t.media.toLowerCase());const o={mediaText:n,scoped:Boolean(t.closest("[shadowroot]"))};"LINK"==t.tagName&&t.charset&&(r.charset=t.charset),await e(t,o,this.stylesheets,this.baseURI,r,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=>{if(t.retrieved=!0,!this.options.blockStylesheets){const r={},n=this.doc.createElement("style");this.doc.body.appendChild(n),n.textContent=t.content,await e(n,r,this.stylesheets,this.baseURI,this.options,this.workStyleElement)}})))}async function e(e,t,r,n,o,i){let a;if(r.set(e,t),!o.blockStylesheets)if("LINK"==e.tagName)a=await Dm.resolveLinkStylesheetURLs(e.href,n,o,i);else{a=lm.parse(e.textContent,{context:"stylesheet",parseCustomProperty:!0});await Dm.resolveImportURLs(a,n,o,i)&&(a=lm.parse(lm.generate(a),{context:"stylesheet",parseCustomProperty:!0}))}a&&a.children?(o.compressCSS&&Dm.removeSingleLineCssComments(a),t.stylesheet=a):r.delete(e)}}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=>{if("OBJECT"==e.tagName)e.setAttribute("data","data:text/html,");else{const t=e.getAttribute("src");this.options.saveOriginalURLs&&t&&!Zm(t)&&e.setAttribute("data-sf-original-src",t),e.removeAttribute("src"),e.removeAttribute("srcdoc")}Array.from(e.childNodes).forEach((e=>e.remove()));const t=e.getAttribute(sm.WIN_ID_ATTRIBUTE_NAME);if(this.options.frames&&t){const r=this.options.frames.find((e=>e.windowId==t));r&&await async function(e,t,r,n,o){o.insertSingleFileComment=!1,o.insertCanonicalLink=!1,o.insertMetaNoIndex=!1,o.saveFavicon=!1,o.url=e.baseURI,o.windowId=r,e.content&&(o.content=e.content,o.canvases=e.canvases,o.fonts=e.fonts,o.stylesheets=e.stylesheets,o.images=e.images,o.posters=e.posters,o.videos=e.videos,o.usedFonts=e.usedFonts,o.shadowRoots=e.shadowRoots,e.runner=new xm(o),e.frameElement=t,await e.runner.loadPage(),await e.runner.initialize(),e.maxResources=n.getMaxResources())}(r,e,t,this.batchRequest,Object.create(this.options))}})))}}insertShadowRootContents(){const e=this.doc,t=this.options;if(t.shadowRoots&&t.shadowRoots.length){!function r(n){Array.from(n.querySelectorAll("["+sm.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((n=>{const o=n.getAttribute(sm.SHADOW_ROOT_ATTRIBUTE_NAME);if(o){const i=t.shadowRoots[Number(o)];if(i){const t=e.createElement("template");t.setAttribute(_m,i.mode),i.adoptedStyleSheets&&i.adoptedStyleSheets.forEach((r=>{const n=e.createElement("style");n.textContent=r,t.appendChild(n)}));const o=sm.parseDocContent(i.content);if(o.head){const e=o.head.querySelector("meta[charset]");e&&e.remove(),o.head.childNodes.forEach((e=>t.appendChild(o.importNode(e,!0))))}o.body&&o.body.childNodes.forEach((e=>t.appendChild(o.importNode(e,!0)))),r(t),n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t)}}}))}(this.doc),t.blockScripts&&this.doc.querySelectorAll("script[data-template-shadow-root]").forEach((e=>e.remove()));const r=e.createElement("script");r.setAttribute(Im,""),r.textContent='(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[shadowroot]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("shadowroot")});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()',e.body.appendChild(r)}}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=sm.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=sm.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){sm.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=sm.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontDeclarations=new am,await Promise.all([...this.stylesheets].map((([,e])=>Dm.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>Dm.processStyle(e,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processPageResources(){this.options.blockImages&&this.doc.querySelectorAll("svg").forEach((e=>e.remove()));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,r,n])=>Dm.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,"image",this.cssVariables,this.styles,this.batchRequest,r,n)));e=e.concat([Dm.processXLinks(this.doc.querySelectorAll("use"),this.doc,this.baseURI,this.options,this.batchRequest),Dm.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),this.baseURI,this.options,this.batchRequest)]),e.push(Dm.processAttribute(this.doc.querySelectorAll("audio[src], audio > source[src]"),"src",this.baseURI,this.options,"audio",this.cssVariables,this.styles,this.batchRequest)),e.push(Dm.processAttribute(this.doc.querySelectorAll("video[src], video > source[src]"),"src",this.baseURI,this.options,"video",this.cssVariables,this.styles,this.batchRequest)),await Promise.all(e),this.options.saveFavicon&&Dm.processShortcutIcons(this.doc)}async processScripts(){await Promise.all(Array.from(this.doc.querySelectorAll("script[src]")).map((async e=>{let t,r;if(r=e.getAttribute("src"),this.options.saveOriginalURLs&&!Zm(r)&&e.setAttribute("data-sf-original-src",r),e.removeAttribute("integrity"),this.options.blockScripts)e.removeAttribute("src");else{e.textContent="";try{t=sm.resolveURL(r,this.baseURI)}catch(e){}if(tf(t)){e.removeAttribute("src");const r=await sm.getContent(t,{asBinary:!0,charset:this.charset!=Lm&&this.charset,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,baseURI:this.options.baseURI,blockMixedContent:this.options.blockMixedContent,expectedType:"script",acceptHeaders:this.options.acceptHeaders,networkTimeout:this.options.networkTimeout});r.data=Vm(t,r,this.options),e.setAttribute("src",r.data),"async"!=e.getAttribute("async")&&""!=e.getAttribute(sm.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async","")}}this.stats.add("processed","scripts",1)})))}removeAlternativeImages(){sm.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await sm.removeAlternativeFonts(this.doc,this.stylesheets,this.options.fontDeclarations,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(sm.WIN_ID_ATTRIBUTE_NAME);if(t){const r=this.options.frames.find((e=>e.windowId==t));if(r)if(this.options.frames=this.options.frames.filter((e=>e.windowId!=t)),r.runner&&""!=e.getAttribute(sm.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await r.runner.run();const t=await r.runner.getPageData();e.removeAttribute(sm.WIN_ID_ATTRIBUTE_NAME);let n="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(Cm)||t.content.match(Rm)||t.content.match(Tm))&&(n+=" allow-scripts allow-same-origin"),e.setAttribute("sandbox",n),"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(sm.WIN_ID_ATTRIBUTE_NAME),this.stats.add("discarded","frames",1)}})))}}replaceStylesheets(){this.doc.querySelectorAll("style").forEach((e=>{const t=this.stylesheets.get(e);t?(this.stylesheets.delete(e),e.textContent=Qm(t.stylesheet,this.options),t.mediaText&&(e.media=t.mediaText)):e.remove()})),this.doc.querySelectorAll("link[rel*=stylesheet]").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);const r=this.doc.createElement("style");t.mediaText&&(r.media=t.mediaText),r.textContent=Qm(t.stylesheet,this.options),e.parentElement.replaceChild(r,e)}else e.remove()}))}replaceStyleAttributes(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=this.styles.get(e);t?(this.styles.delete(e),e.setAttribute("style",Qm(t,this.options))):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 r="";this.cssVariables.forEach((({content:e,url:t},n)=>{this.cssVariables.delete(n),r&&(r+=";"),r+=`${Om+n}: `,this.options.saveOriginalURLs&&(r+=`/* original URL: ${t} */ `),r+=`url("${e}")`})),e.textContent=":root{"+r+"}"}}compressHTML(){let e;this.options.displayStats&&(e=sm.getContentSize(this.doc.documentElement.outerHTML)),sm.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:sm.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-sm.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"),r=this.doc.documentElement.style.getPropertyValue("-sf-transform-origin"),n=this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin"),o=this.doc.documentElement.style.getPropertyValue("-sf-min-height"),i=this.doc.documentElement.style.getPropertyPriority("-sf-min-height");this.doc.documentElement.style.setProperty("transform",e,t),this.doc.documentElement.style.setProperty("transform-origin",r,n),this.doc.documentElement.style.setProperty("min-height",o,i),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#",r=sm.parseXMLContent(e.content),n=r.querySelector("RDF > Description > originalurl"),o=r.querySelector("RDF > Description > archivetime");if(n&&(this.options.saveUrl=n.getAttributeNS(t,"resource")),o){const e=o.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]"),r=this.doc.querySelector("meta[name=author]"),n=this.doc.querySelector("meta[name=creator]"),o=this.doc.querySelector("meta[name=publisher]"),i=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:r&&r.content?r.content.trim():"",creator:n&&n.content?n.content.trim():"",publisher:o&&o.content?o.content.trim():"",heading:i&&i.textContent?i.textContent.trim():""},this.options.infobarContent=await Dm.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const zm="data:",Pm="about:blank",Mm=/(#.+?)$/,Om="--sf-img-",Um=524288;class Dm{static async evalTemplate(e="",t,r,n){const o=sm.parseURL(t.saveUrl);e=await Ym(e,"page-title",(()=>t.title||"No title"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-heading",(()=>t.info.heading||"No heading"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-language",(()=>t.info.lang||"No language"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-description",(()=>t.info.description||"No description"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-author",(()=>t.info.author||"No author"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-creator",(()=>t.info.creator||"No creator"),n,t.filenameReplacementCharacter),e=await Ym(e,"page-publisher",(()=>t.info.publisher||"No publisher"),n,t.filenameReplacementCharacter),await c(t.saveDate),await c(t.visitDate,"visit-"),e=await Ym(e,"url-hash",(()=>o.hash.substring(1)||"No hash"),n,t.filenameReplacementCharacter),e=await Ym(e,"url-host",(()=>o.host.replace(/\/$/,"")||"No host"),n,t.filenameReplacementCharacter),e=await Ym(e,"url-hostname",(()=>o.hostname.replace(/\/$/,"")||"No hostname"),n,t.filenameReplacementCharacter);const i=l(o.href);e=await Ym(e,"url-href",(()=>i||"No href"),void 0===n||n,t.filenameReplacementCharacter),e=await Ym(e,"url-href-digest-sha-1",i?async()=>sm.digest("SHA-1",i):"No href",n,t.filenameReplacementCharacter),e=await Ym(e,"url-href-flat",(()=>l(o.href)||"No href"),!1,t.filenameReplacementCharacter),e=await Ym(e,"url-referrer",(()=>l(t.referrer)||"No referrer"),void 0===n||n,t.filenameReplacementCharacter),e=await Ym(e,"url-referrer-flat",(()=>l(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await Ym(e,"url-password",(()=>o.password||"No password"),n,t.filenameReplacementCharacter),e=await Ym(e,"url-pathname",(()=>l(o.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===n||n,t.filenameReplacementCharacter),e=await Ym(e,"url-pathname-flat",(()=>l(o.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await Ym(e,"url-port",(()=>o.port||"No port"),n,t.filenameReplacementCharacter),e=await Ym(e,"url-protocol",(()=>o.protocol||"No protocol"),n,t.filenameReplacementCharacter),e=await Ym(e,"url-search",(()=>o.search.substring(1)||"No search"),n,t.filenameReplacementCharacter);const a=sm.getSearchParams(o.search);for(const[r,o]of a)e=await Ym(e,"url-search-"+r,(()=>o||""),n,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await Ym(e,"url-username",(()=>o.username||"No username"),n,t.filenameReplacementCharacter),e=await Ym(e,"tab-id",(()=>String(t.tabId||"No tab id")),n,t.filenameReplacementCharacter),e=await Ym(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),n,t.filenameReplacementCharacter),e=await Ym(e,"url-last-segment",(()=>l(function(e,t){let r=e.pathname.match(/\/([^/]+)$/),n=r&&r[0];n||(r=e.href.match(/([^/]+)\/?$/),n=r&&r[0]);n||(r=n.match(/(.*)\.[^.]+$/),n=r&&r[0]);n||(n=e.hostname.replace(/\/+/g,t).replace(/\/$/,""));r=n.match(/(.*)\.[^.]+$/),r&&r[1]&&(n=r[1]);return n=n.replace(/\/$/,"").replace(/^\//,""),n}(o,t.filenameReplacementCharacter))||"No last segment"),n,t.filenameReplacementCharacter),r&&(e=await Ym(e,"digest-sha-256",(async()=>sm.digest("SHA-256",r)),n,t.filenameReplacementCharacter),e=await Ym(e,"digest-sha-384",(async()=>sm.digest("SHA-384",r)),n,t.filenameReplacementCharacter),e=await Ym(e,"digest-sha-512",(async()=>sm.digest("SHA-512",r)),n,t.filenameReplacementCharacter));const s=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await Ym(e,"bookmark-pathname",(()=>s),void 0===n||n,t.filenameReplacementCharacter),e=await Ym(e,"bookmark-pathname-flat",(()=>s),!1,t.filenameReplacementCharacter),(e=await Ym(e,"profile-name",(()=>t.profileName),n,t.filenameReplacementCharacter)).trim();function l(e){try{return decodeURI(e)}catch(t){return e}}async function c(r,o=""){r&&(e=await Ym(e,o+"datetime-iso",(()=>r.toISOString()),n,t.filenameReplacementCharacter),e=await Ym(e,o+"date-iso",(()=>r.toISOString().split("T")[0]),n,t.filenameReplacementCharacter),e=await Ym(e,o+"time-iso",(()=>r.toISOString().split("T")[1].split("Z")[0]),n,t.filenameReplacementCharacter),e=await Ym(e,o+"date-locale",(()=>r.toLocaleDateString()),n,t.filenameReplacementCharacter),e=await Ym(e,o+"time-locale",(()=>r.toLocaleTimeString()),n,t.filenameReplacementCharacter),e=await Ym(e,o+"day-locale",(()=>String(r.getDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"month-locale",(()=>String(r.getMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"year-locale",(()=>String(r.getFullYear())),n,t.filenameReplacementCharacter),e=await Ym(e,o+"datetime-locale",(()=>r.toLocaleString()),n,t.filenameReplacementCharacter),e=await Ym(e,o+"datetime-utc",(()=>r.toUTCString()),n,t.filenameReplacementCharacter),e=await Ym(e,o+"day-utc",(()=>String(r.getUTCDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"month-utc",(()=>String(r.getUTCMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"year-utc",(()=>String(r.getUTCFullYear())),n,t.filenameReplacementCharacter),e=await Ym(e,o+"hours-locale",(()=>String(r.getHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"minutes-locale",(()=>String(r.getMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"seconds-locale",(()=>String(r.getSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"hours-utc",(()=>String(r.getUTCHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"minutes-utc",(()=>String(r.getUTCMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"seconds-utc",(()=>String(r.getUTCSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Ym(e,o+"time-ms",(()=>String(r.getTime())),n,t.filenameReplacementCharacter))}}static setBackgroundImage(e,t,r){e.style.setProperty("background-blend-mode","normal","important"),e.style.setProperty("background-clip","content-box","important"),e.style.setProperty("background-position",r&&r["background-position"]?r["background-position"]:"center","important"),e.style.setProperty("background-color",r&&r["background-color"]?r["background-color"]:"transparent","important"),e.style.setProperty("background-image",t,"important"),e.style.setProperty("background-size",r&&r["background-size"]?r["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=Km(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=Km(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 r=e.children.head;r;r=r.next){const e=r.data;"Raw"==e.type&&e.value&&e.value.trim().startsWith("//")&&t.push(r)}t.forEach((t=>e.children.remove(t)))}static async resolveImportURLs(e,t,r,n,o=new im){let i;Dm.resolveStylesheetURLs(e,t,n);const a=(s=e,lm.findAll(s,(e=>"Atrule"==e.type&&"import"==e.name)));var s;return await Promise.all(a.map((async e=>{const a=lm.find(e,(e=>"Url"==e.type))||lm.find(e,(e=>"String"==e.type));if(a){let c=Wm(a.value);if(!Xm(c)&&ef(c)){a.value=sm.EMPTY_RESOURCE;try{c=sm.resolveURL(c,t)}catch(e){}if(tf(c)&&!o.has(c)){const t=await async function(e){const t=await sm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,validateTextContentType:!0,frameId:r.frameId,charset:r.charset,resourceReferrer:r.resourceReferrer,baseURI:r.baseURI,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout});return $m(t.data,t.charset)||$m(t.data,r.charset)?t:(r=Object.assign({},r,{charset:Gm(t.data)}),sm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,validateTextContentType:!0,frameId:r.frameId,charset:r.charset,resourceReferrer:r.resourceReferrer,baseURI:r.baseURI,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout}))}(c);c=t.resourceURL,t.data=Vm(c,t,r),t.data&&t.data.match(/^<!doctype /i)&&(t.data="");const a=lm.find(e,(e=>"MediaQueryList"==e.type));a&&(t.data=(s=t.data,(l=lm.generate(a))?"@media "+l+"{ "+s+" }":s));const u=lm.parse(t.data,{context:"stylesheet",parseCustomProperty:!0}),h=new im(o);h.add(c),await Dm.resolveImportURLs(u,c,r,n,h);for(let t of Object.keys(u))e[t]=u[t];i=!0}}}var s,l}))),i}static resolveStylesheetURLs(e,t,r){Jm(e).map((e=>{const n=e.value;let o=Wm(n);if(r.textContent='tmp { content:"'+o+'"}',r.sheet&&r.sheet.cssRules&&(o=sm.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content"))),!Xm(o))if(!o||ef(o)){let r;if(!n.startsWith("#"))try{r=sm.resolveURL(o,t)}catch(e){}tf(r)&&(e.value=r)}else e.value=sm.EMPTY_RESOURCE}))}static async resolveLinkStylesheetURLs(e,t,r,n){if((e=Wm(e))&&e!=t&&e!=Pm){const o=await sm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,charset:r.charset,frameId:r.frameId,resourceReferrer:r.resourceReferrer,validateTextContentType:!0,baseURI:t,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout});if(!$m(o.data,o.charset)&&!$m(o.data,r.charset))return r=Object.assign({},r,{charset:Gm(o.data)}),Dm.resolveLinkStylesheetURLs(e,t,r,n);e=o.resourceURL,o.data=Vm(o.resourceURL,o,r),o.data&&o.data.match(/^<!doctype /i)&&(o.data="");let i=lm.parse(o.data,{context:"stylesheet",parseCustomProperty:!0});return await Dm.resolveImportURLs(i,e,r,n)&&(i=lm.parse(lm.generate(i),{context:"stylesheet",parseCustomProperty:!0})),i}}static async processStylesheet(e,t,r,n,o){const i=[],a=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?a.push(l):e.block&&e.block.children&&("Rule"==e.type?i.push(this.processStyle(e,t,r,n,o)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&i.push(s(e)):i.push(this.processStylesheet(e.block.children,t,r,n,o)))}async function s(e){const n=Jm(e);await Promise.all(n.map((async e=>{const n=e.value;if(r.blockFonts)e.value=sm.EMPTY_RESOURCE;else{const i=Wm(n);if(!Xm(i)&&tf(i)){let{content:a}=await o.addURL(i,{asBinary:!0,expectedType:"font",baseURI:t,blockMixedContent:r.blockMixedContent}),s=r.fontDeclarations.get(e);s||(s=[],r.fontDeclarations.set(e,s)),s.push(i),!Zm(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+JSON.stringify(n)+") "+a:e.value=a}}})))}a.forEach((t=>e.remove(t))),await Promise.all(i)}static async processStyle(e,t,r,n,o){const i=Jm(e);await Promise.all(i.map((async e=>{const t=e.value;if(r.blockImages)e.value=sm.EMPTY_RESOURCE;else{const i=Wm(t);if(!Xm(i)&&tf(i)){let{content:a,indexResource:s,duplicate:l}=await o.addURL(i,{asBinary:!0,expectedType:"image",groupDuplicates:r.groupDuplicateImages});if(!t.startsWith("#")){const o=r.maxSizeDuplicateImages||Um;if(l&&r.groupDuplicateImages&&sm.getContentSize(a)<o){const r=lm.parse("var("+Om+s+")",{context:"value"});for(let t of Object.keys(r.children.head.data))e[t]=r.children.head.data[t];n.set(s,{content:a,url:t})}else!Zm(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+JSON.stringify(t)+") "+a:e.value=a}}}})))}static async processAttribute(e,t,r,n,o,i,a,s,l,c){function u(e,t,r){"video"==r||"audio"==r?e.removeAttribute(t):e.setAttribute(t,sm.EMPTY_RESOURCE)}await Promise.all(Array.from(e).map((async e=>{let h=e.getAttribute(t);if(null!=h){h=Wm(h);let d=e.dataset.singleFileOriginURL;if(n.saveOriginalURLs&&!Zm(h)&&e.setAttribute("data-sf-original-"+t,h),delete e.dataset.singleFileOriginURL,n["block"+o.charAt(0).toUpperCase()+o.substring(1)+"s"])u(e,t,o);else if(!Xm(h)&&(u(e,t,o),ef(h))){try{h=sm.resolveURL(h,r)}catch(e){}if(tf(h)){let{content:u,indexResource:p,duplicate:m}=await s.addURL(h,{asBinary:!0,expectedType:o,groupDuplicates:n.groupDuplicateImages&&"IMG"==e.tagName&&"src"==t});if(d&&u==sm.EMPTY_RESOURCE){try{d=sm.resolveURL(d,r)}catch(e){}try{h=d,u=(await sm.getContent(h,{asBinary:!0,expectedType:o,maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,frameId:n.windowId,resourceReferrer:n.resourceReferrer,acceptHeaders:n.acceptHeaders,networkTimeout:n.networkTimeout})).data}catch(e){}}if(c&&u==sm.EMPTY_RESOURCE)e.remove();else if(u!==sm.EMPTY_RESOURCE){if(!Am.filter((e=>u.startsWith(e))).length){const r=u.startsWith(Sm),s=n.maxSizeDuplicateImages||Um;if("image"==o&&l&&m&&!r&&sm.getContentSize(u)<s)if(Dm.replaceImageSource(e,Om+p,n)){i.set(p,{content:u,url:d});const t=lm.parse(e.getAttribute("style"),{context:"declarationList",parseCustomProperty:!0});a.set(e,t)}else e.setAttribute(t,u);else e.setAttribute(t,u)}}}}}})))}static async processXLinks(e,t,r,n,o){let i="xlink:href";await Promise.all(Array.from(e).map((async e=>{let t=e.getAttribute(i);null==t&&(i="href",t=e.getAttribute(i)),n.saveOriginalURLs&&!Zm(t)&&e.setAttribute("data-sf-original-href",t);let a=Wm(t);if(n.blockImages)e.setAttribute(i,sm.EMPTY_RESOURCE);else if(ef(a)&&!Xm(a)){e.setAttribute(i,sm.EMPTY_RESOURCE);try{a=sm.resolveURL(a,r)}catch(e){}if(tf(a)){const n=t.match(Mm);if(t.startsWith(r+"#"))e.setAttribute(i,n[0]);else{const t=await o.addURL(a,{expectedType:"image"}),r=sm.parseSVGContent(t.content);if(n&&n[0]){let t;try{t=r.querySelector(n[0])}catch(e){}t&&(e.setAttribute(i,n[0]),e.parentElement.insertBefore(t,e.parentElement.firstChild))}else{const t=await o.addURL(a,{expectedType:"image"});e.setAttribute(i,"data:image/svg+xml,"+t)}}}}else a==n.url&&e.setAttribute(i,t.substring(a.length))})))}static async processSrcset(e,t,r,n){await Promise.all(Array.from(e).map((async e=>{const o=e.getAttribute("srcset"),i=sm.parseSrcset(o);if(r.saveOriginalURLs&&!Zm(o)&&e.setAttribute("data-sf-original-srcset",o),r.blockImages)e.setAttribute("srcset","");else{const r=await Promise.all(i.map((async e=>{let r=Wm(e.url);if(Xm(r))return r+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(ef(r)){try{r=sm.resolveURL(r,t)}catch(e){}if(tf(r)){const{content:t}=await n.addURL(r,{asBinary:!0,expectedType:"image"});return Am.filter((e=>t.startsWith(e))).length?"":t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute("srcset",r.join(", "))}})))}static replaceImageSource(e,t,r){if(e.getAttribute(sm.IMAGE_ATTRIBUTE_NAME)){const n=r.images[Number(e.getAttribute(sm.IMAGE_ATTRIBUTE_NAME))];if(n&&n.replaceable){e.setAttribute("src",`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="${n.size.pxWidth}" height="${n.size.pxHeight}"><rect fill-opacity="0"/></svg>`);const r={};return("content"==n.objectFit||"cover"==n.objectFit)&&n.objectFit&&(r["background-size"]=n.objectFit),n.objectPosition&&(r["background-position"]=n.objectPosition),n.backgroundColor&&(r["background-color"]=n.backgroundColor),Dm.setBackgroundImage(e,"var("+t+")",r),e.removeAttribute(sm.IMAGE_ATTRIBUTE_NAME),!0}}}}const Fm="blob:",qm=/^https?:\/\//,Bm=/^file:\/\//,jm=/^https?:\/\/+\s*$/,Hm=/^(https?:\/\/|file:\/\/|blob:).+/;function Vm(e,t,r){return r.rootDocument&&r.updatedResources[e]?(r.updatedResources[e].retrieved=!0,r.updatedResources[e].content):t.data||""}function Wm(e){return!e||e.startsWith(zm)?e:e.split("#")[0]}function $m(e,t="utf-8"){const r=Gm(e);return!r||r==t.toLowerCase()}function Gm(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function Ym(e,t,r,n,o){let i,a;if(e){const s="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let l=new RegExp(s+"\\[\\d+(ch)?\\]","g");if(e.match(l)){const t=e.match(l)[0];t.match(/\[(\d+)\]$/)?(i=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(i)||i<=0)&&(i=null)):(a=Number(t.match(/\[(\d+)ch\]$/)[1]),(isNaN(a)||a<=0)&&(a=null))}else l=new RegExp(s,"g");if(e.match(l)){let t=await r();return n||(t=t.replace(/\/+/g,o)),i?t=await sm.truncateText(t,i):a&&(t=t.substring(0,a)),e.replace(l,t)}}return e}function Jm(e){return lm.findAll(e,(e=>"Url"==e.type))}function Qm(e,t){let r=lm.generate(e);return t.compressCSS&&(r=sm.compressCSS(r)),t.saveOriginalURLs&&(r=function(e){return e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"/* original URL: $1 */url(")}(r)),r}function Km(e){return(e=e.filter((e=>e.href!=sm.EMPTY_RESOURCE))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function Zm(e){return e&&(e.startsWith(zm)||e.startsWith(Fm))}function Xm(e){return e&&(e.startsWith(zm)||e==Pm)}function ef(e){return e&&!e.match(jm)}function tf(e){return ef(e)&&(e.match(qm)||e.match(Bm)||e.startsWith(Fm))&&e.match(Hm)}const rf={discarded:{"HTML bytes":0,"hidden elements":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,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0}};class nf{constructor(e){this.options=e,e.displayStats&&(this.data=JSON.parse(JSON.stringify(rf)))}set(e,t,r){this.options.displayStats&&(this.data[e][t]=r)}add(e,t,r){this.options.displayStats&&(this.data[e][t]+=r)}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 of=1048576,af=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],sf=globalThis.URL,lf=globalThis.DOMParser,cf=globalThis.Blob,uf=globalThis.FileReader,hf=(e,t)=>globalThis.fetch(e,t),df=globalThis.crypto,pf=globalThis.TextDecoder,mf=globalThis.TextEncoder;function ff(e){return(e=e||{}).fetch=e.fetch||hf,e.frameFetch=e.frameFetch||e.fetch||hf,{getContent:async function(t,r){let n,o,i,a;const s=e.fetch,l=e.frameFetch;if(r.blockMixedContent&&/^https:/i.test(r.baseURI)&&!/^https:/i.test(t))return gf(t,r);i=r.networkTimeout?new Promise(((e,t)=>{a=e,o=globalThis.setTimeout((()=>t(new Error("network timeout"))),r.networkTimeout)})):new Promise((e=>{a=e}));try{const e=r.acceptHeaders?r.acceptHeaders[r.expectedType]:"*/*";if(r.frameId)try{n=await Promise.race([l(t,{frameId:r.frameId,referrer:r.resourceReferrer,headers:{accept:e}}),i])}catch(r){n=await Promise.race([s(t,{headers:{accept:e}}),i])}else n=await Promise.race([s(t,{referrer:r.resourceReferrer,headers:{accept:e}}),i])}catch(e){return gf(t,r)}finally{a(),r.networkTimeout&&globalThis.clearTimeout(o)}let c;try{c=await n.arrayBuffer()}catch(e){return{data:r.asBinary?$:"",resourceURL:t}}t=n.url||t;let u,h="";try{const e=new dd(n.headers.get("content-type"));h=e.type+"/"+e.subtype,u=e.parameters.get("charset")}catch(e){}h||(h=function(e,t){if("image"==e){if(r([255,255,255,255],[0,0,1,0]))return"image/x-icon";if(r([255,255,255,255],[0,0,2,0]))return"image/x-icon";if(r([255,255],[78,77]))return"image/bmp";if(r([255,255,255,255,255,255],[71,73,70,56,57,97]))return"image/gif";if(r([255,255,255,255,255,255],[71,73,70,56,59,97]))return"image/gif";if(r([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(r([255,255,255,255,255,255,255,255],[137,80,78,71,13,10,26,10]))return"image/png";if(r([255,255,255],[255,216,255]))return"image/jpeg"}if("font"==e){if(r([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(r([255,255,255,255],[0,1,0,0]))return"font/ttf";if(r([255,255,255,255],[79,84,84,79]))return"font/otf";if(r([255,255,255,255],[116,116,99,102]))return"font/collection";if(r([255,255,255,255],[119,79,70,70]))return"font/woff";if(r([255,255,255,255],[119,79,70,50]))return"font/woff2"}function r(e,r){let n=!0,o=0;if(t.byteLength>=r.length){const i=new Uint8Array(t,0,e.length);for(o=0;o<e.length&&n;o++)n=n&&(i[o]&e[o])==r[o];return n}}}(r.expectedType,c));!u&&r.charset&&(u=r.charset);if(r.asBinary){if(n.status>=400)return gf(t,r);try{return r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*of?gf(t,r):gf(t,r,c,null,h)}catch(e){return gf(t,r)}}else{if(n.status>=400||r.validateTextContentType&&h&&!h.startsWith("text/"))return gf(t,r);if(u||(u="utf-8"),r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*of)return gf(t,r,null,u);try{return gf(t,r,c,u,h)}catch(e){return gf(t,r,null,u)}}},parseURL:(e,t)=>void 0===t?new sf(e):new sf(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getSearchParams:e=>Array.from(new URLSearchParams(e)),getValidFilename:(e,t=af,r="_")=>(t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),r))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+r).replace(/\/\./g,"/"+r)),parseDocContent(e,t){const r=(new lf).parseFromString(e,"text/html");r.head||r.documentElement.insertBefore(r.createElement("HEAD"),r.body);let n=r.querySelector("base");return n&&n.getAttribute("href")||(n&&n.remove(),n=r.createElement("base"),n.setAttribute("href",t),r.head.insertBefore(n,r.head.firstChild)),r},parseXMLContent:e=>(new lf).parseFromString(e,"text/xml"),parseSVGContent(e){const t=(new lf).parseFromString(e,"image/svg+xml");return t.querySelector("parsererror")?(new lf).parseFromString(e,"text/html"):t},async digest(e,t){try{return function(e){const t=[],r=new DataView(e);for(let e=0;e<r.byteLength;e+=4){const n="00000000",o=(n+r.getUint32(e).toString(16)).slice(-n.length);t.push(o)}return t.join("")}(await df.subtle.digest(e,new mf("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new cf([e]).size,truncateText(e,t){const r=new cf([e]),n=new uf;return n.readAsText(r.slice(0,t)),new Promise(((r,o)=>{n.addEventListener("load",(()=>{e.startsWith(n.result)?r(n.result):this.truncateText(e,t-1).then(r).catch(o)}),!1),n.addEventListener("error",o,!1)}))},minifyHTML:(e,t)=>Gp(e,t),minifyCSSRules:(e,t,r)=>_p(e,t,r),removeUnusedFonts:(e,t,r,n)=>Wd(e,t,r,n),removeAlternativeFonts:(e,t,r,n)=>Id(e,t,r,n),getMediaAllInfo:(e,t,r)=>dp(e,t,r),compressCSS:(e,t)=>id(e,t),minifyMedias:e=>Ap(e),removeAlternativeImages:e=>Pp(e),parseSrcset:e=>sd(e),preProcessDoc:(e,t,r)=>J(e,t,r),postProcessDoc(e,t,r){te(e,t,r)},serialize:(e,t)=>em(e,t),removeQuotes:e=>ie(e),ON_BEFORE_CAPTURE_EVENT_NAME:y,ON_AFTER_CAPTURE_EVENT_NAME:b,WIN_ID_ATTRIBUTE_NAME:S,REMOVED_CONTENT_ATTRIBUTE_NAME:k,HIDDEN_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_FRAME_ATTRIBUTE_NAME:x,IMAGE_ATTRIBUTE_NAME:T,POSTER_ATTRIBUTE_NAME:C,VIDEO_ATTRIBUTE_NAME:R,CANVAS_ATTRIBUTE_NAME:_,STYLE_ATTRIBUTE_NAME:I,INPUT_VALUE_ATTRIBUTE_NAME:L,SHADOW_ROOT_ATTRIBUTE_NAME:A,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:E,STYLESHEET_ATTRIBUTE_NAME:z,SELECTED_CONTENT_ATTRIBUTE_NAME:M,INVALID_ELEMENT_ATTRIBUTE_NAME:O,COMMENT_HEADER:H,COMMENT_HEADER_LEGACY:V,SINGLE_FILE_UI_ELEMENT_CLASS:W,EMPTY_RESOURCE:$}}async function gf(e,t,r,n,o){if(r)if(t.asBinary){const e=new uf;e.readAsDataURL(new cf([r],{type:o+(t.charset?";charset="+t.charset:"")})),r=await new Promise(((t,r)=>{e.addEventListener("load",(()=>t(e.result)),!1),e.addEventListener("error",r,!1)}))}else{const e=new Uint8Array(r.slice(0,4));132==e[0]&&49==e[1]&&149==e[2]&&51==e[3]?n="gb18030":255==e[0]&&254==e[1]?n="utf-16le":254==e[0]&&255==e[1]&&(n="utf-16be");try{r=new pf(n).decode(r)}catch(e){r=new pf(n="utf-8").decode(r)}}else r=t.asBinary?$:"";return{data:r,resourceURL:e,charset:n}}function yf(t){e.SingleFile=function(...e){return[sm,lm]=e,cm}(ff(t),Su)}e.SingleFile=void 0,e.getPageData=async function(t={},r,n=globalThis.document,o=globalThis){const i=at;let a;if(yf(r),n&&o){Y(n);const e=[];if(!t.saveRawPage){if(!t.removeFrames&&i&&globalThis.frames&&globalThis.frames.length){let r;r=t.loadDeferredImages?new Promise((e=>globalThis.setTimeout((()=>e(i.getAsync(t))),t.loadDeferredImagesMaxIdleTime-i.TIMEOUT_INIT_REQUEST_MESSAGE))):i.getAsync(t),e.push(r)}t.loadDeferredImages&&e.push(ke(t))}[t.frames]=await Promise.all(e),a=t.frames&&t.frames.sessionId}t.doc=n,t.win=o,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&n&&o&&t.loadDeferredImages&&ve(t)};const s=new e.SingleFile(t);return await s.run(),a&&i.cleanup(a),await s.getPageData()},e.helper=le,e.init=yf,e.modules=om,e.processors=st,e.vendor=pd,Object.defineProperty(e,"__esModule",{value:!0})}));