Files
waybar-online/assets/battery-CUXKicJ3.js

3 lines
9.0 KiB
JavaScript
Raw Normal View History

function _(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}function O(e,u,s,o){Object.defineProperty(e,u,{get:s,set:o,enumerable:!0,configurable:!0})}var R={};_(R);O(R,"default",()=>U);class U extends Error{constructor(u,s,o,d,c){super(u+":"+o+":"+d+": "+s),this.reason=s,this.filename=u,this.line=o,this.column=d,this.source=c}}var z={};_(z);O(z,"default",()=>H);class H{constructor(u,s,o){this.start=u,this.end=s,this.source=o}}var oe={};O(oe,"CssTypes",()=>g);var g=function(e){return e.stylesheet="stylesheet",e.rule="rule",e.declaration="declaration",e.comment="comment",e.container="container",e.charset="charset",e.document="document",e.customMedia="custom-media",e.fontFace="font-face",e.host="host",e.import="import",e.keyframes="keyframes",e.keyframe="keyframe",e.layer="layer",e.media="media",e.namespace="namespace",e.page="page",e.startingStyle="starting-style",e.supports="supports",e}({});const Q=1e4,F=(e,u,s)=>{let o=s,d=Q;do{const c=u.map(x=>e.indexOf(x,o));c.push(e.indexOf("\\",o));const f=c.filter(x=>x!==-1);if(f.length===0)return-1;const r=Math.min(...f);if(e[r]==="\\")o=r+2,d--;else return r}while(d>0);throw new Error("Too many escaping")},A=(e,u,s)=>{let o=s,d=Q;do{const c=u.map(a=>e.indexOf(a,o));c.push(e.indexOf("(",o)),c.push(e.indexOf('"',o)),c.push(e.indexOf("'",o)),c.push(e.indexOf("\\",o));const f=c.filter(a=>a!==-1);if(f.length===0)return-1;const r=Math.min(...f);switch(e[r]){case"\\":o=r+2;break;case"(":{const a=A(e,[")"],r+1);if(a===-1)return-1;o=a+1}break;case'"':{const a=F(e,['"'],r+1);if(a===-1)return-1;o=a+1}break;case"'":{const a=F(e,["'"],r+1);if(a===-1)return-1;o=a+1}break;default:return r}d--}while(d>0);throw new Error("Too many escaping")},ce=(e,u)=>{const s=[];let o=0;for(;o<e.length;){const d=A(e,u,o);if(d===-1)return s.push(e.substring(o)),s;s.push(e.substring(o,d)),o=d+1}return s},P=/\/\*[^]*?(?:\*\/|$)/g,se=(e,u)=>{u=u||{};let s=1,o=1;function d(n){const t=n.match(/\n/g);t&&(s+=t.length);const i=n.lastIndexOf(`
`);o=~i?n.length-i:o+n.length}function c(){const n={line:s,column:o};return function(t){return t.position=new H(n,{line:s,column:o},u?.source||""),E(),t}}const f=[];function r(n){const t=new U(u?.source||"",n,s,o,e);if(u?.silent)f.push(t);else throw t}function x(){const n=y();return{type:g.stylesheet,stylesheet:{source:u?.source,rules:n,parsingErrors:f}}}function a(){const n=/^{\s*/.exec(e);return n?(l(n),!0):!1}function p(){const n=/^}/.exec(e);return n?(l(n),!0):!1}function y(){let n;const t=[];for(E(),$(t);e.length&&e.charAt(0)!=="}"&&(n=ne()||re());)n&&(t.push(n),$(t));return t}function l(n){const t=n[0];return d(t),e=e.slice(t.length),n}function E(){const n=/^\s*/.exec(e);n&&l(n)}function $(n){let t;for(n=n||[];t=V();)t&&n.push(t);return n}function V(){const n=c();if(e.charAt(0)!=="/"||e.charAt(1)!=="*")return;const t=/^\/\*[^]*?\*\//.exec(e);return t?(l(t),n({type:g.comment,comment:t[0].slice(2,-2)})):r("End of comment missing")}function S(){const n=/^([^{]+)/.exec(e);if(!n)return;l(n);const t=w(n[0]).replace(P,"");return ce(t,[","]).map(i=>w(i))}function M(){const n=c(),t=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);if(!t)return;l(t);const i=w(t[0]),m=/^:\s*/.exec(e);if(!m)return r("property missing ':'");l(m);let h="";const b=A(e,[";","}"]);b!==-1&&(h=e.substring(0,b),l([h]),h=w(h).replace(P,""));const v=n({type:g.declaration,property:i.replace(P,""),value:h}),N=/^[;\s]*/.exec(e);return N&&l(N),v}function I(){const n=[];if(!a())return r("missing '{'");$(n);let t;for(;t=M();)t&&(n.push(t),$(n));return p()?n:r("missing '}'")}function j(){let n;const t=[],i=c();for(;n=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);){const m=l(n);t.push(m[1]);const h=/^,\s*/.exec(e);h&&l(h)}if(t.length)return i({type:g.keyframe,values:t,declarations:I()||[]})}function B(){const n=c(),t=/^@([-\w]+)?keyframes\s*/.exec(e);if(!t)return;const i=l(t)[1],m=/^([-\w]+)\s*/.exec(e);if(!m)return r("@keyframes missing name");const h=l(m)[1];if(!a())return r("@keyframes missing '{'");let b,v=$();for(;b=j();)v.push(b),v=v.concat($());return p()?n({type:g.keyframes,name:h,vendor:i,keyframes:v}):r("@keyframes missing '}'")}function D(){const n=c(),t=/^@supports *([^{]+)/.exec(e);if(!t)return;const i=w(l(t)[1]);if(!a())return r("@supports missing '{'");const m=$().concat(y());return p()?n({type:g.supports,supports:i,rules:m}):r("@supports missing '}'")}function W(){const n=c(),t=/^@host\s*/.exec(e);if(!t)return;if(l(t),!a())return r("@host missing '{'");const i=$().concat(y());return p()?n({type:g.host,rules:i}):r("@host missing '}'")}function q(){const n=c(),t=/^@container *([^{]+)/.exec(e);if(!t)return;const i=w(l(t)[1]);if(!a())return r("@container missing '{'");const m=$().concat(y());return p()?n({type:g.container,container:i,rules:m}):r("@container missing '}'")}function G(){const n=c(),t=/^@layer *([^{;@]+)/.exec(e);if(!t)return;const i=w(l(t)[1]);if(!a()){const h=/^[;\s]*/.exec(e);return h&&l(h),n({type:g.layer,layer:i})}const m=$().concat(y());return p()?n({type:g.layer,layer:i,rules:m}):r("@layer missing '}'")}function J(){const n=c(),t=/^@media *([^{]+)/.exec(e);if(!t)return;const i=w(l(t)[1]);if(!a())return r("@media missing '{'");const m=$().concat(y());return p()?n({type:g.media,media:i,rules:m}):r("@media missing '}'")}function K(){const n=c(),t=/^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);if(!t)return;const i=l(t);return n({type:g.customMedia,name:w(i[1]),media:w(i[2])})}function X(){const n=c(),t=/^@page */.exec(e);if(!t)return;l(t);const i=S()||[];if(!a())return r("@page missing '{'");let m=$(),h;for(;h=M();)m.push(h),m=m.concat($());return p()?n({type:g.page,selectors:i,declarations:m}):r("@page missing '}'")}function Y(){const n=c(),t=/^@([-\w]+)?document *([^{]+)/.exec(e);if(!t)return;const i=l(t),m=w(i[1]),h=w(i[2]);if(!a())return r("@document missing '{'");const b=$().concat(y());return p()?n({type:g.document,document:h,vendor:m,rules:b}):r("@document missing '}'")}function Z(){const n=c(),t=/^@font-face\s*/.exec(e);if(!t)return;if(l(t),!a())return r("@font-face missing '{'");let i=$(),m;for(;m=M();)i.push(m),i=i.c