| 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-deferred-images-start",r="single-file-load-deferred-images-end",n="single-file-load-deferred-images-keep-zoom-level-start",o="single-file-load-deferred-images-keep-zoom-level-end",i="single-file-load-deferred-images-keep-zoom-level-reset",a="single-file-load-deferred-images-reset",s="single-file-block-cookies-start",l="single-file-block-cookies-end",c="single-file-dispatch-scroll-event-start",u="single-file-dispatch-scroll-event-end",h="single-file-block-storage-start",d="single-file-block-storage-end",p="single-file-load-image",m="single-file-image-loaded",f=(e,t,r)=>globalThis.addEventListener(e,t,r),g=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},y=globalThis.CustomEvent,b=globalThis.document,k=globalThis.Document,v=globalThis.JSON;let w;function x(){return Array.from(w.values())}function A(e){e.loadDeferredImagesBlockCookies&&g(new y(s)),e.loadDeferredImagesBlockStorage&&g(new y(h)),e.loadDeferredImagesDispatchScrollEvent&&g(new y(c)),e.loadDeferredImagesKeepZoomLevel?g(new y(n)):g(new y(t))}function E(e){e.loadDeferredImagesBlockCookies&&g(new y(l)),e.loadDeferredImagesBlockStorage&&g(new y(d)),e.loadDeferredImagesDispatchScrollEvent&&g(new y(u)),e.loadDeferredImagesKeepZoomLevel?g(new y(o)):g(new y(r))}function S(e){e.loadDeferredImagesKeepZoomLevel?g(new y(i)):g(new y(a))}w=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,b instanceof k&&(f("single-file-new-font-face",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,w.set(v.stringify(r),t)})),f("single-file-delete-font",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,w.delete(v.stringify(r))})),f("single-file-clear-fonts",(()=>w=new Map)));var T=Object.freeze({__proto__:null,getFontsData:x,loadDeferredImagesStart:A,loadDeferredImagesEnd:E,loadDeferredImagesResetZoomLevel:S,LOAD_IMAGE_EVENT:p,IMAGE_LOADED_EVENT:m});const C="[\\x20\\t\\r\\n\\f]",R=new RegExp("\\\\([\\da-f]{1,6}"+C+"?|("+C+")|.)","ig");function _(e){return e.replace(R,((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 I=Object.freeze({__proto__:null,process:_});const L="single-file-on-before-capture",N="single-file-on-after-capture",z="data-single-file-removed-content",P="data-single-file-hidden-content",M="data-single-file-kept-content",O="data-single-file-hidden-frame",U="data-single-file-preserved-space-element",D="data-single-file-shadow-root-element",F="data-single-file-win-id",q="data-single-file-image",B="data-single-file-poster",j="data-single-file-video",H="data-single-file-canvas",V="data-single-file-movable-style",W="data-single-file-input-value",$="data-single-file-lazy-loaded-src",G="data-single-file-stylesheet",Y="data-single-file-disabled-noscript",Q="data-single-file-selected-content",K="data-single-file-invalid-element",J="data-single-file-async-script",Z="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",X=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD","BODY"],ee=/^'(.*?)'$/,te=/^"(.*?)"$/,re={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},ne="Page saved with SingleFile",oe="Archive processed by SingleFile",ie="single-file-ui-element",ae="data:,",se=(e,t,r)=>globalThis.addEventListener(e,t,r),le=globalThis.JSON;function ce(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function ue(e,t,r){e.querySelectorAll("noscript:not(["+Y+"])").forEach((e=>{e.setAttribute(Y,e.textContent),e.textContent=""})),ce(e),e.head&&e.head.querySelectorAll(Z).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+Z+", html > body > "+Z);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").forEach((t=>{const r=e.createElement("template");r.setAttribute(K,""),r.content.appendChild(t.cloneNode(!0)),n.set(t,r),t.replaceWith(r)})),o=he(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const r=Ae(t,e);r&&fe(e,r)&&(e.setAttribute(V,""),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],markedElements:[]},{canvases:o.canvases,fonts:x(),stylesheets:ye(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 he(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=Ae(e,r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(s=(i||r.closest("html > head"))&&X.includes(r.tagName)||r.closest("details"),s||(a=i||fe(r,l),a&&(r.setAttribute(P,""),o.markedElements.push(r)))),!a)){if(n.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(r.setAttribute(U,""),o.markedElements.push(r))}n.removeUnusedFonts&&(de(l,n,o.usedFonts),de(Ae(e,r,":first-letter"),n,o.usedFonts),de(Ae(e,r,":before"),n,o.usedFonts),de(Ae(e,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(H,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if("IMG"==r.tagName){const t={currentSrc:i?ae:n.loadDeferredImages&&r.getAttribute($)||r.currentSrc};if(o.images.push(t),r.setAttribute(q,o.images.length-1),o.markedElements.push(r),r.removeAttribute($),a=a||Ae(e,r)){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute("style");if(r=r||Ae(e,t)){let e,a,s,l,c,u,h,d,p=!1;if("content-box"==r.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"),p=t.clientWidth!=n,e?t.style.setProperty("box-sizing",e,r):t.style.removeProperty("box-sizing")}e=be("padding-left",r),a=be("padding-right",r),s=be("padding-top",r),l=be("padding-bottom",r),p?(c=be("border-left-width",r),u=be("border-right-width",r),h=be("border-top-width",r),d=be("border-bottom-width",r)):c=u=h=d=0,n=Math.max(0,t.clientWidth-e-a-c-u),o=Math.max(0,t.clientHeight-s-l-h-d),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=Ae(e,r.parentNode);o.videos.push({positionParent:t&&t.getPropertyValue("position"),src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(j,o.videos.length-1)}if(!r.getAttribute("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(B,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}"IFRAME"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(O,""),o.markedElements.push(r));"INPUT"==r.tagName&&("password"!=r.type&&(r.setAttribute(W,r.value),o.markedElements.push(r)),"radio"!=r.type&&"checkbox"!=r.type||(r.setAttribute(W,r.checked),o.markedElements.push(r)));"TEXTAREA"==r.tagName&&(r.setAttribute(W,r.value),o.markedElements.push(r));"SELECT"==r.tagName&&r.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(W,""),o.markedElements.push(e))}));"SCRIPT"==r.tagName&&(r.async&&""!=r.getAttribute("async")&&"async"!=r.getAttribute("async")&&(r.setAttribute(J,""),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)&&pe(r);if(c&&!r.classList.contains(ie)){const i={};r.setAttribute(D,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),he(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){}}he(e,t,r,n,o,a),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(s||""==r.getAttribute(M)?r.parentElement&&(r.parentElement.setAttribute(M,""),o.markedElements.push(r.parentElement)):a&&(r.setAttribute(z,""),o.markedElements.push(r)))})),o}function de(e,t,r){if(e){const n=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((o=>{if(o=me(o),!t.loadedFonts||t.loadedFonts.find((e=>me(e.family)==o&&e.style==n))){const t=we(e.getPropertyValue("font-weight")),i=e.getPropertyValue("font-variant")||"normal",a=[o,t,n,i];r.set(le.stringify(a),[o,t,n,i])}}))}}function pe(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 me(e=""){return ve(_(e.trim())).toLowerCase()}function fe(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 ge(e,t,r){if(e.querySelectorAll("["+Y+"]").forEach((e=>{e.textContent=e.getAttribute(Y),e.removeAttribute(Y)})),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=[z,O,P,U,q,B,j,H,W,D,G,J];t=e.querySelectorAll(r.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(z),e.removeAttribute(P),e.removeAttribute(M),e.removeAttribute(O),e.removeAttribute(U),e.removeAttribute(q),e.removeAttribute(B),e.removeAttribute(j),e.removeAttribute(H),e.removeAttribute(W),e.removeAttribute(D),e.removeAttribute(G),e.removeAttribute(J),e.removeAttribute(V)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function ye(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(G,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function be(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function ke(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 ve(e){return(e=e.match(ee)?e.replace(ee,"$1"):e.replace(te,"$1")).trim()}function we(e){return re[e.toLowerCase().trim()]||e}function xe(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?xe(t):t)),[])}function Ae(e,t,r){try{return e.getComputedStyle(t,r)}catch(e){}}var Ee=Object.freeze({__proto__:null,initUserScriptHandler:function(){se("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),r=new Promise((t=>se(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:ce,preProcessDoc:ue,postProcessDoc:ge,serialize:ke,removeQuotes:ve,flatten:xe,getFontWeight:we,normalizeFontFamily:me,getShadowRoot:pe,ON_BEFORE_CAPTURE_EVENT_NAME:L,ON_AFTER_CAPTURE_EVENT_NAME:N,WIN_ID_ATTRIBUTE_NAME:F,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:U,REMOVED_CONTENT_ATTRIBUTE_NAME:z,HIDDEN_CONTENT_ATTRIBUTE_NAME:P,HIDDEN_FRAME_ATTRIBUTE_NAME:O,IMAGE_ATTRIBUTE_NAME:q,POSTER_ATTRIBUTE_NAME:B,VIDEO_ATTRIBUTE_NAME:j,CANVAS_ATTRIBUTE_NAME:H,INPUT_VALUE_ATTRIBUTE_NAME:W,SHADOW_ROOT_ATTRIBUTE_NAME:D,STYLE_ATTRIBUTE_NAME:V,LAZY_SRC_ATTRIBUTE_NAME:$,STYLESHEET_ATTRIBUTE_NAME:G,SELECTED_CONTENT_ATTRIBUTE_NAME:Q,INVALID_ELEMENT_ATTRIBUTE_NAME:K,ASYNC_SCRIPT_ATTRIBUTE_NAME:J,COMMENT_HEADER:ne,COMMENT_HEADER_LEGACY:oe,SINGLE_FILE_UI_ELEMENT_CLASS:ie,EMPTY_RESOURCE:ae});const Se={LAZY_SRC_ATTRIBUTE_NAME:$,SINGLE_FILE_UI_ELEMENT_CLASS:ie},Te=10,Ce="attributes",Re=globalThis.browser,_e=globalThis.document,Ie=globalThis.MutationObserver,Le=(e,t,r)=>globalThis.addEventListener(e,t,r),Ne=(e,t,r)=>globalThis.removeEventListener(e,t,r),ze=new Map;let Pe;async function Me(e){if(_e.documentElement){ze.clear();const t=_e.body&&_e.body.scrollHeight||_e.documentElement.scrollHeight,r=_e.body&&_e.body.scrollWidth||_e.documentElement.scrollWidth;if(t>globalThis.innerHeight||r>globalThis.innerWidth){const n=Math.max(t-1.5*globalThis.innerHeight,0),o=Math.max(r-1.5*globalThis.innerWidth,0);if(globalThis.scrollY<n||globalThis.scrollX<o)return function(e){return Pe=0,new Promise((async t=>{let r;const n=new Set,o=new Ie((async t=>{if((t=t.filter((e=>e.type==Ce))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(Se.LAZY_SRC_ATTRIBUTE_NAME,e.target.src),e.target.addEventListener("load",a)),"src"==e.attributeName||"srcset"==e.attributeName||"SOURCE"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(Se.SINGLE_FILE_UI_ELEMENT_CLASS)})).length&&(r=!0,await De(o,e,c),n.size||await Ue(o,e,c))}}));async function i(t){await qe("idleTimeout",(async()=>{r?Pe<Te&&(Pe++,je("idleTimeout"),await i(Math.max(500,t/2))):(je("loadTimeout"),je("maxTimeout"),Fe(o,e,c))}),t,e.loadDeferredImagesNativeTimeout)}function a(e){const t=e.target;t.removeAttribute(Se.LAZY_SRC_ATTRIBUTE_NAME),t.removeEventListener("load",a)}async function s(t){r=!0,await De(o,e,c),await Ue(o,e,c),t.detail&&n.add(t.detail)}async function l(t){await De(o,e,c),await Ue(o,e,c),n.delete(t.detail),n.size||await Ue(o,e,c)}function c(e){o.disconnect(),Ne(p,s),Ne(m,l),t(e)}await i(2*e.loadDeferredImagesMaxIdleTime),await De(o,e,c),o.observe(_e,{subtree:!0,childList:!0,attributes:!0}),Le(p,s),Le(m,l),A(e)}))}(e)}}}function Oe(e){S(e)}async function Ue(e,t,r){await qe("loadTimeout",(()=>Fe(e,t,r)),t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function De(e,t,r){await qe("maxTimeout",(async()=>{await je("loadTimeout"),await Fe(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function Fe(e,t,r){await je("idleTimeout"),E(t),await qe("endTimeout",(async()=>{await je("maxTimeout"),r()}),t.loadDeferredImagesMaxIdleTime/2,t.loadDeferredImagesNativeTimeout),e.disconnect()}async function qe(e,t,r,n){if(Re&&Re.runtime&&Re.runtime.sendMessage&&!n){if(!ze.get(e)||!ze.get(e).pending){const n={callback:t,pending:!0};ze.set(e,n);try{await Re.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:r})}catch(n){Be(e,t,r)}n.pending=!1}}else Be(e,t,r)}function Be(e,t,r){const n=ze.get(e);n&&globalThis.clearTimeout(n),ze.set(e,t),globalThis.setTimeout(t,r)}async function je(e){if(Re&&Re.runtime&&Re.runtime.sendMessage)try{await Re.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){He(e)}else He(e)}function He(e){const t=ze.get(e);ze.delete(e),t&&globalThis.clearTimeout(t)}Re&&Re.runtime&&Re.runtime.onMessage&&Re.runtime.onMessage.addListener&&Re.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ze.get(e.type);if(t){ze.delete(e.type);try{t.callback()}catch(t){He(e.type)}}}}));var Ve=Object.freeze({__proto__:null,process:Me,resetZoomLevel:Oe});const We={ON_BEFORE_CAPTURE_EVENT_NAME:L,ON_AFTER_CAPTURE_EVENT_NAME:N,WIN_ID_ATTRIBUTE_NAME:F,preProcessDoc:ue,serialize:ke,postProcessDoc:ge,getShadowRoot:pe},$e="__frameTree__::",Ge='iframe, frame, object[type="text/html"][data]',Ye="*",Qe="singlefile.frameTree.initRequest",Ke="singlefile.frameTree.ackInitRequest",Je="singlefile.frameTree.cleanupRequest",Ze="singlefile.frameTree.initResponse",Xe="*",et=5e3,tt=".",rt=globalThis.window==globalThis.top,nt=globalThis.browser,ot=globalThis.top,it=globalThis.MessageChannel,at=globalThis.document,st=globalThis.JSON;let lt,ct=globalThis.sessions;var ut,ht,dt;function pt(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function mt(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,rt||(lt=globalThis.frameId=e.windowId),yt(at,e.options,lt,t),rt||(e.options.userScriptEnabled&&r&&await r(We.ON_BEFORE_CAPTURE_EVENT_NAME),wt({frames:[At(at,globalThis,lt,e.options)],sessionId:t,requestedFrameId:at.documentElement.dataset.requestedFrameId&<}),e.options.userScriptEnabled&&r&&await r(We.ON_AFTER_CAPTURE_EVENT_NAME),delete at.documentElement.dataset.requestedFrameId)}function ft(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;vt(Et(at),e.windowId,t)}}function gt(e){e.frames.forEach((t=>bt("responseTimeouts",e.sessionId,t.windowId)));const t=ct.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(tt).length-e.windowId.split(tt).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function yt(e,t,r,n){const o=Et(e);!function(e,t,r,n,o){const i=[];let a;ct.get(o)?a=ct.get(o).requestTimeouts:(a={},ct.set(o,{requestTimeouts:a}));t.forEach(((e,t)=>{const r=n+tt+t;e.setAttribute(We.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),wt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+tt+t;try{xt(e.contentWindow,{method:Qe,windowId:i,sessionId:o,options:r})}catch(e){}a[i]=globalThis.setTimeout((()=>wt({frames:[{windowId:i,processed:!0}],sessionId:o})),et)})),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+tt+t;let s;try{s=e.contentDocument}catch(e){}if(s)try{const t=e.contentWindow;t.stop(),bt("requestTimeouts",o,a),yt(s,r,a,o),i.push(At(s,t,a,r))}catch(e){i.push({windowId:a,processed:!0})}})),wt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function bt(e,t,r){const n=ct.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function kt(e,t){const r=ct.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>wt({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function vt(e,t,r){e.forEach(((e,n)=>{const o=t+tt+n;e.removeAttribute(We.WIN_ID_ATTRIBUTE_NAME);try{xt(e.contentWindow,{method:Je,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+tt+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{vt(Et(i),o,r)}catch(e){}}))}function wt(e){e.method=Ze;try{ot.singlefile.processors.frameTree.initResponse(e)}catch(t){xt(ot,e,!0)}}function xt(e,t,r){if(e==ot&&nt&&nt.runtime&&nt.runtime.sendMessage)nt.runtime.sendMessage(t);else if(r){const r=new it;e.postMessage($e+st.stringify({method:t.method,sessionId:t.sessionId}),Xe,[r.port2]),r.port1.postMessage(t)}else e.postMessage($e+st.stringify(t),Xe)}function At(e,t,r,n){const o=We.preProcessDoc(e,t,n),i=We.serialize(e);We.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 Et(e){let t=Array.from(e.querySelectorAll(Ge));return e.querySelectorAll(Ye).forEach((e=>{const r=We.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(Ge)))})),t}ct||(ct=globalThis.sessions=new Map),rt&&(lt="0",nt&&nt.runtime&&nt.runtime.onMessage&&nt.runtime.onMessage.addListener&&nt.runtime.onMessage.addListener((e=>e.method==Ze?(gt(e),Promise.resolve({})):e.method==Ke?(bt("requestTimeouts",e.sessionId,e.windowId),kt(e.sessionId,e.windowId),Promise.resolve({})):void 0))),ut="message",ht=async e=>{if("string"==typeof e.data&&e.data.startsWith($e)){e.preventDefault(),e.stopPropagation();const t=st.parse(e.data.substring($e.length));t.method==Qe?(e.source&&xt(e.source,{method:Ke,windowId:t.windowId,sessionId:t.sessionId}),rt||(globalThis.stop(),t.options.loadDeferredImages&&Me(t.options),await mt(t))):t.method==Ke?(bt("requestTimeouts",t.sessionId,t.windowId),kt(t.sessionId,t.windowId)):t.method==Je?ft(t):t.method==Ze&&ct.get(t.sessionId)&&(e.ports[0].onmessage=e=>gt(e.data))}},dt=!0,globalThis.addEventListener(ut,ht,dt);var St=Object.freeze({__proto__:null,getAsync:function(e){const t=pt();return e=st.parse(st.stringify(e)),new Promise((r=>{ct.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),mt({windowId:lt,sessionId:t,options:e})}))},getSync:function(e){const t=pt();e=st.parse(st.stringify(e)),ct.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,rt||(lt=globalThis.frameId=e.windowId);yt(at,e.options,lt,t),rt||(e.options.userScriptEnabled&&r&&r(We.ON_BEFORE_CAPTURE_EVENT_NAME),wt({frames:[At(at,globalThis,lt,e.options)],sessionId:t,requestedFrameId:at.documentElement.dataset.requestedFrameId&<}),e.options.userScriptEnabled&&r&&r(We.ON_AFTER_CAPTURE_EVENT_NAME),delete at.documentElement.dataset.requestedFrameId)}({windowId:lt,sessionId:t,options:e});const r=ct.get(t).frames;return r.sessionId=t,r},cleanup:function(e){ct.delete(e),ft({windowId:lt,sessionId:e,options:{sessionId:e}})},initResponse:gt,TIMEOUT_INIT_REQUEST_MESSAGE:et}),Tt=Object.freeze({__proto__:null,frameTree:St,hooksFrames:T,lazy:Ve}),Ct=Object.create,Rt=Object.defineProperty,_t=Object.defineProperties,It=Object.getOwnPropertyDescriptor,Lt=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,zt=Object.getOwnPropertySymbols,Pt=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Ut=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dt=(e,t)=>{for(var r in t||(t={}))Mt.call(t,r)&&Ut(e,r,t[r]);if(zt)for(var r of zt(t))Ot.call(t,r)&&Ut(e,r,t[r]);return e},Ft=(e,t)=>_t(e,Lt(t)),qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},jt=qt((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}})),Ht=qt((e=>{var t=jt();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}})),Vt=qt((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)}})),Wt=qt((e=>{var t=Vt(),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})),$t=qt((e=>{var t=Vt();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})),Gt=qt((e=>{var t=Ht(),r=Vt(),n=Wt().ArraySet,o=$t().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})),Yt={};Bt(Yt,{AtKeyword:()=>Zt,BadString:()=>tr,BadUrl:()=>nr,CDC:()=>ur,CDO:()=>cr,Colon:()=>hr,Comma:()=>pr,Comment:()=>vr,Delim:()=>or,Dimension:()=>sr,EOF:()=>Qt,Function:()=>Jt,Hash:()=>Xt,Ident:()=>Kt,LeftCurlyBracket:()=>br,LeftParenthesis:()=>gr,LeftSquareBracket:()=>mr,Number:()=>ir,Percentage:()=>ar,RightCurlyBracket:()=>kr,RightParenthesis:()=>yr,RightSquareBracket:()=>fr,Semicolon:()=>dr,String:()=>er,Url:()=>rr,WhiteSpace:()=>lr});var Qt=0,Kt=1,Jt=2,Zt=3,Xt=4,er=5,tr=6,rr=7,nr=8,or=9,ir=10,ar=11,sr=12,lr=13,cr=14,ur=15,hr=16,dr=17,pr=18,mr=19,fr=20,gr=21,yr=22,br=23,kr=24,vr=25;function wr(e){return e>=48&&e<=57}function xr(e){return wr(e)||e>=65&&e<=70||e>=97&&e<=102}function Ar(e){return e>=65&&e<=90}function Er(e){return function(e){return Ar(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function Sr(e){return Er(e)||wr(e)||45===e}function Tr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Cr(e){return 10===e||13===e||12===e}function Rr(e){return Cr(e)||32===e||9===e}function _r(e,t){return!(92!==e||Cr(t)||0===t)}function Ir(e,t,r){return 45===e?Er(t)||45===t||_r(t,r):!!Er(e)||92===e&&_r(e,t)}function Lr(e,t,r){return 43===e||45===e?wr(t)?2:46===t&&wr(r)?3:0:46===e?wr(t)?2:0:wr(e)?1:0}function Nr(e){return 65279===e||65534===e?1:0}var zr=new Array(128),Pr=130,Mr=131,Or=132,Ur=133;for(let e=0;e<zr.length;e++)zr[e]=Rr(e)&&Pr||wr(e)&&Mr||Er(e)&&Or||Tr(e)&&Ur||e||128;function Dr(e){return e<128?zr[e]:Or}function Fr(e,t){return t<e.length?e.charCodeAt(t):0}function qr(e,t,r){return 13===r&&10===Fr(e,t+1)?2:1}function Br(e,t,r){let n=e.charCodeAt(t);return Ar(n)&&(n|=32),n===r}function jr(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(Ar(i)&&(i|=32),i!==r)return!1}return!0}function Hr(e,t){for(;t<e.length&&Rr(e.charCodeAt(t));t++);return t}function Vr(e,t){for(;t<e.length&&wr(e.charCodeAt(t));t++);return t}function Wr(e,t){if(xr(Fr(e,(t+=2)-1))){for(let r=Math.min(e.length,t+5);t<r&&xr(Fr(e,t));t++);let r=Fr(e,t);Rr(r)&&(t+=qr(e,t,r))}return t}function $r(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!Sr(r)){if(_r(r,Fr(e,t+1))){t=Wr(e,t)-1;continue}break}}return t}function Gr(e,t){let r=e.charCodeAt(t);if((43===r||45===r)&&(r=e.charCodeAt(t+=1)),wr(r)&&(t=Vr(e,t+1),r=e.charCodeAt(t)),46===r&&wr(e.charCodeAt(t+1))&&(t=Vr(e,t+=2)),Br(e,t,101)){let n=0;r=e.charCodeAt(t+1),(45===r||43===r)&&(n=1,r=e.charCodeAt(t+2)),wr(r)&&(t=Vr(e,t+1+n+1))}return t}function Yr(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(41===r){t++;break}_r(r,Fr(e,t+1))&&(t=Wr(e,t))}return t}function Qr(e){if(1===e.length&&!xr(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 Kr=["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 Jr(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function Zr(e){let t=e.source,r=t.length,n=t.length>0?Nr(t.charCodeAt(0)):0,o=Jr(e.lines,r),i=Jr(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 Xr=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||Zr(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||Zr(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]}}}},en=16777215,tn=24,rn=new Map([[2,22],[21,22],[19,20],[23,24]]),nn=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=Jr(this.offsetAndType,e.length+1),o=Jr(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&en;for(s=o[e],a=s>>tn,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=rn.get(e),s=a<<tn|i}n[i++]=e<<tn|c,-1===l&&(l=t)})),n[i]=0|r,o[i]=r,o[r]=r;0!==s;){let e=s&en;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]>>tn:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&en:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&jr(this.source,this.offsetAndType[e-1]&en,this.offsetAndType[e]&en,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&en:this.offsetAndType[this.tokenCount]&en: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]&en,t=this.offsetAndType[t],this.tokenType=t>>tn,this.tokenEnd=t&en):(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>>tn,this.tokenEnd=e&en):(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]&en: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&en;r=i,e(o>>tn,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:Kr[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function on(e,t){function r(t){return t<s?e.charCodeAt(t):0}function n(){return c=Gr(e,c),Ir(r(c),r(c+1),r(c+2))?(a=12,void(c=$r(e,c))):37===r(c)?(a=11,void c++):void(a=10)}function o(){let t=c;return c=$r(e,c),jr(e,t,c,"url")&&40===r(c)?(c=Hr(e,c+1),34===r(c)||39===r(c)?(a=2,void(c=t+4)):void function(){for(a=7,c=Hr(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(Dr(t)){case 41:return void c++;case Pr:return c=Hr(e,c),41===r(c)||c>=e.length?void(c<e.length&&c++):(c=Yr(e,c),void(a=8));case 34:case 39:case 40:case Ur:return c=Yr(e,c),void(a=8);case 92:if(_r(t,r(c+1))){c=Wr(e,c)-1;break}return c=Yr(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(Dr(n)){case t:return void c++;case Pr:if(Cr(n))return c+=qr(e,c,n),void(a=6);break;case 92:if(c===e.length-1)break;let o=r(c+1);Cr(o)?c+=qr(e,c+1,o):_r(n,o)&&(c=Wr(e,c)-1)}}}let a,s=(e=String(e||"")).length,l=Nr(r(0)),c=l;for(;c<s;){let s=e.charCodeAt(c);switch(Dr(s)){case Pr:a=13,c=Hr(e,c+1);break;case 34:i();break;case 35:Sr(r(c+1))||_r(r(c+1),r(c+2))?(a=4,c=$r(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:Lr(s,r(c+1),r(c+2))?n():(a=9,c++);break;case 44:a=18,c++;break;case 45:Lr(s,r(c+1),r(c+2))?n():45===r(c+1)&&62===r(c+2)?(a=15,c+=3):Ir(s,r(c+1),r(c+2))?o():(a=9,c++);break;case 46:Lr(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:Ir(r(c+1),r(c+2),r(c+3))?(a=3,c=$r(e,c+1)):(a=9,c++);break;case 91:a=19,c++;break;case 92:_r(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 Mr:n();break;case Or:o();break;default:a=9,c++}t(a,l,l=c)}}var an=null,sn=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return sn.createItem(e)}allocateCursor(e,t){let r;return null!==an?(r=an,an=an.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=an,an=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=sn.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 sn;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 sn;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 sn;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(sn.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(sn.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(sn.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(sn.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(sn.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 ln(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 cn=100,un=60,hn=" ";function dn({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+=(hn.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length)>cn&&(c=r-un+3,r=un-2);for(let e=a;e<=s;e++)e>=0&&e<i.length&&(i[e]=i[e].replace(/\t/g,hn),i[e]=(c>0&&i[e].length>c?"…":"")+i[e].substr(c,cn-2)+(i[e].length>c+cn-1?"…":""));return[o(a,t),new Array(r+l+2).join("-")+"^",o(t,s)].filter(Boolean).join("\n")}function pn(e,t,r,n,o){return Object.assign(ln("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>dn({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+dn({source:t,line:n,column:o},2)}})}function mn(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 fn=()=>{},gn=33,yn=35,bn=59,kn=123,vn=0;function wn(e){return function(){return this[e]()}}function xn(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 An(e){let t="",r="<unknown>",n=!1,o=fn,i=!1,a=new Xr,s=Object.assign(new nn,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:xn(e.atrule),pseudo:xn(e.pseudo),node:xn(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]=wn(e.parseContext[r])}return Dt(Dt({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:mn,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>e===kn?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>e===kn||e===bn?1:0,consumeUntilExclamationMarkOrSemicolon:e=>e===gn||e===bn?1:0,consumeUntilSemicolonIncluded:e=>e===bn?2:0,createList:()=>new sn,createSingleNodeList:e=>(new sn).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(t!==vn);return vn},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)=>Br(t,e,r),cmpStr:(e,r,n)=>jr(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,Gr(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=Kr[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(yn)&&(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=void 0!==r&&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 pn(e||"Unexpected input",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,on),a.setSource(t,l.offset,l.line,l.column),r=l.filename||"<unknown>",n=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:fn,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=jr(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:pn,config:s.config})}var En,Sn,Tn,Cn=(En=Gt(),Sn=1,Tn=null!=En?Ct(Pt(En)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of Nt(t))!Mt.call(e,o)&&o!==r&&Rt(e,o,{get:()=>t[o],enumerable:!(n=It(t,o))||n.enumerable});return e})(!Sn&&En&&En.__esModule?Tn:Rt(Tn,"default",{value:En,enumerable:!0}),En)),Rn=new Set(["Atrule","Selector","Declaration"]);var _n={};Bt(_n,{safe:()=>Mn,spec:()=>Pn});var In=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},Ln=[[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],["/","*"]],Nn=Ln.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 zn(e){let t=new Set(e.map((([e,t])=>In(e)<<16|In(t))));return function(e,r,n){let o=In(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 Pn=zn(Ln),Mn=zn(Nn),On=92;function Un(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 Dn(e){on(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function Fn(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:Mn,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&t.charCodeAt(0)===On&&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 Cn.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&&Rn.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&&Rn.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 _n&&(i.tokenBefore=_n[r.mode]));let a={node:e=>i.node(e),children:Un,token:(e,t)=>i.token(e,t),tokenize:Dn};return i.node(e),i.result()}}var{hasOwnProperty:qn}=Object.prototype,Bn=function(){};function jn(e){return"function"==typeof e?e:Bn}function Hn(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Vn(e,t){let r=t.structure,n=[];for(let e in r){if(!1===qn.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 Wn(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 $n({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 Gn(e){let t=function(e){let t={};for(let r in e.node)if(qn.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]=Vn(0,n)}return t}(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)qn.call(t,e)&&null!==t[e]&&(r[e]=Wn(t[e],!1),n[e]=Wn(t[e],!0));let a=$n(r),s=$n(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=Bn,h=Bn,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=jn(l.enter),h=jn(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=Hn(u,l.visit),h=Hn(h,l.visit)}if(u===Bn&&h===Bn)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(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 Yn(e){return e}function Qn(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=>Qn(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 Qn(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?n?"#?":"*":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 Kn(e,t){let r=Yn,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)),Qn(e,r,n,o)}var Jn={offset:0,line:1,column:1};function Zn(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?Xn(r):r:null}function Xn({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 eo=function(e,t){let r=ln("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},to=function(e,t,r,n){let o=ln("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=Zn(s||t,"end")||Xn(Jn,h),n=Xn(r)):(r=Zn(s,"start")||Xn(Zn(t,"start")||Jn,h.slice(0,l)),n=Zn(s,"end")||Xn(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?Kn(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},ro=new Map,no=new Map,oo=45,io=function(e){if(ro.has(e))return ro.get(e);let t=e.toLowerCase(),r=ro.get(t);if(void 0===r){let e=lo(t,0),n=e?"":co(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return ro.set(e,r),r},ao=function(e){if(no.has(e))return no.get(e);let t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");let n=lo(t,r.length);if(!n&&(t=t.toLowerCase(),no.has(t))){let r=no.get(t);return no.set(e,r),r}let o=n?"":co(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 no.set(e,a),a},so=co;function lo(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===oo&&e.charCodeAt(t+1)===oo}function co(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===oo&&e.charCodeAt(t+1)!==oo){let r=e.indexOf("-",t+2);if(-1!==r)return e.substring(t,r+1)}return""}var uo=["initial","inherit","unset","revert","revert-layer"],ho=43,po=45,mo=!0;function fo(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function go(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function yo(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===ho||o===po){if(r)return 0;t++}for(;t<e.value.length;t++)if(!wr(e.value.charCodeAt(t)))return 0;return n+1}function bo(e,t,r){let n=!1,o=go(e,t,r);if(null===(e=r(o)))return t;if(10!==e.type){if(!fo(e,ho)&&!fo(e,po))return t;if(n=!0,o=go(r(++o),o,r),null===(e=r(o))||10!==e.type)return 0}if(!n){let t=e.value.charCodeAt(0);if(t!==ho&&t!==po)return 0}return yo(e,n?0:1,n,o)}var ko=45,vo=63;function wo(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function xo(e,t,r){let n=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===ko&&r&&0!==n)return xo(e,t+n+1,!1),6;if(!xr(i)||++n>6)return 0}return n}function Ao(e,t,r){if(!e)return 0;for(;wo(r(t),vo);){if(++e>6)return 0;t++}return t}var Eo=["calc(","-moz-calc(","-webkit-calc("],So=new Map([[2,22],[21,22],[19,20],[23,24]]);function To(e,t){return t<e.length?e.charCodeAt(t):0}function Co(e,t){return jr(e,0,e.length,t)}function Ro(e,t){for(let r=0;r<t.length;r++)if(Co(e,t[r]))return!0;return!1}function _o(e,t){return t===e.length-2&&(92===To(e,t)&&wr(To(e,t+1)))}function Io(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&&"string"!=typeof e.min||null!==e.max&&n>e.max&&"string"!=typeof e.max)return!0}return!1}function Lo(e){return function(t,r,n){return null===t?0:2===t.type&&Ro(t.value,Eo)?function(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=So.get(e.type)}o++}while(e=t(o));return o}(t,r):e(t,r,n)}}function No(e){return function(t){return null===t||t.type!==e?0:1}}function zo(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=Gr(t.value,0);if(null!==e){let r=t.value.indexOf("\\",o),n=-1!==r&&_o(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return Io(n,t.value,o)?0:1}}function Po(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 Mo={"ident-token":No(1),"function-token":No(2),"at-keyword-token":No(3),"hash-token":No(4),"string-token":No(5),"bad-string-token":No(6),"url-token":No(7),"bad-url-token":No(8),"delim-token":No(9),"number-token":No(10),"percentage-token":No(11),"dimension-token":No(12),"whitespace-token":No(13),"CDO-token":No(14),"CDC-token":No(15),"colon-token":No(16),"semicolon-token":No(17),"comma-token":No(18),"[-token":No(19),"]-token":No(20),"(-token":No(21),")-token":No(22),"{-token":No(23),"}-token":No(24)},Oo={string:No(5),ident:No(1),percentage:Lo((function(e,t,r){return null===e||11!==e.type||Io(r,e.value,e.value.length-1)?0:1})),zero:Po(),number:Lo((function(e,t,r){if(null===e)return 0;let n=Gr(e.value,0);return n!==e.value.length&&!_o(e.value,n)||Io(r,e.value,n)?0:1})),integer:Lo((function(e,t,r){if(null===e||10!==e.type)return 0;let n=43===To(e.value,0)||45===To(e.value,0)?1:0;for(;n<e.value.length;n++)if(!wr(To(e.value,n)))return 0;return Io(r,e.value,n)?0:1})),"custom-ident":function(e){if(null===e||1!==e.type)return 0;let t=e.value.toLowerCase();return Ro(t,uo)||Co(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==To(e.value,0)||45!==To(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(!xr(To(e.value,r)))return 0;return 1},"id-selector":function(e){return null!==e&&4===e.type&&Ir(To(e.value,1),To(e.value,2),To(e.value,3))?1:0},"an-plus-b":function(e,t){let r=0;if(!e)return 0;if(10===e.type)return yo(e,0,false,r);if(1===e.type&&e.value.charCodeAt(0)===po){if(!Br(e.value,1,110))return 0;switch(e.value.length){case 2:return bo(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==po?0:(r=go(t(++r),r,t),yo(e=t(r),0,mo,r));default:return e.value.charCodeAt(2)!==po?0:yo(e,3,mo,r)}}else if(1===e.type||fo(e,ho)&&1===t(r+1).type){if(1!==e.type&&(e=t(++r)),null===e||!Br(e.value,0,110))return 0;switch(e.value.length){case 1:return bo(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==po?0:(r=go(t(++r),r,t),yo(e=t(r),0,mo,r));default:return e.value.charCodeAt(1)!==po?0:yo(e,2,mo,r)}}else if(12===e.type){let n=e.value.charCodeAt(0),o=n===ho||n===po?1:0,i=o;for(;i<e.value.length&&wr(e.value.charCodeAt(i));i++);return i!==o&&Br(e.value,i,110)?i+1===e.value.length?bo(t(++r),r,t):e.value.charCodeAt(i+1)!==po?0:i+2===e.value.length?(r=go(t(++r),r,t),yo(e=t(r),0,mo,r)):yo(e,i+2,mo,r):0}return 0},urange:function(e,t){let r=0;if(null===e||1!==e.type||!Br(e.value,0,117)||null===(e=t(++r)))return 0;if(wo(e,43))return null===(e=t(++r))?0:1===e.type?Ao(xo(e,0,!0),++r,t):wo(e,vo)?Ao(1,++r,t):0;if(10===e.type){let n=xo(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,ko)&&xo(e,1,!1)?r+1:0:Ao(n,r,t)}return 12===e.type?Ao(xo(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=So.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=So.get(e.type)}o++}while(e=t(o));return o}};function Uo(e){return Dt(Dt(Dt({},Mo),Oo),function(e){let{angle:t,decibel:r,frequency:n,flex:o,length:i,resolution:a,semitones:s,time:l}=e||{};return{dimension:Lo(zo(null)),angle:Lo(zo(t)),decibel:Lo(zo(r)),frequency:Lo(zo(n)),flex:Lo(zo(o)),length:Lo(Po(zo(i))),resolution:Lo(zo(a)),semitones:Lo(zo(s)),time:Lo(zo(l))}}(e))}var Do={};Bt(Do,{angle:()=>qo,decibel:()=>Wo,flex:()=>Vo,frequency:()=>jo,length:()=>Fo,resolution:()=>Ho,semitones:()=>$o,time:()=>Bo});var Fo=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],qo=["deg","grad","rad","turn"],Bo=["s","ms"],jo=["hz","khz"],Ho=["dpi","dpcm","dppx","x"],Vo=["fr"],Wo=["db"],$o=["st"],Go={};function Yo(e,t,r){return Object.assign(ln("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((r||t.length)+1).join("-")+"^"})}Bt(Go,{SyntaxError:()=>Yo,generate:()=>Kn,parse:()=>Pi,walk:()=>Ui});var Qo=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 Yo(e,this.str,this.pos)}},Ko=9,Jo=10,Zo=12,Xo=13,ei=32,ti=33,ri=35,ni=38,oi=39,ii=40,ai=41,si=42,li=43,ci=44,ui=45,hi=60,di=62,pi=63,mi=64,fi=91,gi=93,yi=123,bi=124,ki=125,vi=8734,wi=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),xi={" ":1,"&&":2,"||":3,"|":4};function Ai(e){return e.substringToPos(e.findWsEnd(e.pos))}function Ei(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||0===wi[r])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Si(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 Ti(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 Ci(e){let t=null,r=null;return e.eat(yi),t=Si(e),e.charCode()===ci?(e.pos++,e.charCode()!==ki&&(r=Si(e))):r=t,e.eat(ki),{min:Number(t),max:r?Number(r):0}}function Ri(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case si:e.pos++,t={min:0,max:0};break;case li:e.pos++,t={min:1,max:0};break;case pi:e.pos++,t={min:0,max:1};break;case ri:e.pos++,r=!0,e.charCode()===yi?t=Ci(e):e.charCode()===pi?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case yi:t=Ci(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,e.charCode()===ri&&e.charCodeAt(e.pos-1)===li?Ri(e,r):r):t}function _i(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function Ii(e){let t,r=null;return e.eat(hi),t=Ei(e),e.charCode()===ii&&e.nextCharCode()===ai&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===fi&&(Ai(e),r=function(e){let t=null,r=null,n=1;return e.eat(fi),e.charCode()===ui&&(e.peek(),n=-1),-1==n&&e.charCode()===vi?e.peek():(t=n*Number(Si(e)),0!==wi[e.charCode()]&&(t+=Ei(e))),Ai(e),e.eat(ci),Ai(e),e.charCode()===vi?e.peek():(n=1,e.charCode()===ui&&(e.peek(),n=-1),r=n*Number(Si(e)),0!==wi[e.charCode()]&&(r+=Ei(e))),e.eat(gi),{type:"Range",min:t,max:r}}(e)),e.eat(di),Ri(e,{type:"Type",name:t,opts:r})}function Li(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)=>xi[e]-xi[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 Ni(e){let t,r=[],n={},o=null,i=e.pos;for(;t=zi(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:Li(r,n)||" ",disallowEmpty:!1,explicit:!1}}function zi(e){let t=e.charCode();if(t<128&&1===wi[t])return function(e){let t=Ei(e);return e.charCode()===ii?(e.pos++,{type:"Function",name:t}):Ri(e,{type:"Keyword",name:t})}(e);switch(t){case gi:break;case fi:return Ri(e,function(e){let t;return e.eat(fi),t=Ni(e),e.eat(gi),t.explicit=!0,e.charCode()===ti&&(e.pos++,t.disallowEmpty=!0),t}(e));case hi:return e.nextCharCode()===oi?function(e){let t;return e.eat(hi),e.eat(oi),t=Ei(e),e.eat(oi),e.eat(di),Ri(e,{type:"Property",name:t})}(e):Ii(e);case bi:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===bi?2:1))};case ni:return e.pos++,e.eat(ni),{type:"Combinator",value:"&&"};case ci:return e.pos++,{type:"Comma"};case oi:return Ri(e,{type:"String",value:Ti(e)});case ei:case Ko:case Jo:case Xo:case Zo:return{type:"Spaces",value:Ai(e)};case mi:return t=e.nextCharCode(),t<128&&1===wi[t]?(e.pos++,{type:"AtKeyword",name:Ei(e)}):_i(e);case si:case li:case pi:case ri:case ti:break;case yi:if(t=e.nextCharCode(),t<48||t>57)return _i(e);break;default:return _i(e)}}function Pi(e){let t=new Qo(e),r=Ni(t);return t.pos!==e.length&&t.error("Unexpected input"),1===r.terms.length&&"Group"===r.terms[0].type?r.terms[0]:r}var Mi=function(){};function Oi(e){return"function"==typeof e?e:Mi}function Ui(e,t,r){let n=Mi,o=Mi;if("function"==typeof t?n=t:t&&(n=Oi(t.enter),o=Oi(t.leave)),n===Mi&&o===Mi)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 Di={decorator(e){let t=[],r=null;return Ft(Dt({},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 Fi(e,t){return"string"==typeof e?function(e){let t=[];return on(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,Di)}var qi={type:"Match"},Bi={type:"Mismatch"},ji={type:"DisallowEmpty"},Hi=40,Vi=41;function Wi(e,t,r){return t===qi&&r===Bi||e===qi&&t===qi&&r===qi?e:("If"===e.type&&e.else===Bi&&t===qi&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function $i(e){return e.length>2&&e.charCodeAt(e.length-2)===Hi&&e.charCodeAt(e.length-1)===Vi}function Gi(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&$i(e.name)}function Yi(e,t,r){switch(e){case" ":{let e=qi;for(let r=t.length-1;r>=0;r--){e=Wi(t[r],e,Bi)}return e}case"|":{let e=Bi,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(Gi(o)&&(null===r&&n>0&&Gi(t[n-1])&&(r=Object.create(null),e=Wi({type:"Enum",map:r},qi,e)),null!==r)){let e=($i(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=Wi(o,qi,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=Bi;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?Yi(e,t.filter((function(e){return e!==i})),!1):qi,r=Wi(i,o,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?qi:Bi;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?Yi(e,t.filter((function(e){return e!==i})),!0):qi,n=Wi(i,o,n)}return n}}}function Qi(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Yi(e.combinator,e.terms.map(Qi),!1);return e.disallowEmpty&&(t=Wi(t,ji,Bi)),t}case"Multiplier":return function(e){let t=qi,r=Qi(e.term);if(0===e.max)r=Wi(r,ji,Bi),t=Wi(r,null,Bi),t.then=Wi(qi,qi,t),e.comma&&(t.then.else=Wi({type:"Comma",syntax:e},t,Bi));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==qi&&(t=Wi({type:"Comma",syntax:e},t,Bi)),t=Wi(r,Wi(qi,qi,t),Bi);if(0===e.min)t=Wi(qi,qi,t);else for(let n=0;n<e.min-1;n++)e.comma&&t!==qi&&(t=Wi({type:"Comma",syntax:e},t,Bi)),t=Wi(r,t,Bi);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 Ki(e,t){return"string"==typeof e&&(e=Pi(e)),{type:"MatchGraph",match:Qi(e),syntax:t||null,source:e}}var{hasOwnProperty:Ji}=Object.prototype,Zi=0,Xi=1,ea=2,ta=3,ra="Match",na="Mismatch",oa="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",ia=15e3;function aa(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 sa(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 la(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&"/"===e.value)}function ca(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:Xi,syntax:t.syntax,token:g,prev:k},n(),p=null,y>b&&(b=y)}function c(){k=k.type===ea?k.prev:{type:ta,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:Zi,syntax:null,token:null,prev:null};for(n();null===f&&++m<ia;)switch(t.type){case"Match":if(null===h){if(null!==g&&(y!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=Bi;break}f=ra;break}if((t=h.nextState)===ji){if(h.matchStack===k){t=Bi;break}t=qi}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=na;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!==Bi&&s(t.else),t.then!==qi&&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=Bi;break}t=qi;break}if(t.mask===(1<<e.length)-1){t=qi;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].*$/,"")),Ji.call(t.map,e)){t=t.map[e];break}}t=Bi;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=qi}else t=Bi;break}case"Type":case"Property":{let e="Type"===t.type?"types":"properties",n=Ji.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=Bi;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:ea,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].*$/,"")),aa(r,e)){l(),t=qi;break}}t=Bi;break}case"AtKeyword":case"Function":if(null!==g&&aa(g.value,t.name)){l(),t=qi;break}t=Bi;break;case"Token":if(null!==g&&g.value===t.value){l(),t=qi;break}t=Bi;break;case"Comma":null!==g&&18===g.type?sa(k.token)?t=Bi:(l(),t=la(g)?Bi:qi):t=sa(k.token)||la(g)?qi:Bi;break;case"String":let n="",m=y;for(;m<e.length&&n.length<t.value.length;m++)n+=e[m].value;if(aa(n,t.value)){for(;y<m;)l();t=qi}else t=Bi;break;default:throw new Error("Unknown node type: "+t.type)}switch(f){case null:console.warn("[csstree-match] BREAK after "+ia+" iterations"),f=oa,k=null;break;case ra: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 ea:i.match.push(i={syntax:o.syntax,match:[]}),a.push(i);break;case ta: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 ua={};function ha(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 da(e,t){return fa(this,e,(e=>"Type"===e.type&&e.name===t))}function pa(e,t){return fa(this,e,(e=>"Property"===e.type&&e.name===t))}function ma(e){return fa(this,e,(e=>"Keyword"===e.type))}function fa(e,t,r){let n=ha.call(e,t);return null!==n&&n.some(r)}function ga(e){return"node"in e?e.node:ga(e.match[0])}function ya(e){return"node"in e?e.node:ya(e.match[e.match.length-1])}function ba(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=ga(a),n=ya(a);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new sn;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}Bt(ua,{getTrace:()=>ha,isKeyword:()=>ma,isProperty:()=>pa,isType:()=>da});var{hasOwnProperty:ka}=Object.prototype;function va(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function wa(e){return Boolean(e)&&va(e.offset)&&va(e.line)&&va(e.column)}function xa(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!==ka.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(wa(r.loc.start)){if(wa(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 sn)}}}else n(r,"Unknown field `"+o+"` for "+e+" node type");i||n(r,"Bad value for `"+e+"."+o+"`")}}for(let o in t)ka.call(t,o)&&!1===ka.call(r,o)&&n(r,"Field `"+e+"."+o+"` is missed")}}function Aa(e,t){let r=t.structure,n={type:String,loc:!0},o={type:'"'+e+'"'};for(let t in r){if(!1===ka.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:xa(e,n)}}var Ea=Ki(uo.join(" | "));function Sa(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Kn(e[o].syntax,{compact:t}));return n}function Ta(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Kn(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Sa(i.descriptors,t,r)};return n}function Ca(e,t,r){return Dt({matched:e,iterations:r,error:t},ua)}function Ra(e,t,r,n){let o,i=Fi(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)?Ca(null,new Error("Matching for a tree with var() is not supported")):(n&&(o=ca(i,e.cssWideKeywordsSyntax,e)),n&&o.match||(o=ca(i,t.match,e),o.match)?Ca(o.match,null,o.iterations):Ca(null,new to(o.reason,t.syntax,r,o),o.iterations))}var _a=class{constructor(e,t,r){if(this.cssWideKeywordsSyntax=Ea,this.syntax=t,this.generic=!1,this.units=Dt({},Do),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(ka.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]=Aa(r,n)}return t}(e),e){if(e.units)for(let t of Object.keys(Do))Array.isArray(e.units[t])&&(this.units[t]=e.units[t]);if(e.types)for(let t in e.types)this.addType_(t,e.types[t]);if(e.generic){this.generic=!0;for(let[e,t]of Object.entries(Uo(this.units)))this.addType_(e,t)}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=Ki(e,o):("string"==typeof e?Object.defineProperty(i,"syntax",{get:()=>(Object.defineProperty(i,"syntax",{value:Pi(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Ki(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))}checkAtruleName(e){if(!this.getAtrule(e))return new eo("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||Ra(this,n.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=io(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new eo("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new eo("Unknown property",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);if(r)return Ca(null,r);let n=this.getAtrule(e);return n.prelude?Ra(this,n.prelude,t||"",!1):Ca(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return Ca(null,n);let o=this.getAtrule(e),i=io(t);return Ra(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return"Declaration"!==e.type?Ca(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(ao(e).custom)return Ca(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(e);return r?Ca(null,r):Ra(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?Ra(this,r,t,!1):Ca(null,new eo("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Ra(this,e,t,!1)):Ca(null,new eo("Bad syntax"))}findValueFragments(e,t,r,n){return ba(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return ba(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=io(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=ao(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&&Ui(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,units:this.units,types:Sa(this.types,!t,e),properties:Sa(this.properties,!t,e),atrules:Ta(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function Ia(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function La(e,t){let r=Object.create(null);for(let[n,o]of Object.entries(e))if(o){r[n]={};for(let e of Object.keys(o))t.includes(e)&&(r[n][e]=o[e])}return r}function Na(e,t){let r=Dt({},e);for(let[n,o]of Object.entries(t))switch(n){case"generic":r[n]=Boolean(o);break;case"units":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Array.isArray(t)?t:[];break;case"atrules":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o)){let o=r[n][e]||{},i=r[n][e]={prelude:o.prelude||null,descriptors:Dt({},o.descriptors)};if(t){i.prelude=t.prelude?Ia(i.prelude,t.prelude):i.prelude||null;for(let[e,r]of Object.entries(t.descriptors||{}))i.descriptors[e]=r?Ia(i.descriptors[e],r):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Ia(r[n][e],t);break;case"scope":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Dt(Dt({},r[n][e]),t);break;case"parseContext":r[n]=Dt(Dt({},e[n]),o);break;case"atrule":case"pseudo":r[n]=Dt(Dt({},e[n]),La(o,["parse"]));break;case"node":r[n]=Dt(Dt({},e[n]),La(o,["name","structure","parse","generate","walkContext"]))}return r}function za(e){let t=An(e),r=Gn(e),n=Fn(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof sn)&&(e.children=(new sn).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof sn&&(e.children=e.children.toArray())}}),t)}}(r),a={lexer:null,createLexer:e=>new _a(e,a,a.lexer.structure),tokenize:on,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=Na({},e);return za("function"==typeof t?t(r,Object.assign):Na(r,t))}};return a.lexer=new _a({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var Pa=e=>za(Na({},e)),Ma={};Bt(Ma,{AnPlusB:()=>Oa,Atrule:()=>Ka,AtrulePrelude:()=>os,AttributeSelector:()=>us,Block:()=>As,Brackets:()=>Ps,CDC:()=>Fs,CDO:()=>Vs,ClassSelector:()=>Qs,Combinator:()=>tl,Comment:()=>ul,Declaration:()=>yl,DeclarationList:()=>Ml,Dimension:()=>jl,Function:()=>Gl,Hash:()=>Xl,IdSelector:()=>uc,Identifier:()=>ic,MediaFeature:()=>fc,MediaQuery:()=>vc,MediaQueryList:()=>Sc,NestingSelector:()=>Ic,Nth:()=>Oc,Number:()=>Bc,Operator:()=>$c,Parentheses:()=>Jc,Percentage:()=>ru,PseudoClassSelector:()=>su,PseudoElementSelector:()=>pu,Ratio:()=>ku,Raw:()=>Cu,Rule:()=>zu,Selector:()=>Bu,SelectorList:()=>$u,String:()=>Zu,StyleSheet:()=>ch,TypeSelector:()=>yh,UnicodeRange:()=>Sh,Url:()=>Uh,Value:()=>Jh,WhiteSpace:()=>rd});var Oa={};Bt(Oa,{generate:()=>Qa,name:()=>$a,parse:()=>Ya,structure:()=>Ga});var Ua=43,Da=45,Fa=110,qa=!0,Ba=!1;function ja(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===Ua||n===Da)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)wr(this.charCodeAt(r))||this.error("Integer is expected",r)}function Ha(e){return ja.call(this,0,e)}function Va(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case Fa:r="N is expected";break;case Da:r="HyphenMinus is expected"}this.error(r,this.tokenStart+e)}}function Wa(){let e=0,t=0,r=this.tokenType;for(;13===r||25===r;)r=this.lookupType(++e);if(10!==r){if(!this.isDelim(Ua,e)&&!this.isDelim(Da,e))return null;t=this.isDelim(Ua,e)?Ua:Da;do{r=this.lookupType(++e)}while(13===r||25===r);10!==r&&(this.skip(e),Ha.call(this,qa))}return e>0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==Ua&&r!==Da&&this.error("Number sign is expected")),Ha.call(this,0!==t),t===Da?"-"+this.consume(10):this.consume(10)}var $a="AnPlusB",Ga={a:[String,null],b:[String,null]};function Ya(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)Ha.call(this,Ba),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,Da))switch(t="-1",Va.call(this,1,Fa),this.tokenEnd-this.tokenStart){case 2:this.next(),r=Wa.call(this);break;case 3:Va.call(this,2,Da),this.next(),this.skipSC(),Ha.call(this,qa),r="-"+this.consume(10);break;default:Va.call(this,2,Da),ja.call(this,3,qa),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(Ua)&&1===this.lookupType(1)){let n=0;switch(t="1",this.isDelim(Ua)&&(n=1,this.next()),Va.call(this,0,Fa),this.tokenEnd-this.tokenStart){case 1:this.next(),r=Wa.call(this);break;case 2:Va.call(this,1,Da),this.next(),this.skipSC(),Ha.call(this,qa),r="-"+this.consume(10);break;default:Va.call(this,1,Da),ja.call(this,2,qa),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===Ua||n===Da,i=this.tokenStart+o;for(;i<this.tokenEnd&&wr(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),Va.call(this,i-this.tokenStart,Fa),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),r=Wa.call(this)):(Va.call(this,i-this.tokenStart+1,Da),i+2===this.tokenEnd?(this.next(),this.skipSC(),Ha.call(this,qa),r="-"+this.consume(10)):(ja.call(this,i-this.tokenStart+2,qa),this.next(),r=this.substrToCursor(i+1)))}else this.error();return null!==t&&t.charCodeAt(0)===Ua&&(t=t.substr(1)),null!==r&&r.charCodeAt(0)===Ua&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function Qa(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 Ka={};function Ja(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Za(){for(let e,t=1;e=this.lookupType(t);t++){if(24===e)return!0;if(23===e||3===e)return!1}return!1}Bt(Ka,{generate:()=>ns,name:()=>Xa,parse:()=>rs,structure:()=>ts,walkContext:()=>es});var Xa="Atrule",es="atrule",ts={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function rs(e=!1){let t,r,n=this.tokenStart,o=null,i=null;switch(this.eat(3),t=this.substrToCursor(n+1),r=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),Ja):Ja.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,r)&&"function"==typeof this.atrule[r].block?this.atrule[r].block.call(this,e):this.Block(Za.call(this))}return{type:"Atrule",loc:this.getLocation(n,this.tokenStart),name:t,prelude:o,block:i}}function ns(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var os={};Bt(os,{generate:()=>cs,name:()=>is,parse:()=>ls,structure:()=>ss,walkContext:()=>as});var is="AtrulePrelude",as="atrulePrelude",ss={children:[[]]};function ls(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 cs(e){this.children(e)}var us={};Bt(us,{generate:()=>xs,name:()=>ks,parse:()=>ws,structure:()=>vs});var hs=36,ds=42,ps=61,ms=94,fs=124,gs=126;function ys(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(ds)?(t=!0,this.next()):this.isDelim(fs)||this.eat(1),this.isDelim(fs)?this.charCodeAt(this.tokenStart+1)!==ps?(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 bs(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==ps&&t!==gs&&t!==ms&&t!==hs&&t!==ds&&t!==fs&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==ps&&(this.isDelim(ps)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var ks="AttributeSelector",vs={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function ws(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=ys.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=bs.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 xs(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 As={};Bt(As,{generate:()=>zs,name:()=>_s,parse:()=>Ns,structure:()=>Ls,walkContext:()=>Is});var Es=38;function Ss(e){return this.Raw(e,null,!0)}function Ts(){return this.parseWithFallback(this.Rule,Ss)}function Cs(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Rs(){if(17===this.tokenType)return Cs.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Cs);return 17===this.tokenType&&this.next(),e}var _s="Block",Is="block",Ls={children:[["Atrule","Rule","Declaration"]]};function Ns(e){let t=e?Rs:Ts,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.bind(this,e),Ss));break;default:e&&this.isDelim(Es)?n.push(Ts.call(this)):n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function zs(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var Ps={};Bt(Ps,{generate:()=>Ds,name:()=>Ms,parse:()=>Us,structure:()=>Os});var Ms="Brackets",Os={children:[[]]};function Us(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 Ds(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Fs={};Bt(Fs,{generate:()=>Hs,name:()=>qs,parse:()=>js,structure:()=>Bs});var qs="CDC",Bs=[];function js(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function Hs(){this.token(15,"--\x3e")}var Vs={};Bt(Vs,{generate:()=>Ys,name:()=>Ws,parse:()=>Gs,structure:()=>$s});var Ws="CDO",$s=[];function Gs(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Ys(){this.token(14,"\x3c!--")}var Qs={};Bt(Qs,{generate:()=>el,name:()=>Js,parse:()=>Xs,structure:()=>Zs});var Ks=46,Js="ClassSelector",Zs={name:String};function Xs(){return this.eatDelim(Ks),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function el(e){this.token(9,"."),this.token(1,e.name)}var tl={};Bt(tl,{generate:()=>cl,name:()=>al,parse:()=>ll,structure:()=>sl});var rl=43,nl=47,ol=62,il=126,al="Combinator",sl={name:String};function ll(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case ol:case rl:case il:this.next();break;case nl:this.next(),this.eatIdent("deep"),this.eatDelim(nl);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function cl(e){this.tokenize(e.name)}var ul={};Bt(ul,{generate:()=>gl,name:()=>pl,parse:()=>fl,structure:()=>ml});var hl=42,dl=47,pl="Comment",ml={value:String};function fl(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===hl&&this.charCodeAt(t-1)===dl&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function gl(e){this.token(25,"/*"+e.value+"*/")}var yl={};Bt(yl,{generate:()=>Nl,name:()=>Rl,parse:()=>Ll,structure:()=>Il,walkContext:()=>_l});var bl=33,kl=35,vl=36,wl=38,xl=42,Al=43,El=47;function Sl(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Tl(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Cl(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(bl)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Rl="Declaration",_l="declaration",Il={important:[Boolean,String],property:String,value:["Value","Raw"]};function Ll(){let e,t=this.tokenStart,r=this.tokenIndex,n=zl.call(this),o=lo(n),i=o?this.parseCustomProperty:this.parseValue,a=o?Tl:Sl,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(Cl,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(bl)&&(s=Pl.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 Nl(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 zl(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case xl:case vl:case Al:case kl:case wl:this.next();break;case El:this.next(),this.isDelim(El)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Pl(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var Ml={};Bt(Ml,{generate:()=>Bl,name:()=>Dl,parse:()=>ql,structure:()=>Fl});var Ol=38;function Ul(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var Dl="DeclarationList",Fl={children:[["Declaration","Atrule","Rule"]]};function ql(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Ul));break;default:this.isDelim(Ol)?e.push(this.parseWithFallback(this.Rule,Ul)):e.push(this.parseWithFallback(this.Declaration,Ul))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Bl(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var jl={};Bt(jl,{generate:()=>$l,name:()=>Hl,parse:()=>Wl,structure:()=>Vl});var Hl="Dimension",Vl={value:String,unit:String};function Wl(){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 $l(e){this.token(12,e.value+e.unit)}var Gl={};Bt(Gl,{generate:()=>Zl,name:()=>Yl,parse:()=>Jl,structure:()=>Kl,walkContext:()=>Ql});var Yl="Function",Ql="function",Kl={name:String,children:[[]]};function Jl(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 Zl(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Xl={};Bt(Xl,{generate:()=>oc,name:()=>tc,parse:()=>nc,structure:()=>rc,xxx:()=>ec});var ec="XXX",tc="Hash",rc={value:String};function nc(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function oc(e){this.token(4,"#"+e.value)}var ic={};Bt(ic,{generate:()=>cc,name:()=>ac,parse:()=>lc,structure:()=>sc});var ac="Identifier",sc={name:String};function lc(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function cc(e){this.token(1,e.name)}var uc={};Bt(uc,{generate:()=>mc,name:()=>hc,parse:()=>pc,structure:()=>dc});var hc="IdSelector",dc={name:String};function pc(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function mc(e){this.token(9,"#"+e.name)}var fc={};Bt(fc,{generate:()=>kc,name:()=>gc,parse:()=>bc,structure:()=>yc});var gc="MediaFeature",yc={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function bc(){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 kc(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var vc={};Bt(vc,{generate:()=>Ec,name:()=>wc,parse:()=>Ac,structure:()=>xc});var wc="MediaQuery",xc={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Ac(){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 Ec(e){this.children(e)}var Sc={};Bt(Sc,{generate:()=>_c,name:()=>Tc,parse:()=>Rc,structure:()=>Cc});var Tc="MediaQueryList",Cc={children:[["MediaQuery"]]};function Rc(){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 _c(e){this.children(e,(()=>this.token(18,",")))}var Ic={};Bt(Ic,{generate:()=>Mc,name:()=>Nc,parse:()=>Pc,structure:()=>zc});var Lc=38,Nc="NestingSelector",zc={};function Pc(){let e=this.tokenStart;return this.eatDelim(Lc),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function Mc(){this.token(9,"&")}var Oc={};Bt(Oc,{generate:()=>qc,name:()=>Uc,parse:()=>Fc,structure:()=>Dc});var Uc="Nth",Dc={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Fc(){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 qc(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var Bc={};Bt(Bc,{generate:()=>Wc,name:()=>jc,parse:()=>Vc,structure:()=>Hc});var jc="Number",Hc={value:String};function Vc(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Wc(e){this.token(10,e.value)}var $c={};Bt($c,{generate:()=>Kc,name:()=>Gc,parse:()=>Qc,structure:()=>Yc});var Gc="Operator",Yc={value:String};function Qc(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Kc(e){this.tokenize(e.value)}var Jc={};Bt(Jc,{generate:()=>tu,name:()=>Zc,parse:()=>eu,structure:()=>Xc});var Zc="Parentheses",Xc={children:[[]]};function eu(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 tu(e){this.token(21,"("),this.children(e),this.token(22,")")}var ru={};Bt(ru,{generate:()=>au,name:()=>nu,parse:()=>iu,structure:()=>ou});var nu="Percentage",ou={value:String};function iu(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function au(e){this.token(11,e.value+"%")}var su={};Bt(su,{generate:()=>du,name:()=>lu,parse:()=>hu,structure:()=>uu,walkContext:()=>cu});var lu="PseudoClassSelector",cu="function",uu={name:String,children:[["Raw"],null]};function hu(){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 du(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var pu={};Bt(pu,{generate:()=>bu,name:()=>mu,parse:()=>yu,structure:()=>gu,walkContext:()=>fu});var mu="PseudoElementSelector",fu="function",gu={name:String,children:[["Raw"],null]};function yu(){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 bu(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 ku={};Bt(ku,{generate:()=>Tu,name:()=>Au,parse:()=>Su,structure:()=>Eu});var vu=47,wu=46;function xu(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);!wr(r)&&r!==wu&&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 Au="Ratio",Eu={left:String,right:String};function Su(){let e,t=this.tokenStart,r=xu.call(this);return this.skipSC(),this.eatDelim(vu),e=xu.call(this),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:r,right:e}}function Tu(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Cu={};function Ru(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}Bt(Cu,{generate:()=>Nu,name:()=>_u,parse:()=>Lu,structure:()=>Iu});var _u="Raw",Iu={value:String};function Lu(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?Ru.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,n),value:this.substring(o,n)}}function Nu(e){this.tokenize(e.value)}var zu={};function Pu(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Mu(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}Bt(zu,{generate:()=>qu,name:()=>Ou,parse:()=>Fu,structure:()=>Du,walkContext:()=>Uu});var Ou="Rule",Uu="rule",Du={prelude:["SelectorList","Raw"],block:["Block"]};function Fu(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Mu,Pu):Pu.call(this,r),t=this.Block(!0),{type:"Rule",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function qu(e){this.node(e.prelude),this.node(e.block)}var Bu={};Bt(Bu,{generate:()=>Wu,name:()=>ju,parse:()=>Vu,structure:()=>Hu});var ju="Selector",Hu={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Vu(){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 Wu(e){this.children(e)}var $u={};Bt($u,{generate:()=>Ju,name:()=>Gu,parse:()=>Ku,structure:()=>Qu,walkContext:()=>Yu});var Gu="SelectorList",Yu="selector",Qu={children:[["Selector","Raw"]]};function Ku(){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 Ju(e){this.children(e,(()=>this.token(18,",")))}var Zu={};Bt(Zu,{generate:()=>lh,name:()=>ih,parse:()=>sh,structure:()=>ah});var Xu={};Bt(Xu,{decode:()=>nh,encode:()=>oh});var eh=92,th=34,rh=39;function nh(e){let t=e.length,r=e.charCodeAt(0),n=r===th||r===rh?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(n===eh){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),_r(eh,n)){let t=r-1,n=Wr(e,t);r=n-1,i+=Qr(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function oh(e,t){let r=t?"'":'"',n=t?rh:th,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||r===eh?(o+="\\"+e.charAt(t),i=!1):(i&&(xr(r)||Rr(r))&&(o+=" "),o+=e.charAt(t),i=!1):o+="�"}return r+o+r}var ih="String",ah={value:String};function sh(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:nh(this.consume(5))}}function lh(e){this.token(5,oh(e.value))}var ch={};Bt(ch,{generate:()=>gh,name:()=>dh,parse:()=>fh,structure:()=>mh,walkContext:()=>ph});var uh=33;function hh(e){return this.Raw(e,null,!1)}var dh="StyleSheet",ph="stylesheet",mh={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function fh(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==uh){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,hh);break;default:e=this.parseWithFallback(this.Rule,hh)}r.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:r}}function gh(e){this.children(e)}var yh={};Bt(yh,{generate:()=>Eh,name:()=>wh,parse:()=>Ah,structure:()=>xh});var bh=42,kh=124;function vh(){1!==this.tokenType&&!1===this.isDelim(bh)&&this.error("Identifier or asterisk is expected"),this.next()}var wh="TypeSelector",xh={name:String};function Ah(){let e=this.tokenStart;return this.isDelim(kh)?(this.next(),vh.call(this)):(vh.call(this),this.isDelim(kh)&&(this.next(),vh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Eh(e){this.tokenize(e.name)}var Sh={};Bt(Sh,{generate:()=>Oh,name:()=>zh,parse:()=>Mh,structure:()=>Ph});var Th=43,Ch=45,Rh=63;function _h(e,t){let r=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){let o=this.charCodeAt(n);if(o===Ch&&t&&0!==r)return _h.call(this,e+r+1,!1),-1;xr(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 Ih(e){let t=0;for(;this.isDelim(Rh);)++t>e&&this.error("Too many question marks"),this.next()}function Lh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Th?"Plus sign":"Hyphen minus")+" is expected")}function Nh(){let e=0;switch(this.tokenType){case 10:if(e=_h.call(this,1,!0),this.isDelim(Rh)){Ih.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){Lh.call(this,Ch),_h.call(this,1,!1);break}break;case 12:e=_h.call(this,1,!0),e>0&&Ih.call(this,6-e);break;default:if(this.eatDelim(Th),1===this.tokenType){e=_h.call(this,0,!0),e>0&&Ih.call(this,6-e);break}if(this.isDelim(Rh)){this.next(),Ih.call(this,5);break}this.error("Hex digit or question mark is expected")}}var zh="UnicodeRange",Ph={value:String};function Mh(){let e=this.tokenStart;return this.eatIdent("u"),Nh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Oh(e){this.tokenize(e.value)}var Uh={};Bt(Uh,{generate:()=>Kh,name:()=>Gh,parse:()=>Qh,structure:()=>Yh});var Dh={};Bt(Dh,{decode:()=>Wh,encode:()=>$h});var Fh=32,qh=92,Bh=34,jh=39,Hh=40,Vh=41;function Wh(e){let t=e.length,r=4,n=e.charCodeAt(t-1)===Vh?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(r===qh){if(i===n){i!==t-1&&(o=e.substr(i+1));break}if(r=e.charCodeAt(++i),_r(qh,r)){let t=i-1,r=Wr(e,t);i=r-1,o+=Qr(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(i+1)&&i++}else o+=e[i]}return o}function $h(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):o===Fh||o===qh||o===Bh||o===jh||o===Hh||o===Vh?(t+="\\"+e.charAt(n),r=!1):(r&&xr(o)&&(t+=" "),t+=e.charAt(n),r=!1):t+="�"}return"url("+t+")"}var Gh="Url",Yh={value:String};function Qh(){let e,t=this.tokenStart;switch(this.tokenType){case 7:e=Wh(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=nh(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 Kh(e){this.token(7,$h(e.value))}var Jh={};Bt(Jh,{generate:()=>td,name:()=>Zh,parse:()=>ed,structure:()=>Xh});var Zh="Value",Xh={children:[[]]};function ed(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function td(e){this.children(e)}var rd={};Bt(rd,{generate:()=>sd,name:()=>od,parse:()=>ad,structure:()=>id});var nd=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),od="WhiteSpace",id={value:String};function ad(){return this.eat(13),nd}function sd(e){this.token(13,e.value)}var ld=Ft(Dt({generic:!0},{generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","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>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",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>?",axis:"block|inline|vertical|horizontal","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-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","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()>|<lab()>|<lch()>|<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()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",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>? )","exp()":"exp( <calc-sum> )","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>","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()>|<repeating-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]]? )","hypot()":"hypot( <calc-sum># )",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>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","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> )","log()":"log( <calc-sum> , <calc-sum>? )","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] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,∞]>|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 [0,∞]>|none] )","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>]]","pow()":"pow( <calc-sum> , <calc-sum> )","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> )",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","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> )","reversed-counter-name":"reversed( <counter-name> )","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>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","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]","sin()":"sin( <calc-sum> )","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-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","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}","sqrt()":"sqrt( <calc-sum> )","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>","tan()":"tan( <calc-sum> )",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>","timeline-name":"<custom-ident>|<string>","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>","bg-clip":"<box>|border|text",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",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,∞]>","-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|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","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":"<bg-clip>#","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:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",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||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",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>?|<reversed-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-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","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>|plus-lighter","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","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","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>"}},nest:{prelude:"<complex-selector-list>",descriptors:null}}}),{node:Ma}),cd={};Bt(cd,{AtrulePrelude:()=>hd,Selector:()=>dd,Value:()=>md});function ud(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 hd={getNode:ud};var dd={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();case 38:return this.NestingSelector()}}}};function pd(e){return null!==e&&"Operator"===e.type&&("-"===e.value[e.value.length-1]||"+"===e.value[e.value.length-1])}var md={getNode:ud,onWhiteSpace(e,t){pd(e)&&(e.value=" "+e.value),pd(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}},fd={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}},gd={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}};function yd(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function bd(){return this.skipSC(),1===this.tokenType&&16===this.lookupNonWSType(1)?this.createSingleNodeList(this.Declaration()):kd.call(this)}function kd(){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(yd,this.scope.AtrulePrelude);break;case 1:e=this.Identifier();break;case 21:e=this.Parentheses(bd,this.scope.AtrulePrelude);break;default:break e}t.push(e)}return t}var vd={parse:{prelude(){let e=kd.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},wd={"font-face":{parse:{prelude:null,block(){return this.Block(!0)}}},import:fd,media:gd,nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},supports:vd},xd={parse(){return this.createSingleNodeList(this.SelectorList())}},Ad={parse(){return this.createSingleNodeList(this.Identifier())}},Ed={parse(){return this.createSingleNodeList(this.Nth())}},Sd={dir:Ad,has:xd,lang:Ad,matches:xd,is:xd,"-moz-any":xd,"-webkit-any":xd,where:xd,not:xd,"nth-child":Ed,"nth-last-child":Ed,"nth-last-of-type":Ed,"nth-of-type":Ed,slotted:{parse(){return this.createSingleNodeList(this.Selector())}}},Td={};Bt(Td,{AnPlusB:()=>Ya,Atrule:()=>rs,AtrulePrelude:()=>ls,AttributeSelector:()=>ws,Block:()=>Ns,Brackets:()=>Us,CDC:()=>js,CDO:()=>Gs,ClassSelector:()=>Xs,Combinator:()=>ll,Comment:()=>fl,Declaration:()=>Ll,DeclarationList:()=>ql,Dimension:()=>Wl,Function:()=>Jl,Hash:()=>nc,IdSelector:()=>pc,Identifier:()=>lc,MediaFeature:()=>bc,MediaQuery:()=>Ac,MediaQueryList:()=>Rc,Nth:()=>Fc,Number:()=>Vc,Operator:()=>Qc,Parentheses:()=>eu,Percentage:()=>iu,PseudoClassSelector:()=>hu,PseudoElementSelector:()=>yu,Ratio:()=>Su,Raw:()=>Lu,Rule:()=>Fu,Selector:()=>Vu,SelectorList:()=>Ku,String:()=>sh,StyleSheet:()=>fh,TypeSelector:()=>Ah,UnicodeRange:()=>Mh,Url:()=>Qh,Value:()=>ed,WhiteSpace:()=>ad});var Cd={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:cd,atrule:wd,pseudo:Sd,node:Td},Rd={node:Ma},_d=Pa(Dt(Dt(Dt({},ld),Cd),Rd));var Id={};Bt(Id,{decode:()=>Nd,encode:()=>zd});var Ld=92;function Nd(e){let t=e.length-1,r="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(o===Ld){if(n===t)break;if(o=e.charCodeAt(++n),_r(Ld,o)){let t=n-1,o=Wr(e,t);n=o-1,r+=Qr(e.substring(t+1,o))}else 13===o&&10===e.charCodeAt(n+1)&&n++}else r+=e[n]}return r}function zd(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)+" ":Sr(n)?t+=e.charAt(r):t+="\\"+e.charAt(r):t+="�"}return t}var{tokenize:Pd,parse:Md,generate:Od,lexer:Ud,createLexer:Dd,walk:Fd,find:qd,findLast:Bd,findAll:jd,toPlainObject:Hd,fromPlainObject:Vd,fork:Wd}=_d,$d=Object.freeze({__proto__:null,Lexer:_a,List:sn,TokenStream:nn,clone:function e(t){let r={};for(let n in t){let o=t[n];o&&(Array.isArray(o)||o instanceof sn?o=o.map(e):o.constructor===Object&&(o=e(o))),r[n]=o}return r},createLexer:Dd,createSyntax:Pa,definitionSyntax:Go,find:qd,findAll:jd,findLast:Bd,fork:Wd,fromPlainObject:Vd,generate:Od,ident:Id,isCustomProperty:lo,keyword:io,lexer:Ud,parse:Md,property:ao,string:Xu,toPlainObject:Hd,tokenNames:Kr,tokenTypes:Yt,tokenize:Pd,url:Dh,vendorPrefix:so,version:"2.3.0",walk:Fd});const Gd=/^'(.*?)'$/,Yd=/^"(.*?)"$/,Qd=["inherit","initial","unset"],Kd=["caption","icon","menu","message-box","small-caption","status-bar"],Jd=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],Zd=["normal","italic","oblique"],Xd=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],ep="[parse-css-font] ";function tp(e){const t=Od(e);if(-1!==Kd.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=Od(e.data);if("normal"!==t&&-1===Qd.indexOf(t))if(-1===Jd.indexOf(t))if(-1===Zd.indexOf(t))if(-1===Xd.indexOf(t)){if("Dimension"==e.data.type){if(n.size=Od(e.data),e=e.next,e&&"Operator"==e.data.type&&"/"==e.data.value&&e.next?(e=e.next,n.lineHeight=Od(e.data),e=e.next):"Operator"==r.head.data.type&&"/"==r.head.data.value&&r.head.next&&(n.lineHeight=Od(r.head.next.data),e=r.head.next.next),!e)throw rp("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(np(Od(e.data)))}return n}if("normal"!==n.variant)throw rp("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 rp("Missing required font-size.")}function rp(e){return new Error(ep+e)}function np(e){return(e=e.match(Gd)?e.replace(Gd,"$1"):e.replace(Yd,"$1")).trim()}var op=Object.freeze({__proto__:null,parse:tp});function ip(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 ap(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=ip(n.value,n.sourceIndex)),r.push(Array.isArray(n.nodes)?new lp(n):new cp(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 sp(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 cp({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 lp({type:"media-query",value:n.trim(),sourceIndex:r+i.length,nodes:ap(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 lp({type:"media-query",value:i.trim(),sourceIndex:r+a.length,nodes:ap(i,r),before:a,after:/(\s*)$/.exec(i)[1]})),t}function lp(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 cp(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}lp.prototype=Object.create(cp.prototype),lp.constructor=cp,lp.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},lp.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 up=Object.freeze({__proto__:null,parseMediaList:sp});const hp="___PRESERVED_TOKEN_",dp={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},pp=/url\(\s*(["']?)data:/g,mp=/\s+/g,fp=/\n/g;const gp=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const yp=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,bp=/(^\s|\s$)/g;const kp=/"([^\\"])*"/g,vp=/"(\\.)*"/g,wp=/"(\\)*"/g,xp=/'([^\\']|\\.|\\)*'/g,Ap=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Ep=/\r\n/g,Sp=/[\r\n]/g,Tp=/@variables\s*\{\s*([^}]+)\s*\}/g,Cp=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,Rp=/var\s*\(\s*([^)]+)\s*\)/g,_p=/calc\(([^;}]*)\)/g,Ip=/(^\s*|\s*$)/g,Lp=/\( /g,Np=/ \)/g,zp=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,Pp=/(^|\})(([^{:])+:)+([^{]*{)/g,Mp=/\s+([!{;:>+()\],])/g,Op=/([^\\])\s+([}])/g,Up=/!important/g,Dp=/___PSEUDOCLASSCOLON___/g,Fp=/:/g,qp=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,Bp=/(^|\D)0?\.?0(m?s)/gi,jp=/\s*(flex|flex-basis):\s*([^;}]+)/gi,Hp=/\s+/,Vp=/(hsla?)\(([^)]+)\)/g,Wp=/(^\s+|\s+$)/g,$p=/:first-(line|letter)(\{|,)/gi,Gp=/^(.*)(@charset)( "[^"]*";)/gi,Yp=/^((\s*)(@charset)( [^;]+;\s*))+/gi,Qp=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,Kp=/:(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,Jp=/^(.*)(@charset "[^"]*";)/g,Zp=/^(\s*@charset [^;]+;\s*)+/g,Xp=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,em=/([:,( ]\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,tm=/\s*\/\*/g,rm=/\*\/\s*/g,nm=/\band\(/gi,om=/([^:])not\(/gi,im=/\bor\(/gi,am=/([!{}:;>+([,])\s+/g,sm=/;+\}/g,lm=/([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,cm=/:0 0 0 0(;|\})/g,um=/:0 0 0(;|\})/g,hm=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,dm=/(:|\s)0+\.(\d+)/g,pm=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,mm=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,fm=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,gm=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,ym=/___QUERY_FRACTION___/g,bm=/;;+/g,km=/(:|\s)(#f00)(;|})/g,vm=/___PRESERVED_NEWLINE___/g,wm=/(:|\s)(#000080)(;|})/g,xm=/(:|\s)(#808080)(;|})/g,Am=/(:|\s)(#808000)(;|})/g,Em=/(:|\s)(#800080)(;|})/g,Sm=/(:|\s)(#c0c0c0)(;|})/g,Tm=/(:|\s)(#008080)(;|})/g,Cm=/(:|\s)(#ffa500)(;|})/g,Rm=/(:|\s)(#800000)(;|})/g;function _m(e="",t=dp){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(Ap,"alpha(opacity="),n.push(e),t+hp+(n.length-1)+"___"+t}))}e=function(e,t){const r=pp,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(mp,""):(r=r.replace(fp," "),r=r.replace(mp," "),r=r.replace(Wp,"")),t.push(r);const i="url("+hp+(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(kp),a(vp),a(wp),a(xp);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,hp+(n.length-1)+"___"))}e=e.replace(`/*${a}*/`,"")}else n.push("\\"),e=e.replace(a,hp+(n.length-1)+"___"),o+=1,n.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+o+"___",hp+(n.length-1)+"___");else t.cuteComments?n.push(i.substring(1).replace(Ep,"\n")):t.uglyComments?n.push(i.substring(1).replace(Sp,"")):n.push(i),e=e.replace(a,hp+(n.length-1)+"___")}if(t.expandVars){const t={};o=Tp,e=e.replace(o,((e,r)=>(o=Cp,r.replace(o,((e,r,n)=>(r&&n&&(t[r]=n),""))),""))),o=Rp,e=e.replace(o,((e,r)=>t[r]||"none"))}e=e.replace(mp," "),o=_p,e=e.replace(o,((e,t)=>(n.push("calc("+t.replace(Ip,"").replace(Lp,"(").replace(Np,")")+")"),hp+(n.length-1)+"___"))),o=zp,e=e.replace(o,((e,t)=>(n.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix("+hp+(n.length-1)+"___);")));try{o=Pp,e=e.replace(o,(e=>e.replace(Fp,"___PSEUDOCLASSCOLON___")))}catch(e){}if(e=(e=(e=(e=e.replace(Mp,"$1")).replace(Op,"$1$2")).replace(Up," !important")).replace(Dp,":"),o=qp,e=e.replace(o,((e,t,r)=>t+":"+(r=r.replace(Bp,((e,t,r)=>(n.push("0"+r),t+hp+(n.length-1)+"___")))))),o=jp,e=function(e,t){const r=yp;let n,o=0;const i=(e,r)=>{"0"===(e=e.replace(bp,"")).charAt(0)&&(t.push(e),n[r]=hp+(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(bp,"")):1===t&&(n=n.split(","),n.forEach(i),l.push(n.join(",").replace(bp,""))),n="",t+=1;else if("}"===r){if(2===t)l.push("{"+n.replace(bp,"")+"}"),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(Hp);return n.push(o.pop()),o.push(hp+(n.length-1)+"___"),o=o.join(" "),`${t}:${o}`}))).replace(Vp,((e,t,r)=>{const o=[];return r.split(",").forEach((e=>{"0%"===(e=e.replace(Wp,""))?(n.push("0%"),o.push(hp+(n.length-1)+"___")):o.push(e)})),t+"("+o.join(",")+")"})),n),e=e.replace($p,((e,t,r)=>":first-"+t.toLowerCase()+" "+r)),e=t.cuteComments?(e=e.replace(tm,"___PRESERVED_NEWLINE___/*")).replace(rm,"*/___PRESERVED_NEWLINE___"):e.replace(rm,"*/"),o=Gp,e=e.replace(o,((e,t,r,n)=>r.toLowerCase()+n+t)),o=Yp,e=e.replace(o,((e,t,r,n,o)=>r+n.toLowerCase()+o)),o=Qp,e=e.replace(o,((e,t)=>"@"+t.toLowerCase())),o=Kp,e=(e=(e=e.replace(o,((e,t)=>":"+t.toLowerCase()))).replace(Jp,"$2$1")).replace(Zp,"$1"),o=Xp,e=e.replace(o,((e,t)=>":"+t.toLowerCase()+"(")),o=em,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(o,((e,t,r)=>t+r.toLowerCase()))).replace(nm,"and (")).replace(om,"$1not (")).replace(im,"or (")).replace(am,"$1")).replace(sm,"}")).replace(lm,"$1$2")).replace(cm,":0$1")).replace(um,":0$1"),o=hm,e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0 0"+r))).replace(dm,"$1.$2"),o=pm,e=function(e){const t=gp,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(km,"$1red$3")).replace(wm,"$1navy$3")).replace(xm,"$1gray$3")).replace(Am,"$1olive$3")).replace(Em,"$1purple$3")).replace(Sm,"$1silver$3")).replace(Tm,"$1teal$3")).replace(Cm,"$1orange$3")).replace(Rm,"$1maroon$3"),o=mm,e=(e=(e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0"+r))).replace(fm,"alpha(opacity=")).replace(gm,"($1:$2___QUERY_FRACTION___$3)")).replace(ym,"/"),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(bm,";")).replace(Ip,""),n.length>1e3)return i;for(let t=n.length-1;t>=0;t--)e=e.replace(hp+t+"___",n[t],"g");return e=e.replace(vm,"\n")}var Im=Object.freeze({__proto__:null,defaultOptions:dp,processString:_m});function Lm(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 Nm=Object.freeze({__proto__:null,process:Lm});let zm,Pm,Mm,Om;zm={},zm.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),zm.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),zm.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,zm.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),zm.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),zm.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),zm.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}=zm;Mm=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}=zm;Pm=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=Pm,t=Mm,{asciiLowercase:r,solelyContainsHTTPTokenCodePoints:n,soleyContainsHTTPQuotedStringTokenCodePoints:o}=zm;Om=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 Um=Object.freeze({__proto__:null,fontPropertyParser:op,mediaQueryParser:up,cssMinifier:Im,cssTree:$d,cssUnescape:I,srcsetParser:Nm,get MIMEType(){return Om}});const Dm={normalizeFontFamily:me,getFontWeight:we},Fm=globalThis.FontFace,qm=globalThis.JSON,Bm=/url\s*\(\s*'(.*?)'\s*\)/i,jm=/url\s*\(\s*"(.*?)"\s*\)/i,Hm=/url\s*\(\s*(.*?)\s*\)/i,Vm=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,Wm=/^'(.*?)'$/,$m=/^"(.*?)"$/,Gm=/^url\(\s*["']?data:font\/(woff2?)/,Ym=/^url\(\s*["']?data:application\/x-font-(woff)/,Qm=/\.([^.?#]+)((\?|#).*?)?$/,Km=/format\((.*?)\)\s*,?$/,Jm=/(.*?)\s*,?$/,Zm=/^url\(["']?data:[^,]*,?["']?\)/,Xm="local(",ef="all",tf={"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%"},rf=5e3;async function nf(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&&t.mediaText!=ef){const n=hf();o.medias.set("media-"+a+"-"+t.mediaText,n),of(e,r,a,n)}else of(e,r,a,o);a++})),af(o),await Promise.all([...t].map((async([,e],t)=>{const a=e.stylesheet.children,s=e.mediaText;a&&(s&&s!=ef?await sf(a,t,o.medias.get("media-"+t+"-"+s),r,n,i):await sf(a,t,o,r,n,i),i.rules.discarded-=a.size)}))),i}function of(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=Od(t.prelude),a=hf();n.medias.set("media-"+r+"-"+o+"-"+i,a),o++,of(e,t.block.children,r,a)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const o=Od(t.prelude),a=hf();n.supports.set("supports-"+r+"-"+i+"-"+o,a),i++,of(e,t.block.children,r,a)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=uf(t);let r=n.fonts.get(e);r||(r=[],n.fonts.set(e,r));const o=cf(t,"src");if(o){const e=o.match(Vm);e&&e.forEach((e=>r.unshift(e)))}}}))}function af(e){e.fonts.forEach(((t,r)=>{e.fonts.set(r,t.map((e=>{const t=e.match(Km);let r;const n=function(e){const t=(e=e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"")).match(Bm)||e.match(jm)||e.match(Hm);return t&&t[1]}(e);if(t&&t[1]&&(r=t[1].replace(Wm,"$1").replace($m,"$1").toLowerCase()),!r){const t=e.match(Gm);if(t&&t[1])r=t[1];else{const t=e.match(Ym);t&&t[1]&&(r=t[1])}}if(!r&&n){const e=n.match(Qm);e&&e[1]&&(r=e[1])}return{src:e.match(Jm)[1],fontUrl:n,format:r}})))})),e.medias.forEach((e=>af(e))),e.supports.forEach((e=>af(e)))}async function sf(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=Od(e.prelude);await sf(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=Od(e.prelude);await sf(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=uf(e),s=r.fonts.get(t);if(s){await lf(e,s,n,o,i)&&r.fonts.delete(t)}else a.push(c)}}a.forEach((t=>e.remove(t)))}async function lf(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(Fm&&e.fontUrl){const t=new Fm("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()}),rf)))])}catch(t){const n=jd(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 Fm("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()}),rf)))])}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(Zm)&&t.format==e&&(!r||t.valid))),i=e=>t.filter((t=>t==e||t.src.startsWith(Xm)));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(Zm)&&e.valid||e.src.startsWith(Xm)))}}o.fonts.discarded-=t.length,t.reverse();try{a.data.value=Md(t.map((e=>e.src)).join(","),{context:"value",parseCustomProperty:!0})}catch(e){}return!0}return!1}function cf(e,t){let r;if(e.block.children&&(r=e.block.children.filter((e=>{try{return e.property==t&&!Od(e.value).match(/\\9$/)}catch(r){return e.property==t}})).tail),r)try{return Od(r.data.value)}catch(e){}}function uf(e){return qm.stringify([Dm.normalizeFontFamily(cf(e,"font-family")),Dm.getFontWeight(cf(e,"font-weight")||"400"),cf(e,"font-style")||"normal",cf(e,"unicode-range"),(t=cf(e,"font-stretch"),tf[t]||t),cf(e,"font-variant")||"normal",cf(e,"font-feature-settings"),cf(e,"font-variation-settings")]);var t}function hf(){return{fonts:new Map,medias:new Map,supports:new Map}}var df=Object.freeze({__proto__:null,process:nf});const pf={normalizeFontFamily:me,flatten:xe,getFontWeight:we,removeQuotes:ve},mf=/\s*,\s*/,ff=/-/,gf=/\?/g,yf=/^U\+/i,bf=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function kf(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,vf(r,i),s=_f(e,r,a,s))})),r.forEach((e=>{const t=Sf(e);t.length&&i.used.push(t),s=If(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=>pf.normalizeFontFamily(e)))||e}return e})))),i.used=i.used.map((e=>pf.flatten(e))));let l,c;return i.used.find((e=>e.find((e=>e.match(/^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&&(wf(t,i.declared,l,c,s),o.rules.discarded-=t.size)})),o}function vf(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)vf(e.block.children,t);else if("Rule"==e.type){const r=Sf(e.block);r.length&&t.used.push(r)}else if("Atrule"==e.type&&"font-face"==e.name){const r=pf.normalizeFontFamily(Ef(e.block.children,"font-family"));if(r){const n=Ef(e.block.children,"font-weight")||"400",o=Ef(e.block.children,"font-style")||"normal",i=Ef(e.block.children,"font-variant")||"normal";n.split(",").forEach((e=>t.declared.push({fontFamily:r,fontWeight:pf.getFontWeight(pf.removeQuotes(e)),fontStyle:o,fontVariant:i})))}}}))}function wf(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)wf(e.block.children,t,r,n,o);else if("Atrule"==e.type&&"font-face"==e.name){const s=pf.normalizeFontFamily(Ef(e.block.children,"font-family"));if(s){const l=Ef(e.block.children,"unicode-range");!r.find((e=>e.fontFamily==s))&&Nf(o,l)&&xf(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 xf(e,t,r,n){let o;const i=n&&n.get(t);if(i&&i.length){let n=Ef(e.block.children,"font-style")||"normal";if(bf.find((e=>n.trim().match(e)))){const a=pf.getFontWeight(Ef(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=>Tf(e,n,s)));o=Af(a,l),o||(l=i.map((e=>((e=Array.from(e))[2]="normal",Tf(e,n,s))))),o=Af(a,l)}else o=!0}else o=!0;return o}function Af(e,t){let r;for(const n of e.split(/[ ,]/))r=r||t.includes(pf.getFontWeight(pf.removeQuotes(n)));return r}function Ef(e,t){let r;if(e&&(r=e.filter((e=>e.property==t)).tail),r)try{return pf.removeQuotes(Od(r.data.value)).toLowerCase()}catch(e){}}function Sf(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(pf.normalizeFontFamily(e)),e="",n=null):("Identifier"==n&&"Identifier"==t.type&&(e+=" "),e+=Od(t)),n=t.type}))}else t=Od(t.data.value);e&&r.push(pf.normalizeFontFamily(e))}const n=e.children.filter((e=>"font"==e.property)).tail;if(n&&n.data&&n.data.value)try{tp(n.data.value).family.forEach((e=>r.push(pf.normalizeFontFamily(e))))}catch(e){}return r}function Tf(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=Cf(t,r)),n||(n=Rf(t,r))),t<400&&(n=r.slice().reverse().find((e=>e<=t)),n||(n=Rf(t,r))),t>500&&(n=r.find((e=>e>=t)),n||(n=Cf(t,r)))):n=r[0]}return n}function Cf(e,t){return t.slice().reverse().find((t=>t<e))}function Rf(e,t){return t.find((t=>t>e))}function _f(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=If(t.block.children,r,n)):n=_f(e,t.block.children,r,n))})),n}function If(e,t,r){const n=Lf(e,"content",t),o=Lf(e,"quotes",t);return r.includes(n)||(r+=n),r.includes(o)||(r+=o),r}function Lf(e,t,r){const n=Ef(e,t)||"";return n?(r.textContent='tmp { content:"'+n+'"}',r.sheet&&r.sheet.cssRules?pf.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content")):n):""}function Nf(e,t){if(t){const r=t.split(mf);let n;const o=r.filter((t=>{const r=t.split(ff);let o;if(2==r.length&&(r[0]=zf(r[0]),o="["+r[0]+"-"+zf("U+"+r[1])+"]"),1==r.length)if(r[0].includes("?")){const e=zf(r[0]),t=e;o="["+e.replace(gf,"0")+"-"+t.replace(gf,"F")+"]"}else r[0]&&(o="["+zf(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 zf(e){for(e=e.replace(yf,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var Pf=Object.freeze({__proto__:null,process:kf});const Mf="all",Of=["after","before","first-letter","first-line","placeholder","selection","part","marker"],Uf="sf-hidden",Df="display",Ff=/-(ms|webkit|moz|o)-/;class qf{constructor(e,t,r){this.doc=e,this.mediaAllInfo=jf(Mf);const n=new Map;let o=0;const i=e.createElement("style");e.body.appendChild(i);const a=e.createElement("span");e.body.appendChild(a),t.forEach((t=>{if(!t.scoped){const a=t.stylesheet.children;if(a)if(t.mediaText&&t.mediaText!=Mf){const s=jf(t.mediaText);this.mediaAllInfo.medias.set("style-"+o+"-"+t.mediaText,s),Hf(e,a,s,o,r,n,i)}else Hf(e,a,this.mediaAllInfo,o,r,n,i)}o++})),Gf(this.mediaAllInfo),Wf(this.mediaAllInfo,[],this.mediaAllInfo,i,a),i.remove(),a.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Bf(e,t,r){return new qf(e,t,r).getMediaAllInfo()}function jf(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==Mf&&(t.matchedStyles=new Map),t}function Hf(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=Od(t.prelude),c=jf(l);r.medias.set("rule-"+n+"-"+s+"-"+l,c),s++,Hf(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=>Od(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];Vf(e,{selector:r,selectorText:t,ruleInfo:u},o,i)}l++}}))}function Vf(e,t,r,n){const o=function(e,t){const r=[];n(e={data:Md(Od(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,Md("*",{context:"selector"}).children.head)})),t=Od(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)||Of.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),i!="."+Uf&&(s=Array.from(e.querySelectorAll(i)).filter((e=>!e.classList.contains(Uf)&&("none"!=e.style.getPropertyValue(Df)||"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=Yf(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 Wf(e,t,r,n,o){e.elements.forEach((n=>function(e,t,r){const n=new Map,o=new Set;return e.forEach((e=>{let t;t=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,r,n,o,i){for(let o=t.tail;o;o=o.prev){const t=o.data,a=Od(t);if("Declaration"==t.type&&(a.match(Ff)||!n.has(t.property)||t.important)&&!$f(a,i)){const o=e.get(t);(!o||t.important&&!o.important)&&(e.set(t,{selectorInfo:r,important:t.important}),a.match(Ff)||n.add(t.property))}}}(n,t,e,o,0,r)})),n}(n,0,o).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((i=>Wf(i,[e,...t],r,n,o)))}function $f(e,t){let r;return t.style=e,t.style.length||e.match(Ff)||(r=!0),r}function Gf(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(Gf)}function Yf(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=>Yf(e,t))),t}var Qf=Object.freeze({__proto__:null,getMediaAllInfo:Bf});const Kf={flatten:xe},Jf="all",Zf="screen";function Xf(e){const t={processed:0,discarded:0};return e.forEach(((r,n)=>{if(tg(r.mediaText||Jf,Zf)&&r.stylesheet.children){eg(r.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(n)})),t}function eg(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++,tg(Od(o.prelude),Zf)?eg(o.block.children,t,r):(r.push({cssRules:e,cssRule:n}),t.discarded++))}return r}function tg(e,t){return Kf.flatten(sp(e).map((e=>rg(e,t)))).find((e=>!e.not&&(e.value==t||e.value==Jf)||e.not&&(e.value==Jf||e.value!=t)))}function rg(e,t,r=[]){return e.nodes.map(((n,o)=>{if("media-query"==n.type)return rg(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:Jf}),r}var ng=Object.freeze({__proto__:null,process:Xf});function og(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,ig(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 ig(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=Od(e.prelude);ig(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&&(ag(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 ag(e,t,r){const n=[],o=[];let i;for(let n=e.prelude.children.head;n;n=n.next){const e=Od(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 sg=Object.freeze({__proto__:null,process:og});const lg="data:,";function cg(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:r,srcset:n}=ug(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=>dg(e.src))),r=t&&t.src,r==lg&&(r=null));n||(t=e.find((e=>dg(e.srcset))),n=t&&t.srcset,n==lg&&(n=null));return{src:r,srcset:n}}(Array.from(e.querySelectorAll("source")).reverse());r=t.src,n||(n=t.srcset)}hg({src:r,srcset:n},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>hg(ug(e),e)))}function ug(e){let t=e.getAttribute("src");t==lg&&(t=null);let r=dg(e.getAttribute("srcset"));return r==lg&&(r=null),{src:t,srcset:r}}function hg(e,t,r){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",lg),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),r&&r.querySelectorAll("source").forEach((e=>e.remove()))}function dg(e){if(e)try{const t=Lm(e);if(t.length)return t.find((e=>e.url)).url}catch(e){}}var pg=Object.freeze({__proto__:null,process:cg});const mg=["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"],fg=["script","style","pre","textarea"],gg=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],yg={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},bg=/[ \t\f\r]+/g,kg=/[\n]+/g,vg=/^\s+$/,wg=4294967295,xg=1,Ag=3,Eg=[function(e){e.nodeType==xg&&Array.from(e.attributes).forEach((t=>{mg.includes(t.name)&&e.setAttribute(t.name,"")}))},function(e){e.nodeType==Ag&&e.previousSibling&&e.previousSibling.nodeType==Ag&&(e.textContent=e.previousSibling.textContent+e.textContent,e.previousSibling.remove())},function(e,t){if(e.nodeType==Ag){let r=e.parentElement;if(!(""==r.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let n=Tg(r);for(;n;)r=r.parentElement,n=r&&Tg(r);(!r||n)&&t.length>1&&(e.textContent=t.replace(bg,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(kg,"\n"))}}},function(e){if(8==e.nodeType&&"HTML"!=e.parentElement.tagName)return!e.textContent.toLowerCase().trim().startsWith("[if")},function(e){e.nodeType==xg&&Array.from(e.attributes).forEach((t=>{if(gg.includes(t.name.toLowerCase())){const r=e.getAttribute(t.name);(""==r||(r||"").match(vg))&&e.removeAttribute(t.name)}}))},function(e){if(e.nodeType==xg){const t=yg[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(e.nodeType==xg&&"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(e.nodeType==xg&&e.tagName.toLowerCase()==t.toLowerCase()){let t=e.previousSibling;const n=[];for(;t&&t.nodeType==Ag&&!t.textContent.trim();)n.push(t),t=t.previousSibling;t&&t.nodeType==xg&&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 Sg(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const r=e.createTreeWalker(e.documentElement,wg,null,!1);let n=r.nextNode();for(;n;){const e=Eg.find((e=>e(n,t))),o=n;n=r.nextNode(),e&&o.remove()}}function Tg(e){return e&&!fg.includes(e.tagName.toLowerCase())}var Cg=Object.freeze({__proto__:null,process:Sg});const Rg=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_g=1,Ig=3,Lg=8,Ng=[{tagName:"head",accept:e=>!e.childNodes.length||e.childNodes[0].nodeType==_g},{tagName:"body",accept:e=>!e.childNodes.length}],zg=[{tagName:"html",accept:e=>!e||e.nodeType!=Lg},{tagName:"head",accept:e=>!e||e.nodeType!=Lg&&(e.nodeType!=Ig||!Ug(e.textContent))},{tagName:"body",accept:e=>!e||e.nodeType!=Lg},{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||e.nodeType!=Lg&&(e.nodeType!=Ig||!Ug(e.textContent))},{tagName:"caption",accept:e=>!e||e.nodeType!=Lg&&(e.nodeType!=Ig||!Ug(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)}],Pg=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function Mg(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+Og(e.documentElement,t)}function Og(e,t,r){return e.nodeType==Ig?function(e){const t=e.parentNode;let r;t&&t.nodeType==_g&&(r=t.tagName.toLowerCase());return!r||Pg.includes(r)?"script"==r||"style"==r?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&").replace(/\u00a0/g," ").replace(/</g,"<").replace(/>/g,">")}(e):e.nodeType==Lg?"\x3c!--"+e.textContent+"--\x3e":e.nodeType==_g?function(e,t,r){const n=e.tagName.toLowerCase(),o=t&&Ng.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,"&").replace(/\u00a0/g," "),a.includes('"')&&(a.includes("'")||!r?a=a.replace(/"/g,"""):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+=Og(e,t,r||"svg"==n))):i+=e.innerHTML;const a=t&&zg.find((t=>n==t.tagName&&t.accept(e.nextSibling,e)));(r||!a&&!Rg.includes(n))&&(i+="</"+n+">");return i}(e,t,r):void 0}function Ug(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var Dg=Object.freeze({__proto__:null,process:Mg}),Fg=Object.freeze({__proto__:null,fontsAltMinifier:df,fontsMinifier:Pf,matchedRules:Qf,mediasAltMinifier:ng,cssRulesMinifier:sg,imagesAltMinifier:pg,htmlMinifier:Cg,serializer:Dg});const qg=globalThis.Set,Bg=globalThis.Map,jg=globalThis.JSON;let Hg,Vg;class Wg{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(Hg.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new oy(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(Hg.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const $g="page-loading",Gg="page-loaded",Yg="resource-initializing",Qg="resources-initialized",Kg="resource-loaded",Jg="page-ended",Zg="stage-started",Xg="stage-ended",ey="stage-task-started",ty="stage-task-ended";class ry{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:$g,PAGE_LOADED:Gg,RESOURCES_INITIALIZING:Yg,RESOURCES_INITIALIZED:Qg,RESOURCE_LOADED:Kg,PAGE_ENDED:Jg,STAGE_STARTED:Zg,STAGE_ENDED:Xg,STAGE_TASK_STARTED:ey,STAGE_TASK_ENDED:ty}}}const ny=[{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 oy{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 Bg,this.batchRequest=new iy,this.processor=new my(e,this.batchRequest),r){const e=Hg.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?Hg.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new ry($g,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new ry(Gg,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new ry(Yg,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&Hg.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 ry(Qg,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new ry(Kg,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 ry(Jg,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let r;return this.onprogress(new ry(Zg,{pageURL:this.options.url,step:e,frame:t})),ny[e].sequential.forEach((r=>{this.onprogress(new ry(ey,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||this.executeTask(r),this.onprogress(new ry(ty,{pageURL:this.options.url,step:e,task:r.action,frame:t}))})),r=ny[e].parallel?await Promise.all(ny[e].parallel.map((async r=>{this.onprogress(new ry(ey,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||await this.executeTask(r),this.onprogress(new ry(ty,{pageURL:this.options.url,step:e,task:r.action,frame:t}))}))):Promise.resolve(),this.onprogress(new ry(Xg,{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 iy{constructor(){this.requests=new Bg,this.duplicates=new Bg}addURL(e,{asBinary:t,expectedType:r,groupDuplicates:n,baseURI:o,blockMixedContent:i}={}){return new Promise(((a,s)=>{const l=jg.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]=jg.parse(r),c=this.requests.get(r);try{const u=n;n+=1;const h=await Hg.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 ay=["data:text/"],sy="data:image/svg+xml",ly=/<script/gi,cy=/<noscript/gi,uy=/<canvas/gi,hy="shadowroot",dy="data-template-shadow-root",py="utf-8";class my{constructor(e,t){this.options=e,this.stats=new Fy(e),this.baseURI=Cy(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new Bg,this.styles=new Bg,this.cssVariables=new Bg,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(Hg.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 Hg.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=Hg.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(){Hg.postProcessDoc(this.doc);const e=Hg.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(Hg.COMMENT_HEADER_LEGACY)||e.textContent.includes(Hg.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?Hg.COMMENT_HEADER_LEGACY:Hg.COMMENT_HEADER)+" \n url: "+t+(this.options.removeSavedDate?" ":" \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(xy)){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:; object-src 'self' data:; frame-src 'self' 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=Hg.getContentSize(this.doc.documentElement.outerHTML));const n=Hg.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=Hg.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",r-e)}let o=await vy.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const i=this.options.filenameReplacementCharacter;if(o=Hg.getValidFilename(o,this.options.filenameReplacedCharacters,i),this.options.backgroundSave||(o=o.replace(/\//g,i)),!this.options.keepFilename&&("bytes"==this.options.filenameMaxLengthUnit&&Hg.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 Hg.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 Hg.digest("SHA-256",n)),this.options.retrieveLinks&&(s.links=Array.from(new qg(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["+Hg.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(Hg.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(Hg.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",Hg.EMPTY_RESOURCE):(r.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",r.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=Hg.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(Hg.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(Hg.SELECTED_CONTENT_ATTRIBUTE_NAME);o=o||i,i?(n.removeAttribute(Hg.SELECTED_CONTENT_ATTRIBUTE_NAME),r(n)):o?e(n):t(n)}}))}(this.doc.body),this.doc.body.removeAttribute(Hg.SELECTED_CONTENT_ATTRIBUTE_NAME)}insertVideoPosters(){this.options.posters&&this.doc.querySelectorAll("video, video > source").forEach((e=>{let t;t="VIDEO"==e.tagName?e:e.parentElement;const r=e.getAttribute(Hg.POSTER_ATTRIBUTE_NAME);if(r){const e=this.options.posters[Number(r)];!t.getAttribute("poster")&&e&&t.setAttribute("poster",e)}}))}insertVideoLinks(){const e="16px";this.doc.querySelectorAll("video").forEach((t=>{const r=t.getAttribute(Hg.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(['+dy+"])");this.stats.set("discarded","scripts",t.length),this.stats.set("processed","scripts",t.length),t.forEach((e=>e.remove()))}removeDiscardedResources(){this.doc.querySelectorAll("."+Hg.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove()));const e=new Bg;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"]):not([data*=".svg"]):not([data*=".pdf"]), 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["+Hg.INVALID_ELEMENT_ATTRIBUTE_NAME+"]").forEach((e=>{const t=this.doc.createElement("span");if(e.content){const 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",py),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(Hg.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(Hg.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(Hg.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(Hg.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}moveStylesInHead(){this.doc.querySelectorAll("style").forEach((e=>{""==e.getAttribute(Hg.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(Hg.CANVAS_ATTRIBUTE_NAME);if(t){const r=this.options.canvases[Number(t)];r&&(vy.setBackgroundImage(e,"url("+r.dataURI+")"),this.stats.add("processed","canvas",1))}}))}insertFonts(){if(this.options.fonts&&this.options.fonts.length){let e,t=this.doc.querySelector("style, link[rel=stylesheet]");this.options.fonts.forEach((r=>{if(r["font-family"]&&r.src){let n="@font-face{",o="";Object.keys(r).forEach((e=>{o&&(o+=";"),o+=e+":"+r[e]})),n+=o+"}";const i=this.doc.createElement("style");i.textContent=n,e?e.insertAdjacentElement("afterend",i):t?t.parentElement.insertBefore(i,t):this.doc.head.appendChild(i),e=i}}))}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+Hg.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+Hg.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&&!Py(t)&&e.setAttribute("data-sf-original-href",t),!My(t)){let r;try{r=Hg.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(r){const t=Cy(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(Hg.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=Vg.parse(t,{context:"declarationList",parseCustomProperty:!0});vy.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("["+hy+"]"))};"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 vy.resolveLinkStylesheetURLs(e.href,n,o,i);else{a=Vg.parse(e.textContent,{context:"stylesheet",parseCustomProperty:!0});await vy.resolveImportURLs(a,n,o,i)&&(a=Vg.parse(Vg.generate(a),{context:"stylesheet",parseCustomProperty:!0}))}a&&a.children?(o.compressCSS&&vy.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&&!Py(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(Hg.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 oy(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("["+Hg.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((n=>{const o=n.getAttribute(Hg.SHADOW_ROOT_ATTRIBUTE_NAME);if(o){const i=t.shadowRoots[Number(o)];if(i){const t=e.createElement("template");t.setAttribute(hy,i.mode),i.adoptedStyleSheets&&i.adoptedStyleSheets.forEach((r=>{const n=e.createElement("style");n.textContent=r,t.appendChild(n)}));const o=Hg.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["+dy+"]").forEach((e=>e.remove()));const r=e.createElement("script");r.setAttribute(dy,""),r.textContent=`(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[${hy}]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("${hy}")});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()`,e.body.appendChild(r)}}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=Hg.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=Hg.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){Hg.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=Hg.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontDeclarations=new Bg,await Promise.all([...this.stylesheets].map((([,e])=>vy.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>vy.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"], object[data*=".svg"], object[data*=".pdf"]',"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])=>vy.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,"image",this.cssVariables,this.styles,this.batchRequest,r,n)));e=e.concat([vy.processXLinks(this.doc.querySelectorAll("use"),this.doc,this.baseURI,this.options,this.batchRequest),vy.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),this.baseURI,this.options,this.batchRequest)]),e.push(vy.processAttribute(this.doc.querySelectorAll("audio[src], audio > source[src]"),"src",this.baseURI,this.options,"audio",this.cssVariables,this.styles,this.batchRequest)),e.push(vy.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&&vy.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&&!Py(r)&&e.setAttribute("data-sf-original-src",r),e.removeAttribute("integrity"),this.options.blockScripts)e.removeAttribute("src");else{e.textContent="";try{t=Hg.resolveURL(r,this.baseURI)}catch(e){}if(Uy(t)){e.removeAttribute("src");const r=await Hg.getContent(t,{asBinary:!0,charset:this.charset!=py&&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=Ty(t,r,this.options),e.setAttribute("src",r.data),"async"!=e.getAttribute("async")&&""!=e.getAttribute(Hg.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async","")}}this.stats.add("processed","scripts",1)})))}removeAlternativeImages(){Hg.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await Hg.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(Hg.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(Hg.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await r.runner.run();const t=await r.runner.getPageData();e.removeAttribute(Hg.WIN_ID_ATTRIBUTE_NAME);let n="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(cy)||t.content.match(uy)||t.content.match(ly))&&(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(Hg.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=Ny(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=Ny(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",Ny(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+=`${by+n}: `,this.options.saveOriginalURLs&&(r+=`/* original URL: ${t} */ `),r+=`url("${e}")`})),e.textContent=":root{"+r+"}"}}compressHTML(){let e;this.options.displayStats&&(e=Hg.getContentSize(this.doc.documentElement.outerHTML)),Hg.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:Hg.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-Hg.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=Hg.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 vy.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const fy="data:",gy="about:blank",yy=/(#.+?)$/,by="--sf-img-",ky=524288;class vy{static async evalTemplate(e="",t,r,n){const o=Hg.parseURL(t.saveUrl);e=await Iy(e,"page-title",(()=>t.title||"No title"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-heading",(()=>t.info.heading||"No heading"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-language",(()=>t.info.lang||"No language"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-description",(()=>t.info.description||"No description"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-author",(()=>t.info.author||"No author"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-creator",(()=>t.info.creator||"No creator"),n,t.filenameReplacementCharacter),e=await Iy(e,"page-publisher",(()=>t.info.publisher||"No publisher"),n,t.filenameReplacementCharacter),await c(t.saveDate),await c(t.visitDate,"visit-"),e=await Iy(e,"url-hash",(()=>o.hash.substring(1)||"No hash"),n,t.filenameReplacementCharacter),e=await Iy(e,"url-host",(()=>o.host.replace(/\/$/,"")||"No host"),n,t.filenameReplacementCharacter),e=await Iy(e,"url-hostname",(()=>o.hostname.replace(/\/$/,"")||"No hostname"),n,t.filenameReplacementCharacter);const i=l(o.href);e=await Iy(e,"url-href",(()=>i||"No href"),void 0===n||n,t.filenameReplacementCharacter),e=await Iy(e,"url-href-digest-sha-1",i?async()=>Hg.digest("SHA-1",i):"No href",n,t.filenameReplacementCharacter),e=await Iy(e,"url-href-flat",(()=>l(o.href)||"No href"),!1,t.filenameReplacementCharacter),e=await Iy(e,"url-referrer",(()=>l(t.referrer)||"No referrer"),void 0===n||n,t.filenameReplacementCharacter),e=await Iy(e,"url-referrer-flat",(()=>l(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await Iy(e,"url-password",(()=>o.password||"No password"),n,t.filenameReplacementCharacter),e=await Iy(e,"url-pathname",(()=>l(o.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===n||n,t.filenameReplacementCharacter),e=await Iy(e,"url-pathname-flat",(()=>l(o.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await Iy(e,"url-port",(()=>o.port||"No port"),n,t.filenameReplacementCharacter),e=await Iy(e,"url-protocol",(()=>o.protocol||"No protocol"),n,t.filenameReplacementCharacter),e=await Iy(e,"url-search",(()=>o.search.substring(1)||"No search"),n,t.filenameReplacementCharacter);const a=Hg.getSearchParams(o.search);for(const[r,o]of a)e=await Iy(e,"url-search-"+r,(()=>o||""),n,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await Iy(e,"url-username",(()=>o.username||"No username"),n,t.filenameReplacementCharacter),e=await Iy(e,"tab-id",(()=>String(t.tabId||"No tab id")),n,t.filenameReplacementCharacter),e=await Iy(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),n,t.filenameReplacementCharacter),e=await Iy(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 Iy(e,"digest-sha-256",(async()=>Hg.digest("SHA-256",r)),n,t.filenameReplacementCharacter),e=await Iy(e,"digest-sha-384",(async()=>Hg.digest("SHA-384",r)),n,t.filenameReplacementCharacter),e=await Iy(e,"digest-sha-512",(async()=>Hg.digest("SHA-512",r)),n,t.filenameReplacementCharacter));const s=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await Iy(e,"bookmark-pathname",(()=>s),void 0===n||n,t.filenameReplacementCharacter),e=await Iy(e,"bookmark-pathname-flat",(()=>s),!1,t.filenameReplacementCharacter),(e=await Iy(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 Iy(e,o+"datetime-iso",(()=>r.toISOString()),n,t.filenameReplacementCharacter),e=await Iy(e,o+"date-iso",(()=>r.toISOString().split("T")[0]),n,t.filenameReplacementCharacter),e=await Iy(e,o+"time-iso",(()=>r.toISOString().split("T")[1].split("Z")[0]),n,t.filenameReplacementCharacter),e=await Iy(e,o+"date-locale",(()=>r.toLocaleDateString()),n,t.filenameReplacementCharacter),e=await Iy(e,o+"time-locale",(()=>r.toLocaleTimeString()),n,t.filenameReplacementCharacter),e=await Iy(e,o+"day-locale",(()=>String(r.getDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"month-locale",(()=>String(r.getMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"year-locale",(()=>String(r.getFullYear())),n,t.filenameReplacementCharacter),e=await Iy(e,o+"datetime-locale",(()=>r.toLocaleString()),n,t.filenameReplacementCharacter),e=await Iy(e,o+"datetime-utc",(()=>r.toUTCString()),n,t.filenameReplacementCharacter),e=await Iy(e,o+"day-utc",(()=>String(r.getUTCDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"month-utc",(()=>String(r.getUTCMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"year-utc",(()=>String(r.getUTCFullYear())),n,t.filenameReplacementCharacter),e=await Iy(e,o+"hours-locale",(()=>String(r.getHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"minutes-locale",(()=>String(r.getMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"seconds-locale",(()=>String(r.getSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"hours-utc",(()=>String(r.getUTCHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"minutes-utc",(()=>String(r.getUTCMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(e,o+"seconds-utc",(()=>String(r.getUTCSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await Iy(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=zy(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=zy(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 qg){let i;vy.resolveStylesheetURLs(e,t,n);const a=(s=e,Vg.findAll(s,(e=>"Atrule"==e.type&&"import"==e.name)));var s;return await Promise.all(a.map((async e=>{const a=Vg.find(e,(e=>"Url"==e.type))||Vg.find(e,(e=>"String"==e.type));if(a){let c=Cy(a.value);if(!My(c)&&Oy(c)){a.value=Hg.EMPTY_RESOURCE;try{c=Hg.resolveURL(c,t)}catch(e){}if(Uy(c)&&!o.has(c)){const t=await async function(e){const t=await Hg.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 Ry(t.data,t.charset)||Ry(t.data,r.charset)?t:(r=Object.assign({},r,{charset:_y(t.data)}),Hg.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=Ty(c,t,r),t.data&&t.data.match(/^<!doctype /i)&&(t.data="");const a=Vg.find(e,(e=>"MediaQueryList"==e.type));a&&(t.data=(s=t.data,(l=Vg.generate(a))?"@media "+l+"{ "+s+" }":s));const u=Vg.parse(t.data,{context:"stylesheet",parseCustomProperty:!0}),h=new qg(o);h.add(c),await vy.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){Ly(e).map((e=>{const n=e.value;let o=Cy(n);if(!My(o)&&(r.textContent='tmp { content:"'+o+'"}',r.sheet&&r.sheet.cssRules&&(o=Hg.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content"))),!My(o)))if(!o||Oy(o)){let r;if(!n.startsWith("#"))try{r=Hg.resolveURL(o,t)}catch(e){}Uy(r)&&(e.value=r)}else e.value=Hg.EMPTY_RESOURCE}))}static async resolveLinkStylesheetURLs(e,t,r,n){if((e=Cy(e))&&e!=t&&e!=gy){const o=await Hg.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(!Ry(o.data,o.charset)&&!Ry(o.data,r.charset))return r=Object.assign({},r,{charset:_y(o.data)}),vy.resolveLinkStylesheetURLs(e,t,r,n);e=o.resourceURL,o.data=Ty(o.resourceURL,o,r),o.data&&o.data.match(/^<!doctype /i)&&(o.data="");let i=Vg.parse(o.data,{context:"stylesheet",parseCustomProperty:!0});return await vy.resolveImportURLs(i,e,r,n)&&(i=Vg.parse(Vg.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=Ly(e);await Promise.all(n.map((async e=>{const n=e.value;if(r.blockFonts)e.value=Hg.EMPTY_RESOURCE;else{const i=Cy(n);if(!My(i)&&Uy(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),!Py(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+jg.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=Ly(e);await Promise.all(i.map((async e=>{const t=e.value;if(r.blockImages)e.value=Hg.EMPTY_RESOURCE;else{const i=Cy(t);if(!My(i)&&Uy(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||ky;if(l&&r.groupDuplicateImages&&Hg.getContentSize(a)<o){const r=Vg.parse("var("+by+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!Py(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+jg.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,Hg.EMPTY_RESOURCE)}await Promise.all(Array.from(e).map((async e=>{let h=e.getAttribute(t);if(null!=h){h=Cy(h);let d=e.dataset.singleFileOriginURL;if(n.saveOriginalURLs&&!Py(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(!My(h)&&(u(e,t,o),Oy(h))){try{h=Hg.resolveURL(h,r)}catch(e){}if(Uy(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==Hg.EMPTY_RESOURCE){try{d=Hg.resolveURL(d,r)}catch(e){}try{h=d,u=(await Hg.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==Hg.EMPTY_RESOURCE)e.remove();else if(u!==Hg.EMPTY_RESOURCE){if(!ay.filter((e=>u.startsWith(e))).length){const r=u.startsWith(sy),s=n.maxSizeDuplicateImages||ky;if("image"==o&&l&&m&&!r&&Hg.getContentSize(u)<s)if(vy.replaceImageSource(e,by+p,n)){i.set(p,{content:u,url:d});const t=Vg.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&&!Py(t)&&e.setAttribute("data-sf-original-href",t);let a=Cy(t);if(n.blockImages)e.setAttribute(i,Hg.EMPTY_RESOURCE);else if(Oy(a)&&!My(a)){e.setAttribute(i,Hg.EMPTY_RESOURCE);try{a=Hg.resolveURL(a,r)}catch(e){}if(Uy(a)){const n=t.match(yy);if(t.startsWith(r+"#"))e.setAttribute(i,n[0]);else{const t=await o.addURL(a,{expectedType:"image"}),r=Hg.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,sy+","+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=Hg.parseSrcset(o);if(r.saveOriginalURLs&&!Py(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=Cy(e.url);if(My(r))return r+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(Oy(r)){try{r=Hg.resolveURL(r,t)}catch(e){}if(Uy(r)){const{content:t}=await n.addURL(r,{asBinary:!0,expectedType:"image"});return ay.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(Hg.IMAGE_ATTRIBUTE_NAME)){const n=r.images[Number(e.getAttribute(Hg.IMAGE_ATTRIBUTE_NAME))];if(n&&n.replaceable){e.setAttribute("src",`${sy},<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),vy.setBackgroundImage(e,"var("+t+")",r),e.removeAttribute(Hg.IMAGE_ATTRIBUTE_NAME),!0}}}}const wy="blob:",xy=/^https?:\/\//,Ay=/^file:\/\//,Ey=/^https?:\/\/+\s*$/,Sy=/^(https?:\/\/|file:\/\/|blob:).+/;function Ty(e,t,r){return r.rootDocument&&r.updatedResources[e]?(r.updatedResources[e].retrieved=!0,r.updatedResources[e].content):t.data||""}function Cy(e){return!e||e.startsWith(fy)?e:e.split("#")[0]}function Ry(e,t=py){const r=_y(e);return!r||r==t.toLowerCase()}function _y(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function Iy(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 Hg.truncateText(t,i):a&&(t=t.substring(0,a)),e.replace(l,t)}}return e}function Ly(e){return Vg.findAll(e,(e=>"Url"==e.type))}function Ny(e,t){let r=Vg.generate(e);return t.compressCSS&&(r=Hg.compressCSS(r)),t.saveOriginalURLs&&(r=function(e){return e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"/* original URL: $1 */url(")}(r)),r}function zy(e){return(e=e.filter((e=>e.href!=Hg.EMPTY_RESOURCE))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function Py(e){return e&&(e.startsWith(fy)||e.startsWith(wy))}function My(e){return e&&(e.startsWith(fy)||e==gy)}function Oy(e){return e&&!e.match(Ey)}function Uy(e){return Oy(e)&&(e.match(xy)||e.match(Ay)||e.startsWith(wy))&&e.match(Sy)}const Dy={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 Fy{constructor(e){this.options=e,e.displayStats&&(this.data=jg.parse(jg.stringify(Dy)))}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 qy=1048576,By="text/",jy=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],Hy="_",Vy=globalThis.URL,Wy=globalThis.DOMParser,$y=globalThis.Blob,Gy=globalThis.FileReader,Yy=(e,t)=>globalThis.fetch(e,t),Qy=globalThis.crypto,Ky=globalThis.TextDecoder,Jy=globalThis.TextEncoder;function Zy(e){return(e=e||{}).fetch=e.fetch||Yy,e.frameFetch=e.frameFetch||e.fetch||Yy,{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 Xy(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 Xy(t,r)}finally{a(),r.networkTimeout&&globalThis.clearTimeout(o)}let c;try{c=await n.arrayBuffer()}catch(e){return{data:r.asBinary?ae:"",resourceURL:t}}t=n.url||t;let u,h="";try{const e=new Om(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 Xy(t,r);try{return r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*qy?Xy(t,r):Xy(t,r,c,null,h)}catch(e){return Xy(t,r)}}else{if(n.status>=400||r.validateTextContentType&&h&&!h.startsWith(By))return Xy(t,r);if(u||(u="utf-8"),r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*qy)return Xy(t,r,null,u);try{return Xy(t,r,c,u,h)}catch(e){return Xy(t,r,null,u)}}},parseURL:(e,t)=>void 0===t?new Vy(e):new Vy(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getSearchParams:e=>Array.from(new URLSearchParams(e)),getValidFilename:(e,t=jy,r=Hy)=>(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 Wy).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 Wy).parseFromString(e,"text/xml"),parseSVGContent(e){const t=(new Wy).parseFromString(e,"image/svg+xml");return t.querySelector("parsererror")?(new Wy).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 Qy.subtle.digest(e,new Jy("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new $y([e]).size,truncateText(e,t){const r=new $y([e]),n=new Gy;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)=>Sg(e,t),minifyCSSRules:(e,t,r)=>og(e,t,r),removeUnusedFonts:(e,t,r,n)=>kf(e,t,r,n),removeAlternativeFonts:(e,t,r,n)=>nf(e,t,r,n),getMediaAllInfo:(e,t,r)=>Bf(e,t,r),compressCSS:(e,t)=>_m(e,t),minifyMedias:e=>Xf(e),removeAlternativeImages:e=>cg(e),parseSrcset:e=>Lm(e),preProcessDoc:(e,t,r)=>ue(e,t,r),postProcessDoc(e,t,r){ge(e,t,r)},serialize:(e,t)=>Mg(e,t),removeQuotes:e=>ve(e),ON_BEFORE_CAPTURE_EVENT_NAME:L,ON_AFTER_CAPTURE_EVENT_NAME:N,WIN_ID_ATTRIBUTE_NAME:F,REMOVED_CONTENT_ATTRIBUTE_NAME:z,HIDDEN_CONTENT_ATTRIBUTE_NAME:P,HIDDEN_FRAME_ATTRIBUTE_NAME:O,IMAGE_ATTRIBUTE_NAME:q,POSTER_ATTRIBUTE_NAME:B,VIDEO_ATTRIBUTE_NAME:j,CANVAS_ATTRIBUTE_NAME:H,STYLE_ATTRIBUTE_NAME:V,INPUT_VALUE_ATTRIBUTE_NAME:W,SHADOW_ROOT_ATTRIBUTE_NAME:D,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:U,STYLESHEET_ATTRIBUTE_NAME:G,SELECTED_CONTENT_ATTRIBUTE_NAME:Q,INVALID_ELEMENT_ATTRIBUTE_NAME:K,COMMENT_HEADER:ne,COMMENT_HEADER_LEGACY:oe,SINGLE_FILE_UI_ELEMENT_CLASS:ie,EMPTY_RESOURCE:ae}}async function Xy(e,t,r,n,o){if(r)if(t.asBinary){const e=new Gy;e.readAsDataURL(new $y([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 Ky(n).decode(r)}catch(e){r=new Ky(n="utf-8").decode(r)}r=r.replace(/\ufeff/gi,"")}else r=t.asBinary?ae:"";return{data:r,resourceURL:e,charset:n}}function eb(t){void 0===e.SingleFile&&(e.SingleFile=function(...e){return[Hg,Vg]=e,Wg}(Zy(t),$d))}e.SingleFile=void 0,e.getPageData=async function(t={},r,n=globalThis.document,o=globalThis){const i=St;let a;if(eb(r),n&&o){ce(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(Me(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&&Oe(t)};const s=new e.SingleFile(t);return await s.run(),a&&i.cleanup(a),await s.getPageData()},e.helper=Ee,e.init=eb,e.modules=Fg,e.processors=Tt,e.vendor=Um,Object.defineProperty(e,"__esModule",{value:!0})}));
|