1// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/src/style-mod.js 2 3const e=`ͼ`,t=typeof Symbol>`u`?`__ͼ`:Symbol.for(`ͼ`),n=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),r=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{};class StyleModule{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(` 4`)}static newName(){let e=r[t]||1;return r[t]=e+1,`ͼ`+e.toString(36)}static mount(e,t,r){let i=e[n],a=r&&r.nonce;i?a&&i.setNonce(a):i=new StyleSet(e,a),i.mount(Array.isArray(t)?t:[t],e)}}let i=/* @__PURE__ */ new Map;class StyleSet{constructor(e,t){let r=e.ownerDocument||e,a=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&a.CSSStyleSheet){let t=i.get(r);if(t)return e[n]=t;this.sheet=new a.CSSStyleSheet,i.set(r,this)}else this.styleTag=r.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[n]=this}mount(e,t){let n=this.sheet,r=0,i=0,a=!1;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<i&&s>-1&&(this.modules.splice(s,1),a=!0,i--,s=-1),s==-1){if(this.modules.splice(i++,0,o),a=!0,n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(a){let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+` 5`;this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}}export{StyleModule}; 6
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.