"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Enum.js"),i=require("./Utility.js"),p=require("./Tokenizer.js"),t=require("./Serializer.js"),d=require("./Prefixer.js");function h(r){var u=i.sizeof(r);return function(a,c,o,f){for(var n="",s=0;s<u;s++)n+=r[s](a,c,o,f)||"";return n}}function w(r){return function(u){u.root||(u=u.return)&&r(u)}}function l(r,u,a,c){if(r.length>-1&&!r.return)switch(r.type){case e.DECLARATION:r.return=d.prefix(r.value,r.length);break;case e.KEYFRAMES:return t.serialize([p.copy(r,{value:i.replace(r.value,"@","@"+e.WEBKIT)})],c);case e.RULESET:if(r.length)return i.combine(r.props,function(o){switch(i.match(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return t.serialize([p.copy(r,{props:[i.replace(o,/:(read-\w+)/,":"+e.MOZ+"$1")]})],c);case"::placeholder":return t.serialize([p.copy(r,{props:[i.replace(o,/:(plac\w+)/,":"+e.WEBKIT+"input-$1")]}),p.copy(r,{props:[i.replace(o,/:(plac\w+)/,":"+e.MOZ+"$1")]}),p.copy(r,{props:[i.replace(o,/:(plac\w+)/,e.MS+"input-$1")]})],c)}return""})}}exports.middleware=h;exports.prefixer=l;exports.rulesheet=w;
//# sourceMappingURL=Middleware.js.map
