You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/node_modules/tailwindcss/dist/chunk-ZH25KTLC.mjs

13 lines
13 KiB
JavaScript

function P(r){if(arguments.length===0)throw new TypeError("`CSS.escape` requires an argument.");let e=String(r),s=e.length,n=-1,t,l="",o=e.charCodeAt(0);if(s===1&&o===45)return"\\"+e;for(;++n<s;){if(t=e.charCodeAt(n),t===0){l+="\uFFFD";continue}if(t>=1&&t<=31||t===127||n===0&&t>=48&&t<=57||n===1&&t>=48&&t<=57&&o===45){l+="\\"+t.toString(16)+" ";continue}if(t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122){l+=e.charAt(n);continue}l+="\\"+e.charAt(n)}return l}function O(r){return r.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,e=>e.length>2?String.fromCodePoint(Number.parseInt(e.slice(1).trim(),16)):e[1])}var F=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-underline-offset","--text-indent","--text-decoration-thickness","--text-decoration-color"]]]);function D(r,e){return(F.get(e)??[]).some(s=>r===s||r.startsWith(`${s}-`))}var _=class{constructor(e=new Map,s=new Set([])){this.values=e;this.keyframes=s}prefix=null;add(e,s,n=0){if(e.endsWith("-*")){if(s!=="initial")throw new Error(`Invalid theme value \`${s}\` for namespace \`${e}\``);e==="--*"?this.values.clear():this.clearNamespace(e.slice(0,-2),0)}if(n&4){let t=this.values.get(e);if(t&&!(t.options&4))return}s==="initial"?this.values.delete(e):this.values.set(e,{value:s,options:n})}keysInNamespaces(e){let s=[];for(let n of e){let t=`${n}-`;for(let l of this.values.keys())l.startsWith(t)&&l.indexOf("--",2)===-1&&(D(l,n)||s.push(l.slice(t.length)))}return s}get(e){for(let s of e){let n=this.values.get(s);if(n)return n.value}return null}hasDefault(e){return(this.getOptions(e)&4)===4}getOptions(e){return e=O(this.#n(e)),this.values.get(e)?.options??0}entries(){return this.prefix?Array.from(this.values,e=>(e[0]=this.#r(e[0]),e)):this.values.entries()}#r(e){return this.prefix?`--${this.prefix}-${e.slice(2)}`:e}#n(e){return this.prefix?`--${e.slice(3+this.prefix.length)}`:e}clearNamespace(e,s){let n=F.get(e)??[];e:for(let t of this.values.keys())if(t.startsWith(e)){if(s!==0&&(this.getOptions(t)&s)!==s)continue;for(let l of n)if(t.startsWith(l))continue e;this.values.delete(t)}}#e(e,s){for(let n of s){let t=e!==null?`${n}-${e}`:n;if(!this.values.has(t))if(e!==null&&e.includes(".")){if(t=`${n}-${e.replaceAll(".","_")}`,!this.values.has(t))continue}else continue;if(!D(t,n))return t}return null}#t(e){return this.values.has(e)?`var(${P(this.#r(e))})`:null}markUsedVariable(e){let s=O(this.#n(e)),n=this.values.get(s);n&&(n.options|=16)}resolve(e,s){let n=this.#e(e,s);if(!n)return null;let t=this.values.get(n);return t.options&1?t.value:this.#t(n)}resolveValue(e,s){let n=this.#e(e,s);return n?this.values.get(n).value:null}resolveWith(e,s,n=[]){let t=this.#e(e,s);if(!t)return null;let l={};for(let f of n){let a=`${t}${f}`,u=this.values.get(a);u&&(u.options&1?l[f]=u.value:l[f]=this.#t(a))}let o=this.values.get(t);return o.options&1?[o.value,l]:[this.#t(t),l]}namespace(e){let s=new Map,n=`${e}-`;for(let[t,l]of this.values)t===e?s.set(null,l.value):t.startsWith(`${n}-`)?s.set(t.slice(e.length),l.value):t.startsWith(n)&&s.set(t.slice(n.length),l.value);return s}addKeyframes(e){this.keyframes.add(e)}getKeyframes(){return Array.from(this.keyframes)}};var y=class extends Map{constructor(s){super();this.factory=s}get(s){let n=super.get(s);return n===void 0&&(n=this.factory(s,this),this.set(s,n)),n}};function V(r){return{kind:"word",value:r}}function ue(r,e){return{kind:"function",value:r,nodes:e}}function fe(r){return{kind:"separator",value:r}}function E(r,e,s=null){for(let n=0;n<r.length;n++){let t=r[n],l=!1,o=0,f=e(t,{parent:s,replaceWith(a){l=!0,Array.isArray(a)?a.length===0?(r.splice(n,1),o=0):a.length===1?(r[n]=a[0],o=1):(r.splice(n,1,...a),o=a.length):r[n]=a}})??0;if(l){f===0?n--:n+=o-1;continue}if(f===2)return 2;if(f!==1&&t.kind==="function"&&E(t.nodes,e,t)===2)return 2}}function ce(r){let e="";for(let s of r)switch(s.kind){case"word":case"separator":{e+=s.value;break}case"function":e+=s.value+"("+ce(s.nodes)+")"}return e}var M=92,de=41,B=58,H=44,he=34,G=61,Q=62,j=60,z=10,pe=40,ge=39,Y=47,q=32,X=9;function J(r){r=r.replaceAll(`\r
`,`
`);let e=[],s=[],n=null,t="",l;for(let o=0;o<r.length;o++){let f=r.charCodeAt(o);switch(f){case M:{t+=r[o]+r[o+1],o++;break}case B:case H:case G:case Q:case j:case z:case Y:case q:case X:{if(t.length>0){let i=V(t);n?n.nodes.push(i):e.push(i),t=""}let a=o,u=o+1;for(;u<r.length&&(l=r.charCodeAt(u),!(l!==B&&l!==H&&l!==G&&l!==Q&&l!==j&&l!==z&&l!==Y&&l!==q&&l!==X));u++);o=u-1;let d=fe(r.slice(a,u));n?n.nodes.push(d):e.push(d);break}case ge:case he:{let a=o;for(let u=o+1;u<r.length;u++)if(l=r.charCodeAt(u),l===M)u+=1;else if(l===f){o=u;break}t+=r.slice(a,o+1);break}case pe:{let a=ue(t,[]);t="",n?n.nodes.push(a):e.push(a),s.push(a),n=a;break}case de:{let a=s.pop();if(t.length>0){let u=V(t);a.nodes.push(u),t=""}s.length>0?n=s[s.length-1]:n=null;break}default:t+=String.fromCharCode(f)}}return t.length>0&&e.push(V(t)),e}function Z(r){let e=[];return E(J(r),s=>{if(!(s.kind!=="function"||s.value!=="var"))return E(s.nodes,n=>{n.kind!=="word"||n.value[0]!=="-"||n.value[1]!=="-"||e.push(n.value)}),1}),e}var me=64;function xe(r,e=[]){return{kind:"rule",selector:r,nodes:e}}function L(r,e="",s=[]){return{kind:"at-rule",name:r,params:e,nodes:s}}function re(r,e=[]){return r.charCodeAt(0)===me?v(r,e):xe(r,e)}function ne(r,e,s=!1){return{kind:"declaration",property:r,value:e,important:s}}function se(r){return{kind:"comment",value:r}}function Pe(r,e){return{kind:"context",context:r,nodes:e}}function De(r){return{kind:"at-root",nodes:r}}function b(r,e,s=[],n={}){for(let t=0;t<r.length;t++){let l=r[t],o=s[s.length-1]??null;if(l.kind==="context"){if(b(l.nodes,e,s,{...n,...l.context})===2)return 2;continue}s.push(l);let f=!1,a=0,u=e(l,{parent:o,context:n,path:s,replaceWith(d){f=!0,Array.isArray(d)?d.length===0?(r.splice(t,1),a=0):d.length===1?(r[t]=d[0],a=1):(r.splice(t,1,...d),a=d.length):(r[t]=d,a=1)}})??0;if(s.pop(),f){u===0?t--:t+=a-1;continue}if(u===2)return 2;if(u!==1&&"nodes"in l){s.push(l);let d=b(l.nodes,e,s,n);if(s.pop(),d===2)return 2}}}function ee(r,e,s=[],n={}){for(let t=0;t<r.length;t++){let l=r[t],o=s[s.length-1]??null;if(l.kind==="rule"||l.kind==="at-rule")s.push(l),ee(l.nodes,e,s,n),s.pop();else if(l.kind==="context"){ee(l.nodes,e,s,{...n,...l.context});continue}s.push(l),e(l,{parent:o,context:n,path:s,replaceWith(f){Array.isArray(f)?f.length===0?r.splice(t,1):f.length===1?r[t]=f[0]:r.splice(t,1,...f):r[t]=f,t+=f.length-1}}),s.pop()}}function _e(r,e,s){let n=[],t=new Set,l=new y(()=>new Set),o=new Set,f=new Set,a=new y(()=>new Set);function u(i,g,p={},m=0){if(i.kind==="declaration"){if(i.property==="--tw-sort"||i.value===void 0||i.value===null)return;if(p.theme&&i.property[0]==="-"&&i.property[1]==="-"&&(p.keyframes||l.get(g).add(i)),i.value.includes("var("))if(p.theme&&i.property[0]==="-"&&i.property[1]==="-")for(let c of Z(i.value))a.get(c).add(i.property);else e.trackUsedVariables(i.value);if(i.property==="animation"){let c=i.value.split(/\s+/);for(let h of c)f.add(h)}g.push(i)}else if(i.kind==="rule")if(i.selector==="&")for(let c of i.nodes){let h=[];u(c,h,p,m+1),h.length>0&&g.push(...h)}else{let c={...i,nodes:[]};for(let h of i.nodes)u(h,c.nodes,p,m+1);c.nodes.length>0&&g.push(c)}else if(i.kind==="at-rule"&&i.name==="@property"&&m===0){if(t.has(i.params))return;t.add(i.params);let c={...i,nodes:[]};for(let h of i.nodes)u(h,c.nodes,p,m+1);g.push(c)}else if(i.kind==="at-rule"){i.name==="@keyframes"&&(p={...p,keyframes:!0});let c={...i,nodes:[]};for(let h of i.nodes)u(h,c.nodes,p,m+1);i.name==="@keyframes"&&p.theme&&o.add(c),(c.nodes.length>0||c.name==="@layer"||c.name==="@charset"||c.name==="@custom-media"||c.name==="@namespace"||c.name==="@import")&&g.push(c)}else if(i.kind==="at-root")for(let c of i.nodes){let h=[];u(c,h,p,0);for(let A of h)n.push(A)}else if(i.kind==="context")if(i.context.reference){if(s){let c=te(i.nodes,h=>h===s);if(c){let h=c.filter(x=>x.kind==="at-rule").map(x=>({...x,nodes:[]})).reverse(),A=s;for(let x of h)x.nodes=[A],A=x;let N=[];u(A,N,{...p,...i.context,reference:!1},m),g.push(...N)}}return}else for(let c of i.nodes)u(c,g,{...p,...i.context},m);else i.kind==="comment"&&g.push(i)}let d=[];for(let i of r)u(i,d,{},0);e:for(let[i,g]of l)for(let p of g){if(le(p.property,e.theme,a)){if(p.property.startsWith("--animate-")){let h=p.value.split(/\s+/);for(let A of h)f.add(A)}continue}let c=i.indexOf(p);if(i.splice(c,1),i.length===0){let h=te(d,A=>A.kind==="rule"&&A.nodes===i);if(!h||h.length===0)continue e;h.unshift({kind:"at-root",nodes:d});do{let A=h.pop();if(!A)break;let N=h[h.length-1];if(!N||N.kind!=="at-root"&&N.kind!=="at-rule")break;let x=N.nodes.indexOf(A);if(x===-1)break;N.nodes.splice(x,1)}while(!0);continue e}}for(let i of o)if(!f.has(i.params)){let g=n.indexOf(i);n.splice(g,1)}return d.concat(n)}function Fe(r){function e(n,t=0){let l="",o=" ".repeat(t);if(n.kind==="declaration")l+=`${o}${n.property}: ${n.value}${n.important?" !important":""};
`;else if(n.kind==="rule"){l+=`${o}${n.selector} {
`;for(let f of n.nodes)l+=e(f,t+1);l+=`${o}}
`}else if(n.kind==="at-rule"){if(n.nodes.length===0)return`${o}${n.name} ${n.params};
`;l+=`${o}${n.name}${n.params?` ${n.params} `:" "}{
`;for(let f of n.nodes)l+=e(f,t+1);l+=`${o}}
`}else if(n.kind==="comment")l+=`${o}/*${n.value}*/
`;else if(n.kind==="context"||n.kind==="at-root")return"";return l}let s="";for(let n of r){let t=e(n);t!==""&&(s+=t)}return s}function te(r,e){let s=[];return b(r,(n,{path:t})=>{if(e(n))return s=[...t],2}),s}function le(r,e,s,n=new Set){if(n.has(r)||(n.add(r),e.getOptions(r)&24))return!0;{let l=s.get(r)??[];for(let o of l)if(le(o,e,s,n))return!0}return!1}var S=92,R=47,T=42,Ne=34,ke=39,ye=58,w=59,k=10,C=32,$=9,ie=123,K=125,W=40,oe=41,ve=91,Se=93,ae=45,U=64,Ce=33;function He(r){r=r.replaceAll(`\r
`,`
`);let e=[],s=[],n=[],t=null,l=null,o="",f="",a;for(let u=0;u<r.length;u++){let d=r.charCodeAt(u);if(d===S)o+=r.slice(u,u+2),u+=1;else if(d===R&&r.charCodeAt(u+1)===T){let i=u;for(let p=u+2;p<r.length;p++)if(a=r.charCodeAt(p),a===S)p+=1;else if(a===T&&r.charCodeAt(p+1)===R){u=p+1;break}let g=r.slice(i,u+1);g.charCodeAt(2)===Ce&&s.push(se(g.slice(2,-2)))}else if(d===ke||d===Ne){let i=u;for(let g=u+1;g<r.length;g++)if(a=r.charCodeAt(g),a===S)g+=1;else if(a===d){u=g;break}else{if(a===w&&r.charCodeAt(g+1)===k)throw new Error(`Unterminated string: ${r.slice(i,g+1)+String.fromCharCode(d)}`);if(a===k)throw new Error(`Unterminated string: ${r.slice(i,g)+String.fromCharCode(d)}`)}o+=r.slice(i,u+1)}else{if((d===C||d===k||d===$)&&(a=r.charCodeAt(u+1))&&(a===C||a===k||a===$))continue;if(d===k){if(o.length===0)continue;a=o.charCodeAt(o.length-1),a!==C&&a!==k&&a!==$&&(o+=" ")}else if(d===ae&&r.charCodeAt(u+1)===ae&&o.length===0){let i="",g=u,p=-1;for(let c=u+2;c<r.length;c++)if(a=r.charCodeAt(c),a===S)c+=1;else if(a===R&&r.charCodeAt(c+1)===T){for(let h=c+2;h<r.length;h++)if(a=r.charCodeAt(h),a===S)h+=1;else if(a===T&&r.charCodeAt(h+1)===R){c=h+1;break}}else if(p===-1&&a===ye)p=o.length+c-g;else if(a===w&&i.length===0){o+=r.slice(g,c),u=c;break}else if(a===W)i+=")";else if(a===ve)i+="]";else if(a===ie)i+="}";else if((a===K||r.length-1===c)&&i.length===0){u=c-1,o+=r.slice(g,c);break}else(a===oe||a===Se||a===K)&&i.length>0&&r[c]===i[i.length-1]&&(i=i.slice(0,-1));let m=I(o,p);if(!m)throw new Error("Invalid custom property, expected a value");t?t.nodes.push(m):e.push(m),o=""}else if(d===w&&o.charCodeAt(0)===U)l=v(o),t?t.nodes.push(l):e.push(l),o="",l=null;else if(d===w&&f[f.length-1]!==")"){let i=I(o);if(!i)throw o.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${o.trim()}\``);t?t.nodes.push(i):e.push(i),o=""}else if(d===ie&&f[f.length-1]!==")")f+="}",l=re(o.trim()),t&&t.nodes.push(l),n.push(t),t=l,o="",l=null;else if(d===K&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),o.length>0)if(o.charCodeAt(0)===U)l=v(o),t?t.nodes.push(l):e.push(l),o="",l=null;else{let g=o.indexOf(":");if(t){let p=I(o,g);if(!p)throw new Error(`Invalid declaration: \`${o.trim()}\``);t.nodes.push(p)}}let i=n.pop()??null;i===null&&t&&e.push(t),t=i,o="",l=null}else if(d===W)f+=")",o+="(";else if(d===oe){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),o+=")"}else{if(o.length===0&&(d===C||d===k||d===$))continue;o+=String.fromCharCode(d)}}}if(o.charCodeAt(0)===U&&e.push(v(o)),f.length>0&&t){if(t.kind==="rule")throw new Error(`Missing closing } at ${t.selector}`);if(t.kind==="at-rule")throw new Error(`Missing closing } at ${t.name} ${t.params}`)}return s.length>0?s.concat(e):e}function v(r,e=[]){for(let s=5;s<r.length;s++){let n=r.charCodeAt(s);if(n===C||n===W){let t=r.slice(0,s).trim(),l=r.slice(s).trim();return L(t,l,e)}}return L(r.trim(),"",e)}function I(r,e=r.indexOf(":")){if(e===-1)return null;let s=r.indexOf("!important",e+1);return ne(r.slice(0,e).trim(),r.slice(e+1,s===-1?r.length:s).trim(),s!==-1)}export{He as a,P as b,O as c,_ as d,y as e,E as f,ce as g,J as h,Z as i,xe as j,L as k,re as l,ne as m,se as n,Pe as o,De as p,b as q,ee as r,_e as s,Fe as t};