UNPKG

pollen-css

Version:

Utility-first CSS for the future

172 lines (171 loc) 41.2 kB
function e(e,t,r=480,n=1280){const o=(t-e)/(n-r);return`clamp(${e/16}rem, ${(-r*o+e)/16}rem + ${100*o}vw, ${t/16}rem)`}var t={...{scale:{"000":"0.75rem","00":"0.875rem",0:"1rem",1:"1.125rem",2:"1.25rem",3:"1.5rem",4:"1.875rem",5:"2.25rem",6:"3rem",7:"3.75rem",8:"4.5rem",9:"6rem",10:"8rem"},"scale-fluid":{"000":e(10,12),"00":e(12,14),0:e(14,16),1:e(16,18),2:e(18,20),3:e(20,24),4:e(24,30),5:e(30,36),6:e(36,48),7:e(48,60),8:e(60,72),9:e(72,96),10:e(96,128)},font:{sans:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',serif:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',mono:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},weight:{light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},line:{none:1,xs:1.125,sm:1.275,md:1.5,lg:1.625,xl:2},letter:{xs:"-0.05em",sm:"-0.025em",none:"0em",lg:"0.025em",xl:"0.05em"},prose:{xs:"45ch",sm:"55ch",md:"65ch",lg:"75ch",xl:"85ch"}},size:{px:"1px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px",full:"100%",screen:"100vw",min:"min-content",max:"max-content"},width:{xs:"480px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},ratio:{square:"1/1",portrait:"3/4",landscape:"4/3",tall:"2/3",wide:"3/2",widescreen:"16/9",golden:"1.618/1"},radius:{xs:"3px",sm:"6px",md:"8px",lg:"12px",xl:"16px",100:"100%",full:"9999px"},blur:{xs:"blur(4px)",sm:"blur(8px)",md:"blur(16px)",lg:"blur(24px)",xl:"blur(40px)"},layer:{below:-1,1:10,2:20,3:30,4:40,5:50,top:2147483647},shadow:{xs:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",sm:"0 4px 6px -2px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06)",md:"0 12px 16px -4px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",lg:"0 20px 24px -4px rgba(0, 0, 0, 0.1), 0 8px 8px -4px rgba(0, 0, 0, 0.04)",xl:"0 24px 48px -12px rgba(0, 0, 0, 0.25)"},ease:{"in-sine":"cubic-bezier(0.47, 0, 0.745, 0.715)","out-sine":"cubic-bezier(0.39, 0.575, 0.565, 1)","in-out-sine":"cubic-bezier(0.445, 0.05, 0.55, 0.95)","in-quad":"cubic-bezier(0.55, 0.085, 0.68, 0.53)","out-quad":"cubic-bezier(0.25, 0.46, 0.45, 0.94)","in-out-quad":"cubic-bezier(0.455, 0.03, 0.515, 0.955)","in-cubic":"cubic-bezier(0.55, 0.055, 0.675, 0.19)","out-cubic":"cubic-bezier(0.215, 0.61, 0.355, 1)","in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1)","in-quart":"cubic-bezier(0.895, 0.03, 0.685, 0.22)","out-quart":"cubic-bezier(0.165, 0.84, 0.44, 1)","in-out-quart":"cubic-bezier(0.77, 0, 0.175, 1)","in-quint":"cubic-bezier(0.755, 0.05, 0.855, 0.06)","out-quint":"cubic-bezier(0.23, 1, 0.32, 1)","in-out-quint":"cubic-bezier(0.86, 0, 0.07, 1)","in-expo":"cubic-bezier(0.95, 0.05, 0.795, 0.035)","out-expo":"cubic-bezier(0.19, 1, 0.22, 1)","in-out-expo":"cubic-bezier(1, 0, 0, 1)","in-circ":"cubic-bezier(0.6, 0.04, 0.98, 0.335)","out-circ":"cubic-bezier(0.075, 0.82, 0.165, 1)","in-out-circ":"cubic-bezier(0.785, 0.135, 0.15, 0.86)","in-back":"cubic-bezier(0.6, -0.28, 0.735, 0.045)","out-back":"cubic-bezier(0.175, 0.885, 0.32, 1.275)","in-out-back":"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},color:{black:"#000",white:"#fff","grey-50":"#f9fafb","grey-100":"#f3f4f6","grey-200":"#e5e7eb","grey-300":"#d1d5db","grey-400":"#9ca3af","grey-500":"#6b7280","grey-600":"#4b5563","grey-700":"#374151","grey-800":"#1f2937","grey-900":"#111827","grey-950":"#030712",grey:"var(--color-gray-500)","slate-50":"#f8fafc","slate-100":"#f1f5f9","slate-200":"#e2e8f0","slate-300":"#cbd5e1","slate-400":"#94a3b8","slate-500":"#64748b","slate-600":"#475569","slate-700":"#334155","slate-800":"#1e293b","slate-900":"#0f172a","slate-950":"#020617",slate:"var(--color-slate-500)","zinc-50":"#fafafa","zinc-100":"#f4f4f5","zinc-200":"#e4e4e7","zinc-300":"#d4d4d8","zinc-400":"#a1a1aa","zinc-500":"#71717a","zinc-600":"#52525b","zinc-700":"#3f3f46","zinc-800":"#27272a","zinc-900":"#18181b","zinc-950":"#09090b",zinc:"var(--color-zinc-500)","stone-50":"#fafaf9","stone-100":"#f5f5f4","stone-200":"#e7e5e4","stone-300":"#d6d3d1","stone-400":"#a8a29e","stone-500":"#78716c","stone-600":"#57534e","stone-700":"#44403c","stone-800":"#292524","stone-900":"#1c1917","stone-950":"#0c0a09",stone:"var(--color-stone-500)","red-50":"#fef2f2","red-100":"#fee2e2","red-200":"#fecaca","red-300":"#fca5a5","red-400":"#f87171","red-500":"#ef4444","red-600":"#dc2626","red-700":"#b91c1c","red-800":"#991b1b","red-900":"#7f1d1d","red-950":"#450a0a",red:"var(--color-red-500)","orange-50":"#fff7ed","orange-100":"#ffedd5","orange-200":"#fed7aa","orange-300":"#fdba74","orange-400":"#fb923c","orange-500":"#f97316","orange-600":"#ea580c","orange-700":"#c2410c","orange-800":"#9a3412","orange-900":"#7c2d12","orange-950":"#431407",orange:"var(--color-orange-500)","amber-50":"#fffbeb","amber-100":"#fef3c7","amber-200":"#fde68a","amber-300":"#fcd34d","amber-400":"#fbbf24","amber-500":"#f59e0b","amber-600":"#d97706","amber-700":"#b45309","amber-800":"#92400e","amber-900":"#78350f","amber-950":"#451a03",amber:"var(--color-amber-500)","yellow-50":"#fefce8","yellow-100":"#fef9c3","yellow-200":"#fef08a","yellow-300":"#fde047","yellow-400":"#facc15","yellow-500":"#eab308","yellow-600":"#ca8a04","yellow-700":"#a16207","yellow-800":"#854d0e","yellow-900":"#713f12","yellow-950":"#422006",yellow:"var(--color-yellow-500)","lime-50":"#f7fee7","lime-100":"#ecfccb","lime-200":"#d9f99d","lime-300":"#bef264","lime-400":"#a3e635","lime-500":"#84cc16","lime-600":"#65a30d","lime-700":"#4d7c0f","lime-800":"#3f6212","lime-900":"#365314","lime-950":"#1a2e05",lime:"var(--color-lime-500)","green-50":"#f0fdf4","green-100":"#dcfce7","green-200":"#bbf7d0","green-300":"#86efac","green-400":"#4ade80","green-500":"#22c55e","green-600":"#16a34a","green-700":"#15803d","green-800":"#166534","green-900":"#14532d","green-950":"#052e16",green:"var(--color-green-500)","teal-50":"#f0fdfa","teal-100":"#ccfbf1","teal-200":"#99f6e4","teal-300":"#5eead4","teal-400":"#2dd4bf","teal-500":"#14b8a6","teal-600":"#0d9488","teal-700":"#0f766e","teal-800":"#115e59","teal-900":"#134e4a","teal-950":"#042f2e",teal:"var(--color-teal-500)","cyan-50":"#ecfeff","cyan-100":"#cffafe","cyan-200":"#a5f3fc","cyan-300":"#67e8f9","cyan-400":"#22d3ee","cyan-500":"#06b6d4","cyan-600":"#0891b2","cyan-700":"#0e7490","cyan-800":"#155e75","cyan-900":"#164e63","cyan-950":"#083344",cyan:"var(--color-cyan-500)","sky-50":"#f0f9ff","sky-100":"#e0f2fe","sky-200":"#bae6fd","sky-300":"#7dd3fc","sky-400":"#38bdf8","sky-500":"#0ea5e9","sky-600":"#0284c7","sky-700":"#0369a1","sky-800":"#075985","sky-900":"#0c4a6e","sky-950":"#082f49",sky:"var(--color-sky-500)","blue-50":"#eff6ff","blue-100":"#dbeafe","blue-200":"#bfdbfe","blue-300":"#93c5fd","blue-400":"#60a5fa","blue-500":"#3b82f6","blue-600":"#2563eb","blue-700":"#1d4ed8","blue-800":"#1e40af","blue-900":"#1e3a8a","blue-950":"#172554",blue:"var(--color-blue-500)","indigo-50":"#eef2ff","indigo-100":"#e0e7ff","indigo-200":"#c7d2fe","indigo-300":"#a5b4fc","indigo-400":"#818cf8","indigo-500":"#6366f1","indigo-600":"#4f46e5","indigo-700":"#4338ca","indigo-800":"#3730a3","indigo-900":"#312e81","indigo-950":"#1e1b4b",indigo:"var(--color-indigo-500)","violet-50":"#f5f3ff","violet-100":"#ede9fe","violet-200":"#ddd6fe","violet-300":"#c4b5fd","violet-400":"#a78bfa","violet-500":"#8b5cf6","violet-600":"#7c3aed","violet-700":"#6d28d9","violet-800":"#5b21b6","violet-900":"#4c1d95","violet-950":"#2e1065",violet:"var(--color-violet-500)","purple-50":"#faf5ff","purple-100":"#f3e8ff","purple-200":"#e9d5ff","purple-300":"#d8b4fe","purple-400":"#c084fc","purple-500":"#a855f7","purple-600":"#9333ea","purple-700":"#7e22ce","purple-800":"#6b21a8","purple-900":"#581c87","purple-950":"#3b0764",purple:"var(--color-purple-500)","fuchsia-50":"#fdf4ff","fuchsia-100":"#fae8ff","fuchsia-200":"#f5d0fe","fuchsia-300":"#f0abfc","fuchsia-400":"#e879f9","fuchsia-500":"#d946ef","fuchsia-600":"#c026d3","fuchsia-700":"#a21caf","fuchsia-800":"#86198f","fuchsia-900":"#701a75","fuchsia-950":"#4a044e",fuchsia:"var(--color-fuchsia-500)","pink-50":"#fdf2f8","pink-100":"#fce7f3","pink-200":"#fbcfe8","pink-300":"#f9a8d4","pink-400":"#f472b6","pink-500":"#ec4899","pink-600":"#db2777","pink-700":"#be185d","pink-800":"#9d174d","pink-900":"#831843","pink-950":"#500724",pink:"var(--color-pink-500)","rose-50":"#fff1f2","rose-100":"#ffe4e6","rose-200":"#fecdd3","rose-300":"#fda4af","rose-400":"#fb7185","rose-500":"#f43f5e","rose-600":"#e11d48","rose-700":"#be123c","rose-800":"#9f1239","rose-900":"#881337","rose-950":"#4c0519",rose:"var(--color-rose-500)"},grid:{"page-width":"var(--width-xl)","page-gutter":"5vw","page-main":"2 / 3",page:"minmax(var(--grid-page-gutter), 1fr) minmax(0, var(--grid-page-width)) minmax(var(--grid-page-gutter), 1fr)",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"}};function r(e){return"function"==typeof e?e(t):e} /*! * css-vars-ponyfill * v2.4.9 * https://jhildenbiddle.github.io/css-vars-ponyfill/ * (c) 2018-2024 John Hildenbiddle <http://hildenbiddle.com> * MIT license */function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)} /*! * get-css-data * v2.1.0 * https://github.com/jhildenbiddle/get-css-data * (c) 2018-2022 John Hildenbiddle <http://hildenbiddle.com> * MIT license */function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},n=Array.isArray(e)?e:[e],o=Array.apply(null,Array(n.length)).map((function(e){return null}));function a(e){var t="string"==typeof e,r=t&&"<"===e.trim().charAt(0);return t&&!r}function s(e,t){r.onError(e,n[t],t)}function i(e,t){var a=r.onSuccess(e,n[t],t);e=!1===a?"":a||e,o[t]=e,-1===o.indexOf(null)&&r.onComplete(o)}var c=document.createElement("a");n.forEach((function(e,t){if(c.setAttribute("href",e),c.href=String(c.href),Boolean(document.all&&!window.atob)&&c.host.split(":")[0]!==location.host.split(":")[0]){if(c.protocol===location.protocol){var n=new XDomainRequest;n.open("GET",e),n.timeout=0,n.onprogress=Function.prototype,n.ontimeout=Function.prototype,n.onload=function(){var e=n.responseText;a(e)?i(e,t):s(n,t)},n.onerror=function(e){s(n,t)},setTimeout((function(){n.send()}),0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),s(null,t)}else{var o=new XMLHttpRequest;o.open("GET",e),r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType),r.onBeforeSend(o,e,t),o.onreadystatechange=function(){if(4===o.readyState){var e=o.responseText;o.status<400&&a(e)||0===o.status&&a(e)?i(e,t):s(o,t)}},o.send()}}))} /** * Gets CSS data from <style> and <link> nodes (including @imports), then * returns data in order processed by DOM. Allows specifying nodes to * include/exclude and filtering CSS data using RegEx. * * @preserve * @param {object} [options] The options object * @param {object} [options.rootElement=document] Root element to traverse for * <link> and <style> nodes. * @param {string} [options.include] CSS selector matching <link> and <style> * nodes to include * @param {string} [options.exclude] CSS selector matching <link> and <style> * nodes to exclude * @param {object} [options.filter] Regular expression used to filter node CSS * data. Each block of CSS data is tested against the filter, * and only matching data is included. * @param {boolean} [options.skipDisabled=true] Determines if disabled * stylesheets will be skipped while collecting CSS data. * @param {boolean} [options.useCSSOM=false] Determines if CSS data will be * collected from a stylesheet's runtime values instead of its * text content. This is required to get accurate CSS data * when a stylesheet has been modified using the deleteRule() * or insertRule() methods because these modifications will * not be reflected in the stylesheet's text content. * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes * 1) the XHR object, 2) source node reference, and 3) the * source URL as arguments. * @param {function} [options.onSuccess] Callback on each CSS node read. Passes * 1) CSS text, 2) source node reference, and 3) the source * URL as arguments. * @param {function} [options.onError] Callback on each error. Passes 1) the XHR * object for inspection, 2) soure node reference, and 3) the * source URL that failed (either a <link> href or an @import) * as arguments * @param {function} [options.onComplete] Callback after all nodes have been * processed. Passes 1) concatenated CSS text, 2) an array of * CSS text in DOM order, and 3) an array of nodes in DOM * order as arguments. * * @example * * getCssData({ * rootElement : document, * include : 'style,link[rel="stylesheet"]', * exclude : '[href="skip.css"]', * filter : /red/, * skipDisabled: true, * useCSSOM : false, * onBeforeSend(xhr, node, url) { * // ... * } * onSuccess(cssText, node, url) { * // ... * } * onError(xhr, node, url) { * // ... * }, * onComplete(cssText, cssArray, nodeArray) { * // ... * } * }); */function a(e){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},r={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,skipDisabled:!1!==e.skipDisabled,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},n=Array.apply(null,r.rootElement.querySelectorAll(r.include)).filter((function(e){return t=e,n=r.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,n);var t,n})),a=Array.apply(null,Array(n.length)).map((function(e){return null}));function i(){if(-1===a.indexOf(null)){a.reduce((function(e,t,r){return""===t&&e.push(r),e}),[]).reverse().forEach((function(e){return[n,a].forEach((function(t){return t.splice(e,1)}))}));var e=a.join("");r.onComplete(e,a,n)}}function c(e,t,n,o){var s=r.onSuccess(e,n,o);u(e=void 0!==s&&!1===Boolean(s)?"":s||e,n,o,(function(e,o){null===a[t]&&(o.forEach((function(e){return r.onError(e.xhr,n,e.url)})),!r.filter||r.filter.test(e)?a[t]=e:a[t]="",i())}))}function l(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o={};return o.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter((function(e){return-1===n.indexOf(e)})),o.urls=o.rules.map((function(e){return e.replace(t.cssImports,"$1")})),o.absoluteUrls=o.urls.map((function(e){return s(e,r)})),o.absoluteRules=o.rules.map((function(e,t){var n=o.urls[t],a=s(o.absoluteUrls[t],r);return e.replace(n,a)})),o}function u(e,t,n,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],c=l(e,n,i);c.rules.length?o(c.absoluteUrls,{onBeforeSend:function(e,n,o){r.onBeforeSend(e,t,n)},onSuccess:function(e,n,o){var a=r.onSuccess(e,t,n),s=l(e=!1===a?"":a||e,n,i);return s.rules.forEach((function(t,r){e=e.replace(t,s.absoluteRules[r])})),e},onError:function(r,o,l){s.push({xhr:r,url:o}),i.push(c.rules[l]),u(e,t,n,a,s,i)},onComplete:function(r){r.forEach((function(t,r){e=e.replace(c.rules[r],t)})),u(e,t,n,a,s,i)}}):a(e,s)}n.length?n.forEach((function(e,t){var n=e.getAttribute("href"),l=e.getAttribute("rel"),u="link"===e.nodeName.toLowerCase()&&n&&l&&-1!==l.toLowerCase().indexOf("stylesheet"),f=!1!==r.skipDisabled&&e.disabled,d="style"===e.nodeName.toLowerCase();if(u&&!f)if(-1!==n.indexOf("data:text/css")){var p=decodeURIComponent(n.substring(n.indexOf(",")+1));r.useCSSOM&&(p=Array.apply(null,e.sheet.cssRules).map((function(e){return e.cssText})).join("")),c(p,t,e,location.href)}else o(n,{mimeType:"text/css",onBeforeSend:function(t,n,o){r.onBeforeSend(t,e,n)},onSuccess:function(r,o,a){var i=s(n);c(r,t,e,i)},onError:function(n,o,s){a[t]="",r.onError(n,e,o),i()}});else if(d&&!f){var m=e.textContent;r.useCSSOM&&(m=Array.apply(null,e.sheet.cssRules).map((function(e){return e.cssText})).join("")),c(m,t,e,location.href)}else a[t]="",i()})):r.onComplete("",[])}function s(e,t){var r=document.implementation.createHTMLDocument(""),n=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(o),n.href=t||document.baseURI||(document.querySelector("base")||{}).href||location.href,o.href=e,o.href}var i=c;function c(e,t,r){e instanceof RegExp&&(e=l(e,r)),t instanceof RegExp&&(t=l(t,r));var n=u(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function l(e,t){var r=t.match(e);return r?r[0]:null}function u(e,t,r){var n,o,a,s,i,c=r.indexOf(e),l=r.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],a=r.length;u>=0&&!i;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?i=[n.pop(),l]:((o=n.pop())<a&&(a=o,s=l),l=r.indexOf(t,u+1)),u=c<l&&c>=0?c:l;n.length&&(i=[a,s])}return i}function f(e){var t=n({},{preserveStatic:!0,removeComments:!1},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});function r(e){throw new Error("CSS parse error: ".concat(e))}function o(t){var r=t.exec(e);if(r)return e=e.slice(r[0].length),r}function a(){return o(/^{\s*/)}function s(){return o(/^}/)}function c(){o(/^\s*/)}function l(){if(c(),"/"===e[0]&&"*"===e[1]){for(var t=2;e[t]&&("*"!==e[t]||"/"!==e[t+1]);)t++;if(!e[t])return r("end of comment is missing");var n=e.slice(2,t);return e=e.slice(t+2),{type:"comment",comment:n}}}function u(){for(var e,r=[];e=l();)r.push(e);return t.removeComments?[]:r}function f(){for(c();"}"===e[0];)r("extra closing bracket");var t=o(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(t){var n,a=t[0].trim();/\/\*/.test(a)&&(a=a.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,""));var s=/["']\w*,\w*["']/.test(a);return s&&(a=a.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")}))),n=/,/.test(a)?a.split(/\s*(?![^(]*\)),\s*/):[a],s&&(n=n.map((function(e){return e.replace(/\u200C/g,",")}))),n}}function d(){if("@"===e[0])return b();o(/^([;\s]*)+/);var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=o(/^(\*?[-#/*\\\w.]+(\[[0-9a-z_-]+\])?)\s*/);if(n){if(n=n[0].trim(),!o(/^:\s*/))return r("property missing ':'");var a=o(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),s={type:"declaration",property:n.replace(t,""),value:a?a[0].replace(t,"").trim():""};return o(/^[;\s]*/),s}}function p(){if(!a())return r("missing '{'");for(var e,t=u();e=d();)t.push(e),t=t.concat(u());return s()?t:r("missing '}'")}function m(){c();for(var e,t=[];e=o(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),o(/^,\s*/);if(t.length)return{type:"keyframe",values:t,declarations:p()}}function b(){if(c(),"@"===e[0]){var n=function(){var e=o(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}()||function(){if(o(/^@font-face\s*/))return{type:"font-face",declarations:p()}}()||function(){var e=o(/^@media([^{]+)*/);if(e)return{type:"media",media:(e[1]||"").trim(),rules:g()}}()||function(){var e=o(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=o(/^([-\w]+)\s*/)))return r("@keyframes missing name");var n,i=e[1];if(!a())return r("@keyframes missing '{'");for(var c=u();n=m();)c.push(n),c=c.concat(u());return s()?{type:"keyframes",name:i,vendor:t,keyframes:c}:r("@keyframes missing '}'")}}()||function(){var e=o(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:g()}}()||function(){var e=o(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:g()}}()||function(){var e=o(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(o(/^@host\s*/))return{type:"host",rules:g()}}()||function(){if(o(/^@page */))return{type:"page",selectors:f()||[],declarations:p()}}()||function(){var e=o(/@(top|bottom|left|right)-(left|center|right|top|middle|bottom)-?(corner)?\s*/);if(e)return{type:"page-margin-box",name:"".concat(e[1],"-").concat(e[2])+(e[3]?"-".concat(e[3]):""),declarations:p()}}();if(n&&!t.preserveStatic){var i=!1;if(n.declarations)i=n.declarations.some((function(e){return/var\(/.test(e.value)}));else i=(n.keyframes||n.rules||[]).some((function(e){return(e.declarations||[]).some((function(e){return/var\(/.test(e.value)}))}));return i?n:{}}return n}}function v(){if(!t.preserveStatic){var n=i("{","}",e);if(n){var o=/:(?:root|host)(?![.:#(])/.test(n.pre)&&/--\S*\s*:/.test(n.body),a=/var\(/.test(n.body);if(!o&&!a)return e=e.slice(n.end+1),{}}}var s=f()||[],c=t.preserveStatic?p():p().filter((function(e){var t=s.some((function(e){return/:(?:root|host)(?![.:#(])/.test(e)}))&&/^--\S/.test(e.property),r=/var\(/.test(e.value);return t||r}));return s.length||r("selector missing"),{type:"rule",selectors:s,declarations:c}}function g(t){if(!t&&!a())return r("missing '{'");for(var n,o=u();e.length&&(t||"}"!==e[0])&&(n=b()||v());)n.type&&o.push(n),o=o.concat(u());return t||s()?o:r("missing '}'")}return{type:"stylesheet",stylesheet:{rules:g(!0),errors:[]}}}function d(e){var t=n({},{parseHost:!1,store:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),r=new RegExp(":".concat(t.parseHost?"host":"root","$"));return"string"==typeof e&&(e=f(e,t)),e.stylesheet.rules.forEach((function(e){"rule"===e.type&&e.selectors.some((function(e){return r.test(e)}))&&e.declarations.forEach((function(e,r){var n=e.property,o=e.value;n&&0===n.indexOf("--")&&(t.store[n]=o)}))})),t.store}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,n={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+o(e.rules)+"}"},"font-face":function(e){return"@font-face{"+o(e.declarations)+"}"},host:function(e){return"@host{"+o(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+o(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+o(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+o(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+o(e.declarations)+"}"},"page-margin-box":function(e){return"@"+e.name+"{"+o(e.declarations)+"}"},rule:function(e){var t=e.declarations;if(t.length)return e.selectors.join(",")+"{"+o(t)+"}"},supports:function(e){return"@supports "+e.supports+"{"+o(e.rules)+"}"}};function o(e){for(var o="",a=0;a<e.length;a++){var s=e[a];r&&r(s);var i=n[s.type](s);i&&(o+=i,i.length&&s.selectors&&(o+=t))}return o}return o(e.stylesheet.rules)}function m(e,t){e.rules.forEach((function(r){r.rules?m(r,t):r.keyframes?r.keyframes.forEach((function(e){"keyframe"===e.type&&t(e.declarations,r)})):r.declarations&&t(r.declarations,e)}))}c.range=u;var b="--",v="var";function g(e){var t=n({},{preserveStatic:!0,preserveVars:!1,variables:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return"string"==typeof e&&(e=f(e,t)),m(e.stylesheet,(function(e,r){for(var n=0;n<e.length;n++){var o=e[n],a=o.type,s=o.property,i=o.value;if("declaration"===a)if(t.preserveVars||!s||0!==s.indexOf(b)){if(-1!==i.indexOf(v+"(")){var c=y(i,t);c!==o.value&&(c=h(c),t.preserveVars?(e.splice(n,0,{type:a,property:s,value:c}),n++):o.value=c)}}else e.splice(n,1),n--}})),p(e)}function h(e){return(e.match(/calc\(([^)]+)\)/g)||[]).forEach((function(t){var r="calc".concat(t.split("calc").join(""));e=e.replace(t,r)})),e}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(-1===e.indexOf("var("))return e;var n=i("(",")",e);return n?"var"===n.pre.slice(-3)?0===n.body.trim().length?(t.onWarning("var() must contain a non-whitespace string"),e):n.pre.slice(0,-3)+function(e){var n=e.split(",")[0].replace(/[\s\n\t]/g,""),o=(e.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],a=Object.prototype.hasOwnProperty.call(t.variables,n)?String(t.variables[n]):void 0,s=a||(o?String(o):void 0),i=r||e;return a||t.onWarning('variable "'.concat(n,'" is undefined')),s&&"undefined"!==s&&s.length>0?y(s,t,i):"var(".concat(i,")")}(n.body)+y(n.post,t):n.pre+"(".concat(y(n.body,t),")")+y(n.post,t):(-1!==e.indexOf("var(")&&t.onWarning('missing closing ")" in the value "'.concat(e,'"')),e)}var x="undefined"!=typeof window,S=x&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),w={group:0,job:0},E={rootElement:x?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},onlyLegacy:!0,preserveStatic:!0,preserveVars:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onError:function(){},onWarning:function(){},onSuccess:function(){},onComplete:function(){},onFinally:function(){}},k={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssMediaQueries:/@media[^{]+\{([\s\S]+?})\s*}/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVarDeclRules:/(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^}]*})/g,cssVarDecls:/(?:[\s;]*)(-{2}\w[\w-]*)(?:\s*:\s*)([^;]*);/g,cssVarFunc:/var\(\s*--[\w-]/,cssVars:/(?:(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},C={dom:{},job:{},user:{}},O=!1,A=null,j=0,z=null,_=!1; /** * Fetches, parses, and transforms CSS custom properties from specified * <style> and <link> elements into static values, then appends a new <style> * element with static values to the DOM to provide CSS custom property * compatibility for legacy browsers. Also provides a single interface for * live updates of runtime values in both modern and legacy browsers. * * @preserve * @param {object} [options] Options object * @param {object} [options.rootElement=document] Root element to traverse for * <link> and <style> nodes * @param {boolean} [options.shadowDOM=false] Determines if shadow DOM <link> * and <style> nodes will be processed. * @param {string} [options.include="style,link[rel=stylesheet]"] CSS selector * matching <link re="stylesheet"> and <style> nodes to * process * @param {string} [options.exclude] CSS selector matching <link * rel="stylehseet"> and <style> nodes to exclude from those * matches by options.include * @param {object} [options.variables] A map of custom property name/value * pairs. Property names can omit or include the leading * double-hyphen (—), and values specified will override * previous values * @param {boolean} [options.onlyLegacy=true] Determines if the ponyfill will * only generate legacy-compatible CSS in browsers that lack * native support (i.e., legacy browsers) * @param {boolean} [options.preserveStatic=true] Determines if CSS * declarations that do not reference a custom property will * be preserved in the transformed CSS * @param {boolean} [options.preserveVars=false] Determines if CSS custom * property declarations will be preserved in the transformed * CSS * @param {boolean} [options.silent=false] Determines if warning and error * messages will be displayed on the console * @param {boolean} [options.updateDOM=true] Determines if the ponyfill will * update the DOM after processing CSS custom properties * @param {boolean} [options.updateURLs=true] Determines if relative url() * paths will be converted to absolute urls in external CSS * @param {boolean} [options.watch=false] Determines if a MutationObserver will * be created that will execute the ponyfill when a <link> or * <style> DOM mutation is observed * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes * 1) the XHR object, 2) source node reference, and 3) the * source URL as arguments * @param {function} [options.onError] Callback after a CSS parsing error has * occurred or an XHR request has failed. Passes 1) an error * message, and 2) source node reference, 3) xhr, and 4 url as * arguments. * @param {function} [options.onWarning] Callback after each CSS parsing warning * has occurred. Passes 1) a warning message as an argument. * @param {function} [options.onSuccess] Callback after CSS data has been * collected from each node and before CSS custom properties * have been transformed. Allows modifying the CSS data before * it is transformed by returning any string value (or false * to skip). Passes 1) CSS text, 2) source node reference, and * 3) the source URL as arguments. * @param {function} [options.onComplete] Callback after all CSS has been * processed, legacy-compatible CSS has been generated, and * (optionally) the DOM has been updated. Passes 1) a CSS * string with CSS variable values resolved, 2) an array of * output <style> node references that have been appended to * the DOM, 3) an object containing all custom properies names * and values, and 4) the ponyfill execution time in * milliseconds. * @param {function} [options.onFinally] Callback in modern and legacy browsers * after the ponyfill has finished all tasks. Passes 1) a * boolean indicating if the last ponyfill call resulted in a * style change, 2) a boolean indicating if the current * browser provides native support for CSS custom properties, * and 3) the ponyfill execution time in milliseconds. * @example * * cssVars({ * rootElement : document, * shadowDOM : false, * include : 'style,link[rel="stylesheet"]', * exclude : '', * variables : {}, * onlyLegacy : true, * preserveStatic: true, * preserveVars : false, * silent : false, * updateDOM : true, * updateURLs : true, * watch : false, * onBeforeSend(xhr, node, url) {}, * onError(message, node, xhr, url) {}, * onWarning(message) {}, * onSuccess(cssText, node, url) {}, * onComplete(cssText, styleNode, cssVariables, benchmark) {}, * onFinally(hasChanged, hasNativeSupport, benchmark) * }); */ function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="cssVars(): ",r=n({},E,e);function o(e,n,o,a){!r.silent&&window.console&&console.error("".concat(t).concat(e,"\n"),n),r.onError(e,n,o,a)}function s(e){!r.silent&&window.console&&console.warn("".concat(t).concat(e)),r.onWarning(e)}function i(e){r.onFinally(Boolean(e),S,R()-r.__benchmark)}if(x){if(r.watch)return r.watch=E.watch,function(e){function t(e){var t=r(e)&&e.hasAttribute("disabled"),n=(e.sheet||{}).disabled;return t||n}function r(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function n(e){return"style"===e.nodeName.toLowerCase()}function o(n){var o=!1;if("attributes"===n.type&&r(n.target)&&!t(n.target)){var a="disabled"===n.attributeName,s="href"===n.attributeName,i="skip"===n.target.getAttribute("data-cssvars"),c="src"===n.target.getAttribute("data-cssvars");a?o=!i&&!c:s&&(i?n.target.setAttribute("data-cssvars",""):c&&V(e.rootElement,!0),o=!0)}return o}function a(e){var t=!1;if("childList"===e.type){var r=n(e.target),o="out"===e.target.getAttribute("data-cssvars");t=r&&!o}return t}function s(e){var o=!1;return"childList"===e.type&&(o=[].slice.call(e.addedNodes).some((function(e){var o=1===e.nodeType&&e.hasAttribute("data-cssvars"),a=n(e)&&k.cssVars.test(e.textContent);return!o&&(r(e)||a)&&!t(e)}))),o}function i(t){var r=!1;return"childList"===t.type&&(r=[].slice.call(t.removedNodes).some((function(t){var r=1===t.nodeType,n=r&&"out"===t.getAttribute("data-cssvars"),o=r&&"src"===t.getAttribute("data-cssvars"),a=o;if(o||n){var s=t.getAttribute("data-cssvars-group"),i=e.rootElement.querySelector('[data-cssvars-group="'.concat(s,'"]'));o&&V(e.rootElement,!0),i&&i.parentNode.removeChild(i)}return a}))),r}if(!window.MutationObserver)return;A&&(A.disconnect(),A=null);A=new MutationObserver((function(t){t.some((function(e){return o(e)||a(e)||s(e)||i(e)}))&&M(e)})),A.observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})}(r),void M(r);if(!1===r.watch&&A&&(A.disconnect(),A=null),!r.__benchmark){if(O===r.rootElement)return void function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(z),z=setTimeout((function(){e.__benchmark=null,M(e)}),t)}(e);var c=[].slice.call(r.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));if(r.__benchmark=R(),r.exclude=[A?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",r.exclude].filter((function(e){return e})).join(","),r.variables=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce((function(r,n){return r[t.test(n)?n:"--".concat(n.replace(/^-+/,""))]=e[n],r}),{})}(r.variables),c.forEach((function(e){var t="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,r=t&&e.textContent!==e.__cssVars.text;t&&r&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))})),!A)[].slice.call(r.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach((function(e){var t=e.getAttribute("data-cssvars-group");(t?r.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]')):null)||e.parentNode.removeChild(e)})),j&&c.length<j&&(j=c.length,C.dom={})}if("loading"!==document.readyState)if(S&&r.onlyLegacy){var l=!1;if(r.updateDOM){var u=r.rootElement.host||(r.rootElement===document?document.documentElement:r.rootElement);Object.keys(r.variables).forEach((function(e){var t=r.variables[e];l=l||t!==getComputedStyle(u).getPropertyValue(e),u.style.setProperty(e,t)}))}i(l)}else!_&&(r.shadowDOM||r.rootElement.shadowRoot||r.rootElement.host)?a({rootElement:E.rootElement,include:E.include,exclude:r.exclude,skipDisabled:!1,onSuccess:function(e,t,r){return!((t.sheet||{}).disabled&&!t.__cssVars)&&((e=((e=e.replace(k.cssComments,"").replace(k.cssMediaQueries,"")).match(k.cssVarDeclRules)||[]).join(""))||!1)},onComplete:function(e,t,n){d(e,{store:C.dom,onWarning:s}),_=!0,M(r)}}):(O=r.rootElement,a({rootElement:r.rootElement,include:r.include,exclude:r.exclude,skipDisabled:!1,onBeforeSend:r.onBeforeSend,onError:function(e,t,r){var n=e.responseURL||L(r,location.href),a=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");o("CSS XHR Error: ".concat(n," ").concat(e.status," ").concat(a),t,e,n)},onSuccess:function(e,t,n){if((t.sheet||{}).disabled&&!t.__cssVars)return!1;var o="link"===t.nodeName.toLowerCase(),a="style"===t.nodeName.toLowerCase()&&e!==t.textContent,s=r.onSuccess(e,t,n);return e=void 0!==s&&!1===Boolean(s)?"":s||e,r.updateURLs&&(o||a)&&(e=function(e,t){var r=e.replace(k.cssComments,"").match(k.cssUrls)||[];return r.forEach((function(r){var n=r.replace(k.cssUrls,"$1"),o=L(n,t);e=e.replace(r,r.replace(n,o))})),e}(e,n)),e},onComplete:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=n({},C.dom,C.user);if(C.job={},a.forEach((function(e,n){var a=t[n];if(e.__cssVars=e.__cssVars||{},e.__cssVars.text=a,k.cssVars.test(a))try{var i=f(a,{preserveStatic:r.preserveStatic,removeComments:!0});d(i,{parseHost:Boolean(r.rootElement.host),store:C.dom,onWarning:s}),e.__cssVars.tree=i}catch(t){o(t.message,e)}})),n(C.job,C.dom),r.updateDOM?(n(C.user,r.variables),n(C.job,C.user)):(n(C.job,C.user,r.variables),n(c,r.variables)),w.job>0&&Boolean(Object.keys(C.job).length>Object.keys(c).length||Boolean(Object.keys(c).length&&Object.keys(C.job).some((function(e){return C.job[e]!==c[e]})))))V(r.rootElement),M(r);else{var l=[],u=[],m=!1;if(r.updateDOM&&w.job++,a.forEach((function(e,a){var i=!e.__cssVars.tree;if(e.__cssVars.tree)try{g(e.__cssVars.tree,n({},r,{variables:C.job,onWarning:s}));var c=p(e.__cssVars.tree);if(r.updateDOM){var f=t[a],d=k.cssVarFunc.test(f);if(e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),c.length&&d){var b=e.getAttribute("data-cssvars-group")||++w.group,v=c.replace(/\s/g,""),h=r.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(b,'"]'))||document.createElement("style");m=m||k.cssKeyframes.test(c),r.preserveStatic&&e.sheet&&(e.sheet.disabled=!0),h.hasAttribute("data-cssvars")||h.setAttribute("data-cssvars","out"),v===e.textContent.replace(/\s/g,"")?(i=!0,h&&h.parentNode&&(e.removeAttribute("data-cssvars-group"),h.parentNode.removeChild(h))):v!==h.textContent.replace(/\s/g,"")&&([e,h].forEach((function(e){e.setAttribute("data-cssvars-job",w.job),e.setAttribute("data-cssvars-group",b)})),h.textContent=c,l.push(c),u.push(h),h.parentNode||e.parentNode.insertBefore(h,e.nextSibling))}}else e.textContent.replace(/\s/g,"")!==c&&l.push(c)}catch(t){o(t.message,e)}i&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",w.job)})),j=r.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,r.shadowDOM)for(var b,v=[].concat(r.rootElement).concat([].slice.call(r.rootElement.querySelectorAll("*"))),h=0;b=v[h];++h){if(b.shadowRoot&&b.shadowRoot.querySelector("style"))M(n({},r,{rootElement:b.shadowRoot}))}r.updateDOM&&m&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(e){return getComputedStyle(document.body)[e]}))[0];if(t){for(var r=[].slice.call(e.querySelectorAll("*")),n=[],o="__CSSVARSPONYFILL-KEYFRAMES__",a=0,s=r.length;a<s;a++){var i=r[a];"none"!==getComputedStyle(i)[t]&&(i.style[t]+=o,n.push(i))}document.body.offsetHeight;for(var c=0,l=n.length;c<l;c++){var u=n[c].style;u[t]=u[t].replace(o,"")}}}(r.rootElement),O=!1,r.onComplete(l.join(""),u,JSON.parse(JSON.stringify(C.job)),R()-r.__benchmark),i(u.length)}}}));else document.addEventListener("DOMContentLoaded",(function t(r){M(e),document.removeEventListener("DOMContentLoaded",t)}))}}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,r=document.implementation.createHTMLDocument(""),n=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(o),n.href=t,o.href=e,o.href}function R(){return x&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function V(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach((function(e){return e.setAttribute("data-cssvars","")})),t&&(C.dom={})}function q({onComplete:e,...t}){((window||{}).CSS||{}).supports&&window.CSS.supports("(--a: 0)")||(document.body.style.visibility="hidden",M({watch:!0,updateURLs:!1,onComplete(){e?.(),document.body.style.visibility="visible"},...t}))}M.reset=function(){for(var e in w.job=0,w.group=0,O=!1,A&&(A.disconnect(),A=null),j=0,z=null,_=!1,C)C[e]={}};export{r as defineConfig,e as fluid,q as shimmie};