Socket
Socket
Sign inDemoInstall

jss

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss - npm Package Compare versions

Comparing version 9.8.5 to 9.8.6

4

changelog.md

@@ -0,1 +1,5 @@

## 9.8.6 / 2018-06-19
* Remove type attribute from style element (#724)
## 9.8.5 / 2018-06-19

@@ -2,0 +6,0 @@

3

dist/jss.js

@@ -1821,3 +1821,2 @@ (function (global, factory) {

this.element = element || document.createElement('style');
this.element.type = 'text/css';
this.element.setAttribute('data-jss', '');

@@ -2036,3 +2035,3 @@ if (media) this.element.setAttribute('media', media);

this.id = instanceCounter++;
this.version = "9.8.5";
this.version = "9.8.6";
this.plugins = new PluginsRegistry();

@@ -2039,0 +2038,0 @@ this.options = {

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;function r(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}var s=function(){};var i=s,o=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=o(e[r]," ");else n=o(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var s=n.indent,i=void 0===s?0:s,o=t.fallbacks;if(i++,o)if(Array.isArray(o))for(var l=0;l<o.length;l++){var h=o[l];for(var f in h){var c=h[f];null!=c&&(r+="\n"+a(f+": "+u(c)+";",i))}}else for(var d in o){var y=o[d];null!=y&&(r+="\n"+a(d+": "+u(y)+";",i))}for(var v in t){var p=t[v];null!=p&&"fallbacks"!==v&&(r+="\n"+a(v+": "+u(p)+";",i))}return r||n.allowEmpty?r=a(e+" {"+r+"\n",--i)+a("}",i):r}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(t,n,r){f(this,e),this.type="style",this.isProcessed=!1;var s=r.sheet,i=r.Renderer,o=r.selector;this.key=t,this.options=r,this.style=n,o&&(this.selectorText=o),this.renderer=s?s.renderer:new i}return c(e,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var s=n&&r;if(s?delete this.style[e]:this.style[e]=t,this.renderable)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var o=this.options.sheet;return o&&o.attached&&i(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":h(n))?e[t]=n:Array.isArray(n)&&(e[t]=u(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return l(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),e}(),v="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e,t){return e(t={exports:{}},t.exports),t.exports}var k=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable";return t}});p(k);var m=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r,s=(n=k)&&n.__esModule?n:{default:n};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==v?v:e;var i=(0,s.default)(r);t.default=i});p(m);var b=m,S=function(e){return e&&e[b]&&e===e[b]()},x=Array.isArray;function R(e){if(null==e)return e;var t=void 0===e?"undefined":h(e);if("string"===t||"number"===t||"function"===t)return e;if(x(e))return e.map(R);if(S(e))return e;var n={};for(var r in e){var s=e[r];"object"!==(void 0===s?"undefined":h(s))?n[r]=s:n[r]=R(s)}return n}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],r=n.jss,s=R(t),o=r.plugins.onCreateRule(e,s,n);return o||("@"===e[0]&&i(!1,"[JSS] Unknown at-rule %s",e),new y(e,s,n))}global.CSS;var w=function(e){return e},C=function(){function e(t){var n=this;f(this,e),this.map={},this.raw={},this.index=[],this.update=function(e,t){var r=n.options,s=r.jss.plugins,i=r.sheet;if("string"==typeof e)s.onUpdate(t,n.get(e),i);else for(var o=0;o<n.index.length;o++)s.onUpdate(e,n.index[o],i)},this.options=t,this.classes=t.classes}return c(e,[{key:"add",value:function(e,t,n){var r=this.options,s=r.parent,i=r.sheet,o=r.jss,u=r.Renderer,a=r.generateClassName;!(n=d({classes:this.classes,parent:s,sheet:i,jss:o,Renderer:u,generateClassName:a},n)).selector&&this.classes[e]&&(n.selector="."+w(this.classes[e])),this.raw[e]=t;var l=P(e,t,n),h=void 0;!n.selector&&l instanceof y&&(h=a(l,i),l.selector="."+w(h)),this.register(l,h);var f=void 0===n.index?this.index.length:n.index;return this.index.splice(f,0,l),l}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){this.map[e.key]=e,e instanceof y&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof y&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var s=e[n],i=this.options.sheet.renderer.getKey(s);t[i]&&(i=t[i]);var o=this.map[i];o&&r(o,s)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,s=0;s<this.index.length;s++){var i=this.index[s].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t}}]),e}(),O=function(){function e(t,n){var r=this;for(var s in f(this,e),this.update=function(e,t){return"string"==typeof e?r.rules.update(e,t):r.rules.update(e),r},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=d({},n,{sheet:this,parent:this,classes:this.classes}),this.renderer=new n.Renderer(this),this.rules=new C(this.options),t)this.rules.add(s,t[s]);this.rules.process()}return c(e,[{key:"attach",value:function(){return this.attached?this:(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0,this)}},{key:"detach",value:function(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var s=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(s),this.attached?this.deployed?(r?r.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),s):s:(this.deployed=!1,s)}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&r(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),e}(),j=function(){function e(){f(this,e),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return c(e,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var s=this.hooks.onCreateRule[r](e,t,n);if(s)return s}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onProcessStyle.length;s++)r=this.hooks.onProcessStyle[s](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onChangeValue.length;s++)r=this.hooks.onChangeValue[s](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):i(!1,'[JSS] Unknown hook "%s".',t)}}]),e}(),N=function(){function e(t,n,r){f(this,e),this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),e}(),A=function(){function e(t,n,r){for(var s in f(this,e),this.type="keyframes",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s],d({},this.options,{parent:this,selector:s}));this.rules.process()}return c(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),e}(),T=function(){function e(t,n,r){for(var s in f(this,e),this.type="conditional",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}return c(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),e}(),E=function(){function e(t,n,r){f(this,e),this.type="font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=l(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return l(this.key,this.style,e)}}]),e}(),M=function(){function e(t,n,r){f(this,e),this.type="viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){return l(this.key,this.style,e)}}]),e}(),U={"@charset":N,"@import":N,"@namespace":N,"@keyframes":A,"@media":T,"@supports":T,"@font-face":E,"@viewport":M,"@-ms-viewport":M},V=Object.keys(U).map(function(e){var t=new RegExp("^"+e),n=U[e];return{onCreateRule:function(e,r,s){return t.test(e)?new n(e,r,s):null}}}),_={onCreateRule:function(e,t,n){if(!S(t))return null;var r=t,s=P(e,{},n);return r.subscribe(function(e){for(var t in e)s.prop(t,e[t])}),s},onProcessRule:function(e){if(e instanceof y){var t=e,n=t.style,r=function(e){var r=n[e];if(!S(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var s in n)r(s)}}},J=Date.now(),q="fnValues"+J,G="fnStyle"+ ++J,I={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[G]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var s=e[r];"function"==typeof s&&(delete e[r],n[r]=s)}return(t=t)[q]=n,e},onUpdate:function(e,t){if(t.rules instanceof C)t.rules.update(e);else if(t instanceof y){if((t=t)[q])for(var n in t[q])t.prop(n,t[q][n](e));var r=(t=t)[G];if(r){var s=r(e);for(var i in s)t.prop(i,s[i])}}}},K=function(){function e(){f(this,e),this.registry=[]}return c(e,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),B=new K,D="2f1acc6c3a606b082e5eef5e54414ffb";null==global[D]&&(global[D]=0);var z=global[D]++,L=function(){var e=0;return function(t,n){(e+=1)>1e10&&i(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var r="c",s="";return n&&(r=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(s+=n.options.jss.id)),""+r+z+s+e}},Y=function(e){var t=void 0;return function(){return t||(t=e()),t}};function F(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function H(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=u(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function Q(e,t){try{e.style.removeProperty(t)}catch(e){i(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}var W,X=1,Z=7,$=(W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)},function(e){if(e.type===X)return e.selectorText;if(e.type===Z){var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+W(n,n.indexOf("keyframes"))}return W(e.cssText)});function ee(e,t){return e.selectorText=t,e.selectorText===t}var te,ne,re=Y(function(){return document.head||document.getElementsByTagName("head")[0]}),se=(te=void 0,ne=!1,function(e){var t={};te||(te=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof y){var s=r.selector;if(s&&-1!==s.indexOf("\\")){ne||(re().appendChild(te),ne=!0),te.textContent=s+" {}";var i=te.sheet;if(i){var o=i.cssRules;o&&(t[o[0].selectorText]=r.key)}}}}return ne&&(re().removeChild(te),ne=!1),t});function ie(e){var t=B.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&"string"==typeof r){var s=function(e){for(var t=re(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(s)return s.nextSibling;i("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return null}var oe=Y(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(){function e(t){f(this,e),this.getPropertyValue=F,this.setProperty=H,this.removeProperty=Q,this.setSelector=ee,this.getKey=$,this.getUnescapedKeysMap=se,this.hasInsertedRules=!1,t&&B.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,s=n.meta,i=n.element;this.element=i||document.createElement("style"),this.element.type="text/css",this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),s&&this.element.setAttribute("data-meta",s);var o=oe();o&&this.element.setAttribute("nonce",o)}return c(e,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,r=ie(t);if(r){var s=r.parentNode;s&&s.insertBefore(e,r)}else if(n&&"number"==typeof n.nodeType){var o=n,u=o.parentNode;u?u.insertBefore(e,o.nextSibling):i(!1,"[JSS] Insertion point is not in the DOM.")}else re().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,r=n.cssRules,s=e.toString();if(t||(t=r.length),!s)return!1;try{n.insertRule(s,t)}catch(t){return i(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),e}(),ae=function(){function e(){f(this,e)}return c(e,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),e}(),le=V.concat([_,I]),he=0,fe=function(){function e(t){f(this,e),this.id=he++,this.version="9.8.5",this.plugins=new j,this.options={createGenerateClassName:L,Renderer:n?ue:ae,plugins:[]},this.generateClassName=L(),this.use.apply(this,le),this.setup(t)}return c(e,[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?ae:ue)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===B.index?0:B.index+1);var r=new O(e,d({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),B.remove(e),this}},{key:"createRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":h(e))&&(n=t,t=e,e=void 0);var r=n;r.jss=this,r.Renderer=this.options.Renderer,r.generateClassName||(r.generateClassName=this.generateClassName),r.classes||(r.classes={});var s=P(e,t,r);return!r.selector&&s instanceof y&&(s.selector="."+r.generateClassName(s)),this.plugins.onProcessRule(s),s}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),e}();var ce=function(){function e(){f(this,e),this.sheets=[],this.refs=[],this.keys=[]}return c(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,s=this.keys,i=n.indexOf(t);return-1!==i?i:(n.push(t),r.push(0),s.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):i(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),e}(),de=function(e){return new fe(e)},ye=de();e.create=de,e.default=ye,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var s=t[r],i=void 0===s?"undefined":h(s);if("function"===i)n||(n={}),n[r]=s;else if("object"===i&&null!==s&&!Array.isArray(s)){var o=e(s);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=u,e.SheetsRegistry=K,e.SheetsManager=ce,e.RuleList=C,e.sheets=B,e.createGenerateClassName=L,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;function r(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}var s=function(){};var i=s,o=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=o(e[r]," ");else n=o(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var s=n.indent,i=void 0===s?0:s,o=t.fallbacks;if(i++,o)if(Array.isArray(o))for(var l=0;l<o.length;l++){var h=o[l];for(var f in h){var c=h[f];null!=c&&(r+="\n"+a(f+": "+u(c)+";",i))}}else for(var d in o){var y=o[d];null!=y&&(r+="\n"+a(d+": "+u(y)+";",i))}for(var v in t){var p=t[v];null!=p&&"fallbacks"!==v&&(r+="\n"+a(v+": "+u(p)+";",i))}return r||n.allowEmpty?r=a(e+" {"+r+"\n",--i)+a("}",i):r}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(t,n,r){f(this,e),this.type="style",this.isProcessed=!1;var s=r.sheet,i=r.Renderer,o=r.selector;this.key=t,this.options=r,this.style=n,o&&(this.selectorText=o),this.renderer=s?s.renderer:new i}return c(e,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var s=n&&r;if(s?delete this.style[e]:this.style[e]=t,this.renderable)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var o=this.options.sheet;return o&&o.attached&&i(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":h(n))?e[t]=n:Array.isArray(n)&&(e[t]=u(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return l(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),e}(),v="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e,t){return e(t={exports:{}},t.exports),t.exports}var k=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable";return t}});p(k);var m=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r,s=(n=k)&&n.__esModule?n:{default:n};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==v?v:e;var i=(0,s.default)(r);t.default=i});p(m);var b=m,S=function(e){return e&&e[b]&&e===e[b]()},R=Array.isArray;function x(e){if(null==e)return e;var t=void 0===e?"undefined":h(e);if("string"===t||"number"===t||"function"===t)return e;if(R(e))return e.map(x);if(S(e))return e;var n={};for(var r in e){var s=e[r];"object"!==(void 0===s?"undefined":h(s))?n[r]=s:n[r]=x(s)}return n}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],r=n.jss,s=x(t),o=r.plugins.onCreateRule(e,s,n);return o||("@"===e[0]&&i(!1,"[JSS] Unknown at-rule %s",e),new y(e,s,n))}global.CSS;var w=function(e){return e},C=function(){function e(t){var n=this;f(this,e),this.map={},this.raw={},this.index=[],this.update=function(e,t){var r=n.options,s=r.jss.plugins,i=r.sheet;if("string"==typeof e)s.onUpdate(t,n.get(e),i);else for(var o=0;o<n.index.length;o++)s.onUpdate(e,n.index[o],i)},this.options=t,this.classes=t.classes}return c(e,[{key:"add",value:function(e,t,n){var r=this.options,s=r.parent,i=r.sheet,o=r.jss,u=r.Renderer,a=r.generateClassName;!(n=d({classes:this.classes,parent:s,sheet:i,jss:o,Renderer:u,generateClassName:a},n)).selector&&this.classes[e]&&(n.selector="."+w(this.classes[e])),this.raw[e]=t;var l=P(e,t,n),h=void 0;!n.selector&&l instanceof y&&(h=a(l,i),l.selector="."+w(h)),this.register(l,h);var f=void 0===n.index?this.index.length:n.index;return this.index.splice(f,0,l),l}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){this.map[e.key]=e,e instanceof y&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof y&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var s=e[n],i=this.options.sheet.renderer.getKey(s);t[i]&&(i=t[i]);var o=this.map[i];o&&r(o,s)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,s=0;s<this.index.length;s++){var i=this.index[s].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t}}]),e}(),O=function(){function e(t,n){var r=this;for(var s in f(this,e),this.update=function(e,t){return"string"==typeof e?r.rules.update(e,t):r.rules.update(e),r},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=d({},n,{sheet:this,parent:this,classes:this.classes}),this.renderer=new n.Renderer(this),this.rules=new C(this.options),t)this.rules.add(s,t[s]);this.rules.process()}return c(e,[{key:"attach",value:function(){return this.attached?this:(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0,this)}},{key:"detach",value:function(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var s=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(s),this.attached?this.deployed?(r?r.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),s):s:(this.deployed=!1,s)}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&r(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),e}(),j=function(){function e(){f(this,e),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return c(e,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var s=this.hooks.onCreateRule[r](e,t,n);if(s)return s}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onProcessStyle.length;s++)r=this.hooks.onProcessStyle[s](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onChangeValue.length;s++)r=this.hooks.onChangeValue[s](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):i(!1,'[JSS] Unknown hook "%s".',t)}}]),e}(),N=function(){function e(t,n,r){f(this,e),this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),e}(),A=function(){function e(t,n,r){for(var s in f(this,e),this.type="keyframes",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s],d({},this.options,{parent:this,selector:s}));this.rules.process()}return c(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),e}(),T=function(){function e(t,n,r){for(var s in f(this,e),this.type="conditional",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}return c(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),e}(),E=function(){function e(t,n,r){f(this,e),this.type="font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=l(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return l(this.key,this.style,e)}}]),e}(),M=function(){function e(t,n,r){f(this,e),this.type="viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){return l(this.key,this.style,e)}}]),e}(),U={"@charset":N,"@import":N,"@namespace":N,"@keyframes":A,"@media":T,"@supports":T,"@font-face":E,"@viewport":M,"@-ms-viewport":M},V=Object.keys(U).map(function(e){var t=new RegExp("^"+e),n=U[e];return{onCreateRule:function(e,r,s){return t.test(e)?new n(e,r,s):null}}}),_={onCreateRule:function(e,t,n){if(!S(t))return null;var r=t,s=P(e,{},n);return r.subscribe(function(e){for(var t in e)s.prop(t,e[t])}),s},onProcessRule:function(e){if(e instanceof y){var t=e,n=t.style,r=function(e){var r=n[e];if(!S(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var s in n)r(s)}}},J=Date.now(),q="fnValues"+J,G="fnStyle"+ ++J,I={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[G]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var s=e[r];"function"==typeof s&&(delete e[r],n[r]=s)}return(t=t)[q]=n,e},onUpdate:function(e,t){if(t.rules instanceof C)t.rules.update(e);else if(t instanceof y){if((t=t)[q])for(var n in t[q])t.prop(n,t[q][n](e));var r=(t=t)[G];if(r){var s=r(e);for(var i in s)t.prop(i,s[i])}}}},K=function(){function e(){f(this,e),this.registry=[]}return c(e,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),B=new K,D="2f1acc6c3a606b082e5eef5e54414ffb";null==global[D]&&(global[D]=0);var z=global[D]++,L=function(){var e=0;return function(t,n){(e+=1)>1e10&&i(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var r="c",s="";return n&&(r=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(s+=n.options.jss.id)),""+r+z+s+e}},Y=function(e){var t=void 0;return function(){return t||(t=e()),t}};function F(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function H(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=u(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function Q(e,t){try{e.style.removeProperty(t)}catch(e){i(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}var W,X=1,Z=7,$=(W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)},function(e){if(e.type===X)return e.selectorText;if(e.type===Z){var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+W(n,n.indexOf("keyframes"))}return W(e.cssText)});function ee(e,t){return e.selectorText=t,e.selectorText===t}var te,ne,re=Y(function(){return document.head||document.getElementsByTagName("head")[0]}),se=(te=void 0,ne=!1,function(e){var t={};te||(te=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof y){var s=r.selector;if(s&&-1!==s.indexOf("\\")){ne||(re().appendChild(te),ne=!0),te.textContent=s+" {}";var i=te.sheet;if(i){var o=i.cssRules;o&&(t[o[0].selectorText]=r.key)}}}}return ne&&(re().removeChild(te),ne=!1),t});function ie(e){var t=B.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&"string"==typeof r){var s=function(e){for(var t=re(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(s)return s.nextSibling;i("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return null}var oe=Y(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(){function e(t){f(this,e),this.getPropertyValue=F,this.setProperty=H,this.removeProperty=Q,this.setSelector=ee,this.getKey=$,this.getUnescapedKeysMap=se,this.hasInsertedRules=!1,t&&B.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,s=n.meta,i=n.element;this.element=i||document.createElement("style"),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),s&&this.element.setAttribute("data-meta",s);var o=oe();o&&this.element.setAttribute("nonce",o)}return c(e,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,r=ie(t);if(r){var s=r.parentNode;s&&s.insertBefore(e,r)}else if(n&&"number"==typeof n.nodeType){var o=n,u=o.parentNode;u?u.insertBefore(e,o.nextSibling):i(!1,"[JSS] Insertion point is not in the DOM.")}else re().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,r=n.cssRules,s=e.toString();if(t||(t=r.length),!s)return!1;try{n.insertRule(s,t)}catch(t){return i(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),e}(),ae=function(){function e(){f(this,e)}return c(e,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),e}(),le=V.concat([_,I]),he=0,fe=function(){function e(t){f(this,e),this.id=he++,this.version="9.8.6",this.plugins=new j,this.options={createGenerateClassName:L,Renderer:n?ue:ae,plugins:[]},this.generateClassName=L(),this.use.apply(this,le),this.setup(t)}return c(e,[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?ae:ue)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===B.index?0:B.index+1);var r=new O(e,d({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),B.remove(e),this}},{key:"createRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":h(e))&&(n=t,t=e,e=void 0);var r=n;r.jss=this,r.Renderer=this.options.Renderer,r.generateClassName||(r.generateClassName=this.generateClassName),r.classes||(r.classes={});var s=P(e,t,r);return!r.selector&&s instanceof y&&(s.selector="."+r.generateClassName(s)),this.plugins.onProcessRule(s),s}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),e}();var ce=function(){function e(){f(this,e),this.sheets=[],this.refs=[],this.keys=[]}return c(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,s=this.keys,i=n.indexOf(t);return-1!==i?i:(n.push(t),r.push(0),s.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):i(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),e}(),de=function(e){return new fe(e)},ye=de();e.create=de,e.default=ye,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var s=t[r],i=void 0===s?"undefined":h(s);if("function"===i)n||(n={}),n[r]=s;else if("object"===i&&null!==s&&!Array.isArray(s)){var o=e(s);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=u,e.SheetsRegistry=K,e.SheetsManager=ce,e.RuleList=C,e.sheets=B,e.createGenerateClassName=L,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -74,3 +74,3 @@ 'use strict';

this.id = instanceCounter++;
this.version = "9.8.5";
this.version = "9.8.6";
this.plugins = new _PluginsRegistry2['default']();

@@ -77,0 +77,0 @@ this.options = {

@@ -319,3 +319,2 @@ 'use strict';

this.element = element || document.createElement('style');
this.element.type = 'text/css';
this.element.setAttribute('data-jss', '');

@@ -322,0 +321,0 @@ if (media) this.element.setAttribute('media', media);

{
"name": "jss",
"description": "A lib for generating Style Sheets with JavaScript.",
"version": "9.8.5",
"version": "9.8.6",
"author": {

@@ -6,0 +6,0 @@ "name": "Oleg Slobodskoi",

@@ -6,3 +6,2 @@ # JSS

[![codecov](https://codecov.io/gh/cssinjs/jss/branch/master/graph/badge.svg)](https://codecov.io/gh/cssinjs/jss)
[![bitHound Score](https://www.bithound.io/cssinjs/jss/badges/score.svg)](https://www.bithound.io/cssinjs/jss)
[![OpenCollective](https://opencollective.com/jss/backers/badge.svg)](#backers)

@@ -100,3 +99,3 @@ [![OpenCollective](https://opencollective.com/jss/sponsors/badge.svg)](#sponsors)

<head>
<style type="text/css">
<style>
.button-123456 {

@@ -103,0 +102,0 @@ font-size: 12px;

@@ -311,3 +311,2 @@ /* @flow */

this.element = element || document.createElement('style')
this.element.type = 'text/css'
this.element.setAttribute('data-jss', '')

@@ -314,0 +313,0 @@ if (media) this.element.setAttribute('media', media)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc