PageSourceSearch

https://www.poda.cz/business/_astro/index.D1wOpKJj.js

js poda.cz collected 2026-10-04 13:26:13 UTC 106,530 bytes, 2 lines download raw bytes

1function Dr(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function zr(h){if(Object.prototype.hasOwnProperty.call(h,"__esModule"))return h;var e=h.default;if(typeof e=="function"){var b=function w(){return this instanceof w?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};b.prototype=e.prototype}else b={};return Object.defineProperty(b,"__esModule",{value:!0}),Object.keys(h).forEach(function(w){var n=Object.getOwnPropertyDescriptor(h,w);Object.defineProperty(b,w,n.get?n:{enumerable:!0,get:function(){return h[w]}})}),b}const Gr={},Ur=Object.freeze(Object.defineProperty({__proto__:null,default:Gr},Symbol.toStringTag,{value:"Module"})),D=zr(Ur);var J,We;function z(){if(We)return J;We=1;const h=function(g){return typeof g<"u"&&g!==null};return J={defined:h,object:function(g){return typeof g=="object"},plainObject:function(g){return Object.prototype.toString.call(g)==="[object Object]"},fn:function(g){return typeof g=="function"},bool:function(g){return typeof g=="boolean"},buffer:function(g){return g instanceof Buffer},typedArray:function(g){if(h(g))switch(g.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},arrayBuffer:function(g){return g instanceof ArrayBuffer},string:function(g){return typeof g=="string"&&g.length>0},number:function(g){return typeof g=="number"&&!Number.isNaN(g)},integer:function(g){return Number.isInteger(g)},inRange:function(g,p,y){return g>=p&&g<=y},inArray:function(g,p){return p.includes(g)},invalidParameterError:function(g,p,y){return new Error(`Expected ${p} for ${g} but received ${y} of type ${typeof y}`)},nativeError:function(g,p){return p.message=g.message,p}},J}function U(h){throw new Error('Could not dynamically require "'+h+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Z={exports:{}},ee,He;function Wr(){if(He)return ee;He=1;const h=()=>process.platform==="linux";let e=null;return ee={isLinux:h,getReport:()=>{if(!e)if(h()&&process.report){const w=process.report.excludeNetwork;process.report.excludeNetwork=!0,e=process.report.getReport(),process.report.excludeNetwork=w}else e={};return e}},ee}var re,Xe;function Hr(){if(Xe)return re;Xe=1;const h=D;return re={LDD_PATH:"/usr/bin/ldd",readFileSync:n=>h.readFileSync(n,"utf-8"),readFile:n=>new Promise((f,s)=>{h.readFile(n,"utf-8",(o,i)=>{o?s(o):f(i)})})},re}var te,Qe;function De(){if(Qe)return te;Qe=1;const h=D,{isLinux:e,getReport:b}=Wr(),{LDD_PATH:w,readFile:n,readFileSync:f}=Hr();let s,o;const i="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";let c="";const a=()=>c||new Promise(v=>{h.exec(i,(x,r)=>{c=x?" ":r,v(c)})}),u=()=>{if(!c)try{c=h.execSync(i,{encoding:"utf8"})}catch{c=" "}return c},t="glibc",d=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,l="musl",g=v=>v.includes("libc.musl-")||v.includes("ld-musl-"),p=()=>{const v=b();return v.header&&v.header.glibcVersionRuntime?t:Array.isArray(v.sharedObjects)&&v.sharedObjects.some(g)?l:null},y=v=>{const[x,r]=v.split(/[\r\n]+/);return x&&x.includes(t)?t:r&&r.includes(l)?l:null},j=v=>v.includes("musl")?l:v.includes("GNU C Library")?t:null,S=async()=>{if(s!==void 0)return s;s=null;try{const v=await n(w);s=j(v)}catch{}return s},C=()=>{if(s!==void 0)return s;s=null;try{const v=f(w);s=j(v)}catch{}return s},F=async()=>{let v=null;if(e()&&(v=await S(),v||(v=p()),!v)){const x=await a();v=y(x)}return v},_=()=>{let v=null;if(e()&&(v=C(),v||(v=p()),!v)){const x=u();v=y(x)}return v},m=async()=>e()&&await F()!==t,P=()=>e()&&_()!==t,N=async()=>{if(o!==void 0)return o;o=null;try{const x=(await n(w)).match(d);x&&(o=x[1])}catch{}return o},G=()=>{if(o!==void 0)return o;o=null;try{const x=f(w).match(d);x&&(o=x[1])}catch{}return o},M=()=>{const v=b();return v.header&&v.header.glibcVersionRuntime?v.header.glibcVersionRuntime:null},B=v=>v.trim().split(/\s+/)[1],T=v=>{const[x,r,E]=v.split(/[\r\n]+/);return x&&x.includes(t)?B(x):r&&E&&r.includes(l)?B(E):null};return te={GLIBC:t,MUSL:l,family:F,familySync:_,isNonGlibcLinux:m,isNonGlibcLinuxSync:P,version:async()=>{let v=null;if(e()&&(v=await N(),v||(v=M()),!v)){const x=await a();v=T(x)}return v},versionSync:()=>{let v=null;if(e()&&(v=G(),v||(v=M()),!v)){const x=u();v=T(x)}return v}},te}var ie,Ve;function V(){if(Ve)return ie;Ve=1;var h={};return ie=typeof process=="object"&&h&&h.NODE_DEBUG&&/\bsemver\b/i.test(h.NODE_DEBUG)?(...b)=>console.error("SEMVER",...b):()=>{},ie}var ne,Ye;function ze(){if(Ye)return ne;Ye=1;const h="2.0.0",e=256,b=Number.MAX_SAFE_INTEGER||9007199254740991,w=16,n=e-6;return ne={MAX_LENGTH:e,MAX_SAFE_COMPONENT_LENGTH:w,MAX_SAFE_BUILD_LENGTH:n,MAX_SAFE_INTEGER:b,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:h,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ne}var Q={exports:{}},Ke;
1function Y(){return Ke||(Ke=1,function(h,e){const{MAX_SAFE_COMPONENT_LENGTH:b,MAX_SAFE_BUILD_LENGTH:w,MAX_LENGTH:n}=ze(),f=V();e=h.exports={};const s=e.re=[],o=e.safeRe=[],i=e.src=[],c=e.safeSrc=[],a=e.t={};let u=0;const t="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[t,w]],l=p=>{for(const[y,j]of d)p=p.split(`${y}*`).join(`${y}{0,${j}}`).split(`${y}+`).join(`${y}{1,${j}}`);return p},g=(p,y,j)=>{const S=l(y),C=u++;f(p,C,y),a[p]=C,i[C]=y,c[C]=S,s[C]=new RegExp(y,j?"g":void 0),o[C]=new RegExp(S,j?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${t}*`),g("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${t}+`),g("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),g("FULL",`^${i[a.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),g("LOOSE",`^${i[a.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),g("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${b}})(?:\\.(\\d{1,${b}}))?(?:\\.(\\d{1,${b}}))?`),g("COERCE",`${i[a.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",i[a.COERCEPLAIN]+`(?:${i[a.PRERELEASE]})?(?:${i[a.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",i[a.COERCE],!0),g("COERCERTLFULL",i[a.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Q,Q.exports)),Q.exports}var ae,Je;function Ge(){if(Je)return ae;Je=1;const h=Object.freeze({loose:!0}),e=Object.freeze({});return ae=w=>w?typeof w!="object"?h:w:e,ae}var se,Ze;function Xr(){if(Ze)return se;Ze=1;const h=/^[0-9]+$/,e=(w,n)=>{const f=h.test(w),s=h.test(n);return f&&s&&(w=+w,n=+n),w===n?0:f&&!s?-1:s&&!f?1:w<n?-1:1};return se={compareIdentifiers:e,rcompareIdentifiers:(w,n)=>e(n,w)},se}var oe,er;function X(){if(er)return oe;er=1;const h=V(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:b}=ze(),{safeRe:w,safeSrc:n,t:f}=Y(),s=Ge(),{compareIdentifiers:o}=Xr();class i{constructor(a,u){if(u=s(u),a instanceof i){if(a.loose===!!u.loose&&a.includePrerelease===!!u.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>e)throw new TypeError(`version is longer than ${e} characters`);h("SemVer",a,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const t=a.trim().match(u.loose?w[f.LOOSE]:w[f.FULL]);if(!t)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>b||this.major<0)throw new TypeError("Invalid major version");if(this.minor>b||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>b||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(d=>{if(/^[0-9]+$/.test(d)){const l=+d;if(l>=0&&l<b)return l}return d}):this.prerelease=[],this.build=t[5]?t[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(a){if(h("SemVer.compare",this.version,this.options,a),!(a instanceof i)){if(typeof a=="str
1ing"&&a===this.version)return 0;a=new i(a,this.options)}return a.version===this.version?0:this.compareMain(a)||this.comparePre(a)}compareMain(a){return a instanceof i||(a=new i(a,this.options)),o(this.major,a.major)||o(this.minor,a.minor)||o(this.patch,a.patch)}comparePre(a){if(a instanceof i||(a=new i(a,this.options)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;let u=0;do{const t=this.prerelease[u],d=a.prerelease[u];if(h("prerelease compare",u,t,d),t===void 0&&d===void 0)return 0;if(d===void 0)return 1;if(t===void 0)return-1;if(t===d)continue;return o(t,d)}while(++u)}compareBuild(a){a instanceof i||(a=new i(a,this.options));let u=0;do{const t=this.build[u],d=a.build[u];if(h("build compare",u,t,d),t===void 0&&d===void 0)return 0;if(d===void 0)return 1;if(t===void 0)return-1;if(t===d)continue;return o(t,d)}while(++u)}inc(a,u,t){if(a.startsWith("pre")){if(!u&&t===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const d=new RegExp(`^${this.options.loose?n[f.PRERELEASELOOSE]:n[f.PRERELEASE]}$`),l=`-${u}`.match(d);if(!l||l[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,t),this.inc("pre",u,t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,t),this.inc("pre",u,t);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const d=Number(t)?1:0;if(this.prerelease.length===0)this.prerelease=[d];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(u===this.prerelease.join(".")&&t===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(d)}}if(u){let l=[u,d];t===!1&&(l=[u]),o(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${a}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return oe=i,oe}var le,rr;function Qr(){if(rr)return le;rr=1;const h=X();return le=(b,w,n=!1)=>{if(b instanceof h)return b;try{return new h(b,w)}catch(f){if(!n)return null;throw f}},le}var fe,tr;function Vr(){if(tr)return fe;tr=1;const h=X(),e=Qr(),{safeRe:b,t:w}=Y();return fe=(f,s)=>{if(f instanceof h)return f;if(typeof f=="number"&&(f=String(f)),typeof f!="string")return null;s=s||{};let o=null;if(!s.rtl)o=f.match(s.includePrerelease?b[w.COERCEFULL]:b[w.COERCE]);else{const d=s.includePrerelease?b[w.COERCERTLFULL]:b[w.COERCERTL];let l;for(;(l=d.exec(f))&&(!o||o.index+o[0].length!==f.length);)(!o||l.index+l[0].length!==o.index+o[0].length)&&(o=l),d.lastIndex=l.index+l[1].length+l[2].length;d.lastIndex=-1}if(o===null)return null;const i=o[2],c=o[3]||"0",a=o[4]||"0",u=s.includePrerelease&&o[5]?`-${o[5]}`:"",t=s.includePrerelease&&o[6]?`+${o[6]}`:"";return e(`${i}.${c}.${a}${u}${t}`,s)},fe}var ce,ir;function W(){if(ir)return ce;ir=1;const h=X();return ce=(b,w,n)=>new h(b,n).compare(new h(w,n)),ce}var he,nr;function Or(){if(nr)return he;nr=1;const h=W();return he=(b,w,n)=>h(b,w,n)>=0,he}var ue,ar;function Yr(){if(ar)return ue;ar=1;class h{constructor(){this.max=1e3,this.map=new Map}get(b){const w=this.map.get(b);if(w!==void 0)return this.map.delete(b),this.map.set(b,w),w}delete(b){return this.map.delete(b)}set(b,w){if(!this.delete(b)&&w!==void 0){if(this.map.size>
vendor: 8,857 bytes, line 1
1=this.max){const f=this.map.keys().next().value;this.delete(f)}this.map.set(b,w)}return this}}return ue=h,ue}var de,sr;function Kr(){if(sr)return de;sr=1;const h=W();return de=(b,w,n)=>h(b,w,n)===0,de}var ge,or;function Jr(){if(or)return ge;or=1;const h=W();return ge=(b,w,n)=>h(b,w,n)!==0,ge}var me,lr;function Zr(){if(lr)return me;lr=1;const h=W();return me=(b,w,n)=>h(b,w,n)>0,me}var be,fr;function et(){if(fr)return be;fr=1;const h=W();return be=(b,w,n)=>h(b,w,n)<0,be}var pe,cr;function rt(){if(cr)return pe;cr=1;const h=W();return pe=(b,w,n)=>h(b,w,n)<=0,pe}var ve,hr;function tt(){if(hr)return ve;hr=1;const h=Kr(),e=Jr(),b=Zr(),w=Or(),n=et(),f=rt();return ve=(o,i,c,a)=>{switch(i){case"===":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o===c;case"!==":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o!==c;case"":case"=":case"==":return h(o,c,a);case"!=":return e(o,c,a);case">":return b(o,c,a);case">=":return w(o,c,a);case"<":return n(o,c,a);case"<=":return f(o,c,a);default:throw new TypeError(`Invalid operator: ${i}`)}},ve}var we,ur;function it(){if(ur)return we;ur=1;const h=Symbol("SemVer ANY");class e{static get ANY(){return h}constructor(a,u){if(u=b(u),a instanceof e){if(a.loose===!!u.loose)return a;a=a.value}a=a.trim().split(/\s+/).join(" "),s("comparator",a,u),this.options=u,this.loose=!!u.loose,this.parse(a),this.semver===h?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(a){const u=this.options.loose?w[n.COMPARATORLOOSE]:w[n.COMPARATOR],t=a.match(u);if(!t)throw new TypeError(`Invalid comparator: ${a}`);this.operator=t[1]!==void 0?t[1]:"",this.operator==="="&&(this.operator=""),t[2]?this.semver=new o(t[2],this.options.loose):this.semver=h}toString(){return this.value}test(a){if(s("Comparator.test",a,this.options.loose),this.semver===h||a===h)return!0;if(typeof a=="string")try{a=new o(a,this.options)}catch{return!1}return f(a,this.operator,this.semver,this.options)}intersects(a,u){if(!(a instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new i(a.value,u).test(this.value):a.operator===""?a.value===""?!0:new i(this.value,u).test(a.semver):(u=b(u),u.includePrerelease&&(this.value==="<0.0.0-0"||a.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||a.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&a.operator.startsWith(">")||this.operator.startsWith("<")&&a.operator.startsWith("<")||this.semver.version===a.semver.version&&this.operator.includes("=")&&a.operator.includes("=")||f(this.semver,"<",a.semver,u)&&this.operator.startsWith(">")&&a.operator.startsWith("<")||f(this.semver,">",a.semver,u)&&this.operator.startsWith("<")&&a.operator.startsWith(">")))}}we=e;const b=Ge(),{safeRe:w,t:n}=Y(),f=tt(),s=V(),o=X(),i=_r();return we}var Ee,dr;function _r(){if(dr)return Ee;dr=1;const h=/\s+/g;class e{constructor(R,v){if(v=n(v),R instanceof e)return R.loose===!!v.loose&&R.includePrerelease===!!v.includePrerelease?R:new e(R.raw,v);if(R instanceof f)return this.raw=R.value,this.set=[[R]],this.formatted=void 0,this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=R.trim().replace(h," "),this.set=this.raw.split("||").map(x=>this.parseRange(x.trim())).filter(x=>x.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const x=this.set[0];if(this.set=this.set.filter(r=>!g(r[0])),this.set.length===0)this.set=[x];else if(this.set.length>1){for(const r of this.set)if(r.length===1&&p(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let R=0;R<this.set.length;R++){R>0&&(this.formatted+="||");const v=this.set[R];for(let x=0;x<v.length;x++)x>0&&(this.formatted+=" "),this.formatted+=v[x].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(R){const x=((this.options.includePrerelease&&d)|(this.options.loose&&l))+":"+R,r=w.get(x);if(r)return r;const E=this.options.loose,I=E?i[c.HYPHENRANGELOOSE]:i[c.HYPHENRANGE];R=R.replace(I,B(this.options.includePrerelease)),s("hyphen replace",R),R=R.replace(i[c.COMPARATORTRIM],a),s("comparator trim",R),R=R.replace(i[c.TILDETRIM],u),s("tilde trim",R),R=R.replace(i[c.CARETTRIM],t),s("caret trim",R);let L=R.split(" ").map(q=>j(q,this.options)).join(" ").split(/\s+/).map(q=>M(q,this.options));E&&(L=L.filter(q=>(s("loose invalid filter",q,this.options),!!q.match(i[c.COMPARATORLOOSE])))),s("range list",L);const $=new Map,k=L.map(q=>new f(q,this.options));for(const q of k){if(g(q))return[q];$.set(q.value,q)}$.size>1&&$.has("")&&$.delete("");const O=[...$.values()];return w.set(x,O),O}intersects(R,v){if(!(R instanceof e))throw new TypeError("a Range is required");return this.set.some(x=>y(x,v)&&R.set.some(r=>y(r,v)&&x.every(E=>r.every(I=>E.intersects(I,v)))))}test(R){if(!R)return!1;if(typeof R=="string")try{R=new o(R,this.options)}catch{return!1}for(let v=0;v<this.set.length;v++)if(T(this.set[v],R,this.options))return!0;return!1}}Ee=e;const b=Yr(),w=new b,n=Ge(),f=it(),s=V(),o=X(),{safeRe:i,t:c,comparatorTrimReplace:a,tildeTrimReplace:u,caretTrimReplace:t}=Y(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:l}=ze(),g=A=>A.value==="<0.0.0-0",p=A=>A.value==="",y=(A,R)=>{let v=!0;const x=A.slice();let r=x.pop();for(;v&&x.length;)v=x.every(E=>r.intersects(E,R)),r=x.pop();return v},j=(A,R)=>(s("comp",A,R),A=_(A,R),s("caret",A),A=C(A,R),s("tildes",A),A=P(A,R),s("xrange",A),A=G(A,R),s("stars",A),A),S=A=>!A||A.toLowerCase()==="x"||A==="*",C=(A,R)=>A.trim().split(/\s+/).map(v=>F(v,R)).join(" "),F=(A,R)=>{const v=R.loose?i[c.TILDELOOSE]:i[c.TILDE];return A.replace(v,(x,r,E,I,L)=>{s("tilde",A,x,r,E,I,L);let $;return S(r)?$="":S(E)?$=`>=${r}.0.0 <${+r+1}.0.0-0`:S(I)?$=`>=${r}.${E}.0 <${r}.${+E+1}.0-0`:L?(s("replaceTilde pr",L),$=`>=${r}.${E}.${I}-${L} <${r}.${+E+1}.0-0`):$=`>=${r}.${E}.${I} <${r}.${+E+1}.0-0`,s("tilde return",$),$})},_=(A,R)=>A.trim().split(/\s+/).map(v=>m(v,R)).join(" "),m=(A,R)=>{s("caret",A,R);const v=R.loose?i[c.CARETLOOSE]:i[c.CARET],x=R.includePrerelease?"-0":"";return A.replace(v,(r,E,I,L,$)=>{s("caret",A,r,E,I,L,$);let k;return S(E)?k="":S(I)?k=`>=${E}.0.0${x} <${+E+1}.0.0-0`:S(L)?E==="0"?k=`>=${E}.${I}.0${x} <${E}.${+I+1}.0-0`:k=`>=${E}.${I}.0${x} <${+E+1}.0.0-0`:$?(s("replaceCaret pr",$),E==="0"?I==="0"?k=`>=${E}.${I}.${L}-${$} <${E}.${I}.${+L+1}-0`:k=`>=${E}.${I}.${L}-${$} <${E}.${+I+1}.0-0`:k=`>=${E}.${I}.${L}-${$} <${+E+1}.0.0-0`):(s("no pr"),E==="0"?I==="0"?k=`>=${E}.${I}.${L}${x} <${E}.${I}.${+L+1}-0`:k=`>=${E}.${I}.${L}${x} <${E}.${+I+1}.0-0`:k=`>=${E}.${I}.${L} <${+E+1}.0.0-0`),s("caret return",k),k})},P=(A,R)=>(s("replaceXRanges",A,R),A.split(/\s+/).map(v=>N(v,R)).join(" ")),N=(A,R)=>{A=A.trim();const v=R.loose?i[c.XRANGELOOSE]:i[c.XRANGE];return A.replace(v,(x,r,E,I,L,$)=>{s("xRange",A,x,r,E,I,L,$);const k=S(E),O=k||S(I),q=O||S(L),H=q;return r==="="&&H&&(r=""),$=R.includePrerelease?"-0":"",k?r===">"||r==="<"?x="<0.0.0-0":x="*":r&&H?(O&&(I=0),L=0,r===">"?(r=">=",O?(E=+E+1,I=0,L=0):(I=+I+1,L=0)):r==="<="&&(r="<",O?E=+E+1:I=+I+1),r==="<"&&($="-0"),x=`${r+E}.${I}.${L}${$}`):O?x=`>=${E}.0.0${$} <${+E+1}.0.0-0`:q&&(x=`>=${E}.${I}.0${$} <${E}.${+I+1}.0-0`),s("xRange return",x),x})},G=(A,R)=>(s("replaceStars",A,R),A.trim().replace(i[c.STAR],"")),M=(A,R)=>(s("replaceGTE0",A,R),A.trim().replace(i[R.includePrerelease?c.GTE0PRE:c.GTE0],"")),B=A=>(R,v,x,r,E,I,L,$,k,O,q,H)=>(S(x)?v="":S(r)?v=`>=${x}.0.0${A?"-0":""}`:S(E)?v=`>=${x}.${r}.0${A?"-0":""}`:I?v=`>=${v}`:v=`>=${v}${A?"-0":""}`,S(k)?$="":S(O)?$=`<${+k+1}.0.0-0`:S(q)?$=`<${k}.${+O+1}.0-0`:H?$=`<=${k}.${O}.${q}-${H}`:A?$=`<${k}.${O}.${+q+1}-0`:$=`<=${$}`,`${v} ${$}`.trim()),T=(A,R,v)=>{for(let x=0;x<A.length;x++)if(!A[x].test(R))return!1;if(R.prerelease.length&&!v.includePrerelease){for(let x=0;x<A.length;x++)if(s(A[x].semver),A[x].semver!==f.ANY&&A[x].semver.prerelease.length>0){const r=A[x].semver;if(r.major===R.major&&r.minor===R.minor&&r.patch===R.patch)return!0}return!1}return!0};return Ee}var ye,gr;function nt(){if(gr)return ye;gr=1;const h=_r();return ye=(b,w,n)=>{try{w=new h(w,n)}catch{return!1}return w.test(b)},ye}const at="0.33.5",st={"@img/sharp-darwin-arm64":"0.33.5","@img/sharp-darwin-x64":"0.33.5","@img/sharp-libvips-darwin-arm64":"1.0.4","@img/sharp-libvips-darwin-x64":"1.0.4","@img/sharp-libvips-linux-arm":"1.0.5","@img/sharp-libvips-linux-arm64":"1.0.4","@img/sharp-libvips-linux-s390x":"1.0.4","@img/sharp-libvips-linux-x64":"1.0.4","@img/sharp-libvips-linuxmusl-arm64":"1.0.4","@img/sharp-libvips-linuxmusl-x64":"1.0.4","@img/sharp-linux-arm":"0.33.5","@img/sharp-linux-arm64":"0.33.5","@img/sharp-linux-s390x":"0.33.5","@img/sharp-linux-x64":"0.33.5","@img/sharp-linuxmusl-arm64":"0.33.5","@img/sharp-linuxmusl-x64":"0.33.5","@img/s
1harp-wasm32":"0.33.5","@img/sharp-win32-ia32":"0.33.5","@img/sharp-win32-x64":"0.33.5"},ot={node:"^18.17.0 || ^20.3.0 || >=21.0.0"},lt={libvips:">=8.15.3"},Fr={version:at,optionalDependencies:st,engines:ot,config:lt};var Re,mr;function Tr(){if(mr)return Re;mr=1;var h={};const{spawnSync:e}=D,{createHash:b}=D,w=Vr(),n=Or(),f=nt(),s=De(),{config:o,engines:i,optionalDependencies:c}=Fr,a=h.npm_package_config_libvips||o.libvips,u=w(a).version,t=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-ia32","win32-x64"],d={encoding:"utf8",shell:!0},l=R=>{R instanceof Error?console.error(`sharp: Installation error: ${R.message}`):console.log(`sharp: ${R}`)},g=()=>s.isNonGlibcLinuxSync()?s.familySync():"",p=()=>`${process.platform}${g()}-${process.arch}`,y=()=>{if(_())return"wasm32";const{npm_config_arch:R,npm_config_platform:v,npm_config_libc:x}=h,r=typeof x=="string"?x:g();return`${v||process.platform}${r}-${R||process.arch}`},j=()=>{try{return U(`@img/sharp-libvips-dev-${y()}/include`)}catch{try{return require("@img/sharp-libvips-dev/include")}catch{}}return""},S=()=>{try{return require("@img/sharp-libvips-dev/cplusplus")}catch{}return""},C=()=>{try{return U(`@img/sharp-libvips-dev-${y()}/lib`)}catch{try{return U(`@img/sharp-libvips-${y()}/lib`)}catch{}}return""},F=()=>{if(process.release?.name==="node"&&process.versions&&!f(process.versions.node,i.node))return{found:process.versions.node,expected:i.node}},_=()=>{const{CC:R}=h;return!!(R&&R.endsWith("/emcc"))},m=()=>process.platform==="darwin"&&process.arch==="x64"?(e("sysctl sysctl.proc_translated",d).stdout||"").trim()==="sysctl.proc_translated: 1":!1,P=R=>b("sha512").update(R).digest("hex"),N=()=>{try{const R=P(`imgsharp-libvips-${y()}`),v=w(c[`@img/sharp-libvips-${y()}`]).version;return P(`${R}npm:${v}`).slice(0,10)}catch{}return""},G=()=>e(`node-gyp rebuild --directory=src ${_()?"--nodedir=emscripten":""}`,{...d,stdio:"inherit"}).status,M=()=>process.platform!=="win32"?(e("pkg-config --modversion vips-cpp",{...d,env:{...h,PKG_CONFIG_PATH:B()}}).stdout||"").trim():"",B=()=>process.platform!=="win32"?[(e('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',d).stdout||"").trim(),h.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":"):"",T=(R,v,x)=>(x&&x(`Detected ${v}, skipping search for globally-installed libvips`),R);return Re={minimumLibvipsVersion:u,prebuiltPlatforms:t,buildPlatformArch:y,buildSharpLibvipsIncludeDir:j,buildSharpLibvipsCPlusPlusDir:S,buildSharpLibvipsLibDir:C,isUnsupportedNodeRuntime:F,runtimePlatformArch:p,log:l,yarnLocator:N,spawnRebuild:G,globalLibvipsVersion:M,pkgConfigPath:B,useGlobalLibvips:R=>{if(h.SHARP_IGNORE_GLOBAL_LIBVIPS)return T(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",R);if(h.SHARP_FORCE_GLOBAL_LIBVIPS)return T(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",R);if(m())return T(!1,"Rosetta",R);const v=M();return!!v&&n(v,u)}},Re}var br;function K(){if(br)return Z.exports;br=1;const{familySync:h,versionSync:e}=De(),{runtimePlatformArch:b,isUnsupportedNodeRuntime:w,prebuiltPlatforms:n,minimumLibvipsVersion:f}=Tr(),s=b(),o=[`../src/build/Release/sharp-${s}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${s}/sharp.node`,"@img/sharp-wasm32/sharp.node"];let i;const c=[];for(const a of o)try{i=U(a);break}catch(u){c.push(u)}if(i)Z.exports=i;else{const[a,u,t]=["linux","darwin","win32"].map(g=>s.startsWith(g)),d=[`Could not load the "sharp" module using the ${s} runtime`];c.forEach(g=>{g.code!=="MODULE_NOT_FOUND"&&d.push(`${g.code}: ${g.message}`)});const l=c.map(g=>g.message).join(" ");if(d.push("Possible solutions:"),w()){const{found:g,expected:p}=w();d.push("- Please upgrade Node.js:",`    Found ${g}`,`    Requires ${p}`)}else if(n.includes(s)){const[g,p]=s.split("-"),y=g.endsWith("musl")?" --libc=musl":"";d.push("- Ensure optional dependencies can be installed:","    npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:","    See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",`    npm install --os=${g.replace("musl","")}${y} --cpu=${p} sharp`)}else d.push(`- Manually install libvips >= ${f}`,"- Add experimental WebAssembly-based dependencies:","    npm install --cpu=wasm32 sharp","    npm install @img/sharp-wasm32");if(a&&/(symbol not found|CXXABI_)/i.test(l))try{const{config:g}
1=U(`@img/sharp-libvips-${s}/package`),p=`${h()} ${e()}`,y=`${g.musl?"musl":"glibc"} ${g.musl||g.glibc}`;d.push("- Update your OS:",`    Found ${p}`,`    Requires ${y}`)}catch{}throw a&&/\/snap\/core[0-9]{2}/.test(l)&&d.push("- Remove the Node.js Snap, which does not support native modules","    snap remove node"),u&&/Incompatible library version/.test(l)&&d.push("- Update Homebrew:","    brew update && brew upgrade vips"),c.some(g=>g.code==="ERR_DLOPEN_DISABLED")&&d.push("- Run Node.js without using the --no-addons flag"),t&&/The specified procedure could not be found/.test(l)&&d.push("- Using the canvas package on Windows?","    See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:","    npm ls sharp"),d.push("- Consult the installation documentation:","    See https://sharp.pixelplumbing.com/install"),new Error(d.join(`
2`))}return Z.exports}var Pe,pr;function ft(){if(pr)return Pe;pr=1;const h=D,e=D,b=z();K();const w=h.debuglog("sharp"),n=function(s,o){if(arguments.length===1&&!b.defined(s))throw new Error("Invalid input");return this instanceof n?(e.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],useExifOrientation:!1,angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,resolveWithObject:!1,jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],debuglog:i=>{this.emit("warning",i),w(i)},queueListener:function(i){n.queue.emit("change",i)}},this.options.input=this._createInputDescriptor(s,o,{allowStream:!0}),this):new n(s,o)};Object.setPrototypeOf(n.prototype,e.Duplex.prototype),Object.setPrototypeOf(n,e.Duplex);function f(){const s=this.constructor.call(),{debuglog:o,queueListener:i,...c}=this.options;
2return s.options=structuredClone(c),s.options.debuglog=o,s.options.queueListener=i,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),s.options.input.buffer=this.options.input.buffer,s.emit("finish")}),s}return Object.assign(n.prototype,{clone:f}),Pe=n,Pe}var xe={exports:{}},Ie,vr;function Mr(){return vr||(vr=1,Ie={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Ie}var Ae={exports:{}},$e,wr;function ct(){return wr||(wr=1,$e=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),$e}var Er;function ht(){if(Er)return Ae.exports;Er=1;var h=ct(),e=Array.prototype.concat,b=Array.prototype.slice,w=Ae.exports=function(f){for(var s=[],o=0,i=f.length;o<i;o++){var c=f[o];h(c)?s=e.call(s,b.call(c)):s.push(c)}return s};return w.wrap=function(n){return function(){return n(w(arguments))}},Ae.exports}var yr;
vendor: 12,947 bytes, line 2
2function ut(){if(yr)return xe.exports;yr=1;var h=Mr(),e=ht(),b=Object.hasOwnProperty,w=Object.create(null);for(var n in h)b.call(h,n)&&(w[h[n]]=n);var f=xe.exports={to:{},get:{}};f.get=function(i){var c=i.substring(0,3).toLowerCase(),a,u;switch(c){case"hsl":a=f.get.hsl(i),u="hsl";break;case"hwb":a=f.get.hwb(i),u="hwb";break;default:a=f.get.rgb(i),u="rgb";break}return a?{model:u,value:a}:null},f.get.rgb=function(i){if(!i)return null;var c=/^#([a-f0-9]{3,4})$/i,a=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,u=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,t=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^(\w+)$/,l=[0,0,0,1],g,p,y;if(g=i.match(a)){for(y=g[2],g=g[1],p=0;p<3;p++){var j=p*2;l[p]=parseInt(g.slice(j,j+2),16)}y&&(l[3]=parseInt(y,16)/255)}else if(g=i.match(c)){for(g=g[1],y=g[3],p=0;p<3;p++)l[p]=parseInt(g[p]+g[p],16);y&&(l[3]=parseInt(y+y,16)/255)}else if(g=i.match(u)){for(p=0;p<3;p++)l[p]=parseInt(g[p+1],0);g[4]&&(g[5]?l[3]=parseFloat(g[4])*.01:l[3]=parseFloat(g[4]))}else if(g=i.match(t)){for(p=0;p<3;p++)l[p]=Math.round(parseFloat(g[p+1])*2.55);g[4]&&(g[5]?l[3]=parseFloat(g[4])*.01:l[3]=parseFloat(g[4]))}else return(g=i.match(d))?g[1]==="transparent"?[0,0,0,0]:b.call(h,g[1])?(l=h[g[1]],l[3]=1,l):null:null;for(p=0;p<3;p++)l[p]=s(l[p],0,255);return l[3]=s(l[3],0,1),l},f.get.hsl=function(i){if(!i)return null;var c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,a=i.match(c);if(a){var u=parseFloat(a[4]),t=(parseFloat(a[1])%360+360)%360,d=s(parseFloat(a[2]),0,100),l=s(parseFloat(a[3]),0,100),g=s(isNaN(u)?1:u,0,1);return[t,d,l,g]}return null},f.get.hwb=function(i){if(!i)return null;var c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,a=i.match(c);if(a){var u=parseFloat(a[4]),t=(parseFloat(a[1])%360+360)%360,d=s(parseFloat(a[2]),0,100),l=s(parseFloat(a[3]),0,100),g=s(isNaN(u)?1:u,0,1);return[t,d,l,g]}return null},f.to.hex=function(){var i=e(arguments);return"#"+o(i[0])+o(i[1])+o(i[2])+(i[3]<1?o(Math.round(i[3]*255)):"")},f.to.rgb=function(){var i=e(arguments);return i.length<4||i[3]===1?"rgb("+Math.round(i[0])+", "+Math.round(i[1])+", "+Math.round(i[2])+")":"rgba("+Math.round(i[0])+", "+Math.round(i[1])+", "+Math.round(i[2])+", "+i[3]+")"},f.to.rgb.percent=function(){var i=e(arguments),c=Math.round(i[0]/255*100),a=Math.round(i[1]/255*100),u=Math.round(i[2]/255*100);return i.length<4||i[3]===1?"rgb("+c+"%, "+a+"%, "+u+"%)":"rgba("+c+"%, "+a+"%, "+u+"%, "+i[3]+")"},f.to.hsl=function(){var i=e(arguments);return i.length<4||i[3]===1?"hsl("+i[0]+", "+i[1]+"%, "+i[2]+"%)":"hsla("+i[0]+", "+i[1]+"%, "+i[2]+"%, "+i[3]+")"},f.to.hwb=function(){var i=e(arguments),c="";return i.length>=4&&i[3]!==1&&(c=", "+i[3]),"hwb("+i[0]+", "+i[1]+"%, "+i[2]+"%"+c+")"},f.to.keyword=function(i){return w[i.slice(0,3)]};function s(i,c,a){return Math.min(Math.max(c,i),a)}function o(i){var c=Math.round(i).toString(16).toUpperCase();return c.length<2?"0"+c:c}return xe.exports}var Le,Rr;function Br(){if(Rr)return Le;Rr=1;const h=Mr(),e={};for(const n of Object.keys(h))e[h[n]]=n;const b={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Le=b;for(const n of Object.keys(b)){if(!("channels"in b[n]))throw new Error("missing channels property: "+n);if(!("labels"in b[n]))throw new Error("missing channel labels property: "+n);if(b[n].labels.length!==b[n].channels)throw new Error("channel and label counts mismatch: "+n);const{channels:f,labels:s}=b[n];delete b[n].channels,delete b[n].labels,Object.defineProperty(b[n],"channels",{value:f}),Object.defineProperty(b[n],"labels",{value:s})}b.rgb.hsl=function(n){const f=n[0]/255,s=n[1]/255,o=n[2]/255,i=Math.min(f,s,o),c=Math.max(f,s,o),a=c-i;let u,t;c===i?u=0:f===c?u=(s-o)/a:s===c?u=2+(o-f)/a:o===c&&(u=4+(f-s)/a),u=Math.min(u*60,360),u<0&&(u+=360);const d=(i+c)/2;return c===i?t=0:d<=.5?t=a/(c+i):t=a/(2-c-i),[u,t*100,d*100]},b.rgb.hsv=function(n){let f,s,o,i,c;const a=n[0]/255,u=n[1]/255,t=n[2]/255,d=Math.max(a,u,t),l=d-Math.min(a,u,t),g=function(p){return(d-p)/6/l+1/2};return l===0?(i=0,c=0):(c=l/d,f=g(a),s=g(u),o=g(t),a===d?i=o-s:u===d?i=1/3+f-o:t===d&&(i=2/3+s-f),i<0?i+=1:i>1&&(i-=1)),[i*360,c*100,d*100]},b.rgb.hwb=function(n){const f=n[0],s=n[1];let o=n[2];const i=b.rgb.hsl(n)[0],c=1/255*Math.min(f,Math.min(s,o));return o=1-1/255*Math.max(f,Math.max(s,o)),[i,c*100,o*100]},b.rgb.cmyk=function(n){const f=n[0]/255,s=n[1]/255,o=n[2]/255,i=Math.min(1-f,1-s,1-o),c=(1-f-i)/(1-i)||0,a=(1-s-i)/(1-i)||0,u=(1-o-i)/(1-i)||0;return[c*100,a*100,u*100,i*100]};function w(n,f){return(n[0]-f[0])**2+(n[1]-f[1])**2+(n[2]-f[2])**2}return b.rgb.keyword=function(n){const f=e[n];if(f)return f;let s=1/0,o;for(const i of Object.keys(h)){const c=h[i],a=w(n,c);a<s&&(s=a,o=i)}return o},b.keyword.rgb=function(n){return h[n]},b.rgb.xyz=function(n){let f=n[0]/255,s=n[1]/255,o=n[2]/255;f=f>.04045?((f+.055)/1.055)**2.4:f/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;const i=f*.4124+s*.3576+o*.1805,c=f*.2126+s*.7152+o*.0722,a=f*.0193+s*.1192+o*.9505;return[i*100,c*100,a*100]},b.rgb.lab=function(n){const f=b.rgb.xyz(n);let s=f[0],o=f[1],i=f[2];s/=95.047,o/=100,i/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const c=116*o-16,a=500*(s-o),u=200*(o-i);return[c,a,u]},b.hsl.rgb=function(n){const f=n[0]/360,s=n[1]/100,o=n[2]/100;let i,c,a;if(s===0)return a=o*255,[a,a,a];o<.5?i=o*(1+s):i=o+s-o*s;const u=2*o-i,t=[0,0,0];for(let d=0;d<3;d++)c=f+1/3*-(d-1),c<0&&c++,c>1&&c--,6*c<1?a=u+(i-u)*6*c:2*c<1?a=i:3*c<2?a=u+(i-u)*(2/3-c)*6:a=u,t[d]=a*255;return t},b.hsl.hsv=function(n){const f=n[0];let s=n[1]/100,o=n[2]/100,i=s;const c=Math.max(o,.01);o*=2,s*=o<=1?o:2-o,i*=c<=1?c:2-c;const a=(o+s)/2,u=o===0?2*i/(c+i):2*s/(o+s);return[f,u*100,a*100]},b.hsv.rgb=function(n){const f=n[0]/60,s=n[1]/100;let o=n[2]/100;const i=Math.floor(f)%6,c=f-Math.floor(f),a=255*o*(1-s),u=255*o*(1-s*c),t=255*o*(1-s*(1-c));switch(o*=255,i){case 0:return[o,t,a];case 1:return[u,o,a];case 2:return[a,o,t];case 3:return[a,u,o];case 4:return[t,a,o];case 5:return[o,a,u]}},b.hsv.hsl=function(n){const f=n[0],s=n[1]/100,o=n[2]/100,i=Math.max(o,.01);let c,a;a=(2-s)*o;const u=(2-s)*i;return c=s*i,c/=u<=1?u:2-u,c=c||0,a/=2,[f,c*100,a*100]},b.hwb.rgb=function(n){const f=n[0]/360;let s=n[1]/100,o=n[2]/100;const i=s+o;let c;i>1&&(s/=i,o/=i);const a=Math.floor(6*f),u=1-o;c=6*f-a,(a&1)!==0&&(c=1-c);const t=s+c*(u-s);let d,l,g;switch(a){default:case 6:case 0:d=u,l=t,g=s;break;case 1:d=t,l=u,g=s;break;case 2:d=s,l=u,g=t;break;case 3:d=s,l=t,g=u;break;case 4:d=t,l=s,g=u;break;case 5:d=u,l=s,g=t;break}return[d*255,l*255,g*255]},b.cmyk.rgb=function(n){const f=n[0]/100,s=n[1]/100,o=n[2]/100,i=n[3]/100,c=1-Math.min(1,f*(1-i)+i),a=1-Math.min(1,s*(1-i)+i),u=1-Math.min(1,o*(1-i)+i);return[c*255,a*255,u*255]},b.xyz.rgb=function(n){const f=n[0]/100,s=n[1]/100,o=n[2]/100;let i,c,a;return i=f*3.2406+s*-1.5372+o*-.4986,c=f*-.9689+s*1.8758+o*.0415,a=f*.0557+s*-.204+o*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),c=Math.min(Math.max(0,c),1),a=Math.min(Math.max(0,a),1),[i*255,c*255,a*255]},b.xyz.lab=function(n){let f=n[0],s=n[1],o=n[2];f/=95.047,s/=100,o/=108.883,f=f>.008856?f**(1/3):7.787*f+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*s-16,c=500*(f-s),a=200*(s-o);return[i,c,a]},b.lab.xyz=function(n){const f=n[0],s=n[1],o=n[2];let i,c,a;c=(f+16)/116,i=s/500+c,a=c-o/200;const u=c**3,t=i**3,d=a**3;return c=u>.008856?u:(c-16/116)/7.787,i=t>.008856?t:(i-16/116)/7.787,a=d>.008856?d:(a-16/116)/7.787,i*=95.047,c*=100,a*=108.883,[i,c,a]},b.lab.lch=function(n){const f=n[0],s=n[1],o=n[2];let i;i=Math.atan2(o,s)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(s*s+o*o);return[f,a,i]},b.lch.lab=function(n){const f=n[0],s=n[1],i=n[2]/360*2*Math.PI,c=s*Math.cos(i),a=s*Math.sin(i);return[f,c,a]},b.rgb.ansi16=function(n,f=null){const[s,o,i]=n;let c=f===null?b.rgb.hsv(n)[2]:f;if(c=Math.round(c/50),c===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(s/255));return c===2&&(a+=60),a},b.hsv.ansi16=function(n){return b.rgb.ansi16(b.hsv.rgb(n),n[2])},b.rgb.ansi256=function(n){const f=n[0],s=n[1],o=n[2];return f===s&&s===o?f<8?16:f>248?231:Math.round((f-8)/247*24)+232:16+36*Math.round(f/255*5)+6*Math.round(s/255*5)+Math.round(o/255*5)},b.ansi16.rgb=function(n){let f=n%10;if(f===0||f===7)return n>50&&(f+=3.5),f=f/10.5*255,[f,f,f];const s=(~~(n>50)+1)*.5,o=(f&1)*s*255,i=(f>>1&1)*s*255,c=(f>>2&1)*s*255;return[o,i,c]},b.ansi256.rgb=function(n){if(n>=232){const c=(n-232)*10+8;return[c,c,c]}n-=16;let f;const s=Math.floor(n/36)/5*255,o=Math.floor((f=n%36)/6)/5*255,i=f%6/5*255;return[s,o,i]},b.rgb.hex=function(n){const s=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},b.hex.rgb=function(n){const f=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!f)return[0,0,0];let s=f[0];f[0].length===3&&(s=s.split("").map(u=>u+u).join(""));const o=parseInt(s,16),i=o>>16&255,c=o>>8&255,a=o&255;return[i,c,a]},b.rgb.hcg=function(n){const f=n[0]/255,s=n[1]/255,o=n[2]/255,i=Math.max(Math.max(f,s),o),c=Math.min(Math.min(f,s),o),a=i-c;let u,t;return a<1?u=c/(1-a):u=0,a<=0?t=0:i===f?t=(s-o)/a%6:i===s?t=2+(o-f)/a:t=4+(f-s)/a,t/=6,t%=1,[t*360,a*100,u*100]},b.hsl.hcg=function(n){const f=n[1]/100,s=n[2]/100,o=s<.5?2*f*s:2*f*(1-s);let i=0;return o<1&&(i=(s-.5*o)/(1-o)),[n[0],o*100,i*100]},b.hsv.hcg=function(n){const f=n[1]/100,s=n[2]/100,o=f*s;let i=0;return o<1&&(i=(s-o)/(1-o)),[n[0],o*100,i*100]},b.hcg.rgb=function(n){const f=n[0]/360,s=n[1]/100,o=n[2]/100;if(s===0)return[o*255,o*255,o*255];const i=[0,0,0],c=f%1*6,a=c%1,u=1-a;let t=0;switch(Math.floor(c)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return t=(1-s)*o,[(s*i[0]+t)*255,(s*i[1]+t)*255,(s*i[2]+t)*255]},b.hcg.hsv=function(n){const f=n[1]/100,s=n[2]/100,o=f+s*(1-f);let i=0;return o>0&&(i=f/o),[n[0],i*100,o*100]},b.hcg.hsl=function(n){const f=n[1]/100,o=n[2]/100*(1-f)+.5*f;let i=0;return o>0&&o<.5?i=f/(2*o):o>=.5&&o<1&&(i=f/(2*(1-o))),[n[0],i*100,o*100]},b.hcg.hwb=function(n){const f=n[1]/100,s=n[2]/100,o=f+s*(1-f);return[n[0],(o-f)*100,(1-o)*100]},b.hwb.hcg=function(n){const f=n[1]/100,o=1-n[2]/100,i=o-f;let c=0;return i<1&&(c=(o-i)/(1-i)),[n[0],i*100,c*100]},b.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},b.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},b.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},b.gray.hsl=function(n){return[0,0,n[0]]},b.gray.hsv=b.gray.hsl,b.gray.hwb=function(n){return[0,100,n[0]]},b.gray.cmyk=function(n){return[0,0,0,n[0]]},b.gray.lab=function(n){return[n[0],0,0]},b.gray.hex=function(n){const f=Math.round(n[0]/100*255)&255,o=((f<<16)+(f<<8)+f).toString(16).toUpperCase();return"000000".substring(o.length)+o},b.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]},Le}var Se,Pr;function dt(){if(Pr)return Se;Pr=1;const h=Br();function e(){const f={},s=Object.keys(h);for(let o=s.length,i=0;i<o;i++)f[s[i]]={distance:-1,parent:null};return f}function b(f){const s=e(),o=[f];for(s[f].distance=0;o.length;){const i=o.pop(),c=Object.keys(h[i]);for(let a=c.length,u=0;u<a;u++){const t=c[u],d=s[t];d.distance===-1&&(d.distance=s[i].distance+1,d.parent=i,o.unshift(t))}}return s}function w(f,s){return function(o){return s(f(o))}}function n(f,s){const o=[s[f].parent,f];let i=h[s[f].parent][f],c=s[f].parent;for(;s[c].parent;)o.unshift(s[c].parent),i=w(h[s[c].parent][c],i),c=s[c].parent;return i.conversion=o,i}return Se=function(f){const s=b(f),o={},i=Object.keys(s);for(let c=i.length,a=0;a<c;a++){const u=i[a];s[u].parent!==null&&(o[u]=n(u,s))}return o},Se}var je,xr;function gt(){if(xr)return je;xr=1;const h=Br(),e=dt(),b={},w=Object.keys(h);function n(s){const o=function(...i){const c=i[0];return c==null?c:(c.length>1&&(i=c),s(i))};
2return"conversion"in s&&(o.conversion=s.conversion),o}function f(s){const o=function(...i){const c=i[0];if(c==null)return c;c.length>1&&(i=c);const a=s(i);if(typeof a=="object")for(let u=a.length,t=0;t<u;t++)a[t]=Math.round(a[t]);return a};return"conversion"in s&&(o.conversion=s.conversion),o}return w.forEach(s=>{b[s]={},Object.defineProperty(b[s],"channels",{value:h[s].channels}),Object.defineProperty(b[s],"labels",{value:h[s].labels});const o=e(s);Object.keys(o).forEach(c=>{const a=o[c];b[s][c]=f(a),b[s][c].raw=n(a)})}),je=b,je}var ke,Ir;function Ue(){if(Ir)return ke;Ir=1;const h=ut(),e=gt(),b=["keyword","gray","hex"],w={};for(const t of Object.keys(e))w[[...e[t].labels].sort().join("")]=t;const n={};function f(t,d){if(!(this instanceof f))return new f(t,d);if(d&&d in b&&(d=null),d&&!(d in e))throw new Error("Unknown model: "+d);let l,g;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof f)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const p=h.get(t);if(p===null)throw new Error("Unable to parse color from string: "+t);this.model=p.model,g=e[this.model].channels,this.color=p.value.slice(0,g),this.valpha=typeof p.value[g]=="number"?p.value[g]:1}else if(t.length>0){this.model=d||"rgb",g=e[this.model].channels;const p=Array.prototype.slice.call(t,0,g);this.color=u(p,g),this.valpha=typeof t[g]=="number"?t[g]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const p=Object.keys(t);"alpha"in t&&(p.splice(p.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const y=p.sort().join("");if(!(y in w))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=w[y];const{labels:j}=e[this.model],S=[];for(l=0;l<j.length;l++)S.push(t[j[l]]);this.color=u(S)}if(n[this.model])for(g=e[this.model].channels,l=0;l<g;l++){const p=n[this.model][l];p&&(this.color[l]=p(this.color[l]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}f.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let d=this.model in h.to?this:this.rgb();d=d.round(typeof t=="number"?t:1);const l=d.valpha===1?d.color:[...d.color,this.valpha];return h.to[d.model](l)},percentString(t){const d=this.rgb().round(typeof t=="number"?t:1),l=d.valpha===1?d.color:[...d.color,this.valpha];return h.to.rgb.percent(l)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:d}=e[this.model],{labels:l}=e[this.model];for(let g=0;g<d;g++)t[l[g]]=this.color[g];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new f([...this.color.map(o(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new f([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:i("rgb",0,c(255)),green:i("rgb",1,c(255)),blue:i("rgb",2,c(255)),hue:i(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:i("hsl",1,c(100)),lightness:i("hsl",2,c(100)),saturationv:i("hsv",1,c(100)),value:i("hsv",2,c(100)),chroma:i("hcg",1,c(100)),gray:i("hcg",2,c(100)),white:i("hwb",1,c(100)),wblack:i("hwb",2,c(100)),cyan:i("cmyk",0,c(100)),magenta:i("cmyk",1,c(100)),yellow:i("cmyk",2,c(100)),black:i("cmyk",3,c(100)),x:i("xyz",0,c(95.047)),y:i("xyz",1,c(100)),z:i("xyz",2,c(108.833)),l:i("lab",0,c(100)),a:i("lab",1),b:i("lab",2),keyword(t){return t!==void 0?new f(t):e[this.model].keyword(this.color)},hex(t){return t!==void 0?new f(t):h.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new f(t);const d=this.rgb().round().color;let l=Math.round(this.valpha*255).toString(16).toUpperCase();return l.length===1&&(l="0"+l),h.to.hex(d)+l},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,d=[];for(const[l,g]of t.entries()){const p=g/255;d[l]=p<=.04045?p/12.92:((p+.055)/1.055)**2.4}
2return .2126*d[0]+.7152*d[1]+.0722*d[2]},contrast(t){const d=this.luminosity(),l=t.luminosity();return d>l?(d+.05)/(l+.05):(l+.05)/(d+.05)},level(t){const d=this.contrast(t);return d>=7?"AAA":d>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let d=0;d<3;d++)t.color[d]=255-t.color[d];return t},lighten(t){const d=this.hsl();return d.color[2]+=d.color[2]*t,d},darken(t){const d=this.hsl();return d.color[2]-=d.color[2]*t,d},saturate(t){const d=this.hsl();return d.color[1]+=d.color[1]*t,d},desaturate(t){const d=this.hsl();return d.color[1]-=d.color[1]*t,d},whiten(t){const d=this.hwb();return d.color[1]+=d.color[1]*t,d},blacken(t){const d=this.hwb();return d.color[2]+=d.color[2]*t,d},grayscale(){const t=this.rgb().color,d=t[0]*.3+t[1]*.59+t[2]*.11;return f.rgb(d,d,d)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const d=this.hsl();let l=d.color[0];return l=(l+t)%360,l=l<0?360+l:l,d.color[0]=l,d},mix(t,d){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const l=t.rgb(),g=this.rgb(),p=d===void 0?.5:d,y=2*p-1,j=l.alpha()-g.alpha(),S=((y*j===-1?y:(y+j)/(1+y*j))+1)/2,C=1-S;return f.rgb(S*l.red()+C*g.red(),S*l.green()+C*g.green(),S*l.blue()+C*g.blue(),l.alpha()*p+g.alpha()*(1-p))}};for(const t of Object.keys(e)){if(b.includes(t))continue;const{channels:d}=e[t];f.prototype[t]=function(...l){return this.model===t?new f(this):l.length>0?new f(l,t):new f([...a(e[this.model][t].raw(this.color)),this.valpha],t)},f[t]=function(...l){let g=l[0];return typeof g=="number"&&(g=u(l,d)),new f(g,t)}}function s(t,d){return Number(t.toFixed(d))}function o(t){return function(d){return s(d,t)}}function i(t,d,l){t=Array.isArray(t)?t:[t];for(const g of t)(n[g]||(n[g]=[]))[d]=l;return t=t[0],function(g){let p;return g!==void 0?(l&&(g=l(g)),p=this[t](),p.color[d]=g,p):(p=this[t]().color[d],l&&(p=l(p)),p)}}function c(t){return function(d){return Math.max(0,Math.min(t,d))}}function a(t){return Array.isArray(t)?t:[t]}function u(t,d){for(let l=0;l<d;l++)typeof t[l]!="number"&&(t[l]=0);return t}return ke=f,ke}var Ne,Ar;function mt(){if(Ar)return Ne;Ar=1;const h=Ue(),e=z(),b=K(),w={left:"low",center:"centre",centre:"centre",right:"high"};function n(u){const{raw:t,density:d,limitInputPixels:l,ignoreIcc:g,unlimited:p,sequentialRead:y,failOn:j,failOnError:S,animated:C,page:F,pages:_,subifd:m}=u;return[t,d,l,g,p,y,j,S,C,F,_,m].some(e.defined)?{raw:t,density:d,limitInputPixels:l,ignoreIcc:g,unlimited:p,sequentialRead:y,failOn:j,failOnError:S,animated:C,page:F,pages:_,subifd:m}:void 0}function f(u,t,d){const l={failOn:"warning",limitInputPixels:Math.pow(16383,2),ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(e.string(u))l.file=u;else if(e.buffer(u)){if(u.length===0)throw Error("Input Buffer is empty");l.buffer=u}else if(e.arrayBuffer(u)){if(u.byteLength===0)throw Error("Input bit Array is empty");l.buffer=Buffer.from(u,0,u.byteLength)}else if(e.typedArray(u)){if(u.length===0)throw Error("Input Bit Array is empty");l.buffer=Buffer.from(u.buffer,u.byteOffset,u.byteLength)}else if(e.plainObject(u)&&!e.defined(t))t=u,n(t)&&(l.buffer=[]);else if(!e.defined(u)&&!e.defined(t)&&e.object(d)&&d.allowStream)l.buffer=[];else throw new Error(`Unsupported input '${u}' of type ${typeof u}${e.defined(t)?` when also providing options of type ${typeof t}`:""}`);if(e.object(t)){if(e.defined(t.failOnError))if(e.bool(t.failOnError))l.failOn=t.failOnError?"warning":"none";else throw e.invalidParameterError("failOnError","boolean",t.failOnError);if(e.defined(t.failOn))if(e.string(t.failOn)&&e.inArray(t.failOn,["none","truncated","error","warning"]))l.failOn=t.failOn;else throw e.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);if(e.defined(t.density))if(e.inRange(t.density,1,1e5))l.density=t.density;else throw e.invalidParameterError("density","number between 1 and 100000",t.density);if(e.defined(t.ignoreIcc))if(e.bool(t.ignoreIcc))l.ignoreIcc=t.ignoreIcc;
2else throw e.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(e.defined(t.limitInputPixels))if(e.bool(t.limitInputPixels))l.limitInputPixels=t.limitInputPixels?Math.pow(16383,2):0;else if(e.integer(t.limitInputPixels)&&e.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))l.limitInputPixels=t.limitInputPixels;else throw e.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(e.defined(t.unlimited))if(e.bool(t.unlimited))l.unlimited=t.unlimited;else throw e.invalidParameterError("unlimited","boolean",t.unlimited);if(e.defined(t.sequentialRead))if(e.bool(t.sequentialRead))l.sequentialRead=t.sequentialRead;else throw e.invalidParameterError("sequentialRead","boolean",t.sequentialRead);if(e.defined(t.raw))if(e.object(t.raw)&&e.integer(t.raw.width)&&t.raw.width>0&&e.integer(t.raw.height)&&t.raw.height>0&&e.integer(t.raw.channels)&&e.inRange(t.raw.channels,1,4))switch(l.rawWidth=t.raw.width,l.rawHeight=t.raw.height,l.rawChannels=t.raw.channels,l.rawPremultiplied=!!t.raw.premultiplied,u.constructor){case Uint8Array:case Uint8ClampedArray:l.rawDepth="uchar";break;case Int8Array:l.rawDepth="char";break;case Uint16Array:l.rawDepth="ushort";break;case Int16Array:l.rawDepth="short";break;case Uint32Array:l.rawDepth="uint";break;case Int32Array:l.rawDepth="int";break;case Float32Array:l.rawDepth="float";break;case Float64Array:l.rawDepth="double";break;default:l.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(e.defined(t.animated))if(e.bool(t.animated))l.pages=t.animated?-1:1;else throw e.invalidParameterError("animated","boolean",t.animated);if(e.defined(t.pages))if(e.integer(t.pages)&&e.inRange(t.pages,-1,1e5))l.pages=t.pages;else throw e.invalidParameterError("pages","integer between -1 and 100000",t.pages);if(e.defined(t.page))if(e.integer(t.page)&&e.inRange(t.page,0,1e5))l.page=t.page;else throw e.invalidParameterError("page","integer between 0 and 100000",t.page);if(e.defined(t.level))if(e.integer(t.level)&&e.inRange(t.level,0,256))l.level=t.level;else throw e.invalidParameterError("level","integer between 0 and 256",t.level);if(e.defined(t.subifd))if(e.integer(t.subifd)&&e.inRange(t.subifd,-1,1e5))l.subifd=t.subifd;else throw e.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);if(e.defined(t.create))if(e.object(t.create)&&e.integer(t.create.width)&&t.create.
2width>0&&e.integer(t.create.height)&&t.create.height>0&&e.integer(t.create.channels)){if(l.createWidth=t.create.width,l.createHeight=t.create.height,l.createChannels=t.create.channels,e.defined(t.create.noise)){if(!e.object(t.create.noise))throw new Error("Expected noise to be an object");if(!e.inArray(t.create.noise.type,["gaussian"]))throw new Error("Only gaussian noise is supported at the moment");if(!e.inRange(t.create.channels,1,4))throw e.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(l.createNoiseType=t.create.noise.type,e.number(t.create.noise.mean)&&e.inRange(t.create.noise.mean,0,1e4))l.createNoiseMean=t.create.noise.mean;else throw e.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(e.number(t.create.noise.sigma)&&e.inRange(t.create.noise.sigma,0,1e4))l.createNoiseSigma=t.create.noise.sigma;else throw e.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma)}else if(e.defined(t.create.background)){if(!e.inRange(t.create.channels,3,4))throw e.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);const g=h(t.create.background);l.createBackground=[g.red(),g.green(),g.blue(),Math.round(g.alpha()*255)]}else throw new Error("Expected valid noise or background to create a new input image");delete l.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(e.defined(t.text))if(e.object(t.text)&&e.string(t.text.text)){if(l.textValue=t.text.text,e.defined(t.text.height)&&e.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(e.defined(t.text.font))if(e.string(t.text.font))l.textFont=t.text.font;else throw e.invalidParameterError("text.font","string",t.text.font);if(e.defined(t.text.fontfile))if(e.string(t.text.fontfile))l.textFontfile=t.text.fontfile;else throw e.invalidParameterError("text.fontfile","string",t.text.fontfile);if(e.defined(t.text.width))if(e.integer(t.text.width)&&t.text.width>0)l.textWidth=t.text.width;else throw e.invalidParameterError("text.width","positive integer",t.text.width);if(e.defined(t.text.height))if(e.integer(t.text.height)&&t.text.height>0)l.textHeight=t.text.height;else throw e.invalidParameterError("text.height","positive integer",t.text.height);if(e.defined(t.text.align))if(e.string(t.text.align)&&e.string(this.constructor.align[t.text.align]))l.textAlign=this.constructor.align[t.text.align];else throw e.invalidParameterError("text.align","valid alignment",t.text.align);if(e.defined(t.text.justify))if(e.bool(t.text.justify))l.textJustify=t.text.justify;else throw e.invalidParameterError("text.justify","boolean",t.text.justify);if(e.defined(t.text.dpi))if(e.integer(t.text.dpi)&&e.inRange(t.text.dpi,1,1e6))l.textDpi=t.text.dpi;else throw e.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);if(e.defined(t.text.rgba))if(e.bool(t.text.rgba))l.textRgba=t.text.rgba;else throw e.invalidParameterError("text.rgba","bool",t.text.rgba);if(e.defined(t.text.spacing))if(e.integer(t.text.spacing)&&e.inRange(t.text.spacing,-1e6,1e6))l.textSpacing=t.text.spacing;else throw e.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);if(e.defined(t.text.wrap))if(e.string(t.text.wrap)&&e.inArray(t.text.wrap,["word","char","word-char","none"]))l.textWrap=t.text.wrap;else throw e.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete l.buffer}else throw new Error("Expected a valid string to create an image with text.")}else if(e.defined(t))throw new Error("Invalid input options "+t);return l}function s(u,t,d){Array.isArray(this.options.input.buffer)?e.buffer(u)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(u),d()):d(new Error("Non-Buffer data on Writable Stream")):d(new Error("Unexpected data on Writable Stream"))}function o(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function i(){return Array.isArray(this.options.input.buffer)}function c(u){const t=Error();return e.fn(u)?(this._isStreamInput()?this.on("finish",()=>
2{this._flattenBufferIn(),b.metadata(this.options,(d,l)=>{d?u(e.nativeError(d,t)):u(null,l)})}):b.metadata(this.options,(d,l)=>{d?u(e.nativeError(d,t)):u(null,l)}),this):this._isStreamInput()?new Promise((d,l)=>{const g=()=>{this._flattenBufferIn(),b.metadata(this.options,(p,y)=>{p?l(e.nativeError(p,t)):d(y)})};this.writableFinished?g():this.once("finish",g)}):new Promise((d,l)=>{b.metadata(this.options,(g,p)=>{g?l(e.nativeError(g,t)):d(p)})})}function a(u){const t=Error();return e.fn(u)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),b.stats(this.options,(d,l)=>{d?u(e.nativeError(d,t)):u(null,l)})}):b.stats(this.options,(d,l)=>{d?u(e.nativeError(d,t)):u(null,l)}),this):this._isStreamInput()?new Promise((d,l)=>{this.on("finish",function(){this._flattenBufferIn(),b.stats(this.options,(g,p)=>{g?l(e.nativeError(g,t)):d(p)})})}):new Promise((d,l)=>{b.stats(this.options,(g,p)=>{g?l(e.nativeError(g,t)):d(p)})})}return Ne=function(u){Object.assign(u.prototype,{_inputOptionsFromObject:n,_createInputDescriptor:f,_write:s,_flattenBufferIn:o,_isStreamInput:i,metadata:c,stats:a}),u.align=w},Ne}var Ce,$r;function bt(){if($r)return Ce;$r=1;const h=z(),e={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},b={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},w={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},n={entropy:16,attention:17},f={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3"},s={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},o={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};function i(l){return l.angle%360!==0||l.useExifOrientation===!0||l.rotationAngle!==0}function c(l){return l.width!==-1||l.height!==-1}function a(l,g,p){if(c(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),h.defined(l))if(h.object(l)&&!h.defined(p))p=l;else if(h.integer(l)&&l>0)this.options.width=l;else throw h.invalidParameterError("width","positive integer",l);else this.options.width=-1;if(h.defined(g))if(h.integer(g)&&g>0)this.options.height=g;else throw h.invalidParameterError("height","positive integer",g);else this.options.height=-1;if(h.object(p)){if(h.defined(p.width))if(h.integer(p.width)&&p.width>0)this.options.width=p.width;else throw h.invalidParameterError("width","positive integer",p.width);if(h.defined(p.height))if(h.integer(p.height)&&p.height>0)this.options.height=p.height;else throw h.invalidParameterError("height","positive integer",p.height);if(h.defined(p.fit)){const y=o[p.fit];if(h.string(y))this.options.canvas=y;else throw h.invalidParameterError("fit","valid fit",p.fit)}if(h.defined(p.position)){const y=h.integer(p.position)?p.position:n[p.position]||b[p.position]||e[p.position];if(h.integer(y)&&(h.inRange(y,0,8)||h.inRange(y,16,17)))this.options.position=y;else throw h.invalidParameterError("position","valid position/gravity/strategy",p.position)}if(this._setBackgroundColourOption("resizeBackground",p.background),h.defined(p.kernel))if(h.string(f[p.kernel]))this.options.kernel=f[p.kernel];else throw h.invalidParameterError("kernel","valid kernel name",p.kernel);h.defined(p.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",p.withoutEnlargement),h.defined(p.withoutReduction)&&this._setBooleanOption("withoutReduction",p.withoutReduction),h.defined(p.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",p.fastShrinkOnLoad)}return i(this.options)&&c(this.options)&&(this.options.rotateBeforePreExtract=!0),this}function u(l){if(h.integer(l)&&l>0)this.options.extendTop=l,this.options.extendBottom=l,this.options.extendLeft=l,this.options.extendRight=l;else if(h.object(l)){if(h.defined(l.top))if(h.integer(l.top)&&l.top>=0)this.options.extendTop=l.top;else throw h.invalidParameterError("top","positive integer",l.top);if(h.defined(l.bottom))if(h.integer(l.bottom)&&l.bottom>=0)this.options.extendBottom=l.bottom;else throw h.invalidParameterError("bottom","positive integer",l.bottom);if(h.defined(l.left))if(h.integer(l.left)&&l.left>=0)this.options.extendLeft=l.left;else throw h.invalidParameterError("left","positive integer",l.left);if(h.defined(l.right))if(h.integer(l.right)&&l.right>=0)this.options.extendRight=l.right;else throw h.invalidParameterError("right","positive integer",l.right);
2if(this._setBackgroundColourOption("extendBackground",l.background),h.defined(l.extendWith))if(h.string(w[l.extendWith]))this.options.extendWith=w[l.extendWith];else throw h.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",l.extendWith)}else throw h.invalidParameterError("extend","integer or object",l);return this}function t(l){const g=c(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${g}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(p){const y=l[p];if(h.integer(y)&&y>=0)this.options[p+(p==="left"||p==="top"?"Offset":"")+g]=y;else throw h.invalidParameterError(p,"integer",y)},this),i(this.options)&&!c(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBeforePreExtract=!0),this}function d(l){if(this.options.trimThreshold=10,h.defined(l))if(h.object(l)){if(h.defined(l.background)&&this._setBackgroundColourOption("trimBackground",l.background),h.defined(l.threshold))if(h.number(l.threshold)&&l.threshold>=0)this.options.trimThreshold=l.threshold;else throw h.invalidParameterError("threshold","positive number",l.threshold);h.defined(l.lineArt)&&this._setBooleanOption("trimLineArt",l.lineArt)}else throw h.invalidParameterError("trim","object",l);return i(this.options)&&(this.options.rotateBeforePreExtract=!0),this}return Ce=function(l){Object.assign(l.prototype,{resize:a,extend:u,extract:t,trim:d}),l.gravity=e,l.strategy=n,l.kernel=f,l.fit=s,l.position=b},Ce}var qe,Lr;function pt(){if(Lr)return qe;Lr=1;const h=z(),e={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};function b(w){if(!Array.isArray(w))throw h.invalidParameterError("images to composite","array",w);return this.options.composite=w.map(n=>{if(!h.object(n))throw h.invalidParameterError("image to composite","object",n);const f=this._inputOptionsFromObject(n),s={input:this._createInputDescriptor(n.input,f,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(h.defined(n.blend))if(h.string(e[n.blend]))s.blend=e[n.blend];else throw h.invalidParameterError("blend","valid blend name",n.blend);if(h.defined(n.tile))if(h.bool(n.tile))s.tile=n.tile;else throw h.invalidParameterError("tile","boolean",n.tile);if(h.defined(n.left))if(h.integer(n.left))s.left=n.left;else throw h.invalidParameterError("left","integer",n.left);if(h.defined(n.top))if(h.integer(n.top))s.top=n.top;else throw h.invalidParameterError("top","integer",n.top);if(h.defined(n.top)!==h.defined(n.left))throw new Error("Expected both left and top to be set");if(s.hasOffset=h.integer(n.top)&&h.integer(n.left),h.defined(n.gravity))if(h.integer(n.gravity)&&h.inRange(n.gravity,0,8))s.gravity=n.gravity;else if(h.string(n.gravity)&&h.integer(this.constructor.gravity[n.gravity]))s.gravity=this.constructor.gravity[n.gravity];else throw h.invalidParameterError("gravity","valid gravity",n.gravity);if(h.defined(n.premultiplied))if(h.bool(n.premultiplied))s.premultiplied=n.premultiplied;else throw h.invalidParameterError("premultiplied","boolean",n.premultiplied);return s}),this}return qe=function(w){w.prototype.composite=b,w.blend=e},qe}var Oe,Sr;function vt(){if(Sr)return Oe;Sr=1;const h=Ue(),e=z(),b={integer:"integer",float:"float",approximate:"approximate"};function w(m,P){if((this.options.useExifOrientation||this.options.angle||this.options.rotationAngle)&&this.options.debuglog("ignoring previous rotate options"),!e.defined(m))this.options.useExifOrientation=!0;else if(e.integer(m)&&!(m%90))this.options.angle=m;else if(e.number(m)){if(this.options.rotationAngle=m,e.object(P)&&P.background){const N=h(P.background);
2this.options.rotationBackground=[N.red(),N.green(),N.blue(),Math.round(N.alpha()*255)]}}else throw e.invalidParameterError("angle","numeric",m);return this}function n(m){return this.options.flip=e.bool(m)?m:!0,this}function f(m){return this.options.flop=e.bool(m)?m:!0,this}function s(m,P){const N=[].concat(...m);if(N.length===4&&N.every(e.number))this.options.affineMatrix=N;else throw e.invalidParameterError("matrix","1x4 or 2x2 array",m);if(e.defined(P))if(e.object(P)){if(this._setBackgroundColourOption("affineBackground",P.background),e.defined(P.idx))if(e.number(P.idx))this.options.affineIdx=P.idx;else throw e.invalidParameterError("options.idx","number",P.idx);if(e.defined(P.idy))if(e.number(P.idy))this.options.affineIdy=P.idy;else throw e.invalidParameterError("options.idy","number",P.idy);if(e.defined(P.odx))if(e.number(P.odx))this.options.affineOdx=P.odx;else throw e.invalidParameterError("options.odx","number",P.odx);if(e.defined(P.ody))if(e.number(P.ody))this.options.affineOdy=P.ody;else throw e.invalidParameterError("options.ody","number",P.ody);if(e.defined(P.interpolator))if(e.inArray(P.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=P.interpolator;else throw e.invalidParameterError("options.interpolator","valid interpolator name",P.interpolator)}else throw e.invalidParameterError("options","object",P);return this}function o(m,P,N){if(!e.defined(m))this.options.sharpenSigma=-1;else if(e.bool(m))this.options.sharpenSigma=m?-1:0;else if(e.number(m)&&e.inRange(m,.01,1e4)){if(this.options.sharpenSigma=m,e.defined(P))if(e.number(P)&&e.inRange(P,0,1e4))this.options.sharpenM1=P;else throw e.invalidParameterError("flat","number between 0 and 10000",P);if(e.defined(N))if(e.number(N)&&e.inRange(N,0,1e4))this.options.sharpenM2=N;else throw e.invalidParameterError("jagged","number between 0 and 10000",N)}else if(e.plainObject(m)){if(e.number(m.sigma)&&e.inRange(m.sigma,1e-6,10))this.options.sharpenSigma=m.sigma;else throw e.invalidParameterError("options.sigma","number between 0.000001 and 10",m.sigma);if(e.defined(m.m1))if(e.number(m.m1)&&e.inRange(m.m1,0,1e6))this.options.sharpenM1=m.m1;else throw e.invalidParameterError("options.m1","number between 0 and 1000000",m.m1);if(e.defined(m.m2))if(e.number(m.m2)&&e.inRange(m.m2,0,1e6))this.options.sharpenM2=m.m2;else throw e.invalidParameterError("options.m2","number between 0 and 1000000",m.m2);if(e.defined(m.x1))if(e.number(m.x1)&&e.inRange(m.x1,0,1e6))this.options.sharpenX1=m.x1;else throw e.invalidParameterError("options.x1","number between 0 and 1000000",m.x1);if(e.defined(m.y2))if(e.number(m.y2)&&e.inRange(m.y2,0,1e6))this.options.sharpenY2=m.y2;else throw e.invalidParameterError("options.y2","number between 0 and 1000000",m.y2);if(e.defined(m.y3))if(e.number(m.y3)&&e.inRange(m.y3,0,1e6))this.options.sharpenY3=m.y3;else throw e.invalidParameterError("options.y3","number between 0 and 1000000",m.y3)}else throw e.invalidParameterError("sigma","number between 0.01 and 10000",m);return this}function i(m){if(!e.defined(m))this.options.medianSize=3;else if(e.integer(m)&&e.inRange(m,1,1e3))this.options.medianSize=m;else throw e.invalidParameterError("size","integer between 1 and 1000",m);return this}function c(m){let P;if(e.number(m))P=m;else if(e.plainObject(m)){if(!e.number(m.sigma))throw e.invalidParameterError("options.sigma","number between 0.3 and 1000",P);if(P=m.sigma,"precision"in m)if(e.string(b[m.precision]))this.options.precision=b[m.precision];else throw e.invalidParameterError("precision","one of: integer, float, approximate",m.precision);if("minAmplitude"in m)if(e.number(m.minAmplitude)&&e.inRange(m.minAmplitude,.001,1))this.options.minAmpl=m.minAmplitude;else throw e.invalidParameterError("minAmplitude","number between 0.001 and 1",m.minAmplitude)}if(!e.defined(m))this.options.blurSigma=-1;else if(e.bool(m))this.options.blurSigma=m?-1:0;else if(e.number(P)&&e.inRange(P,.3,1e3))this.options.blurSigma=P;else throw e.invalidParameterError("sigma","number between 0.3 and 1000",P);return this}function a(m){return this.options.flatten=e.bool(m)?m:!0,e.object(m)&&this._setBackgroun
2dColourOption("flattenBackground",m.background),this}function u(){return this.options.unflatten=!0,this}function t(m,P){if(!e.defined(m))this.options.gamma=2.2;else if(e.number(m)&&e.inRange(m,1,3))this.options.gamma=m;else throw e.invalidParameterError("gamma","number between 1.0 and 3.0",m);if(!e.defined(P))this.options.gammaOut=this.options.gamma;else if(e.number(P)&&e.inRange(P,1,3))this.options.gammaOut=P;else throw e.invalidParameterError("gammaOut","number between 1.0 and 3.0",P);return this}function d(m){if(this.options.negate=e.bool(m)?m:!0,e.plainObject(m)&&"alpha"in m)if(e.bool(m.alpha))this.options.negateAlpha=m.alpha;else throw e.invalidParameterError("alpha","should be boolean value",m.alpha);return this}function l(m){if(e.plainObject(m)){if(e.defined(m.lower))if(e.number(m.lower)&&e.inRange(m.lower,0,99))this.options.normaliseLower=m.lower;else throw e.invalidParameterError("lower","number between 0 and 99",m.lower);if(e.defined(m.upper))if(e.number(m.upper)&&e.inRange(m.upper,1,100))this.options.normaliseUpper=m.upper;else throw e.invalidParameterError("upper","number between 1 and 100",m.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw e.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function g(m){return this.normalise(m)}function p(m){if(e.plainObject(m)){if(e.integer(m.width)&&m.width>0)this.options.claheWidth=m.width;else throw e.invalidParameterError("width","integer greater than zero",m.width);if(e.integer(m.height)&&m.height>0)this.options.claheHeight=m.height;else throw e.invalidParameterError("height","integer greater than zero",m.height);if(e.defined(m.maxSlope))if(e.integer(m.maxSlope)&&e.inRange(m.maxSlope,0,100))this.options.claheMaxSlope=m.maxSlope;else throw e.invalidParameterError("maxSlope","integer between 0 and 100",m.maxSlope)}else throw e.invalidParameterError("options","plain object",m);return this}function y(m){if(!e.object(m)||!Array.isArray(m.kernel)||!e.integer(m.width)||!e.integer(m.height)||!e.inRange(m.width,3,1001)||!e.inRange(m.height,3,1001)||m.height*m.width!==m.kernel.length)throw new Error("Invalid convolution kernel");return e.integer(m.scale)||(m.scale=m.kernel.reduce(function(P,N){return P+N},0)),m.scale<1&&(m.scale=1),e.integer(m.offset)||(m.offset=0),this.options.convKernel=m,this}function j(m,P){if(!e.defined(m))this.options.threshold=128;else if(e.bool(m))this.options.threshold=m?128:0;else if(e.integer(m)&&e.inRange(m,0,255))this.options.threshold=m;else throw e.invalidParameterError("threshold","integer between 0 and 255",m);return!e.object(P)||P.greyscale===!0||P.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function S(m,P,N){if(this.options.boolean=this._createInputDescriptor(m,N),e.string(P)&&e.inArray(P,["and","or","eor"]))this.options.booleanOp=P;else throw e.invalidParameterError("operator","one of: and, or, eor",P);return this}function C(m,P){if(!e.defined(m)&&e.number(P)?m=1:e.number(m)&&!e.defined(P)&&(P=0),!e.defined(m))this.options.linearA=[];else if(e.number(m))this.options.linearA=[m];else if(Array.isArray(m)&&m.length&&m.every(e.number))this.options.linearA=m;else throw e.invalidParameterError("a","number or array of numbers",m);if(!e.defined(P))this.options.linearB=[];else if(e.number(P))this.options.linearB=[P];else if(Array.isArray(P)&&P.length&&P.every(e.number))this.options.linearB=P;else throw e.invalidParameterError("b","number or array of numbers",P);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function F(m){if(!Array.isArray(m))throw e.invalidParameterError("inputMatrix","array",m);if(m.length!==3&&m.length!==4)throw e.invalidParameterError("inputMatrix","3x3 or 4x4 array",m.length);const P=m.flat().map(Number);if(P.length!==9&&P.length!==16)throw e.invalidParameterError("inputMatrix","cardinality of 9 or 16",P.length);return this.options.recombMatrix=P,this}
2function _(m){if(!e.plainObject(m))throw e.invalidParameterError("options","plain object",m);if("brightness"in m)if(e.number(m.brightness)&&m.brightness>=0)this.options.brightness=m.brightness;else throw e.invalidParameterError("brightness","number above zero",m.brightness);if("saturation"in m)if(e.number(m.saturation)&&m.saturation>=0)this.options.saturation=m.saturation;else throw e.invalidParameterError("saturation","number above zero",m.saturation);if("hue"in m)if(e.integer(m.hue))this.options.hue=m.hue%360;else throw e.invalidParameterError("hue","number",m.hue);if("lightness"in m)if(e.number(m.lightness))this.options.lightness=m.lightness;else throw e.invalidParameterError("lightness","number",m.lightness);return this}return Oe=function(m){Object.assign(m.prototype,{rotate:w,flip:n,flop:f,affine:s,sharpen:o,median:i,blur:c,flatten:a,unflatten:u,gamma:t,negate:d,normalise:l,normalize:g,clahe:p,convolve:y,threshold:j,boolean:S,linear:C,recomb:F,modulate:_})},Oe}var _e,jr;function wt(){if(jr)return _e;jr=1;const h=Ue(),e=z(),b={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};function w(u){return this._setBackgroundColourOption("tint",u),this}function n(u){return this.options.greyscale=e.bool(u)?u:!0,this}function f(u){return this.greyscale(u)}function s(u){if(!e.string(u))throw e.invalidParameterError("colourspace","string",u);return this.options.colourspacePipeline=u,this}function o(u){return this.pipelineColourspace(u)}function i(u){if(!e.string(u))throw e.invalidParameterError("colourspace","string",u);return this.options.colourspace=u,this}function c(u){return this.toColourspace(u)}function a(u,t){if(e.defined(t))if(e.object(t)||e.string(t)){const d=h(t);this.options[u]=[d.red(),d.green(),d.blue(),Math.round(d.alpha()*255)]}else throw e.invalidParameterError("background","object or string",t)}return _e=function(u){Object.assign(u.prototype,{tint:w,greyscale:n,grayscale:f,pipelineColourspace:s,pipelineColorspace:o,toColourspace:i,toColorspace:c,_setBackgroundColourOption:a}),u.colourspace=b,u.colorspace=b},_e}var Fe,kr;function Et(){if(kr)return Fe;kr=1;const h=z(),e={and:"and",or:"or",eor:"eor"};function b(){return this.options.removeAlpha=!0,this}function w(o){if(h.defined(o))if(h.number(o)&&h.inRange(o,0,1))this.options.ensureAlpha=o;else throw h.invalidParameterError("alpha","number between 0 and 1",o);else this.options.ensureAlpha=1;return this}function n(o){const i={red:0,green:1,blue:2,alpha:3};if(Object.keys(i).includes(o)&&(o=i[o]),h.integer(o)&&h.inRange(o,0,4))this.options.extractChannel=o;else throw h.invalidParameterError("channel","integer or one of: red, green, blue, alpha",o);return this}function f(o,i){return Array.isArray(o)?o.forEach(function(c){this.options.joinChannelIn.push(this._createInputDescriptor(c,i))},this):this.options.joinChannelIn.push(this._createInputDescriptor(o,i)),this}function s(o){if(h.string(o)&&h.inArray(o,["and","or","eor"]))this.options.bandBoolOp=o;else throw h.invalidParameterError("boolOp","one of: and, or, eor",o);return this}return Fe=function(o){Object.assign(o.prototype,{removeAlpha:b,ensureAlpha:w,extractChannel:n,joinChannel:f,bandbool:s}),o.bool=e},Fe}var Te,Nr;function yt(){if(Nr)return Te;Nr=1;const h=D,e=z(),b=K(),w=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),n=/\.(jp[2x]|j2[kc])$/i,f=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),s=r=>1<<31-Math.clz32(Math.ceil(Math.log2(r)));function o(r,E){let I;if(e.string(r)?e.string(this.options.input.file)&&h.resolve(this.options.input.file)===h.resolve(r)?I=new Error("Cannot use same file for input and output"):n.test(h.extname(r))&&!this.constructor.format.jp2k.output.f
2ile&&(I=f()):I=new Error("Missing output file path"),I)if(e.fn(E))E(I);else return Promise.reject(I);else{this.options.fileOut=r;const L=Error();return this._pipeline(E,L)}return this}function i(r,E){e.object(r)?this._setBooleanOption("resolveWithObject",r.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";const I=Error();return this._pipeline(e.fn(r)?r:E,I)}function c(){return this.options.keepMetadata|=1,this}function a(r){if(e.object(r))for(const[E,I]of Object.entries(r))if(e.object(I))for(const[L,$]of Object.entries(I))if(e.string($))this.options.withExif[`exif-${E.toLowerCase()}-${L}`]=$;else throw e.invalidParameterError(`${E}.${L}`,"string",$);else throw e.invalidParameterError(E,"object",I);else throw e.invalidParameterError("exif","object",r);return this.options.withExifMerge=!1,this.keepExif()}function u(r){return this.withExif(r),this.options.withExifMerge=!0,this}function t(){return this.options.keepMetadata|=8,this}function d(r,E){if(e.string(r))this.options.withIccProfile=r;else throw e.invalidParameterError("icc","string",r);if(this.keepIccProfile(),e.object(E)&&e.defined(E.attach))if(e.bool(E.attach))E.attach||(this.options.keepMetadata&=-9);else throw e.invalidParameterError("attach","boolean",E.attach);return this}function l(){return this.options.keepMetadata=31,this}function g(r){if(this.keepMetadata(),this.withIccProfile("srgb"),e.object(r)){if(e.defined(r.orientation))if(e.integer(r.orientation)&&e.inRange(r.orientation,1,8))this.options.withMetadataOrientation=r.orientation;else throw e.invalidParameterError("orientation","integer between 1 and 8",r.orientation);if(e.defined(r.density))if(e.number(r.density)&&r.density>0)this.options.withMetadataDensity=r.density;else throw e.invalidParameterError("density","positive number",r.density);e.defined(r.icc)&&this.withIccProfile(r.icc),e.defined(r.exif)&&this.withExifMerge(r.exif)}return this}function p(r,E){const I=w.get((e.object(r)&&e.string(r.id)?r.id:r).toLowerCase());if(!I)throw e.invalidParameterError("format",`one of: ${[...w.keys()].join(", ")}`,r);return this[I](E)}function y(r){if(e.object(r)){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.jpegQuality=r.quality;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);if(e.defined(r.progressive)&&this._setBooleanOption("jpegProgressive",r.progressive),e.defined(r.chromaSubsampling))if(e.string(r.chromaSubsampling)&&e.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=r.chromaSubsampling;else throw e.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling);const E=e.bool(r.optimizeCoding)?r.optimizeCoding:r.optimiseCoding;if(e.defined(E)&&this._setBooleanOption("jpegOptimiseCoding",E),e.defined(r.mozjpeg))if(e.bool(r.mozjpeg))r.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw e.invalidParameterError("mozjpeg","boolean",r.mozjpeg);const I=e.bool(r.trellisQuantization)?r.trellisQuantization:r.trellisQuantisation;e.defined(I)&&this._setBooleanOption("jpegTrellisQuantisation",I),e.defined(r.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",r.overshootDeringing);const L=e.bool(r.optimizeScans)?r.optimizeScans:r.optimiseScans;e.defined(L)&&(this._setBooleanOption("jpegOptimiseScans",L),L&&(this.options.jpegProgressive=!0));const $=e.number(r.quantizationTable)?r.quantizationTable:r.quantisationTable;if(e.defined($))if(e.integer($)&&e.inRange($,0,8))this.options.jpegQuantisationTable=$;else throw e.invalidParameterError("quantisationTable","integer between 0 and 8",$)}return this._updateFormatOut("jpeg",r)}function j(r){if(e.object(r)){if(e.defined(r.progressive)&&this._setBooleanOption("pngProgressive",r.progressive),e.defined(r.compressionLevel))if(e.integer(r.compressionLevel)&&e.inRange(r.compressionLevel,0,9))this.options.pngCompressionLevel=r.compressionLevel;
2else throw e.invalidParameterError("compressionLevel","integer between 0 and 9",r.compressionLevel);e.defined(r.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",r.adaptiveFiltering);const E=r.colours||r.colors;if(e.defined(E))if(e.integer(E)&&e.inRange(E,2,256))this.options.pngBitdepth=s(E);else throw e.invalidParameterError("colours","integer between 2 and 256",E);if(e.defined(r.palette)?this._setBooleanOption("pngPalette",r.palette):[r.quality,r.effort,r.colours,r.colors,r.dither].some(e.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,0,100))this.options.pngQuality=r.quality;else throw e.invalidParameterError("quality","integer between 0 and 100",r.quality);if(e.defined(r.effort))if(e.integer(r.effort)&&e.inRange(r.effort,1,10))this.options.pngEffort=r.effort;else throw e.invalidParameterError("effort","integer between 1 and 10",r.effort);if(e.defined(r.dither))if(e.number(r.dither)&&e.inRange(r.dither,0,1))this.options.pngDither=r.dither;else throw e.invalidParameterError("dither","number between 0.0 and 1.0",r.dither)}}return this._updateFormatOut("png",r)}function S(r){if(e.object(r)){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.webpQuality=r.quality;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);if(e.defined(r.alphaQuality))if(e.integer(r.alphaQuality)&&e.inRange(r.alphaQuality,0,100))this.options.webpAlphaQuality=r.alphaQuality;else throw e.invalidParameterError("alphaQuality","integer between 0 and 100",r.alphaQuality);if(e.defined(r.lossless)&&this._setBooleanOption("webpLossless",r.lossless),e.defined(r.nearLossless)&&this._setBooleanOption("webpNearLossless",r.nearLossless),e.defined(r.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",r.smartSubsample),e.defined(r.preset))if(e.string(r.preset)&&e.inArray(r.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=r.preset;else throw e.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",r.preset);if(e.defined(r.effort))if(e.integer(r.effort)&&e.inRange(r.effort,0,6))this.options.webpEffort=r.effort;else throw e.invalidParameterError("effort","integer between 0 and 6",r.effort);e.defined(r.minSize)&&this._setBooleanOption("webpMinSize",r.minSize),e.defined(r.mixed)&&this._setBooleanOption("webpMixed",r.mixed)}return _(r,this.options),this._updateFormatOut("webp",r)}function C(r){if(e.object(r)){e.defined(r.reuse)&&this._setBooleanOption("gifReuse",r.reuse),e.defined(r.progressive)&&this._setBooleanOption("gifProgressive",r.progressive);const E=r.colours||r.colors;if(e.defined(E))if(e.integer(E)&&e.inRange(E,2,256))this.options.gifBitdepth=s(E);else throw e.invalidParameterError("colours","integer between 2 and 256",E);if(e.defined(r.effort))if(e.number(r.effort)&&e.inRange(r.effort,1,10))this.options.gifEffort=r.effort;else throw e.invalidParameterError("effort","integer between 1 and 10",r.effort);if(e.defined(r.dither))if(e.number(r.dither)&&e.inRange(r.dither,0,1))this.options.gifDither=r.dither;else throw e.invalidParameterError("dither","number between 0.0 and 1.0",r.dither);if(e.defined(r.interFrameMaxError))if(e.number(r.interFrameMaxError)&&e.inRange(r.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=r.interFrameMaxError;else throw e.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",r.interFrameMaxError);if(e.defined(r.interPaletteMaxError))if(e.number(r.interPaletteMaxError)&&e.inRange(r.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=r.interPaletteMaxError;else throw e.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",r.interPaletteMaxError)}return _(r,this.options),this._updateFormatOut("gif",r)}function F(r){if(!this.constructor.format.jp2k.output.buffer)throw f();if(e.object(r)){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.jp2Quality=r.quality;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);if(e.defined(r.lossless))if(e.bool(r.lossless))this.options.jp2Lossless=r.lossless;
2else throw e.invalidParameterError("lossless","boolean",r.lossless);if(e.defined(r.tileWidth))if(e.integer(r.tileWidth)&&e.inRange(r.tileWidth,1,32768))this.options.jp2TileWidth=r.tileWidth;else throw e.invalidParameterError("tileWidth","integer between 1 and 32768",r.tileWidth);if(e.defined(r.tileHeight))if(e.integer(r.tileHeight)&&e.inRange(r.tileHeight,1,32768))this.options.jp2TileHeight=r.tileHeight;else throw e.invalidParameterError("tileHeight","integer between 1 and 32768",r.tileHeight);if(e.defined(r.chromaSubsampling))if(e.string(r.chromaSubsampling)&&e.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=r.chromaSubsampling;else throw e.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling)}return this._updateFormatOut("jp2",r)}function _(r,E){if(e.object(r)&&e.defined(r.loop))if(e.integer(r.loop)&&e.inRange(r.loop,0,65535))E.loop=r.loop;else throw e.invalidParameterError("loop","integer between 0 and 65535",r.loop);if(e.object(r)&&e.defined(r.delay))if(e.integer(r.delay)&&e.inRange(r.delay,0,65535))E.delay=[r.delay];else if(Array.isArray(r.delay)&&r.delay.every(e.integer)&&r.delay.every(I=>e.inRange(I,0,65535)))E.delay=r.delay;else throw e.invalidParameterError("delay","integer or an array of integers between 0 and 65535",r.delay)}function m(r){if(e.object(r)){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.tiffQuality=r.quality;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);if(e.defined(r.bitdepth))if(e.integer(r.bitdepth)&&e.inArray(r.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=r.bitdepth;else throw e.invalidParameterError("bitdepth","1, 2, 4 or 8",r.bitdepth);if(e.defined(r.tile)&&this._setBooleanOption("tiffTile",r.tile),e.defined(r.tileWidth))if(e.integer(r.tileWidth)&&r.tileWidth>0)this.options.tiffTileWidth=r.tileWidth;else throw e.invalidParameterError("tileWidth","integer greater than zero",r.tileWidth);if(e.defined(r.tileHeight))if(e.integer(r.tileHeight)&&r.tileHeight>0)this.options.tiffTileHeight=r.tileHeight;else throw e.invalidParameterError("tileHeight","integer greater than zero",r.tileHeight);if(e.defined(r.miniswhite)&&this._setBooleanOption("tiffMiniswhite",r.miniswhite),e.defined(r.pyramid)&&this._setBooleanOption("tiffPyramid",r.pyramid),e.defined(r.xres))if(e.number(r.xres)&&r.xres>0)this.options.tiffXres=r.xres;else throw e.invalidParameterError("xres","number greater than zero",r.xres);if(e.defined(r.yres))if(e.number(r.yres)&&r.yres>0)this.options.tiffYres=r.yres;else throw e.invalidParameterError("yres","number greater than zero",r.yres);if(e.defined(r.compression))if(e.string(r.compression)&&e.inArray(r.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=r.compression;else throw e.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",r.compression);if(e.defined(r.predictor))if(e.string(r.predictor)&&e.inArray(r.predictor,["none","horizontal","float"]))this.options.tiffPredictor=r.predictor;else throw e.invalidParameterError("predictor","one of: none, horizontal, float",r.predictor);if(e.defined(r.resolutionUnit))if(e.string(r.resolutionUnit)&&e.inArray(r.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=r.resolutionUnit;else throw e.invalidParameterError("resolutionUnit","one of: inch, cm",r.resolutionUnit)}return this._updateFormatOut("tiff",r)}function P(r){return this.heif({...r,compression:"av1"})}function N(r){if(e.object(r)){if(e.string(r.compression)&&e.inArray(r.compression,["av1","hevc"]))this.options.heifCompression=r.compression;else throw e.invalidParameterError("compression","one of: av1, hevc",r.compression);if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.heifQuality=r.quality;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);if(e.defined(r.lossless))if(e.bool(r.lossless))this.options.heifLossless=r.lossless;else throw e.invalidParameterError("lossless","boolean",r.lossless);if(e.defined(r.effort))if(e.integer(r.effort)&&e.inRange(r.effort,0,9))this.options.heifEffort=r.effort;
2else throw e.invalidParameterError("effort","integer between 0 and 9",r.effort);if(e.defined(r.chromaSubsampling))if(e.string(r.chromaSubsampling)&&e.inArray(r.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=r.chromaSubsampling;else throw e.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",r.chromaSubsampling);if(e.defined(r.bitdepth))if(e.integer(r.bitdepth)&&e.inArray(r.bitdepth,[8,10,12])){if(r.bitdepth!==8&&this.constructor.versions.heif)throw e.invalidParameterError("bitdepth when using prebuilt binaries",8,r.bitdepth);this.options.heifBitdepth=r.bitdepth}else throw e.invalidParameterError("bitdepth","8, 10 or 12",r.bitdepth)}else throw e.invalidParameterError("options","Object",r);return this._updateFormatOut("heif",r)}function G(r){if(e.object(r)){if(e.defined(r.quality))if(e.integer(r.quality)&&e.inRange(r.quality,1,100))this.options.jxlDistance=r.quality>=30?.1+(100-r.quality)*.09:53/3e3*r.quality*r.quality-23/20*r.quality+25;else throw e.invalidParameterError("quality","integer between 1 and 100",r.quality);else if(e.defined(r.distance))if(e.number(r.distance)&&e.inRange(r.distance,0,15))this.options.jxlDistance=r.distance;else throw e.invalidParameterError("distance","number between 0.0 and 15.0",r.distance);if(e.defined(r.decodingTier))if(e.integer(r.decodingTier)&&e.inRange(r.decodingTier,0,4))this.options.jxlDecodingTier=r.decodingTier;else throw e.invalidParameterError("decodingTier","integer between 0 and 4",r.decodingTier);if(e.defined(r.lossless))if(e.bool(r.lossless))this.options.jxlLossless=r.lossless;else throw e.invalidParameterError("lossless","boolean",r.lossless);if(e.defined(r.effort))if(e.integer(r.effort)&&e.inRange(r.effort,3,9))this.options.jxlEffort=r.effort;else throw e.invalidParameterError("effort","integer between 3 and 9",r.effort)}return this._updateFormatOut("jxl",r)}function M(r){if(e.object(r)&&e.defined(r.depth))if(e.string(r.depth)&&e.inArray(r.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=r.depth;else throw e.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",r.depth);return this._updateFormatOut("raw")}function B(r){if(e.object(r)){if(e.defined(r.size))if(e.integer(r.size)&&e.inRange(r.size,1,8192))this.options.tileSize=r.size;else throw e.invalidParameterError("size","integer between 1 and 8192",r.size);if(e.defined(r.overlap))if(e.integer(r.overlap)&&e.inRange(r.overlap,0,8192)){if(r.overlap>this.options.tileSize)throw e.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,r.overlap);this.options.tileOverlap=r.overlap}else throw e.invalidParameterError("overlap","integer between 0 and 8192",r.overlap);if(e.defined(r.container))if(e.string(r.container)&&e.inArray(r.container,["fs","zip"]))this.options.tileContainer=r.container;else throw e.invalidParameterError("container","one of: fs, zip",r.container);if(e.defined(r.layout))if(e.string(r.layout)&&e.inArray(r.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=r.layout;else throw e.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",r.layout);if(e.defined(r.angle))if(e.integer(r.angle)&&!(r.angle%90))this.options.tileAngle=r.angle;else throw e.invalidParameterError("angle","positive/negative multiple of 90",r.angle);if(this._setBackgroundColourOption("tileBackground",r.background),e.defined(r.depth))if(e.string(r.depth)&&e.inArray(r.depth,["onepixel","onetile","one"]))this.options.tileDepth=r.depth;else throw e.invalidParameterError("depth","one of: onepixel, onetile, one",r.depth);if(e.defined(r.skipBlanks))if(e.integer(r.skipBlanks)&&e.inRange(r.skipBlanks,-1,65535))this.options.tileSkipBlanks=r.skipBlanks;else throw e.invalidParameterError("skipBlanks","integer between -1 and 255/65535",r.skipBlanks);else e.defined(r.layout)&&r.layout==="google"&&(this.options.tileSkipBlanks=5);const E=e.bool(r.center)?r.center:r.centre;if(e.defined(E)&&this._setBooleanOption("tileCentre",E),e.defined(r.id))if(e.string(r.id))this.options.tileId=r.id;
2else throw e.invalidParameterError("id","string",r.id);if(e.defined(r.basename))if(e.string(r.basename))this.options.tileBasename=r.basename;else throw e.invalidParameterError("basename","string",r.basename)}if(e.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw e.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function T(r){if(!e.plainObject(r))throw e.invalidParameterError("options","object",r);if(e.integer(r.seconds)&&e.inRange(r.seconds,0,3600))this.options.timeoutSeconds=r.seconds;else throw e.invalidParameterError("seconds","integer between 0 and 3600",r.seconds);return this}function A(r,E){return e.object(E)&&E.force===!1||(this.options.formatOut=r),this}function R(r,E){if(e.bool(E))this.options[r]=E;else throw e.invalidParameterError(r,"boolean",E)}function v(){if(!this.options.streamOut){this.options.streamOut=!0;const r=Error();this._pipeline(void 0,r)}}function x(r,E){return typeof r=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),b.pipeline(this.options,(I,L,$)=>{I?r(e.nativeError(I,E)):r(null,L,$)})}):b.pipeline(this.options,(I,L,$)=>{I?r(e.nativeError(I,E)):r(null,L,$)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),b.pipeline(this.options,(I,L,$)=>{I?this.emit("error",e.nativeError(I,E)):(this.emit("info",$),this.push(L)),this.push(null),this.on("end",()=>
2this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):b.pipeline(this.options,(I,L,$)=>{I?this.emit("error",e.nativeError(I,E)):(this.emit("info",$),this.push(L)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((I,L)=>{this.once("finish",()=>{this._flattenBufferIn(),b.pipeline(this.options,($,k,O)=>{$?L(e.nativeError($,E)):this.options.resolveWithObject?I({data:k,info:O}):I(k)})})}):new Promise((I,L)=>{b.pipeline(this.options,($,k,O)=>{$?L(e.nativeError($,E)):this.options.resolveWithObject?I({data:k,info:O}):I(k)})})}return Te=function(r){Object.assign(r.prototype,{toFile:o,toBuffer:i,keepExif:c,withExif:a,withExifMerge:u,keepIccProfile:t,withIccProfile:d,keepMetadata:l,withMetadata:g,toFormat:p,jpeg:y,jp2:F,png:j,webp:S,tiff:m,avif:P,heif:N,jxl:G,gif:C,raw:M,tile:B,timeout:T,_updateFormatOut:A,_setBooleanOption:R,_read:v,_pipeline:x})},Te}var Me,Cr;function Rt(){if(Cr)return Me;Cr=1;const h=D,e=De(),b=z(),{runtimePlatformArch:w}=Tr(),n=K(),f=w(),s=n.libvipsVersion(),o=n.format();o.heif.output.alias=["avif","heic"],o.jpeg.output.alias=["jpe","jpg"],o.tiff.output.alias=["tif"],o.jp2k.output.alias=["j2c","j2k","jp2","jpx"];const i={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"};let c={vips:s.semver};if(!s.isGlobal)if(s.isWasm)try{c=require("@img/sharp-wasm32/versions")}catch{}else try{c=U(`@img/sharp-${f}/versions`)}catch{try{c=U(`@img/sharp-libvips-${f}/versions`)}catch{}}c.sharp=Fr.version,c.heif&&o.heif&&(o.heif.input.fileSuffix=[".avif"],o.heif.output.alias=["avif"]);function a(y){return b.bool(y)?y?n.cache(50,20,100):n.cache(0,0,0):b.object(y)?n.cache(y.memory,y.files,y.items):n.cache()}a(!0);function u(y){return n.concurrency(b.integer(y)?y:null)}e.familySync()===e.GLIBC&&!n._isUsingJemalloc()?n.concurrency(1):e.familySync()===e.MUSL&&n.concurrency()===1024&&n.concurrency(D.availableParallelism());const t=new h.EventEmitter;function d(){return n.counters()}function l(y){return n.simd(b.bool(y)?y:null)}function g(y){if(b.object(y))if(Array.isArray(y.operation)&&y.operation.every(b.string))n.block(y.operation,!0);else throw b.invalidParameterError("operation","Array<string>",y.operation);else throw b.invalidParameterError("options","object",y)}function p(y){if(b.object(y))if(Array.isArray(y.operation)&&y.operation.every(b.string))n.block(y.operation,!1);else throw b.invalidParameterError("operation","Array<string>",y.operation);else throw b.invalidParameterError("options","object",y)}return Me=function(y){y.cache=a,y.concurrency=u,y.counters=d,y.simd=l,y.format=o,y.interpolators=i,y.versions=c,y.queue=t,y.block=g,y.unblock=p},Me}var Be,qr;function Pt(){if(qr)return Be;qr=1;const h=ft();return mt()(h),bt()(h),pt()(h),vt()(h),wt()(h),Et()(h),yt()(h),Rt()(h),Be=h,Be}var xt=Pt();const It=Dr(xt),At=Object.freeze(Object.defineProperty({__proto__:null,default:It},Symbol.toStringTag,{value:"Module"}));export{At as i};

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.