vendor: 5,045 bytes, line 1
1function s(e,t){N(e)&&(e="100%");var a=W(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),a&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function b(e){return Math.min(1,Math.max(0,e))}function N(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function W(e){return typeof e=="string"&&e.indexOf("%")!==-1}function k(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function p(e){return e<=1?"".concat(Number(e)*100,"%"):e}function l(e){return e.length===1?"0"+e:String(e)}function E(e,t,a){return{r:s(e,255)*255,g:s(t,255)*255,b:s(a,255)*255}}function S(e,t,a){e=s(e,255),t=s(t,255),a=s(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=0,h=(n+r)/2;if(n===r)i=0,o=0;else{var c=n-r;switch(i=h>.5?c/(2-n-r):c/(n+r),n){case e:o=(t-a)/c+(t<a?6:0);break;case t:o=(a-e)/c+2;break;case a:o=(e-t)/c+4;break}o/=6}return{h:o,s:i,l:h}}function v(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+(t-e)*(6*a):a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function j(e,t,a){var n,r,o;if(e=s(e,360),t=s(t,100),a=s(a,100),t===0)r=a,o=a,n=a;else{var i=a<.5?a*(1+t):a+t-a*t,h=2*a-i;n=v(h,i,e+1/3),r=v(h,i,e),o=v(h,i,e-1/3)}return{r:n*255,g:r*255,b:o*255}}function m(e,t,a){e=s(e,255),t=s(t,255),a=s(a,255);var n=Math.max(e,t,a),r=Math.min(e,t,a),o=0,i=n,h=n-r,c=n===0?0:h/n;if(n===r)o=0;else{switch(n){case e:o=(t-a)/h+(t<a?6:0);break;case t:o=(a-e)/h+2;break;case a:o=(e-t)/h+4;break}o/=6}return{h:o,s:c,v:i}}function I(e,t,a){e=s(e,360)*6,t=s(t,100),a=s(a,100);var n=Math.floor(e),r=e-n,o=a*(1-t),i=a*(1-r*t),h=a*(1-(1-r)*t),c=n%6,R=[a,i,o,o,h,a][c],F=[h,a,a,i,o,o][c],q=[o,o,h,a,a,i][c];return{r:R*255,g:F*255,b:q*255}}function y(e,t,a,n){var r=[l(Math.round(e).toString(16)),l(Math.round(t).toString(16)),l(Math.round(a).toString(16))];return n&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function B(e,t,a,n,r){var o=[l(Math.round(e).toString(16)),l(Math.round(t).toString(16)),l(Math.round(a).toString(16)),l(O(n))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function O(e){return Math.round(parseFloat(e)*255).toString(16)}function A(e){return f(e)/255}function f(e){return parseInt(e,16)}function T(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var x={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function H(e){var t={r:0,g:0,b:0},a=1,n=null,r=null,o=null,i=!1,h=!1;return typeof e=="string"&&(e=C(e)),typeof e=="object"&&(g(e.r)&&g(e.g)&&g(e.b)?(t=E(e.r,e.g,e.b),i=!0,h=String(e.r).substr(-1)==="%"?"prgb":"rgb"):g(e.h)&&g(e.s)&&g(e.v)?(n=p(e.s),r=p(e.v),t=I(e.h,n,r),i=!0,h="hsv"):g(e.h)&&g(e.s)&&g(e.l)&&(n=p(e.s),o=p(e.l),t=j(e.h,n,o),i=!0,h="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=k(a),{ok:i,format:e.format||h,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a}}var P="[-\\+]?\\d+%?",$="[-\\+]?\\d*\\.\\d+%?",d="(?:".concat($,")|(?:").concat(P,")"),M="[\\s|\\(]+(".concat(d,")[,|\\s]+(").concat(d,")[,|\\s]+(").concat(d,")\\s*\\)?"),w="[\\s|\\(]+(".concat(d,")[,|\\s]+(").concat(d,")[,|\\s]+(").concat(d,")[,|\\s]+(").concat(d,")\\s*\\)?"),u={CSS_UNIT:new RegExp(d),rgb:new RegExp("rgb"+M),rgba:new RegExp("rgba"+w),hsl:new RegExp("hsl"+M),hsla:new RegExp("hsla"+w),hsv:new RegExp("hsv"+M),hsva:new RegExp("hsva"
1+w),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function C(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(x[e])e=x[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a=u.rgb.exec(e);return a?{r:a[1],g:a[2],b:a[3]}:(a=u.rgba.exec(e),a?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=u.hsl.exec(e),a?{h:a[1],s:a[2],l:a[3]}:(a=u.hsla.exec(e),a?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=u.hsv.exec(e),a?{h:a[1],s:a[2],v:a[3]}:(a=u.hsva.exec(e),a?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=u.hex8.exec(e),a?{r:f(a[1]),g:f(a[2]),b:f(a[3]),a:A(a[4]),format:t?"name":"hex8"}:(a=u.hex6.exec(e),a?{r:f(a[1]),g:f(a[2]),b:f(a[3]),format:t?"name":"hex"}:(a=u.hex4.exec(e),a?{r:f(a[1]+a[1]),g:f(a[2]+a[2]),b:f(a[3]+a[3]),a:A(a[4]+a[4]),format:t?"name":"hex8"}:(a=u.hex3.exec(e),a?{r:f(a[1]+a[1]),g:f(a[2]+a[2]),b:f(a[3]+a[3]),format:t?"name":"hex"}:!1)))))))))}function g(e){return Boolean(u.CSS_UNIT.exec(String(e)))}var D=function(){function e(t,a){t===void 0&&(t=""),a===void 0&&(a={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=T(t)),this.originalInput=t;var r=H(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=a.format)!==null&&n!==void 0?n:r.format,this.gradientType=a.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),a,n,r,o=t.r/255,i=t.g/255,h=t.b/255;return o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),h<=.03928?r=h/12.92:r=Math.pow((h+.055)/1.055,2.4),.2126*a+.7152*n+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=k(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=m(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=m(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=S(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=S(this.r,this.g,this.b),a=Math.round(t.h*360),n=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(a,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(a,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),y(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),B(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),a=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(a,", ").concat(n,")"):"rgba(".concat(t,", ").concat(a,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(a){return"".concat(Math.round(s(a,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(a){return Math.round(s(a,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+y(this.r,this.g,this.b,!1),a=0,n=Object.entries(x);a<n.length;a++){var r=n[a],o=r[0],i=r[1];if(t===i)return o}return!1},e.prototype.toString=function(t){var a=Boolean(t);t=t!=null?t:this.format;var n=!1,r=this.a<1&&this.a>=0,o=!a&&r&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l+=t/100,a.l=b(a.l),new e(a)},e.prototype.brighten=function(t){t===void 0&&(t=10);var a=this.toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(t/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(t/100)))),a.b=Math.max(0,Math.min(255,a.b-M
1ath.round(255*-(t/100)))),new e(a)},e.prototype.darken=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.l-=t/100,a.l=b(a.l),new e(a)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s-=t/100,a.s=b(a.s),new e(a)},e.prototype.saturate=function(t){t===void 0&&(t=10);var a=this.toHsl();return a.s+=t/100,a.s=b(a.s),new e(a)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var a=this.toHsl(),n=(a.h+t)%360;return a.h=n<0?360+n:n,new e(a)},e.prototype.mix=function(t,a){a===void 0&&(a=50);var n=this.toRgb(),r=new e(t).toRgb(),o=a/100,i={r:(r.r-n.r)*o+n.r,g:(r.g-n.g)*o+n.g,b:(r.b-n.b)*o+n.b,a:(r.a-n.a)*o+n.a};return new e(i)},e.prototype.analogous=function(t,a){t===void 0&&(t=6),a===void 0&&(a=30);var n=this.toHsl(),r=360/a,o=[this];for(n.h=(n.h-(r*t>>1)+720)%360;--t;)n.h=(n.h+r)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var a=this.toHsv(),n=a.h,r=a.s,o=a.v,i=[],h=1/t;t--;)i.push(new e({h:n,s:r,v:o})),o=(o+h)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),a=t.h;return[this,new e({h:(a+72)%360,s:t.s,l:t.l}),new e({h:(a+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var a=this.toRgb(),n=new e(t).toRgb(),r=a.a+n.a*(1-a.a);return new e({r:(a.r*a.a+n.r*n.a*(1-a.a))/r,g:(a.g*a.a+n.g*n.a*(1-a.a))/r,b:(a.b*a.a+n.b*n.a*(1-a.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var a=this.toHsl(),n=a.h,r=[this],o=360/t,i=1;i<t;i++)r.push(new e({h:(n+i*o)%360,s:a.s,l:a.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();export{D as T,y as a,H as i,m as r};
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.